@helpdice/ui 1.6.0 → 1.6.1

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.
@@ -2641,526 +2641,7 @@ var SelectOption = withScale(SelectOptionComponent);
2641
2641
 
2642
2642
  Select.Option = SelectOption;
2643
2643
 
2644
- var ButtonDrip = function ButtonDrip(_ref) {
2645
- var _ref$x = _ref.x,
2646
- x = _ref$x === void 0 ? 0 : _ref$x,
2647
- _ref$y = _ref.y,
2648
- y = _ref$y === void 0 ? 0 : _ref$y,
2649
- color = _ref.color,
2650
- onCompleted = _ref.onCompleted;
2651
- var dripRef = React.useRef(null);
2652
- /* istanbul ignore next */
2653
- var top = Number.isNaN(+y) ? 0 : y - 10;
2654
- /* istanbul ignore next */
2655
- var left = Number.isNaN(+x) ? 0 : x - 10;
2656
- React.useEffect(function () {
2657
- /* istanbul ignore next */
2658
- if (!dripRef.current) return;
2659
- dripRef.current.addEventListener('animationend', onCompleted);
2660
- return function () {
2661
- /* istanbul ignore next */
2662
- if (!dripRef.current) return;
2663
- dripRef.current.removeEventListener('animationend', onCompleted);
2664
- };
2665
- });
2666
- return /*#__PURE__*/React.createElement("div", {
2667
- ref: dripRef,
2668
- className: "jsx-3424889537" + " " + "drip"
2669
- }, /*#__PURE__*/React.createElement("svg", {
2670
- width: "20",
2671
- height: "20",
2672
- viewBox: "0 0 20 20",
2673
- style: {
2674
- top: top,
2675
- left: left
2676
- },
2677
- className: "jsx-3424889537"
2678
- }, /*#__PURE__*/React.createElement("g", {
2679
- stroke: "none",
2680
- strokeWidth: "1",
2681
- fill: "none",
2682
- fillRule: "evenodd",
2683
- className: "jsx-3424889537"
2684
- }, /*#__PURE__*/React.createElement("g", {
2685
- fill: color,
2686
- className: "jsx-3424889537"
2687
- }, /*#__PURE__*/React.createElement("rect", {
2688
- width: "100%",
2689
- height: "100%",
2690
- rx: "10",
2691
- className: "jsx-3424889537"
2692
- })))), /*#__PURE__*/React.createElement(_JSXStyle, {
2693
- id: "3424889537"
2694
- }, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
2695
- };
2696
- ButtonDrip.displayName = 'ButtonDrip';
2697
-
2698
- var _excluded$c = ["children", "type", "color", "className", "spaceRatio"];
2699
- var getIconBgColor = function getIconBgColor(type, palette, color) {
2700
- var colors = {
2701
- "default": palette.accents_6,
2702
- secondary: palette.secondary,
2703
- success: palette.success,
2704
- warning: palette.warning,
2705
- error: palette.error
2706
- };
2707
- return color ? color : colors[type];
2708
- };
2709
- var LoadingComponent = function LoadingComponent(_ref) {
2710
- var children = _ref.children,
2711
- _ref$type = _ref.type,
2712
- type = _ref$type === void 0 ? 'default' : _ref$type,
2713
- color = _ref.color,
2714
- _ref$className = _ref.className,
2715
- className = _ref$className === void 0 ? '' : _ref$className,
2716
- _ref$spaceRatio = _ref.spaceRatio,
2717
- spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
2718
- props = _objectWithoutProperties(_ref, _excluded$c);
2719
- var theme = useTheme();
2720
- var _useScale = useScale(),
2721
- SCALES = _useScale.SCALES;
2722
- var classes = useClasses('loading-container', className);
2723
- var bgColor = React.useMemo(function () {
2724
- return getIconBgColor(type, theme.palette, color);
2725
- }, [type, theme.palette, color]);
2726
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
2727
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
2728
- }), /*#__PURE__*/React.createElement("span", {
2729
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
2730
- }, children && /*#__PURE__*/React.createElement("label", {
2731
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
2732
- }, children), /*#__PURE__*/React.createElement("i", {
2733
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
2734
- }), /*#__PURE__*/React.createElement("i", {
2735
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
2736
- }), /*#__PURE__*/React.createElement("i", {
2737
- className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
2738
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
2739
- id: "2201634259",
2740
- dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
2741
- }, ".loading-container.__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;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;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), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
2742
- };
2743
- LoadingComponent.displayName = 'Loading';
2744
- var Loading = withScale(LoadingComponent);
2745
-
2746
- var ButtonLoading = function ButtonLoading(_ref) {
2747
- var color = _ref.color;
2748
- return /*#__PURE__*/React.createElement("div", {
2749
- className: "jsx-212623367" + " " + "btn-loading"
2750
- }, /*#__PURE__*/React.createElement(Loading, {
2751
- color: color
2752
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
2753
- id: "212623367"
2754
- }, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
2755
- };
2756
- ButtonLoading.displayName = 'GeistButtonLoading';
2757
-
2758
- var _excluded$b = ["isRight", "isSingle", "children", "className"];
2759
- var ButtonIcon = function ButtonIcon(_ref) {
2760
- var _ref$isRight = _ref.isRight,
2761
- isRight = _ref$isRight === void 0 ? false : _ref$isRight,
2762
- isSingle = _ref.isSingle,
2763
- children = _ref.children,
2764
- _ref$className = _ref.className,
2765
- className = _ref$className === void 0 ? '' : _ref$className,
2766
- props = _objectWithoutProperties(_ref, _excluded$b);
2767
- var classes = useClasses('icon', {
2768
- right: isRight,
2769
- single: isSingle
2770
- }, className);
2771
- return /*#__PURE__*/React.createElement("span", _extends({}, props, {
2772
- className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
2773
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
2774
- id: "2467502931"
2775
- }, ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
2776
- };
2777
- ButtonIcon.displayName = 'ButtonIcon';
2778
-
2779
- var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
2780
- var icon = icons.icon,
2781
- iconRight = icons.iconRight;
2782
- var hasIcon = icon || iconRight;
2783
- var isRight = Boolean(iconRight);
2784
- var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
2785
- var classes = useClasses('text', isRight ? 'right' : 'left');
2786
- if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
2787
- className: "text"
2788
- }, children);
2789
- if (React.Children.count(children) === 0) {
2790
- return /*#__PURE__*/React.createElement(ButtonIcon, {
2791
- isRight: isRight,
2792
- isSingle: true
2793
- }, hasIcon);
2794
- }
2795
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
2796
- isRight: isRight
2797
- }, hasIcon), /*#__PURE__*/React.createElement("div", {
2798
- className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
2799
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
2800
- id: "3568181479",
2801
- dynamic: [paddingForAutoMode, paddingForAutoMode]
2802
- }, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
2803
- };
2804
- var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
2805
- if (!config.isButtonGroup) return props;
2806
- return _objectSpread2(_objectSpread2({}, props), {}, {
2807
- auto: true,
2808
- shadow: false,
2809
- ghost: config.ghost || props.ghost,
2810
- type: config.type || props.type,
2811
- disabled: config.disabled || props.disabled
2812
- });
2813
- };
2814
-
2815
- /* "use client" */
2816
-
2817
- var defaultContext$3 = {
2818
- isButtonGroup: false,
2819
- disabled: false
2820
- };
2821
- var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext$3);
2822
- var useButtonGroupContext = function useButtonGroupContext() {
2823
- return React.useContext(ButtonGroupContext);
2824
- };
2825
-
2826
- var hexToRgb = function hexToRgb(color) {
2827
- var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
2828
- var full = color.replace(fullReg, function (_, r, g, b) {
2829
- return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
2830
- });
2831
- var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
2832
- if (!values) {
2833
- throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
2834
- }
2835
- return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
2836
- };
2837
- var colorToRgbValues = function colorToRgbValues(color) {
2838
- if (color.charAt(0) === '#') return hexToRgb(color);
2839
- var safeColor = color.replace(/ /g, '');
2840
- var colorType = color.substr(0, 4);
2841
- var regArray = safeColor.match(/\((.+)\)/);
2842
- if (!colorType.startsWith('rgb') || !regArray) {
2843
- console.log(color);
2844
- throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
2845
- }
2846
- return regArray[1].split(',').map(function (str) {
2847
- return Number.parseFloat(str);
2848
- });
2849
- };
2850
- var addColorAlpha = function addColorAlpha(color, alpha) {
2851
- if (!/^#|rgb|RGB/.test(color)) return color;
2852
- var _colorToRgbValues = colorToRgbValues(color),
2853
- _colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
2854
- r = _colorToRgbValues2[0],
2855
- g = _colorToRgbValues2[1],
2856
- b = _colorToRgbValues2[2];
2857
- var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
2858
- return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
2859
- };
2860
-
2861
- var getButtonGhostColors = function getButtonGhostColors(palette, type) {
2862
- var colors = {
2863
- secondary: {
2864
- bg: palette.background,
2865
- border: palette.foreground,
2866
- color: palette.foreground
2867
- },
2868
- success: {
2869
- bg: palette.background,
2870
- border: palette.success,
2871
- color: palette.success
2872
- },
2873
- warning: {
2874
- bg: palette.background,
2875
- border: palette.warning,
2876
- color: palette.warning
2877
- },
2878
- error: {
2879
- bg: palette.background,
2880
- border: palette.error,
2881
- color: palette.error
2882
- }
2883
- };
2884
- return colors[type] || null;
2885
- };
2886
- var getButtonColors = function getButtonColors(palette, props) {
2887
- var type = props.type,
2888
- disabled = props.disabled,
2889
- ghost = props.ghost;
2890
- var colors = {
2891
- "default": {
2892
- bg: palette.background,
2893
- border: palette.border,
2894
- color: palette.accents_5
2895
- },
2896
- secondary: {
2897
- bg: palette.foreground,
2898
- border: palette.foreground,
2899
- color: palette.background
2900
- },
2901
- success: {
2902
- bg: palette.success,
2903
- border: palette.success,
2904
- color: '#fff'
2905
- },
2906
- warning: {
2907
- bg: palette.warning,
2908
- border: palette.warning,
2909
- color: '#fff'
2910
- },
2911
- error: {
2912
- bg: palette.error,
2913
- border: palette.error,
2914
- color: '#fff'
2915
- },
2916
- abort: {
2917
- bg: 'transparent',
2918
- border: 'transparent',
2919
- color: palette.accents_5
2920
- }
2921
- };
2922
- if (disabled) return {
2923
- bg: palette.accents_1,
2924
- border: palette.accents_2,
2925
- color: '#ccc'
2926
- };
2927
-
2928
- /**
2929
- * The '-light' type is the same color as the common type,
2930
- * only hover's color is different.
2931
- * e.g.
2932
- * Color['success'] === Color['success-light']
2933
- * Color['warning'] === Color['warning-light']
2934
- */
2935
- var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
2936
- var defaultColor = colors["default"];
2937
- if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
2938
- return colors[withoutLightType] || defaultColor;
2939
- };
2940
- var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
2941
- var colors = {
2942
- secondary: {
2943
- bg: palette.foreground,
2944
- border: palette.background,
2945
- color: palette.background
2946
- },
2947
- success: {
2948
- bg: palette.success,
2949
- border: palette.background,
2950
- color: 'white'
2951
- },
2952
- warning: {
2953
- bg: palette.warning,
2954
- border: palette.background,
2955
- color: 'white'
2956
- },
2957
- error: {
2958
- bg: palette.error,
2959
- border: palette.background,
2960
- color: 'white'
2961
- }
2962
- };
2963
- var withoutLightType = type.replace('-light', '');
2964
- return colors[withoutLightType] || null;
2965
- };
2966
- var getButtonHoverColors = function getButtonHoverColors(palette, props) {
2967
- var type = props.type,
2968
- disabled = props.disabled,
2969
- loading = props.loading,
2970
- shadow = props.shadow,
2971
- ghost = props.ghost;
2972
- var defaultColor = getButtonColors(palette, props);
2973
- var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
2974
- var colors = {
2975
- "default": {
2976
- bg: palette.background,
2977
- border: palette.foreground
2978
- },
2979
- secondary: {
2980
- bg: palette.background,
2981
- border: palette.foreground
2982
- },
2983
- success: {
2984
- bg: palette.background,
2985
- border: palette.success
2986
- },
2987
- warning: {
2988
- bg: palette.background,
2989
- border: palette.warning
2990
- },
2991
- error: {
2992
- bg: palette.background,
2993
- border: palette.error
2994
- },
2995
- abort: {
2996
- bg: 'transparent',
2997
- border: 'transparent',
2998
- color: palette.accents_5
2999
- },
3000
- 'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
3001
- bg: alphaBackground
3002
- }),
3003
- 'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
3004
- bg: alphaBackground
3005
- }),
3006
- 'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
3007
- bg: alphaBackground
3008
- }),
3009
- 'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
3010
- bg: alphaBackground
3011
- })
3012
- };
3013
- if (disabled) return {
3014
- bg: palette.accents_1,
3015
- border: palette.accents_2,
3016
- color: '#ccc'
3017
- };
3018
- if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
3019
- color: 'transparent'
3020
- });
3021
- if (shadow) return defaultColor;
3022
- var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
3023
- return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
3024
- color: hoverColor.color || hoverColor.border
3025
- });
3026
- };
3027
- var getButtonCursor = function getButtonCursor(disabled, loading) {
3028
- if (disabled) return {
3029
- cursor: 'not-allowed',
3030
- events: 'auto'
3031
- };
3032
- if (loading) return {
3033
- cursor: 'default',
3034
- events: 'none'
3035
- };
3036
- return {
3037
- cursor: 'pointer',
3038
- events: 'auto'
3039
- };
3040
- };
3041
- var getButtonDripColor = function getButtonDripColor(palette, props) {
3042
- var type = props.type;
3043
- var isLightHover = type ? type.endsWith('light') : false;
3044
- var hoverColors = getButtonHoverColors(palette, props);
3045
- return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
3046
- };
3047
-
3048
- var _excluded$a = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
3049
- var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
3050
- var theme = useTheme();
3051
- var _useScale = useScale(),
3052
- SCALES = _useScale.SCALES;
3053
- var buttonRef = React.useRef(null);
3054
- React.useImperativeHandle(ref, function () {
3055
- return buttonRef.current;
3056
- });
3057
- var _useState = React.useState(false),
3058
- _useState2 = _slicedToArray(_useState, 2),
3059
- dripShow = _useState2[0],
3060
- setDripShow = _useState2[1];
3061
- var _useState3 = React.useState(0),
3062
- _useState4 = _slicedToArray(_useState3, 2),
3063
- dripX = _useState4[0],
3064
- setDripX = _useState4[1];
3065
- var _useState5 = React.useState(0),
3066
- _useState6 = _slicedToArray(_useState5, 2),
3067
- dripY = _useState6[0],
3068
- setDripY = _useState6[1];
3069
- var groupConfig = useButtonGroupContext();
3070
- var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
3071
- /* eslint-disable @typescript-eslint/no-unused-vars */
3072
- var children = filteredProps.children,
3073
- _filteredProps$disabl = filteredProps.disabled,
3074
- disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
3075
- filteredProps.type;
3076
- var _filteredProps$loadin = filteredProps.loading,
3077
- loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
3078
- _filteredProps$shadow = filteredProps.shadow,
3079
- shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
3080
- _filteredProps$ghost = filteredProps.ghost,
3081
- ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
3082
- _filteredProps$effect = filteredProps.effect,
3083
- effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
3084
- _filteredProps$round = filteredProps.round,
3085
- round = _filteredProps$round === void 0 ? false : _filteredProps$round,
3086
- onClick = filteredProps.onClick,
3087
- _filteredProps$auto = filteredProps.auto,
3088
- auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
3089
- icon = filteredProps.icon,
3090
- _filteredProps$htmlTy = filteredProps.htmlType,
3091
- htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
3092
- iconRight = filteredProps.iconRight,
3093
- _filteredProps$classN = filteredProps.className,
3094
- className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
3095
- filteredProps.crossOrigin;
3096
- var props = _objectWithoutProperties(filteredProps, _excluded$a);
3097
- /* eslint-enable @typescript-eslint/no-unused-vars */
3098
-
3099
- var _useMemo = React.useMemo(function () {
3100
- return getButtonColors(theme.palette, filteredProps);
3101
- }, [theme.palette, filteredProps]),
3102
- bg = _useMemo.bg,
3103
- border = _useMemo.border,
3104
- color = _useMemo.color;
3105
- var hover = React.useMemo(function () {
3106
- return getButtonHoverColors(theme.palette, filteredProps);
3107
- }, [theme.palette, filteredProps]);
3108
- var _useMemo2 = React.useMemo(function () {
3109
- return getButtonCursor(disabled, loading);
3110
- }, [disabled, loading]),
3111
- cursor = _useMemo2.cursor,
3112
- events = _useMemo2.events;
3113
- var dripColor = React.useMemo(function () {
3114
- return getButtonDripColor(theme.palette, filteredProps);
3115
- }, [theme.palette, filteredProps]);
3116
-
3117
- /* istanbul ignore next */
3118
- var dripCompletedHandle = function dripCompletedHandle() {
3119
- setDripShow(false);
3120
- setDripX(0);
3121
- setDripY(0);
3122
- };
3123
- var clickHandler = function clickHandler(event) {
3124
- if (disabled || loading) return;
3125
- var showDrip = !shadow && !ghost && effect;
3126
- /* istanbul ignore next */
3127
- if (showDrip && buttonRef.current) {
3128
- var rect = buttonRef.current.getBoundingClientRect();
3129
- setDripShow(true);
3130
- setDripX(event.clientX - rect.left);
3131
- setDripY(event.clientY - rect.top);
3132
- }
3133
- onClick && onClick(event);
3134
- };
3135
- var childrenWithIcon = React.useMemo(function () {
3136
- return getButtonChildrenWithIcon(auto, children, {
3137
- icon: icon,
3138
- iconRight: iconRight
3139
- });
3140
- }, [auto, children, icon, iconRight]);
3141
- var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
3142
- paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
3143
- return /*#__PURE__*/React.createElement("button", _extends({
3144
- ref: buttonRef,
3145
- type: htmlType,
3146
- disabled: disabled,
3147
- onClick: clickHandler
3148
- }, props, {
3149
- className: _JSXStyle.dynamic([["1558010596", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
3150
- }), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
3151
- color: color
3152
- }), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
3153
- x: dripX,
3154
- y: dripY,
3155
- color: dripColor,
3156
- onCompleted: dripCompletedHandle
3157
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
3158
- id: "1558010596",
3159
- dynamic: [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
3160
- }, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
3161
- });
3162
- ButtonComponent.displayName = 'Button';
3163
- var Button = withScale(ButtonComponent);
2644
+ // import Button from '../button'
3164
2645
 
