@bolttech/ob-atoms-breadcrumbs 1.0.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.
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@bolttech/ob-atoms-breadcrumbs",
3
+ "version": "1.0.0",
4
+ "dependencies": {
5
+ "@bolttech/ui-utils": "0.6.5",
6
+ "react": "19.1.1",
7
+ "@bolttech/ob-atoms-icon": "1.0.0"
8
+ },
9
+ "main": "./index.cjs.js",
10
+ "type": "commonjs",
11
+ "types": "./index.d.ts"
12
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/breadcrumbs';
@@ -0,0 +1,3 @@
1
+ import { IBreadcrumbProps } from './breadcrumbs.interface';
2
+ import './breadcrumbs.css';
3
+ export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<IBreadcrumbProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,25 @@
1
+ import { DefaultProps } from '@bolttech/ui-utils';
2
+ /**
3
+ * @type {BreadcrumbItem}
4
+ * @property {string} label Label that should be displayed on the Breadcrumb Item
5
+ * @property {string} href Url of each Breadcrumb Item
6
+ * @property {Function} onClick (Optional) On Click event for each Breadcrumb Item
7
+ */
8
+ export type BreadcrumbItem = {
9
+ label: string;
10
+ href?: string;
11
+ onClick?: () => void;
12
+ };
13
+ /**
14
+ * @interface IBreadcrumbProps
15
+ * @member {string} id A unique identifier for the Breadcrumb component, used for identifying specific instances.
16
+ * @member {string} dataTestId A data-testid attribute for testing purposes, making the component easy to target in tests.
17
+ * @member {Array<BreadcrumbItem>} items A required array of breadcrumb items. Each item should be an object containing label and href properties.
18
+ * @member {string} ariaLabel Optional parameter for accessibility purposes. This should be used for the expand item, providing a description for this action.
19
+ */
20
+ export interface IBreadcrumbProps extends DefaultProps {
21
+ id?: string;
22
+ dataTestId?: string;
23
+ items: BreadcrumbItem[];
24
+ ariaLabel?: string;
25
+ }
@@ -0,0 +1,24 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<import("./breadcrumbs.interface").IBreadcrumbProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ argTypes: {
6
+ id: {
7
+ type: "string";
8
+ description: string;
9
+ };
10
+ dataTestId: {
11
+ type: "string";
12
+ description: string;
13
+ };
14
+ items: {
15
+ description: string;
16
+ };
17
+ ariaLabel: {
18
+ description: string;
19
+ };
20
+ };
21
+ };
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+ export declare const Default: Story;