@loadsmart/loadsmart-ui 5.15.2 → 5.16.1
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/dist/DragDropFile.context-0f0ede42.js +2 -0
- package/dist/DragDropFile.context-0f0ede42.js.map +1 -0
- package/dist/common/BackButton/BackButton.d.ts +0 -1
- package/dist/common/CloseButton/CloseButton.d.ts +0 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -1
- package/dist/components/Banner/Banner.stories.d.ts +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -1
- package/dist/components/Calendar/Calendar.d.ts +0 -1
- package/dist/components/Calendar/Calendar.stories.d.ts +0 -1
- package/dist/components/Calendar/PickerModeToggle.d.ts +0 -1
- package/dist/components/Calendar/Pickers/DayPicker.d.ts +0 -1
- package/dist/components/Calendar/Pickers/MonthPicker.d.ts +0 -1
- package/dist/components/Calendar/Pickers/YearPicker.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -1
- package/dist/components/DatePicker/DateRangePicker.d.ts +0 -1
- package/dist/components/DatePicker/DateRangePicker.stories.d.ts +0 -1
- package/dist/components/DatePicker/useDatePicker.d.ts +0 -2
- package/dist/components/DatePicker/useDateRangePicker.d.ts +0 -3
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -1
- package/dist/components/DragDropFile/DragDropFile.d.ts +0 -1
- package/dist/components/DragDropFile/DragDropFile.stories.d.ts +0 -1
- package/dist/components/DragDropFile/components/Wrapper.d.ts +0 -1
- package/dist/components/DragDropFile/styles.d.ts +0 -1
- package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -1
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +0 -1
- package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -1
- package/dist/components/IconFactory/IconFactory.d.ts +0 -1
- package/dist/components/Label/Label.stories.d.ts +0 -1
- package/dist/components/Layout/Layout.stories.d.ts +0 -1
- package/dist/components/Link/Link.stories.d.ts +0 -1
- package/dist/components/Loaders/LoadingDots.d.ts +0 -1
- package/dist/components/Loaders/Spinner.d.ts +0 -1
- package/dist/components/Modal/Modal.stories.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -1
- package/dist/components/Pagination/PaginationItem.d.ts +0 -1
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +0 -1
- package/dist/components/Radio/Radio.stories.d.ts +0 -1
- package/dist/components/Section/Sections.stories.d.ts +0 -1
- package/dist/components/Select/SelectCreatableOption.d.ts +0 -1
- package/dist/components/Select/SelectEmpty.d.ts +0 -1
- package/dist/components/Select/SelectOption.d.ts +0 -1
- package/dist/components/SideNavigation/Separator/Separator.d.ts +0 -1
- package/dist/components/SideNavigation/SideNavigation.stories.d.ts +0 -1
- package/dist/components/Steps/ProgressSteps/ProgressSteps.d.ts +0 -1
- package/dist/components/Table/Table.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +0 -1
- package/dist/components/Table/TableSortHandle.d.ts +0 -1
- package/dist/components/TablePagination/RowsPerPage.d.ts +0 -1
- package/dist/components/TablePagination/TablePagination.d.ts +0 -1
- package/dist/components/TablePagination/TablePaginationActions.d.ts +0 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -1
- package/dist/components/Tag/Tag.stories.d.ts +0 -1
- package/dist/components/TextField/TextField.stories.d.ts +0 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -1
- package/dist/components/Toast/Toast.stories.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -1
- package/dist/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.d.ts +0 -1
- package/dist/components/TopNavigation/TopNavigation.stories.d.ts +0 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -2
- package/dist/index.js +448 -448
- package/dist/index.js.map +1 -1
- package/dist/miranda-compatibility.theme-4cecc6cf.js +1 -1
- package/dist/miranda-compatibility.theme-4cecc6cf.js.map +1 -1
- package/dist/prop-a330029f.js.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/renderWithDragDropFileProvider/renderWithDragDropFileProvider.d.ts +2 -1
- package/dist/theming/index.js.map +1 -1
- package/dist/toArray-b56541b4.js.map +1 -1
- package/dist/utils/toolset/highlightMatch.d.ts +0 -1
- package/package.json +218 -207
- package/src/components/Dropdown/Dropdown.test.tsx +4 -2
- package/src/components/Table/Table.test.tsx +2 -2
- package/src/components/TablePagination/TablePagination.test.tsx +2 -2
- package/src/testing/renderWithDragDropFileProvider/renderWithDragDropFileProvider.tsx +2 -1
- package/dist/DragDropFile.context-cf460901.js +0 -16
- package/dist/DragDropFile.context-cf460901.js.map +0 -1
- package/dist/addons/Theme/register.d.ts +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import type { RenderResult } from '@testing-library/react';
|
|
2
3
|
import type { DragDropFileContextValue } from '../../components/DragDropFile/types';
|
|
3
|
-
declare const renderWithDragDropFileProvider: (ui: ReactNode, customContext?: Partial<DragDropFileContextValue> | undefined) =>
|
|
4
|
+
declare const renderWithDragDropFileProvider: (ui: ReactNode, customContext?: Partial<DragDropFileContextValue> | undefined) => RenderResult;
|
|
4
5
|
export default renderWithDragDropFileProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/theming/index.ts"],"sourcesContent":["import { isFunction } from '@loadsmart/utils-function'\n\nimport type { ThemeProps } from 'styled-components'\nimport type ThemeAlice from './themes/alice.theme'\n\nexport type ThemeToken = keyof typeof ThemeAlice\nexport type ThemeTokenValue = string | number\n\nexport type CustomTheme = Record<ThemeToken, ThemeTokenValue>\nexport type ThemedProps = ThemeProps<CustomTheme>\n\ntype TokenLike<P extends ThemedProps = ThemedProps> = ThemeToken | ((props: P) => ThemeToken)\n\nfunction getTokenFromTheme<P extends ThemedProps>(token: TokenLike<P>, props: P): ThemeTokenValue {\n const tokenName = isFunction(token) ? token(props) : token\n return props.theme[tokenName]\n}\n\n/**\n * Return a design token value for the current theme.\n * @param {string} token - Token whose value should be returned.\n * @param {[ThemedStyledProps]} props - Component props.\n * @returns {ThemeTokenValue} Token value or `undefined` if the token was not found for the current theme.\n */\nexport function getToken<TProps extends ThemedProps>(\n token: TokenLike<TProps>\n): (props: TProps) => ThemeTokenValue\n\nexport function getToken<TProps extends ThemedProps>(\n token: TokenLike<TProps>,\n props: TProps\n): ThemeTokenValue\n\nexport function getToken<TProps extends ThemedProps>(token: any, props?: any): any {\n if (props === undefined) {\n return (props: TProps) => getTokenFromTheme(token, props)\n }\n\n return getTokenFromTheme(token, props)\n}\n\nexport * as Themes from './themes'\n"],"names":["getTokenFromTheme","token","props","tokenName","isFunction","theme","undefined"],"mappings":"8QAaA,SAASA,EAAyCC,EAAqBC,GACrE,MAAMC,EAAYC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/theming/index.ts"],"sourcesContent":["import { isFunction } from '@loadsmart/utils-function'\n\nimport type { ThemeProps } from 'styled-components'\nimport type ThemeAlice from './themes/alice.theme'\n\nexport type ThemeToken = keyof typeof ThemeAlice\nexport type ThemeTokenValue = string | number\n\nexport type CustomTheme = Record<ThemeToken, ThemeTokenValue>\nexport type ThemedProps = ThemeProps<CustomTheme>\n\ntype TokenLike<P extends ThemedProps = ThemedProps> = ThemeToken | ((props: P) => ThemeToken)\n\nfunction getTokenFromTheme<P extends ThemedProps>(token: TokenLike<P>, props: P): ThemeTokenValue {\n const tokenName = isFunction(token) ? token(props) : token\n return props.theme[tokenName]\n}\n\n/**\n * Return a design token value for the current theme.\n * @param {string} token - Token whose value should be returned.\n * @param {[ThemedStyledProps]} props - Component props.\n * @returns {ThemeTokenValue} Token value or `undefined` if the token was not found for the current theme.\n */\nexport function getToken<TProps extends ThemedProps>(\n token: TokenLike<TProps>\n): (props: TProps) => ThemeTokenValue\n\nexport function getToken<TProps extends ThemedProps>(\n token: TokenLike<TProps>,\n props: TProps\n): ThemeTokenValue\n\nexport function getToken<TProps extends ThemedProps>(token: any, props?: any): any {\n if (props === undefined) {\n return (props: TProps) => getTokenFromTheme(token, props)\n }\n\n return getTokenFromTheme(token, props)\n}\n\nexport * as Themes from './themes'\n"],"names":["getTokenFromTheme","token","props","tokenName","isFunction","theme","undefined"],"mappings":"8QAaA,SAASA,EAAyCC,EAAqBC,GACrE,MAAMC,EAAYC,EAAAA,WAAWH,GAASA,EAAMC,GAASD,EACrD,OAAOC,EAAMG,MAAMF,EACrB,mCAiBgB,SAAqCF,EAAYC,GAC/D,YAAcI,IAAVJ,EACMA,GAAkBF,EAAkBC,EAAOC,GAG9CF,EAAkBC,EAAOC,EAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toArray-b56541b4.js","sources":["../node_modules/@loadsmart/utils-object/lib/isNil.js","../node_modules/@loadsmart/utils-object/lib/isObject.js","../node_modules/@loadsmart/utils-object/lib/index.js","../src/utils/toolset/toArray.ts"],"sourcesContent":["'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nfunction isNil(value) {\n return value == null\n}\nexports.default = isNil\n//# sourceMappingURL=isNil.js.map\n","'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nvar isNil_1 = require('./isNil')\nfunction isObject(value) {\n var type = typeof value\n return !isNil_1.default(value) && ['object', 'function'].includes(type)\n}\nexports.default = isObject\n//# sourceMappingURL=isObject.js.map\n","'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nexports.isObject = exports.isNil = void 0\nvar isNil_1 = require('./isNil')\nexports.isNil = isNil_1.default\nvar isObject_1 = require('./isObject')\nexports.isObject = isObject_1.default\n//# sourceMappingURL=index.js.map\n","import { isNil } from '@loadsmart/utils-object'\n\n// TODO: add this helper to @loadsmart/utils\nfunction toArray<T>(value: T | T[]): T[] {\n if (isNil(value)) {\n return []\n }\n\n if (Array.isArray(value)) {\n return value\n }\n\n return [value]\n}\n\nexport default toArray\n"],"names":["Object","defineProperty","isNil_1","value","isObject_1","require$$0","type","
|
|
1
|
+
{"version":3,"file":"toArray-b56541b4.js","sources":["../node_modules/@loadsmart/utils-object/lib/isNil.js","../node_modules/@loadsmart/utils-object/lib/isObject.js","../node_modules/@loadsmart/utils-object/lib/index.js","../src/utils/toolset/toArray.ts"],"sourcesContent":["'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nfunction isNil(value) {\n return value == null\n}\nexports.default = isNil\n//# sourceMappingURL=isNil.js.map\n","'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nvar isNil_1 = require('./isNil')\nfunction isObject(value) {\n var type = typeof value\n return !isNil_1.default(value) && ['object', 'function'].includes(type)\n}\nexports.default = isObject\n//# sourceMappingURL=isObject.js.map\n","'use strict'\nObject.defineProperty(exports, '__esModule', { value: true })\nexports.isObject = exports.isNil = void 0\nvar isNil_1 = require('./isNil')\nexports.isNil = isNil_1.default\nvar isObject_1 = require('./isObject')\nexports.isObject = isObject_1.default\n//# sourceMappingURL=index.js.map\n","import { isNil } from '@loadsmart/utils-object'\n\n// TODO: add this helper to @loadsmart/utils\nfunction toArray<T>(value: T | T[]): T[] {\n if (isNil(value)) {\n return []\n }\n\n if (Array.isArray(value)) {\n return value\n }\n\n return [value]\n}\n\nexport default toArray\n"],"names":["Object","defineProperty","isNil_1","value","default","isObject_1","require$$0","type","includes","lib","isObject","isNil","require$$1","Array","isArray"],"mappings":"2BACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IAItDD,EAAAE,QAHA,SAAeD,GACb,OAAgB,MAATA,CACT,WCHAH,OAAOC,eAAeI,EAAS,aAAc,CAAEF,OAAO,IACtD,IAAID,EAAUI,EAKdD,EAAAD,QAJA,SAAkBD,GAChB,IAAII,SAAcJ,EAClB,OAAQD,EAAQE,QAAQD,IAAU,CAAC,SAAU,YAAYK,SAASD,EACpE,ECLAP,OAAOC,eAAeQ,EAAS,aAAc,CAAEN,OAAO,IACtDO,QAAAA,SAAAD,EAAAC,SAAmBC,QAAAA,MAAAF,EAAAE,WAAgB,EACnC,IAAIT,EAAUI,EACDK,QAAAA,MAAAF,EAAAE,MAAGT,EAAQE,QACxB,IAAIC,EAAaO,EACjBF,QAAAA,SAAgBD,EAAAC,SAAGL,EAAWD,wBCH9B,SAAoBD,GAClB,OAAIQ,QAAAA,MAAMR,GACD,GAGLU,MAAMC,QAAQX,GACTA,EAGF,CAACA,EACV"}
|
package/package.json
CHANGED
|
@@ -1,209 +1,220 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
2
|
+
"name": "@loadsmart/loadsmart-ui",
|
|
3
|
+
"version": "5.16.1",
|
|
4
|
+
"description": "Miranda UI, a React UI library",
|
|
5
|
+
"main": "dist",
|
|
6
|
+
"files": [
|
|
7
|
+
"src",
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start": "yarn dev",
|
|
14
|
+
"dev": "npm-run-all --parallel watch-tailwind storybook",
|
|
15
|
+
"lint": "eslint --ext .js,.ts,.tsx src/",
|
|
16
|
+
"test": "TZ=UTC jest --clearMocks",
|
|
17
|
+
"test-watch": "yarn test --watch",
|
|
18
|
+
"storybook": "start-storybook -p 6006 --no-dll",
|
|
19
|
+
"build": "rollup -c --environment BUILD:prod",
|
|
20
|
+
"watch-tailwind": "postcss ./tailwind.css -o ./.storybook/globals.css --watch",
|
|
21
|
+
"build-storybook": "rm -rf docs && build-storybook -o ./docs --no-dll",
|
|
22
|
+
"deploy-storybook": "yarn build-storybook && storybook-to-ghpages --existing-output-dir=docs",
|
|
23
|
+
"release": "semantic-release",
|
|
24
|
+
"prepare": "husky install"
|
|
25
|
+
},
|
|
26
|
+
"storybook-deployer": {
|
|
27
|
+
"commitMessage": "chore(docs): deploy storybook to GitHub pages [skip ci]"
|
|
28
|
+
},
|
|
29
|
+
"jest": {
|
|
30
|
+
"globals": {
|
|
31
|
+
"window": true
|
|
32
|
+
},
|
|
33
|
+
"verbose": true,
|
|
34
|
+
"coverageDirectory": "./coverage/",
|
|
35
|
+
"collectCoverage": false,
|
|
36
|
+
"setupFiles": [
|
|
37
|
+
"./tests/jestsetup.tsx"
|
|
38
|
+
],
|
|
39
|
+
"collectCoverageFrom": [
|
|
40
|
+
"src/components/**/*.{js,tsx}",
|
|
41
|
+
"!src/**/**/*.test.{js,tsx}"
|
|
42
|
+
],
|
|
43
|
+
"coverageReporters": [
|
|
44
|
+
"text",
|
|
45
|
+
"lcov"
|
|
46
|
+
],
|
|
47
|
+
"moduleDirectories": [
|
|
48
|
+
"node_modules",
|
|
49
|
+
"src"
|
|
50
|
+
],
|
|
51
|
+
"moduleFileExtensions": [
|
|
52
|
+
"ts",
|
|
53
|
+
"tsx",
|
|
54
|
+
"js",
|
|
55
|
+
"json"
|
|
56
|
+
],
|
|
57
|
+
"testMatch": [
|
|
58
|
+
"**/__tests__/**/*.[jt]s?(x)",
|
|
59
|
+
"**/?(*.)+(jest|test).[jt]s?(x)"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"lint-staged": {
|
|
63
|
+
"src/**/*.{js,ts,jsx,tsx,json}": [
|
|
64
|
+
"eslint --fix",
|
|
65
|
+
"prettier --write"
|
|
66
|
+
],
|
|
67
|
+
"src/{common,components,styles}/**/*.{js,ts,jsx,tsx}": [
|
|
68
|
+
"eslint --fix",
|
|
69
|
+
"prettier --write",
|
|
70
|
+
"stylelint --fix"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@babel/cli": "7.13.16",
|
|
75
|
+
"@babel/core": "7.14.0",
|
|
76
|
+
"@babel/preset-env": "7.14.1",
|
|
77
|
+
"@babel/preset-react": "7.13.13",
|
|
78
|
+
"@babel/preset-typescript": "7.13.0",
|
|
79
|
+
"@commitlint/cli": "16.0.2",
|
|
80
|
+
"@commitlint/config-conventional": "16.0.0",
|
|
81
|
+
"@loadsmart/miranda-tokens": "1.3.0",
|
|
82
|
+
"@loadsmart/stylelint-config": "0.0.3",
|
|
83
|
+
"@rollup/plugin-babel": "5.3.0",
|
|
84
|
+
"@rollup/plugin-commonjs": "19.0.0",
|
|
85
|
+
"@rollup/plugin-json": "4.1.0",
|
|
86
|
+
"@rollup/plugin-node-resolve": "13.0.0",
|
|
87
|
+
"@semantic-release/git": "9.0.0",
|
|
88
|
+
"@storybook/addon-a11y": "^6.5.15",
|
|
89
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
90
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
91
|
+
"@storybook/addon-links": "^6.5.15",
|
|
92
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
93
|
+
"@storybook/addons": "^6.5.15",
|
|
94
|
+
"@storybook/builder-webpack5": "^6.5.15",
|
|
95
|
+
"@storybook/cli": "^6.5.15",
|
|
96
|
+
"@storybook/client-api": "^6.5.15",
|
|
97
|
+
"@storybook/manager-webpack5": "^6.5.15",
|
|
98
|
+
"@storybook/preview-web": "^6.5.15",
|
|
99
|
+
"@storybook/react": "^6.5.15",
|
|
100
|
+
"@storybook/storybook-deployer": "^2.8.16",
|
|
101
|
+
"@storybook/testing-react": "^1.3.0",
|
|
102
|
+
"@storybook/theming": "^6.5.15",
|
|
103
|
+
"@svgr/rollup": "^6.5.1",
|
|
104
|
+
"@svgr/webpack": "^6.5.1",
|
|
105
|
+
"@tailwindcss/postcss7-compat": "2.1.2",
|
|
106
|
+
"@testing-library/dom": "^8.20.0",
|
|
107
|
+
"@testing-library/jest-dom": "5.16.5",
|
|
108
|
+
"@testing-library/react": "^11.2.7",
|
|
109
|
+
"@testing-library/react-hooks": "^5.1.3",
|
|
110
|
+
"@testing-library/user-event": "^13.5.0",
|
|
111
|
+
"@types/chance": "1.1.1",
|
|
112
|
+
"@types/jest": "26.0.23",
|
|
113
|
+
"@types/lodash.debounce": "4.0.6",
|
|
114
|
+
"@types/lodash.flatten": "4.4.6",
|
|
115
|
+
"@types/lodash.get": "4.4.6",
|
|
116
|
+
"@types/lodash.isempty": "4.4.6",
|
|
117
|
+
"@types/lodash.omit": "4.5.6",
|
|
118
|
+
"@types/lodash.range": "3.2.6",
|
|
119
|
+
"@types/mdx": "^2.0.2",
|
|
120
|
+
"@types/node": "^18.11.18",
|
|
121
|
+
"@types/react": "17.0.5",
|
|
122
|
+
"@types/react-dom": "17.0.3",
|
|
123
|
+
"@types/react-test-renderer": "17.0.1",
|
|
124
|
+
"@types/styled-components": "5.1.9",
|
|
125
|
+
"@typescript-eslint/eslint-plugin": "4.22.1",
|
|
126
|
+
"@typescript-eslint/parser": "4.22.1",
|
|
127
|
+
"@zerollup/ts-transform-paths": "1.7.18",
|
|
128
|
+
"autoprefixer": "9",
|
|
129
|
+
"babel-jest": "26.6.3",
|
|
130
|
+
"babel-loader": "8.2.2",
|
|
131
|
+
"babel-plugin-react-remove-properties": "0.3.0",
|
|
132
|
+
"babel-plugin-styled-components": "1.12.0",
|
|
133
|
+
"babel-plugin-transform-inline-environment-variables": "0.4.3",
|
|
134
|
+
"babel-preset-react-app": "10.0.0",
|
|
135
|
+
"chance": "1.1.8",
|
|
136
|
+
"commitizen": "4.2.4",
|
|
137
|
+
"cross-env": "7.0.3",
|
|
138
|
+
"cz-conventional-changelog": "3.3.0",
|
|
139
|
+
"eslint": "7.26.0",
|
|
140
|
+
"eslint-config-prettier": "8.3.0",
|
|
141
|
+
"eslint-plugin-jest-dom": "3.8.1",
|
|
142
|
+
"eslint-plugin-jsx-a11y": "6.4.1",
|
|
143
|
+
"eslint-plugin-prettier": "3.4.0",
|
|
144
|
+
"eslint-plugin-react": "7.23.2",
|
|
145
|
+
"eslint-plugin-react-hooks": "4.2.0",
|
|
146
|
+
"eslint-plugin-storybook": "^0.6.10",
|
|
147
|
+
"eslint-plugin-testing-library": "^5.9.1",
|
|
148
|
+
"husky": "7.0.4",
|
|
149
|
+
"identity-obj-proxy": "3.0.0",
|
|
150
|
+
"jest": "26.6.3",
|
|
151
|
+
"jest-svg-transformer": "1.0.0",
|
|
152
|
+
"lint-staged": "11.0.0",
|
|
153
|
+
"npm-run-all": "4.1.5",
|
|
154
|
+
"postcss": "^7.0.39",
|
|
155
|
+
"postcss-cli": "^7.1.2",
|
|
156
|
+
"prettier": "2.2.1",
|
|
157
|
+
"prop-types": "15.7.2",
|
|
158
|
+
"react": "17.0.2",
|
|
159
|
+
"react-dom": "17.0.2",
|
|
160
|
+
"react-is": "17.0.2",
|
|
161
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
162
|
+
"require-from-string": "^2.0.2",
|
|
163
|
+
"rollup": "^2.79.1",
|
|
164
|
+
"rollup-plugin-delete": "2.0.0",
|
|
165
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
166
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
167
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
168
|
+
"rollup-plugin-visualizer": "^5.5.2",
|
|
169
|
+
"semantic-release": "17.4.2",
|
|
170
|
+
"styled-components": "5.3.0",
|
|
171
|
+
"stylelint": "13.13.1",
|
|
172
|
+
"stylelint-config-prettier": "8.0.2",
|
|
173
|
+
"stylelint-config-rational-order": "0.1.2",
|
|
174
|
+
"stylelint-config-recommended": "5.0.0",
|
|
175
|
+
"stylelint-no-unsupported-browser-features": "5.0.1",
|
|
176
|
+
"stylelint-order": "4.1.0",
|
|
177
|
+
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
|
|
178
|
+
"ts-jest": "26.5.6",
|
|
179
|
+
"ts-node": "^10.9.1",
|
|
180
|
+
"ts-toolbelt": "^9.6.0",
|
|
181
|
+
"ttypescript": "^1.5.13",
|
|
182
|
+
"typescript": "4.4.4",
|
|
183
|
+
"typescript-plugin-styled-components": "1.5.0",
|
|
184
|
+
"webpack": "^5.75.0"
|
|
185
|
+
},
|
|
186
|
+
"peerDependencies": {
|
|
187
|
+
"@loadsmart/miranda-tokens": "1.3.0",
|
|
188
|
+
"@testing-library/dom": ">=5.12.0",
|
|
189
|
+
"@testing-library/react": ">=11.2.6",
|
|
190
|
+
"prop-types": ">=15.7.2",
|
|
191
|
+
"react": ">=16.8.0",
|
|
192
|
+
"react-dom": ">=16.8.0",
|
|
193
|
+
"styled-components": ">=5.3.0"
|
|
194
|
+
},
|
|
195
|
+
"dependencies": {
|
|
196
|
+
"@loadsmart/utils-function": "0.3.1",
|
|
197
|
+
"@loadsmart/utils-object": "0.3.1",
|
|
198
|
+
"@loadsmart/utils-string": "0.3.1",
|
|
199
|
+
"clsx": "1.1.1",
|
|
200
|
+
"lodash.debounce": "4.0.8",
|
|
201
|
+
"lodash.flatten": "4.4.0",
|
|
202
|
+
"lodash.get": "4.4.2",
|
|
203
|
+
"lodash.isempty": "4.4.0",
|
|
204
|
+
"lodash.omit": "4.5.0",
|
|
205
|
+
"lodash.range": "3.2.0"
|
|
206
|
+
},
|
|
207
|
+
"repository": {
|
|
208
|
+
"type": "git",
|
|
209
|
+
"url": "https://github.com/loadsmart/miranda.git"
|
|
210
|
+
},
|
|
211
|
+
"license": "MIT",
|
|
212
|
+
"publishConfig": {
|
|
213
|
+
"access": "public"
|
|
214
|
+
},
|
|
215
|
+
"config": {
|
|
216
|
+
"commitizen": {
|
|
217
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
209
220
|
}
|
|
@@ -23,12 +23,14 @@ describe('Dropdown', () => {
|
|
|
23
23
|
}
|
|
24
24
|
})
|
|
25
25
|
|
|
26
|
-
it('renders all options when expanded', () => {
|
|
26
|
+
it('renders all options when expanded', async () => {
|
|
27
27
|
setup()
|
|
28
28
|
|
|
29
29
|
user.click(screen.getByText('Actions'))
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
expect(await screen.findByText(ACTIONS[0].label)).toBeInTheDocument()
|
|
32
|
+
|
|
33
|
+
for (let i = 1; i < ACTIONS.length; i++) {
|
|
32
34
|
expect(screen.getByText(ACTIONS[i].label)).toBeInTheDocument()
|
|
33
35
|
}
|
|
34
36
|
})
|
|
@@ -53,7 +53,7 @@ describe('<Table />', () => {
|
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
describe('Column Picker', () => {
|
|
56
|
-
it('should pick columns', () => {
|
|
56
|
+
it('should pick columns', async () => {
|
|
57
57
|
const onChange = jest.fn()
|
|
58
58
|
const OPTION_1 = { title: 'Title1', option: 'Option1', key: 'key1' }
|
|
59
59
|
const OPTION_2 = { title: 'Title2', option: 'Option2', key: 'Key2' }
|
|
@@ -71,7 +71,7 @@ describe('<Table />', () => {
|
|
|
71
71
|
|
|
72
72
|
user.click(screen.getByRole('button', { name: 'Pick a column' }))
|
|
73
73
|
|
|
74
|
-
expect(screen.
|
|
74
|
+
expect(await screen.findAllByRole('option')).toHaveLength(2)
|
|
75
75
|
|
|
76
76
|
expect(screen.getByRole('option', { selected: true })).toHaveTextContent('Option1')
|
|
77
77
|
|
|
@@ -58,7 +58,7 @@ describe('TablePagination', () => {
|
|
|
58
58
|
expect(onPageChange).toHaveBeenLastCalledWith(4)
|
|
59
59
|
})
|
|
60
60
|
|
|
61
|
-
it('calls the onRowsPerPageChange with the selected option', () => {
|
|
61
|
+
it('calls the onRowsPerPageChange with the selected option', async () => {
|
|
62
62
|
const onPageChange = jest.fn()
|
|
63
63
|
const onRowsPerPageChange = jest.fn()
|
|
64
64
|
setup({
|
|
@@ -67,7 +67,7 @@ describe('TablePagination', () => {
|
|
|
67
67
|
onRowsPerPageChange,
|
|
68
68
|
})
|
|
69
69
|
userEvent.click(screen.getByTestId('rows-per-page-button'))
|
|
70
|
-
userEvent.click(screen.
|
|
70
|
+
userEvent.click(await screen.findByText(/50 per page/i))
|
|
71
71
|
|
|
72
72
|
expect(onRowsPerPageChange).toHaveBeenLastCalledWith(50)
|
|
73
73
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
+
import type { RenderResult } from '@testing-library/react'
|
|
3
4
|
|
|
4
5
|
import type { DragDropFileContextValue } from '../../components/DragDropFile/types'
|
|
5
6
|
import { DragDropFileContext } from '../../components/DragDropFile/DragDropFile.context'
|
|
@@ -14,7 +15,7 @@ const defaultContextValueMock: DragDropFileContextValue = {
|
|
|
14
15
|
const renderWithDragDropFileProvider = (
|
|
15
16
|
ui: ReactNode,
|
|
16
17
|
customContext?: Partial<DragDropFileContextValue>
|
|
17
|
-
) => {
|
|
18
|
+
): RenderResult => {
|
|
18
19
|
const contextValue = { ...defaultContextValueMock, ...customContext }
|
|
19
20
|
|
|
20
21
|
const renderedUi = (children: ReactNode) => (
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e){return this instanceof o?(this.v=e,this):new o(e)}const i=e.createContext(void 0);exports.DragDropFileContext=i,exports.DragDropFileProvider=({fileList:t,onFilesAdded:r,onFileRemoved:o,onRetryUpload:a,children:u})=>{const c=e.useCallback(((e,n)=>{o([...t.slice(0,n),...t.slice(n+1)],e,n)}),[t]),l=e.useMemo((()=>({fileList:t,onFilesAdded:r,onRemoveFile:c,onRetryUpload:a})),[t,r,c,a]);return n.default.createElement(i.Provider,{value:l},u)},exports.__asyncGenerator=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||c(e,t)}))})}function c(e,t){try{(n=i[e](t)).value instanceof o?Promise.resolve(n.value.v).then(l,s):f(a[0][2],n)}catch(e){f(a[0][3],e)}var n}function l(e){c("next",e)}function s(e){c("throw",e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}},exports.__asyncValues=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=r(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},exports.__await=o,exports.__awaiter=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},exports.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},exports.useDragDropFileContext=()=>{const t=e.useContext(i);if(!t)throw new Error("useDragDropFileContext must be used within an DragDropFileProvider");return t};
|
|
16
|
-
//# sourceMappingURL=DragDropFile.context-cf460901.js.map
|