forstok-ui-lib 5.7.6 → 5.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "5.7.6",
3
+ "version": "5.8.1",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -0,0 +1 @@
1
+ <svg height="auto" viewBox="0 -53 384 384" width="auto" xmlns="http://www.w3.org/2000/svg"><path d="m368 154.667969h-352c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h352c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m368 32h-352c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h352c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/><path d="m368 277.332031h-352c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h352c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0"/></svg>
@@ -398,19 +398,4 @@ export const DateRangePortalContainer = styled.div`
398
398
  export const DateRangeIconContainer = styled.div`
399
399
  display: flex;
400
400
  padding: 0 0 0 12px;
401
- `
402
- export const DateRangeWrapper = styled.div<{ $mode?: string }>`
403
- position: relative;
404
- ${({ $mode }: { $mode?: string }) => $mode === 'input' && css`
405
- border: 1px solid var(--ck-clr-ln);
406
- cursor: pointer;
407
- height: 30px;
408
- border-radius: var(--ter-rd);
409
- background-color: rgb(255, 255, 255);
410
- padding: 0px 2px 0px 8px;
411
- .react-daterange-picker {
412
- background-color: transparent;
413
- padding: 0px;
414
- }
415
- `}
416
- `;
401
+ `
@@ -31,6 +31,7 @@ import IconQuestion from '../../assets/images/icons/question.svg';
31
31
  import IconSortby from '../../assets/images/icons/sortby.svg';
32
32
  import IconNotificationDownload from '../../assets/images/icons/notif-download-white.svg';
33
33
  import IconNotificationUpload from '../../assets/images/icons/notif-upload-white.svg';
34
+ import IconBar from '../../assets/images/icons/humberbars.svg';
34
35
 
35
36
  const NotificationStyled = css`
36
37
  width: 44px;
@@ -265,6 +266,12 @@ const getIconContainerStyled = ({ $mode, $name, $width, onClick }:{ $mode?: stri
265
266
  content: url(${IconNotificationUpload});
266
267
  }`
267
268
  break;
269
+ case 'bar':
270
+ style += `
271
+ &:before {
272
+ content: url(${IconBar});
273
+ }`
274
+ break;
268
275
  default:
269
276
  break;
270
277
  }
@@ -21,7 +21,6 @@ export { default as UploadDragDropComponent } from './upload/drag.drop';
21
21
  export { default as TextAreaComponent } from './textarea';
22
22
  export { default as TextAreaRefComponent } from './textarea/ref';
23
23
  export { default as DateComponent } from './date';
24
- export { default as DateRangeComponent } from './date/daterange';
25
24
  export { default as DateTimeComponent } from './datetime';
26
25
  export { default as RadioComponent } from './radio';
27
26
  export { default as SwitchComponent } from './switch';
@@ -32,7 +31,6 @@ export * from './dropdown/typed';
32
31
  export * from './message/typed';
33
32
  export * from './popup/typed';
34
33
  export * from './select/typed';
35
- export * from './date/typed';
36
34
 
37
35
  export * from './select/components';
38
36
  export * from './form/styles';
