@boostdev/design-system-react-native 0.2.5 → 0.2.6
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to `@boostdev/design-system-react-native` are documented here.
|
|
4
|
+
## [0.2.6] - 2026-06-15
|
|
5
|
+
### Fixed
|
|
6
|
+
- Fix(collapsible): render the disclosure indicator as a border-box chevron instead of the ▸ (U+25B8) glyph char
|
|
7
|
+
|
|
8
|
+
The Collapsible's caret was a text glyph, which reads as a stray unicode
|
|
9
|
+
character rather than a crisp icon. It is now a small View with two adjacent
|
|
10
|
+
borders, rotated -45deg when collapsed (points right) to 45deg when expanded
|
|
11
|
+
(points down) — font-independent and icon-like, with the toggle animation
|
|
12
|
+
preserved. The spec pins it as a border chevron, not a glyph. ([`ee649db`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/ee649db))
|
|
13
|
+
|
|
4
14
|
## [0.2.5] - 2026-06-12
|
|
5
15
|
### Fixed
|
|
6
16
|
- Fix(side-sheet): body sizes to content instead of collapsing to zero height
|
package/dist/index.cjs
CHANGED
|
@@ -1145,7 +1145,12 @@ var styles15 = import_react_native17.StyleSheet.create({
|
|
|
1145
1145
|
lineHeight: lineHeight.body
|
|
1146
1146
|
},
|
|
1147
1147
|
chevron: {
|
|
1148
|
-
|
|
1148
|
+
// Border-box chevron (no glyph font dependency): a small square with two
|
|
1149
|
+
// adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
|
|
1150
|
+
width: 8,
|
|
1151
|
+
height: 8,
|
|
1152
|
+
borderRightWidth: 2,
|
|
1153
|
+
borderBottomWidth: 2,
|
|
1149
1154
|
marginStart: import_native.spacing.xs
|
|
1150
1155
|
},
|
|
1151
1156
|
content: {
|
|
@@ -1184,9 +1189,9 @@ function Collapsible({
|
|
|
1184
1189
|
}
|
|
1185
1190
|
onToggle?.(next);
|
|
1186
1191
|
}, [isOpen, isControlled, onToggle, rotation]);
|
|
1187
|
-
const
|
|
1192
|
+
const rotate = rotation.interpolate({
|
|
1188
1193
|
inputRange: [0, 1],
|
|
1189
|
-
outputRange: ["
|
|
1194
|
+
outputRange: ["-45deg", "45deg"]
|
|
1190
1195
|
});
|
|
1191
1196
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1192
1197
|
import_react_native17.View,
|
|
@@ -1205,12 +1210,12 @@ function Collapsible({
|
|
|
1205
1210
|
children: [
|
|
1206
1211
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native17.Text, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
|
|
1207
1212
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1208
|
-
import_react_native17.Animated.
|
|
1213
|
+
import_react_native17.Animated.View,
|
|
1209
1214
|
{
|
|
1210
|
-
|
|
1215
|
+
testID: "bds-collapsible-chevron",
|
|
1216
|
+
style: [styles15.chevron, { borderColor: colors2.colorOnBgSubtle, transform: [{ rotate }] }],
|
|
1211
1217
|
importantForAccessibility: "no",
|
|
1212
|
-
accessibilityElementsHidden: true
|
|
1213
|
-
children: "\u25B8"
|
|
1218
|
+
accessibilityElementsHidden: true
|
|
1214
1219
|
}
|
|
1215
1220
|
)
|
|
1216
1221
|
]
|
package/dist/index.js
CHANGED
|
@@ -1059,7 +1059,12 @@ var styles15 = StyleSheet15.create({
|
|
|
1059
1059
|
lineHeight: lineHeight.body
|
|
1060
1060
|
},
|
|
1061
1061
|
chevron: {
|
|
1062
|
-
|
|
1062
|
+
// Border-box chevron (no glyph font dependency): a small square with two
|
|
1063
|
+
// adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
|
|
1064
|
+
width: 8,
|
|
1065
|
+
height: 8,
|
|
1066
|
+
borderRightWidth: 2,
|
|
1067
|
+
borderBottomWidth: 2,
|
|
1063
1068
|
marginStart: spacing.xs
|
|
1064
1069
|
},
|
|
1065
1070
|
content: {
|
|
@@ -1098,9 +1103,9 @@ function Collapsible({
|
|
|
1098
1103
|
}
|
|
1099
1104
|
onToggle?.(next);
|
|
1100
1105
|
}, [isOpen, isControlled, onToggle, rotation]);
|
|
1101
|
-
const
|
|
1106
|
+
const rotate = rotation.interpolate({
|
|
1102
1107
|
inputRange: [0, 1],
|
|
1103
|
-
outputRange: ["
|
|
1108
|
+
outputRange: ["-45deg", "45deg"]
|
|
1104
1109
|
});
|
|
1105
1110
|
return /* @__PURE__ */ jsxs9(
|
|
1106
1111
|
View12,
|
|
@@ -1119,12 +1124,12 @@ function Collapsible({
|
|
|
1119
1124
|
children: [
|
|
1120
1125
|
/* @__PURE__ */ jsx17(Text13, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
|
|
1121
1126
|
/* @__PURE__ */ jsx17(
|
|
1122
|
-
Animated2.
|
|
1127
|
+
Animated2.View,
|
|
1123
1128
|
{
|
|
1124
|
-
|
|
1129
|
+
testID: "bds-collapsible-chevron",
|
|
1130
|
+
style: [styles15.chevron, { borderColor: colors2.colorOnBgSubtle, transform: [{ rotate }] }],
|
|
1125
1131
|
importantForAccessibility: "no",
|
|
1126
|
-
accessibilityElementsHidden: true
|
|
1127
|
-
children: "\u25B8"
|
|
1132
|
+
accessibilityElementsHidden: true
|
|
1128
1133
|
}
|
|
1129
1134
|
)
|
|
1130
1135
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostdev/design-system-react-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "BoostDev React Native component library: accessible, token-driven components built on @boostdev/design-system-foundation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -16,6 +16,17 @@ describe('Collapsible (native)', () => {
|
|
|
16
16
|
expect(screen.getByText('Details')).toBeInTheDocument();
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
it('renders the disclosure indicator as a border chevron, not a glyph char', () => {
|
|
20
|
+
renderWithTheme(
|
|
21
|
+
<Collapsible summary="Details">
|
|
22
|
+
<span>Content</span>
|
|
23
|
+
</Collapsible>,
|
|
24
|
+
);
|
|
25
|
+
const chevron = screen.getByTestId('bds-collapsible-chevron');
|
|
26
|
+
expect(chevron).toHaveStyle({ borderRightWidth: 2 });
|
|
27
|
+
expect(chevron).not.toHaveTextContent('▸');
|
|
28
|
+
});
|
|
29
|
+
|
|
19
30
|
it('hides content by default', () => {
|
|
20
31
|
renderWithTheme(
|
|
21
32
|
<Collapsible summary="Details">
|
|
@@ -58,7 +58,12 @@ const styles = StyleSheet.create({
|
|
|
58
58
|
lineHeight: lineHeight.body,
|
|
59
59
|
},
|
|
60
60
|
chevron: {
|
|
61
|
-
|
|
61
|
+
// Border-box chevron (no glyph font dependency): a small square with two
|
|
62
|
+
// adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
|
|
63
|
+
width: 8,
|
|
64
|
+
height: 8,
|
|
65
|
+
borderRightWidth: 2,
|
|
66
|
+
borderBottomWidth: 2,
|
|
62
67
|
marginStart: spacing.xs,
|
|
63
68
|
},
|
|
64
69
|
content: {
|
|
@@ -103,9 +108,10 @@ export function Collapsible({
|
|
|
103
108
|
onToggle?.(next);
|
|
104
109
|
}, [isOpen, isControlled, onToggle, rotation]);
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
// Chevron points right when collapsed (-45deg) and down when expanded (45deg).
|
|
112
|
+
const rotate = rotation.interpolate({
|
|
107
113
|
inputRange: [0, 1],
|
|
108
|
-
outputRange: ['
|
|
114
|
+
outputRange: ['-45deg', '45deg'],
|
|
109
115
|
});
|
|
110
116
|
|
|
111
117
|
return (
|
|
@@ -121,13 +127,12 @@ export function Collapsible({
|
|
|
121
127
|
style={({ pressed }) => [styles.header, pressed && styles.pressed]}
|
|
122
128
|
>
|
|
123
129
|
<Text style={[styles.summaryText, { color: colors.colorOnBg }]}>{summary}</Text>
|
|
124
|
-
<Animated.
|
|
125
|
-
|
|
130
|
+
<Animated.View
|
|
131
|
+
testID="bds-collapsible-chevron"
|
|
132
|
+
style={[styles.chevron, { borderColor: colors.colorOnBgSubtle, transform: [{ rotate }] }]}
|
|
126
133
|
importantForAccessibility="no"
|
|
127
134
|
accessibilityElementsHidden={true}
|
|
128
|
-
|
|
129
|
-
▸
|
|
130
|
-
</Animated.Text>
|
|
135
|
+
/>
|
|
131
136
|
</Pressable>
|
|
132
137
|
{isOpen && (
|
|
133
138
|
<View style={styles.content}>
|