forstok-ui-lib 8.5.26 → 8.5.28

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": "8.5.26",
3
+ "version": "8.5.28",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <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"
5
+ viewBox="0 0 451.847 451.847" xml:space="preserve" style="fill: white;">
6
+ <path d="M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751
7
+ c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0
8
+ c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"/>
9
+ </svg>
@@ -6,6 +6,7 @@ import IconReport from "../../assets/images/icons/report.svg";
6
6
  import IconDotted from "../../assets/images/icons/dotted.svg";
7
7
  import IconClose from "../../assets/images/icons/close.svg";
8
8
  import IconCloseWhite from "../../assets/images/icons/close-white.svg";
9
+ import IconArrowDown from "../../assets/images/icons/arrow-down-white.svg";
9
10
  import IconArrowDownload from "../../assets/images/icons/arrow-download.svg";
10
11
  import IconArrowWhiteUpload from "../../assets/images/icons/arrow-white-upload.svg";
11
12
  import IconFilter from "../../assets/images/icons/filter.svg";
@@ -235,7 +236,18 @@ const getButtonModifiedStyled = ({
235
236
  }
236
237
  if ($iconLeft) {
237
238
  style += ` padding-left: 35px; `;
238
- if ($iconLeft === "export") {
239
+ if ($iconLeft === "arrow-down") {
240
+ style += `
241
+ &:before {
242
+ content: url(${IconArrowDown});
243
+ position: absolute;
244
+ left: 8px;
245
+ top: 7px;
246
+ width: 10px;
247
+ height: 10px;
248
+ }
249
+ `;
250
+ } else if ($iconLeft === "export") {
239
251
  style += `
240
252
  &:before {
241
253
  content: url(${IconArrowDownload});
@@ -1,12 +1,31 @@
1
- import type { HTMLAttributes, ReactNode } from 'react';
2
- import { ElContainer } from './styles';
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { ElContainer } from "./styles";
3
3
 
4
4
  type TLabel = HTMLAttributes<HTMLSpanElement> & {
5
- children: ReactNode
6
- $mode?: string
7
- $position?: string
5
+ children: ReactNode;
6
+ $mode?: string;
7
+ $position?: string;
8
8
  };
9
9
 
10
- const LabelComponent = ({ children, $mode, $position, ...props }: TLabel) => <ElContainer $mode={$mode} $position={$position} {...props}>{children}</ElContainer>;
10
+ const LabelComponent = ({
11
+ children,
12
+ $mode,
13
+ $position,
14
+ "aria-label": ariaLabel,
15
+ ...props
16
+ }: TLabel) => {
17
+ const isError = ariaLabel === "error";
11
18
 
12
- export default LabelComponent;
19
+ return (
20
+ <ElContainer
21
+ $mode={$mode}
22
+ $position={$position}
23
+ aria-label={ariaLabel}
24
+ {...props}
25
+ >
26
+ {isError ? "Please refresh page" : children}
27
+ </ElContainer>
28
+ );
29
+ };
30
+
31
+ export default LabelComponent;