@@ -1,45 +0,0 @@
1
- import { useState } from 'react';
2
- import moment from 'moment';
3
- import DateRangePicker from '@wojtekmaj/react-daterange-picker';
4
- import { configDateRange } from '../../maps';
5
- import '@wojtekmaj/react-daterange-picker/dist/DateRangePicker.css';
6
- import 'react-calendar/dist/Calendar.css';
7
- import './daterangepicker.css';
8
- import { DateRangeWrapper } from './styles';
9
- import { TValueDateRange } from './typed';
10
-
11
- type TDateRangeComponent = {
12
- $mode?: string;
13
- startDate?: Date | null;
14
- endDate?: Date | null;
15
- evChange: (value: TValueDateRange) => void;
16
- portalId?: string;
17
- }
18
-
19
- const DateRangeComponent = ({ $mode, startDate, endDate, evChange, portalId }: TDateRangeComponent) => {
20
- const _startDate: Date | null = startDate || moment(configDateRange.startDate, 'YYYY-MM-DD').toDate();
21
- const _endDate: Date | null = endDate || moment(configDateRange.endDate, 'YYYY-MM-DD').toDate();
22
- const minDate = moment(configDateRange.minDate, 'YYYY-MM-DD').toDate();
23
- const maxDate = moment().toDate();
24
-
25
- const [value, setValue] = useState<TValueDateRange>([_startDate, _endDate]);
26
-
27
- const onChange = (value: TValueDateRange) => {
28
- setValue(value);
29
- evChange && evChange(value);
30
- }
31
-
32
- return (
33
- <DateRangeWrapper $mode={$mode}>
34
- <DateRangePicker
35
- minDate={minDate}
36
- maxDate={maxDate}
37
- onChange={onChange}
38
- value={value}
39
- clearIcon={null}
40
- {...portalId && { portalContainer: document.getElementById(portalId) }} />
41
- </DateRangeWrapper>
42
- );
43
- }
44
-
45
- export default DateRangeComponent;
@@ -1,96 +0,0 @@
1
- .react-daterange-picker {
2
- font-family: var(--pri-ft-fm);
3
- font-size: var(--pri-ft-sz);
4
- color: var(--pri-clr);
5
- background-color: var(--ter-clr-bg);
6
- align-items: center;
7
- border: 0;
8
- border-radius: var(--sec-rd);
9
- font-weight: 400;
10
- height: 30px;
11
- padding: 0 26px 0 16px;
12
- position: relative;
13
- width: 100%;
14
- }
15
- .react-daterange-picker__wrapper {
16
- border: 0;
17
- width: 100%;
18
- justify-content: left;
19
- display: inline-grid;
20
- grid-auto-flow: column;
21
- }
22
- .react-calendar {
23
- background-color: var(--pri-clr-bg);
24
- border: 1px solid var(--sec-clr-ln);
25
- box-shadow: var(--sec-shd-bx);
26
- border-radius: var(--sec-rd);
27
- border: 1px solid #a0a096;
28
- font-family: var(--pri-ft-fm);
29
- font-size: var(--pri-ft-sz);
30
- color: var(--pri-clr);
31
- line-height: 1.125em;
32
- padding: 10px 15px;
33
- }
34
- .react-calendar__navigation__label__labelText {
35
- color: #000;
36
- font-size: 1em;
37
- font-weight: 700;
38
- height: 35px;
39
- line-height: 35px;
40
- position: relative;
41
- text-align: center;
42
- }
43
- .react-calendar__tile {
44
- font-size: 1em;
45
- line-height: 1;
46
- border-radius: 0;
47
- }
48
- .react-calendar__tile--now {
49
- border-radius: 10px !important;
50
- }
51
- .react-calendar__tile--now.react-calendar__tile--active {
52
- border-radius: 0 !important;
53
- }
54
- .react-calendar__tile--now.react-calendar__tile--rangeEnd.react-calendar__tile--active {
55
- border-radius: 0 10px 10px 0 !important;
56
- }
57
- .react-calendar__tile--hover {
58
- border-radius: 0;
59
- }
60
- .react-calendar__tile--active {
61
- background-color: #fc5c64;
62
- border: 1px solid #ec5b62;
63
- }
64
- .react-calendar__tile--active:enabled:hover, .react-calendar__tile--active:enabled:focus {
65
- background-color: #fc5c64;
66
- border: 1px solid #ec5b62;
67
- }
68
- .react-calendar__tile--rangeStart.react-calendar__tile--rangeEnd {
69
- border-radius: 10px !important;
70
- }
71
- .react-calendar__tile--now.react-calendar__tile--rangeStart.react-calendar__tile--rangeEnd.react-calendar__tile--active {
72
- border-radius: 10px !important;
73
- }
74
- .react-calendar__tile--rangeStart, .react-calendar__tile--hoverStart {
75
- border-radius: 10px 0px 0 10px !important;
76
- }
77
- .react-calendar__tile--rangeEnd, .react-calendar__tile--hoverEnd {
78
- border-radius: 0 10px 10px 0 !important;
79
- }
80
- .react-calendar__month-view__days {
81
- gap: 1px 0;
82
- }
83
- .react-calendar__month-view__weekdays {
84
- font-size: 1em;
85
- }
86
- .react-calendar__navigation__arrow {
87
- font-size: 1.5em;
88
- }
89
- .react-daterange-picker__calendar {
90
- z-index: 100;
91
- }
92
- .react-daterange-picker__button {
93
- position: absolute;
94
- right: 0;
95
- }
96
-
@@ -1,3 +0,0 @@
1
- type ValuePiece = Date | null;
2
-
3
- export type TValueDateRange = ValuePiece | [ValuePiece, ValuePiece];