autoforma 1.0.0 → 1.0.1

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 (110) hide show
  1. package/dist/index.cjs.js +70 -0
  2. package/dist/index.es.js +13532 -0
  3. package/dist/src/components/AutoForm.d.ts +18 -0
  4. package/dist/src/components/FieldRender.d.ts +16 -0
  5. package/dist/src/components/fields/ArrayField.d.ts +13 -0
  6. package/dist/src/components/fields/CheckField.d.ts +7 -0
  7. package/dist/src/components/fields/DateField.d.ts +6 -0
  8. package/dist/src/components/fields/DateTimeField.d.ts +6 -0
  9. package/dist/src/components/fields/NumberField.d.ts +6 -0
  10. package/dist/src/components/fields/ObjectField.d.ts +9 -0
  11. package/dist/src/components/fields/SelectField.d.ts +10 -0
  12. package/dist/src/components/fields/TextAreaField.d.ts +6 -0
  13. package/dist/src/components/fields/TextField.d.ts +6 -0
  14. package/dist/src/components/fields/TimeField.d.ts +6 -0
  15. package/{src/index.ts → dist/src/index.d.ts} +2 -3
  16. package/dist/src/stories/AutoForm.stories.d.ts +9 -0
  17. package/dist/src/stories/Fields.stories.d.ts +12 -0
  18. package/dist/src/theme.d.ts +141 -0
  19. package/dist/src/types/custom-render.d.ts +11 -0
  20. package/dist/src/types/field.d.ts +30 -0
  21. package/dist/src/types/form.d.ts +7 -0
  22. package/{test-utils/index.ts → dist/test-utils/index.d.ts} +1 -2
  23. package/dist/test-utils/render.d.ts +1 -0
  24. package/package.json +9 -3
  25. package/.github/workflows/npm_test.yml +0 -27
  26. package/.nvmrc +0 -1
  27. package/.prettierrc.mjs +0 -35
  28. package/.storybook/main.ts +0 -17
  29. package/.storybook/preview.tsx +0 -18
  30. package/.storybook/vitest.setup.ts +0 -9
  31. package/.stylelintignore +0 -1
  32. package/.stylelintrc.json +0 -28
  33. package/.yarn/releases/yarn-4.9.1.cjs +0 -948
  34. package/.yarnrc.yml +0 -3
  35. package/eslint.config.js +0 -11
  36. package/index.html +0 -16
  37. package/postcss.config.cjs +0 -14
  38. package/src/favicon.svg +0 -1
  39. package/src/stories/AutoForm.stories.tsx +0 -473
  40. package/src/stories/Fields.stories.tsx +0 -190
  41. package/src/theme.ts +0 -5
  42. package/src/vite-env.d.ts +0 -1
  43. package/storybook-static/assets/AutoForm-CEr4m2za.js +0 -53
  44. package/storybook-static/assets/AutoForm.stories-CtOmRKOV.js +0 -164
  45. package/storybook-static/assets/Color-YHDXOIA2-pc5-Ao7n.js +0 -1
  46. package/storybook-static/assets/DocsRenderer-CFRXHY34-D-_1VvMG.js +0 -575
  47. package/storybook-static/assets/Fields.stories-CoRkpMbJ.js +0 -29
  48. package/storybook-static/assets/chunk-XP5HYGXS-BpfKkqn7.js +0 -1
  49. package/storybook-static/assets/entry-preview-CkHoqRUh.js +0 -2
  50. package/storybook-static/assets/entry-preview-docs-hFR7sEJd.js +0 -46
  51. package/storybook-static/assets/get-contrast-color-Db6nT3bs.js +0 -1
  52. package/storybook-static/assets/iframe-CzpwBD2i.js +0 -211
  53. package/storybook-static/assets/index-B8rYRX2K.js +0 -1
  54. package/storybook-static/assets/index-BQQLSK9g.js +0 -1
  55. package/storybook-static/assets/index-CXQShRbs.js +0 -8
  56. package/storybook-static/assets/index-D4lIrffr.js +0 -9
  57. package/storybook-static/assets/index-Domkg0jQ.js +0 -240
  58. package/storybook-static/assets/index-DrFu-skq.js +0 -6
  59. package/storybook-static/assets/index-DsJinFGm.js +0 -9
  60. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +0 -9
  61. package/storybook-static/assets/preview-B8lJiyuQ.js +0 -34
  62. package/storybook-static/assets/preview-BBWR9nbA.js +0 -1
  63. package/storybook-static/assets/preview-BOfrPh1e.js +0 -2
  64. package/storybook-static/assets/preview-BWzBA1C2.js +0 -396
  65. package/storybook-static/assets/preview-C2Qr78FS.js +0 -4
  66. package/storybook-static/assets/preview-CvbIS5ZJ.js +0 -1
  67. package/storybook-static/assets/preview-DD_OYowb.js +0 -1
  68. package/storybook-static/assets/preview-DGUiP6tS.js +0 -7
  69. package/storybook-static/assets/preview-DioFdWiE.css +0 -1
  70. package/storybook-static/assets/preview-Dyg8NwXV.js +0 -1
  71. package/storybook-static/assets/react-18-Dhjvimrl.js +0 -25
  72. package/storybook-static/assets/test-utils--_O2wM1y.js +0 -9
  73. package/storybook-static/favicon.svg +0 -1
  74. package/storybook-static/iframe.html +0 -666
  75. package/storybook-static/index.html +0 -181
  76. package/storybook-static/index.json +0 -1
  77. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  78. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  79. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  80. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  81. package/storybook-static/project.json +0 -1
  82. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -331
  83. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -51
  84. package/storybook-static/sb-addons/docs-11/manager-bundle.js +0 -242
  85. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  86. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  87. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -402
  88. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  89. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  90. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  91. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  92. package/storybook-static/sb-addons/onboarding-8/manager-bundle.js +0 -127
  93. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  94. package/storybook-static/sb-addons/storybook-experimental-addon-test-10/manager-bundle.js +0 -223
  95. package/storybook-static/sb-common-assets/favicon.svg +0 -1
  96. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  97. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  98. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  99. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  100. package/storybook-static/sb-manager/globals-module-info.js +0 -1051
  101. package/storybook-static/sb-manager/globals-runtime.js +0 -41591
  102. package/storybook-static/sb-manager/globals.js +0 -48
  103. package/storybook-static/sb-manager/runtime.js +0 -12048
  104. package/test-utils/render.tsx +0 -11
  105. package/text +0 -64
  106. package/tsconfig.json +0 -25
  107. package/vite.config.mjs +0 -19
  108. package/vitest.setup.mjs +0 -29
  109. package/vitest.shims.d.ts +0 -1
  110. package/vitest.workspace.js +0 -30
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { FormValidateInput } from '@mantine/form';
3
+ import { FieldRenderCustomRender } from '../types/custom-render';
4
+ import { FieldSchema } from '../types/field';
5
+ export interface AutoFormProps {
6
+ values?: Record<string, any>;
7
+ schema: FieldSchema[];
8
+ onSubmit: (values: Record<string, any>) => void;
9
+ container: (Form: React.ReactNode, onSubmit: VoidFunction, readOnly?: true) => React.ReactNode;
10
+ fieldContainer?: (field: React.ReactNode, fieldSchema: FieldSchema) => React.ReactNode;
11
+ customRender?: FieldRenderCustomRender;
12
+ validate?: FormValidateInput<Record<string, any>>;
13
+ readOnly?: true;
14
+ onFieldChange?: (name: string, value: any, values: Record<string, any>) => Record<string, any>;
15
+ }
16
+ export declare const validateRequiredFields: (schema: FieldSchema[], values: Record<string, any>, parentPath?: string) => Record<string, string>;
17
+ declare const AutoForm: React.FC<AutoFormProps>;
18
+ export default AutoForm;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { FieldRenderCustomRender } from '../types/custom-render';
3
+ import { ArrayFieldOptions, FieldSchema } from '../types/field';
4
+ interface FieldRenderProps {
5
+ field: FieldSchema;
6
+ value: any;
7
+ error?: React.ReactNode | Record<string, React.ReactNode>;
8
+ onChange: (name: string, value: any) => void;
9
+ formValues: Record<string, any>;
10
+ fieldContainer?: (field: React.ReactNode, fieldSchema: FieldSchema) => React.ReactNode;
11
+ customRender?: FieldRenderCustomRender;
12
+ readOnly?: true;
13
+ }
14
+ export declare function getArrayOptions(name: string, onChange: (name: string, value: any) => void, value: Record<string, any>[]): ArrayFieldOptions;
15
+ declare const FieldRender: React.FC<FieldRenderProps>;
16
+ export default FieldRender;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps, FieldSchema } from '../../types/field';
3
+ interface ArrayFieldProps extends BaseFieldProps<Record<string, any>[]> {
4
+ fields: FieldSchema[];
5
+ options: {
6
+ addElement: (val: Record<string, any>) => void;
7
+ replaceElement: (index: number, val: Record<string, any>) => void;
8
+ removeElement: (index: number) => void;
9
+ };
10
+ error?: Record<string, React.ReactNode>;
11
+ }
12
+ declare const ArrayField: React.FC<ArrayFieldProps>;
13
+ export default ArrayField;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface CheckFieldProps extends BaseFieldProps<boolean> {
4
+ label: string;
5
+ }
6
+ declare const CheckField: React.FC<CheckFieldProps>;
7
+ export default CheckField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface DateFieldProps extends BaseFieldProps<Date> {
4
+ }
5
+ declare const DateField: React.FC<DateFieldProps>;
6
+ export default DateField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface DateTimeFieldProps extends BaseFieldProps<Date> {
4
+ }
5
+ declare const DateTimeField: React.FC<DateTimeFieldProps>;
6
+ export default DateTimeField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface NumberFieldProps extends BaseFieldProps<number> {
4
+ }
5
+ declare const NumberField: React.FC<NumberFieldProps>;
6
+ export default NumberField;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps, FieldSchema } from '../../types/field';
3
+ interface ObjectFieldProps extends BaseFieldProps<Record<string, any>> {
4
+ fields: FieldSchema[];
5
+ formValues: Record<string, any>;
6
+ error?: Record<string, React.ReactNode>;
7
+ }
8
+ declare const ObjectField: React.FC<ObjectFieldProps>;
9
+ export default ObjectField;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface SelectFieldProps extends BaseFieldProps<string> {
4
+ data: {
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ }
9
+ declare const SelectField: React.FC<SelectFieldProps>;
10
+ export default SelectField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface TextAreaFieldProps extends BaseFieldProps<string> {
4
+ }
5
+ declare const TextAreaField: React.FC<TextAreaFieldProps>;
6
+ export default TextAreaField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface TextFieldProps extends BaseFieldProps<string> {
4
+ }
5
+ declare const TextField: React.FC<TextFieldProps>;
6
+ export default TextField;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { BaseFieldProps } from '../../types/field';
3
+ interface TimeFieldProps extends BaseFieldProps<string> {
4
+ }
5
+ declare const TimeField: React.FC<TimeFieldProps>;
6
+ export default TimeField;
@@ -1,3 +1,2 @@
1
- // src/index.ts
2
- export { default as AutoForm } from './components/AutoForm';
3
- export type { AutoFormProps } from './components/AutoForm';
1
+ export { default as AutoForm } from './components/AutoForm';
2
+ export type { AutoFormProps } from './components/AutoForm';
@@ -0,0 +1,9 @@
1
+ import { default as AutoForm } from '../components/AutoForm';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof AutoForm>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AutoForm>;
6
+ export declare const Standard: Story;
7
+ export declare const ReadOnly: Story;
8
+ export declare const FormValidation: Story;
9
+ export declare const CustomizedForm: Story;
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as AutoForm } from '../components/AutoForm';
3
+ declare const meta: Meta<typeof AutoForm>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AutoForm>;
6
+ export declare const TextField: Story;
7
+ export declare const NumberField: Story;
8
+ export declare const SelectField: Story;
9
+ export declare const CheckField: Story;
10
+ export declare const DateField: Story;
11
+ export declare const ArrayField: Story;
12
+ export declare const ObjectField: Story;
@@ -0,0 +1,141 @@
1
+ export declare const theme: {
2
+ focusRing?: "auto" | "always" | "never" | undefined;
3
+ scale?: number | undefined;
4
+ fontSmoothing?: boolean | undefined;
5
+ white?: string | undefined;
6
+ black?: string | undefined;
7
+ colors?: {
8
+ [x: string & {}]: import('@mantine/core').MantineColorsTuple | undefined;
9
+ red?: import('@mantine/core').MantineColorsTuple | undefined;
10
+ dark?: import('@mantine/core').MantineColorsTuple | undefined;
11
+ gray?: import('@mantine/core').MantineColorsTuple | undefined;
12
+ pink?: import('@mantine/core').MantineColorsTuple | undefined;
13
+ grape?: import('@mantine/core').MantineColorsTuple | undefined;
14
+ violet?: import('@mantine/core').MantineColorsTuple | undefined;
15
+ indigo?: import('@mantine/core').MantineColorsTuple | undefined;
16
+ blue?: import('@mantine/core').MantineColorsTuple | undefined;
17
+ cyan?: import('@mantine/core').MantineColorsTuple | undefined;
18
+ green?: import('@mantine/core').MantineColorsTuple | undefined;
19
+ lime?: import('@mantine/core').MantineColorsTuple | undefined;
20
+ yellow?: import('@mantine/core').MantineColorsTuple | undefined;
21
+ orange?: import('@mantine/core').MantineColorsTuple | undefined;
22
+ teal?: import('@mantine/core').MantineColorsTuple | undefined;
23
+ } | undefined;
24
+ primaryShade?: import('@mantine/core').MantineColorShade | {
25
+ light?: import('@mantine/core').MantineColorShade | undefined;
26
+ dark?: import('@mantine/core').MantineColorShade | undefined;
27
+ } | undefined;
28
+ primaryColor?: string | undefined;
29
+ variantColorResolver?: import('@mantine/core').VariantColorsResolver | undefined;
30
+ autoContrast?: boolean | undefined;
31
+ luminanceThreshold?: number | undefined;
32
+ fontFamily?: string | undefined;
33
+ fontFamilyMonospace?: string | undefined;
34
+ headings?: {
35
+ fontFamily?: string | undefined;
36
+ fontWeight?: string | undefined;
37
+ textWrap?: "wrap" | "nowrap" | "balance" | "pretty" | "stable" | undefined;
38
+ sizes?: {
39
+ h1?: {
40
+ fontSize?: string | undefined;
41
+ fontWeight?: string | undefined;
42
+ lineHeight?: string | undefined;
43
+ } | undefined;
44
+ h2?: {
45
+ fontSize?: string | undefined;
46
+ fontWeight?: string | undefined;
47
+ lineHeight?: string | undefined;
48
+ } | undefined;
49
+ h3?: {
50
+ fontSize?: string | undefined;
51
+ fontWeight?: string | undefined;
52
+ lineHeight?: string | undefined;
53
+ } | undefined;
54
+ h4?: {
55
+ fontSize?: string | undefined;
56
+ fontWeight?: string | undefined;
57
+ lineHeight?: string | undefined;
58
+ } | undefined;
59
+ h5?: {
60
+ fontSize?: string | undefined;
61
+ fontWeight?: string | undefined;
62
+ lineHeight?: string | undefined;
63
+ } | undefined;
64
+ h6?: {
65
+ fontSize?: string | undefined;
66
+ fontWeight?: string | undefined;
67
+ lineHeight?: string | undefined;
68
+ } | undefined;
69
+ } | undefined;
70
+ } | undefined;
71
+ radius?: {
72
+ [x: string & {}]: string | undefined;
73
+ xs?: string | undefined;
74
+ sm?: string | undefined;
75
+ md?: string | undefined;
76
+ lg?: string | undefined;
77
+ xl?: string | undefined;
78
+ } | undefined;
79
+ defaultRadius?: import('@mantine/core').MantineRadius | undefined;
80
+ spacing?: {
81
+ [x: number]: string | undefined;
82
+ [x: string & {}]: string | undefined;
83
+ xs?: string | undefined;
84
+ sm?: string | undefined;
85
+ md?: string | undefined;
86
+ lg?: string | undefined;
87
+ xl?: string | undefined;
88
+ } | undefined;
89
+ fontSizes?: {
90
+ [x: string & {}]: string | undefined;
91
+ xs?: string | undefined;
92
+ sm?: string | undefined;
93
+ md?: string | undefined;
94
+ lg?: string | undefined;
95
+ xl?: string | undefined;
96
+ } | undefined;
97
+ lineHeights?: {
98
+ [x: string & {}]: string | undefined;
99
+ xs?: string | undefined;
100
+ sm?: string | undefined;
101
+ md?: string | undefined;
102
+ lg?: string | undefined;
103
+ xl?: string | undefined;
104
+ } | undefined;
105
+ breakpoints?: {
106
+ [x: string & {}]: string | undefined;
107
+ xs?: string | undefined;
108
+ sm?: string | undefined;
109
+ md?: string | undefined;
110
+ lg?: string | undefined;
111
+ xl?: string | undefined;
112
+ } | undefined;
113
+ shadows?: {
114
+ [x: string & {}]: string | undefined;
115
+ xs?: string | undefined;
116
+ sm?: string | undefined;
117
+ md?: string | undefined;
118
+ lg?: string | undefined;
119
+ xl?: string | undefined;
120
+ } | undefined;
121
+ respectReducedMotion?: boolean | undefined;
122
+ cursorType?: "default" | "pointer" | undefined;
123
+ defaultGradient?: {
124
+ from?: string | undefined;
125
+ to?: string | undefined;
126
+ deg?: number | undefined;
127
+ } | undefined;
128
+ activeClassName?: string | undefined;
129
+ focusClassName?: string | undefined;
130
+ components?: {
131
+ [x: string]: {
132
+ classNames?: any;
133
+ styles?: any;
134
+ vars?: any;
135
+ defaultProps?: any;
136
+ } | undefined;
137
+ } | undefined;
138
+ other?: {
139
+ [x: string]: any;
140
+ } | undefined;
141
+ };
@@ -0,0 +1,11 @@
1
+ import { ArrayFieldOptions, FieldSchema } from './field';
2
+ export type FieldRenderCustomRender = (field: FieldSchema, value: any, error: React.ReactNode | Record<string, React.ReactNode>, onChange: (name: string, value: any) => void, formValues: Record<string, any>, options?: ArrayFieldOptions, readOnly?: true) => React.ReactNode;
3
+ export interface CustomFieldRender {
4
+ field: FieldSchema;
5
+ value: any;
6
+ error: React.ReactNode | Record<string, React.ReactNode>;
7
+ onChange: (name: string, value: any) => void;
8
+ formValues: Record<string, any>;
9
+ options?: ArrayFieldOptions;
10
+ readOnly?: true;
11
+ }
@@ -0,0 +1,30 @@
1
+ export type FieldType = 'text' | 'number' | 'object' | 'array' | 'check' | 'select' | 'textarea' | 'date' | 'datetime' | 'time';
2
+ export interface FieldSchema {
3
+ name: string;
4
+ type: FieldType;
5
+ label: string;
6
+ description?: string;
7
+ placeholder?: string;
8
+ extra?: Record<string, any>;
9
+ disabled?: (values: Record<string, any>) => boolean | boolean;
10
+ visible?: (values: Record<string, any>) => boolean | boolean;
11
+ initialValue?: any;
12
+ required?: true;
13
+ readOnly?: true;
14
+ fields?: FieldSchema[];
15
+ data?: {
16
+ label: string;
17
+ value: string;
18
+ }[];
19
+ }
20
+ export interface BaseFieldProps<T> {
21
+ name: string;
22
+ value: T;
23
+ onChange: (name: string, value: T | null) => void;
24
+ readOnly?: true;
25
+ }
26
+ export type ArrayFieldOptions = {
27
+ addElement: (value: Record<string, any>) => void;
28
+ replaceElement: (index: number, val: Record<string, any>) => void;
29
+ removeElement: (index: number) => void;
30
+ };
@@ -0,0 +1,7 @@
1
+ import { FieldSchema } from './field';
2
+ export interface FormSchema {
3
+ fields: FieldSchema[];
4
+ onSubmit?: (values: Record<string, any>) => void;
5
+ formData?: Record<string, any>;
6
+ initialValues?: Record<string, any>;
7
+ }
@@ -1,5 +1,4 @@
1
- import userEvent from '@testing-library/user-event';
2
-
1
+ import { default as userEvent } from '@testing-library/user-event';
3
2
  export * from '@testing-library/react';
