willba-component-library 0.0.69 → 0.0.71
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/lib/index.esm.js +5 -1909
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5 -1909
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +6 -1910
- package/lib/index.umd.js.map +1 -1
- package/package.json +4 -7
- package/rollup.config.mjs +4 -4
- package/src/components/FilterBar/components/calendar/Calendar.tsx +4 -3
- package/src/components/FilterBar/components/submit-button/SubmitButton.tsx +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "willba-component-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"description": "A stroybook 6 with TypeScript demo",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.esm.js",
|
|
@@ -14,13 +14,11 @@
|
|
|
14
14
|
"author": "Willba",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
17
18
|
"classnames": "^2.3.2",
|
|
18
|
-
"date-fns": "^2.30.0",
|
|
19
|
-
"i18next": "^23.4.4",
|
|
20
19
|
"react-day-picker": "^8.8.0",
|
|
21
|
-
"react-i18next": "^13.1.
|
|
22
|
-
|
|
23
|
-
"react-responsive": "^9.0.2"
|
|
20
|
+
"react-i18next": "^13.1.2"
|
|
21
|
+
|
|
24
22
|
},
|
|
25
23
|
"peerDependencies": {
|
|
26
24
|
"react": "^17.0.2",
|
|
@@ -28,7 +26,6 @@
|
|
|
28
26
|
},
|
|
29
27
|
"devDependencies": {
|
|
30
28
|
"@rollup/plugin-commonjs": "^25.0.3",
|
|
31
|
-
"@rollup/plugin-json": "^6.0.0",
|
|
32
29
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
33
30
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
34
31
|
"@storybook/addon-essentials": "^7.2.1",
|
package/rollup.config.mjs
CHANGED
|
@@ -6,6 +6,9 @@ import postcss from 'rollup-plugin-postcss'
|
|
|
6
6
|
import dts from 'rollup-plugin-dts'
|
|
7
7
|
import json from '@rollup/plugin-json'
|
|
8
8
|
|
|
9
|
+
// This is required to read package.json file when
|
|
10
|
+
// using Native ES modules in Node.js
|
|
11
|
+
// https://rollupjs.org/command-line-interface/#importing-package-json
|
|
9
12
|
import { createRequire } from 'node:module'
|
|
10
13
|
const requireFile = createRequire(import.meta.url)
|
|
11
14
|
const packageJson = requireFile('./package.json')
|
|
@@ -14,7 +17,6 @@ const globals = {
|
|
|
14
17
|
react: 'React',
|
|
15
18
|
'react-dom': 'ReactDOM',
|
|
16
19
|
'react-query': 'ReactQuery',
|
|
17
|
-
window: 'window',
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export default [
|
|
@@ -25,16 +27,14 @@ export default [
|
|
|
25
27
|
file: packageJson.main,
|
|
26
28
|
format: 'cjs',
|
|
27
29
|
sourcemap: true,
|
|
28
|
-
inlineDynamicImports: true,
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
file: packageJson.module,
|
|
32
33
|
format: 'esm',
|
|
33
34
|
sourcemap: true,
|
|
34
|
-
inlineDynamicImports: true,
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
name: '
|
|
37
|
+
name: 'MyComponentLibrary',
|
|
38
38
|
file: `lib/index.umd.js`,
|
|
39
39
|
format: 'umd',
|
|
40
40
|
sourcemap: true,
|
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react'
|
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { DateRange, DayPicker } from 'react-day-picker'
|
|
4
4
|
import { addDays } from 'date-fns'
|
|
5
|
-
import { useMediaQuery } from 'react-responsive'
|
|
5
|
+
//import { useMediaQuery } from 'react-responsive'
|
|
6
6
|
|
|
7
7
|
import 'react-day-picker/dist/style.css'
|
|
8
8
|
import './Calendar.css'
|
|
@@ -11,7 +11,7 @@ const currentMonth = new Date()
|
|
|
11
11
|
|
|
12
12
|
export default function Calendar({ calendarRange, setCalendarRange }: any) {
|
|
13
13
|
const { t } = useTranslation('filterBar')
|
|
14
|
-
const isTablet = useMediaQuery({ maxWidth: 1024 })
|
|
14
|
+
//const isTablet = useMediaQuery({ maxWidth: 1024 })
|
|
15
15
|
|
|
16
16
|
const defaultCalendarSelected: DateRange = {
|
|
17
17
|
from: currentMonth,
|
|
@@ -33,7 +33,8 @@ export default function Calendar({ calendarRange, setCalendarRange }: any) {
|
|
|
33
33
|
mode="range"
|
|
34
34
|
showOutsideDays
|
|
35
35
|
fixedWeeks
|
|
36
|
-
numberOfMonths={!isTablet ? 2 : 1}
|
|
36
|
+
//numberOfMonths={!isTablet ? 2 : 1}
|
|
37
|
+
numberOfMonths={2}
|
|
37
38
|
weekStartsOn={1}
|
|
38
39
|
max={31}
|
|
39
40
|
defaultMonth={currentMonth}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
|
-
import { FaSearch } from 'react-icons/fa'
|
|
3
|
+
//import { FaSearch } from 'react-icons/fa'
|
|
4
4
|
|
|
5
5
|
import './SubmitButton.css'
|
|
6
6
|
|
|
@@ -9,9 +9,7 @@ export default function SubmitButton({ onClick }: any) {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<button className="will-filter-bar-submit-button" onClick={onClick}>
|
|
12
|
-
<span>
|
|
13
|
-
<FaSearch />
|
|
14
|
-
</span>
|
|
12
|
+
<span>{/* <FaSearch /> */}</span>
|
|
15
13
|
{t('submit.label')}
|
|
16
14
|
</button>
|
|
17
15
|
)
|