@veritone-ce/design-system 2.0.2 → 2.0.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 (31) hide show
  1. package/dist/esm-next/Alert/styles.module.scss.js +1 -1
  2. package/dist/esm-next/Button/styles.module.scss.js +1 -1
  3. package/dist/esm-next/Checkbox/styles.module.scss.js +1 -1
  4. package/dist/esm-next/Dialog/components.js +77 -24
  5. package/dist/esm-next/Dialog/styles.module.scss.js +1 -1
  6. package/dist/esm-next/Drawer/components.js +183 -0
  7. package/dist/esm-next/Drawer/factory.js +14 -0
  8. package/dist/esm-next/Drawer/state.js +40 -0
  9. package/dist/esm-next/Drawer/styles.module.scss.js +3 -0
  10. package/dist/esm-next/Input/styles.module.scss.js +1 -1
  11. package/dist/esm-next/Menu/styles.module.scss.js +1 -1
  12. package/dist/esm-next/RadioButton/styles.module.scss.js +1 -1
  13. package/dist/esm-next/Select/styles.module.scss.js +1 -1
  14. package/dist/esm-next/Textarea/styles.module.scss.js +1 -1
  15. package/dist/esm-next/Tooltip/styles.module.scss.js +1 -1
  16. package/dist/esm-next/Typography/index.js +4 -0
  17. package/dist/esm-next/Typography/variants.module.scss.js +1 -1
  18. package/dist/esm-next/index.js +3 -1
  19. package/dist/esm-next/styles/css-vars.js +9 -1
  20. package/dist/esm-next/styles/scss/theme.generated.scss +142 -2
  21. package/dist/esm-next/styles/typography.js +39 -2
  22. package/dist/esm-next/styles.css +12 -11
  23. package/dist/types/src-next/Dialog/components.d.ts +8 -2
  24. package/dist/types/src-next/Dialog/factory.d.ts +1 -0
  25. package/dist/types/src-next/Drawer/components.d.ts +33 -0
  26. package/dist/types/src-next/Drawer/factory.d.ts +14 -0
  27. package/dist/types/src-next/Drawer/index.d.ts +3 -0
  28. package/dist/types/src-next/Drawer/state.d.ts +113 -0
  29. package/dist/types/src-next/index.d.ts +2 -0
  30. package/dist/types/src-next/styles/typography.d.ts +3 -1
  31. package/package.json +4 -2