4
3
  export { render } from './render';
5
4
  export { userEvent };
@@ -0,0 +1 @@
1
+ export declare function render(ui: React.ReactNode): import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autoforma",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "homepage": "http://sajinael98.github.io/AutoForma",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -83,5 +83,11 @@
83
83
  "extends": [
84
84
  "plugin:storybook/recommended"
85
85
  ]
86
- }
87
- }
86
+ },
87
+ "files": [
88
+ "dist",
89
+ "src/components",
90
+ "src/types",
91
+ "README.md"
92
+ ]
93
+ }
@@ -1,27 +0,0 @@
1
- name: npm test
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - '**'
7
-
8
- concurrency:
9
- group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
10
- cancel-in-progress: true
11
-
12
- jobs:
13
- test_pull_request:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v3
17
- - uses: actions/setup-node@v3
18
- with:
19
- node-version-file: '.nvmrc'
20
- cache: 'yarn'
21
- cache-dependency-path: '**/yarn.lock'
22
- - name: Install dependencies
23
- run: yarn
24
- - name: Run build
25
- run: npm run build
26
- - name: Run tests
27
- run: npm test
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v22.11.0
package/.prettierrc.mjs DELETED
@@ -1,35 +0,0 @@
1
- /** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
2
- const config = {
3
- printWidth: 100,
4
- singleQuote: true,
5
- trailingComma: 'es5',
6
- plugins: ['@ianvs/prettier-plugin-sort-imports'],
7
- importOrder: [
8
- '.*styles.css$',
9
- '',
10
- 'dayjs',
11
- '^react$',
12
- '^next$',
13
- '^next/.*$',
14
- '<BUILTIN_MODULES>',
15
- '<THIRD_PARTY_MODULES>',
16
- '^@mantine/(.*)$',
17
- '^@mantinex/(.*)$',
18
- '^@mantine-tests/(.*)$',
19
- '^@docs/(.*)$',
20
- '^@/.*$',
21
- '^../(?!.*.css$).*$',
22
- '^./(?!.*.css$).*$',
23
- '\\.css$',
24
- ],
25
- overrides: [
26
- {
27
- files: '*.mdx',
28
- options: {
29
- printWidth: 70,
30
- },
31
- },
32
- ],
33
- };
34
-
35
- export default config;
@@ -1,17 +0,0 @@
1
- import type { StorybookConfig } from '@storybook/react-vite';
2
-
3
- const config: StorybookConfig = {
4
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5
- addons: [
6
- '@storybook/addon-essentials',
7
- '@storybook/addon-onboarding',
8
- '@chromatic-com/storybook',
9
- '@storybook/experimental-addon-test',
10
- '@storybook/addon-docs',
11
- ],
12
- framework: {
13
- name: '@storybook/react-vite',
14
- options: {},
15
- },
16
- };
17
- export default config;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { Preview } from '@storybook/react';
3
- import { MantineProvider } from '@mantine/core';
4
-
5
- import '@mantine/core/styles.css';
6
- import '@mantine/dates/styles.css';
7
-
8
- const preview: Preview = {
9
- decorators: [
10
- (Story) => (
11
- <MantineProvider>
12
- <Story />
13
- </MantineProvider>
14
- ),
15
- ],
16
- };
17
-
18
- export default preview;
@@ -1,9 +0,0 @@
1
- import { beforeAll } from 'vitest';
2
- import { setProjectAnnotations } from '@storybook/react';
3
- import * as projectAnnotations from './preview';
4
-
5
- // This is an important step to apply the right configuration when testing your stories.
6
- // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
7
- const project = setProjectAnnotations([projectAnnotations]);
8
-
9
- beforeAll(project.beforeAll);
package/.stylelintignore DELETED
@@ -1 +0,0 @@
1
- dist
package/.stylelintrc.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "extends": ["stylelint-config-standard-scss"],
3
- "rules": {
4
- "custom-property-pattern": null,
5
- "selector-class-pattern": null,
6
- "scss/no-duplicate-mixins": null,
7
- "declaration-empty-line-before": null,
8
- "declaration-block-no-redundant-longhand-properties": null,
9
- "alpha-value-notation": null,
10
- "custom-property-empty-line-before": null,
11
- "property-no-vendor-prefix": null,
12
- "color-function-notation": null,
13
- "length-zero-no-unit": null,
14
- "selector-not-notation": null,
15
- "no-descending-specificity": null,
16
- "comment-empty-line-before": null,
17
- "scss/at-mixin-pattern": null,
18
- "scss/at-rule-no-unknown": null,
19
- "value-keyword-case": null,
20
- "media-feature-range-notation": null,
21
- "selector-pseudo-class-no-unknown": [
22
- true,
23
- {
24
- "ignorePseudoClasses": ["global"]
25
- }
26
- ]
27
- }
28
- }