@twintag/twintag-form 1.0.1 → 1.1.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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +18 -0
- package/README.md +61 -3
- package/dev/index.css +2 -0
- package/dev/main.tsx +50 -27
- package/dist/common/accordion.d.ts +7 -0
- package/dist/common/button.d.ts +28 -0
- package/dist/common/calendar.d.ts +9 -0
- package/dist/common/form.d.ts +1 -1
- package/dist/common/icon.d.ts +7 -0
- package/dist/common/popover.d.ts +6 -0
- package/dist/common/scroll-area.d.ts +5 -0
- package/dist/common/select.d.ts +13 -0
- package/dist/components/config.d.ts +4 -0
- package/dist/components/containers/accordion.d.ts +8 -0
- package/dist/components/fields/date-picker.d.ts +3 -0
- package/dist/components/{Input/simple.d.ts → fields/input.d.ts} +1 -1
- package/dist/components/form.d.ts +3 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/twintag-form.react.js +19844 -6458
- package/dist/twintag-form.webcomponent.js +314 -299
- package/dist/types/index.d.ts +6 -5
- package/dist/utils/data.d.ts +2 -0
- package/dist/utils/string.d.ts +3 -0
- package/dist/utils/style.d.ts +2 -0
- package/index.html +3 -1
- package/lib/common/accordion.tsx +77 -0
- package/lib/common/button.tsx +3 -0
- package/lib/common/calendar.tsx +110 -0
- package/lib/common/form.tsx +14 -1
- package/lib/common/icon.tsx +35 -0
- package/lib/common/input.tsx +2 -1
- package/lib/common/popover.tsx +30 -0
- package/lib/common/scroll-area.tsx +46 -0
- package/lib/common/select.tsx +159 -0
- package/lib/common/textarea.tsx +1 -1
- package/lib/components/Render/index.tsx +4 -2
- package/lib/components/config.tsx +44 -0
- package/lib/components/containers/accordion.tsx +105 -0
- package/lib/components/containers/category.tsx +48 -0
- package/lib/components/fields/date-picker.tsx +117 -0
- package/lib/components/{Input → fields}/file.tsx +1 -1
- package/lib/components/{Input/simple.tsx → fields/input.tsx} +5 -5
- package/lib/components/{Input → fields}/textarea.tsx +2 -2
- package/lib/components/form.tsx +19 -3
- package/lib/components/index.tsx +0 -3
- package/lib/index.tsx +7 -8
- package/lib/types/index.ts +13 -11
- package/lib/utils/data.ts +18 -0
- package/lib/utils/string.ts +12 -0
- package/lib/utils/style.ts +8 -0
- package/package.json +13 -5
- package/tailwind.config.ts +19 -1
- package/.turbo/turbo-lint.log +0 -4
- package/dist/components/Input/index.d.ts +0 -8
- package/lib/components/Input/index.tsx +0 -32
- package/lib/components/category.tsx +0 -31
- /package/dist/components/{category.d.ts → containers/category.d.ts} +0 -0
- /package/dist/components/{Input → fields}/checkbox.d.ts +0 -0
- /package/dist/components/{Input → fields}/file.d.ts +0 -0
- /package/dist/components/{Input → fields}/radiogroup.d.ts +0 -0
- /package/dist/components/{Input → fields}/submit.d.ts +0 -0
- /package/dist/components/{Input → fields}/textarea.d.ts +0 -0
- /package/dist/components/{Input → fields}/toggle.d.ts +0 -0
- /package/lib/components/{Input → fields}/checkbox.tsx +0 -0
- /package/lib/components/{Input → fields}/radiogroup.tsx +0 -0
- /package/lib/components/{Input → fields}/submit.tsx +0 -0
- /package/lib/components/{Input → fields}/toggle.tsx +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { WithChildren } from 'twintag-types/dom';
|
|
3
|
-
|
|
4
|
-
import { tv } from 'tailwind-variants';
|
|
5
|
-
|
|
6
|
-
const categoryStyle = tv({
|
|
7
|
-
slots: {
|
|
8
|
-
container: 'w-full space-y-4',
|
|
9
|
-
heading: 'font-tf-font text-sm text-category',
|
|
10
|
-
items: 'grid gap-4',
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
type Props = {
|
|
15
|
-
label?: string;
|
|
16
|
-
} & WithChildren;
|
|
17
|
-
|
|
18
|
-
const Category: FC<Props> = ({ label, children }) => {
|
|
19
|
-
const { container, heading, items } = categoryStyle();
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<section className={container()}>
|
|
23
|
-
{label ? <h3 className={heading()}>{label}</h3> : <></>}
|
|
24
|
-
|
|
25
|
-
<div className={items()}>{children}</div>
|
|
26
|
-
</section>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
Category.displayName = 'Category';
|
|
30
|
-
|
|
31
|
-
export { Category };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|