@veritone-ce/design-system 2.7.0 → 2.7.2

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.
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import styles from './index.module.scss.js';
4
+ import { forwardRef, Children, cloneElement } from 'react';
5
+ import Button from '../../Button/index.js';
6
+ import { cx } from '../../styles/cx.js';
7
+ import '../../styles/defaultThemeOptions.js';
8
+ import '@capsizecss/core';
9
+ import 'color2k';
10
+ import '../../styles/defaultTheme.js';
11
+ import '../../styles/provider.client.js';
12
+ import '../../styles/css-vars.js';
13
+ import { NavigateBeforeIcon } from '../../Icon/internal.js';
14
+
15
+ function Breadcrumbs(props) {
16
+ return /* @__PURE__ */ jsx(
17
+ "nav",
18
+ {
19
+ style: props.style,
20
+ className: cx(styles.breadcrumbs, props.className),
21
+ children: Children.toArray(props.children).map((child, i) => {
22
+ return cloneElement(child, {
23
+ isFirstBreadcrumb: i === 0
24
+ });
25
+ })
26
+ }
27
+ );
28
+ }
29
+ function ButtonBreadcrumb({
30
+ isFirstBreadcrumb,
31
+ className,
32
+ startIcon,
33
+ children,
34
+ ...props
35
+ }) {
36
+ return /* @__PURE__ */ jsx(
37
+ Button,
38
+ {
39
+ ...props,
40
+ variant: "tertiary",
41
+ className: cx(
42
+ styles.breadcrumbButton,
43
+ isFirstBreadcrumb && styles.firstBreadcrumbButton,
44
+ className
45
+ ),
46
+ startIcon: isFirstBreadcrumb && /* @__PURE__ */ jsx(NavigateBeforeIcon, {}) || startIcon,
47
+ children
48
+ }
49
+ );
50
+ }
51
+ const HTMLLinkComponent = forwardRef(function({ to, ...rest }) {
52
+ return /* @__PURE__ */ jsx("a", { ...rest, href: to });
53
+ });
54
+ function LinkBreadcrumb({
55
+ LinkComponent = HTMLLinkComponent,
56
+ ...props
57
+ }) {
58
+ return /* @__PURE__ */ jsx(LinkComponent, { to: props.to, children: /* @__PURE__ */ jsx(ButtonBreadcrumb, { isFirstBreadcrumb: props.isFirstBreadcrumb, children: props.children }) });
59
+ }
60
+ function SeparatorBreadcrumb() {
61
+ return /* @__PURE__ */ jsx("div", { className: styles.separator });
62
+ }
63
+ function CustomBreadcrumb(props) {
64
+ return /* @__PURE__ */ jsx(Fragment, { children: props.children });
65
+ }
66
+
67
+ export { Breadcrumbs, ButtonBreadcrumb, CustomBreadcrumb, LinkBreadcrumb, SeparatorBreadcrumb };
@@ -0,0 +1,3 @@
1
+ var styles = {"breadcrumbs":"vt_ce_Breadcrumbs_breadcrumbs__f9260dc0","breadcrumbButton":"vt_ce_Breadcrumbs_breadcrumbButton__8f08e75a","firstBreadcrumbButton":"vt_ce_Breadcrumbs_firstBreadcrumbButton__4d18e736","separator":"vt_ce_Breadcrumbs_separator__6b872c06"};
2
+
3
+ export { styles as default };
@@ -1,3 +1,4 @@
1
1
  'use strict';
2
+ export { Breadcrumbs, ButtonBreadcrumb, CustomBreadcrumb, LinkBreadcrumb, SeparatorBreadcrumb } from './Breadcrumbs/index.js';
2
3
  export { default as Card } from './Card/index.js';
3
4
  export { Tab, default as Tabs } from './Tabs/index.js';
@@ -84,6 +84,7 @@ export declare const defaultThemeOptions: {
84
84
  on: string;
85
85
  };
86
86
  hover: string;
87
+ active: string;
87
88
  };
