@butternutbox/pawprint-native 0.7.0 → 0.8.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 +6 -6
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +85 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +85 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Switch/Switch.tsx +3 -1
- package/src/components/molecules/Notification/Notification.stories.tsx +4 -0
- package/src/components/molecules/Notification/Notification.tsx +43 -36
- package/src/components/molecules/TabNavigation/TabNavigation.stories.tsx +35 -0
- package/src/components/molecules/TabNavigation/TabNavigation.tsx +15 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
[32mCJS[39m [1mdist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 [22m[32m18.90 KB[39m
|
|
16
16
|
[32mCJS[39m [1mdist/index.cjs [22m[32m1.79 MB[39m
|
|
17
17
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.68 MB[39m
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 10912ms
|
|
19
19
|
[32mESM[39m [1mdist/ida-narrow-500-normal-C6I2PK4T.woff2 [22m[32m47.41 KB[39m
|
|
20
20
|
[32mESM[39m [1mdist/ida-narrow-700-normal-UPHPRIN6.woff2 [22m[32m49.90 KB[39m
|
|
21
21
|
[32mESM[39m [1mdist/ibm-plex-sans-condensed-400-normal-I2XLJNNB.woff2 [22m[32m19.33 KB[39m
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
[32mESM[39m [1mdist/ibm-plex-sans-condensed-600-normal-UX5ZU5T6.woff2 [22m[32m19.35 KB[39m
|
|
24
24
|
[32mESM[39m [1mdist/ibm-plex-sans-condensed-700-normal-4PFYFTSO.woff2 [22m[32m18.90 KB[39m
|
|
25
25
|
[32mESM[39m [1mdist/index.js [22m[32m1.71 MB[39m
|
|
26
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m2.
|
|
27
|
-
[32mESM[39m ⚡️ Build success in
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
29
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m90.
|
|
30
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m90.
|
|
26
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m2.68 MB[39m
|
|
27
|
+
[32mESM[39m ⚡️ Build success in 10913ms
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 21798ms
|
|
29
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m90.51 KB[39m
|
|
30
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m90.51 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4409f6c: Add optional `icon` and `avatar` props to `TabNavigation.Tab`. The icon colour tracks the tab's label colour and the avatar is forwarded to the `Avatar` atom, matching the Figma design.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 27ca8b6: Add styling to optional notification link; prevent switch label from overflowing
|
|
12
|
+
|
|
3
13
|
## 0.7.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -7880,7 +7880,9 @@ var StyledThumb = styled51__default.default(reactNative.Animated.View)(({ thumbS
|
|
|
7880
7880
|
position: "absolute"
|
|
7881
7881
|
}));
|
|
7882
7882
|
var StyledContent = styled51__default.default(reactNative.View)(({ contentGap }) => ({
|
|
7883
|
-
gap: contentGap
|
|
7883
|
+
gap: contentGap,
|
|
7884
|
+
flex: 1,
|
|
7885
|
+
minWidth: 0
|
|
7884
7886
|
}));
|
|
7885
7887
|
var Switch = React60__default.default.forwardRef(
|
|
7886
7888
|
(_a, ref) => {
|
|
@@ -12692,7 +12694,7 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12692
12694
|
if (variant === "system") {
|
|
12693
12695
|
const isLarge = size === "lg";
|
|
12694
12696
|
const sizeTokens = isLarge ? systemNotifications.notification.spacing.large : systemNotifications.notification.spacing.small;
|
|
12695
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
12697
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12696
12698
|
StyledSystemRoot,
|
|
12697
12699
|
__spreadProps(__spreadValues({
|
|
12698
12700
|
ref,
|
|
@@ -12705,7 +12707,7 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12705
12707
|
rootBgColor: bgMap[type],
|
|
12706
12708
|
rootAlignCenter: isLarge
|
|
12707
12709
|
}, rest), {
|
|
12708
|
-
children: [
|
|
12710
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "column", flex: 1 }, children: [
|
|
12709
12711
|
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12710
12712
|
Icon,
|
|
12711
12713
|
{
|
|
@@ -12715,27 +12717,31 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12715
12717
|
"aria-label": type
|
|
12716
12718
|
}
|
|
12717
12719
|
),
|
|
12718
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12720
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flexDirection: "column", gap: 8, flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12721
|
+
Typography,
|
|
12722
|
+
{
|
|
12723
|
+
token: systemNotifications.notifications.typography.default,
|
|
12724
|
+
color: systemNotifications.notification.colour.text.default,
|
|
12725
|
+
children
|
|
12726
|
+
}
|
|
12727
|
+
) }),
|
|
12728
|
+
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12729
|
+
StyledLinkWrapper,
|
|
12730
|
+
{
|
|
12731
|
+
linkPaddingLeft: parseTokenValue49(sizeTokens.content.gap),
|
|
12732
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12733
|
+
Link,
|
|
12734
|
+
{
|
|
12735
|
+
href: link.href,
|
|
12736
|
+
onPress: link.onPress,
|
|
12737
|
+
weight: "semiBold",
|
|
12738
|
+
size: "md",
|
|
12739
|
+
children: link.label
|
|
12740
|
+
}
|
|
12741
|
+
)
|
|
12742
|
+
}
|
|
12743
|
+
)
|
|
12744
|
+
] })
|
|
12739
12745
|
})
|
|
12740
12746
|
);
|
|
12741
12747
|
}
|
|
@@ -12828,59 +12834,57 @@ var Notification = React60__default.default.forwardRef(
|
|
|
12828
12834
|
rootBgColor: bgMap[type]
|
|
12829
12835
|
}, rest), {
|
|
12830
12836
|
children: [
|
|
12831
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12832
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12833
|
-
|
|
12834
|
-
Icon,
|
|
12835
|
-
{
|
|
12836
|
-
icon: IconComponent,
|
|
12837
|
-
size: "md",
|
|
12838
|
-
colour: type,
|
|
12839
|
-
"aria-label": type
|
|
12840
|
-
}
|
|
12841
|
-
),
|
|
12842
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12843
|
-
StyledInlineCopy,
|
|
12844
|
-
{
|
|
12845
|
-
copyGap: parseTokenValue49(content.copy.spacing.gap),
|
|
12846
|
-
children: [
|
|
12847
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12848
|
-
Typography,
|
|
12849
|
-
{
|
|
12850
|
-
token: notifications.typography.title,
|
|
12851
|
-
color: colour.text.title,
|
|
12852
|
-
children: title
|
|
12853
|
-
}
|
|
12854
|
-
),
|
|
12855
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12856
|
-
Typography,
|
|
12857
|
-
{
|
|
12858
|
-
token: notifications.typography.body,
|
|
12859
|
-
color: colour.text.body,
|
|
12860
|
-
children
|
|
12861
|
-
}
|
|
12862
|
-
)
|
|
12863
|
-
]
|
|
12864
|
-
}
|
|
12865
|
-
)
|
|
12866
|
-
] }),
|
|
12867
|
-
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12868
|
-
StyledLinkWrapper,
|
|
12837
|
+
/* @__PURE__ */ jsxRuntime.jsx(StyledContents, { contentsGap: parseTokenValue49(content.spacing.gap), children: /* @__PURE__ */ jsxRuntime.jsxs(StyledCopyRow, { copyGap: parseTokenValue49(content.spacing.gap), children: [
|
|
12838
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12839
|
+
Icon,
|
|
12869
12840
|
{
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12841
|
+
icon: IconComponent,
|
|
12842
|
+
size: "md",
|
|
12843
|
+
colour: type,
|
|
12844
|
+
"aria-label": type
|
|
12845
|
+
}
|
|
12846
|
+
),
|
|
12847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12848
|
+
StyledInlineCopy,
|
|
12849
|
+
{
|
|
12850
|
+
copyGap: parseTokenValue49(content.copy.spacing.gap),
|
|
12851
|
+
children: [
|
|
12852
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12853
|
+
Typography,
|
|
12854
|
+
{
|
|
12855
|
+
token: notifications.typography.title,
|
|
12856
|
+
color: colour.text.title,
|
|
12857
|
+
children: title
|
|
12858
|
+
}
|
|
12859
|
+
),
|
|
12860
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12861
|
+
Typography,
|
|
12862
|
+
{
|
|
12863
|
+
token: notifications.typography.body,
|
|
12864
|
+
color: colour.text.body,
|
|
12865
|
+
children
|
|
12866
|
+
}
|
|
12867
|
+
),
|
|
12868
|
+
link && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12869
|
+
StyledLinkWrapper,
|
|
12870
|
+
{
|
|
12871
|
+
linkPaddingLeft: parseTokenValue49(content.copy.spacing.gap),
|
|
12872
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12873
|
+
Link,
|
|
12874
|
+
{
|
|
12875
|
+
href: link.href,
|
|
12876
|
+
onPress: link.onPress,
|
|
12877
|
+
weight: "semiBold",
|
|
12878
|
+
size: "md",
|
|
12879
|
+
children: link.label
|
|
12880
|
+
}
|
|
12881
|
+
)
|
|
12882
|
+
}
|
|
12883
|
+
)
|
|
12884
|
+
]
|
|
12881
12885
|
}
|
|
12882
12886
|
)
|
|
12883
|
-
] }),
|
|
12887
|
+
] }) }),
|
|
12884
12888
|
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12885
12889
|
StyledCloseButton,
|
|
12886
12890
|
{
|
|
@@ -14782,7 +14786,7 @@ var TabNavigationList = React60__default.default.forwardRef(
|
|
|
14782
14786
|
TabNavigationList.displayName = "TabNavigation.List";
|
|
14783
14787
|
var TabNavigationTab = React60__default.default.forwardRef(
|
|
14784
14788
|
(_a, ref) => {
|
|
14785
|
-
var _b = _a, { value, disabled = false, children } = _b, rest = __objRest(_b, ["value", "disabled", "children"]);
|
|
14789
|
+
var _b = _a, { value, disabled = false, icon, avatar, children } = _b, rest = __objRest(_b, ["value", "disabled", "icon", "avatar", "children"]);
|
|
14786
14790
|
const { layout } = useTabNavigationContext();
|
|
14787
14791
|
const { value: selectedValue } = TabsPrimitive__namespace.useRootContext();
|
|
14788
14792
|
const theme2 = react.useTheme();
|
|
@@ -14792,7 +14796,7 @@ var TabNavigationTab = React60__default.default.forwardRef(
|
|
|
14792
14796
|
const token = selected ? typography.selected : typography.default;
|
|
14793
14797
|
const borderColour = selected ? colour.border.default : colour.border.disabled;
|
|
14794
14798
|
const textColour = disabled ? theme2.tokens.primitives.colour.brand.brown["5"] : colour.text.default;
|
|
14795
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.
|
|
14799
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14796
14800
|
StyledTab,
|
|
14797
14801
|
__spreadProps(__spreadValues({
|
|
14798
14802
|
ref,
|
|
@@ -14806,7 +14810,11 @@ var TabNavigationTab = React60__default.default.forwardRef(
|
|
|
14806
14810
|
tabBorderColor: borderColour,
|
|
14807
14811
|
tabFlex: layout === "fixed" ? 1 : void 0
|
|
14808
14812
|
}, rest), {
|
|
14809
|
-
children:
|
|
14813
|
+
children: [
|
|
14814
|
+
avatar && /* @__PURE__ */ jsxRuntime.jsx(Avatar, __spreadValues({}, avatar)),
|
|
14815
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon, customColour: textColour, "aria-hidden": true }),
|
|
14816
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { token, color: textColour, children })
|
|
14817
|
+
]
|
|
14810
14818
|
})
|
|
14811
14819
|
) });
|
|
14812
14820
|
}
|