@tecsinapse/react-web-kit 2.1.4 → 2.1.5-beta.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.
@@ -8,29 +8,29 @@ const anchorBottom = ({
8
8
  theme,
9
9
  anchor
10
10
  }) => anchor === "bottom" && react.css`
11
- margin-top: ${theme.spacing.centi};
11
+ margin-top: ${theme.spacing?.centi};
12
12
  top: 100%;
13
13
  `;
14
14
  const anchorTop = ({
15
15
  theme,
16
16
  anchor
17
17
  }) => anchor === "top" && react.css`
18
- margin-bottom: ${theme.spacing.centi};
18
+ margin-bottom: ${theme.spacing?.centi};
19
19
  bottom: 100%;
20
20
  `;
21
21
  const StyledContainerDropdown = styled("div")`
22
22
  width: 100%;
23
- background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
24
- border-radius: ${({ theme }) => theme.borderRadius.mili};
23
+ background-color: ${({ theme }) => theme.miscellaneous?.surfaceColor};
24
+ border-radius: ${({ theme }) => theme.borderRadius?.mili};
25
25
  box-shadow: 0 2px 8px
26
- ${({ theme }) => reactCore.hex2rgba(theme.miscellaneous.shadow, 0.05)};
26
+ ${({ theme }) => reactCore.hex2rgba(theme.miscellaneous?.shadow, 0.05)};
27
27
  position: absolute;
28
28
  padding-top: ${({
29
29
  theme,
30
30
  hideSearchBar
31
- }) => !hideSearchBar ? `${theme.spacing.deca}` : "0px"};
32
- padding-bottom: ${({ theme }) => theme.spacing.mili};
33
- z-index: ${({ theme }) => theme.zIndex.select};
31
+ }) => !hideSearchBar ? `${theme.spacing?.deca}` : "0px"};
32
+ padding-bottom: ${({ theme }) => theme.spacing?.mili};
33
+ z-index: ${({ theme }) => theme.zIndex?.select};
34
34
  ${anchorTop}
35
35
  ${anchorBottom}
36
36
  `;
@@ -42,19 +42,19 @@ const OptionsContainer = styled("div")`
42
42
  width: 8px;
43
43
  }
44
44
  ::-webkit-scrollbar-thumb {
45
- border-radius: ${({ theme }) => theme.borderRadius.centi};
46
- background-color: ${({ theme }) => theme.color.secondary.light};
45
+ border-radius: ${({ theme }) => theme.borderRadius?.centi};
46
+ background-color: ${({ theme }) => theme.color?.secondary?.light};
47
47
  }
48
48
  ::-webkit-scrollbar-thumb:hover {
49
- background-color: ${({ theme }) => theme.color.primary.light};
49
+ background-color: ${({ theme }) => theme.color?.primary?.light};
50
50
  }
51
51
  `;
52
52
  const SearchBarContainer = styled("div")`
53
- padding-left: ${({ theme }) => theme.spacing.mili};
53
+ padding-left: ${({ theme }) => theme.spacing?.mili};
54
54
  width: 100%;
55
55
  `;
56
56
  const PaddedContainer = styled("div")`
57
- padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};
57
+ padding: ${({ theme }) => `${theme.spacing?.mili} ${theme.spacing?.deca}`};
58
58
  `;
59
59
  const StyledContainerCheckAll = styled(PaddedContainer)`
60
60
  flex-direction: row;
@@ -63,18 +63,18 @@ const StyledContainerCheckAll = styled(PaddedContainer)`
63
63
  align-items: center;
64
64
  cursor: pointer;
65
65
  &:hover {
66
- background-color: ${({ theme }) => theme.color.primary.xlight};
66
+ background-color: ${({ theme }) => theme.color?.primary?.xlight};
67
67
  }
68
68
  &:hover span {
69
- color: ${({ theme }) => theme.color.primary.medium};
69
+ color: ${({ theme }) => theme.color?.primary?.medium};
70
70
  }
71
71
  `;
72
72
  const StyledSpan = styled("span")`
73
- color: ${({ theme }) => theme.font.color.dark};
74
- padding: ${({ theme }) => `${theme.spacing.mili} 0px`};
73
+ color: ${({ theme }) => theme.font?.color?.dark};
74
+ padding: ${({ theme }) => `${theme.spacing?.mili} 0px`};
75
75
  `;
76
76
  const StyledContainerTextLabel = styled("div")`
77
- padding-left: ${({ theme }) => theme.spacing.mili};
77
+ padding-left: ${({ theme }) => theme.spacing?.mili};
78
78
  width: 100%;
