@common-origin/design-system 2.22.0 → 2.23.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/client.js CHANGED
@@ -659,6 +659,40 @@ var radiusByKey = {
659
659
  '3xl': radius$4['3xl'],
660
660
  circle: radius$4.full
661
661
  };
662
+ /** Box's `bg` prop: the grammar's token paths, read from the token at that path. */
663
+ var backgroundByPath = {
664
+ 'surface.base': surface.base,
665
+ 'surface.raised': surface.raised,
666
+ 'surface.scrim': surface.scrim,
667
+ 'color.fill.emphasis': color$a.fill.emphasis,
668
+ 'color.fill.muted': color$a.fill.muted,
669
+ 'color.fill.inverse': color$a.fill.inverse,
670
+ 'color.fill.accent': color$a.fill.accent,
671
+ 'color.fill.accent-hover': color$a.fill['accent-hover'],
672
+ 'color.fill.accent-pressed': color$a.fill['accent-pressed'],
673
+ 'color.fill.accent-muted': color$a.fill['accent-muted'],
674
+ 'color.fill.accent-muted-hover': color$a.fill['accent-muted-hover'],
675
+ 'color.fill.accent-muted-pressed': color$a.fill['accent-muted-pressed'],
676
+ 'color.fill.danger': color$a.fill.danger,
677
+ 'color.fill.danger-hover': color$a.fill['danger-hover'],
678
+ 'color.fill.danger-pressed': color$a.fill['danger-pressed'],
679
+ 'color.fill.danger-muted': color$a.fill['danger-muted'],
680
+ 'color.fill.success': color$a.fill.success,
681
+ 'color.fill.success-muted': color$a.fill['success-muted'],
682
+ 'color.fill.warning': color$a.fill.warning,
683
+ 'color.fill.warning-muted': color$a.fill['warning-muted'],
684
+ 'color.fill.serious': color$a.fill.serious,
685
+ 'color.fill.serious-muted': color$a.fill['serious-muted'],
686
+ 'color.fill.ai-muted': color$a.fill['ai-muted'],
687
+ 'color.fill.disabled': color$a.fill.disabled,
688
+ 'color.fill.default': color$a.fill["default"],
689
+ 'color.fill.default-hover': color$a.fill['default-hover'],
690
+ 'color.fill.default-pressed': color$a.fill['default-pressed'],
691
+ 'color.fill.none': color$a.fill.none,
692
+ 'color.fill.none-hover': color$a.fill['none-hover'],
693
+ 'color.fill.none-pressed': color$a.fill['none-pressed'],
694
+ 'color.fill.inverse-none-hover': color$a.fill['inverse-none-hover']
695
+ };
662
696
  /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
663
697
  var backgroundByKey = {
664
698
  "default": surface.base,
@@ -739,6 +773,9 @@ var borderColorByKey = {
739
773
  error: color$a.border.danger
740
774
  };
741
775
 
776
+ var backgroundColor = function backgroundColor(bg) {
777
+ return bg in backgroundByPath ? backgroundByPath[bg] : backgroundByKey[bg];
778
+ };
742
779
  var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
743
780
  shouldForwardProp: function shouldForwardProp(prop) {
744
781
  return !prop.startsWith('$');
@@ -822,7 +859,7 @@ var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
822
859
  }, function (props) {
823
860
  return props.$borderLeft && styled.css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["border-left: ", " solid ", ";"], ["border-left: ", " solid ", ";"])), tokens.semantic.border.width.thin, borderColorByKey[props.$borderLeft]);
824
861
  }, function (props) {
825
- return props.$bg && styled.css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundByKey[props.$bg]);
862
+ return props.$bg && styled.css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor(props.$bg));
826
863
  }, function (props) {
827
864
  return props.$color && styled.css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), textColorByKey[props.$color]);
828
865
  }, function (props) {
@@ -2885,7 +2922,7 @@ var AccountCard = function AccountCard(_a) {
2885
2922
  return jsxRuntime.jsx(Box, {
2886
2923
  minWidth: tokens.component.accountCard.minWidth,
2887
2924
  p: "lg",
2888
- bg: "subtle",
2925
+ bg: "surface.raised",
2889
2926
  border: "default",
2890
2927
  borderRadius: "xl",
2891
2928
  transition: "box-shadow ".concat(semantic$c.motion.duration.moderate, " ").concat(semantic$c.motion.easing.decelerate),