@sproutsocial/seeds-react-modal 2.2.1 → 2.2.3

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.
@@ -8,26 +8,26 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
+ CJS dist/index.js 37.00 KB
11
12
  CJS dist/v1/index.js 9.86 KB
12
- CJS dist/index.js 59.82 KB
13
- CJS dist/v2/index.js 51.80 KB
13
+ CJS dist/v2/index.js 28.98 KB
14
+ CJS dist/index.js.map 66.80 KB
14
15
  CJS dist/v1/index.js.map 13.03 KB
15
- CJS dist/index.js.map 203.91 KB
16
- CJS dist/v2/index.js.map 190.56 KB
17
- CJS ⚡️ Build success in 312ms
16
+ CJS dist/v2/index.js.map 53.42 KB
17
+ CJS ⚡️ Build success in 255ms
18
18
  ESM dist/esm/v1/index.js 165.00 B
19
19
  ESM dist/esm/v2/index.js 596.00 B
20
20
  ESM dist/esm/index.js 583.00 B
21
21
  ESM dist/esm/chunk-IYDY4OPB.js 7.12 KB
22
- ESM dist/esm/chunk-52SXX6AG.js 46.97 KB
22
+ ESM dist/esm/chunk-UP2XQN57.js 24.15 KB
23
23
  ESM dist/esm/v1/index.js.map 71.00 B
24
24
  ESM dist/esm/v2/index.js.map 71.00 B
25
25
  ESM dist/esm/index.js.map 1.05 KB
26
26
  ESM dist/esm/chunk-IYDY4OPB.js.map 12.85 KB
27
- ESM dist/esm/chunk-52SXX6AG.js.map 189.66 KB
28
- ESM ⚡️ Build success in 313ms
27
+ ESM dist/esm/chunk-UP2XQN57.js.map 52.53 KB
28
+ ESM ⚡️ Build success in 264ms
29
29
  DTS Build start
30
- DTS ⚡️ Build success in 15240ms
30
+ DTS ⚡️ Build success in 18516ms
31
31
  DTS dist/index.d.ts 975.00 B
32
32
  DTS dist/v1/index.d.ts 413.00 B
33
33
  DTS dist/v2/index.d.ts 1021.00 B
@@ -38,4 +38,4 @@ $ tsup --dts
38
38
  DTS dist/v2/index.d.mts 1022.00 B
39
39
  DTS dist/Modal-ki8oiGbC.d.mts 2.52 KB
40
40
  DTS dist/ModalAction-gIgCE73I.d.mts 15.19 KB
41
- Done in 18.05s.
41
+ Done in 20.85s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @sproutsocial/seeds-react-modal
2
2
 
3
+ ## 2.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [750d1ea]
8
+ - @sproutsocial/seeds-react-theme@3.3.0
9
+ - @sproutsocial/seeds-react-button@1.3.9
10
+ - @sproutsocial/seeds-react-box@1.1.8
11
+ - @sproutsocial/seeds-react-icon@2.0.4
12
+
13
+ ## 2.2.2
14
+
15
+ ### Patch Changes
16
+
17
+ - @sproutsocial/seeds-react-icon@2.0.3
18
+ - @sproutsocial/seeds-react-button@1.3.8
19
+
3
20
  ## 2.2.1
4
21
 
5
22
  ### Patch Changes
@@ -601,553 +601,6 @@ import * as Dialog5 from "@radix-ui/react-dialog";
601
601
  import styled6 from "styled-components";
602
602
  import Icon from "@sproutsocial/seeds-react-icon";
603
603
 
