diff --git a/.eslintignore b/.eslintignore index b43ec01..dfdf89b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,5 @@ tools node_modules coverage /.git +gulpfile.js +postcss.config.js diff --git a/.gitignore b/.gitignore index 03c1a21..adfa04e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# logs +logs +*.log +npm-debug.log* + +# custom +.DS_Store node_modules .vscode dist +yarn-error.log diff --git a/.storybook/preview.js b/.storybook/preview.js index 645f52d..1604b75 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,10 +1,9 @@ - export const parameters = { - actions: { argTypesRegex: "^on[A-Z].*" }, + actions: { argTypesRegex: '^on[A-Z].*' }, controls: { matchers: { color: /(background|color)$/i, - date: /Date$/, - }, - }, -} \ No newline at end of file + date: /Date$/ + } + } +} diff --git a/README.md b/README.md index 6000349..751db04 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # roui -### rouui 是一个学习用的react ui components +### rouui 是一个学习用的 react ui components +> TODO:add test file diff --git a/components/@types/common.ts b/components/@types/common.ts index 13b3e3e..4e266d3 100644 --- a/components/@types/common.ts +++ b/components/@types/common.ts @@ -1,4 +1,6 @@ import React from 'react' +import { ReplaceProps } from './utils' +export type { TimeZoneName } from './timeZone' export interface StandardProps { /** The prefix of the component CSS class */ @@ -19,3 +21,202 @@ export interface WithAsProps { + ( + props: React.PropsWithChildren & P>>, + context?: any + ): React.ReactElement | null + propTypes?: any + contextTypes?: any + defaultProps?: Partial

+ displayName?: string +} + +export interface AnimationEventProps { + /** Callback fired before the Modal transitions in */ + onEnter?: (node?: null | Element | Text) => void + + /** Callback fired as the Modal begins to transition in */ + onEntering?: (node?: null | Element | Text) => void + + /** Callback fired after the Modal finishes transitioning in */ + onEntered?: (node?: null | Element | Text) => void + + /** Callback fired right before the Modal transitions out */ + onExit?: (node?: null | Element | Text) => void + + /** Callback fired as the Modal begins to transition out */ + onExiting?: (node?: null | Element | Text) => void + + /** Callback fired after the Modal finishes transitioning out */ + onExited?: (node?: null | Element | Text) => void +} + +export type PickerAppearance = 'default' | 'subtle' + +export interface PickerBaseProps extends WithAsProps, AnimationEventProps { + id?: string + + /** Custom locale */ + locale?: LocaleType + + /** A picker can have different appearances. */ + appearance?: PickerAppearance + + /** Format picker to appear inside a content block */ + block?: boolean + + /** Set the padding of the container. */ + containerPadding?: number + + /** Sets the rendering container */ + container?: HTMLElement | (() => HTMLElement) + + /** A picker can show it is currently unable to be interacted with */ + disabled?: boolean + + /** You can use a custom element for this component */ + toggleAs?: React.ElementType + + /** A CSS class to apply to the Menu DOM node. */ + menuClassName?: string + + /** A style to apply to the Menu DOM node. */ + menuStyle?: React.CSSProperties + + /** Picker menu auto width */ + menuAutoWidth?: boolean + + /** Picker menu max Height */ + menuMaxHeight?: number + + /** Placeholder text */ + placeholder?: React.ReactNode + + /** The placement of picker */ + placement?: TypeAttributes.Placement + + /** Prevent floating element overflow */ + preventOverflow?: boolean + + /** Open the menu and control it */ + open?: boolean + + /** Initial open menu */ + defaultOpen?: boolean + + /** A picker that can clear values */ + cleanable?: boolean + + /** Called when Modal is displayed */ + onOpen?: () => void + + /** Called when Modal is closed */ + onClose?: () => void + + /** Custom render extra footer */ + renderExtraFooter?: () => React.ReactNode +} + +export interface FormControlBaseProps { + /** Initial value */ + defaultValue?: ValueType + + /** Current value of the component. Creates a controlled component */ + value?: ValueType + + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void + + /** Set the component to be disabled and cannot be entered */ + disabled?: boolean + + /** Render the control as plain text */ + plaintext?: boolean + + /** Make the control readonly */ + readOnly?: boolean +} + +type ToArray = V extends any[] ? V : V[] + +export interface FormControlPickerProps< + ValueType = any, + LocaleType = any, + DataType = Record +> extends PickerBaseProps, + FormControlBaseProps { + /** The data of component */ + data: DataType[] + + /** Set option value 'key' in 'data' */ + valueKey?: string + + /** Set options to display the 'key' in 'data' */ + labelKey?: string + + /** Set children key in data */ + childrenKey?: string + + /** Disabled items */ + disabledItemValues?: ToArray + + /** Initial value */ + defaultValue?: ValueType + + /** Current value of the component. Creates a controlled component */ + value?: ValueType + + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void +} + +export declare namespace TypeAttributes { + type Size = 'lg' | 'md' | 'sm' | 'xs' + type Status = 'success' | 'warning' | 'error' | 'info' + type Color = 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'violet' + type Appearance = 'default' | 'primary' | 'link' | 'subtle' | 'ghost' + type Placement4 = 'top' | 'bottom' | 'right' | 'left' + type Placement8 = + | 'bottomStart' + | 'bottomEnd' + | 'topStart' + | 'topEnd' + | 'leftStart' + | 'rightStart' + | 'leftEnd' + | 'rightEnd' + type PlacementAuto = + | 'auto' + | 'autoVertical' + | 'autoVerticalStart' + | 'autoVerticalEnd' + | 'autoHorizontal' + | 'autoHorizontalStart' + | 'autoHorizontalEnd' + + type Placement = Placement4 | Placement8 | PlacementAuto + type CheckTrigger = 'change' | 'blur' | 'none' +} + +export interface SVGIcon { + viewBox: string + id: string +} + +export interface ItemDataType extends Record { + label?: string | React.ReactNode + value?: string | number + groupBy?: string + parent?: ItemDataType + children?: ItemDataType[] + loading?: boolean +} + +export interface Offset { + top?: number + left?: number + width?: number + height?: number +} diff --git a/components/@types/global.d.ts b/components/@types/global.d.ts new file mode 100644 index 0000000..674becf --- /dev/null +++ b/components/@types/global.d.ts @@ -0,0 +1,2 @@ +declare const __RSUITE_CLASSNAME_PREFIX__: boolean +declare const __DEV__: boolean diff --git a/components/@types/timeZone.ts b/components/@types/timeZone.ts new file mode 100644 index 0000000..750e9cd --- /dev/null +++ b/components/@types/timeZone.ts @@ -0,0 +1,388 @@ +export type TimeZoneName = + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Nairobi' + | 'Africa/Algiers' + | 'Africa/Lagos' + | 'Africa/Bissau' + | 'Africa/Maputo' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/El_Aaiun' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Khartoum' + | 'Africa/Monrovia' + | 'Africa/Ndjamena' + | 'Africa/Sao_Tome' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Port_of_Spain' + | 'America/Araguaina' + | 'America/Argentina/Buenos_Aires' + | 'America/Argentina/Catamarca' + | 'America/Argentina/Cordoba' + | 'America/Argentina/Jujuy' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Mendoza' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Curacao' + | 'America/Asuncion' + | 'America/Atikokan' + | 'America/Bahia_Banderas' + | 'America/Bahia' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Cayenne' + | 'America/Panama' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Danmarkshavn' + | 'America/Dawson_Creek' + | 'America/Dawson' + | 'America/Denver' + | 'America/Detroit' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Tijuana' + | 'America/Fort_Nelson' + | 'America/Fort_Wayne' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Juneau' + | 'America/Kentucky/Louisville' + | 'America/Kentucky/Monticello' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Toronto' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Rio_Branco' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Sitka' + | 'America/St_Johns' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Vancouver' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Pacific/Auckland' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Europe/Oslo' + | 'Asia/Riyadh' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Qatar' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Kolkata' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Shanghai' + | 'Asia/Colombo' + | 'Asia/Dhaka' + | 'Asia/Damascus' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Hebron' + | 'Asia/Ho_Chi_Minh' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Europe/Istanbul' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Urumqi' + | 'Asia/Kathmandu' + | 'Asia/Khandyga' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ulaanbaatar' + | 'Asia/Ust-Nera' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faroe' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/Stanley' + | 'Australia/Sydney' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/Lord_Howe' + | 'Australia/Lindeman' + | 'Australia/Melbourne' + | 'Australia/Perth' + | 'CET' + | 'Pacific/Easter' + | 'CST6CDT' + | 'EET' + | 'Europe/Dublin' + | 'EST' + | 'EST5EDT' + | 'Etc/GMT-0' + | 'Etc/GMT-1' + | 'Etc/GMT-10' + | 'Etc/GMT-11' + | 'Etc/GMT-12' + | 'Etc/GMT-13' + | 'Etc/GMT-14' + | 'Etc/GMT-2' + | 'Etc/GMT-3' + | 'Etc/GMT-4' + | 'Etc/GMT-5' + | 'Etc/GMT-6' + | 'Etc/GMT-7' + | 'Etc/GMT-8' + | 'Etc/GMT-9' + | 'Etc/GMT+1' + | 'Etc/GMT+10' + | 'Etc/GMT+11' + | 'Etc/GMT+12' + | 'Etc/GMT+2' + | 'Etc/GMT+3' + | 'Etc/GMT+4' + | 'Etc/GMT+5' + | 'Etc/GMT+6' + | 'Etc/GMT+7' + | 'Etc/GMT+8' + | 'Etc/GMT+9' + | 'Etc/UCT' + | 'Etc/UTC' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/London' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Prague' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Zurich' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Gibraltar' + | 'Europe/Helsinki' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Paris' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zaporozhye' + | 'HST' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Reunion' + | 'Pacific/Kwajalein' + | 'MET' + | 'MST' + | 'MST7MDT' + | 'Pacific/Chatham' + | 'Pacific/Apia' + | 'Pacific/Bougainville' + | 'Pacific/Chuuk' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Pago_Pago' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Pohnpei' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | 'PST8PDT' + | 'WET'; diff --git a/components/Button/Button.tsx b/components/Button/Button.tsx index db3d5f5..504f37a 100644 --- a/components/Button/Button.tsx +++ b/components/Button/Button.tsx @@ -1,5 +1,5 @@ import React from 'react' -import './button.css' +import PropTypes from 'prop-types' export interface ButtonProps { /** @@ -46,3 +46,13 @@ export const Button: React.FC = ({ ) } + +Button.propTypes = { + primary: PropTypes.bool, + backgroundColor: PropTypes.string, + size: PropTypes.oneOf(['small', 'medium', 'large']), + label: PropTypes.string, + onClick: PropTypes.func +} + +Button.displayName = 'Button' diff --git a/components/Button/button.css b/components/Button/index.scss similarity index 100% rename from components/Button/button.css rename to components/Button/index.scss diff --git a/components/Button/index.tsx b/components/Button/index.tsx new file mode 100644 index 0000000..54be965 --- /dev/null +++ b/components/Button/index.tsx @@ -0,0 +1,3 @@ +import { Button } from './Button' +export type { ButtonProps } from './Button' +export default Button diff --git a/components/Countdown/Countdown.tsx b/components/Countdown/Countdown.tsx new file mode 100644 index 0000000..8cddc46 --- /dev/null +++ b/components/Countdown/Countdown.tsx @@ -0,0 +1,150 @@ +import { useState, useRef, useMemo, useEffect, FC } from 'react' +import cls from 'classnames' +import PropTypes from 'prop-types' + +const COUNT_SECOND = 60 +const COUNT_FORMAT = '重新发送(SSs)' +const COUNT_DEFAULT = '发送验证码' + +export interface CountDownProps { + /** + * 手机号码 + */ + mobile?: string + /** + * 是否立即开始 + */ + starting?: boolean + /** + * 默认显示内容 + */ + defaultText?: string + /** + * 是否禁用 + */ + disabled?: boolean + /** + * 请求函数 + */ + request?: () => Promise + /** + * 格式化文本 + */ + format?: string + /** + * 点击事件 + */ + onClick?: () => void + /** + * 倒计时开始数字 + */ + startNum?: number +} + +/** + * 倒计时 + * @param props CountDownProps + * @returns + */ +const CountDown: FC = props => { + const { startNum, starting, defaultText, request, format, disabled } = props + const [counting, setCounting] = useState(starting) + const [requesting, setRequesting] = useState(false) + const [showTime, setShowTime] = useState(startNum || COUNT_SECOND) + const timerRef = useRef() + const timeValRef = useRef() + timeValRef.current = showTime + + // 第一次好使,每次执行,都会有一个新的闭包,count + // count 保存了上一次闭包的值 + const count = () => { + clearTimeout(timerRef.current) + setCounting(true) + if (timeValRef.current <= 0) { + clearCount() + return + } + setShowTime(timeValRef.current - 1) + timerRef.current = window.setTimeout(() => { + count() + }, 1000) + } + const clearCount = () => { + clearTimeout(timerRef.current) + setCounting(false) + timeValRef.current = startNum || COUNT_SECOND + } + const currTime = useMemo(() => formatWord(showTime), [showTime]) + + useEffect(() => { + if (counting) { + count() + } + return clearCount + }, []) + + function formatWord(timeVal) { + return (format || COUNT_FORMAT).replace('SS', timeVal) + } + function handleClick() { + if (disabled || requesting || counting) { + return + } + setRequesting(true) + count() + if (!request) { + return + } + request() + .then(resp => { + console.log(resp) + }) + .finally(() => setRequesting(false)) + } + return ( + + {counting ? currTime : defaultText || COUNT_DEFAULT} + + ) +} + +CountDown.propTypes = { + /** + * 手机号码 + */ + mobile: PropTypes.string, + /** + * 是否立即开始 + */ + starting: PropTypes.bool, + /** + * 默认显示内容 + */ + defaultText: PropTypes.string, + /** + * 是否禁用 + */ + disabled: PropTypes.bool, + /** + * 请求函数,返回一个promise + */ + request: PropTypes.func, + /** + * 倒计时格式化 + */ + format: PropTypes.string, + /** + * 开始倒计时数据,与starting配合使用,starting = false时,无效 + */ + startNum: PropTypes.number +} + +CountDown.defaultProps = { + disabled: false, + defaultText: COUNT_DEFAULT, + format: COUNT_FORMAT +} + +CountDown.displayName = 'CountDown' + +export default CountDown diff --git a/components/Countdown/index.scss b/components/Countdown/index.scss index 65eaea5..1d8ee45 100644 --- a/components/Countdown/index.scss +++ b/components/Countdown/index.scss @@ -1,4 +1,4 @@ -@import '../style/vars.scss'; +@import '../styles/common.scss'; .count-down { font-size: 14px; diff --git a/components/Countdown/index.tsx b/components/Countdown/index.tsx index 2e41364..b912800 100644 --- a/components/Countdown/index.tsx +++ b/components/Countdown/index.tsx @@ -1,149 +1,3 @@ -import { useState, useRef, useMemo, useEffect, FC } from 'react' -import cls from 'classnames' -import PropTypes from 'prop-types' -import './index.scss' - -const COUNT_SECOND = 60 -const COUNT_FORMAT = '重新发送(SSs)' -const COUNT_DEFAULT = '发送验证码' - -export interface CountDownProps { - /** - * 手机号码 - */ - mobile?: string - /** - * 是否立即开始 - */ - starting?: boolean - /** - * 默认显示内容 - */ - defaultText?: string - /** - * 是否禁用 - */ - disabled?: boolean - /** - * 请求函数 - */ - request?: () => Promise - /** - * 格式化文本 - */ - format?: string - /** - * 点击事件 - */ - onClick?: () => void - /** - * 倒计时开始数字 - */ - startNum?: number -} - -/** - * 倒计时 - * @param props CountDownProps - * @returns - */ -const CountDown: FC = props => { - const { startNum, starting, defaultText, request, format, disabled } = props - const [counting, setCounting] = useState(starting) - const [requesting, setRequesting] = useState(false) - const [showTime, setShowTime] = useState(startNum || COUNT_SECOND) - const timerRef = useRef() - const timeValRef = useRef() - timeValRef.current = showTime - - // 第一次好使,每次执行,都会有一个新的闭包,count - // count 保存了上一次闭包的值 - const count = (now = true) => { - clearTimeout(timerRef.current) - setCounting(true) - if (timeValRef.current <= 0) { - clearCount() - return - } - setShowTime(timeValRef.current - 1) - timerRef.current = window.setTimeout(() => { - count() - }, 1000) - } - const clearCount = () => { - clearTimeout(timerRef.current) - setCounting(false) - timeValRef.current = startNum || COUNT_SECOND - } - const currTime = useMemo(() => formatWord(showTime), [showTime]) - - useEffect(() => { - if (counting) { - count() - } - return clearCount - }, []) - - function formatWord(timeVal) { - return (format || COUNT_FORMAT).replace('SS', timeVal) - } - function handleClick() { - if (disabled || requesting || counting) { - return - } - setRequesting(true) - count() - if (!request) { - return - } - request() - .then(resp => {}) - .finally(() => setRequesting(false)) - } - return ( - - {counting ? currTime : defaultText || COUNT_DEFAULT} - - ) -} - -CountDown.propTypes = { - /** - * 手机号码 - */ - mobile: PropTypes.string, - /** - * 是否立即开始 - */ - starting: PropTypes.bool, - /** - * 默认显示内容 - */ - defaultText: PropTypes.string, - /** - * 是否禁用 - */ - disabled: PropTypes.bool, - /** - * 请求函数,返回一个promise - */ - request: PropTypes.func, - /** - * 倒计时格式化 - */ - format: PropTypes.string, - /** - * 开始倒计时数据,与starting配合使用,starting = false时,无效 - */ - startNum: PropTypes.number -} - -CountDown.defaultProps = { - disabled: false, - defaultText: COUNT_DEFAULT, - format: COUNT_FORMAT -} - -CountDown.displayName = 'CountDown' - -export default CountDown +import Button from './Countdown' +export type { CountDownProps } from './Countdown' +export default Button diff --git a/components/index.ts b/components/index.ts index 9c6ae08..f05bf9c 100644 --- a/components/index.ts +++ b/components/index.ts @@ -1,3 +1,3 @@ -// Base -export { default as CountDown } from '../components/Countdown' -export { CountDownProps } from '../components/Countdown' +// Components +export { default as CountDown } from './Countdown' +export { default as Button } from './Button' diff --git a/components/styles/common.scss b/components/styles/common.scss new file mode 100644 index 0000000..49f47fb --- /dev/null +++ b/components/styles/common.scss @@ -0,0 +1,5 @@ +//** Mixins +@import 'mixins/hacks.scss'; +@import 'mixins/util.scss'; +//** Variables +@import 'vars.scss'; diff --git a/components/styles/core.scss b/components/styles/core.scss new file mode 100644 index 0000000..63b2f21 --- /dev/null +++ b/components/styles/core.scss @@ -0,0 +1,3 @@ +@import 'common'; +@import 'normalize'; +@import 'keyframes'; diff --git a/components/styles/index.scss b/components/styles/index.scss new file mode 100644 index 0000000..b1706b9 --- /dev/null +++ b/components/styles/index.scss @@ -0,0 +1 @@ +@import './theme/default/index.scss'; diff --git a/components/styles/keyframes.scss b/components/styles/keyframes.scss new file mode 100644 index 0000000..b3b59cb --- /dev/null +++ b/components/styles/keyframes.scss @@ -0,0 +1,444 @@ +@import 'common'; + +// +// All keyframes +// -------------------------------------------------- + +@keyframes shake { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 16.7%, + 50%, + 83.3% { + transform: translate3d(-10px, 0, 0); + } + + 33.3%, + 66.7% { + transform: translate3d(10px, 0, 0); + } +} + +@keyframes shakeHead { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 25%, + 75% { + transform: translate3d(-10px, 0, 0); + } + + 50% { + transform: translate3d(10px, 0, 0); + } +} + +// Opacity not working in Safari,so remove . +@keyframes slideUpIn { + 0% { + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes slideDownIn { + 0% { + transform-origin: 100% 100%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleY(1); + } +} + +@keyframes slideLeftIn { + 0% { + transform-origin: 0% 0%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleX(1); + } +} + +@keyframes slideRightIn { + 0% { + transform-origin: 100% 100%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleX(1); + } +} + +@keyframes errorMessageSlideUpIn { + 0% { + transform: translate3d(0, $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideDownIn { + 0% { + transform: translate3d(0, -1 * $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideLeftIn { + 0% { + transform: translate3d(-1 * $form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideRightIn { + 0% { + transform: translate3d($form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes buttonSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +//** Notification +//======================== +@keyframes notificationMoveIn { + 0% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes notificationMoveOut { + 0% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + max-height: 100px; + } + + 100% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + max-height: 0; + overflow: hidden; + } +} + +@keyframes notificationMoveInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes notificationMoveInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +//** Modal +//======================== +@keyframes bounceIn { + from { + opacity: 0; + transform: scale(0.8); + } + + to { + opacity: 1; + transform: scale(1); + } +} + +@keyframes bounceOut { + from { + opacity: 1; + transform: scale(1); + } + + to { + opacity: 0; + transform: scale(0.8); + } +} + +//** Drawer +//======================== +@keyframes slideInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutLeft { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes slideInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutRight { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(100%, 0, 0); + } +} + +@keyframes slideInTop { + from { + opacity: 0; + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutTop { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideInBottom { + from { + opacity: 0; + transform: translate3d(0, 100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutBottom { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, 100%, 0); + } +} + +//** Loader +//======================== +@keyframes loaderSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +// +@keyframes slideDown { + from { + transform: translateY(-100%); + } + + to { + transform: translateY(0); + } +} + +@keyframes progress-active { + 0% { + opacity: 0.1; + width: 0; + } + + 20% { + opacity: 0.5; + width: 0; + } + + 100% { + opacity: 0; + width: 100%; + } +} + +@keyframes progress-active-vertical { + 0% { + opacity: 0.1; + height: 0; + } + + 20% { + opacity: 0.5; + height: 0; + } + + 100% { + opacity: 0; + height: 100%; + } +} + +@keyframes icon-spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(359deg); + } +} + +@keyframes sideNavFoldedText { + 0% { + max-width: 200px; + opacity: 0.8; + } + + 100% { + max-width: 0; + opacity: 0; + } +} + +@keyframes placeholder-active { + 0% { + background-position: 100% 50%; + } + + 100% { + background-position: 0 50%; + } +} + +//** Carousel +//======================== +@keyframes moveLeftHalf { + 0% { + transform: none; + } + + 100% { + transform: translateX(-50%); + } +} + +@keyframes moveLeftHalf-vertical { + 0% { + transform: none; + } + + 100% { + transform: translateY(-50%); + } +} diff --git a/components/styles/mixins/hacks.scss b/components/styles/mixins/hacks.scss new file mode 100644 index 0000000..e69de29 diff --git a/components/styles/mixins/util.scss b/components/styles/mixins/util.scss new file mode 100644 index 0000000..e69de29 diff --git a/components/styles/normalize.scss b/components/styles/normalize.scss new file mode 100644 index 0000000..f37437b --- /dev/null +++ b/components/styles/normalize.scss @@ -0,0 +1,245 @@ +/* stylelint-disable */ +//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ + +// Reset the box-sizing +// +// Heads up! This reset may cause conflicts with some third-party widgets. +// For recommendations on resolving such conflicts, see +// http://getbootstrap.com/getting-started/#third-box-sizing +* { + box-sizing: border-box; +} + +*::before, +*::after { + box-sizing: border-box; +} + +body { + font-size: $font-size-base; + line-height: $line-height-base; + color: $text-color; + background-color: $body-bg; + // Remove default margin. + margin: 0; + // Optimize for the retina screen + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// Address `[hidden]` styling not present in IE 10. +// Hide the `template` element in IE 10/11, Safari, and Firefox < 22. +[hidden], +template { + display: none; +} + +// Links +// ========================================================================== + +// Remove the gray background color from active links in IE 10. +a { + background-color: transparent; +} + +// Improve readability of focused elements when they are also in an +// active/hover state. +a:active, +a:hover { + outline: 0; +} + +// Text-level semantics +// ========================================================================== + +// Address style set to `bolder` in Firefox 4+, Safari, and Chrome. +b, +strong { + font-weight: bold; +} + +// Prevent `sub` and `sup` affecting `line-height` in all browsers. +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +// Embedded content +// ========================================================================== + +// Remove border when inside `a` element in IE 10. +img { + border: 0; +} + +// Correct overflow not hidden in IE 10/11. +svg:not(:root) { + overflow: hidden; +} + +// Address differences between Firefox and other browsers. +hr { + box-sizing: content-box; + height: 0; +} + +// Contain overflow in all browsers. +pre { + overflow: auto; +} + +// Forms +// ========================================================================== + +// Known limitation: by default, Chrome and Safari on OS X allow very limited +// styling of `select`, unless a `border` property is set. + +// 1. Correct color not being inherited. +// Known issue: affects color of disabled elements. +// 2. Correct font properties not being inherited. +// 3. Address margins set differently in Firefox 4+, Safari, and Chrome. +button, +input, +optgroup, +select, +textarea { + color: inherit; // 1 + font: inherit; // 2 + margin: 0; // 3 +} + +// Address `overflow` set to `hidden` in IE 10/11. +button { + overflow: visible; +} + +// Remove border radius in Chrome 62+ +button { + border-radius: 0; +} + +// Address inconsistent `text-transform` inheritance for `button` and `select`. +// All other form control elements do not inherit `text-transform` values. +// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. +// Correct `select` style inheritance in Firefox. +button, +select { + text-transform: none; +} + +// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` +// and `video` controls. +// 2. Correct inability to style clickable `input` types in iOS. +// 3. Improve usability and consistency of cursor style between image-type +// `input` and others. +button, +html input[type='button'], +input[type='reset'], +input[type='submit'] { + -webkit-appearance: button; // 2 + cursor: pointer; // 3 +} + +// Re-set default cursor for disabled elements. +button[disabled], +html input[disabled] { + cursor: not-allowed; +} + +// Remove inner padding and border in Firefox 4+. +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +// Address Firefox 4+ setting `line-height` on `input` using `!important` in +// the UA stylesheet. +input { + line-height: normal; +} + +// It's recommended that you don't attempt to style these elements. +// Firefox's implementation doesn't respect box-sizing, padding, or width. +// +// 1. Address box sizing set to `content-box` in IE 10. +// 2. Remove excess padding in IE 10. +input[type='checkbox'], +input[type='radio'] { + box-sizing: border-box; // 1 + padding: 0; // 2 +} + +// Fix the cursor style for Chrome's increment/decrement buttons. For certain +// `font-size` values of the `input`, it causes the cursor style of the +// decrement button to change from `default` to `text`. +input[type='number']::-webkit-inner-spin-button, +input[type='number']::-webkit-outer-spin-button { + height: auto; +} + +// Remove default vertical scrollbar in IE 10/11. +textarea { + overflow: auto; +} + +// Tables +// ========================================================================== + +// Remove most spacing between table cells. +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +// Remove tabIndex component outline +[tabindex='-1'] { + outline: none; +} + +// Remove Default button Style +input[type='button'], +input[type='submit'], +input[type='reset'], +button { + border-width: 0; +} + +// Remove IE10's “clear field” X button on certain inputs +input::-ms-clear { + display: none; +} + +// Remove File button Style +input[type='file']::-webkit-file-upload-button, +input[type='file']::-ms-browse { + border-width: 0; + background: transparent; + color: currentColor; +} + +// Reset fonts for relevant elements +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} diff --git a/components/styles/themes/default/core.scss b/components/styles/themes/default/core.scss new file mode 100644 index 0000000..2f9fd7a --- /dev/null +++ b/components/styles/themes/default/core.scss @@ -0,0 +1,3 @@ +// Every component must import these styles, it is support basic styles for rsuite. +@import '../../core'; +@import 'vars'; diff --git a/components/styles/themes/default/index.scss b/components/styles/themes/default/index.scss new file mode 100644 index 0000000..9639320 --- /dev/null +++ b/components/styles/themes/default/index.scss @@ -0,0 +1,5 @@ +@import 'vars'; + +// Components +@import '../../../Button/index.scss'; +@import '../../../Countdown/index.scss'; diff --git a/components/style/vars.scss b/components/styles/themes/default/vars.scss similarity index 97% rename from components/style/vars.scss rename to components/styles/themes/default/vars.scss index 297a6fa..a2dc941 100644 --- a/components/style/vars.scss +++ b/components/styles/themes/default/vars.scss @@ -1,5 +1,5 @@ /* common */ -$namespace: dm; +$namespace: rou; /* color */ // primary diff --git a/components/styles/vars.scss b/components/styles/vars.scss new file mode 100644 index 0000000..0c43ae5 --- /dev/null +++ b/components/styles/vars.scss @@ -0,0 +1,52 @@ +/* common */ +$namespace: rou; + +/* color */ +// primary +$primary-color: #3366ff; +$primary-md-color: #a5affb; +$primary-lt-color: #e5e7fa; + +// success +$succ-color: #47b881; +$succ-md-color: #7ddfc3; +$succ-lt-color: #d5f2ea; + +// warn +$warn-color: #ffcf5c; +$warn-md-color: #dde29d; +$warn-lt-color: #ddd8e7; + +// danger +$dager-color: #ff0033; +$dager-md-color: #7ddfc3; +$dager-lt-color: #d5f2ea; + +/* radius */ +$radius: 3px; + +/* button */ +$btn-radius: $radius; +$btn-padding: 4px 15px; +$btn-height: 22 / 14; + +$btn-lg-padding: 6.5px 18px; + +/* 宽高尺寸 */ +$global-control-height: 32px; + +/* form */ + +$form-radius: 3px; + +// font +$font-family-base: Apple-System, Arial, Helvetica, 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', STXihei, sans-serif; + +$font-size-large: 16px; +$font-size-base: 14px; +$font-size-small: 12px; +$font-size-extra-small: 12px; + +// keyframes +$form-error-message-translate-distance: 2px; diff --git a/es/@types/common.d.ts b/es/@types/common.d.ts new file mode 100644 index 0000000..cc5958e --- /dev/null +++ b/es/@types/common.d.ts @@ -0,0 +1,144 @@ +import React from 'react'; +import { ReplaceProps } from './utils'; +export type { TimeZoneName } from './timeZone'; +export interface StandardProps { + /** The prefix of the component CSS class */ + classPrefix?: string; + /** Additional classes */ + className?: string; + /** Primary content */ + children?: React.ReactNode; + /** Additional style */ + style?: React.CSSProperties; +} +export interface WithAsProps extends StandardProps { + /** You can use a custom element for this component */ + as?: As; +} +export interface RsRefForwardingComponent { + (props: React.PropsWithChildren & P>>, context?: any): React.ReactElement | null; + propTypes?: any; + contextTypes?: any; + defaultProps?: Partial

