torch-glare 1.1.15 → 1.2.8

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 (145) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +25 -25
  3. package/apps/lib/components/ActionButton.tsx +65 -65
  4. package/apps/lib/components/ActionsGroup.tsx +38 -38
  5. package/apps/lib/components/AlertDialog.tsx +222 -222
  6. package/apps/lib/components/Avatar.tsx +49 -49
  7. package/apps/lib/components/Badge.tsx +116 -116
  8. package/apps/lib/components/BadgeField.tsx +203 -203
  9. package/apps/lib/components/Breadcrumb.tsx +316 -0
  10. package/apps/lib/components/Button.tsx +265 -265
  11. package/apps/lib/components/ButtonGroup.tsx +200 -0
  12. package/apps/lib/components/Calendar.tsx +103 -103
  13. package/apps/lib/components/Card.tsx +64 -64
  14. package/apps/lib/components/ChartBlockTool.ts +711 -0
  15. package/apps/lib/components/Checkbox.tsx +49 -49
  16. package/apps/lib/components/CountBadge.tsx +54 -54
  17. package/apps/lib/components/DataTable.tsx +232 -232
  18. package/apps/lib/components/DatePicker.tsx +223 -223
  19. package/apps/lib/components/Dialog.tsx +129 -129
  20. package/apps/lib/components/Divider.tsx +31 -31
  21. package/apps/lib/components/Drawer.tsx +118 -118
  22. package/apps/lib/components/DropdownMenu.tsx +399 -399
  23. package/apps/lib/components/FieldHint.tsx +76 -76
  24. package/apps/lib/components/Form.tsx +191 -191
  25. package/apps/lib/components/ImageAttachment.tsx +196 -196
  26. package/apps/lib/components/InnerLabelField.tsx +150 -150
  27. package/apps/lib/components/Input.tsx +206 -206
  28. package/apps/lib/components/InputField.tsx +149 -149
  29. package/apps/lib/components/InputOTP.tsx +85 -85
  30. package/apps/lib/components/Label.tsx +126 -126
  31. package/apps/lib/components/LabelField.tsx +77 -77
  32. package/apps/lib/components/LabeledCheckBox.tsx +55 -55
  33. package/apps/lib/components/LabeledRadio.tsx +48 -48
  34. package/apps/lib/components/LinkButton.tsx +93 -93
  35. package/apps/lib/components/LoginButton.tsx +56 -56
  36. package/apps/lib/components/PasswordLevel.tsx +58 -58
  37. package/apps/lib/components/Popover.tsx +274 -274
  38. package/apps/lib/components/ProfileMenu.tsx +90 -90
  39. package/apps/lib/components/Radio.tsx +65 -65
  40. package/apps/lib/components/RadioCard.tsx +66 -66
  41. package/apps/lib/components/ScrollArea.tsx +52 -52
  42. package/apps/lib/components/SearchField.tsx +51 -51
  43. package/apps/lib/components/Select.tsx +418 -418
  44. package/apps/lib/components/SimpleSelect.tsx +216 -216
  45. package/apps/lib/components/Skeleton.tsx +15 -15
  46. package/apps/lib/components/SlideDatePicker.tsx +193 -193
  47. package/apps/lib/components/SpinLoading.tsx +190 -190
  48. package/apps/lib/components/Switch.tsx +81 -81
  49. package/apps/lib/components/TabFormItem.tsx +161 -161
  50. package/apps/lib/components/Table.tsx +397 -397
  51. package/apps/lib/components/TextEditor.tsx +1069 -0
  52. package/apps/lib/components/Textarea.tsx +96 -96
  53. package/apps/lib/components/Toast.tsx +86 -86
  54. package/apps/lib/components/Toggle.tsx +127 -127
  55. package/apps/lib/components/ToggleButton.tsx +140 -0
  56. package/apps/lib/components/Tooltip.tsx +111 -111
  57. package/apps/lib/components/TransparentLabel.tsx +72 -72
  58. package/apps/lib/components/TreeDropDown.tsx +69 -69
  59. package/apps/lib/hooks/useActiveTreeItem.ts +60 -60
  60. package/apps/lib/hooks/useClickOutside.ts +26 -26
  61. package/apps/lib/hooks/useResize.ts +78 -78
  62. package/apps/lib/hooks/useTagSelection.ts +214 -214
  63. package/apps/lib/layouts/CNLayout.tsx +330 -330
  64. package/apps/lib/layouts/FieldSection.tsx +63 -63
  65. package/apps/lib/layouts/TreeSubLayout.tsx +187 -187
  66. package/apps/lib/providers/ThemeProvider.tsx +98 -98
  67. package/apps/lib/types/editorjs.d.ts +41 -0
  68. package/apps/lib/utils/cn.ts +6 -6
  69. package/apps/lib/utils/dateFormat.ts +98 -98
  70. package/apps/lib/utils/markdownParser.ts +351 -0
  71. package/apps/lib/utils/resize.ts +34 -34
  72. package/apps/lib/utils/types.ts +12 -12
  73. package/dist/src/commands/block.d.ts +5 -0
  74. package/dist/src/commands/block.d.ts.map +1 -0
  75. package/dist/src/commands/block.js +255 -0
  76. package/dist/src/commands/block.js.map +1 -0
  77. package/docs/BLOCKS.md +129 -0
  78. package/docs/CHANGELOG-1.1.16.md +108 -0
  79. package/docs/README.md +207 -207
  80. package/docs/components/action-button.md +630 -0
  81. package/docs/components/actions-group.md +702 -0
  82. package/docs/components/alert-dialog.md +760 -0
  83. package/docs/components/avatar.md +705 -0
  84. package/docs/components/badge-field.md +704 -0
  85. package/docs/components/badge.md +622 -0
  86. package/docs/components/button.md +614 -0
  87. package/docs/components/calendar.md +548 -0
  88. package/docs/components/card.md +617 -0
  89. package/docs/components/checkbox.md +691 -0
  90. package/docs/components/cn-layout.md +848 -0
  91. package/docs/components/count-badge.md +554 -0
  92. package/docs/components/data-table.md +842 -0
  93. package/docs/components/date-picker.md +773 -0
  94. package/docs/components/dialog.md +739 -0
  95. package/docs/components/divider.md +760 -0
  96. package/docs/components/drawer.md +769 -0
  97. package/docs/components/dropdown-menu.md +636 -0
  98. package/docs/components/field-hint.md +886 -0
  99. package/docs/components/field-section.md +775 -0
  100. package/docs/components/form.md +788 -0
  101. package/docs/components/image-attachment.md +908 -0
  102. package/docs/components/inner-label-field.md +809 -0
  103. package/docs/components/input-field.md +579 -0
  104. package/docs/components/input-otp.md +753 -0
  105. package/docs/components/input.md +628 -0
  106. package/docs/components/label-field.md +760 -0
  107. package/docs/components/label.md +750 -0
  108. package/docs/components/labeled-checkbox.md +634 -0
  109. package/docs/components/labeled-radio.md +789 -0
  110. package/docs/components/link-button.md +679 -0
  111. package/docs/components/login-button.md +866 -0
  112. package/docs/components/password-level.md +790 -0
  113. package/docs/components/popover.md +646 -0
  114. package/docs/components/profile-menu.md +645 -0
  115. package/docs/components/radio-card.md +794 -0
  116. package/docs/components/radio.md +727 -0
  117. package/docs/components/scroll-area.md +687 -0
  118. package/docs/components/search-field.md +694 -0
  119. package/docs/components/select.md +680 -0
  120. package/docs/components/simple-select.md +703 -0
  121. package/docs/components/skeleton.md +696 -0
  122. package/docs/components/slide-date-picker.md +829 -0
  123. package/docs/components/spin-loading.md +687 -0
  124. package/docs/components/switch.md +762 -0
  125. package/docs/components/tab-form-item.md +767 -0
  126. package/docs/components/table.md +943 -0
  127. package/docs/components/textarea.md +633 -0
  128. package/docs/components/toast.md +764 -0
  129. package/docs/components/toggle.md +815 -0
  130. package/docs/components/tooltip.md +501 -0
  131. package/docs/components/transparent-label.md +712 -0
  132. package/docs/components/tree-dropdown.md +732 -0
  133. package/docs/components/tree-sub-layout.md +703 -0
  134. package/docs/how-to/guides.md +1047 -0
  135. package/docs/reference/components.md +562 -0
  136. package/docs/reference/hooks.md +1500 -0
  137. package/docs/reference/providers.md +866 -0
  138. package/docs/reference/tailwind-plugins.md +870 -0
  139. package/docs/reference/types.md +1008 -0
  140. package/docs/reference/utilities.md +711 -0
  141. package/docs/tutorials/building-first-form.md +848 -0
  142. package/docs/tutorials/component-composition.md +900 -0
  143. package/docs/tutorials/getting-started.md +559 -0
  144. package/docs/tutorials/theming-basics.md +779 -0
  145. package/package.json +31 -31
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 TORCH corp.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TORCH corp.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
- # TORCH Glare Components Library
2
-
3
- Welcome to the **TORCH Glare Components Library**! This library offers a comprehensive set of reusable React components designed to help you build modern, efficient user interfaces. It also includes a powerful CLI tool (**torch-glare CLI**) to simplify component management and integration.
4
-
5
- ![TORCH Glare Logo](docs/Cover.png)
6
-
7
- ## Documentation
8
- You can find the complete documentation at: [https://glare.torchcorp.com](https://glare.torchcorp.com)
9
-
10
- ## Contributing
11
- We’re excited to welcome contributors! To get started:
12
-
13
- 1. Fork the repository.
14
- 2. Create a new branch.
15
- 3. Implement your changes.
16
- 4. Commit with a descriptive message.
17
- 5. Push your branch and open a pull request.
18
-
19
- ### Contribution Guidelines
20
- - Adhere to the existing code style.
21
- - Update or add documentation where applicable.
22
-
23
- ## License
24
- This project is licensed under the **MIT License**.
25
-
1
+ # TORCH Glare Components Library
2
+
3
+ Welcome to the **TORCH Glare Components Library**! This library offers a comprehensive set of reusable React components designed to help you build modern, efficient user interfaces. It also includes a powerful CLI tool (**torch-glare CLI**) to simplify component management and integration.
4
+
5
+ ![TORCH Glare Logo](docs/Cover.png)
6
+
7
+ ## Documentation
8
+ You can find the complete documentation at: [https://glare.torchcorp.com](https://glare.torchcorp.com)
9
+
10
+ ## Contributing
11
+ We’re excited to welcome contributors! To get started:
12
+
13
+ 1. Fork the repository.
14
+ 2. Create a new branch.
15
+ 3. Implement your changes.
16
+ 4. Commit with a descriptive message.
17
+ 5. Push your branch and open a pull request.
18
+
19
+ ### Contribution Guidelines
20
+ - Adhere to the existing code style.
21
+ - Update or add documentation where applicable.
22
+
23
+ ## License
24
+ This project is licensed under the **MIT License**.
25
+
@@ -1,65 +1,65 @@
1
- import React, { ButtonHTMLAttributes } from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { Button } from "./Button";
4
- import { cn } from "../utils/cn";
5
- import { ButtonVariant, Themes } from "../utils/types";
6
-
7
- const buttonVariants = cva("!rounded-[4px]", {
8
- variants: {
9
- size: {
10
- XS: "h-[18px] w-[18px] text-[12px]",
11
- S: "h-[22px] w-[22px] text-[12px]",
12
- M: "h-[32px] w-[32px] text-[18px]",
13
- },
14
- },
15
- defaultVariants: {
16
- size: "M",
17
- },
18
- });
19
-
20
-
21
- interface Props
22
- extends ButtonHTMLAttributes<HTMLButtonElement>,
23
- VariantProps<typeof buttonVariants> {
24
- is_loading?: boolean;
25
- disabled?: boolean;
26
- asChild?: boolean;
27
- as?: React.ElementType;
28
- theme?: Themes
29
- variant?: ButtonVariant
30
- }
31
- export const ActionButton = function ({
32
- size,
33
- asChild,
34
- as: Tag = "button",
35
- className,
36
- variant,
37
- type = "button",
38
- children,
39
- theme,
40
- ...props
41
- }: Props) {
42
- return (
43
- <Button
44
- theme={theme}
45
- asChild={asChild}
46
- buttonType="icon"
47
- type={type}
48
- size={
49
- size == "XS" ? "S" :
50
- size == "S" ? "M" :
51
- size == "M" ? "L" : "S"
52
- }
53
- variant={variant}
54
- className={cn(
55
- buttonVariants({
56
- size,
57
- })
58
- , className
59
- )}
60
- {...props}
61
- >
62
- {children}
63
- </Button>
64
- );
65
- };
1
+ import React, { ButtonHTMLAttributes } from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+ import { Button } from "./Button";
4
+ import { cn } from "../utils/cn";
5
+ import { ButtonVariant, Themes } from "../utils/types";
6
+
7
+ const buttonVariants = cva("!rounded-[4px]", {
8
+ variants: {
9
+ size: {
10
+ XS: "h-[18px] w-[18px] text-[12px]",
11
+ S: "h-[22px] w-[22px] text-[12px]",
12
+ M: "h-[32px] w-[32px] text-[18px]",
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ size: "M",
17
+ },
18
+ });
19
+
20
+
21
+ interface Props
22
+ extends ButtonHTMLAttributes<HTMLButtonElement>,
23
+ VariantProps<typeof buttonVariants> {
24
+ is_loading?: boolean;
25
+ disabled?: boolean;
26
+ asChild?: boolean;
27
+ as?: React.ElementType;
28
+ theme?: Themes
29
+ variant?: ButtonVariant
30
+ }
31
+ export const ActionButton = function ({
32
+ size,
33
+ asChild,
34
+ as: Tag = "button",
35
+ className,
36
+ variant,
37
+ type = "button",
38
+ children,
39
+ theme,
40
+ ...props
41
+ }: Props) {
42
+ return (
43
+ <Button
44
+ theme={theme}
45
+ asChild={asChild}
46
+ buttonType="icon"
47
+ type={type}
48
+ size={
49
+ size == "XS" ? "S" :
50
+ size == "S" ? "M" :
51
+ size == "M" ? "L" : "S"
52
+ }
53
+ variant={variant}
54
+ className={cn(
55
+ buttonVariants({
56
+ size,
57
+ })
58
+ , className
59
+ )}
60
+ {...props}
61
+ >
62
+ {children}
63
+ </Button>
64
+ );
65
+ };
@@ -1,38 +1,38 @@
1
- import React, { HTMLAttributes } from "react";
2
- import { cn } from "../utils/cn";
3
- import { Themes } from "../utils/types";
4
- import { Divider } from "./Divider";
5
-
6
- interface Props extends HTMLAttributes<HTMLDivElement> {
7
- withDivider?: boolean; // to display the divider line if you pass it see on figma design file
8
- theme?: Themes
9
- }
10
-
11
- const ActionsGroup: React.FC<Props> = ({
12
- withDivider,
13
- className,
14
- children,
15
- theme,
16
- ...props
17
- }) => {
18
- return (
19
- <section
20
- {...props}
21
- data-theme={theme}
22
- className={cn("flex items-center gap-2 w-full", className)}
23
- >
24
- {withDivider && (
25
- <Divider />
26
- )}
27
- {children}
28
- {withDivider && (
29
- <Divider />
30
- )}
31
- </section>
32
- );
33
- };
34
-
35
- // <div className="flex border-t border-solid border-border-presentation-global-primary flex-1 px-2" />
36
-
37
-
38
- export default ActionsGroup;
1
+ import React, { HTMLAttributes } from "react";
2
+ import { cn } from "../utils/cn";
3
+ import { Themes } from "../utils/types";
4
+ import { Divider } from "./Divider";
5
+
6
+ interface Props extends HTMLAttributes<HTMLDivElement> {
7
+ withDivider?: boolean; // to display the divider line if you pass it see on figma design file
8
+ theme?: Themes
9
+ }
10
+
11
+ const ActionsGroup: React.FC<Props> = ({
12
+ withDivider,
13
+ className,
14
+ children,
15
+ theme,
16
+ ...props
17
+ }) => {
18
+ return (
19
+ <section
20
+ {...props}
21
+ data-theme={theme}
22
+ className={cn("flex items-center gap-2 w-full", className)}
23
+ >
24
+ {withDivider && (
25
+ <Divider />
26
+ )}
27
+ {children}
28
+ {withDivider && (
29
+ <Divider />
30
+ )}
31
+ </section>
32
+ );
33
+ };
34
+
35
+ // <div className="flex border-t border-solid border-border-presentation-global-primary flex-1 px-2" />
36
+
37
+
38
+ export default ActionsGroup;