@helpdice/ui 1.8.4 → 2.0.5

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.
Files changed (113) hide show
  1. package/dist/CurrencyInput/components/CurrencyInput.d.ts +4 -0
  2. package/dist/CurrencyInput/components/CurrencyInputProps.d.ts +160 -0
  3. package/dist/CurrencyInput/components/utils/cleanValue.d.ts +8 -0
  4. package/dist/CurrencyInput/components/utils/escapeRegExp.d.ts +6 -0
  5. package/dist/CurrencyInput/components/utils/fixedDecimalValue.d.ts +1 -0
  6. package/dist/CurrencyInput/components/utils/formatValue.d.ts +49 -0
  7. package/dist/CurrencyInput/components/utils/getLocaleConfig.d.ts +13 -0
  8. package/dist/CurrencyInput/components/utils/getSuffix.d.ts +6 -0
  9. package/dist/CurrencyInput/components/utils/index.d.ts +8 -0
  10. package/dist/CurrencyInput/components/utils/isNumber.d.ts +1 -0
  11. package/dist/CurrencyInput/components/utils/padTrimValue.d.ts +1 -0
  12. package/dist/CurrencyInput/components/utils/parseAbbrValue.d.ts +10 -0
  13. package/dist/CurrencyInput/components/utils/removeInvalidChars.d.ts +4 -0
  14. package/dist/CurrencyInput/components/utils/removeSeparators.d.ts +4 -0
  15. package/dist/CurrencyInput/components/utils/repositionCursor.d.ts +16 -0
  16. package/dist/CurrencyInput/index.d.ts +5 -0
  17. package/dist/CurrencyInput/index.js +3 -2122
  18. package/dist/ITooltip/index.d.ts +13 -0
  19. package/dist/Loadable/index.js +29 -3
  20. package/dist/PhoneInput/index.js +21 -2140
  21. package/dist/Placeholder/index.js +5 -2124
  22. package/dist/auto-complete/index.js +73 -12092
  23. package/dist/avatar/index.js +15 -2134
  24. package/dist/badge/index.js +8 -2127
  25. package/dist/breadcrumbs/index.js +19 -2138
  26. package/dist/button/index.js +36 -2229
  27. package/dist/button-dropdown/index.js +28 -2147
  28. package/dist/button-group/index.js +9 -2128
  29. package/dist/capacity/index.js +10 -2129
  30. package/dist/card/index.js +46 -2165
  31. package/dist/carousal/index.js +644 -12666
  32. package/dist/checkbox/index.js +10 -2129
  33. package/dist/code/index.js +14 -2133
  34. package/dist/collapse/index.js +16 -2135
  35. package/dist/description/index.js +9 -2128
  36. package/dist/display/index.js +11 -2130
  37. package/dist/divider/index.js +12 -2131
  38. package/dist/dot/index.js +6 -2125
  39. package/dist/drawer/index.js +21 -2139
  40. package/dist/fieldset/index.js +22 -2141
  41. package/dist/grid/index.js +8 -2127
  42. package/dist/image/index.js +31 -2150
  43. package/dist/index.d.ts +4 -0
  44. package/dist/index.js +2065 -23539
  45. package/dist/input/index.js +42 -2158
  46. package/dist/keyboard/index.js +11 -2130
  47. package/dist/link/index.js +11 -2130
  48. package/dist/list/index.js +25 -2143
  49. package/dist/list/list-item.d.ts +1 -0
  50. package/dist/loading/index.js +14 -2133
  51. package/dist/menu/index.js +2 -10245
  52. package/dist/modal/index.js +59 -2177
  53. package/dist/note/index.js +10 -2129
  54. package/dist/page/index.js +6 -2125
  55. package/dist/pagination/index.js +11 -2130
  56. package/dist/popover/index.js +23 -2141
  57. package/dist/progress/index.js +10 -2129
  58. package/dist/radio/index.js +17 -2136
  59. package/dist/rating/index.js +7 -2126
  60. package/dist/row/index.js +5 -2124
  61. package/dist/select/index.js +54 -2173
  62. package/dist/slider/index.js +21 -2140
  63. package/dist/snippet/index.js +12 -2131
  64. package/dist/spacer/index.js +2 -2121
  65. package/dist/spinner/index.js +5 -2124
  66. package/dist/table/index.js +910 -12918
  67. package/dist/tabs/index.js +16 -2135
  68. package/dist/tag/index.js +5 -2124
  69. package/dist/text/index.js +5 -2124
  70. package/dist/textarea/index.js +10 -2129
  71. package/dist/toggle/index.js +14 -2133
  72. package/dist/tooltip/index.js +17 -2135
  73. package/dist/tree/index.js +39 -2158
  74. package/dist/use-input/index.js +2 -2122
  75. package/dist/use-modal/index.js +2 -2122
  76. package/dist/use-scale/index.js +2 -2121
  77. package/dist/use-tabs/index.js +2 -2122
  78. package/dist/user/index.js +31 -2150
  79. package/esm/CurrencyInput/components/CurrencyInput.d.ts +4 -0
  80. package/esm/CurrencyInput/components/CurrencyInputProps.d.ts +160 -0
  81. package/esm/CurrencyInput/components/utils/cleanValue.d.ts +8 -0
  82. package/esm/CurrencyInput/components/utils/escapeRegExp.d.ts +6 -0
  83. package/esm/CurrencyInput/components/utils/fixedDecimalValue.d.ts +1 -0
  84. package/esm/CurrencyInput/components/utils/formatValue.d.ts +49 -0
  85. package/esm/CurrencyInput/components/utils/getLocaleConfig.d.ts +13 -0
  86. package/esm/CurrencyInput/components/utils/getSuffix.d.ts +6 -0
  87. package/esm/CurrencyInput/components/utils/index.d.ts +8 -0
  88. package/esm/CurrencyInput/components/utils/isNumber.d.ts +1 -0
  89. package/esm/CurrencyInput/components/utils/padTrimValue.d.ts +1 -0
  90. package/esm/CurrencyInput/components/utils/parseAbbrValue.d.ts +10 -0
  91. package/esm/CurrencyInput/components/utils/removeInvalidChars.d.ts +4 -0
  92. package/esm/CurrencyInput/components/utils/removeSeparators.d.ts +4 -0
  93. package/esm/CurrencyInput/components/utils/repositionCursor.d.ts +16 -0
  94. package/esm/CurrencyInput/index.d.ts +5 -0
  95. package/esm/ITooltip/index.d.ts +13 -0
  96. package/esm/ITooltip/index.js +97 -0
  97. package/esm/Loadable/loader.js +13 -0
  98. package/esm/button/button.compact.js +13 -86
  99. package/esm/index.d.ts +4 -0
  100. package/esm/index.js +4 -1
  101. package/esm/input/input.js +13 -10
  102. package/esm/link/link.js +3 -3
  103. package/esm/list/list-item.d.ts +1 -0
  104. package/esm/list/list-item.js +4 -2
  105. package/esm/login-with/LoginSocialAmazon/index.js +1 -1
  106. package/esm/login-with/LoginSocialApple/index.js +1 -1
  107. package/esm/login-with/LoginSocialFacebook/index.js +1 -1
  108. package/esm/login-with/LoginSocialGoogle/index.js +1 -1
  109. package/esm/table/table-body.js +14 -4
  110. package/esm/table/table-cell.js +1 -1
  111. package/esm/table/table-head.js +13 -13
  112. package/esm/table/table.js +8 -8
  113. package/package.json +5 -5
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var require$$1 = require('react-dom');
6
+ var theme = require('@helpdice/theme');
7
7
 
