@voiceflow/style 1.2.5 → 1.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.4.0](https://github.com/voiceflow/design/compare/@voiceflow/style@1.3.0...@voiceflow/style@1.4.0) (2023-07-07)
7
+
8
+ ### Features
9
+
10
+ * improve components to support SlateEditor (DX-000) ([#105](https://github.com/voiceflow/design/issues/105)) ([51c41e5](https://github.com/voiceflow/design/commit/51c41e53dc20c05244186638f8b22b2b2b768e75))
11
+
12
+ # [1.3.0](https://github.com/voiceflow/design/compare/@voiceflow/style@1.2.5...@voiceflow/style@1.3.0) (2023-07-07)
13
+
14
+ ### Features
15
+
16
+ * improve menu component (DX-000) ([#110](https://github.com/voiceflow/design/issues/110)) ([fc772b5](https://github.com/voiceflow/design/commit/fc772b53d9b1c6184cff239354b7e085117c065b))
17
+
6
18
  ## [1.2.5](https://github.com/voiceflow/design/compare/@voiceflow/style@1.2.4...@voiceflow/style@1.2.5) (2023-07-05)
7
19
 
8
20
  ### Bug Fixes
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { RecipeVariants } from '../../main';
2
+ import type { VariantProps } from '../../main';
3
3
  import type { ButtonProps } from '../Button';
4
4
  import type { complex } from './RecipeButton.css';
5
- export type RecipeButtonProps = ButtonProps & RecipeVariants<typeof complex>;
5
+ export interface RecipeButtonProps extends ButtonProps, VariantProps<typeof complex> {
6
+ }
6
7
  export declare const RecipeButton: React.FC<RecipeButtonProps>;
7
8
  //# sourceMappingURL=RecipeButton.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecipeButton.component.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/RecipeButton.component.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAIpD,CAAC"}
1
+ {"version":3,"file":"RecipeButton.component.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/RecipeButton.component.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,WAAW,iBAAkB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC;CAAG;AAEvF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAIpD,CAAC"}
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as css from './RecipeButton.css';
3
- export declare const RecipeButton: import("react").FC<import("..").ButtonProps & {
4
- color?: "ok" | "warn" | undefined;
5
- fontSize?: "sm" | "md" | "lg" | undefined;
6
- }> & {
3
+ export declare const RecipeButton: import("react").FC<import("./RecipeButton.component").RecipeButtonProps> & {
7
4
  css: typeof css;
8
5
  };
9
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,YAAY;;;;;CAAgD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,YAAY;;CAAgD,CAAC"}
@@ -3,6 +3,7 @@ export * from './ThemeContext';
3
3
  export * from './types';
4
4
  export * from '@vanilla-extract/css';
5
5
  export * from '@vanilla-extract/dynamic';
6
- export * from '@vanilla-extract/recipes';
6
+ export type { RuntimeFn } from '@vanilla-extract/recipes';
7
+ export { recipe } from '@vanilla-extract/recipes';
7
8
  export { clsx } from 'clsx';
8
9
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC"}
package/build/cjs/main.js CHANGED
@@ -14,12 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.clsx = void 0;
17
+ exports.clsx = exports.recipe = void 0;
18
18
  __exportStar(require("./styled"), exports);
19
19
  __exportStar(require("./ThemeContext"), exports);
20
20
  __exportStar(require("./types"), exports);
21
21
  __exportStar(require("@vanilla-extract/css"), exports);
22
22
  __exportStar(require("@vanilla-extract/dynamic"), exports);
23
- __exportStar(require("@vanilla-extract/recipes"), exports);
23
+ var recipes_1 = require("@vanilla-extract/recipes");
24
+ Object.defineProperty(exports, "recipe", { enumerable: true, get: function () { return recipes_1.recipe; } });
24
25
  var clsx_1 = require("clsx");
25
26
  Object.defineProperty(exports, "clsx", { enumerable: true, get: function () { return clsx_1.clsx; } });
@@ -2,5 +2,5 @@ import type { ComplexStyleRule } from '@vanilla-extract/css';
2
2
  import type { RecipeVariants, RuntimeFn } from '@vanilla-extract/recipes';
3
3
  import type { Simplify } from 'type-fest';
4
4
  export type VariantStyleRules = Record<string, Record<string, ComplexStyleRule | string>>;
5
- export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Simplify<RecipeVariants<RecipeFn>>;
5
+ export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Exclude<Simplify<RecipeVariants<RecipeFn>>, undefined | null>;
6
6
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC;AAE1F,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,SAAS,CAAC,iBAAiB,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC;AAE1F,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,SAAS,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAC/E,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,EAClC,SAAS,GAAG,IAAI,CACjB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { RecipeVariants } from '../../main.js';
2
+ import type { VariantProps } from '../../main.js';
3
3
  import type { ButtonProps } from '../Button/index.js';
4
4
  import type { complex } from './RecipeButton.css.js';
5
- export type RecipeButtonProps = ButtonProps & RecipeVariants<typeof complex>;
5
+ export interface RecipeButtonProps extends ButtonProps, VariantProps<typeof complex> {
6
+ }
6
7
  export declare const RecipeButton: React.FC<RecipeButtonProps>;
7
8
  //# sourceMappingURL=RecipeButton.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecipeButton.component.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/RecipeButton.component.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAIpD,CAAC"}
1
+ {"version":3,"file":"RecipeButton.component.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/RecipeButton.component.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,WAAW,iBAAkB,SAAQ,WAAW,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC;CAAG;AAEvF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAIpD,CAAC"}
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as css from './RecipeButton.css.js';
3
- export declare const RecipeButton: import("react").FC<import("../index.js").ButtonProps & {
4
- color?: "ok" | "warn" | undefined;
5
- fontSize?: "sm" | "md" | "lg" | undefined;
6
- }> & {
3
+ export declare const RecipeButton: import("react").FC<import("./RecipeButton.component.js").RecipeButtonProps> & {
7
4
  css: typeof css;
8
5
  };
9
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,YAAY;;;;;CAAgD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__fixtures__/RecipeButton/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,YAAY;;CAAgD,CAAC"}
@@ -3,6 +3,7 @@ export * from './ThemeContext.js';
3
3
  export * from './types.js';
4
4
  export * from '@vanilla-extract/css';
5
5
  export * from '@vanilla-extract/dynamic';
6
- export * from '@vanilla-extract/recipes';
6
+ export type { RuntimeFn } from '@vanilla-extract/recipes';
7
+ export { recipe } from '@vanilla-extract/recipes';
7
8
  export { clsx } from 'clsx';
8
9
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC"}
package/build/esm/main.js CHANGED
@@ -3,5 +3,5 @@ export * from './ThemeContext.js';
3
3
  export * from './types.js';
4
4
  export * from '@vanilla-extract/css';
5
5
  export * from '@vanilla-extract/dynamic';
6
- export * from '@vanilla-extract/recipes';
6
+ export { recipe } from '@vanilla-extract/recipes';
7
7
  export { clsx } from 'clsx';
@@ -2,5 +2,5 @@ import type { ComplexStyleRule } from '@vanilla-extract/css';
2
2
  import type { RecipeVariants, RuntimeFn } from '@vanilla-extract/recipes';
3
3
  import type { Simplify } from 'type-fest';
4
4
  export type VariantStyleRules = Record<string, Record<string, ComplexStyleRule | string>>;
5
- export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Simplify<RecipeVariants<RecipeFn>>;
5
+ export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Exclude<Simplify<RecipeVariants<RecipeFn>>, undefined | null>;
6
6
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC;AAE1F,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,SAAS,CAAC,iBAAiB,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC;AAE1F,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,SAAS,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAC/E,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,EAClC,SAAS,GAAG,IAAI,CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/style",
3
- "version": "1.2.5",
3
+ "version": "1.4.0",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./build/cjs/main.d.ts",
@@ -54,5 +54,5 @@
54
54
  "peerDependencies": {
55
55
  "react": "^18"
56
56
  },
57
- "gitHead": "e611e3f0a8472bdc0265fa70b2606df3facfbb2f"
57
+ "gitHead": "e0997e6e658c34867a842d70e6b70d11c74d3d6d"
58
58
  }
@@ -1,10 +1,10 @@
1
- import type { RecipeVariants } from '@/main';
1
+ import type { VariantProps } from '@/main';
2
2
 
3
3
  import type { ButtonProps } from '../Button';
4
4
  import type { complex } from './RecipeButton.css';
5
5
  import * as S from './RecipeButton.styled';
6
6
 
7
- export type RecipeButtonProps = ButtonProps & RecipeVariants<typeof complex>;
7
+ export interface RecipeButtonProps extends ButtonProps, VariantProps<typeof complex> {}
8
8
 
9
9
  export const RecipeButton: React.FC<RecipeButtonProps> = ({ color, fontSize, onClick, children }) => (
10
10
  <S.Base variants={{ color, fontSize }} onClick={onClick}>
package/src/main.ts CHANGED
@@ -3,5 +3,6 @@ export * from './ThemeContext';
3
3
  export * from './types';
4
4
  export * from '@vanilla-extract/css';
5
5
  export * from '@vanilla-extract/dynamic';
6
- export * from '@vanilla-extract/recipes';
6
+ export type { RuntimeFn } from '@vanilla-extract/recipes';
7
+ export { recipe } from '@vanilla-extract/recipes';
7
8
  export { clsx } from 'clsx';
package/src/types.ts CHANGED
@@ -4,4 +4,7 @@ import type { Simplify } from 'type-fest';
4
4
 
5
5
  export type VariantStyleRules = Record<string, Record<string, ComplexStyleRule | string>>;
6
6
 
7
- export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Simplify<RecipeVariants<RecipeFn>>;
7
+ export type VariantProps<RecipeFn extends RuntimeFn<VariantStyleRules>> = Exclude<
8
+ Simplify<RecipeVariants<RecipeFn>>,
9
+ undefined | null
10
+ >;