akku-kit 1.0.0-alpha.1 → 1.0.0-alpha.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.
Files changed (34) hide show
  1. package/dist/assets/images/upload-cloud-10ca378ec1b464ed.png +0 -0
  2. package/dist/components/Badge/Badge.d.ts +1 -0
  3. package/dist/components/FileUploader/CloseIcon.d.ts +8 -0
  4. package/dist/components/FileUploader/FileUploader.d.ts +15 -0
  5. package/dist/components/FileUploader/FileUploader.stories.d.ts +9 -0
  6. package/dist/components/FileUploader/index.d.ts +1 -0
  7. package/dist/components/Time-picker/TimePicker.d.ts +4 -0
  8. package/dist/components/Time-picker/TimePicker.types.d.ts +42 -0
  9. package/dist/components/Time-picker/index.d.ts +2 -0
  10. package/dist/components/ToggleGroup/ToggleGorup.stories.d.ts +68 -0
  11. package/dist/components/ToggleGroup/ToggleGroup.d.ts +15 -0
  12. package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +32 -0
  13. package/dist/components/Typography/Display/Display.stories.d.ts +1 -1
  14. package/dist/components/Typography/Label/Label.types.d.ts +2 -0
  15. package/dist/components/Typography/Label/label.stories.d.ts +1 -1
  16. package/dist/components/Typography/Text/Text.stories.d.ts +1 -1
  17. package/dist/index.cjs.js +5 -5
  18. package/dist/index.cjs.js.map +1 -1
  19. package/dist/index.d.ts +5 -0
  20. package/dist/index.esm.js +5 -5
  21. package/dist/index.esm.js.map +1 -1
  22. package/package.json +1 -1
  23. package/dist/components/Input.d.ts +0 -1
  24. package/dist/components/Modal/Modal.d.ts +0 -5
  25. package/dist/components/Modal/Modal.stories.d.ts +0 -12
  26. package/dist/components/Modal/Modal.types.d.ts +0 -56
  27. package/dist/components/Modal/index.d.ts +0 -2
  28. package/dist/storybook/Button.d.ts +0 -15
  29. package/dist/storybook/Button.stories.d.ts +0 -23
  30. package/dist/storybook/Header.d.ts +0 -12
  31. package/dist/storybook/Header.stories.d.ts +0 -18
  32. package/dist/storybook/Page.d.ts +0 -3
  33. package/dist/storybook/Page.stories.d.ts +0 -12
  34. package/dist/styles.css +0 -1
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BadgeProps } from './Badge.types';
3
+ import './Badge.scss';
3
4
  /**
4
5
  * A versatile Badge component for displaying small, informative labels.
5
6
  * It supports different visual variants and sizes.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface CloseIconProps {
3
+ width?: number;
4
+ height?: number;
5
+ color?: string;
6
+ }
7
+ declare const CloseIcon: React.FC<CloseIconProps>;
8
+ export default CloseIcon;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import "./FileUploader.scss";
3
+ export interface FileUploaderProps {
4
+ onFileUpload: (file: File, previewUrl: string | null) => void;
5
+ acceptedTypes?: string[];
6
+ maxFileSizeInMB?: number;
7
+ customDescription?: string;
8
+ customFileName?: string;
9
+ className?: string;
10
+ icon?: React.ReactNode;
11
+ previewImage?: string;
12
+ onClear?: () => void;
13
+ }
14
+ declare const FileUploader: React.FC<FileUploaderProps>;
15
+ export default FileUploader;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import FileUploader from "./FileUploader";
3
+ declare const meta: Meta<typeof FileUploader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof FileUploader>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomIcon: Story;
8
+ export declare const WithExternalPreview: Story;
9
+ export declare const WithCustomDescription: Story;
@@ -0,0 +1 @@
1
+ export { default } from "./FileUploader";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TimePickerProps } from "./TimePicker.types";
3
+ declare const TimePicker: React.FC<TimePickerProps>;
4
+ export default TimePicker;
@@ -0,0 +1,42 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
3
+ /**
4
+ * The current time value.
5
+ */
6
+ value?: Date | null;
7
+ /**
8
+ * Callback function triggered when the time changes.
9
+ * @param time - The selected Date object or null if cleared.
10
+ * @param timeString - The formatted time string.
11
+ */
12
+ onChange?: (time: Date | null, timeString: string) => void;
13
+ /**
14
+ * The format string for displaying the time (e.g., "HH:mm", "hh:mm A", "HH:mm:ss").
15
+ * Defaults to "HH:mm".
16
+ */
17
+ format?: string;
18
+ /**
19
+ * Whether to use 12-hour format with AM/PM.
20
+ * Defaults to false (24-hour format).
21
+ */
22
+ use12Hours?: boolean;
23
+ /**
24
+ * Placeholder text when no time is selected.
25
+ * Defaults to "Select time".
26
+ */
27
+ placeholder?: string;
28
+ /**
29
+ * Whether the time picker is disabled.
30
+ * Defaults to false.
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * Additional CSS class names to apply to the component.
35
+ */
36
+ className?: string;
37
+ /**
38
+ * Explicitly control whether the seconds column is shown, overriding `format` parsing.
39
+ * Defaults to `format.includes("s")`.
40
+ */
41
+ showSeconds?: boolean;
42
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./TimePicker";
2
+ export type { TimePickerProps } from "./TimePicker.types";
@@ -0,0 +1,68 @@
1
+ import { StoryObj } from "@storybook/react";
2
+ import React from "react";
3
+ import ToggleGroup from "./ToggleGroup";
4
+ import { ToggleGroupProps } from "./ToggleGroup.types";
5
+ declare const meta: {
6
+ title: string;
7
+ component: React.FC<ToggleGroupProps>;
8
+ tags: string[];
9
+ argTypes: {
10
+ onChange: {
11
+ action: string;
12
+ description: string;
13
+ };
14
+ name: {
15
+ control: "text";
16
+ description: string;
17
+ };
18
+ required: {
19
+ control: "boolean";
20
+ description: string;
21
+ };
22
+ options: {
23
+ control: "object";
24
+ description: string;
25
+ };
26
+ className: {
27
+ control: "text";
28
+ description: string;
29
+ };
30
+ };
31
+ parameters: {
32
+ docs: {
33
+ description: {
34
+ component: string;
35
+ };
36
+ };
37
+ };
38
+ };
39
+ export default meta;
40
+ type Story = StoryObj<typeof ToggleGroup>;
41
+ /**
42
+ * Default ToggleGroup story demonstrating basic usage.
43
+ * Users can click options and see the `onChange` action logged.
44
+ */
45
+ export declare const Default: Story;
46
+ /**
47
+ * ToggleGroup story with an option initially selected.
48
+ * This demonstrates how to set an initial selection if the component were to accept a `defaultValue` prop,
49
+ * or how a parent might manage the initial state if it were a controlled component.
50
+ *
51
+ * NOTE: As the current ToggleGroup component uses `useState(null)` internally and doesn't
52
+ * accept a `value` prop, this story simulates an initial selection by providing a default
53
+ * value to the `useState` hook within the story's render function.
54
+ */
55
+ export declare const WithInitialSelection: Story;
56
+ /**
57
+ * ToggleGroup story demonstrating a disabled option.
58
+ * The disabled option should not be clickable.
59
+ */
60
+ export declare const WithDisabledOption: Story;
61
+ /**
62
+ * ToggleGroup story with a larger set of options.
63
+ */
64
+ export declare const ManyOptions: Story;
65
+ /**
66
+ * ToggleGroup story showing the `required` prop (no visual change in this component).
67
+ */
68
+ export declare const RequiredField: Story;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { ToggleGroupProps } from "./ToggleGroup.types";
3
+ /**
4
+ * A customizable ToggleGroup component that allows users to select one option
5
+ * from a predefined set. It manages its own selected state internally.
6
+ *
7
+ * @param {ToggleGroupProps} props - The props for the component.
8
+ * @param {string} props.name - A unique identifier for the toggle group.
9
+ * @param {boolean} [props.required=false] - If true, indicates the selection is required (no visual effect in this component, but for form logic).
10
+ * @param {Array<{value: string; label: string; disabled?: boolean}>} props.options - An array of objects defining the toggle options.
11
+ * @param {string} [props.className=""] - Additional CSS class names for the root element.
12
+ * @param {(selectedValue: string) => void} [props.onChange] - Optional callback function triggered when an option is selected.
13
+ */
14
+ declare const ToggleGroup: React.FC<ToggleGroupProps>;
15
+ export default ToggleGroup;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Props for the ToggleGroup component.
3
+ */
4
+ export interface ToggleGroupProps {
5
+ /**
6
+ * The name of the field.
7
+ */
8
+ name: string;
9
+ /**
10
+ * Indicates if the field is required.
11
+ * @default false
12
+ */
13
+ required?: boolean;
14
+ /**
15
+ * An array of options for the toggle group.
16
+ * Each option requires a `value`, `label`, and an optional `disabled` status.
17
+ */
18
+ options: {
19
+ value: string;
20
+ label: string;
21
+ disabled?: boolean;
22
+ }[];
23
+ /**
24
+ * Additional CSS class names to apply to the component's root div.
25
+ */
26
+ className?: string;
27
+ /**
28
+ * Optional callback function triggered when a toggle option is selected.
29
+ * @param selectedValue The value of the newly selected option.
30
+ */
31
+ onChange?: (selectedValue: string) => void;
32
+ }
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  tags: string[];
8
8
  argTypes: {
9
9
  variant: {
10
- options: ("xs-semibold" | "xs-bold" | "sm-semibold" | "lg-semibold" | "md-semibold")[];
10
+ options: ("sm-semibold" | "md-semibold" | "lg-semibold" | "xs-semibold" | "xs-bold")[];
11
11
  control: {
12
12
  type: "radio";
13
13
  };
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
+ export type LabelColor = "primary" | "secondary" | "tertiary" | "brand-600" | "brand-700" | "success" | "white" | "placeholder";
2
3
  export interface LabelProps {
3
4
  variant?: "xs-regular" | "xs-medium" | "xs-semibold" | "sm-regular" | "sm-medium" | "sm-semibold" | "md-regular" | "md-semibold" | "lg-semibold" | "lg-bold" | "xl-semibold";
4
5
  required?: boolean;
5
6
  children: React.ReactNode;
6
7
  className?: string;
8
+ color?: LabelColor;
7
9
  as?: React.ElementType;
8
10
  }
9
11
  export type LabelVariant = "xs-regular" | "xs-medium" | "xs-semibold" | "sm-regular" | "sm-medium" | "sm-semibold" | "md-regular" | "md-semibold" | "lg-semibold" | "lg-bold" | "xl-semibold";
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  tags: string[];
8
8
  argTypes: {
9
9
  variant: {
10
- options: ("xs-semibold" | "sm-semibold" | "lg-semibold" | "md-semibold" | "xs-medium" | "sm-regular" | "sm-medium" | "md-regular" | "lg-bold" | "xl-semibold" | "xs-regular")[];
10
+ options: ("xs-medium" | "sm-regular" | "sm-medium" | "sm-semibold" | "md-regular" | "md-semibold" | "lg-semibold" | "lg-bold" | "xs-semibold" | "xl-semibold" | "xs-regular")[];
11
11
  control: {
12
12
  type: "select";
13
13
  };
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  tags: string[];
8
8
  argTypes: {
9
9
  variant: {
10
- options: ("xs-semibold" | "sm-semibold" | "lg-semibold" | "md-semibold" | "xs-medium" | "sm-regular" | "sm-medium" | "md-regular" | "lg-bold" | "xl-semibold" | "xs-regular")[];
10
+ options: ("xs-medium" | "sm-regular" | "sm-medium" | "sm-semibold" | "md-regular" | "md-semibold" | "lg-semibold" | "lg-bold" | "xs-semibold" | "xl-semibold" | "xs-regular")[];
11
11
  control: {
12
12
  type: "select";
13
13
  };