@middag-io/react 0.45.0 → 0.45.3
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/README.md +4 -3
- package/docs/public/schemas/ai-contract-manifest.json +1820 -0
- package/docs/public/schemas/blocks.json +445 -0
- package/docs/public/schemas/components.json +166 -0
- package/docs/public/schemas/connectors.json +97 -0
- package/docs/public/schemas/fragment.json +2329 -0
- package/docs/public/schemas/manifest.json +119 -0
- package/docs/public/schemas/navigation.json +72 -0
- package/docs/public/schemas/page-contract.json +2329 -0
- package/docs/public/schemas/shared-props.json +118 -0
- package/docs/public/schemas/theme-defaults.json +253 -0
- package/docs/public/schemas/theme.json +401 -0
- package/package.json +109 -3
- package/src/assets/lottie/calendar/schedule-1.json +1 -0
- package/src/assets/lottie/calendar/schedule-2.json +1 -0
- package/src/assets/lottie/celebration/confetti-1.json +1 -0
- package/src/assets/lottie/celebration/confetti-2.json +1 -0
- package/src/assets/lottie/celebration/confetti-3.json +1 -0
- package/src/assets/lottie/cloud/cloud-1.json +1 -0
- package/src/assets/lottie/cloud/cloud-2.json +1 -0
- package/src/assets/lottie/connection/network-1.json +1 -0
- package/src/assets/lottie/connection/network-2.json +1 -0
- package/src/assets/lottie/connection/network-3.json +1 -0
- package/src/assets/lottie/dashboard/analytics-1.json +1 -0
- package/src/assets/lottie/dashboard/analytics-2.json +1 -0
- package/src/assets/lottie/dashboard/analytics-3.json +1 -0
- package/src/assets/lottie/email/mail-1.json +1 -0
- package/src/assets/lottie/email/mail-2.json +1 -0
- package/src/assets/lottie/email/mail-3.json +1 -0
- package/src/assets/lottie/empty-state/empty-1.json +1 -0
- package/src/assets/lottie/empty-state/empty-2.json +1 -0
- package/src/assets/lottie/empty-state/empty-3.json +1 -0
- package/src/assets/lottie/error/warning-1.json +1 -0
- package/src/assets/lottie/error/warning-2.json +1 -0
- package/src/assets/lottie/error/warning-3.json +1 -0
- package/src/assets/lottie/index.ts +49 -0
- package/src/assets/lottie/loading/spinner-1.json +1 -0
- package/src/assets/lottie/loading/spinner-2.json +1 -0
- package/src/assets/lottie/loading/spinner-3.json +1 -0
- package/src/assets/lottie/maintenance/construction-1.json +1 -0
- package/src/assets/lottie/maintenance/construction-2.json +1 -0
- package/src/assets/lottie/maintenance/construction-3.json +1 -0
- package/src/assets/lottie/not-found/404-1.json +1 -0
- package/src/assets/lottie/not-found/404-2.json +1 -0
- package/src/assets/lottie/not-found/404-3.json +1 -0
- package/src/assets/lottie/notification/bell-1.json +1 -0
- package/src/assets/lottie/notification/bell-2.json +1 -0
- package/src/assets/lottie/notification/bell-3.json +1 -0
- package/src/assets/lottie/onboarding/welcome-1.json +1 -0
- package/src/assets/lottie/onboarding/welcome-2.json +1 -0
- package/src/assets/lottie/onboarding/welcome-3.json +1 -0
- package/src/assets/lottie/payment/wallet-1.json +1 -0
- package/src/assets/lottie/payment/wallet-2.json +1 -0
- package/src/assets/lottie/payment/wallet-3.json +1 -0
- package/src/assets/lottie/search/search-1.json +1 -0
- package/src/assets/lottie/search/search-2.json +1 -0
- package/src/assets/lottie/search/search-3.json +1 -0
- package/src/assets/lottie/security/lock-1.json +1 -0
- package/src/assets/lottie/security/lock-2.json +1 -0
- package/src/assets/lottie/security/lock-3.json +1 -0
- package/src/assets/lottie/settings/gear-1.json +1 -0
- package/src/assets/lottie/settings/gear-2.json +1 -0
- package/src/assets/lottie/settings/gear-3.json +1 -0
- package/src/assets/lottie/success/check-1.json +1 -0
- package/src/assets/lottie/success/check-2.json +1 -0
- package/src/assets/lottie/success/check-3.json +1 -0
- package/src/assets/lottie/upload/upload-1.json +1 -0
- package/src/assets/lottie/upload/upload-2.json +1 -0
- package/src/assets/lottie/upload/upload-3.json +1 -0
- package/src/assets/lottie/user/profile-1.json +1 -0
- package/src/assets/lottie/user/profile-2.json +1 -0
- package/src/assets/lottie/user/profile-3.json +1 -0
- package/src/base/blocks/ActionGridBlock.tsx +151 -0
- package/src/base/blocks/ActivityTimelineBlock.tsx +180 -0
- package/src/base/blocks/CardGridBlock.tsx +384 -0
- package/src/base/blocks/ChartBlock.tsx +81 -0
- package/src/base/blocks/DenseTableBlock.tsx +403 -0
- package/src/base/blocks/DetailPanelBlock.tsx +189 -0
- package/src/base/blocks/EmptyStateBlock.tsx +46 -0
- package/src/base/blocks/FormPanelBlock.lazy.tsx +38 -0
- package/src/base/blocks/FormPanelBlock.tsx +480 -0
- package/src/base/blocks/LinkListBlock.tsx +94 -0
- package/src/base/blocks/MarkdownPanelBlock.tsx +60 -0
- package/src/base/blocks/MetricCardBlock.tsx +128 -0
- package/src/base/blocks/StatusStripBlock.tsx +43 -0
- package/src/base/blocks/TabsBlock.tsx +94 -0
- package/src/base/form/FormField.tsx +607 -0
- package/src/base/form/fields/CheckboxField.tsx +56 -0
- package/src/base/form/fields/ColorField.tsx +76 -0
- package/src/base/form/fields/CurrencyField.tsx +126 -0
- package/src/base/form/fields/DateField.tsx +168 -0
- package/src/base/form/fields/DateRangeField.tsx +66 -0
- package/src/base/form/fields/DocumentField.tsx +222 -0
- package/src/base/form/fields/EntityPickerField.tsx +244 -0
- package/src/base/form/fields/FileUploadField.tsx +253 -0
- package/src/base/form/fields/MultiSelectField.tsx +286 -0
- package/src/base/form/fields/NativeSelectField.tsx +67 -0
- package/src/base/form/fields/NumberField.tsx +67 -0
- package/src/base/form/fields/OtpField.tsx +88 -0
- package/src/base/form/fields/PasswordField.tsx +69 -0
- package/src/base/form/fields/PhoneField.tsx +64 -0
- package/src/base/form/fields/RadioField.tsx +66 -0
- package/src/base/form/fields/RatingField.tsx +52 -0
- package/src/base/form/fields/SelectField.tsx +76 -0
- package/src/base/form/fields/SliderField.tsx +77 -0
- package/src/base/form/fields/SlugField.tsx +114 -0
- package/src/base/form/fields/StaticField.tsx +25 -0
- package/src/base/form/fields/SwitchField.tsx +56 -0
- package/src/base/form/fields/TagsField.tsx +128 -0
- package/src/base/form/fields/TextField.tsx +55 -0
- package/src/base/form/fields/TextareaField.tsx +55 -0
- package/src/base/form/fields/document-validation.ts +126 -0
- package/src/base/form/fields/field-registry.ts +53 -0
- package/src/base/form/fields/register-default-fields.ts +86 -0
- package/src/base/form/form-schema-builder.ts +192 -0
- package/src/base/form/form-utils.ts +71 -0
- package/src/base/hooks/useIsDark.ts +50 -0
- package/src/base/hooks/useLazyTabs.ts +98 -0
- package/src/base/hooks/usePolling.ts +43 -0
- package/src/base/hooks/useRemember.ts +58 -0
- package/src/base/hooks/useToast.ts +27 -0
- package/src/base/layout/BlockRegion.tsx +39 -0
- package/src/base/layout/DashboardLayout.tsx +110 -0
- package/src/base/layout/SidebarLayout.tsx +38 -0
- package/src/base/layout/StackLayout.tsx +32 -0
- package/src/base/layout/WizardLayout.tsx +49 -0
- package/src/base/partials/ActionBar/index.tsx +115 -0
- package/src/base/partials/ConfirmationDialog/index.tsx +128 -0
- package/src/base/partials/DataTable/cell-registry.ts +50 -0
- package/src/base/partials/DataTable/cell-renderers.tsx +372 -0
- package/src/base/partials/DataTable/index.tsx +1282 -0
- package/src/base/partials/DataTable/register-default-cells.ts +37 -0
- package/src/base/partials/DataTable/sanitize-html.ts +45 -0
- package/src/base/partials/DataTable/types.ts +229 -0
- package/src/base/partials/DetailSection/index.tsx +316 -0
- package/src/base/partials/EmptyPlaceholder/index.tsx +162 -0
- package/src/base/partials/EntityItem/index.tsx +154 -0
- package/src/base/partials/FilterBar/index.tsx +256 -0
- package/src/base/partials/FormSection/index.tsx +87 -0
- package/src/base/partials/LogViewer/JsonBlock.tsx +39 -0
- package/src/base/partials/LogViewer/LogEntry.tsx +68 -0
- package/src/base/partials/LogViewer/LogViewerToolbar.tsx +71 -0
- package/src/base/partials/LogViewer/index.tsx +110 -0
- package/src/base/partials/LogViewer/types.ts +28 -0
- package/src/base/partials/MarkdownContent/index.tsx +307 -0
- package/src/base/partials/MenuBar/index.tsx +80 -0
- package/src/base/partials/QuickRecordSheet/index.tsx +59 -0
- package/src/base/partials/ResizableSidebar/index.tsx +70 -0
- package/src/base/partials/StatRow/index.tsx +28 -0
- package/src/base/partials/StatusBar/index.tsx +126 -0
- package/src/base/partials/StatusIndicator/index.tsx +61 -0
- package/src/base/partials/StepIndicator/index.tsx +63 -0
- package/src/base/partials/TableOfContents/index.tsx +78 -0
- package/src/base/partials/TimelineList/index.tsx +273 -0
- package/src/base/partials/ToggleGroupControl/index.tsx +100 -0
- package/src/base/partials/TreeView/index.tsx +75 -0
- package/src/base/partials/index.ts +23 -0
- package/src/base/shell/AuthShell.tsx +54 -0
- package/src/base/shell/BasicShell.tsx +286 -0
- package/src/base/shell/ImmersiveShell.tsx +85 -0
- package/src/base/shell/partials/EditablePanelContext.tsx +82 -0
- package/src/base/shell/partials/EditablePanelProvider.tsx +122 -0
- package/src/base/shell/partials/InlineEditablePanel.tsx +239 -0
- package/src/base/shell/partials/InspectorContext.tsx +173 -0
- package/src/base/shell/partials/InspectorPanel.tsx +65 -0
- package/src/base/shell/partials/NavErrorBoundary.tsx +82 -0
- package/src/base/shell/partials/OverlayScreen.tsx +67 -0
- package/src/base/shell/partials/PageActionButton.tsx +203 -0
- package/src/base/theme/appearance.ts +133 -0
- package/src/base/theme/host-layout-detector.ts +119 -0
- package/src/base/theme/host-theme-detector.ts +146 -0
- package/src/base/theme/sidebar-safelist.txt +20 -0
- package/src/base/theme/tailwind-theme.css +136 -0
- package/src/base/theme/theme-bridge.css +164 -0
- package/src/base/theme/theme-context.tsx +142 -0
- package/src/base/theme/themes/classic.css +174 -0
- package/src/base/theme/tokens.css +290 -0
- package/src/base/theme/useHostTheme.ts +95 -0
- package/src/base/utils/clipboard.ts +39 -0
- package/src/base/utils/conditions.ts +27 -0
- package/src/base/utils/icon-registry.ts +78 -0
- package/src/base/utils/icons.ts +31 -0
- package/src/base/utils/interpolate.ts +9 -0
- package/src/base/utils/register-default-icons.ts +163 -0
- package/src/base/utils/storage.ts +65 -0
- package/src/base/utils/time.ts +139 -0
- package/src/contracts/block-data/actions.ts +73 -0
- package/src/contracts/block-data/data-display.ts +343 -0
- package/src/contracts/block-data/form.ts +164 -0
- package/src/contracts/block-data/index.ts +15 -0
- package/src/contracts/block-data/interactive.ts +34 -0
- package/src/contracts/block-data/shared.ts +44 -0
- package/src/contracts/connectors.ts +60 -0
- package/src/contracts/generated/contract-schema.ts +1237 -0
- package/src/contracts/generated/contract-types.ts +675 -0
- package/src/contracts/generated/index.ts +15 -0
- package/src/contracts/navigation.ts +59 -0
- package/src/contracts/page-contract-schema.ts +40 -0
- package/src/contracts/page-contract.ts +79 -0
- package/src/contracts/shared-props.ts +92 -0
- package/src/engine/ContractPage.tsx +178 -0
- package/src/engine/EntityRoutes.tsx +72 -0
- package/src/engine/HostSlot.tsx +126 -0
- package/src/engine/LazyBlock.tsx +92 -0
- package/src/engine/bootstrap.tsx +20 -0
- package/src/engine/providers/auth.tsx +87 -0
- package/src/engine/providers/error-reporter.tsx +89 -0
- package/src/engine/providers/flash.tsx +44 -0
- package/src/engine/providers/index.ts +18 -0
- package/src/engine/providers/inertia-error-reporter.tsx +61 -0
- package/src/engine/providers/progress.tsx +56 -0
- package/src/engine/providers/scope.tsx +51 -0
- package/src/engine/register-defaults.ts +88 -0
- package/src/engine/registries.ts +96 -0
- package/src/i18n/I18nProvider.tsx +53 -0
- package/src/i18n/MANIFEST.md +101 -0
- package/src/i18n/host-resolver.ts +18 -0
- package/src/i18n/instance.ts +69 -0
- package/src/i18n/locales/en/ui.json +277 -0
- package/src/i18n/locales/en/validators.json +13 -0
- package/src/i18n/locales/pt-BR/ui.json +277 -0
- package/src/i18n/locales/pt-BR/validators.json +13 -0
- package/src/i18n/register-strings.ts +10 -0
- package/src/i18n/render-label.ts +33 -0
- package/src/i18n/resolve-field-error.ts +29 -0
- package/src/i18n/useHostString.ts +50 -0
- package/src/i18n/useTranslation.ts +83 -0
- package/src/lib/actions/resolve-action-target.ts +151 -0
- package/src/lib/hooks/use-copy-to-clipboard.ts +37 -0
- package/src/lib/hooks/use-file-upload.ts +406 -0
- package/src/lib/hooks/use-mobile.ts +21 -0
- package/src/lib/host-pending.ts +76 -0
- package/src/lib/portal-container.ts +16 -0
- package/src/lib/test-ids.ts +40 -0
- package/src/lib/utils.ts +6 -0
- package/src/primitives/reui/MANIFEST.md +97 -0
- package/src/primitives/reui/accordion.tsx +64 -0
- package/src/primitives/reui/alert-dialog.tsx +196 -0
- package/src/primitives/reui/alert.tsx +92 -0
- package/src/primitives/reui/aspect-ratio.tsx +9 -0
- package/src/primitives/reui/autocomplete.tsx +343 -0
- package/src/primitives/reui/avatar.tsx +109 -0
- package/src/primitives/reui/badge.tsx +94 -0
- package/src/primitives/reui/breadcrumb.tsx +109 -0
- package/src/primitives/reui/button-group.tsx +83 -0
- package/src/primitives/reui/button.tsx +64 -0
- package/src/primitives/reui/calendar.tsx +220 -0
- package/src/primitives/reui/card.tsx +92 -0
- package/src/primitives/reui/carousel.tsx +239 -0
- package/src/primitives/reui/chart.tsx +388 -0
- package/src/primitives/reui/checkbox.tsx +30 -0
- package/src/primitives/reui/collapsible.tsx +31 -0
- package/src/primitives/reui/combobox.tsx +308 -0
- package/src/primitives/reui/command.tsx +182 -0
- package/src/primitives/reui/context-menu.tsx +250 -0
- package/src/primitives/reui/data-grid/data-grid-column-filter.tsx +172 -0
- package/src/primitives/reui/data-grid/data-grid-column-header.tsx +420 -0
- package/src/primitives/reui/data-grid/data-grid-column-visibility.tsx +51 -0
- package/src/primitives/reui/data-grid/data-grid-pagination.tsx +235 -0
- package/src/primitives/reui/data-grid/data-grid-scroll-area.tsx +427 -0
- package/src/primitives/reui/data-grid/data-grid-table-dnd-rows.tsx +308 -0
- package/src/primitives/reui/data-grid/data-grid-table-dnd.tsx +318 -0
- package/src/primitives/reui/data-grid/data-grid-table-virtual.tsx +491 -0
- package/src/primitives/reui/data-grid/data-grid-table.tsx +1430 -0
- package/src/primitives/reui/data-grid/data-grid.tsx +269 -0
- package/src/primitives/reui/data-grid-pagination.tsx +235 -0
- package/src/primitives/reui/date-selector.tsx +1353 -0
- package/src/primitives/reui/dialog.tsx +158 -0
- package/src/primitives/reui/drawer.tsx +133 -0
- package/src/primitives/reui/dropdown-menu.tsx +257 -0
- package/src/primitives/reui/empty.tsx +104 -0
- package/src/primitives/reui/field.tsx +246 -0
- package/src/primitives/reui/filters.tsx +1891 -0
- package/src/primitives/reui/frame.tsx +170 -0
- package/src/primitives/reui/hover-card.tsx +42 -0
- package/src/primitives/reui/icon-placeholder.tsx +39 -0
- package/src/primitives/reui/index.ts +98 -0
- package/src/primitives/reui/input-group.tsx +170 -0
- package/src/primitives/reui/input-otp.tsx +75 -0
- package/src/primitives/reui/input.tsx +21 -0
- package/src/primitives/reui/item.tsx +193 -0
- package/src/primitives/reui/kanban.tsx +743 -0
- package/src/primitives/reui/kbd.tsx +28 -0
- package/src/primitives/reui/label.tsx +22 -0
- package/src/primitives/reui/menubar.tsx +274 -0
- package/src/primitives/reui/native-select.tsx +62 -0
- package/src/primitives/reui/navigation-menu.tsx +168 -0
- package/src/primitives/reui/number-field.tsx +250 -0
- package/src/primitives/reui/pagination.tsx +127 -0
- package/src/primitives/reui/phone-input.tsx +231 -0
- package/src/primitives/reui/popover.tsx +87 -0
- package/src/primitives/reui/progress.tsx +31 -0
- package/src/primitives/reui/radio-group.tsx +43 -0
- package/src/primitives/reui/rating.tsx +177 -0
- package/src/primitives/reui/resizable.tsx +51 -0
- package/src/primitives/reui/scroll-area.tsx +58 -0
- package/src/primitives/reui/scrollspy.tsx +240 -0
- package/src/primitives/reui/select.tsx +188 -0
- package/src/primitives/reui/separator.tsx +28 -0
- package/src/primitives/reui/sheet.tsx +141 -0
- package/src/primitives/reui/sidebar.tsx +732 -0
- package/src/primitives/reui/skeleton.tsx +13 -0
- package/src/primitives/reui/slider.tsx +61 -0
- package/src/primitives/reui/sonner.tsx +47 -0
- package/src/primitives/reui/sortable.tsx +414 -0
- package/src/primitives/reui/spinner.tsx +16 -0
- package/src/primitives/reui/stepper.tsx +484 -0
- package/src/primitives/reui/svgs/claudeAiIcon.tsx +12 -0
- package/src/primitives/reui/svgs/gemini.tsx +171 -0
- package/src/primitives/reui/svgs/openai.tsx +9 -0
- package/src/primitives/reui/svgs/openaiDark.tsx +12 -0
- package/src/primitives/reui/switch.tsx +33 -0
- package/src/primitives/reui/table.tsx +114 -0
- package/src/primitives/reui/tabs.tsx +91 -0
- package/src/primitives/reui/textarea.tsx +18 -0
- package/src/primitives/reui/timeline.tsx +219 -0
- package/src/primitives/reui/toggle-group.tsx +83 -0
- package/src/primitives/reui/toggle.tsx +45 -0
- package/src/primitives/reui/tooltip.tsx +55 -0
- package/src/primitives/reui/tree.tsx +247 -0
- package/src/theme.css +71 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Children,
|
|
3
|
+
createContext,
|
|
4
|
+
HTMLAttributes,
|
|
5
|
+
isValidElement,
|
|
6
|
+
ReactElement,
|
|
7
|
+
useCallback,
|
|
8
|
+
useContext,
|
|
9
|
+
useEffect,
|
|
10
|
+
useMemo,
|
|
11
|
+
useRef,
|
|
12
|
+
useState,
|
|
13
|
+
} from "react";
|
|
14
|
+
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
// Types
|
|
18
|
+
type StepperOrientation = "horizontal" | "vertical";
|
|
19
|
+
type StepState = "active" | "completed" | "inactive" | "loading";
|
|
20
|
+
type StepIndicators = {
|
|
21
|
+
active?: React.ReactNode;
|
|
22
|
+
completed?: React.ReactNode;
|
|
23
|
+
inactive?: React.ReactNode;
|
|
24
|
+
loading?: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
interface StepperContextValue {
|
|
28
|
+
activeStep: number;
|
|
29
|
+
setActiveStep: (step: number) => void;
|
|
30
|
+
stepsCount: number;
|
|
31
|
+
orientation: StepperOrientation;
|
|
32
|
+
registerTrigger: (node: HTMLButtonElement | null) => void;
|
|
33
|
+
triggerNodes: HTMLButtonElement[];
|
|
34
|
+
focusNext: (currentIdx: number) => void;
|
|
35
|
+
focusPrev: (currentIdx: number) => void;
|
|
36
|
+
focusFirst: () => void;
|
|
37
|
+
focusLast: () => void;
|
|
38
|
+
indicators: StepIndicators;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface StepItemContextValue {
|
|
42
|
+
step: number;
|
|
43
|
+
state: StepState;
|
|
44
|
+
isDisabled: boolean;
|
|
45
|
+
isLoading: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const StepperContext = createContext<StepperContextValue | undefined>(
|
|
49
|
+
undefined,
|
|
50
|
+
);
|
|
51
|
+
const StepItemContext = createContext<StepItemContextValue | undefined>(
|
|
52
|
+
undefined,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
function useStepper() {
|
|
56
|
+
const ctx = useContext(StepperContext);
|
|
57
|
+
if (!ctx) throw new Error("useStepper must be used within a Stepper");
|
|
58
|
+
return ctx;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function useStepItem() {
|
|
62
|
+
const ctx = useContext(StepItemContext);
|
|
63
|
+
if (!ctx) throw new Error("useStepItem must be used within a StepperItem");
|
|
64
|
+
return ctx;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface StepperProps extends HTMLAttributes<HTMLDivElement> {
|
|
68
|
+
defaultValue?: number;
|
|
69
|
+
value?: number;
|
|
70
|
+
onValueChange?: (value: number) => void;
|
|
71
|
+
orientation?: StepperOrientation;
|
|
72
|
+
indicators?: StepIndicators;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function Stepper({
|
|
76
|
+
defaultValue = 1,
|
|
77
|
+
value,
|
|
78
|
+
onValueChange,
|
|
79
|
+
orientation = "horizontal",
|
|
80
|
+
className,
|
|
81
|
+
children,
|
|
82
|
+
indicators = {},
|
|
83
|
+
...props
|
|
84
|
+
}: StepperProps) {
|
|
85
|
+
const [activeStep, setActiveStep] = useState(defaultValue);
|
|
86
|
+
const [triggerNodes, setTriggerNodes] = useState<HTMLButtonElement[]>([]);
|
|
87
|
+
|
|
88
|
+
// Register/unregister triggers
|
|
89
|
+
const registerTrigger = useCallback((node: HTMLButtonElement | null) => {
|
|
90
|
+
setTriggerNodes((prev) => {
|
|
91
|
+
if (node && !prev.includes(node)) {
|
|
92
|
+
return [...prev, node];
|
|
93
|
+
} else if (!node && prev.includes(node!)) {
|
|
94
|
+
return prev.filter((n) => n !== node);
|
|
95
|
+
} else {
|
|
96
|
+
return prev;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, []);
|
|
100
|
+
|
|
101
|
+
const handleSetActiveStep = useCallback(
|
|
102
|
+
(step: number) => {
|
|
103
|
+
if (value === undefined) {
|
|
104
|
+
setActiveStep(step);
|
|
105
|
+
}
|
|
106
|
+
onValueChange?.(step);
|
|
107
|
+
},
|
|
108
|
+
[value, onValueChange],
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
const currentStep = value ?? activeStep;
|
|
112
|
+
|
|
113
|
+
// Keyboard navigation logic
|
|
114
|
+
const focusTrigger = (idx: number) => {
|
|
115
|
+
if (triggerNodes[idx]) triggerNodes[idx].focus();
|
|
116
|
+
};
|
|
117
|
+
const focusNext = (currentIdx: number) =>
|
|
118
|
+
focusTrigger((currentIdx + 1) % triggerNodes.length);
|
|
119
|
+
const focusPrev = (currentIdx: number) =>
|
|
120
|
+
focusTrigger((currentIdx - 1 + triggerNodes.length) % triggerNodes.length);
|
|
121
|
+
const focusFirst = () => focusTrigger(0);
|
|
122
|
+
const focusLast = () => focusTrigger(triggerNodes.length - 1);
|
|
123
|
+
|
|
124
|
+
// Context value
|
|
125
|
+
const contextValue = useMemo<StepperContextValue>(
|
|
126
|
+
() => ({
|
|
127
|
+
activeStep: currentStep,
|
|
128
|
+
setActiveStep: handleSetActiveStep,
|
|
129
|
+
stepsCount: Children.toArray(children).filter(
|
|
130
|
+
(child): child is ReactElement =>
|
|
131
|
+
isValidElement(child) &&
|
|
132
|
+
(child.type as { displayName?: string }).displayName ===
|
|
133
|
+
"StepperItem",
|
|
134
|
+
).length,
|
|
135
|
+
orientation,
|
|
136
|
+
registerTrigger,
|
|
137
|
+
focusNext,
|
|
138
|
+
focusPrev,
|
|
139
|
+
focusFirst,
|
|
140
|
+
focusLast,
|
|
141
|
+
triggerNodes,
|
|
142
|
+
indicators,
|
|
143
|
+
}),
|
|
144
|
+
[
|
|
145
|
+
currentStep,
|
|
146
|
+
handleSetActiveStep,
|
|
147
|
+
children,
|
|
148
|
+
orientation,
|
|
149
|
+
registerTrigger,
|
|
150
|
+
triggerNodes,
|
|
151
|
+
],
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<StepperContext.Provider value={contextValue}>
|
|
156
|
+
<div
|
|
157
|
+
role="tablist"
|
|
158
|
+
aria-orientation={orientation}
|
|
159
|
+
data-slot="stepper"
|
|
160
|
+
className={cn("w-full", className)}
|
|
161
|
+
data-orientation={orientation}
|
|
162
|
+
{...props}
|
|
163
|
+
>
|
|
164
|
+
{children}
|
|
165
|
+
</div>
|
|
166
|
+
</StepperContext.Provider>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
171
|
+
step: number;
|
|
172
|
+
completed?: boolean;
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
loading?: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function StepperItem({
|
|
178
|
+
step,
|
|
179
|
+
completed = false,
|
|
180
|
+
disabled = false,
|
|
181
|
+
loading = false,
|
|
182
|
+
className,
|
|
183
|
+
children,
|
|
184
|
+
...props
|
|
185
|
+
}: StepperItemProps) {
|
|
186
|
+
const { activeStep } = useStepper();
|
|
187
|
+
|
|
188
|
+
const state: StepState =
|
|
189
|
+
completed || step < activeStep
|
|
190
|
+
? "completed"
|
|
191
|
+
: activeStep === step
|
|
192
|
+
? "active"
|
|
193
|
+
: "inactive";
|
|
194
|
+
|
|
195
|
+
const isLoading = loading && step === activeStep;
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<StepItemContext.Provider
|
|
199
|
+
value={{ step, state, isDisabled: disabled, isLoading }}
|
|
200
|
+
>
|
|
201
|
+
<div
|
|
202
|
+
data-slot="stepper-item"
|
|
203
|
+
className={cn(
|
|
204
|
+
"group/step flex items-center justify-center not-last:flex-1 group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col",
|
|
205
|
+
className,
|
|
206
|
+
)}
|
|
207
|
+
data-state={state}
|
|
208
|
+
{...(isLoading ? { "data-loading": true } : {})}
|
|
209
|
+
{...props}
|
|
210
|
+
>
|
|
211
|
+
{children}
|
|
212
|
+
</div>
|
|
213
|
+
</StepItemContext.Provider>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
interface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
218
|
+
asChild?: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function StepperTrigger({
|
|
222
|
+
asChild = false,
|
|
223
|
+
className,
|
|
224
|
+
children,
|
|
225
|
+
tabIndex,
|
|
226
|
+
...props
|
|
227
|
+
}: StepperTriggerProps) {
|
|
228
|
+
const { state, isLoading } = useStepItem();
|
|
229
|
+
const stepperCtx = useStepper();
|
|
230
|
+
const {
|
|
231
|
+
setActiveStep,
|
|
232
|
+
activeStep,
|
|
233
|
+
registerTrigger,
|
|
234
|
+
triggerNodes,
|
|
235
|
+
focusNext,
|
|
236
|
+
focusPrev,
|
|
237
|
+
focusFirst,
|
|
238
|
+
focusLast,
|
|
239
|
+
} = stepperCtx;
|
|
240
|
+
const { step, isDisabled } = useStepItem();
|
|
241
|
+
const isSelected = activeStep === step;
|
|
242
|
+
const id = `stepper-tab-${step}`;
|
|
243
|
+
const panelId = `stepper-panel-${step}`;
|
|
244
|
+
|
|
245
|
+
// Register this trigger for keyboard navigation
|
|
246
|
+
const btnRef = useRef<HTMLButtonElement>(null);
|
|
247
|
+
useEffect(() => {
|
|
248
|
+
if (btnRef.current) {
|
|
249
|
+
registerTrigger(btnRef.current);
|
|
250
|
+
}
|
|
251
|
+
}, [btnRef.current]);
|
|
252
|
+
|
|
253
|
+
// Find our index among triggers for navigation
|
|
254
|
+
const myIdx = useMemo(
|
|
255
|
+
() =>
|
|
256
|
+
triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),
|
|
257
|
+
[triggerNodes, btnRef.current],
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {
|
|
261
|
+
switch (e.key) {
|
|
262
|
+
case "ArrowRight":
|
|
263
|
+
case "ArrowDown":
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
if (myIdx !== -1 && focusNext) focusNext(myIdx);
|
|
266
|
+
break;
|
|
267
|
+
case "ArrowLeft":
|
|
268
|
+
case "ArrowUp":
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
if (myIdx !== -1 && focusPrev) focusPrev(myIdx);
|
|
271
|
+
break;
|
|
272
|
+
case "Home":
|
|
273
|
+
e.preventDefault();
|
|
274
|
+
if (focusFirst) focusFirst();
|
|
275
|
+
break;
|
|
276
|
+
case "End":
|
|
277
|
+
e.preventDefault();
|
|
278
|
+
if (focusLast) focusLast();
|
|
279
|
+
break;
|
|
280
|
+
case "Enter":
|
|
281
|
+
case " ":
|
|
282
|
+
e.preventDefault();
|
|
283
|
+
setActiveStep(step);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
if (asChild) {
|
|
289
|
+
return (
|
|
290
|
+
<span
|
|
291
|
+
data-slot="stepper-trigger"
|
|
292
|
+
data-state={state}
|
|
293
|
+
className={className}
|
|
294
|
+
>
|
|
295
|
+
{children}
|
|
296
|
+
</span>
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return (
|
|
301
|
+
<button
|
|
302
|
+
ref={btnRef}
|
|
303
|
+
role="tab"
|
|
304
|
+
id={id}
|
|
305
|
+
aria-selected={isSelected}
|
|
306
|
+
aria-controls={panelId}
|
|
307
|
+
tabIndex={typeof tabIndex === "number" ? tabIndex : isSelected ? 0 : -1}
|
|
308
|
+
data-slot="stepper-trigger"
|
|
309
|
+
data-state={state}
|
|
310
|
+
data-loading={isLoading}
|
|
311
|
+
className={cn(
|
|
312
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 inline-flex cursor-pointer items-center outline-none focus-visible:z-10 focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-60",
|
|
313
|
+
"gap-3 rounded-full",
|
|
314
|
+
className,
|
|
315
|
+
)}
|
|
316
|
+
onClick={() => setActiveStep(step)}
|
|
317
|
+
onKeyDown={handleKeyDown}
|
|
318
|
+
disabled={isDisabled}
|
|
319
|
+
{...props}
|
|
320
|
+
>
|
|
321
|
+
{children}
|
|
322
|
+
</button>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function StepperIndicator({
|
|
327
|
+
children,
|
|
328
|
+
className,
|
|
329
|
+
}: React.ComponentProps<"div">) {
|
|
330
|
+
const { state, isLoading } = useStepItem();
|
|
331
|
+
const { indicators } = useStepper();
|
|
332
|
+
|
|
333
|
+
return (
|
|
334
|
+
<div
|
|
335
|
+
data-slot="stepper-indicator"
|
|
336
|
+
data-state={state}
|
|
337
|
+
className={cn(
|
|
338
|
+
"border-background bg-accent text-accent-foreground data-[state=completed]:bg-primary data-[state=completed]:text-primary-foreground data-[state=active]:bg-primary data-[state=active]:text-primary-foreground relative flex size-6 shrink-0 items-center justify-center overflow-hidden",
|
|
339
|
+
"rounded-full text-xs",
|
|
340
|
+
className,
|
|
341
|
+
)}
|
|
342
|
+
>
|
|
343
|
+
<div className="absolute">
|
|
344
|
+
{indicators &&
|
|
345
|
+
((isLoading && indicators.loading) ||
|
|
346
|
+
(state === "completed" && indicators.completed) ||
|
|
347
|
+
(state === "active" && indicators.active) ||
|
|
348
|
+
(state === "inactive" && indicators.inactive))
|
|
349
|
+
? (isLoading && indicators.loading) ||
|
|
350
|
+
(state === "completed" && indicators.completed) ||
|
|
351
|
+
(state === "active" && indicators.active) ||
|
|
352
|
+
(state === "inactive" && indicators.inactive)
|
|
353
|
+
: children}
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function StepperSeparator({ className }: React.ComponentProps<"div">) {
|
|
360
|
+
const { state } = useStepItem();
|
|
361
|
+
|
|
362
|
+
return (
|
|
363
|
+
<div
|
|
364
|
+
data-slot="stepper-separator"
|
|
365
|
+
data-state={state}
|
|
366
|
+
className={cn(
|
|
367
|
+
"bg-muted rounded-full group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5 m-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1",
|
|
368
|
+
className,
|
|
369
|
+
)}
|
|
370
|
+
/>
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function StepperTitle({ children, className }: React.ComponentProps<"h3">) {
|
|
375
|
+
const { state } = useStepItem();
|
|
376
|
+
|
|
377
|
+
return (
|
|
378
|
+
<h3
|
|
379
|
+
data-slot="stepper-title"
|
|
380
|
+
data-state={state}
|
|
381
|
+
className={cn("text-sm leading-none font-medium", className)}
|
|
382
|
+
>
|
|
383
|
+
{children}
|
|
384
|
+
</h3>
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function StepperDescription({
|
|
389
|
+
children,
|
|
390
|
+
className,
|
|
391
|
+
}: React.ComponentProps<"div">) {
|
|
392
|
+
const { state } = useStepItem();
|
|
393
|
+
|
|
394
|
+
return (
|
|
395
|
+
<div
|
|
396
|
+
data-slot="stepper-description"
|
|
397
|
+
data-state={state}
|
|
398
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
399
|
+
>
|
|
400
|
+
{children}
|
|
401
|
+
</div>
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function StepperNav({ children, className }: React.ComponentProps<"nav">) {
|
|
406
|
+
const { activeStep, orientation } = useStepper();
|
|
407
|
+
|
|
408
|
+
return (
|
|
409
|
+
<nav
|
|
410
|
+
data-slot="stepper-nav"
|
|
411
|
+
data-state={activeStep}
|
|
412
|
+
data-orientation={orientation}
|
|
413
|
+
className={cn(
|
|
414
|
+
"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",
|
|
415
|
+
className,
|
|
416
|
+
)}
|
|
417
|
+
>
|
|
418
|
+
{children}
|
|
419
|
+
</nav>
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function StepperPanel({ children, className }: React.ComponentProps<"div">) {
|
|
424
|
+
const { activeStep } = useStepper();
|
|
425
|
+
|
|
426
|
+
return (
|
|
427
|
+
<div
|
|
428
|
+
data-slot="stepper-panel"
|
|
429
|
+
data-state={activeStep}
|
|
430
|
+
className={cn("w-full", className)}
|
|
431
|
+
>
|
|
432
|
+
{children}
|
|
433
|
+
</div>
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
interface StepperContentProps extends React.ComponentProps<"div"> {
|
|
438
|
+
value: number;
|
|
439
|
+
forceMount?: boolean;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function StepperContent({
|
|
443
|
+
value,
|
|
444
|
+
forceMount,
|
|
445
|
+
children,
|
|
446
|
+
className,
|
|
447
|
+
}: StepperContentProps) {
|
|
448
|
+
const { activeStep } = useStepper();
|
|
449
|
+
const isActive = value === activeStep;
|
|
450
|
+
|
|
451
|
+
if (!forceMount && !isActive) {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return (
|
|
456
|
+
<div
|
|
457
|
+
data-slot="stepper-content"
|
|
458
|
+
data-state={activeStep}
|
|
459
|
+
className={cn("w-full", className, !isActive && forceMount && "hidden")}
|
|
460
|
+
hidden={!isActive && forceMount}
|
|
461
|
+
>
|
|
462
|
+
{children}
|
|
463
|
+
</div>
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export {
|
|
468
|
+
useStepper,
|
|
469
|
+
useStepItem,
|
|
470
|
+
Stepper,
|
|
471
|
+
StepperItem,
|
|
472
|
+
StepperTrigger,
|
|
473
|
+
StepperIndicator,
|
|
474
|
+
StepperSeparator,
|
|
475
|
+
StepperTitle,
|
|
476
|
+
StepperDescription,
|
|
477
|
+
StepperPanel,
|
|
478
|
+
StepperContent,
|
|
479
|
+
StepperNav,
|
|
480
|
+
type StepperProps,
|
|
481
|
+
type StepperItemProps,
|
|
482
|
+
type StepperTriggerProps,
|
|
483
|
+
type StepperContentProps,
|
|
484
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
|
|
3
|
+
const ClaudeAiIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg {...props} preserveAspectRatio="xMidYMid" viewBox="0 0 256 257">
|
|
5
|
+
<path
|
|
6
|
+
fill="#D97757"
|
|
7
|
+
d="m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z"
|
|
8
|
+
/>
|
|
9
|
+
</svg>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export { ClaudeAiIcon };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
|
|
3
|
+
const Gemini = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg {...props} viewBox="0 0 296 298" fill="none">
|
|
5
|
+
<mask
|
|
6
|
+
id="a"
|
|
7
|
+
width="296"
|
|
8
|
+
height="298"
|
|
9
|
+
x="0"
|
|
10
|
+
y="0"
|
|
11
|
+
maskUnits="userSpaceOnUse"
|
|
12
|
+
style={{ maskType: "alpha" }}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
fill="#3186FF"
|
|
16
|
+
d="M141.201 4.886c2.282-6.17 11.042-6.071 13.184.148l5.985 17.37a184.004 184.004 0 0 0 111.257 113.049l19.304 6.997c6.143 2.227 6.156 10.91.02 13.155l-19.35 7.082a184.001 184.001 0 0 0-109.495 109.385l-7.573 20.629c-2.241 6.105-10.869 6.121-13.133.025l-7.908-21.296a184 184 0 0 0-109.02-108.658l-19.698-7.239c-6.102-2.243-6.118-10.867-.025-13.132l20.083-7.467A183.998 183.998 0 0 0 133.291 26.28l7.91-21.394Z"
|
|
17
|
+
/>
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#a)">
|
|
20
|
+
<g filter="url(#b)">
|
|
21
|
+
<ellipse cx="163" cy="149" fill="#3689FF" rx="196" ry="159" />
|
|
22
|
+
</g>
|
|
23
|
+
<g filter="url(#c)">
|
|
24
|
+
<ellipse cx="33.5" cy="142.5" fill="#F6C013" rx="68.5" ry="72.5" />
|
|
25
|
+
</g>
|
|
26
|
+
<g filter="url(#d)">
|
|
27
|
+
<ellipse cx="19.5" cy="148.5" fill="#F6C013" rx="68.5" ry="72.5" />
|
|
28
|
+
</g>
|
|
29
|
+
<g filter="url(#e)">
|
|
30
|
+
<path
|
|
31
|
+
fill="#FA4340"
|
|
32
|
+
d="M194 10.5C172 82.5 65.5 134.333 22.5 135L144-66l50 76.5Z"
|
|
33
|
+
/>
|
|
34
|
+
</g>
|
|
35
|
+
<g filter="url(#f)">
|
|
36
|
+
<path
|
|
37
|
+
fill="#FA4340"
|
|
38
|
+
d="M190.5-12.5C168.5 59.5 62 111.333 19 112L140.5-89l50 76.5Z"
|
|
39
|
+
/>
|
|
40
|
+
</g>
|
|
41
|
+
<g filter="url(#g)">
|
|
42
|
+
<path
|
|
43
|
+
fill="#14BB69"
|
|
44
|
+
d="M194.5 279.5C172.5 207.5 66 155.667 23 155l121.5 201 50-76.5Z"
|
|
45
|
+
/>
|
|
46
|
+
</g>
|
|
47
|
+
<g filter="url(#h)">
|
|
48
|
+
<path
|
|
49
|
+
fill="#14BB69"
|
|
50
|
+
d="M196.5 320.5C174.5 248.5 68 196.667 25 196l121.5 201 50-76.5Z"
|
|
51
|
+
/>
|
|
52
|
+
</g>
|
|
53
|
+
</g>
|
|
54
|
+
<defs>
|
|
55
|
+
<filter
|
|
56
|
+
id="b"
|
|
57
|
+
width="464"
|
|
58
|
+
height="390"
|
|
59
|
+
x="-69"
|
|
60
|
+
y="-46"
|
|
61
|
+
colorInterpolationFilters="sRGB"
|
|
62
|
+
filterUnits="userSpaceOnUse"
|
|
63
|
+
>
|
|
64
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
65
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
66
|
+
<feGaussianBlur
|
|
67
|
+
result="effect1_foregroundBlur_69_17998"
|
|
68
|
+
stdDeviation="18"
|
|
69
|
+
/>
|
|
70
|
+
</filter>
|
|
71
|
+
<filter
|
|
72
|
+
id="c"
|
|
73
|
+
width="265"
|
|
74
|
+
height="273"
|
|
75
|
+
x="-99"
|
|
76
|
+
y="6"
|
|
77
|
+
colorInterpolationFilters="sRGB"
|
|
78
|
+
filterUnits="userSpaceOnUse"
|
|
79
|
+
>
|
|
80
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
81
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
82
|
+
<feGaussianBlur
|
|
83
|
+
result="effect1_foregroundBlur_69_17998"
|
|
84
|
+
stdDeviation="32"
|
|
85
|
+
/>
|
|
86
|
+
</filter>
|
|
87
|
+
<filter
|
|
88
|
+
id="d"
|
|
89
|
+
width="265"
|
|
90
|
+
height="273"
|
|
91
|
+
x="-113"
|
|
92
|
+
y="12"
|
|
93
|
+
colorInterpolationFilters="sRGB"
|
|
94
|
+
filterUnits="userSpaceOnUse"
|
|
95
|
+
>
|
|
96
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
97
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
98
|
+
<feGaussianBlur
|
|
99
|
+
result="effect1_foregroundBlur_69_17998"
|
|
100
|
+
stdDeviation="32"
|
|
101
|
+
/>
|
|
102
|
+
</filter>
|
|
103
|
+
<filter
|
|
104
|
+
id="e"
|
|
105
|
+
width="299.5"
|
|
106
|
+
height="329"
|
|
107
|
+
x="-41.5"
|
|
108
|
+
y="-130"
|
|
109
|
+
colorInterpolationFilters="sRGB"
|
|
110
|
+
filterUnits="userSpaceOnUse"
|
|
111
|
+
>
|
|
112
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
113
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
114
|
+
<feGaussianBlur
|
|
115
|
+
result="effect1_foregroundBlur_69_17998"
|
|
116
|
+
stdDeviation="32"
|
|
117
|
+
/>
|
|
118
|
+
</filter>
|
|
119
|
+
<filter
|
|
120
|
+
id="f"
|
|
121
|
+
width="299.5"
|
|
122
|
+
height="329"
|
|
123
|
+
x="-45"
|
|
124
|
+
y="-153"
|
|
125
|
+
colorInterpolationFilters="sRGB"
|
|
126
|
+
filterUnits="userSpaceOnUse"
|
|
127
|
+
>
|
|
128
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
129
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
130
|
+
<feGaussianBlur
|
|
131
|
+
result="effect1_foregroundBlur_69_17998"
|
|
132
|
+
stdDeviation="32"
|
|
133
|
+
/>
|
|
134
|
+
</filter>
|
|
135
|
+
<filter
|
|
136
|
+
id="g"
|
|
137
|
+
width="299.5"
|
|
138
|
+
height="329"
|
|
139
|
+
x="-41"
|
|
140
|
+
y="91"
|
|
141
|
+
colorInterpolationFilters="sRGB"
|
|
142
|
+
filterUnits="userSpaceOnUse"
|
|
143
|
+
>
|
|
144
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
145
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
146
|
+
<feGaussianBlur
|
|
147
|
+
result="effect1_foregroundBlur_69_17998"
|
|
148
|
+
stdDeviation="32"
|
|
149
|
+
/>
|
|
150
|
+
</filter>
|
|
151
|
+
<filter
|
|
152
|
+
id="h"
|
|
153
|
+
width="299.5"
|
|
154
|
+
height="329"
|
|
155
|
+
x="-39"
|
|
156
|
+
y="132"
|
|
157
|
+
colorInterpolationFilters="sRGB"
|
|
158
|
+
filterUnits="userSpaceOnUse"
|
|
159
|
+
>
|
|
160
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
|
161
|
+
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
|
|
162
|
+
<feGaussianBlur
|
|
163
|
+
result="effect1_foregroundBlur_69_17998"
|
|
164
|
+
stdDeviation="32"
|
|
165
|
+
/>
|
|
166
|
+
</filter>
|
|
167
|
+
</defs>
|
|
168
|
+
</svg>
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
export { Gemini };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
|
|
3
|
+
const Openai = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg {...props} preserveAspectRatio="xMidYMid" viewBox="0 0 256 260">
|
|
5
|
+
<path d="M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87 51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921 51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58 28.138-16.217 28.188 16.218v32.434l-28.086 16.218-28.188-16.218-.052-32.434Z" />
|
|
6
|
+
</svg>
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
export { Openai };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
|
|
3
|
+
const OpenaiDark = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg {...props} preserveAspectRatio="xMidYMid" viewBox="0 0 256 260">
|
|
5
|
+
<path
|
|
6
|
+
fill="#fff"
|
|
7
|
+
d="M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87 51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921 51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58 28.138-16.217 28.188 16.218v32.434l-28.086 16.218-28.188-16.218-.052-32.434Z"
|
|
8
|
+
/>
|
|
9
|
+
</svg>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export { OpenaiDark };
|