@dloizides/ui-layout 1.49.0 → 1.49.2

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.mjs CHANGED
@@ -3514,10 +3514,10 @@ var styles36 = StyleSheet.create({
3514
3514
  row: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP3 },
3515
3515
  text: { fontSize: FONT_SIZE, fontWeight: "500" }
3516
3516
  });
3517
- var Breadcrumb = ({ items, accessibilityLabel, testID }) => {
3517
+ var Breadcrumb = ({ items, accessibilityLabel, accessibilityHint, testID }) => {
3518
3518
  const { theme } = useUi();
3519
3519
  const muted = { color: theme.colors.textSecondary };
3520
- return /* @__PURE__ */ jsxs(View, { "aria-label": accessibilityLabel, style: styles36.row, testID, children: [
3520
+ return /* @__PURE__ */ jsxs(View, { accessibilityHint, "aria-label": accessibilityLabel, style: styles36.row, testID, children: [
3521
3521
  /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles36.text, muted], children: BACK }),
3522
3522
  items.map((item, index) => /* @__PURE__ */ jsxs(React16.Fragment, { children: [
3523
3523
  index > 0 ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles36.text, muted], children: SEPARATOR }) : null,
@@ -3580,7 +3580,8 @@ var styles38 = StyleSheet.create({
3580
3580
  });
3581
3581
  var IdChip = ({ label, value, testID, accessibilityLabel, accessibilityHint, display, valueTestID, writer }) => {
3582
3582
  const { theme } = useUi();
3583
- const { status, copy } = useCopyToClipboard(value, writer);
3583
+ const copyable = value !== null && value !== "";
3584
+ const { status, copy } = useCopyToClipboard(value ?? "", writer);
3584
3585
  const ink = { color: theme.colors.text };
3585
3586
  return /* @__PURE__ */ jsxs(
3586
3587
  Pressable,
@@ -3588,13 +3589,15 @@ var IdChip = ({ label, value, testID, accessibilityLabel, accessibilityHint, dis
3588
3589
  accessibilityHint,
3589
3590
  accessibilityLabel,
3590
3591
  accessibilityRole: "button",
3592
+ accessibilityState: { disabled: !copyable },
3593
+ disabled: !copyable,
3591
3594
  style: [styles38.chip, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }],
3592
3595
  testID,
3593
- onPress: copy,
3596
+ onPress: copyable ? copy : void 0,
3594
3597
  children: [
3595
3598
  /* @__PURE__ */ jsx(Text, { style: [styles38.text, { color: theme.colors.textSecondary }], children: label }),
3596
3599
  /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles38.text, ink], testID: valueTestID, children: display ?? value }),
3597
- /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles38.text, ink], testID: `${testID}-glyph`, children: status === "copied" /* Copied */ ? COPIED_GLYPH : COPY_GLYPH })
3600
+ copyable ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles38.text, ink], testID: `${testID}-glyph`, children: status === "copied" /* Copied */ ? COPIED_GLYPH : COPY_GLYPH }) : null
3598
3601
  ]
3599
3602
  }
3600
3603
  );
@@ -3614,10 +3617,10 @@ var styles39 = StyleSheet.create({
3614
3617
  strip: { borderBottomWidth: 1, width: "100%" },
3615
3618
  tab: { alignItems: "center", borderBottomWidth: UNDERLINE, flexDirection: "row", gap: GAP6, justifyContent: "center", minHeight: MIN_TARGET_PX, minWidth: MIN_TARGET_PX, paddingHorizontal: PAD_H4 }
3616
3619
  });
3617
- var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, underlineColor, testID }) => {
3620
+ var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, testID }) => {
3618
3621
  const { theme } = useUi();
3619
3622
  const underline = underlineColor ?? theme.palette.primary[DEFAULT_UNDERLINE_STEP];
3620
- return /* @__PURE__ */ jsx(View, { style: [styles39.strip, { borderBottomColor: theme.colors.border }], testID, children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, accessibilityRole: "tablist", "aria-label": accessibilityLabel, showsHorizontalScrollIndicator: false, children: tabs.map((tab) => {
3623
+ return /* @__PURE__ */ jsx(View, { style: [styles39.strip, { borderBottomColor: theme.colors.border }], testID, children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, showsHorizontalScrollIndicator: false, children: tabs.map((tab) => {
3621
3624
  const selected = tab.key === activeKey;
3622
3625
  return /* @__PURE__ */ jsxs(
3623
3626
  Pressable,