funda-ui 1.0.272
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackToTop/index.css +34 -0
- package/BackToTop/index.d.ts +11 -0
- package/BackToTop/index.js +458 -0
- package/CascadingSelect/index.css +159 -0
- package/CascadingSelect/index.d.ts +56 -0
- package/CascadingSelect/index.js +958 -0
- package/CascadingSelectE2E/index.css +159 -0
- package/CascadingSelectE2E/index.d.ts +60 -0
- package/CascadingSelectE2E/index.js +1126 -0
- package/Checkbox/index.d.ts +30 -0
- package/Checkbox/index.js +226 -0
- package/ColorPicker/index.css +38 -0
- package/ColorPicker/index.d.ts +27 -0
- package/ColorPicker/index.js +246 -0
- package/DigitalClock/index.d.ts +7 -0
- package/DigitalClock/index.js +208 -0
- package/DropdownMenu/index.css +127 -0
- package/DropdownMenu/index.d.ts +37 -0
- package/DropdownMenu/index.js +237 -0
- package/DynamicFields/index.d.ts +26 -0
- package/DynamicFields/index.js +412 -0
- package/File/index.d.ts +36 -0
- package/File/index.js +473 -0
- package/Input/index.d.ts +42 -0
- package/Input/index.js +286 -0
- package/LiveSearch/index.d.ts +37 -0
- package/LiveSearch/index.js +1195 -0
- package/ModalDialog/index.d.ts +60 -0
- package/ModalDialog/index.js +725 -0
- package/ModeSwitch/index.d.ts +17 -0
- package/ModeSwitch/index.js +202 -0
- package/MultiFuncSelect/index.css +178 -0
- package/MultiFuncSelect/index.d.ts +67 -0
- package/MultiFuncSelect/index.js +1826 -0
- package/MultilevelDropdownMenu/index.css +35 -0
- package/MultilevelDropdownMenu/index.d.ts +25 -0
- package/MultilevelDropdownMenu/index.js +464 -0
- package/Pagination/index.d.ts +49 -0
- package/Pagination/index.js +341 -0
- package/README.md +108 -0
- package/Radio/index.d.ts +31 -0
- package/Radio/index.js +246 -0
- package/RangeSlider/index.css +149 -0
- package/RangeSlider/index.d.ts +21 -0
- package/RangeSlider/index.js +730 -0
- package/ScrollReveal/index.css +23 -0
- package/ScrollReveal/index.d.ts +21 -0
- package/ScrollReveal/index.js +216 -0
- package/Scrollbar/index.css +168 -0
- package/Scrollbar/index.d.ts +15 -0
- package/Scrollbar/index.js +605 -0
- package/SearchBar/index.d.ts +32 -0
- package/SearchBar/index.js +246 -0
- package/Select/index.d.ts +34 -0
- package/Select/index.js +331 -0
- package/ShowMoreLess/index.css +23 -0
- package/ShowMoreLess/index.d.ts +30 -0
- package/ShowMoreLess/index.js +202 -0
- package/Switch/index.d.ts +29 -0
- package/Switch/index.js +211 -0
- package/Table/index.css +533 -0
- package/Table/index.d.ts +25 -0
- package/Table/index.js +2113 -0
- package/Tabs/index.d.ts +3 -0
- package/Tabs/index.js +323 -0
- package/TagInput/index.css +90 -0
- package/TagInput/index.d.ts +28 -0
- package/TagInput/index.js +370 -0
- package/Textarea/index.d.ts +30 -0
- package/Textarea/index.js +242 -0
- package/Toast/index.css +95 -0
- package/Toast/index.d.ts +35 -0
- package/Toast/index.js +340 -0
- package/Tooltip/index.css +240 -0
- package/Tooltip/index.d.ts +19 -0
- package/Tooltip/index.js +200 -0
- package/Tree/index.css +225 -0
- package/Tree/index.d.ts +37 -0
- package/Tree/index.js +1406 -0
- package/all.d.ts +33 -0
- package/all.js +35 -0
- package/lib/cjs/BackToTop/index.d.ts +11 -0
- package/lib/cjs/BackToTop/index.js +458 -0
- package/lib/cjs/CascadingSelect/index.d.ts +56 -0
- package/lib/cjs/CascadingSelect/index.js +958 -0
- package/lib/cjs/CascadingSelectE2E/index.d.ts +60 -0
- package/lib/cjs/CascadingSelectE2E/index.js +1126 -0
- package/lib/cjs/Checkbox/index.d.ts +30 -0
- package/lib/cjs/Checkbox/index.js +226 -0
- package/lib/cjs/ColorPicker/index.d.ts +27 -0
- package/lib/cjs/ColorPicker/index.js +246 -0
- package/lib/cjs/DigitalClock/index.d.ts +7 -0
- package/lib/cjs/DigitalClock/index.js +208 -0
- package/lib/cjs/DropdownMenu/index.d.ts +37 -0
- package/lib/cjs/DropdownMenu/index.js +237 -0
- package/lib/cjs/DynamicFields/index.d.ts +26 -0
- package/lib/cjs/DynamicFields/index.js +412 -0
- package/lib/cjs/File/index.d.ts +36 -0
- package/lib/cjs/File/index.js +473 -0
- package/lib/cjs/Input/index.d.ts +42 -0
- package/lib/cjs/Input/index.js +286 -0
- package/lib/cjs/LiveSearch/index.d.ts +37 -0
- package/lib/cjs/LiveSearch/index.js +1195 -0
- package/lib/cjs/ModalDialog/index.d.ts +60 -0
- package/lib/cjs/ModalDialog/index.js +725 -0
- package/lib/cjs/ModeSwitch/index.d.ts +17 -0
- package/lib/cjs/ModeSwitch/index.js +202 -0
- package/lib/cjs/MultiFuncSelect/index.d.ts +67 -0
- package/lib/cjs/MultiFuncSelect/index.js +1826 -0
- package/lib/cjs/MultilevelDropdownMenu/index.d.ts +25 -0
- package/lib/cjs/MultilevelDropdownMenu/index.js +464 -0
- package/lib/cjs/Pagination/index.d.ts +49 -0
- package/lib/cjs/Pagination/index.js +341 -0
- package/lib/cjs/Radio/index.d.ts +31 -0
- package/lib/cjs/Radio/index.js +246 -0
- package/lib/cjs/RangeSlider/index.d.ts +21 -0
- package/lib/cjs/RangeSlider/index.js +730 -0
- package/lib/cjs/ScrollReveal/index.d.ts +21 -0
- package/lib/cjs/ScrollReveal/index.js +216 -0
- package/lib/cjs/Scrollbar/index.d.ts +15 -0
- package/lib/cjs/Scrollbar/index.js +605 -0
- package/lib/cjs/SearchBar/index.d.ts +32 -0
- package/lib/cjs/SearchBar/index.js +246 -0
- package/lib/cjs/Select/index.d.ts +34 -0
- package/lib/cjs/Select/index.js +331 -0
- package/lib/cjs/ShowMoreLess/index.d.ts +30 -0
- package/lib/cjs/ShowMoreLess/index.js +202 -0
- package/lib/cjs/Switch/index.d.ts +29 -0
- package/lib/cjs/Switch/index.js +211 -0
- package/lib/cjs/Table/index.d.ts +25 -0
- package/lib/cjs/Table/index.js +2113 -0
- package/lib/cjs/Tabs/index.d.ts +3 -0
- package/lib/cjs/Tabs/index.js +323 -0
- package/lib/cjs/TagInput/index.d.ts +28 -0
- package/lib/cjs/TagInput/index.js +370 -0
- package/lib/cjs/Textarea/index.d.ts +30 -0
- package/lib/cjs/Textarea/index.js +242 -0
- package/lib/cjs/Toast/index.d.ts +35 -0
- package/lib/cjs/Toast/index.js +340 -0
- package/lib/cjs/Tooltip/index.d.ts +19 -0
- package/lib/cjs/Tooltip/index.js +200 -0
- package/lib/cjs/Tree/index.d.ts +37 -0
- package/lib/cjs/Tree/index.js +1406 -0
- package/lib/cjs/index.d.ts +33 -0
- package/lib/cjs/index.js +35 -0
- package/lib/css/BackToTop/index.css +34 -0
- package/lib/css/CascadingSelect/index.css +159 -0
- package/lib/css/CascadingSelectE2E/index.css +159 -0
- package/lib/css/ColorPicker/index.css +38 -0
- package/lib/css/DropdownMenu/index.css +127 -0
- package/lib/css/MultiFuncSelect/index.css +178 -0
- package/lib/css/MultilevelDropdownMenu/index.css +35 -0
- package/lib/css/RangeSlider/index.css +149 -0
- package/lib/css/ScrollReveal/index.css +23 -0
- package/lib/css/Scrollbar/index.css +168 -0
- package/lib/css/ShowMoreLess/index.css +23 -0
- package/lib/css/Table/index.css +533 -0
- package/lib/css/TagInput/index.css +90 -0
- package/lib/css/Toast/index.css +95 -0
- package/lib/css/Tooltip/index.css +240 -0
- package/lib/css/Tree/index.css +225 -0
- package/lib/esm/BackToTop/index.scss +47 -0
- package/lib/esm/BackToTop/index.tsx +182 -0
- package/lib/esm/BackToTop/utils/easing.js +200 -0
- package/lib/esm/BackToTop/utils/performance.js +52 -0
- package/lib/esm/CascadingSelect/Group.tsx +39 -0
- package/lib/esm/CascadingSelect/index.scss +214 -0
- package/lib/esm/CascadingSelect/index.tsx +922 -0
- package/lib/esm/CascadingSelect/utils/performance.js +52 -0
- package/lib/esm/CascadingSelectE2E/Group.tsx +39 -0
- package/lib/esm/CascadingSelectE2E/index.scss +214 -0
- package/lib/esm/CascadingSelectE2E/index.tsx +1091 -0
- package/lib/esm/CascadingSelectE2E/utils/performance.js +52 -0
- package/lib/esm/Checkbox/index.tsx +160 -0
- package/lib/esm/ColorPicker/index.scss +48 -0
- package/lib/esm/ColorPicker/index.tsx +187 -0
- package/lib/esm/DigitalClock/index.tsx +72 -0
- package/lib/esm/DigitalClock/utils/useInterval.js +43 -0
- package/lib/esm/DropdownMenu/Option.tsx +27 -0
- package/lib/esm/DropdownMenu/index.scss +180 -0
- package/lib/esm/DropdownMenu/index.tsx +148 -0
- package/lib/esm/DynamicFields/index.tsx +386 -0
- package/lib/esm/File/index.tsx +302 -0
- package/lib/esm/Input/index.tsx +233 -0
- package/lib/esm/LiveSearch/index.tsx +582 -0
- package/lib/esm/LiveSearch/utils/performance.js +52 -0
- package/lib/esm/LiveSearch/utils/useThrottle.js +36 -0
- package/lib/esm/ModalDialog/index.tsx +479 -0
- package/lib/esm/ModalDialog/plugins/BSL/bodyScrollLock.es6.js +262 -0
- package/lib/esm/ModalDialog/plugins/BSL/index.ts +2 -0
- package/lib/esm/ModeSwitch/index.tsx +82 -0
- package/lib/esm/MultiFuncSelect/index.scss +269 -0
- package/lib/esm/MultiFuncSelect/index.tsx +1597 -0
- package/lib/esm/MultiFuncSelect/utils/performance.js +52 -0
- package/lib/esm/MultiFuncSelect/utils/tree.js +103 -0
- package/lib/esm/MultiFuncSelect/utils/useThrottle.js +36 -0
- package/lib/esm/MultilevelDropdownMenu/MenuList.tsx +230 -0
- package/lib/esm/MultilevelDropdownMenu/index.scss +75 -0
- package/lib/esm/MultilevelDropdownMenu/index.tsx +71 -0
- package/lib/esm/MultilevelDropdownMenu/utils/dom.js +81 -0
- package/lib/esm/Pagination/index.tsx +230 -0
- package/lib/esm/Pagination/pagination-navigators.tsx +60 -0
- package/lib/esm/Radio/index.tsx +201 -0
- package/lib/esm/RangeSlider/index.scss +184 -0
- package/lib/esm/RangeSlider/index.tsx +223 -0
- package/lib/esm/ScrollReveal/index.scss +27 -0
- package/lib/esm/ScrollReveal/index.tsx +146 -0
- package/lib/esm/Scrollbar/index.scss +217 -0
- package/lib/esm/Scrollbar/index.tsx +497 -0
- package/lib/esm/Scrollbar/utils/performance.js +52 -0
- package/lib/esm/SearchBar/index.tsx +181 -0
- package/lib/esm/Select/index.tsx +276 -0
- package/lib/esm/ShowMoreLess/index.scss +27 -0
- package/lib/esm/ShowMoreLess/index.tsx +144 -0
- package/lib/esm/Switch/index.tsx +143 -0
- package/lib/esm/Table/TableColgroup.tsx +29 -0
- package/lib/esm/Table/TableField.tsx +40 -0
- package/lib/esm/Table/TableFieldRow.tsx +212 -0
- package/lib/esm/Table/TableHeaders.tsx +146 -0
- package/lib/esm/Table/TableRow.tsx +127 -0
- package/lib/esm/Table/TableSummaries.tsx +36 -0
- package/lib/esm/Table/index.scss +364 -0
- package/lib/esm/Table/index.tsx +576 -0
- package/lib/esm/Table/table-utils.ts +65 -0
- package/lib/esm/Table/utils/dom.js +81 -0
- package/lib/esm/Table/utils/performance.js +52 -0
- package/lib/esm/Tabs/TabList.tsx +42 -0
- package/lib/esm/Tabs/TabPanel.tsx +34 -0
- package/lib/esm/Tabs/Tabs.tsx +232 -0
- package/lib/esm/Tabs/index.tsx +3 -0
- package/lib/esm/TagInput/index.scss +125 -0
- package/lib/esm/TagInput/index.tsx +314 -0
- package/lib/esm/Textarea/index.tsx +178 -0
- package/lib/esm/Toast/Item.tsx +75 -0
- package/lib/esm/Toast/index.scss +120 -0
- package/lib/esm/Toast/index.tsx +249 -0
- package/lib/esm/Tooltip/index.scss +327 -0
- package/lib/esm/Tooltip/index.tsx +142 -0
- package/lib/esm/Tree/TreeList.tsx +503 -0
- package/lib/esm/Tree/index.scss +375 -0
- package/lib/esm/Tree/index.tsx +301 -0
- package/lib/esm/Tree/init-height.tsx +27 -0
- package/lib/esm/Tree/utils/convert-tree.js +29 -0
- package/lib/esm/Tree/utils/dom.js +81 -0
- package/lib/esm/index.js +31 -0
- package/package.json +40 -0
package/all.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
export const __esModule: true;
|
|
3
|
+
export const BackToTop: any;
|
|
4
|
+
export const CascadingSelect: any;
|
|
5
|
+
export const CascadingSelectE2E: any;
|
|
6
|
+
export const Checkbox: any;
|
|
7
|
+
export const ColorPicker: any;
|
|
8
|
+
export const DigitalClock: any;
|
|
9
|
+
export const DropdownMenu: any;
|
|
10
|
+
export const DynamicFields: any;
|
|
11
|
+
export const File: any;
|
|
12
|
+
export const Input: any;
|
|
13
|
+
export const LiveSearch: any;
|
|
14
|
+
export const ModalDialog: any;
|
|
15
|
+
export const ModeSwitch: any;
|
|
16
|
+
export const MultiFuncSelect: any;
|
|
17
|
+
export const MultilevelDropdownMenu: any;
|
|
18
|
+
export const Pagination: any;
|
|
19
|
+
export const Radio: any;
|
|
20
|
+
export const RangeSlider: any;
|
|
21
|
+
export const ScrollReveal: any;
|
|
22
|
+
export const Scrollbar: any;
|
|
23
|
+
export const SearchBar: any;
|
|
24
|
+
export const Select: any;
|
|
25
|
+
export const ShowMoreLess: any;
|
|
26
|
+
export const Switch: any;
|
|
27
|
+
export const Table: any;
|
|
28
|
+
export const Tabs: any;
|
|
29
|
+
export const TagInput: any;
|
|
30
|
+
export const Textarea: any;
|
|
31
|
+
export const Toast: any;
|
|
32
|
+
export const Tooltip: any;
|
|
33
|
+
export const Tree: any;
|
package/all.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
"use strict";
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.BackToTop = _interopRequireDefault(require("./BackToTop")).default;
|
|
6
|
+
exports.CascadingSelect = _interopRequireDefault(require("./CascadingSelect")).default;
|
|
7
|
+
exports.CascadingSelectE2E = _interopRequireDefault(require("./CascadingSelectE2E")).default;
|
|
8
|
+
exports.Checkbox = _interopRequireDefault(require("./Checkbox")).default;
|
|
9
|
+
exports.ColorPicker = _interopRequireDefault(require("./ColorPicker")).default;
|
|
10
|
+
exports.DigitalClock = _interopRequireDefault(require("./DigitalClock")).default;
|
|
11
|
+
exports.DropdownMenu = _interopRequireDefault(require("./DropdownMenu")).default;
|
|
12
|
+
exports.DynamicFields = _interopRequireDefault(require("./DynamicFields")).default;
|
|
13
|
+
exports.File = _interopRequireDefault(require("./File")).default;
|
|
14
|
+
exports.Input = _interopRequireDefault(require("./Input")).default;
|
|
15
|
+
exports.LiveSearch = _interopRequireDefault(require("./LiveSearch")).default;
|
|
16
|
+
exports.ModalDialog = _interopRequireDefault(require("./ModalDialog")).default;
|
|
17
|
+
exports.ModeSwitch = _interopRequireDefault(require("./ModeSwitch")).default;
|
|
18
|
+
exports.MultiFuncSelect = _interopRequireDefault(require("./MultiFuncSelect")).default;
|
|
19
|
+
exports.MultilevelDropdownMenu = _interopRequireDefault(require("./MultilevelDropdownMenu")).default;
|
|
20
|
+
exports.Pagination = _interopRequireDefault(require("./Pagination")).default;
|
|
21
|
+
exports.Radio = _interopRequireDefault(require("./Radio")).default;
|
|
22
|
+
exports.RangeSlider = _interopRequireDefault(require("./RangeSlider")).default;
|
|
23
|
+
exports.ScrollReveal = _interopRequireDefault(require("./ScrollReveal")).default;
|
|
24
|
+
exports.Scrollbar = _interopRequireDefault(require("./Scrollbar")).default;
|
|
25
|
+
exports.SearchBar = _interopRequireDefault(require("./SearchBar")).default;
|
|
26
|
+
exports.Select = _interopRequireDefault(require("./Select")).default;
|
|
27
|
+
exports.ShowMoreLess = _interopRequireDefault(require("./ShowMoreLess")).default;
|
|
28
|
+
exports.Switch = _interopRequireDefault(require("./Switch")).default;
|
|
29
|
+
exports.Table = _interopRequireDefault(require("./Table")).default;
|
|
30
|
+
exports.Tabs = _interopRequireDefault(require("./Tabs")).default;
|
|
31
|
+
exports.TagInput = _interopRequireDefault(require("./TagInput")).default;
|
|
32
|
+
exports.Textarea = _interopRequireDefault(require("./Textarea")).default;
|
|
33
|
+
exports.Toast = _interopRequireDefault(require("./Toast")).default;
|
|
34
|
+
exports.Tooltip = _interopRequireDefault(require("./Tooltip")).default;
|
|
35
|
+
exports.Tree = _interopRequireDefault(require("./Tree")).default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type BackToTopProps = {
|
|
3
|
+
/** Speed of scrolling up. Amount of time measured in milliseconds. */
|
|
4
|
+
speed?: number;
|
|
5
|
+
/** Types of easing animation */
|
|
6
|
+
easing: string;
|
|
7
|
+
/** Button Icon */
|
|
8
|
+
btnIcon?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const BackToTop: (props: BackToTopProps) => JSX.Element;
|
|
11
|
+
export default BackToTop;
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("react"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define(["react"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["RPB"] = factory(require("react"));
|
|
8
|
+
else
|
|
9
|
+
root["RPB"] = factory(root["React"]);
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ var __webpack_modules__ = ({
|
|
13
|
+
|
|
14
|
+
/***/ 711:
|
|
15
|
+
/***/ ((module) => {
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* All easing functions
|
|
19
|
+
* @link: https://easings.net
|
|
20
|
+
* @param {Number} t - time (Amount of time that has passed since the beginning of the animation. Usually starts at 0 and is slowly increased using a game loop or other update function.)
|
|
21
|
+
* @param {Number} b - beginning value (The starting point of the animation. Usually it's a static value, you can start at 0 for example.)
|
|
22
|
+
* @param {Number} c - change in value (The amount of change needed to go from starting point to end point. It's also usually a static value.)
|
|
23
|
+
* @param {Number} d - duration (Amount of time the animation will take. Usually a static value aswell.)
|
|
24
|
+
* @return {Number}
|
|
25
|
+
*/
|
|
26
|
+
function easeLinear(t, b, c, d) {
|
|
27
|
+
return c * t / d + b;
|
|
28
|
+
}
|
|
29
|
+
function easeInQuad(t, b, c, d) {
|
|
30
|
+
return c * (t /= d) * t + b;
|
|
31
|
+
}
|
|
32
|
+
function easeOutQuad(t, b, c, d) {
|
|
33
|
+
return -c * (t /= d) * (t - 2) + b;
|
|
34
|
+
}
|
|
35
|
+
function easeInOutQuad(t, b, c, d) {
|
|
36
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t + b;
|
|
37
|
+
return -c / 2 * (--t * (t - 2) - 1) + b;
|
|
38
|
+
}
|
|
39
|
+
function easeInSine(t, b, c, d) {
|
|
40
|
+
return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
|
|
41
|
+
}
|
|
42
|
+
function easeOutSine(t, b, c, d) {
|
|
43
|
+
return c * Math.sin(t / d * (Math.PI / 2)) + b;
|
|
44
|
+
}
|
|
45
|
+
function easeInOutSine(t, b, c, d) {
|
|
46
|
+
return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
|
|
47
|
+
}
|
|
48
|
+
function easeInExpo(t, b, c, d) {
|
|
49
|
+
return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
|
|
50
|
+
}
|
|
51
|
+
function easeOutExpo(t, b, c, d) {
|
|
52
|
+
return t == d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
|
|
53
|
+
}
|
|
54
|
+
function easeInOutExpo(t, b, c, d) {
|
|
55
|
+
if (t == 0) return b;
|
|
56
|
+
if (t == d) return b + c;
|
|
57
|
+
if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
|
|
58
|
+
return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
|
59
|
+
}
|
|
60
|
+
function easeInCirc(t, b, c, d) {
|
|
61
|
+
return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
|
|
62
|
+
}
|
|
63
|
+
function easeOutCirc(t, b, c, d) {
|
|
64
|
+
return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
|
|
65
|
+
}
|
|
66
|
+
function easeInOutCirc(t, b, c, d) {
|
|
67
|
+
if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
|
|
68
|
+
return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
|
|
69
|
+
}
|
|
70
|
+
function easeInCubic(t, b, c, d) {
|
|
71
|
+
return c * (t /= d) * t * t + b;
|
|
72
|
+
}
|
|
73
|
+
function easeOutCubic(t, b, c, d) {
|
|
74
|
+
return c * ((t = t / d - 1) * t * t + 1) + b;
|
|
75
|
+
}
|
|
76
|
+
function easeInOutCubic(t, b, c, d) {
|
|
77
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
|
|
78
|
+
return c / 2 * ((t -= 2) * t * t + 2) + b;
|
|
79
|
+
}
|
|
80
|
+
function easeInQuart(t, b, c, d) {
|
|
81
|
+
return c * (t /= d) * t * t * t + b;
|
|
82
|
+
}
|
|
83
|
+
function easeOutQuart(t, b, c, d) {
|
|
84
|
+
return -c * ((t = t / d - 1) * t * t * t - 1) + b;
|
|
85
|
+
}
|
|
86
|
+
function easeInOutQuart(t, b, c, d) {
|
|
87
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
|
|
88
|
+
return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
|
|
89
|
+
}
|
|
90
|
+
function easeInQuint(t, b, c, d) {
|
|
91
|
+
return c * (t /= d) * t * t * t * t + b;
|
|
92
|
+
}
|
|
93
|
+
function easeOutQuint(t, b, c, d) {
|
|
94
|
+
return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
|
|
95
|
+
}
|
|
96
|
+
function easeInOutQuint(t, b, c, d) {
|
|
97
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
|
|
98
|
+
return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
|
|
99
|
+
}
|
|
100
|
+
function easeInElastic(t, b, c, d) {
|
|
101
|
+
var s = 1.70158;
|
|
102
|
+
var p = 0;
|
|
103
|
+
var a = c;
|
|
104
|
+
if (t == 0) return b;
|
|
105
|
+
if ((t /= d) == 1) return b + c;
|
|
106
|
+
if (!p) p = d * .3;
|
|
107
|
+
if (a < Math.abs(c)) {
|
|
108
|
+
a = c;
|
|
109
|
+
var s = p / 4;
|
|
110
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
|
111
|
+
return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
|
|
112
|
+
}
|
|
113
|
+
function easeOutElastic(t, b, c, d) {
|
|
114
|
+
var s = 1.70158;
|
|
115
|
+
var p = 0;
|
|
116
|
+
var a = c;
|
|
117
|
+
if (t == 0) return b;
|
|
118
|
+
if ((t /= d) == 1) return b + c;
|
|
119
|
+
if (!p) p = d * .3;
|
|
120
|
+
if (a < Math.abs(c)) {
|
|
121
|
+
a = c;
|
|
122
|
+
var s = p / 4;
|
|
123
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
|
124
|
+
return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
|
|
125
|
+
}
|
|
126
|
+
function easeInOutElastic(t, b, c, d) {
|
|
127
|
+
var s = 1.70158;
|
|
128
|
+
var p = 0;
|
|
129
|
+
var a = c;
|
|
130
|
+
if (t == 0) return b;
|
|
131
|
+
if ((t /= d / 2) == 2) return b + c;
|
|
132
|
+
if (!p) p = d * (.3 * 1.5);
|
|
133
|
+
if (a < Math.abs(c)) {
|
|
134
|
+
a = c;
|
|
135
|
+
var s = p / 4;
|
|
136
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
|
137
|
+
if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
|
|
138
|
+
return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
|
|
139
|
+
}
|
|
140
|
+
function easeInBack(t, b, c, d) {
|
|
141
|
+
if (s == undefined) s = 1.70158;
|
|
142
|
+
return c * (t /= d) * t * ((s + 1) * t - s) + b;
|
|
143
|
+
}
|
|
144
|
+
function easeOutBack(t, b, c, d) {
|
|
145
|
+
if (s == undefined) s = 1.70158;
|
|
146
|
+
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
|
|
147
|
+
}
|
|
148
|
+
function easeInOutBack(t, b, c, d) {
|
|
149
|
+
if (s == undefined) s = 1.70158;
|
|
150
|
+
if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
|
|
151
|
+
return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;
|
|
152
|
+
}
|
|
153
|
+
module.exports = {
|
|
154
|
+
easeLinear: easeLinear,
|
|
155
|
+
easeInQuad: easeInQuad,
|
|
156
|
+
easeOutQuad: easeOutQuad,
|
|
157
|
+
easeInOutQuad: easeInOutQuad,
|
|
158
|
+
easeInSine: easeInSine,
|
|
159
|
+
easeOutSine: easeOutSine,
|
|
160
|
+
easeInOutSine: easeInOutSine,
|
|
161
|
+
easeInExpo: easeInExpo,
|
|
162
|
+
easeOutExpo: easeOutExpo,
|
|
163
|
+
easeInOutExpo: easeInOutExpo,
|
|
164
|
+
easeInCirc: easeInCirc,
|
|
165
|
+
easeOutCirc: easeOutCirc,
|
|
166
|
+
easeInOutCirc: easeInOutCirc,
|
|
167
|
+
easeInCubic: easeInCubic,
|
|
168
|
+
easeOutCubic: easeOutCubic,
|
|
169
|
+
easeInOutCubic: easeInOutCubic,
|
|
170
|
+
easeInQuart: easeInQuart,
|
|
171
|
+
easeOutQuart: easeOutQuart,
|
|
172
|
+
easeInOutQuart: easeInOutQuart,
|
|
173
|
+
easeInQuint: easeInQuint,
|
|
174
|
+
easeOutQuint: easeOutQuint,
|
|
175
|
+
easeInOutQuint: easeInOutQuint,
|
|
176
|
+
easeInElastic: easeInElastic,
|
|
177
|
+
easeOutElastic: easeOutElastic,
|
|
178
|
+
easeInOutElastic: easeInOutElastic,
|
|
179
|
+
easeInBack: easeInBack,
|
|
180
|
+
easeOutBack: easeOutBack,
|
|
181
|
+
easeInOutBack: easeInOutBack
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/***/ }),
|
|
185
|
+
|
|
186
|
+
/***/ 342:
|
|
187
|
+
/***/ ((module) => {
|
|
188
|
+
|
|
189
|
+
/*
|
|
190
|
+
* Debounce
|
|
191
|
+
*
|
|
192
|
+
* @param {Function} fn - A function to be executed within the time limit.
|
|
193
|
+
* @param {Number} limit - Waiting time.
|
|
194
|
+
* @return {Function} - Returns a new function.
|
|
195
|
+
*/
|
|
196
|
+
function debounce(fn) {
|
|
197
|
+
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
|
|
198
|
+
var timer;
|
|
199
|
+
return function () {
|
|
200
|
+
//Every time this returned function is called, the timer is cleared to ensure that fn is not executed
|
|
201
|
+
clearTimeout(timer);
|
|
202
|
+
|
|
203
|
+
// When the returned function is called for the last time (that is the user stops a continuous operation)
|
|
204
|
+
// Execute fn after another delay milliseconds
|
|
205
|
+
timer = setTimeout(function () {
|
|
206
|
+
fn.apply(this, arguments);
|
|
207
|
+
}, limit);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/*
|
|
212
|
+
* Throttle
|
|
213
|
+
*
|
|
214
|
+
* @param {Function} fn - A function to be executed within the time limit.
|
|
215
|
+
* @param {Number} limit - Waiting time.
|
|
216
|
+
* @return {Function} - Returns a new function.
|
|
217
|
+
*/
|
|
218
|
+
function throttle(fn) {
|
|
219
|
+
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
|
|
220
|
+
var waiting = false;
|
|
221
|
+
return function () {
|
|
222
|
+
if (!waiting) {
|
|
223
|
+
fn.apply(this, arguments);
|
|
224
|
+
waiting = true;
|
|
225
|
+
setTimeout(function () {
|
|
226
|
+
waiting = false;
|
|
227
|
+
}, limit);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
module.exports = {
|
|
232
|
+
debounce: debounce,
|
|
233
|
+
throttle: throttle
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/***/ }),
|
|
237
|
+
|
|
238
|
+
/***/ 787:
|
|
239
|
+
/***/ ((module) => {
|
|
240
|
+
|
|
241
|
+
"use strict";
|
|
242
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
243
|
+
|
|
244
|
+
/***/ })
|
|
245
|
+
|
|
246
|
+
/******/ });
|
|
247
|
+
/************************************************************************/
|
|
248
|
+
/******/ // The module cache
|
|
249
|
+
/******/ var __webpack_module_cache__ = {};
|
|
250
|
+
/******/
|
|
251
|
+
/******/ // The require function
|
|
252
|
+
/******/ function __webpack_require__(moduleId) {
|
|
253
|
+
/******/ // Check if module is in cache
|
|
254
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
255
|
+
/******/ if (cachedModule !== undefined) {
|
|
256
|
+
/******/ return cachedModule.exports;
|
|
257
|
+
/******/ }
|
|
258
|
+
/******/ // Create a new module (and put it into the cache)
|
|
259
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
260
|
+
/******/ // no module.id needed
|
|
261
|
+
/******/ // no module.loaded needed
|
|
262
|
+
/******/ exports: {}
|
|
263
|
+
/******/ };
|
|
264
|
+
/******/
|
|
265
|
+
/******/ // Execute the module function
|
|
266
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
267
|
+
/******/
|
|
268
|
+
/******/ // Return the exports of the module
|
|
269
|
+
/******/ return module.exports;
|
|
270
|
+
/******/ }
|
|
271
|
+
/******/
|
|
272
|
+
/************************************************************************/
|
|
273
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
274
|
+
/******/ (() => {
|
|
275
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
276
|
+
/******/ __webpack_require__.n = (module) => {
|
|
277
|
+
/******/ var getter = module && module.__esModule ?
|
|
278
|
+
/******/ () => (module['default']) :
|
|
279
|
+
/******/ () => (module);
|
|
280
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
281
|
+
/******/ return getter;
|
|
282
|
+
/******/ };
|
|
283
|
+
/******/ })();
|
|
284
|
+
/******/
|
|
285
|
+
/******/ /* webpack/runtime/define property getters */
|
|
286
|
+
/******/ (() => {
|
|
287
|
+
/******/ // define getter functions for harmony exports
|
|
288
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
289
|
+
/******/ for(var key in definition) {
|
|
290
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
291
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
292
|
+
/******/ }
|
|
293
|
+
/******/ }
|
|
294
|
+
/******/ };
|
|
295
|
+
/******/ })();
|
|
296
|
+
/******/
|
|
297
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
298
|
+
/******/ (() => {
|
|
299
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
300
|
+
/******/ })();
|
|
301
|
+
/******/
|
|
302
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
303
|
+
/******/ (() => {
|
|
304
|
+
/******/ // define __esModule on exports
|
|
305
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
306
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
307
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
308
|
+
/******/ }
|
|
309
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
310
|
+
/******/ };
|
|
311
|
+
/******/ })();
|
|
312
|
+
/******/
|
|
313
|
+
/************************************************************************/
|
|
314
|
+
var __webpack_exports__ = {};
|
|
315
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
316
|
+
(() => {
|
|
317
|
+
"use strict";
|
|
318
|
+
__webpack_require__.r(__webpack_exports__);
|
|
319
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
320
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
321
|
+
/* harmony export */ });
|
|
322
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
|
|
323
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
324
|
+
/* harmony import */ var _utils_performance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(342);
|
|
325
|
+
/* harmony import */ var _utils_performance__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_utils_performance__WEBPACK_IMPORTED_MODULE_1__);
|
|
326
|
+
/* harmony import */ var _utils_easing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(711);
|
|
327
|
+
/* harmony import */ var _utils_easing__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_utils_easing__WEBPACK_IMPORTED_MODULE_2__);
|
|
328
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
329
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
330
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
331
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
332
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
333
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
// Adapt the easing parameters of TweenMax
|
|
339
|
+
var EasingList = /*#__PURE__*/function (EasingList) {
|
|
340
|
+
EasingList["linear"] = "linear";
|
|
341
|
+
EasingList["easeIn"] = "ease-in";
|
|
342
|
+
EasingList["easeOut"] = "ease-out";
|
|
343
|
+
EasingList["easeInOut"] = "ease-in-out";
|
|
344
|
+
return EasingList;
|
|
345
|
+
}(EasingList || {});
|
|
346
|
+
var BackToTop = function BackToTop(props) {
|
|
347
|
+
var btnIcon = props.btnIcon;
|
|
348
|
+
var easeType = EasingList[props.easing];
|
|
349
|
+
var speed = props.speed ? props.speed : 500;
|
|
350
|
+
var btnRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
351
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
352
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
353
|
+
isAtRange = _useState2[0],
|
|
354
|
+
setIsAtRange = _useState2[1];
|
|
355
|
+
var windowScrollUpdate = (0,_utils_performance__WEBPACK_IMPORTED_MODULE_1__.throttle)(handleScrollEvent, 5);
|
|
356
|
+
function handleScrollEvent() {
|
|
357
|
+
var scrollTop = window.pageYOffset;
|
|
358
|
+
if (scrollTop < window.innerHeight / 2) {
|
|
359
|
+
setIsAtRange(false);
|
|
360
|
+
} else {
|
|
361
|
+
setIsAtRange(true);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function moveToTop() {
|
|
365
|
+
var duration = speed;
|
|
366
|
+
var scrollToTarget = function scrollToTarget(target) {
|
|
367
|
+
var top = target.getBoundingClientRect().top;
|
|
368
|
+
var startPos = window.pageYOffset;
|
|
369
|
+
var diff = top;
|
|
370
|
+
var start = new Date().getTime();
|
|
371
|
+
var from = 0;
|
|
372
|
+
var to = 100;
|
|
373
|
+
var requestId;
|
|
374
|
+
var loop = function loop() {
|
|
375
|
+
//easing
|
|
376
|
+
var time = new Date().getTime() - start;
|
|
377
|
+
var val;
|
|
378
|
+
switch (easeType) {
|
|
379
|
+
case "linear":
|
|
380
|
+
val = (0,_utils_easing__WEBPACK_IMPORTED_MODULE_2__.easeLinear)(time, from, to - from, duration);
|
|
381
|
+
break;
|
|
382
|
+
case "ease-in":
|
|
383
|
+
val = (0,_utils_easing__WEBPACK_IMPORTED_MODULE_2__.easeInQuad)(time, from, to - from, duration);
|
|
384
|
+
break;
|
|
385
|
+
case "ease-out":
|
|
386
|
+
val = (0,_utils_easing__WEBPACK_IMPORTED_MODULE_2__.easeOutQuad)(time, from, to - from, duration);
|
|
387
|
+
break;
|
|
388
|
+
case "ease-in-out":
|
|
389
|
+
val = (0,_utils_easing__WEBPACK_IMPORTED_MODULE_2__.easeInOutQuad)(time, from, to - from, duration);
|
|
390
|
+
break;
|
|
391
|
+
default:
|
|
392
|
+
val = (0,_utils_easing__WEBPACK_IMPORTED_MODULE_2__.easeLinear)(time, from, to - from, duration);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Elapsed time in miliseconds
|
|
396
|
+
var percent = val / 100;
|
|
397
|
+
window.scrollTo(0, startPos + diff * percent);
|
|
398
|
+
if (time < duration) {
|
|
399
|
+
// Continue moving
|
|
400
|
+
requestId = window.requestAnimationFrame(loop);
|
|
401
|
+
} else {
|
|
402
|
+
window.cancelAnimationFrame(requestId);
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
requestId = window.requestAnimationFrame(loop);
|
|
406
|
+
};
|
|
407
|
+
scrollToTarget(document.body);
|
|
408
|
+
}
|
|
409
|
+
function handleClick(e) {
|
|
410
|
+
e.preventDefault();
|
|
411
|
+
moveToTop();
|
|
412
|
+
}
|
|
413
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
414
|
+
var _btnRef$current, _btnRef$current2, _btnRef$current3;
|
|
415
|
+
//Hide other pages button of back-to-top
|
|
416
|
+
(_btnRef$current = btnRef.current) === null || _btnRef$current === void 0 ? void 0 : _btnRef$current.classList.remove('active');
|
|
417
|
+
|
|
418
|
+
// Add function to the element that should be used as the scrollable area.
|
|
419
|
+
window.removeEventListener('scroll', windowScrollUpdate);
|
|
420
|
+
window.removeEventListener('touchmove', windowScrollUpdate);
|
|
421
|
+
window.addEventListener('scroll', windowScrollUpdate);
|
|
422
|
+
window.addEventListener('touchmove', windowScrollUpdate);
|
|
423
|
+
windowScrollUpdate();
|
|
424
|
+
|
|
425
|
+
//
|
|
426
|
+
(_btnRef$current2 = btnRef.current) === null || _btnRef$current2 === void 0 ? void 0 : _btnRef$current2.removeEventListener('click', handleClick);
|
|
427
|
+
(_btnRef$current3 = btnRef.current) === null || _btnRef$current3 === void 0 ? void 0 : _btnRef$current3.addEventListener('click', handleClick);
|
|
428
|
+
return function () {
|
|
429
|
+
var _btnRef$current4, _btnRef$current5;
|
|
430
|
+
(_btnRef$current4 = btnRef.current) === null || _btnRef$current4 === void 0 ? void 0 : _btnRef$current4.removeEventListener('click', handleClick);
|
|
431
|
+
window.removeEventListener('scroll', windowScrollUpdate);
|
|
432
|
+
window.removeEventListener('touchmove', windowScrollUpdate);
|
|
433
|
+
|
|
434
|
+
//Hide other pages button of back-to-top
|
|
435
|
+
(_btnRef$current5 = btnRef.current) === null || _btnRef$current5 === void 0 ? void 0 : _btnRef$current5.classList.remove('active');
|
|
436
|
+
};
|
|
437
|
+
}, []);
|
|
438
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
439
|
+
className: "back-to-top",
|
|
440
|
+
ref: btnRef
|
|
441
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
442
|
+
type: "button",
|
|
443
|
+
className: isAtRange ? 'active' : ''
|
|
444
|
+
}, btnIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
445
|
+
width: "40px",
|
|
446
|
+
fill: "#000000",
|
|
447
|
+
viewBox: "0 0 96.522 96.522"
|
|
448
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
449
|
+
d: "M74.692,65.181l-9.044-7.321c1.319-5.557,1.988-11.532,1.988-17.761c0-19.963-14.052-38.367-18.719-39.988 c-0.426-0.147-0.887-0.147-1.313,0c-4.667,1.621-18.719,20.025-18.719,39.988c0,6.229,0.669,12.205,1.99,17.761l-9.045,7.321 c-0.541,0.438-0.815,1.127-0.724,1.817l3.69,27.787c0.104,0.787,0.663,1.438,1.425,1.658c0.765,0.22,1.582-0.029,2.092-0.638 l14.413-17.225c3.543,2.163,7.527,2.163,11.07,0l14.411,17.225c0.387,0.461,0.951,0.717,1.534,0.717 c0.186,0,0.373-0.026,0.558-0.079c0.762-0.221,1.32-0.871,1.425-1.658l3.69-27.787C75.507,66.309,75.233,65.619,74.692,65.181z M48.262,39.619c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S52.68,39.619,48.262,39.619z"
|
|
450
|
+
})))))));
|
|
451
|
+
};
|
|
452
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BackToTop);
|
|
453
|
+
})();
|
|
454
|
+
|
|
455
|
+
/******/ return __webpack_exports__;
|
|
456
|
+
/******/ })()
|
|
457
|
+
;
|
|
458
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare module 'react' {
|
|
3
|
+
interface ReactI18NextChildren<T> {
|
|
4
|
+
children?: any;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
declare type CascadingSelectOptionChangeFnType = (input: any, currentData: any, index: any, depth: any, value: any) => void;
|
|
8
|
+
declare type CascadingSelectProps = {
|
|
9
|
+
wrapperClassName?: string;
|
|
10
|
+
controlClassName?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
label?: React.ReactNode | string;
|
|
13
|
+
name?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: any;
|
|
16
|
+
required?: any;
|
|
17
|
+
/** Set headers for each column group */
|
|
18
|
+
columnTitle?: any[];
|
|
19
|
+
/** Set whether to use "label" or "value" for the value of this form, they will be separated by commas, such as `Text 1,Text 1_1,Text 1_1_1` or `1,1_1,1_1_1`.
|
|
20
|
+
* Optional values: `label`, `value`
|
|
21
|
+
*/
|
|
22
|
+
valueType?: string;
|
|
23
|
+
/** Whether to display the close button. */
|
|
24
|
+
showCloseBtn?: boolean;
|
|
25
|
+
/** Set the depth value of the control to control the display of the pop-up layer appear above.
|
|
26
|
+
* Please set it when multiple controls are used at the same time. */
|
|
27
|
+
depth?: number;
|
|
28
|
+
/** Set a loader component to show while the component waits for the next load of data.
|
|
29
|
+
* e.g. `<span>Loading...</span>` or any fancy loader element */
|
|
30
|
+
loader?: React.ReactNode;
|
|
31
|
+
/** Whether to show breadcrumb result */
|
|
32
|
+
displayResult?: boolean;
|
|
33
|
+
/** Set an arrow of breadcrumb result */
|
|
34
|
+
displayResultArrow?: React.ReactNode;
|
|
35
|
+
/** Set an arrow of control */
|
|
36
|
+
controlArrow?: React.ReactNode;
|
|
37
|
+
/** Specify a class for this Node. */
|
|
38
|
+
triggerClassName?: string;
|
|
39
|
+
/** Set a piece of text or HTML code for the trigger */
|
|
40
|
+
triggerContent?: React.ReactNode;
|
|
41
|
+
/** -- */
|
|
42
|
+
id?: string;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
tabIndex?: number;
|
|
45
|
+
[key: `data-${string}`]: string | undefined;
|
|
46
|
+
fetchFuncAsync?: any;
|
|
47
|
+
fetchFuncMethod?: string;
|
|
48
|
+
fetchFuncMethodParams?: any[];
|
|
49
|
+
fetchCallback?: (data: any) => void;
|
|
50
|
+
onFetch?: (data: any) => void;
|
|
51
|
+
onChange?: CascadingSelectOptionChangeFnType | null;
|
|
52
|
+
onBlur?: (e: any) => void;
|
|
53
|
+
onFocus?: (e: any) => void;
|
|
54
|
+
};
|
|
55
|
+
declare const CascadingSelect: (props: CascadingSelectProps) => JSX.Element;
|
|
56
|
+
export default CascadingSelect;
|