@robosystems/core 0.17.1 → 0.18.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 (118) hide show
  1. package/README.md +2 -2
  2. package/auth-components/AppSwitcher.js +2 -3
  3. package/components/EntitySelector.js +1 -1
  4. package/components/RepositoryGuard.js +1 -1
  5. package/components/console/ConsoleContent.js +1 -1
  6. package/components/report-chat/ReportChat.d.ts +13 -0
  7. package/components/report-chat/ReportChat.js +1 -1
  8. package/components/repositories/ActiveSubscriptions.js +1 -1
  9. package/components/repositories/BrowseRepositories.js +1 -1
  10. package/components/search/SearchBar.js +1 -1
  11. package/components/search/SearchContent.js +1 -1
  12. package/components/search/SearchHitCard.js +1 -1
  13. package/components/search/SearchPagination.js +1 -1
  14. package/hooks/use-toast.d.ts +1 -1
  15. package/hooks/use-toast.js +2 -2
  16. package/library/components/ElementBrowser.js +1 -1
  17. package/library/components/ElementDetail.js +1 -1
  18. package/library/components/LibraryHierarchy.js +1 -1
  19. package/library/components/TaxonomySidebar.js +1 -1
  20. package/package.json +2 -2
  21. package/styles/forms.css +478 -0
  22. package/styles/palette.css +265 -0
  23. package/theme/flowbite-theme.d.ts +638 -638
  24. package/theme/flowbite-theme.js +16 -21
  25. package/ui/Alert.d.ts +66 -0
  26. package/ui/Alert.js +24 -0
  27. package/ui/Badge.d.ts +50 -0
  28. package/ui/Badge.js +21 -0
  29. package/ui/Breadcrumb.d.ts +10 -0
  30. package/ui/Breadcrumb.js +31 -0
  31. package/ui/Button.d.ts +76 -0
  32. package/ui/Button.js +26 -0
  33. package/ui/Card.d.ts +32 -0
  34. package/ui/Card.js +26 -0
  35. package/ui/Checkbox.d.ts +33 -0
  36. package/ui/Checkbox.js +21 -0
  37. package/ui/Dropdown.d.ts +67 -0
  38. package/ui/Dropdown.js +134 -0
  39. package/ui/FileInput.d.ts +23 -0
  40. package/ui/FileInput.js +21 -0
  41. package/ui/Floating.d.ts +96 -0
  42. package/ui/Floating.js +92 -0
  43. package/ui/HelperText.d.ts +19 -0
  44. package/ui/HelperText.js +21 -0
  45. package/ui/Label.d.ts +21 -0
  46. package/ui/Label.js +21 -0
  47. package/ui/Modal.d.ts +85 -0
  48. package/ui/Modal.js +73 -0
  49. package/ui/Navbar.d.ts +14 -0
  50. package/ui/Navbar.js +35 -0
  51. package/ui/Progress.d.ts +40 -0
  52. package/ui/Progress.js +26 -0
  53. package/ui/Radio.d.ts +31 -0
  54. package/ui/Radio.js +21 -0
  55. package/ui/Select.d.ts +49 -0
  56. package/ui/Select.js +21 -0
  57. package/ui/Sidebar.d.ts +114 -0
  58. package/ui/Sidebar.js +76 -0
  59. package/ui/Spinner.d.ts +60 -0
  60. package/ui/Spinner.js +22 -0
  61. package/ui/Table.d.ts +23 -0
  62. package/ui/Table.js +57 -0
  63. package/ui/Tabs.d.ts +78 -0
  64. package/ui/Tabs.js +64 -0
  65. package/ui/TextInput.d.ts +58 -0
  66. package/ui/TextInput.js +21 -0
  67. package/ui/Textarea.d.ts +22 -0
  68. package/ui/Textarea.js +21 -0
  69. package/ui/ThemeModeScript.d.ts +21 -0
  70. package/ui/ThemeModeScript.js +74 -0
  71. package/ui/Toast.d.ts +24 -0
  72. package/ui/Toast.js +58 -0
  73. package/ui/ToggleSwitch.d.ts +54 -0
  74. package/ui/ToggleSwitch.js +26 -0
  75. package/ui/Tooltip.d.ts +3 -0
  76. package/ui/Tooltip.js +19 -0
  77. package/ui/cn.d.ts +6 -0
  78. package/ui/cn.js +19 -0
  79. package/ui/icons.d.ts +8 -0
  80. package/ui/icons.js +22 -0
  81. package/ui/index.d.ts +37 -0
  82. package/ui/index.js +36 -0
  83. package/ui/merge-theme.d.ts +15 -0
  84. package/ui/merge-theme.js +26 -0
  85. package/ui/theme-defaults.d.ts +821 -0
  86. package/ui/theme-defaults.js +824 -0
  87. package/ui/theme-mode.d.ts +15 -0
  88. package/ui/theme-mode.js +92 -0
  89. package/ui/types.d.ts +6 -0
  90. package/ui/types.js +1 -0
  91. package/ui-components/ConfirmModal.js +1 -1
  92. package/ui-components/StatCard.js +1 -1
  93. package/ui-components/api-keys/ApiKeyDisplay.d.ts +0 -1
  94. package/ui-components/api-keys/ApiKeyDisplay.js +3 -3
  95. package/ui-components/api-keys/CreateApiKeyModal.d.ts +0 -1
  96. package/ui-components/api-keys/CreateApiKeyModal.js +4 -4
  97. package/ui-components/api-keys/SecureApiKeyField.js +1 -1
  98. package/ui-components/chat/ChatInputArea.js +1 -1
  99. package/ui-components/chat/ChatMessage.js +1 -1
  100. package/ui-components/chat/DeepResearchToggle.js +1 -1
  101. package/ui-components/forms/CategoryInput.js +1 -1
  102. package/ui-components/forms/SettingsCard.d.ts +0 -1
  103. package/ui-components/forms/SettingsCard.js +3 -3
  104. package/ui-components/forms/SettingsFormField.d.ts +0 -1
  105. package/ui-components/forms/SettingsFormField.js +3 -3
  106. package/ui-components/forms/StatusAlert.d.ts +0 -1
  107. package/ui-components/forms/StatusAlert.js +3 -3
  108. package/ui-components/forms/TagInput.d.ts +1 -1
  109. package/ui-components/forms/TagInput.js +1 -1
  110. package/ui-components/layout/CoreNavbar.js +7 -8
  111. package/ui-components/layout/CoreSidebar.js +12 -13
  112. package/ui-components/layout/ThemeToggle.js +1 -1
  113. package/ui-components/settings/GeneralInformationCard.d.ts +0 -1
  114. package/ui-components/settings/GeneralInformationCard.js +3 -3
  115. package/ui-components/settings/PasswordInformationCard.d.ts +0 -1
  116. package/ui-components/settings/PasswordInformationCard.js +4 -4
  117. package/ui-components/settings/SettingsPageHeader.js +1 -1
  118. package/ui-components/support/SupportModal.js +1 -1
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as SDK from '@robosystems/client';
4
- import { Button } from 'flowbite-react';
5
4
  import { useCallback, useEffect, useRef, useState } from 'react';
