@toptal/picasso-form 6.3.2 → 6.3.3-alpha-1757603192867.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/package.json +20 -19
  2. package/dist-package/src/FieldRequirements/FieldRequirementItem.d.ts +0 -14
  3. package/dist-package/src/FieldRequirements/FieldRequirementItem.d.ts.map +0 -1
  4. package/dist-package/src/FieldRequirements/FieldRequirementItem.js +0 -32
  5. package/dist-package/src/FieldRequirements/FieldRequirementItem.js.map +0 -1
  6. package/dist-package/src/FieldRequirements/FieldRequirements.d.ts +0 -33
  7. package/dist-package/src/FieldRequirements/FieldRequirements.d.ts.map +0 -1
  8. package/dist-package/src/FieldRequirements/FieldRequirements.js +0 -30
  9. package/dist-package/src/FieldRequirements/FieldRequirements.js.map +0 -1
  10. package/dist-package/src/FieldRequirements/index.d.ts +0 -6
  11. package/dist-package/src/FieldRequirements/index.d.ts.map +0 -1
  12. package/dist-package/src/FieldRequirements/index.js +0 -3
  13. package/dist-package/src/FieldRequirements/index.js.map +0 -1
  14. package/dist-package/src/FieldRequirements/types.d.ts +0 -11
  15. package/dist-package/src/FieldRequirements/types.d.ts.map +0 -1
  16. package/dist-package/src/FieldRequirements/types.js +0 -2
  17. package/dist-package/src/FieldRequirements/types.js.map +0 -1
  18. package/dist-package/src/Form/Form.d.ts +0 -17
  19. package/dist-package/src/Form/Form.d.ts.map +0 -1
  20. package/dist-package/src/Form/Form.js +0 -22
  21. package/dist-package/src/Form/Form.js.map +0 -1
  22. package/dist-package/src/Form/index.d.ts +0 -5
  23. package/dist-package/src/Form/index.d.ts.map +0 -1
  24. package/dist-package/src/Form/index.js +0 -2
  25. package/dist-package/src/Form/index.js.map +0 -1
  26. package/dist-package/src/FormActionsContainer/FormActionsContainer.d.ts +0 -9
  27. package/dist-package/src/FormActionsContainer/FormActionsContainer.d.ts.map +0 -1
  28. package/dist-package/src/FormActionsContainer/FormActionsContainer.js +0 -28
  29. package/dist-package/src/FormActionsContainer/FormActionsContainer.js.map +0 -1
  30. package/dist-package/src/FormActionsContainer/index.d.ts +0 -2
  31. package/dist-package/src/FormActionsContainer/index.d.ts.map +0 -1
  32. package/dist-package/src/FormActionsContainer/index.js +0 -2
  33. package/dist-package/src/FormActionsContainer/index.js.map +0 -1
  34. package/dist-package/src/FormAutoSaveIndicator/FormAutoSaveIndicator.d.ts +0 -13
  35. package/dist-package/src/FormAutoSaveIndicator/FormAutoSaveIndicator.d.ts.map +0 -1
  36. package/dist-package/src/FormAutoSaveIndicator/FormAutoSaveIndicator.js +0 -38
  37. package/dist-package/src/FormAutoSaveIndicator/FormAutoSaveIndicator.js.map +0 -1
  38. package/dist-package/src/FormAutoSaveIndicator/index.d.ts +0 -5
  39. package/dist-package/src/FormAutoSaveIndicator/index.d.ts.map +0 -1
  40. package/dist-package/src/FormAutoSaveIndicator/index.js +0 -2
  41. package/dist-package/src/FormAutoSaveIndicator/index.js.map +0 -1
  42. package/dist-package/src/FormCompound/index.d.ts +0 -9
  43. package/dist-package/src/FormCompound/index.d.ts.map +0 -1
  44. package/dist-package/src/FormCompound/index.js +0 -14
  45. package/dist-package/src/FormCompound/index.js.map +0 -1
  46. package/dist-package/src/FormError/FormError.d.ts +0 -10
  47. package/dist-package/src/FormError/FormError.d.ts.map +0 -1
  48. package/dist-package/src/FormError/FormError.js +0 -22
  49. package/dist-package/src/FormError/FormError.js.map +0 -1
  50. package/dist-package/src/FormError/index.d.ts +0 -5
  51. package/dist-package/src/FormError/index.d.ts.map +0 -1
  52. package/dist-package/src/FormError/index.js +0 -2
  53. package/dist-package/src/FormError/index.js.map +0 -1
  54. package/dist-package/src/FormField/FormField.d.ts +0 -22
  55. package/dist-package/src/FormField/FormField.d.ts.map +0 -1
  56. package/dist-package/src/FormField/FormField.js +0 -50
  57. package/dist-package/src/FormField/FormField.js.map +0 -1
  58. package/dist-package/src/FormField/index.d.ts +0 -5
  59. package/dist-package/src/FormField/index.d.ts.map +0 -1
  60. package/dist-package/src/FormField/index.js +0 -2
  61. package/dist-package/src/FormField/index.js.map +0 -1
  62. package/dist-package/src/FormField/styles.d.ts +0 -10
  63. package/dist-package/src/FormField/styles.d.ts.map +0 -1
  64. package/dist-package/src/FormField/styles.js +0 -37
  65. package/dist-package/src/FormField/styles.js.map +0 -1
  66. package/dist-package/src/FormHint/FormHint.d.ts +0 -12
  67. package/dist-package/src/FormHint/FormHint.d.ts.map +0 -1
  68. package/dist-package/src/FormHint/FormHint.js +0 -22
  69. package/dist-package/src/FormHint/FormHint.js.map +0 -1
  70. package/dist-package/src/FormHint/index.d.ts +0 -5
  71. package/dist-package/src/FormHint/index.d.ts.map +0 -1
  72. package/dist-package/src/FormHint/index.js +0 -2
  73. package/dist-package/src/FormHint/index.js.map +0 -1
  74. package/dist-package/src/FormLevelError/FormLevelError.d.ts +0 -9
  75. package/dist-package/src/FormLevelError/FormLevelError.d.ts.map +0 -1
  76. package/dist-package/src/FormLevelError/FormLevelError.js +0 -23
  77. package/dist-package/src/FormLevelError/FormLevelError.js.map +0 -1
  78. package/dist-package/src/FormLevelError/index.d.ts +0 -2
  79. package/dist-package/src/FormLevelError/index.d.ts.map +0 -1
  80. package/dist-package/src/FormLevelError/index.js +0 -2
  81. package/dist-package/src/FormLevelError/index.js.map +0 -1
  82. package/dist-package/src/FormLevelWarning/FormLevelWarning.d.ts +0 -9
  83. package/dist-package/src/FormLevelWarning/FormLevelWarning.d.ts.map +0 -1
  84. package/dist-package/src/FormLevelWarning/FormLevelWarning.js +0 -23
  85. package/dist-package/src/FormLevelWarning/FormLevelWarning.js.map +0 -1
  86. package/dist-package/src/FormLevelWarning/index.d.ts +0 -2
  87. package/dist-package/src/FormLevelWarning/index.d.ts.map +0 -1
  88. package/dist-package/src/FormLevelWarning/index.js +0 -2
  89. package/dist-package/src/FormLevelWarning/index.js.map +0 -1
  90. package/dist-package/src/FormWarning/FormWarning.d.ts +0 -10
  91. package/dist-package/src/FormWarning/FormWarning.d.ts.map +0 -1
  92. package/dist-package/src/FormWarning/FormWarning.js +0 -22
  93. package/dist-package/src/FormWarning/FormWarning.js.map +0 -1
  94. package/dist-package/src/FormWarning/index.d.ts +0 -5
  95. package/dist-package/src/FormWarning/index.d.ts.map +0 -1
  96. package/dist-package/src/FormWarning/index.js +0 -2
  97. package/dist-package/src/FormWarning/index.js.map +0 -1
  98. package/dist-package/src/index.d.ts +0 -14
  99. package/dist-package/src/index.d.ts.map +0 -1
  100. package/dist-package/src/index.js +0 -13
  101. package/dist-package/src/index.js.map +0 -1
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@toptal/picasso-form",
3
- "version": "6.3.2",
3
+ "version": "6.3.3-alpha-1757603192867.0",
4
4
  "description": "Toptal UI components library - Form",
