@procore/storybook-addon 4.7.0 → 4.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.
- package/CHANGELOG.md +16 -0
- package/README.md +9 -11
- package/dist/legacy/chunk-QGM4M3NI.js +37 -0
- package/dist/legacy/index.cjs +8 -5343
- package/dist/legacy/index.d.cts +1 -2
- package/dist/legacy/index.d.ts +1 -2
- package/dist/legacy/index.js +5 -5121
- package/dist/legacy/preset.cjs +245 -48
- package/dist/legacy/preset.d.cts +8 -88
- package/dist/legacy/preset.d.ts +8 -88
- package/dist/legacy/preset.js +413 -7
- package/dist/modern/chunk-QGM4M3NI.js +37 -0
- package/dist/modern/index.cjs +8 -5343
- package/dist/modern/index.d.cts +1 -2
- package/dist/modern/index.d.ts +1 -2
- package/dist/modern/index.js +5 -5121
- package/dist/modern/preset.cjs +245 -48
- package/dist/modern/preset.d.cts +8 -88
- package/dist/modern/preset.d.ts +8 -88
- package/dist/modern/preset.js +413 -7
- package/package.json +11 -11
- package/dist/legacy/chunk-CLCAWS5I.js +0 -253
- package/dist/modern/chunk-CLCAWS5I.js +0 -253
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
# @procore/storybook-addon
|
|
2
2
|
|
|
3
|
+
## 4.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b8fa116: - Reverts changes related 4.6.0 and 4.7.0 and 4.7.1 .These changes introduced breaking behavior for consumers and are being reverted to prepare for a major version release with proper migration path.
|
|
8
|
+
|
|
9
|
+
## 4.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3e64de5: Fix unresolved storybook-addon issue
|
|
14
|
+
|
|
3
15
|
## 4.7.0
|
|
4
16
|
|
|
17
|
+
### Deprecated
|
|
18
|
+
|
|
19
|
+
Deprecated: resolution issue after Storybook v10 upgrade. Use 4.7.1.
|
|
20
|
+
|
|
5
21
|
### Minor Changes
|
|
6
22
|
|
|
7
23
|
- 87aa6f4: [Upgrade Storybook to v10](https://storybook.js.org/docs/releases/migration-guide)
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ An addon to customize procore theme and adds common used configuration.
|
|
|
8
8
|
yarn add -D @procore/storybook-addon
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
And add the addon to
|
|
11
|
+
And add the addon to you addon sets:
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
14
|
module.exports = {
|
|
@@ -16,13 +16,11 @@ module.exports = {
|
|
|
16
16
|
};
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
This addon
|
|
19
|
+
This simple addon adds 3 main addon used across different apps at Procore.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- [@storybook/addon-
|
|
24
|
-
- [@storybook/addon-a11y](https://storybook.js.org/addons/@storybook/addon-a11y) - Accessibility testing addon
|
|
25
|
-
- [@storybook/addon-styling-webpack](https://storybook.js.org/addons/@storybook/addon-styling-webpack) - Webpack styling configuration
|
|
21
|
+
- [@storybook/addon-essentials](https://storybook.js.org/addons/tag/essentials/)
|
|
22
|
+
- [@storybook/addon-storysource](https://storybook.js.org/addons/@storybook/addon-storysource)
|
|
23
|
+
- [@storybook/addon-a11y](https://storybook.js.org/addons/@storybook/addon-a11y)
|
|
26
24
|
|
|
27
25
|
## Usage
|
|
28
26
|
|
|
@@ -35,12 +33,12 @@ This addon provides essential functionality and addons used across different app
|
|
|
35
33
|
- a hower text ${\text{\color{green}{Core}}}$
|
|
36
34
|
- the link to core design system [https://design.procore.com](https://design.procore.com) on the logo.
|
|
37
35
|
|
|
38
|
-
In order to set the theme by default values ${\text{\color{green}{createProcoreTheme}}}$ needs to be added in `manager.
|
|
36
|
+
In order to set the theme by default values ${\text{\color{green}{createProcoreTheme}}}$ needs to be added in `manager.js`. If no parameter has been passed to the `createProcoreTheme` the aforementioned default values will be set.
|
|
39
37
|
|
|
40
38
|
```tsx
|
|
41
39
|
// .storybook/manager.js
|
|
42
40
|
import { createProcoreTheme } from '@procore/storybook-addon';
|
|
43
|
-
import { addons } from 'storybook/manager-api';
|
|
41
|
+
import { addons } from '@storybook/manager-api';
|
|
44
42
|
|
|
45
43
|
addons.setConfig({
|
|
46
44
|
theme: createProcoreTheme(),
|
|
@@ -53,7 +51,7 @@ For more configuration please visit: https://storybook.js.org/docs/react/configu
|
|
|
53
51
|
// .storybook/manager.js
|
|
54
52
|
// example below will override Procore default theming configuration
|
|
55
53
|
import { createProcoreTheme } from '@procore/storybook-addon';
|
|
56
|
-
import { addons } from 'storybook/manager-api';
|
|
54
|
+
import { addons } from '@storybook/manager-api';
|
|
57
55
|
|
|
58
56
|
addons.setConfig({
|
|
59
57
|
theme: createProcoreTheme({
|
|
@@ -105,4 +103,4 @@ Please refer to [Storybook Docs](https://storybook.js.org/docs/react/configure/o
|
|
|
105
103
|
|
|
106
104
|
## Testing
|
|
107
105
|
|
|
108
|
-
This addon should be tested by running `storybook` in `example-apps/react-ts`
|
|
106
|
+
This addon should be tested by running `storybook` in `example-apps/react-ts` and `example-apps/react-core-scripts` apps.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
__require,
|
|
35
|
+
__commonJS,
|
|
36
|
+
__toESM
|
|
37
|
+
};
|