torch-glare 2.4.1 → 2.4.3
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/apps/lib/components/Button.tsx +1 -1
- package/apps/lib/components/Card.tsx +47 -20
- package/apps/lib/components/ColorPicker.tsx +441 -0
- package/apps/lib/components/ConclusionHeader.tsx +148 -0
- package/apps/lib/components/DatePicker.tsx +2 -0
- package/apps/lib/components/Drawer.tsx +66 -24
- package/apps/lib/components/FormBuilder/context.ts +68 -0
- package/apps/lib/components/FormBuilder/fields/ChoiceFields.tsx +60 -0
- package/apps/lib/components/FormBuilder/fields/ColorField.tsx +59 -0
- package/apps/lib/components/FormBuilder/fields/CustomField.tsx +11 -0
- package/apps/lib/components/FormBuilder/fields/DateField.tsx +32 -0
- package/apps/lib/components/FormBuilder/fields/FieldArray.tsx +74 -0
- package/apps/lib/components/FormBuilder/fields/FieldShell.tsx +148 -0
- package/apps/lib/components/FormBuilder/fields/FileField.tsx +39 -0
- package/apps/lib/components/FormBuilder/fields/OptionListFields.tsx +132 -0
- package/apps/lib/components/FormBuilder/fields/OtpField.tsx +31 -0
- package/apps/lib/components/FormBuilder/fields/PhoneField.tsx +83 -0
- package/apps/lib/components/FormBuilder/fields/RichTextEditorField.tsx +31 -0
- package/apps/lib/components/FormBuilder/fields/SelectField.tsx +91 -0
- package/apps/lib/components/FormBuilder/fields/SignatureField.tsx +157 -0
- package/apps/lib/components/FormBuilder/fields/SliderField.tsx +67 -0
- package/apps/lib/components/FormBuilder/fields/SwitchBoxField.tsx +41 -0
- package/apps/lib/components/FormBuilder/fields/TableField.tsx +308 -0
- package/apps/lib/components/FormBuilder/fields/TextField.tsx +213 -0
- package/apps/lib/components/FormBuilder/fields/TreeSelectField.tsx +43 -0
- package/apps/lib/components/FormBuilder/fields/countries.ts +303 -0
- package/apps/lib/components/FormBuilder/fields/index.ts +25 -0
- package/apps/lib/components/FormBuilder/form-builder.tsx +279 -0
- package/apps/lib/components/FormBuilder/header.tsx +101 -0
- package/apps/lib/components/FormBuilder/index.ts +33 -0
- package/apps/lib/components/FormBuilder/numberFormat.ts +16 -0
- package/apps/lib/components/FormBuilder/stepper.tsx +290 -0
- package/apps/lib/components/FormBuilder/submit.tsx +38 -0
- package/apps/lib/components/FormBuilder/types.ts +261 -0
- package/apps/lib/components/FormRenderer/FormDrawer.tsx +128 -0
- package/apps/lib/components/FormRenderer/form-renderer.tsx +111 -0
- package/apps/lib/components/FormRenderer/index.ts +4 -0
- package/apps/lib/components/FormRenderer/types.ts +77 -0
- package/apps/lib/components/FormSummary.tsx +282 -0
- package/apps/lib/components/ImageAttachment.tsx +36 -61
- package/apps/lib/components/Label.tsx +49 -42
- package/apps/lib/components/Popover.tsx +6 -2
- package/apps/lib/components/RadioCard.tsx +2 -0
- package/apps/lib/components/SearchableSelect.tsx +16 -5
- package/apps/lib/components/SectionBlock.tsx +16 -8
- package/apps/lib/components/Select.tsx +41 -120
- package/apps/lib/components/TextEditor/RichTextField.tsx +46 -0
- package/apps/lib/components/{TextEditor.tsx → TextEditor/TextEditor.tsx} +63 -9
- package/apps/lib/components/TextEditor/TextEditorToolbar.tsx +429 -0
- package/apps/lib/components/TextEditor/editor-tools/AlignmentTune.ts +70 -0
- package/apps/lib/components/TextEditor/editor-tools/ColorInlineTool.ts +50 -0
- package/apps/lib/components/TextEditor/editor-tools/StrikethroughInlineTool.ts +48 -0
- package/apps/lib/components/TextEditor/editor-tools/inlineFormat.ts +98 -0
- package/apps/lib/{types → components/TextEditor}/editorjs.d.ts +19 -0
- package/apps/lib/components/TextEditor/index.ts +7 -0
- package/apps/lib/components/Textarea.tsx +1 -1
- package/apps/lib/layouts/FieldSection.tsx +25 -22
- package/apps/lib/registry.json +51 -58
- package/apps/lib/tsconfig.tsbuildinfo +1 -0
- package/apps/lib/utils/color.ts +175 -0
- package/dist/src/shared/tailwindInit.d.ts.map +1 -1
- package/dist/src/shared/tailwindInit.js +3 -0
- package/dist/src/shared/tailwindInit.js.map +1 -1
- package/docs/components/card.md +4 -2
- package/docs/components/chart-block-tool.md +5 -4
- package/docs/components/color-picker.md +101 -0
- package/docs/components/conclusion-header.md +80 -0
- package/docs/components/drawer.md +153 -102
- package/docs/components/form-builder.md +260 -0
- package/docs/components/form-renderer.md +234 -0
- package/docs/components/form-summary.md +123 -0
- package/docs/components/image-attachment.md +10 -4
- package/docs/components/searchable-select.md +50 -46
- package/docs/components/table-dnd-wrapper.md +5 -3
- package/docs/components/text-editor.md +18 -0
- package/docs/how-to/form-and-list-recipes.md +26 -19
- package/docs/how-to/forms-with-form-builder.md +411 -0
- package/docs/how-to/guides.md +153 -179
- package/docs/reference/tailwind-plugins.md +11 -1
- package/docs/tutorials/building-first-form.md +150 -159
- package/docs/tutorials/getting-started.md +9 -0
- package/package.json +1 -1
- /package/apps/lib/components/{ChartBlockTool.ts → TextEditor/ChartBlockTool.ts} +0 -0
- /package/apps/lib/components/{TableDnDWrapper.ts → TextEditor/TableDnDWrapper.ts} +0 -0
- /package/apps/lib/{utils → components/TextEditor}/markdownParser.ts +0 -0
|
@@ -39,3 +39,22 @@ declare module "@editorjs/text-variant-tune" {
|
|
|
39
39
|
const TextVariantTune: BlockTuneConstructable;
|
|
40
40
|
export default TextVariantTune;
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
declare module "editorjs-undo" {
|
|
44
|
+
import EditorJS from "@editorjs/editorjs";
|
|
45
|
+
interface UndoConfig {
|
|
46
|
+
editor: EditorJS;
|
|
47
|
+
config?: { debounceTimer?: number; shortcuts?: { undo?: string; redo?: string } };
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
onUpdate?: () => void;
|
|
50
|
+
}
|
|
51
|
+
export default class Undo {
|
|
52
|
+
constructor(options: UndoConfig);
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
+
initialize(data: any): void;
|
|
55
|
+
undo(): void;
|
|
56
|
+
redo(): void;
|
|
57
|
+
clear(): void;
|
|
58
|
+
setReadOnly(readOnly: boolean): void;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { TextEditor } from "./TextEditor";
|
|
2
|
+
export type { TextEditorRef, TextEditorProps, OutputData } from "./TextEditor";
|
|
3
|
+
export { RichTextField } from "./RichTextField";
|
|
4
|
+
export type { RichTextFieldProps } from "./RichTextField";
|
|
5
|
+
export { default as ChartBlockTool, type ChartBlockData } from "./ChartBlockTool";
|
|
6
|
+
export { default as createTableDnDClass } from "./TableDnDWrapper";
|
|
7
|
+
export { TextEditorToolbar } from "./TextEditorToolbar";
|
|
@@ -31,32 +31,35 @@ export function FieldSection({
|
|
|
31
31
|
<section
|
|
32
32
|
{...props}
|
|
33
33
|
data-theme={theme}
|
|
34
|
-
className={cn(
|
|
35
|
-
"grid py-[16px] px-[12px] w-full max-w-[1200px] min-w-[0px] ",
|
|
36
|
-
direction === "vertical" && "grid-rows-[auto_1fr] gap-[12px]",
|
|
37
|
-
direction === "horizontal" && "grid-cols-[350px_1fr] gap-[24px]",
|
|
38
|
-
direction === "flexible" &&
|
|
39
|
-
"grid-rows-[auto_1fr] gap-[12px] lg:grid-cols-[350px_1fr] lg:grid-rows-[1fr] lg:gap-[24px]",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
34
|
+
className={cn("w-full max-w-[1200px] min-w-[0px] @container", className)}
|
|
42
35
|
>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
labelDirections={"horizontal"}
|
|
51
|
-
/>
|
|
36
|
+
<div
|
|
37
|
+
className={cn(
|
|
38
|
+
"grid py-[16px] px-[12px] w-full min-w-[0px]",
|
|
39
|
+
direction === "vertical" && "grid-rows-[auto_1fr] gap-[12px]",
|
|
40
|
+
direction === "horizontal" && "grid-cols-[350px_1fr] gap-[24px]",
|
|
41
|
+
direction === "flexible" &&
|
|
42
|
+
"grid-rows-[auto_1fr] gap-[12px] @md:grid-cols-[350px_1fr] @md:grid-rows-[1fr] @md:gap-[24px]",
|
|
52
43
|
)}
|
|
44
|
+
>
|
|
45
|
+
{/* Fixed width section for labels */}
|
|
46
|
+
<div className="flex flex-col gap-[12px]">
|
|
47
|
+
{label && (
|
|
48
|
+
<Label
|
|
49
|
+
size={size}
|
|
50
|
+
label={label}
|
|
51
|
+
requiredLabel={requiredLabel}
|
|
52
|
+
labelDirections={"horizontal"}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
{secondaryLabel && <Label size={size} secondaryLabel={secondaryLabel} />}
|
|
57
|
+
{childrenUnderLabel}
|
|
58
|
+
</div>
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
{/* Flexible section that takes up the remaining space */}
|
|
61
|
+
<div className="grid grid-cols-1 place-items-end gap-[12px]">{children}</div>
|
|
62
|
+
</div>
|
|
60
63
|
</section>
|
|
61
64
|
);
|
|
62
65
|
}
|
package/apps/lib/registry.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.4.
|
|
2
|
+
"version": "2.4.3",
|
|
3
3
|
"generatedBy": "scripts/bin/generateRegistry",
|
|
4
4
|
"items": [
|
|
5
5
|
{
|
|
@@ -139,21 +139,13 @@
|
|
|
139
139
|
"type": "components",
|
|
140
140
|
"path": "components/Card.tsx",
|
|
141
141
|
"npmDependencies": [
|
|
142
|
-
"@radix-ui/react-slot"
|
|
142
|
+
"@radix-ui/react-slot",
|
|
143
|
+
"class-variance-authority"
|
|
143
144
|
],
|
|
144
145
|
"registryDependencies": [
|
|
145
146
|
"utils/cn"
|
|
146
147
|
]
|
|
147
148
|
},
|
|
148
|
-
{
|
|
149
|
-
"name": "ChartBlockTool",
|
|
150
|
-
"type": "components",
|
|
151
|
-
"path": "components/ChartBlockTool.ts",
|
|
152
|
-
"npmDependencies": [
|
|
153
|
-
"chart.js"
|
|
154
|
-
],
|
|
155
|
-
"registryDependencies": []
|
|
156
|
-
},
|
|
157
149
|
{
|
|
158
150
|
"name": "Checkbox",
|
|
159
151
|
"type": "components",
|
|
@@ -166,6 +158,32 @@
|
|
|
166
158
|
"utils/cn"
|
|
167
159
|
]
|
|
168
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"name": "ColorPicker",
|
|
163
|
+
"type": "components",
|
|
164
|
+
"path": "components/ColorPicker.tsx",
|
|
165
|
+
"npmDependencies": [
|
|
166
|
+
"@radix-ui/react-slider"
|
|
167
|
+
],
|
|
168
|
+
"registryDependencies": [
|
|
169
|
+
"components/Input",
|
|
170
|
+
"components/Popover",
|
|
171
|
+
"utils/cn",
|
|
172
|
+
"utils/color",
|
|
173
|
+
"utils/types"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "ConclusionHeader",
|
|
178
|
+
"type": "components",
|
|
179
|
+
"path": "components/ConclusionHeader.tsx",
|
|
180
|
+
"npmDependencies": [],
|
|
181
|
+
"registryDependencies": [
|
|
182
|
+
"components/Badge",
|
|
183
|
+
"utils/cn",
|
|
184
|
+
"utils/types"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
169
187
|
{
|
|
170
188
|
"name": "ContextMenu",
|
|
171
189
|
"type": "components",
|
|
@@ -251,6 +269,7 @@
|
|
|
251
269
|
"vaul"
|
|
252
270
|
],
|
|
253
271
|
"registryDependencies": [
|
|
272
|
+
"components/Button",
|
|
254
273
|
"utils/cn"
|
|
255
274
|
]
|
|
256
275
|
},
|
|
@@ -307,6 +326,19 @@
|
|
|
307
326
|
"utils/types"
|
|
308
327
|
]
|
|
309
328
|
},
|
|
329
|
+
{
|
|
330
|
+
"name": "FormSummary",
|
|
331
|
+
"type": "components",
|
|
332
|
+
"path": "components/FormSummary.tsx",
|
|
333
|
+
"npmDependencies": [
|
|
334
|
+
"react-hook-form"
|
|
335
|
+
],
|
|
336
|
+
"registryDependencies": [
|
|
337
|
+
"components/ConclusionHeader",
|
|
338
|
+
"components/Input",
|
|
339
|
+
"utils/cn"
|
|
340
|
+
]
|
|
341
|
+
},
|
|
310
342
|
{
|
|
311
343
|
"name": "HeaderBar",
|
|
312
344
|
"type": "components",
|
|
@@ -612,6 +644,7 @@
|
|
|
612
644
|
],
|
|
613
645
|
"registryDependencies": [
|
|
614
646
|
"components/Button",
|
|
647
|
+
"components/DropdownMenu",
|
|
615
648
|
"components/Tooltip",
|
|
616
649
|
"utils/cn",
|
|
617
650
|
"utils/types"
|
|
@@ -713,13 +746,6 @@
|
|
|
713
746
|
"utils/cn"
|
|
714
747
|
]
|
|
715
748
|
},
|
|
716
|
-
{
|
|
717
|
-
"name": "TableDnDWrapper",
|
|
718
|
-
"type": "components",
|
|
719
|
-
"path": "components/TableDnDWrapper.ts",
|
|
720
|
-
"npmDependencies": [],
|
|
721
|
-
"registryDependencies": []
|
|
722
|
-
},
|
|
723
749
|
{
|
|
724
750
|
"name": "TabSwitch",
|
|
725
751
|
"type": "components",
|
|
@@ -744,39 +770,6 @@
|
|
|
744
770
|
"utils/cn"
|
|
745
771
|
]
|
|
746
772
|
},
|
|
747
|
-
{
|
|
748
|
-
"name": "TextEditor",
|
|
749
|
-
"type": "components",
|
|
750
|
-
"path": "components/TextEditor.tsx",
|
|
751
|
-
"npmDependencies": [
|
|
752
|
-
"@editorjs/checklist",
|
|
753
|
-
"@editorjs/code",
|
|
754
|
-
"@editorjs/delimiter",
|
|
755
|
-
"@editorjs/editorjs",
|
|
756
|
-
"@editorjs/embed",
|
|
757
|
-
"@editorjs/header",
|
|
758
|
-
"@editorjs/inline-code",
|
|
759
|
-
"@editorjs/link",
|
|
760
|
-
"@editorjs/list",
|
|
761
|
-
"@editorjs/marker",
|
|
762
|
-
"@editorjs/nested-list",
|
|
763
|
-
"@editorjs/quote",
|
|
764
|
-
"@editorjs/raw",
|
|
765
|
-
"@editorjs/simple-image",
|
|
766
|
-
"@editorjs/table",
|
|
767
|
-
"@editorjs/text-variant-tune",
|
|
768
|
-
"@editorjs/underline",
|
|
769
|
-
"@editorjs/warning",
|
|
770
|
-
"class-variance-authority"
|
|
771
|
-
],
|
|
772
|
-
"registryDependencies": [
|
|
773
|
-
"components/ChartBlockTool",
|
|
774
|
-
"components/TableDnDWrapper",
|
|
775
|
-
"utils/cn",
|
|
776
|
-
"utils/markdownParser",
|
|
777
|
-
"utils/types"
|
|
778
|
-
]
|
|
779
|
-
},
|
|
780
773
|
{
|
|
781
774
|
"name": "Timeline",
|
|
782
775
|
"type": "components",
|
|
@@ -969,6 +962,13 @@
|
|
|
969
962
|
],
|
|
970
963
|
"registryDependencies": []
|
|
971
964
|
},
|
|
965
|
+
{
|
|
966
|
+
"name": "color",
|
|
967
|
+
"type": "utils",
|
|
968
|
+
"path": "utils/color.ts",
|
|
969
|
+
"npmDependencies": [],
|
|
970
|
+
"registryDependencies": []
|
|
971
|
+
},
|
|
972
972
|
{
|
|
973
973
|
"name": "dateFormat",
|
|
974
974
|
"type": "utils",
|
|
@@ -979,13 +979,6 @@
|
|
|
979
979
|
],
|
|
980
980
|
"registryDependencies": []
|
|
981
981
|
},
|
|
982
|
-
{
|
|
983
|
-
"name": "markdownParser",
|
|
984
|
-
"type": "utils",
|
|
985
|
-
"path": "utils/markdownParser.ts",
|
|
986
|
-
"npmDependencies": [],
|
|
987
|
-
"registryDependencies": []
|
|
988
|
-
},
|
|
989
982
|
{
|
|
990
983
|
"name": "resize",
|
|
991
984
|
"type": "utils",
|