@@ -0,0 +1,113 @@
1
+ import * as React from 'react';
2
+ export interface DrawerOptions {
3
+ open: boolean;
4
+ onDismiss: () => void;
5
+ }
6
+ export declare function useDrawer({ open, onDismiss: dismissDrawer }: DrawerOptions): {
7
+ labelId: string | undefined;
8
+ descriptionId: string | undefined;
9
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
10
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
11
+ placement: import("@floating-ui/utils").Placement;
12
+ strategy: import("@floating-ui/utils").Strategy;
13
+ middlewareData: import("@floating-ui/core").MiddlewareData;
14
+ x: number;
15
+ y: number;
16
+ isPositioned: boolean;
17
+ update: () => void;
18
+ floatingStyles: React.CSSProperties;
19
+ refs: {
20
+ reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
21
+ floating: React.MutableRefObject<HTMLElement | null>;
22
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
23
+ setFloating: (node: HTMLElement | null) => void;
24
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
25
+ elements: {
26
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
27
+ floating: HTMLElement | null;
28
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
29
+ context: {
30
+ x: number;
31
+ y: number;
32
+ placement: import("@floating-ui/utils").Placement;
33
+ strategy: import("@floating-ui/utils").Strategy;
34
+ middlewareData: import("@floating-ui/core").MiddlewareData;
35
+ isPositioned: boolean;
36
+ update: () => void;
37
+ floatingStyles: React.CSSProperties;
38
+ open: boolean;
39
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
40
+ events: import("@floating-ui/react").FloatingEvents;
41
+ dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
42
+ nodeId: string | undefined;
43
+ floatingId: string;
44
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
45
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
46
+ };
47
+ getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
48
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
49
+ getItemProps: (userProps?: (Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
50
+ active?: boolean | undefined;
51
+ selected?: boolean | undefined;
52
+ }) | undefined) => Record<string, unknown>;
53
+ open: boolean;
54
+ dismiss: () => void;
55
+ };
56
+ export type DrawerContextType = (ReturnType<typeof useDrawer> & {
57
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
58
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
59
+ }) | null;
60
+ export declare const DrawerContext: React.Context<DrawerContextType>;
61
+ export declare const useDrawerContext: () => {
62
+ labelId: string | undefined;
63
+ descriptionId: string | undefined;
64
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
65
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
66
+ placement: import("@floating-ui/utils").Placement;
67
+ strategy: import("@floating-ui/utils").Strategy;
68
+ middlewareData: import("@floating-ui/core").MiddlewareData;
69
+ x: number;
70
+ y: number;
71
+ isPositioned: boolean;
72
+ update: () => void;
73
+ floatingStyles: React.CSSProperties;
74
+ refs: {
75
+ reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
76
+ floating: React.MutableRefObject<HTMLElement | null>;
77
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
78
+ setFloating: (node: HTMLElement | null) => void;
79
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
80
+ elements: {
81
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
82
+ floating: HTMLElement | null;
83
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
84
+ context: {
85
+ x: number;
86
+ y: number;
87
+ placement: import("@floating-ui/utils").Placement;
88
+ strategy: import("@floating-ui/utils").Strategy;
89
+ middlewareData: import("@floating-ui/core").MiddlewareData;
90
+ isPositioned: boolean;
91
+ update: () => void;
92
+ floatingStyles: React.CSSProperties;
93
+ open: boolean;
94
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
95
+ events: import("@floating-ui/react").FloatingEvents;
96
+ dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
97
+ nodeId: string | undefined;
98
+ floatingId: string;
99
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
100
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
101
+ };
102
+ getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
103
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
104
+ getItemProps: (userProps?: (Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
105
+ active?: boolean | undefined;
106
+ selected?: boolean | undefined;
107
+ }) | undefined) => Record<string, unknown>;
108
+ open: boolean;
109
+ dismiss: () => void;
110
+ } & {
111
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
112
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
113
+ };
@@ -12,6 +12,8 @@ export { default as CircularProgress } from './CircularProgress/index.js';
12
12
  export * from './CircularProgress/index.js';
13
13
  export { default as Dialog } from './Dialog/index.js';
14
14
  export * from './Dialog/index.js';
15
+ export { default as Drawer } from './Drawer/index.js';
16
+ export * from './Drawer/index.js';
15
17
  export { default as GlobalStyles } from './GlobalStyles/index.js';
16
18
  export * from './GlobalStyles/index.js';
17
19
  export * from './Icon/index.js';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const TypographyVariantKeys: readonly ["h4", "label", "paragraph1", "paragraph2", "paragraph3", "button", "buttonSmall"];
2
+ export declare const TypographyVariantKeys: readonly ["title", "h1", "h2", "h3", "h4", "label", "paragraph1", "paragraph2", "paragraph3", "button", "buttonSmall"];
3
3
  export type TypographyVariant = (typeof TypographyVariantKeys)[number];
4
4
  export type TypographyStyle = {
5
5
  fontFamily: React.CSSProperties['fontFamily'];
@@ -7,6 +7,8 @@ export type TypographyStyle = {
7
7
  fontWeight: React.CSSProperties['fontWeight'];
8
8
  fontSize: React.CSSProperties['fontSize'];
9
9
  lineHeight: React.CSSProperties['lineHeight'];
10
+ letterSpacing: React.CSSProperties['letterSpacing'];
11
+ textTransform: React.CSSProperties['textTransform'];
10
12
  };
11
13
  export interface TypographyStyleOptions extends Partial<TypographyStyle> {
12
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritone-ce/design-system",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "private": false,
5
5
  "description": "Design System for Veritone CE",
6
6
  "keywords": [
@@ -129,9 +129,10 @@
129
129
  "@types/react": "^18.0.0",
130
130
  "@types/react-dom": "^18.0.0",
131
131
  "@types/react-dropzone": "^5.1.0",
132
+ "@types/react-syntax-highlighter": "^15.5.11",
132
133
  "@typescript-eslint/eslint-plugin": "^6.7.0",
133
134
  "@typescript-eslint/parser": "^6.7.0",
134
- "auto": "^11.0.4",
135
+ "auto": "^11.1.1",
135
136
  "autoprefixer": "^10.4.17",
136
137
  "babel-jest": "^29.3.1",
137
138
  "babel-plugin-inline-react-svg": "^2.0.2",
@@ -158,6 +159,7 @@
158
159
  "prettier": "^3.0.3",
159
160
  "react": "^18.2.0",
160
161
  "react-dom": "^18.2.0",
162
+ "react-syntax-highlighter": "^15.5.0",
161
163
  "rollup": "^4.9.5",
162
164
  "rollup-plugin-copy": "^3.5.0",
163
165
  "rollup-plugin-delete": "^2.0.0",