; + displayName?: string; +} +export interface AnimationEventProps { + /** Callback fired before the Modal transitions in */ + onEnter?: (node?: null | Element | Text) => void; + /** Callback fired as the Modal begins to transition in */ + onEntering?: (node?: null | Element | Text) => void; + /** Callback fired after the Modal finishes transitioning in */ + onEntered?: (node?: null | Element | Text) => void; + /** Callback fired right before the Modal transitions out */ + onExit?: (node?: null | Element | Text) => void; + /** Callback fired as the Modal begins to transition out */ + onExiting?: (node?: null | Element | Text) => void; + /** Callback fired after the Modal finishes transitioning out */ + onExited?: (node?: null | Element | Text) => void; +} +export declare type PickerAppearance = 'default' | 'subtle'; +export interface PickerBaseProps extends WithAsProps, AnimationEventProps { + id?: string; + /** Custom locale */ + locale?: LocaleType; + /** A picker can have different appearances. */ + appearance?: PickerAppearance; + /** Format picker to appear inside a content block */ + block?: boolean; + /** Set the padding of the container. */ + containerPadding?: number; + /** Sets the rendering container */ + container?: HTMLElement | (() => HTMLElement); + /** A picker can show it is currently unable to be interacted with */ + disabled?: boolean; + /** You can use a custom element for this component */ + toggleAs?: React.ElementType; + /** A CSS class to apply to the Menu DOM node. */ + menuClassName?: string; + /** A style to apply to the Menu DOM node. */ + menuStyle?: React.CSSProperties; + /** Picker menu auto width */ + menuAutoWidth?: boolean; + /** Picker menu max Height */ + menuMaxHeight?: number; + /** Placeholder text */ + placeholder?: React.ReactNode; + /** The placement of picker */ + placement?: TypeAttributes.Placement; + /** Prevent floating element overflow */ + preventOverflow?: boolean; + /** Open the menu and control it */ + open?: boolean; + /** Initial open menu */ + defaultOpen?: boolean; + /** A picker that can clear values */ + cleanable?: boolean; + /** Called when Modal is displayed */ + onOpen?: () => void; + /** Called when Modal is closed */ + onClose?: () => void; + /** Custom render extra footer */ + renderExtraFooter?: () => React.ReactNode; +} +export interface FormControlBaseProps { + /** Initial value */ + defaultValue?: ValueType; + /** Current value of the component. Creates a controlled component */ + value?: ValueType; + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void; + /** Set the component to be disabled and cannot be entered */ + disabled?: boolean; + /** Render the control as plain text */ + plaintext?: boolean; + /** Make the control readonly */ + readOnly?: boolean; +} +declare type ToArray = V extends any[] ? V : V[]; +export interface FormControlPickerProps> extends PickerBaseProps, FormControlBaseProps { + /** The data of component */ + data: DataType[]; + /** Set option value 'key' in 'data' */ + valueKey?: string; + /** Set options to display the 'key' in 'data' */ + labelKey?: string; + /** Set children key in data */ + childrenKey?: string; + /** Disabled items */ + disabledItemValues?: ToArray; + /** Initial value */ + defaultValue?: ValueType; + /** Current value of the component. Creates a controlled component */ + value?: ValueType; + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void; +} +export declare namespace TypeAttributes { + type Size = 'lg' | 'md' | 'sm' | 'xs'; + type Status = 'success' | 'warning' | 'error' | 'info'; + type Color = 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'violet'; + type Appearance = 'default' | 'primary' | 'link' | 'subtle' | 'ghost'; + type Placement4 = 'top' | 'bottom' | 'right' | 'left'; + type Placement8 = 'bottomStart' | 'bottomEnd' | 'topStart' | 'topEnd' | 'leftStart' | 'rightStart' | 'leftEnd' | 'rightEnd'; + type PlacementAuto = 'auto' | 'autoVertical' | 'autoVerticalStart' | 'autoVerticalEnd' | 'autoHorizontal' | 'autoHorizontalStart' | 'autoHorizontalEnd'; + type Placement = Placement4 | Placement8 | PlacementAuto; + type CheckTrigger = 'change' | 'blur' | 'none'; +} +export interface SVGIcon { + viewBox: string; + id: string; +} +export interface ItemDataType extends Record { + label?: string | React.ReactNode; + value?: string | number; + groupBy?: string; + parent?: ItemDataType; + children?: ItemDataType[]; + loading?: boolean; +} +export interface Offset { + top?: number; + left?: number; + width?: number; + height?: number; +} diff --git a/es/@types/common.js b/es/@types/common.js new file mode 100644 index 0000000..e69de29 diff --git a/es/@types/global.d.ts b/es/@types/global.d.ts new file mode 100644 index 0000000..674becf --- /dev/null +++ b/es/@types/global.d.ts @@ -0,0 +1,2 @@ +declare const __RSUITE_CLASSNAME_PREFIX__: boolean +declare const __DEV__: boolean diff --git a/es/@types/timeZone.d.ts b/es/@types/timeZone.d.ts new file mode 100644 index 0000000..f4db259 --- /dev/null +++ b/es/@types/timeZone.d.ts @@ -0,0 +1 @@ +export declare type TimeZoneName = 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Nairobi' | 'Africa/Algiers' | 'Africa/Lagos' | 'Africa/Bissau' | 'Africa/Maputo' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/El_Aaiun' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Khartoum' | 'Africa/Monrovia' | 'Africa/Ndjamena' | 'Africa/Sao_Tome' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Port_of_Spain' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Curacao' | 'America/Asuncion' | 'America/Atikokan' | 'America/Bahia_Banderas' | 'America/Bahia' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Cayenne' | 'America/Panama' | 'America/Chicago' | 'America/Chihuahua' | 'America/Costa_Rica' | 'America/Creston' | 'America/Cuiaba' | 'America/Danmarkshavn' | 'America/Dawson_Creek' | 'America/Dawson' | 'America/Denver' | 'America/Detroit' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Tijuana' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Toronto' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Ojinaga' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Rio_Branco' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Sitka' | 'America/St_Johns' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Vancouver' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Pacific/Auckland' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Europe/Oslo' | 'Asia/Riyadh' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Qatar' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Kolkata' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Shanghai' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Damascus' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Europe/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Urumqi' | 'Asia/Kathmandu' | 'Asia/Khandyga' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ulaanbaatar' | 'Asia/Ust-Nera' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faroe' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/Stanley' | 'Australia/Sydney' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/Lord_Howe' | 'Australia/Lindeman' | 'Australia/Melbourne' | 'Australia/Perth' | 'CET' | 'Pacific/Easter' | 'CST6CDT' | 'EET' | 'Europe/Dublin' | 'EST' | 'EST5EDT' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/UCT' | 'Etc/UTC' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/London' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Prague' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Zurich' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Gibraltar' | 'Europe/Helsinki' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Lisbon' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zaporozhye' | 'HST' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Reunion' | 'Pacific/Kwajalein' | 'MET' | 'MST' | 'MST7MDT' | 'Pacific/Chatham' | 'Pacific/Apia' | 'Pacific/Bougainville' | 'Pacific/Chuuk' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Pago_Pago' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Wake' | 'Pacific/Wallis' | 'PST8PDT' | 'WET'; diff --git a/es/@types/timeZone.js b/es/@types/timeZone.js new file mode 100644 index 0000000..e69de29 diff --git a/es/@types/utils.d.ts b/es/@types/utils.d.ts new file mode 100644 index 0000000..b07bb8c --- /dev/null +++ b/es/@types/utils.d.ts @@ -0,0 +1,11 @@ +/// +export declare const tuple: (...args: T) => T; +export declare type Partial = { + [P in keyof T]?: T[P]; +}; +export declare type Pick = { + [P in K]: T[P]; +}; +export declare type Exclude = T extends U ? never : T; +export declare type Omit = Pick>; +export declare type ReplaceProps = Omit, P> & P; diff --git a/es/@types/utils.js b/es/@types/utils.js new file mode 100644 index 0000000..4f4d560 --- /dev/null +++ b/es/@types/utils.js @@ -0,0 +1,7 @@ +export var tuple = function tuple() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return args; +}; \ No newline at end of file diff --git a/es/Button/Button.d.ts b/es/Button/Button.d.ts new file mode 100644 index 0000000..98224ae --- /dev/null +++ b/es/Button/Button.d.ts @@ -0,0 +1,27 @@ +import React from 'react'; +export interface ButtonProps { + /** + * Is this the principal call to action on the page? + */ + primary?: boolean; + /** + * What background color to use + */ + backgroundColor?: string; + /** + * How large should the button be? + */ + size?: 'small' | 'medium' | 'large'; + /** + * Button contents + */ + label: string; + /** + * Optional click handler + */ + onClick?: () => void; +} +/** + * Primary UI component for user interaction + */ +export declare const Button: React.FC; diff --git a/es/Button/Button.js b/es/Button/Button.js new file mode 100644 index 0000000..a585ec3 --- /dev/null +++ b/es/Button/Button.js @@ -0,0 +1,37 @@ +import _extends from "@babel/runtime/helpers/esm/extends"; +import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; +import React from 'react'; +import PropTypes from 'prop-types'; +import { jsx as _jsx } from "react/jsx-runtime"; + +/** + * Primary UI component for user interaction + */ +export var Button = function Button(_ref) { + var _ref$primary = _ref.primary, + primary = _ref$primary === void 0 ? false : _ref$primary, + _ref$size = _ref.size, + size = _ref$size === void 0 ? 'medium' : _ref$size, + backgroundColor = _ref.backgroundColor, + label = _ref.label, + props = _objectWithoutPropertiesLoose(_ref, ["primary", "size", "backgroundColor", "label"]); + + var mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + return /*#__PURE__*/_jsx("button", _extends({ + type: "button", + className: ['storybook-button', "storybook-button--" + size, mode].join(' '), + style: { + backgroundColor: backgroundColor + } + }, props, { + children: label + })); +}; +Button.propTypes = { + primary: PropTypes.bool, + backgroundColor: PropTypes.string, + size: PropTypes.oneOf(['small', 'medium', 'large']), + label: PropTypes.string, + onClick: PropTypes.func +}; +Button.displayName = 'Button'; \ No newline at end of file diff --git a/es/Button/index.d.ts b/es/Button/index.d.ts new file mode 100644 index 0000000..c081a17 --- /dev/null +++ b/es/Button/index.d.ts @@ -0,0 +1,3 @@ +import { Button } from './Button'; +export type { ButtonProps } from './Button'; +export default Button; diff --git a/es/Button/index.js b/es/Button/index.js new file mode 100644 index 0000000..4ad11a2 --- /dev/null +++ b/es/Button/index.js @@ -0,0 +1,2 @@ +import { Button } from './Button'; +export default Button; \ No newline at end of file diff --git a/src/stories/button.css b/es/Button/index.scss similarity index 100% rename from src/stories/button.css rename to es/Button/index.scss diff --git a/es/Countdown/Countdown.d.ts b/es/Countdown/Countdown.d.ts new file mode 100644 index 0000000..1a97d35 --- /dev/null +++ b/es/Countdown/Countdown.d.ts @@ -0,0 +1,42 @@ +import { FC } from 'react'; +export interface CountDownProps { + /** + * 手机号码 + */ + mobile?: string; + /** + * 是否立即开始 + */ + starting?: boolean; + /** + * 默认显示内容 + */ + defaultText?: string; + /** + * 是否禁用 + */ + disabled?: boolean; + /** + * 请求函数 + */ + request?: () => Promise; + /** + * 格式化文本 + */ + format?: string; + /** + * 点击事件 + */ + onClick?: () => void; + /** + * 倒计时开始数字 + */ + startNum?: number; +} +/** + * 倒计时 + * @param props CountDownProps + * @returns + */ +declare const CountDown: FC; +export default CountDown; diff --git a/es/Countdown/Countdown.js b/es/Countdown/Countdown.js new file mode 100644 index 0000000..c065c9f --- /dev/null +++ b/es/Countdown/Countdown.js @@ -0,0 +1,145 @@ +import { useState, useRef, useMemo, useEffect } from 'react'; +import cls from 'classnames'; +import PropTypes from 'prop-types'; +import { jsx as _jsx } from "react/jsx-runtime"; +var COUNT_SECOND = 60; +var COUNT_FORMAT = '重新发送(SSs)'; +var COUNT_DEFAULT = '发送验证码'; + +/** + * 倒计时 + * @param props CountDownProps + * @returns + */ +var CountDown = function CountDown(props) { + var startNum = props.startNum, + starting = props.starting, + defaultText = props.defaultText, + request = props.request, + format = props.format, + disabled = props.disabled; + + var _useState = useState(starting), + counting = _useState[0], + setCounting = _useState[1]; + + var _useState2 = useState(false), + requesting = _useState2[0], + setRequesting = _useState2[1]; + + var _useState3 = useState(startNum || COUNT_SECOND), + showTime = _useState3[0], + setShowTime = _useState3[1]; + + var timerRef = useRef(); + var timeValRef = useRef(); + timeValRef.current = showTime; // 第一次好使,每次执行,都会有一个新的闭包,count + // count 保存了上一次闭包的值 + + var count = function count() { + clearTimeout(timerRef.current); + setCounting(true); + + if (timeValRef.current <= 0) { + clearCount(); + return; + } + + setShowTime(timeValRef.current - 1); + timerRef.current = window.setTimeout(function () { + count(); + }, 1000); + }; + + var clearCount = function clearCount() { + clearTimeout(timerRef.current); + setCounting(false); + timeValRef.current = startNum || COUNT_SECOND; + }; + + var currTime = useMemo(function () { + return formatWord(showTime); + }, [showTime]); + useEffect(function () { + if (counting) { + count(); + } + + return clearCount; + }, []); + + function formatWord(timeVal) { + return (format || COUNT_FORMAT).replace('SS', timeVal); + } + + function handleClick() { + if (disabled || requesting || counting) { + return; + } + + setRequesting(true); + count(); + + if (!request) { + return; + } + + request().then(function (resp) { + console.log(resp); + }).finally(function () { + return setRequesting(false); + }); + } + + return /*#__PURE__*/_jsx("span", { + className: cls('count-down', { + disable: counting || disabled + }), + onClick: handleClick, + children: counting ? currTime : defaultText || COUNT_DEFAULT + }); +}; + +CountDown.propTypes = { + /** + * 手机号码 + */ + mobile: PropTypes.string, + + /** + * 是否立即开始 + */ + starting: PropTypes.bool, + + /** + * 默认显示内容 + */ + defaultText: PropTypes.string, + + /** + * 是否禁用 + */ + disabled: PropTypes.bool, + + /** + * 请求函数,返回一个promise + */ + request: PropTypes.func, + + /** + * 倒计时格式化 + */ + format: PropTypes.string, + + /** + * 开始倒计时数据,与starting配合使用,starting = false时,无效 + */ + startNum: PropTypes.number +}; +CountDown.defaultProps = { + disabled: false, + defaultText: COUNT_DEFAULT, + format: COUNT_FORMAT +}; +CountDown.displayName = 'CountDown'; +export default CountDown; \ No newline at end of file diff --git a/es/Countdown/index.d.ts b/es/Countdown/index.d.ts new file mode 100644 index 0000000..3dba1df --- /dev/null +++ b/es/Countdown/index.d.ts @@ -0,0 +1,3 @@ +import Button from './Countdown'; +export type { CountDownProps } from './Countdown'; +export default Button; diff --git a/es/Countdown/index.js b/es/Countdown/index.js new file mode 100644 index 0000000..4e42eb3 --- /dev/null +++ b/es/Countdown/index.js @@ -0,0 +1,2 @@ +import Button from './Countdown'; +export default Button; \ No newline at end of file diff --git a/es/Countdown/index.scss b/es/Countdown/index.scss new file mode 100644 index 0000000..1d8ee45 --- /dev/null +++ b/es/Countdown/index.scss @@ -0,0 +1,20 @@ +@import '../styles/common.scss'; + +.count-down { + font-size: 14px; + cursor: pointer; + user-select: none; + color: $primary-color; + &:hover { + color: rgba($primary-color, 0.7); + } + + &:active { + color: darken($primary-color, 10%); + } + + &.disable { + color: rgb(153, 153, 153); + cursor: not-allowed; + } +} diff --git a/es/index.d.ts b/es/index.d.ts new file mode 100644 index 0000000..0bdb6bd --- /dev/null +++ b/es/index.d.ts @@ -0,0 +1,2 @@ +export { default as CountDown } from './Countdown'; +export { default as Button } from './Button'; diff --git a/es/index.js b/es/index.js new file mode 100644 index 0000000..d5df5a6 --- /dev/null +++ b/es/index.js @@ -0,0 +1,3 @@ +// Components +export { default as CountDown } from './Countdown'; +export { default as Button } from './Button'; \ No newline at end of file diff --git a/es/styles/common.scss b/es/styles/common.scss new file mode 100644 index 0000000..49f47fb --- /dev/null +++ b/es/styles/common.scss @@ -0,0 +1,5 @@ +//** Mixins +@import 'mixins/hacks.scss'; +@import 'mixins/util.scss'; +//** Variables +@import 'vars.scss'; diff --git a/es/styles/core.scss b/es/styles/core.scss new file mode 100644 index 0000000..63b2f21 --- /dev/null +++ b/es/styles/core.scss @@ -0,0 +1,3 @@ +@import 'common'; +@import 'normalize'; +@import 'keyframes'; diff --git a/es/styles/index.scss b/es/styles/index.scss new file mode 100644 index 0000000..b1706b9 --- /dev/null +++ b/es/styles/index.scss @@ -0,0 +1 @@ +@import './theme/default/index.scss'; diff --git a/es/styles/keyframes.scss b/es/styles/keyframes.scss new file mode 100644 index 0000000..b3b59cb --- /dev/null +++ b/es/styles/keyframes.scss @@ -0,0 +1,444 @@ +@import 'common'; + +// +// All keyframes +// -------------------------------------------------- + +@keyframes shake { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 16.7%, + 50%, + 83.3% { + transform: translate3d(-10px, 0, 0); + } + + 33.3%, + 66.7% { + transform: translate3d(10px, 0, 0); + } +} + +@keyframes shakeHead { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 25%, + 75% { + transform: translate3d(-10px, 0, 0); + } + + 50% { + transform: translate3d(10px, 0, 0); + } +} + +// Opacity not working in Safari,so remove . +@keyframes slideUpIn { + 0% { + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes slideDownIn { + 0% { + transform-origin: 100% 100%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleY(1); + } +} + +@keyframes slideLeftIn { + 0% { + transform-origin: 0% 0%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleX(1); + } +} + +@keyframes slideRightIn { + 0% { + transform-origin: 100% 100%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleX(1); + } +} + +@keyframes errorMessageSlideUpIn { + 0% { + transform: translate3d(0, $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideDownIn { + 0% { + transform: translate3d(0, -1 * $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideLeftIn { + 0% { + transform: translate3d(-1 * $form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideRightIn { + 0% { + transform: translate3d($form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes buttonSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +//** Notification +//======================== +@keyframes notificationMoveIn { + 0% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes notificationMoveOut { + 0% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + max-height: 100px; + } + + 100% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + max-height: 0; + overflow: hidden; + } +} + +@keyframes notificationMoveInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes notificationMoveInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +//** Modal +//======================== +@keyframes bounceIn { + from { + opacity: 0; + transform: scale(0.8); + } + + to { + opacity: 1; + transform: scale(1); + } +} + +@keyframes bounceOut { + from { + opacity: 1; + transform: scale(1); + } + + to { + opacity: 0; + transform: scale(0.8); + } +} + +//** Drawer +//======================== +@keyframes slideInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutLeft { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes slideInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutRight { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(100%, 0, 0); + } +} + +@keyframes slideInTop { + from { + opacity: 0; + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutTop { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideInBottom { + from { + opacity: 0; + transform: translate3d(0, 100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutBottom { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, 100%, 0); + } +} + +//** Loader +//======================== +@keyframes loaderSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +// +@keyframes slideDown { + from { + transform: translateY(-100%); + } + + to { + transform: translateY(0); + } +} + +@keyframes progress-active { + 0% { + opacity: 0.1; + width: 0; + } + + 20% { + opacity: 0.5; + width: 0; + } + + 100% { + opacity: 0; + width: 100%; + } +} + +@keyframes progress-active-vertical { + 0% { + opacity: 0.1; + height: 0; + } + + 20% { + opacity: 0.5; + height: 0; + } + + 100% { + opacity: 0; + height: 100%; + } +} + +@keyframes icon-spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(359deg); + } +} + +@keyframes sideNavFoldedText { + 0% { + max-width: 200px; + opacity: 0.8; + } + + 100% { + max-width: 0; + opacity: 0; + } +} + +@keyframes placeholder-active { + 0% { + background-position: 100% 50%; + } + + 100% { + background-position: 0 50%; + } +} + +//** Carousel +//======================== +@keyframes moveLeftHalf { + 0% { + transform: none; + } + + 100% { + transform: translateX(-50%); + } +} + +@keyframes moveLeftHalf-vertical { + 0% { + transform: none; + } + + 100% { + transform: translateY(-50%); + } +} diff --git a/es/styles/mixins/hacks.scss b/es/styles/mixins/hacks.scss new file mode 100644 index 0000000..e69de29 diff --git a/es/styles/mixins/util.scss b/es/styles/mixins/util.scss new file mode 100644 index 0000000..e69de29 diff --git a/es/styles/normalize.scss b/es/styles/normalize.scss new file mode 100644 index 0000000..f37437b --- /dev/null +++ b/es/styles/normalize.scss @@ -0,0 +1,245 @@ +/* stylelint-disable */ +//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ + +// Reset the box-sizing +// +// Heads up! This reset may cause conflicts with some third-party widgets. +// For recommendations on resolving such conflicts, see +// http://getbootstrap.com/getting-started/#third-box-sizing +* { + box-sizing: border-box; +} + +*::before, +*::after { + box-sizing: border-box; +} + +body { + font-size: $font-size-base; + line-height: $line-height-base; + color: $text-color; + background-color: $body-bg; + // Remove default margin. + margin: 0; + // Optimize for the retina screen + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// Address `[hidden]` styling not present in IE 10. +// Hide the `template` element in IE 10/11, Safari, and Firefox < 22. +[hidden], +template { + display: none; +} + +// Links +// ========================================================================== + +// Remove the gray background color from active links in IE 10. +a { + background-color: transparent; +} + +// Improve readability of focused elements when they are also in an +// active/hover state. +a:active, +a:hover { + outline: 0; +} + +// Text-level semantics +// ========================================================================== + +// Address style set to `bolder` in Firefox 4+, Safari, and Chrome. +b, +strong { + font-weight: bold; +} + +// Prevent `sub` and `sup` affecting `line-height` in all browsers. +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +// Embedded content +// ========================================================================== + +// Remove border when inside `a` element in IE 10. +img { + border: 0; +} + +// Correct overflow not hidden in IE 10/11. +svg:not(:root) { + overflow: hidden; +} + +// Address differences between Firefox and other browsers. +hr { + box-sizing: content-box; + height: 0; +} + +// Contain overflow in all browsers. +pre { + overflow: auto; +} + +// Forms +// ========================================================================== + +// Known limitation: by default, Chrome and Safari on OS X allow very limited +// styling of `select`, unless a `border` property is set. + +// 1. Correct color not being inherited. +// Known issue: affects color of disabled elements. +// 2. Correct font properties not being inherited. +// 3. Address margins set differently in Firefox 4+, Safari, and Chrome. +button, +input, +optgroup, +select, +textarea { + color: inherit; // 1 + font: inherit; // 2 + margin: 0; // 3 +} + +// Address `overflow` set to `hidden` in IE 10/11. +button { + overflow: visible; +} + +// Remove border radius in Chrome 62+ +button { + border-radius: 0; +} + +// Address inconsistent `text-transform` inheritance for `button` and `select`. +// All other form control elements do not inherit `text-transform` values. +// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. +// Correct `select` style inheritance in Firefox. +button, +select { + text-transform: none; +} + +// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` +// and `video` controls. +// 2. Correct inability to style clickable `input` types in iOS. +// 3. Improve usability and consistency of cursor style between image-type +// `input` and others. +button, +html input[type='button'], +input[type='reset'], +input[type='submit'] { + -webkit-appearance: button; // 2 + cursor: pointer; // 3 +} + +// Re-set default cursor for disabled elements. +button[disabled], +html input[disabled] { + cursor: not-allowed; +} + +// Remove inner padding and border in Firefox 4+. +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +// Address Firefox 4+ setting `line-height` on `input` using `!important` in +// the UA stylesheet. +input { + line-height: normal; +} + +// It's recommended that you don't attempt to style these elements. +// Firefox's implementation doesn't respect box-sizing, padding, or width. +// +// 1. Address box sizing set to `content-box` in IE 10. +// 2. Remove excess padding in IE 10. +input[type='checkbox'], +input[type='radio'] { + box-sizing: border-box; // 1 + padding: 0; // 2 +} + +// Fix the cursor style for Chrome's increment/decrement buttons. For certain +// `font-size` values of the `input`, it causes the cursor style of the +// decrement button to change from `default` to `text`. +input[type='number']::-webkit-inner-spin-button, +input[type='number']::-webkit-outer-spin-button { + height: auto; +} + +// Remove default vertical scrollbar in IE 10/11. +textarea { + overflow: auto; +} + +// Tables +// ========================================================================== + +// Remove most spacing between table cells. +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +// Remove tabIndex component outline +[tabindex='-1'] { + outline: none; +} + +// Remove Default button Style +input[type='button'], +input[type='submit'], +input[type='reset'], +button { + border-width: 0; +} + +// Remove IE10's “clear field” X button on certain inputs +input::-ms-clear { + display: none; +} + +// Remove File button Style +input[type='file']::-webkit-file-upload-button, +input[type='file']::-ms-browse { + border-width: 0; + background: transparent; + color: currentColor; +} + +// Reset fonts for relevant elements +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} diff --git a/es/styles/themes/default/core.scss b/es/styles/themes/default/core.scss new file mode 100644 index 0000000..2f9fd7a --- /dev/null +++ b/es/styles/themes/default/core.scss @@ -0,0 +1,3 @@ +// Every component must import these styles, it is support basic styles for rsuite. +@import '../../core'; +@import 'vars'; diff --git a/es/styles/themes/default/index.scss b/es/styles/themes/default/index.scss new file mode 100644 index 0000000..9639320 --- /dev/null +++ b/es/styles/themes/default/index.scss @@ -0,0 +1,5 @@ +@import 'vars'; + +// Components +@import '../../../Button/index.scss'; +@import '../../../Countdown/index.scss'; diff --git a/es/styles/themes/default/vars.scss b/es/styles/themes/default/vars.scss new file mode 100644 index 0000000..a2dc941 --- /dev/null +++ b/es/styles/themes/default/vars.scss @@ -0,0 +1,40 @@ +/* common */ +$namespace: rou; + +/* color */ +// primary +$primary-color: #3366ff; +$primary-md-color: #a5affb; +$primary-lt-color: #e5e7fa; + +// success +$succ-color: #47b881; +$succ-md-color: #7ddfc3; +$succ-lt-color: #d5f2ea; + +// warn +$warn-color: #ffcf5c; +$warn-md-color: #dde29d; +$warn-lt-color: #ddd8e7; + +// danger +$dager-color: #ff0033; +$dager-md-color: #7ddfc3; +$dager-lt-color: #d5f2ea; + +/* radius */ +$radius: 3px; + +/* button */ +$btn-radius: $radius; +$btn-padding: 4px 15px; +$btn-height: 22 / 14; + +$btn-lg-padding: 6.5px 18px; + +/* 宽高尺寸 */ +$global-control-height: 32px; + +/* form */ + +$form-radius: 3px; diff --git a/es/styles/vars.scss b/es/styles/vars.scss new file mode 100644 index 0000000..0c43ae5 --- /dev/null +++ b/es/styles/vars.scss @@ -0,0 +1,52 @@ +/* common */ +$namespace: rou; + +/* color */ +// primary +$primary-color: #3366ff; +$primary-md-color: #a5affb; +$primary-lt-color: #e5e7fa; + +// success +$succ-color: #47b881; +$succ-md-color: #7ddfc3; +$succ-lt-color: #d5f2ea; + +// warn +$warn-color: #ffcf5c; +$warn-md-color: #dde29d; +$warn-lt-color: #ddd8e7; + +// danger +$dager-color: #ff0033; +$dager-md-color: #7ddfc3; +$dager-lt-color: #d5f2ea; + +/* radius */ +$radius: 3px; + +/* button */ +$btn-radius: $radius; +$btn-padding: 4px 15px; +$btn-height: 22 / 14; + +$btn-lg-padding: 6.5px 18px; + +/* 宽高尺寸 */ +$global-control-height: 32px; + +/* form */ + +$form-radius: 3px; + +// font +$font-family-base: Apple-System, Arial, Helvetica, 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', STXihei, sans-serif; + +$font-size-large: 16px; +$font-size-base: 14px; +$font-size-small: 12px; +$font-size-extra-small: 12px; + +// keyframes +$form-error-message-translate-distance: 2px; diff --git a/gulpfile.js b/gulpfile.js index 8066a16..e1baa4c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,65 +1,65 @@ -const del = require('del'); -const less = require('gulp-less'); -const postcss = require('gulp-postcss'); -const sourcemaps = require('gulp-sourcemaps'); -const rename = require('gulp-rename'); -const babel = require('gulp-babel'); -const rtlcss = require('gulp-rtlcss'); -const gulp = require('gulp'); -const babelrc = require('./babel.config'); +const del = require('del') +const sass = require('gulp-sass') +const postcss = require('gulp-postcss') +const sourcemaps = require('gulp-sourcemaps') +const rename = require('gulp-rename') +const babel = require('gulp-babel') +const rtlcss = require('gulp-rtlcss') +const gulp = require('gulp') +const babelrc = require('./babel.config') -const ESM_DIR = './es'; -const LIB_DIR = './lib'; -const DIST_DIR = './dist'; -const STYLE_SOURCE_DIR = './src/styles'; -const STYLE_DIST_DIR = './dist/styles'; -const TS_SOURCE = ['./src/**/*.tsx', './src/**/*.ts', '!./src/**/*.d.ts']; -const THEMES = ['default', 'dark']; +const ESM_DIR = './es' +const LIB_DIR = './lib' +const DIST_DIR = './dist' +const STYLE_SOURCE_DIR = './components/styles' +const STYLE_DIST_DIR = './dist/styles' +const TS_SOURCE = ['./components/**/*.tsx', './components/**/*.ts', '!./components/**/*.d.ts'] +const THEMES = ['default'] function clean(done) { - del.sync([LIB_DIR, ESM_DIR, DIST_DIR], { force: true }); - done(); + del.sync([LIB_DIR, ESM_DIR, DIST_DIR], { force: true }) + done() } -function buildLess() { +function buildSass() { return THEMES.map(theme => { - const taskName = `buildLess:${theme}`; + const taskName = `buildSass:${theme}` gulp.task(taskName, () => gulp - .src(`${STYLE_SOURCE_DIR}/themes/${theme}/index.less`) + .src(`${STYLE_SOURCE_DIR}/themes/${theme}/index.scss`) .pipe(sourcemaps.init()) - .pipe(less({ javascriptEnabled: true })) + .pipe(sass({ outputStyle: 'compressed' })) .pipe(postcss([require('autoprefixer')])) .pipe(sourcemaps.write('./')) - .pipe(rename(`rsuite-${theme}.css`)) + .pipe(rename(`rouui-${theme}.css`)) .pipe(gulp.dest(`${STYLE_DIST_DIR}`)) - ); - return taskName; - }); + ) + return taskName + }) } function buildCSS() { return THEMES.map(theme => { - const taskName = `buildCSS:${theme}`; + const taskName = `buildCSS:${theme}` gulp.task(taskName, () => gulp - .src(`${STYLE_DIST_DIR}/rsuite-${theme}.css`) + .src(`${STYLE_DIST_DIR}/rouui-${theme}.css`) .pipe(sourcemaps.init()) .pipe(postcss()) .pipe(rename({ suffix: '.min' })) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(`${STYLE_DIST_DIR}`)) - ); - return taskName; - }); + ) + return taskName + }) } function buildRTLCSS() { return THEMES.map(theme => { - const taskName = `buildRTLCSS:${theme}`; + const taskName = `buildRTLCSS:${theme}` gulp.task(taskName, () => gulp - .src(`${STYLE_DIST_DIR}/rsuite-${theme}.css`) + .src(`${STYLE_DIST_DIR}/rouui-${theme}.css`) .pipe(rtlcss()) // Convert to RTL. .pipe(rename({ suffix: '-rtl' })) // Append "-rtl" to the filename. .pipe(gulp.dest(`${STYLE_DIST_DIR}`)) @@ -68,13 +68,13 @@ function buildRTLCSS() { .pipe(rename({ suffix: '.min' })) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(`${STYLE_DIST_DIR}`)) - ); - return taskName; - }); + ) + return taskName + }) } function buildLib() { - return gulp.src(TS_SOURCE).pipe(babel(babelrc())).pipe(gulp.dest(LIB_DIR)); + return gulp.src(TS_SOURCE).pipe(babel(babelrc())).pipe(gulp.dest(LIB_DIR)) } function buildEsm() { @@ -87,44 +87,44 @@ function buildEsm() { }) ) ) - .pipe(gulp.dest(ESM_DIR)); + .pipe(gulp.dest(ESM_DIR)) } function copyFontFiles() { - return gulp.src(`${STYLE_SOURCE_DIR}/fonts/**/*`).pipe(gulp.dest(`${STYLE_DIST_DIR}/fonts`)); + return gulp.src(`${STYLE_SOURCE_DIR}/fonts/**/*`).pipe(gulp.dest(`${STYLE_DIST_DIR}/fonts`)) } function copyTypescriptDeclarationFiles() { - return gulp.src('./src/**/*.d.ts').pipe(gulp.dest(LIB_DIR)).pipe(gulp.dest(ESM_DIR)); + return gulp.src('./components/**/*.d.ts').pipe(gulp.dest(LIB_DIR)).pipe(gulp.dest(ESM_DIR)) } -function copyLessFiles() { +function copyScssFiles() { return gulp - .src(['./src/**/*.less', './src/**/fonts/**/*']) + .src(['./components/**/*.scss', './components/**/fonts/**/*']) .pipe(gulp.dest(LIB_DIR)) - .pipe(gulp.dest(ESM_DIR)); + .pipe(gulp.dest(ESM_DIR)) } function watch() { - const watcher = gulp.watch(TS_SOURCE); + const watcher = gulp.watch(TS_SOURCE) watcher.on('change', (filePath, stats) => { - console.log('File ' + filePath + ' was changed, running tasks...'); - const libPath = filePath.replace('src/', 'lib/').replace(/\/[a-z|A-Z]+.(tsx|ts)/, ''); + console.log('File ' + filePath + ' was changed, running tasks...') + const libPath = filePath.replace('components/', 'lib/').replace(/\/[a-z|A-Z]+.(tsx|ts)/, '') - return gulp.src(filePath).pipe(babel(babelrc())).pipe(gulp.dest(libPath)); - }); + return gulp.src(filePath).pipe(babel(babelrc())).pipe(gulp.dest(libPath)) + }) } exports.buildStyle = gulp.series( clean, - ...buildLess(), + ...buildSass(), ...buildCSS(), ...buildRTLCSS(), copyFontFiles -); -exports.dev = gulp.series(clean, buildLib, watch); +) +exports.dev = gulp.series(clean, buildLib, watch) exports.build = gulp.series( clean, - gulp.parallel(buildLib, buildEsm, gulp.series(...buildLess(), ...buildCSS(), ...buildRTLCSS())), - gulp.parallel(copyTypescriptDeclarationFiles, copyLessFiles, copyFontFiles) -); + gulp.parallel(buildLib, buildEsm, gulp.series(...buildSass(), ...buildCSS(), ...buildRTLCSS())), + gulp.parallel(copyTypescriptDeclarationFiles, copyScssFiles, copyFontFiles) +) diff --git a/lib/@types/common.d.ts b/lib/@types/common.d.ts new file mode 100644 index 0000000..cc5958e --- /dev/null +++ b/lib/@types/common.d.ts @@ -0,0 +1,144 @@ +import React from 'react'; +import { ReplaceProps } from './utils'; +export type { TimeZoneName } from './timeZone'; +export interface StandardProps { + /** The prefix of the component CSS class */ + classPrefix?: string; + /** Additional classes */ + className?: string; + /** Primary content */ + children?: React.ReactNode; + /** Additional style */ + style?: React.CSSProperties; +} +export interface WithAsProps extends StandardProps { + /** You can use a custom element for this component */ + as?: As; +} +export interface RsRefForwardingComponent { + (props: React.PropsWithChildren & P>>, context?: any): React.ReactElement | null; + propTypes?: any; + contextTypes?: any; + defaultProps?: Partial

