@voiceflow/style 1.6.1 → 1.7.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 +6 -0
- package/build/cjs/main.d.ts +1 -0
- package/build/cjs/main.d.ts.map +1 -1
- package/build/cjs/main.js +1 -0
- package/build/cjs/testing.d.ts +6 -0
- package/build/cjs/testing.d.ts.map +1 -0
- package/build/cjs/testing.js +17 -0
- package/build/esm/main.d.ts +1 -0
- package/build/esm/main.d.ts.map +1 -1
- package/build/esm/main.js +1 -0
- package/build/esm/testing.d.ts +6 -0
- package/build/esm/testing.d.ts.map +1 -0
- package/build/esm/testing.js +13 -0
- package/package.json +2 -2
- package/src/main.ts +1 -0
- package/src/testing.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.7.0](https://github.com/voiceflow/design/compare/@voiceflow/style@1.6.1...@voiceflow/style@1.7.0) (2024-02-06)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add testID to all components (DX-1006) ([#377](https://github.com/voiceflow/design/issues/377)) ([676a7ab](https://github.com/voiceflow/design/commit/676a7ab65de1055c351772302165bbfbe81840c2))
|
|
11
|
+
|
|
6
12
|
## [1.6.1](https://github.com/voiceflow/design/compare/@voiceflow/style@1.6.0...@voiceflow/style@1.6.1) (2024-01-19)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @voiceflow/style
|
package/build/cjs/main.d.ts
CHANGED
package/build/cjs/main.d.ts.map
CHANGED
|
@@ -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,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,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,WAAW,CAAC;AAC1B,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
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.clsx = exports.recipe = void 0;
|
|
18
18
|
__exportStar(require("./styled"), exports);
|
|
19
|
+
__exportStar(require("./testing"), exports);
|
|
19
20
|
__exportStar(require("./ThemeContext"), exports);
|
|
20
21
|
__exportStar(require("./types"), exports);
|
|
21
22
|
__exportStar(require("@vanilla-extract/css"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the pattern for data-testid attributes is based off of BEM naming
|
|
3
|
+
* https://getbem.com/naming/
|
|
4
|
+
*/
|
|
5
|
+
export declare const tid: (block: string | undefined, elements: string | [string, string, ...string[]], modifier?: string) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,GAAG,UAAW,MAAM,GAAG,SAAS,YAAY,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,aAAa,MAAM,uBASjH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* the pattern for data-testid attributes is based off of BEM naming
|
|
4
|
+
* https://getbem.com/naming/
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.tid = void 0;
|
|
8
|
+
const tid = (block, elements, modifier) => {
|
|
9
|
+
if (!block)
|
|
10
|
+
return undefined;
|
|
11
|
+
const elementList = typeof elements === 'string' ? [elements] : elements;
|
|
12
|
+
const blockElement = [block, ...elementList].join('__');
|
|
13
|
+
if (!modifier)
|
|
14
|
+
return blockElement;
|
|
15
|
+
return `${blockElement}--${modifier}`;
|
|
16
|
+
};
|
|
17
|
+
exports.tid = tid;
|
package/build/esm/main.d.ts
CHANGED
package/build/esm/main.d.ts.map
CHANGED
|
@@ -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,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,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,WAAW,CAAC;AAC1B,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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the pattern for data-testid attributes is based off of BEM naming
|
|
3
|
+
* https://getbem.com/naming/
|
|
4
|
+
*/
|
|
5
|
+
export declare const tid: (block: string | undefined, elements: string | [string, string, ...string[]], modifier?: string) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,GAAG,UAAW,MAAM,GAAG,SAAS,YAAY,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,aAAa,MAAM,uBASjH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the pattern for data-testid attributes is based off of BEM naming
|
|
3
|
+
* https://getbem.com/naming/
|
|
4
|
+
*/
|
|
5
|
+
export const tid = (block, elements, modifier) => {
|
|
6
|
+
if (!block)
|
|
7
|
+
return undefined;
|
|
8
|
+
const elementList = typeof elements === 'string' ? [elements] : elements;
|
|
9
|
+
const blockElement = [block, ...elementList].join('__');
|
|
10
|
+
if (!modifier)
|
|
11
|
+
return blockElement;
|
|
12
|
+
return `${blockElement}--${modifier}`;
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/style",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./build/cjs/main.d.ts",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"volta": {
|
|
58
58
|
"extends": "../../package.json"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "83548e11925159b32fb98bfcf849e7f2fe7a72b3"
|
|
61
61
|
}
|
package/src/main.ts
CHANGED
package/src/testing.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the pattern for data-testid attributes is based off of BEM naming
|
|
3
|
+
* https://getbem.com/naming/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const tid = (block: string | undefined, elements: string | [string, string, ...string[]], modifier?: string) => {
|
|
7
|
+
if (!block) return undefined;
|
|
8
|
+
|
|
9
|
+
const elementList = typeof elements === 'string' ? [elements] : elements;
|
|
10
|
+
const blockElement = [block, ...elementList].join('__');
|
|
11
|
+
|
|
12
|
+
if (!modifier) return blockElement;
|
|
13
|
+
|
|
14
|
+
return `${blockElement}--${modifier}`;
|
|
15
|
+
};
|