3165
2646
  var makeColgroup = function makeColgroup(width, columns) {
3166
2647
  var unsetWidthCount = columns.filter(function (c) {
@@ -3204,17 +2685,22 @@ var TableHead = function TableHead(props) {
3204
2685
  _React$useState2 = _slicedToArray(_React$useState, 2),
3205
2686
  filters = _React$useState2[0],
3206
2687
  setFilters = _React$useState2[1];
2688
+
2689
+ // const applyFilters = () => {
2690
+ // if (onFilters) {
2691
+ // onFilters(filters);
2692
+ // }
2693
+ // }
2694
+
3207
2695
  var handleFilterChange = function handleFilterChange(name, value) {
3208
2696
  setFilters(function (prevFilters) {
3209
2697
  var updatedFilters = _objectSpread2(_objectSpread2({}, prevFilters), {}, _defineProperty({}, name, value));
2698
+ if (onFilters) {
2699
+ onFilters(filters);
2700
+ }
3210
2701
  return updatedFilters;
3211
2702
  });
3212
2703
  };
3213
- var applyFilters = function applyFilters() {
3214
- if (onFilters) {
3215
- onFilters(filters);
3216
- }
3217
- };
3218
2704
  var generateFilterInputs = function generateFilterInputs() {
3219
2705
  return columns.map(function (col) {
3220
2706
  var _String, _filters$filterName;
@@ -3313,13 +2799,7 @@ var TableHead = function TableHead(props) {
3313
2799
  }, column.text)));
3314
2800
  })), showFilters && /*#__PURE__*/React.createElement("tr", {
3315
2801
  className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
3316
- }, generateFilterInputs(), /*#__PURE__*/React.createElement("th", {
3317
- className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
3318
- }, /*#__PURE__*/React.createElement(Button, {
3319
- onClick: function onClick() {
3320
- return applyFilters();
3321
- }
3322
- }, "Apply")))), /*#__PURE__*/React.createElement(_JSXStyle, {
2802
+ }, generateFilterInputs())), /*#__PURE__*/React.createElement(_JSXStyle, {
3323
2803
  id: "2156261549",
3324
2804
  dynamic: [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]
3325
2805
  }, "thead.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;background-color:#fff;font-size:inherit;".concat(stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", ";}th.__jsx-style-dynamic-selector{padding:0 0.5em;font-size:calc(0.75 * var(--table-font-size));font-weight:normal;text-align:left;-webkit-letter-spacing:0;-moz-letter-spacing:0;-ms-letter-spacing:0;letter-spacing:0;vertical-align:middle;min-height:calc(2.5 * var(--table-font-size));color:").concat(theme.palette.accents_5, ";background:").concat(theme.palette.accents_1, ";border-bottom:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-radius:0;}th.__jsx-style-dynamic-selector:nth-child(1){border-bottom:1px solid ").concat(theme.palette.border, ";border-left:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-left-radius:").concat(theme.layout.radius, ";border-bottom-left-radius:").concat(theme.layout.radius, ";}th.__jsx-style-dynamic-selector:last-child{border-bottom:1px solid ").concat(theme.palette.border, ";border-right:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-right-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";}.thead-box.__jsx-style-dynamic-selector{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-align:center;min-height:calc(2.5 * var(--table-font-size));text-transform:uppercase;}")));