88
89
  tooltip: {
89
90
  surface: string;
@@ -7,6 +7,7 @@ export type PaletteSurfaceColors = {
7
7
  export type PaletteActionVariantsColors = {
8
8
  base: PaletteSurfaceColors;
9
9
  hover: PaletteSurfaceColors;
10
+ active: PaletteSurfaceColors;
10
11
  disabled: PaletteSurfaceColors;
11
12
  };
12
13
  export interface PaletteBrand {
@@ -11,6 +11,7 @@ export declare function isPaletteSurfaceColorsOptions(obj: unknown): obj is Pale
11
11
  export type PaletteActionVariantsColorsOptions = PaletteSurfaceColorsOptions | {
12
12
  base: PaletteSurfaceColorsOptions;
13
13
  hover?: PaletteSurfaceColorsOptions;
14
+ active?: PaletteSurfaceColorsOptions;
14
15
  disabled?: PaletteSurfaceColorsOptions;
15
16
  };
16
17
  export declare function isPaletteActionVariantsColorsOptions(obj: unknown): obj is PaletteActionVariantsColorsOptions;
@@ -0,0 +1,5 @@
1
+ import { LinkBreadcrumbProps, type LinkComponentType } from './index.js';
2
+ export type LinkBreadcrumbFactoryOptions = {
3
+ LinkComponent: LinkComponentType;
4
+ };
5
+ export declare function createLinkBreadcrumbComponent({ LinkComponent }: LinkBreadcrumbFactoryOptions): (props: LinkBreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { type ComponentType, CSSProperties, ReactNode } from 'react';
2
+ import { type ButtonProps } from '../../Button/index.js';
3
+ export type BreadcrumbsProps = {
4
+ children: ReactNode;
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ };
8
+ export declare function Breadcrumbs(props: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
9
+ export type ButtonBreadcrumbProps = Omit<ButtonProps, 'variant'> & {
10
+ isFirstBreadcrumb?: boolean;
11
+ };
12
+ export declare function ButtonBreadcrumb({ isFirstBreadcrumb, className, startIcon, children, ...props }: ButtonBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
13
+ export type LinkComponentTypeProps = {
14
+ to: string;
15
+ children?: ReactNode;
16
+ };
17
+ export type LinkComponentType = ComponentType<LinkComponentTypeProps>;
18
+ export type LinkBreadcrumbProps = {
19
+ LinkComponent?: LinkComponentType;
20
+ to: string;
21
+ children: ReactNode;
22
+ isFirstBreadcrumb?: boolean;
23
+ };
24
+ export declare function LinkBreadcrumb({ LinkComponent, ...props }: LinkBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function SeparatorBreadcrumb(): import("react/jsx-runtime").JSX.Element;
26
+ export type CustomBreadcrumbProps = {
27
+ children?: ReactNode;
28
+ };
29
+ export declare function CustomBreadcrumb(props: CustomBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ export * from './Breadcrumbs/index.js';
1
2
  export { default as Card } from './Card/index.js';
2
3
  export * from './Card/index.js';
3
4
  export { default as Tabs } from './Tabs/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritone-ce/design-system",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "private": false,
5
5
  "description": "Design System for Veritone CE",
6
6
  "keywords": [
@@ -139,14 +139,10 @@
139
139
  "@mui/material": "^5.10.8",
140
140
  "@rollup/plugin-node-resolve": "^16.0.1",
141
141
  "@rpldy/mock-sender": "^1.8.1",
142
- "@storybook/addon-a11y": "8.4.6",
143
- "@storybook/addon-essentials": "8.4.6",
144
- "@storybook/addon-interactions": "8.4.6",
145
- "@storybook/addon-links": "8.4.6",
146
- "@storybook/blocks": "8.4.6",
147
- "@storybook/react": "8.4.6",
148
- "@storybook/react-vite": "8.4.6",
149
- "@storybook/test": "8.4.6",
142
+ "@storybook/addon-a11y": "9.0.16",
143
+ "@storybook/addon-docs": "^9.0.16",
144
+ "@storybook/addon-links": "9.0.16",
145
+ "@storybook/react-vite": "9.0.16",
150
146
  "@testing-library/jest-dom": "^5.14.1",
151
147
  "@testing-library/react": "^13.4.0",
152
148
  "@testing-library/user-event": "^14.5.2",
@@ -157,7 +153,7 @@
157
153
  "@typescript-eslint/eslint-plugin": "^6.7.0",
158
154
  "@typescript-eslint/parser": "^6.7.0",
159
155
  "@vitejs/plugin-react": "^4.3.4",
160
- "@vitest/coverage-v8": "^1.3.1",
156
+ "@vitest/coverage-v8": "^3.2.4",
161
157
  "auto": "^11.1.1",
162
158
  "autoprefixer": "^10.4.17",
163
159
  "chromatic": "^11.2.0",
@@ -172,7 +168,7 @@
172
168
  "eslint-plugin-prettier": "^5.0.0",
173
169
  "eslint-plugin-react": "^7.33.2",
174
170
  "eslint-plugin-react-hooks": "^4.6.0",
175
- "eslint-plugin-storybook": "^0.11.1",
171
+ "eslint-plugin-storybook": "^9.0.16",
176
172
  "husky": "8.0.2",
177
173
  "identity-obj-proxy": "^3.0.0",
178
174
  "jsdom": "^24.0.0",
@@ -194,11 +190,11 @@
194
190
  "rollup-plugin-postcss": "^4.0.2",
195
191
  "rollup-plugin-preserve-directives": "^0.3.0",
196
192
  "sass": "^1.70.0",
197
- "storybook": "^8.4.6",
193
+ "storybook": "^9.0.16",
198
194
  "typescript": "^5.0.0",
199
195
  "typescript-plugin-css-modules": "^5.0.2",
200
- "vite": "^6.0.2",
201
- "vitest": "^1.3.1"
196
+ "vite": "^7.0.4",
197
+ "vitest": "^3.2.4"
202
198
  },
203
199
  "peerDependencies": {
204
200
  "@emotion/react": "^11.10.4",