8
8
  function _arrayLikeToArray(r, a) {
9
9
  (null == a || a > r.length) && (a = r.length);
@@ -717,2125 +717,6 @@ function requireStyle () {
717
717
  var styleExports = requireStyle();
718
718
  var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
719
719
 
720
- var dist = {};
721
-
722
- var hasRequiredDist;
723
-
724
- function requireDist () {
725
- if (hasRequiredDist) return dist;
726
- hasRequiredDist = 1;
727
-
728
- var React$1 = React;
729
- var reactDom = require$$1;
730
-
731
- function _arrayLikeToArray(r, a) {
732
- (null == a || a > r.length) && (a = r.length);
733
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
734
- return n;
735
- }
736
- function _arrayWithHoles(r) {
737
- if (Array.isArray(r)) return r;
738
- }
739
- function _arrayWithoutHoles(r) {
740
- if (Array.isArray(r)) return _arrayLikeToArray(r);
741
- }
742
- function _defineProperty(e, r, t) {
743
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
744
- value: t,
745
- enumerable: true,
746
- configurable: true,
747
- writable: true
748
- }) : e[r] = t, e;
749
- }
750
- function _extends() {
751
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
752
- for (var e = 1; e < arguments.length; e++) {
753
- var t = arguments[e];
754
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
755
- }
756
- return n;
757
- }, _extends.apply(null, arguments);
758
- }
759
- function _iterableToArray(r) {
760
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
761
- }
762
- function _iterableToArrayLimit(r, l) {
763
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
764
- if (null != t) {
765
- var e,
766
- n,
767
- i,
768
- u,
769
- a = [],
770
- f = true,
771
- o = false;
772
- try {
773
- if (i = (t = t.call(r)).next, 0 === l) {
774
- if (Object(t) !== t) return;
775
- f = !1;
776
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
777
- } catch (r) {
778
- o = true, n = r;
779
- } finally {
780
- try {
781
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
782
- } finally {
783
- if (o) throw n;
784
- }
785
- }
786
- return a;
787
- }
788
- }
789
- function _nonIterableRest() {
790
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
791
- }
792
- function _nonIterableSpread() {
793
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
794
- }
795
- function ownKeys(e, r) {
796
- var t = Object.keys(e);
797
- if (Object.getOwnPropertySymbols) {
798
- var o = Object.getOwnPropertySymbols(e);
799
- r && (o = o.filter(function (r) {
800
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
801
- })), t.push.apply(t, o);
802
- }
803
- return t;
804
- }
805
- function _objectSpread2(e) {
806
- for (var r = 1; r < arguments.length; r++) {
807
- var t = null != arguments[r] ? arguments[r] : {};
808
- r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
809
- _defineProperty(e, r, t[r]);
810
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
811
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
812
- });
813
- }
814
- return e;
815
- }
816
- function _objectWithoutProperties(e, t) {
817
- if (null == e) return {};
818
- var o,
819
- r,
820
- i = _objectWithoutPropertiesLoose(e, t);
821
- if (Object.getOwnPropertySymbols) {
822
- var n = Object.getOwnPropertySymbols(e);
823
- for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
824
- }
825
- return i;
826
- }
827
- function _objectWithoutPropertiesLoose(r, e) {
828
- if (null == r) return {};
829
- var t = {};
830
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
831
- if (-1 !== e.indexOf(n)) continue;
832
- t[n] = r[n];
833
- }
834
- return t;
835
- }
836
- function _slicedToArray(r, e) {
837
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
838
- }
839
- function _toConsumableArray(r) {
840
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
841
- }
842
- function _toPrimitive(t, r) {
843
- if ("object" != typeof t || !t) return t;
844
- var e = t[Symbol.toPrimitive];
845
- if (void 0 !== e) {
846
- var i = e.call(t, r);
847
- if ("object" != typeof i) return i;
848
- throw new TypeError("@@toPrimitive must return a primitive value.");
849
- }
850
- return ("string" === r ? String : Number)(t);
851
- }
852
- function _toPropertyKey(t) {
853
- var i = _toPrimitive(t, "string");
854
- return "symbol" == typeof i ? i : i + "";
855
- }
856
- function _typeof(o) {
857
- "@babel/helpers - typeof";
858
-
859
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
860
- return typeof o;
861
- } : function (o) {
862
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
863
- }, _typeof(o);
864
- }
865
- function _unsupportedIterableToArray(r, a) {
866
- if (r) {
867
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
868
- var t = {}.toString.call(r).slice(8, -1);
869
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
870
- }
871
- }
872
-
873
- var defaultToastLayout = {
874
- padding: '12px 16px',
875
- margin: '8px 0',
876
- width: '420px',
877
- maxWidth: '90vw',
878
- maxHeight: '75px',
879
- placement: 'bottomRight'
880
- };
881
- var defaultParams = {
882
- toasts: [],
883
- toastLayout: defaultToastLayout,
884
- updateToastLayout: function updateToastLayout(t) {
885
- return t;
886
- },
887
- updateToasts: function updateToasts(t) {
888
- return t;
889
- },
890
- lastUpdateToastId: null,
891
- updateLastToastId: function updateLastToastId() {
892
- return null;
893
- }
894
- };
895
- var HUIContent = /*#__PURE__*/React$1.createContext(defaultParams);
896
- var useHUIContext = function useHUIContext() {
897
- return React$1.useContext(HUIContent);
898
- };
899
-
900
- var defaultFont = {
901
- sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
902
- mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
903
- prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
904
- };
905
- var defaultBreakpoints = {
906
- xs: {
907
- min: '0',
908
- max: '650px'
909
- },
910
- sm: {
911
- min: '650px',
912
- max: '900px'
913
- },
914
- md: {
915
- min: '900px',
916
- max: '1280px'
917
- },
918
- lg: {
919
- min: '1280px',
920
- max: '1920px'
921
- },
922
- xl: {
923
- min: '1920px',
924
- max: '10000px'
925
- }
926
- };
927
- var defaultLayout = {
928
- gap: '16pt',
929
- gapNegative: '-16pt',
930
- gapHalf: '8pt',
931
- gapHalfNegative: '-8pt',
932
- gapQuarter: '4pt',
933
- gapQuarterNegative: '-4pt',
934
- pageMargin: '16pt',
935
- pageWidth: '750pt',
936
- pageWidthWithMargin: '782pt',
937
- breakpointMobile: defaultBreakpoints.xs.max,
938
- breakpointTablet: defaultBreakpoints.sm.max,
939
- radius: '6px',
940
- unit: '16px'
941
- };
942
-
943
- var palette$1 = {
944
- accents_1: '#fafafa',
945
- accents_2: '#eaeaea',
946
- accents_3: '#999',
947
- accents_4: '#888',
948
- accents_5: '#666',
949
- accents_6: '#444',
950
- accents_7: '#333',
951
- accents_8: '#111',
952
- background: '#fff',
953
- foreground: '#000',
954
- selection: '#79ffe1',
955
- secondary: '#666',
956
- code: '#f81ce5',
957
- border: '#eaeaea',
958
- error: '#e00',
959
- errorLight: '#ff1a1a',
960
- errorLighter: '#f7d4d6',
961
- errorDark: '#c50000',
962
- success: '#0070f3',
963
- successLight: '#3291ff',
964
- successLighter: '#d3e5ff',
965
- successDark: '#0761d1',
966
- warning: '#f5a623',
967
- warningLight: '#f7b955',
968
- warningLighter: '#ffefcf',
969
- warningDark: '#ab570a',
970
- cyan: '#50e3c2',
971
- cyanLighter: '#aaffec',
972
- cyanLight: '#79ffe1',
973
- cyanDark: '#29bc9b',
974
- violet: '#7928ca',
975
- violetLighter: '#e3d7fc',
976
- violetLight: '#8a63d2',
977
- violetDark: '#4c2889',
978
- purple: '#f81ce5',
979
- alert: '#ff0080',
980
- magenta: '#eb367f',
981
- link: '#0070f3'
982
- };
983
- var expressiveness$1 = {
984
- linkStyle: 'none',
985
- linkHoverStyle: 'none',
986
- dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
987
- scrollerStart: 'rgba(255, 255, 255, 1)',
988
- scrollerEnd: 'rgba(255, 255, 255, 0)',
989
- shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
990
- shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
991
- shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
992
- portalOpacity: 0.25
993
- };
994
- var font$1 = defaultFont;
995
- var breakpoints$1 = defaultBreakpoints;
996
- var layout$1 = defaultLayout;
997
- var themes$1 = {
998
- type: 'light',
999
- font: font$1,
1000
- layout: layout$1,
1001
- palette: palette$1,
1002
- breakpoints: breakpoints$1,
1003
- expressiveness: expressiveness$1
1004
- };
1005
-
1006
- var palette = {
1007
- accents_1: '#111',
1008
- accents_2: '#333',
1009
- accents_3: '#444',
1010
- accents_4: '#666',
1011
- accents_5: '#888',
1012
- accents_6: '#999',
1013
- accents_7: '#eaeaea',
1014
- accents_8: '#fafafa',
1015
- background: '#000',
1016
- foreground: '#fff',
1017
- selection: '#f81ce5',
1018
- secondary: '#888',
1019
- code: '#79ffe1',
1020
- border: '#333',
1021
- error: '#e00',
1022
- errorLighter: '#f7d4d6',
1023
- errorLight: '#ff1a1a',
1024
- errorDark: '#c50000',
1025
- success: '#0070f3',
1026
- successLighter: '#d3e5ff',
1027
- successLight: '#3291ff',
1028
- successDark: '#0761d1',
1029
- warning: '#f5a623',
1030
- warningLighter: '#ffefcf',
1031
- warningLight: '#f7b955',
1032
- warningDark: '#ab570a',
1033
- cyan: '#50e3c2',
1034
- cyanLighter: '#aaffec',
1035
- cyanLight: '#79ffe1',
1036
- cyanDark: '#29bc9b',
1037
- violet: '#7928ca',
1038
- violetLighter: '#e3d7fc',
1039
- violetLight: '#8a63d2',
1040
- violetDark: '#4c2889',
1041
- purple: '#f81ce5',
1042
- alert: '#ff0080',
1043
- magenta: '#eb367f',
1044
- link: '#3291ff'
1045
- };
1046
- var expressiveness = {
1047
- linkStyle: 'none',
1048
- linkHoverStyle: 'none',
1049
- dropdownBoxShadow: '0 0 0 1px #333',
1050
- scrollerStart: 'rgba(255, 255, 255, 1)',
1051
- scrollerEnd: 'rgba(255, 255, 255, 0)',
1052
- shadowSmall: '0 0 0 1px #333',
1053
- shadowMedium: '0 0 0 1px #333',
1054
- shadowLarge: '0 0 0 1px #333',
1055
- portalOpacity: 0.75
1056
- };
1057
- var font = defaultFont;
1058
- var breakpoints = defaultBreakpoints;
1059
- var layout = defaultLayout;
1060
- var themes = {
1061
- type: 'dark',
1062
- font: font,
1063
- layout: layout,
1064
- palette: palette,
1065
- breakpoints: breakpoints,
1066
- expressiveness: expressiveness
1067
- };
1068
-
1069
- var isObject = function isObject(target) {
1070
- return target && _typeof(target) === 'object';
1071
- };
1072
- var _deepDuplicable = function deepDuplicable(source, target) {
1073
- if (!isObject(target) || !isObject(source)) return source;
1074
- var sourceKeys = Object.keys(source);
1075
- var result = {};
1076
- for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
1077
- var key = _sourceKeys[_i];
1078
- var sourceValue = source[key];
1079
- var targetValue = target[key];
1080
- if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
1081
- result[key] = targetValue.concat(sourceValue);
1082
- } else if (isObject(sourceValue) && isObject(targetValue)) {
1083
- result[key] = _deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
1084
- } else if (targetValue) {
1085
- result[key] = targetValue;
1086
- } else {
1087
- result[key] = sourceValue;
1088
- }
1089
- }
1090
- return result;
1091
- };
1092
- var getPresets = function getPresets() {
1093
- return [themes$1, themes];
1094
- };
1095
- var getPresetStaticTheme = function getPresetStaticTheme() {
1096
- return themes$1;
1097
- };
1098
- var isAvailableThemeType = function isAvailableThemeType(type) {
1099
- if (!type) return false;
1100
- var presetThemes = getPresets();
1101
- var hasType = presetThemes.find(function (theme) {
1102
- return theme.type === type;
1103
- });
1104
- return !hasType;
1105
- };
1106
- var isPresetTheme = function isPresetTheme(themeOrType) {
1107
- if (!themeOrType) return false;
1108
- var isType = typeof themeOrType === 'string';
1109
- var type = isType ? themeOrType : themeOrType.type;
1110
- return !isAvailableThemeType(type);
1111
- };
1112
- var hasUserCustomTheme = function hasUserCustomTheme() {
1113
- var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1114
- return !!themes.find(function (item) {
1115
- return isAvailableThemeType(item.type);
1116
- });
1117
- };
1118
- var create = function create(base, custom) {
1119
- if (!isAvailableThemeType(custom.type)) {
1120
- throw new Error('Duplicate or unavailable theme type');
1121
- }
1122
- return _deepDuplicable(base, custom);
1123
- };
1124
- var createFromDark = function createFromDark(custom) {
1125
- return create(themes, custom);
1126
- };
1127
- var createFromLight = function createFromLight(custom) {
1128
- return create(themes$1, custom);
1129
- };
1130
- var Themes = {
1131
- isPresetTheme: isPresetTheme,
1132
- isAvailableThemeType: isAvailableThemeType,
1133
- hasUserCustomTheme: hasUserCustomTheme,
1134
- getPresets: getPresets,
1135
- getPresetStaticTheme: getPresetStaticTheme,
1136
- create: create,
1137
- createFromDark: createFromDark,
1138
- createFromLight: createFromLight
1139
- };
1140
-
1141
- /* "use client" */
1142
-
1143
- var defaultTheme = Themes.getPresetStaticTheme();
1144
- var ThemeContext = /*#__PURE__*/React$1.createContext(defaultTheme);
1145
- var useTheme = function useTheme() {
1146
- return React$1.useContext(ThemeContext);
1147
- };
1148
-
1149
- /* "use client" */
1150
-
1151
- var defaultAllThemesConfig = {
1152
- themes: Themes.getPresets()
1153
- };
1154
- var AllThemesContext = /*#__PURE__*/React$1.createContext(defaultAllThemesConfig);
1155
- var useAllThemes = function useAllThemes() {
1156
- return React$1.useContext(AllThemesContext);
1157
- };
1158
-
1159
- var ThemeProvider = function ThemeProvider(_ref) {
1160
- var children = _ref.children,
1161
- themeType = _ref.themeType,
1162
- _ref$themes = _ref.themes,
1163
- themes = _ref$themes === void 0 ? [] : _ref$themes;
1164
- var _React$useState = React$1.useState({
1165
- themes: Themes.getPresets()
1166
- }),
1167
- _React$useState2 = _slicedToArray(_React$useState, 2),
1168
- allThemes = _React$useState2[0],
1169
- setAllThemes = _React$useState2[1];
1170
- var currentTheme = React$1.useMemo(function () {
1171
- var theme = allThemes.themes.find(function (item) {
1172
- return item.type === themeType;
1173
- });
1174
- if (theme) return theme;
1175
- return Themes.getPresetStaticTheme();
1176
- }, [allThemes, themeType]);
1177
- React$1.useEffect(function () {
1178
- if (!(themes !== null && themes !== void 0 && themes.length)) return;
1179
- setAllThemes(function (last) {
1180
- var safeThemes = themes.filter(function (item) {
1181
- return Themes.isAvailableThemeType(item.type);
1182
- });
1183
- var nextThemes = Themes.getPresets().concat(safeThemes);
1184
- return _objectSpread2(_objectSpread2({}, last), {}, {
1185
- themes: nextThemes
1186
- });
1187
- });
1188
- }, [themes]);
1189
- return /*#__PURE__*/React$1.createElement(AllThemesContext.Provider, {
1190
- value: allThemes
1191
- }, /*#__PURE__*/React$1.createElement(ThemeContext.Provider, {
1192
- value: currentTheme
1193
- }, children));
1194
- };
1195
-
1196
- var useCurrentState = function useCurrentState(initialState) {
1197
- var _useState = React$1.useState(function () {
1198
- return typeof initialState === 'function' ? initialState() : initialState;
1199
- }),
1200
- _useState2 = _slicedToArray(_useState, 2),
1201
- state = _useState2[0],
1202
- setState = _useState2[1];
1203
- var ref = React$1.useRef(initialState);
1204
- React$1.useEffect(function () {
1205
- ref.current = state;
1206
- }, [state]);
1207
- var setValue = function setValue(val) {
1208
- var result = typeof val === 'function' ? val(ref.current) : val;
1209
- ref.current = result;
1210
- setState(result);
1211
- };
1212
- return [state, setValue, ref];
1213
- };
1214
-
1215
- function getDefaultExportFromCjs (x) {
1216
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1217
- }
1218
-
1219
- var index = {};
1220
-
1221
- var hasRequiredIndex;
1222
-
1223
- function requireIndex () {
1224
- if (hasRequiredIndex) return index;
1225
- hasRequiredIndex = 1;
1226
- var React$1$1 = React$1;
1227
-
1228
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
1229
-
1230
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1$1);
1231
-
1232
- /*
1233
- Based on Glamor's sheet
1234
- https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
1235
- */ function _defineProperties(target, props) {
1236
- for(var i = 0; i < props.length; i++){
1237
- var descriptor = props[i];
1238
- descriptor.enumerable = descriptor.enumerable || false;
1239
- descriptor.configurable = true;
1240
- if ("value" in descriptor) descriptor.writable = true;
1241
- Object.defineProperty(target, descriptor.key, descriptor);
1242
- }
1243
- }
1244
- function _createClass(Constructor, protoProps, staticProps) {
1245
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1246
- return Constructor;
1247
- }
1248
- var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
1249
- var isString = function(o) {
1250
- return Object.prototype.toString.call(o) === "[object String]";
1251
- };
1252
- var StyleSheet = /*#__PURE__*/ function() {
1253
- function StyleSheet(param) {
1254
- var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
1255
- invariant$1(isString(name), "`name` must be a string");
1256
- this._name = name;
1257
- this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
1258
- invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
1259
- this._optimizeForSpeed = optimizeForSpeed;
1260
- this._serverSheet = undefined;
1261
- this._tags = [];
1262
- this._injected = false;
1263
- this._rulesCount = 0;
1264
- var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
1265
- this._nonce = node ? node.getAttribute("content") : null;
1266
- }
1267
- var _proto = StyleSheet.prototype;
1268
- _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
1269
- invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
1270
- invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
1271
- this.flush();
1272
- this._optimizeForSpeed = bool;
1273
- this.inject();
1274
- };
1275
- _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
1276
- return this._optimizeForSpeed;
1277
- };
1278
- _proto.inject = function inject() {
1279
- var _this = this;
1280
- invariant$1(!this._injected, "sheet already injected");
1281
- this._injected = true;
1282
- if (typeof window !== "undefined" && this._optimizeForSpeed) {
1283
- this._tags[0] = this.makeStyleTag(this._name);
1284
- this._optimizeForSpeed = "insertRule" in this.getSheet();
1285
- if (!this._optimizeForSpeed) {
1286
- if (!isProd) {
1287
- console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
1288
- }
1289
- this.flush();
1290
- this._injected = true;
1291
- }
1292
- return;
1293
- }
1294
- this._serverSheet = {
1295
- cssRules: [],
1296
- insertRule: function(rule, index) {
1297
- if (typeof index === "number") {
1298
- _this._serverSheet.cssRules[index] = {
1299
- cssText: rule
1300
- };
1301
- } else {
1302
- _this._serverSheet.cssRules.push({
1303
- cssText: rule
1304
- });
1305
- }
1306
- return index;
1307
- },
1308
- deleteRule: function(index) {
1309
- _this._serverSheet.cssRules[index] = null;
1310
- }
1311
- };
1312
- };
1313
- _proto.getSheetForTag = function getSheetForTag(tag) {
1314
- if (tag.sheet) {
1315
- return tag.sheet;
1316
- }
1317
- // this weirdness brought to you by firefox
1318
- for(var i = 0; i < document.styleSheets.length; i++){
1319
- if (document.styleSheets[i].ownerNode === tag) {
1320
- return document.styleSheets[i];
1321
- }
1322
- }
1323
- };
1324
- _proto.getSheet = function getSheet() {
1325
- return this.getSheetForTag(this._tags[this._tags.length - 1]);
1326
- };
1327
- _proto.insertRule = function insertRule(rule, index) {
1328
- invariant$1(isString(rule), "`insertRule` accepts only strings");
1329
- if (typeof window === "undefined") {
1330
- if (typeof index !== "number") {
1331
- index = this._serverSheet.cssRules.length;
1332
- }
1333
- this._serverSheet.insertRule(rule, index);
1334
- return this._rulesCount++;
1335
- }
1336
- if (this._optimizeForSpeed) {
1337
- var sheet = this.getSheet();
1338
- if (typeof index !== "number") {
1339
- index = sheet.cssRules.length;
1340
- }
1341
- // this weirdness for perf, and chrome's weird bug
1342
- // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
1343
- try {
1344
- sheet.insertRule(rule, index);
1345
- } catch (error) {
1346
- if (!isProd) {
1347
- console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
1348
- }
1349
- return -1;
1350
- }
1351
- } else {
1352
- var insertionPoint = this._tags[index];
1353
- this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
1354
- }
1355
- return this._rulesCount++;
1356
- };
1357
- _proto.replaceRule = function replaceRule(index, rule) {
1358
- if (this._optimizeForSpeed || typeof window === "undefined") {
1359
- var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
1360
- if (!rule.trim()) {
1361
- rule = this._deletedRulePlaceholder;
1362
- }
1363
- if (!sheet.cssRules[index]) {
1364
- // @TBD Should we throw an error?
1365
- return index;
1366
- }
1367
- sheet.deleteRule(index);
1368
- try {
1369
- sheet.insertRule(rule, index);
1370
- } catch (error) {
1371
- if (!isProd) {
1372
- console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
1373
- }
1374
- // In order to preserve the indices we insert a deleteRulePlaceholder
1375
- sheet.insertRule(this._deletedRulePlaceholder, index);
1376
- }
1377
- } else {
1378
- var tag = this._tags[index];
1379
- invariant$1(tag, "old rule at index `" + index + "` not found");
1380
- tag.textContent = rule;
1381
- }
1382
- return index;
1383
- };
1384
- _proto.deleteRule = function deleteRule(index) {
1385
- if (typeof window === "undefined") {
1386
- this._serverSheet.deleteRule(index);
1387
- return;
1388
- }
1389
- if (this._optimizeForSpeed) {
1390
- this.replaceRule(index, "");
1391
- } else {
1392
- var tag = this._tags[index];
1393
- invariant$1(tag, "rule at index `" + index + "` not found");
1394
- tag.parentNode.removeChild(tag);
1395
- this._tags[index] = null;
1396
- }
1397
- };
1398
- _proto.flush = function flush() {
1399
- this._injected = false;
1400
- this._rulesCount = 0;
1401
- if (typeof window !== "undefined") {
1402
- this._tags.forEach(function(tag) {
1403
- return tag && tag.parentNode.removeChild(tag);
1404
- });
1405
- this._tags = [];
1406
- } else {
1407
- // simpler on server
1408
- this._serverSheet.cssRules = [];
1409
- }
1410
- };
1411
- _proto.cssRules = function cssRules() {
1412
- var _this = this;
1413
- if (typeof window === "undefined") {
1414
- return this._serverSheet.cssRules;
1415
- }
1416
- return this._tags.reduce(function(rules, tag) {
1417
- if (tag) {
1418
- rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
1419
- return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
1420
- }));
1421
- } else {
1422
- rules.push(null);
1423
- }
1424
- return rules;
1425
- }, []);
1426
- };
1427
- _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
1428
- if (cssString) {
1429
- invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
1430
- }
1431
- var tag = document.createElement("style");
1432
- if (this._nonce) tag.setAttribute("nonce", this._nonce);
1433
- tag.type = "text/css";
1434
- tag.setAttribute("data-" + name, "");
1435
- if (cssString) {
1436
- tag.appendChild(document.createTextNode(cssString));
1437
- }
1438
- var head = document.head || document.getElementsByTagName("head")[0];
1439
- if (relativeToTag) {
1440
- head.insertBefore(tag, relativeToTag);
1441
- } else {
1442
- head.appendChild(tag);
1443
- }
1444
- return tag;
1445
- };
1446
- _createClass(StyleSheet, [
1447
- {
1448
- key: "length",
1449
- get: function get() {
1450
- return this._rulesCount;
1451
- }
1452
- }
1453
- ]);
1454
- return StyleSheet;
1455
- }();
1456
- function invariant$1(condition, message) {
1457
- if (!condition) {
1458
- throw new Error("StyleSheet: " + message + ".");
1459
- }
1460
- }
1461
-
1462
- function hash(str) {
1463
- var _$hash = 5381, i = str.length;
1464
- while(i){
1465
- _$hash = _$hash * 33 ^ str.charCodeAt(--i);
1466
- }
1467
- /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
1468
- * integers. Since we want the results to be always positive, convert the
1469
- * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
1470
- }
1471
- var stringHash = hash;
1472
-
1473
- var sanitize = function(rule) {
1474
- return rule.replace(/\/style/gi, "\\/style");
1475
- };
1476
- var cache = {};
1477
- /**
1478
- * computeId
1479
- *
1480
- * Compute and memoize a jsx id from a basedId and optionally props.
1481
- */ function computeId(baseId, props) {
1482
- if (!props) {
1483
- return "jsx-" + baseId;
1484
- }
1485
- var propsToString = String(props);
1486
- var key = baseId + propsToString;
1487
- if (!cache[key]) {
1488
- cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
1489
- }
1490
- return cache[key];
1491
- }
1492
- /**
1493
- * computeSelector
1494
- *
1495
- * Compute and memoize dynamic selectors.
1496
- */ function computeSelector(id, css) {
1497
- var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
1498
- // Sanitize SSR-ed CSS.
1499
- // Client side code doesn't need to be sanitized since we use
1500
- // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
1501
- if (typeof window === "undefined") {
1502
- css = sanitize(css);
1503
- }
1504
- var idcss = id + css;
1505
- if (!cache[idcss]) {
1506
- cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
1507
- }
1508
- return cache[idcss];
1509
- }
1510
-
1511
- function mapRulesToStyle(cssRules, options) {
1512
- if (options === void 0) options = {};
1513
- return cssRules.map(function(args) {
1514
- var id = args[0];
1515
- var css = args[1];
1516
- return /*#__PURE__*/ React__default["default"].createElement("style", {
1517
- id: "__" + id,
1518
- // Avoid warnings upon render with a key
1519
- key: "__" + id,
1520
- nonce: options.nonce ? options.nonce : undefined,
1521
- dangerouslySetInnerHTML: {
1522
- __html: css
1523
- }
1524
- });
1525
- });
1526
- }
1527
- var StyleSheetRegistry = /*#__PURE__*/ function() {
1528
- function StyleSheetRegistry(param) {
1529
- var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
1530
- this._sheet = styleSheet || new StyleSheet({
1531
- name: "styled-jsx",
1532
- optimizeForSpeed: optimizeForSpeed
1533
- });
1534
- this._sheet.inject();
1535
- if (styleSheet && typeof optimizeForSpeed === "boolean") {
1536
- this._sheet.setOptimizeForSpeed(optimizeForSpeed);
1537
- this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
1538
- }
1539
- this._fromServer = undefined;
1540
- this._indices = {};
1541
- this._instancesCounts = {};
1542
- }
1543
- var _proto = StyleSheetRegistry.prototype;
1544
- _proto.add = function add(props) {
1545
- var _this = this;
1546
- if (undefined === this._optimizeForSpeed) {
1547
- this._optimizeForSpeed = Array.isArray(props.children);
1548
- this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
1549
- this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
1550
- }
1551
- if (typeof window !== "undefined" && !this._fromServer) {
1552
- this._fromServer = this.selectFromServer();
1553
- this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
1554
- acc[tagName] = 0;
1555
- return acc;
1556
- }, {});
1557
- }
1558
- var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
1559
- // Deduping: just increase the instances count.
1560
- if (styleId in this._instancesCounts) {
1561
- this._instancesCounts[styleId] += 1;
1562
- return;
1563
- }
1564
- var indices = rules.map(function(rule) {
1565
- return _this._sheet.insertRule(rule);
1566
- })// Filter out invalid rules
1567
- .filter(function(index) {
1568
- return index !== -1;
1569
- });
1570
- this._indices[styleId] = indices;
1571
- this._instancesCounts[styleId] = 1;
1572
- };
1573
- _proto.remove = function remove(props) {
1574
- var _this = this;
1575
- var styleId = this.getIdAndRules(props).styleId;
1576
- invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
1577
- this._instancesCounts[styleId] -= 1;
1578
- if (this._instancesCounts[styleId] < 1) {
1579
- var tagFromServer = this._fromServer && this._fromServer[styleId];
1580
- if (tagFromServer) {
1581
- tagFromServer.parentNode.removeChild(tagFromServer);
1582
- delete this._fromServer[styleId];
1583
- } else {
1584
- this._indices[styleId].forEach(function(index) {
1585
- return _this._sheet.deleteRule(index);
1586
- });
1587
- delete this._indices[styleId];
1588
- }
1589
- delete this._instancesCounts[styleId];
1590
- }
1591
- };
1592
- _proto.update = function update(props, nextProps) {
1593
- this.add(nextProps);
1594
- this.remove(props);
1595
- };
1596
- _proto.flush = function flush() {
1597
- this._sheet.flush();
1598
- this._sheet.inject();
1599
- this._fromServer = undefined;
1600
- this._indices = {};
1601
- this._instancesCounts = {};
1602
- };
1603
- _proto.cssRules = function cssRules() {
1604
- var _this = this;
1605
- var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
1606
- return [
1607
- styleId,
1608
- _this._fromServer[styleId]
1609
- ];
1610
- }) : [];
1611
- var cssRules = this._sheet.cssRules();
1612
- return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
1613
- return [
1614
- styleId,
1615
- _this._indices[styleId].map(function(index) {
1616
- return cssRules[index].cssText;
1617
- }).join(_this._optimizeForSpeed ? "" : "\n")
1618
- ];
1619
- })// filter out empty rules
1620
- .filter(function(rule) {
1621
- return Boolean(rule[1]);
1622
- }));
1623
- };
1624
- _proto.styles = function styles(options) {
1625
- return mapRulesToStyle(this.cssRules(), options);
1626
- };
1627
- _proto.getIdAndRules = function getIdAndRules(props) {
1628
- var css = props.children, dynamic = props.dynamic, id = props.id;
1629
- if (dynamic) {
1630
- var styleId = computeId(id, dynamic);
1631
- return {
1632
- styleId: styleId,
1633
- rules: Array.isArray(css) ? css.map(function(rule) {
1634
- return computeSelector(styleId, rule);
1635
- }) : [
1636
- computeSelector(styleId, css)
1637
- ]
1638
- };
1639
- }
1640
- return {
1641
- styleId: computeId(id),
1642
- rules: Array.isArray(css) ? css : [
1643
- css
1644
- ]
1645
- };
1646
- };
1647
- /**
1648
- * selectFromServer
1649
- *
1650
- * Collects style tags from the document with id __jsx-XXX
1651
- */ _proto.selectFromServer = function selectFromServer() {
1652
- var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
1653
- return elements.reduce(function(acc, element) {
1654
- var id = element.id.slice(2);
1655
- acc[id] = element;
1656
- return acc;
1657
- }, {});
1658
- };
1659
- return StyleSheetRegistry;
1660
- }();
1661
- function invariant(condition, message) {
1662
- if (!condition) {
1663
- throw new Error("StyleSheetRegistry: " + message + ".");
1664
- }
1665
- }
1666
- var StyleSheetContext = /*#__PURE__*/ React$1$1.createContext(null);
1667
- StyleSheetContext.displayName = "StyleSheetContext";
1668
- function createStyleRegistry() {
1669
- return new StyleSheetRegistry();
1670
- }
1671
- function StyleRegistry(param) {
1672
- var configuredRegistry = param.registry, children = param.children;
1673
- var rootRegistry = React$1$1.useContext(StyleSheetContext);
1674
- var ref = React$1$1.useState(function() {
1675
- return rootRegistry || configuredRegistry || createStyleRegistry();
1676
- }), registry = ref[0];
1677
- return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
1678
- value: registry
1679
- }, children);
1680
- }
1681
- function useStyleRegistry() {
1682
- return React$1$1.useContext(StyleSheetContext);
1683
- }
1684
-
1685
- // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
1686
- // https://github.com/reactwg/react-18/discussions/110
1687
- var useInsertionEffect = React__default["default"].useInsertionEffect || React$1$1.useLayoutEffect;
1688
- var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
1689
- function JSXStyle(props) {
1690
- var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
1691
- var insertionEffectCalled = React$1$1.useRef(false);
1692
- // `registry` might not exist while server-side rendering
1693
- if (!registry) {
1694
- return null;
1695
- }
1696
- if (typeof window === "undefined") {
1697
- registry.add(props);
1698
- return null;
1699
- }
1700
- useInsertionEffect(function() {
1701
- // ReactDOM removes all DOM during hydration in certain cases
1702
- if (!document.head) {
1703
- return;
1704
- }
1705
- registry.add(props);
1706
- insertionEffectCalled.current = true;
1707
- return function() {
1708
- insertionEffectCalled.current = false;
1709
- registry.remove(props);
1710
- };
1711
- }, [
1712
- props.id,
1713
- String(props.dynamic)
1714
- ]);
1715
- React$1$1.useLayoutEffect(function() {
1716
- if (!document.head || insertionEffectCalled.current) {
1717
- return;
1718
- }
1719
- registry.add(props);
1720
- return function() {
1721
- registry.remove(props);
1722
- };
1723
- // props.children can be string[], will be striped since id is identical
1724
- }, [
1725
- props.id,
1726
- String(props.dynamic)
1727
- ]);
1728
- return null;
1729
- }
1730
- JSXStyle.dynamic = function(info) {
1731
- return info.map(function(tagInfo) {
1732
- var baseId = tagInfo[0];
1733
- var props = tagInfo[1];
1734
- return computeId(baseId, props);
1735
- }).join(" ");
1736
- };
1737
-
1738
- index.StyleRegistry = StyleRegistry;
1739
- index.createStyleRegistry = createStyleRegistry;
1740
- index.style = JSXStyle;
1741
- index.useStyleRegistry = useStyleRegistry;
1742
- return index;
1743
- }
1744
-
1745
- var style;
1746
- var hasRequiredStyle;
1747
-
1748
- function requireStyle () {
1749
- if (hasRequiredStyle) return style;
1750
- hasRequiredStyle = 1;
1751
- style = requireIndex().style;
1752
- return style;
1753
- }
1754
-
1755
- var styleExports = requireStyle();
1756
- var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
1757
-
1758
- /* "use client" */
1759
-
1760
- var getId = function getId() {
1761
- return Math.random().toString(32).slice(2, 10);
1762
- };
1763
- var isBrowser = function isBrowser() {
1764
- return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
1765
- };
1766
-
1767
- var useSSR = function useSSR() {
1768
- var _useState = React$1.useState(false),
1769
- _useState2 = _slicedToArray(_useState, 2),
1770
- browser = _useState2[0],
1771
- setBrowser = _useState2[1];
1772
- React$1.useEffect(function () {
1773
- setBrowser(isBrowser());
1774
- }, []);
1775
- return {
1776
- isBrowser: browser,
1777
- isServer: !browser
1778
- };
1779
- };
1780
-
1781
- var createElement = function createElement(id) {
1782
- var el = document.createElement('div');
1783
- el.setAttribute('id', id);
1784
- return el;
1785
- };
1786
- var usePortal = function usePortal() {
1787
- var selectId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getId();
1788
- var getContainer = arguments.length > 1 ? arguments[1] : undefined;
1789
- var id = "helpdice-ui-".concat(selectId);
1790
- var _useSSR = useSSR(),
1791
- isBrowser = _useSSR.isBrowser;
1792
- var _useState = React$1.useState(isBrowser ? createElement(id) : null),
1793
- _useState2 = _slicedToArray(_useState, 2),
1794
- elSnapshot = _useState2[0],
1795
- setElSnapshot = _useState2[1];
1796
- React$1.useEffect(function () {
1797
- var customContainer = getContainer ? getContainer() : null;
1798
- var parentElement = customContainer || document.body;
1799
- var hasElement = parentElement.querySelector("#".concat(id));
1800
- var el = hasElement || createElement(id);
1801
- if (!hasElement) {
1802
- parentElement.appendChild(el);
1803
- }
1804
- setElSnapshot(el);
1805
- }, []);
1806
- return elSnapshot;
1807
- };
1808
-
1809
- var _excluded$2 = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
1810
- var CssTransition = function CssTransition(_ref) {
1811
- var children = _ref.children,
1812
- _ref$className = _ref.className,
1813
- className = _ref$className === void 0 ? '' : _ref$className,
1814
- _ref$visible = _ref.visible,
1815
- visible = _ref$visible === void 0 ? false : _ref$visible,
1816
- _ref$enterTime = _ref.enterTime,
1817
- enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
1818
- _ref$leaveTime = _ref.leaveTime,
1819
- leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
1820
- _ref$clearTime = _ref.clearTime,
1821
- clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
1822
- _ref$name = _ref.name,
1823
- name = _ref$name === void 0 ? 'transition' : _ref$name,
1824
- props = _objectWithoutProperties(_ref, _excluded$2);
1825
- var _useState = React$1.useState(''),
1826
- _useState2 = _slicedToArray(_useState, 2),
1827
- classes = _useState2[0],
1828
- setClasses = _useState2[1];
1829
- var _useState3 = React$1.useState(visible),
1830
- _useState4 = _slicedToArray(_useState3, 2),
1831
- renderable = _useState4[0],
1832
- setRenderable = _useState4[1];
1833
- React$1.useEffect(function () {
1834
- var statusClassName = visible ? 'enter' : 'leave';
1835
- var time = visible ? enterTime : leaveTime;
1836
- if (visible && !renderable) {
1837
- setRenderable(true);
1838
- }
1839
- setClasses("".concat(name, "-").concat(statusClassName));
1840
-
1841
- // set class to active
1842
- var timer = setTimeout(function () {
1843
- setClasses("".concat(name, "-").concat(statusClassName, " ").concat(name, "-").concat(statusClassName, "-active"));
1844
- clearTimeout(timer);
1845
- }, time);
1846
-
1847
- // remove classess when animation over
1848
- var clearClassesTimer = setTimeout(function () {
1849
- if (!visible) {
1850
- setClasses('');
1851
- setRenderable(false);
1852
- }
1853
- clearTimeout(clearClassesTimer);
1854
- }, time + clearTime);
1855
- return function () {
1856
- clearTimeout(timer);
1857
- clearTimeout(clearClassesTimer);
1858
- };
1859
- }, [visible, renderable]);
1860
- if (! /*#__PURE__*/React$1.isValidElement(children) || !renderable) return null;
1861
- var propsTransition = _objectSpread2(_objectSpread2({}, props), {}, {
1862
- className: "".concat(children.props.className, " ").concat(className, " ").concat(classes)
1863
- });
1864
- return /*#__PURE__*/React$1.cloneElement(children, propsTransition);
1865
- };
1866
- CssTransition.displayName = 'CssTransition';
1867
-
1868
- var tuple = function tuple() {
1869
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1870
- args[_key] = arguments[_key];
1871
- }
1872
- return args;
1873
- };
1874
- tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
1875
- tuple('default', 'secondary', 'success', 'warning', 'error');
1876
- tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
1877
- tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
1878
- tuple('default', 'silent', 'prevent');
1879
- tuple('hover', 'click');
1880
- tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
1881
- tuple('start', 'center', 'end', 'left', 'right');
1882
-
1883
- var makeToastActions = function makeToastActions(actions, cancelHandle) {
1884
- var handler = function handler(event, userHandler) {
1885
- userHandler && userHandler(event, cancelHandle);
1886
- };
1887
- if (!actions || !actions.length) return null;
1888
- return actions.map(function (action, index) {
1889
- return /*#__PURE__*/React$1.createElement("button", {
1890
- color: action.passive ? 'default' : 'secondary',
1891
- key: "action-".concat(index),
1892
- onClick: function onClick(event) {
1893
- return handler(event, action.handler);
1894
- }
1895
- }, action.name);
1896
- });
1897
- };
1898
- var getColors = function getColors(palette, type) {
1899
- var colors = {
1900
- "default": palette.background,
1901
- secondary: palette.secondary,
1902
- success: palette.success,
1903
- warning: palette.warning,
1904
- error: palette.error
1905
- };
1906
- var isDefault = !type || type === 'default';
1907
- if (isDefault) return {
1908
- bgColor: colors["default"],
1909
- color: palette.foreground
1910
- };
1911
- /**
1912
- * Prevent main color change in special types.
1913
- * The color will only follow the theme when it is in the default type.
1914
- */
1915
- return {
1916
- bgColor: colors[type],
1917
- color: 'white'
1918
- };
1919
- };
1920
- tuple('topLeft', 'topRight', 'bottomLeft', 'bottomRight');
1921
- var isTopPlacement = function isTopPlacement(placement) {
1922
- return "".concat(placement).toLowerCase().startsWith('top');
1923
- };
1924
- var isLeftPlacement = function isLeftPlacement(placement) {
1925
- return "".concat(placement).toLowerCase().endsWith('left');
1926
- };
1927
- var getTranslateByPlacement = function getTranslateByPlacement(placement) {
1928
- var translateInByPlacement = {
1929
- topLeft: 'translate(-60px, -60px)',
1930
- topRight: 'translate(60px, -60px)',
1931
- bottomLeft: 'translate(-60px, 60px)',
1932
- bottomRight: 'translate(60px, 60px)'
1933
- };
1934
- var translateOutByPlacement = {
1935
- topLeft: 'translate(-50px, 15px) scale(0.85)',
1936
- topRight: 'translate(50px, 15px) scale(0.85)',
1937
- bottomLeft: 'translate(-50px, -15px) scale(0.85)',
1938
- bottomRight: 'translate(50px, -15px) scale(0.85)'
1939
- };
1940
- return {
1941
- enter: translateInByPlacement[placement],
1942
- leave: translateOutByPlacement[placement]
1943
- };
1944
- };
1945
-
1946
- var ToastItem = /*#__PURE__*/React$1.memo(function (_ref) {
1947
- var toast = _ref.toast,
1948
- layout = _ref.layout;
1949
- var theme = useTheme();
1950
- var _useMemo = React$1.useMemo(function () {
1951
- return getColors(theme.palette, toast.type);
1952
- }, [theme.palette, toast.type]),
1953
- color = _useMemo.color,
1954
- bgColor = _useMemo.bgColor;
1955
- var isReactNode = typeof toast.text !== 'string';
1956
- var padding = layout.padding,
1957
- margin = layout.margin,
1958
- maxHeight = layout.maxHeight,
1959
- maxWidth = layout.maxWidth,
1960
- width = layout.width,
1961
- placement = layout.placement;
1962
- var _useMemo2 = React$1.useMemo(function () {
1963
- return getTranslateByPlacement(placement);
1964
- }, [placement]),
1965
- enter = _useMemo2.enter,
1966
- leave = _useMemo2.leave;
1967
- return /*#__PURE__*/React$1.createElement(CssTransition, {
1968
- name: "toast",
1969
- visible: toast.visible,
1970
- clearTime: 350
1971
- }, /*#__PURE__*/React$1.createElement("div", {
1972
- key: toast.id,
1973
- className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "toast"
1974
- }, isReactNode ? toast.text : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1975
- className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "message"
1976
- }, toast.text), /*#__PURE__*/React$1.createElement("div", {
1977
- className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "action"
1978
- }, makeToastActions(toast.actions, toast.cancel))), /*#__PURE__*/React$1.createElement(_JSXStyle, {
1979
- id: "1407001838",
1980
- dynamic: [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]
1981
- }, ".toast.__jsx-style-dynamic-selector{width:".concat(width, ";max-width:").concat(maxWidth, ";max-height:").concat(maxHeight, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.foreground, ";background-color:").concat(bgColor, ";color:").concat(color, ";border:0;border-radius:").concat(theme.layout.radius, ";opacity:1;box-shadow:").concat(theme.expressiveness.shadowSmall, ";-webkit-transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);overflow:hidden;}.message.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;font-size:0.875em;display:-webkit-box;word-break:break-all;padding-right:").concat(theme.layout.gapHalf, ";overflow:hidden;max-height:100%;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.1rem;}.toast-enter.__jsx-style-dynamic-selector{opacity:0;height:0;padding:0;margin:0;-webkit-transform:").concat(enter, ";-ms-transform:").concat(enter, ";transform:").concat(enter, ";}.toast-enter-active.__jsx-style-dynamic-selector{opacity:1;height:auto;margin:").concat(margin, ";padding:").concat(padding, ";-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);}.toast-leave.__jsx-style-dynamic-selector{opacity:1;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);height:auto;margin:").concat(margin, ";padding:").concat(padding, ";}.toast-leave-active.__jsx-style-dynamic-selector{opacity:0;-webkit-transform:").concat(leave, ";-ms-transform:").concat(leave, ";transform:").concat(leave, ";}"))));
1982
- });
1983
-
1984
- /* "use client" */
1985
-
1986
- var classObjectToString = function classObjectToString(className) {
1987
- var keys = Object.keys(className);
1988
- var len = keys.length;
1989
- var str = '';
1990
- for (var index = 0; index < len; index++) {
1991
- var key = keys[index];
1992
- var val = className[keys[index]];
1993
- if (!val) continue;
1994
- str = str ? "".concat(str, " ").concat(String(key)) : String(key);
1995
- }
1996
- return str;
1997
- };
1998
- var isObjectClassName = function isObjectClassName(value) {
1999
- return _typeof(value) === 'object' && !Array.isArray(value);
2000
- };
2001
- var useClasses = function useClasses() {
2002
- var len = arguments.length;
2003
- var classes = '';
2004
- if (len === 0) return classes;
2005
- for (var index = 0; index < len; index++) {
2006
- var val = index < 0 || arguments.length <= index ? undefined : arguments[index];
2007
- if (!val) continue;
2008
- if (isObjectClassName(val)) {
2009
- classes += " ".concat(classObjectToString(val));
2010
- } else {
2011
- classes += " ".concat(String(val).trim());
2012
- }
2013
- }
2014
- return classes.trim();
2015
- };
2016
-
2017
- var ToastContainer = function ToastContainer() {
2018
- var theme = useTheme();
2019
- var portal = usePortal('toast');
2020
- var _useCurrentState = useCurrentState(false),
2021
- _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2022
- setHovering = _useCurrentState2[1],
2023
- hoveringRef = _useCurrentState2[2];
2024
- var _useHUIContext = useHUIContext(),
2025
- toasts = _useHUIContext.toasts,
2026
- updateToasts = _useHUIContext.updateToasts,
2027
- toastLayout = _useHUIContext.toastLayout,
2028
- lastUpdateToastId = _useHUIContext.lastUpdateToastId;
2029
- var memoizedLayout = React$1.useMemo(function () {
2030
- return toastLayout;
2031
- }, [toastLayout]);
2032
- var toastElements = React$1.useMemo(function () {
2033
- return toasts.map(function (toast) {
2034
- return /*#__PURE__*/React$1.createElement(ToastItem, {
2035
- toast: toast,
2036
- layout: memoizedLayout,
2037
- key: toast._internalIdent
2038
- });
2039
- });
2040
- }, [toasts, memoizedLayout]);
2041
- var classNames = React$1.useMemo(function () {
2042
- return useClasses('toasts', {
2043
- top: isTopPlacement(toastLayout.placement),
2044
- left: isLeftPlacement(toastLayout.placement)
2045
- });
2046
- }, [memoizedLayout]);
2047
- var hoverHandler = function hoverHandler(isHovering) {
2048
- setHovering(isHovering);
2049
- if (isHovering) {
2050
- return updateToasts(function (last) {
2051
- return last.map(function (toast) {
2052
- if (!toast.visible) return toast;
2053
- toast._timeout && window.clearTimeout(toast._timeout);
2054
- return _objectSpread2(_objectSpread2({}, toast), {}, {
2055
- timeout: null
2056
- });
2057
- });
2058
- });
2059
- }
2060
- updateToasts(function (last) {
2061
- return last.map(function (toast, index) {
2062
- if (!toast.visible) return toast;
2063
- toast._timeout && window.clearTimeout(toast._timeout);
2064
- return _objectSpread2(_objectSpread2({}, toast), {}, {
2065
- _timeout: function () {
2066
- var timer = window.setTimeout(function () {
2067
- toast.cancel();
2068
- window.clearTimeout(timer);
2069
- }, toast.delay + index * 100);
2070
- return timer;
2071
- }()
2072
- });
2073
- });
2074
- });
2075
- };
2076
- React$1.useEffect(function () {
2077
- var index = toasts.findIndex(function (r) {
2078
- return r._internalIdent === lastUpdateToastId;
2079
- });
2080
- var toast = toasts[index];
2081
- if (!toast || toast.visible || !hoveringRef.current) return;
2082
- var hasVisible = toasts.find(function (r, i) {
2083
- return i < index && r.visible;
2084
- });
2085
- if (hasVisible || !hoveringRef.current) return;
2086
- hoverHandler(false);
2087
- }, [toasts, lastUpdateToastId]);
2088
- React$1.useEffect(function () {
2089
- var timeout = null;
2090
- var timer = window.setInterval(function () {
2091
- if (toasts.length === 0) return;
2092
- timeout = window.setTimeout(function () {
2093
- var allInvisible = !toasts.find(function (r) {
2094
- return r.visible;
2095
- });
2096
- allInvisible && updateToasts(function () {
2097
- return [];
2098
- });
2099
- timeout && clearTimeout(timeout);
2100
- }, 350);
2101
- }, 5000);
2102
- return function () {
2103
- timer && clearInterval(timer);
2104
- timeout && clearTimeout(timeout);
2105
- };
2106
- }, [toasts]);
2107
- if (!portal) return null;
2108
- if (!toasts || toasts.length === 0) return null;
2109
- return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React$1.createElement("div", {
2110
- onMouseEnter: function onMouseEnter() {
2111
- return hoverHandler(true);
2112
- },
2113
- onMouseLeave: function onMouseLeave() {
2114
- return hoverHandler(false);
2115
- },
2116
- className: _JSXStyle.dynamic([["622610754", [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]]]) + " " + (classNames || "")
2117
- }, toastElements, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2118
- id: "622610754",
2119
- dynamic: [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]
2120
- }, ".toasts.__jsx-style-dynamic-selector{position:fixed;width:auto;max-width:100%;right:".concat(theme.layout.gap, ";bottom:").concat(theme.layout.gap, ";z-index:2000;-webkit-transition:all 400ms ease;transition:all 400ms ease;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.top.__jsx-style-dynamic-selector{bottom:unset;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;top:").concat(theme.layout.gap, ";}.left.__jsx-style-dynamic-selector{right:unset;left:").concat(theme.layout.gap, ";}"))), portal);
2121
- };
2122
-
2123
- var HuiProvider = function HuiProvider(_ref) {
2124
- var themes = _ref.themes,
2125
- themeType = _ref.themeType,
2126
- children = _ref.children;
2127
- var _React$useState = React$1.useState(''),
2128
- _React$useState2 = _slicedToArray(_React$useState, 2),
2129
- lastUpdateToastId = _React$useState2[0],
2130
- setLastUpdateToastId = _React$useState2[1];
2131
- var _useCurrentState = useCurrentState([]),
2132
- _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2133
- toasts = _useCurrentState2[0],
2134
- setToasts = _useCurrentState2[1],
2135
- toastsRef = _useCurrentState2[2];
2136
- var _useCurrentState3 = useCurrentState(defaultToastLayout),
2137
- _useCurrentState4 = _slicedToArray(_useCurrentState3, 3),
2138
- toastLayout = _useCurrentState4[0],
2139
- setToastLayout = _useCurrentState4[1],
2140
- toastLayoutRef = _useCurrentState4[2];
2141
- var updateToasts = function updateToasts(fn) {
2142
- var nextToasts = fn(toastsRef.current);
2143
- setToasts(nextToasts);
2144
- };
2145
- var updateToastLayout = function updateToastLayout(fn) {
2146
- var nextLayout = fn(toastLayoutRef.current);
2147
- setToastLayout(nextLayout);
2148
- };
2149
- var updateLastToastId = function updateLastToastId(fn) {
2150
- setLastUpdateToastId(fn());
2151
- };
2152
- var initialValue = React$1.useMemo(function () {
2153
- return {
2154
- toasts: toasts,
2155
- toastLayout: toastLayout,
2156
- updateToasts: updateToasts,
2157
- lastUpdateToastId: lastUpdateToastId,
2158
- updateToastLayout: updateToastLayout,
2159
- updateLastToastId: updateLastToastId
2160
- };
2161
- }, [toasts, toastLayout, lastUpdateToastId]);
2162
- return /*#__PURE__*/React$1.createElement(HUIContent.Provider, {
2163
- value: initialValue
2164
- }, /*#__PURE__*/React$1.createElement(ThemeProvider, {
2165
- themes: themes,
2166
- themeType: themeType
2167
- }, children, /*#__PURE__*/React$1.createElement(ToastContainer, null)));
2168
- };
2169
-
2170
- // import flush from 'styled-jsx'
2171
-
2172
- // export type FlushToReact = <T>(opts?: { nonce?: string }) => Array<ReactElement<T>>
2173
-
2174
- // export type FlushToHTML = (opts?: { nonce?: string }) => string
2175
-
2176
- var CssBaseline = function CssBaseline(_ref) {
2177
- var children = _ref.children;
2178
- var theme = useTheme();
2179
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2180
- id: "3647548829",
2181
- dynamic: [theme.palette.background, theme.palette.foreground, theme.palette.background, theme.font.sans, theme.font.sans, theme.palette.link, theme.expressiveness.linkStyle, theme.expressiveness.linkHoverStyle, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gap, theme.palette.foreground, theme.palette.code, theme.font.mono, theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.palette.accents_2, theme.layout.radius, theme.font.mono, theme.palette.foreground, theme.palette.accents_2, theme.palette.accents_1, theme.layout.gap, theme.layout.gap, theme.palette.accents_5, theme.palette.accents_1, theme.layout.radius, theme.palette.border, theme.palette.selection, theme.palette.foreground]
2182
- }, "html,body{background-color:".concat(theme.palette.background, ";color:").concat(theme.palette.foreground, ";}html{font-size:16px;--helpdice-icons-background:").concat(theme.palette.background, ";}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5;margin:0;padding:0;min-height:100%;position:relative;overflow-x:hidden;font-family:").concat(theme.font.sans, ";}#__next{overflow-x:hidden;}*,*:before,*:after{box-sizing:inherit;text-rendering:geometricPrecision;-webkit-tap-highlight-color:transparent;}p,small{font-weight:400;color:inherit;-webkit-letter-spacing:-0.005625em;-moz-letter-spacing:-0.005625em;-ms-letter-spacing:-0.005625em;letter-spacing:-0.005625em;font-family:").concat(theme.font.sans, ";}p{margin:1em 0;font-size:1em;line-height:1.625em;}small{margin:0;line-height:1.5;font-size:0.875em;}b{font-weight:600;}span{font-size:inherit;color:inherit;font-weight:inherit;}img{max-width:100%;}a{cursor:pointer;font-size:inherit;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.link, ";-webkit-text-decoration:").concat(theme.expressiveness.linkStyle, ";text-decoration:").concat(theme.expressiveness.linkStyle, ";}a:hover{-webkit-text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";}ul,ol{padding:0;list-style-type:none;margin:").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gap, ";color:").concat(theme.palette.foreground, ";}ol{list-style-type:decimal;}li{margin-bottom:0.625em;font-size:1em;line-height:1.625em;}h1,h2,h3,h4,h5,h6{color:inherit;margin:0 0 0.7rem 0;}h1{font-size:3rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;line-height:1.5;font-weight:700;}h2{font-size:2.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h3{font-size:1.5rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h4{font-size:1.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h5{font-size:1rem;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;font-weight:600;}h6{font-size:0.875rem;-webkit-letter-spacing:-0.005em;-moz-letter-spacing:-0.005em;-ms-letter-spacing:-0.005em;letter-spacing:-0.005em;font-weight:600;}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;margin:0;}button:focus,input:focus,select:focus,textarea:focus{outline:none;}code{color:").concat(theme.palette.code, ";font-family:").concat(theme.font.mono, ";font-size:0.9em;white-space:pre-wrap;}code:before,code:after{content:'\\`';}pre{padding:calc(").concat(theme.layout.gap, " * 0.9) ").concat(theme.layout.gap, ";margin:").concat(theme.layout.gap, " 0;border:1px solid ").concat(theme.palette.accents_2, ";border-radius:").concat(theme.layout.radius, ";font-family:").concat(theme.font.mono, ";white-space:pre;overflow:auto;line-height:1.5;text-align:left;font-size:14px;-webkit-overflow-scrolling:touch;}pre code{color:").concat(theme.palette.foreground, ";font-size:1em;line-height:1.25em;white-space:pre;}pre code:before,pre code:after{display:none;}pre p{margin:0;}pre::-webkit-scrollbar{display:none;width:0;height:0;background:transparent;}hr{border-color:").concat(theme.palette.accents_2, ";}details{background-color:").concat(theme.palette.accents_1, ";border:none;}details:focus,details:hover,details:active{outline:none;}summary{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;list-style:none;outline:none;}summary::marker,summary::before,summary::-webkit-details-marker{display:none;}summary::-moz-list-bullet{font-size:0;}summary:focus,summary:hover,summary:active{outline:none;list-style:none;}blockquote{padding:calc(0.667 * ").concat(theme.layout.gap, ") ").concat(theme.layout.gap, ";color:").concat(theme.palette.accents_5, ";background-color:").concat(theme.palette.accents_1, ";border-radius:").concat(theme.layout.radius, ";margin:1.5em 0;border:1px solid ").concat(theme.palette.border, ";}blockquote *:first-child{margin-top:0;}blockquote *:last-child{margin-bottom:0;}::selection{background-color:").concat(theme.palette.selection, ";color:").concat(theme.palette.foreground, ";}")));
2183
- };
2184
- var MemoCssBaseline = /*#__PURE__*/React$1.memo(CssBaseline);
2185
-
2186
- var getElementOffset = function getElementOffset(el) {
2187
- if (!el) return {
2188
- top: 0,
2189
- left: 0
2190
- };
2191
- var _el$getBoundingClient = el.getBoundingClientRect(),
2192
- top = _el$getBoundingClient.top,
2193
- left = _el$getBoundingClient.left;
2194
- return {
2195
- top: top,
2196
- left: left
2197
- };
2198
- };
2199
- var defaultRect$1 = {
2200
- top: -1e3,
2201
- left: -1e3,
2202
- right: -1e3,
2203
- width: 0,
2204
- height: 0,
2205
- elementTop: -1e3
2206
- };
2207
- var getRectFromDOMWithContainer = function getRectFromDOMWithContainer(domRect, getContainer) {
2208
- if (!domRect) return defaultRect$1;
2209
- var container = getContainer ? getContainer() : null;
2210
- var scrollElement = container || document.documentElement;
2211
- var _getElementOffset = getElementOffset(container),
2212
- offsetTop = _getElementOffset.top,
2213
- offsetLeft = _getElementOffset.left;
2214
- return _objectSpread2(_objectSpread2({}, domRect), {}, {
2215
- width: domRect.width || domRect.right - domRect.left,
2216
- height: domRect.height || domRect.top - domRect.bottom,
2217
- top: domRect.bottom + scrollElement.scrollTop - offsetTop,
2218
- left: domRect.left + scrollElement.scrollLeft - offsetLeft,
2219
- elementTop: domRect.top + scrollElement.scrollTop - offsetTop
2220
- });
2221
- };
2222
- var isUnplacedRect = function isUnplacedRect(rect) {
2223
- if (!rect) return true;
2224
- return rect.top === defaultRect$1.top && rect.left === defaultRect$1.left;
2225
- };
2226
- var getRefRect = function getRefRect(ref, getContainer) {
2227
- if (!ref || !ref.current) return defaultRect$1;
2228
- var rect = ref.current.getBoundingClientRect();
2229
- return getRectFromDOMWithContainer(rect, getContainer);
2230
- };
2231
- var getEventRect = function getEventRect(event, getContainer) {
2232
- var _event$target;
2233
- var rect = event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.getBoundingClientRect();
2234
- if (!rect) return defaultRect$1;
2235
- return getRectFromDOMWithContainer(rect, getContainer);
2236
- };
2237
- var isRefTarget = function isRefTarget(eventOrRef) {
2238
- return typeof (eventOrRef === null || eventOrRef === void 0 ? void 0 : eventOrRef.target) === 'undefined';
2239
- };
2240
- var useRect = function useRect(initialState) {
2241
- var _useState = React$1.useState(initialState || defaultRect$1),
2242
- _useState2 = _slicedToArray(_useState, 2),
2243
- rect = _useState2[0],
2244
- setRect = _useState2[1];
2245
- var updateRect = function updateRect(eventOrRef, getContainer) {
2246
- if (isRefTarget(eventOrRef)) return setRect(getRefRect(eventOrRef, getContainer));
2247
- setRect(getEventRect(eventOrRef, getContainer));
2248
- };
2249
- return {
2250
- rect: rect,
2251
- setRect: updateRect
2252
- };
2253
- };
2254
-
2255
- var defaultToast = {
2256
- delay: 2000,
2257
- type: 'default'
2258
- };
2259
- var useToasts = function useToasts(layout) {
2260
- var _useHUIContext = useHUIContext(),
2261
- updateToasts = _useHUIContext.updateToasts,
2262
- toasts = _useHUIContext.toasts,
2263
- updateToastLayout = _useHUIContext.updateToastLayout,
2264
- updateLastToastId = _useHUIContext.updateLastToastId;
2265
- React$1.useEffect(function () {
2266
- if (!layout) return;
2267
- updateToastLayout(function () {
2268
- return layout ? _objectSpread2(_objectSpread2({}, defaultToastLayout), layout) : defaultToastLayout;
2269
- });
2270
- }, []);
2271
- var _cancel = function cancel(internalId) {
2272
- updateToasts(function (currentToasts) {
2273
- return currentToasts.map(function (item) {
2274
- if (item._internalIdent !== internalId) return item;
2275
- return _objectSpread2(_objectSpread2({}, item), {}, {
2276
- visible: false
2277
- });
2278
- });
2279
- });
2280
- updateLastToastId(function () {
2281
- return internalId;
2282
- });
2283
- };
2284
- var removeAll = function removeAll() {
2285
- updateToasts(function (last) {
2286
- return last.map(function (toast) {
2287
- return _objectSpread2(_objectSpread2({}, toast), {}, {
2288
- visible: false
2289
- });
2290
- });
2291
- });
2292
- };
2293
- var findToastOneByID = function findToastOneByID(id) {
2294
- return toasts.find(function (t) {
2295
- return t.id === id;
2296
- });
2297
- };
2298
- var removeToastOneByID = function removeToastOneByID(id) {
2299
- updateToasts(function (last) {
2300
- return last.map(function (toast) {
2301
- if (toast.id !== id) return toast;
2302
- return _objectSpread2(_objectSpread2({}, toast), {}, {
2303
- visible: false
2304
- });
2305
- });
2306
- });
2307
- };
2308
- var setToast = function setToast(toast) {
2309
- var internalIdent = "toast-".concat(getId());
2310
- var delay = toast.delay || defaultToast.delay;
2311
- if (toast.id) {
2312
- var hasIdent = toasts.find(function (t) {
2313
- return t.id === toast.id;
2314
- });
2315
- if (hasIdent) {
2316
- throw new Error('Toast: Already have the same key: "ident"');
2317
- }
2318
- }
2319
- updateToasts(function (last) {
2320
- var newToast = {
2321
- delay: delay,
2322
- text: toast.text,
2323
- visible: true,
2324
- type: toast.type || defaultToast.type,
2325
- id: toast.id || internalIdent,
2326
- actions: toast.actions || [],
2327
- _internalIdent: internalIdent,
2328
- _timeout: window.setTimeout(function () {
2329
- _cancel(internalIdent);
2330
- if (newToast._timeout) {
2331
- window.clearTimeout(newToast._timeout);
2332
- newToast._timeout = null;
2333
- }
2334
- }, delay),
2335
- cancel: function cancel() {
2336
- return _cancel(internalIdent);
2337
- }
2338
- };
2339
- return [].concat(_toConsumableArray(last), [newToast]);
2340
- });
2341
- };
2342
- return {
2343
- toasts: toasts,
2344
- setToast: setToast,
2345
- removeAll: removeAll,
2346
- findToastOneByID: findToastOneByID,
2347
- removeToastOneByID: removeToastOneByID
2348
- };
2349
- };
2350
-
2351
- tuple('xs', 'sm', 'md', 'lg', 'xl', 'mobile');
2352
- tuple('up', 'down', 'default');
2353
- var defaultResponsiveOptions = {
2354
- match: 'default'
2355
- };
2356
- var makeQueries = function makeQueries(bp, up, down) {
2357
- var queryString = function queryString(item) {
2358
- var upQuery = "(min-width: ".concat(item.min, ")");
2359
- var downQuery = "(max-width: ".concat(item.max, ")");
2360
- return up ? upQuery : down ? downQuery : "".concat(upQuery, " and ").concat(downQuery);
2361
- };
2362
- var xs = queryString(bp.xs);
2363
- return {
2364
- xs: xs,
2365
- mobile: xs,
2366
- sm: queryString(bp.sm),
2367
- md: queryString(bp.md),
2368
- lg: queryString(bp.lg),
2369
- xl: queryString(bp.xl)
2370
- };
2371
- };
2372
- var useMediaQuery = function useMediaQuery(breakpoint) {
2373
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultResponsiveOptions;
2374
- var _options$match = options.match,
2375
- matchType = _options$match === void 0 ? 'default' : _options$match,
2376
- _options$ssrMatchMedi = options.ssrMatchMedia,
2377
- ssrMatchMedia = _options$ssrMatchMedi === void 0 ? null : _options$ssrMatchMedi;
2378
- var supportMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
2379
- var theme = useTheme();
2380
- var mediaQueries = React$1.useMemo(function () {
2381
- var up = matchType === 'up';
2382
- var down = matchType === 'down';
2383
- return makeQueries(theme.breakpoints, up, down);
2384
- }, [theme.breakpoints, options]);
2385
- var query = React$1.useMemo(function () {
2386
- return mediaQueries[breakpoint];
2387
- }, [mediaQueries, breakpoint]);
2388
- var matchQuery = function matchQuery(q) {
2389
- return window.matchMedia(q);
2390
- };
2391
-
2392
- /**
2393
- * Do nothing in the server-side rendering.
2394
- * If server match query fucntion is simulated, return user-defined value first.
2395
- */
2396
- var _useState = React$1.useState(function () {
2397
- if (supportMedia) return matchQuery(query).matches;
2398
- if (ssrMatchMedia && typeof ssrMatchMedia === 'function') {
2399
- return ssrMatchMedia(query).matches;
2400
- }
2401
- return false;
2402
- }),
2403
- _useState2 = _slicedToArray(_useState, 2),
2404
- state = _useState2[0],
2405
- setState = _useState2[1];
2406
- React$1.useEffect(function () {
2407
- if (!supportMedia) return;
2408
- var queryList = matchQuery(query);
2409
- var update = function update() {
2410
- return setState(matchQuery(query).matches);
2411
- };
2412
- update();
2413
-
2414
- /**
2415
- * addListener is deprecated. EventTarget.addEventListener is recommended.
2416
- * But in some old browsers, MediaQueryList does not inherit from EventTarget.
2417
- */
2418
- queryList.addListener(update);
2419
- return function () {
2420
- queryList.removeListener(update);
2421
- };
2422
- }, [supportMedia]);
2423
- return state;
2424
- };
2425
-
2426
- /* "use client" */
2427
-
2428
- var usePrevious = function usePrevious(state) {
2429
- var ref = React$1.useRef(null);
2430
- React$1.useEffect(function () {
2431
- ref.current = state;
2432
- });
2433
- return ref ? ref.current : null;
2434
- };
2435
-
2436
- var _excluded$1 = ["rect", "visible", "hoverHeightRatio", "hoverWidthRatio", "activeOpacity", "className"];
2437
- var Highlight = function Highlight(_ref) {
2438
- var rect = _ref.rect,
2439
- visible = _ref.visible,
2440
- _ref$hoverHeightRatio = _ref.hoverHeightRatio,
2441
- hoverHeightRatio = _ref$hoverHeightRatio === void 0 ? 1 : _ref$hoverHeightRatio,
2442
- _ref$hoverWidthRatio = _ref.hoverWidthRatio,
2443
- hoverWidthRatio = _ref$hoverWidthRatio === void 0 ? 1 : _ref$hoverWidthRatio,
2444
- _ref$activeOpacity = _ref.activeOpacity,
2445
- activeOpacity = _ref$activeOpacity === void 0 ? 0.8 : _ref$activeOpacity,
2446
- className = _ref.className,
2447
- props = _objectWithoutProperties(_ref, _excluded$1);
2448
- var theme = useTheme();
2449
- var ref = React$1.useRef(null);
2450
- var isFirstVisible = usePrevious(isUnplacedRect(rect));
2451
- var position = React$1.useMemo(function () {
2452
- var width = rect.width * hoverWidthRatio;
2453
- var height = rect.height * hoverHeightRatio;
2454
- return {
2455
- width: "".concat(width, "px"),
2456
- left: "".concat(rect.left + (rect.width - width) / 2, "px"),
2457
- height: "".concat(height, "px"),
2458
- top: "".concat(rect.elementTop + (rect.height - height) / 2, "px"),
2459
- transition: isFirstVisible ? 'opacity' : 'opacity, width, left, top'
2460
- };
2461
- }, [rect, hoverWidthRatio, hoverHeightRatio]);
2462
- return /*#__PURE__*/React$1.createElement("div", _extends({
2463
- ref: ref
2464
- }, props, {
2465
- className: _JSXStyle.dynamic([["603024321", [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]]]) + " " + (props && props.className != null && props.className || useClasses('highlight', className) || "")
2466
- }), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2467
- id: "603024321",
2468
- dynamic: [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]
2469
- }, ".highlight.__jsx-style-dynamic-selector{background:".concat(theme.palette.accents_2, ";position:absolute;border-radius:5px;width:").concat(position.width, ";left:").concat(position.left, ";height:").concat(position.height, ";top:").concat(position.top, ";opacity:").concat(visible ? activeOpacity : 0, ";-webkit-transition:0.15s ease;transition:0.15s ease;-webkit-transition-property:").concat(position.transition, ";transition-property:").concat(position.transition, ";}")));
2470
- };
2471
-
2472
- var Ellipsis = function Ellipsis(_ref) {
2473
- var children = _ref.children,
2474
- height = _ref.height;
2475
- return /*#__PURE__*/React$1.createElement("span", {
2476
- className: _JSXStyle.dynamic([["822089635", [height]]])
2477
- }, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2478
- id: "822089635",
2479
- dynamic: [height]
2480
- }, "span.__jsx-style-dynamic-selector{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:".concat(height, ";min-width:0;}")));
2481
- };
2482
- var ellipsis = /*#__PURE__*/React$1.memo(Ellipsis);
2483
-
2484
- var getRealShape = function getRealShape(el) {
2485
- var defaultShape = {
2486
- width: 0,
2487
- height: 0
2488
- };
2489
- if (!el || typeof window === 'undefined') return defaultShape;
2490
- var rect = el.getBoundingClientRect();
2491
- var _window$getComputedSt = window.getComputedStyle(el),
2492
- width = _window$getComputedSt.width,
2493
- height = _window$getComputedSt.height;
2494
- var getCSSStyleVal = function getCSSStyleVal(str, parentNum) {
2495
- if (!str) return 0;
2496
- var strVal = str.includes('px') ? +str.split('px')[0] : str.includes('%') ? +str.split('%')[0] * parentNum * 0.01 : str;
2497
- return Number.isNaN(+strVal) ? 0 : +strVal;
2498
- };
2499
- return {
2500
- width: getCSSStyleVal("".concat(width), rect.width),
2501
- height: getCSSStyleVal("".concat(height), rect.height)
2502
- };
2503
- };
2504
- var useRealShape = function useRealShape(ref) {
2505
- var _useState = React$1.useState({
2506
- width: 0,
2507
- height: 0
2508
- }),
2509
- _useState2 = _slicedToArray(_useState, 2),
2510
- state = _useState2[0],
2511
- setState = _useState2[1];
2512
- var update = function update() {
2513
- var _getRealShape = getRealShape(ref.current),
2514
- width = _getRealShape.width,
2515
- height = _getRealShape.height;
2516
- setState({
2517
- width: width,
2518
- height: height
2519
- });
2520
- };
2521
- React$1.useEffect(function () {
2522
- return update();
2523
- }, [ref.current]);
2524
- return [state, update];
2525
- };
2526
-
2527
- var Expand = function Expand(_ref) {
2528
- var _ref$isExpanded = _ref.isExpanded,
2529
- isExpanded = _ref$isExpanded === void 0 ? false : _ref$isExpanded,
2530
- _ref$delay = _ref.delay,
2531
- delay = _ref$delay === void 0 ? 200 : _ref$delay,
2532
- children = _ref.children;
2533
- var _useState = React$1.useState(isExpanded ? 'auto' : '0'),
2534
- _useState2 = _slicedToArray(_useState, 2),
2535
- height = _useState2[0],
2536
- setHeight = _useState2[1];
2537
- var _useState3 = React$1.useState(isExpanded),
2538
- _useState4 = _slicedToArray(_useState3, 2),
2539
- selfExpanded = _useState4[0],
2540
- setSelfExpanded = _useState4[1];
2541
- var _useState5 = React$1.useState(isExpanded),
2542
- _useState6 = _slicedToArray(_useState5, 2),
2543
- visible = _useState6[0],
2544
- setVisible = _useState6[1];
2545
- var contentRef = React$1.useRef(null);
2546
- var entryTimer = React$1.useRef();
2547
- var leaveTimer = React$1.useRef();
2548
- var resetTimer = React$1.useRef();
2549
- var _useRealShape = useRealShape(contentRef),
2550
- _useRealShape2 = _slicedToArray(_useRealShape, 2),
2551
- state = _useRealShape2[0],
2552
- updateShape = _useRealShape2[1];
2553
- var classes = useClasses('container', {
2554
- expanded: selfExpanded
2555
- });
2556
- React$1.useEffect(function () {
2557
- return setHeight("".concat(state.height, "px"));
2558
- }, [state.height]);
2559
- React$1.useEffect(function () {
2560
- // show element or reset height.
2561
- // force an update once manually, even if the element does not change.
2562
- // (the height of the element might be "auto")
2563
- if (isExpanded) {
2564
- setVisible(isExpanded);
2565
- } else {
2566
- updateShape();
2567
- setHeight("".concat(state.height, "px"));
2568
- }
2569
-
2570
- // show expand animation
2571
- entryTimer.current = window.setTimeout(function () {
2572
- setSelfExpanded(isExpanded);
2573
- clearTimeout(entryTimer.current);
2574
- }, 30);
2575
-
2576
- // Reset height after animation
2577
- if (isExpanded) {
2578
- resetTimer.current = window.setTimeout(function () {
2579
- setHeight('auto');
2580
- clearTimeout(resetTimer.current);
2581
- }, delay);
2582
- } else {
2583
- leaveTimer.current = window.setTimeout(function () {
2584
- setVisible(isExpanded);
2585
- clearTimeout(leaveTimer.current);
2586
- }, delay / 2);
2587
- }
2588
- return function () {
2589
- clearTimeout(entryTimer.current);
2590
- clearTimeout(leaveTimer.current);
2591
- clearTimeout(resetTimer.current);
2592
- };
2593
- }, [isExpanded]);
2594
- return /*#__PURE__*/React$1.createElement("div", {
2595
- className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + (classes || "")
2596
- }, /*#__PURE__*/React$1.createElement("div", {
2597
- ref: contentRef,
2598
- className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + "content"
2599
- }, children), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2600
- id: "1918690829",
2601
- dynamic: [visible ? 'visible' : 'hidden', delay, height]
2602
- }, ".container.__jsx-style-dynamic-selector{padding:0;margin:0;height:0;overflow:hidden;visibility:".concat(visible ? 'visible' : 'hidden', ";-webkit-transition:height ").concat(delay, "ms ease;transition:height ").concat(delay, "ms ease;}.expanded.__jsx-style-dynamic-selector{height:").concat(height, ";visibility:visible;}")));
2603
- };
2604
- Expand.displayName = 'Expand';
2605
-
2606
- /* "use client" */
2607
-
2608
- var useResize = function useResize(callback) {
2609
- var immediatelyInvoke = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2610
- React$1.useEffect(function () {
2611
- var fn = function fn() {
2612
- return callback();
2613
- };
2614
- if (immediatelyInvoke) {
2615
- fn();
2616
- }
2617
- window.addEventListener('resize', fn);
2618
- return function () {
2619
- return window.removeEventListener('resize', fn);
2620
- };
2621
- }, []);
2622
- };
2623
-
2624
- /* "use client" */
2625
-
2626
- var useClickAnyWhere = function useClickAnyWhere(handler) {
2627
- React$1.useEffect(function () {
2628
- var callback = function callback(event) {
2629
- return handler(event);
2630
- };
2631
- document.addEventListener('click', callback);
2632
- return function () {
2633
- return document.removeEventListener('click', callback);
2634
- };
2635
- }, [handler]);
2636
- };
2637
-
2638
- /* "use client" */
2639
-
2640
- var useDOMObserver = function useDOMObserver(ref) {
2641
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
2642
- var config = {
2643
- attributes: false,
2644
- childList: true,
2645
- subtree: true
2646
- };
2647
- React$1.useEffect(function () {
2648
- if (!ref || !ref.current) return;
2649
- var unmount = false;
2650
- var done = function done() {
2651
- if (unmount) return;
2652
- callback.apply(void 0, arguments);
2653
- };
2654
- var observer = new MutationObserver(done);
2655
- observer.observe(ref.current, config);
2656
- return function () {
2657
- unmount = true;
2658
- observer.disconnect();
2659
- };
2660
- }, [ref]);
2661
- };
2662
-
2663
- var warningStack = {};
2664
- var useWarning = function useWarning(message, component) {
2665
- var tag = ' ';
2666
- var log = "[Helpdice UI]".concat(tag, ": ").concat(message);
2667
- if (typeof console === 'undefined') return;
2668
- if (warningStack[log]) return;
2669
- warningStack[log] = true;
2670
- if (process.env.NODE_ENV !== 'production') {
2671
- return console.error(log);
2672
- }
2673
- console.warn(log);
2674
- };
2675
-
2676
- var defaultRect = {
2677
- top: -1e3,
2678
- left: -1e3,
2679
- right: -1e3,
2680
- width: 0
2681
- };
2682
- var Dropdown = /*#__PURE__*/React$1.memo(function (_ref) {
2683
- var children = _ref.children,
2684
- parent = _ref.parent,
2685
- visible = _ref.visible,
2686
- disableMatchWidth = _ref.disableMatchWidth,
2687
- getPopupContainer = _ref.getPopupContainer;
2688
- var el = usePortal('dropdown', getPopupContainer);
2689
- var _useState = React$1.useState(defaultRect),
2690
- _useState2 = _slicedToArray(_useState, 2),
2691
- rect = _useState2[0],
2692
- setRect = _useState2[1];
2693
- var classes = useClasses('dropdown', disableMatchWidth ? 'disable-match' : 'width-match');
2694
- if (!parent) return null;
2695
-
2696
- /* istanbul ignore next */
2697
- if (process.env.NODE_ENV !== 'production') {
2698
- if (getPopupContainer && getPopupContainer()) {
2699
- var _el = getPopupContainer();
2700
- var style = window.getComputedStyle(_el);
2701
- if (style.position === 'static') {
2702
- useWarning('The element specified by "getPopupContainer" must have "position" set.');
2703
- }
2704
- }
2705
- }
2706
- var updateRect = function updateRect() {
2707
- var _getRefRect = getRefRect(parent, getPopupContainer),
2708
- top = _getRefRect.top,
2709
- left = _getRefRect.left,
2710
- right = _getRefRect.right,
2711
- nativeWidth = _getRefRect.width;
2712
- setRect({
2713
- top: top,
2714
- left: left,
2715
- right: right,
2716
- width: nativeWidth
2717
- });
2718
- };
2719
- useResize(updateRect);
2720
- useClickAnyWhere(function () {
2721
- var _getRefRect2 = getRefRect(parent, getPopupContainer),
2722
- top = _getRefRect2.top,
2723
- left = _getRefRect2.left;
2724
- var shouldUpdatePosition = top !== rect.top || left !== rect.left;
2725
- if (!shouldUpdatePosition) return;
2726
- updateRect();
2727
- });
2728
- useDOMObserver(parent, function () {
2729
- updateRect();
2730
- });
2731
- React$1.useEffect(function () {
2732
- if (!parent || !parent.current) return;
2733
- parent.current.addEventListener('mouseenter', updateRect);
2734
- /* istanbul ignore next */
2735
- return function () {
2736
- if (!parent || !parent.current) return;
2737
- parent.current.removeEventListener('mouseenter', updateRect);
2738
- };
2739
- }, [parent]);
2740
- var clickHandler = function clickHandler(event) {
2741
- event.stopPropagation();
2742
- event.nativeEvent.stopImmediatePropagation();
2743
- event.preventDefault();
2744
- };
2745
- var mouseDownHandler = function mouseDownHandler(event) {
2746
- event.preventDefault();
2747
- };
2748
- if (!el) return null;
2749
- return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React$1.createElement(CssTransition, {
2750
- visible: visible
2751
- }, /*#__PURE__*/React$1.createElement("div", {
2752
- onClick: clickHandler,
2753
- onMouseDown: mouseDownHandler,
2754
- className: _JSXStyle.dynamic([["1644673105", [rect.top + 2, rect.left, rect.width, rect.width]]]) + " " + (classes || "")
2755
- }, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2756
- id: "1644673105",
2757
- dynamic: [rect.top + 2, rect.left, rect.width, rect.width]
2758
- }, ".dropdown.__jsx-style-dynamic-selector{position:absolute;top:".concat(rect.top + 2, "px;left:").concat(rect.left, "px;z-index:1100;}.width-match.__jsx-style-dynamic-selector{width:").concat(rect.width, "px;}.disable-match.__jsx-style-dynamic-selector{min-width:").concat(rect.width, "px;}")))), el);
2759
- });
2760
-
2761
- var _excluded = ["children", "onClick", "visible", "width", "onContentClick", "backdropClassName", "positionClassName", "layerClassName"];
2762
- var Backdrop = /*#__PURE__*/React$1.memo(function (_ref) {
2763
- var children = _ref.children,
2764
- _ref$onClick = _ref.onClick,
2765
- onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
2766
- _ref$visible = _ref.visible,
2767
- visible = _ref$visible === void 0 ? false : _ref$visible,
2768
- width = _ref.width,
2769
- _ref$onContentClick = _ref.onContentClick,
2770
- onContentClick = _ref$onContentClick === void 0 ? function () {} : _ref$onContentClick,
2771
- _ref$backdropClassNam = _ref.backdropClassName,
2772
- backdropClassName = _ref$backdropClassNam === void 0 ? '' : _ref$backdropClassNam,
2773
- _ref$positionClassNam = _ref.positionClassName,
2774
- positionClassName = _ref$positionClassNam === void 0 ? '' : _ref$positionClassNam,
2775
- _ref$layerClassName = _ref.layerClassName,
2776
- layerClassName = _ref$layerClassName === void 0 ? '' : _ref$layerClassName,
2777
- props = _objectWithoutProperties(_ref, _excluded);
2778
- var theme = useTheme();
2779
- var _useCurrentState = useCurrentState(false),
2780
- _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2781
- setIsContentMouseDown = _useCurrentState2[1],
2782
- IsContentMouseDownRef = _useCurrentState2[2];
2783
- var clickHandler = function clickHandler(event) {
2784
- if (IsContentMouseDownRef.current) return;
2785
- onClick && onClick(event);
2786
- };
2787
- var mouseUpHandler = function mouseUpHandler() {
2788
- if (!IsContentMouseDownRef.current) return;
2789
- var timer = setTimeout(function () {
2790
- setIsContentMouseDown(false);
2791
- clearTimeout(timer);
2792
- }, 0);
2793
- };
2794
- return /*#__PURE__*/React$1.createElement(CssTransition, {
2795
- name: "backdrop-wrapper",
2796
- visible: visible,
2797
- clearTime: 300
2798
- }, /*#__PURE__*/React$1.createElement("div", _extends({
2799
- onClick: clickHandler,
2800
- onMouseUp: mouseUpHandler
2801
- }, props, {
2802
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (props && props.className != null && props.className || useClasses('backdrop', backdropClassName) || "")
2803
- }), /*#__PURE__*/React$1.createElement("div", {
2804
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('layer', layerClassName) || "")
2805
- }), /*#__PURE__*/React$1.createElement("div", {
2806
- onClick: onContentClick,
2807
- onMouseDown: function onMouseDown() {
2808
- return setIsContentMouseDown(true);
2809
- },
2810
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('position', positionClassName) || "")
2811
- }, children), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2812
- id: "2021762493",
2813
- dynamic: [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]
2814
- }, ".backdrop.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;overflow:auto;z-index:1000;-webkit-overflow-scrolling:touch;box-sizing:border-box;text-align:center;}.position.__jsx-style-dynamic-selector{position:relative;z-index:1001;outline:none;max-width:90%;width:".concat(width, ";margin:20px auto;vertical-align:middle;display:inline-block;}.backdrop.__jsx-style-dynamic-selector:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:'';}.layer.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:").concat(theme.expressiveness.portalOpacity, ";background-color:black;-webkit-transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);pointer-events:none;z-index:1000;}.backdrop-wrapper-enter.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}.backdrop-wrapper-enter-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}"))));
2815
- });
2816
- Backdrop.displayName = 'Backdrop';
2817
-
2818
- dist.Backdrop = Backdrop;
2819
- dist.CssBaseline = MemoCssBaseline;
2820
- dist.CssTransition = CssTransition;
2821
- dist.Dropdown = Dropdown;
2822
- dist.Ellipsis = ellipsis;
2823
- dist.Expand = Expand;
2824
- dist.Highlight = Highlight;
2825
- dist.Themes = Themes;
2826
- dist.UiProvider = HuiProvider;
2827
- dist.useAllThemes = useAllThemes;
2828
- dist.useClasses = useClasses;
2829
- dist.useCurrentState = useCurrentState;
2830
- dist.useMediaQuery = useMediaQuery;
2831
- dist.useRect = useRect;
2832
- dist.useTheme = useTheme;
2833
- dist.useToasts = useToasts;
2834
- return dist;
2835
- }
2836
-
2837
- var distExports = /*@__PURE__*/ requireDist();
2838
-
2839
720
  var getStyles = function getStyles(type, palette, isShadow) {
2840
721
  var colors = {
2841
722
  "default": {
@@ -3009,7 +890,7 @@ var withScale = function withScale(Render) {
3009
890
  var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
3010
891
  var children = _ref.children,
3011
892
  props = _objectWithoutProperties(_ref, _excluded$7);
3012
- var _useTheme = distExports.useTheme(),
893
+ var _useTheme = theme.useTheme(),
3013
894
  layout = _useTheme.layout;
3014
895
  var paddingLeft = props.paddingLeft,
3015
896
  pl = props.pl,
@@ -3099,18 +980,18 @@ var CardFooterComponent = function CardFooterComponent(_ref) {
3099
980
  _ref$disableAutoMargi = _ref.disableAutoMargin,
3100
981
  disableAutoMargin = _ref$disableAutoMargi === void 0 ? false : _ref$disableAutoMargi,
3101
982
  props = _objectWithoutProperties(_ref, _excluded$6);
3102
- var theme = distExports.useTheme();
983
+ var theme$1 = theme.useTheme();
3103
984
  var _useScale = useScale(),
3104
985
  SCALES = _useScale.SCALES;
3105
- var classes = distExports.useClasses({
986
+ var classes = theme.useClasses({
3106
987
  'auto-margin': !disableAutoMargin
3107
988
  }, className);
3108
989
  return /*#__PURE__*/React.createElement("footer", _extends({}, props, {
3109
- className: _JSXStyle.dynamic([["1602358380", [SCALES.py(0.66), SCALES.px(1.31), SCALES.font(0.875), theme.palette.border, theme.layout.radius, theme.layout.radius, SCALES.height(3.3), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.layout.gapQuarter]]]) + " " + (props && props.className != null && props.className || classes || "")
990
+ className: _JSXStyle.dynamic([["1602358380", [SCALES.py(0.66), SCALES.px(1.31), SCALES.font(0.875), theme$1.palette.border, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(3.3), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapQuarter]]]) + " " + (props && props.className != null && props.className || classes || "")
3110
991
  }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
3111
992
  id: "1602358380",
3112
- dynamic: [SCALES.py(0.66), SCALES.px(1.31), SCALES.font(0.875), theme.palette.border, theme.layout.radius, theme.layout.radius, SCALES.height(3.3), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.layout.gapQuarter]
3113
- }, "footer.__jsx-style-dynamic-selector{padding:".concat(SCALES.py(0.66), " ").concat(SCALES.px(1.31), ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden;color:inherit;background-color:inherit;font-size:").concat(SCALES.font(0.875), ";border-top:1px solid ").concat(theme.palette.border, ";border-bottom-left-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";min-height:").concat(SCALES.height(3.3), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.auto-margin.__jsx-style-dynamic-selector *{margin-top:0;margin-bottom:0;margin-right:").concat(theme.layout.gapQuarter, ";}")));
993
+ dynamic: [SCALES.py(0.66), SCALES.px(1.31), SCALES.font(0.875), theme$1.palette.border, theme$1.layout.radius, theme$1.layout.radius, SCALES.height(3.3), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.layout.gapQuarter]
994
+ }, "footer.__jsx-style-dynamic-selector{padding:".concat(SCALES.py(0.66), " ").concat(SCALES.px(1.31), ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden;color:inherit;background-color:inherit;font-size:").concat(SCALES.font(0.875), ";border-top:1px solid ").concat(theme$1.palette.border, ";border-bottom-left-radius:").concat(theme$1.layout.radius, ";border-bottom-right-radius:").concat(theme$1.layout.radius, ";min-height:").concat(SCALES.height(3.3), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.auto-margin.__jsx-style-dynamic-selector *{margin-top:0;margin-bottom:0;margin-right:").concat(theme$1.layout.gapQuarter, ";}")));
3114
995
  };
3115
996
  CardFooterComponent.displayName = 'CardFooter';
3116
997
  var CardFooter = withScale(CardFooterComponent);
@@ -3124,7 +1005,7 @@ var CardContentComponent = function CardContentComponent(_ref) {
3124
1005
  var _useScale = useScale(),
3125
1006
  SCALES = _useScale.SCALES;
3126
1007
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
3127
- className: _JSXStyle.dynamic([["490544004", [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('content', className) || "")
1008
+ className: _JSXStyle.dynamic([["490544004", [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || theme.useClasses('content', className) || "")
3128
1009
  }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
3129
1010
  id: "490544004",
3130
1011
  dynamic: [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]
@@ -3138,13 +1019,13 @@ var ImageSkeleton = /*#__PURE__*/React.memo(function (_ref) {
3138
1019
  var _ref$opacity = _ref.opacity,
3139
1020
  opacity = _ref$opacity === void 0 ? 0.5 : _ref$opacity,
3140
1021
  props = _objectWithoutProperties(_ref, _excluded$4);
3141
- var theme = distExports.useTheme();
1022
+ var theme$1 = theme.useTheme();
3142
1023
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
3143
- className: _JSXStyle.dynamic([["2946022605", [theme.palette.accents_1, theme.palette.accents_2, theme.palette.accents_2, theme.palette.accents_1, opacity]]]) + " " + (props && props.className != null && props.className || "skeleton")
1024
+ className: _JSXStyle.dynamic([["2946022605", [theme$1.palette.accents_1, theme$1.palette.accents_2, theme$1.palette.accents_2, theme$1.palette.accents_1, opacity]]]) + " " + (props && props.className != null && props.className || "skeleton")
3144
1025
  }), /*#__PURE__*/React.createElement(_JSXStyle, {
3145
1026
  id: "2946022605",
3146
- dynamic: [theme.palette.accents_1, theme.palette.accents_2, theme.palette.accents_2, theme.palette.accents_1, opacity]
3147
- }, ".skeleton.__jsx-style-dynamic-selector{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background-image:linear-gradient( 270deg, ".concat(theme.palette.accents_1, ", ").concat(theme.palette.accents_2, ", ").concat(theme.palette.accents_2, ", ").concat(theme.palette.accents_1, " );background-size:400% 100%;-webkit-animation:loading-__jsx-style-dynamic-selector 3s ease-in-out infinite;animation:loading-__jsx-style-dynamic-selector 3s ease-in-out infinite;opacity:").concat(opacity, ";-webkit-transition:opacity 300ms ease-out;transition:opacity 300ms ease-out;}@-webkit-keyframes loading-__jsx-style-dynamic-selector{0%{background-position:200% 0;}to{background-position:-200% 0;}}@keyframes loading-__jsx-style-dynamic-selector{0%{background-position:200% 0;}to{background-position:-200% 0;}}")));
1027
+ dynamic: [theme$1.palette.accents_1, theme$1.palette.accents_2, theme$1.palette.accents_2, theme$1.palette.accents_1, opacity]
1028
+ }, ".skeleton.__jsx-style-dynamic-selector{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background-image:linear-gradient( 270deg, ".concat(theme$1.palette.accents_1, ", ").concat(theme$1.palette.accents_2, ", ").concat(theme$1.palette.accents_2, ", ").concat(theme$1.palette.accents_1, " );background-size:400% 100%;-webkit-animation:loading-__jsx-style-dynamic-selector 3s ease-in-out infinite;animation:loading-__jsx-style-dynamic-selector 3s ease-in-out infinite;opacity:").concat(opacity, ";-webkit-transition:opacity 300ms ease-out;transition:opacity 300ms ease-out;}@-webkit-keyframes loading-__jsx-style-dynamic-selector{0%{background-position:200% 0;}to{background-position:-200% 0;}}@keyframes loading-__jsx-style-dynamic-selector{0%{background-position:200% 0;}to{background-position:-200% 0;}}")));
3148
1029
  });
3149
1030
  ImageSkeleton.displayName = 'ImageSkeleton';
3150
1031
 
@@ -3179,7 +1060,7 @@ var ImageComponent = function ImageComponent(_ref) {
3179
1060
  var width = getScaleProps(['width', 'w']);
3180
1061
  var height = getScaleProps(['height', 'h']);
3181
1062
  var showAnimation = !disableSkeleton && width && height;
3182
- var theme = distExports.useTheme();
1063
+ var theme$1 = theme.useTheme();
3183
1064
  var _useState = React.useState(true),
3184
1065
  _useState2 = _slicedToArray(_useState, 2),
3185
1066
  loading = _useState2[0],
@@ -3216,7 +1097,7 @@ var ImageComponent = function ImageComponent(_ref) {
3216
1097
  };
3217
1098
  }, [loading]);
3218
1099
  return /*#__PURE__*/React.createElement("div", {
3219
- className: _JSXStyle.dynamic([["4175752462", [theme.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (distExports.useClasses('image', className) || "")
1100
+ className: _JSXStyle.dynamic([["4175752462", [theme$1.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (theme.useClasses('image', className) || "")
3220
1101
  }, showSkeleton && showAnimation && /*#__PURE__*/React.createElement(ImageSkeleton, {
3221
1102
  opacity: loading ? 0.5 : 0
3222
1103
  }), /*#__PURE__*/React.createElement("img", _extends({
@@ -3224,11 +1105,11 @@ var ImageComponent = function ImageComponent(_ref) {
3224
1105
  onLoad: imageLoaded,
3225
1106
  src: url
3226
1107
  }, props, {
3227
- className: _JSXStyle.dynamic([["4175752462", [theme.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (props && props.className != null && props.className || "")
1108
+ className: _JSXStyle.dynamic([["4175752462", [theme$1.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (props && props.className != null && props.className || "")
3228
1109
  })), /*#__PURE__*/React.createElement(_JSXStyle, {
3229
1110
  id: "4175752462",
3230
- dynamic: [theme.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]
3231
- }, ".image.__jsx-style-dynamic-selector{position:relative;border-radius:".concat(theme.layout.radius, ";overflow:hidden;max-width:100%;width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0, 'auto'), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}img.__jsx-style-dynamic-selector{width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";object-fit:scale-down;display:inline-block;}")));
1111
+ dynamic: [theme$1.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]
1112
+ }, ".image.__jsx-style-dynamic-selector{position:relative;border-radius:".concat(theme$1.layout.radius, ";overflow:hidden;max-width:100%;width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0, 'auto'), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}img.__jsx-style-dynamic-selector{width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";object-fit:scale-down;display:inline-block;}")));
3232
1113
  };
3233
1114
  ImageComponent.displayName = 'Image';
3234
1115
  var Image = withScale(ImageComponent);
@@ -3313,26 +1194,26 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3313
1194
  arrow = _ref$arrow === void 0 ? false : _ref$arrow,
3314
1195
  icon = _ref.icon,
3315
1196
  props = _objectWithoutProperties(_ref, _excluded$2);
3316
- var theme = distExports.useTheme();
1197
+ var theme$1 = theme.useTheme();
3317
1198
  var _useScale = useScale(),
3318
1199
  SCALES = _useScale.SCALES;
3319
- var linkColor = showColor || block ? theme.palette.link : 'inherit';
3320
- var hoverColor = showColor || block ? theme.palette.successLight : 'inherit';
1200
+ var linkColor = showColor || block ? theme$1.palette.link : 'inherit';
1201
+ var hoverColor = showColor || block ? theme$1.palette.successLight : 'inherit';
3321
1202
  var decoration = underline ? 'underline' : 'none';
3322
- var classes = distExports.useClasses('link', {
1203
+ var classes = theme.useClasses('link', {
3323
1204
  block: block
3324
1205
  }, className);
3325
1206
  return /*#__PURE__*/React.createElement("a", _extends({
3326
1207
  href: href
3327
1208
  }, props, {
3328
1209
  ref: ref,
3329
- className: _JSXStyle.dynamic([["2838069667", [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || "")
1210
+ className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || "")
3330
1211
  }), icon && icon, /*#__PURE__*/React.createElement("span", {
3331
- className: _JSXStyle.dynamic([["2838069667", [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra"
1212
+ className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra"
3332
1213
  }, children, arrow && /*#__PURE__*/React.createElement(LinkIcon, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
3333
- id: "2838069667",
3334
- dynamic: [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]
3335
- }, ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")));
1214
+ id: "1962988967",
1215
+ dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]
1216
+ }, ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")));
3336
1217
  });
3337
1218
  LinkComponent.displayName = 'Link';
3338
1219
  var Link = withScale(LinkComponent);
@@ -3408,12 +1289,12 @@ var ImageBrowserComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3408
1289
  _ref$className = _ref.className,
3409
1290
  className = _ref$className === void 0 ? '' : _ref$className,
3410
1291
  props = _objectWithoutProperties(_ref, _excluded$1);
3411
- var theme = distExports.useTheme();
1292
+ var theme$1 = theme.useTheme();
3412
1293
  var _useScale = useScale(),
3413
1294
  SCALES = _useScale.SCALES;
3414
1295
  var colors = React.useMemo(function () {
3415
- return getBrowserColors(invert, theme.palette);
3416
- }, [invert, theme.palette]);
1296
+ return getBrowserColors(invert, theme$1.palette);
1297
+ }, [invert, theme$1.palette]);
3417
1298
  var input = React.useMemo(function () {
3418
1299
  if (url) return getAddressInput(url, showFullLink, colors, anchorProps);
3419
1300
  if (title) return getTitle(title, colors);
@@ -3422,21 +1303,21 @@ var ImageBrowserComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3422
1303
  return /*#__PURE__*/React.createElement("div", _extends({
3423
1304
  ref: ref
3424
1305
  }, props, {
3425
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('browser', className) || "")
1306
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]]) + " " + (props && props.className != null && props.className || theme.useClasses('browser', className) || "")
3426
1307
  }), /*#__PURE__*/React.createElement("header", {
3427
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]])
1308
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]])
3428
1309
  }, /*#__PURE__*/React.createElement("div", {
3429
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + "traffic"
1310
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]]) + " " + "traffic"
3430
1311
  }, /*#__PURE__*/React.createElement("span", {
3431
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + "close"
1312
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]]) + " " + "close"
3432
1313
  }), /*#__PURE__*/React.createElement("span", {
3433
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + "mini"
1314
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]]) + " " + "mini"
3434
1315
  }), /*#__PURE__*/React.createElement("span", {
3435
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + "full"
1316
+ className: _JSXStyle.dynamic([["1856409351", [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]]]) + " " + "full"
3436
1317
  })), input), children, /*#__PURE__*/React.createElement(_JSXStyle, {
3437
1318
  id: "1856409351",
3438
- dynamic: [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]
3439
- }, ".browser.__jsx-style-dynamic-selector{background-color:transparent;box-shadow:".concat(theme.expressiveness.shadowLarge, ";max-width:100%;border-radius:").concat(theme.layout.radius, ";overflow:hidden;font-size:").concat(SCALES.font(1), ";width:").concat(SCALES.width(1, 'max-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0, 'auto'), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.browser.__jsx-style-dynamic-selector .image{border-top-left-radius:0;border-top-right-radius:0;}header.__jsx-style-dynamic-selector{height:2.5em;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:relative;color:").concat(colors.color, ";background-color:").concat(colors.barBgColor, ";border-bottom:1px solid ").concat(colors.borderColor, ";}.traffic.__jsx-style-dynamic-selector{width:auto;position:absolute;left:").concat(theme.layout.gapHalf, ";top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);bottom:0;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:inherit;}.traffic.__jsx-style-dynamic-selector span.__jsx-style-dynamic-selector{border-radius:50%;width:0.75em;height:0.75em;max-width:20px;max-height:20px;display:inline-block;margin-right:0.5em;}.close.__jsx-style-dynamic-selector{background-color:#ff5f56;}.mini.__jsx-style-dynamic-selector{background-color:#ffbd2e;}.full.__jsx-style-dynamic-selector{background-color:#27c93f;}")));
1319
+ dynamic: [theme$1.expressiveness.shadowLarge, theme$1.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme$1.layout.gapHalf]
1320
+ }, ".browser.__jsx-style-dynamic-selector{background-color:transparent;box-shadow:".concat(theme$1.expressiveness.shadowLarge, ";max-width:100%;border-radius:").concat(theme$1.layout.radius, ";overflow:hidden;font-size:").concat(SCALES.font(1), ";width:").concat(SCALES.width(1, 'max-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0, 'auto'), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.browser.__jsx-style-dynamic-selector .image{border-top-left-radius:0;border-top-right-radius:0;}header.__jsx-style-dynamic-selector{height:2.5em;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:relative;color:").concat(colors.color, ";background-color:").concat(colors.barBgColor, ";border-bottom:1px solid ").concat(colors.borderColor, ";}.traffic.__jsx-style-dynamic-selector{width:auto;position:absolute;left:").concat(theme$1.layout.gapHalf, ";top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);bottom:0;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:inherit;}.traffic.__jsx-style-dynamic-selector span.__jsx-style-dynamic-selector{border-radius:50%;width:0.75em;height:0.75em;max-width:20px;max-height:20px;display:inline-block;margin-right:0.5em;}.close.__jsx-style-dynamic-selector{background-color:#ff5f56;}.mini.__jsx-style-dynamic-selector{background-color:#ffbd2e;}.full.__jsx-style-dynamic-selector{background-color:#27c93f;}")));
3440
1321
  });
3441
1322
  ImageBrowserComponent.displayName = 'ImageBrowser';
3442
1323
  var ImageBrowser = withScale(ImageBrowserComponent);
@@ -3455,16 +1336,16 @@ var CardComponent = function CardComponent(_ref) {
3455
1336
  _ref$type = _ref.type,
3456
1337
  type = _ref$type === void 0 ? 'default' : _ref$type,
3457
1338
  props = _objectWithoutProperties(_ref, _excluded);
3458
- var theme = distExports.useTheme();
1339
+ var theme$1 = theme.useTheme();
3459
1340
  var _useScale = useScale(),
3460
1341
  SCALES = _useScale.SCALES;
3461
1342
  var hoverShadow = React.useMemo(function () {
3462
- if (shadow) return theme.expressiveness.shadowMedium;
3463
- return hoverable ? theme.expressiveness.shadowSmall : 'none';
3464
- }, [hoverable, shadow, theme.expressiveness]);
1343
+ if (shadow) return theme$1.expressiveness.shadowMedium;
1344
+ return hoverable ? theme$1.expressiveness.shadowSmall : 'none';
1345
+ }, [hoverable, shadow, theme$1.expressiveness]);
3465
1346
  var _useMemo = React.useMemo(function () {
3466
- return getStyles(type, theme.palette, shadow);
3467
- }, [type, theme.palette, shadow]),
1347
+ return getStyles(type, theme$1.palette, shadow);
1348
+ }, [type, theme$1.palette, shadow]),
3468
1349
  color = _useMemo.color,
3469
1350
  bgColor = _useMemo.bgColor,
3470
1351
  borderColor = _useMemo.borderColor;
@@ -3478,11 +1359,11 @@ var CardComponent = function CardComponent(_ref) {
3478
1359
  imageChildren = _pickChild4[1];
3479
1360
  var hasContent = hasChild(withoutImageChildren, CardContent);
3480
1361
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
3481
- className: _JSXStyle.dynamic([["4234389955", [theme.palette.background, theme.layout.radius, shadow ? theme.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('card', className) || "")
1362
+ className: _JSXStyle.dynamic([["4234389955", [theme$1.palette.background, theme$1.layout.radius, shadow ? theme$1.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]]]) + " " + (props && props.className != null && props.className || theme.useClasses('card', className) || "")
3482
1363
  }), imageChildren, hasContent ? withoutImageChildren : /*#__PURE__*/React.createElement(CardContent, null, withoutImageChildren), footerChildren, /*#__PURE__*/React.createElement(_JSXStyle, {
3483
1364
  id: "4234389955",
3484
- dynamic: [theme.palette.background, theme.layout.radius, shadow ? theme.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]
3485
- }, ".card.__jsx-style-dynamic-selector{background:".concat(theme.palette.background, ";-webkit-transition:all 0.2s ease;transition:all 0.2s ease;border-radius:").concat(theme.layout.radius, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";box-sizing:border-box;color:").concat(color, ";background-color:").concat(bgColor, ";border:1px solid ").concat(borderColor, ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.card.__jsx-style-dynamic-selector:hover{box-shadow:").concat(hoverShadow, ";}.card.__jsx-style-dynamic-selector img{width:100%;}.card.__jsx-style-dynamic-selector .image{border-bottom-left-radius:0;border-bottom-right-radius:0;}")));
1365
+ dynamic: [theme$1.palette.background, theme$1.layout.radius, shadow ? theme$1.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]
1366
+ }, ".card.__jsx-style-dynamic-selector{background:".concat(theme$1.palette.background, ";-webkit-transition:all 0.2s ease;transition:all 0.2s ease;border-radius:").concat(theme$1.layout.radius, ";box-shadow:").concat(shadow ? theme$1.expressiveness.shadowSmall : 'none', ";box-sizing:border-box;color:").concat(color, ";background-color:").concat(bgColor, ";border:1px solid ").concat(borderColor, ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.card.__jsx-style-dynamic-selector:hover{box-shadow:").concat(hoverShadow, ";}.card.__jsx-style-dynamic-selector img{width:100%;}.card.__jsx-style-dynamic-selector .image{border-bottom-left-radius:0;border-bottom-right-radius:0;}")));
3486
1367
  };
3487
1368
  CardComponent.displayName = 'Card';
3488
1369
  var Card = withScale(CardComponent);