@@ -3364,11 +2844,11 @@ var TableCell = function TableCell(_ref) {
3364
2844
 
3365
2845
  /* "use client" */
3366
2846
 
3367
- var defaultContext$2 = {
2847
+ var defaultContext$3 = {
3368
2848
  columns: [],
3369
2849
  updateColumn: function updateColumn() {}
3370
2850
  };
3371
- var TableContext = /*#__PURE__*/React.createContext(defaultContext$2);
2851
+ var TableContext = /*#__PURE__*/React.createContext(defaultContext$3);
3372
2852
  var useTableContext = function useTableContext() {
3373
2853
  return React.useContext(TableContext);
3374
2854
  };
@@ -20886,7 +20366,7 @@ function Empty() {
20886
20366
  }));
20887
20367
  }
20888
20368
 
20889
- var _excluded$9 = ["children", "tag", "className", "type"];
20369
+ var _excluded$c = ["children", "tag", "className", "type"];
20890
20370
  var getTypeColor = function getTypeColor(type, palette) {
20891
20371
  var colors = {
20892
20372
  "default": 'inherit',
@@ -20904,7 +20384,7 @@ var TextChild = function TextChild(_ref) {
20904
20384
  className = _ref$className === void 0 ? '' : _ref$className,
20905
20385
  _ref$type = _ref.type,
20906
20386
  type = _ref$type === void 0 ? 'default' : _ref$type,
20907
- props = _objectWithoutProperties(_ref, _excluded$9);
20387
+ props = _objectWithoutProperties(_ref, _excluded$c);
20908
20388
  var Component = tag;
20909
20389
  var theme = useTheme();
20910
20390
  var _useScale = useScale(),
@@ -20950,7 +20430,7 @@ var TextChild = function TextChild(_ref) {
20950
20430
  };
20951
20431
  TextChild.displayName = 'TextChild';
20952
20432
 
20953
- var _excluded$8 = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "children", "className"];
20433
+ var _excluded$b = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "children", "className"];
20954
20434
  var _getModifierChild = function getModifierChild(tags, children) {
20955
20435
  if (!tags.length) return children;
20956
20436
  var nextTag = tags.slice(1, tags.length);
@@ -20990,7 +20470,7 @@ var TextComponent = function TextComponent(_ref) {
20990
20470
  children = _ref.children,
20991
20471
  _ref$className = _ref.className,
20992
20472
  className = _ref$className === void 0 ? '' : _ref$className,
20993
- props = _objectWithoutProperties(_ref, _excluded$8);
20473
+ props = _objectWithoutProperties(_ref, _excluded$b);
20994
20474
  var elements = {
20995
20475
  h1: h1,
20996
20476
  h2: h2,
@@ -30651,23 +30131,210 @@ const ZoomOut = ({ color, strokeWidth, set }) => {
30651
30131
  React__namespace.createElement("path", { d: "M7 10L13 10", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" })));
30652
30132
  switch (set) {
30653
30133
  case "broken":
30654
- return React__namespace.createElement(Broken, null);
30134
+ return React__namespace.createElement(Broken, null);
30135
+ case "curved":
30136
+ return React__namespace.createElement(Curved, null);
30137
+ case "duotone":
30138
+ return React__namespace.createElement(Duotone, null);
30139
+ case "outline":
30140
+ return React__namespace.createElement(Outline, null);
30141
+ default:
30142
+ return React__namespace.createElement(Outline, null);
30143
+ }
30144
+ };
30145
+ ZoomOut.displayName = "ZoomOut";
30146
+ createIcon(ZoomOut);
30147
+
30148
+ const Github = ({ color, strokeWidth, set }) => {
30149
+ const Outline = () => (React.createElement("g", null,
30150
+ React.createElement("path", { d: "M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0020 4.77 5.07 5.07 0 0019.91 1S18.73.65 16 2.48a13.38 13.38 0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 005 4.77a5.44 5.44 0 00-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 009 18.13V22", stroke: color, strokeWidth: strokeWidth })));
30151
+ switch (set) {
30152
+ case "broken":
30153
+ return "";
30154
+ case "curved":
30155
+ return "";
30156
+ case "duotone":
30157
+ return "";
30158
+ case "outline":
30159
+ return React.createElement(Outline, null);
30160
+ default:
30161
+ return React.createElement(Outline, null);
30162
+ }
30163
+ };
30164
+ Github.displayName = "Github";
30165
+ createIcon(Github);
30166
+
30167
+ const CodeSandbox = ({ color, strokeWidth, set }) => {
30168
+ const Outline = () => (React.createElement("g", null,
30169
+ React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
30170
+ React.createElement("path", { d: "M7.5 4.21l4.5 2.6 4.5-2.6", stroke: color, strokeWidth: strokeWidth }),
30171
+ React.createElement("path", { d: "M7.5 19.79V14.6L3 12", stroke: color, strokeWidth: strokeWidth }),
30172
+ React.createElement("path", { d: "M21 12l-4.5 2.6v5.19", stroke: color, strokeWidth: strokeWidth }),
30173
+ React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
30174
+ React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
30175
+ switch (set) {
30176
+ case "broken":
30177
+ return "";
30178
+ case "curved":
30179
+ return "";
30180
+ case "duotone":
30181
+ return "";
30182
+ case "outline":
30183
+ return React.createElement(Outline, null);
30184
+ default:
30185
+ return React.createElement(Outline, null);
30186
+ }
30187
+ };
30188
+ CodeSandbox.displayName = "CodeSandbox";
30189
+ createIcon(CodeSandbox);
30190
+
30191
+ const FileFunctionFill = ({ color, strokeWidth, set }) => {
30192
+ const Outline = () => (React.createElement("g", null,
30193
+ React.createElement("path", { d: "M4.055 2.055A2.75 2.75 0 016 1.25h12A2.75 2.75 0 0120.75 4v16A2.75 2.75 0 0118 22.75H6A2.75 2.75 0 013.25 20V4c0-.73.29-1.429.805-1.945zM15.116 5.31c-1.237-.194-2.29.086-3.02.83-.709.722-.998 1.758-.998 2.844v1.502H9a.75.75 0 100 1.5h2.098v3.22c0 .78-.197 1.257-.48 1.543-.283.284-.773.501-1.618.501a.75.75 0 000 1.5c1.088 0 2.023-.281 2.681-.944.658-.662.918-1.582.918-2.6v-3.22h2.062a.75.75 0 000-1.5h-2.063V8.984c0-.851.229-1.447.567-1.792.315-.32.838-.538 1.719-.4a.75.75 0 00.232-1.482z", stroke: color, strokeWidth: strokeWidth })));
30194
+ switch (set) {
30195
+ case "broken":
30196
+ return "";
30197
+ case "curved":
30198
+ return "";
30199
+ case "duotone":
30200
+ return "";
30201
+ case "outline":
30202
+ return React.createElement(Outline, null);
30203
+ default:
30204
+ return React.createElement(Outline, null);
30205
+ }
30206
+ };
30207
+ FileFunctionFill.displayName = "FileFunctionFill";
30208
+ createIcon(FileFunctionFill);
30209
+
30210
+ const Lambda = ({ color, strokeWidth, set }) => {
30211
+ const Outline = () => (React.createElement("g", null,
30212
+ React.createElement("path", { d: "M1.99799968,0.500003998 C1.78162411,0.500869509 1.63364907,0.642137248 1.63364907,0.814271399 C1.63364907,0.985218642 1.78032508,1.1285428 1.97131342,1.12856172 L2.19867872,1.13056263 C3.10118421,1.14702589 3.60939673,1.26556347 4.03249851,1.568379 C4.44848628,1.86630467 4.81555118,2.36599046 5.30914132,3.29234706 L5.53635444,3.7319218 L7.127422,7.27537654 L6.98962107,7.5004737 L0.544625394,18.0283431 C0.486884418,18.1227208 0.485083442,18.2383317 0.539767758,18.3342249 C0.596620657,18.4339208 0.706568325,18.4981484 0.828403729,18.4999606 C0.950391011,18.501775 1.0625816,18.4406875 1.12276173,18.342323 L7.45742934,7.99500773 L7.84867238,8.84715959 L10.8910664,15.4738335 L11.3866691,16.600051 L11.4963288,16.8355567 C11.6974732,17.2598124 11.8703886,17.5497167 12.0716373,17.7798218 C12.5006231,18.2692457 13.0516354,18.4715747 13.9517354,18.4967326 L14.1338876,18.5007429 L14.2140555,18.4965687 C14.3788402,18.4747246 14.5,18.3402281 14.5,18.1853946 C14.5,18.0144473 14.353324,17.8711232 14.159766,17.8710753 L13.9667577,17.8683457 C13.23949,17.8471739 12.8730841,17.7079192 12.5747116,17.3670263 L12.5148848,17.2937701 C12.3862775,17.1267414 12.2591138,16.9035538 12.1043882,16.5789995 C12.0565097,16.4787037 12.0069781,16.3709095 11.9496307,16.2425932 L11.5034339,15.2259235 L7.80746029,7.17411382 L6.14520282,3.47634226 L5.9868176,3.16569971 C5.41304784,2.06259444 4.97093878,1.45201729 4.43388865,1.06822222 C3.88266741,0.671861393 3.24308245,0.52047405 2.2259303,0.50220525 L1.99799968,0.500003998 Z", transform: "translate(5 3)", stroke: color, strokeWidth: strokeWidth })));
30213
+ switch (set) {
30214
+ case "broken":
30215
+ return "";
30216
+ case "curved":
30217
+ return "";
30218
+ case "duotone":
30219
+ return "";
30220
+ case "outline":
30221
+ return React.createElement(Outline, null);
30222
+ default:
30223
+ return React.createElement(Outline, null);
30224
+ }
30225
+ };
30226
+ Lambda.displayName = "Lambda";
30227
+ createIcon(Lambda);
30228
+
30229
+ const Layout = ({ color, strokeWidth, set }) => {
30230
+ const Outline = () => (React.createElement("g", null,
30231
+ React.createElement("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
30232
+ React.createElement("path", { d: "M3 9h18", stroke: color, strokeWidth: strokeWidth }),
30233
+ React.createElement("path", { d: "M9 21V9", stroke: color, strokeWidth: strokeWidth })));
30234
+ switch (set) {
30235
+ case "broken":
30236
+ return "";
30237
+ case "curved":
30238
+ return "";
30239
+ case "duotone":
30240
+ return "";
30241
+ case "outline":
30242
+ return React.createElement(Outline, null);
30243
+ default:
30244
+ return React.createElement(Outline, null);
30245
+ }
30246
+ };
30247
+ Layout.displayName = "Layout";
30248
+ createIcon(Layout);
30249
+
30250
+ const Menu = ({ color, strokeWidth, set }) => {
30251
+ const Outline = () => (React.createElement("g", null,
30252
+ React.createElement("path", { d: "M3 12h18", stroke: color, strokeWidth: strokeWidth }),
30253
+ React.createElement("path", { d: "M3 6h18", stroke: color, strokeWidth: strokeWidth }),
30254
+ React.createElement("path", { d: "M3 18h18", stroke: color, strokeWidth: strokeWidth })));
30255
+ switch (set) {
30256
+ case "broken":
30257
+ return "";
30258
+ case "curved":
30259
+ return "";
30260
+ case "duotone":
30261
+ return "";
30262
+ case "outline":
30263
+ return React.createElement(Outline, null);
30264
+ default:
30265
+ return React.createElement(Outline, null);
30266
+ }
30267
+ };
30268
+ Menu.displayName = "Menu";
30269
+ createIcon(Menu);
30270
+
30271
+ const Box = ({ color, strokeWidth, set }) => {
30272
+ const Outline = () => (React.createElement("g", null,
30273
+ React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
30274
+ React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
30275
+ React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
30276
+ switch (set) {
30277
+ case "broken":
30278
+ return "";
30279
+ case "curved":
30280
+ return "";
30281
+ case "duotone":
30282
+ return "";
30283
+ case "outline":
30284
+ return React.createElement(Outline, null);
30285
+ default:
30286
+ return React.createElement(Outline, null);
30287
+ }
30288
+ };
30289
+ Box.displayName = "Box";
30290
+ createIcon(Box);
30291
+
30292
+ const Database = ({ color, strokeWidth, set }) => {
30293
+ const Outline = () => (React.createElement("g", null,
30294
+ React.createElement("ellipse", { stroke: color, strokeWidth: strokeWidth, cx: "12", cy: "5", rx: "9", ry: "3" }),
30295
+ React.createElement("path", { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3", stroke: color, strokeWidth: strokeWidth }),
30296
+ React.createElement("path", { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5", stroke: color, strokeWidth: strokeWidth })));
30297
+ switch (set) {
30298
+ case "broken":
30299
+ return "";
30300
+ case "curved":
30301
+ return "";
30302
+ case "duotone":
30303
+ return "";
30304
+ case "outline":
30305
+ return React.createElement(Outline, null);
30306
+ default:
30307
+ return React.createElement(Outline, null);
30308
+ }
30309
+ };
30310
+ Database.displayName = "Database";
30311
+ createIcon(Database);
30312
+
30313
+ const RotateCcw = ({ color, strokeWidth, set }) => {
30314
+ const Outline = () => (React.createElement("g", null,
30315
+ React.createElement("path", { d: "M1 4v6h6", stroke: color, strokeWidth: strokeWidth }),
30316
+ React.createElement("path", { d: "M3.51 15a9 9 0 102.13-9.36L1 10", stroke: color, strokeWidth: strokeWidth })));
30317
+ switch (set) {
30318
+ case "broken":
30319
+ return "";
30655
30320
  case "curved":
30656
- return React__namespace.createElement(Curved, null);
30321
+ return "";
30657
30322
  case "duotone":
30658
- return React__namespace.createElement(Duotone, null);
30323
+ return "";
30659
30324
  case "outline":
30660
- return React__namespace.createElement(Outline, null);
30325
+ return React.createElement(Outline, null);
30661
30326
  default:
30662
- return React__namespace.createElement(Outline, null);
30327
+ return React.createElement(Outline, null);
30663
30328
  }
30664
30329
  };
30665
- ZoomOut.displayName = "ZoomOut";
30666
- createIcon(ZoomOut);
30330
+ RotateCcw.displayName = "RotateCcw";
30331
+ createIcon(RotateCcw);
30667
30332
 
30668
- const Github = ({ color, strokeWidth, set }) => {
30333
+ const Type = ({ color, strokeWidth, set }) => {
30669
30334
  const Outline = () => (React.createElement("g", null,
30670
- React.createElement("path", { d: "M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0020 4.77 5.07 5.07 0 0019.91 1S18.73.65 16 2.48a13.38 13.38 0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 005 4.77a5.44 5.44 0 00-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 009 18.13V22", stroke: color, strokeWidth: strokeWidth })));
30335
+ React.createElement("path", { d: "M4 7V4h16v3", stroke: color, strokeWidth: strokeWidth }),
30336
+ React.createElement("path", { d: "M9 20h6", stroke: color, strokeWidth: strokeWidth }),
30337
+ React.createElement("path", { d: "M12 4v16", stroke: color, strokeWidth: strokeWidth })));
30671
30338
  switch (set) {
30672
30339
  case "broken":
30673
30340
  return "";
@@ -30681,17 +30348,15 @@ const Github = ({ color, strokeWidth, set }) => {
30681
30348
  return React.createElement(Outline, null);
30682
30349
  }
30683
30350
  };
30684
- Github.displayName = "Github";
30685
- createIcon(Github);
30351
+ Type.displayName = "Type";
30352
+ createIcon(Type);
30686
30353
 
30687
- const CodeSandbox = ({ color, strokeWidth, set }) => {
30354
+ const UserX = ({ color, strokeWidth, set }) => {
30688
30355
  const Outline = () => (React.createElement("g", null,
30689
- React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
30690
- React.createElement("path", { d: "M7.5 4.21l4.5 2.6 4.5-2.6", stroke: color, strokeWidth: strokeWidth }),
30691
- React.createElement("path", { d: "M7.5 19.79V14.6L3 12", stroke: color, strokeWidth: strokeWidth }),
30692
- React.createElement("path", { d: "M21 12l-4.5 2.6v5.19", stroke: color, strokeWidth: strokeWidth }),
30693
- React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
30694
- React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
30356
+ React.createElement("path", { d: "M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2", stroke: color, strokeWidth: strokeWidth }),
30357
+ React.createElement("circle", { cx: "8.5", cy: "7", r: "4", stroke: color, strokeWidth: strokeWidth }),
30358
+ React.createElement("path", { d: "M18 8l5 5", stroke: color, strokeWidth: strokeWidth }),
30359
+ React.createElement("path", { d: "M23 8l-5 5", stroke: color, strokeWidth: strokeWidth })));
30695
30360
  switch (set) {
30696
30361
  case "broken":
30697
30362
  return "";
@@ -30705,12 +30370,12 @@ const CodeSandbox = ({ color, strokeWidth, set }) => {
30705
30370
  return React.createElement(Outline, null);
30706
30371
  }
30707
30372
  };
30708
- CodeSandbox.displayName = "CodeSandbox";
30709
- createIcon(CodeSandbox);
30373
+ UserX.displayName = "UserX";
30374
+ createIcon(UserX);
30710
30375
 
30711
- const FileFunctionFill = ({ color, strokeWidth, set }) => {
30376
+ const Columns = ({ color, strokeWidth, set }) => {
30712
30377
  const Outline = () => (React.createElement("g", null,
30713
- React.createElement("path", { d: "M4.055 2.055A2.75 2.75 0 016 1.25h12A2.75 2.75 0 0120.75 4v16A2.75 2.75 0 0118 22.75H6A2.75 2.75 0 013.25 20V4c0-.73.29-1.429.805-1.945zM15.116 5.31c-1.237-.194-2.29.086-3.02.83-.709.722-.998 1.758-.998 2.844v1.502H9a.75.75 0 100 1.5h2.098v3.22c0 .78-.197 1.257-.48 1.543-.283.284-.773.501-1.618.501a.75.75 0 000 1.5c1.088 0 2.023-.281 2.681-.944.658-.662.918-1.582.918-2.6v-3.22h2.062a.75.75 0 000-1.5h-2.063V8.984c0-.851.229-1.447.567-1.792.315-.32.838-.538 1.719-.4a.75.75 0 00.232-1.482z", stroke: color, strokeWidth: strokeWidth })));
30378
+ React.createElement("path", { d: "M12 3h7a2 2 0 012 2v14a2 2 0 01-2 2h-7m0-18H5a2 2 0 00-2 2v14a2 2 0 002 2h7m0-18v18", stroke: color, strokeWidth: strokeWidth })));
30714
30379
  switch (set) {
30715
30380
  case "broken":
30716
30381
  return "";
@@ -30724,12 +30389,12 @@ const FileFunctionFill = ({ color, strokeWidth, set }) => {
30724
30389
  return React.createElement(Outline, null);
30725
30390
  }
30726
30391
  };
30727
- FileFunctionFill.displayName = "FileFunctionFill";
30728
- createIcon(FileFunctionFill);
30392
+ Columns.displayName = "Columns";
30393
+ var Columns$1 = createIcon(Columns);
30729
30394
 
30730
- const Lambda = ({ color, strokeWidth, set }) => {
30395
+ const Folder = ({ color, strokeWidth, set }) => {
30731
30396
  const Outline = () => (React.createElement("g", null,
30732
- React.createElement("path", { d: "M1.99799968,0.500003998 C1.78162411,0.500869509 1.63364907,0.642137248 1.63364907,0.814271399 C1.63364907,0.985218642 1.78032508,1.1285428 1.97131342,1.12856172 L2.19867872,1.13056263 C3.10118421,1.14702589 3.60939673,1.26556347 4.03249851,1.568379 C4.44848628,1.86630467 4.81555118,2.36599046 5.30914132,3.29234706 L5.53635444,3.7319218 L7.127422,7.27537654 L6.98962107,7.5004737 L0.544625394,18.0283431 C0.486884418,18.1227208 0.485083442,18.2383317 0.539767758,18.3342249 C0.596620657,18.4339208 0.706568325,18.4981484 0.828403729,18.4999606 C0.950391011,18.501775 1.0625816,18.4406875 1.12276173,18.342323 L7.45742934,7.99500773 L7.84867238,8.84715959 L10.8910664,15.4738335 L11.3866691,16.600051 L11.4963288,16.8355567 C11.6974732,17.2598124 11.8703886,17.5497167 12.0716373,17.7798218 C12.5006231,18.2692457 13.0516354,18.4715747 13.9517354,18.4967326 L14.1338876,18.5007429 L14.2140555,18.4965687 C14.3788402,18.4747246 14.5,18.3402281 14.5,18.1853946 C14.5,18.0144473 14.353324,17.8711232 14.159766,17.8710753 L13.9667577,17.8683457 C13.23949,17.8471739 12.8730841,17.7079192 12.5747116,17.3670263 L12.5148848,17.2937701 C12.3862775,17.1267414 12.2591138,16.9035538 12.1043882,16.5789995 C12.0565097,16.4787037 12.0069781,16.3709095 11.9496307,16.2425932 L11.5034339,15.2259235 L7.80746029,7.17411382 L6.14520282,3.47634226 L5.9868176,3.16569971 C5.41304784,2.06259444 4.97093878,1.45201729 4.43388865,1.06822222 C3.88266741,0.671861393 3.24308245,0.52047405 2.2259303,0.50220525 L1.99799968,0.500003998 Z", transform: "translate(5 3)", stroke: color, strokeWidth: strokeWidth })));
30397
+ React.createElement("path", { d: "M2.707 7.454V5.62C2.707 4.725 3.469 4 4.409 4h4.843c.451 0 .884.17 1.204.474l.49.467c.126.12.296.186.473.186h8.399c.94 0 1.55.695 1.55 1.59v.737m-18.661 0h-.354a.344.344 0 00-.353.35l.508 11.587c.015.34.31.609.668.609h17.283c.358 0 .652-.269.667-.61L22 7.805a.344.344 0 00-.353-.35h-.278m-18.662 0h18.662", stroke: color, strokeWidth: strokeWidth })));
30733
30398
  switch (set) {
30734
30399
  case "broken":
30735
30400
  return "";
@@ -30743,14 +30408,13 @@ const Lambda = ({ color, strokeWidth, set }) => {
30743
30408
  return React.createElement(Outline, null);
30744
30409
  }
30745
30410
  };
30746
- Lambda.displayName = "Lambda";
30747
- createIcon(Lambda);
30411
+ Folder.displayName = "Folder";
30412
+ createIcon(Folder);
30748
30413
 
30749
- const Layout = ({ color, strokeWidth, set }) => {
30414
+ const File = ({ color, strokeWidth, set }) => {
30750
30415
  const Outline = () => (React.createElement("g", null,
30751
- React.createElement("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
30752
- React.createElement("path", { d: "M3 9h18", stroke: color, strokeWidth: strokeWidth }),
30753
- React.createElement("path", { d: "M9 21V9", stroke: color, strokeWidth: strokeWidth })));
30416
+ React.createElement("path", { d: "M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z", stroke: color, strokeWidth: strokeWidth }),
30417
+ React.createElement("path", { d: "M13 2v7h7", stroke: color, strokeWidth: strokeWidth })));
30754
30418
  switch (set) {
30755
30419
  case "broken":
30756
30420
  return "";
@@ -30764,14 +30428,14 @@ const Layout = ({ color, strokeWidth, set }) => {
30764
30428
  return React.createElement(Outline, null);
30765
30429
  }
30766
30430
  };
30767
- Layout.displayName = "Layout";
30768
- createIcon(Layout);
30431
+ File.displayName = "File";
30432
+ createIcon(File);
30769
30433
 
30770
- const Menu = ({ color, strokeWidth, set }) => {
30434
+ const Printer = ({ color, strokeWidth, set }) => {
30771
30435
  const Outline = () => (React.createElement("g", null,
30772
- React.createElement("path", { d: "M3 12h18", stroke: color, strokeWidth: strokeWidth }),
30773
- React.createElement("path", { d: "M3 6h18", stroke: color, strokeWidth: strokeWidth }),
30774
- React.createElement("path", { d: "M3 18h18", stroke: color, strokeWidth: strokeWidth })));
30436
+ React.createElement("path", { d: "M6 9V2h12v7", stroke: color, strokeWidth: strokeWidth }),
30437
+ React.createElement("path", { d: "M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2", stroke: color, strokeWidth: strokeWidth }),
30438
+ React.createElement("path", { d: "M6 14h12v8H6z", stroke: color, strokeWidth: strokeWidth })));
30775
30439
  switch (set) {
30776
30440
  case "broken":
30777
30441
  return "";
@@ -30785,14 +30449,13 @@ const Menu = ({ color, strokeWidth, set }) => {
30785
30449
  return React.createElement(Outline, null);
30786
30450
  }
30787
30451
  };
30788
- Menu.displayName = "Menu";
30789
- createIcon(Menu);
30452
+ Printer.displayName = "Printer";
30453
+ createIcon(Printer);
30790
30454
 
30791
- const Box = ({ color, strokeWidth, set }) => {
30455
+ const Lock = ({ color, strokeWidth, set }) => {
30792
30456
  const Outline = () => (React.createElement("g", null,
30793
- React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
30794
- React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
30795
- React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
30457
+ React.createElement("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
30458
+ React.createElement("path", { d: "M7 11V7a5 5 0 0110 0v4", stroke: color, strokeWidth: strokeWidth })));
30796
30459
  switch (set) {
30797
30460
  case "broken":
30798
30461
  return "";
@@ -30806,14 +30469,14 @@ const Box = ({ color, strokeWidth, set }) => {
30806
30469
  return React.createElement(Outline, null);
30807
30470
  }
30808
30471
  };
30809
- Box.displayName = "Box";
30810
- createIcon(Box);
30472
+ Lock.displayName = "Lock";
30473
+ createIcon(Lock);
30811
30474
 
30812
- const Database = ({ color, strokeWidth, set }) => {
30475
+ const HelpCircle = ({ color, strokeWidth, set }) => {
30813
30476
  const Outline = () => (React.createElement("g", null,
30814
- React.createElement("ellipse", { stroke: color, strokeWidth: strokeWidth, cx: "12", cy: "5", rx: "9", ry: "3" }),
30815
- React.createElement("path", { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3", stroke: color, strokeWidth: strokeWidth }),
30816
- React.createElement("path", { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5", stroke: color, strokeWidth: strokeWidth })));
30477
+ React.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: strokeWidth }),
30478
+ React.createElement("path", { d: "M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3", stroke: color, strokeWidth: strokeWidth }),
30479
+ React.createElement("path", { d: "M12 17h.01", stroke: color, strokeWidth: strokeWidth })));
30817
30480
  switch (set) {
30818
30481
  case "broken":
30819
30482
  return "";
@@ -30827,191 +30490,529 @@ const Database = ({ color, strokeWidth, set }) => {
30827
30490
  return React.createElement(Outline, null);
30828
30491
  }
30829
30492
  };
30830
- Database.displayName = "Database";
30831
- createIcon(Database);
30493
+ HelpCircle.displayName = "HelpCircle";
30494
+ createIcon(HelpCircle);
30495
+
30496
+ var ButtonDrip = function ButtonDrip(_ref) {
30497
+ var _ref$x = _ref.x,
30498
+ x = _ref$x === void 0 ? 0 : _ref$x,
30499
+ _ref$y = _ref.y,
30500
+ y = _ref$y === void 0 ? 0 : _ref$y,
30501
+ color = _ref.color,
30502
+ onCompleted = _ref.onCompleted;
30503
+ var dripRef = React.useRef(null);
30504
+ /* istanbul ignore next */
30505
+ var top = Number.isNaN(+y) ? 0 : y - 10;
30506
+ /* istanbul ignore next */
30507
+ var left = Number.isNaN(+x) ? 0 : x - 10;
30508
+ React.useEffect(function () {
30509
+ /* istanbul ignore next */
30510
+ if (!dripRef.current) return;
30511
+ dripRef.current.addEventListener('animationend', onCompleted);
30512
+ return function () {
30513
+ /* istanbul ignore next */
30514
+ if (!dripRef.current) return;
30515
+ dripRef.current.removeEventListener('animationend', onCompleted);
30516
+ };
30517
+ });
30518
+ return /*#__PURE__*/React.createElement("div", {
30519
+ ref: dripRef,
30520
+ className: "jsx-3424889537" + " " + "drip"
30521
+ }, /*#__PURE__*/React.createElement("svg", {
30522
+ width: "20",
30523
+ height: "20",
30524
+ viewBox: "0 0 20 20",
30525
+ style: {
30526
+ top: top,
30527
+ left: left
30528
+ },
30529
+ className: "jsx-3424889537"
30530
+ }, /*#__PURE__*/React.createElement("g", {
30531
+ stroke: "none",
30532
+ strokeWidth: "1",
30533
+ fill: "none",
30534
+ fillRule: "evenodd",
30535
+ className: "jsx-3424889537"
30536
+ }, /*#__PURE__*/React.createElement("g", {
30537
+ fill: color,
30538
+ className: "jsx-3424889537"
30539
+ }, /*#__PURE__*/React.createElement("rect", {
30540
+ width: "100%",
30541
+ height: "100%",
30542
+ rx: "10",
30543
+ className: "jsx-3424889537"
30544
+ })))), /*#__PURE__*/React.createElement(_JSXStyle, {
30545
+ id: "3424889537"
30546
+ }, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
30547
+ };
30548
+ ButtonDrip.displayName = 'ButtonDrip';
30549
+
30550
+ var _excluded$a = ["children", "type", "color", "className", "spaceRatio"];
30551
+ var getIconBgColor = function getIconBgColor(type, palette, color) {
30552
+ var colors = {
30553
+ "default": palette.accents_6,
30554
+ secondary: palette.secondary,
30555
+ success: palette.success,
30556
+ warning: palette.warning,
30557
+ error: palette.error
30558
+ };
30559
+ return color ? color : colors[type];
30560
+ };
30561
+ var LoadingComponent = function LoadingComponent(_ref) {
30562
+ var children = _ref.children,
30563
+ _ref$type = _ref.type,
30564
+ type = _ref$type === void 0 ? 'default' : _ref$type,
30565
+ color = _ref.color,
30566
+ _ref$className = _ref.className,
30567
+ className = _ref$className === void 0 ? '' : _ref$className,
30568
+ _ref$spaceRatio = _ref.spaceRatio,
30569
+ spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
30570
+ props = _objectWithoutProperties(_ref, _excluded$a);
30571
+ var theme = useTheme();
30572
+ var _useScale = useScale(),
30573
+ SCALES = _useScale.SCALES;
30574
+ var classes = useClasses('loading-container', className);
30575
+ var bgColor = React.useMemo(function () {
30576
+ return getIconBgColor(type, theme.palette, color);
30577
+ }, [type, theme.palette, color]);
30578
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
30579
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
30580
+ }), /*#__PURE__*/React.createElement("span", {
30581
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
30582
+ }, children && /*#__PURE__*/React.createElement("label", {
30583
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
30584
+ }, children), /*#__PURE__*/React.createElement("i", {
30585
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
30586
+ }), /*#__PURE__*/React.createElement("i", {
30587
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
30588
+ }), /*#__PURE__*/React.createElement("i", {
30589
+ className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
30590
+ })), /*#__PURE__*/React.createElement(_JSXStyle, {
30591
+ id: "2201634259",
30592
+ dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
30593
+ }, ".loading-container.__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;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;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), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
30594
+ };
30595
+ LoadingComponent.displayName = 'Loading';
30596
+ var Loading = withScale(LoadingComponent);
30597
+
30598
+ var ButtonLoading = function ButtonLoading(_ref) {
30599
+ var color = _ref.color;
30600
+ return /*#__PURE__*/React.createElement("div", {
30601
+ className: "jsx-212623367" + " " + "btn-loading"
30602
+ }, /*#__PURE__*/React.createElement(Loading, {
30603
+ color: color
30604
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
30605
+ id: "212623367"
30606
+ }, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
30607
+ };
30608
+ ButtonLoading.displayName = 'GeistButtonLoading';
30609
+
30610
+ var _excluded$9 = ["isRight", "isSingle", "children", "className"];
30611
+ var ButtonIcon = function ButtonIcon(_ref) {
30612
+ var _ref$isRight = _ref.isRight,
30613
+ isRight = _ref$isRight === void 0 ? false : _ref$isRight,
30614
+ isSingle = _ref.isSingle,
30615
+ children = _ref.children,
30616
+ _ref$className = _ref.className,
30617
+ className = _ref$className === void 0 ? '' : _ref$className,
30618
+ props = _objectWithoutProperties(_ref, _excluded$9);
30619
+ var classes = useClasses('icon', {
30620
+ right: isRight,
30621
+ single: isSingle
30622
+ }, className);
30623
+ return /*#__PURE__*/React.createElement("span", _extends({}, props, {
30624
+ className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
30625
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
30626
+ id: "2467502931"
30627
+ }, ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
30628
+ };
30629
+ ButtonIcon.displayName = 'ButtonIcon';
30630
+
30631
+ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
30632
+ var icon = icons.icon,
30633
+ iconRight = icons.iconRight;
30634
+ var hasIcon = icon || iconRight;
30635
+ var isRight = Boolean(iconRight);
30636
+ var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
30637
+ var classes = useClasses('text', isRight ? 'right' : 'left');
30638
+ if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
30639
+ className: "text"
30640
+ }, children);
30641
+ if (React.Children.count(children) === 0) {
30642
+ return /*#__PURE__*/React.createElement(ButtonIcon, {
30643
+ isRight: isRight,
30644
+ isSingle: true
30645
+ }, hasIcon);
30646
+ }
30647
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
30648
+ isRight: isRight
30649
+ }, hasIcon), /*#__PURE__*/React.createElement("div", {
30650
+ className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
30651
+ }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
30652
+ id: "3568181479",
30653
+ dynamic: [paddingForAutoMode, paddingForAutoMode]
30654
+ }, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
30655
+ };
30656
+ var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
30657
+ if (!config.isButtonGroup) return props;
30658
+ return _objectSpread2(_objectSpread2({}, props), {}, {
30659
+ auto: true,
30660
+ shadow: false,
30661
+ ghost: config.ghost || props.ghost,
30662
+ type: config.type || props.type,
30663
+ disabled: config.disabled || props.disabled
30664
+ });
30665
+ };
30832
30666
 
30833
- const RotateCcw = ({ color, strokeWidth, set }) => {
30834
- const Outline = () => (React.createElement("g", null,
30835
- React.createElement("path", { d: "M1 4v6h6", stroke: color, strokeWidth: strokeWidth }),
30836
- React.createElement("path", { d: "M3.51 15a9 9 0 102.13-9.36L1 10", stroke: color, strokeWidth: strokeWidth })));
30837
- switch (set) {
30838
- case "broken":
30839
- return "";
30840
- case "curved":
30841
- return "";
30842
- case "duotone":
30843
- return "";
30844
- case "outline":
30845
- return React.createElement(Outline, null);
30846
- default:
30847
- return React.createElement(Outline, null);
30848
- }
30667
+ /* "use client" */
30668
+
30669
+ var defaultContext$2 = {
30670
+ isButtonGroup: false,
30671
+ disabled: false
30672
+ };
30673
+ var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext$2);
30674
+ var useButtonGroupContext = function useButtonGroupContext() {
30675
+ return React.useContext(ButtonGroupContext);
30849
30676
  };
30850
- RotateCcw.displayName = "RotateCcw";
30851
- createIcon(RotateCcw);
30852
30677
 
30853
- const Type = ({ color, strokeWidth, set }) => {
30854
- const Outline = () => (React.createElement("g", null,
30855
- React.createElement("path", { d: "M4 7V4h16v3", stroke: color, strokeWidth: strokeWidth }),
30856
- React.createElement("path", { d: "M9 20h6", stroke: color, strokeWidth: strokeWidth }),
30857
- React.createElement("path", { d: "M12 4v16", stroke: color, strokeWidth: strokeWidth })));
30858
- switch (set) {
30859
- case "broken":
30860
- return "";
30861
- case "curved":
30862
- return "";
30863
- case "duotone":
30864
- return "";
30865
- case "outline":
30866
- return React.createElement(Outline, null);
30867
- default:
30868
- return React.createElement(Outline, null);
30869
- }
30678
+ var hexToRgb = function hexToRgb(color) {
30679
+ var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
30680
+ var full = color.replace(fullReg, function (_, r, g, b) {
30681
+ return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
30682
+ });
30683
+ var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
30684
+ if (!values) {
30685
+ throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
30686
+ }
30687
+ return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
30688
+ };
30689
+ var colorToRgbValues = function colorToRgbValues(color) {
30690
+ if (color.charAt(0) === '#') return hexToRgb(color);
30691
+ var safeColor = color.replace(/ /g, '');
30692
+ var colorType = color.substr(0, 4);
30693
+ var regArray = safeColor.match(/\((.+)\)/);
30694
+ if (!colorType.startsWith('rgb') || !regArray) {
30695
+ console.log(color);
30696
+ throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
30697
+ }
30698
+ return regArray[1].split(',').map(function (str) {
30699
+ return Number.parseFloat(str);
30700
+ });
30701
+ };
30702
+ var addColorAlpha = function addColorAlpha(color, alpha) {
30703
+ if (!/^#|rgb|RGB/.test(color)) return color;
30704
+ var _colorToRgbValues = colorToRgbValues(color),
30705
+ _colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
30706
+ r = _colorToRgbValues2[0],
30707
+ g = _colorToRgbValues2[1],
30708
+ b = _colorToRgbValues2[2];
30709
+ var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
30710
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
30870
30711
  };
30871
- Type.displayName = "Type";
30872
- createIcon(Type);
30873
30712
 
30874
- const UserX = ({ color, strokeWidth, set }) => {
30875
- const Outline = () => (React.createElement("g", null,
30876
- React.createElement("path", { d: "M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2", stroke: color, strokeWidth: strokeWidth }),
30877
- React.createElement("circle", { cx: "8.5", cy: "7", r: "4", stroke: color, strokeWidth: strokeWidth }),
30878
- React.createElement("path", { d: "M18 8l5 5", stroke: color, strokeWidth: strokeWidth }),
30879
- React.createElement("path", { d: "M23 8l-5 5", stroke: color, strokeWidth: strokeWidth })));
30880
- switch (set) {
30881
- case "broken":
30882
- return "";
30883
- case "curved":
30884
- return "";
30885
- case "duotone":
30886
- return "";
30887
- case "outline":
30888
- return React.createElement(Outline, null);
30889
- default:
30890
- return React.createElement(Outline, null);
30713
+ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
30714
+ var colors = {
30715
+ secondary: {
30716
+ bg: palette.background,
30717
+ border: palette.foreground,
30718
+ color: palette.foreground
30719
+ },
30720
+ success: {
30721
+ bg: palette.background,
30722
+ border: palette.success,
30723
+ color: palette.success
30724
+ },
30725
+ warning: {
30726
+ bg: palette.background,
30727
+ border: palette.warning,
30728
+ color: palette.warning
30729
+ },
30730
+ error: {
30731
+ bg: palette.background,
30732
+ border: palette.error,
30733
+ color: palette.error
30891
30734
  }
30735
+ };
30736
+ return colors[type] || null;
30892
30737
  };
30893
- UserX.displayName = "UserX";
30894
- createIcon(UserX);
30738
+ var getButtonColors = function getButtonColors(palette, props) {
30739
+ var type = props.type,
30740
+ disabled = props.disabled,
30741
+ ghost = props.ghost;
30742
+ var colors = {
30743
+ "default": {
30744
+ bg: palette.background,
30745
+ border: palette.border,
30746
+ color: palette.accents_5
30747
+ },
30748
+ secondary: {
30749
+ bg: palette.foreground,
30750
+ border: palette.foreground,
30751
+ color: palette.background
30752
+ },
30753
+ success: {
30754
+ bg: palette.success,
30755
+ border: palette.success,
30756
+ color: '#fff'
30757
+ },
30758
+ warning: {
30759
+ bg: palette.warning,
30760
+ border: palette.warning,
30761
+ color: '#fff'
30762
+ },
30763
+ error: {
30764
+ bg: palette.error,
30765
+ border: palette.error,
30766
+ color: '#fff'
30767
+ },
30768
+ abort: {
30769
+ bg: 'transparent',
30770
+ border: 'transparent',
30771
+ color: palette.accents_5
30772
+ }
30773
+ };
30774
+ if (disabled) return {
30775
+ bg: palette.accents_1,
30776
+ border: palette.accents_2,
30777
+ color: '#ccc'
30778
+ };
30895
30779
 
30896
- const Columns = ({ color, strokeWidth, set }) => {
30897
- const Outline = () => (React.createElement("g", null,
30898
- React.createElement("path", { d: "M12 3h7a2 2 0 012 2v14a2 2 0 01-2 2h-7m0-18H5a2 2 0 00-2 2v14a2 2 0 002 2h7m0-18v18", stroke: color, strokeWidth: strokeWidth })));
30899
- switch (set) {
30900
- case "broken":
30901
- return "";
30902
- case "curved":
30903
- return "";
30904
- case "duotone":
30905
- return "";
30906
- case "outline":
30907
- return React.createElement(Outline, null);
30908
- default:
30909
- return React.createElement(Outline, null);
30780
+ /**
30781
+ * The '-light' type is the same color as the common type,
30782
+ * only hover's color is different.
30783
+ * e.g.
30784
+ * Color['success'] === Color['success-light']
30785
+ * Color['warning'] === Color['warning-light']
30786
+ */
30787
+ var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
30788
+ var defaultColor = colors["default"];
30789
+ if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
30790
+ return colors[withoutLightType] || defaultColor;
30791
+ };
30792
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
30793
+ var colors = {
30794
+ secondary: {
30795
+ bg: palette.foreground,
30796
+ border: palette.background,
30797
+ color: palette.background
30798
+ },
30799
+ success: {
30800
+ bg: palette.success,
30801
+ border: palette.background,
30802
+ color: 'white'
30803
+ },
30804
+ warning: {
30805
+ bg: palette.warning,
30806
+ border: palette.background,
30807
+ color: 'white'
30808
+ },
30809
+ error: {
30810
+ bg: palette.error,
30811
+ border: palette.background,
30812
+ color: 'white'
30910
30813
  }
30814
+ };
30815
+ var withoutLightType = type.replace('-light', '');
30816
+ return colors[withoutLightType] || null;
30817
+ };
30818
+ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
30819
+ var type = props.type,
30820
+ disabled = props.disabled,
30821
+ loading = props.loading,
30822
+ shadow = props.shadow,
30823
+ ghost = props.ghost;
30824
+ var defaultColor = getButtonColors(palette, props);
30825
+ var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
30826
+ var colors = {
30827
+ "default": {
30828
+ bg: palette.background,
30829
+ border: palette.foreground
30830
+ },
30831
+ secondary: {
30832
+ bg: palette.background,
30833
+ border: palette.foreground
30834
+ },
30835
+ success: {
30836
+ bg: palette.background,
30837
+ border: palette.success
30838
+ },
30839
+ warning: {
30840
+ bg: palette.background,
30841
+ border: palette.warning
30842
+ },
30843
+ error: {
30844
+ bg: palette.background,
30845
+ border: palette.error
30846
+ },
30847
+ abort: {
30848
+ bg: 'transparent',
30849
+ border: 'transparent',
30850
+ color: palette.accents_5
30851
+ },
30852
+ 'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
30853
+ bg: alphaBackground
30854
+ }),
30855
+ 'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
30856
+ bg: alphaBackground
30857
+ }),
30858
+ 'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
30859
+ bg: alphaBackground
30860
+ }),
30861
+ 'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
30862
+ bg: alphaBackground
30863
+ })
30864
+ };
30865
+ if (disabled) return {
30866
+ bg: palette.accents_1,
30867
+ border: palette.accents_2,
30868
+ color: '#ccc'
30869
+ };
30870
+ if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
30871
+ color: 'transparent'
30872
+ });
30873
+ if (shadow) return defaultColor;
30874
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
30875
+ return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
30876
+ color: hoverColor.color || hoverColor.border
30877
+ });
30911
30878
  };
30912
- Columns.displayName = "Columns";
30913
- var Columns$1 = createIcon(Columns);
30914
-
30915
- const Folder = ({ color, strokeWidth, set }) => {
30916
- const Outline = () => (React.createElement("g", null,
30917
- React.createElement("path", { d: "M2.707 7.454V5.62C2.707 4.725 3.469 4 4.409 4h4.843c.451 0 .884.17 1.204.474l.49.467c.126.12.296.186.473.186h8.399c.94 0 1.55.695 1.55 1.59v.737m-18.661 0h-.354a.344.344 0 00-.353.35l.508 11.587c.015.34.31.609.668.609h17.283c.358 0 .652-.269.667-.61L22 7.805a.344.344 0 00-.353-.35h-.278m-18.662 0h18.662", stroke: color, strokeWidth: strokeWidth })));
30918
- switch (set) {
30919
- case "broken":
30920
- return "";
30921
- case "curved":
30922
- return "";
30923
- case "duotone":
30924
- return "";
30925
- case "outline":
30926
- return React.createElement(Outline, null);
30927
- default:
30928
- return React.createElement(Outline, null);
30929
- }
30879
+ var getButtonCursor = function getButtonCursor(disabled, loading) {
30880
+ if (disabled) return {
30881
+ cursor: 'not-allowed',
30882
+ events: 'auto'
30883
+ };
30884
+ if (loading) return {
30885
+ cursor: 'default',
30886
+ events: 'none'
30887
+ };
30888
+ return {
30889
+ cursor: 'pointer',
30890
+ events: 'auto'
30891
+ };
30930
30892
  };
30931
- Folder.displayName = "Folder";
30932
- createIcon(Folder);
30933
-
30934
- const File = ({ color, strokeWidth, set }) => {
30935
- const Outline = () => (React.createElement("g", null,
30936
- React.createElement("path", { d: "M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z", stroke: color, strokeWidth: strokeWidth }),
30937
- React.createElement("path", { d: "M13 2v7h7", stroke: color, strokeWidth: strokeWidth })));
30938
- switch (set) {
30939
- case "broken":
30940
- return "";
30941
- case "curved":
30942
- return "";
30943
- case "duotone":
30944
- return "";
30945
- case "outline":
30946
- return React.createElement(Outline, null);
30947
- default:
30948
- return React.createElement(Outline, null);
30949
- }
30893
+ var getButtonDripColor = function getButtonDripColor(palette, props) {
30894
+ var type = props.type;
30895
+ var isLightHover = type ? type.endsWith('light') : false;
30896
+ var hoverColors = getButtonHoverColors(palette, props);
30897
+ return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
30950
30898
  };
30951
- File.displayName = "File";
30952
- createIcon(File);
30953
30899
 
30954
- const Printer = ({ color, strokeWidth, set }) => {
30955
- const Outline = () => (React.createElement("g", null,
30956
- React.createElement("path", { d: "M6 9V2h12v7", stroke: color, strokeWidth: strokeWidth }),
30957
- React.createElement("path", { d: "M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2", stroke: color, strokeWidth: strokeWidth }),
30958
- React.createElement("path", { d: "M6 14h12v8H6z", stroke: color, strokeWidth: strokeWidth })));
30959
- switch (set) {
30960
- case "broken":
30961
- return "";
30962
- case "curved":
30963
- return "";
30964
- case "duotone":
30965
- return "";
30966
- case "outline":
30967
- return React.createElement(Outline, null);
30968
- default:
30969
- return React.createElement(Outline, null);
30970
- }
30971
- };
30972
- Printer.displayName = "Printer";
30973
- createIcon(Printer);
30900
+ var _excluded$8 = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
30901
+ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
30902
+ var theme = useTheme();
30903
+ var _useScale = useScale(),
30904
+ SCALES = _useScale.SCALES;
30905
+ var buttonRef = React.useRef(null);
30906
+ React.useImperativeHandle(ref, function () {
30907
+ return buttonRef.current;
30908
+ });
30909
+ var _useState = React.useState(false),
30910
+ _useState2 = _slicedToArray(_useState, 2),
30911
+ dripShow = _useState2[0],
30912
+ setDripShow = _useState2[1];
30913
+ var _useState3 = React.useState(0),
30914
+ _useState4 = _slicedToArray(_useState3, 2),
30915
+ dripX = _useState4[0],
30916
+ setDripX = _useState4[1];
30917
+ var _useState5 = React.useState(0),
30918
+ _useState6 = _slicedToArray(_useState5, 2),
30919
+ dripY = _useState6[0],
30920
+ setDripY = _useState6[1];
30921
+ var groupConfig = useButtonGroupContext();
30922
+ var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
30923
+ /* eslint-disable @typescript-eslint/no-unused-vars */
30924
+ var children = filteredProps.children,
30925
+ _filteredProps$disabl = filteredProps.disabled,
30926
+ disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
30927
+ filteredProps.type;
30928
+ var _filteredProps$loadin = filteredProps.loading,
30929
+ loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
30930
+ _filteredProps$shadow = filteredProps.shadow,
30931
+ shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
30932
+ _filteredProps$ghost = filteredProps.ghost,
30933
+ ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
30934
+ _filteredProps$effect = filteredProps.effect,
30935
+ effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
30936
+ _filteredProps$round = filteredProps.round,
30937
+ round = _filteredProps$round === void 0 ? false : _filteredProps$round,
30938
+ onClick = filteredProps.onClick,
30939
+ _filteredProps$auto = filteredProps.auto,
30940
+ auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
30941
+ icon = filteredProps.icon,
30942
+ _filteredProps$htmlTy = filteredProps.htmlType,
30943
+ htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
30944
+ iconRight = filteredProps.iconRight,
30945
+ _filteredProps$classN = filteredProps.className,
30946
+ className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
30947
+ filteredProps.crossOrigin;
30948
+ var props = _objectWithoutProperties(filteredProps, _excluded$8);
30949
+ /* eslint-enable @typescript-eslint/no-unused-vars */
30974
30950
 
30975
- const Lock = ({ color, strokeWidth, set }) => {
30976
- const Outline = () => (React.createElement("g", null,
30977
- React.createElement("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
30978
- React.createElement("path", { d: "M7 11V7a5 5 0 0110 0v4", stroke: color, strokeWidth: strokeWidth })));
30979
- switch (set) {
30980
- case "broken":
30981
- return "";
30982
- case "curved":
30983
- return "";
30984
- case "duotone":
30985
- return "";
30986
- case "outline":
30987
- return React.createElement(Outline, null);
30988
- default:
30989
- return React.createElement(Outline, null);
30990
- }
30991
- };
30992
- Lock.displayName = "Lock";
30993
- createIcon(Lock);
30951
+ var _useMemo = React.useMemo(function () {
30952
+ return getButtonColors(theme.palette, filteredProps);
30953
+ }, [theme.palette, filteredProps]),
30954
+ bg = _useMemo.bg,
30955
+ border = _useMemo.border,
30956
+ color = _useMemo.color;
30957
+ var hover = React.useMemo(function () {
30958
+ return getButtonHoverColors(theme.palette, filteredProps);
30959
+ }, [theme.palette, filteredProps]);
30960
+ var _useMemo2 = React.useMemo(function () {
30961
+ return getButtonCursor(disabled, loading);
30962
+ }, [disabled, loading]),
30963
+ cursor = _useMemo2.cursor,
30964
+ events = _useMemo2.events;
30965
+ var dripColor = React.useMemo(function () {
30966
+ return getButtonDripColor(theme.palette, filteredProps);
30967
+ }, [theme.palette, filteredProps]);
30994
30968
 
30995
- const HelpCircle = ({ color, strokeWidth, set }) => {
30996
- const Outline = () => (React.createElement("g", null,
30997
- React.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: strokeWidth }),
30998
- React.createElement("path", { d: "M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3", stroke: color, strokeWidth: strokeWidth }),
30999
- React.createElement("path", { d: "M12 17h.01", stroke: color, strokeWidth: strokeWidth })));
31000
- switch (set) {
31001
- case "broken":
31002
- return "";
31003
- case "curved":
31004
- return "";
31005
- case "duotone":
31006
- return "";
31007
- case "outline":
31008
- return React.createElement(Outline, null);
31009
- default:
31010
- return React.createElement(Outline, null);
30969
+ /* istanbul ignore next */
30970
+ var dripCompletedHandle = function dripCompletedHandle() {
30971
+ setDripShow(false);
30972
+ setDripX(0);
30973
+ setDripY(0);
30974
+ };
30975
+ var clickHandler = function clickHandler(event) {
30976
+ if (disabled || loading) return;
30977
+ var showDrip = !shadow && !ghost && effect;
30978
+ /* istanbul ignore next */
30979
+ if (showDrip && buttonRef.current) {
30980
+ var rect = buttonRef.current.getBoundingClientRect();
30981
+ setDripShow(true);
30982
+ setDripX(event.clientX - rect.left);
30983
+ setDripY(event.clientY - rect.top);
31011
30984
  }
31012
- };
31013
- HelpCircle.displayName = "HelpCircle";
31014
- createIcon(HelpCircle);
30985
+ onClick && onClick(event);
30986
+ };
30987
+ var childrenWithIcon = React.useMemo(function () {
30988
+ return getButtonChildrenWithIcon(auto, children, {
30989
+ icon: icon,
30990
+ iconRight: iconRight
30991
+ });
30992
+ }, [auto, children, icon, iconRight]);
30993
+ var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
30994
+ paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
30995
+ return /*#__PURE__*/React.createElement("button", _extends({
30996
+ ref: buttonRef,
30997
+ type: htmlType,
30998
+ disabled: disabled,
30999
+ onClick: clickHandler
31000
+ }, props, {
31001
+ className: _JSXStyle.dynamic([["1558010596", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
31002
+ }), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
31003
+ color: color
31004
+ }), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
31005
+ x: dripX,
31006
+ y: dripY,
31007
+ color: dripColor,
31008
+ onCompleted: dripCompletedHandle
31009
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
31010
+ id: "1558010596",
31011
+ dynamic: [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
31012
+ }, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
31013
+ });
31014
+ ButtonComponent.displayName = 'Button';
31015
+ var Button = withScale(ButtonComponent);
31015
31016
 
31016
31017
  var getColors = function getColors(type, palette) {
31017
31018
  var colors = {