@layers-app/shared 0.3.8 → 0.4.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 (200) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +10 -10
  2. package/dist/components/AnimatedFigurePage/useParallax.d.ts +2 -2
  3. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  4. package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -4
  5. package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
  6. package/dist/components/AppContainer/components/AppSidebarButton.js +15 -22
  7. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
  8. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +21 -22
  9. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +91 -48
  11. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  12. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  13. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -3
  14. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  15. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +63 -89
  16. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
  17. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  18. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +26 -35
  19. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  20. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
  21. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  22. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +36 -43
  23. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +0 -4
  24. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +20 -59
  26. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +18 -28
  27. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +18 -22
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
  30. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
  31. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  32. package/dist/components/ColorPicker/ColorPicker.d.ts +21 -19
  33. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  34. package/dist/components/ColorPicker/ColorPicker.js +144 -136
  35. package/dist/components/ColorPicker/ColorPicker.module.css.js +31 -0
  36. package/dist/components/ColorPicker/ColorPickerList.d.ts +6 -0
  37. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -0
  38. package/dist/components/ColorPicker/ColorPickerList.js +134 -0
  39. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +13 -0
  40. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -0
  41. package/dist/components/ColorPicker/ColorPickerToolbar.js +149 -0
  42. package/dist/components/ColorPicker/icons.d.ts +11 -0
  43. package/dist/components/ColorPicker/icons.d.ts.map +1 -0
  44. package/dist/components/ColorPicker/icons.js +71 -0
  45. package/dist/components/ColorPicker/types.d.ts +49 -0
  46. package/dist/components/ColorPicker/types.d.ts.map +1 -0
  47. package/dist/components/ColorPicker/types.js +10 -0
  48. package/dist/components/ColorPicker/useRecentColors.d.ts +13 -0
  49. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -0
  50. package/dist/components/ColorPicker/useRecentColors.js +39 -0
  51. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  52. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  53. package/dist/components/CommentComposer/CommentEditorHotkeys.js +4 -3
  54. package/dist/components/CommentComposer/index.js +1 -1
  55. package/dist/components/CommentComposer/useVirtualAnchor.d.ts +1 -1
  56. package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -1
  57. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  58. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  59. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  60. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  61. package/dist/components/EmojiPicker/EmojiPanel.js +22 -22
  62. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  63. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  64. package/dist/components/EmojiPicker/EmojiPicker.js +1 -0
  65. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  66. package/dist/components/EmojiPicker/IconsPanel.js +13 -13
  67. package/dist/components/EntityIcon.d.ts.map +1 -1
  68. package/dist/components/EntityIcon.js +33 -43
  69. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  70. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  71. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  72. package/dist/components/FilePicker/FilePicker.d.ts +4 -2
  73. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  74. package/dist/components/FilePicker/FilePicker.js +241 -226
  75. package/dist/components/FilePicker/FilePicker.module.css.js +14 -12
  76. package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
  77. package/dist/components/FilePicker/FilePickerGallery.js +60 -34
  78. package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
  79. package/dist/components/FilePicker/FilePickerGiphy.js +38 -39
  80. package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
  81. package/dist/components/FilePicker/FilePickerLink.js +29 -26
  82. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  83. package/dist/components/FilePicker/FilePickerUnsplash.js +42 -43
  84. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  85. package/dist/components/FilePicker/FilePickerUpload.js +51 -35
  86. package/dist/components/FilePicker/coverCollections.d.ts +4 -0
  87. package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
  88. package/dist/components/FilePicker/coverCollections.js +164 -0
  89. package/dist/components/FilePicker/index.d.ts +1 -0
  90. package/dist/components/FilePicker/index.d.ts.map +1 -1
  91. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  92. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  93. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  94. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  95. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  96. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  97. package/dist/components/FormViewer/helpers/conditions.d.ts +38 -38
  98. package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
  99. package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
  100. package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
  101. package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
  102. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +0 -6
  103. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
  104. package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +3 -4
  105. package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
  106. package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
  107. package/dist/components/FormViewer/store/formStore.d.ts +248 -248
  108. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  109. package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
  110. package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
  111. package/dist/components/FormViewer/types/form.d.ts +1 -1
  112. package/dist/components/FormViewer/types/form.d.ts.map +1 -1
  113. package/dist/components/FormViewer/types/schemes.d.ts +6358 -381
  114. package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
  115. package/dist/components/FormViewer/types/schemes.js +1 -1
  116. package/dist/components/GroupAvatar/index.d.ts +1 -3
  117. package/dist/components/GroupAvatar/index.d.ts.map +1 -1
  118. package/dist/components/GroupAvatar/index.js +21 -24
  119. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  120. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  121. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  122. package/dist/components/Loaders/styles.module.css.js +6 -6
  123. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  124. package/dist/components/MediaLibrary/MediaLibraryRow.js +7 -7
  125. package/dist/components/NavMenu/NavMenu.d.ts +1 -3
  126. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  127. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  128. package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
  129. package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
  130. package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +1 -7
  131. package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
  132. package/dist/components/NavMenu/components/NavMenuActionIcon.js +23 -21
  133. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  134. package/dist/components/NewColorPicker/components/Target.d.ts +1 -3
  135. package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
  136. package/dist/components/NewColorPicker/components/Target.js +43 -48
  137. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  138. package/dist/components/Notification/Notification.js +1 -3
  139. package/dist/components/Notification/Notification.module.css.js +1 -1
  140. package/dist/components/Notification/NotificationCard.d.ts +1 -3
  141. package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
  142. package/dist/components/Notification/NotificationCard.js +86 -87
  143. package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
  144. package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
  145. package/dist/components/OnBoarding/styles.module.css.js +7 -7
  146. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +1 -1
  147. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
  148. package/dist/components/OnboardingTour/OnboardingTourWrapper.js +74 -70
  149. package/dist/components/ProjectIcon/ProjectIcon.d.ts +12 -7
  150. package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
  151. package/dist/components/ProjectIcon/ProjectIcon.js +60 -58
  152. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  153. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  154. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  155. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  156. package/dist/components/UserAvatar/index.d.ts +1 -2
  157. package/dist/components/UserAvatar/index.d.ts.map +1 -1
  158. package/dist/components/UserAvatar/index.js +35 -38
  159. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
  160. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
  161. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +18 -19
  162. package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
  163. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
  164. package/dist/components/table/FrontTable.d.ts.map +1 -1
  165. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  166. package/dist/config/brand.js +8 -8
  167. package/dist/config/envConfig.d.ts +0 -8
  168. package/dist/config/envConfig.d.ts.map +1 -1
  169. package/dist/config/envConfig.js +13 -21
  170. package/dist/helpers/getFileIcons.d.ts.map +1 -1
  171. package/dist/helpers/getFileIcons.js +45 -63
  172. package/dist/helpers/getFileType.d.ts +1 -1
  173. package/dist/helpers/getFileType.d.ts.map +1 -1
  174. package/dist/helpers/getFileType.js +8 -29
  175. package/dist/helpers/getPartOfTheDay.d.ts +1 -1
  176. package/dist/helpers/platform.d.ts +1 -1
  177. package/dist/helpers/platform.d.ts.map +1 -1
  178. package/dist/helpers/platform.js +4 -5
  179. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  180. package/dist/helpers/showNotifications.d.ts.map +1 -1
  181. package/dist/helpers/showNotifications.js +29 -30
  182. package/dist/helpers/showNotifications.module.css.js +1 -1
  183. package/dist/hooks/useOutsideClick.d.ts +1 -1
  184. package/dist/hooks/useOutsideClick.d.ts.map +1 -1
  185. package/dist/index.css +1 -1
  186. package/dist/index.d.ts +6 -1
  187. package/dist/index.d.ts.map +1 -1
  188. package/dist/index.js +509 -498
  189. package/dist/lang/locales/ui_en.json.js +20 -18
  190. package/dist/lang/locales/ui_es.json.js +14 -12
  191. package/dist/lang/locales/ui_ru.json.js +15 -13
  192. package/dist/node_modules/countries-and-timezones/esm/index.js +4011 -281
  193. package/docs/README.md +499 -499
  194. package/package.json +75 -75
  195. package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +0 -6
  196. package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +0 -1
  197. package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +0 -16
  198. package/dist/helpers/offlineSuppression.d.ts +0 -3
  199. package/dist/helpers/offlineSuppression.d.ts.map +0 -1
  200. package/dist/helpers/offlineSuppression.js +0 -8