; + displayName?: string; +} +export interface AnimationEventProps { + /** Callback fired before the Modal transitions in */ + onEnter?: (node?: null | Element | Text) => void; + /** Callback fired as the Modal begins to transition in */ + onEntering?: (node?: null | Element | Text) => void; + /** Callback fired after the Modal finishes transitioning in */ + onEntered?: (node?: null | Element | Text) => void; + /** Callback fired right before the Modal transitions out */ + onExit?: (node?: null | Element | Text) => void; + /** Callback fired as the Modal begins to transition out */ + onExiting?: (node?: null | Element | Text) => void; + /** Callback fired after the Modal finishes transitioning out */ + onExited?: (node?: null | Element | Text) => void; +} +export declare type PickerAppearance = 'default' | 'subtle'; +export interface PickerBaseProps extends WithAsProps, AnimationEventProps { + id?: string; + /** Custom locale */ + locale?: LocaleType; + /** A picker can have different appearances. */ + appearance?: PickerAppearance; + /** Format picker to appear inside a content block */ + block?: boolean; + /** Set the padding of the container. */ + containerPadding?: number; + /** Sets the rendering container */ + container?: HTMLElement | (() => HTMLElement); + /** A picker can show it is currently unable to be interacted with */ + disabled?: boolean; + /** You can use a custom element for this component */ + toggleAs?: React.ElementType; + /** A CSS class to apply to the Menu DOM node. */ + menuClassName?: string; + /** A style to apply to the Menu DOM node. */ + menuStyle?: React.CSSProperties; + /** Picker menu auto width */ + menuAutoWidth?: boolean; + /** Picker menu max Height */ + menuMaxHeight?: number; + /** Placeholder text */ + placeholder?: React.ReactNode; + /** The placement of picker */ + placement?: TypeAttributes.Placement; + /** Prevent floating element overflow */ + preventOverflow?: boolean; + /** Open the menu and control it */ + open?: boolean; + /** Initial open menu */ + defaultOpen?: boolean; + /** A picker that can clear values */ + cleanable?: boolean; + /** Called when Modal is displayed */ + onOpen?: () => void; + /** Called when Modal is closed */ + onClose?: () => void; + /** Custom render extra footer */ + renderExtraFooter?: () => React.ReactNode; +} +export interface FormControlBaseProps { + /** Initial value */ + defaultValue?: ValueType; + /** Current value of the component. Creates a controlled component */ + value?: ValueType; + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void; + /** Set the component to be disabled and cannot be entered */ + disabled?: boolean; + /** Render the control as plain text */ + plaintext?: boolean; + /** Make the control readonly */ + readOnly?: boolean; +} +declare type ToArray = V extends any[] ? V : V[]; +export interface FormControlPickerProps> extends PickerBaseProps, FormControlBaseProps { + /** The data of component */ + data: DataType[]; + /** Set option value 'key' in 'data' */ + valueKey?: string; + /** Set options to display the 'key' in 'data' */ + labelKey?: string; + /** Set children key in data */ + childrenKey?: string; + /** Disabled items */ + disabledItemValues?: ToArray; + /** Initial value */ + defaultValue?: ValueType; + /** Current value of the component. Creates a controlled component */ + value?: ValueType; + /** Called after the value has been changed */ + onChange?: (value: ValueType, event: React.SyntheticEvent) => void; +} +export declare namespace TypeAttributes { + type Size = 'lg' | 'md' | 'sm' | 'xs'; + type Status = 'success' | 'warning' | 'error' | 'info'; + type Color = 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'violet'; + type Appearance = 'default' | 'primary' | 'link' | 'subtle' | 'ghost'; + type Placement4 = 'top' | 'bottom' | 'right' | 'left'; + type Placement8 = 'bottomStart' | 'bottomEnd' | 'topStart' | 'topEnd' | 'leftStart' | 'rightStart' | 'leftEnd' | 'rightEnd'; + type PlacementAuto = 'auto' | 'autoVertical' | 'autoVerticalStart' | 'autoVerticalEnd' | 'autoHorizontal' | 'autoHorizontalStart' | 'autoHorizontalEnd'; + type Placement = Placement4 | Placement8 | PlacementAuto; + type CheckTrigger = 'change' | 'blur' | 'none'; +} +export interface SVGIcon { + viewBox: string; + id: string; +} +export interface ItemDataType extends Record { + label?: string | React.ReactNode; + value?: string | number; + groupBy?: string; + parent?: ItemDataType; + children?: ItemDataType[]; + loading?: boolean; +} +export interface Offset { + top?: number; + left?: number; + width?: number; + height?: number; +} diff --git a/lib/@types/common.js b/lib/@types/common.js new file mode 100644 index 0000000..9a390c3 --- /dev/null +++ b/lib/@types/common.js @@ -0,0 +1 @@ +"use strict"; \ No newline at end of file diff --git a/lib/@types/global.d.ts b/lib/@types/global.d.ts new file mode 100644 index 0000000..674becf --- /dev/null +++ b/lib/@types/global.d.ts @@ -0,0 +1,2 @@ +declare const __RSUITE_CLASSNAME_PREFIX__: boolean +declare const __DEV__: boolean diff --git a/lib/@types/timeZone.d.ts b/lib/@types/timeZone.d.ts new file mode 100644 index 0000000..f4db259 --- /dev/null +++ b/lib/@types/timeZone.d.ts @@ -0,0 +1 @@ +export declare type TimeZoneName = 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Nairobi' | 'Africa/Algiers' | 'Africa/Lagos' | 'Africa/Bissau' | 'Africa/Maputo' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/El_Aaiun' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Khartoum' | 'Africa/Monrovia' | 'Africa/Ndjamena' | 'Africa/Sao_Tome' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Port_of_Spain' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Curacao' | 'America/Asuncion' | 'America/Atikokan' | 'America/Bahia_Banderas' | 'America/Bahia' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Cayenne' | 'America/Panama' | 'America/Chicago' | 'America/Chihuahua' | 'America/Costa_Rica' | 'America/Creston' | 'America/Cuiaba' | 'America/Danmarkshavn' | 'America/Dawson_Creek' | 'America/Dawson' | 'America/Denver' | 'America/Detroit' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Tijuana' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Toronto' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Ojinaga' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Rio_Branco' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Sitka' | 'America/St_Johns' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Vancouver' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Pacific/Auckland' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Europe/Oslo' | 'Asia/Riyadh' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Qatar' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Kolkata' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Shanghai' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Damascus' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Europe/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Urumqi' | 'Asia/Kathmandu' | 'Asia/Khandyga' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ulaanbaatar' | 'Asia/Ust-Nera' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faroe' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/Stanley' | 'Australia/Sydney' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/Lord_Howe' | 'Australia/Lindeman' | 'Australia/Melbourne' | 'Australia/Perth' | 'CET' | 'Pacific/Easter' | 'CST6CDT' | 'EET' | 'Europe/Dublin' | 'EST' | 'EST5EDT' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/UCT' | 'Etc/UTC' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/London' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Prague' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Zurich' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Gibraltar' | 'Europe/Helsinki' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Lisbon' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zaporozhye' | 'HST' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Reunion' | 'Pacific/Kwajalein' | 'MET' | 'MST' | 'MST7MDT' | 'Pacific/Chatham' | 'Pacific/Apia' | 'Pacific/Bougainville' | 'Pacific/Chuuk' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Pago_Pago' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Wake' | 'Pacific/Wallis' | 'PST8PDT' | 'WET'; diff --git a/lib/@types/timeZone.js b/lib/@types/timeZone.js new file mode 100644 index 0000000..9a390c3 --- /dev/null +++ b/lib/@types/timeZone.js @@ -0,0 +1 @@ +"use strict"; \ No newline at end of file diff --git a/lib/@types/utils.d.ts b/lib/@types/utils.d.ts new file mode 100644 index 0000000..b07bb8c --- /dev/null +++ b/lib/@types/utils.d.ts @@ -0,0 +1,11 @@ +/// +export declare const tuple: (...args: T) => T; +export declare type Partial = { + [P in keyof T]?: T[P]; +}; +export declare type Pick = { + [P in K]: T[P]; +}; +export declare type Exclude = T extends U ? never : T; +export declare type Omit = Pick>; +export declare type ReplaceProps = Omit, P> & P; diff --git a/lib/@types/utils.js b/lib/@types/utils.js new file mode 100644 index 0000000..97d8eee --- /dev/null +++ b/lib/@types/utils.js @@ -0,0 +1,14 @@ +"use strict"; + +exports.__esModule = true; +exports.tuple = void 0; + +var tuple = function tuple() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return args; +}; + +exports.tuple = tuple; \ No newline at end of file diff --git a/lib/Button/Button.d.ts b/lib/Button/Button.d.ts new file mode 100644 index 0000000..98224ae --- /dev/null +++ b/lib/Button/Button.d.ts @@ -0,0 +1,27 @@ +import React from 'react'; +export interface ButtonProps { + /** + * Is this the principal call to action on the page? + */ + primary?: boolean; + /** + * What background color to use + */ + backgroundColor?: string; + /** + * How large should the button be? + */ + size?: 'small' | 'medium' | 'large'; + /** + * Button contents + */ + label: string; + /** + * Optional click handler + */ + onClick?: () => void; +} +/** + * Primary UI component for user interaction + */ +export declare const Button: React.FC; diff --git a/lib/Button/Button.js b/lib/Button/Button.js new file mode 100644 index 0000000..97c2051 --- /dev/null +++ b/lib/Button/Button.js @@ -0,0 +1,49 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +exports.__esModule = true; +exports.Button = void 0; + +var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); + +var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); + +var _react = _interopRequireDefault(require("react")); + +var _propTypes = _interopRequireDefault(require("prop-types")); + +var _jsxRuntime = require("react/jsx-runtime"); + +/** + * Primary UI component for user interaction + */ +var Button = function Button(_ref) { + var _ref$primary = _ref.primary, + primary = _ref$primary === void 0 ? false : _ref$primary, + _ref$size = _ref.size, + size = _ref$size === void 0 ? 'medium' : _ref$size, + backgroundColor = _ref.backgroundColor, + label = _ref.label, + props = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["primary", "size", "backgroundColor", "label"]); + var mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", (0, _extends2.default)({ + type: "button", + className: ['storybook-button', "storybook-button--" + size, mode].join(' '), + style: { + backgroundColor: backgroundColor + } + }, props, { + children: label + })); +}; + +exports.Button = Button; +Button.propTypes = { + primary: _propTypes.default.bool, + backgroundColor: _propTypes.default.string, + size: _propTypes.default.oneOf(['small', 'medium', 'large']), + label: _propTypes.default.string, + onClick: _propTypes.default.func +}; +Button.displayName = 'Button'; \ No newline at end of file diff --git a/lib/Button/index.d.ts b/lib/Button/index.d.ts new file mode 100644 index 0000000..c081a17 --- /dev/null +++ b/lib/Button/index.d.ts @@ -0,0 +1,3 @@ +import { Button } from './Button'; +export type { ButtonProps } from './Button'; +export default Button; diff --git a/lib/Button/index.js b/lib/Button/index.js new file mode 100644 index 0000000..2dab152 --- /dev/null +++ b/lib/Button/index.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _Button = require("./Button"); + +var _default = _Button.Button; +exports.default = _default; \ No newline at end of file diff --git a/lib/Button/index.scss b/lib/Button/index.scss new file mode 100644 index 0000000..dc91dc7 --- /dev/null +++ b/lib/Button/index.scss @@ -0,0 +1,30 @@ +.storybook-button { + font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: 700; + border: 0; + border-radius: 3em; + cursor: pointer; + display: inline-block; + line-height: 1; +} +.storybook-button--primary { + color: white; + background-color: #1ea7fd; +} +.storybook-button--secondary { + color: #333; + background-color: transparent; + box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset; +} +.storybook-button--small { + font-size: 12px; + padding: 10px 16px; +} +.storybook-button--medium { + font-size: 14px; + padding: 11px 20px; +} +.storybook-button--large { + font-size: 16px; + padding: 12px 24px; +} diff --git a/lib/Countdown/Countdown.d.ts b/lib/Countdown/Countdown.d.ts new file mode 100644 index 0000000..1a97d35 --- /dev/null +++ b/lib/Countdown/Countdown.d.ts @@ -0,0 +1,42 @@ +import { FC } from 'react'; +export interface CountDownProps { + /** + * 手机号码 + */ + mobile?: string; + /** + * 是否立即开始 + */ + starting?: boolean; + /** + * 默认显示内容 + */ + defaultText?: string; + /** + * 是否禁用 + */ + disabled?: boolean; + /** + * 请求函数 + */ + request?: () => Promise; + /** + * 格式化文本 + */ + format?: string; + /** + * 点击事件 + */ + onClick?: () => void; + /** + * 倒计时开始数字 + */ + startNum?: number; +} +/** + * 倒计时 + * @param props CountDownProps + * @returns + */ +declare const CountDown: FC; +export default CountDown; diff --git a/lib/Countdown/Countdown.js b/lib/Countdown/Countdown.js new file mode 100644 index 0000000..dd3663a --- /dev/null +++ b/lib/Countdown/Countdown.js @@ -0,0 +1,157 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +exports.__esModule = true; +exports.default = void 0; + +var _react = require("react"); + +var _classnames = _interopRequireDefault(require("classnames")); + +var _propTypes = _interopRequireDefault(require("prop-types")); + +var _jsxRuntime = require("react/jsx-runtime"); + +var COUNT_SECOND = 60; +var COUNT_FORMAT = '重新发送(SSs)'; +var COUNT_DEFAULT = '发送验证码'; + +/** + * 倒计时 + * @param props CountDownProps + * @returns + */ +var CountDown = function CountDown(props) { + var startNum = props.startNum, + starting = props.starting, + defaultText = props.defaultText, + request = props.request, + format = props.format, + disabled = props.disabled; + + var _useState = (0, _react.useState)(starting), + counting = _useState[0], + setCounting = _useState[1]; + + var _useState2 = (0, _react.useState)(false), + requesting = _useState2[0], + setRequesting = _useState2[1]; + + var _useState3 = (0, _react.useState)(startNum || COUNT_SECOND), + showTime = _useState3[0], + setShowTime = _useState3[1]; + + var timerRef = (0, _react.useRef)(); + var timeValRef = (0, _react.useRef)(); + timeValRef.current = showTime; // 第一次好使,每次执行,都会有一个新的闭包,count + // count 保存了上一次闭包的值 + + var count = function count() { + clearTimeout(timerRef.current); + setCounting(true); + + if (timeValRef.current <= 0) { + clearCount(); + return; + } + + setShowTime(timeValRef.current - 1); + timerRef.current = window.setTimeout(function () { + count(); + }, 1000); + }; + + var clearCount = function clearCount() { + clearTimeout(timerRef.current); + setCounting(false); + timeValRef.current = startNum || COUNT_SECOND; + }; + + var currTime = (0, _react.useMemo)(function () { + return formatWord(showTime); + }, [showTime]); + (0, _react.useEffect)(function () { + if (counting) { + count(); + } + + return clearCount; + }, []); + + function formatWord(timeVal) { + return (format || COUNT_FORMAT).replace('SS', timeVal); + } + + function handleClick() { + if (disabled || requesting || counting) { + return; + } + + setRequesting(true); + count(); + + if (!request) { + return; + } + + request().then(function (resp) { + console.log(resp); + }).finally(function () { + return setRequesting(false); + }); + } + + return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { + className: (0, _classnames.default)('count-down', { + disable: counting || disabled + }), + onClick: handleClick, + children: counting ? currTime : defaultText || COUNT_DEFAULT + }); +}; + +CountDown.propTypes = { + /** + * 手机号码 + */ + mobile: _propTypes.default.string, + + /** + * 是否立即开始 + */ + starting: _propTypes.default.bool, + + /** + * 默认显示内容 + */ + defaultText: _propTypes.default.string, + + /** + * 是否禁用 + */ + disabled: _propTypes.default.bool, + + /** + * 请求函数,返回一个promise + */ + request: _propTypes.default.func, + + /** + * 倒计时格式化 + */ + format: _propTypes.default.string, + + /** + * 开始倒计时数据,与starting配合使用,starting = false时,无效 + */ + startNum: _propTypes.default.number +}; +CountDown.defaultProps = { + disabled: false, + defaultText: COUNT_DEFAULT, + format: COUNT_FORMAT +}; +CountDown.displayName = 'CountDown'; +var _default = CountDown; +exports.default = _default; \ No newline at end of file diff --git a/lib/Countdown/index.d.ts b/lib/Countdown/index.d.ts new file mode 100644 index 0000000..3dba1df --- /dev/null +++ b/lib/Countdown/index.d.ts @@ -0,0 +1,3 @@ +import Button from './Countdown'; +export type { CountDownProps } from './Countdown'; +export default Button; diff --git a/lib/Countdown/index.js b/lib/Countdown/index.js new file mode 100644 index 0000000..4c441df --- /dev/null +++ b/lib/Countdown/index.js @@ -0,0 +1,11 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +exports.__esModule = true; +exports.default = void 0; + +var _Countdown = _interopRequireDefault(require("./Countdown")); + +var _default = _Countdown.default; +exports.default = _default; \ No newline at end of file diff --git a/lib/Countdown/index.scss b/lib/Countdown/index.scss new file mode 100644 index 0000000..1d8ee45 --- /dev/null +++ b/lib/Countdown/index.scss @@ -0,0 +1,20 @@ +@import '../styles/common.scss'; + +.count-down { + font-size: 14px; + cursor: pointer; + user-select: none; + color: $primary-color; + &:hover { + color: rgba($primary-color, 0.7); + } + + &:active { + color: darken($primary-color, 10%); + } + + &.disable { + color: rgb(153, 153, 153); + cursor: not-allowed; + } +} diff --git a/lib/index.d.ts b/lib/index.d.ts new file mode 100644 index 0000000..0bdb6bd --- /dev/null +++ b/lib/index.d.ts @@ -0,0 +1,2 @@ +export { default as CountDown } from './Countdown'; +export { default as Button } from './Button'; diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..c4b7e68 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,14 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +exports.__esModule = true; +exports.Button = exports.CountDown = void 0; + +var _Countdown = _interopRequireDefault(require("./Countdown")); + +exports.CountDown = _Countdown.default; + +var _Button = _interopRequireDefault(require("./Button")); + +exports.Button = _Button.default; \ No newline at end of file diff --git a/lib/styles/common.scss b/lib/styles/common.scss new file mode 100644 index 0000000..49f47fb --- /dev/null +++ b/lib/styles/common.scss @@ -0,0 +1,5 @@ +//** Mixins +@import 'mixins/hacks.scss'; +@import 'mixins/util.scss'; +//** Variables +@import 'vars.scss'; diff --git a/lib/styles/core.scss b/lib/styles/core.scss new file mode 100644 index 0000000..63b2f21 --- /dev/null +++ b/lib/styles/core.scss @@ -0,0 +1,3 @@ +@import 'common'; +@import 'normalize'; +@import 'keyframes'; diff --git a/lib/styles/index.scss b/lib/styles/index.scss new file mode 100644 index 0000000..b1706b9 --- /dev/null +++ b/lib/styles/index.scss @@ -0,0 +1 @@ +@import './theme/default/index.scss'; diff --git a/lib/styles/keyframes.scss b/lib/styles/keyframes.scss new file mode 100644 index 0000000..b3b59cb --- /dev/null +++ b/lib/styles/keyframes.scss @@ -0,0 +1,444 @@ +@import 'common'; + +// +// All keyframes +// -------------------------------------------------- + +@keyframes shake { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 16.7%, + 50%, + 83.3% { + transform: translate3d(-10px, 0, 0); + } + + 33.3%, + 66.7% { + transform: translate3d(10px, 0, 0); + } +} + +@keyframes shakeHead { + 0%, + 100% { + transform: translate3d(0, 0, 0); + } + + 25%, + 75% { + transform: translate3d(-10px, 0, 0); + } + + 50% { + transform: translate3d(10px, 0, 0); + } +} + +// Opacity not working in Safari,so remove . +@keyframes slideUpIn { + 0% { + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes slideDownIn { + 0% { + transform-origin: 100% 100%; + transform: scaleY(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleY(1); + } +} + +@keyframes slideLeftIn { + 0% { + transform-origin: 0% 0%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 0% 0%; + transform: scaleX(1); + } +} + +@keyframes slideRightIn { + 0% { + transform-origin: 100% 100%; + transform: scaleX(0.8); + } + + 100% { + transform-origin: 100% 100%; + transform: scaleX(1); + } +} + +@keyframes errorMessageSlideUpIn { + 0% { + transform: translate3d(0, $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideDownIn { + 0% { + transform: translate3d(0, -1 * $form-error-message-translate-distance, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideLeftIn { + 0% { + transform: translate3d(-1 * $form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes errorMessageSlideRightIn { + 0% { + transform: translate3d($form-error-message-translate-distance, 0, 0); + visibility: visible; + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes buttonSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +//** Notification +//======================== +@keyframes notificationMoveIn { + 0% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + } + + 100% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } +} + +@keyframes notificationMoveOut { + 0% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + max-height: 100px; + } + + 100% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0.8); + max-height: 0; + overflow: hidden; + } +} + +@keyframes notificationMoveInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes notificationMoveInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +//** Modal +//======================== +@keyframes bounceIn { + from { + opacity: 0; + transform: scale(0.8); + } + + to { + opacity: 1; + transform: scale(1); + } +} + +@keyframes bounceOut { + from { + opacity: 1; + transform: scale(1); + } + + to { + opacity: 0; + transform: scale(0.8); + } +} + +//** Drawer +//======================== +@keyframes slideInLeft { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutLeft { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes slideInRight { + from { + opacity: 0; + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutRight { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(100%, 0, 0); + } +} + +@keyframes slideInTop { + from { + opacity: 0; + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutTop { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideInBottom { + from { + opacity: 0; + transform: translate3d(0, 100%, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes slideOutBottom { + from { + opacity: 1; + transform: none; + } + + to { + opacity: 0; + transform: translate3d(0, 100%, 0); + } +} + +//** Loader +//======================== +@keyframes loaderSpin { + from { + transform: rotate(0); + } + + to { + transform: rotate(360deg); + } +} + +// +@keyframes slideDown { + from { + transform: translateY(-100%); + } + + to { + transform: translateY(0); + } +} + +@keyframes progress-active { + 0% { + opacity: 0.1; + width: 0; + } + + 20% { + opacity: 0.5; + width: 0; + } + + 100% { + opacity: 0; + width: 100%; + } +} + +@keyframes progress-active-vertical { + 0% { + opacity: 0.1; + height: 0; + } + + 20% { + opacity: 0.5; + height: 0; + } + + 100% { + opacity: 0; + height: 100%; + } +} + +@keyframes icon-spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(359deg); + } +} + +@keyframes sideNavFoldedText { + 0% { + max-width: 200px; + opacity: 0.8; + } + + 100% { + max-width: 0; + opacity: 0; + } +} + +@keyframes placeholder-active { + 0% { + background-position: 100% 50%; + } + + 100% { + background-position: 0 50%; + } +} + +//** Carousel +//======================== +@keyframes moveLeftHalf { + 0% { + transform: none; + } + + 100% { + transform: translateX(-50%); + } +} + +@keyframes moveLeftHalf-vertical { + 0% { + transform: none; + } + + 100% { + transform: translateY(-50%); + } +} diff --git a/lib/styles/mixins/hacks.scss b/lib/styles/mixins/hacks.scss new file mode 100644 index 0000000..e69de29 diff --git a/lib/styles/mixins/util.scss b/lib/styles/mixins/util.scss new file mode 100644 index 0000000..e69de29 diff --git a/lib/styles/normalize.scss b/lib/styles/normalize.scss new file mode 100644 index 0000000..f37437b --- /dev/null +++ b/lib/styles/normalize.scss @@ -0,0 +1,245 @@ +/* stylelint-disable */ +//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ + +// Reset the box-sizing +// +// Heads up! This reset may cause conflicts with some third-party widgets. +// For recommendations on resolving such conflicts, see +// http://getbootstrap.com/getting-started/#third-box-sizing +* { + box-sizing: border-box; +} + +*::before, +*::after { + box-sizing: border-box; +} + +body { + font-size: $font-size-base; + line-height: $line-height-base; + color: $text-color; + background-color: $body-bg; + // Remove default margin. + margin: 0; + // Optimize for the retina screen + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// Address `[hidden]` styling not present in IE 10. +// Hide the `template` element in IE 10/11, Safari, and Firefox < 22. +[hidden], +template { + display: none; +} + +// Links +// ========================================================================== + +// Remove the gray background color from active links in IE 10. +a { + background-color: transparent; +} + +// Improve readability of focused elements when they are also in an +// active/hover state. +a:active, +a:hover { + outline: 0; +} + +// Text-level semantics +// ========================================================================== + +// Address style set to `bolder` in Firefox 4+, Safari, and Chrome. +b, +strong { + font-weight: bold; +} + +// Prevent `sub` and `sup` affecting `line-height` in all browsers. +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +// Embedded content +// ========================================================================== + +// Remove border when inside `a` element in IE 10. +img { + border: 0; +} + +// Correct overflow not hidden in IE 10/11. +svg:not(:root) { + overflow: hidden; +} + +// Address differences between Firefox and other browsers. +hr { + box-sizing: content-box; + height: 0; +} + +// Contain overflow in all browsers. +pre { + overflow: auto; +} + +// Forms +// ========================================================================== + +// Known limitation: by default, Chrome and Safari on OS X allow very limited +// styling of `select`, unless a `border` property is set. + +// 1. Correct color not being inherited. +// Known issue: affects color of disabled elements. +// 2. Correct font properties not being inherited. +// 3. Address margins set differently in Firefox 4+, Safari, and Chrome. +button, +input, +optgroup, +select, +textarea { + color: inherit; // 1 + font: inherit; // 2 + margin: 0; // 3 +} + +// Address `overflow` set to `hidden` in IE 10/11. +button { + overflow: visible; +} + +// Remove border radius in Chrome 62+ +button { + border-radius: 0; +} + +// Address inconsistent `text-transform` inheritance for `button` and `select`. +// All other form control elements do not inherit `text-transform` values. +// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. +// Correct `select` style inheritance in Firefox. +button, +select { + text-transform: none; +} + +// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` +// and `video` controls. +// 2. Correct inability to style clickable `input` types in iOS. +// 3. Improve usability and consistency of cursor style between image-type +// `input` and others. +button, +html input[type='button'], +input[type='reset'], +input[type='submit'] { + -webkit-appearance: button; // 2 + cursor: pointer; // 3 +} + +// Re-set default cursor for disabled elements. +button[disabled], +html input[disabled] { + cursor: not-allowed; +} + +// Remove inner padding and border in Firefox 4+. +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +// Address Firefox 4+ setting `line-height` on `input` using `!important` in +// the UA stylesheet. +input { + line-height: normal; +} + +// It's recommended that you don't attempt to style these elements. +// Firefox's implementation doesn't respect box-sizing, padding, or width. +// +// 1. Address box sizing set to `content-box` in IE 10. +// 2. Remove excess padding in IE 10. +input[type='checkbox'], +input[type='radio'] { + box-sizing: border-box; // 1 + padding: 0; // 2 +} + +// Fix the cursor style for Chrome's increment/decrement buttons. For certain +// `font-size` values of the `input`, it causes the cursor style of the +// decrement button to change from `default` to `text`. +input[type='number']::-webkit-inner-spin-button, +input[type='number']::-webkit-outer-spin-button { + height: auto; +} + +// Remove default vertical scrollbar in IE 10/11. +textarea { + overflow: auto; +} + +// Tables +// ========================================================================== + +// Remove most spacing between table cells. +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +// Remove tabIndex component outline +[tabindex='-1'] { + outline: none; +} + +// Remove Default button Style +input[type='button'], +input[type='submit'], +input[type='reset'], +button { + border-width: 0; +} + +// Remove IE10's “clear field” X button on certain inputs +input::-ms-clear { + display: none; +} + +// Remove File button Style +input[type='file']::-webkit-file-upload-button, +input[type='file']::-ms-browse { + border-width: 0; + background: transparent; + color: currentColor; +} + +// Reset fonts for relevant elements +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} diff --git a/lib/styles/themes/default/core.scss b/lib/styles/themes/default/core.scss new file mode 100644 index 0000000..2f9fd7a --- /dev/null +++ b/lib/styles/themes/default/core.scss @@ -0,0 +1,3 @@ +// Every component must import these styles, it is support basic styles for rsuite. +@import '../../core'; +@import 'vars'; diff --git a/lib/styles/themes/default/index.scss b/lib/styles/themes/default/index.scss new file mode 100644 index 0000000..9639320 --- /dev/null +++ b/lib/styles/themes/default/index.scss @@ -0,0 +1,5 @@ +@import 'vars'; + +// Components +@import '../../../Button/index.scss'; +@import '../../../Countdown/index.scss'; diff --git a/lib/styles/themes/default/vars.scss b/lib/styles/themes/default/vars.scss new file mode 100644 index 0000000..a2dc941 --- /dev/null +++ b/lib/styles/themes/default/vars.scss @@ -0,0 +1,40 @@ +/* common */ +$namespace: rou; + +/* color */ +// primary +$primary-color: #3366ff; +$primary-md-color: #a5affb; +$primary-lt-color: #e5e7fa; + +// success +$succ-color: #47b881; +$succ-md-color: #7ddfc3; +$succ-lt-color: #d5f2ea; + +// warn +$warn-color: #ffcf5c; +$warn-md-color: #dde29d; +$warn-lt-color: #ddd8e7; + +// danger +$dager-color: #ff0033; +$dager-md-color: #7ddfc3; +$dager-lt-color: #d5f2ea; + +/* radius */ +$radius: 3px; + +/* button */ +$btn-radius: $radius; +$btn-padding: 4px 15px; +$btn-height: 22 / 14; + +$btn-lg-padding: 6.5px 18px; + +/* 宽高尺寸 */ +$global-control-height: 32px; + +/* form */ + +$form-radius: 3px; diff --git a/lib/styles/vars.scss b/lib/styles/vars.scss new file mode 100644 index 0000000..0c43ae5 --- /dev/null +++ b/lib/styles/vars.scss @@ -0,0 +1,52 @@ +/* common */ +$namespace: rou; + +/* color */ +// primary +$primary-color: #3366ff; +$primary-md-color: #a5affb; +$primary-lt-color: #e5e7fa; + +// success +$succ-color: #47b881; +$succ-md-color: #7ddfc3; +$succ-lt-color: #d5f2ea; + +// warn +$warn-color: #ffcf5c; +$warn-md-color: #dde29d; +$warn-lt-color: #ddd8e7; + +// danger +$dager-color: #ff0033; +$dager-md-color: #7ddfc3; +$dager-lt-color: #d5f2ea; + +/* radius */ +$radius: 3px; + +/* button */ +$btn-radius: $radius; +$btn-padding: 4px 15px; +$btn-height: 22 / 14; + +$btn-lg-padding: 6.5px 18px; + +/* 宽高尺寸 */ +$global-control-height: 32px; + +/* form */ + +$form-radius: 3px; + +// font +$font-family-base: Apple-System, Arial, Helvetica, 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', STXihei, sans-serif; + +$font-size-large: 16px; +$font-size-base: 14px; +$font-size-small: 12px; +$font-size-extra-small: 12px; + +// keyframes +$form-error-message-translate-distance: 2px; diff --git a/package.json b/package.json index 4015e6c..56f4e4f 100644 --- a/package.json +++ b/package.json @@ -9,13 +9,24 @@ "lib": "lib/" }, "scripts": { - "dev": "yarn storybook", + "sb": "yarn storybook", + "format": "prettier --write \"{src,test}/**/*.{tsx,ts,js}\"", + "format:docs": "prettier --write \"docs/**/*.{tsx,ts,md}\"", + "format:style": "stylelint \"src/**/*.scss\" --fix", + "format:check": "prettier --list-different \"{src,test}/**/*.{tsx,ts,js}\"", + "dist": "yarn dist:dev && yarn dist:pro", + "dist:style": "gulp buildStyle", "dist:dev": "cross-env NODE_ENV=development webpack --progress", "dist:pro": "webpack --mode production --progress", + "dist:analyze": "ANALYZE=true webpack --mode production --progress", "lint:style": "stylelint \"src/**/*.scss\"", "lint:ts": "eslint --ext tsx --ext ts src && tsc --noEmit", "lint:js": "eslint --ext js src", "lint": "yarn lint:ts && yarn lint:js && yarn lint:style", + "build": "yarn build:gulp && yarn dist && yarn build:types", + "build:gulp": "gulp build", + "build:types": "npx tsc --emitDeclarationOnly --outDir lib && npx tsc --emitDeclarationOnly --outDir es", + "build:docs": "yarn build --prefix docs", "storybook": "start-storybook -p 9001", "build-storybook": "build-storybook" }, @@ -71,10 +82,13 @@ "@types/react-dom": "^17.0.5", "@typescript-eslint/eslint-plugin": "^4.23.0", "@typescript-eslint/parser": "^4.23.0", + "autoprefixer": "9.0.0", "babel-loader": "^8.2.2", "babel-plugin-lodash": "^3.3.4", "cross-env": "^7.0.3", "css-loader": "^5.2.4", + "cssnano": "^5.0.2", + "del": "^6.0.0", "eslint": "^7.26.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-babel": "^5.3.1", @@ -84,9 +98,15 @@ "eslint-plugin-react-hooks": "^4.2.0", "fork-ts-checker-webpack-plugin": "^6.2.7", "gulp": "^4.0.2", + "gulp-babel": "^8.0.0", + "gulp-postcss": "^9.0.0", + "gulp-rename": "^2.0.0", + "gulp-rtlcss": "^1.4.2", "gulp-sass": "^4.1.0", + "gulp-sourcemaps": "^3.0.0", "husky": "^6.0.0", "lodash-webpack-plugin": "^0.11.6", + "postcss": "^8.2.15", "prettier": "^2.3.0", "sass-loader": "10.1.1", "style-loader": "^2.0.0", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..f145bec --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,19 @@ +const plugins = [ + require('autoprefixer'), + require('cssnano')({ + preset: [ + 'default', + { + discardComments: { + removeAll: true + } + } + ] + }) +] + +module.exports = { + plugins +} + +// "./src/**/*.ts", "./src/**/*.tsx", diff --git a/src/index.tsx b/src/index.tsx index e69de29..e5e44ae 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -0,0 +1 @@ +import '../components/index' diff --git a/src/stories/Button.stories.tsx b/src/stories/Button.stories.tsx deleted file mode 100644 index 428beb8..0000000 --- a/src/stories/Button.stories.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Story, Meta } from '@storybook/react' - -import { Button, ButtonProps } from './Button' - -export default { - title: 'Example/Button', - component: Button, - argTypes: { - backgroundColor: { control: 'color' } - } -} as Meta - -const Template: Story = args => - ) -} diff --git a/src/stories/Header.stories.tsx b/src/stories/Header.stories.tsx deleted file mode 100644 index 6481ec5..0000000 --- a/src/stories/Header.stories.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Story, Meta } from '@storybook/react'; - -import { Header, HeaderProps } from './Header'; - -export default { - title: 'Example/Header', - component: Header, -} as Meta; - -const Template: Story = (args) =>

