@vertesia/ui 0.79.0 → 0.79.1
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/lib/esm/core/components/Panel.js +8 -0
- package/lib/esm/core/components/Panel.js.map +1 -0
- package/lib/esm/core/components/SelectBox.js +1 -1
- package/lib/esm/core/components/SelectBox.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +2 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/index.js +1 -1
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/breadcrumb.js +29 -8
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +3 -2
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +2 -2
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +1 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -1
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/resizeable.js +2 -2
- package/lib/esm/core/components/shadcn/resizeable.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +15 -9
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +10 -3
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +7 -0
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -0
- package/lib/esm/core/hooks/CompositeState.js +139 -1
- package/lib/esm/core/hooks/CompositeState.js.map +1 -1
- package/lib/esm/core/hooks/index.js +1 -0
- package/lib/esm/core/hooks/index.js.map +1 -1
- package/lib/esm/core/hooks/useScrollableSearch.js +92 -0
- package/lib/esm/core/hooks/useScrollableSearch.js.map +1 -0
- package/lib/esm/env/index.js +1 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +80 -55
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +22 -24
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +15 -20
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +6 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/facets/CollectionsFacetsNav.js +19 -0
- package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/InteractionsFacetsNav.js +9 -3
- package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/utils/VTypeFacet.js +4 -1
- package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +58 -5
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +2 -2
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +29 -30
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +46 -45
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +35 -9
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentTable.js +6 -6
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +158 -114
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +5 -3
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +11 -2
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +2 -2
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +13 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +5 -5
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/layout/renderers.js +28 -12
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +5 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -2
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +2 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +10 -2
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +20 -2
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +15 -7
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +2 -0
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +25 -2
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +3 -3
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +1 -0
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +9 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +66 -67
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +17 -30
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/form/FormContext.js +4 -2
- package/lib/esm/widgets/form/FormContext.js.map +1 -1
- package/lib/esm/widgets/form/ManagedObject.js +4 -0
- package/lib/esm/widgets/form/ManagedObject.js.map +1 -1
- package/lib/esm/widgets/form/fields.js +4 -3
- package/lib/esm/widgets/form/fields.js.map +1 -1
- package/lib/esm/widgets/form/inputs.js +2 -0
- package/lib/esm/widgets/form/inputs.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/Panel.d.ts +11 -0
- package/lib/types/core/components/Panel.d.ts.map +1 -0
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +1 -1
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +3 -2
- package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +1 -0
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/selectBox.d.ts +3 -2
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +4 -0
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -0
- package/lib/types/core/hooks/CompositeState.d.ts +115 -6
- package/lib/types/core/hooks/CompositeState.d.ts.map +1 -1
- package/lib/types/core/hooks/index.d.ts +1 -0
- package/lib/types/core/hooks/index.d.ts.map +1 -1
- package/lib/types/core/hooks/useScrollableSearch.d.ts +82 -0
- package/lib/types/core/hooks/useScrollableSearch.d.ts.map +1 -0
- package/lib/types/env/index.d.ts +3 -1
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +11 -19
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts +1 -0
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts +6 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts +2 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/SelectCollection.d.ts +6 -4
- package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentTable.d.ts +4 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +3 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +2 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +4 -2
- package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +1 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +1 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +2 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/composable.d.ts.map +1 -1
- package/lib/types/widgets/form/Form.d.ts +2 -1
- package/lib/types/widgets/form/Form.d.ts.map +1 -1
- package/lib/types/widgets/form/FormContext.d.ts +5 -2
- package/lib/types/widgets/form/FormContext.d.ts.map +1 -1
- package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -1
- package/lib/types/widgets/form/fields.d.ts +2 -2
- package/lib/types/widgets/form/fields.d.ts.map +1 -1
- package/lib/types/widgets/form/inputs.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +166 -166
- package/src/core/components/Panel.tsx +34 -0
- package/src/core/components/SidePanel.tsx +5 -3
- package/src/core/components/index.ts +1 -1
- package/src/core/components/shadcn/breadcrumb.tsx +49 -30
- package/src/core/components/shadcn/button.tsx +3 -2
- package/src/core/components/shadcn/filters/filterBar.tsx +3 -3
- package/src/core/components/shadcn/index.ts +2 -1
- package/src/core/components/shadcn/input.tsx +10 -7
- package/src/core/components/shadcn/resizeable.tsx +4 -4
- package/src/core/components/shadcn/selectBox.tsx +87 -67
- package/src/core/components/shadcn/tabs.tsx +10 -3
- package/src/core/components/shadcn/textarea.tsx +21 -0
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/useScrollableSearch.tsx +193 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +109 -118
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +2 -22
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +1 -9
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +39 -55
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +1 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +8 -8
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +8 -8
- package/src/features/facets/CollectionsFacetsNav.tsx +21 -0
- package/src/features/facets/InteractionsFacetsNav.tsx +13 -3
- package/src/features/facets/utils/SearchInterface.tsx +5 -1
- package/src/features/facets/utils/VTypeFacet.tsx +6 -2
- package/src/features/layout/GenericPageNavHeader.tsx +73 -10
- package/src/features/store/collections/BrowseCollectionView.tsx +4 -0
- package/src/features/store/collections/CreateCollection.tsx +3 -4
- package/src/features/store/collections/EditCollectionView.tsx +91 -85
- package/src/features/store/collections/SelectCollection.tsx +105 -49
- package/src/features/store/objects/DocumentSearchResults.tsx +117 -51
- package/src/features/store/objects/DocumentTable.tsx +14 -4
- package/src/features/store/objects/components/ContentOverview.tsx +208 -110
- package/src/features/store/objects/components/DocumentIcon.tsx +11 -12
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +12 -2
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +16 -1
- package/src/features/store/objects/layout/documentLayout.tsx +7 -5
- package/src/features/store/objects/layout/knowledge.md +10 -10
- package/src/features/store/objects/layout/renderers.tsx +39 -18
- package/src/features/store/objects/search/DocumentSearchContext.ts +6 -1
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +1 -1
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +3 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +8 -2
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +22 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +18 -9
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +10 -7
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +1 -1
- package/src/router/HistoryNavigator.ts +33 -2
- package/src/router/Nav.tsx +4 -3
- package/src/widgets/form/Form.tsx +19 -43
- package/src/widgets/form/FormContext.ts +5 -2
- package/src/widgets/form/fields.tsx +8 -6
- package/src/widgets/form/inputs.tsx +1 -0
- package/lib/esm/core/components/Textarea.js +0 -15
- package/lib/esm/core/components/Textarea.js.map +0 -1
- package/lib/types/core/components/Textarea.d.ts +0 -8
- package/lib/types/core/components/Textarea.d.ts.map +0 -1
- package/src/core/components/Textarea.tsx +0 -25
package/package.json
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"@floating-ui/dom": "^1.7.1",
|
|
26
|
-
"@floating-ui/react": "^0.27.11",
|
|
27
|
-
"@headlessui/react": "^2.2.2",
|
|
28
|
-
"@monaco-editor/react": "^4.7.0",
|
|
29
|
-
"@radix-ui/react-checkbox": "^1.3.1",
|
|
30
|
-
"@radix-ui/react-dialog": "^1.1.13",
|
|
31
|
-
"@radix-ui/react-label": "^2.1.6",
|
|
32
|
-
"@radix-ui/react-popover": "^1.1.13",
|
|
33
|
-
"@radix-ui/react-separator": "^1.1.6",
|
|
34
|
-
"@radix-ui/react-slot": "^1.2.2",
|
|
35
|
-
"@radix-ui/react-tabs": "^1.1.11",
|
|
36
|
-
"@radix-ui/react-tooltip": "^1.2.6",
|
|
37
|
-
"ajv": "^8.16.0",
|
|
38
|
-
"class-variance-authority": "^0.7.1",
|
|
39
|
-
"clsx": "^2.1.1",
|
|
40
|
-
"cmdk": "^1.1.1",
|
|
41
|
-
"codemirror": "^6.0.1",
|
|
42
|
-
"dayjs": "^1.11.13",
|
|
43
|
-
"debounce": "^2.2.0",
|
|
44
|
-
"fast-xml-parser": "^5.2.3",
|
|
45
|
-
"firebase": "^10.12.2",
|
|
46
|
-
"framer-motion": "^12.23.12",
|
|
47
|
-
"json-schema": "^0.4.0",
|
|
48
|
-
"jwt-decode": "^4.0.0",
|
|
49
|
-
"lodash-es": "^4.17.21",
|
|
50
|
-
"lucide-react": "^0.511.0",
|
|
51
|
-
"monaco-editor": "^0.52.2",
|
|
52
|
-
"motion": "^12.12.1",
|
|
53
|
-
"react": "^19.1.0",
|
|
54
|
-
"react-calendar": "^6.0.0",
|
|
55
|
-
"react-date-picker": "^11.0.0",
|
|
56
|
-
"react-dom": "^19.1.0",
|
|
57
|
-
"react-error-boundary": "^6.0.0",
|
|
58
|
-
"react-markdown": "^10.1.0",
|
|
59
|
-
"react-resizable-panels": "^3.0.6",
|
|
60
|
-
"remark-gfm": "^4.0.1",
|
|
61
|
-
"tailwind-merge": "^3.3.0",
|
|
62
|
-
"ts-md5": "^1.3.1",
|
|
63
|
-
"unist-util-visit": "^5.0.0",
|
|
64
|
-
"@vertesia/client": "0.79.0",
|
|
65
|
-
"@vertesia/json": "0.79.0",
|
|
66
|
-
"@vertesia/common": "0.79.0"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@eslint/js": "^9.27.0",
|
|
70
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
71
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
72
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
73
|
-
"@types/json-schema": "^7.0.15",
|
|
74
|
-
"@types/lodash-es": "^4.17.12",
|
|
75
|
-
"@types/node": "^22.15.21",
|
|
76
|
-
"@types/react": "^19.1.0",
|
|
77
|
-
"@types/react-dom": "^19.1.1",
|
|
78
|
-
"eslint": "^9.27.0",
|
|
79
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
80
|
-
"eslint-plugin-import": "^2.32.0",
|
|
81
|
-
"eslint-plugin-react": "^7.37.5",
|
|
82
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
83
|
-
"rimraf": "^6.0.1",
|
|
84
|
-
"rollup": "^4.40.2",
|
|
85
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
86
|
-
"typescript": "~5.8.3",
|
|
87
|
-
"typescript-eslint": "^8.38.0",
|
|
88
|
-
"vitest": "^3.0.9"
|
|
89
|
-
},
|
|
90
|
-
"exports": {
|
|
91
|
-
"./router": {
|
|
92
|
-
"types": "./lib/types/router/index.d.ts",
|
|
93
|
-
"default": "./lib/esm/router/index.js"
|
|
2
|
+
"name": "@vertesia/ui",
|
|
3
|
+
"version": "0.79.1",
|
|
4
|
+
"description": "Vertesia UI components and and hooks",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"src",
|
|
10
|
+
"tsconfig.dist.json"
|
|
11
|
+
],
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"homepage": "https://docs.vertesiahq.com",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"vertesia",
|
|
16
|
+
"UI",
|
|
17
|
+
"react",
|
|
18
|
+
"components",
|
|
19
|
+
"hooks"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "pnpm lint && pnpm exec rimraf ./lib && tsc -b && pnpm exec rollup -c",
|
|
23
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
24
|
+
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix"
|
|
94
25
|
},
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@codemirror/lang-json": "^6.0.1",
|
|
28
|
+
"@codemirror/state": "^6.5.2",
|
|
29
|
+
"@codemirror/view": "^6.36.8",
|
|
30
|
+
"@floating-ui/dom": "^1.7.1",
|
|
31
|
+
"@floating-ui/react": "^0.27.11",
|
|
32
|
+
"@headlessui/react": "^2.2.2",
|
|
33
|
+
"@monaco-editor/react": "^4.7.0",
|
|
34
|
+
"@radix-ui/react-checkbox": "^1.3.1",
|
|
35
|
+
"@radix-ui/react-dialog": "^1.1.13",
|
|
36
|
+
"@radix-ui/react-label": "^2.1.6",
|
|
37
|
+
"@radix-ui/react-popover": "^1.1.13",
|
|
38
|
+
"@radix-ui/react-separator": "^1.1.6",
|
|
39
|
+
"@radix-ui/react-slot": "^1.2.2",
|
|
40
|
+
"@radix-ui/react-tabs": "^1.1.11",
|
|
41
|
+
"@radix-ui/react-tooltip": "^1.2.6",
|
|
42
|
+
"@vertesia/client": "workspace:*",
|
|
43
|
+
"@vertesia/common": "workspace:*",
|
|
44
|
+
"@vertesia/json": "workspace:*",
|
|
45
|
+
"ajv": "^8.16.0",
|
|
46
|
+
"class-variance-authority": "^0.7.1",
|
|
47
|
+
"clsx": "^2.1.1",
|
|
48
|
+
"cmdk": "^1.1.1",
|
|
49
|
+
"codemirror": "^6.0.1",
|
|
50
|
+
"dayjs": "^1.11.13",
|
|
51
|
+
"debounce": "^2.2.0",
|
|
52
|
+
"fast-xml-parser": "^5.2.3",
|
|
53
|
+
"firebase": "^10.12.2",
|
|
54
|
+
"framer-motion": "^12.23.12",
|
|
55
|
+
"json-schema": "^0.4.0",
|
|
56
|
+
"jwt-decode": "^4.0.0",
|
|
57
|
+
"lodash-es": "^4.17.21",
|
|
58
|
+
"lucide-react": "^0.511.0",
|
|
59
|
+
"monaco-editor": "^0.52.2",
|
|
60
|
+
"motion": "^12.12.1",
|
|
61
|
+
"react": "^19.1.0",
|
|
62
|
+
"react-calendar": "^6.0.0",
|
|
63
|
+
"react-date-picker": "^11.0.0",
|
|
64
|
+
"react-dom": "^19.1.0",
|
|
65
|
+
"react-error-boundary": "^6.0.0",
|
|
66
|
+
"react-markdown": "^10.1.0",
|
|
67
|
+
"react-resizable-panels": "^3.0.6",
|
|
68
|
+
"remark-gfm": "^4.0.1",
|
|
69
|
+
"tailwind-merge": "^3.3.0",
|
|
70
|
+
"ts-md5": "^1.3.1",
|
|
71
|
+
"unist-util-visit": "^5.0.0"
|
|
98
72
|
},
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@eslint/js": "^9.27.0",
|
|
75
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
76
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
77
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
78
|
+
"@types/json-schema": "^7.0.15",
|
|
79
|
+
"@types/lodash-es": "^4.17.12",
|
|
80
|
+
"@types/node": "^22.15.21",
|
|
81
|
+
"@types/react": "^19.1.0",
|
|
82
|
+
"@types/react-dom": "^19.1.1",
|
|
83
|
+
"eslint": "^9.27.0",
|
|
84
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
85
|
+
"eslint-plugin-import": "^2.32.0",
|
|
86
|
+
"eslint-plugin-react": "^7.37.5",
|
|
87
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
88
|
+
"rimraf": "^6.0.1",
|
|
89
|
+
"rollup": "^4.40.2",
|
|
90
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
91
|
+
"typescript": "~5.8.3",
|
|
92
|
+
"typescript-eslint": "^8.38.0",
|
|
93
|
+
"vitest": "^3.0.9"
|
|
102
94
|
},
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
"exports": {
|
|
96
|
+
"./router": {
|
|
97
|
+
"types": "./lib/types/router/index.d.ts",
|
|
98
|
+
"default": "./lib/esm/router/index.js"
|
|
99
|
+
},
|
|
100
|
+
"./env": {
|
|
101
|
+
"types": "./lib/types/env/index.d.ts",
|
|
102
|
+
"default": "./lib/esm/env/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./session": {
|
|
105
|
+
"types": "./lib/types/session/index.d.ts",
|
|
106
|
+
"default": "./lib/esm/session/index.js"
|
|
107
|
+
},
|
|
108
|
+
"./core": {
|
|
109
|
+
"types": "./lib/types/core/index.d.ts",
|
|
110
|
+
"default": "./lib/esm/core/index.js"
|
|
111
|
+
},
|
|
112
|
+
"./widgets": {
|
|
113
|
+
"types": "./lib/types/widgets/index.d.ts",
|
|
114
|
+
"default": "./lib/esm/widgets/index.js"
|
|
115
|
+
},
|
|
116
|
+
"./code": {
|
|
117
|
+
"types": "./lib/types/code/index.d.ts",
|
|
118
|
+
"default": "./lib/esm/code/index.js"
|
|
119
|
+
},
|
|
120
|
+
"./form": {
|
|
121
|
+
"types": "./lib/types/form/index.d.ts",
|
|
122
|
+
"default": "./lib/esm/form/index.js"
|
|
123
|
+
},
|
|
124
|
+
"./layout": {
|
|
125
|
+
"types": "./lib/types/layout/index.d.ts",
|
|
126
|
+
"default": "./lib/esm/layout/index.js"
|
|
127
|
+
},
|
|
128
|
+
"./features": {
|
|
129
|
+
"types": "./lib/types/features/index.d.ts",
|
|
130
|
+
"default": "./lib/esm/features/index.js"
|
|
131
|
+
},
|
|
132
|
+
"./shell": {
|
|
133
|
+
"types": "./lib/types/shell/index.d.ts",
|
|
134
|
+
"default": "./lib/esm/shell/index.js"
|
|
135
|
+
}
|
|
106
136
|
},
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"session": [
|
|
142
|
-
"./lib/types/session/index.d.ts"
|
|
143
|
-
],
|
|
144
|
-
"core": [
|
|
145
|
-
"./lib/types/core/index.d.ts"
|
|
146
|
-
],
|
|
147
|
-
"widgets": [
|
|
148
|
-
"./lib/types/widgets/index.d.ts"
|
|
149
|
-
],
|
|
150
|
-
"code": [
|
|
151
|
-
"./lib/types/code/index.d.ts"
|
|
152
|
-
],
|
|
153
|
-
"features": [
|
|
154
|
-
"./lib/types/features/index.d.ts"
|
|
155
|
-
],
|
|
156
|
-
"layout": [
|
|
157
|
-
"./lib/types/layout/index.d.ts"
|
|
158
|
-
],
|
|
159
|
-
"form": [
|
|
160
|
-
"./lib/types/form/index.d.ts"
|
|
161
|
-
],
|
|
162
|
-
"shell": [
|
|
163
|
-
"./lib/types/shell/index.d.ts"
|
|
164
|
-
]
|
|
137
|
+
"types": "./lib/index.d.ts",
|
|
138
|
+
"typesVersions": {
|
|
139
|
+
"*": {
|
|
140
|
+
"router": [
|
|
141
|
+
"./lib/types/router/index.d.ts"
|
|
142
|
+
],
|
|
143
|
+
"env": [
|
|
144
|
+
"./lib/types/env/index.d.ts"
|
|
145
|
+
],
|
|
146
|
+
"session": [
|
|
147
|
+
"./lib/types/session/index.d.ts"
|
|
148
|
+
],
|
|
149
|
+
"core": [
|
|
150
|
+
"./lib/types/core/index.d.ts"
|
|
151
|
+
],
|
|
152
|
+
"widgets": [
|
|
153
|
+
"./lib/types/widgets/index.d.ts"
|
|
154
|
+
],
|
|
155
|
+
"code": [
|
|
156
|
+
"./lib/types/code/index.d.ts"
|
|
157
|
+
],
|
|
158
|
+
"features": [
|
|
159
|
+
"./lib/types/features/index.d.ts"
|
|
160
|
+
],
|
|
161
|
+
"layout": [
|
|
162
|
+
"./lib/types/layout/index.d.ts"
|
|
163
|
+
],
|
|
164
|
+
"form": [
|
|
165
|
+
"./lib/types/form/index.d.ts"
|
|
166
|
+
],
|
|
167
|
+
"shell": [
|
|
168
|
+
"./lib/types/shell/index.d.ts"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
165
171
|
}
|
|
166
|
-
|
|
167
|
-
"scripts": {
|
|
168
|
-
"build": "pnpm lint && pnpm exec rimraf ./lib && tsc -b && pnpm exec rollup -c",
|
|
169
|
-
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
170
|
-
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VTooltip } from "./shadcn/tooltip"
|
|
2
|
+
import { Info } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
interface PanelProps {
|
|
5
|
+
title: string | React.ReactNode
|
|
6
|
+
description?: React.ReactNode
|
|
7
|
+
action?: React.ReactNode
|
|
8
|
+
children: React.ReactNode
|
|
9
|
+
footer?: string | React.ReactNode
|
|
10
|
+
className?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function Panel({ children, action, title, description, footer, className }: PanelProps) {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div className={`p-4 flex flex-col gap-2 rounded-sm border bg-card ${className}`}>
|
|
17
|
+
<div className="flex items-center justify-between">
|
|
18
|
+
<div className="flex items-center gap-2">
|
|
19
|
+
<div className="font-semibold text-lg">
|
|
20
|
+
{title}
|
|
21
|
+
</div>
|
|
22
|
+
{description && <VTooltip description={description}><Info className="size-4 text-muted" /></VTooltip>}
|
|
23
|
+
</div>
|
|
24
|
+
{action}
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{children}
|
|
28
|
+
{footer &&
|
|
29
|
+
<div className="border-t border-muted flex flex-col-2 text-sm pt-4">
|
|
30
|
+
{footer}
|
|
31
|
+
</div>}
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
3
|
-
import { X } from 'lucide-react';
|
|
3
|
+
import { Minus, X } from 'lucide-react';
|
|
4
4
|
import { Button } from './shadcn/button';
|
|
5
5
|
|
|
6
6
|
interface SidePanelProps {
|
|
@@ -68,9 +68,11 @@ export function SidePanel({ isOpen, title, onClose, children, panelWidth = 768,
|
|
|
68
68
|
<div className="relative flex h-full">
|
|
69
69
|
{/* Drag Handle */}
|
|
70
70
|
<div
|
|
71
|
-
className="absolute left-
|
|
71
|
+
className="absolute -left-1 top-0 bottom-0 w-3 cursor-ew-resize hover:bg-indigo-500 transition-colors flex items-center justify-center"
|
|
72
72
|
onMouseDown={handleDragStart}
|
|
73
|
-
|
|
73
|
+
>
|
|
74
|
+
<Minus className="rotate-90 font-semibold" strokeWidth={4} />
|
|
75
|
+
</div>
|
|
74
76
|
<div className="flex-1 flex flex-col overflow-y-scroll gap-4 bg-background py-2 shadow-xl">
|
|
75
77
|
{title && (
|
|
76
78
|
<div className="px-2 sm:px-4">
|
|
@@ -26,12 +26,12 @@ export * from "./SelectList.js";
|
|
|
26
26
|
export * from "./SelectStack.js";
|
|
27
27
|
export * from "./shadcn/index.js";
|
|
28
28
|
export * from "./SidePanel.js";
|
|
29
|
+
export * from "./Panel.js";
|
|
29
30
|
export * from "./Spinner.js";
|
|
30
31
|
export * from "./styles.js";
|
|
31
32
|
export * from "./Switch.js";
|
|
32
33
|
export * from "./table/index.js";
|
|
33
34
|
export * from "./tabs/index.js";
|
|
34
|
-
export * from "./Textarea.js";
|
|
35
35
|
export * from "./toast/index.js";
|
|
36
36
|
|
|
37
37
|
export type HeroIcon = React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
|
|
@@ -6,28 +6,37 @@ import { cn } from "../libs/utils"
|
|
|
6
6
|
interface BreadcrumbProps {
|
|
7
7
|
label: string
|
|
8
8
|
href?: string
|
|
9
|
+
onClick?: () => void
|
|
9
10
|
}
|
|
10
11
|
interface BreadcrumbItemProps {
|
|
11
|
-
|
|
12
|
+
path: BreadcrumbProps[]
|
|
12
13
|
className?: string
|
|
13
14
|
maxItems?: number
|
|
14
15
|
separator?: React.ReactNode
|
|
15
16
|
}
|
|
16
|
-
export function Breadcrumbs({
|
|
17
|
-
|
|
17
|
+
export function Breadcrumbs({ path, maxItems = 3, className, separator }: BreadcrumbItemProps) {
|
|
18
|
+
const items = path || [];
|
|
19
|
+
|
|
20
|
+
const renderBreadcrumbItem = (item: BreadcrumbProps) => {
|
|
21
|
+
if (item.onClick) {
|
|
22
|
+
return <BreadcrumbButton onClick={item.onClick} href={item.href}>{item.label}</BreadcrumbButton>;
|
|
23
|
+
} else if (item.href) {
|
|
24
|
+
return <BreadcrumbButton href={item.href}>{item.label}</BreadcrumbButton>;
|
|
25
|
+
} else {
|
|
26
|
+
return <BreadcrumbPage>{item.label}</BreadcrumbPage>;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
if (items.length <= maxItems) {
|
|
18
31
|
return (
|
|
19
32
|
<Breadcrumb className={cn("w-full", className)}>
|
|
20
33
|
<BreadcrumbList>
|
|
21
|
-
{
|
|
34
|
+
{items.map((item, index) => (
|
|
22
35
|
<React.Fragment key={index}>
|
|
23
36
|
<BreadcrumbItem>
|
|
24
|
-
{item
|
|
25
|
-
<BreadcrumbLink href={item.href}>{item.label}</BreadcrumbLink>
|
|
26
|
-
) : (
|
|
27
|
-
<BreadcrumbPage>{item.label}</BreadcrumbPage>
|
|
28
|
-
)}
|
|
37
|
+
{renderBreadcrumbItem(item)}
|
|
29
38
|
</BreadcrumbItem>
|
|
30
|
-
{index <
|
|
39
|
+
{index < items.length - 1 &&
|
|
31
40
|
<BreadcrumbSeparator>{separator ?? <ChevronRight />}</BreadcrumbSeparator>
|
|
32
41
|
}
|
|
33
42
|
</React.Fragment>
|
|
@@ -37,36 +46,22 @@ export function Breadcrumbs({ children, maxItems = 3, className, separator }: Br
|
|
|
37
46
|
);
|
|
38
47
|
}
|
|
39
48
|
|
|
40
|
-
const
|
|
41
|
-
const lastItems = children.slice(-(maxItems - 2));
|
|
49
|
+
const lastThreeItems = items.slice(-(maxItems - 1));
|
|
42
50
|
|
|
43
51
|
return (
|
|
44
52
|
<Breadcrumb className={cn("w-full", className)}>
|
|
45
53
|
<BreadcrumbList>
|
|
46
|
-
<BreadcrumbItem>
|
|
47
|
-
{firstItem.href ? (
|
|
48
|
-
<BreadcrumbLink href={firstItem.href}>{firstItem.label}</BreadcrumbLink>
|
|
49
|
-
) : (
|
|
50
|
-
<BreadcrumbPage>{firstItem.label}</BreadcrumbPage>
|
|
51
|
-
)}
|
|
52
|
-
</BreadcrumbItem>
|
|
53
|
-
<BreadcrumbSeparator>{separator ?? <ChevronRight />}</BreadcrumbSeparator>
|
|
54
|
-
|
|
55
54
|
<BreadcrumbItem>
|
|
56
55
|
<BreadcrumbEllipsis />
|
|
57
56
|
</BreadcrumbItem>
|
|
58
57
|
<BreadcrumbSeparator>{separator ?? <ChevronRight />}</BreadcrumbSeparator>
|
|
59
58
|
|
|
60
|
-
{
|
|
59
|
+
{lastThreeItems.map((item, index) => (
|
|
61
60
|
<React.Fragment key={index}>
|
|
62
61
|
<BreadcrumbItem>
|
|
63
|
-
{item
|
|
64
|
-
<BreadcrumbLink href={item.href}>{item.label}</BreadcrumbLink>
|
|
65
|
-
) : (
|
|
66
|
-
<BreadcrumbPage>{item.label}</BreadcrumbPage>
|
|
67
|
-
)}
|
|
62
|
+
{renderBreadcrumbItem(item)}
|
|
68
63
|
</BreadcrumbItem>
|
|
69
|
-
{index <
|
|
64
|
+
{index < lastThreeItems.length - 1 && <BreadcrumbSeparator>{separator ?? <ChevronRight />}</BreadcrumbSeparator>
|
|
70
65
|
}
|
|
71
66
|
</React.Fragment>
|
|
72
67
|
))}
|
|
@@ -104,7 +99,7 @@ const BreadcrumbItem = React.forwardRef<
|
|
|
104
99
|
>(({ className, ...props }, ref) => (
|
|
105
100
|
<li
|
|
106
101
|
ref={ref}
|
|
107
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
102
|
+
className={cn("inline-flex items-center gap-1.5 text-muted", className)}
|
|
108
103
|
{...props}
|
|
109
104
|
/>
|
|
110
105
|
))
|
|
@@ -119,13 +114,37 @@ const BreadcrumbLink = React.forwardRef<
|
|
|
119
114
|
return (
|
|
120
115
|
<a
|
|
121
116
|
ref={ref}
|
|
122
|
-
className={cn("transition-colors hover:text-
|
|
117
|
+
className={cn("transition-colors hover:text-muted", className)}
|
|
123
118
|
{...props}
|
|
124
119
|
/>
|
|
125
120
|
)
|
|
126
121
|
})
|
|
127
122
|
BreadcrumbLink.displayName = "BreadcrumbLink"
|
|
128
123
|
|
|
124
|
+
const BreadcrumbButton = React.forwardRef<
|
|
125
|
+
HTMLButtonElement,
|
|
126
|
+
React.ComponentPropsWithoutRef<"button"> & {
|
|
127
|
+
href?: string
|
|
128
|
+
}
|
|
129
|
+
>(({ className, href, onClick, ...props }, ref) => {
|
|
130
|
+
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
if (onClick) {
|
|
133
|
+
onClick(e);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<button
|
|
139
|
+
ref={ref}
|
|
140
|
+
className={cn("transition-colors hover:text-foreground cursor-pointer", className)}
|
|
141
|
+
onClick={handleClick}
|
|
142
|
+
{...props}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
})
|
|
146
|
+
BreadcrumbButton.displayName = "BreadcrumbButton"
|
|
147
|
+
|
|
129
148
|
const BreadcrumbPage = React.forwardRef<
|
|
130
149
|
HTMLSpanElement,
|
|
131
150
|
React.ComponentPropsWithoutRef<"span">
|
|
@@ -20,7 +20,7 @@ const buttonVariants = cva(
|
|
|
20
20
|
secondary:
|
|
21
21
|
"bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20 ring-inset",
|
|
22
22
|
ghost: "hover:bg-muted/50 dark:hover:bg-muted/20 ring-inset",
|
|
23
|
-
link: "text-
|
|
23
|
+
link: "text-foreground underline-offset-4 hover:underline ring-inset",
|
|
24
24
|
primary:
|
|
25
25
|
"bg-primary text-white shadow-xs hover:bg-primary/90 ring-inset",
|
|
26
26
|
unstyled:
|
|
@@ -108,7 +108,8 @@ const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
|
|
|
108
108
|
|
|
109
109
|
const [isCopied, setIsCopied] = useState(false);
|
|
110
110
|
|
|
111
|
-
const handleCopy = () => {
|
|
111
|
+
const handleCopy = (e: React.MouseEvent) => {
|
|
112
|
+
e.stopPropagation();
|
|
112
113
|
navigator.clipboard.writeText(content).then(() => {
|
|
113
114
|
setIsCopied(true)
|
|
114
115
|
setTimeout(() => setIsCopied(false), 2000)
|
|
@@ -71,8 +71,8 @@ const FilterProvider = ({ filters, setFilters, filterGroups, children }: FilterP
|
|
|
71
71
|
params.delete('filters');
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const newUrl = `${window.location.pathname}?${params.toString()}`;
|
|
75
|
-
window.history.replaceState({}, '', newUrl);
|
|
74
|
+
const newUrl = `${window.location.pathname}?${params.toString()}${window.location.hash}`;
|
|
75
|
+
window.history.replaceState(window.history.state || {}, '', newUrl);
|
|
76
76
|
} catch (error) {
|
|
77
77
|
console.error("Failed to update URL with filters:", error);
|
|
78
78
|
}
|
|
@@ -350,7 +350,7 @@ const FilterBar = ({ className }: { className?: string }) => {
|
|
|
350
350
|
);
|
|
351
351
|
};
|
|
352
352
|
|
|
353
|
-
const FilterClear = ({ className }: { className?: string
|
|
353
|
+
const FilterClear = ({ className }: { className?: string}) => {
|
|
354
354
|
const { filters, setFilters } = React.useContext(FilterContext);
|
|
355
355
|
|
|
356
356
|
const hasActiveFilters = filters.filter((filter) => filter.value?.length > 0).length > 0;
|
|
@@ -4,6 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
import { cn } from "../libs/utils"
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { ChangeEvent } from "react";
|
|
7
|
+
import { Button } from "@vertesia/ui/core";
|
|
7
8
|
|
|
8
9
|
const variants = cva(
|
|
9
10
|
"",
|
|
@@ -53,14 +54,14 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
|
-
<div className="w-full
|
|
57
|
+
<div className="w-full relative inline-block [&:hover_.clear-button]:opacity-100">
|
|
57
58
|
<input
|
|
58
59
|
type={type}
|
|
59
60
|
className={
|
|
60
61
|
cn(
|
|
61
62
|
variants({ size, variant }),
|
|
62
63
|
className,
|
|
63
|
-
clearable && value ? "pr-
|
|
64
|
+
clearable && value ? "pr-8" : "",
|
|
64
65
|
)}
|
|
65
66
|
ref={ref}
|
|
66
67
|
value={value == null ? '' : value}
|
|
@@ -68,14 +69,16 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
68
69
|
{...props}
|
|
69
70
|
/>
|
|
70
71
|
{clearable && value && !props.readOnly && !props.disabled && (
|
|
71
|
-
<
|
|
72
|
-
onClick={_onClear}
|
|
73
|
-
className={`absolute ${type !== 'number' ? 'right-0' : 'right-7'} top-1/2 -translate-y-1/2 size-7 text-muted-foreground hover:text-destructive cursor-pointer flex items-center justify-center`}
|
|
72
|
+
<Button variant={"link"} size={"icon"}
|
|
74
73
|
type="button"
|
|
75
|
-
|
|
74
|
+
onClick={_onClear}
|
|
75
|
+
className={`clear-button opacity-0 transition-opacity duration-200
|
|
76
|
+
absolute top-1/2 -translate-y-1/2 text-muted !hover:text-destructive cursor-pointer
|
|
77
|
+
flex items-center justify-center size-6 rounded right-2`}
|
|
78
|
+
alt="Clear input"
|
|
76
79
|
>
|
|
77
80
|
<X size={16} />
|
|
78
|
-
</
|
|
81
|
+
</Button>
|
|
79
82
|
)}
|
|
80
83
|
</div>
|
|
81
84
|
)
|