@vention/machine-apps-components 0.3.21 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/index.esm.js +1573 -171
  2. package/package.json +7 -1
  3. package/src/constants/z-index.d.ts +8 -0
  4. package/src/contexts/i18n-context.d.ts +12 -0
  5. package/src/contexts/i18n-provider.d.ts +13 -0
  6. package/src/hooks/use-i18n.d.ts +19 -0
  7. package/src/i18n/config.d.ts +8 -0
  8. package/src/i18n/locales/de.d.ts +118 -0
  9. package/src/i18n/locales/en.d.ts +118 -0
  10. package/src/i18n/locales/es.d.ts +118 -0
  11. package/src/i18n/locales/fr.d.ts +118 -0
  12. package/src/i18n/utils.d.ts +13 -0
  13. package/src/index.d.ts +13 -0
  14. package/src/lib/action-button/action-button.d.ts +14 -0
  15. package/src/lib/action-button/action-button.stories.d.ts +15 -0
  16. package/src/lib/file-upload-panel/file-upload-panel.d.ts +23 -0
  17. package/src/lib/file-upload-panel/file-upload-panel.stories.d.ts +12 -0
  18. package/src/lib/i18n-settings/i18n-settings.d.ts +8 -0
  19. package/src/lib/i18n-settings/i18n-settings.stories.d.ts +7 -0
  20. package/src/lib/logs/logs-panel.stories.d.ts +6 -0
  21. package/src/lib/navigation-bar/navigation-bar.stories.d.ts +6 -0
  22. package/src/lib/navigation-bar/password-protection-modal.stories.d.ts +6 -0
  23. package/src/lib/settings-page/settings-page.d.ts +11 -0
  24. package/src/lib/settings-page/settings-page.stories.d.ts +9 -0
  25. package/src/lib/sidebar/sidebar.d.ts +1 -1
  26. package/src/lib/sidebar/sidebar.stories.d.ts +6 -0
  27. package/src/lib/status-top-bar/status-top-bar.stories.d.ts +7 -0
  28. package/src/lib/step-progress-circle/step-progress-circle.d.ts +14 -0
  29. package/src/lib/step-progress-circle/step-progress-circle.stories.d.ts +16 -0
  30. package/src/test-utils.d.ts +7 -6
  31. package/src/types/user-level.d.ts +6 -0
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { LogsPanel } from "./logs-panel";
3
+ declare const meta: Meta<typeof LogsPanel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LogsPanel>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { NavigationBar } from "./navigation-bar";
3
+ declare const meta: Meta<typeof NavigationBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NavigationBar>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { PasswordProtectionModal } from "./password-protection-modal";
3
+ declare const meta: Meta<typeof PasswordProtectionModal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PasswordProtectionModal>;
6
+ export declare const Default: Story;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ import { SidebarItem } from "../sidebar/sidebar";
3
+ export interface SettingsPageProps {
4
+ sidebarItems: SidebarItem[];
5
+ children: ReactNode;
6
+ sidebarWidth?: number | string;
7
+ }
8
+ export declare const SettingsPage: {
9
+ ({ sidebarItems, children, sidebarWidth }: SettingsPageProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SettingsPage } from "./settings-page";
3
+ declare const meta: Meta<typeof SettingsPage>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SettingsPage>;
6
+ export declare const Default: Story;
7
+ export declare const NarrowSidebar: Story;
8
+ export declare const WideSidebar: Story;
9
+ export declare const PercentageWidth: Story;
@@ -1,5 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { type IconType } from "@vention/machine-ui";
2
- import React from "react";
3
3
  export interface SidebarItem {
4
4
  id: string;
5
5
  title: string;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Sidebar } from "./sidebar";
3
+ declare const meta: Meta<typeof Sidebar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Sidebar>;
6
+ export declare const Default: Story;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { StatusTopBar } from "./status-top-bar";
3
+ declare const meta: Meta<typeof StatusTopBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StatusTopBar>;
6
+ export declare const Default: Story;
7
+ export declare const Error: Story;
@@ -0,0 +1,14 @@
1
+ export type StepProgressCircleVariant = "default" | "success" | "error" | "warning";
2
+ export interface StepProgressCircleProps {
3
+ currentStep: number;
4
+ totalSteps: number;
5
+ title?: string;
6
+ variant?: StepProgressCircleVariant;
7
+ size?: number;
8
+ strokeWidth?: number;
9
+ showTitle?: boolean;
10
+ }
11
+ export declare function StepProgressCircle({ currentStep, totalSteps, title, variant, size, strokeWidth, showTitle, }: StepProgressCircleProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace StepProgressCircle {
13
+ var displayName: string;
14
+ }
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { StepProgressCircle } from "./step-progress-circle";
3
+ declare const meta: Meta<typeof StepProgressCircle>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StepProgressCircle>;
6
+ export declare const Default: Story;
7
+ export declare const InProgress: Story;
8
+ export declare const Complete: Story;
9
+ export declare const WithError: Story;
10
+ export declare const Warning: Story;
11
+ export declare const CustomTitle: Story;
12
+ export declare const NoTitle: Story;
13
+ export declare const SmallSize: Story;
14
+ export declare const LargeSize: Story;
15
+ export declare const AllVariants: Story;
16
+ export declare const ProgressStages: Story;
@@ -2,11 +2,12 @@ import { ReactElement } from "react";
2
2
  import { RenderOptions, RenderResult } from "@testing-library/react";
3
3
  interface CustomRenderOptions extends Omit<RenderOptions, "wrapper"> {
4
4
  initialRoute?: string;
5
+ i18nConfig?: {
6
+ locale?: string;
7
+ unitSystem?: "metric" | "imperial";
8
+ timezone?: string | "auto";
9
+ supportedLanguages?: string[];
10
+ };
5
11
  }
6
- /**
7
- * Custom render function that wraps components with necessary providers:
8
- * - ThemeProvider with machineUiTheme
9
- * - MemoryRouter for routing
10
- */
11
- export declare const renderWithProviders: (ui: ReactElement, { initialRoute, ...renderOptions }?: CustomRenderOptions) => RenderResult;
12
+ export declare const renderWithProviders: (ui: ReactElement, { initialRoute, i18nConfig, ...renderOptions }?: CustomRenderOptions) => RenderResult;
12
13
  export * from "@testing-library/react";
@@ -0,0 +1,6 @@
1
+ export declare enum UserLevel {
2
+ Operator = 1,
3
+ Maintenance = 2,
4
+ Admin = 3
5
+ }
6
+ export declare function hasSufficientLevel(requiredLevel: UserLevel, currentLevel: UserLevel): boolean;