5
5
  "publishConfig": {
6
- "access": "public"
6
+ "access": "public",
7
+ "provenance": true
7
8
  },
8
9
  "main": "./dist-package/src/index.js",
9
10
  "module": "./dist-package/src/index.js",
10
11
  "scripts": {
11
12
  "build:package": "tsc -b tsconfig.json",
12
- "prepublishOnly": "yarn build:package"
13
+ "prepublishOnly": "echo 0"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -22,16 +23,16 @@
22
23
  },
23
24
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
24
25
  "dependencies": {
25
- "@toptal/picasso-alert": "3.0.34",
26
- "@toptal/picasso-collapse": "3.0.3",
27
- "@toptal/picasso-container": "3.1.2",
28
- "@toptal/picasso-grid": "5.0.10",
29
- "@toptal/picasso-icons": "1.12.1",
30
- "@toptal/picasso-form-label": "1.0.2",
31
- "@toptal/picasso-form-layout": "1.0.2",
32
- "@toptal/picasso-shared": "15.0.0",
33
- "@toptal/picasso-typography": "4.0.4",
34
- "@toptal/picasso-utils": "3.1.0",
26
+ "@toptal/picasso-alert": "3.0.35-alpha-1757603192867.0",
27
+ "@toptal/picasso-collapse": "3.0.4-alpha-1757603192867.0",
28
+ "@toptal/picasso-container": "3.1.3-alpha-1757603192867.0",
29
+ "@toptal/picasso-grid": "5.0.11-alpha-1757603192867.0",
30
+ "@toptal/picasso-icons": "1.12.2-alpha-1757603192867.0",
31
+ "@toptal/picasso-form-label": "1.0.3-alpha-1757603192867.0",
32
+ "@toptal/picasso-form-layout": "1.0.3-alpha-1757603192867.0",
33
+ "@toptal/picasso-shared": "15.0.1-alpha-1757603192867.0",
34
+ "@toptal/picasso-typography": "4.0.5-alpha-1757603192867.0",
35
+ "@toptal/picasso-utils": "3.1.1-alpha-1757603192867.0",
35
36
  "ap-style-title-case": "^1.1.2",
36
37
  "classnames": "^2.5.1",
37
38
  "debounce": "^1.2.1"
@@ -42,18 +43,18 @@
42
43
  ],
43
44
  "peerDependencies": {
44
45
  "@material-ui/core": "4.12.4",
45
- "@toptal/picasso-provider": "*",
46
- "@toptal/picasso-tailwind": ">=2.7",
47
- "@toptal/picasso-tailwind-merge": "^2.0.0",
46
+ "@toptal/picasso-provider": "5.0.2-alpha-1757603192867.0",
47
+ "@toptal/picasso-tailwind": "3.0.1-alpha-1757603192867.0",
48
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0",
48
49
  "react": ">=16.12.0 < 19.0.0"
49
50
  },
50
51
  "exports": {
51
52
  ".": "./dist-package/src/index.js"
52
53
  },
53
54
  "devDependencies": {
54
- "@toptal/picasso-tailwind-merge": "2.0.3",
55
- "@toptal/picasso-provider": "5.0.1",
56
- "@toptal/picasso-test-utils": "1.1.1"
55
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0",
56
+ "@toptal/picasso-provider": "5.0.2-alpha-1757603192867.0",
57
+ "@toptal/picasso-test-utils": "1.1.2-alpha-1757603192867.0"
57
58
  },
