@sproutsocial/seeds-react-message 1.0.0 → 1.0.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.js CHANGED
@@ -28,13 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  MESSAGE_DENSITIES: () => MESSAGE_DENSITIES,
34
34
  Message: () => Message_default,
35
- default: () => src_default2
35
+ default: () => index_default2
36
36
  });
37
- module.exports = __toCommonJS(src_exports);
37
+ module.exports = __toCommonJS(index_exports);
38
38
 
39
39
  // src/Message.tsx
40
40
  var React2 = __toESM(require("react"));
@@ -48,58 +48,46 @@ var import_styled_components3 = __toESM(require("styled-components"));
48
48
 
49
49
  // ../../node_modules/@babel/runtime/helpers/esm/extends.js
50
50
  function _extends() {
51
- _extends = Object.assign ? Object.assign.bind() : function(target) {
52
- for (var i = 1; i < arguments.length; i++) {
53
- var source = arguments[i];
54
- for (var key in source) {
55
- if (Object.prototype.hasOwnProperty.call(source, key)) {
56
- target[key] = source[key];
57
- }
58
- }
51
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
52
+ for (var e = 1; e < arguments.length; e++) {
53
+ var t = arguments[e];
54
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
59
55
  }
60
- return target;
61
- };
62
- return _extends.apply(this, arguments);
56
+ return n;
57
+ }, _extends.apply(null, arguments);
63
58
  }
64
59
 
65
60
  // ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
66
- function _assertThisInitialized(self) {
67
- if (self === void 0) {
68
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
69
- }
70
- return self;
61
+ function _assertThisInitialized(e) {
62
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
63
+ return e;
71
64
  }
72
65
 
73
66
  // ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
74
- function _setPrototypeOf(o, p) {
75
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
76
- o2.__proto__ = p2;
77
- return o2;
78
- };
79
- return _setPrototypeOf(o, p);
67
+ function _setPrototypeOf(t, e) {
68
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
69
+ return t2.__proto__ = e2, t2;
70
+ }, _setPrototypeOf(t, e);
80
71
  }
81
72
 
82
73
  // ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
83
- function _inheritsLoose(subClass, superClass) {
84
- subClass.prototype = Object.create(superClass.prototype);
85
- subClass.prototype.constructor = subClass;
86
- _setPrototypeOf(subClass, superClass);
74
+ function _inheritsLoose(t, o) {
75
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
87
76
  }
88
77
 
89
78
  // ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
90
- function _getPrototypeOf(o) {
91
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
92
- return o2.__proto__ || Object.getPrototypeOf(o2);
93
- };
94
- return _getPrototypeOf(o);
79
+ function _getPrototypeOf(t) {
80
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
81
+ return t2.__proto__ || Object.getPrototypeOf(t2);
82
+ }, _getPrototypeOf(t);
95
83
  }
96
84
 
97
85
  // ../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
