add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

9
node_modules/rc-switch/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) 2014-present yiminghe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

74
node_modules/rc-switch/README.md generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# rc-switch
---
Switch ui component for react.
[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![build status][github-actions-image]][github-actions-url]
[![Test coverage][codecov-image]][codecov-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[npm-image]: http://img.shields.io/npm/v/rc-switch.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-switch
[travis-image]: https://img.shields.io/travis/react-component/switch/master?style=flat-square
[travis-url]: https://travis-ci.com/react-component/switch
[github-actions-image]: https://github.com/react-component/switch/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/switch/actions
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/switch/master.svg?style=flat-square
[codecov-url]: https://app.codecov.io/gh/react-component/switch
[david-url]: https://david-dm.org/react-component/switch
[david-image]: https://david-dm.org/react-component/switch/status.svg?style=flat-square
[david-dev-url]: https://david-dm.org/react-component/switch?type=dev
[david-dev-image]: https://david-dm.org/react-component/switch/dev-status.svg?style=flat-square
[download-image]: https://img.shields.io/npm/dm/rc-switch.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-switch
[bundlephobia-url]: https://bundlephobia.com/package/rc-switch
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-switch
## Install
[![rc-switch](https://nodei.co/npm/rc-switch.png)](https://npmjs.org/package/rc-switch)
## Usage
```js
import Switch from 'rc-switch';
export default () => <Switch />;
```
## Compatibility
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Electron |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## API
| Property | Type | Default | Description |
| -------------- | ------------------------ | --------- | -------------------------------------------------------- |
| prefixCls | String | rc-switch | |
| className | String | '' | additional class name of root node |
| checked | boolean | false | whether switch is checked |
| defaultChecked | boolean | false | whether switch is checked on init |
| onChange | Function(checked, event) | | called when switch is checked or unchecked |
| tabIndex | number | | tab-index of switch node |
| onClick | Function(checked, event) | | called when switch is clicked |
| autoFocus | boolean | | get focus when mounts |
| disabled | boolean | false | whether switch is disabled |
| loadingIcon | React.ReactNode | | specific the extra node. generally used in loading icon. |
## Development
```
npm install
npm start
```
Online demo: http://react-component.github.io/switch/
## License
rc-switch is released under the MIT license.

111
node_modules/rc-switch/assets/index.css generated vendored Normal file
View File

@@ -0,0 +1,111 @@
.rc-switch {
position: relative;
display: inline-block;
box-sizing: border-box;
width: 44px;
height: 22px;
line-height: 20px;
padding: 0;
vertical-align: middle;
border-radius: 20px 20px;
border: 1px solid #ccc;
background-color: #ccc;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.35, 0, 0.25, 1);
overflow: hidden;
}
.rc-switch-inner-checked,
.rc-switch-inner-unchecked {
color: #fff;
font-size: 12px;
position: absolute;
top: 0;
transition: left 0.3s cubic-bezier(0.35, 0, 0.25, 1);
}
.rc-switch-inner-checked {
left: -14px;
}
.rc-switch-inner-unchecked {
left: 24px;
}
.rc-switch:after {
position: absolute;
width: 18px;
height: 18px;
left: 2px;
top: 1px;
border-radius: 50% 50%;
background-color: #fff;
content: " ";
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
transform: scale(1);
transition: left 0.3s cubic-bezier(0.35, 0, 0.25, 1);
animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1);
animation-duration: 0.3s;
animation-name: rcSwitchOff;
}
.rc-switch:hover:after {
transform: scale(1.1);
animation-name: rcSwitchOn;
}
.rc-switch:focus {
box-shadow: 0 0 0 2px #d5f1fd;
outline: none;
}
.rc-switch-checked {
border: 1px solid #87d068;
background-color: #87d068;
}
.rc-switch-checked .rc-switch-inner-checked {
left: 6px;
}
.rc-switch-checked .rc-switch-inner-unchecked {
left: 44px;
}
.rc-switch-checked:after {
left: 22px;
}
.rc-switch-disabled {
cursor: no-drop;
background: #ccc;
border-color: #ccc;
}
.rc-switch-disabled:after {
background: #9e9e9e;
animation-name: none;
cursor: no-drop;
}
.rc-switch-disabled:hover:after {
transform: scale(1);
animation-name: none;
}
.rc-switch-label {
display: inline-block;
line-height: 20px;
font-size: 14px;
padding-left: 10px;
vertical-align: middle;
white-space: normal;
pointer-events: none;
user-select: text;
}
@keyframes rcSwitchOn {
0% {
transform: scale(1);
}
50% {
transform: scale(1.25);
}
100% {
transform: scale(1.1);
}
}
@keyframes rcSwitchOff {
0% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}

21
node_modules/rc-switch/es/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import * as React from 'react';
export declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
export declare type SwitchClickEventHandler = SwitchChangeEventHandler;
interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onClick'> {
className?: string;
prefixCls?: string;
disabled?: boolean;
checkedChildren?: React.ReactNode;
unCheckedChildren?: React.ReactNode;
onChange?: SwitchChangeEventHandler;
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
onClick?: SwitchClickEventHandler;
tabIndex?: number;
checked?: boolean;
defaultChecked?: boolean;
loadingIcon?: React.ReactNode;
style?: React.CSSProperties;
title?: string;
}
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
export default Switch;

73
node_modules/rc-switch/es/index.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
import * as React from 'react';
import classNames from 'classnames';
import useMergedState from "rc-util/es/hooks/useMergedState";
import KeyCode from "rc-util/es/KeyCode";
var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
var _classNames;
var _ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
className = _ref.className,
checked = _ref.checked,
defaultChecked = _ref.defaultChecked,
disabled = _ref.disabled,
loadingIcon = _ref.loadingIcon,
checkedChildren = _ref.checkedChildren,
unCheckedChildren = _ref.unCheckedChildren,
onClick = _ref.onClick,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
restProps = _objectWithoutProperties(_ref, _excluded);
var _useMergedState = useMergedState(false, {
value: checked,
defaultValue: defaultChecked
}),
_useMergedState2 = _slicedToArray(_useMergedState, 2),
innerChecked = _useMergedState2[0],
setInnerChecked = _useMergedState2[1];
function triggerChange(newChecked, event) {
var mergedChecked = innerChecked;
if (!disabled) {
mergedChecked = newChecked;
setInnerChecked(mergedChecked);
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
}
return mergedChecked;
}
function onInternalKeyDown(e) {
if (e.which === KeyCode.LEFT) {
triggerChange(false, e);
} else if (e.which === KeyCode.RIGHT) {
triggerChange(true, e);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
function onInternalClick(e) {
var ret = triggerChange(!innerChecked, e);
// [Legacy] trigger onClick with value
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
}
var switchClassName = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-checked"), innerChecked), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return /*#__PURE__*/React.createElement("button", _extends({}, restProps, {
type: "button",
role: "switch",
"aria-checked": innerChecked,
disabled: disabled,
className: switchClassName,
ref: ref,
onKeyDown: onInternalKeyDown,
onClick: onInternalClick
}), loadingIcon, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner-checked")
}, checkedChildren), /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner-unchecked")
}, unCheckedChildren)));
});
Switch.displayName = 'Switch';
export default Switch;