; - -export const LoggedIn = Template.bind({}); -LoggedIn.args = { - user: {}, -}; - -export const LoggedOut = Template.bind({}); -LoggedOut.args = {}; diff --git a/src/stories/Header.tsx b/src/stories/Header.tsx deleted file mode 100644 index c331705..0000000 --- a/src/stories/Header.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; - -import { Button } from './Button'; -import './header.css'; - -export interface HeaderProps { - user?: {}; - onLogin: () => void; - onLogout: () => void; - onCreateAccount: () => void; -} - -export const Header: React.FC = ({ user, onLogin, onLogout, onCreateAccount }) => ( -
-
-
- - - - - - - -

Acme

-
-
- {user ? ( -
-
-
-); diff --git a/src/stories/Introduction.stories.mdx b/src/stories/Introduction.stories.mdx deleted file mode 100644 index 8b959a2..0000000 --- a/src/stories/Introduction.stories.mdx +++ /dev/null @@ -1,211 +0,0 @@ -import { Meta } from '@storybook/addon-docs/blocks'; -import Code from './assets/code-brackets.svg'; -import Colors from './assets/colors.svg'; -import Comments from './assets/comments.svg'; -import Direction from './assets/direction.svg'; -import Flow from './assets/flow.svg'; -import Plugin from './assets/plugin.svg'; -import Repo from './assets/repo.svg'; -import StackAlt from './assets/stackalt.svg'; - - - - - -# Welcome to Storybook - -Storybook helps you build UI components in isolation from your app's business logic, data, and context. -That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA. - -Browse example stories now by navigating to them in the sidebar. -View their code in the `src/stories` directory to learn how they work. -We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages. - -
Configure
- - - -
Learn
- - - -
- TipEdit the Markdown in{' '} - src/stories/Introduction.stories.mdx -
diff --git a/src/stories/Page.stories.tsx b/src/stories/Page.stories.tsx deleted file mode 100644 index 6d8e20f..0000000 --- a/src/stories/Page.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Story, Meta } from '@storybook/react'; - -import { Page, PageProps } from './Page'; -import * as HeaderStories from './Header.stories'; - -export default { - title: 'Example/Page', - component: Page, -} as Meta; - -const Template: Story = (args) => ; - -export const LoggedIn = Template.bind({}); -LoggedIn.args = { - ...HeaderStories.LoggedIn.args, -}; - -export const LoggedOut = Template.bind({}); -LoggedOut.args = { - ...HeaderStories.LoggedOut.args, -}; diff --git a/src/stories/Page.tsx b/src/stories/Page.tsx deleted file mode 100644 index ab4ce27..0000000 --- a/src/stories/Page.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; - -import { Header } from './Header'; -import './page.css'; - -export interface PageProps { - user?: {}; - onLogin: () => void; - onLogout: () => void; - onCreateAccount: () => void; -} - -export const Page: React.FC = ({ user, onLogin, onLogout, onCreateAccount }) => ( -
-
- -
-

Pages in Storybook

-

- We recommend building UIs with a{' '} - - component-driven - {' '} - process starting with atomic components and ending with pages. -

-

- Render pages with mock data. This makes it easy to build and review page states without - needing to navigate to them in your app. Here are some handy patterns for managing page data - in Storybook: -

-
    -
  • - Use a higher-level connected component. Storybook helps you compose such data from the - "args" of child component stories -
  • -
  • - Assemble data in the page component from your services. You can mock these services out - using Storybook. -
  • -
-

- Get a guided tutorial on component-driven development at{' '} - - Storybook tutorials - - . Read more in the{' '} - - docs - - . -

-
- Tip Adjust the width of the canvas with the{' '} - - - - - - Viewports addon in the toolbar -
-
-
-); diff --git a/src/stories/assets/code-brackets.svg b/src/stories/assets/code-brackets.svg deleted file mode 100644 index 73de947..0000000 --- a/src/stories/assets/code-brackets.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/code-brackets \ No newline at end of file diff --git a/src/stories/assets/colors.svg b/src/stories/assets/colors.svg deleted file mode 100644 index 17d58d5..0000000 --- a/src/stories/assets/colors.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/colors \ No newline at end of file diff --git a/src/stories/assets/comments.svg b/src/stories/assets/comments.svg deleted file mode 100644 index 6493a13..0000000 --- a/src/stories/assets/comments.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/comments \ No newline at end of file diff --git a/src/stories/assets/direction.svg b/src/stories/assets/direction.svg deleted file mode 100644 index 65676ac..0000000 --- a/src/stories/assets/direction.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/direction \ No newline at end of file diff --git a/src/stories/assets/flow.svg b/src/stories/assets/flow.svg deleted file mode 100644 index 8ac27db..0000000 --- a/src/stories/assets/flow.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/flow \ No newline at end of file diff --git a/src/stories/assets/plugin.svg b/src/stories/assets/plugin.svg deleted file mode 100644 index 29e5c69..0000000 --- a/src/stories/assets/plugin.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/plugin \ No newline at end of file diff --git a/src/stories/assets/repo.svg b/src/stories/assets/repo.svg deleted file mode 100644 index f386ee9..0000000 --- a/src/stories/assets/repo.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/repo \ No newline at end of file diff --git a/src/stories/assets/stackalt.svg b/src/stories/assets/stackalt.svg deleted file mode 100644 index 9b7ad27..0000000 --- a/src/stories/assets/stackalt.svg +++ /dev/null @@ -1 +0,0 @@ -illustration/stackalt \ No newline at end of file diff --git a/src/stories/header.css b/src/stories/header.css deleted file mode 100644 index acadc9e..0000000 --- a/src/stories/header.css +++ /dev/null @@ -1,26 +0,0 @@ -.wrapper { - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding: 15px 20px; - display: flex; - align-items: center; - justify-content: space-between; -} - -svg { - display: inline-block; - vertical-align: top; -} - -h1 { - font-weight: 900; - font-size: 20px; - line-height: 1; - margin: 6px 0 6px 10px; - display: inline-block; - vertical-align: top; -} - -button + button { - margin-left: 10px; -} diff --git a/src/stories/page.css b/src/stories/page.css deleted file mode 100644 index 51c9d09..0000000 --- a/src/stories/page.css +++ /dev/null @@ -1,69 +0,0 @@ -section { - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 24px; - padding: 48px 20px; - margin: 0 auto; - max-width: 600px; - color: #333; -} - -h2 { - font-weight: 900; - font-size: 32px; - line-height: 1; - margin: 0 0 4px; - display: inline-block; - vertical-align: top; -} - -p { - margin: 1em 0; -} - -a { - text-decoration: none; - color: #1ea7fd; -} - -ul { - padding-left: 30px; - margin: 1em 0; -} - -li { - margin-bottom: 8px; -} - -.tip { - display: inline-block; - border-radius: 1em; - font-size: 11px; - line-height: 12px; - font-weight: 700; - background: #e7fdd8; - color: #66bf3c; - padding: 4px 12px; - margin-right: 10px; - vertical-align: top; -} - -.tip-wrapper { - font-size: 13px; - line-height: 20px; - margin-top: 40px; - margin-bottom: 40px; -} - -.tip-wrapper svg { - display: inline-block; - height: 12px; - width: 12px; - margin-right: 4px; - vertical-align: top; - margin-top: 3px; -} - -.tip-wrapper svg path { - fill: #1ea7fd; -} diff --git a/src/ui/Countdown.stories.tsx b/src/ui/Countdown.stories.tsx index d5abcbc..825e7ea 100644 --- a/src/ui/Countdown.stories.tsx +++ b/src/ui/Countdown.stories.tsx @@ -1,5 +1,4 @@ import { Story, Meta } from '@storybook/react' - import { CountDown, CountDownProps } from '../../components' export default { diff --git a/tsconfig.json b/tsconfig.json index 7e45803..4c3b3b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,5 +17,5 @@ "@comp": ["./components"] } }, - "include": ["./src/**/*.ts", "./src/**/*.tsx", "./components/**/*.tsx", "./components/**/*.ts"] + "include": ["./components/**/*.tsx", "./components/**/*.ts"] } diff --git a/webpack.config.js b/webpack.config.js index 6bbdeb4..37e4bd8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,7 @@ if (process.env.ANALYZE === 'true') { module.exports = { entry: { - rouui: path.join(__dirname, 'src') + rouui: path.join(__dirname, 'components') }, output: { path: path.join(__dirname, 'dist'), diff --git a/yarn.lock b/yarn.lock index 04f52bc..d04096b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1119,6 +1119,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@choojs/findup@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@choojs/findup/-/findup-0.2.1.tgz#ac13c59ae7be6e1da64de0779a0a7f03d75615a3" + integrity sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw== + dependencies: + commander "^2.15.1" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -1128,9 +1135,9 @@ minimist "^1.2.0" "@discoveryjs/json-ext@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" - integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== + version "0.5.3" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz#90420f9f9c6d3987f176a19a7d8e764271a2f55d" + integrity sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g== "@emotion/cache@^10.0.27": version "10.0.29" @@ -1249,6 +1256,25 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@gulp-sourcemaps/identity-map@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz#a6e8b1abec8f790ec6be2b8c500e6e68037c0019" + integrity sha512-Tb+nSISZku+eQ4X1lAkevcQa+jknn/OVUgZ3XCxEKIsLsqYuPoJwJOPQeaOk75X3WPftb29GWY1eqE7GLsXb1Q== + dependencies: + acorn "^6.4.1" + normalize-path "^3.0.0" + postcss "^7.0.16" + source-map "^0.6.0" + through2 "^3.0.1" + +"@gulp-sourcemaps/map-sources@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" + integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2182,6 +2208,11 @@ remark "^13.0.0" unist-util-find-all-after "^3.0.2" +"@trysound/sax@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.1.1.tgz#3348564048e7a2d7398c935d466c0414ebb6a669" + integrity sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow== + "@types/anymatch@*": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -2980,6 +3011,11 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" +alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -3061,11 +3097,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: color-convert "^2.0.1" ansi-to-html@^0.6.11: - version "0.6.14" - resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.14.tgz#65fe6d08bba5dd9db33f44a20aec331e0010dad8" - integrity sha512-7ZslfB1+EnFSDO5Ju+ue5Y6It19DRnZXWv8jrGHgIlPna5Mh4jz7BV5jCbQneXNFurQcKoolaaAjHtgSBfOIuA== + version "0.6.15" + resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.15.tgz#ac6ad4798a00f6aa045535d7f6a9cb9294eebea7" + integrity sha512-28ijx2aHJGdzbs+O5SNQF65r6rrKYnkuwTYm8lZlChuoJ9P1vVzIpWO20sQTqTPDXYp6NFwk326vApTtLVFXpQ== dependencies: - entities "^1.1.2" + entities "^2.0.0" ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" @@ -3360,6 +3396,18 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +autoprefixer@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.0.0.tgz#fce072cb3c9c61374bf6fb7d1906f630afdb2889" + integrity sha512-bMt9puCb+xk5ds1ghr1zzfJ09+SjOcseHCEawhMjibM5KfxkodW8PQMhhEnllyj4Cz3Yixy9A+/0De2VC9R+dQ== + dependencies: + browserslist "^4.0.1" + caniuse-lite "^1.0.30000865" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.0" + postcss-value-parser "^3.2.3" + autoprefixer@^9.8.6: version "9.8.6" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" @@ -3795,7 +3843,7 @@ browserslist@4.14.2: escalade "^3.0.2" node-releases "^1.1.61" -browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6: +browserslist@^4.0.0, browserslist@^4.0.1, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6: version "4.16.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== @@ -3937,6 +3985,25 @@ call-me-maybe@^1.0.1: resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -3992,7 +4059,17 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219: +caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000865, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219: version "1.0.30001228" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== @@ -4277,7 +4354,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0: +color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -4296,16 +4373,32 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.5.4: + version "1.5.5" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014" + integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== +color@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" + integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== + dependencies: + color-convert "^1.9.1" + color-string "^1.5.4" + colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" @@ -4328,7 +4421,7 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@^2.19.0, commander@^2.20.0: +commander@^2.15.1, commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4343,7 +4436,7 @@ commander@^6.2.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^7.0.0: +commander@^7.0.0, commander@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -4410,7 +4503,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.0.0, convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -4482,6 +4575,16 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -4620,6 +4723,23 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + +css-color-names@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67" + integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== + +css-declaration-sorter@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.0.tgz#eb21f75860078627e9e3cc6f5535ccfcea445817" + integrity sha512-S0TE4E0ha5+tBHdLWPc5n+S8E4dFBS5xScPvgHkLNZwWvX4ISoFGhGeerLC9uS1cKA/sC+K2wHq6qEbcagT/fg== + dependencies: + timsort "^0.3.0" + css-loader@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645" @@ -4666,16 +4786,105 @@ css-select@^2.0.2: domutils "^1.7.0" nth-check "^1.0.2" +css-select@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8" + integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== + dependencies: + boolbase "^1.0.0" + css-what "^4.0.0" + domhandler "^4.0.0" + domutils "^2.4.3" + nth-check "^2.0.0" + +css-tree@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" + integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== + dependencies: + mdn-data "2.0.14" + source-map "^0.6.1" + css-what@^3.2.1: version "3.4.2" resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== +css-what@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" + integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== + +css@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/css/-/css-3.0.0.tgz#4447a4d58fdd03367c516ca9f64ae365cee4aa5d" + integrity sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ== + dependencies: + inherits "^2.0.4" + source-map "^0.6.1" + source-map-resolve "^0.6.0" + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +cssnano-preset-default@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.0.1.tgz#76adc00f7aae36ae80552b8356e21bec4b233ca2" + integrity sha512-cfmfThYODGqhpQKDq9H0MTAqkMvZ3dGbOUTBKw0xWZiIycMqHid22LsJXJl4r1qX4qzDeKxcSyQ/Xb5Mu3Z//Q== + dependencies: + css-declaration-sorter "6.0.0" + cssnano-utils "^2.0.0" + postcss-calc "^8.0.0" + postcss-colormin "^5.0.0" + postcss-convert-values "^5.0.0" + postcss-discard-comments "^5.0.0" + postcss-discard-duplicates "^5.0.0" + postcss-discard-empty "^5.0.0" + postcss-discard-overridden "^5.0.0" + postcss-merge-longhand "^5.0.1" + postcss-merge-rules "^5.0.0" + postcss-minify-font-values "^5.0.0" + postcss-minify-gradients "^5.0.0" + postcss-minify-params "^5.0.0" + postcss-minify-selectors "^5.0.0" + postcss-normalize-charset "^5.0.0" + postcss-normalize-display-values "^5.0.0" + postcss-normalize-positions "^5.0.0" + postcss-normalize-repeat-style "^5.0.0" + postcss-normalize-string "^5.0.0" + postcss-normalize-timing-functions "^5.0.0" + postcss-normalize-unicode "^5.0.0" + postcss-normalize-url "^5.0.0" + postcss-normalize-whitespace "^5.0.0" + postcss-ordered-values "^5.0.0" + postcss-reduce-initial "^5.0.0" + postcss-reduce-transforms "^5.0.0" + postcss-svgo "^5.0.0" + postcss-unique-selectors "^5.0.0" + +cssnano-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.0.tgz#b04baaa312aa3dd5a854b7f61d76b9d94be07f74" + integrity sha512-xvxmTszdrvSyTACdPe8VU5J6p4sm3egpgw54dILvNqt5eBUv6TFjACLhSxtRuEsxYrgy8uDy269YjScO5aKbGA== + +cssnano@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.2.tgz#3f6de4fd5ecb7b5fb636c1a606de5f38cd241493" + integrity sha512-8JK3EnPsjQsULme9/e5M2hF564f/480hwsdcHvQ7ZtAIMfQ1O3SCfs+b8Mjf5KJxhYApyRshR2QSovEJi2K72Q== + dependencies: + cosmiconfig "^7.0.0" + cssnano-preset-default "^5.0.1" + is-resolvable "^1.1.0" + +csso@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== + dependencies: + css-tree "^1.1.2" + csstype@^2.5.7: version "2.6.17" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.17.tgz#4cf30eb87e1d1a005d8b6510f95292413f6a1c0e" @@ -4718,6 +4927,15 @@ de-indent@^1.0.2: resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0= +debug-fabulous@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e" + integrity sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg== + dependencies: + debug "3.X" + memoizee "0.4.X" + object-assign "4.X" + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -4725,7 +4943,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.0.0: +debug@3.X, debug@^3.0.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -4818,6 +5036,20 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + dependencies: + globby "^11.0.1" + graceful-fs "^4.2.4" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" + slash "^3.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -4863,6 +5095,11 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= +detect-newline@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= + detect-port-alt@1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" @@ -4939,6 +5176,15 @@ dom-serializer@0: domelementtype "^2.0.1" entities "^2.0.0" +dom-serializer@^1.0.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.1.tgz#d845a1565d7c041a95e5dab62184ab41e3a519be" + integrity sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + entities "^2.0.0" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" @@ -4954,7 +5200,7 @@ domelementtype@1, domelementtype@^1.3.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== -domelementtype@^2.0.1: +domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== @@ -4966,6 +5212,13 @@ domhandler@^2.3.0: dependencies: domelementtype "1" +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" + integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== + dependencies: + domelementtype "^2.2.0" + domutils@^1.5.1, domutils@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" @@ -4974,6 +5227,15 @@ domutils@^1.5.1, domutils@^1.7.0: dom-serializer "0" domelementtype "1" +domutils@^2.4.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.6.0.tgz#2e15c04185d43fb16ae7057cb76433c6edb938b7" + integrity sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -4982,6 +5244,13 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" +dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== + dependencies: + is-obj "^2.0.0" + dotenv-defaults@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz#032c024f4b5906d9990eb06d722dc74cc60ec1bd" @@ -5156,7 +5425,7 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -entities@^1.1.1, entities@^1.1.2: +entities@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== @@ -5247,7 +5516,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: version "0.10.53" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== @@ -5283,7 +5552,7 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" -es6-weak-map@^2.0.1: +es6-weak-map@^2.0.1, es6-weak-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== @@ -5540,6 +5809,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= + dependencies: + d "1" + es5-ext "~0.10.14" + events@^3.0.0, events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -5700,7 +5977,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fancy-log@^1.3.2: +fancy-log@^1.3.2, fancy-log@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== @@ -6016,9 +6293,9 @@ fork-ts-checker-webpack-plugin@4.1.6, fork-ts-checker-webpack-plugin@^4.1.0, for worker-rpc "^0.1.0" fork-ts-checker-webpack-plugin@^6.0.4, fork-ts-checker-webpack-plugin@^6.2.7: - version "6.2.7" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.7.tgz#2787fb8e36e0e7d3030f189f9ef84d02f7a07386" - integrity sha512-uGl/x5aiWbBtKT3QtXYuuK/gY1BfN0/RNM/BZvu2o2QdPE7FemyNIxVAgUUbPTm4l90MwWStfVVb7Bu5nyHglg== + version "6.2.8" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.8.tgz#1728ea5a7790d5bdcebf2bde93861dc9c16bc3bb" + integrity sha512-KduEntkrnDejqZ6zw8+pRpsENPtBNP9J92bJIFXBi96tySa3csyZiVIyqKwdN3KqpVWwtQIcu3j91DDbvuWB4A== dependencies: "@babel/code-frame" "^7.8.3" "@types/json-schema" "^7.0.5" @@ -6528,6 +6805,16 @@ gud@^1.0.0: resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== +gulp-babel@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-8.0.0.tgz#e0da96f4f2ec4a88dd3a3030f476e38ab2126d87" + integrity sha512-oomaIqDXxFkg7lbpBou/gnUkX51/Y/M2ZfSjL2hdqXTAlSWZcgZtd2o0cOH0r/eE8LWD0+Q/PsLsr2DKOoqToQ== + dependencies: + plugin-error "^1.0.1" + replace-ext "^1.0.0" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + gulp-cli@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.3.0.tgz#ec0d380e29e52aa45e47977f0d32e18fd161122f" @@ -6552,6 +6839,31 @@ gulp-cli@^2.2.0: v8flags "^3.2.0" yargs "^7.1.0" +gulp-postcss@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-9.0.0.tgz#2ade18809ab475dae743a88bd6501af0b04ee54e" + integrity sha512-5mSQ9CK8salSagrXgrVyILfEMy6I5rUGPRiR9rVjgJV9m/rwdZYUhekMr+XxDlApfc5ZdEJ8gXNZrU/TsgT5dQ== + dependencies: + fancy-log "^1.3.3" + plugin-error "^1.0.1" + postcss-load-config "^2.1.1" + vinyl-sourcemaps-apply "^0.2.1" + +gulp-rename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-2.0.0.tgz#9bbc3962b0c0f52fc67cd5eaff6c223ec5b9cf6c" + integrity sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ== + +gulp-rtlcss@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/gulp-rtlcss/-/gulp-rtlcss-1.4.2.tgz#f1c0b8ad579b1ca15e861126e9fd0d703b32ef0a" + integrity sha512-wd807z/xq4XKtSwgrEetbx/aPoI5gV0yWV2rNqEBRwe2cJvNKLDsYR9A968c3gZtaKRMGAue5g3pHn40R+GWSA== + dependencies: + plugin-error "^1.0.1" + rtlcss "^2.4.0" + through2 "^2.0.5" + vinyl-sourcemaps-apply "^0.2.1" + gulp-sass@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-4.1.0.tgz#486d7443c32d42bf31a6b1573ebbdaa361de7427" @@ -6566,6 +6878,23 @@ gulp-sass@^4.1.0: through2 "^2.0.0" vinyl-sourcemaps-apply "^0.2.0" +gulp-sourcemaps@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz#2e154e1a2efed033c0e48013969e6f30337b2743" + integrity sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ== + dependencies: + "@gulp-sourcemaps/identity-map" "^2.0.1" + "@gulp-sourcemaps/map-sources" "^1.0.0" + acorn "^6.4.1" + convert-source-map "^1.0.0" + css "^3.0.0" + debug-fabulous "^1.0.0" + detect-newline "^2.0.0" + graceful-fs "^4.0.0" + source-map "^0.6.0" + strip-bom-string "^1.0.0" + through2 "^2.0.0" + gulp@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" @@ -6783,6 +7112,11 @@ he@^1.1.0, he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== + highlight.js@^10.1.1, highlight.js@~10.7.0: version "10.7.2" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.2.tgz#89319b861edc66c48854ed1e6da21ea89f847360" @@ -6823,6 +7157,16 @@ hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" +hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + +hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + html-entities@^1.2.0, html-entities@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" @@ -6973,6 +7317,21 @@ immer@8.0.1: resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA== +import-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" + integrity sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk= + dependencies: + import-from "^2.1.0" + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -6981,6 +7340,13 @@ import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-from@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" + integrity sha1-M1238qev/VOqpHHUuAId7ja387E= + dependencies: + resolve-from "^3.0.0" + import-lazy@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" @@ -7016,6 +7382,11 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -7095,7 +7466,7 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.0: +is-absolute-url@^3.0.0, is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== @@ -7147,6 +7518,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-bigint@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" @@ -7195,6 +7571,18 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-color-stop@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + is-core-module@^2.2.0: version "2.4.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" @@ -7244,6 +7632,11 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -7369,11 +7762,26 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== + is-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-path-cwd@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -7401,6 +7809,11 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-regex@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" @@ -7421,6 +7834,11 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-resolvable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + is-root@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" @@ -7687,7 +8105,7 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -7997,12 +8415,17 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash.uniq@4.5.0: +lodash.uniq@4.5.0, lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= @@ -8077,6 +8500,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= + dependencies: + es5-ext "~0.10.2" + make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -8236,6 +8666,11 @@ mdast-util-to-string@^2.0.0: resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b" integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== +mdn-data@2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== + mdurl@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -8253,6 +8688,20 @@ memfs@^3.1.2: dependencies: fs-monkey "1.0.3" +memoizee@0.4.X: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -8611,6 +9060,11 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + next-tick@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -8753,7 +9207,7 @@ normalize-package-data@^3.0.0: semver "^7.3.4" validate-npm-package-license "^3.0.1" -normalize-path@^2.1.1: +normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= @@ -8775,6 +9229,11 @@ normalize-selector@^0.2.0: resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03" integrity sha1-0LFF62kRicY6eNIB3E/bEpPvDAM= +normalize-url@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + now-and-later@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" @@ -8813,6 +9272,13 @@ nth-check@^1.0.2: dependencies: boolbase "~1.0.0" +nth-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" + integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== + dependencies: + boolbase "^1.0.0" + num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" @@ -8828,7 +9294,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@4.X, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -9225,6 +9691,14 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -9479,6 +9953,50 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss-calc@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a" + integrity sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g== + dependencies: + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.2" + +postcss-colormin@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.0.0.tgz#283b8934c8bdbc531e7648aeb0970107f6d06d0e" + integrity sha512-Yt84+5V6CgS/AhK7d7MA58vG8dSZ7+ytlRtWLaQhag3HXOncTfmYpuUOX4cDoXjvLfw1sHRCHMiBjYhc35CymQ== + dependencies: + browserslist "^4.16.0" + color "^3.1.1" + postcss-value-parser "^4.1.0" + +postcss-convert-values@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.0.tgz#cd77e1d23ebe8fcf508640551eed08e232784cba" + integrity sha512-V5kmYm4xoBAjNs+eHY/6XzXJkkGeg4kwNf2ocfqhLb1WBPEa4oaSmoi1fnVO7Dkblqvus9h+AenDvhCKUCK7uQ== + dependencies: + postcss-value-parser "^4.1.0" + +postcss-discard-comments@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.0.tgz#6c27310e0657c0b9e38a6175ad001b5aa28964bc" + integrity sha512-Umig6Gxs8m20RihiXY6QkePd6mp4FxkA1Dg+f/Kd6uw0gEMfKRjDeQOyFkLibexbJJGHpE3lrN/Q0R9SMrUMbQ== + +postcss-discard-duplicates@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.0.tgz#6a2c4f779e8d20da6781e90730f234f9e650c51c" + integrity sha512-vEJJ+Y3pFUnO1FyCBA6PSisGjHtnphL3V6GsNvkASq/VkP3OX5/No5RYXXLxHa2QegStNzg6HYrYdo71uR4caQ== + +postcss-discard-empty@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.0.tgz#0f0a9baee415f5f7be4ae046ba235e98626ba821" + integrity sha512-+wigy099Y1xZxG36WG5L1f2zeH1oicntkJEW4TDIqKKDO2g9XVB3OhoiHTu08rDEjLnbcab4rw0BAccwi2VjiQ== + +postcss-discard-overridden@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.0.tgz#ac00f695a60001eda52135a11fac87376b8da9ee" + integrity sha512-hybnScTaZM2iEA6kzVQ6Spozy7kVdLw+lGw8hftLlBEzt93uzXoltkYp9u0tI8xbfhxDLTOOzHsHQCkYdmzRUg== + postcss-flexbugs-fixes@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz#9218a65249f30897deab1033aced8578562a6690" @@ -9500,6 +10018,14 @@ postcss-less@^3.1.4: dependencies: postcss "^7.0.14" +postcss-load-config@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.2.tgz#c5ea504f2c4aef33c7359a34de3573772ad7502a" + integrity sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw== + dependencies: + cosmiconfig "^5.0.0" + import-cwd "^2.0.0" + postcss-loader@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.2.0.tgz#f6993ea3e0f46600fb3ee49bbd010448123a7db4" @@ -9516,6 +10042,61 @@ postcss-media-query-parser@^0.2.3: resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= +postcss-merge-longhand@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.1.tgz#1a008ff72d14cd3e2f3d32accc2ad37948bcabf4" + integrity sha512-H1RO8le5deFGumQzuhJjuL0bIXPRysa+w7xtk5KrHe38oiaSS9ksPXDo24+IOS3SETPhip0J5+1uCOW+ALs3Yw== + dependencies: + css-color-names "^1.0.1" + postcss-value-parser "^4.1.0" + stylehacks "^5.0.0" + +postcss-merge-rules@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.0.tgz#e0d0c0d45c98376f4adb49eb1f1dfe2aebfd7048" + integrity sha512-TfsXbKjNYCGfUPEXGIGPySnMiJbdS+3gcVeV8gwmJP4RajyKZHW8E0FYDL1WmggTj3hi+m+WUCAvqRpX2ut4Kg== + dependencies: + browserslist "^4.16.0" + caniuse-api "^3.0.0" + cssnano-utils "^2.0.0" + postcss-selector-parser "^6.0.4" + vendors "^1.0.3" + +postcss-minify-font-values@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.0.tgz#fee5d0fa192fae8757cb744870a0ad02be5f402e" + integrity sha512-zi2JhFaMOcIaNxhndX5uhsqSY1rexKDp23wV8EOmC9XERqzLbHsoRye3aYF716Zm+hkcR4loqKDt8LZlmihwAg== + dependencies: + postcss-value-parser "^4.1.0" + +postcss-minify-gradients@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.0.tgz#95dbe61567a45c0cd7ab897d78fb65d5096844ed" + integrity sha512-/jPtNgs6JySMwgsE5dPOq8a2xEopWTW3RyqoB9fLqxgR+mDUNLSi7joKd+N1z7FXWgVkc4l/dEBMXHgNAaUbvg== + dependencies: + cssnano-utils "^2.0.0" + is-color-stop "^1.1.0" + postcss-value-parser "^4.1.0" + +postcss-minify-params@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.0.tgz#12c7f75d69b0b4827fafbd6649970a53784a9c24" + integrity sha512-KvZYIxTPBVKjdd+XgObq9A+Sfv8lMkXTpbZTsjhr42XbfWIeLaTItMlygsDWfjArEc3muUfDaUFgNSeDiJ5jug== + dependencies: + alphanum-sort "^1.0.2" + browserslist "^4.16.0" + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + uniqs "^2.0.0" + +postcss-minify-selectors@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.0.0.tgz#d3e43d97fd0ba83ba0010950fc5acfa420f7caa9" + integrity sha512-cEM0O0eWwFIvmo6nfB0lH0vO/XFwgqIvymODbfPXZ1gTA3i76FKnb7TGUrEpiTxaXH6tgYQ6DcTHwRiRS+YQLQ== + dependencies: + alphanum-sort "^1.0.2" + postcss-selector-parser "^3.1.2" + postcss-modules-extract-imports@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" @@ -9577,6 +10158,97 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" +postcss-normalize-charset@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.0.tgz#59e1fe2094fb2e3371cc5b054cbc39828a41a710" + integrity sha512-pqsCkgo9KmQP0ew6DqSA+uP9YN6EfsW20pQ3JU5JoQge09Z6Too4qU0TNDsTNWuEaP8SWsMp+19l15210MsDZQ== + +postcss-normalize-display-values@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.0.tgz#4ff2d3b3b5146a366de28ec9e24131a1868f1933" + integrity sha512-t4f2d//gH1f7Ns0Jq3eNdnWuPT7TeLuISZ6RQx4j8gpl5XrhkdshdNcOnlrEK48YU6Tcb6jqK7dorME3N4oOGA== + dependencies: + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + +postcss-normalize-positions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.0.tgz#fe1d9a8122dd385b9c6908bd2008140dea17750d" + integrity sha512-0o6/qU5ky74X/eWYj/tv4iiKCm3YqJnrhmVADpIMNXxzFZywsSQxl8F7cKs8jQEtF3VrJBgcDHTexZy1zgDoYg== + dependencies: + postcss-value-parser "^4.1.0" + +postcss-normalize-repeat-style@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.0.tgz#e11d88fbf63f89179c6a7391853b2fe7f46e589d" + integrity sha512-KRT14JbrXKcFMYuc4q7lh8lvv8u22wLyMrq+UpHKLtbx2H/LOjvWXYdoDxmNrrrJzomAWL+ViEXr48/IhSUJnQ== + dependencies: + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + +postcss-normalize-string@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.0.tgz#2ea08ff4cb8817ce160755e9fdc7e6ef6d495002" + integrity sha512-wSO4pf7GNcDZpmelREWYADF1+XZWrAcbFLQCOqoE92ZwYgaP/RLumkUTaamEzdT2YKRZAH8eLLKGWotU/7FNPw== + dependencies: + postcss-value-parser "^4.1.0" + +postcss-normalize-timing-functions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.0.tgz#380eb1c9b179f96efc307c659a8049116f16f381" + integrity sha512-TwPaDX+wl9wO3MUm23lzGmOzGCGKnpk+rSDgzB2INpakD5dgWR3L6bJq1P1LQYzBAvz8fRIj2NWdnZdV4EV98Q== + dependencies: + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + +postcss-normalize-unicode@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.0.tgz#aa46a89c86ae51a01cbca13e73c1ed7b0b38807e" + integrity sha512-2CpVoz/67rXU5s9tsPZDxG1YGS9OFHwoY9gsLAzrURrCxTAb0H7Vp87/62LvVPgRWTa5ZmvgmqTp2rL8tlm72A== + dependencies: + browserslist "^4.16.0" + postcss-value-parser "^4.1.0" + +postcss-normalize-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.0.tgz#626a4c7d30007f94466cdf245e7ed9f253f1dbd9" + integrity sha512-ICDaGFBqLgA3dlrCIRuhblLl80D13YtgEV9NJPTYJtgR72vu61KgxAHv+z/lKMs1EbwfSQa3ALjOFLSmXiE34A== + dependencies: + is-absolute-url "^3.0.3" + normalize-url "^4.5.0" + postcss-value-parser "^4.1.0" + +postcss-normalize-whitespace@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.0.tgz#1faf147a4f8d3d93a3c75109d120b4eefa00589b" + integrity sha512-KRnxQvQAVkJfaeXSz7JlnD9nBN9sFZF9lrk9452Q2uRoqrRSkinqifF8Iex7wZGei2DZVG/qpmDFDmRvbNAOGA== + dependencies: + postcss-value-parser "^4.1.0" + +postcss-ordered-values@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.0.tgz#a50f224c5f40c566b338b0663655478737dcebee" + integrity sha512-dPr+SRObiHueCIc4IUaG0aOGQmYkuNu50wQvdXTGKy+rzi2mjmPsbeDsheLk5WPb9Zyf2tp8E+I+h40cnivm6g== + dependencies: + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + +postcss-reduce-initial@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.0.tgz#c724e5513b0ae7f3d7bff16f0fc82133fb2f820a" + integrity sha512-wR6pXUaFbSMG1oCKx8pKVA+rnSXCHlca5jMrlmkmif+uig0HNUTV9oGN5kjKsM3mATQAldv2PF9Tbl2vqLFjnA== + dependencies: + browserslist "^4.16.0" + caniuse-api "^3.0.0" + +postcss-reduce-transforms@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.0.tgz#5c820f71fbd4eec82b323523642b7b2d1c7d29ef" + integrity sha512-iHdGODW4YzM3WjVecBhPQt6fpJC4lGQZxJKjkBNHpp2b8dzmvj0ogKThqya+IRodQEFzjfXgYeESkf172FH5Lw== + dependencies: + cssnano-utils "^2.0.0" + postcss-value-parser "^4.1.0" + postcss-resolve-nested-selector@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" @@ -9604,6 +10276,15 @@ postcss-scss@^2.1.1: dependencies: postcss "^7.0.6" +postcss-selector-parser@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" + integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== + dependencies: + dot-prop "^5.2.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5: version "6.0.6" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" @@ -9612,17 +10293,48 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector cssesc "^3.0.0" util-deprecate "^1.0.2" +postcss-svgo@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.0.tgz#c8d806e573394ab24f1e233cac5be4c199e9f1b2" + integrity sha512-M3/VS4sFI1Yp9g0bPL+xzzCNz5iLdRUztoFaugMit5a8sMfkVzzhwqbsOlD8IFFymCdJDmXmh31waYHWw1K4BA== + dependencies: + postcss-value-parser "^4.1.0" + svgo "^2.3.0" + postcss-syntax@^0.36.2: version "0.36.2" resolved "https://registry.yarnpkg.com/postcss-syntax/-/postcss-syntax-0.36.2.tgz#f08578c7d95834574e5593a82dfbfa8afae3b51c" integrity sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w== -postcss-value-parser@^4.1.0: +postcss-unique-selectors@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.0.tgz#17856278f6c38d024defc9694d568bb09dd7f771" + integrity sha512-o9l4pF8SRn7aCMTmzb/kNv/kjV7wPZpZ8Nlb1Gq8v/Qvw969K1wanz1RVA0ehHzWe9+wHXaC2DvZlak/gdMJ5w== + dependencies: + alphanum-sort "^1.0.2" + postcss-selector-parser "^6.0.2" + uniqs "^2.0.0" + +postcss-value-parser@^3.2.3: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + +postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: +postcss@^6.0.23: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +postcss@^7.0.0, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: version "7.0.35" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== @@ -9631,7 +10343,7 @@ postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0. source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.2.10: +postcss@^8.2.10, postcss@^8.2.15: version "8.2.15" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.15.tgz#9e66ccf07292817d226fc315cbbf9bc148fbca65" integrity sha512-2zO3b26eJD/8rb106Qu2o7Qgg52ND5HPjcyQiK2B98O388h43A448LCslC0dI2P97wCAQRJsFvwTRcXxTKds+Q== @@ -10183,7 +10895,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.1.1, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -10549,6 +11261,11 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: expand-tilde "^2.0.0" global-modules "^1.0.0" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -10597,6 +11314,16 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + +rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -10624,6 +11351,17 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +rtlcss@^2.4.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rtlcss/-/rtlcss-2.6.2.tgz#55b572b52c70015ba6e03d497e5c5cb8137104b4" + integrity sha512-06LFAr+GAPo+BvaynsXRfoYTJvSaWRyOhURCQ7aeI1MKph9meM222F+Zkt3bDamyHHJuGi3VPtiRkpyswmQbGA== + dependencies: + "@choojs/findup" "^0.2.1" + chalk "^2.4.2" + mkdirp "^0.5.1" + postcss "^6.0.23" + strip-json-comments "^2.0.0" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -10934,6 +11672,13 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + sirv@^1.0.7: version "1.0.11" resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.11.tgz#81c19a29202048507d6ec0d8ba8910fda52eb5a4" @@ -11013,6 +11758,14 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-resolve@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2" + integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + source-map-support@^0.5.16, source-map-support@~0.5.12, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" @@ -11336,6 +12089,11 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-bom-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" + integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -11372,6 +12130,11 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -11405,6 +12168,14 @@ style-to-object@0.3.0, style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" +stylehacks@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.0.tgz#c49b0b2cf9917fe37dc030b96a4c34698b932933" + integrity sha512-QOWm6XivDLb+fqffTZP8jrmPmPITVChl2KCY2R05nsCWwLi3VGhCdVc3IVGNwd1zzTt1jPd67zIKjpQfxzQZeA== + dependencies: + browserslist "^4.16.0" + postcss-selector-parser "^6.0.4" + stylelint@^13.13.1: version "13.13.1" resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-13.13.1.tgz#fca9c9f5de7990ab26a00f167b8978f083a18f3c" @@ -11471,7 +12242,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0: +supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -11505,6 +12276,19 @@ svg-tags@^1.0.0: resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= +svgo@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.0.tgz#6b3af81d0cbd1e19c83f5f63cec2cb98c70b5373" + integrity sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q== + dependencies: + "@trysound/sax" "0.1.1" + chalk "^4.1.0" + commander "^7.1.0" + css-select "^3.1.2" + css-tree "^1.1.2" + csso "^4.2.0" + stable "^0.1.8" + symbol.prototype.description@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol.prototype.description/-/symbol.prototype.description-1.0.4.tgz#c30edd3fe8c040d941cf7dc15842be15adf66855" @@ -11516,9 +12300,9 @@ symbol.prototype.description@^1.0.0: object.getownpropertydescriptors "^2.1.2" table@^6.0.4, table@^6.6.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.0.tgz#26274751f0ee099c547f6cb91d3eff0d61d155b2" - integrity sha512-SAM+5p6V99gYiiy2gT5ArdzgM1dLDed0nkrWmG6Fry/bUS/m9x83BwpJUOf1Qj/x2qJd+thL6IkIx7qPGRxqBw== + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== dependencies: ajv "^8.0.1" lodash.clonedeep "^4.5.0" @@ -11664,7 +12448,7 @@ through2-filter@^3.0.0: through2 "~2.0.0" xtend "~4.0.0" -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.0, through2@^2.0.3, through2@^2.0.5, through2@~2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -11672,6 +12456,14 @@ through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" +through2@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== + dependencies: + inherits "^2.0.4" + readable-stream "2 || 3" + time-stamp@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" @@ -11684,6 +12476,19 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + +timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + tiny-emitter@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" @@ -12050,6 +12855,16 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" @@ -12304,6 +13119,11 @@ vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +vendors@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" + integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -12372,7 +13192,7 @@ vinyl-sourcemap@^1.1.0: remove-bom-buffer "^3.0.0" vinyl "^2.0.0" -vinyl-sourcemaps-apply@^0.2.0: +vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" integrity sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=