604
- // ../../node_modules/@babel/runtime/helpers/esm/extends.js
605
- function _extends() {
606
- return _extends = Object.assign ? Object.assign.bind() : function(n) {
607
- for (var e = 1; e < arguments.length; e++) {
608
- var t = arguments[e];
609
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
610
- }
611
- return n;
612
- }, _extends.apply(null, arguments);
613
- }
614
-
615
- // ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
616
- function _assertThisInitialized(e) {
617
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
618
- return e;
619
- }
620
-
621
- // ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
622
- function _setPrototypeOf(t, e) {
623
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
624
- return t2.__proto__ = e2, t2;
625
- }, _setPrototypeOf(t, e);
626
- }
627
-
628
- // ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
629
- function _inheritsLoose(t, o) {
630
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
631
- }
632
-
633
- // ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
634
- function _getPrototypeOf(t) {
635
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
636
- return t2.__proto__ || Object.getPrototypeOf(t2);
637
- }, _getPrototypeOf(t);
638
- }
639
-
640
- // ../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
641
- function _isNativeFunction(t) {
642
- try {
643
- return -1 !== Function.toString.call(t).indexOf("[native code]");
644
- } catch (n) {
645
- return "function" == typeof t;
646
- }
647
- }
648
-
649
- // ../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
650
- function _isNativeReflectConstruct() {
651
- try {
652
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
653
- }));
654
- } catch (t2) {
655
- }
656
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
657
- return !!t;
658
- })();
659
- }
660
-
661
- // ../../node_modules/@babel/runtime/helpers/esm/construct.js
662
- function _construct(t, e, r) {
663
- if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
664
- var o = [null];
665
- o.push.apply(o, e);
666
- var p = new (t.bind.apply(t, o))();
667
- return r && _setPrototypeOf(p, r.prototype), p;
668
- }
669
-
670
- // ../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
671
- function _wrapNativeSuper(t) {
672
- var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
673
- return _wrapNativeSuper = function _wrapNativeSuper2(t2) {
674
- if (null === t2 || !_isNativeFunction(t2)) return t2;
675
- if ("function" != typeof t2) throw new TypeError("Super expression must either be null or a function");
676
- if (void 0 !== r) {
677
- if (r.has(t2)) return r.get(t2);
678
- r.set(t2, Wrapper);
679
- }
680
- function Wrapper() {
681
- return _construct(t2, arguments, _getPrototypeOf(this).constructor);
682
- }
683
- return Wrapper.prototype = Object.create(t2.prototype, {
684
- constructor: {
685
- value: Wrapper,
686
- enumerable: false,
687
- writable: true,
688
- configurable: true
689
- }
690
- }), _setPrototypeOf(Wrapper, t2);
691
- }, _wrapNativeSuper(t);
692
- }
693
-
694
- // ../../node_modules/polished/dist/polished.esm.js
695
- var ERRORS = {
696
- "1": "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",
697
- "2": "Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",
698
- "3": "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
699
- "4": "Couldn't generate valid rgb string from %s, it returned %s.\n\n",
700
- "5": "Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",
701
- "6": "Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",
702
- "7": "Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",
703
- "8": "Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",
704
- "9": "Please provide a number of steps to the modularScale helper.\n\n",
705
- "10": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
706
- "11": 'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',
707
- "12": 'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',
708
- "13": 'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',
709
- "14": 'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',
710
- "15": 'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',
711
- "16": "You must provide a template to this method.\n\n",
712
- "17": "You passed an unsupported selector state to this method.\n\n",
713
- "18": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
714
- "19": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
715
- "20": "expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
716
- "21": "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
717
- "22": "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
718
- "23": "fontFace expects a name of a font-family.\n\n",
719
- "24": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
720
- "25": "fontFace expects localFonts to be an array.\n\n",
721
- "26": "fontFace expects fileFormats to be an array.\n\n",
722
- "27": "radialGradient requries at least 2 color-stops to properly render.\n\n",
723
- "28": "Please supply a filename to retinaImage() as the first argument.\n\n",
724
- "29": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
725
- "30": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
726
- "31": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",
727
- "32": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",
728
- "33": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",
729
- "34": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
730
- "35": 'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',
731
- "36": "Property must be a string value.\n\n",
732
- "37": "Syntax Error at %s.\n\n",
733
- "38": "Formula contains a function that needs parentheses at %s.\n\n",
734
- "39": "Formula is missing closing parenthesis at %s.\n\n",
735
- "40": "Formula has too many closing parentheses at %s.\n\n",
736
- "41": "All values in a formula must have the same unit or be unitless.\n\n",
737
- "42": "Please provide a number of steps to the modularScale helper.\n\n",
738
- "43": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
739
- "44": "Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",
740
- "45": "Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",
741
- "46": "Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",
742
- "47": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
743
- "48": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
744
- "49": "Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
745
- "50": "Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",
746
- "51": "Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",
747
- "52": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
748
- "53": "fontFace expects localFonts to be an array.\n\n",
749
- "54": "fontFace expects fileFormats to be an array.\n\n",
750
- "55": "fontFace expects a name of a font-family.\n\n",
751
- "56": "linearGradient requries at least 2 color-stops to properly render.\n\n",
752
- "57": "radialGradient requries at least 2 color-stops to properly render.\n\n",
753
- "58": "Please supply a filename to retinaImage() as the first argument.\n\n",
754
- "59": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
755
- "60": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
756
- "61": "Property must be a string value.\n\n",
757
- "62": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
758
- "63": 'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',
759
- "64": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",
760
- "65": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",
761
- "66": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",
762
- "67": "You must provide a template to this method.\n\n",
763
- "68": "You passed an unsupported selector state to this method.\n\n",
764
- "69": 'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',
765
- "70": 'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',
766
- "71": 'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',
767
- "72": 'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',
768
- "73": "Please provide a valid CSS variable.\n\n",
769
- "74": "CSS variable not found.\n\n",
770
- "75": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
771
- };
772
- function format() {
773
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
774
- args[_key] = arguments[_key];
775
- }
776
- var a = args[0];
777
- var b = [];
778
- var c;
779
- for (c = 1; c < args.length; c += 1) {
780
- b.push(args[c]);
781
- }
782
- b.forEach(function(d) {
783
- a = a.replace(/%[a-z]/, d);
784
- });
785
- return a;
786
- }
787
- var PolishedError = /* @__PURE__ */ function(_Error) {
788
- _inheritsLoose(PolishedError2, _Error);
789
- function PolishedError2(code) {
790
- var _this;
791
- if (process.env.NODE_ENV === "production") {
792
- _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
793
- } else {
794
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
795
- args[_key2 - 1] = arguments[_key2];
796
- }
797
- _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
798
- }
799
- return _assertThisInitialized(_this);
800
- }
801
- return PolishedError2;
802
- }(/* @__PURE__ */ _wrapNativeSuper(Error));
803
- function colorToInt(color) {
804
- return Math.round(color * 255);
805
- }
806
- function convertToInt(red, green, blue) {
807
- return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
808
- }
809
- function hslToRgb(hue, saturation, lightness, convert) {
810
- if (convert === void 0) {
811
- convert = convertToInt;
812
- }
813
- if (saturation === 0) {
814
- return convert(lightness, lightness, lightness);
815
- }
816
- var huePrime = (hue % 360 + 360) % 360 / 60;
817
- var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
818
- var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
819
- var red = 0;
820
- var green = 0;
821
- var blue = 0;
822
- if (huePrime >= 0 && huePrime < 1) {
823
- red = chroma;
824
- green = secondComponent;
825
- } else if (huePrime >= 1 && huePrime < 2) {
826
- red = secondComponent;
827
- green = chroma;
828
- } else if (huePrime >= 2 && huePrime < 3) {
829
- green = chroma;
830
- blue = secondComponent;
831
- } else if (huePrime >= 3 && huePrime < 4) {
832
- green = secondComponent;
833
- blue = chroma;
834
- } else if (huePrime >= 4 && huePrime < 5) {
835
- red = secondComponent;
836
- blue = chroma;
837
- } else if (huePrime >= 5 && huePrime < 6) {
838
- red = chroma;
839
- blue = secondComponent;
840
- }
841
- var lightnessModification = lightness - chroma / 2;
842
- var finalRed = red + lightnessModification;
843
- var finalGreen = green + lightnessModification;
844
- var finalBlue = blue + lightnessModification;
845
- return convert(finalRed, finalGreen, finalBlue);
846
- }
847
- var namedColorMap = {
848
- aliceblue: "f0f8ff",
849
- antiquewhite: "faebd7",
850
- aqua: "00ffff",
851
- aquamarine: "7fffd4",
852
- azure: "f0ffff",
853
- beige: "f5f5dc",
854
- bisque: "ffe4c4",
855
- black: "000",
856
- blanchedalmond: "ffebcd",
857
- blue: "0000ff",
858
- blueviolet: "8a2be2",
859
- brown: "a52a2a",
860
- burlywood: "deb887",
861
- cadetblue: "5f9ea0",
862
- chartreuse: "7fff00",
863
- chocolate: "d2691e",
864
- coral: "ff7f50",
865
- cornflowerblue: "6495ed",
866
- cornsilk: "fff8dc",
867
- crimson: "dc143c",
868
- cyan: "00ffff",
869
- darkblue: "00008b",
870
- darkcyan: "008b8b",
871
- darkgoldenrod: "b8860b",
872
- darkgray: "a9a9a9",
873
- darkgreen: "006400",
874
- darkgrey: "a9a9a9",
875
- darkkhaki: "bdb76b",
876
- darkmagenta: "8b008b",
877
- darkolivegreen: "556b2f",
878
- darkorange: "ff8c00",
879
- darkorchid: "9932cc",
880
- darkred: "8b0000",
881
- darksalmon: "e9967a",
882
- darkseagreen: "8fbc8f",
883
- darkslateblue: "483d8b",
884
- darkslategray: "2f4f4f",
885
- darkslategrey: "2f4f4f",
886
- darkturquoise: "00ced1",
887
- darkviolet: "9400d3",
888
- deeppink: "ff1493",
889
- deepskyblue: "00bfff",
890
- dimgray: "696969",
891
- dimgrey: "696969",
892
- dodgerblue: "1e90ff",
893
- firebrick: "b22222",
894
- floralwhite: "fffaf0",
895
- forestgreen: "228b22",
896
- fuchsia: "ff00ff",
897
- gainsboro: "dcdcdc",
898
- ghostwhite: "f8f8ff",
899
- gold: "ffd700",
900
- goldenrod: "daa520",
901
- gray: "808080",
902
- green: "008000",
903
- greenyellow: "adff2f",
904
- grey: "808080",
905
- honeydew: "f0fff0",
906
- hotpink: "ff69b4",
907
- indianred: "cd5c5c",
908
- indigo: "4b0082",
909
- ivory: "fffff0",
910
- khaki: "f0e68c",
911
- lavender: "e6e6fa",
912
- lavenderblush: "fff0f5",
913
- lawngreen: "7cfc00",
914
- lemonchiffon: "fffacd",
915
- lightblue: "add8e6",
916
- lightcoral: "f08080",
917
- lightcyan: "e0ffff",
918
- lightgoldenrodyellow: "fafad2",
919
- lightgray: "d3d3d3",
920
- lightgreen: "90ee90",
921
- lightgrey: "d3d3d3",
922
- lightpink: "ffb6c1",
923
- lightsalmon: "ffa07a",
924
- lightseagreen: "20b2aa",
925
- lightskyblue: "87cefa",
926
- lightslategray: "789",
927
- lightslategrey: "789",
928
- lightsteelblue: "b0c4de",
929
- lightyellow: "ffffe0",
930
- lime: "0f0",
931
- limegreen: "32cd32",
932
- linen: "faf0e6",
933
- magenta: "f0f",
934
- maroon: "800000",
935
- mediumaquamarine: "66cdaa",
936
- mediumblue: "0000cd",
937
- mediumorchid: "ba55d3",
938
- mediumpurple: "9370db",
939
- mediumseagreen: "3cb371",
940
- mediumslateblue: "7b68ee",
941
- mediumspringgreen: "00fa9a",
942
- mediumturquoise: "48d1cc",
943
- mediumvioletred: "c71585",
944
- midnightblue: "191970",
945
- mintcream: "f5fffa",
946
- mistyrose: "ffe4e1",
947
- moccasin: "ffe4b5",
948
- navajowhite: "ffdead",
949
- navy: "000080",
950
- oldlace: "fdf5e6",
951
- olive: "808000",
952
- olivedrab: "6b8e23",
953
- orange: "ffa500",
954
- orangered: "ff4500",
955
- orchid: "da70d6",
956
- palegoldenrod: "eee8aa",
957
- palegreen: "98fb98",
958
- paleturquoise: "afeeee",
959
- palevioletred: "db7093",
960
- papayawhip: "ffefd5",
961
- peachpuff: "ffdab9",
962
- peru: "cd853f",
963
- pink: "ffc0cb",
964
- plum: "dda0dd",
965
- powderblue: "b0e0e6",
966
- purple: "800080",
967
- rebeccapurple: "639",
968
- red: "f00",
969
- rosybrown: "bc8f8f",
970
- royalblue: "4169e1",
971
- saddlebrown: "8b4513",
972
- salmon: "fa8072",
973
- sandybrown: "f4a460",
974
- seagreen: "2e8b57",
975
- seashell: "fff5ee",
976
- sienna: "a0522d",
977
- silver: "c0c0c0",
978
- skyblue: "87ceeb",
979
- slateblue: "6a5acd",
980
- slategray: "708090",
981
- slategrey: "708090",
982
- snow: "fffafa",
983
- springgreen: "00ff7f",
984
- steelblue: "4682b4",
985
- tan: "d2b48c",
986
- teal: "008080",
987
- thistle: "d8bfd8",
988
- tomato: "ff6347",
989
- turquoise: "40e0d0",
990
- violet: "ee82ee",
991
- wheat: "f5deb3",
992
- white: "fff",
993
- whitesmoke: "f5f5f5",
994
- yellow: "ff0",
995
- yellowgreen: "9acd32"
996
- };
997
- function nameToHex(color) {
998
- if (typeof color !== "string") return color;
999
- var normalizedColorName = color.toLowerCase();
1000
- return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
1001
- }
1002
- var hexRegex = /^#[a-fA-F0-9]{6}$/;
1003
- var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
1004
- var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
1005
- var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
1006
- var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i;
1007
- var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
1008
- var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
1009
- var hslaRegex = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
1010
- function parseToRgb(color) {
1011
- if (typeof color !== "string") {
1012
- throw new PolishedError(3);
1013
- }
1014
- var normalizedColor = nameToHex(color);
1015
- if (normalizedColor.match(hexRegex)) {
1016
- return {
1017
- red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
1018
- green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
1019
- blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
1020
- };
1021
- }
1022
- if (normalizedColor.match(hexRgbaRegex)) {
1023
- var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
1024
- return {
1025
- red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
1026
- green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
1027
- blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
1028
- alpha
1029
- };
1030
- }
1031
- if (normalizedColor.match(reducedHexRegex)) {
1032
- return {
1033
- red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
1034
- green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
1035
- blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
1036
- };
1037
- }
1038
- if (normalizedColor.match(reducedRgbaHexRegex)) {
1039
- var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
1040
- return {
1041
- red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
1042
- green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
1043
- blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
1044
- alpha: _alpha
1045
- };
1046
- }
1047
- var rgbMatched = rgbRegex.exec(normalizedColor);
1048
- if (rgbMatched) {
1049
- return {
1050
- red: parseInt("" + rgbMatched[1], 10),
1051
- green: parseInt("" + rgbMatched[2], 10),
1052
- blue: parseInt("" + rgbMatched[3], 10)
1053
- };
1054
- }
1055
- var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
1056
- if (rgbaMatched) {
1057
- return {
1058
- red: parseInt("" + rgbaMatched[1], 10),
1059
- green: parseInt("" + rgbaMatched[2], 10),
1060
- blue: parseInt("" + rgbaMatched[3], 10),
1061
- alpha: parseFloat("" + rgbaMatched[4])
1062
- };
1063
- }
1064
- var hslMatched = hslRegex.exec(normalizedColor);
1065
- if (hslMatched) {
1066
- var hue = parseInt("" + hslMatched[1], 10);
1067
- var saturation = parseInt("" + hslMatched[2], 10) / 100;
1068
- var lightness = parseInt("" + hslMatched[3], 10) / 100;
1069
- var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
1070
- var hslRgbMatched = rgbRegex.exec(rgbColorString);
1071
- if (!hslRgbMatched) {
1072
- throw new PolishedError(4, normalizedColor, rgbColorString);
1073
- }
1074
- return {
1075
- red: parseInt("" + hslRgbMatched[1], 10),
1076
- green: parseInt("" + hslRgbMatched[2], 10),
1077
- blue: parseInt("" + hslRgbMatched[3], 10)
1078
- };
1079
- }
1080
- var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
1081
- if (hslaMatched) {
1082
- var _hue = parseInt("" + hslaMatched[1], 10);
1083
- var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
1084
- var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
1085
- var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
1086
- var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
1087
- if (!_hslRgbMatched) {
1088
- throw new PolishedError(4, normalizedColor, _rgbColorString);
1089
- }
1090
- return {
1091
- red: parseInt("" + _hslRgbMatched[1], 10),
1092
- green: parseInt("" + _hslRgbMatched[2], 10),
1093
- blue: parseInt("" + _hslRgbMatched[3], 10),
1094
- alpha: parseFloat("" + hslaMatched[4])
1095
- };
1096
- }
1097
- throw new PolishedError(5);
1098
- }
1099
- var reduceHexValue = function reduceHexValue2(value) {
1100
- if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
1101
- return "#" + value[1] + value[3] + value[5];
1102
- }
1103
- return value;
1104
- };
1105
- function numberToHex(value) {
1106
- var hex = value.toString(16);
1107
- return hex.length === 1 ? "0" + hex : hex;
1108
- }
1109
- function rgb(value, green, blue) {
1110
- if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
1111
- return reduceHexValue("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
1112
- } else if (typeof value === "object" && green === void 0 && blue === void 0) {
1113
- return reduceHexValue("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
1114
- }
1115
- throw new PolishedError(6);
1116
- }
1117
- function rgba(firstValue, secondValue, thirdValue, fourthValue) {
1118
- if (typeof firstValue === "string" && typeof secondValue === "number") {
1119
- var rgbValue = parseToRgb(firstValue);
1120
- return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
1121
- } else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
1122
- return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
1123
- } else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
1124
- return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
1125
- }
1126
- throw new PolishedError(7);
1127
- }
1128
- function curried(f, length, acc) {
1129
- return function fn() {
1130
- var combined = acc.concat(Array.prototype.slice.call(arguments));
1131
- return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
1132
- };
1133
- }
1134
- function curry(f) {
1135
- return curried(f, f.length, []);
1136
- }
1137
- function guard(lowerBoundary, upperBoundary, value) {
1138
- return Math.max(lowerBoundary, Math.min(upperBoundary, value));
1139
- }
1140
- function transparentize(amount, color) {
1141
- if (color === "transparent") return color;
1142
- var parsedColor = parseToRgb(color);
1143
- var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
1144
- var colorWithAlpha = _extends({}, parsedColor, {
1145
- alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
1146
- });
1147
- return rgba(colorWithAlpha);
1148
- }
1149
- var curriedTransparentize = /* @__PURE__ */ curry(transparentize);
1150
-
1151
604
  // ../seeds-react-mixins/dist/esm/index.js
1152
605
  import { css } from "styled-components";
1153
606
  import { theme } from "@sproutsocial/seeds-react-theme";
@@ -1164,7 +617,11 @@ var visuallyHidden = css`
1164
617
  var focusRing = css`
1165
618
  box-shadow: 0 0 0 1px ${theme.colors.button.primary.background.base},
1166
619
  0 0px 0px 4px
1167
- ${curriedTransparentize(0.7, theme.colors.button.primary.background.base)};
620
+ color-mix(
621
+ in srgb,
622
+ ${theme.colors.button.primary.background.base},
623
+ transparent 70%
624
+ );
1168
625
  outline: none;
1169
626
 
1170
627
  &::-moz-focus-inner {
@@ -1405,4 +862,4 @@ export {
1405
862
  ModalAction,
1406
863
  Modal_default
1407
864
  };
1408
- //# sourceMappingURL=chunk-52SXX6AG.js.map
865
+ //# sourceMappingURL=chunk-UP2XQN57.js.map