21
node_modules/rc-switch/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import * as React from 'react';
export declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
export declare type SwitchClickEventHandler = SwitchChangeEventHandler;
interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onClick'> {
className?: string;
prefixCls?: string;
disabled?: boolean;
checkedChildren?: React.ReactNode;
unCheckedChildren?: React.ReactNode;
onChange?: SwitchChangeEventHandler;
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
onClick?: SwitchClickEventHandler;
tabIndex?: number;
checked?: boolean;
defaultChecked?: boolean;
loadingIcon?: React.ReactNode;
style?: React.CSSProperties;
title?: string;
}
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
export default Switch;

82
node_modules/rc-switch/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,82 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _useMergedState3 = _interopRequireDefault(require("rc-util/lib/hooks/useMergedState"));
var _KeyCode = _interopRequireDefault(require("rc-util/lib/KeyCode"));
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
var _classNames;
var _ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
className = _ref.className,
checked = _ref.checked,
defaultChecked = _ref.defaultChecked,
disabled = _ref.disabled,
loadingIcon = _ref.loadingIcon,
checkedChildren = _ref.checkedChildren,
unCheckedChildren = _ref.unCheckedChildren,
onClick = _ref.onClick,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
var _useMergedState = (0, _useMergedState3.default)(false, {
value: checked,
defaultValue: defaultChecked
}),
_useMergedState2 = (0, _slicedToArray2.default)(_useMergedState, 2),
innerChecked = _useMergedState2[0],
setInnerChecked = _useMergedState2[1];
function triggerChange(newChecked, event) {
var mergedChecked = innerChecked;
if (!disabled) {
mergedChecked = newChecked;
setInnerChecked(mergedChecked);
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
}
return mergedChecked;
}
function onInternalKeyDown(e) {
if (e.which === _KeyCode.default.LEFT) {
triggerChange(false, e);
} else if (e.which === _KeyCode.default.RIGHT) {
triggerChange(true, e);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
function onInternalClick(e) {
var ret = triggerChange(!innerChecked, e);
// [Legacy] trigger onClick with value
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
}
var switchClassName = (0, _classnames.default)(prefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({}, restProps, {
type: "button",
role: "switch",
"aria-checked": innerChecked,
disabled: disabled,
className: switchClassName,
ref: ref,
onKeyDown: onInternalKeyDown,
onClick: onInternalClick
}), loadingIcon, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner-checked")
}, checkedChildren), /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-inner-unchecked")
}, unCheckedChildren)));
});
Switch.displayName = 'Switch';
var _default = Switch;
exports.default = _default;

76
node_modules/rc-switch/package.json generated vendored Normal file
View File

@@ -0,0 +1,76 @@
{
"name": "rc-switch",
"version": "4.1.0",
"description": "switch ui component for react",
"keywords": [
"react",
"react-component",
"react-switch",
"switch"
],
"homepage": "http://github.com/react-component/switch",
"bugs": {
"url": "http://github.com/react-component/switch/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:react-component/switch.git"
},
"license": "MIT",
"main": "lib/index",
"module": "./es/index",
"files": [
"assets/*.css",
"es",
"lib"
],
"scripts": {
"compile": "father build && lessc assets/index.less assets/index.css",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"gh-pages": "npm run docs:build && npm run docs:deploy",
"lint": "eslint .",
"lint-staged": "lint-staged",
"prepare": "husky install",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"postpublish": "npm run gh-pages",
"start": "dumi dev",
"test": "umi-test"
},
"lint-staged": {
"**/*.{js,jsx,tsx,ts,md,json}": [
"prettier --write"
]
},
"dependencies": {
"@babel/runtime": "^7.21.0",
"classnames": "^2.2.1",
"rc-util": "^5.30.0"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.0",
"@types/classnames": "^2.2.10",
"@types/jest": "^26.0.4",
"@umijs/fabric": "^3.0.0",
"dumi": "^1.1.0",
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-to-json": "^3.0.0",
"eslint": "^7.0.0",
"father": "^4.0.0",
"gh-pages": "^4.0.0",
"husky": "^8.0.1",
"less": "^3.11.1",
"lint-staged": "^13.2.1",
"np": "^7.1.0",
"prettier": "^2.8.8",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"umi-test": "^1.9.7"
},
"peerDependencies": {
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
}
}