@bbl-digital/snorre 4.1.21 → 4.1.22

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -30256,7 +30256,7 @@
30256
30256
  const tag = React.useMemo(() => getHtmlTag(header), [header]);
30257
30257
  const isHeadingOrHTMLHeading = headerTags.includes(tag || '');
30258
30258
  function getHtmlTag(node) {
30259
- if ( /*#__PURE__*/React__default["default"].isValidElement(node)) {
30259
+ if (/*#__PURE__*/React__default["default"].isValidElement(node)) {
30260
30260
  const element = node;
30261
30261
  if (typeof element.type === 'function') {
30262
30262
  return element.type.name;
@@ -32933,7 +32933,7 @@
32933
32933
  });
32934
32934
  let pages = [];
32935
32935
  for (let i = firstButtonIndex; i < firstButtonIndex + totalButtons; i++) {
32936
- pages.push( /*#__PURE__*/jsxRuntime$1.jsx(Button, {
32936
+ pages.push(/*#__PURE__*/jsxRuntime$1.jsx(Button, {
32937
32937
  nostyle: true,
32938
32938
  onClick: () => onPageClick && onPageClick(i + 1),
32939
32939
  css: PageStyle(currentPage === i + 1, theme.primary),
@@ -15,7 +15,7 @@ const CollapseListItem = /*#__PURE__*/React.forwardRef(({
15
15
  const tag = useMemo(() => getHtmlTag(header), [header]);
16
16
  const isHeadingOrHTMLHeading = headerTags.includes(tag || '');
17
17
  function getHtmlTag(node) {
18
- if ( /*#__PURE__*/React.isValidElement(node)) {
18
+ if (/*#__PURE__*/React.isValidElement(node)) {
19
19
  const element = node;
20
20
  if (typeof element.type === 'function') {
21
21
  return element.type.name;
@@ -25,7 +25,7 @@ const ListPager = ({
25
25
  });
26
26
  let pages = [];
27
27
  for (let i = firstButtonIndex; i < firstButtonIndex + totalButtons; i++) {
28
- pages.push( /*#__PURE__*/_jsx(Button, {
28
+ pages.push(/*#__PURE__*/_jsx(Button, {
29
29
  nostyle: true,
30
30
  onClick: () => onPageClick && onPageClick(i + 1),
31
31
  css: PageStyle(currentPage === i + 1, theme.primary),
@@ -15,7 +15,7 @@ const CollapseListItem = /*#__PURE__*/React.forwardRef(({
15
15
  const tag = useMemo(() => getHtmlTag(header), [header]);
16
16
  const isHeadingOrHTMLHeading = headerTags.includes(tag || '');
17
17
  function getHtmlTag(node) {
18
- if ( /*#__PURE__*/React.isValidElement(node)) {
18
+ if (/*#__PURE__*/React.isValidElement(node)) {
19
19
  const element = node;
20
20
  if (typeof element.type === 'function') {
21
21
  return element.type.name;
@@ -25,7 +25,7 @@ const ListPager = ({
25
25
  });
26
26
  let pages = [];
27
27
  for (let i = firstButtonIndex; i < firstButtonIndex + totalButtons; i++) {
28
- pages.push( /*#__PURE__*/_jsx(Button, {
28
+ pages.push(/*#__PURE__*/_jsx(Button, {
29
29
  nostyle: true,
30
30
  onClick: () => onPageClick && onPageClick(i + 1),
31
31
  css: PageStyle(currentPage === i + 1, theme.primary),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.1.21",
3
+ "version": "4.1.22",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",
@@ -20,8 +20,11 @@
20
20
  "author": "bbl-digital",
21
21
  "dependencies": {
22
22
  "@popperjs/core": "^2.11.5",
23
+ "@storybook/builder-vite": "^8.2.9",
24
+ "@storybook/react-dom-shim": "^8.2.9",
23
25
  "@tinymce/tinymce-react": "^3.14.0",
24
26
  "@types/quill": "^2.0.14",
27
+ "@vitejs/plugin-react": "^4.3.1",
25
28
  "date-fns": "^2.29.3",
26
29
  "focus-trap-react": "^10.0.0",
27
30
  "framer-motion": "^11.0.28",
@@ -50,10 +53,10 @@
50
53
  "scripts": {
51
54
  "prettier": "prettier --write src/**/*.{js,ts,tsx}",
52
55
  "prettier:check": "prettier --list-different src/**/*.{js,ts,tsx}",
53
- "storybook": "storybook dev -p 9009",
56
+ "storybook": "storybook dev -p 6006",
54
57
  "start": "yarn storybook",
55
58
  "theme": "node ./theme-generator.js",
56
- "build-storybook": "storybook build NODE_OPTIONS=--openssl-legacy-provider ",
59
+ "build-storybook": "storybook build",
57
60
  "build": "yarn run build:cjs && yarn run build:esm && yarn run build:umd && yarn run build:tsc",
58
61
  "build:tsc": "tsc -p ./src/packages/tsconfig.json",
59
62
  "build:cjs": "babel --extensions .ts,.tsx ./src/packages --out-dir ./lib",
@@ -68,25 +71,29 @@
68
71
  },
69
72
  "devDependencies": {
70
73
  "@babel/cli": "^7.17.10",
71
- "@babel/preset-react": "^7.18.6",
74
+ "@babel/preset-react": "^7.24.7",
72
75
  "@babel/preset-typescript": "^7.17.12",
76
+ "@chromatic-com/storybook": "^1",
73
77
  "@emotion/babel-plugin": "^11.9.2",
74
78
  "@emotion/babel-preset-css-prop": "^11.2.0",
75
79
  "@emotion/jest": "^11.9.3",
76
80
  "@emotion/react": "^11.9.3",
77
81
  "@emotion/styled": "^11.9.3",
78
82
  "@rollup/plugin-commonjs": "^20.0.0",
79
- "@storybook/addon-a11y": "7.0.12",
80
- "@storybook/addon-actions": "7.0.12",
81
- "@storybook/addon-docs": "7.0.12",
82
- "@storybook/addon-essentials": "7.0.12",
83
- "@storybook/addon-links": "7.0.12",
84
- "@storybook/addon-mdx-gfm": "7.0.12",
85
- "@storybook/addons": "7.0.12",
86
- "@storybook/blocks": "7.0.12",
87
- "@storybook/preset-create-react-app": "^3.2.0",
88
- "@storybook/react": "^7.0.12",
89
- "@storybook/react-vite": "^7.0.12",
83
+ "@storybook/addon-a11y": "^8.2.9",
84
+ "@storybook/addon-actions": "^8.2.9",
85
+ "@storybook/addon-docs": "^8.2.9",
86
+ "@storybook/addon-essentials": "^8.2.9",
87
+ "@storybook/addon-interactions": "^8.2.9",
88
+ "@storybook/addon-links": "^8.2.9",
89
+ "@storybook/addon-mdx-gfm": "^8.2.9",
90
+ "@storybook/addon-onboarding": "^8.2.9",
91
+ "@storybook/addon-themes": "^8.2.9",
92
+ "@storybook/blocks": "^8.2.9",
93
+ "@storybook/preset-create-react-app": "^8.2.9",
94
+ "@storybook/react": "^8.2.9",
95
+ "@storybook/react-vite": "^8.2.9",
96
+ "@storybook/test": "^8.2.9",
90
97
  "@testing-library/jest-dom": "^5.16.5",
91
98
  "@testing-library/react": "^13.4.0",
92
99
  "@testing-library/user-event": "^14.4.3",
@@ -102,6 +109,7 @@
102
109
  "@vitejs/plugin-react-swc": "^3.3.1",
103
110
  "babel-loader": "^8.2.5",
104
111
  "body-scroll-lock": "^3.1.5",
112
+ "eslint-plugin-storybook": "^0.8.0",
105
113
  "husky": "^4.2.5",
106
114
  "identity-obj-proxy": "^3.0.0",
107
115
  "jest": "^27.0.4",
@@ -115,7 +123,7 @@
115
123
  "react-transition-group": "^4.4.2",
116
124
  "rimraf": "^3.0.2",
117
125
  "rollup": "^2.75.7",
118
- "storybook": "7.0.12",
126
+ "storybook": "^8.2.9",
119
127
  "storybook-addon-emotion-theme": "^2.1.1",
120
128
  "ts-jest": "^27.0.3",
121
129
  "typescript": "^5.1.6"
@@ -148,7 +156,8 @@
148
156
  "eslintConfig": {
149
157
  "extends": [
150
158
  "react-app",
151
- "react-app/jest"
159
+ "react-app/jest",
160
+ "plugin:storybook/recommended"
152
161
  ]
153
162
  },
154
163
  "resolutions": {
package/vite.config.js ADDED
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ })