@dloizides/ui-forms 1.49.0 → 1.50.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.mjs CHANGED
@@ -1448,6 +1448,9 @@ function chipSizeLook(size) {
1448
1448
  return { hitBox: void 0, visual: void 0, text: void 0 };
1449
1449
  return { hitBox: chipSizeStyles.compactHitBox, visual: chipSizeStyles.compactVisual, text: chipSizeStyles.compactText };
1450
1450
  }
1451
+ function restBorderColor(colors, tone) {
1452
+ return tone === "strong" ? colors.borderStrong : colors.border;
1453
+ }
1451
1454
  var SOLID_RADIUS = 20;
1452
1455
  var OUTLINE_RADIUS = 999;
1453
1456
  var OUTLINE_PAD_H = 12;
@@ -1496,7 +1499,7 @@ function OutlineChip(props) {
1496
1499
  const { option, selected, disabled, colors, testID, accessibilityHint, onPress } = props;
1497
1500
  const [hovered, setHovered] = React39.useState(false);
1498
1501
  const active = selected || hovered;
1499
- const borderColor = active ? colors.primary : colors.border;
1502
+ const borderColor = active ? colors.primary : restBorderColor(colors, props.outlineTone);
1500
1503
  const fill = chipFill({
1501
1504
  selected,
1502
1505
  selectedFill: props.selectedFill,
@@ -1564,7 +1567,7 @@ function SolidChip(props) {
1564
1567
  testID,
1565
1568
  onPress,
1566
1569
  ...rovingTabStop,
1567
- children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chip, sized.visual, { borderColor: colors.border, backgroundColor: fill.backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
1570
+ children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chip, sized.visual, { borderColor: selected ? colors.border : restBorderColor(colors, props.outlineTone), backgroundColor: fill.backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
1568
1571
  ChipContent,
1569
1572
  {
1570
1573
  checkColor: fill.checkColor,
@@ -1662,6 +1665,7 @@ function buildChipColors(colors, palette) {
1662
1665
  const primary = palette.primary[500];
1663
1666
  return {
1664
1667
  border: colors.border,
1668
+ borderStrong: colors.textSecondary,
1665
1669
  textStrong: colors.text,
1666
1670
  textMuted: colors.textSecondary,
1667
1671
  primary,
@@ -1719,7 +1723,8 @@ var ChipSelector = ({
1719
1723
  optionAccessibilityHint,
1720
1724
  singleSelectRole = "button",
1721
1725
  size = "default",
1722
- selectedFill
1726
+ selectedFill,
1727
+ outlineTone = "default"
1723
1728
  }) => {
1724
1729
  const isRadioGroup = !multiple && singleSelectRole === "radio";
1725
1730
  const { theme } = useUi();
@@ -1746,6 +1751,7 @@ var ChipSelector = ({
1746
1751
  selected,
1747
1752
  size,
1748
1753
  selectedFill,
1754
+ outlineTone,
1749
1755
  ...chipIdentity(option, selected, {
1750
1756
  prefix: chipTestIDPrefix,
1751
1757
  hint: optionAccessibilityHint,