forstok-ui-lib 5.2.38 → 5.2.41

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.2.38",
3
+ "version": "5.2.41",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="100%" height="100%" viewBox="0 0 512.000000 512.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M1178 5110 c-41 -12 -86 -48 -106 -83 -12 -24 -18 -65 -22 -157 l-5
11
+ -125 -190 -6 c-218 -6 -276 -18 -400 -82 -57 -30 -101 -63 -155 -117 -84 -85
12
+ -129 -154 -168 -262 l-27 -73 0 -1835 0 -1835 27 -73 c39 -108 84 -178 168
13
+ -262 84 -83 168 -134 290 -172 l75 -23 1895 0 1895 0 75 23 c222 70 385 225
14
+ 457 436 l28 81 0 1830 0 1830 -27 73 c-39 108 -84 177 -168 262 -54 54 -98 87
15
+ -155 117 -124 64 -182 76 -400 82 l-190 6 -5 125 c-6 142 -18 175 -78 214 -98
16
+ 65 -225 28 -273 -79 -14 -31 -19 -65 -19 -152 l0 -113 -1140 0 -1140 0 0 113
17
+ c0 87 -5 121 -19 152 -39 86 -135 132 -223 105z m-128 -871 c0 -107 3 -126 22
18
+ -161 42 -73 128 -107 213 -83 101 29 135 93 135 255 l0 110 1140 0 1140 0 0
19
+ -110 c0 -77 5 -122 16 -148 59 -142 257 -156 332 -24 19 35 22 54 22 161 l0
20
+ 121 173 0 174 0 61 -31 c66 -33 119 -88 149 -155 16 -34 18 -78 21 -351 l3
21
+ -313 -2091 0 -2091 0 3 313 c3 273 5 317 21 351 30 67 83 122 149 155 l61 31
22
+ 174 0 173 0 0 -121z m3598 -2371 l-3 -1263 -22 -45 c-34 -68 -75 -112 -134
23
+ -145 l-54 -30 -1875 0 -1875 0 -54 30 c-59 33 -100 77 -134 145 l-22 45 -3
24
+ 1263 -2 1262 2090 0 2090 0 -2 -1262z"/>
25
+ </g>
26
+ </svg>
@@ -2,6 +2,7 @@ import styled, { css } from 'styled-components';
2
2
  import IconDotted from '../../assets/images/icons/dotted.svg';
3
3
  import IconClose from '../../assets/images/icons/close.svg';
4
4
  import IconCloseWhite from '../../assets/images/icons/close-white.svg';
5
+ import IconCalendar from '../../assets/images/icons/calendar.svg';
5
6
 
6
7
  const IconStyles = css`
7
8
  display: inline-block;
@@ -176,6 +177,19 @@ const getButtonModifiedStyled = ({ $mode, $isIndicatorArrow, $isShown, $isLoadin
176
177
  }
177
178
  if ($iconLeft) {
178
179
  style += ` padding-left: 35px; `
180
+ if ($iconLeft === 'calendar') {
181
+ style += `
182
+ &:before {
183
+ content: url(${IconCalendar});
184
+ position: absolute;
185
+ left: 12px;
186
+ top: 50%;
187
+ margin-top: -8px;
188
+ width: 14px;
189
+ height: 16px;
190
+ }
191
+ `
192
+ }
179
193
  }
180
194
  if ($isIndicatorArrow) {
181
195
  style += `
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useState, useRef } from 'react';
2
2
  import DateRangePicker from 'react-daterange-picker';
3
- import * as moment from 'moment';
3
+ import moment from 'moment';
4
4
  import { extendMoment } from 'moment-range';
5
5
  import { configDateRange } from '../../maps/common';
6
6
  import IconComponent from '../icon';
@@ -46,7 +46,7 @@ const DateRangeComponent = ({ mode='default', placeholder, startDate, endDate, r
46
46
 
47
47
  const daterangeContainerRef = useRef<HTMLElement | null>(null);
48
48
  const buttonRef = useRef<HTMLDivElement | null>(null);
49
- const newMoment = extendMoment(moment);
49
+ const newMoment = extendMoment(moment as any);
50
50
 
51
51
  const callback = () => {
52
52
  setOpen(false);