98
- function _isNativeFunction(fn) {
86
+ function _isNativeFunction(t) {
99
87
  try {
100
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
101
- } catch (e) {
102
- return typeof fn === "function";
88
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
89
+ } catch (n) {
90
+ return "function" == typeof t;
103
91
  }
104
92
  }
105
93
 
@@ -117,8 +105,7 @@ function _isNativeReflectConstruct() {
117
105
 
118
106
  // ../../node_modules/@babel/runtime/helpers/esm/construct.js
119
107
  function _construct(t, e, r) {
120
- if (_isNativeReflectConstruct())
121
- return Reflect.construct.apply(null, arguments);
108
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
122
109
  var o = [null];
123
110
  o.push.apply(o, e);
124
111
  var p = new (t.bind.apply(t, o))();
@@ -126,33 +113,27 @@ function _construct(t, e, r) {
126
113
  }
127
114
 
128
115
  // ../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
129
- function _wrapNativeSuper(Class) {
130
- var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
131
- _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
132
- if (Class2 === null || !_isNativeFunction(Class2))
133
- return Class2;
134
- if (typeof Class2 !== "function") {
135
- throw new TypeError("Super expression must either be null or a function");
136
- }
137
- if (typeof _cache !== "undefined") {
138
- if (_cache.has(Class2))
139
- return _cache.get(Class2);
140
- _cache.set(Class2, Wrapper);
116
+ function _wrapNativeSuper(t) {
117
+ var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
118
+ return _wrapNativeSuper = function _wrapNativeSuper2(t2) {
119
+ if (null === t2 || !_isNativeFunction(t2)) return t2;
120
+ if ("function" != typeof t2) throw new TypeError("Super expression must either be null or a function");
121
+ if (void 0 !== r) {
122
+ if (r.has(t2)) return r.get(t2);
123
+ r.set(t2, Wrapper);
141
124
  }
142
125
  function Wrapper() {
143
- return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
126
+ return _construct(t2, arguments, _getPrototypeOf(this).constructor);
144
127
  }
145
- Wrapper.prototype = Object.create(Class2.prototype, {
128
+ return Wrapper.prototype = Object.create(t2.prototype, {
146
129
  constructor: {
147
130
  value: Wrapper,
148
131
  enumerable: false,
149
132
  writable: true,
150
133
  configurable: true
151
134
  }
152
- });
153
- return _setPrototypeOf(Wrapper, Class2);
154
- };
155
- return _wrapNativeSuper(Class);
135
+ }), _setPrototypeOf(Wrapper, t2);
136
+ }, _wrapNativeSuper(t);
156
137
  }
157
138
 
158
139
  // ../../node_modules/polished/dist/polished.esm.js
@@ -459,8 +440,7 @@ var namedColorMap = {
459
440
  yellowgreen: "9acd32"
460
441
  };
461
442
  function nameToHex(color) {
462
- if (typeof color !== "string")
463
- return color;
443
+ if (typeof color !== "string") return color;
464
444
  var normalizedColorName = color.toLowerCase();
465
445
  return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
466
446
  }
@@ -603,8 +583,7 @@ function guard(lowerBoundary, upperBoundary, value) {
603
583
  return Math.max(lowerBoundary, Math.min(upperBoundary, value));
604
584
  }
605
585
  function transparentize(amount, color) {
606
- if (color === "transparent")
607
- return color;
586
+ if (color === "transparent") return color;
608
587
  var parsedColor = parseToRgb(color);
609
588
  var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
610
589
  var colorWithAlpha = _extends({}, parsedColor, {
@@ -614,7 +593,7 @@ function transparentize(amount, color) {
614
593
  }
615
594
  var curriedTransparentize = /* @__PURE__ */ curry(transparentize);
616
595
 
617
- // ../seeds-react-mixins/src/index.ts
596
+ // ../seeds-react-mixins/dist/esm/index.js
618
597
  var import_styled_components = require("styled-components");
619
598
  var import_seeds_react_theme = require("@sproutsocial/seeds-react-theme");
620
599
  var visuallyHidden = import_styled_components.css`
@@ -679,7 +658,7 @@ var Box = React.forwardRef(
679
658
  );
680
659
  Box.displayName = "Box";
681
660
  var Box_default = Box;
682
- var src_default = Box_default;
661
+ var index_default = Box_default;
683
662
 
684
663
  // src/constants.ts
685
664
  var MESSAGE_DENSITIES = {
@@ -691,7 +670,7 @@ var MESSAGE_DENSITIES = {
691
670
  };
692
671
 
693
672
  // src/styles.ts
694
- var Container2 = (0, import_styled_components3.default)(src_default)`
673
+ var Container2 = (0, import_styled_components3.default)(index_default)`
695
674
  border-radius: ${(props) => props.theme.radii.outer};
696
675
  border-width: ${(props) => props.theme.borderWidths[500]};
697
676
  border-style: solid;
@@ -703,7 +682,7 @@ var Container2 = (0, import_styled_components3.default)(src_default)`
703
682
  }
704
683
  `;
705
684
  Container2.displayName = "Message.Container";
706
- var MessageHeader = (0, import_react.memo)((0, import_styled_components3.default)(src_default)`
685
+ var MessageHeader = (0, import_react.memo)((0, import_styled_components3.default)(index_default)`
707
686
  padding: ${(props) => props.density === MESSAGE_DENSITIES.CONDENSED ? `0 0 0 ${props.theme.space[100]}` : props.theme.space[300]};
708
687
  display: flex;
709
688
  justify-content: space-between;
@@ -746,13 +725,13 @@ var messagePadding = ({
746
725
  }
747
726
  return theme2.space[400];
748
727
  };
749
- var MessageBody = (0, import_styled_components3.default)(src_default)`
728
+ var MessageBody = (0, import_styled_components3.default)(index_default)`
750
729
  padding: ${messagePadding} ${messagePadding} ${messagePadding}
751
730
  ${(props) => getContentPadding(props)};
752
731
  font-family: ${(props) => props.theme.fontFamily};
753
732
  ${(props) => props.density === MESSAGE_DENSITIES.COMPACT || props.density === MESSAGE_DENSITIES.CONDENSED ? props.theme.typography[200] : props.theme.typography[300]};
754
733
  `;
755
- var MessageFooter = (0, import_styled_components3.default)(src_default)`
734
+ var MessageFooter = (0, import_styled_components3.default)(index_default)`
756
735
  padding-bottom: ${(props) => props.density === MESSAGE_DENSITIES.CONDENSED ? 0 : props.theme.space[300]};
757
736
  padding-left: ${(props) => getContentPadding(props)};
758
737
  padding-right: ${(props) => props.density === MESSAGE_DENSITIES.CONDENSED ? 0 : props.theme.space[300]};
@@ -763,7 +742,7 @@ var MessageFooter = (0, import_styled_components3.default)(src_default)`
763
742
  align-items: center;
764
743
  flex-wrap: ${(props) => props.density === MESSAGE_DENSITIES.CONDENSED ? "nowrap" : "wrap"};
765
744
  `;
766
- var MessageMeta = (0, import_styled_components3.default)(src_default)`
745
+ var MessageMeta = (0, import_styled_components3.default)(index_default)`
767
746
  background: none;
768
747
  border-width: 0;
769
748
  border-style: none;
@@ -910,7 +889,7 @@ var Message_default = Message;
910
889
  var React3 = require("react");
911
890
 
912
891
  // src/index.ts
913
- var src_default2 = Message_default;
892
+ var index_default2 = Message_default;
914
893
  // Annotate the CommonJS export names for ESM import in node:
915
894
  0 && (module.exports = {
916
895
  MESSAGE_DENSITIES,