79
79
  display: flex;
80
80
  overflow: hidden;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.centi};\n background-color: ${({ theme }: StyleProps) => theme.color.secondary.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color.primary.light};\n }\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font.color.dark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"names":["css","hex2rgba"],"mappings":";;;;;;AAUA,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,QACX,IAAAA,SAAA,CAAA;AAAA,gBACgB,EAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAIrC,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,KACX,IAAAA,SAAA,CAAA;AAAA,mBACmB,EAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAI3B,MAAA,uBAAA,GAA0B,OAAO,KAAK,CAAA,CAAA;AAAA;AAAA,oBAAA,EAE7B,CAAC,EAAE,KAAA,EACrB,KAAA,KAAA,CAAM,cAAc,YAAY,CAAA;AAAA,iBAAA,EACjB,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA;AAAA,IAE/D,EAAA,CAAC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Q,CAAA,IAAI,CAAI,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAE,CAAA,CAAA;AAAA,EAAA;AAG5D,MAAA,uBAAA,GAA0B,OAAO,eAAe,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAA,EASrC,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,QAAQ,MAAM,CAAA;AAAA;AAAA;AAAA,WAAA,EAGpD,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,QAAQ,MAAM,CAAA;AAAA;AAAA,EAAA;AAIzC,MAAA,UAAA,GAAa,OAAO,MAAM,CAAA,CAAA;AAAA,SAAA,EAC5B,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,IAAA,CAAK,MAAM,IAAI,CAAA;AAAA,WAClC,EAAA,CAAC,EAAE,KAAM,EAAA,KAAM,GAAG,KAAM,CAAA,OAAA,CAAQ,IAAI,CAAM,IAAA,CAAA,CAAA;AAAA,EAAA;AAG1C,MAAA,wBAAA,GAA2B,OAAO,KAAK,CAAA,CAAA;AAAA,gBAAA,EAClC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing?.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing?.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous?.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius?.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous?.shadow, 0.05)};\n position: absolute;\n padding-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing?.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing?.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex?.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius?.centi};\n background-color: ${({ theme }: StyleProps) =>\n theme.color?.secondary?.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color?.primary?.light};\n }\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing?.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing?.mili} ${theme.spacing?.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color?.primary?.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color?.primary?.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font?.color?.dark};\n padding: ${({ theme }) => `${theme.spacing?.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing?.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"names":["css","hex2rgba"],"mappings":";;;;;;AAUA,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,QACX,IAAAA,SAAA,CAAA;AAAA,gBACgB,EAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAItC,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,KACX,IAAAA,SAAA,CAAA;AAAA,mBACmB,EAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAI5B,MAAA,uBAAA,GAA0B,OAAO,KAAK,CAAA,CAAA;AAAA;AAAA,oBAAA,EAE7B,CAAC,EAAE,KAAA,EACrB,KAAA,KAAA,CAAM,eAAe,YAAY,CAAA;AAAA,iBAAA,EAClB,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,cAAc,IAAI,CAAA;AAAA;AAAA,IAEhE,EAAA,CAAC,EAAE,KAAM,EAAA,KAAkBC,mBAAS,KAAM,CAAA,aAAA,EAAe,MAAQ,EAAA,IAAI,CAAC,CAAA;AAAA;AAAA,eAAA,EAE3D,CAAC;AAAA,EACd,KAAA;AAAA,EACA,aAAA;AACF,CAAA,KACE,CAAC,aAAgB,GAAA,CAAA,EAAG,MAAM,OAAS,EAAA,IAAI,KAAK,KAAK,CAAA;AAAA,kBAAA,EACjC,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,SAAS,IA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,KAAM,CAAA,KAAA,EAAO,SAAS,MAAM,CAAA;AAAA;AAAA,EAAA;AAI3C,MAAA,UAAA,GAAa,OAAO,MAAM,CAAA,CAAA;AAAA,SAAA,EAC5B,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,IAAA,EAAM,OAAO,IAAI,CAAA;AAAA,WACpC,EAAA,CAAC,EAAE,KAAM,EAAA,KAAM,GAAG,KAAM,CAAA,OAAA,EAAS,IAAI,CAAM,IAAA,CAAA,CAAA;AAAA,EAAA;AAG3C,MAAA,wBAAA,GAA2B,OAAO,KAAK,CAAA,CAAA;AAAA,gBAAA,EAClC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,SAAS,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;"}
