@butternutbox/pawprint-native 0.1.0 → 0.2.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 +5 -5
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +123 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +124 -85
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/src/components/atoms/Illustration/Illustration.stories.tsx +2 -2
- package/src/components/atoms/Illustration/Illustration.tsx +3 -3
- package/src/components/atoms/Link/Link.test.tsx +3 -3
- package/src/components/atoms/Link/Link.tsx +7 -6
- package/src/components/atoms/Switch/Switch.tsx +13 -5
- package/src/components/molecules/ButtonDock/ButtonDock.stories.tsx +44 -25
- package/src/components/molecules/ButtonDock/ButtonDock.tsx +16 -13
- package/src/components/molecules/ButtonGroup/ButtonGroup.stories.tsx +47 -22
- package/src/components/molecules/FilterTab/FilterTab.tsx +4 -4
- package/src/components/molecules/PasswordField/PasswordFieldError.tsx +6 -5
- package/src/components/molecules/PasswordField/PasswordFieldRequirements.tsx +11 -8
- package/src/components/molecules/PictureSelector/PictureSelector.stories.tsx +0 -39
- package/src/components/molecules/PictureSelector/PictureSelector.tsx +58 -36
package/dist/index.d.cts
CHANGED
|
@@ -392,7 +392,7 @@ type IconButtonProps = IconButtonOwnProps & Omit<PressableProps, keyof IconButto
|
|
|
392
392
|
*/
|
|
393
393
|
declare const IconButton: React.ForwardRefExoticComponent<IconButtonOwnProps & Omit<PressableProps, "children" | keyof IconButtonOwnProps> & React.RefAttributes<View>>;
|
|
394
394
|
|
|
395
|
-
type IllustrationSize = "sm" | "lg";
|
|
395
|
+
type IllustrationSize = "sm" | "lg" | "xl";
|
|
396
396
|
type PawprintIllustration$2 = React.ComponentType<{
|
|
397
397
|
width?: number;
|
|
398
398
|
height?: number;
|
|
@@ -415,7 +415,7 @@ type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof Illustrati
|
|
|
415
415
|
* ```
|
|
416
416
|
*
|
|
417
417
|
* @param illustration - **(required)** Illustration component
|
|
418
|
-
* @param size - *(optional)* Size variant: sm (default), lg
|
|
418
|
+
* @param size - *(optional)* Size variant: sm (default), lg, xl
|
|
419
419
|
* @param aria-label - *(optional)* Accessible label
|
|
420
420
|
*/
|
|
421
421
|
declare const Illustration: React.ForwardRefExoticComponent<IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps> & React.RefAttributes<View>>;
|
|
@@ -1828,7 +1828,6 @@ type PawprintIllustration = React.ComponentType<{
|
|
|
1828
1828
|
type PictureSelectorItem = {
|
|
1829
1829
|
value: string;
|
|
1830
1830
|
illustration?: PawprintIllustration;
|
|
1831
|
-
icon?: PawprintIcon;
|
|
1832
1831
|
disabled?: boolean;
|
|
1833
1832
|
ariaLabel?: string;
|
|
1834
1833
|
insightTitle?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -392,7 +392,7 @@ type IconButtonProps = IconButtonOwnProps & Omit<PressableProps, keyof IconButto
|
|
|
392
392
|
*/
|
|
393
393
|
declare const IconButton: React.ForwardRefExoticComponent<IconButtonOwnProps & Omit<PressableProps, "children" | keyof IconButtonOwnProps> & React.RefAttributes<View>>;
|
|
394
394
|
|
|
395
|
-
type IllustrationSize = "sm" | "lg";
|
|
395
|
+
type IllustrationSize = "sm" | "lg" | "xl";
|
|
396
396
|
type PawprintIllustration$2 = React.ComponentType<{
|
|
397
397
|
width?: number;
|
|
398
398
|
height?: number;
|
|
@@ -415,7 +415,7 @@ type IllustrationProps = IllustrationOwnProps & Omit<ViewProps, keyof Illustrati
|
|
|
415
415
|
* ```
|
|
416
416
|
*
|
|
417
417
|
* @param illustration - **(required)** Illustration component
|
|
418
|
-
* @param size - *(optional)* Size variant: sm (default), lg
|
|
418
|
+
* @param size - *(optional)* Size variant: sm (default), lg, xl
|
|
419
419
|
* @param aria-label - *(optional)* Accessible label
|
|
420
420
|
*/
|
|
421
421
|
declare const Illustration: React.ForwardRefExoticComponent<IllustrationOwnProps & Omit<ViewProps, keyof IllustrationOwnProps> & React.RefAttributes<View>>;
|
|
@@ -1828,7 +1828,6 @@ type PawprintIllustration = React.ComponentType<{
|
|
|
1828
1828
|
type PictureSelectorItem = {
|
|
1829
1829
|
value: string;
|
|
1830
1830
|
illustration?: PawprintIllustration;
|
|
1831
|
-
icon?: PawprintIcon;
|
|
1832
1831
|
disabled?: boolean;
|
|
1833
1832
|
ariaLabel?: string;
|
|
1834
1833
|
insightTitle?: string;
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { Slot } from '@rn-primitives/slot';
|
|
|
13
13
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
14
14
|
import * as CheckboxPrimitive from '@rn-primitives/checkbox';
|
|
15
15
|
import * as ProgressPrimitive from '@rn-primitives/progress';
|
|
16
|
-
import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
|
|
16
|
+
import Svg, { Path, Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
|
|
17
17
|
import * as SelectPrimitive3 from '@rn-primitives/select';
|
|
18
18
|
import * as SliderPrimitive from '@rn-primitives/slider';
|
|
19
19
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
@@ -4424,7 +4424,7 @@ var Illustration = React60.forwardRef(
|
|
|
4424
4424
|
accessibilityLabel: ariaLabel,
|
|
4425
4425
|
accessible: !!ariaLabel
|
|
4426
4426
|
}, rest), {
|
|
4427
|
-
children: /* @__PURE__ */ jsx(IllustrationComponent, { height: dimension })
|
|
4427
|
+
children: /* @__PURE__ */ jsx(IllustrationComponent, { width: dimension, height: dimension })
|
|
4428
4428
|
})
|
|
4429
4429
|
);
|
|
4430
4430
|
}
|
|
@@ -4490,6 +4490,7 @@ ForwardRef710.category = "core";
|
|
|
4490
4490
|
var ArrowForward = (props, ref) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "currentColor", viewBox: "0 0 24 24", ref }, props), { children: /* @__PURE__ */ jsx("path", { d: "M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59a.996.996 0 0 0 0-1.41l-6.58-6.6a.996.996 0 1 0-1.41 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1" }) }));
|
|
4491
4491
|
var ForwardRef810 = forwardRef(ArrowForward);
|
|
4492
4492
|
ForwardRef810.category = "core";
|
|
4493
|
+
var ArrowForward_default = ForwardRef810;
|
|
4493
4494
|
var ArrowLeft = (props, ref) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "currentColor", viewBox: "0 0 24 24", ref }, props), { children: /* @__PURE__ */ jsx("path", { d: "M12.29 8.71 9.7 11.3a.996.996 0 0 0 0 1.41l2.59 2.59c.63.63 1.71.18 1.71-.71V9.41c0-.89-1.08-1.33-1.71-.7" }) }));
|
|
4494
4495
|
var ForwardRef910 = forwardRef(ArrowLeft);
|
|
4495
4496
|
ForwardRef910.category = "core";
|
|
@@ -4998,11 +4999,11 @@ var Link = React60.forwardRef(
|
|
|
4998
4999
|
}
|
|
4999
5000
|
),
|
|
5000
5001
|
standalone && /* @__PURE__ */ jsx(
|
|
5001
|
-
|
|
5002
|
+
Icon,
|
|
5002
5003
|
{
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5004
|
+
icon: ArrowForward_default,
|
|
5005
|
+
size: "xs",
|
|
5006
|
+
customColour: pressed ? linkColour.hover : linkColour.default
|
|
5006
5007
|
}
|
|
5007
5008
|
)
|
|
5008
5009
|
] })
|
|
@@ -7678,9 +7679,13 @@ var StyledControlTrack = styled52(View)(
|
|
|
7678
7679
|
minWidth: controlWidth,
|
|
7679
7680
|
minHeight: controlHeight,
|
|
7680
7681
|
borderRadius: controlHeight,
|
|
7681
|
-
|
|
7682
|
+
// Keep the border width constant and only toggle the colour. Animating
|
|
7683
|
+
// the width between 0 and 2 was causing a momentary background bleed on
|
|
7684
|
+
// Android when transitioning back to the off state.
|
|
7685
|
+
borderWidth: controlBorderWidth,
|
|
7682
7686
|
borderColor: switchChecked ? "transparent" : controlBorderColor,
|
|
7683
7687
|
backgroundColor: switchChecked ? controlBgChecked : controlBgDefault,
|
|
7688
|
+
overflow: "hidden",
|
|
7684
7689
|
justifyContent: "center"
|
|
7685
7690
|
})
|
|
7686
7691
|
);
|
|
@@ -7720,9 +7725,9 @@ var Switch = React60.forwardRef(
|
|
|
7720
7725
|
const controlHeight = parseTokenValue16(size.control.height);
|
|
7721
7726
|
const thumbSize = parseTokenValue16(size.thumb.default);
|
|
7722
7727
|
const borderWidthValue = parseTokenValue16(borderWidth.control.default);
|
|
7723
|
-
const
|
|
7724
|
-
const
|
|
7725
|
-
const
|
|
7728
|
+
const inset = 2;
|
|
7729
|
+
const offTranslateX = inset;
|
|
7730
|
+
const onTranslateX = controlWidth - borderWidthValue * 2 - thumbSize - inset;
|
|
7726
7731
|
const animValue = useRef(new Animated.Value(isChecked ? 1 : 0)).current;
|
|
7727
7732
|
useEffect(() => {
|
|
7728
7733
|
Animated.timing(animValue, {
|
|
@@ -7733,7 +7738,7 @@ var Switch = React60.forwardRef(
|
|
|
7733
7738
|
}, [isChecked, animValue]);
|
|
7734
7739
|
const thumbTranslateX = animValue.interpolate({
|
|
7735
7740
|
inputRange: [0, 1],
|
|
7736
|
-
outputRange: [
|
|
7741
|
+
outputRange: [offTranslateX, onTranslateX]
|
|
7737
7742
|
});
|
|
7738
7743
|
const handleCheckedChange = (checked) => {
|
|
7739
7744
|
if (!isControlled) {
|
|
@@ -9306,12 +9311,14 @@ var StyledDockRoot = styled52(View)(
|
|
|
9306
9311
|
paddingVertical: dockPaddingVertical
|
|
9307
9312
|
})
|
|
9308
9313
|
);
|
|
9309
|
-
var StyledStackedInner = styled52(View)(
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9314
|
+
var StyledStackedInner = styled52(View)(
|
|
9315
|
+
({ innerGap }) => ({
|
|
9316
|
+
alignItems: "center",
|
|
9317
|
+
gap: innerGap,
|
|
9318
|
+
width: "100%",
|
|
9319
|
+
maxWidth: 520
|
|
9320
|
+
})
|
|
9321
|
+
);
|
|
9315
9322
|
var StyledButtonGroup = styled52(View)(({ groupDirection, groupAlign, groupJustify, groupGap }) => __spreadValues({
|
|
9316
9323
|
flexDirection: groupDirection,
|
|
9317
9324
|
alignItems: groupAlign,
|
|
@@ -9324,7 +9331,7 @@ var ButtonDock = React60.forwardRef(
|
|
|
9324
9331
|
var _b = _a, { variant = "stacked", leadingContent, description, children } = _b, rest = __objRest(_b, ["variant", "leadingContent", "description", "children"]);
|
|
9325
9332
|
const theme2 = useTheme();
|
|
9326
9333
|
const { buttonDock, buttonGroup } = theme2.tokens.components;
|
|
9327
|
-
const { dimensions } = theme2.tokens.semantics;
|
|
9334
|
+
const { dimensions, typography } = theme2.tokens.semantics;
|
|
9328
9335
|
const isStacked = variant === "stacked";
|
|
9329
9336
|
const groupGap = parseTokenValue28(
|
|
9330
9337
|
isStacked ? buttonGroup.spacing.stacked.gap : buttonGroup.spacing.sideBySide.gap
|
|
@@ -9337,32 +9344,37 @@ var ButtonDock = React60.forwardRef(
|
|
|
9337
9344
|
dockBorderTopWidth: parseTokenValue28(dimensions.borderWidth.sm),
|
|
9338
9345
|
dockBorderTopColor: buttonDock.colour.border,
|
|
9339
9346
|
dockPaddingVertical: parseTokenValue28(
|
|
9340
|
-
buttonDock.spacing[variant].
|
|
9347
|
+
buttonDock.spacing[variant].mobile.topPadding
|
|
9341
9348
|
)
|
|
9342
9349
|
}, rest), {
|
|
9343
|
-
children: isStacked ? /* @__PURE__ */ jsxs(
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9350
|
+
children: isStacked ? /* @__PURE__ */ jsxs(
|
|
9351
|
+
StyledStackedInner,
|
|
9352
|
+
{
|
|
9353
|
+
innerGap: parseTokenValue28(buttonGroup.spacing.gap),
|
|
9354
|
+
children: [
|
|
9355
|
+
leadingContent,
|
|
9356
|
+
/* @__PURE__ */ jsx(
|
|
9357
|
+
StyledButtonGroup,
|
|
9358
|
+
{
|
|
9359
|
+
groupDirection: "column",
|
|
9360
|
+
groupAlign: "stretch",
|
|
9361
|
+
groupJustify: "center",
|
|
9362
|
+
groupGap,
|
|
9363
|
+
children
|
|
9364
|
+
}
|
|
9365
|
+
),
|
|
9366
|
+
description && /* @__PURE__ */ jsx(
|
|
9367
|
+
Typography,
|
|
9368
|
+
{
|
|
9369
|
+
token: typography.body.medium.md,
|
|
9370
|
+
color: buttonGroup.colour.text,
|
|
9371
|
+
align: "center",
|
|
9372
|
+
children: description
|
|
9373
|
+
}
|
|
9374
|
+
)
|
|
9375
|
+
]
|
|
9376
|
+
}
|
|
9377
|
+
) : /* @__PURE__ */ jsx(
|
|
9366
9378
|
StyledButtonGroup,
|
|
9367
9379
|
{
|
|
9368
9380
|
groupDirection: "row",
|
|
@@ -9814,7 +9826,6 @@ var StyledItem2 = styled52(Pressable)(
|
|
|
9814
9826
|
itemHeight,
|
|
9815
9827
|
itemMinWidth,
|
|
9816
9828
|
itemPaddingH,
|
|
9817
|
-
itemPaddingV,
|
|
9818
9829
|
itemBorderRadius,
|
|
9819
9830
|
itemBgColor,
|
|
9820
9831
|
itemOpacity,
|
|
@@ -9826,7 +9837,10 @@ var StyledItem2 = styled52(Pressable)(
|
|
|
9826
9837
|
height: itemHeight
|
|
9827
9838
|
}, isIconOnly ? { width: itemHeight, maxWidth: itemHeight } : { minWidth: itemMinWidth }), {
|
|
9828
9839
|
paddingHorizontal: itemPaddingH,
|
|
9829
|
-
|
|
9840
|
+
// Vertical padding is intentionally omitted: with a fixed `height` and
|
|
9841
|
+
// flex centering, the label sits in the middle of the box. Applying
|
|
9842
|
+
// `verticalPadding: 12px` on top of the 36px small height would leave a
|
|
9843
|
+
// 12px inner area, clipping the 18px line-height text on Android.
|
|
9830
9844
|
borderRadius: itemBorderRadius,
|
|
9831
9845
|
backgroundColor: itemBgColor,
|
|
9832
9846
|
opacity: itemOpacity,
|
|
@@ -9879,7 +9893,6 @@ var FilterTabItem = React60.forwardRef(
|
|
|
9879
9893
|
itemHeight: height,
|
|
9880
9894
|
itemMinWidth: minWidth,
|
|
9881
9895
|
itemPaddingH: parseTokenValue33(tabItem.spacing.horizontalPadding),
|
|
9882
|
-
itemPaddingV: parseTokenValue33(tabItem.spacing.verticalPadding),
|
|
9883
9896
|
itemBorderRadius: parseTokenValue33(tabItem.borderRadius.default),
|
|
9884
9897
|
itemBgColor: isActive ? tabItem.colour.background.selected : tabItem.colour.background.default,
|
|
9885
9898
|
itemOpacity: disabled ? parseFloat(tabItem.opacity.disabled.default) : 1,
|
|
@@ -10350,20 +10363,21 @@ var StyledErrorRow2 = styled52(View)(({ gap }) => ({
|
|
|
10350
10363
|
var PasswordFieldError = React60.forwardRef((_a, ref) => {
|
|
10351
10364
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
10352
10365
|
const theme2 = useTheme();
|
|
10353
|
-
const {
|
|
10366
|
+
const { listItem } = theme2.tokens.components.validationList;
|
|
10367
|
+
const { typography } = theme2.tokens.semantics;
|
|
10354
10368
|
return /* @__PURE__ */ jsxs(
|
|
10355
10369
|
StyledErrorRow2,
|
|
10356
10370
|
__spreadProps(__spreadValues({
|
|
10357
10371
|
ref,
|
|
10358
|
-
gap: parseTokenValue36(spacing.
|
|
10372
|
+
gap: parseTokenValue36(listItem.spacing.gap)
|
|
10359
10373
|
}, rest), {
|
|
10360
10374
|
children: [
|
|
10361
|
-
/* @__PURE__ */ jsx(Icon, { icon: Cancel_default, size: "
|
|
10375
|
+
/* @__PURE__ */ jsx(Icon, { icon: Cancel_default, size: "xs", customColour: listItem.colour.icon.error }),
|
|
10362
10376
|
/* @__PURE__ */ jsx(
|
|
10363
10377
|
Typography,
|
|
10364
10378
|
{
|
|
10365
|
-
token:
|
|
10366
|
-
color: colour.
|
|
10379
|
+
token: typography.body.medium.md,
|
|
10380
|
+
color: listItem.colour.text.default,
|
|
10367
10381
|
children
|
|
10368
10382
|
}
|
|
10369
10383
|
)
|
|
@@ -10388,7 +10402,8 @@ var StyledRequirementItem = styled52(View)(
|
|
|
10388
10402
|
var PasswordFieldRequirements = React60.forwardRef((_a, ref) => {
|
|
10389
10403
|
var _b = _a, { requirements } = _b, rest = __objRest(_b, ["requirements"]);
|
|
10390
10404
|
const theme2 = useTheme();
|
|
10391
|
-
const {
|
|
10405
|
+
const { listItem, list } = theme2.tokens.components.validationList;
|
|
10406
|
+
const { typography } = theme2.tokens.semantics;
|
|
10392
10407
|
if (!requirements || requirements.length === 0) {
|
|
10393
10408
|
return null;
|
|
10394
10409
|
}
|
|
@@ -10399,28 +10414,28 @@ var PasswordFieldRequirements = React60.forwardRef((_a, ref) => {
|
|
|
10399
10414
|
StyledRequirementsList,
|
|
10400
10415
|
__spreadProps(__spreadValues({
|
|
10401
10416
|
ref,
|
|
10402
|
-
listGap: parseTokenValue37(spacing.
|
|
10417
|
+
listGap: parseTokenValue37(list.spacing.gap)
|
|
10403
10418
|
}, rest), {
|
|
10404
10419
|
children: normalizedRequirements.map((requirement, index) => {
|
|
10405
|
-
const iconColour = requirement.satisfied ?
|
|
10420
|
+
const iconColour = requirement.satisfied ? listItem.colour.icon.success : listItem.colour.icon.error;
|
|
10406
10421
|
return /* @__PURE__ */ jsxs(
|
|
10407
10422
|
StyledRequirementItem,
|
|
10408
10423
|
{
|
|
10409
|
-
itemGap: parseTokenValue37(spacing.
|
|
10424
|
+
itemGap: parseTokenValue37(listItem.spacing.gap),
|
|
10410
10425
|
children: [
|
|
10411
10426
|
/* @__PURE__ */ jsx(
|
|
10412
10427
|
Icon,
|
|
10413
10428
|
{
|
|
10414
10429
|
icon: requirement.satisfied ? CheckCircle_default : Cancel_default,
|
|
10415
|
-
size: "
|
|
10416
|
-
|
|
10430
|
+
size: "xs",
|
|
10431
|
+
customColour: iconColour
|
|
10417
10432
|
}
|
|
10418
10433
|
),
|
|
10419
10434
|
/* @__PURE__ */ jsx(
|
|
10420
10435
|
Typography,
|
|
10421
10436
|
{
|
|
10422
|
-
token:
|
|
10423
|
-
color: colour.
|
|
10437
|
+
token: typography.body.medium.md,
|
|
10438
|
+
color: listItem.colour.text.default,
|
|
10424
10439
|
children: requirement.text
|
|
10425
10440
|
}
|
|
10426
10441
|
)
|
|
@@ -13285,8 +13300,35 @@ var DatePicker = React60.forwardRef(
|
|
|
13285
13300
|
}
|
|
13286
13301
|
);
|
|
13287
13302
|
DatePicker.displayName = "DatePicker";
|
|
13288
|
-
var
|
|
13303
|
+
var POINTER_WIDTH = 24;
|
|
13289
13304
|
var POINTER_HEIGHT = 12;
|
|
13305
|
+
var buildPointerPath = (r) => {
|
|
13306
|
+
const w = POINTER_WIDTH;
|
|
13307
|
+
const h = POINTER_HEIGHT;
|
|
13308
|
+
const apexInset = r;
|
|
13309
|
+
const botInset = r * (Math.SQRT2 + 1);
|
|
13310
|
+
const sin45 = Math.SQRT1_2;
|
|
13311
|
+
const apexAxis = apexInset * sin45;
|
|
13312
|
+
const botAxis = botInset * sin45;
|
|
13313
|
+
const apexLeftX = w / 2 - apexAxis;
|
|
13314
|
+
const apexRightX = w / 2 + apexAxis;
|
|
13315
|
+
const apexY = apexAxis;
|
|
13316
|
+
const blEdgeX = botAxis;
|
|
13317
|
+
const blEdgeY = h - botAxis;
|
|
13318
|
+
const blBottomX = botInset;
|
|
13319
|
+
const brBottomX = w - botInset;
|
|
13320
|
+
const brEdgeX = w - botAxis;
|
|
13321
|
+
return [
|
|
13322
|
+
`M ${blEdgeX} ${blEdgeY}`,
|
|
13323
|
+
`L ${apexLeftX} ${apexY}`,
|
|
13324
|
+
`A ${r} ${r} 0 0 1 ${apexRightX} ${apexY}`,
|
|
13325
|
+
`L ${brEdgeX} ${blEdgeY}`,
|
|
13326
|
+
`A ${r} ${r} 0 0 1 ${brBottomX} ${h}`,
|
|
13327
|
+
`L ${blBottomX} ${h}`,
|
|
13328
|
+
`A ${r} ${r} 0 0 1 ${blEdgeX} ${blEdgeY}`,
|
|
13329
|
+
"Z"
|
|
13330
|
+
].join(" ");
|
|
13331
|
+
};
|
|
13290
13332
|
var parseTokenValue53 = (value) => parseFloat(value);
|
|
13291
13333
|
var StyledRoot15 = styled52(View)(({ rootGap }) => ({
|
|
13292
13334
|
flexDirection: "column",
|
|
@@ -13333,27 +13375,13 @@ var StyledPictureButton = styled52(Pressable)(
|
|
|
13333
13375
|
overflow: "hidden"
|
|
13334
13376
|
})
|
|
13335
13377
|
);
|
|
13336
|
-
var
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
// border is on the bottom with transparent left/right on certain
|
|
13344
|
-
// platforms.
|
|
13345
|
-
width: 0,
|
|
13346
|
-
height: 0,
|
|
13347
|
-
borderLeftWidth: POINTER_HALF_WIDTH,
|
|
13348
|
-
borderRightWidth: POINTER_HALF_WIDTH,
|
|
13349
|
-
borderTopWidth: POINTER_HEIGHT,
|
|
13350
|
-
borderLeftColor: "transparent",
|
|
13351
|
-
borderRightColor: "transparent",
|
|
13352
|
-
borderTopColor: pointerColor,
|
|
13353
|
-
borderStyle: "solid",
|
|
13354
|
-
transform: [{ rotate: "180deg" }],
|
|
13355
|
-
opacity: pointerVisible ? 1 : 0
|
|
13356
|
-
}));
|
|
13378
|
+
var StyledPointer = styled52(Svg)(
|
|
13379
|
+
({ pointerVisible }) => ({
|
|
13380
|
+
width: POINTER_WIDTH,
|
|
13381
|
+
height: POINTER_HEIGHT,
|
|
13382
|
+
opacity: pointerVisible ? 1 : 0
|
|
13383
|
+
})
|
|
13384
|
+
);
|
|
13357
13385
|
var PictureSelector = React60.forwardRef(
|
|
13358
13386
|
(_a, ref) => {
|
|
13359
13387
|
var _b = _a, {
|
|
@@ -13402,6 +13430,9 @@ var PictureSelector = React60.forwardRef(
|
|
|
13402
13430
|
pictureButton.borderWidth.default
|
|
13403
13431
|
);
|
|
13404
13432
|
const borderWidthActive = parseTokenValue53(pictureButton.borderWidth.active);
|
|
13433
|
+
const pointerPath = buildPointerPath(
|
|
13434
|
+
parseTokenValue53(pictureButton.pointer.borderRadius.default)
|
|
13435
|
+
);
|
|
13405
13436
|
const resolvedMinWidth = itemMinWidth != null ? itemMinWidth : parseTokenValue53(pictureButton.size.minWidth);
|
|
13406
13437
|
const resolvedMinHeight = itemMinHeight != null ? itemMinHeight : resolvedMinWidth;
|
|
13407
13438
|
return /* @__PURE__ */ jsxs(
|
|
@@ -13425,7 +13456,6 @@ var PictureSelector = React60.forwardRef(
|
|
|
13425
13456
|
/* @__PURE__ */ jsx(StyledRow2, { rowGap, children: items.map((item) => {
|
|
13426
13457
|
const isSelected = item.value === selectedValue;
|
|
13427
13458
|
const Visual = item.illustration;
|
|
13428
|
-
const IconComp = item.icon;
|
|
13429
13459
|
const buttonProps = {
|
|
13430
13460
|
buttonBorderRadius,
|
|
13431
13461
|
buttonBorderWidth: isSelected ? borderWidthActive : borderWidthDefault,
|
|
@@ -13454,14 +13484,23 @@ var PictureSelector = React60.forwardRef(
|
|
|
13454
13484
|
if (!item.disabled) handleSelect(item.value);
|
|
13455
13485
|
}
|
|
13456
13486
|
}, buttonProps), {
|
|
13457
|
-
children: Visual ? /* @__PURE__ */ jsx(Illustration, { illustration: Visual, size: "
|
|
13487
|
+
children: Visual ? /* @__PURE__ */ jsx(Illustration, { illustration: Visual, size: "xl" }) : null
|
|
13458
13488
|
})
|
|
13459
13489
|
),
|
|
13460
13490
|
/* @__PURE__ */ jsx(
|
|
13461
|
-
|
|
13491
|
+
StyledPointer,
|
|
13462
13492
|
{
|
|
13463
|
-
|
|
13464
|
-
|
|
13493
|
+
pointerVisible: isSelected && hasInsight,
|
|
13494
|
+
width: POINTER_WIDTH,
|
|
13495
|
+
height: POINTER_HEIGHT,
|
|
13496
|
+
viewBox: `0 0 ${POINTER_WIDTH} ${POINTER_HEIGHT}`,
|
|
13497
|
+
children: /* @__PURE__ */ jsx(
|
|
13498
|
+
Path,
|
|
13499
|
+
{
|
|
13500
|
+
d: pointerPath,
|
|
13501
|
+
fill: pictureButton.colour.pointer.default
|
|
13502
|
+
}
|
|
13503
|
+
)
|
|
13465
13504
|
}
|
|
13466
13505
|
)
|
|
13467
13506
|
] }, item.value);
|