@@ -6,11 +6,11 @@ import { useDisclosure as M } from "@mantine/hooks";
6
6
  import { getFileIcons as P } from "../../helpers/getFileIcons.js";
7
7
  import { getFileType as A } from "../../helpers/getFileType.js";
8
8
  import { AttachmentsGalleryModal as B } from "../AttachmentsGalleryModal/AttachmentsGalleryModal.js";
9
- import a from "./AttachmentsPreview.module.css.js";
9
+ import t from "./AttachmentsPreview.module.css.js";
10
10
  const U = ({
11
11
  files: o,
12
12
  onRemove: i,
13
- mode: t,
13
+ mode: a,
14
14
  parentIsExisting: u
15
15
  }) => {
16
16
  const [T, { open: w, close: b }] = M(!1), s = o.filter((e) => e.isImage), d = o.filter((e) => !e.isImage), D = s.map((e) => ({
@@ -35,7 +35,7 @@ const U = ({
35
35
  };
36
36
  return o.length === 0 ? null : /* @__PURE__ */ n(C, { children: [
37
37
  /* @__PURE__ */ n(v, { gap: "10px", w: "100%", tabIndex: 0, children: [
38
- s.length > 0 && /* @__PURE__ */ r(z, { gap: "xs", children: s.map((e) => {
38
+ s.length > 0 && /* @__PURE__ */ r(z, { gutter: "xs", children: s.map((e) => {
39
39
  const l = o.indexOf(e);
40
40
  return /* @__PURE__ */ r(z.Col, { span: "content", children: /* @__PURE__ */ n(
41
41
  h,
@@ -43,7 +43,7 @@ const U = ({
43
43
  w: 56,
44
44
  h: 56,
45
45
  pos: "relative",
46
- className: a.imagePreviewWrapper,
46
+ className: t.imagePreviewWrapper,
47
47
  children: [
48
48
  /* @__PURE__ */ r(
49
49
  F,
@@ -62,11 +62,11 @@ const U = ({
62
62
  /* @__PURE__ */ r(
63
63
  f,
64
64
  {
65
- visible: e.isTemp && t === "view" && u,
65
+ visible: e.isTemp && a === "view" && u,
66
66
  loaderProps: { size: 20 }
67
67
  }
68
68
  ),
69
- t === "view" && !e.isTemp && /* @__PURE__ */ r(
69
+ a === "view" && !e.isTemp && /* @__PURE__ */ r(
70
70
  c,
71
71
  {
72
72
  component: "a",
@@ -79,11 +79,11 @@ const U = ({
79
79
  top: 2,
80
80
  right: 2,
81
81
  bg: "var(--mantine-color-dark-filled, #2E2E2E)",
82
- className: a.downloadButton,
82
+ className: t.downloadButton,
83
83
  children: /* @__PURE__ */ r(x, { size: 16, icon: g })
84
84
  }
85
85
  ),
86
- t === "draft" && i && /* @__PURE__ */ r(
86
+ a === "draft" && i && /* @__PURE__ */ r(
87
87
  c,
88
88
  {
89
89
  size: "20px",
@@ -93,7 +93,7 @@ const U = ({
93
93
  pos: "absolute",
94
94
  color: "dark",
95
95
  onClick: () => i(l),
96
- className: a.deleteButton,
96
+ className: t.deleteButton,
97
97
  children: /* @__PURE__ */ r(I, { size: "12px" })
98
98
  }
99
99
  )
@@ -105,15 +105,15 @@ const U = ({
105
105
  h,
106
106
  {
107
107
  w: "100%",
108
- className: a.filePreviewList,
108
+ className: t.filePreviewList,
109
109
  "data-many": d.length >= 4,
110
110
  children: d.map((e) => {
111
111
  const l = o.indexOf(e);
112
- return /* @__PURE__ */ n(h, { className: a.filePreviewWrapper, children: [
112
+ return /* @__PURE__ */ n(h, { className: t.filePreviewWrapper, children: [
113
113
  /* @__PURE__ */ r(
114
114
  f,
115
115
  {
116
- visible: e.isTemp && t === "view" && u,
116
+ visible: e.isTemp && a === "view" && u,
117
117
  loaderProps: { size: 20 }
118
118
  }
119
119
  ),
@@ -134,11 +134,7 @@ const U = ({
134
134
  flex: 1,
135
135
  miw: 0,
136
136
  children: [
137
- P(
138
- A(e.type, !1, e.name),
139
- !1,
140
- 36
141
- ),
137
+ P(A(e.type), !1, 36),
142
138
  /* @__PURE__ */ n(v, { gap: 0, flex: 1, miw: 0, children: [
143
139
  /* @__PURE__ */ r(
144
140
  N,
@@ -146,7 +142,7 @@ const U = ({
146
142
  size: "sm",
147
143
  truncate: !0,
148
144
  title: e.name,
149
- className: a.fileDownloadName,
145
+ className: t.fileDownloadName,
150
146
  component: "a",
151
147
  href: e.url,
152
148
  download: e.name,
@@ -163,7 +159,7 @@ const U = ({
163
159
  ]
164
160
  }
165
161
  ),
166
- t === "view" && !e.isTemp && /* @__PURE__ */ r(
162
+ a === "view" && !e.isTemp && /* @__PURE__ */ r(
167
163
  c,
168
164
  {
169
165
  component: "a",
@@ -173,14 +169,14 @@ const U = ({
173
169
  variant: "subtle",
174
170
  color: "gray",
175
171
  size: "sm",
176
- className: a.downloadButton,
172
+ className: t.downloadButton,
177
173
  children: /* @__PURE__ */ r(x, { size: 16, icon: g })
178
174
  }
179
175
  )
180
176
  ]
181
177
  }
182
178
  ),
183
- t === "draft" && i && /* @__PURE__ */ r(
179
+ a === "draft" && i && /* @__PURE__ */ r(
184
180
  c,
185
181
  {
186
182
  size: "xs",
@@ -189,7 +185,7 @@ const U = ({
189
185
  variant: "filled",
190
186
  color: "dark",
191
187
  onClick: () => i(l),
192
- className: a.deleteButton,
188
+ className: t.deleteButton,
193
189
  children: /* @__PURE__ */ r(I, { size: "12px" })
194
190
  }
195
191
  )
@@ -1,4 +1,4 @@
1
- const e = "_imagePreviewWrapper_qqm20_1", t = "_deleteButton_qqm20_6", o = "_downloadButton_qqm20_13", i = "_filePreviewList_qqm20_32", r = "_fileDownloadName_qqm20_45", a = "_filePreviewWrapper_qqm20_51", l = {
1
+ const e = "_imagePreviewWrapper_1814g_1", t = "_deleteButton_1814g_11", o = "_downloadButton_1814g_25", i = "_filePreviewList_1814g_63", r = "_fileDownloadName_1814g_89", a = "_filePreviewWrapper_1814g_101", l = {
2
2
  imagePreviewWrapper: e,
3
3
  deleteButton: t,
4
4
  downloadButton: o,
@@ -1,15 +1,15 @@
1
- const o = "_wrapper_1y9p0_1", s = "_logo_1y9p0_8", p = "_desktop_1y9p0_23", _ = "_shadow_1y9p0_37", t = "_desktopShadow_1y9p0_50", d = {
1
+ const o = "_wrapper_1n4or_1", s = "_logo_1n4or_15", _ = "_desktop_1n4or_45", t = "_shadow_1n4or_73", d = "_desktopShadow_1n4or_99", p = {
2
2
  wrapper: o,
3
3
  logo: s,
4
- desktop: p,
5
- shadow: _,
6
- desktopShadow: t
4
+ desktop: _,
5
+ shadow: t,
6
+ desktopShadow: d
7
7
  };
8
8
  export {
9
- d as default,
10
- p as desktop,
11
- t as desktopShadow,
9
+ p as default,
10
+ _ as desktop,
11
+ d as desktopShadow,
12
12
  s as logo,
13
- _ as shadow,
13
+ t as shadow,
14
14
  o as wrapper
15
15
  };
@@ -1,4 +1,4 @@
1
- const o = "_accordionRoot_3pkfo_1", c = "_accordionControl_3pkfo_5", n = "_accordionItem_3pkfo_9", t = {
1
+ const o = "_accordionRoot_1of7x_1", c = "_accordionControl_1of7x_9", n = "_accordionItem_1of7x_17", t = {
2
2
  accordionRoot: o,
3
3
  accordionControl: c,
4
4
  accordionItem: n
@@ -1,29 +1,31 @@
1
- import React from 'react';
2
1
  import { ColorSwatchProps, FlexProps } from '@mantine/core';
3
- type ColorPickerProps = {
4
- ref?: React.Ref<HTMLDivElement>;
5
- value?: string | null;
6
- onChange?: (v: string) => void;
7
- allowCustomColor?: boolean;
8
- colors?: string[];
9
- swatchShape?: 'circle' | 'square';
10
- withTick?: boolean;
11
- fullWidth?: boolean;
12
- swatchSize?: number;
13
- } & Omit<FlexProps, 'onChange'>;
2
+ import { ColorPickerList } from './ColorPickerList';
3
+ import type { ColorItem } from './types';
14
4
  interface ColorCircleProps extends Omit<ColorSwatchProps, 'color'>, Omit<React.ComponentPropsWithoutRef<'div'>, keyof Omit<ColorSwatchProps, 'color'>> {
15
5
  value?: string | null;
6
+ label?: string;
16
7
  isActive?: boolean;
17
8
  swatchShape?: 'circle' | 'square';
9
+ swatchVariant?: 'filled' | 'outline';
18
10
  withTick?: boolean;
11
+ borderColor?: string;
12
+ bgColor?: string;
19
13
  }
20
- export declare const ColorCircle: ({ value, isActive, swatchShape, withTick, ref, ...props }: ColorCircleProps & {
21
- ref?: React.Ref<HTMLDivElement>;
22
- }) => import("react/jsx-runtime").JSX.Element;
23
- export declare const ColorPicker: (({ value, onChange, allowCustomColor, colors, swatchShape, withTick, fullWidth, swatchSize, ref, ...props }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element) & {
24
- ColorCircle: ({ value, isActive, swatchShape, withTick, ref, ...props }: ColorCircleProps & {
25
- ref?: React.Ref<HTMLDivElement>;
26
- }) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const ColorCircle: import("react").ForwardRefExoticComponent<ColorCircleProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ export declare const ColorPicker: import("react").ForwardRefExoticComponent<{
16
+ value?: string | null;
17
+ onChange?: (v: string) => void;
18
+ allowCustomColor?: boolean;
19
+ colors?: ColorItem[];
20
+ swatchShape?: "circle" | "square";
21
+ swatchVariant?: "filled" | "outline";
22
+ withTick?: boolean;
23
+ fullWidth?: boolean;
24
+ swatchSize?: number;
25
+ } & Omit<FlexProps, "onChange"> & import("react").RefAttributes<HTMLDivElement>> & {
26
+ ColorCircle: import("react").ForwardRefExoticComponent<ColorCircleProps & import("react").RefAttributes<HTMLDivElement>>;
27
+ List: typeof ColorPickerList;
28
+ Toolbar: import("react").ForwardRefExoticComponent<import("./ColorPickerToolbar").ColorPickerToolbarProps & import("react").RefAttributes<HTMLDivElement>>;
27
29
  };
28
30
  export {};
29
31
  //# sourceMappingURL=ColorPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAIL,gBAAgB,EAEhB,SAAS,EAKV,MAAM,eAAe,CAAC;AAMvB,KAAK,gBAAgB,GAAG;IACtB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AA4FhC,UAAU,gBACR,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EACrC,IAAI,CACF,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,MAAM,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CACtC;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,2DAOzB,gBAAgB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,4CAgDxD,CAAC;AASF,eAAO,MAAM,WAAW,gHA3JrB,gBAAgB;6EAkGhB,gBAAgB,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;KAAE;CA2DvD,CAAC"}
1
+ {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAIL,gBAAgB,EAEhB,SAAS,EAKV,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAiHzC,UAAU,gBACR,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EACrC,IAAI,CACF,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,MAAM,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CACtC;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,6GAmDvB,CAAC;AASF,eAAO,MAAM,WAAW;YAzLd,MAAM,GAAG,IAAI;eACV,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;uBACX,OAAO;aACjB,SAAS,EAAE;kBACN,QAAQ,GAAG,QAAQ;oBACjB,QAAQ,GAAG,SAAS;eACzB,OAAO;gBACN,OAAO;iBACN,MAAM;;;;;CAqLnB,CAAC"}
@@ -1,145 +1,153 @@
1
- import { jsx as o, jsxs as u } from "react/jsx-runtime";
2
- import { useState as h } from "react";
3
- import { useTranslation as P } from "react-i18next";
4
- import { Tick02Icon as T } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as z } from "@hugeicons/react";
6
- import { useMantineTheme as b, Flex as d, Tooltip as j, ColorSwatch as A, getThemeColor as C, parseThemeColor as E, ColorInput as R, ActionIcon as x } from "@mantine/core";
7
- import { IconPalette as U, IconPencil as $ } from "@tabler/icons-react";
8
- import v from "styled-components";
9
- import { DEFAULT_VALUES as p } from "../../constants.js";
10
- const D = ({
11
- value: e,
12
- onChange: r,
13
- allowCustomColor: i,
14
- colors: s,
15
- swatchShape: l = "circle",
16
- withTick: c = !1,
17
- fullWidth: n = !1,
18
- swatchSize: a = 30,
19
- ref: m,
20
- ...y
21
- }) => {
22
- const w = b(), S = E({
23
- color: e || p.COLORS[0],
24
- theme: w
25
- }), [k, I] = h(S.value), [O, f] = h(!1);
26
- return O ? /* @__PURE__ */ u(d, { align: "center", mih: 30, children: [
27
- /* @__PURE__ */ o(
28
- R,
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { forwardRef as y, useState as x } from "react";
3
+ import { Tick02Icon as j } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as A } from "@hugeicons/react";
5
+ import { useMantineTheme as w, getThemeColor as E, Flex as C, Tooltip as R, ColorSwatch as D, parseThemeColor as F, ColorInput as H, ActionIcon as v } from "@mantine/core";
6
+ import { IconPalette as M, IconPencil as U } from "@tabler/icons-react";
7
+ import V from "styled-components";
8
+ import { DEFAULT_VALUES as g } from "../../constants.js";
9
+ import { ColorPickerToolbar as q } from "./ColorPickerToolbar.js";
10
+ import { ColorPickerList as _ } from "./ColorPickerList.js";
11
+ import { normalizeColorItem as B } from "./types.js";
12
+ const G = y(
13
+ ({
14
+ value: o,
15
+ onChange: l,
16
+ allowCustomColor: n,
17
+ colors: s,
18
+ swatchShape: a = "circle",
19
+ swatchVariant: m = "filled",
20
+ withTick: d = !1,
21
+ fullWidth: p = !1,
22
+ swatchSize: i = 30,
23
+ ...u
24
+ }, f) => {
25
+ const r = w(), t = F({
26
+ color: o || g.COLORS[0],
27
+ theme: r
28
+ }), [z, I] = x(t.value), [O, b] = x(!1);
29
+ return O ? /* @__PURE__ */ h(C, { align: "center", mih: 30, children: [
30
+ /* @__PURE__ */ e(
31
+ H,
32
+ {
33
+ w: "100%",
34
+ popoverProps: {
35
+ withinPortal: !1,
36
+ keepMounted: !1
37
+ },
38
+ maxLength: 7,
39
+ withEyeDropper: !1,
40
+ size: "xs",
41
+ value: z,
42
+ onChange: I,
43
+ onChangeEnd: l,
44
+ placeholder: "Select custom color"
45
+ }
46
+ ),
47
+ /* @__PURE__ */ e(
48
+ v,
49
+ {
50
+ radius: "xl",
51
+ variant: "default",
52
+ color: "gray",
53
+ onClick: () => b(!1),
54
+ children: /* @__PURE__ */ e(M, { size: 16 })
55
+ }
56
+ )
57
+ ] }, 1) : /* @__PURE__ */ h(
58
+ C,
29
59
  {
30
- w: "100%",
31
- popoverProps: {
32
- withinPortal: !1,
33
- keepMounted: !1
34
- },
35
- maxLength: 7,
36
- withEyeDropper: !1,
37
- size: "xs",
38
- value: k,
39
- onChange: I,
40
- onChangeEnd: r,
41
- placeholder: "Select custom color"
42
- }
43
- ),
44
- /* @__PURE__ */ o(
45
- x,
46
- {
47
- radius: "xl",
48
- variant: "default",
49
- color: "gray",
50
- onClick: () => f(!1),
51
- children: /* @__PURE__ */ o(U, { size: 16 })
52
- }
53
- )
54
- ] }, 1) : /* @__PURE__ */ u(
55
- d,
56
- {
57
- ref: m,
58
- ...y,
59
- justify: n ? "space-between" : "flex-start",
60
- align: "center",
61
- mih: 32,
62
- children: [
63
- (s || p.COLORS).map((t) => {
64
- const L = t === e || !e && t === p.COLORS[0];
65
- return /* @__PURE__ */ o(
66
- F,
60
+ ref: f,
61
+ ...u,
62
+ justify: p ? "space-between" : "flex-start",
63
+ align: "center",
64
+ children: [
65
+ (s || g.COLORS).map((P, S) => {
66
+ const { value: c, border: T, bg: L, label: $ } = B(P);
67
+ return /* @__PURE__ */ e(
68
+ J,
69
+ {
70
+ value: c,
71
+ label: $,
72
+ isActive: c === o,
73
+ size: i - 4,
74
+ swatchShape: a,
75
+ swatchVariant: m,
76
+ withTick: d,
77
+ borderColor: T,
78
+ bgColor: L,
79
+ onClick: () => l?.(c)
80
+ },
81
+ c || S
82
+ );
83
+ }),
84
+ n && /* @__PURE__ */ e(
85
+ v,
67
86
  {
68
- value: t,
69
- isActive: L,
70
- size: a - 4,
71
- swatchShape: l,
72
- withTick: c,
73
- onClick: () => r?.(t)
74
- },
75
- t
76
- );
77
- }),
78
- i && /* @__PURE__ */ o(
79
- x,
80
- {
81
- radius: "xl",
82
- variant: "default",
83
- color: "gray",
84
- onClick: () => f(!0),
85
- children: /* @__PURE__ */ o($, { size: 16 })
86
- }
87
- )
88
- ]
89
- },
90
- 2
91
- );
92
- }, g = ({
93
- value: e,
94
- isActive: r,
95
- swatchShape: i,
96
- withTick: s,
97
- ref: l,
98
- ...c
99
- }) => {
100
- const n = b(), { t: a } = P("ui"), m = e ? a(`colorPicker.colors.${e}`, {
101
- defaultValue: e.charAt(0).toUpperCase() + e.slice(1)
102
- }) : "";
103
- return /* @__PURE__ */ o(d, { miw: 32, justify: "center", align: "center", children: /* @__PURE__ */ o(j, { label: m, withArrow: !0, children: /* @__PURE__ */ u(
104
- A,
105
- {
106
- ref: l,
107
- color: e ? C(e, n) : "",
108
- radius: i === "circle" ? "xl" : "sm",
109
- style: {
110
- cursor: "pointer",
111
- color: "var(--mantine-color-white)"
87
+ radius: "xl",
88
+ variant: "default",
89
+ color: "gray",
90
+ onClick: () => b(!0),
91
+ children: /* @__PURE__ */ e(U, { size: 16 })
92
+ }
93
+ )
94
+ ]
112
95
  },
113
- ...c,
114
- children: [
115
- r && /* @__PURE__ */ o(
116
- "span",
117
- {
118
- style: {
119
- position: "absolute",
120
- top: -4,
121
- left: -4,
122
- right: -4,
123
- bottom: -4,
124
- border: `2px solid ${e ? C(e, n) : ""}`,
125
- borderRadius: i === "circle" ? "var(--mantine-radius-xl)" : "var(--mantine-radius-sm)",
126
- pointerEvents: "none",
127
- boxSizing: "border-box"
96
+ 2
97
+ );
98
+ }
99
+ ), k = y(
100
+ ({ value: o, label: l, isActive: n, swatchShape: s, swatchVariant: a = "filled", withTick: m, borderColor: d, bgColor: p, ...i }, u) => {
101
+ const f = w(), r = o ? E(o, f) : "", t = a === "outline";
102
+ return /* @__PURE__ */ e(C, { w: i.size || 24, h: i.size || 24, justify: "center", align: "center", style: { position: "relative" }, children: /* @__PURE__ */ e(R, { label: l || o || "", withArrow: !0, children: /* @__PURE__ */ h(
103
+ D,
104
+ {
105
+ ref: u,
106
+ color: t ? "transparent" : r,
107
+ radius: s === "circle" ? "xl" : "sm",
108
+ styles: t ? {
109
+ alphaOverlay: { display: "none" },
110
+ shadowOverlay: { display: "none" }
111
+ } : void 0,
112
+ style: {
113
+ cursor: "pointer",
114
+ color: "var(--mantine-color-white)",
115
+ background: t ? p || `var(--mantine-color-${o}-light, ${r}20)` : void 0,
116
+ border: t ? `2px solid ${d || `var(--mantine-color-${o}-outline, ${r})`}` : void 0
117
+ },
118
+ ...i,
119
+ children: [
120
+ n && /* @__PURE__ */ e(
121
+ "span",
122
+ {
123
+ style: {
124
+ position: "absolute",
125
+ top: -4,
126
+ left: -4,
127
+ right: -4,
128
+ bottom: -4,
129
+ border: `2px solid ${r}`,
130
+ borderRadius: s === "circle" ? "var(--mantine-radius-xl)" : "var(--mantine-radius-sm)",
131
+ pointerEvents: "none",
132
+ boxSizing: "border-box"
133
+ }
128
134
  }
129
- }
130
- ),
131
- s && r && /* @__PURE__ */ o(z, { size: 20, icon: T })
132
- ]
133
- }
134
- ) }) });
135
- }, F = v(g)`
135
+ ),
136
+ m && n && /* @__PURE__ */ e(A, { size: 20, icon: j })
137
+ ]
138
+ }
139
+ ) }) });
140
+ }
141
+ ), J = V(k)`
136
142
  .mantine-ColorSwatch-colorOverlay {
137
- border-radius: ${({ swatchShape: e }) => e === "square" ? "3px" : "50%"};
143
+ border-radius: ${({ swatchShape: o }) => o === "square" ? "3px" : "50%"};
138
144
  }
139
- `, N = Object.assign(D, {
140
- ColorCircle: g
145
+ `, lo = Object.assign(G, {
146
+ ColorCircle: k,
147
+ List: _,
148
+ Toolbar: q
141
149
  });
142
150
  export {
143
- g as ColorCircle,
144
- N as ColorPicker
151
+ k as ColorCircle,
152
+ lo as ColorPicker
145
153
  };
@@ -0,0 +1,31 @@
1
+ const t = "_section_tyqb8_3", i = "_sectionLabel_tyqb8_29", n = "_listItem_tyqb8_91", e = "_listItemActive_tyqb8_143", c = "_listItemLabel_tyqb8_151", l = "_listItemSwatch_tyqb8_167", _ = "_grid_tyqb8_183", s = "_inlineSection_tyqb8_323", o = "_inlineSectionLabel_tyqb8_343", a = "_inlineRow_tyqb8_359", b = "_inlineSwatch_tyqb8_377", S = "_inlineSwatchActive_tyqb8_429", w = "_inlineSwatchRound_tyqb8_449", y = {
2
+ section: t,
3
+ sectionLabel: i,
4
+ listItem: n,
5
+ listItemActive: e,
6
+ listItemLabel: c,
7
+ listItemSwatch: l,
8
+ grid: _,
9
+ inlineSection: s,
10
+ inlineSectionLabel: o,
11
+ inlineRow: a,
12
+ inlineSwatch: b,
13
+ inlineSwatchActive: S,
14
+ inlineSwatchRound: w
15
+ };
16
+ export {
17
+ y as default,
18
+ _ as grid,
19
+ a as inlineRow,
20
+ s as inlineSection,
21
+ o as inlineSectionLabel,
22
+ b as inlineSwatch,
23
+ S as inlineSwatchActive,
24
+ w as inlineSwatchRound,
25
+ n as listItem,
26
+ e as listItemActive,
27
+ c as listItemLabel,
28
+ l as listItemSwatch,
29
+ t as section,
30
+ i as sectionLabel
31
+ };
@@ -0,0 +1,6 @@
1
+ import type { ColorPickerListProps } from './types';
2
+ /** Vertical list or multi-column grid with sections.
3
+ * Use in drawers, mobile menus, slash-menu dropdowns.
4
+ * columns=1 (default) = vertical list, columns=2+ = grid layout. */
5
+ export declare function ColorPickerList({ sections, colors, value, onChange, columns, withRecentColors, }: ColorPickerListProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=ColorPickerList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPickerList.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerList.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAgB,MAAM,SAAS,CAAC;AA8GlE;;oEAEoE;AACpE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,OAAW,EACX,gBAAgB,GACjB,EAAE,oBAAoB,2CA4CtB"}