@@ -6,29 +6,29 @@ const anchorBottom = ({
6
6
  theme,
7
7
  anchor
8
8
  }) => anchor === "bottom" && css`
9
- margin-top: ${theme.spacing.centi};
9
+ margin-top: ${theme.spacing?.centi};
10
10
  top: 100%;
11
11
  `;
12
12
  const anchorTop = ({
13
13
  theme,
14
14
  anchor
15
15
  }) => anchor === "top" && css`
16
- margin-bottom: ${theme.spacing.centi};
16
+ margin-bottom: ${theme.spacing?.centi};
17
17
  bottom: 100%;
18
18
  `;
19
19
  const StyledContainerDropdown = styled("div")`
20
20
  width: 100%;
21
- background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
22
- border-radius: ${({ theme }) => theme.borderRadius.mili};
21
+ background-color: ${({ theme }) => theme.miscellaneous?.surfaceColor};
22
+ border-radius: ${({ theme }) => theme.borderRadius?.mili};
23
23
  box-shadow: 0 2px 8px
24
- ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};
24
+ ${({ theme }) => hex2rgba(theme.miscellaneous?.shadow, 0.05)};
25
25
  position: absolute;
26
26
  padding-top: ${({
27
27
  theme,
28
28
  hideSearchBar
29
- }) => !hideSearchBar ? `${theme.spacing.deca}` : "0px"};
30
- padding-bottom: ${({ theme }) => theme.spacing.mili};
31
- z-index: ${({ theme }) => theme.zIndex.select};
29
+ }) => !hideSearchBar ? `${theme.spacing?.deca}` : "0px"};
30
+ padding-bottom: ${({ theme }) => theme.spacing?.mili};
31
+ z-index: ${({ theme }) => theme.zIndex?.select};
32
32
  ${anchorTop}
33
33
  ${anchorBottom}
34
34
  `;
@@ -40,19 +40,19 @@ const OptionsContainer = styled("div")`
40
40
  width: 8px;
41
41
  }
42
42
  ::-webkit-scrollbar-thumb {
43
- border-radius: ${({ theme }) => theme.borderRadius.centi};
44
- background-color: ${({ theme }) => theme.color.secondary.light};
43
+ border-radius: ${({ theme }) => theme.borderRadius?.centi};
44
+ background-color: ${({ theme }) => theme.color?.secondary?.light};
45
45
  }
46
46
  ::-webkit-scrollbar-thumb:hover {
47
- background-color: ${({ theme }) => theme.color.primary.light};
47
+ background-color: ${({ theme }) => theme.color?.primary?.light};
48
48
  }
49
49
  `;
50
50
  const SearchBarContainer = styled("div")`
51
- padding-left: ${({ theme }) => theme.spacing.mili};
51
+ padding-left: ${({ theme }) => theme.spacing?.mili};
52
52
  width: 100%;
53
53
  `;
54
54
  const PaddedContainer = styled("div")`
55
- padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};
55
+ padding: ${({ theme }) => `${theme.spacing?.mili} ${theme.spacing?.deca}`};
56
56
  `;
57
57
  const StyledContainerCheckAll = styled(PaddedContainer)`
58
58
  flex-direction: row;
@@ -61,18 +61,18 @@ const StyledContainerCheckAll = styled(PaddedContainer)`
61
61
  align-items: center;
62
62
  cursor: pointer;
63
63
  &:hover {
64
- background-color: ${({ theme }) => theme.color.primary.xlight};
64
+ background-color: ${({ theme }) => theme.color?.primary?.xlight};
65
65
  }
66
66
  &:hover span {
67
- color: ${({ theme }) => theme.color.primary.medium};
67
+ color: ${({ theme }) => theme.color?.primary?.medium};
68
68
  }
69
69
  `;
70
70
  const StyledSpan = styled("span")`
71
- color: ${({ theme }) => theme.font.color.dark};
72
- padding: ${({ theme }) => `${theme.spacing.mili} 0px`};
71
+ color: ${({ theme }) => theme.font?.color?.dark};
72
+ padding: ${({ theme }) => `${theme.spacing?.mili} 0px`};
73
73
  `;
74
74
  const StyledContainerTextLabel = styled("div")`
75
- padding-left: ${({ theme }) => theme.spacing.mili};
75
+ padding-left: ${({ theme }) => theme.spacing?.mili};
76
76
  width: 100%;
77
77
  display: flex;
