@dloizides/ui-layout 1.32.0 → 1.33.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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -60,11 +60,12 @@ interface StatusBadgeProps {
|
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
62
|
icon?: React.ReactNode;
|
|
63
|
+
dashed?: boolean;
|
|
63
64
|
testID?: string;
|
|
64
65
|
accessibilityLabel?: string;
|
|
65
66
|
accessibilityHint?: string;
|
|
66
67
|
}
|
|
67
|
-
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
69
|
|
|
69
70
|
interface StickyPreviewProps {
|
|
70
71
|
full: React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -60,11 +60,12 @@ interface StatusBadgeProps {
|
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
62
|
icon?: React.ReactNode;
|
|
63
|
+
dashed?: boolean;
|
|
63
64
|
testID?: string;
|
|
64
65
|
accessibilityLabel?: string;
|
|
65
66
|
accessibilityHint?: string;
|
|
66
67
|
}
|
|
67
|
-
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
69
|
|
|
69
70
|
interface StickyPreviewProps {
|
|
70
71
|
full: React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -159,6 +159,10 @@ var styles3 = reactNative.StyleSheet.create({
|
|
|
159
159
|
alignItems: "center",
|
|
160
160
|
gap: ICON_GAP
|
|
161
161
|
},
|
|
162
|
+
badgeDashed: {
|
|
163
|
+
borderWidth: 1,
|
|
164
|
+
borderStyle: "dashed"
|
|
165
|
+
},
|
|
162
166
|
text: {
|
|
163
167
|
fontSize: DEFAULT_FONT_SIZE,
|
|
164
168
|
fontWeight: "600",
|
|
@@ -170,12 +174,14 @@ var StatusBadge = ({
|
|
|
170
174
|
color,
|
|
171
175
|
backgroundColor,
|
|
172
176
|
icon,
|
|
177
|
+
dashed = false,
|
|
173
178
|
testID = LAYOUT_TEST_IDS.statusLabel,
|
|
174
179
|
accessibilityLabel,
|
|
175
180
|
accessibilityHint
|
|
176
181
|
}) => {
|
|
177
182
|
const { t } = uiFeedback.useUi();
|
|
178
183
|
const dynamicBadge = React11.useMemo(() => ({ backgroundColor }), [backgroundColor]);
|
|
184
|
+
const dashedColor = React11.useMemo(() => ({ borderColor: color }), [color]);
|
|
179
185
|
const dynamicText = React11.useMemo(() => ({ color }), [color]);
|
|
180
186
|
const hasIcon = icon !== void 0 && icon !== null;
|
|
181
187
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -183,7 +189,7 @@ var StatusBadge = ({
|
|
|
183
189
|
{
|
|
184
190
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.statusBadgeHint),
|
|
185
191
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
186
|
-
style: [styles3.badge, hasIcon && styles3.badgeWithIcon, dynamicBadge],
|
|
192
|
+
style: [styles3.badge, hasIcon && styles3.badgeWithIcon, dynamicBadge, dashed && styles3.badgeDashed, dashed && dashedColor],
|
|
187
193
|
testID,
|
|
188
194
|
children: [
|
|
189
195
|
hasIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, children: icon }) : null,
|