Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/iran-yekan/MobileFonts/wgdpf7/src.zip
Назад
PK b�i[��� components/AttributeIcon/Div.jsnu �Iw�� import styled from 'styled-components'; const Div = styled.div` display: flex; flex-direction: column; justify-content: center; height: 20px; width: 35px; > svg { align-self: center; } background-color: ${({ type }) => { switch (type) { case 'boolean': return '#69ba05'; case 'date': case 'datetime': case 'time': case 'timestamp': return '#1c8ee2'; case 'component': return '#666666'; case 'contentType': return '#ff6458'; case 'dynamiczone': return '#333333'; case 'email': return '#ff6400'; case 'enumeration': case 'enum': return '#f8b295'; case 'json': case 'JSON': return '#3C8C98'; case 'media': case 'file': case 'files': return '#b981d5'; case 'number': return '#e8442f'; case 'password': return '#ff9900'; case 'string': case 'text': return '#ffb500'; case 'relation': return '#1c5de7'; case 'richtext': return '#ff9200'; case 'singleType': return '#F4A7B4'; case 'uid': return '#c3814f'; default: return ''; } }}; border-radius: 2px; `; export default Div; PK b�i[�'\z� � ! components/AttributeIcon/index.jsnu �Iw�� import React from 'react'; import PropTypes from 'prop-types'; import { Bool, Calendar, Component, ContentType, DynamicZone, Email, Enumeration, Json, Media, NumberIcon, Password, Relation, RichText, SingleType, Text, Uid, } from '@buffetjs/icons'; import Div from './Div'; const types = { biginteger: NumberIcon, boolean: Bool, component: Component, contentType: ContentType, date: Calendar, datetime: Calendar, decimal: NumberIcon, dynamiczone: DynamicZone, email: Email, enum: Enumeration, enumeration: Enumeration, file: Media, files: Media, float: NumberIcon, integer: NumberIcon, json: Json, JSON: Json, media: Media, number: NumberIcon, password: Password, relation: Relation, richtext: RichText, singleType: SingleType, string: Text, text: Text, time: Calendar, timestamp: Calendar, uid: Uid, }; const AttributeIcon = ({ type, ...rest }) => { const Compo = types[type]; if (!types[type]) { return null; } return ( <Div {...rest} type={type}> <Compo /> </Div> ); }; AttributeIcon.propTypes = { type: PropTypes.string.isRequired, }; export default AttributeIcon; PK b�i[�A��1 1 components/Button/index.jsnu �Iw�� /** * * Button * */ import React from 'react'; import PropTypes from 'prop-types'; import { LoadingIndicator, Button as StyledButton, colors, } from '@buffetjs/styles'; import { Plus } from '@buffetjs/icons'; import Flex from '../Flex'; import PrefixIcon from '../PrefixIcon'; function Button({ children, color, disabled, icon, label, isLoading, ...rest }) { const content = label || children; const img = icon === true ? ( <Plus height="11px" width="11px" fill={`${colors.button[color].color}`} /> ) : ( <PrefixIcon icon={icon} /> ); if (isLoading) { return ( <StyledButton color={color} disabled={disabled} {...rest} onClick={e => { // Preventing the user from clicking the button when loading e.preventDefault(); }} > <Flex justifyContent="space-around"> <LoadingIndicator animationTime="0.6s" borderWidth="2px" borderColor="#f7f5f0" borderTopColor="#d1cec7" size="1.3rem" /> </Flex> </StyledButton> ); } return ( <StyledButton color={color} disabled={disabled} {...rest}> {img} {content} </StyledButton> ); } Button.defaultProps = { children: null, color: 'primary', disabled: false, icon: false, isLoading: false, label: null, type: 'button', }; Button.propTypes = { children: PropTypes.node, color: PropTypes.oneOf([ 'primary', 'secondary', 'cancel', 'success', 'delete', 'none', ]), disabled: PropTypes.bool, icon: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]), isLoading: PropTypes.bool, label: PropTypes.string, type: PropTypes.oneOf(['submit', 'reset', 'button', 'menu']), }; export default Button; PK b�i[X�u^ ^ * components/Checkbox/tests/Checkbox.test.jsnu �Iw�� import React from 'react'; import { mount } from 'enzyme'; import Checkbox from '../index'; const defaultProps = { type: 'checkbox', name: 'checkbox', onChange: jest.fn(), }; const renderComponent = (props = defaultProps) => mount(<Checkbox {...props} />); describe('<Checkbox />', () => { // eslint-disable-next-line jest/expect-expect it('should not crash', () => { renderComponent(); }); it('should send a boolean', () => { const onChange = jest.fn(); const value = false; const renderedComponent = renderComponent({ ...defaultProps, onChange, value, }); const element = renderedComponent.find('input'); element.simulate('change'); const expected = { target: { name: 'checkbox', type: 'checkbox', value: true, }, }; expect(onChange).toHaveBeenLastCalledWith(expected); }); it('should use the defaultProps', () => { const { defaultProps: { onChange }, } = Checkbox; expect(onChange).toBeDefined(); expect(onChange({ preventDefault: jest.fn() })).toBe(undefined); }); }); PK b�i[ �@, , components/Checkbox/index.jsnu �Iw�� /** * * Checkbox * */ import React from 'react'; import PropTypes from 'prop-types'; import { Checkbox as StyledCheckbox, CheckboxWrapper } from '@buffetjs/styles'; import Label from '../Label'; function Checkbox({ autoFocus, className, id, message, name, onChange, tabIndex, value, ...rest }) { const handleChange = () => { const target = { name, type: 'checkbox', value: !value, }; onChange({ target }); }; return ( <CheckboxWrapper className={className} disabled={rest.disabled}> <StyledCheckbox {...rest} autoFocus={autoFocus} id={id || name} name={name} onChange={handleChange} tabIndex={tabIndex} checked={value} /> <Label htmlFor={id || name} message={message} /> </CheckboxWrapper> ); } Checkbox.defaultProps = { autoComplete: 'off', autoFocus: false, className: null, disabled: false, id: null, message: null, onChange: () => {}, placeholder: null, tabIndex: '0', value: false, }; Checkbox.propTypes = { autoComplete: PropTypes.string, autoFocus: PropTypes.bool, className: PropTypes.string, disabled: PropTypes.bool, id: PropTypes.string, message: PropTypes.oneOfType([ PropTypes.func, PropTypes.string, PropTypes.shape({ id: PropTypes.string, params: PropTypes.object, }), ]), name: PropTypes.string.isRequired, onChange: PropTypes.func, placeholder: PropTypes.string, tabIndex: PropTypes.string, value: PropTypes.bool, }; export default Checkbox; PK b�i[� F� � components/Count/Wrapper.jsnu �Iw�� import styled from 'styled-components'; import PropTypes from 'prop-types'; import Flex from '../Flex'; import colors from '../../theme/colors'; const Wrapper = styled(Flex)` width: fit-content; height: 1.4rem; min-width: 1.4rem; padding: 0 0.2rem; border-radius: ${({ theme }) => theme.main.sizes.borderRadius}; background-color: ${({ theme, isActive }) => isActive ? theme.main.colors.lightBlue : '#e9eaeb'}; `; Wrapper.defaultProps = { theme: { main: { colors, sizes: { borderRadius: '2px', paddings: { xs: '5px', }, }, }, }, }; Wrapper.propTypes = { isActive: PropTypes.bool, theme: PropTypes.object, }; export default Wrapper; PK b�i[����@ @ components/Count/index.jsnu �Iw�� import React from 'react'; import PropTypes from 'prop-types'; import Text from '../Text'; import Wrapper from './Wrapper'; const Count = ({ count, isActive }) => ( <Wrapper isActive={isActive} justifyContent="center" alignItems="center"> <Text lineHeight="none" fontWeight="bold" color={isActive ? 'mediumBlue' : 'grey'} fontSize="xs" > {count} </Text> </Wrapper> ); Count.propTypes = { count: PropTypes.number, isActive: PropTypes.bool, }; Count.defaultProps = { count: 0, isActive: false, }; export default Count; PK b�i[ؓ��N N <