78
78
  overflow: hidden;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.centi};\n background-color: ${({ theme }: StyleProps) => theme.color.secondary.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color.primary.light};\n }\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font.color.dark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"names":[],"mappings":";;;;AAUA,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,QACX,IAAA,GAAA,CAAA;AAAA,gBACgB,EAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAIrC,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,KACX,IAAA,GAAA,CAAA;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KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA;AAAA,EAAA;AAI/D,MAAA,kBAAA,GAAqB,OAAO,KAAK,CAAA,CAAA;AAAA,gBAAA,EAC5B,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA;AAAA,EAAA;AAItC,MAAA,eAAA,GAAkB,OAAO,KAAK,CAAA,CAAA;AAAA,WAAA,EAC9B,CAAC,EAAE,KAAM,EAAA,KAAM,CAAG,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAE,CAAA,CAAA;AAAA,EAAA;AAG5D,MAAA,uBAAA,GAA0B,OAAO,eAAe,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAA,EASrC,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,QAAQ,MAAM,CAAA;AAAA;AAAA;AAAA,WAAA,EAGpD,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,QAAQ,MAAM,CAAA;AAAA;AAAA,EAAA;AAIzC,MAAA,UAAA,GAAa,OAAO,MAAM,CAAA,CAAA;AAAA,SAAA,EAC5B,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,IAAA,CAAK,MAAM,IAAI,CAAA;AAAA,WAClC,EAAA,CAAC,EAAE,KAAM,EAAA,KAAM,GAAG,KAAM,CAAA,OAAA,CAAQ,IAAI,CAAM,IAAA,CAAA,CAAA;AAAA,EAAA;AAG1C,MAAA,wBAAA,GAA2B,OAAO,KAAK,CAAA,CAAA;AAAA,gBAAA,EAClC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing?.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing?.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous?.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius?.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous?.shadow, 0.05)};\n position: absolute;\n padding-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing?.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing?.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex?.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius?.centi};\n background-color: ${({ theme }: StyleProps) =>\n theme.color?.secondary?.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color?.primary?.light};\n }\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing?.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing?.mili} ${theme.spacing?.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color?.primary?.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color?.primary?.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font?.color?.dark};\n padding: ${({ theme }) => `${theme.spacing?.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing?.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"names":[],"mappings":";;;;AAUA,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,QACX,IAAA,GAAA,CAAA;AAAA,gBACgB,EAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAItC,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,MAAA;AACF,CAAA,KACE,WAAW,KACX,IAAA,GAAA,CAAA;AAAA,mBACmB,EAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAI5B,MAAA,uBAAA,GAA0B,OAAO,KAAK,CAAA,CAAA;AAAA;AAAA,oBAAA,EAE7B,CAAC,EAAE,KAAA,EACrB,KAAA,KAAA,CAAM,eAAe,YAAY,CAAA;AAAA,iBAAA,EAClB,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,cAAc,IAAI,CAAA;AAAA;AAAA,IAEhE,EAAA,CAAC,EAAE,KAA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I,CAAA,EAAA,KAAA,CAAM,OAAS,EAAA,IAAI,CAAE,CAAA,CAAA;AAAA,EAAA;AAG9D,MAAA,uBAAA,GAA0B,OAAO,eAAe,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAA,EASrC,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,EAAO,SAAS,MAAM,CAAA;AAAA;AAAA;AAAA,WAAA,EAGtD,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,EAAO,SAAS,MAAM,CAAA;AAAA;AAAA,EAAA;AAI3C,MAAA,UAAA,GAAa,OAAO,MAAM,CAAA,CAAA;AAAA,SAAA,EAC5B,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,IAAA,EAAM,OAAO,IAAI,CAAA;AAAA,WACpC,EAAA,CAAC,EAAE,KAAM,EAAA,KAAM,GAAG,KAAM,CAAA,OAAA,EAAS,IAAI,CAAM,IAAA,CAAA,CAAA;AAAA,EAAA;AAG3C,MAAA,wBAAA,GAA2B,OAAO,KAAK,CAAA,CAAA;AAAA,gBAAA,EAClC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,SAAS,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-web-kit",
3
3
  "description": "TecSinapse React components",
4
- "version": "2.1.4",
4
+ "version": "2.1.5-beta.1+d72ee9a0",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -43,5 +43,5 @@
43
43
  "react-dom": "^18.0.0",
44
44
  "react-native-web": ">=0.18.0 <1"
45
45
  },
46
- "gitHead": "2e7aaccf7b464353ded61ee5a45b4e67d429b9b7"
46
+ "gitHead": "d72ee9a0bfd2f6adc233531d4643592fca3716a9"
47
47
  }