Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@toptal/picasso-form

Package Overview
Dependencies
Maintainers
0
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toptal/picasso-form - npm Package Compare versions

Comparing version 3.0.3-alpha-feature-migrate-tag-e064cc8de.5 to 3.0.3-alpha-feature-tailwind-w21-5438106d8.44

10

dist-package/src/FieldRequirements/FieldRequirementItem.js
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Typography } from '@toptal/picasso-typography';
import { Bullet16, CheckMinor16, CloseMinor16 } from '@toptal/picasso-icons';
import { GridCompound as Grid } from '@toptal/picasso-grid';
import styles from './styles';
const useStyles = makeStyles(styles, {
name: 'FieldRequirementItem',
});
const colorMap = {

@@ -21,8 +16,7 @@ default: 'dark-grey',

const FieldRequirementItem = ({ children, status, testIds }) => {
const classes = useStyles();
const IconComponent = IconsMap[status];
const iconTestId = getIconTestId(status, testIds);
return (React.createElement(Grid.Item, { xs: 6, className: classes.fieldRequirementItem, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.root },
return (React.createElement(Grid.Item, { xs: 6, className: 'flex items-center text-gray-600', "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.root },
React.createElement(IconComponent, { color: colorMap[status], "data-testid": iconTestId }),
React.createElement(Typography, { color: colorMap[status], className: '!ml-[8px]', size: 'xxsmall' }, children)));
React.createElement(Typography, { color: colorMap[status], className: 'ml-[8px]', size: 'xxsmall' }, children)));
};

@@ -29,0 +23,0 @@ export default FieldRequirementItem;

27

dist-package/src/FieldRequirements/FieldRequirements.js
import React from 'react';
import { Collapse } from '@material-ui/core';
import { Typography } from '@toptal/picasso-typography';
import { Grid } from '@toptal/picasso-grid';
import { Collapse } from '@toptal/picasso-collapse';
import FieldRequirementItem from './FieldRequirementItem';

@@ -9,14 +9,15 @@ const ANIMATION_TIMEOUT = 500;

return (React.createElement(Collapse, { style: style, className: className, in: open, timeout: timeout, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.root },
description && (React.createElement(Typography, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.description, variant: 'body', size: 'xxsmall', className: '!mt-[0.4rem]' }, description)),
React.createElement(Grid, { className: 'w-input', spacing: 0, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.gridContainer }, requirements.map(requirement => {
let status = 'default';
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (requirement.validator(value)) {
status = 'success';
}
else if (error) {
status = 'error';
}
return (React.createElement(FieldRequirementItem, { key: requirement.message, status: status, testIds: requirement.testIds }, requirement.message));
}))));
React.createElement(React.Fragment, null,
description && (React.createElement(Typography, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.description, variant: 'body', size: 'xxsmall', className: 'mt-[0.4rem]' }, description)),
React.createElement(Grid, { className: 'w-input', spacing: 0, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.gridContainer }, requirements.map(requirement => {
let status = 'default';
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (requirement.validator(value)) {
status = 'success';
}
else if (error) {
status = 'error';
}
return (React.createElement(FieldRequirementItem, { key: requirement.message, status: status, testIds: requirement.testIds }, requirement.message));
})))));
};

@@ -23,0 +24,0 @@ FieldRequirements.defaultProps = {

@@ -7,4 +7,5 @@ import React from 'react';

};
export declare type FieldLayout = 'horizontal' | 'vertical';
export declare type FieldsLayoutContextValue = {
layout: 'horizontal' | 'vertical';
layout: FieldLayout;
labelWidth: LabelColumnSize | ResponsiveLabelColumnSize;

@@ -11,0 +12,0 @@ };

{
"name": "@toptal/picasso-form",
"version": "3.0.3-alpha-feature-migrate-tag-e064cc8de.5+e064cc8de",
"version": "3.0.3-alpha-feature-tailwind-w21-5438106d8.44+5438106d8",
"description": "Toptal UI components library - Form",

@@ -25,8 +25,9 @@ "publishConfig": {

"dependencies": {
"@toptal/picasso-container": "1.0.4-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de",
"@toptal/picasso-grid": "3.0.2-alpha-feature-migrate-tag-e064cc8de.5+e064cc8de",
"@toptal/picasso-icons": "1.1.2-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de",
"@toptal/picasso-shared": "15.0.1-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de",
"@toptal/picasso-typography": "2.0.2-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de",
"@toptal/picasso-utils": "1.0.4-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de",
"@toptal/picasso-collapse": "1.0.4-alpha-feature-tailwind-w21-5438106d8.44+5438106d8",
"@toptal/picasso-container": "1.0.4-alpha-feature-tailwind-w21-5438106d8.50+5438106d8",
"@toptal/picasso-grid": "3.0.2-alpha-feature-tailwind-w21-5438106d8.44+5438106d8",
"@toptal/picasso-icons": "1.1.2-alpha-feature-tailwind-w21-5438106d8.50+5438106d8",
"@toptal/picasso-shared": "15.0.1-alpha-feature-tailwind-w21-5438106d8.50+5438106d8",
"@toptal/picasso-typography": "2.0.2-alpha-feature-tailwind-w21-5438106d8.50+5438106d8",
"@toptal/picasso-utils": "1.0.4-alpha-feature-tailwind-w21-5438106d8.50+5438106d8",
"ap-style-title-case": "^1.1.2",

@@ -50,4 +51,4 @@ "classnames": "^2.5.1",

"devDependencies": {
"@toptal/picasso-provider": "4.2.2-alpha-feature-migrate-tag-e064cc8de.19+e064cc8de",
"@toptal/picasso-test-utils": "1.1.2-alpha-feature-migrate-tag-e064cc8de.11+e064cc8de"
"@toptal/picasso-provider": "4.2.2-alpha-feature-tailwind-w21-5438106d8.58+5438106d8",
"@toptal/picasso-test-utils": "1.1.2-alpha-feature-tailwind-w21-5438106d8.50+5438106d8"
},

@@ -59,3 +60,3 @@ "files": [

],
"gitHead": "e064cc8de5b2d151eae32ddf2086f027fb3062d5"
"gitHead": "5438106d866ac55337e99db14c41fa58a140abce"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc