@kvdbil/components 14.3.8 → 14.3.16

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/README.md CHANGED
@@ -47,4 +47,4 @@ When adding new icons:
47
47
 
48
48
  ## Outdated dependencies
49
49
 
50
- - @testing-library/react, @types/react - Can't upgrade until React is in version 18
50
+ - typescript - @typescript-eslint/typescript-estree does not support any Typescript version above 5.5.4
@@ -19,7 +19,10 @@
19
19
  ${"large"===e&&a.largeSizeStyles()}
20
20
  `}
21
21
  background-color: transparent;
22
- transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease,
22
+ transition:
23
+ color 0.3s ease,
24
+ background-color 0.3s ease,
25
+ border 0.3s ease,
23
26
  filter 0.3s;
24
27
  ${({variant:e="solid",color:r="primary",colorShade:s="main",disabled:l,theme:t})=>i.css`
25
28
  ${l?a.disabledColorStyles(t,e):a.colorStyles[e](t,r,s)}
@@ -15,7 +15,10 @@
15
15
  border-color: ${i.getBorderColor};
16
16
  border-radius: 1.293rem;
17
17
  padding: ${({size:e,isDeletable:r})=>r?"0 0.5rem 0 1rem":n[e]};
18
- transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
18
+ transition:
19
+ color 0.3s ease,
20
+ background-color 0.3s ease,
21
+ border 0.3s ease;
19
22
 
20
23
  ${e=>!e.isDisabled&&e.isClickable&&` &:hover {\n border-color: ${i.getHoverBorderColor(e)};\n background-color: ${i.getHoverBackgroundColor(e)};\n color: ${i.getHoverColor(e)};\n } &:active {\n background-color: ${i.getActiveBackgroundColor(e)};\n border-color: ${i.getActiveBorderColor(e)};\n color: ${i.getActiveColor(e)};\n }`}
21
24
  `,s=l.default.span`
@@ -36,7 +36,9 @@
36
36
  padding: 1rem;
37
37
  background-color: white;
38
38
  border-radius: 3px;
39
- box-shadow: 0px 24px 38px rgba(0, 0, 0, 0.1), 0px 9px 46px rgba(0, 0, 0, 0.09),
39
+ box-shadow:
40
+ 0px 24px 38px rgba(0, 0, 0, 0.1),
41
+ 0px 9px 46px rgba(0, 0, 0, 0.09),
40
42
  0px 11px 15px rgba(0, 0, 0, 0.15);
41
43
 
42
44
  overflow-y: hidden;
@@ -6,7 +6,9 @@
6
6
  ${({size:e})=>e&&`\n width: ${e}rem;\n height: ${e}rem;\n margin-left: -${e/2}rem;\n `}
7
7
 
8
8
  border-width: 1px;
9
- transition: all 0.02s ease-in-out !important, width transition 0s !important;
9
+ transition:
10
+ all 0.02s ease-in-out !important,
11
+ width transition 0s !important;
10
12
 
11
13
  ${({isLoading:e,theme:i})=>!e&&`\n animation: none;\n border: 1px solid ${i.colors.gray.dark3};\n `}
12
14
  `,l=o.default.div`
@@ -5,7 +5,9 @@
5
5
  margin-bottom: -3px;
6
6
  padding: 0.875rem 1.375rem;
7
7
  border-bottom: ${({theme:e,isActive:r,activeColor:t})=>r?`3px solid ${e.colors[t].main}`:"3px solid transparent"};
8
- transition: color 0.3s ease, border 0.3s ease;
8
+ transition:
9
+ color 0.3s ease,
10
+ border 0.3s ease;
9
11
 
10
12
  :focus-visible {
11
13
  ${({theme:e,isActive:r,activeColor:t})=>!r&&`background-color: ${o.hexToRGB(e.colors[t].main,.1)};\n `}
@@ -19,7 +19,10 @@ import{jsx as s,jsxs as I,Fragment as W}from"react/jsx-runtime";import g,{forwar
19
19
  ${e==="large"&&R()}
20
20
  `}
21
21
  background-color: transparent;
22
- transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease,
22
+ transition:
23
+ color 0.3s ease,
24
+ background-color 0.3s ease,
25
+ border 0.3s ease,
23
26
  filter 0.3s;
24
27
  ${({variant:e="solid",color:i="primary",colorShade:l="main",disabled:n,theme:a})=>u`
25
28
  ${n?V(a,e):C[e](a,i,l)}
@@ -1,4 +1,4 @@
1
- import{ButtonSmallTextStyle as c,ButtonRegularTextStyle as e,ButtonLargeTextStyle as a}from"../../typography/ButtonText/index.js";import"react/jsx-runtime";import"styled-components";const n={smaller:c,small:e,regular:e,large:a},d=()=>`
1
+ import{ButtonLargeTextStyle as c,ButtonRegularTextStyle as e,ButtonSmallTextStyle as a}from"../../typography/ButtonText/index.js";import"react/jsx-runtime";import"styled-components";const n={smaller:a,small:e,regular:e,large:c},d=()=>`
2
2
  padding: 0.25rem 0.75rem;
3
3
  min-height: 2.5rem;
4
4
  `,g=()=>`
@@ -15,7 +15,10 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
15
15
  border-color: ${k};
16
16
  border-radius: 1.293rem;
17
17
  padding: ${({size:e,isDeletable:l})=>l?"0 0.5rem 0 1rem":A[e]};
18
- transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
18
+ transition:
19
+ color 0.3s ease,
20
+ background-color 0.3s ease,
21
+ border 0.3s ease;
19
22
 
20
23
  ${e=>!e.isDisabled&&e.isClickable&&` &:hover {
21
24
  border-color: ${B(e)};
@@ -1,5 +1,5 @@
1
- import{jsx as t}from"react/jsx-runtime";import a from"react-day-picker";import c from"styled-components";import r from"../../theme.js";import n from"./DayPickerNavBar.js";import{MONTHS as p,WEEKDAYS_LONG as s,WEEKDAYS_SHORT as f,FIRST_DAY_OF_THE_WEEK as y}from"./localeUtils.js";import d from"./style.js";import"../Icons/Arrow.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const E=c.div`
1
+ import{jsx as t}from"react/jsx-runtime";import a from"react-day-picker";import c from"styled-components";import r from"../../theme.js";import n from"./DayPickerNavBar.js";import{FIRST_DAY_OF_THE_WEEK as p,WEEKDAYS_SHORT as s,WEEKDAYS_LONG as f,MONTHS as y}from"./localeUtils.js";import d from"./style.js";import"../Icons/Arrow.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const E=c.div`
2
2
  ${d}
3
3
 
4
4
  font-family: ${({theme:o})=>o.typography.fontAlternativeFamily};
5
- `,S=o=>({selected:{color:r.colors.text.light,background:r.colors[o].main},today:{color:r.colors[o].main}}),e=({locale:o="sv",color:m="primary",...i})=>t(E,{color:m,children:t(a,{...i,locale:o,months:p[o],weekdaysLong:s[o],weekdaysShort:f[o],firstDayOfWeek:y[o],navbarElement:l=>t(n,{...l,locale:o}),captionElement:t("div",{}),modifiersStyles:S(m)})});export{e as DayPicker,e as default};
5
+ `,S=o=>({selected:{color:r.colors.text.light,background:r.colors[o].main},today:{color:r.colors[o].main}}),e=({locale:o="sv",color:m="primary",...i})=>t(E,{color:m,children:t(a,{...i,locale:o,months:y[o],weekdaysLong:f[o],weekdaysShort:s[o],firstDayOfWeek:p[o],navbarElement:l=>t(n,{...l,locale:o}),captionElement:t("div",{}),modifiersStyles:S(m)})});export{e as DayPicker,e as default};
@@ -36,7 +36,9 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
36
36
  padding: 1rem;
37
37
  background-color: white;
38
38
  border-radius: 3px;
39
- box-shadow: 0px 24px 38px rgba(0, 0, 0, 0.1), 0px 9px 46px rgba(0, 0, 0, 0.09),
39
+ box-shadow:
40
+ 0px 24px 38px rgba(0, 0, 0, 0.1),
41
+ 0px 9px 46px rgba(0, 0, 0, 0.09),
40
42
  0px 11px 15px rgba(0, 0, 0, 0.15);
41
43
 
42
44
  overflow-y: hidden;
@@ -10,7 +10,9 @@ import{jsxs as d,jsx as r}from"react/jsx-runtime";import o from"styled-component
10
10
  `}
11
11
 
12
12
  border-width: 1px;
13
- transition: all 0.02s ease-in-out !important, width transition 0s !important;
13
+ transition:
14
+ all 0.02s ease-in-out !important,
15
+ width transition 0s !important;
14
16
 
15
17
  ${({isLoading:i,theme:t})=>!i&&`
16
18
  animation: none;
@@ -5,7 +5,9 @@ import{jsx as s}from"react/jsx-runtime";import n from"styled-components";import{
5
5
  margin-bottom: -3px;
6
6
  padding: 0.875rem 1.375rem;
7
7
  border-bottom: ${({theme:e,isActive:o,activeColor:r})=>o?`3px solid ${e.colors[r].main}`:"3px solid transparent"};
8
- transition: color 0.3s ease, border 0.3s ease;
8
+ transition:
9
+ color 0.3s ease,
10
+ border 0.3s ease;
9
11
 
10
12
  :focus-visible {
11
13
  ${({theme:e,isActive:o,activeColor:r})=>!o&&`background-color: ${f(e.colors[r].main,.1)};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvdbil/components",
3
- "version": "14.3.8",
3
+ "version": "14.3.16",
4
4
  "sideEffects": false,
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -16,15 +16,18 @@
16
16
  "dev": "yarn storybook dev -p 6006 watch-css",
17
17
  "test": "jest --silent",
18
18
  "test:watch": "cross-env DEBUG_PRINT_LIMIT=14000 jest --verbose --watchAll",
19
+ "test:ci": "NODE_ENV=ci yarn test --bail=true",
19
20
  "type-check": "tsc",
20
21
  "generateIcons": "svgr --icon 1em --template ./src/icons/template.js -d ./src/icons/components ./src/icons/svgs --typescript",
21
- "build": "yarn run generateIcons && yarn lint && yarn test && rollup -c && yarn create-declaration",
22
+ "build": "yarn run generateIcons && rollup -c && yarn create-declaration",
22
23
  "build:rollup": "rollup -c && cp package.json dist/",
23
24
  "build:storybook": "storybook build",
24
- "lint": "eslint --fix --ext .js,.jsx,.ts,.tsx,.mdx src",
25
+ "lint": "eslint --fix",
25
26
  "analyze": "rollup -c rollup.config.analyze.js",
26
27
  "create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types",
27
- "validate-code": "yarn type-check && yarn lint && yarn test && echo '✅ Code is valid!'"
28
+ "prepare": "husky",
29
+ "validate-code": "yarn type-check && yarn lint && yarn test && echo '✅ Code is valid!'",
30
+ "publish-package": "./npm-publish.sh"
28
31
  },
29
32
  "peerDependencies": {
30
33
  "react": ">= 17.0.0",
@@ -42,18 +45,22 @@
42
45
  "not op_mini all"
43
46
  ],
44
47
  "resolutions": {
45
- "micromatch": ">=4.0.8"
48
+ "**/cross-spawn": "^7.0.5"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@babel/core": "^7.11.6",
52
+ "@babel/preset-env": "^7.25.4",
53
+ "@babel/preset-react": "^7.24.7",
54
+ "@babel/preset-typescript": "^7.24.7",
49
55
  "@commitlint/cli": "^19.4.0",
50
56
  "@commitlint/config-conventional": "^19.2.2",
57
+ "@emotion/is-prop-valid": "^1.3.1",
51
58
  "@rollup/plugin-terser": "^0.4.4",
52
- "@storybook/addon-essentials": "^7.0.0",
53
- "@storybook/addon-interactions": "^7.0.0",
54
- "@storybook/addon-links": "^7.0.0",
55
- "@storybook/react": "^7.0.0",
56
- "@storybook/react-webpack5": "^7.0.0",
59
+ "@storybook/addon-essentials": "^8.3.3",
60
+ "@storybook/addon-themes": "^8.3.3",
61
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
62
+ "@storybook/react": "^8.3.3",
63
+ "@storybook/react-webpack5": "^8.3.3",
57
64
  "@svgr/cli": "^8.0.0",
58
65
  "@team-griffin/install-self-peers": "^1.1.1",
59
66
  "@testing-library/dom": "^10.4.0",
@@ -69,35 +76,31 @@
69
76
  "@types/react-dom": "^18.3.0",
70
77
  "@types/react-transition-group": "^4.4.11",
71
78
  "@types/uuid": "^10.0.0",
72
- "@typescript-eslint/eslint-plugin": "^7.0.0",
73
- "@typescript-eslint/parser": "^7.0.0",
79
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
80
+ "@typescript-eslint/parser": "^8.7.0",
74
81
  "babel-plugin-dynamic-import-node": "^2.3.3",
75
82
  "babel-plugin-styled-components": "^2.1.4",
76
83
  "cross-env": "^7.0.3",
77
- "esbuild": "^0.23.1",
78
- "eslint": "^8.0.0",
79
- "eslint-config-prettier": "^8.3.0",
80
- "eslint-import-resolver-typescript": "^2.4.0",
81
- "eslint-plugin-flowtype": "^5.2.0",
82
- "eslint-plugin-import": "^2.24.2",
83
- "eslint-plugin-jsx-a11y": "^6.3.1",
84
- "eslint-plugin-mdx": "^1.15.0",
85
- "eslint-plugin-prettier": "^4.0.0",
86
- "eslint-plugin-react": "^7.25.1",
87
- "eslint-plugin-react-hooks": "^4.2.0",
84
+ "esbuild": "^0.24.0",
85
+ "eslint": "^9.11.1",
86
+ "eslint-config-prettier": "^9.1.0",
87
+ "eslint-plugin-mdx": "^3.1.5",
88
+ "eslint-plugin-react": "^7.36.1",
89
+ "eslint-plugin-react-hooks": "^5.0.0",
90
+ "globals": "^15.9.0",
88
91
  "husky": "^9.1.5",
89
92
  "jest": "^29.7.0",
90
93
  "jest-environment-jsdom": "^29.7.0",
91
94
  "jest-styled-components": "^7.2.0",
92
95
  "jest-watch-typeahead": "^2.2.2",
93
- "prettier": "^2.6.2",
96
+ "prettier": "^3.3.3",
94
97
  "react": "^18.3.1",
95
98
  "react-collapse": "^5.0.1",
96
99
  "react-day-picker": "^7.4.8",
97
100
  "react-docgen-typescript": "^2.2.2",
98
101
  "react-dom": "^18.3.1",
99
102
  "react-is": "^18.3.1",
100
- "react-select": "5.8.0",
103
+ "react-select": "^5.8.0",
101
104
  "react-select-event": "5.5.1",
102
105
  "react-transition-group": "^4.0.0",
103
106
  "rollup": "^4.21.2",
@@ -105,11 +108,11 @@
105
108
  "rollup-plugin-multi-input": "^1.5.0",
106
109
  "rollup-plugin-visualizer": "^5.5.2",
107
110
  "standard-version": "^9.3.1",
108
- "storybook": "^7.0.0",
111
+ "storybook": "^8.3.2",
109
112
  "styled-components": "^6.1.13",
110
113
  "ts-jest": "^29.2.4",
111
114
  "tslib": "^2.6.3",
112
- "typescript": "^5.5.4"
115
+ "typescript": "5.5.4"
113
116
  },
114
117
  "description": "KVDBil components library",
115
118
  "repository": {
@@ -0,0 +1,124 @@
1
+ {
2
+ "name": "@kvdbil/components",
3
+ "version": "14.3.16",
4
+ "sideEffects": false,
5
+ "main": "cjs/index.js",
6
+ "module": "esm/index.js",
7
+ "types": "types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./esm/index.js",
11
+ "require": "./cjs/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "start": "yarn dev",
16
+ "dev": "yarn storybook dev -p 6006 watch-css",
17
+ "test": "jest --silent",
18
+ "test:watch": "cross-env DEBUG_PRINT_LIMIT=14000 jest --verbose --watchAll",
19
+ "test:ci": "NODE_ENV=ci yarn test --bail=true",
20
+ "type-check": "tsc",
21
+ "generateIcons": "svgr --icon 1em --template ./src/icons/template.js -d ./src/icons/components ./src/icons/svgs --typescript",
22
+ "build": "yarn run generateIcons && rollup -c && yarn create-declaration",
23
+ "build:rollup": "rollup -c && cp package.json dist/",
24
+ "build:storybook": "storybook build",
25
+ "lint": "eslint --fix",
26
+ "analyze": "rollup -c rollup.config.analyze.js",
27
+ "create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types",
28
+ "validate-code": "yarn type-check && yarn lint && yarn test && echo '✅ Code is valid!'",
29
+ "publish-package": "./npm-publish.sh"
30
+ },
31
+ "peerDependencies": {
32
+ "react": ">= 17.0.0",
33
+ "react-collapse": ">= 5.0.1",
34
+ "react-day-picker": ">= 7.4.8",
35
+ "react-dom": ">= 17.0.0",
36
+ "react-select": ">= 5.8.0",
37
+ "react-transition-group": ">= 4.0.0",
38
+ "styled-components": ">= 5.1.17"
39
+ },
40
+ "browserslist": [
41
+ ">0.2%",
42
+ "not dead",
43
+ "not ie <= 11",
44
+ "not op_mini all"
45
+ ],
46
+ "resolutions": {
47
+ "**/cross-spawn": "^7.0.5"
48
+ },
49
+ "devDependencies": {
50
+ "@babel/core": "^7.11.6",
51
+ "@babel/preset-env": "^7.25.4",
52
+ "@babel/preset-react": "^7.24.7",
53
+ "@babel/preset-typescript": "^7.24.7",
54
+ "@commitlint/cli": "^19.4.0",
55
+ "@commitlint/config-conventional": "^19.2.2",
56
+ "@emotion/is-prop-valid": "^1.3.1",
57
+ "@rollup/plugin-terser": "^0.4.4",
58
+ "@storybook/addon-essentials": "^8.3.3",
59
+ "@storybook/addon-themes": "^8.3.3",
60
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
61
+ "@storybook/react": "^8.3.3",
62
+ "@storybook/react-webpack5": "^8.3.3",
63
+ "@svgr/cli": "^8.0.0",
64
+ "@team-griffin/install-self-peers": "^1.1.1",
65
+ "@testing-library/dom": "^10.4.0",
66
+ "@testing-library/jest-dom": "^6.5.0",
67
+ "@testing-library/react": "^16.0.1",
68
+ "@testing-library/react-hooks": "^8.0.1",
69
+ "@testing-library/user-event": "^14.5.2",
70
+ "@types/classnames": "^2.2.11",
71
+ "@types/jest": "^29.5.12",
72
+ "@types/node": "^22.4.1",
73
+ "@types/react": "^18.3.8",
74
+ "@types/react-collapse": "^5.0.4",
75
+ "@types/react-dom": "^18.3.0",
76
+ "@types/react-transition-group": "^4.4.11",
77
+ "@types/uuid": "^10.0.0",
78
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
79
+ "@typescript-eslint/parser": "^8.7.0",
80
+ "babel-plugin-dynamic-import-node": "^2.3.3",
81
+ "babel-plugin-styled-components": "^2.1.4",
82
+ "cross-env": "^7.0.3",
83
+ "esbuild": "^0.24.0",
84
+ "eslint": "^9.11.1",
85
+ "eslint-config-prettier": "^9.1.0",
86
+ "eslint-plugin-mdx": "^3.1.5",
87
+ "eslint-plugin-react": "^7.36.1",
88
+ "eslint-plugin-react-hooks": "^5.0.0",
89
+ "globals": "^15.9.0",
90
+ "husky": "^9.1.5",
91
+ "jest": "^29.7.0",
92
+ "jest-environment-jsdom": "^29.7.0",
93
+ "jest-styled-components": "^7.2.0",
94
+ "jest-watch-typeahead": "^2.2.2",
95
+ "prettier": "^3.3.3",
96
+ "react": "^18.3.1",
97
+ "react-collapse": "^5.0.1",
98
+ "react-day-picker": "^7.4.8",
99
+ "react-docgen-typescript": "^2.2.2",
100
+ "react-dom": "^18.3.1",
101
+ "react-is": "^18.3.1",
102
+ "react-select": "^5.8.0",
103
+ "react-select-event": "5.5.1",
104
+ "react-transition-group": "^4.0.0",
105
+ "rollup": "^4.21.2",
106
+ "rollup-plugin-esbuild": "^6.1.1",
107
+ "rollup-plugin-multi-input": "^1.5.0",
108
+ "rollup-plugin-visualizer": "^5.5.2",
109
+ "standard-version": "^9.3.1",
110
+ "storybook": "^8.3.2",
111
+ "styled-components": "^6.1.13",
112
+ "ts-jest": "^29.2.4",
113
+ "tslib": "^2.6.3",
114
+ "typescript": "5.5.4"
115
+ },
116
+ "description": "KVDBil components library",
117
+ "repository": {
118
+ "type": "git",
119
+ "url": "git+ssh://git@bitbucket.org/kvarndammen/kvdbil-components.git"
120
+ },
121
+ "author": "",
122
+ "license": "ISC",
123
+ "homepage": "https://bitbucket.org/kvarndammen/kvdbil-components#readme"
124
+ }
@@ -1,13 +1,9 @@
1
- import React from 'react';
2
- declare const Item: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
3
- isOpen: boolean;
4
- }>> & string;
5
- interface Item {
1
+ interface IItem {
6
2
  title: string;
7
3
  text: string;
8
4
  }
9
5
  export interface AccordionProps {
10
- items: Item[];
6
+ items: IItem[];
11
7
  }
12
8
  export declare const Accordion: ({ items, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
13
9
  export default Accordion;
@@ -1,4 +1,4 @@
1
1
  declare const Bacon: ({ color }: {
2
- color?: string | undefined;
2
+ color?: string;
3
3
  }) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Bacon;