@dloizides/ui-layout 1.17.0 → 1.18.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 +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -241,16 +241,25 @@ var styles5 = StyleSheet.create({
|
|
|
241
241
|
root: {
|
|
242
242
|
width: "100%"
|
|
243
243
|
},
|
|
244
|
+
// The full-width rule under the row lives here (not on the strip) so it spans the
|
|
245
|
+
// whole width even when the tabs are narrower than the viewport (desktop) and is
|
|
246
|
+
// not clipped to the scroll content width.
|
|
247
|
+
stripOuter: {
|
|
248
|
+
width: "100%",
|
|
249
|
+
borderBottomWidth: BORDER_WIDTH2
|
|
250
|
+
},
|
|
244
251
|
strip: {
|
|
245
252
|
flexDirection: "row",
|
|
246
|
-
flexWrap: "
|
|
253
|
+
flexWrap: "nowrap",
|
|
247
254
|
alignItems: "center",
|
|
248
255
|
columnGap: COLUMN_GAP,
|
|
249
256
|
rowGap: ROW_GAP,
|
|
250
|
-
paddingVertical: ROW_PAD_V
|
|
251
|
-
borderBottomWidth: BORDER_WIDTH2
|
|
257
|
+
paddingVertical: ROW_PAD_V
|
|
252
258
|
},
|
|
253
259
|
pill: {
|
|
260
|
+
// Keep each pill at its natural size so the row scrolls instead of squashing
|
|
261
|
+
// the tabs when they don't all fit.
|
|
262
|
+
flexShrink: 0,
|
|
254
263
|
paddingHorizontal: PILL_PAD_H,
|
|
255
264
|
paddingVertical: PILL_PAD_V,
|
|
256
265
|
borderRadius: PILL_RADIUS,
|
|
@@ -290,12 +299,12 @@ var Tabs = ({
|
|
|
290
299
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
291
300
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
292
301
|
return /* @__PURE__ */ jsxs(View, { style: [styles5.root, style], testID, children: [
|
|
293
|
-
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(
|
|
302
|
+
/* @__PURE__ */ jsx(View, { style: [styles5.stripOuter, { borderBottomColor: colors.border }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(
|
|
294
303
|
View,
|
|
295
304
|
{
|
|
296
305
|
accessibilityRole: "tablist",
|
|
297
306
|
"aria-label": accessibilityLabel,
|
|
298
|
-
style: [styles5.strip,
|
|
307
|
+
style: [styles5.strip, stripStyle],
|
|
299
308
|
children: tabs.map((tab) => {
|
|
300
309
|
const selected = tab.key === activeKey;
|
|
301
310
|
const textColor = selected ? TEXT_ON_PRIMARY : colors.textSecondary;
|
|
@@ -319,7 +328,7 @@ var Tabs = ({
|
|
|
319
328
|
);
|
|
320
329
|
})
|
|
321
330
|
}
|
|
322
|
-
) }),
|
|
331
|
+
) }) }),
|
|
323
332
|
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles5.panel, panelStyle], ...panelAria, children })
|
|
324
333
|
] });
|
|
325
334
|
};
|