58
59
  "files": [
59
60
  "dist-package/**",
@@ -1,14 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- export declare type FieldRequirementItemStatus = 'default' | 'success' | 'error';
3
- interface Props extends PropsWithChildren<{}> {
4
- status: FieldRequirementItemStatus;
5
- testIds?: {
6
- root?: string;
7
- successIcon?: string;
8
- errorIcon?: string;
9
- defaultIcon?: string;
10
- };
11
- }
12
- declare const FieldRequirementItem: ({ children, status, testIds }: Props) => JSX.Element;
13
- export default FieldRequirementItem;
14
- //# sourceMappingURL=FieldRequirementItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldRequirementItem.d.ts","sourceRoot":"","sources":["../../../src/FieldRequirements/FieldRequirementItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAM9C,oBAAY,0BAA0B,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAexE,UAAU,KAAM,SAAQ,iBAAiB,CAAC,EAAE,CAAC;IAC3C,MAAM,EAAE,0BAA0B,CAAA;IAClC,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;CACF;AACD,QAAA,MAAM,oBAAoB,kCAAmC,KAAK,gBAgBjE,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { Typography } from '@toptal/picasso-typography';
3
- import { Bullet16, CheckMinor16, CloseMinor16 } from '@toptal/picasso-icons';
4
- import { GridCompound as Grid } from '@toptal/picasso-grid';
5
- const colorMap = {
6
- default: 'dark-grey',
7
- success: 'inherit',
8
- error: 'red',
9
- };
10
- const IconsMap = {
11
- default: Bullet16,
12
- success: CheckMinor16,
13
- error: CloseMinor16,
14
- };
15
- const FieldRequirementItem = ({ children, status, testIds }) => {
16
- const IconComponent = IconsMap[status];
17
- const iconTestId = getIconTestId(status, testIds);
18
- 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 },
19
- React.createElement(IconComponent, { color: colorMap[status], "data-testid": iconTestId }),
20
- React.createElement(Typography, { color: colorMap[status], className: 'ml-[8px]', size: 'xxsmall' }, children)));
21
- };
22
- export default FieldRequirementItem;
23
- const getIconTestId = (status, testIds) => {
24
- if (status === 'error') {
25
- return testIds === null || testIds === void 0 ? void 0 : testIds.errorIcon;
26
- }
27
- if (status === 'success') {
28
- return testIds === null || testIds === void 0 ? void 0 : testIds.successIcon;
29
- }
30
- return testIds === null || testIds === void 0 ? void 0 : testIds.defaultIcon;
31
- };
32
- //# sourceMappingURL=FieldRequirementItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldRequirementItem.js","sourceRoot":"","sources":["../../../src/FieldRequirements/FieldRequirementItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAK3D,MAAM,QAAQ,GAAkD;IAC9D,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,KAAK;CACb,CAAA;AAED,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,YAAY;CACpB,CAAA;AAWD,MAAM,oBAAoB,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAS,EAAE,EAAE;IACpE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEjD,OAAO,CACL,oBAAC,IAAI,CAAC,IAAI,IACR,EAAE,EAAE,CAAC,EACL,SAAS,EAAC,iCAAiC,iBAC9B,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;QAE1B,oBAAC,aAAa,IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAe,UAAU,GAAI;QACnE,oBAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,IACrE,QAAQ,CACE,CACH,CACb,CAAA;AACH,CAAC,CAAA;AAED,eAAe,oBAAoB,CAAA;AAEnC,MAAM,aAAa,GAAG,CACpB,MAAkC,EAClC,OAKC,EACD,EAAE;IACF,IAAI,MAAM,KAAK,OAAO,EAAE;QACtB,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA;KAC1B;IACD,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAA;KAC5B;IAED,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAA;AAC7B,CAAC,CAAA"}
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- import type { BaseProps } from '@toptal/picasso-shared';
3
- import type { FieldRequirement } from './types';
4
- export interface Props<TValueType> extends BaseProps {
5
- /** A string that defines the title of the requirement list */
6
- description?: string;
7
- /** Value of the related input. It will be used to validate the requirements */
8
- value?: TValueType;
9
- /** Open/Close the requirements section. Opening it with focus is the default behavior */
10
- open: boolean;
11
- /** Indicate whether `PasswordInput` is in error state */
12
- error?: boolean;
13
- /** Duration for the collapse animation */
14
- timeout?: number;
15
- /** Array of object to specify requirements. They will be executed */
16
- requirements: FieldRequirement<TValueType>[];
17
- testIds?: {
18
- root?: string;
19
- description?: string;
20
- gridContainer?: string;
21
- };
22
- }
23
- export declare const FieldRequirements: {
24
- <TValueType>({ value, description, open, error, timeout, requirements, className, style, testIds, }: Props<TValueType>): JSX.Element;
25
- defaultProps: {
26
- open: boolean;
27
- timeout: number;
28
- value: string;
29
- };
30
- displayName: string;
31
- };
32
- export default FieldRequirements;
33
- //# sourceMappingURL=FieldRequirements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldRequirements.d.ts","sourceRoot":"","sources":["../../../src/FieldRequirements/FieldRequirements.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAOvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,MAAM,WAAW,KAAK,CAAC,UAAU,CAAE,SAAQ,SAAS;IAClD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,yFAAyF;IACzF,IAAI,EAAE,OAAO,CAAA;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,YAAY,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAA;IAC5C,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB,CAAA;CACF;AAID,eAAO,MAAM,iBAAiB;;;;;;;;CA2D7B,CAAA;AAUD,eAAe,iBAAiB,CAAA"}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { Typography } from '@toptal/picasso-typography';
3
- import { Grid } from '@toptal/picasso-grid';
4
- import { Collapse } from '@toptal/picasso-collapse';
5
- import FieldRequirementItem from './FieldRequirementItem';
6
- const ANIMATION_TIMEOUT = 500;
7
- export const FieldRequirements = ({ value, description, open, error, timeout, requirements, className, style, testIds, }) => {
8
- return (React.createElement(Collapse, { style: style, className: className, in: open, timeout: timeout, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.root },
9
- React.createElement(React.Fragment, null,
10
- description && (React.createElement(Typography, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.description, variant: 'body', size: 'xxsmall', className: 'mt-[0.4rem]' }, description)),
11
- React.createElement(Grid, { className: 'w-input', spacing: 0, "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.gridContainer }, requirements.map(requirement => {
12
- let status = 'default';
13
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
14
- if (requirement.validator(value)) {
15
- status = 'success';
16
- }
17
- else if (error) {
18
- status = 'error';
19
- }
20
- return (React.createElement(FieldRequirementItem, { key: requirement.message, status: status, testIds: requirement.testIds }, requirement.message));
21
- })))));
22
- };
23
- FieldRequirements.defaultProps = {
24
- open: false,
25
- timeout: ANIMATION_TIMEOUT,
26
- value: '',
27
- };
28
- FieldRequirements.displayName = 'FieldRequirements';
29
- export default FieldRequirements;
30
- //# sourceMappingURL=FieldRequirements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldRequirements.js","sourceRoot":"","sources":["../../../src/FieldRequirements/FieldRequirements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AAuBzD,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAE7B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAc,EAC7C,KAAK,EACL,WAAW,EACX,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,SAAS,EACT,KAAK,EACL,OAAO,GACW,EAAE,EAAE;IACtB,OAAO,CACL,oBAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,IAAI,EACR,OAAO,EAAE,OAAO,iBACH,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;QAE1B;YACG,WAAW,IAAI,CACd,oBAAC,UAAU,mBACI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EACjC,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,SAAS,EACd,SAAS,EAAC,aAAa,IAEtB,WAAW,CACD,CACd;YACD,oBAAC,IAAI,IACH,SAAS,EAAC,SAAS,EACnB,OAAO,EAAE,CAAC,iBACG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,IAElC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;gBAC9B,IAAI,MAAM,GAA+B,SAAS,CAAA;gBAElD,oEAAoE;gBACpE,IAAI,WAAW,CAAC,SAAS,CAAC,KAAM,CAAC,EAAE;oBACjC,MAAM,GAAG,SAAS,CAAA;iBACnB;qBAAM,IAAI,KAAK,EAAE;oBAChB,MAAM,GAAG,OAAO,CAAA;iBACjB;gBAED,OAAO,CACL,oBAAC,oBAAoB,IACnB,GAAG,EAAE,WAAW,CAAC,OAAO,EACxB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,CAAC,OAAO,IAE3B,WAAW,CAAC,OAAO,CACC,CACxB,CAAA;YACH,CAAC,CAAC,CACG,CACN,CACM,CACZ,CAAA;AACH,CAAC,CAAA;AAED,iBAAiB,CAAC,YAAY,GAAG;IAC/B,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,EAAE;CACV,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAEnD,eAAe,iBAAiB,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FieldRequirements';
3
- export { default as FieldRequirements } from './FieldRequirements';
4
- export * from './types';
5
- export declare type FieldRequirementsProps<TValueType> = OmitInternalProps<Props<TValueType>>;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FieldRequirements/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAClE,cAAc,SAAS,CAAA;AACvB,oBAAY,sBAAsB,CAAC,UAAU,IAAI,iBAAiB,CAChE,KAAK,CAAC,UAAU,CAAC,CAClB,CAAA"}
@@ -1,3 +0,0 @@
1
- export { default as FieldRequirements } from './FieldRequirements';
2
- export * from './types';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FieldRequirements/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAClE,cAAc,SAAS,CAAA"}
@@ -1,11 +0,0 @@
1
- export interface FieldRequirement<TValueType> {
2
- message: string;
3
- validator: (value: TValueType) => boolean;
4
- testIds?: {
5
- root?: string;
6
- successIcon?: string;
7
- errorIcon?: string;
8
- defaultIcon?: string;
9
- };
10
- }
11
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/FieldRequirements/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB,CAAC,UAAU;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAA;IACzC,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;CACF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/FieldRequirements/types.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- import type { FormEventHandler, ReactNode, FormHTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- import type { LabelColumnSize, ResponsiveLabelColumnSize } from '@toptal/picasso-form-layout';
5
- export interface Props extends BaseProps, FormHTMLAttributes<HTMLFormElement> {
6
- /** Content of Form constructed of Form elements */
7
- children?: ReactNode;
8
- /** Submit handler */
9
- onSubmit?: FormEventHandler<HTMLFormElement>;
10
- /** Form layout */
11
- layout?: 'horizontal' | 'vertical';
12
- /** Label width */
13
- labelWidth?: LabelColumnSize | ResponsiveLabelColumnSize;
14
- }
15
- export declare const Form: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLFormElement>>;
16
- export default Form;
17
- //# sourceMappingURL=Form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/Form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAC5E,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAGvD,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AAEpC,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,kBAAkB,CAAC,eAAe,CAAC;IAC3E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;IAC5C,kBAAkB;IAClB,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAClC,kBAAkB;IAClB,UAAU,CAAC,EAAE,eAAe,GAAG,yBAAyB,CAAA;CACzD;AAED,eAAO,MAAM,IAAI,+EAiBf,CAAA;AAIF,eAAe,IAAI,CAAA"}
@@ -1,22 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import cx from 'classnames';
14
- import { FieldsLayoutContextProvider } from '@toptal/picasso-form-layout';
15
- export const Form = forwardRef(function Form(_a, ref) {
16
- var { onSubmit, className, style, children, layout, labelWidth } = _a, rest = __rest(_a, ["onSubmit", "className", "style", "children", "layout", "labelWidth"]);
17
- return (React.createElement("form", Object.assign({}, rest, { ref: ref, onSubmit: onSubmit, className: cx(className), style: style }),
18
- React.createElement(FieldsLayoutContextProvider, { layout: layout, labelWidth: labelWidth }, children)));
19
- });
20
- Form.displayName = 'Form';
21
- export default Form;
22
- //# sourceMappingURL=Form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../src/Form/Form.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAiBzE,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAyB,SAAS,IAAI,CAClE,EAAqE,EACrE,GAAG;QADH,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,OAAW,EAAN,IAAI,cAAnE,sEAAqE,CAAF;IAGnE,OAAO,CACL,8CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EACxB,KAAK,EAAE,KAAK;QAEZ,oBAAC,2BAA2B,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,IAChE,QAAQ,CACmB,CACzB,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,eAAe,IAAI,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props as InternalFormProps } from './Form';
3
- export { default as Form } from './Form';
4
- export declare type FormProps = OmitInternalProps<InternalFormProps>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,IAAI,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,oBAAY,SAAS,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as Form } from './Form';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Form/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { ContainerProps } from '@toptal/picasso-container';
3
- export interface Props extends Omit<ContainerProps, 'children'> {
4
- /** Content */
5
- children: ReactNode;
6
- }
7
- declare const FormActionsContainer: ({ children, style, ...rest }: Props) => JSX.Element;
8
- export default FormActionsContainer;
9
- //# sourceMappingURL=FormActionsContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormActionsContainer.d.ts","sourceRoot":"","sources":["../../../src/FormActionsContainer/FormActionsContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAS/D,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IAC7D,cAAc;IACd,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,QAAA,MAAM,oBAAoB,iCAAkC,KAAK,gBAmBhE,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,28 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React from 'react';
13
- import { Container } from '@toptal/picasso-container';
14
- import { useFieldsLayoutContext } from '@toptal/picasso-form-layout';
15
- import { createLabelWidthStyles, horizontalLayoutClasses, } from '../FormField/styles';
16
- const FormActionsContainer = (_a) => {
17
- var { children, style } = _a, rest = __rest(_a, ["children", "style"]);
18
- const { layout, labelWidth } = useFieldsLayoutContext();
19
- if (layout === 'vertical') {
20
- return React.createElement(Container, Object.assign({}, rest), children);
21
- }
22
- const labelWidthStyles = createLabelWidthStyles(labelWidth);
23
- return (React.createElement(Container, Object.assign({ className: horizontalLayoutClasses }, rest, { style: Object.assign(Object.assign({}, style), labelWidthStyles) }),
24
- React.createElement("div", null),
25
- React.createElement("div", null, children)));
26
- };
27
- export default FormActionsContainer;
28
- //# sourceMappingURL=FormActionsContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormActionsContainer.js","sourceRoot":"","sources":["../../../src/FormActionsContainer/FormActionsContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,qBAAqB,CAAA;AAO5B,MAAM,oBAAoB,GAAG,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,QAAQ,EAAE,KAAK,OAAkB,EAAb,IAAI,cAA1B,qBAA4B,CAAF;IACtD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,sBAAsB,EAAE,CAAA;IAEvD,IAAI,MAAM,KAAK,UAAU,EAAE;QACzB,OAAO,oBAAC,SAAS,oBAAK,IAAI,GAAG,QAAQ,CAAa,CAAA;KACnD;IAED,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAA;IAE3D,OAAO,CACL,oBAAC,SAAS,kBACR,SAAS,EAAE,uBAAuB,IAC9B,IAAI,IACR,KAAK,kCAAO,KAAK,GAAK,gBAAgB;QAEtC,gCAAO;QACP,iCAAM,QAAQ,CAAO,CACX,CACb,CAAA;AACH,CAAC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormActionsContainer } from './FormActionsContainer';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormActionsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormActionsContainer } from './FormActionsContainer';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormActionsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TEST_ID = "form-auto-save-indicator";
3
- export interface Props {
4
- /** Indicates that form values are being saved */
5
- saving?: boolean;
6
- /** Timeout duration for the delay before hiding 'Saved' text */
7
- hideTimeout?: number;
8
- /** The text of the label, default is 'Saved' */
9
- label?: string;
10
- }
11
- declare const FormAutoSaveIndicator: ({ saving, label, hideTimeout, }: Props) => JSX.Element;
12
- export default FormAutoSaveIndicator;
13
- //# sourceMappingURL=FormAutoSaveIndicator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormAutoSaveIndicator.d.ts","sourceRoot":"","sources":["../../../src/FormAutoSaveIndicator/FormAutoSaveIndicator.tsx"],"names":[],"mappings":";AAMA,eAAO,MAAM,OAAO,6BAA6B,CAAA;AAEjD,MAAM,WAAW,KAAK;IACpB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAQD,QAAA,MAAM,qBAAqB,oCAIxB,KAAK,gBAuCP,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,38 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import debounce from 'debounce';
3
- import { Typography } from '@toptal/picasso-typography';
4
- import { Container } from '@toptal/picasso-container';
5
- import { twJoin } from '@toptal/picasso-tailwind-merge';
6
- export const TEST_ID = 'form-auto-save-indicator';
7
- var SavingState;
8
- (function (SavingState) {
9
- SavingState[SavingState["Initial"] = 0] = "Initial";
10
- SavingState[SavingState["Saving"] = 1] = "Saving";
11
- SavingState[SavingState["Saved"] = 2] = "Saved";
12
- })(SavingState || (SavingState = {}));
13
- const FormAutoSaveIndicator = ({ saving, label = 'Saved', hideTimeout = 1000, }) => {
14
- const [savingState, setSavingState] = useState(SavingState.Initial);
15
- useEffect(() => {
16
- if (saving) {
17
- setSavingState(SavingState.Saving);
18
- }
19
- else if (savingState === SavingState.Saving) {
20
- setSavingState(SavingState.Saved);
21
- }
22
- }, [saving, savingState]);
23
- useEffect(() => {
24
- const hideIndicator = debounce(() => {
25
- setSavingState(SavingState.Initial);
26
- }, hideTimeout);
27
- if (savingState === SavingState.Saved) {
28
- hideIndicator();
29
- }
30
- return () => {
31
- hideIndicator.clear();
32
- };
33
- }, [savingState, hideTimeout]);
34
- return (React.createElement(Container, { className: twJoin('mt-[0.25em] mb-[0.25em]', savingState === SavingState.Saved ? 'visible' : 'invisible'), align: 'right', "data-testid": TEST_ID },
35
- React.createElement(Typography, { size: 'xxsmall' }, label)));
36
- };
37
- export default FormAutoSaveIndicator;
38
- //# sourceMappingURL=FormAutoSaveIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormAutoSaveIndicator.js","sourceRoot":"","sources":["../../../src/FormAutoSaveIndicator/FormAutoSaveIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAEvD,MAAM,CAAC,MAAM,OAAO,GAAG,0BAA0B,CAAA;AAWjD,IAAK,WAIJ;AAJD,WAAK,WAAW;IACd,mDAAO,CAAA;IACP,iDAAM,CAAA;IACN,+CAAK,CAAA;AACP,CAAC,EAJI,WAAW,KAAX,WAAW,QAIf;AAED,MAAM,qBAAqB,GAAG,CAAC,EAC7B,MAAM,EACN,KAAK,GAAG,OAAO,EACf,WAAW,GAAG,IAAI,GACZ,EAAE,EAAE;IACV,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAC5C,WAAW,CAAC,OAAO,CACpB,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,EAAE;YACV,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;SACnC;aAAM,IAAI,WAAW,KAAK,WAAW,CAAC,MAAM,EAAE;YAC7C,cAAc,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;SAClC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAA;IAEzB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE;YAClC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QACrC,CAAC,EAAE,WAAW,CAAC,CAAA;QAEf,IAAI,WAAW,KAAK,WAAW,CAAC,KAAK,EAAE;YACrC,aAAa,EAAE,CAAA;SAChB;QAED,OAAO,GAAG,EAAE;YACV,aAAa,CAAC,KAAK,EAAE,CAAA;QACvB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAA;IAE9B,OAAO,CACL,oBAAC,SAAS,IACR,SAAS,EAAE,MAAM,CACf,yBAAyB,EACzB,WAAW,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAC5D,EACD,KAAK,EAAC,OAAO,iBACA,OAAO;QAEpB,oBAAC,UAAU,IAAC,IAAI,EAAC,SAAS,IAAE,KAAK,CAAc,CACrC,CACb,CAAA;AACH,CAAC,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FormAutoSaveIndicator';
3
- export { default as FormAutoSaveIndicator } from './FormAutoSaveIndicator';
4
- export declare type FormAutoSaveIndicatorProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormAutoSaveIndicator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,oBAAY,0BAA0B,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormAutoSaveIndicator } from './FormAutoSaveIndicator';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormAutoSaveIndicator/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const FormCompound: import("react").ForwardRefExoticComponent<import("../Form/Form").Props & import("react").RefAttributes<HTMLFormElement>> & {
3
- Field: import("react").ForwardRefExoticComponent<import("../FormField/FormField").Props & import("react").RefAttributes<HTMLDivElement>>;
4
- Hint: import("react").ForwardRefExoticComponent<import("../FormHint/FormHint").Props & import("react").RefAttributes<HTMLDivElement>>;
5
- Error: import("react").ForwardRefExoticComponent<import("../FormError/FormError").Props & import("react").RefAttributes<HTMLDivElement>>;
6
- Label: import("react").ForwardRefExoticComponent<import("@toptal/picasso-form-label/dist-package/src/FormLabel/FormLabel").Props & import("react").RefAttributes<HTMLLabelElement>>;
7
- Warning: import("react").ForwardRefExoticComponent<import("../FormWarning/FormWarning").Props & import("react").RefAttributes<HTMLDivElement>>;
8
- };
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormCompound/index.ts"],"names":[],"mappings":";AAQA,eAAO,MAAM,YAAY;;;;;;CAMvB,CAAA"}
@@ -1,14 +0,0 @@
1
- import { FormLabel } from '@toptal/picasso-form-label';
2
- import { Form } from '../Form';
3
- import { FormError } from '../FormError';
4
- import { FormField } from '../FormField';
5
- import { FormHint } from '../FormHint';
6
- import { FormWarning } from '../FormWarning';
7
- export const FormCompound = Object.assign(Form, {
8
- Field: FormField,
9
- Hint: FormHint,
10
- Error: FormError,
11
- Label: FormLabel,
12
- Warning: FormWarning,
13
- });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormCompound/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IAC9C,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { ReactNode, HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- /** The text of the error */
6
- children: ReactNode;
7
- }
8
- export declare const FormError: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
- export default FormError;
10
- //# sourceMappingURL=FormError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormError.d.ts","sourceRoot":"","sources":["../../../src/FormError/FormError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,4BAA4B;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,SAAS,8EAkBpB,CAAA;AAIF,eAAe,SAAS,CAAA"}
@@ -1,22 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Typography } from '@toptal/picasso-typography';
14
- import { twMerge } from '@toptal/picasso-tailwind-merge';
15
- export const FormError = forwardRef(function FormError(props, ref) {
16
- const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
17
- return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge('mt-1', className), style: style }),
18
- React.createElement(Typography, { color: 'red', size: 'xxsmall', className: 'cursor-default' }, children)));
19
- });
20
- FormError.displayName = 'FormError';
21
- export default FormError;
22
- //# sourceMappingURL=FormError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormError.js","sourceRoot":"","sources":["../../../src/FormError/FormError.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAOxD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAwB,SAAS,SAAS,CAC3E,KAAK,EACL,GAAG;IAEH,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA/C,kCAAuC,CAAQ,CAAA;IAErD,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,UAAU,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,gBAAgB,IAC9D,QAAQ,CACE,CACT,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FormError';
3
- export { default as FormError } from './FormError';
4
- export declare type FormErrorProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormError/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,oBAAY,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormError } from './FormError';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormError/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -1,22 +0,0 @@
1
- import type { ReactNode, HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- /** The text of the hint */
6
- hint?: string | ReactNode;
7
- /** The text of the error */
8
- error?: string | ReactNode;
9
- /** The text of the warning */
10
- warning?: string | ReactNode;
11
- /** The content of the Form.Field */
12
- children: ReactNode;
13
- /** Field requirements for this specific field */
14
- fieldRequirements?: ReactNode;
15
- /** instance of FormAutoSaveIndicator component */
16
- autoSaveIndicator?: ReactNode;
17
- /** whether multiline counter is visible */
18
- hasMultilineCounter?: boolean;
19
- }
20
- export declare const FormField: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
21
- export default FormField;
22
- //# sourceMappingURL=FormField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/FormField/FormField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAA+B,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAUvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAC7B,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAC7B,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AA8CD,eAAO,MAAM,SAAS,8EAuDpB,CAAA;AAIF,eAAe,SAAS,CAAA"}
@@ -1,50 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef, Children } from 'react';
13
- import { Container } from '@toptal/picasso-container';
14
- import { twJoin, twMerge } from '@toptal/picasso-tailwind-merge';
15
- import { useFieldsLayoutContext } from '@toptal/picasso-form-layout';
16
- import { FormHint } from '../FormHint';
17
- import { FormError } from '../FormError';
18
- import { createLabelWidthStyles, horizontalLayoutClasses } from './styles';
19
- import { FormWarning } from '../FormWarning';
20
- const FormFieldAdornments = ({ autoSaveIndicator, children, hasMultilineCounter, }) => {
21
- const { layout } = useFieldsLayoutContext();
22
- const isHorizontal = layout === 'horizontal';
23
- if (Children.toArray(children).length === 0) {
24
- return null;
25
- }
26
- if (!autoSaveIndicator) {
27
- return (React.createElement("div", { className: twJoin(isHorizontal && '[grid-area:error]') }, children));
28
- }
29
- return (React.createElement(Container, { flex: true, direction: 'column', className: twJoin('relative pr-8', isHorizontal && '[grid-area:error]') },
30
- children,
31
- React.createElement(Container, { className: twJoin('absolute right-0', hasMultilineCounter ? '-top-[0.875rem]' : 'top-0') }, autoSaveIndicator)));
32
- };
33
- export const FormField = forwardRef(function FormField(props, ref) {
34
- const { autoSaveIndicator, className, style, hint, children, error, warning, fieldRequirements, hasMultilineCounter } = props, rest = __rest(props, ["autoSaveIndicator", "className", "style", "hint", "children", "error", "warning", "fieldRequirements", "hasMultilineCounter"]);
35
- const { layout, labelWidth } = useFieldsLayoutContext();
36
- const isHorizontal = layout === 'horizontal';
37
- const labelWidthStyles = isHorizontal
38
- ? createLabelWidthStyles(labelWidth)
39
- : {};
40
- return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge('text-[1rem] [&+&]:mt-4', isHorizontal && horizontalLayoutClasses, className), style: Object.assign(Object.assign({}, style), labelWidthStyles), "data-field-has-error": Boolean(error) }),
41
- children,
42
- React.createElement(FormFieldAdornments, { autoSaveIndicator: autoSaveIndicator, hasMultilineCounter: hasMultilineCounter },
43
- error && React.createElement(FormError, null, error),
44
- warning && (React.createElement(FormWarning, { className: twJoin(error && hint && 'mt-0') }, warning)),
45
- hint && (React.createElement(FormHint, { className: twJoin((error || warning) && hint && 'mt-0') }, hint)),
46
- fieldRequirements)));
47
- });
48
- FormField.displayName = 'FormField';
49
- export default FormField;
50
- //# sourceMappingURL=FormField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/FormField/FormField.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAwB5C,MAAM,mBAAmB,GAAG,CAAC,EAC3B,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,GACM,EAAE,EAAE;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,sBAAsB,EAAE,CAAA;IAC3C,MAAM,YAAY,GAAG,MAAM,KAAK,YAAY,CAAA;IAE5C,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,YAAY,IAAI,mBAAmB,CAAC,IACxD,QAAQ,CACL,CACP,CAAA;KACF;IAED,OAAO,CACL,oBAAC,SAAS,IACR,IAAI,QACJ,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,YAAY,IAAI,mBAAmB,CAAC;QAEtE,QAAQ;QACT,oBAAC,SAAS,IACR,SAAS,EAAE,MAAM,CACf,kBAAkB,EAClB,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAClD,IAEA,iBAAiB,CACR,CACF,CACb,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAwB,SAAS,SAAS,CAC3E,KAAK,EACL,GAAG;IAEH,MAAM,EACJ,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,mBAAmB,KAEjB,KAAK,EADJ,IAAI,UACL,KAAK,EAXH,+HAWL,CAAQ,CAAA;IAET,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,sBAAsB,EAAE,CAAA;IACvD,MAAM,YAAY,GAAG,MAAM,KAAK,YAAY,CAAA;IAC5C,MAAM,gBAAgB,GAAG,YAAY;QACnC,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC;QACpC,CAAC,CAAC,EAAE,CAAA;IAEN,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAChB,wBAAwB,EACxB,YAAY,IAAI,uBAAuB,EACvC,SAAS,CACV,EACD,KAAK,kCAAO,KAAK,GAAK,gBAAgB,2BAChB,OAAO,CAAC,KAAK,CAAC;QAEnC,QAAQ;QACT,oBAAC,mBAAmB,IAClB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB;YAEvC,KAAK,IAAI,oBAAC,SAAS,QAAE,KAAK,CAAa;YACvC,OAAO,IAAI,CACV,oBAAC,WAAW,IAAC,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,IACpD,OAAO,CACI,CACf;YACA,IAAI,IAAI,CACP,oBAAC,QAAQ,IAAC,SAAS,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,IAAI,IAAI,MAAM,CAAC,IAC9D,IAAI,CACI,CACZ;YACA,iBAAiB,CACE,CAClB,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FormField';
3
- export { default as FormField } from './FormField';
4
- export declare type FormFieldProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,oBAAY,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormField } from './FormField';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormField/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { BreakpointKeys } from '@toptal/picasso-provider';
2
- import type { LabelColumnSize, ResponsiveLabelColumnSize } from '@toptal/picasso-form-layout';
3
- export declare const getLabelWithName: (breakpoint: BreakpointKeys) => string;
4
- export declare const FORM_LABEL_WIDTH_CSS_VARIABLE = "--form-label-width";
5
- /**
6
- * Generates style attribute `--form-label-width--${breakpoint}` for each breakpoint from labelWidth prop
7
- */
8
- export declare const createLabelWidthStyles: (labelWidth: LabelColumnSize | ResponsiveLabelColumnSize) => Record<string, LabelColumnSize | BreakpointKeys>;
9
- export declare const horizontalLayoutClasses = "\n grid w-full gap-x-[32px] gap-y-0 grid-rows-[auto_auto] \n grid-cols-[calc(4.25rem*var(--form-label-width,3))_1fr]\n [grid-template-areas:\"label_input\"_\"hint_error\"]\n\n xs:[--form-label-width:var(--form-label-width--xs)]\n sm:[--form-label-width:var(--form-label-width--sm)]\n md:[--form-label-width:var(--form-label-width--md)]\n lg:[--form-label-width:var(--form-label-width--lg)]\n xl:[--form-label-width:var(--form-label-width--xl)]\n ";
10
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormField/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AAEpC,eAAO,MAAM,gBAAgB,eAAgB,cAAc,WAE1D,CAAA;AAED,eAAO,MAAM,6BAA6B,uBAAuB,CAAA;AAQjE;;GAEG;AACH,eAAO,MAAM,sBAAsB,eACrB,eAAe,GAAG,yBAAyB,KACtD,OAAO,MAAM,EAAE,eAAe,GAAG,cAAc,CAsBjD,CAAA;AAED,eAAO,MAAM,uBAAuB,4cAUjC,CAAA"}
@@ -1,37 +0,0 @@
1
- import { DEFAULT_LABEL_WIDTH_SIZE } from '@toptal/picasso-form-layout';
2
- export const getLabelWithName = (breakpoint) => {
3
- return `--form-label-width--${breakpoint}`;
4
- };
5
- export const FORM_LABEL_WIDTH_CSS_VARIABLE = '--form-label-width';
6
- const isLabelColumnSize = (labelWidth) => {
7
- return typeof labelWidth === 'number';
8
- };
9
- /**
10
- * Generates style attribute `--form-label-width--${breakpoint}` for each breakpoint from labelWidth prop
11
- */
12
- export const createLabelWidthStyles = (labelWidth) => {
13
- if (isLabelColumnSize(labelWidth)) {
14
- return { [FORM_LABEL_WIDTH_CSS_VARIABLE]: labelWidth };
15
- }
16
- let defaultLabelWidthSize = DEFAULT_LABEL_WIDTH_SIZE;
17
- const breakpoints = ['md', 'lg', 'xl'];
18
- return breakpoints.reduce((acc, breakpoint) => {
19
- var _a;
20
- if (labelWidth[breakpoint] !== undefined) {
21
- defaultLabelWidthSize = labelWidth[breakpoint];
22
- }
23
- return Object.assign(Object.assign({}, acc), { [getLabelWithName(breakpoint)]: (_a = labelWidth[breakpoint]) !== null && _a !== void 0 ? _a : defaultLabelWidthSize });
24
- }, {});
25
- };
26
- export const horizontalLayoutClasses = `
27
- grid w-full gap-x-[32px] gap-y-0 grid-rows-[auto_auto]
28
- grid-cols-[calc(4.25rem*var(--form-label-width,3))_1fr]
29
- [grid-template-areas:"label_input"_"hint_error"]
30
-
31
- xs:[--form-label-width:var(--form-label-width--xs)]
32
- sm:[--form-label-width:var(--form-label-width--sm)]
33
- md:[--form-label-width:var(--form-label-width--md)]
34
- lg:[--form-label-width:var(--form-label-width--lg)]
35
- xl:[--form-label-width:var(--form-label-width--xl)]
36
- `;
37
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/FormField/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAMtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAA0B,EAAE,EAAE;IAC7D,OAAO,uBAAuB,UAAU,EAAE,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAA;AAEjE,MAAM,iBAAiB,GAAG,CACxB,UAAuD,EACxB,EAAE;IACjC,OAAO,OAAO,UAAU,KAAK,QAAQ,CAAA;AACvC,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,UAAuD,EACL,EAAE;IACpD,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE;QACjC,OAAO,EAAE,CAAC,6BAA6B,CAAC,EAAE,UAAU,EAAE,CAAA;KACvD;IAED,IAAI,qBAAqB,GAAoB,wBAAwB,CAAA;IACrE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAqB,CAAA;IAE1D,OAAO,WAAW,CAAC,MAAM,CACvB,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;;QAClB,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;YACxC,qBAAqB,GAAG,UAAU,CAAC,UAAU,CAAE,CAAA;SAChD;QAED,uCACK,GAAG,KACN,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,EAC5B,MAAA,UAAU,CAAC,UAAU,CAAC,mCAAI,qBAAqB,IAClD;IACH,CAAC,EACD,EAAE,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;GAUpC,CAAA"}
@@ -1,12 +0,0 @@
1
- import type { ReactNode, HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- /** The text of the hint */
6
- children: ReactNode;
7
- /** Whether the FormHint is disabled */
8
- disabled?: boolean;
9
- }
10
- export declare const FormHint: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
11
- export default FormHint;
12
- //# sourceMappingURL=FormHint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormHint.d.ts","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,2BAA2B;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,8EAkBnB,CAAA;AAIF,eAAe,QAAQ,CAAA"}
@@ -1,22 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Typography } from '@toptal/picasso-typography';
14
- import { twMerge } from '@toptal/picasso-tailwind-merge';
15
- export const FormHint = forwardRef(function FormHint(props, ref) {
16
- const { children, className, style, disabled } = props, rest = __rest(props, ["children", "className", "style", "disabled"]);
17
- return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge('mt-1', className), style: style }),
18
- React.createElement(Typography, { size: 'xxsmall', color: disabled ? 'grey-main-2' : undefined }, children)));
19
- });
20
- FormHint.displayName = 'FormHint';
21
- export default FormHint;
22
- //# sourceMappingURL=FormHint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormHint.js","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AASxD,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAwB,SAAS,QAAQ,CACzE,KAAK,EACL,GAAG;IAEH,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAzD,8CAAiD,CAAQ,CAAA;IAE/D,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,UAAU,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IACnE,QAAQ,CACE,CACT,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,eAAe,QAAQ,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FormHint';
3
- export { default as FormHint } from './FormHint';
4
- export declare type FormHintProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormHint/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,oBAAY,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormHint } from './FormHint';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormHint/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ReactNode, HTMLAttributes } from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- children: ReactNode;
6
- }
7
- export declare const FormLevelError: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
8
- export default FormLevelError;
9
- //# sourceMappingURL=FormLevelError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLevelError.d.ts","sourceRoot":"","sources":["../../../src/FormLevelError/FormLevelError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,cAAc,8EAe1B,CAAA;AAID,eAAe,cAAc,CAAA"}
@@ -1,23 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Alert } from '@toptal/picasso-alert';
14
- import { Container } from '@toptal/picasso-container';
15
- import { twMerge } from '@toptal/picasso-tailwind-merge';
16
- export const FormLevelError = forwardRef(function FormLevelError(props, ref) {
17
- const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
18
- return (React.createElement(Container, Object.assign({}, rest, { ref: ref, className: twMerge('mb-4', className), style: style }),
19
- React.createElement(Alert, { variant: 'red' }, children)));
20
- });
21
- FormLevelError.displayName = 'FormLevelError';
22
- export default FormLevelError;
23
- //# sourceMappingURL=FormLevelError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLevelError.js","sourceRoot":"","sources":["../../../src/FormLevelError/FormLevelError.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAMxD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG;IAChC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA/C,kCAAuC,CAAQ,CAAA;IAErD,OAAO,CACL,oBAAC,SAAS,oBACJ,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,KAAK,IAAC,OAAO,EAAC,KAAK,IAAE,QAAQ,CAAS,CAC7B,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAED,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,eAAe,cAAc,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './FormLevelError';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormLevelError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './FormLevelError';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormLevelError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ReactNode, HTMLAttributes } from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- children: ReactNode;
6
- }
7
- export declare const FormLevelWarning: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
8
- export default FormLevelWarning;
9
- //# sourceMappingURL=FormLevelWarning.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLevelWarning.d.ts","sourceRoot":"","sources":["../../../src/FormLevelWarning/FormLevelWarning.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,gBAAgB,8EAe5B,CAAA;AAID,eAAe,gBAAgB,CAAA"}
@@ -1,23 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Alert } from '@toptal/picasso-alert';
14
- import { Container } from '@toptal/picasso-container';
15
- import { twMerge } from '@toptal/picasso-tailwind-merge';
16
- export const FormLevelWarning = forwardRef(function FormLevelWarning(props, ref) {
17
- const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
18
- return (React.createElement(Container, Object.assign({}, rest, { ref: ref, className: twMerge('mt-4', className), style: style }),
19
- React.createElement(Alert, { variant: 'yellow' }, children)));
20
- });
21
- FormLevelWarning.displayName = 'FormLevelWarning';
22
- export default FormLevelWarning;
23
- //# sourceMappingURL=FormLevelWarning.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLevelWarning.js","sourceRoot":"","sources":["../../../src/FormLevelWarning/FormLevelWarning.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAMxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CACxC,SAAS,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAClC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA/C,kCAAuC,CAAQ,CAAA;IAErD,OAAO,CACL,oBAAC,SAAS,oBACJ,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,IAAE,QAAQ,CAAS,CAChC,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEjD,eAAe,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './FormLevelWarning';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormLevelWarning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './FormLevelWarning';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormLevelWarning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { ReactNode, HTMLAttributes } from 'react';
2
- import React from 'react';
3
- import type { BaseProps } from '@toptal/picasso-shared';
4
- export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
5
- /** The text of the error */
6
- children: ReactNode;
7
- }
8
- export declare const FormWarning: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
- export default FormWarning;
10
- //# sourceMappingURL=FormWarning.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormWarning.d.ts","sourceRoot":"","sources":["../../../src/FormWarning/FormWarning.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,4BAA4B;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,8EAiBvB,CAAA;AAID,eAAe,WAAW,CAAA"}
@@ -1,22 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { forwardRef } from 'react';
13
- import { Typography } from '@toptal/picasso-typography';
14
- import { twMerge } from '@toptal/picasso-tailwind-merge';
15
- export const FormWarning = forwardRef(function FormWarning(props, ref) {
16
- const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
17
- return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge('mt-1', className), style: style }),
18
- React.createElement(Typography, { color: 'yellow', size: 'xxsmall', className: 'cursor-default' }, children)));
19
- });
20
- FormWarning.displayName = 'FormWarning';
21
- export default FormWarning;
22
- //# sourceMappingURL=FormWarning.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormWarning.js","sourceRoot":"","sources":["../../../src/FormWarning/FormWarning.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAOxD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,SAAS,WAAW,CAAC,KAAK,EAAE,GAAG;IAC7B,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA/C,kCAAuC,CAAQ,CAAA;IAErD,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,UAAU,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,gBAAgB,IACjE,QAAQ,CACE,CACT,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,eAAe,WAAW,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './FormWarning';
3
- export { default as FormWarning } from './FormWarning';
4
- export declare type FormWarningProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormWarning/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as FormWarning } from './FormWarning';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/FormWarning/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA"}
@@ -1,14 +0,0 @@
1
- export * from './FormCompound';
2
- export * from './Form';
3
- export * from './FormError';
4
- export * from './FormHint';
5
- export * from './FormWarning';
6
- export * from './FormField';
7
- export type { FieldsLayoutContextProviderProps, FieldsLayoutContextValue, FieldLayout, LabelColumnSize, ResponsiveLabelColumnSize, } from '@toptal/picasso-form-layout';
8
- export { useFieldsLayoutContext, FieldsLayoutContextProvider, } from '@toptal/picasso-form-layout';
9
- export * from './FormAutoSaveIndicator';
10
- export * from './FieldRequirements';
11
- export * from './FormActionsContainer';
12
- export { default as FormLevelError } from './FormLevelError';
13
- export { default as FormLevelWarning } from './FormLevelWarning';
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,YAAY,EACV,gCAAgC,EAChC,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,yBAAyB,GAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAA;AAEpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,13 +0,0 @@
1
- export * from './FormCompound';
2
- export * from './Form';
3
- export * from './FormError';
4
- export * from './FormHint';
5
- export * from './FormWarning';
6
- export * from './FormField';
7
- export { useFieldsLayoutContext, FieldsLayoutContextProvider, } from '@toptal/picasso-form-layout';
8
- export * from './FormAutoSaveIndicator';
9
- export * from './FieldRequirements';
10
- export * from './FormActionsContainer';
11
- export { default as FormLevelError } from './FormLevelError';
12
- export { default as FormLevelWarning } from './FormLevelWarning';
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAQ3B,OAAO,EACL,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAA;AAEpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}