@layers-app/shared 0.3.6 → 0.3.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.
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +10 -10
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +2 -2
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +4 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +22 -15
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -21
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +48 -91
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +3 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +89 -63
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +35 -26
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +43 -36
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +6 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +16 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +4 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +59 -20
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +22 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +19 -21
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +136 -144
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +3 -4
- package/dist/components/CommentComposer/index.js +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +13 -12
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EmojiPicker/IconsPanel.js +13 -13
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +43 -33
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
- package/dist/components/FilePicker/FilePicker.d.ts +2 -4
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +226 -241
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -14
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +34 -60
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +39 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +26 -29
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +43 -42
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +35 -51
- package/dist/components/FilePicker/index.d.ts +0 -1
- package/dist/components/FilePicker/index.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/helpers/conditions.d.ts +38 -38
- package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
- package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +4 -3
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +248 -248
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
- package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
- package/dist/components/FormViewer/types/form.d.ts +1 -1
- package/dist/components/FormViewer/types/form.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.d.ts +381 -6358
- package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +3 -1
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +24 -21
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MediaLibrary/MediaLibraryRow.js +7 -7
- package/dist/components/NavMenu/NavMenu.d.ts +3 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +7 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +21 -23
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NewColorPicker/components/Target.d.ts +3 -1
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +48 -43
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.js +3 -1
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/Notification/NotificationCard.d.ts +3 -1
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +87 -86
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
- package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
- package/dist/components/OnBoarding/styles.module.css.js +7 -7
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +70 -74
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +7 -12
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +58 -60
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
- package/dist/components/UserAvatar/index.d.ts +2 -1
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +38 -35
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +19 -18
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/brand.js +8 -8
- package/dist/config/envConfig.d.ts +8 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +21 -13
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +63 -45
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +29 -8
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/offlineSuppression.d.ts +3 -0
- package/dist/helpers/offlineSuppression.d.ts.map +1 -0
- package/dist/helpers/offlineSuppression.js +8 -0
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +5 -4
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +30 -29
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +498 -509
- package/dist/lang/locales/ui_en.json.js +18 -20
- package/dist/lang/locales/ui_es.json.js +12 -14
- package/dist/lang/locales/ui_ru.json.js +13 -15
- package/dist/node_modules/countries-and-timezones/esm/index.js +281 -4011
- package/docs/README.md +499 -499
- package/package.json +75 -75
- package/dist/components/ColorPicker/ColorPicker.module.css.js +0 -31
- package/dist/components/ColorPicker/ColorPickerList.d.ts +0 -6
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerList.js +0 -134
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +0 -13
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +0 -149
- package/dist/components/ColorPicker/icons.d.ts +0 -11
- package/dist/components/ColorPicker/icons.d.ts.map +0 -1
- package/dist/components/ColorPicker/icons.js +0 -71
- package/dist/components/ColorPicker/types.d.ts +0 -49
- package/dist/components/ColorPicker/types.d.ts.map +0 -1
- package/dist/components/ColorPicker/types.js +0 -10
- package/dist/components/ColorPicker/useRecentColors.d.ts +0 -13
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +0 -1
- package/dist/components/ColorPicker/useRecentColors.js +0 -39
- package/dist/components/FilePicker/coverCollections.d.ts +0 -4
- package/dist/components/FilePicker/coverCollections.d.ts.map +0 -1
- package/dist/components/FilePicker/coverCollections.js +0 -164
package/package.json
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@layers-app/shared",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Shared components, hooks, and utilities for Layers application",
|
|
5
|
-
"files": [
|
|
6
|
-
"dist",
|
|
7
|
-
"docs"
|
|
8
|
-
],
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"type": "module",
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"module": "dist/index.js",
|
|
15
|
-
"types": "dist/index.d.ts",
|
|
16
|
-
"sideEffects": [
|
|
17
|
-
"**/*.css"
|
|
18
|
-
],
|
|
19
|
-
"exports": {
|
|
20
|
-
".": {
|
|
21
|
-
"import": "./dist/index.js",
|
|
22
|
-
"types": "./dist/index.d.ts"
|
|
23
|
-
},
|
|
24
|
-
"./styles": "./dist/index.css",
|
|
25
|
-
"./dist/*": "./dist/*",
|
|
26
|
-
"./assets/*": "./src/assets/*",
|
|
27
|
-
"./package.json": "./package.json"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "
|
|
31
|
-
"check:ts": "tsc --noEmit",
|
|
32
|
-
"prePublish": "vite build && npm version patch",
|
|
33
|
-
"watch": "vite build --watch"
|
|
34
|
-
},
|
|
35
|
-
"peerDependencies": {
|
|
36
|
-
"@gfazioli/mantine-onboarding-tour": "^
|
|
37
|
-
"@dnd-kit/core": "^6.0.0",
|
|
38
|
-
"@dnd-kit/sortable": "^8.0.0",
|
|
39
|
-
"@dnd-kit/utilities": "^3.2.0",
|
|
40
|
-
"@mantine/core": "
|
|
41
|
-
"@mantine/dates": "
|
|
42
|
-
"@mantine/dropzone": "
|
|
43
|
-
"@mantine/form": "
|
|
44
|
-
"@mantine/hooks": "
|
|
45
|
-
"@mantine/modals": "
|
|
46
|
-
"@mantine/notifications": "
|
|
47
|
-
"@reduxjs/toolkit": "^2.2.7",
|
|
48
|
-
"@tabler/icons-react": "^3.7.0",
|
|
49
|
-
"@tabler/icons-sprite": "^3.29.0",
|
|
50
|
-
"@tanstack/react-query": "^5.52.2",
|
|
51
|
-
"@tanstack/virtual-core": "^3.0.0",
|
|
52
|
-
"chroma-js": "^3.1.2",
|
|
53
|
-
"date-fns": "^4.1.0",
|
|
54
|
-
"draggable-ui": "^0.0.1",
|
|
55
|
-
"emoji-mart": "^5.6.0",
|
|
56
|
-
"@emoji-mart/data": "^1.2.1",
|
|
57
|
-
"exceljs": "^4.3.0",
|
|
58
|
-
"framer-motion": "^11.3.24",
|
|
59
|
-
"fuse.js": "^7.1.0",
|
|
60
|
-
"i18next": "^25.5.2",
|
|
61
|
-
"lodash-es": "^4.17.21",
|
|
62
|
-
"query-string": "^9.1.0",
|
|
63
|
-
"react": "^
|
|
64
|
-
"react-dom": "^
|
|
65
|
-
"react-helmet": "^6.1.0",
|
|
66
|
-
"react-i18next": "^15.7.3",
|
|
67
|
-
"react-router-dom": "^7.5.2",
|
|
68
|
-
"react-zoom-pan-pinch": "^3.0.0",
|
|
69
|
-
"shaka-player": "^4.0.0",
|
|
70
|
-
"shaka-player-react": "^1.1.5",
|
|
71
|
-
"styled-components": "^6.0.0",
|
|
72
|
-
"zod": "^
|
|
73
|
-
"zustand": "^5.0.3"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@layers-app/shared",
|
|
3
|
+
"version": "0.3.8",
|
|
4
|
+
"description": "Shared components, hooks, and utilities for Layers application",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"docs"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"module": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./styles": "./dist/index.css",
|
|
25
|
+
"./dist/*": "./dist/*",
|
|
26
|
+
"./assets/*": "./src/assets/*",
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "NODE_OPTIONS='--max-old-space-size=8192' vite build && tsc --project tsconfig.build.json",
|
|
31
|
+
"check:ts": "tsc --noEmit",
|
|
32
|
+
"prePublish": "vite build && npm version patch",
|
|
33
|
+
"watch": "vite build --watch"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@gfazioli/mantine-onboarding-tour": "^3.1.0",
|
|
37
|
+
"@dnd-kit/core": "^6.0.0",
|
|
38
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
39
|
+
"@dnd-kit/utilities": "^3.2.0",
|
|
40
|
+
"@mantine/core": ">=9.0.0",
|
|
41
|
+
"@mantine/dates": ">=9.0.0",
|
|
42
|
+
"@mantine/dropzone": ">=9.0.0",
|
|
43
|
+
"@mantine/form": ">=9.0.0",
|
|
44
|
+
"@mantine/hooks": ">=9.0.0",
|
|
45
|
+
"@mantine/modals": ">=9.0.0",
|
|
46
|
+
"@mantine/notifications": ">=9.0.0",
|
|
47
|
+
"@reduxjs/toolkit": "^2.2.7",
|
|
48
|
+
"@tabler/icons-react": "^3.7.0",
|
|
49
|
+
"@tabler/icons-sprite": "^3.29.0",
|
|
50
|
+
"@tanstack/react-query": "^5.52.2",
|
|
51
|
+
"@tanstack/virtual-core": "^3.0.0",
|
|
52
|
+
"chroma-js": "^3.1.2",
|
|
53
|
+
"date-fns": "^4.1.0",
|
|
54
|
+
"draggable-ui": "^0.0.1",
|
|
55
|
+
"emoji-mart": "^5.6.0",
|
|
56
|
+
"@emoji-mart/data": "^1.2.1",
|
|
57
|
+
"exceljs": "^4.3.0",
|
|
58
|
+
"framer-motion": "^11.3.24",
|
|
59
|
+
"fuse.js": "^7.1.0",
|
|
60
|
+
"i18next": "^25.5.2",
|
|
61
|
+
"lodash-es": "^4.17.21",
|
|
62
|
+
"query-string": "^9.1.0",
|
|
63
|
+
"react": "^19.2.0",
|
|
64
|
+
"react-dom": "^19.2.0",
|
|
65
|
+
"react-helmet": "^6.1.0",
|
|
66
|
+
"react-i18next": "^15.7.3",
|
|
67
|
+
"react-router-dom": "^7.5.2",
|
|
68
|
+
"react-zoom-pan-pinch": "^3.0.0",
|
|
69
|
+
"shaka-player": "^4.0.0",
|
|
70
|
+
"shaka-player-react": "^1.1.5",
|
|
71
|
+
"styled-components": "^6.0.0",
|
|
72
|
+
"zod": "^4.0.0",
|
|
73
|
+
"zustand": "^5.0.3"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const i = "_section_14k6i_3", t = "_sectionLabel_14k6i_29", n = "_listItem_14k6i_91", e = "_listItemActive_14k6i_143", c = "_listItemLabel_14k6i_151", l = "_listItemSwatch_14k6i_167", _ = "_grid_14k6i_183", s = "_inlineSection_14k6i_323", o = "_inlineSectionLabel_14k6i_343", a = "_inlineRow_14k6i_359", S = "_inlineSwatch_14k6i_377", w = "_inlineSwatchActive_14k6i_427", k = "_inlineSwatchRound_14k6i_439", h = {
|
|
2
|
-
section: i,
|
|
3
|
-
sectionLabel: t,
|
|
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: S,
|
|
13
|
-
inlineSwatchActive: w,
|
|
14
|
-
inlineSwatchRound: k
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
h as default,
|
|
18
|
-
_ as grid,
|
|
19
|
-
a as inlineRow,
|
|
20
|
-
s as inlineSection,
|
|
21
|
-
o as inlineSectionLabel,
|
|
22
|
-
S as inlineSwatch,
|
|
23
|
-
w as inlineSwatchActive,
|
|
24
|
-
k as inlineSwatchRound,
|
|
25
|
-
n as listItem,
|
|
26
|
-
e as listItemActive,
|
|
27
|
-
c as listItemLabel,
|
|
28
|
-
l as listItemSwatch,
|
|
29
|
-
i as section,
|
|
30
|
-
t as sectionLabel
|
|
31
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { jsxs as y, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Tick02Icon as C } from "@hugeicons/core-free-icons";
|
|
3
|
-
import { HugeiconsIcon as I } from "@hugeicons/react";
|
|
4
|
-
import { useMantineColorScheme as g, Box as k, useMantineTheme as x, getThemeColor as F, ColorSwatch as N } from "@mantine/core";
|
|
5
|
-
import { TextColorIcon as S } from "./icons.js";
|
|
6
|
-
import { isDefaultColor as b, normalizeColorItem as L } from "./types.js";
|
|
7
|
-
import { useRecentColors as T } from "./useRecentColors.js";
|
|
8
|
-
import i from "./ColorPicker.module.css.js";
|
|
9
|
-
function z({
|
|
10
|
-
type: e,
|
|
11
|
-
colorValue: l,
|
|
12
|
-
resolvedColor: a,
|
|
13
|
-
border: s,
|
|
14
|
-
bg: c
|
|
15
|
-
}) {
|
|
16
|
-
if (e === "text")
|
|
17
|
-
return /* @__PURE__ */ t(
|
|
18
|
-
S,
|
|
19
|
-
{
|
|
20
|
-
size: 16,
|
|
21
|
-
color: a,
|
|
22
|
-
showBorder: !0
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
const n = b(l);
|
|
26
|
-
return /* @__PURE__ */ t(
|
|
27
|
-
N,
|
|
28
|
-
{
|
|
29
|
-
color: n ? "var(--mantine-color-body)" : c || s || l,
|
|
30
|
-
size: 16,
|
|
31
|
-
radius: "xl",
|
|
32
|
-
className: i.listItemSwatch,
|
|
33
|
-
styles: {
|
|
34
|
-
root: {
|
|
35
|
-
border: `1.5px solid ${n ? "var(--mantine-color-default-border)" : s || a}`
|
|
36
|
-
},
|
|
37
|
-
alphaOverlay: { display: "none" },
|
|
38
|
-
shadowOverlay: { display: "none" }
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
function v({
|
|
44
|
-
section: e,
|
|
45
|
-
columns: l,
|
|
46
|
-
onChange: a,
|
|
47
|
-
isDark: s
|
|
48
|
-
}) {
|
|
49
|
-
const c = x(), n = l > 1;
|
|
50
|
-
return /* @__PURE__ */ y("div", { className: i.section, children: [
|
|
51
|
-
e.label && /* @__PURE__ */ t("div", { className: i.sectionLabel, children: e.label }),
|
|
52
|
-
/* @__PURE__ */ t(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
className: n ? i.grid : void 0,
|
|
56
|
-
style: n ? { gridTemplateColumns: `repeat(${l}, minmax(0, 1fr))` } : void 0,
|
|
57
|
-
children: e.colors.map((p) => {
|
|
58
|
-
const { value: r, label: m, border: f, bg: d } = L(p), h = b(r), o = r === e.value, u = h ? s ? "#FFFFFF" : "#000000" : F(r, c);
|
|
59
|
-
return /* @__PURE__ */ y(
|
|
60
|
-
"button",
|
|
61
|
-
{
|
|
62
|
-
type: "button",
|
|
63
|
-
className: `${i.listItem} ${o ? i.listItemActive : ""}`,
|
|
64
|
-
onClick: () => a(r, e.key),
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ t(
|
|
67
|
-
z,
|
|
68
|
-
{
|
|
69
|
-
type: e.type,
|
|
70
|
-
colorValue: r,
|
|
71
|
-
resolvedColor: u,
|
|
72
|
-
border: f,
|
|
73
|
-
bg: d
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ t("span", { className: i.listItemLabel, children: m }),
|
|
77
|
-
o && /* @__PURE__ */ t(
|
|
78
|
-
I,
|
|
79
|
-
{
|
|
80
|
-
size: 16,
|
|
81
|
-
icon: C,
|
|
82
|
-
color: "var(--mantine-primary-color-filled)"
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
r
|
|
88
|
-
);
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
] });
|
|
93
|
-
}
|
|
94
|
-
function R({
|
|
95
|
-
sections: e,
|
|
96
|
-
colors: l,
|
|
97
|
-
value: a,
|
|
98
|
-
onChange: s,
|
|
99
|
-
columns: c = 1,
|
|
100
|
-
withRecentColors: n
|
|
101
|
-
}) {
|
|
102
|
-
const { colorScheme: p } = g(), r = p === "dark", { recentColors: m, addRecent: f } = T(), d = (o, u) => {
|
|
103
|
-
n && f(o, u), s?.(o, u);
|
|
104
|
-
}, h = e || (l ? [{ key: "default", label: "", colors: l, value: a }] : []);
|
|
105
|
-
return /* @__PURE__ */ y(k, { children: [
|
|
106
|
-
n && m.length > 0 && /* @__PURE__ */ t(
|
|
107
|
-
v,
|
|
108
|
-
{
|
|
109
|
-
section: {
|
|
110
|
-
key: "__recent",
|
|
111
|
-
label: "Recently used",
|
|
112
|
-
colors: m.map((o) => o.value),
|
|
113
|
-
value: a
|
|
114
|
-
},
|
|
115
|
-
columns: 1,
|
|
116
|
-
onChange: d,
|
|
117
|
-
isDark: r
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
h.map((o) => /* @__PURE__ */ t(
|
|
121
|
-
v,
|
|
122
|
-
{
|
|
123
|
-
section: o,
|
|
124
|
-
columns: c,
|
|
125
|
-
onChange: d,
|
|
126
|
-
isDark: r
|
|
127
|
-
},
|
|
128
|
-
o.key
|
|
129
|
-
))
|
|
130
|
-
] });
|
|
131
|
-
}
|
|
132
|
-
export {
|
|
133
|
-
R as ColorPickerList
|
|
134
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ColorPickerOnChange, ColorSection } from './types';
|
|
2
|
-
/** Toolbar dropdown with text colors (A icons) + highlights (circles) + recently used.
|
|
3
|
-
* Use inside Menu.Dropdown, Popover, or floating toolbar. */
|
|
4
|
-
export interface ColorPickerToolbarProps {
|
|
5
|
-
sections: ColorSection[];
|
|
6
|
-
onChange: ColorPickerOnChange;
|
|
7
|
-
withRecentColors?: boolean;
|
|
8
|
-
maxRecentColors?: number;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
recentColorsLabel?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const ColorPickerToolbar: import("react").ForwardRefExoticComponent<ColorPickerToolbarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
-
//# sourceMappingURL=ColorPickerToolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerToolbar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMjE;6DAC6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsCD,eAAO,MAAM,kBAAkB,oHA2K7B,CAAC"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as z, useState as H, useCallback as w, useMemo as I } from "react";
|
|
3
|
-
import { useMantineColorScheme as j, Box as h, Flex as B, Tooltip as P, UnstyledButton as U } from "@mantine/core";
|
|
4
|
-
import { TextColorIcon as K, HighlightSwatch as D } from "./icons.js";
|
|
5
|
-
import { normalizeColorItem as $, isDefaultColor as q } from "./types.js";
|
|
6
|
-
import { useRecentColors as E } from "./useRecentColors.js";
|
|
7
|
-
import c from "./ColorPicker.module.css.js";
|
|
8
|
-
function k({
|
|
9
|
-
isActive: s,
|
|
10
|
-
round: m,
|
|
11
|
-
disabled: u,
|
|
12
|
-
onClick: d,
|
|
13
|
-
children: i,
|
|
14
|
-
tooltipLabel: f
|
|
15
|
-
}) {
|
|
16
|
-
const v = /* @__PURE__ */ r(
|
|
17
|
-
U,
|
|
18
|
-
{
|
|
19
|
-
type: "button",
|
|
20
|
-
className: `${c.inlineSwatch}${m ? ` ${c.inlineSwatchRound}` : ""}${s ? ` ${c.inlineSwatchActive}` : ""}`,
|
|
21
|
-
onMouseDown: (C) => C.preventDefault(),
|
|
22
|
-
onClick: d,
|
|
23
|
-
disabled: u,
|
|
24
|
-
children: i
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
return f ? /* @__PURE__ */ r(P, { label: f, withArrow: !0, children: v }) : v;
|
|
28
|
-
}
|
|
29
|
-
const Y = z(({ sections: s, onChange: m, withRecentColors: u, maxRecentColors: d = 9, disabled: i, recentColorsLabel: f = "Recently used" }, v) => {
|
|
30
|
-
const { colorScheme: C } = j(), x = C === "dark", { recentColors: M, addRecent: F } = E({ maxItems: d }), [L, T] = H(M), p = w(
|
|
31
|
-
(e, o, t) => {
|
|
32
|
-
u && (F(e, o, t), T((l) => {
|
|
33
|
-
const n = l.filter(
|
|
34
|
-
(a) => !(a.value === e && a.sectionKey === o)
|
|
35
|
-
);
|
|
36
|
-
return [{ value: e, sectionKey: o, border: t }, ...n].slice(0, d);
|
|
37
|
-
})), m(e, o);
|
|
38
|
-
},
|
|
39
|
-
[m, u, F]
|
|
40
|
-
), g = I(() => {
|
|
41
|
-
const e = {};
|
|
42
|
-
for (const o of s) e[o.key] = o;
|
|
43
|
-
return e;
|
|
44
|
-
}, [s]), y = w(
|
|
45
|
-
(e, o) => {
|
|
46
|
-
if (!o) return;
|
|
47
|
-
const t = g[o];
|
|
48
|
-
if (!t) return;
|
|
49
|
-
const l = t.colors.find((b) => $(b).value === e);
|
|
50
|
-
if (!l) return;
|
|
51
|
-
const { label: n, value: a } = $(l);
|
|
52
|
-
return n || a;
|
|
53
|
-
},
|
|
54
|
-
[g]
|
|
55
|
-
), N = w(
|
|
56
|
-
(e) => q(e) ? x ? "#FFFFFF" : "#000000" : e,
|
|
57
|
-
[x]
|
|
58
|
-
);
|
|
59
|
-
return /* @__PURE__ */ S(h, { ref: v, children: [
|
|
60
|
-
u && L.length > 0 && /* @__PURE__ */ S(h, { className: c.inlineSection, children: [
|
|
61
|
-
/* @__PURE__ */ r(h, { className: c.inlineSectionLabel, children: f }),
|
|
62
|
-
/* @__PURE__ */ r(B, { className: c.inlineRow, gap: 2, children: L.map((e, o) => {
|
|
63
|
-
const t = e.sectionKey ? g[e.sectionKey] : void 0, l = t?.key === "textColor" || t?.key === "color" || e.sectionKey === "color", n = y(e.value, e.sectionKey);
|
|
64
|
-
return l ? /* @__PURE__ */ r(
|
|
65
|
-
k,
|
|
66
|
-
{
|
|
67
|
-
isActive: !1,
|
|
68
|
-
disabled: i,
|
|
69
|
-
tooltipLabel: n,
|
|
70
|
-
onClick: () => p(e.value, e.sectionKey ?? ""),
|
|
71
|
-
children: /* @__PURE__ */ r(
|
|
72
|
-
K,
|
|
73
|
-
{
|
|
74
|
-
size: 20,
|
|
75
|
-
color: N(e.value),
|
|
76
|
-
showBorder: !0
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
},
|
|
80
|
-
`${e.sectionKey}-${e.value}-${o}`
|
|
81
|
-
) : /* @__PURE__ */ r(
|
|
82
|
-
k,
|
|
83
|
-
{
|
|
84
|
-
isActive: !1,
|
|
85
|
-
round: !0,
|
|
86
|
-
disabled: i,
|
|
87
|
-
tooltipLabel: n,
|
|
88
|
-
onClick: () => p(e.value, e.sectionKey ?? ""),
|
|
89
|
-
children: /* @__PURE__ */ r(
|
|
90
|
-
D,
|
|
91
|
-
{
|
|
92
|
-
bgColor: e.value,
|
|
93
|
-
borderColor: e.border || "var(--mantine-color-default-border)"
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
},
|
|
97
|
-
`${e.sectionKey}-${e.value}-${o}`
|
|
98
|
-
);
|
|
99
|
-
}) })
|
|
100
|
-
] }),
|
|
101
|
-
s.map((e) => {
|
|
102
|
-
const o = e.key === "highlight" || e.key === "background" || e.key === "textHighlight";
|
|
103
|
-
return /* @__PURE__ */ S(h, { className: c.inlineSection, children: [
|
|
104
|
-
e.label && /* @__PURE__ */ r(h, { className: c.inlineSectionLabel, children: e.label }),
|
|
105
|
-
/* @__PURE__ */ r(B, { className: c.inlineRow, gap: 2, children: e.colors.map((t) => {
|
|
106
|
-
const { value: l, border: n, label: a } = $(t), b = l === e.value, R = N(l), A = a || l;
|
|
107
|
-
return o ? /* @__PURE__ */ r(
|
|
108
|
-
k,
|
|
109
|
-
{
|
|
110
|
-
isActive: b,
|
|
111
|
-
round: !0,
|
|
112
|
-
disabled: i,
|
|
113
|
-
tooltipLabel: A,
|
|
114
|
-
onClick: () => p(l, e.key, n),
|
|
115
|
-
children: /* @__PURE__ */ r(
|
|
116
|
-
D,
|
|
117
|
-
{
|
|
118
|
-
bgColor: l,
|
|
119
|
-
borderColor: n || R
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
},
|
|
123
|
-
l
|
|
124
|
-
) : /* @__PURE__ */ r(
|
|
125
|
-
k,
|
|
126
|
-
{
|
|
127
|
-
isActive: b,
|
|
128
|
-
disabled: i,
|
|
129
|
-
tooltipLabel: A,
|
|
130
|
-
onClick: () => p(l, e.key),
|
|
131
|
-
children: /* @__PURE__ */ r(
|
|
132
|
-
K,
|
|
133
|
-
{
|
|
134
|
-
size: 20,
|
|
135
|
-
color: R,
|
|
136
|
-
showBorder: !0
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
},
|
|
140
|
-
l
|
|
141
|
-
);
|
|
142
|
-
}) })
|
|
143
|
-
] }, e.key);
|
|
144
|
-
})
|
|
145
|
-
] });
|
|
146
|
-
});
|
|
147
|
-
export {
|
|
148
|
-
Y as ColorPickerToolbar
|
|
149
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function TextColorIcon({ size, color, showBorder, }: {
|
|
2
|
-
size?: number;
|
|
3
|
-
color?: string;
|
|
4
|
-
showBorder?: boolean;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function HighlightSwatch({ size, bgColor, borderColor, }: {
|
|
7
|
-
size?: number;
|
|
8
|
-
bgColor: string;
|
|
9
|
-
borderColor: string;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/icons.tsx"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,EAC5B,IAAS,EACT,KAAoC,EACpC,UAAU,GACX,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,2CAgCA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAS,EACT,OAAO,EACP,WAAW,GACZ,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,2CA4BA"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
function s({
|
|
3
|
-
size: t = 20,
|
|
4
|
-
color: r = "var(--mantine-color-white)",
|
|
5
|
-
showBorder: e
|
|
6
|
-
}) {
|
|
7
|
-
return /* @__PURE__ */ c(
|
|
8
|
-
"svg",
|
|
9
|
-
{
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
width: t,
|
|
12
|
-
height: t,
|
|
13
|
-
viewBox: "0 0 20 20",
|
|
14
|
-
fill: "none",
|
|
15
|
-
children: [
|
|
16
|
-
e && /* @__PURE__ */ n(
|
|
17
|
-
"rect",
|
|
18
|
-
{
|
|
19
|
-
x: "0.5",
|
|
20
|
-
y: "0.5",
|
|
21
|
-
width: "19",
|
|
22
|
-
height: "19",
|
|
23
|
-
rx: "5.5",
|
|
24
|
-
stroke: "var(--mantine-color-default-border)",
|
|
25
|
-
strokeWidth: "1",
|
|
26
|
-
fill: "none"
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
/* @__PURE__ */ n("g", { transform: "translate(4.3, 2.85) scale(0.95)", children: /* @__PURE__ */ n(
|
|
30
|
-
"path",
|
|
31
|
-
{
|
|
32
|
-
d: "M5.74945 0C6.57421 0 7.09678 0.678265 7.50336 1.43555C7.93323 2.23628 8.38332 3.42022 8.95843 4.92676L11.4623 11.4873C11.5716 11.7742 11.4279 12.0955 11.1411 12.2051C10.8541 12.3144 10.5329 12.1706 10.4233 11.8838L8.5766 7.04883H2.9223L1.07562 11.8838C0.965974 12.1707 0.644849 12.3146 0.357848 12.2051C0.0710441 12.0955 -0.0726477 11.7742 0.0365593 11.4873L2.54047 4.92676C3.11563 3.42012 3.56662 2.23629 3.99652 1.43555C4.40306 0.678393 4.92485 8.51363e-05 5.74945 0ZM5.74945 1.11328C5.62925 1.11335 5.38778 1.19685 4.97699 1.96191C4.5893 2.68404 4.16803 3.7852 3.5805 5.32422L3.34711 5.93555H8.15179L7.9184 5.32422C7.33089 3.78522 6.9096 2.68403 6.52191 1.96191C6.11099 1.19664 5.86959 1.11328 5.74945 1.11328Z",
|
|
33
|
-
fill: r === "inherit" || r === "currentColor" ? "var(--mantine-color-white)" : r
|
|
34
|
-
}
|
|
35
|
-
) })
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
function d({
|
|
41
|
-
size: t = 24,
|
|
42
|
-
bgColor: r,
|
|
43
|
-
borderColor: e
|
|
44
|
-
}) {
|
|
45
|
-
const o = r === "inherit" || r === "" || r === "default", i = t * 0.375, l = o ? "var(--mantine-color-body)" : r, h = o ? "var(--mantine-color-default-border)" : e;
|
|
46
|
-
return /* @__PURE__ */ n(
|
|
47
|
-
"svg",
|
|
48
|
-
{
|
|
49
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
50
|
-
width: t,
|
|
51
|
-
height: t,
|
|
52
|
-
viewBox: `0 0 ${t} ${t}`,
|
|
53
|
-
fill: "none",
|
|
54
|
-
children: /* @__PURE__ */ n(
|
|
55
|
-
"circle",
|
|
56
|
-
{
|
|
57
|
-
cx: t / 2,
|
|
58
|
-
cy: t / 2,
|
|
59
|
-
r: i,
|
|
60
|
-
fill: l,
|
|
61
|
-
stroke: h,
|
|
62
|
-
strokeWidth: "1.5"
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
d as HighlightSwatch,
|
|
70
|
-
s as TextColorIcon
|
|
71
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FlexProps } from '@mantine/core';
|
|
2
|
-
export type ColorItem = string | {
|
|
3
|
-
value: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
border?: string;
|
|
6
|
-
bg?: string;
|
|
7
|
-
};
|
|
8
|
-
export interface ColorSection {
|
|
9
|
-
key: string;
|
|
10
|
-
label: string;
|
|
11
|
-
colors: ColorItem[];
|
|
12
|
-
value?: string;
|
|
13
|
-
type?: 'text' | 'highlight';
|
|
14
|
-
}
|
|
15
|
-
export interface RecentColorEntry {
|
|
16
|
-
value: string;
|
|
17
|
-
sectionKey?: string;
|
|
18
|
-
border?: string;
|
|
19
|
-
}
|
|
20
|
-
export type ColorPickerOnChange = (value: string, sectionKey?: string) => void;
|
|
21
|
-
export interface ColorPickerBaseProps {
|
|
22
|
-
colors?: ColorItem[];
|
|
23
|
-
sections?: ColorSection[];
|
|
24
|
-
value?: string;
|
|
25
|
-
onChange?: ColorPickerOnChange;
|
|
26
|
-
withRecentColors?: boolean;
|
|
27
|
-
maxRecentColors?: number;
|
|
28
|
-
swatchSize?: number;
|
|
29
|
-
withTick?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface ColorPickerInlineProps extends ColorPickerBaseProps, Omit<FlexProps, 'onChange'> {
|
|
32
|
-
swatchShape?: 'circle' | 'square';
|
|
33
|
-
fullWidth?: boolean;
|
|
34
|
-
allowCustomColor?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface ColorPickerListProps extends ColorPickerBaseProps {
|
|
37
|
-
columns?: number;
|
|
38
|
-
}
|
|
39
|
-
export interface ColorPickerCompactProps extends Omit<ColorPickerBaseProps, 'sections' | 'withRecentColors'>, Omit<FlexProps, 'onChange'> {
|
|
40
|
-
swatchShape?: 'circle' | 'square';
|
|
41
|
-
}
|
|
42
|
-
export declare function normalizeColorItem(item: ColorItem): {
|
|
43
|
-
value: string;
|
|
44
|
-
label: string;
|
|
45
|
-
border?: string;
|
|
46
|
-
bg?: string;
|
|
47
|
-
};
|
|
48
|
-
export declare function isDefaultColor(value: string): boolean;
|
|
49
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,CAChC,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;AAEV,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBACf,SAAQ,oBAAoB,EAC1B,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,kBAAkB,CAAC,EACjE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAKA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { RecentColorEntry } from './types';
|
|
2
|
-
interface UseRecentColorsOptions {
|
|
3
|
-
storageKey?: string;
|
|
4
|
-
maxItems?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function useRecentColors(options?: UseRecentColorsOptions): {
|
|
7
|
-
recentColors: RecentColorEntry[];
|
|
8
|
-
addRecent: (value: string, sectionKey?: string, border?: string) => void;
|
|
9
|
-
clearRecent: () => void;
|
|
10
|
-
reload: () => void;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=useRecentColors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRecentColors.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/useRecentColors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,sBAAsB;;uBAYpD,MAAM,eAAe,MAAM,WAAW,MAAM;;;EAsBvD"}
|