forstok-ui-lib 5.4.9 → 5.6.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.4.9",
3
+ "version": "5.6.1",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -44,7 +44,6 @@
44
44
  "moment": "^2.30.1",
45
45
  "moment-range": "^4.0.2",
46
46
  "npm-force-resolutions": "^0.0.10",
47
- "rc-calendar": "^9.15.11",
48
47
  "react": "^19.0.0",
49
48
  "react-content-loader": "^7.0.2",
50
49
  "react-datepicker": "^8.0.0",
package/rollup.config.js CHANGED
@@ -65,7 +65,7 @@ export default [
65
65
  exclude: 'node_modules/**'
66
66
  })
67
67
  ],
68
- external: ['react', 'react-dom', 'styled-components', 'rc-calendar/src/RangeCalendar', 'rc-calendar/src/Picker'],
68
+ external: ['react', 'react-dom', 'styled-components'],
69
69
  },
70
70
  {
71
71
  input: 'src/index.ts',
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 41.712 41.712" style="enable-background:new 0 0 41.712 41.712;" xml:space="preserve">
5
+ <path style="fill:#000000;" d="M31.586,21.8c0.444-0.444,0.444-1.143,0-1.587c-0.429-0.444-1.143-0.444-1.571,0l-8.047,8.032V1.706
6
+ c0-0.619-0.492-1.127-1.111-1.127c-0.619,0-1.127,0.508-1.127,1.127v26.539l-8.031-8.032c-0.444-0.444-1.159-0.444-1.587,0
7
+ c-0.444,0.444-0.444,1.143,0,1.587l9.952,9.952c0.429,0.429,1.143,0.429,1.587,0L31.586,21.8z M39.474,29.086
8
+ c0-0.619,0.492-1.111,1.111-1.111c0.619,0,1.127,0.492,1.127,1.111v10.92c0,0.619-0.508,1.127-1.127,1.127H1.111
9
+ C0.492,41.133,0,40.625,0,40.006v-10.92c0-0.619,0.492-1.111,1.111-1.111s1.127,0.492,1.127,1.111v9.809h37.236V29.086z"/>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ <g>
39
+ </g>
40
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 64 64" enable-background="new 0 0 64 64">
4
+ <g>
5
+ <g fill="#1D1D1B">
6
+ <path d="m63.824,41.771c0-1.341-1.086-2.428-2.427-2.428-1.342,0-2.428,1.087-2.428,2.428v14.07h-54.014v-14.07c1.77636e-15-1.341-1.085-2.428-2.428-2.428-1.341,0-2.427,1.087-2.427,2.428v15.486c0,0.179 0.065,0.337 0.103,0.505-0.037,0.168-0.103,0.326-0.103,0.506 0,1.34 1.086,2.427 2.427,2.427h58.87c1.341,0 2.427-1.087 2.427-2.427 0-0.18-0.063-0.338-0.103-0.506 0.039-0.168 0.103-0.327 0.103-0.505v-15.486z" fill="#FFFFFF"/>
7
+ <path d="m32.114,49.306c1.341,0 2.428-1.087 2.428-2.427v-35.464l10.573,10.573c0.474,0.474 1.096,0.712 1.717,0.712 0.62,0 1.242-0.238 1.715-0.712 0.95-0.948 0.95-2.484 0-3.432l-14.717-14.717c-0.947-0.95-2.483-0.95-3.432-4.44089e-16l-14.717,14.717c-0.947,0.948-0.947,2.484 0,3.432 0.474,0.474 1.096,0.712 1.717,0.712s1.242-0.238 1.716-0.712l10.573-10.573v35.464c0,1.34 1.085,2.427 2.427,2.427z" fill="#FFFFFF"/>
8
+ </g>
9
+ </g>
10
+ </svg>
@@ -1,4 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
+ import IconArrowDownload from '../../assets/images/icons/arrow-download.svg';
3
+ import IconArrowUpload from '../../assets/images/icons/arrow-white-upload.svg';
2
4
  import IconDotted from '../../assets/images/icons/dotted.svg';
3
5
  import IconClose from '../../assets/images/icons/close.svg';
4
6
  import IconCloseWhite from '../../assets/images/icons/close-white.svg';
@@ -178,7 +180,30 @@ const getButtonModifiedStyled = ({ $mode, $isIndicatorArrow, $isShown, $isLoadin
178
180
  }
179
181
  if ($iconLeft) {
180
182
  style += ` padding-left: 35px; `
181
- if ($iconLeft === 'filter') {
183
+ if ($iconLeft === 'export') {
184
+ style += `
185
+ &:before {
186
+ content: url(${IconArrowDownload});
187
+ position: absolute;
188
+ left: 12px;
189
+ top: 7px;
190
+ width: 14px;
191
+ ${IconStyles}
192
+ }
193
+ `
194
+ } else if ($iconLeft === 'import') {
195
+ style += `
196
+ &:before {
197
+ content: url(${IconArrowUpload});
198
+ position: absolute;
199
+ left: 50%;
200
+ top: 8px;
201
+ width: 1rem;
202
+ margin-left: -8px;
203
+ ${IconStyles}
204
+ }
205
+ `
206
+ } else if ($iconLeft === 'filter') {
182
207
  style += `
183
208
  &:before {
184
209
  content: url(${IconFilter});
@@ -26,7 +26,6 @@ export { default as RadioComponent } from './radio';
26
26
  export { default as SwitchComponent } from './switch';
27
27
  export { default as MasterTableComponent } from './masterTable';
28
28
  export { default as ListComponent } from './list';
29
- export { default as AntCalendarComponent } from './cascader/calendar';
30
29
 
31
30
  export * from './dropdown/typed';
32
31
  export * from './message/typed';
@@ -1,57 +0,0 @@
1
- import moment, { Moment } from 'moment';
2
- import Picker from 'rc-calendar/src/Picker';
3
- import RangeCalendar from 'rc-calendar/src/RangeCalendar';
4
- import './rc-calendar.css';
5
- import { useState } from 'react';
6
-
7
- const AntCalendarComponent = () => {
8
- const now = moment();
9
- const [value, setValue] = useState<any>();
10
-
11
- const onChange = (value: any) => {
12
- setValue(value);
13
- }
14
-
15
- const formatStr = 'YYYY-MM-DD HH:mm:ss';
16
- const format = (v: any) => {
17
- return v ? v.format(formatStr) : '';
18
- }
19
-
20
- const isValidRange = (v: any) => {
21
- return v && v[0] && v[1];
22
- }
23
-
24
- const calendar = (
25
- <RangeCalendar
26
- showWeekNumber={false}
27
- dateInputPlaceholder={['start', 'end']}
28
- defaultValue={[now, now.clone().add(1, 'months')]}
29
- disabledTime={true}
30
- />
31
- );
32
-
33
- return (
34
- <Picker
35
- value={value}
36
- onChange={onChange}
37
- animation="slide-up"
38
- calendar={calendar}
39
- >
40
- {
41
- ({ value }: { value: any }) => {
42
- return (<span>
43
- <input
44
- placeholder="please select"
45
- style={{ width: 350 }}
46
- readOnly
47
- className="ant-calendar-picker-input ant-input"
48
- value={isValidRange(value) && `${format(value[0])} - ${format(value[1])}` || ''}
49
- />
50
- </span>);
51
- }
52
- }
53
- </Picker>
54
- )
55
- }
56
-
57
- export default AntCalendarComponent;