6
5
  import { HiLockClosed } from 'react-icons/hi';
7
6
  import { useOptionalAuth } from '../../auth-components/AuthProvider';
7
+ import { Button } from '../../ui';
8
8
  import { ConfirmModal } from '../ConfirmModal';
9
9
  import { Spinner } from '../Spinner';
10
10
  import { SettingsCard } from '../forms/SettingsCard';
11
11
  import { SettingsFormField } from '../forms/SettingsFormField';
12
12
  import { StatusAlert } from '../forms/StatusAlert';
13
- export const PasswordInformationCard = ({ theme, onUpdate = undefined, onSuccess = undefined, onError = undefined, className = '', }) => {
13
+ export const PasswordInformationCard = ({ onUpdate = undefined, onSuccess = undefined, onError = undefined, className = '', }) => {
14
14
  const [isLoading, setIsLoading] = useState(false);
15
15
  const [error, setError] = useState(null);
16
16
  const [success, setSuccess] = useState(false);
@@ -188,6 +188,6 @@ export const PasswordInformationCard = ({ theme, onUpdate = undefined, onSuccess
188
188
  : passwordStrength.score < 80
189
189
  ? 'text-primary-300'
190
190
  : 'text-green-400';
191
- return (_jsxs(SettingsCard, { title: "Password information", description: "Update your password to keep your account secure", icon: HiLockClosed, theme: theme === null || theme === void 0 ? void 0 : theme.card, className: className, children: [_jsxs("div", { className: "space-y-4", children: [error && (_jsx(StatusAlert, { type: "error", message: error, theme: theme === null || theme === void 0 ? void 0 : theme.alert })), success && (_jsx(StatusAlert, { type: "success", message: "Password updated successfully.", theme: theme === null || theme === void 0 ? void 0 : theme.alert }))] }), _jsx("form", { ref: formRef, onSubmit: handleSubmit, children: _jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "grid gap-4 md:grid-cols-2", children: _jsx(SettingsFormField, { id: "currentPassword", label: "Current password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", theme: theme }) }), _jsxs("div", { className: "grid items-start gap-4 md:grid-cols-2", children: [_jsxs("div", { children: [_jsx(SettingsFormField, { id: "newPassword", label: "New password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", theme: theme, onChange: (e) => setNewPassword(e.target.value) }), _jsx("div", { className: "mt-2 min-h-[2.75rem]", children: passwordStrength && (_jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-1.5 flex-1 overflow-hidden rounded-full bg-gray-700", children: _jsx("div", { className: `h-full rounded-full transition-all duration-300 ${strengthBarColor}`, style: { width: `${passwordStrength.score}%` } }) }), _jsx("span", { className: `text-xs font-medium capitalize ${strengthTextColor}`, children: passwordStrength.strength.replace('-', ' ') })] }), passwordStrength.errors.length > 0 && (_jsx("p", { className: "text-xs text-red-400", children: passwordStrength.errors[0] })), passwordStrength.errors.length === 0 &&
192
- passwordStrength.suggestions.length > 0 && (_jsx("p", { className: "text-xs text-gray-400", children: passwordStrength.suggestions[0] }))] })) })] }), _jsx(SettingsFormField, { id: "confirmPassword", label: "Confirm password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", theme: theme })] }), _jsx("div", { className: "flex justify-end pt-2", children: _jsx(Button, { theme: theme === null || theme === void 0 ? void 0 : theme.button, color: "blue", type: "submit", disabled: isLoading || checkingPassword, children: isLoading ? (_jsx(Spinner, { size: "sm", className: "text-white" })) : ('Update Password') }) })] }) }), _jsx(ConfirmModal, { show: pendingUpdate !== null, onClose: () => setPendingUpdate(null), onConfirm: handleConfirm, loading: isLoading, title: "Change password", confirmLabel: "Change password", loadingLabel: "Changing\u2026", confirmColor: "blue", confirmIcon: HiLockClosed, children: _jsx("p", { className: "text-sm text-gray-300", children: "Changing your password signs you out everywhere, including on this device. You'll need to sign in again with your new password." }) })] }));
191
+ return (_jsxs(SettingsCard, { title: "Password information", description: "Update your password to keep your account secure", icon: HiLockClosed, className: className, children: [_jsxs("div", { className: "space-y-4", children: [error && _jsx(StatusAlert, { type: "error", message: error }), success && (_jsx(StatusAlert, { type: "success", message: "Password updated successfully." }))] }), _jsx("form", { ref: formRef, onSubmit: handleSubmit, children: _jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "grid gap-4 md:grid-cols-2", children: _jsx(SettingsFormField, { id: "currentPassword", label: "Current password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }) }), _jsxs("div", { className: "grid items-start gap-4 md:grid-cols-2", children: [_jsxs("div", { children: [_jsx(SettingsFormField, { id: "newPassword", label: "New password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", onChange: (e) => setNewPassword(e.target.value) }), _jsx("div", { className: "mt-2 min-h-[2.75rem]", children: passwordStrength && (_jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-1.5 flex-1 overflow-hidden rounded-full bg-gray-700", children: _jsx("div", { className: `h-full rounded-full transition-all duration-300 ${strengthBarColor}`, style: { width: `${passwordStrength.score}%` } }) }), _jsx("span", { className: `text-xs font-medium capitalize ${strengthTextColor}`, children: passwordStrength.strength.replace('-', ' ') })] }), passwordStrength.errors.length > 0 && (_jsx("p", { className: "text-xs text-red-400", children: passwordStrength.errors[0] })), passwordStrength.errors.length === 0 &&
192
+ passwordStrength.suggestions.length > 0 && (_jsx("p", { className: "text-xs text-gray-400", children: passwordStrength.suggestions[0] }))] })) })] }), _jsx(SettingsFormField, { id: "confirmPassword", label: "Confirm password", type: "password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] }), _jsx("div", { className: "flex justify-end pt-2", children: _jsx(Button, { color: "blue", type: "submit", disabled: isLoading || checkingPassword, children: isLoading ? (_jsx(Spinner, { size: "sm", className: "text-white" })) : ('Update Password') }) })] }) }), _jsx(ConfirmModal, { show: pendingUpdate !== null, onClose: () => setPendingUpdate(null), onConfirm: handleConfirm, loading: isLoading, title: "Change password", confirmLabel: "Change password", loadingLabel: "Changing\u2026", confirmColor: "blue", confirmIcon: HiLockClosed, children: _jsx("p", { className: "text-sm text-gray-300", children: "Changing your password signs you out everywhere, including on this device. You'll need to sign in again with your new password." }) })] }));
193
193
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Breadcrumb, BreadcrumbItem } from 'flowbite-react';
3
2
  import { HiHome } from 'react-icons/hi';
3
+ import { Breadcrumb, BreadcrumbItem } from '../../ui';
4
4
  export const SettingsPageHeader = ({ title = 'User settings', homeHref = '/home', className = '', }) => {
5
5
  return (_jsxs("div", { className: `col-span-full mb-4 xl:mb-2 ${className}`, children: [_jsxs(Breadcrumb, { className: "mb-5", children: [_jsx(BreadcrumbItem, { href: homeHref, children: _jsxs("div", { className: "flex items-center gap-x-3", children: [_jsx(HiHome, { className: "text-xl" }), _jsx("span", { className: "dark:text-white", children: "Home" })] }) }), _jsx(BreadcrumbItem, { children: "Settings" })] }), _jsx("h1", { className: "text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white", children: title })] }));
6
6
  };
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button, Label, Modal, ModalBody, ModalHeader, Textarea, TextInput, } from 'flowbite-react';
4
3
  import { useRef, useState } from 'react';
5
4
  import { TurnstileWidget, } from '../../auth-components/TurnstileWidget';
6
5
  import { useUser } from '../../hooks';
6
+ import { Button, Label, Modal, ModalBody, ModalHeader, Textarea, TextInput, } from '../../ui';
7
7
  import { isTurnstileEnabled, isTurnstileValid, } from '../../utils/turnstile-config';
8
8
  export default function SupportModal({ isOpen, onClose, metadata, }) {
9
9
  const { user } = useUser();