blockforce-design-system 2.0.2 → 2.0.4

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.
Files changed (95) hide show
  1. package/MIGRATION.md +23 -19
  2. package/README.md +6 -2
  3. package/lib/ai/components.json +6531 -0
  4. package/lib/ai/icons.txt +5999 -0
  5. package/lib/ai/tokens.md +231 -0
  6. package/lib/commonjs/components/data-display/calendar/calendar.styles.js +14 -13
  7. package/lib/commonjs/components/data-display/calendar/calendar.styles.js.map +1 -1
  8. package/lib/commonjs/components/data-display/matrix/matrix.styles.js +22 -21
  9. package/lib/commonjs/components/data-display/matrix/matrix.styles.js.map +1 -1
  10. package/lib/commonjs/components/data-display/side-panel/side-panel.styles.js +11 -10
  11. package/lib/commonjs/components/data-display/side-panel/side-panel.styles.js.map +1 -1
  12. package/lib/commonjs/components/forms/autocomplete/autocomplete.styles.js +8 -21
  13. package/lib/commonjs/components/forms/autocomplete/autocomplete.styles.js.map +1 -1
  14. package/lib/commonjs/components/forms/file/file-image-preview/file-image-preview.comp.js.map +1 -1
  15. package/lib/commonjs/components/forms/file/file-image-preview-list/file-image-preview-list.comp.js.map +1 -1
  16. package/lib/commonjs/components/forms/file/file-preview-list/file-preview-list.comp.js.map +1 -1
  17. package/lib/commonjs/components/icons/icon/icon.comp.js.map +1 -1
  18. package/lib/commonjs/components/layout/drawer/drawer.styles.js +7 -5
  19. package/lib/commonjs/components/layout/drawer/drawer.styles.js.map +1 -1
  20. package/lib/commonjs/components/layout/modal/modal.styles.js +7 -18
  21. package/lib/commonjs/components/layout/modal/modal.styles.js.map +1 -1
  22. package/lib/commonjs/components/layout/popover/popover.styles.js +3 -2
  23. package/lib/commonjs/components/layout/popover/popover.styles.js.map +1 -1
  24. package/lib/commonjs/components/layout/slider/slider.styles.js +5 -26
  25. package/lib/commonjs/components/layout/slider/slider.styles.js.map +1 -1
  26. package/lib/commonjs/components/layout/table/table.comp.js +1 -1
  27. package/lib/commonjs/components/layout/table/table.comp.js.map +1 -1
  28. package/lib/commonjs/components/layout/table/table.styles.js +18 -17
  29. package/lib/commonjs/components/layout/table/table.styles.js.map +1 -1
  30. package/lib/commonjs/components/layout/table-head/table-head.comp.js +1 -1
  31. package/lib/commonjs/components/layout/table-head/table-head.comp.js.map +1 -1
  32. package/lib/commonjs/components/layout/table-head/table-head.styles.js +1 -1
  33. package/lib/commonjs/components/layout/table-head/table-head.styles.js.map +1 -1
  34. package/lib/commonjs/components/layout/table-row/table-row.comp.js +1 -1
  35. package/lib/commonjs/components/layout/table-row/table-row.comp.js.map +1 -1
  36. package/lib/commonjs/components/navigation/navigation-card/navigation-card.comp.js +2 -0
  37. package/lib/commonjs/components/navigation/navigation-card/navigation-card.comp.js.map +1 -0
  38. package/lib/commonjs/components/navigation/navigation-card/navigation-card.styles.js +47 -0
  39. package/lib/commonjs/components/navigation/navigation-card/navigation-card.styles.js.map +1 -0
  40. package/lib/commonjs/components/navigation/navigation-card/navigation-cards.comp.js +2 -0
  41. package/lib/commonjs/components/navigation/navigation-card/navigation-cards.comp.js.map +1 -0
  42. package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.comp.js +2 -0
  43. package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.comp.js.map +1 -0
  44. package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.styles.js +91 -0
  45. package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.styles.js.map +1 -0
  46. package/lib/commonjs/index.js +1 -1
  47. package/lib/commonjs/theme/scrollbar.js +39 -0
  48. package/lib/commonjs/theme/scrollbar.js.map +1 -0
  49. package/lib/index.d.ts +134 -2
  50. package/lib/module/components/data-display/calendar/calendar.styles.js +17 -16
  51. package/lib/module/components/data-display/calendar/calendar.styles.js.map +1 -1
  52. package/lib/module/components/data-display/matrix/matrix.styles.js +20 -19
  53. package/lib/module/components/data-display/matrix/matrix.styles.js.map +1 -1
  54. package/lib/module/components/data-display/side-panel/side-panel.styles.js +10 -9
  55. package/lib/module/components/data-display/side-panel/side-panel.styles.js.map +1 -1
  56. package/lib/module/components/forms/autocomplete/autocomplete.styles.js +8 -21
  57. package/lib/module/components/forms/autocomplete/autocomplete.styles.js.map +1 -1
  58. package/lib/module/components/forms/file/file-image-preview/file-image-preview.comp.js.map +1 -1
  59. package/lib/module/components/forms/file/file-image-preview-list/file-image-preview-list.comp.js.map +1 -1
  60. package/lib/module/components/forms/file/file-preview-list/file-preview-list.comp.js.map +1 -1
  61. package/lib/module/components/icons/icon/icon.comp.js.map +1 -1
  62. package/lib/module/components/layout/drawer/drawer.styles.js +7 -5
  63. package/lib/module/components/layout/drawer/drawer.styles.js.map +1 -1
  64. package/lib/module/components/layout/modal/modal.styles.js +7 -18
  65. package/lib/module/components/layout/modal/modal.styles.js.map +1 -1
  66. package/lib/module/components/layout/popover/popover.styles.js +2 -1
  67. package/lib/module/components/layout/popover/popover.styles.js.map +1 -1
  68. package/lib/module/components/layout/slider/slider.styles.js +5 -26
  69. package/lib/module/components/layout/slider/slider.styles.js.map +1 -1
  70. package/lib/module/components/layout/table/table.comp.js +1 -1
  71. package/lib/module/components/layout/table/table.comp.js.map +1 -1
  72. package/lib/module/components/layout/table/table.styles.js +9 -8
  73. package/lib/module/components/layout/table/table.styles.js.map +1 -1
  74. package/lib/module/components/layout/table-head/table-head.comp.js +1 -1
  75. package/lib/module/components/layout/table-head/table-head.comp.js.map +1 -1
  76. package/lib/module/components/layout/table-head/table-head.styles.js +1 -1
  77. package/lib/module/components/layout/table-head/table-head.styles.js.map +1 -1
  78. package/lib/module/components/layout/table-row/table-row.comp.js +1 -1
  79. package/lib/module/components/layout/table-row/table-row.comp.js.map +1 -1
  80. package/lib/module/components/navigation/navigation-card/navigation-card.comp.js +2 -0
  81. package/lib/module/components/navigation/navigation-card/navigation-card.comp.js.map +1 -0
  82. package/lib/module/components/navigation/navigation-card/navigation-card.styles.js +47 -0
  83. package/lib/module/components/navigation/navigation-card/navigation-card.styles.js.map +1 -0
  84. package/lib/module/components/navigation/navigation-card/navigation-cards.comp.js +2 -0
  85. package/lib/module/components/navigation/navigation-card/navigation-cards.comp.js.map +1 -0
  86. package/lib/module/components/navigation/navigation-sections/navigation-sections.comp.js +2 -0
  87. package/lib/module/components/navigation/navigation-sections/navigation-sections.comp.js.map +1 -0
  88. package/lib/module/components/navigation/navigation-sections/navigation-sections.styles.js +91 -0
  89. package/lib/module/components/navigation/navigation-sections/navigation-sections.styles.js.map +1 -0
  90. package/lib/module/index.js +1 -1
  91. package/lib/module/theme/scrollbar.js +39 -0
  92. package/lib/module/theme/scrollbar.js.map +1 -0
  93. package/llms-full.txt +2282 -0
  94. package/llms.txt +162 -0
  95. package/package.json +18 -11
@@ -1,4 +1,4 @@
1
- import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder as r}from"../form.styles.js";import{Box as t}from"../../layout/box/box.comp.js";import{getThemeColor as i}from"../../../theme/theme.util.js";import{Text as d}from"../../typography/text/text.comp.js";const a=e(t).withConfig({shouldForwardProp:e=>!["focused"].includes(e)})`
1
+ import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder as r}from"../form.styles.js";import{Box as t}from"../../layout/box/box.comp.js";import{getThemeColor as i}from"../../../theme/theme.util.js";import{thinScrollbar as d}from"../../../theme/scrollbar.js";import{Text as n}from"../../typography/text/text.comp.js";const s=e(t).withConfig({shouldForwardProp:e=>!["focused"].includes(e)})`
2
2
  min-height: 44px;
3
3
  width: 100%;
4
4
  border-radius: ${({theme:e})=>e.border_radius.input};
@@ -16,7 +16,7 @@ import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder a
16
16
  ${({disabled:e,theme:o})=>e&&`background-color: ${i("grey_5",o)};`}
17
17
 
18
18
  ${r}
19
- `,n=e.input.withConfig({shouldForwardProp:e=>![""].includes(e)})`
19
+ `,a=e.input.withConfig({shouldForwardProp:e=>![""].includes(e)})`
20
20
  min-height: 100%;
21
21
  width: 100%;
22
22
  border: none;
@@ -27,25 +27,12 @@ import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder a
27
27
  &:focus {
28
28
  outline: none;
29
29
  }
30
- `,s=e(t)`
30
+ `,m=e(t)`
31
31
  flex-direction: column;
32
32
  max-height: 300px;
33
33
  overflow-y: auto;
34
34
  background-color: ${({theme:e})=>i("white",e)};
35
-
36
- &::-webkit-scrollbar {
37
- width: 10px;
38
- }
39
- &::-webkit-scrollbar-track {
40
- background: ${e=>i("white",e.theme)};
41
- }
42
- &::-webkit-scrollbar-thumb {
43
- border-radius: 8px;
44
- background: ${e=>i("grey_5",e.theme)};
45
- }
46
- &::-webkit-scrollbar-thumb:hover {
47
- background: ${e=>i("grey_4",e.theme)};
48
- }
35
+ ${d}
49
36
 
50
37
  div {
51
38
  border-bottom: 1px solid ${({theme:e})=>i("grey_5",e)};
@@ -69,7 +56,7 @@ import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder a
69
56
  gap: ${({theme:e})=>e.spacing[1]};
70
57
  max-width: 50%;
71
58
  flex-wrap: wrap;
72
- `,m=e(t)`
59
+ `,p=e(t)`
73
60
  background-color: ${({theme:e})=>i("grey_5",e)};
74
61
  border: 1px solid ${({theme:e})=>i("grey_4",e)};
75
62
  padding: 2px 4px;
@@ -78,14 +65,14 @@ import{styled as e}from"styled-components";import{fieldShadow as o,fieldBorder a
78
65
  align-items: center;
79
66
  gap: ${({theme:e})=>e.spacing[1]};
80
67
  max-width: 100%;
81
- `,p=e(t)`
68
+ `,c=e(t)`
82
69
  overflow: hidden;
83
- `,c=e(d)`
70
+ `,g=e(n)`
84
71
  width: 100%;
85
72
  p {
86
73
  text-overflow: ellipsis;
87
74
  white-space: nowrap;
88
75
  overflow: hidden;
89
76
  }
90
- `;export{a as InputContainer,h as Option,s as OptionsContainer,n as StyledInput,m as Tag,l as TagContainer,c as TagText,p as TagTextContainer};
77
+ `;export{s as InputContainer,h as Option,m as OptionsContainer,a as StyledInput,p as Tag,l as TagContainer,g as TagText,c as TagTextContainer};
91
78
  //# sourceMappingURL=autocomplete.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.styles.js","sources":["../../../../../src/components/forms/autocomplete/autocomplete.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme'\nimport { IconsName } from '../../icons'\nimport { Box } from '../../layout'\nimport { Text } from '../../typography'\nimport { fieldBorder, fieldShadow } from '../form.styles'\nimport { InputState } from '../form.types'\n\nexport const InputContainer = styled(Box).withConfig({\n shouldForwardProp: (prop) => !['focused'].includes(prop),\n})<{\n focused?: boolean\n disabled?: boolean\n state?: InputState\n $borderColor?: string\n}>`\n min-height: 44px;\n width: 100%;\n border-radius: ${({ theme }) => theme.border_radius.input};\n padding: ${({ theme }) => `${theme.spacing['1']} ${theme.spacing['2']}`};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n box-shadow: ${({ theme, state, focused, $borderColor }) =>\n fieldShadow(theme, state, !!focused, $borderColor)};\n transition:\n box-shadow 250ms ease-out,\n border-color 200ms ease;\n width: 100%;\n align-items: center;\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n outline: none;\n\n ${({ disabled, theme }) =>\n disabled && `background-color: ${getThemeColor('grey_5', theme)};`}\n\n ${fieldBorder}\n`\nexport const StyledInput = styled.input.withConfig({\n shouldForwardProp: (prop) => ![''].includes(prop),\n})<{ icon?: IconsName }>`\n min-height: 100%;\n width: 100%;\n border: none;\n background: none;\n color: ${({ theme }) => getThemeColor('grey_1', theme)};\n font-size: ${({ theme }) => theme.typography.body_size.normal};\n\n &:focus {\n outline: none;\n }\n`\n\nexport const OptionsContainer = styled(Box)`\n flex-direction: column;\n max-height: 300px;\n overflow-y: auto;\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n\n &::-webkit-scrollbar {\n width: 10px;\n }\n &::-webkit-scrollbar-track {\n background: ${(props) => getThemeColor('white', props.theme)};\n }\n &::-webkit-scrollbar-thumb {\n border-radius: 8px;\n background: ${(props) => getThemeColor('grey_5', props.theme)};\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ${(props) => getThemeColor('grey_4', props.theme)};\n }\n\n div {\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n }\n\n div:last-child {\n border-bottom: none;\n }\n`\n\nexport const Option = styled(Box)<{ selected: boolean; disabled?: boolean }>`\n width: 100%;\n padding: ${({ theme }) => `${theme.spacing['1']} ${theme.spacing['2']}`};\n background-color: ${({ selected, theme }) =>\n selected ? getThemeColor('secondary', theme) : 'transparent'};\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n cursor: ${({ disabled }) => (disabled ? 'initial' : 'pointer')};\n\n &:hover {\n background-color: ${({ selected, disabled, theme }) =>\n selected || disabled ? undefined : getThemeColor('grey_5', theme)};\n }\n`\n\nexport const TagContainer = styled(Box)`\n display: flex;\n gap: ${({ theme }) => theme.spacing['1']};\n max-width: 50%;\n flex-wrap: wrap;\n`\n\nexport const Tag = styled(Box)`\n background-color: ${({ theme }) => getThemeColor('grey_5', theme)};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.border_radius.input};\n display: flex;\n align-items: center;\n gap: ${({ theme }) => theme.spacing['1']};\n max-width: 100%;\n`\n\nexport const TagTextContainer = styled(Box)`\n overflow: hidden;\n`\n\nexport const TagText = styled(Text)`\n width: 100%;\n p {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n`\n"],"names":["InputContainer","styled","Box","withConfig","shouldForwardProp","prop","includes","theme","border_radius","input","spacing","getThemeColor","state","focused","$borderColor","fieldShadow","disabled","fieldBorder","StyledInput","typography","body_size","normal","OptionsContainer","props","Option","selected","undefined","TagContainer","Tag","TagTextContainer","TagText","Text"],"mappings":"sRASO,MAAMA,EAAiBC,EAAOC,GAAKC,WAAW,CACnDC,kBAAoBC,IAAU,CAAC,WAAWC,SAASD,IAMnD;;;mBAGiB,EAAGE,WAAYA,EAAMC,cAAcC;aACzC,EAAGF,WAAY,GAAGA,EAAMG,QAAQ,MAAQH,EAAMG,QAAQ;sBAC7C,EAAGH,WAAYI,EAAc,SAAUJ;gBAC7C,EAAGA,QAAOK,QAAOC,UAASC,kBACtCC,EAAYR,EAAOK,IAASC,EAASC;;;;;;sBAMnB,EAAGP,WAAYI,EAAc,QAASJ;;;IAGxD,EAAGS,WAAUT,WACbS,wBAAiCL,EAAc,SAAUJ;;IAEzDU;EAESC,EAAcjB,EAAOQ,MAAMN,WAAW,CACjDC,kBAAoBC,IAAU,CAAC,IAAIC,SAASD,IACtB;;;;;WAKb,EAAGE,WAAYI,EAAc,SAAUJ;eACnC,EAAGA,WAAYA,EAAMY,WAAWC,UAAUC;;;;;EAO5CC,EAAmBrB,EAAOC,EAAI;;;;sBAIrB,EAAGK,WAAYI,EAAc,QAASJ;;;;;;kBAMzCgB,GAAUZ,EAAc,QAASY,EAAMhB;;;;kBAIvCgB,GAAUZ,EAAc,SAAUY,EAAMhB;;;kBAGxCgB,GAAUZ,EAAc,SAAUY,EAAMhB;;;;+BAI5B,EAAGA,WAAYI,EAAc,SAAUJ;;;;;;EAQzDiB,EAASvB,EAAOC,EAA+C;;aAE/D,EAAGK,WAAY,GAAGA,EAAMG,QAAQ,MAAQH,EAAMG,QAAQ;sBAC7C,EAAGe,WAAUlB,WAC/BkB,EAAWd,EAAc,YAAaJ,GAAS;6BACtB,EAAGA,WAAYI,EAAc,SAAUJ;YACxD,EAAGS,cAAgBA,EAAW,UAAY;;;wBAG9B,EAAGS,WAAUT,WAAUT,WACzCkB,GAAYT,OAAWU,EAAYf,EAAc,SAAUJ;;EAIpDoB,EAAe1B,EAAOC,EAAI;;SAE9B,EAAGK,WAAYA,EAAMG,QAAQ;;;EAKzBkB,EAAM3B,EAAOC,EAAI;sBACR,EAAGK,WAAYI,EAAc,SAAUJ;sBACvC,EAAGA,WAAYI,EAAc,SAAUJ;;mBAE1C,EAAGA,WAAYA,EAAMC,cAAcC;;;SAG7C,EAAGF,WAAYA,EAAMG,QAAQ;;EAIzBmB,EAAmB5B,EAAOC,EAAI;;EAI9B4B,EAAU7B,EAAO8B,EAAK;;;;;;;"}
1
+ {"version":3,"file":"autocomplete.styles.js","sources":["../../../../../src/components/forms/autocomplete/autocomplete.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor, thinScrollbar } from '../../../theme'\nimport { IconsName } from '../../icons'\nimport { Box } from '../../layout'\nimport { Text } from '../../typography'\nimport { fieldBorder, fieldShadow } from '../form.styles'\nimport { InputState } from '../form.types'\n\nexport const InputContainer = styled(Box).withConfig({\n shouldForwardProp: (prop) => !['focused'].includes(prop),\n})<{\n focused?: boolean\n disabled?: boolean\n state?: InputState\n $borderColor?: string\n}>`\n min-height: 44px;\n width: 100%;\n border-radius: ${({ theme }) => theme.border_radius.input};\n padding: ${({ theme }) => `${theme.spacing['1']} ${theme.spacing['2']}`};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n box-shadow: ${({ theme, state, focused, $borderColor }) =>\n fieldShadow(theme, state, !!focused, $borderColor)};\n transition:\n box-shadow 250ms ease-out,\n border-color 200ms ease;\n width: 100%;\n align-items: center;\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n outline: none;\n\n ${({ disabled, theme }) =>\n disabled && `background-color: ${getThemeColor('grey_5', theme)};`}\n\n ${fieldBorder}\n`\nexport const StyledInput = styled.input.withConfig({\n shouldForwardProp: (prop) => ![''].includes(prop),\n})<{ icon?: IconsName }>`\n min-height: 100%;\n width: 100%;\n border: none;\n background: none;\n color: ${({ theme }) => getThemeColor('grey_1', theme)};\n font-size: ${({ theme }) => theme.typography.body_size.normal};\n\n &:focus {\n outline: none;\n }\n`\n\nexport const OptionsContainer = styled(Box)`\n flex-direction: column;\n max-height: 300px;\n overflow-y: auto;\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n ${thinScrollbar}\n\n div {\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n }\n\n div:last-child {\n border-bottom: none;\n }\n`\n\nexport const Option = styled(Box)<{ selected: boolean; disabled?: boolean }>`\n width: 100%;\n padding: ${({ theme }) => `${theme.spacing['1']} ${theme.spacing['2']}`};\n background-color: ${({ selected, theme }) =>\n selected ? getThemeColor('secondary', theme) : 'transparent'};\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n cursor: ${({ disabled }) => (disabled ? 'initial' : 'pointer')};\n\n &:hover {\n background-color: ${({ selected, disabled, theme }) =>\n selected || disabled ? undefined : getThemeColor('grey_5', theme)};\n }\n`\n\nexport const TagContainer = styled(Box)`\n display: flex;\n gap: ${({ theme }) => theme.spacing['1']};\n max-width: 50%;\n flex-wrap: wrap;\n`\n\nexport const Tag = styled(Box)`\n background-color: ${({ theme }) => getThemeColor('grey_5', theme)};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.border_radius.input};\n display: flex;\n align-items: center;\n gap: ${({ theme }) => theme.spacing['1']};\n max-width: 100%;\n`\n\nexport const TagTextContainer = styled(Box)`\n overflow: hidden;\n`\n\nexport const TagText = styled(Text)`\n width: 100%;\n p {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n`\n"],"names":["InputContainer","styled","Box","withConfig","shouldForwardProp","prop","includes","theme","border_radius","input","spacing","getThemeColor","state","focused","$borderColor","fieldShadow","disabled","fieldBorder","StyledInput","typography","body_size","normal","OptionsContainer","thinScrollbar","Option","selected","undefined","TagContainer","Tag","TagTextContainer","TagText","Text"],"mappings":"kVASO,MAAMA,EAAiBC,EAAOC,GAAKC,WAAW,CACnDC,kBAAoBC,IAAU,CAAC,WAAWC,SAASD,IAMnD;;;mBAGiB,EAAGE,WAAYA,EAAMC,cAAcC;aACzC,EAAGF,WAAY,GAAGA,EAAMG,QAAQ,MAAQH,EAAMG,QAAQ;sBAC7C,EAAGH,WAAYI,EAAc,SAAUJ;gBAC7C,EAAGA,QAAOK,QAAOC,UAASC,kBACtCC,EAAYR,EAAOK,IAASC,EAASC;;;;;;sBAMnB,EAAGP,WAAYI,EAAc,QAASJ;;;IAGxD,EAAGS,WAAUT,WACbS,wBAAiCL,EAAc,SAAUJ;;IAEzDU;EAESC,EAAcjB,EAAOQ,MAAMN,WAAW,CACjDC,kBAAoBC,IAAU,CAAC,IAAIC,SAASD,IACtB;;;;;WAKb,EAAGE,WAAYI,EAAc,SAAUJ;eACnC,EAAGA,WAAYA,EAAMY,WAAWC,UAAUC;;;;;EAO5CC,EAAmBrB,EAAOC,EAAI;;;;sBAIrB,EAAGK,WAAYI,EAAc,QAASJ;IACxDgB;;;+BAG2B,EAAGhB,WAAYI,EAAc,SAAUJ;;;;;;EAQzDiB,EAASvB,EAAOC,EAA+C;;aAE/D,EAAGK,WAAY,GAAGA,EAAMG,QAAQ,MAAQH,EAAMG,QAAQ;sBAC7C,EAAGe,WAAUlB,WAC/BkB,EAAWd,EAAc,YAAaJ,GAAS;6BACtB,EAAGA,WAAYI,EAAc,SAAUJ;YACxD,EAAGS,cAAgBA,EAAW,UAAY;;;wBAG9B,EAAGS,WAAUT,WAAUT,WACzCkB,GAAYT,OAAWU,EAAYf,EAAc,SAAUJ;;EAIpDoB,EAAe1B,EAAOC,EAAI;;SAE9B,EAAGK,WAAYA,EAAMG,QAAQ;;;EAKzBkB,EAAM3B,EAAOC,EAAI;sBACR,EAAGK,WAAYI,EAAc,SAAUJ;sBACvC,EAAGA,WAAYI,EAAc,SAAUJ;;mBAE1C,EAAGA,WAAYA,EAAMC,cAAcC;;;SAG7C,EAAGF,WAAYA,EAAMG,QAAQ;;EAIzBmB,EAAmB5B,EAAOC,EAAI;;EAI9B4B,EAAU7B,EAAO8B,EAAK;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-image-preview.comp.js","sources":["../../../../../../src/components/forms/file/file-image-preview/file-image-preview.comp.tsx"],"sourcesContent":["import { useTheme } from 'styled-components'\n\nimport { Button } from '../../../buttons'\nimport { Icon } from '../../../icons'\nimport { Image } from '../../../images'\nimport { Box } from '../../../layout'\nimport { Text } from '../../../typography'\nimport * as DragNDropStyles from '../file.styles'\nimport {\n bytesToSize,\n getFileIcon,\n getFileName,\n isImageFile,\n} from '../file.utils'\nimport { useObjectUrl } from '../use-object-url'\n\nimport { FileImagePreviewProps } from './file-image-preview.types'\n\nexport const FileImagePreview = ({\n file,\n onChange,\n onDelete,\n onClickInput,\n ...rest\n}: FileImagePreviewProps) => {\n const theme = useTheme()\n\n const fileIsLink = !(file instanceof File)\n\n const handleOnChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange && e.target.files) {\n onChange(e.target.files[0])\n e.target.value = ''\n }\n }\n\n const imageUrl = useObjectUrl(file)\n\n return (\n <Box gap={2} alignItems=\"center\" data-testid=\"file-image-preview\" {...rest}>\n {isImageFile(file) ? (\n imageUrl ? (\n <Image\n width=\"56px\"\n height=\"56px\"\n objectFit=\"cover\"\n borderRadius={theme.border_radius.card}\n src={imageUrl}\n alt={getFileName(file)}\n />\n ) : (\n <Box width=\"56px\" height=\"56px\" flex=\"none\" />\n )\n ) : (\n <Box\n width=\"56px\"\n height=\"56px\"\n flex=\"none\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius={theme.border_radius.card}\n backgroundColor=\"grey_5\"\n data-testid=\"file-icon\"\n >\n <Icon name={getFileIcon(file)} size={28} color=\"grey_2\" />\n </Box>\n )}\n <Box direction=\"column\" gap={1}>\n <Box gap={1}>\n {onChange && (\n <Button variant=\"text\" padding={'0'} data-testid=\"change-button\">\n <input\n hidden\n type=\"file\"\n id=\"fileToChange\"\n onChange={handleOnChange}\n />\n <DragNDropStyles.UpdateLabel\n htmlFor=\"fileToChange\"\n onClick={() => onClickInput?.()}\n >\n <Icon name=\"image_edit\" size={20} color={theme.colors.grey_1} />\n </DragNDropStyles.UpdateLabel>\n </Button>\n )}\n <Button variant=\"text\" padding={'0'} onClick={onDelete}>\n <Icon name=\"delete_bin7\" size={20} color={theme.colors.grey_2} />\n </Button>\n </Box>\n <Text size=\"small\">\n {getFileName(file)} {!fileIsLink && bytesToSize(file.size)}\n </Text>\n </Box>\n </Box>\n )\n}\n"],"names":["FileImagePreview","file","onChange","onDelete","onClickInput","rest","theme","useTheme","fileIsLink","File","imageUrl","useObjectUrl","_jsxs","Box","gap","alignItems","children","isImageFile","_jsx","Image","width","height","objectFit","borderRadius","border_radius","card","src","alt","getFileName","flex","justifyContent","backgroundColor","Icon","name","getFileIcon","size","color","direction","Button","variant","padding","hidden","type","id","e","target","files","value","DragNDropStyles","htmlFor","onClick","colors","grey_1","grey_2","Text","bytesToSize"],"mappings":"4kBAkBO,MAAMA,EAAmBA,EAC9BC,OACAC,WACAC,WACAC,kBACGC,MAEH,MAAMC,EAAQC,IAERC,IAAeP,aAAgBQ,MAS/BC,EAAWC,EAAaV,GAE9B,OACEW,EAACC,EAAG,CAACC,IAAK,EAAGC,WAAW,SAAQ,cAAa,wBAAyBV,EACnEW,SAAA,CAAAC,EAAYhB,GACXS,EACEQ,EAACC,EACC,CAAAC,MAAM,OACNC,OAAO,OACPC,UAAU,QACVC,aAAcjB,EAAMkB,cAAcC,KAClCC,IAAKhB,EACLiB,IAAKC,EAAY3B,KAGnBiB,EAACL,EAAG,CAACO,MAAM,OAAOC,OAAO,OAAOQ,KAAK,SAGvCX,EAACL,EACC,CAAAO,MAAM,OACNC,OAAO,OACPQ,KAAK,OACLC,eAAe,SACff,WAAW,SACXQ,aAAcjB,EAAMkB,cAAcC,KAClCM,gBAAgB,uBACJ,YAAWf,SAEvBE,EAACc,GAAKC,KAAMC,EAAYjC,GAAOkC,KAAM,GAAIC,MAAM,aAGnDxB,EAACC,EAAG,CAACwB,UAAU,SAASvB,IAAK,EAC3BE,SAAA,CAAAJ,EAACC,EAAG,CAACC,IAAK,EACPE,SAAA,CAAAd,GACCU,EAAC0B,EAAM,CAACC,QAAQ,OAAOC,QAAS,IAAiB,cAAA,0BAC/CtB,EACE,QAAA,CAAAuB,QACA,EAAAC,KAAK,OACLC,GAAG,eACHzC,SA9CU0C,IAClB1C,GAAY0C,EAAEC,OAAOC,QACvB5C,EAAS0C,EAAEC,OAAOC,MAAM,IACxBF,EAAEC,OAAOE,MAAQ,GACnB,IA4CU7B,EAAC8B,EAA2B,CAC1BC,QAAQ,eACRC,QAASA,IAAM9C,MAEfY,SAAAE,EAACc,EAAI,CAACC,KAAK,aAAaE,KAAM,GAAIC,MAAO9B,EAAM6C,OAAOC,cAI5DlC,EAACoB,EAAO,CAAAC,QAAQ,OAAOC,QAAS,IAAKU,QAAS/C,EAC5Ca,SAAAE,EAACc,EAAI,CAACC,KAAK,cAAcE,KAAM,GAAIC,MAAO9B,EAAM6C,OAAOE,cAG3DzC,EAAC0C,EAAI,CAACnB,KAAK,QACRnB,SAAA,CAAAY,EAAY3B,GAAK,KAAIO,GAAc+C,EAAYtD,EAAKkC,cAGrD"}
1
+ {"version":3,"file":"file-image-preview.comp.js","sources":["../../../../../../src/components/forms/file/file-image-preview/file-image-preview.comp.tsx"],"sourcesContent":["import { useTheme } from 'styled-components'\n\nimport { Button } from '../../../buttons'\nimport { Icon } from '../../../icons'\nimport { Image } from '../../../images'\nimport { Box } from '../../../layout'\nimport { Text } from '../../../typography'\nimport * as DragNDropStyles from '../file.styles'\nimport {\n bytesToSize,\n getFileIcon,\n getFileName,\n isImageFile,\n} from '../file.utils'\nimport { useObjectUrl } from '../use-object-url'\n\nimport { FileImagePreviewProps } from './file-image-preview.types'\n\n/**\n * Miniatura de uma imagem enviada (arquivo ou URL), com ações de trocar e excluir.\n * Arquivo que não é imagem aparece como ícone. Normalmente vem pronto dentro do FileDropzone (`preview=\"image\"`).\n * @example <FileImagePreview file={foto} onDelete={remover} />\n */\nexport const FileImagePreview = ({\n file,\n onChange,\n onDelete,\n onClickInput,\n ...rest\n}: FileImagePreviewProps) => {\n const theme = useTheme()\n\n const fileIsLink = !(file instanceof File)\n\n const handleOnChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange && e.target.files) {\n onChange(e.target.files[0])\n e.target.value = ''\n }\n }\n\n const imageUrl = useObjectUrl(file)\n\n return (\n <Box gap={2} alignItems=\"center\" data-testid=\"file-image-preview\" {...rest}>\n {isImageFile(file) ? (\n imageUrl ? (\n <Image\n width=\"56px\"\n height=\"56px\"\n objectFit=\"cover\"\n borderRadius={theme.border_radius.card}\n src={imageUrl}\n alt={getFileName(file)}\n />\n ) : (\n <Box width=\"56px\" height=\"56px\" flex=\"none\" />\n )\n ) : (\n <Box\n width=\"56px\"\n height=\"56px\"\n flex=\"none\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius={theme.border_radius.card}\n backgroundColor=\"grey_5\"\n data-testid=\"file-icon\"\n >\n <Icon name={getFileIcon(file)} size={28} color=\"grey_2\" />\n </Box>\n )}\n <Box direction=\"column\" gap={1}>\n <Box gap={1}>\n {onChange && (\n <Button variant=\"text\" padding={'0'} data-testid=\"change-button\">\n <input\n hidden\n type=\"file\"\n id=\"fileToChange\"\n onChange={handleOnChange}\n />\n <DragNDropStyles.UpdateLabel\n htmlFor=\"fileToChange\"\n onClick={() => onClickInput?.()}\n >\n <Icon name=\"image_edit\" size={20} color={theme.colors.grey_1} />\n </DragNDropStyles.UpdateLabel>\n </Button>\n )}\n <Button variant=\"text\" padding={'0'} onClick={onDelete}>\n <Icon name=\"delete_bin7\" size={20} color={theme.colors.grey_2} />\n </Button>\n </Box>\n <Text size=\"small\">\n {getFileName(file)} {!fileIsLink && bytesToSize(file.size)}\n </Text>\n </Box>\n </Box>\n )\n}\n"],"names":["FileImagePreview","file","onChange","onDelete","onClickInput","rest","theme","useTheme","fileIsLink","File","imageUrl","useObjectUrl","_jsxs","Box","gap","alignItems","children","isImageFile","_jsx","Image","width","height","objectFit","borderRadius","border_radius","card","src","alt","getFileName","flex","justifyContent","backgroundColor","Icon","name","getFileIcon","size","color","direction","Button","variant","padding","hidden","type","id","e","target","files","value","DragNDropStyles","htmlFor","onClick","colors","grey_1","grey_2","Text","bytesToSize"],"mappings":"4kBAuBO,MAAMA,EAAmBA,EAC9BC,OACAC,WACAC,WACAC,kBACGC,MAEH,MAAMC,EAAQC,IAERC,IAAeP,aAAgBQ,MAS/BC,EAAWC,EAAaV,GAE9B,OACEW,EAACC,EAAG,CAACC,IAAK,EAAGC,WAAW,SAAQ,cAAa,wBAAyBV,EACnEW,SAAA,CAAAC,EAAYhB,GACXS,EACEQ,EAACC,EACC,CAAAC,MAAM,OACNC,OAAO,OACPC,UAAU,QACVC,aAAcjB,EAAMkB,cAAcC,KAClCC,IAAKhB,EACLiB,IAAKC,EAAY3B,KAGnBiB,EAACL,EAAG,CAACO,MAAM,OAAOC,OAAO,OAAOQ,KAAK,SAGvCX,EAACL,EACC,CAAAO,MAAM,OACNC,OAAO,OACPQ,KAAK,OACLC,eAAe,SACff,WAAW,SACXQ,aAAcjB,EAAMkB,cAAcC,KAClCM,gBAAgB,uBACJ,YAAWf,SAEvBE,EAACc,GAAKC,KAAMC,EAAYjC,GAAOkC,KAAM,GAAIC,MAAM,aAGnDxB,EAACC,EAAG,CAACwB,UAAU,SAASvB,IAAK,EAC3BE,SAAA,CAAAJ,EAACC,EAAG,CAACC,IAAK,EACPE,SAAA,CAAAd,GACCU,EAAC0B,EAAM,CAACC,QAAQ,OAAOC,QAAS,IAAiB,cAAA,0BAC/CtB,EACE,QAAA,CAAAuB,QACA,EAAAC,KAAK,OACLC,GAAG,eACHzC,SA9CU0C,IAClB1C,GAAY0C,EAAEC,OAAOC,QACvB5C,EAAS0C,EAAEC,OAAOC,MAAM,IACxBF,EAAEC,OAAOE,MAAQ,GACnB,IA4CU7B,EAAC8B,EAA2B,CAC1BC,QAAQ,eACRC,QAASA,IAAM9C,MAEfY,SAAAE,EAACc,EAAI,CAACC,KAAK,aAAaE,KAAM,GAAIC,MAAO9B,EAAM6C,OAAOC,cAI5DlC,EAACoB,EAAO,CAAAC,QAAQ,OAAOC,QAAS,IAAKU,QAAS/C,EAC5Ca,SAAAE,EAACc,EAAI,CAACC,KAAK,cAAcE,KAAM,GAAIC,MAAO9B,EAAM6C,OAAOE,cAG3DzC,EAAC0C,EAAI,CAACnB,KAAK,QACRnB,SAAA,CAAAY,EAAY3B,GAAK,KAAIO,GAAc+C,EAAYtD,EAAKkC,cAGrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-image-preview-list.comp.js","sources":["../../../../../../src/components/forms/file/file-image-preview-list/file-image-preview-list.comp.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { Text } from '../../../typography'\nimport { FileImagePreview } from '../file-image-preview/file-image-preview.comp'\n\nimport { FileImagePreviewListProps } from './file-image-preview-list.types'\n\nimport * as Styles from './file-image-preview-list.styles'\n\nexport const FileImagePreviewList = ({\n files,\n setFiles,\n onDelete,\n defaultFiles,\n onDeleteDefaultFile,\n ...rest\n}: FileImagePreviewListProps) => {\n const [fileToChange, setFileToChange] = useState<number | null>(null)\n\n const handleUpload = (file: File) => {\n const fileListCopy = [...files]\n if (fileToChange !== null) {\n fileListCopy[fileToChange] = file\n setFiles?.(fileListCopy)\n setFileToChange(null)\n }\n }\n\n return (\n <Styles.FileImageContainer\n data-testid=\"file-image-preview-list\"\n marginTop={1}\n width=\"100%\"\n {...rest}\n >\n {files.map((file, index) => (\n <FileImagePreview\n file={file}\n key={`image-preview-${index}`}\n onChange={(_file) => handleUpload(_file)}\n onClickInput={() => setFileToChange(index)}\n onDelete={() => onDelete?.([index])}\n />\n ))}\n\n {defaultFiles && defaultFiles.length > 0 && (\n <Styles.DefaultFilesContainer\n direction=\"column\"\n width=\"100%\"\n data-testid=\"default-files\"\n >\n <Text color=\"grey_2\" size=\"small\">\n Adicionados anteriormente\n </Text>\n\n <Styles.FileImageContainer marginTop={1}>\n {defaultFiles?.map((file, index) => (\n <FileImagePreview\n file={file}\n key={`default-image-preview-${index}`}\n onDelete={() => onDeleteDefaultFile?.(index)}\n />\n ))}\n </Styles.FileImageContainer>\n </Styles.DefaultFilesContainer>\n )}\n </Styles.FileImageContainer>\n )\n}\n"],"names":["FileImagePreviewList","files","setFiles","onDelete","defaultFiles","onDeleteDefaultFile","rest","fileToChange","setFileToChange","useState","_jsxs","Styles","marginTop","width","children","map","file","index","_jsx","FileImagePreview","onChange","_file","fileListCopy","handleUpload","onClickInput","length","direction","Text","color","size"],"mappings":"wUASO,MAAMA,EAAuBA,EAClCC,QACAC,WACAC,WACAC,eACAC,yBACGC,MAEH,MAAOC,EAAcC,GAAmBC,EAAwB,MAWhE,OACEC,EAACC,iBACa,0BACZC,UAAW,EACXC,MAAM,UACFP,EAEHQ,SAAA,CAAAb,EAAMc,KAAI,CAACC,EAAMC,IAChBC,EAACC,EACC,CAAAH,KAAMA,EAENI,SAAWC,GApBGL,KACpB,MAAMM,EAAe,IAAIrB,GACJ,OAAjBM,IACFe,EAAaf,GAAgBS,EAC7Bd,IAAWoB,GACXd,EAAgB,MAClB,EAc2Be,CAAaF,GAClCG,aAAcA,IAAMhB,EAAgBS,GACpCd,SAAUA,IAAMA,IAAW,CAACc,KAHvB,iBAAiBA,OAOzBb,GAAgBA,EAAaqB,OAAS,GACrCf,EAACC,EACC,CAAAe,UAAU,SACVb,MAAM,qBACM,gBAAeC,SAAA,CAE3BI,EAACS,GAAKC,MAAM,SAASC,KAAK,QAEnBf,SAAA,8BAEPI,EAACP,EAA0B,CAAAC,UAAW,EAACE,SACpCV,GAAcW,KAAI,CAACC,EAAMC,IACxBC,EAACC,EAAgB,CACfH,KAAMA,EAENb,SAAUA,IAAME,IAAsBY,IADR,yBAAAA,cAOd"}
1
+ {"version":3,"file":"file-image-preview-list.comp.js","sources":["../../../../../../src/components/forms/file/file-image-preview-list/file-image-preview-list.comp.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { Text } from '../../../typography'\nimport { FileImagePreview } from '../file-image-preview/file-image-preview.comp'\n\nimport { FileImagePreviewListProps } from './file-image-preview-list.types'\n\nimport * as Styles from './file-image-preview-list.styles'\n\n/**\n * Grade de miniaturas das imagens enviadas, com excluir em cada uma. `defaultFiles` mostra imagens que já estavam salvas (URLs).\n * Normalmente vem pronta dentro do FileDropzone com `multiple` e `preview=\"image\"`.\n * @example <FileImagePreviewList files={fotos} setFiles={setFotos} />\n */\nexport const FileImagePreviewList = ({\n files,\n setFiles,\n onDelete,\n defaultFiles,\n onDeleteDefaultFile,\n ...rest\n}: FileImagePreviewListProps) => {\n const [fileToChange, setFileToChange] = useState<number | null>(null)\n\n const handleUpload = (file: File) => {\n const fileListCopy = [...files]\n if (fileToChange !== null) {\n fileListCopy[fileToChange] = file\n setFiles?.(fileListCopy)\n setFileToChange(null)\n }\n }\n\n return (\n <Styles.FileImageContainer\n data-testid=\"file-image-preview-list\"\n marginTop={1}\n width=\"100%\"\n {...rest}\n >\n {files.map((file, index) => (\n <FileImagePreview\n file={file}\n key={`image-preview-${index}`}\n onChange={(_file) => handleUpload(_file)}\n onClickInput={() => setFileToChange(index)}\n onDelete={() => onDelete?.([index])}\n />\n ))}\n\n {defaultFiles && defaultFiles.length > 0 && (\n <Styles.DefaultFilesContainer\n direction=\"column\"\n width=\"100%\"\n data-testid=\"default-files\"\n >\n <Text color=\"grey_2\" size=\"small\">\n Adicionados anteriormente\n </Text>\n\n <Styles.FileImageContainer marginTop={1}>\n {defaultFiles?.map((file, index) => (\n <FileImagePreview\n file={file}\n key={`default-image-preview-${index}`}\n onDelete={() => onDeleteDefaultFile?.(index)}\n />\n ))}\n </Styles.FileImageContainer>\n </Styles.DefaultFilesContainer>\n )}\n </Styles.FileImageContainer>\n )\n}\n"],"names":["FileImagePreviewList","files","setFiles","onDelete","defaultFiles","onDeleteDefaultFile","rest","fileToChange","setFileToChange","useState","_jsxs","Styles","marginTop","width","children","map","file","index","_jsx","FileImagePreview","onChange","_file","fileListCopy","handleUpload","onClickInput","length","direction","Text","color","size"],"mappings":"wUAcO,MAAMA,EAAuBA,EAClCC,QACAC,WACAC,WACAC,eACAC,yBACGC,MAEH,MAAOC,EAAcC,GAAmBC,EAAwB,MAWhE,OACEC,EAACC,iBACa,0BACZC,UAAW,EACXC,MAAM,UACFP,EAEHQ,SAAA,CAAAb,EAAMc,KAAI,CAACC,EAAMC,IAChBC,EAACC,EACC,CAAAH,KAAMA,EAENI,SAAWC,GApBGL,KACpB,MAAMM,EAAe,IAAIrB,GACJ,OAAjBM,IACFe,EAAaf,GAAgBS,EAC7Bd,IAAWoB,GACXd,EAAgB,MAClB,EAc2Be,CAAaF,GAClCG,aAAcA,IAAMhB,EAAgBS,GACpCd,SAAUA,IAAMA,IAAW,CAACc,KAHvB,iBAAiBA,OAOzBb,GAAgBA,EAAaqB,OAAS,GACrCf,EAACC,EACC,CAAAe,UAAU,SACVb,MAAM,qBACM,gBAAeC,SAAA,CAE3BI,EAACS,GAAKC,MAAM,SAASC,KAAK,QAEnBf,SAAA,8BAEPI,EAACP,EAA0B,CAAAC,UAAW,EAACE,SACpCV,GAAcW,KAAI,CAACC,EAAMC,IACxBC,EAACC,EAAgB,CACfH,KAAMA,EAENb,SAAUA,IAAME,IAAsBY,IADR,yBAAAA,cAOd"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-preview-list.comp.js","sources":["../../../../../../src/components/forms/file/file-preview-list/file-preview-list.comp.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport { useTheme } from 'styled-components'\n\nimport { Button } from '../../../buttons'\nimport { Box } from '../../../layout'\nimport { Text } from '../../../typography'\nimport { FilePreview } from '../file-preview/file-preview.comp'\n\nimport { FilePreviewListProps } from './file-preview-list.types'\n\nimport * as Styles from './file-preview-list.styles'\n\nexport const FilePreviewList = ({\n files,\n showImages = false,\n setFiles,\n onDelete,\n defaultFiles,\n onDeleteDefaultFile,\n ...rest\n}: FilePreviewListProps) => {\n const theme = useTheme()\n const [selectedFiles, setSelectedFiles] = useState<number[]>([])\n const [fileToChange, setFileToChange] = useState<number | null>(null)\n\n const handleToggleSelect = (index: number) => {\n let newSelectedFiles: number[] = selectedFiles\n if (selectedFiles.includes(index)) {\n newSelectedFiles = selectedFiles.filter(\n (selectedFiles) => selectedFiles !== index,\n )\n } else {\n newSelectedFiles = [...selectedFiles, index]\n }\n setSelectedFiles(newSelectedFiles)\n }\n\n const handleUpload = (file: File) => {\n const fileListCopy = [...files]\n if (fileToChange !== null) {\n fileListCopy[fileToChange] = file\n setFiles?.(fileListCopy)\n setFileToChange(null)\n }\n }\n\n useEffect(() => {\n setSelectedFiles([])\n }, [onDelete])\n\n return (\n <Styles.FileListPreviewContainer\n data-testid=\"file-list-preview\"\n width=\"100%\"\n {...rest}\n >\n {files.length > 0 && (\n <Box gap={2} alignItems=\"center\" marginTop={2}>\n <Text size=\"small\" color={theme.colors.grey_2}>\n {selectedFiles.length ?? 0} selecionados\n </Text>\n {selectedFiles.length > 0 && (\n <Button\n fontSize={theme.typography.body_size.small}\n variant=\"text\"\n padding=\"0\"\n color={theme.colors.grey_1}\n onClick={() => selectedFiles && onDelete?.(selectedFiles)}\n disabled={selectedFiles.length === 0}\n >\n Deletar\n </Button>\n )}\n </Box>\n )}\n\n {files.map((file, index) => (\n <FilePreview\n file={file}\n key={`file-preview-${index}`}\n onChange={handleUpload}\n onClickInput={() => setFileToChange(index)}\n selectable\n isSelected={selectedFiles.includes(index)}\n onSelect={() => handleToggleSelect(index)}\n onDelete={() => onDelete?.([index])}\n showImage={showImages}\n />\n ))}\n\n {defaultFiles && defaultFiles.length > 0 && (\n <Styles.DefaultFilesContainer\n direction=\"column\"\n marginTop={2}\n width=\"100%\"\n paddingY={2}\n gap={1}\n data-testid=\"default-files\"\n >\n <Text size=\"small\" color={theme.colors.grey_2}>\n Adicionados anteriormente\n </Text>\n {defaultFiles?.map((file, index) => {\n return (\n <FilePreview\n file={file}\n onDelete={() => onDeleteDefaultFile?.(index)}\n showImage={showImages}\n key={`default-file-${index}`}\n />\n )\n })}\n </Styles.DefaultFilesContainer>\n )}\n </Styles.FileListPreviewContainer>\n )\n}\n"],"names":["FilePreviewList","files","showImages","setFiles","onDelete","defaultFiles","onDeleteDefaultFile","rest","theme","useTheme","selectedFiles","setSelectedFiles","useState","fileToChange","setFileToChange","handleUpload","file","fileListCopy","useEffect","_jsxs","Styles","width","children","length","Box","gap","alignItems","marginTop","Text","size","color","colors","grey_2","_jsx","Button","fontSize","typography","body_size","small","variant","padding","grey_1","onClick","disabled","map","index","FilePreview","onChange","onClickInput","selectable","isSelected","includes","onSelect","newSelectedFiles","filter","handleToggleSelect","showImage","direction","paddingY"],"mappings":"yeAaO,MAAMA,EAAkBA,EAC7BC,QACAC,cAAa,EACbC,WACAC,WACAC,eACAC,yBACGC,MAEH,MAAMC,EAAQC,KACPC,EAAeC,GAAoBC,EAAmB,KACtDC,EAAcC,GAAmBF,EAAwB,MAc1DG,EAAgBC,IACpB,MAAMC,EAAe,IAAIhB,GACJ,OAAjBY,IACFI,EAAaJ,GAAgBG,EAC7Bb,IAAWc,GACXH,EAAgB,MAClB,EAOF,OAJAI,GAAU,KACRP,EAAiB,GAAG,GACnB,CAACP,IAGFe,EAACC,EAA+B,CAAA,cAClB,oBACZC,MAAM,UACFd,EAAIe,SAAA,CAEPrB,EAAMsB,OAAS,GACdJ,EAACK,EAAG,CAACC,IAAK,EAAGC,WAAW,SAASC,UAAW,EAACL,SAAA,CAC3CH,EAACS,EAAK,CAAAC,KAAK,QAAQC,MAAOtB,EAAMuB,OAAOC,OACpCV,SAAA,CAAAZ,EAAca,QAAU,EACpB,mBACNb,EAAca,OAAS,GACtBU,EAACC,EACC,CAAAC,SAAU3B,EAAM4B,WAAWC,UAAUC,MACrCC,QAAQ,OACRC,QAAQ,IACRV,MAAOtB,EAAMuB,OAAOU,OACpBC,QAASA,IAAMhC,GAAiBN,IAAWM,GAC3CiC,SAAmC,IAAzBjC,EAAca,OAGjBD,SAAA,eAKdrB,EAAM2C,KAAI,CAAC5B,EAAM6B,IAChBZ,EAACa,EACC,CAAA9B,KAAMA,EAEN+B,SAAUhC,EACViC,aAAcA,IAAMlC,EAAgB+B,GACpCI,YACA,EAAAC,WAAYxC,EAAcyC,SAASN,GACnCO,SAAUA,IA3DUP,KAC1B,IAAIQ,EAA6B3C,EAE/B2C,EADE3C,EAAcyC,SAASN,GACNnC,EAAc4C,QAC9B5C,GAAkBA,IAAkBmC,IAGpB,IAAInC,EAAemC,GAExClC,EAAiB0C,EAAiB,EAkDZE,CAAmBV,GACnCzC,SAAUA,IAAMA,IAAW,CAACyC,IAC5BW,UAAWtD,GAPN,gBAAgB2C,OAWxBxC,GAAgBA,EAAakB,OAAS,GACrCJ,EAACC,EACC,CAAAqC,UAAU,SACV9B,UAAW,EACXN,MAAM,OACNqC,SAAU,EACVjC,IAAK,EAAC,cACM,gBAAeH,SAAA,CAE3BW,EAACL,EAAK,CAAAC,KAAK,QAAQC,MAAOtB,EAAMuB,OAAOC,OAEhCV,SAAA,8BACNjB,GAAcuC,KAAI,CAAC5B,EAAM6B,IAEtBZ,EAACa,EAAW,CACV9B,KAAMA,EACNZ,SAAUA,IAAME,IAAsBuC,GACtCW,UAAWtD,GACN,gBAAgB2C,YAMC"}
1
+ {"version":3,"file":"file-preview-list.comp.js","sources":["../../../../../../src/components/forms/file/file-preview-list/file-preview-list.comp.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport { useTheme } from 'styled-components'\n\nimport { Button } from '../../../buttons'\nimport { Box } from '../../../layout'\nimport { Text } from '../../../typography'\nimport { FilePreview } from '../file-preview/file-preview.comp'\n\nimport { FilePreviewListProps } from './file-preview-list.types'\n\nimport * as Styles from './file-preview-list.styles'\n\n/**\n * Lista dos arquivos enviados, com nome, ícone do tipo e excluir. `defaultFiles` mostra arquivos que já estavam salvos (URLs).\n * Normalmente vem pronta dentro do FileDropzone com `multiple` e `preview=\"list\"`.\n * @example <FilePreviewList files={arquivos} setFiles={setArquivos} />\n */\nexport const FilePreviewList = ({\n files,\n showImages = false,\n setFiles,\n onDelete,\n defaultFiles,\n onDeleteDefaultFile,\n ...rest\n}: FilePreviewListProps) => {\n const theme = useTheme()\n const [selectedFiles, setSelectedFiles] = useState<number[]>([])\n const [fileToChange, setFileToChange] = useState<number | null>(null)\n\n const handleToggleSelect = (index: number) => {\n let newSelectedFiles: number[] = selectedFiles\n if (selectedFiles.includes(index)) {\n newSelectedFiles = selectedFiles.filter(\n (selectedFiles) => selectedFiles !== index,\n )\n } else {\n newSelectedFiles = [...selectedFiles, index]\n }\n setSelectedFiles(newSelectedFiles)\n }\n\n const handleUpload = (file: File) => {\n const fileListCopy = [...files]\n if (fileToChange !== null) {\n fileListCopy[fileToChange] = file\n setFiles?.(fileListCopy)\n setFileToChange(null)\n }\n }\n\n useEffect(() => {\n setSelectedFiles([])\n }, [onDelete])\n\n return (\n <Styles.FileListPreviewContainer\n data-testid=\"file-list-preview\"\n width=\"100%\"\n {...rest}\n >\n {files.length > 0 && (\n <Box gap={2} alignItems=\"center\" marginTop={2}>\n <Text size=\"small\" color={theme.colors.grey_2}>\n {selectedFiles.length ?? 0} selecionados\n </Text>\n {selectedFiles.length > 0 && (\n <Button\n fontSize={theme.typography.body_size.small}\n variant=\"text\"\n padding=\"0\"\n color={theme.colors.grey_1}\n onClick={() => selectedFiles && onDelete?.(selectedFiles)}\n disabled={selectedFiles.length === 0}\n >\n Deletar\n </Button>\n )}\n </Box>\n )}\n\n {files.map((file, index) => (\n <FilePreview\n file={file}\n key={`file-preview-${index}`}\n onChange={handleUpload}\n onClickInput={() => setFileToChange(index)}\n selectable\n isSelected={selectedFiles.includes(index)}\n onSelect={() => handleToggleSelect(index)}\n onDelete={() => onDelete?.([index])}\n showImage={showImages}\n />\n ))}\n\n {defaultFiles && defaultFiles.length > 0 && (\n <Styles.DefaultFilesContainer\n direction=\"column\"\n marginTop={2}\n width=\"100%\"\n paddingY={2}\n gap={1}\n data-testid=\"default-files\"\n >\n <Text size=\"small\" color={theme.colors.grey_2}>\n Adicionados anteriormente\n </Text>\n {defaultFiles?.map((file, index) => {\n return (\n <FilePreview\n file={file}\n onDelete={() => onDeleteDefaultFile?.(index)}\n showImage={showImages}\n key={`default-file-${index}`}\n />\n )\n })}\n </Styles.DefaultFilesContainer>\n )}\n </Styles.FileListPreviewContainer>\n )\n}\n"],"names":["FilePreviewList","files","showImages","setFiles","onDelete","defaultFiles","onDeleteDefaultFile","rest","theme","useTheme","selectedFiles","setSelectedFiles","useState","fileToChange","setFileToChange","handleUpload","file","fileListCopy","useEffect","_jsxs","Styles","width","children","length","Box","gap","alignItems","marginTop","Text","size","color","colors","grey_2","_jsx","Button","fontSize","typography","body_size","small","variant","padding","grey_1","onClick","disabled","map","index","FilePreview","onChange","onClickInput","selectable","isSelected","includes","onSelect","newSelectedFiles","filter","handleToggleSelect","showImage","direction","paddingY"],"mappings":"yeAkBO,MAAMA,EAAkBA,EAC7BC,QACAC,cAAa,EACbC,WACAC,WACAC,eACAC,yBACGC,MAEH,MAAMC,EAAQC,KACPC,EAAeC,GAAoBC,EAAmB,KACtDC,EAAcC,GAAmBF,EAAwB,MAc1DG,EAAgBC,IACpB,MAAMC,EAAe,IAAIhB,GACJ,OAAjBY,IACFI,EAAaJ,GAAgBG,EAC7Bb,IAAWc,GACXH,EAAgB,MAClB,EAOF,OAJAI,GAAU,KACRP,EAAiB,GAAG,GACnB,CAACP,IAGFe,EAACC,EAA+B,CAAA,cAClB,oBACZC,MAAM,UACFd,EAAIe,SAAA,CAEPrB,EAAMsB,OAAS,GACdJ,EAACK,EAAG,CAACC,IAAK,EAAGC,WAAW,SAASC,UAAW,EAACL,SAAA,CAC3CH,EAACS,EAAK,CAAAC,KAAK,QAAQC,MAAOtB,EAAMuB,OAAOC,OACpCV,SAAA,CAAAZ,EAAca,QAAU,EACpB,mBACNb,EAAca,OAAS,GACtBU,EAACC,EACC,CAAAC,SAAU3B,EAAM4B,WAAWC,UAAUC,MACrCC,QAAQ,OACRC,QAAQ,IACRV,MAAOtB,EAAMuB,OAAOU,OACpBC,QAASA,IAAMhC,GAAiBN,IAAWM,GAC3CiC,SAAmC,IAAzBjC,EAAca,OAGjBD,SAAA,eAKdrB,EAAM2C,KAAI,CAAC5B,EAAM6B,IAChBZ,EAACa,EACC,CAAA9B,KAAMA,EAEN+B,SAAUhC,EACViC,aAAcA,IAAMlC,EAAgB+B,GACpCI,YACA,EAAAC,WAAYxC,EAAcyC,SAASN,GACnCO,SAAUA,IA3DUP,KAC1B,IAAIQ,EAA6B3C,EAE/B2C,EADE3C,EAAcyC,SAASN,GACNnC,EAAc4C,QAC9B5C,GAAkBA,IAAkBmC,IAGpB,IAAInC,EAAemC,GAExClC,EAAiB0C,EAAiB,EAkDZE,CAAmBV,GACnCzC,SAAUA,IAAMA,IAAW,CAACyC,IAC5BW,UAAWtD,GAPN,gBAAgB2C,OAWxBxC,GAAgBA,EAAakB,OAAS,GACrCJ,EAACC,EACC,CAAAqC,UAAU,SACV9B,UAAW,EACXN,MAAM,OACNqC,SAAU,EACVjC,IAAK,EAAC,cACM,gBAAeH,SAAA,CAE3BW,EAACL,EAAK,CAAAC,KAAK,QAAQC,MAAOtB,EAAMuB,OAAOC,OAEhCV,SAAA,8BACNjB,GAAcuC,KAAI,CAAC5B,EAAM6B,IAEtBZ,EAACa,EAAW,CACV9B,KAAMA,EACNZ,SAAUA,IAAME,IAAsBuC,GACtCW,UAAWtD,GACN,gBAAgB2C,YAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon.comp.js","sources":["../../../../../src/components/icons/icon/icon.comp.tsx"],"sourcesContent":["import React, { useContext, useId } from 'react'\n\nimport * as LucideIcon from 'react-icons/lu'\nimport * as RemixIcon from 'react-icons/ri'\nimport { ThemeContext } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme/theme.util'\n\nimport { IconProps, CustomIconName } from './icon.types'\nimport {\n isLucideName,\n parseIconNameToLucide,\n parseIconNameToRemixIcon,\n} from './icon.utils'\nimport { iconsList } from './svg'\n\nimport * as Styles from './icon.styles'\n\nexport const Icon = ({\n color,\n name,\n size = 24,\n fill: fillProp,\n defs: defsProp,\n gradient,\n ...props\n}: IconProps) => {\n const theme = useContext(ThemeContext)\n const gradientId = `bf-icon-gradient-${useId().replace(/:/g, '')}`\n\n const fill = gradient ? `url(#${gradientId})` : fillProp\n const defs = gradient ? (\n <defs>\n <linearGradient id={gradientId} x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={getThemeColor('secondary', theme)} />\n <stop offset=\"100%\" stopColor={getThemeColor('primary', theme)} />\n </linearGradient>\n </defs>\n ) : (\n defsProp\n )\n\n const customIcon = iconsList(\n gradient\n ? `url(#${gradientId})`\n : getThemeColor(color ? color : 'primary', theme),\n size,\n )[name as CustomIconName]\n\n if (customIcon) {\n if (gradient) {\n return (\n <Styles.IconComp data-testid=\"icon\">\n <Styles.HiddenDefs aria-hidden=\"true\">{defs}</Styles.HiddenDefs>\n {customIcon}\n </Styles.IconComp>\n )\n }\n if (defs && React.isValidElement(customIcon)) {\n const children = (customIcon as React.ReactElement).props.children\n return (\n <Styles.IconComp data-testid=\"icon\">\n {React.cloneElement(customIcon, {}, [\n defs,\n ...(Array.isArray(children)\n ? children\n : children\n ? [children]\n : []),\n ])}\n </Styles.IconComp>\n )\n }\n return <Styles.IconComp data-testid=\"icon\">{customIcon}</Styles.IconComp>\n }\n\n if (isLucideName(name)) {\n const lucideIcon = LucideIcon[parseIconNameToLucide(name)]\n\n if (!lucideIcon) {\n return null\n }\n\n // Lucide desenha com traço: o gradiente (ou `fill` com `defs`) pinta o `stroke`.\n if (defs && fill) {\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n <Styles.HiddenDefs aria-hidden=\"true\">{defs}</Styles.HiddenDefs>\n {React.createElement(lucideIcon, { size, stroke: fill })}\n </Styles.IconComp>\n )\n }\n\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n {React.createElement(lucideIcon, {\n color: getThemeColor(color ? color : 'primary', theme) || color,\n size,\n })}\n </Styles.IconComp>\n )\n }\n\n const remixIcon = RemixIcon[parseIconNameToRemixIcon(name as string)]\n\n if (!remixIcon) {\n return null\n }\n\n if (defs && fill) {\n return (\n <Styles.IconComp data-testid=\"icon\">\n <svg\n width={`${size}px`}\n height={`${size}px`}\n viewBox={`0 0 ${size} ${size}`}\n fill={fill}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {defs}\n {React.createElement(remixIcon, {\n size: size,\n fill: fill,\n style: { position: 'relative', zIndex: 1 },\n })}\n </svg>\n </Styles.IconComp>\n )\n }\n\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n {React.createElement(remixIcon, {\n color: getThemeColor(color ? color : 'primary', theme) || color,\n size: size,\n })}\n </Styles.IconComp>\n )\n}\n"],"names":["Icon","color","name","size","fill","fillProp","defs","defsProp","gradient","props","theme","useContext","ThemeContext","gradientId","useId","replace","_jsx","children","_jsxs","id","x1","y1","x2","y2","offset","stopColor","getThemeColor","customIcon","iconsList","Styles","React","isValidElement","cloneElement","Array","isArray","isLucideName","lucideIcon","LucideIcon","parseIconNameToLucide","createElement","stroke","remixIcon","RemixIcon","parseIconNameToRemixIcon","width","height","viewBox","xmlns","style","position","zIndex"],"mappings":"keAkBO,MAAMA,EAAOA,EAClBC,QACAC,OACAC,OAAO,GACPC,KAAMC,EACNC,KAAMC,EACNC,cACGC,MAEH,MAAMC,EAAQC,EAAWC,GACnBC,EAAiC,oBAAAC,IAAQC,QAAQ,KAAM,MAEvDX,EAAOI,EAAmB,QAAAK,KAAgBR,EAC1CC,EAAOE,EACXQ,EAAA,OAAA,CAAAC,SACEC,EAAgB,iBAAA,CAAAC,GAAIN,EAAYO,GAAG,IAAIC,GAAG,IAAIC,GAAG,IAAIC,GAAG,IACtDN,SAAA,CAAAD,EAAA,OAAA,CAAMQ,OAAO,KAAKC,UAAWC,EAAc,YAAahB,KACxDM,EAAM,OAAA,CAAAQ,OAAO,OAAOC,UAAWC,EAAc,UAAWhB,UAI5DH,EAGIoB,EAAaC,EACjBpB,EACY,QAAAK,KACRa,EAAczB,GAAgB,UAAWS,GAC7CP,GACAD,GAEF,GAAIyB,EAAY,CACd,GAAInB,EACF,OACEU,EAACW,EAA4B,CAAA,cAAA,iBAC3Bb,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAX,IACtCqB,KAIP,GAAIrB,GAAQwB,EAAMC,eAAeJ,GAAa,CAC5C,MAAMV,EAAYU,EAAkClB,MAAMQ,SAC1D,OACED,EAACa,EAA4B,CAAA,cAAA,OAC1BZ,SAAAa,EAAME,aAAaL,EAAY,CAAE,EAAE,CAClCrB,KACI2B,MAAMC,QAAQjB,GACdA,EACAA,EACE,CAACA,GACD,MAId,CACA,OAAOD,EAACa,iBAA4B,OAAMZ,SAAEU,GAC9C,CAEA,GAAIQ,EAAajC,GAAO,CACtB,MAAMkC,EAAaC,EAAWC,EAAsBpC,IAEpD,OAAKkC,EAKD9B,GAAQF,EAERc,EAACW,iBAA4B,UAAWpB,EAAKQ,SAAA,CAC3CD,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAX,IACtCwB,EAAMS,cAAcH,EAAY,CAAEjC,OAAMqC,OAAQpC,OAMrDY,EAACa,EAA4B,CAAA,cAAA,UAAWpB,WACrCqB,EAAMS,cAAcH,EAAY,CAC/BnC,MAAOyB,EAAczB,GAAgB,UAAWS,IAAUT,EAC1DE,WAjBG,IAqBX,CAEA,MAAMsC,EAAYC,EAAUC,EAAyBzC,IAErD,OAAKuC,EAMDzB,EAACa,EAFDvB,GAAQF,EAEqB,CAAA,cAAA,gBAC3Bc,EACE,MAAA,CAAA0B,MAAU,GAAAzC,MACV0C,OAAW,GAAA1C,MACX2C,QAAgB,OAAA3C,KAAQA,IACxBC,KAAMA,EACN2C,MAAM,6BAA4B9B,SAAA,CAEjCX,EACAwB,EAAMS,cAAcE,EAAW,CAC9BtC,KAAMA,EACNC,KAAMA,EACN4C,MAAO,CAAEC,SAAU,WAAYC,OAAQ,SAQlB,CAAA,cAAA,UAAWzC,WACrCqB,EAAMS,cAAcE,EAAW,CAC9BxC,MAAOyB,EAAczB,GAAgB,UAAWS,IAAUT,EAC1DE,KAAMA,MA5BH,IA8BW"}
1
+ {"version":3,"file":"icon.comp.js","sources":["../../../../../src/components/icons/icon/icon.comp.tsx"],"sourcesContent":["import React, { useContext, useId } from 'react'\n\nimport * as LucideIcon from 'react-icons/lu'\nimport * as RemixIcon from 'react-icons/ri'\nimport { ThemeContext } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme/theme.util'\n\nimport { IconProps, CustomIconName } from './icon.types'\nimport {\n isLucideName,\n parseIconNameToLucide,\n parseIconNameToRemixIcon,\n} from './icon.utils'\nimport { iconsList } from './svg'\n\nimport * as Styles from './icon.styles'\n\n/**\n * Ícone da biblioteca do DS pelo nome: ícones próprios da Blockforce, Remix e Lucide (`lu:nome`).\n * `color` usa as cores do tema e `gradient` pinta com o gradiente da marca. A lista de nomes está em `lib/ai/icons.txt`.\n * Para ícone clicável use IconButton; para ícone dentro de uma caixinha use IconBox.\n * @example <Icon name=\"leaf\" size={20} color=\"primary\" />\n */\nexport const Icon = ({\n color,\n name,\n size = 24,\n fill: fillProp,\n defs: defsProp,\n gradient,\n ...props\n}: IconProps) => {\n const theme = useContext(ThemeContext)\n const gradientId = `bf-icon-gradient-${useId().replace(/:/g, '')}`\n\n const fill = gradient ? `url(#${gradientId})` : fillProp\n const defs = gradient ? (\n <defs>\n <linearGradient id={gradientId} x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={getThemeColor('secondary', theme)} />\n <stop offset=\"100%\" stopColor={getThemeColor('primary', theme)} />\n </linearGradient>\n </defs>\n ) : (\n defsProp\n )\n\n const customIcon = iconsList(\n gradient\n ? `url(#${gradientId})`\n : getThemeColor(color ? color : 'primary', theme),\n size,\n )[name as CustomIconName]\n\n if (customIcon) {\n if (gradient) {\n return (\n <Styles.IconComp data-testid=\"icon\">\n <Styles.HiddenDefs aria-hidden=\"true\">{defs}</Styles.HiddenDefs>\n {customIcon}\n </Styles.IconComp>\n )\n }\n if (defs && React.isValidElement(customIcon)) {\n const children = (customIcon as React.ReactElement).props.children\n return (\n <Styles.IconComp data-testid=\"icon\">\n {React.cloneElement(customIcon, {}, [\n defs,\n ...(Array.isArray(children)\n ? children\n : children\n ? [children]\n : []),\n ])}\n </Styles.IconComp>\n )\n }\n return <Styles.IconComp data-testid=\"icon\">{customIcon}</Styles.IconComp>\n }\n\n if (isLucideName(name)) {\n const lucideIcon = LucideIcon[parseIconNameToLucide(name)]\n\n if (!lucideIcon) {\n return null\n }\n\n // Lucide desenha com traço: o gradiente (ou `fill` com `defs`) pinta o `stroke`.\n if (defs && fill) {\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n <Styles.HiddenDefs aria-hidden=\"true\">{defs}</Styles.HiddenDefs>\n {React.createElement(lucideIcon, { size, stroke: fill })}\n </Styles.IconComp>\n )\n }\n\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n {React.createElement(lucideIcon, {\n color: getThemeColor(color ? color : 'primary', theme) || color,\n size,\n })}\n </Styles.IconComp>\n )\n }\n\n const remixIcon = RemixIcon[parseIconNameToRemixIcon(name as string)]\n\n if (!remixIcon) {\n return null\n }\n\n if (defs && fill) {\n return (\n <Styles.IconComp data-testid=\"icon\">\n <svg\n width={`${size}px`}\n height={`${size}px`}\n viewBox={`0 0 ${size} ${size}`}\n fill={fill}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {defs}\n {React.createElement(remixIcon, {\n size: size,\n fill: fill,\n style: { position: 'relative', zIndex: 1 },\n })}\n </svg>\n </Styles.IconComp>\n )\n }\n\n return (\n <Styles.IconComp data-testid=\"icon\" {...props}>\n {React.createElement(remixIcon, {\n color: getThemeColor(color ? color : 'primary', theme) || color,\n size: size,\n })}\n </Styles.IconComp>\n )\n}\n"],"names":["Icon","color","name","size","fill","fillProp","defs","defsProp","gradient","props","theme","useContext","ThemeContext","gradientId","useId","replace","_jsx","children","_jsxs","id","x1","y1","x2","y2","offset","stopColor","getThemeColor","customIcon","iconsList","Styles","React","isValidElement","cloneElement","Array","isArray","isLucideName","lucideIcon","LucideIcon","parseIconNameToLucide","createElement","stroke","remixIcon","RemixIcon","parseIconNameToRemixIcon","width","height","viewBox","xmlns","style","position","zIndex"],"mappings":"keAwBO,MAAMA,EAAOA,EAClBC,QACAC,OACAC,OAAO,GACPC,KAAMC,EACNC,KAAMC,EACNC,cACGC,MAEH,MAAMC,EAAQC,EAAWC,GACnBC,EAAiC,oBAAAC,IAAQC,QAAQ,KAAM,MAEvDX,EAAOI,EAAmB,QAAAK,KAAgBR,EAC1CC,EAAOE,EACXQ,EAAA,OAAA,CAAAC,SACEC,EAAgB,iBAAA,CAAAC,GAAIN,EAAYO,GAAG,IAAIC,GAAG,IAAIC,GAAG,IAAIC,GAAG,IACtDN,SAAA,CAAAD,EAAA,OAAA,CAAMQ,OAAO,KAAKC,UAAWC,EAAc,YAAahB,KACxDM,EAAM,OAAA,CAAAQ,OAAO,OAAOC,UAAWC,EAAc,UAAWhB,UAI5DH,EAGIoB,EAAaC,EACjBpB,EACY,QAAAK,KACRa,EAAczB,GAAgB,UAAWS,GAC7CP,GACAD,GAEF,GAAIyB,EAAY,CACd,GAAInB,EACF,OACEU,EAACW,EAA4B,CAAA,cAAA,iBAC3Bb,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAX,IACtCqB,KAIP,GAAIrB,GAAQwB,EAAMC,eAAeJ,GAAa,CAC5C,MAAMV,EAAYU,EAAkClB,MAAMQ,SAC1D,OACED,EAACa,EAA4B,CAAA,cAAA,OAC1BZ,SAAAa,EAAME,aAAaL,EAAY,CAAE,EAAE,CAClCrB,KACI2B,MAAMC,QAAQjB,GACdA,EACAA,EACE,CAACA,GACD,MAId,CACA,OAAOD,EAACa,iBAA4B,OAAMZ,SAAEU,GAC9C,CAEA,GAAIQ,EAAajC,GAAO,CACtB,MAAMkC,EAAaC,EAAWC,EAAsBpC,IAEpD,OAAKkC,EAKD9B,GAAQF,EAERc,EAACW,iBAA4B,UAAWpB,EAAKQ,SAAA,CAC3CD,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAX,IACtCwB,EAAMS,cAAcH,EAAY,CAAEjC,OAAMqC,OAAQpC,OAMrDY,EAACa,EAA4B,CAAA,cAAA,UAAWpB,WACrCqB,EAAMS,cAAcH,EAAY,CAC/BnC,MAAOyB,EAAczB,GAAgB,UAAWS,IAAUT,EAC1DE,WAjBG,IAqBX,CAEA,MAAMsC,EAAYC,EAAUC,EAAyBzC,IAErD,OAAKuC,EAMDzB,EAACa,EAFDvB,GAAQF,EAEqB,CAAA,cAAA,gBAC3Bc,EACE,MAAA,CAAA0B,MAAU,GAAAzC,MACV0C,OAAW,GAAA1C,MACX2C,QAAgB,OAAA3C,KAAQA,IACxBC,KAAMA,EACN2C,MAAM,6BAA4B9B,SAAA,CAEjCX,EACAwB,EAAMS,cAAcE,EAAW,CAC9BtC,KAAMA,EACNC,KAAMA,EACN4C,MAAO,CAAEC,SAAU,WAAYC,OAAQ,SAQlB,CAAA,cAAA,UAAWzC,WACrCqB,EAAMS,cAAcE,EAAW,CAC9BxC,MAAOyB,EAAczB,GAAgB,UAAWS,IAAUT,EAC1DE,KAAMA,MA5BH,IA8BW"}
@@ -1,4 +1,4 @@
1
- import{styled as r,css as e}from"styled-components";import{Box as t}from"../box/box.comp.js";const o=r(t)`
1
+ import{styled as r,css as e}from"styled-components";import{Box as t}from"../box/box.comp.js";import{thinScrollbar as o}from"../../../theme/scrollbar.js";const i=r(t)`
2
2
  position: fixed;
3
3
  top: 0;
4
4
  left: 0;
@@ -11,7 +11,7 @@ import{styled as r,css as e}from"styled-components";import{Box as t}from"../box/
11
11
  transition:
12
12
  opacity 0.3s ease,
13
13
  visibility 0.3s ease;
14
- `,i=r(t).attrs((({$transform:r})=>({style:{transform:r}})))`
14
+ `,a=r(t).attrs((({$transform:r})=>({style:{transform:r}})))`
15
15
  position: absolute;
16
16
  background-color: transparent;
17
17
  transition: transform 0.3s ease;
@@ -52,7 +52,7 @@ import{styled as r,css as e}from"styled-components";import{Box as t}from"../box/
52
52
  border-radius: 1rem 1rem 0 0;
53
53
  box-shadow: ${i.shadow.lg};
54
54
  `}}}
55
- `,a=r(t)`
55
+ `,s=r(t)`
56
56
  position: sticky;
57
57
  top: 0;
58
58
  flex-shrink: 0;
@@ -77,17 +77,19 @@ import{styled as r,css as e}from"styled-components";import{Box as t}from"../box/
77
77
  width: 100%;
78
78
  border-radius: 1rem 1rem 0 0;
79
79
  `}}};
80
- `,s=r(t)`
80
+ `,n=r(t)`
81
81
  width: 100%;
82
82
  height: 100%;
83
83
  flex: 1;
84
84
  overflow: auto;
85
+ ${o}
85
86
  flex-direction: column;
86
87
  background-color: ${({theme:r})=>r.colors.white};
87
88
  & > div {
88
89
  overflow: auto;
90
+ ${o}
89
91
  display: flex;
90
92
  flex-direction: column;
91
93
  }
92
- `,n=r(t).attrs((({$dragging:r})=>({style:{cursor:r?"grabbing":"grab",transition:r?"none":"transform 0.2s ease"}})))``;export{n as DragArea,a as DrawerButton,s as DrawerChildren,i as DrawerContainer,o as Overlay};
94
+ `,d=r(t).attrs((({$dragging:r})=>({style:{cursor:r?"grabbing":"grab",transition:r?"none":"transform 0.2s ease"}})))``;export{d as DragArea,s as DrawerButton,n as DrawerChildren,a as DrawerContainer,i as Overlay};
93
95
  //# sourceMappingURL=drawer.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.styles.js","sources":["../../../../../src/components/layout/drawer/drawer.styles.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { Box } from '../box'\n\nexport const Overlay = styled(Box)<{\n open: boolean\n}>`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n z-index: ${({ theme }) => theme.zIndex?.drawer ?? 1100};\n opacity: ${({ open }) => (open ? 1 : 0)};\n visibility: ${({ open }) => (open ? 'visible' : 'hidden')};\n transition:\n opacity 0.3s ease,\n visibility 0.3s ease;\n`\n\nexport const DrawerContainer = styled(Box).attrs<{ $transform?: string }>(\n ({ $transform }) => ({ style: { transform: $transform } }),\n)<{\n open: boolean\n $anchor?: 'left' | 'right' | 'top' | 'bottom'\n height?: string | number\n}>`\n position: absolute;\n background-color: transparent;\n transition: transform 0.3s ease;\n cursor: pointer;\n max-width: 100%;\n box-sizing: border-box;\n\n ${({ open, $anchor, height, theme }) => {\n switch ($anchor) {\n case 'left':\n return css`\n top: 0;\n left: 0;\n height: 100%;\n width: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateX(0)' : 'translateX(-100%)'};\n border-radius: 0 1rem 1rem 0;\n box-shadow: ${theme.shadow.lg};\n `\n case 'right':\n return css`\n top: 0;\n right: 0;\n height: 100%;\n width: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateX(0)' : 'translateX(100%)'};\n border-radius: 1rem 0 0 1rem;\n box-shadow: ${theme.shadow.lg};\n `\n case 'top':\n return css`\n top: 0;\n left: 0;\n right: 0;\n height: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateY(0)' : 'translateY(-100%)'};\n border-radius: 0 0 1rem 1rem;\n box-shadow: ${theme.shadow.lg};\n `\n case 'bottom':\n default:\n return css`\n bottom: 0;\n left: 0;\n right: 0;\n height: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateY(0)' : 'translateY(100%)'};\n border-radius: 1rem 1rem 0 0;\n box-shadow: ${theme.shadow.lg};\n `\n }\n }}\n`\n\nexport const DrawerButton = styled(Box)<{\n $anchor?: 'left' | 'right' | 'top' | 'bottom'\n}>`\n position: sticky;\n top: 0;\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n padding: 0.25rem;\n background-color: ${({ theme }) => theme.colors.grey_5};\n min-height: 1.5rem;\n\n ${({ $anchor }) => {\n switch ($anchor) {\n case 'left':\n return css`\n border-radius: 0 1rem 1rem 0;\n height: 100%;\n width: 2rem;\n `\n case 'right':\n return css`\n border-radius: 1rem 0 0 1rem;\n height: 100%;\n width: 2rem;\n `\n case 'top':\n return css`\n width: 100%;\n border-radius: 0 0 1rem 1rem;\n `\n case 'bottom':\n default:\n return css`\n width: 100%;\n border-radius: 1rem 1rem 0 0;\n `\n }\n }};\n`\n\nexport const DrawerChildren = styled(Box)`\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: auto;\n flex-direction: column;\n background-color: ${({ theme }) => theme.colors.white};\n & > div {\n overflow: auto;\n display: flex;\n flex-direction: column;\n }\n`\n\nexport const DragArea = styled(Box).attrs<{ $dragging: boolean }>(\n ({ $dragging }) => ({\n style: {\n cursor: $dragging ? 'grabbing' : 'grab',\n transition: $dragging ? 'none' : 'transform 0.2s ease',\n },\n }),\n)``\n"],"names":["Overlay","styled","Box","theme","zIndex","drawer","open","DrawerContainer","attrs","$transform","style","transform","$anchor","height","css","shadow","lg","DrawerButton","colors","grey_5","DrawerChildren","white","DragArea","$dragging","cursor","transition"],"mappings":"mGAIaA,EAAUC,EAAOC,EAE5B;;;;;;;aAOW,EAAGC,WAAYA,EAAMC,QAAQC,QAAU;aACvC,EAAGC,UAAYA,EAAO,EAAI;gBACvB,EAAGA,UAAYA,EAAO,UAAY;;;;EAMrCC,EAAkBN,EAAOC,GAAKM,OACzC,EAAGC,iBAAkB,CAAEC,MAAO,CAAEC,UAAWF,MAK3C;;;;;;;;IAQE,EAAGH,OAAMM,UAASC,SAAQV,YAC1B,OAAQS,GACN,IAAK,OACH,OAAOE,CAAG;;;;mBAImB,iBAAXD,EAAyB,GAAAA,MAAaA;uBACzCP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAE/B,IAAK,QACH,OAAOF,CAAG;;;;mBAImB,iBAAXD,EAAyB,GAAAA,MAAaA;uBACzCP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAE/B,IAAK,MACH,OAAOF,CAAG;;;;oBAIoB,iBAAXD,EAAyB,GAAAA,MAAaA;uBAC1CP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAG/B,QACE,OAAOF,CAAG;;;;oBAIoB,iBAAXD,EAAyB,GAAAA,MAAaA;uBAC1CP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAEjC;EAISC,EAAehB,EAAOC,EAEjC;;;;;;;sBAOoB,EAAGC,WAAYA,EAAMe,OAAOC;;;IAG9C,EAAGP,cACH,OAAQA,GACN,IAAK,OACH,OAAOE,CAAG;;;;UAKZ,IAAK,QACH,OAAOA,CAAG;;;;UAKZ,IAAK,MACH,OAAOA,CAAG;;;UAKZ,QACE,OAAOA,CAAG;;;UAId;EAISM,EAAiBnB,EAAOC,EAAI;;;;;;sBAMnB,EAAGC,WAAYA,EAAMe,OAAOG;;;;;;EAQrCC,EAAWrB,EAAOC,GAAKM,OAClC,EAAGe,gBAAiB,CAClBb,MAAO,CACLc,OAAQD,EAAY,WAAa,OACjCE,WAAYF,EAAY,OAAS,0BAGtC"}
1
+ {"version":3,"file":"drawer.styles.js","sources":["../../../../../src/components/layout/drawer/drawer.styles.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { thinScrollbar } from '../../../theme'\nimport { Box } from '../box'\n\nexport const Overlay = styled(Box)<{\n open: boolean\n}>`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n z-index: ${({ theme }) => theme.zIndex?.drawer ?? 1100};\n opacity: ${({ open }) => (open ? 1 : 0)};\n visibility: ${({ open }) => (open ? 'visible' : 'hidden')};\n transition:\n opacity 0.3s ease,\n visibility 0.3s ease;\n`\n\nexport const DrawerContainer = styled(Box).attrs<{ $transform?: string }>(\n ({ $transform }) => ({ style: { transform: $transform } }),\n)<{\n open: boolean\n $anchor?: 'left' | 'right' | 'top' | 'bottom'\n height?: string | number\n}>`\n position: absolute;\n background-color: transparent;\n transition: transform 0.3s ease;\n cursor: pointer;\n max-width: 100%;\n box-sizing: border-box;\n\n ${({ open, $anchor, height, theme }) => {\n switch ($anchor) {\n case 'left':\n return css`\n top: 0;\n left: 0;\n height: 100%;\n width: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateX(0)' : 'translateX(-100%)'};\n border-radius: 0 1rem 1rem 0;\n box-shadow: ${theme.shadow.lg};\n `\n case 'right':\n return css`\n top: 0;\n right: 0;\n height: 100%;\n width: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateX(0)' : 'translateX(100%)'};\n border-radius: 1rem 0 0 1rem;\n box-shadow: ${theme.shadow.lg};\n `\n case 'top':\n return css`\n top: 0;\n left: 0;\n right: 0;\n height: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateY(0)' : 'translateY(-100%)'};\n border-radius: 0 0 1rem 1rem;\n box-shadow: ${theme.shadow.lg};\n `\n case 'bottom':\n default:\n return css`\n bottom: 0;\n left: 0;\n right: 0;\n height: ${typeof height === 'number' ? `${height}px` : height};\n transform: ${open ? 'translateY(0)' : 'translateY(100%)'};\n border-radius: 1rem 1rem 0 0;\n box-shadow: ${theme.shadow.lg};\n `\n }\n }}\n`\n\nexport const DrawerButton = styled(Box)<{\n $anchor?: 'left' | 'right' | 'top' | 'bottom'\n}>`\n position: sticky;\n top: 0;\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n padding: 0.25rem;\n background-color: ${({ theme }) => theme.colors.grey_5};\n min-height: 1.5rem;\n\n ${({ $anchor }) => {\n switch ($anchor) {\n case 'left':\n return css`\n border-radius: 0 1rem 1rem 0;\n height: 100%;\n width: 2rem;\n `\n case 'right':\n return css`\n border-radius: 1rem 0 0 1rem;\n height: 100%;\n width: 2rem;\n `\n case 'top':\n return css`\n width: 100%;\n border-radius: 0 0 1rem 1rem;\n `\n case 'bottom':\n default:\n return css`\n width: 100%;\n border-radius: 1rem 1rem 0 0;\n `\n }\n }};\n`\n\nexport const DrawerChildren = styled(Box)`\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: auto;\n ${thinScrollbar}\n flex-direction: column;\n background-color: ${({ theme }) => theme.colors.white};\n & > div {\n overflow: auto;\n ${thinScrollbar}\n display: flex;\n flex-direction: column;\n }\n`\n\nexport const DragArea = styled(Box).attrs<{ $dragging: boolean }>(\n ({ $dragging }) => ({\n style: {\n cursor: $dragging ? 'grabbing' : 'grab',\n transition: $dragging ? 'none' : 'transform 0.2s ease',\n },\n }),\n)``\n"],"names":["Overlay","styled","Box","theme","zIndex","drawer","open","DrawerContainer","attrs","$transform","style","transform","$anchor","height","css","shadow","lg","DrawerButton","colors","grey_5","DrawerChildren","thinScrollbar","white","DragArea","$dragging","cursor","transition"],"mappings":"+JAKaA,EAAUC,EAAOC,EAE5B;;;;;;;aAOW,EAAGC,WAAYA,EAAMC,QAAQC,QAAU;aACvC,EAAGC,UAAYA,EAAO,EAAI;gBACvB,EAAGA,UAAYA,EAAO,UAAY;;;;EAMrCC,EAAkBN,EAAOC,GAAKM,OACzC,EAAGC,iBAAkB,CAAEC,MAAO,CAAEC,UAAWF,MAK3C;;;;;;;;IAQE,EAAGH,OAAMM,UAASC,SAAQV,YAC1B,OAAQS,GACN,IAAK,OACH,OAAOE,CAAG;;;;mBAImB,iBAAXD,EAAyB,GAAAA,MAAaA;uBACzCP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAE/B,IAAK,QACH,OAAOF,CAAG;;;;mBAImB,iBAAXD,EAAyB,GAAAA,MAAaA;uBACzCP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAE/B,IAAK,MACH,OAAOF,CAAG;;;;oBAIoB,iBAAXD,EAAyB,GAAAA,MAAaA;uBAC1CP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAG/B,QACE,OAAOF,CAAG;;;;oBAIoB,iBAAXD,EAAyB,GAAAA,MAAaA;uBAC1CP,EAAO,gBAAkB;;wBAExBH,EAAMY,OAAOC;UAEjC;EAISC,EAAehB,EAAOC,EAEjC;;;;;;;sBAOoB,EAAGC,WAAYA,EAAMe,OAAOC;;;IAG9C,EAAGP,cACH,OAAQA,GACN,IAAK,OACH,OAAOE,CAAG;;;;UAKZ,IAAK,QACH,OAAOA,CAAG;;;;UAKZ,IAAK,MACH,OAAOA,CAAG;;;UAKZ,QACE,OAAOA,CAAG;;;UAId;EAISM,EAAiBnB,EAAOC,EAAI;;;;;IAKrCmB;;sBAEkB,EAAGlB,WAAYA,EAAMe,OAAOI;;;MAG5CD;;;;EAMOE,EAAWtB,EAAOC,GAAKM,OAClC,EAAGgB,gBAAiB,CAClBd,MAAO,CACLe,OAAQD,EAAY,WAAa,OACjCE,WAAYF,EAAY,OAAS,0BAGtC"}
@@ -1,4 +1,4 @@
1
- import{styled as e}from"styled-components";import{getThemeColor as t}from"../../../theme/theme.util.js";const i=e.div`
1
+ import{styled as e}from"styled-components";import{thinScrollbar as i}from"../../../theme/scrollbar.js";import{getThemeColor as t}from"../../../theme/theme.util.js";const o=e.div`
2
2
  display: ${e=>e.open?"flex":"none"};
3
3
  position: fixed;
4
4
  top: 0;
@@ -20,13 +20,13 @@ import{styled as e}from"styled-components";import{getThemeColor as t}from"../../
20
20
  opacity: 1;
21
21
  }
22
22
  }
23
- `,o=e.div`
23
+ `,n=e.div`
24
24
  position: fixed;
25
25
  width: 100%;
26
26
  height: 100%;
27
27
  background-color: rgba(0, 0, 0, 0.534);
28
28
  z-index: -1;
29
- `,r=e.div.withConfig({shouldForwardProp:e=>!["minWidth","minHeight","maxWidth","maxHeight"].includes(e)})`
29
+ `,a=e.div.withConfig({shouldForwardProp:e=>!["minWidth","minHeight","maxWidth","maxHeight"].includes(e)})`
30
30
  &:focus {
31
31
  outline: none;
32
32
  }
@@ -61,24 +61,13 @@ import{styled as e}from"styled-components";import{getThemeColor as t}from"../../
61
61
  transform: translate(-50%, -50%) scale(1);
62
62
  }
63
63
  }
64
- `,a=e.div`
64
+ `,h=e.div`
65
65
  display: flex;
66
66
  justify-content: space-between;
67
- `,h=e.div`
68
- &::-webkit-scrollbar {
69
- width: 10px;
70
- }
71
- &::-webkit-scrollbar-track {
72
- background: ${e=>t(e.theme.colors.grey_5,e.theme)};
73
- }
74
- &::-webkit-scrollbar-thumb {
75
- background: ${e=>t(e.theme.colors.grey_4,e.theme)};
76
- }
77
- &::-webkit-scrollbar-thumb:hover {
78
- background: ${e=>t(e.theme.colors.grey_3,e.theme)};
79
- }
67
+ `,m=e.div`
80
68
  display: flex;
81
69
  height: 100%;
82
70
  overflow: auto;
83
- `;export{o as Background,r as ModalCard,i as ModalComp,h as ModalContent,a as ModalHeader};
71
+ ${i}
72
+ `;export{n as Background,a as ModalCard,o as ModalComp,m as ModalContent,h as ModalHeader};
84
73
  //# sourceMappingURL=modal.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.styles.js","sources":["../../../../../src/components/layout/modal/modal.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme'\n\nexport const ModalComp = styled.div<{\n open: boolean\n}>`\n display: ${(props) => (props.open ? 'flex' : 'none')};\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n z-index: ${({ theme }) => theme.zIndex?.modal ?? 1200};\n flex-direction: column;\n\n animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n\n @keyframes overlayShow {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n`\n\nexport const Background = styled.div`\n position: fixed;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.534);\n z-index: -1;\n`\n\nexport const ModalCard = styled.div.withConfig({\n shouldForwardProp: (prop) =>\n !['minWidth', 'minHeight', 'maxWidth', 'maxHeight'].includes(prop),\n})<{\n width?: string\n minWidth?: string\n height?: string\n minHeight?: string\n maxWidth?: string\n maxHeight?: string\n}>`\n &:focus {\n outline: none;\n }\n\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: ${(props) =>\n getThemeColor(props.theme.colors.custom.white, props.theme)};\n border-radius: 1rem;\n box-shadow: ${({ theme }) => theme.shadow.lg};\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: ${(props) => props.width};\n min-width: ${(props) => props.minWidth ?? '300px'};\n max-width: ${(props) => props.maxWidth ?? '90vw'};\n height: ${(props) => props.height};\n min-height: ${(props) => props.minHeight};\n max-height: ${(props) => props.maxHeight ?? '90vh'};\n padding: ${(props) => props.theme.spacing['3']};\n animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n\n @keyframes contentShow {\n from {\n opacity: 0;\n transform: translate(-50%, -48%) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n }\n`\nexport const ModalHeader = styled.div`\n display: flex;\n justify-content: space-between;\n`\nexport const ModalContent = styled.div`\n &::-webkit-scrollbar {\n width: 10px;\n }\n &::-webkit-scrollbar-track {\n background: ${(props) =>\n getThemeColor(props.theme.colors.grey_5, props.theme)};\n }\n &::-webkit-scrollbar-thumb {\n background: ${(props) =>\n getThemeColor(props.theme.colors.grey_4, props.theme)};\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ${(props) =>\n getThemeColor(props.theme.colors.grey_3, props.theme)};\n }\n display: flex;\n height: 100%;\n overflow: auto;\n`\n"],"names":["ModalComp","styled","div","props","open","theme","zIndex","modal","Background","ModalCard","withConfig","shouldForwardProp","prop","includes","getThemeColor","colors","custom","white","shadow","lg","width","minWidth","maxWidth","height","minHeight","maxHeight","spacing","ModalHeader","ModalContent","grey_5","grey_4","grey_3"],"mappings":"wGAIaA,MAAAA,EAAYC,EAAOC,GAE9B;aACYC,GAAWA,EAAMC,KAAO,OAAS;;;;;;;aAOlC,EAAGC,WAAYA,EAAMC,QAAQC,OAAS;;;;;;;;;;;;;;EAgBtCC,EAAaP,EAAOC,GAAG;;;;;;EAQvBO,EAAYR,EAAOC,IAAIQ,WAAW,CAC7CC,kBAAoBC,IACjB,CAAC,WAAY,YAAa,WAAY,aAAaC,SAASD,IAQ/D;;;;;;;;sBAQqBT,GACnBW,EAAcX,EAAME,MAAMU,OAAOC,OAAOC,MAAOd,EAAME;;gBAEzC,EAAGA,WAAYA,EAAMa,OAAOC;;;;;WAKhChB,GAAUA,EAAMiB;eACZjB,GAAUA,EAAMkB,UAAY;eAC5BlB,GAAUA,EAAMmB,UAAY;YAC/BnB,GAAUA,EAAMoB;gBACZpB,GAAUA,EAAMqB;gBAChBrB,GAAUA,EAAMsB,WAAa;aAChCtB,GAAUA,EAAME,MAAMqB,QAAQ;;;;;;;;;;;;;;EAe/BC,EAAc1B,EAAOC,GAAG;;;EAIxB0B,EAAe3B,EAAOC,GAAG;;;;;kBAKnBC,GACbW,EAAcX,EAAME,MAAMU,OAAOc,OAAQ1B,EAAME;;;kBAGlCF,GACbW,EAAcX,EAAME,MAAMU,OAAOe,OAAQ3B,EAAME;;;kBAGlCF,GACbW,EAAcX,EAAME,MAAMU,OAAOgB,OAAQ5B,EAAME;;;;;"}
1
+ {"version":3,"file":"modal.styles.js","sources":["../../../../../src/components/layout/modal/modal.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor, thinScrollbar } from '../../../theme'\n\nexport const ModalComp = styled.div<{\n open: boolean\n}>`\n display: ${(props) => (props.open ? 'flex' : 'none')};\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n z-index: ${({ theme }) => theme.zIndex?.modal ?? 1200};\n flex-direction: column;\n\n animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n\n @keyframes overlayShow {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n`\n\nexport const Background = styled.div`\n position: fixed;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.534);\n z-index: -1;\n`\n\nexport const ModalCard = styled.div.withConfig({\n shouldForwardProp: (prop) =>\n !['minWidth', 'minHeight', 'maxWidth', 'maxHeight'].includes(prop),\n})<{\n width?: string\n minWidth?: string\n height?: string\n minHeight?: string\n maxWidth?: string\n maxHeight?: string\n}>`\n &:focus {\n outline: none;\n }\n\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: ${(props) =>\n getThemeColor(props.theme.colors.custom.white, props.theme)};\n border-radius: 1rem;\n box-shadow: ${({ theme }) => theme.shadow.lg};\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: ${(props) => props.width};\n min-width: ${(props) => props.minWidth ?? '300px'};\n max-width: ${(props) => props.maxWidth ?? '90vw'};\n height: ${(props) => props.height};\n min-height: ${(props) => props.minHeight};\n max-height: ${(props) => props.maxHeight ?? '90vh'};\n padding: ${(props) => props.theme.spacing['3']};\n animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);\n\n @keyframes contentShow {\n from {\n opacity: 0;\n transform: translate(-50%, -48%) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n }\n`\nexport const ModalHeader = styled.div`\n display: flex;\n justify-content: space-between;\n`\nexport const ModalContent = styled.div`\n display: flex;\n height: 100%;\n overflow: auto;\n ${thinScrollbar}\n`\n"],"names":["ModalComp","styled","div","props","open","theme","zIndex","modal","Background","ModalCard","withConfig","shouldForwardProp","prop","includes","getThemeColor","colors","custom","white","shadow","lg","width","minWidth","maxWidth","height","minHeight","maxHeight","spacing","ModalHeader","ModalContent","thinScrollbar"],"mappings":"oKAIaA,MAAAA,EAAYC,EAAOC,GAE9B;aACYC,GAAWA,EAAMC,KAAO,OAAS;;;;;;;aAOlC,EAAGC,WAAYA,EAAMC,QAAQC,OAAS;;;;;;;;;;;;;;EAgBtCC,EAAaP,EAAOC,GAAG;;;;;;EAQvBO,EAAYR,EAAOC,IAAIQ,WAAW,CAC7CC,kBAAoBC,IACjB,CAAC,WAAY,YAAa,WAAY,aAAaC,SAASD,IAQ/D;;;;;;;;sBAQqBT,GACnBW,EAAcX,EAAME,MAAMU,OAAOC,OAAOC,MAAOd,EAAME;;gBAEzC,EAAGA,WAAYA,EAAMa,OAAOC;;;;;WAKhChB,GAAUA,EAAMiB;eACZjB,GAAUA,EAAMkB,UAAY;eAC5BlB,GAAUA,EAAMmB,UAAY;YAC/BnB,GAAUA,EAAMoB;gBACZpB,GAAUA,EAAMqB;gBAChBrB,GAAUA,EAAMsB,WAAa;aAChCtB,GAAUA,EAAME,MAAMqB,QAAQ;;;;;;;;;;;;;;EAe/BC,EAAc1B,EAAOC,GAAG;;;EAIxB0B,EAAe3B,EAAOC,GAAG;;;;IAIlC2B;"}
@@ -1,4 +1,4 @@
1
- import{styled as o}from"styled-components";import{getThemeColor as e}from"../../../theme/theme.util.js";const d=o.div.withConfig({shouldForwardProp:o=>!["visible","boxShadow","borderRadius","maxHeight"].includes(o)}).attrs((({$popperStyle:o})=>({style:o})))`
1
+ import{styled as o}from"styled-components";import{getThemeColor as e}from"../../../theme/theme.util.js";import{thinScrollbar as r}from"../../../theme/scrollbar.js";const d=o.div.withConfig({shouldForwardProp:o=>!["visible","boxShadow","borderRadius","maxHeight"].includes(o)}).attrs((({$popperStyle:o})=>({style:o})))`
2
2
  background-color: ${({theme:o})=>e("white",o)};
3
3
  border-radius: ${({borderRadius:o,theme:e})=>o??e.border_radius.card};
4
4
  box-shadow: ${({boxShadow:o,theme:e})=>o??e.box_shadow.box};
@@ -7,6 +7,7 @@ import{styled as o}from"styled-components";import{getThemeColor as e}from"../../
7
7
  border: 1px solid ${({theme:o})=>e("grey_4",o)};
8
8
  overflow-x: hidden;
9
9
  overflow-y: auto;
10
+ ${r}
10
11
  max-height: ${({maxHeight:o})=>o??void 0};
11
12
  z-index: ${({theme:o})=>o.zIndex?.dropdown??1300};
12
13
  `;export{d as PopoverContent};
@@ -1 +1 @@
1
- {"version":3,"file":"popover.styles.js","sources":["../../../../../src/components/layout/popover/popover.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme'\n\nexport const PopoverContent = styled.div\n .withConfig({\n shouldForwardProp: (prop) =>\n !['visible', 'boxShadow', 'borderRadius', 'maxHeight'].includes(prop),\n })\n .attrs<{ $popperStyle?: React.CSSProperties }>(({ $popperStyle }) => ({\n style: $popperStyle,\n }))<{\n width: string\n visible?: boolean\n boxShadow?: string\n borderRadius?: string\n maxHeight?: string\n}>`\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n border-radius: ${({ borderRadius, theme }) =>\n borderRadius ?? theme.border_radius.card};\n box-shadow: ${({ boxShadow, theme }) => boxShadow ?? theme.box_shadow.box};\n width: ${({ width }) => width};\n display: ${({ visible }) => (visible ? 'block' : 'none')};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n overflow-x: hidden;\n overflow-y: auto;\n max-height: ${({ maxHeight }) => maxHeight ?? undefined};\n z-index: ${({ theme }) => theme.zIndex?.dropdown ?? 1300};\n`\n"],"names":["PopoverContent","styled","div","withConfig","shouldForwardProp","prop","includes","attrs","$popperStyle","style","theme","getThemeColor","borderRadius","border_radius","card","boxShadow","box_shadow","box","width","visible","maxHeight","undefined","zIndex","dropdown"],"mappings":"wGAIO,MAAMA,EAAiBC,EAAOC,IAClCC,WAAW,CACVC,kBAAoBC,IACjB,CAAC,UAAW,YAAa,eAAgB,aAAaC,SAASD,KAEnEE,OAA8C,EAAGC,mBAAoB,CACpEC,MAAOD,KAOT;sBACoB,EAAGE,WAAYC,EAAc,QAASD;mBACzC,EAAGE,eAAcF,WAChCE,GAAgBF,EAAMG,cAAcC;gBACxB,EAAGC,YAAWL,WAAYK,GAAaL,EAAMM,WAAWC;WAC7D,EAAGC,WAAYA;aACb,EAAGC,aAAeA,EAAU,QAAU;sBAC7B,EAAGT,WAAYC,EAAc,SAAUD;;;gBAG7C,EAAGU,eAAgBA,QAAaC;aACnC,EAAGX,WAAYA,EAAMY,QAAQC,UAAY;"}
1
+ {"version":3,"file":"popover.styles.js","sources":["../../../../../src/components/layout/popover/popover.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor, thinScrollbar } from '../../../theme'\n\nexport const PopoverContent = styled.div\n .withConfig({\n shouldForwardProp: (prop) =>\n !['visible', 'boxShadow', 'borderRadius', 'maxHeight'].includes(prop),\n })\n .attrs<{ $popperStyle?: React.CSSProperties }>(({ $popperStyle }) => ({\n style: $popperStyle,\n }))<{\n width: string\n visible?: boolean\n boxShadow?: string\n borderRadius?: string\n maxHeight?: string\n}>`\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n border-radius: ${({ borderRadius, theme }) =>\n borderRadius ?? theme.border_radius.card};\n box-shadow: ${({ boxShadow, theme }) => boxShadow ?? theme.box_shadow.box};\n width: ${({ width }) => width};\n display: ${({ visible }) => (visible ? 'block' : 'none')};\n border: 1px solid ${({ theme }) => getThemeColor('grey_4', theme)};\n overflow-x: hidden;\n overflow-y: auto;\n ${thinScrollbar}\n max-height: ${({ maxHeight }) => maxHeight ?? undefined};\n z-index: ${({ theme }) => theme.zIndex?.dropdown ?? 1300};\n`\n"],"names":["PopoverContent","styled","div","withConfig","shouldForwardProp","prop","includes","attrs","$popperStyle","style","theme","getThemeColor","borderRadius","border_radius","card","boxShadow","box_shadow","box","width","visible","thinScrollbar","maxHeight","undefined","zIndex","dropdown"],"mappings":"oKAIO,MAAMA,EAAiBC,EAAOC,IAClCC,WAAW,CACVC,kBAAoBC,IACjB,CAAC,UAAW,YAAa,eAAgB,aAAaC,SAASD,KAEnEE,OAA8C,EAAGC,mBAAoB,CACpEC,MAAOD,KAOT;sBACoB,EAAGE,WAAYC,EAAc,QAASD;mBACzC,EAAGE,eAAcF,WAChCE,GAAgBF,EAAMG,cAAcC;gBACxB,EAAGC,YAAWL,WAAYK,GAAaL,EAAMM,WAAWC;WAC7D,EAAGC,WAAYA;aACb,EAAGC,aAAeA,EAAU,QAAU;sBAC7B,EAAGT,WAAYC,EAAc,SAAUD;;;IAGzDU;gBACY,EAAGC,eAAgBA,QAAaC;aACnC,EAAGZ,WAAYA,EAAMa,QAAQC,UAAY;"}
@@ -1,10 +1,10 @@
1
- import{styled as e}from"styled-components";import{Box as t}from"../box/box.comp.js";import{getThemeColor as r}from"../../../theme/theme.util.js";const o=425;e(t)`
1
+ import{styled as e}from"styled-components";import{thinScrollbarOnHover as t}from"../../../theme/scrollbar.js";import{Box as n}from"../box/box.comp.js";const o=425;e(n)`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1rem;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- `;const n=e.div`
7
+ `;const i=e.div`
8
8
  display: flex;
9
9
  width: 100%;
10
10
  justify-content: flex-start;
@@ -15,37 +15,16 @@ import{styled as e}from"styled-components";import{Box as t}from"../box/box.comp.
15
15
  flex-shrink: 0;
16
16
  }
17
17
 
18
- &::-webkit-scrollbar {
19
- height: 8px;
20
- }
21
- &::-webkit-scrollbar-track {
22
- background: 'tranparent';
23
- }
24
- &::-webkit-scrollbar-thumb {
25
- background: 'tranparent';
26
- }
27
- &::-webkit-scrollbar-thumb:hover {
28
- background: 'tranparent';
29
- }
30
- transition: all 0.3s ease;
31
-
32
- &:hover {
33
- &::-webkit-scrollbar-track {
34
- background: ${e=>r(e.theme.colors.grey_5,e.theme)};
35
- }
36
- &::-webkit-scrollbar-thumb {
37
- background: ${e=>r(e.theme.colors.grey_4,e.theme)};
38
- }
39
- }
18
+ ${t}
40
19
 
41
20
  @media (max-width: ${425}px) {
42
21
  overflow: auto;
43
22
  }
44
- `,a=e.div`
23
+ `,s=e.div`
45
24
  display: flex;
46
25
  gap: ${({theme:e})=>e.spacing[2]};
47
26
  justify-content: center;
48
27
 
49
28
  ${({$hideOnMobile:e})=>e&&"\n @media (max-width: 425px) {\n display: none;\n }\n "}
50
- `;export{o as MOBILE_MAX_WIDTH,a as NavButtons,n as ScrollableArea};
29
+ `;export{o as MOBILE_MAX_WIDTH,s as NavButtons,i as ScrollableArea};
51
30
  //# sourceMappingURL=slider.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.styles.js","sources":["../../../../../src/components/layout/slider/slider.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme'\nimport { Box } from '../box'\n\n/** Até esta largura a área rola com o dedo/trackpad (e os botões podem ser escondidos). */\nexport const MOBILE_MAX_WIDTH = 425\n\nexport const SliderContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 1rem;\n justify-content: center;\n align-items: center;\n`\n\nexport const ScrollableArea = styled.div<{ $hasbuttons: boolean }>`\n display: flex;\n width: 100%;\n justify-content: flex-start;\n align-items: center;\n overflow: ${({ $hasbuttons }) => ($hasbuttons ? 'hidden' : 'auto')};\n\n & > * {\n flex-shrink: 0;\n }\n\n &::-webkit-scrollbar {\n height: 8px;\n }\n &::-webkit-scrollbar-track {\n background: 'tranparent';\n }\n &::-webkit-scrollbar-thumb {\n background: 'tranparent';\n }\n &::-webkit-scrollbar-thumb:hover {\n background: 'tranparent';\n }\n transition: all 0.3s ease;\n\n &:hover {\n &::-webkit-scrollbar-track {\n background: ${(props) =>\n getThemeColor(props.theme.colors.grey_5, props.theme)};\n }\n &::-webkit-scrollbar-thumb {\n background: ${(props) =>\n getThemeColor(props.theme.colors.grey_4, props.theme)};\n }\n }\n\n @media (max-width: ${MOBILE_MAX_WIDTH}px) {\n overflow: auto;\n }\n`\n\nexport const NavButtons = styled.div<{ $hideOnMobile?: boolean }>`\n display: flex;\n gap: ${({ theme }) => theme.spacing[2]};\n justify-content: center;\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n `\n @media (max-width: ${MOBILE_MAX_WIDTH}px) {\n display: none;\n }\n `}\n`\n"],"names":["MOBILE_MAX_WIDTH","styled","Box","ScrollableArea","div","$hasbuttons","props","getThemeColor","theme","colors","grey_5","grey_4","NavButtons","spacing","$hideOnMobile"],"mappings":"iJAMO,MAAMA,EAAmB,IAEDC,EAAOC,EAAI;;;;;;EAQ7BC,MAAAA,EAAiBF,EAAOG,GAA6B;;;;;cAKpD,EAAGC,iBAAmBA,EAAc,SAAW;;;;;;;;;;;;;;;;;;;;;;oBAsBxCC,GACbC,EAAcD,EAAME,MAAMC,OAAOC,OAAQJ,EAAME;;;oBAGlCF,GACbC,EAAcD,EAAME,MAAMC,OAAOE,OAAQL,EAAME;;;;uBA1CvB;;;EAmDnBI,EAAaX,EAAOG,GAAgC;;SAExD,EAAGI,WAAYA,EAAMK,QAAQ;;;IAGlC,EAAGC,mBACHA,GACA;"}
1
+ {"version":3,"file":"slider.styles.js","sources":["../../../../../src/components/layout/slider/slider.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { thinScrollbarOnHover } from '../../../theme'\nimport { Box } from '../box'\n\n/** Até esta largura a área rola com o dedo/trackpad (e os botões podem ser escondidos). */\nexport const MOBILE_MAX_WIDTH = 425\n\nexport const SliderContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 1rem;\n justify-content: center;\n align-items: center;\n`\n\nexport const ScrollableArea = styled.div<{ $hasbuttons: boolean }>`\n display: flex;\n width: 100%;\n justify-content: flex-start;\n align-items: center;\n overflow: ${({ $hasbuttons }) => ($hasbuttons ? 'hidden' : 'auto')};\n\n & > * {\n flex-shrink: 0;\n }\n\n ${thinScrollbarOnHover}\n\n @media (max-width: ${MOBILE_MAX_WIDTH}px) {\n overflow: auto;\n }\n`\n\nexport const NavButtons = styled.div<{ $hideOnMobile?: boolean }>`\n display: flex;\n gap: ${({ theme }) => theme.spacing[2]};\n justify-content: center;\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n `\n @media (max-width: ${MOBILE_MAX_WIDTH}px) {\n display: none;\n }\n `}\n`\n"],"names":["MOBILE_MAX_WIDTH","styled","Box","ScrollableArea","div","$hasbuttons","thinScrollbarOnHover","NavButtons","theme","spacing","$hideOnMobile"],"mappings":"uJAMO,MAAMA,EAAmB,IAEDC,EAAOC,EAAI;;;;;;EAQ7BC,MAAAA,EAAiBF,EAAOG,GAA6B;;;;;cAKpD,EAAGC,iBAAmBA,EAAc,SAAW;;;;;;IAMzDC;;uBArB4B;;;EA4BnBC,EAAaN,EAAOG,GAAgC;;SAExD,EAAGI,WAAYA,EAAMC,QAAQ;;;IAGlC,EAAGC,mBACHA,GACA;"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{TableWrapper as l,Table as a,CustomTableRow as c,TableColumn as d}from"./table.styles.js";import{TableHead as i}from"../table-head/table-head.comp.js";import{TableRow as n}from"../table-row/table-row.comp.js";import{Box as s}from"../box/box.comp.js";const h=({data:h,headers:m,onSelectionChange:b,selectable:p,selected:u,header:w,footer:g,borderRadius:f,spacing:x,boxShadow:j,mobileLayout:R="scroll",onRowClick:S,hoverable:C,...y})=>{const[$,k]=o(u||[]);r((()=>{u&&k(u)}),[u,$]);const v=e=>{let t=$;t=$.includes(e)?$.filter((t=>t!==e)):[...$,e],k(t),b?.(t)},B=(e,o)=>t(n,{data:e,headers:m,selectable:p,selected:$.includes(e),onSelect:v,index:o,spacing:x,hoverable:C??Boolean(S),onClick:S});return e(l,{"data-testid":"table",direction:"column",borderRadius:f,boxShadow:j,...y,children:[w&&t(s,{width:"100%",children:w}),e(a,{$mobileCards:"cards"===R,children:[t(i,{headers:m,selectable:p,selected:$.length===h.length,onSelect:()=>{let e=[];$.length!==h.length&&(e=[...h]),k(e),b?.(e)},spacing:x}),t("tbody",{children:h.map(((e,o)=>e.customRender?t(c,{"data-testid":"custom-row",children:t(d,{$align:"center",width:"100%",children:e.customRender(e,o,B)})},`custom-row-${o}`):B(e,o)))})]}),g&&t(s,{width:"100%",children:g})]})};export{h as Table};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{TableWrapper as l,Table as a,CustomTableRow as c,TableColumn as d}from"./table.styles.js";import{TableHead as i}from"../table-head/table-head.comp.js";import{TableRow as n}from"../table-row/table-row.comp.js";import{Box as s}from"../box/box.comp.js";const h=({data:h,headers:m,onSelectionChange:b,selectable:p,selected:u,header:w,footer:g,borderRadius:f,spacing:x,boxShadow:j,mobileLayout:R="scroll",onRowClick:S,hoverable:C,...$})=>{const[y,k]=o(u||[]);r((()=>{u&&k(u)}),[u,y]);const v=e=>{let t=y;t=y.includes(e)?y.filter((t=>t!==e)):[...y,e],k(t),b?.(t)},B=(e,o)=>t(n,{data:e,headers:m,selectable:p,selected:y.includes(e),onSelect:v,index:o,spacing:x,hoverable:C??Boolean(S),onClick:S},`row-${o}`);return e(l,{"data-testid":"table",direction:"column",borderRadius:f,boxShadow:j,...$,children:[w&&t(s,{width:"100%",children:w}),e(a,{$mobileCards:"cards"===R,children:[t(i,{headers:m,selectable:p,selected:y.length===h.length,onSelect:()=>{let e=[];y.length!==h.length&&(e=[...h]),k(e),b?.(e)},spacing:x}),t("tbody",{children:h.map(((e,o)=>e.customRender?t(c,{"data-testid":"custom-row",children:t(d,{$align:"center",width:"100%",children:e.customRender(e,o,B)})},`custom-row-${o}`):B(e,o)))})]}),g&&t(s,{width:"100%",children:g})]})};export{h as Table};
2
2
  //# sourceMappingURL=table.comp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.comp.js","sources":["../../../../../src/components/layout/table/table.comp.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport { Box } from '../box'\nimport { TableHead } from '../table-head'\nimport { TableRow } from '../table-row'\n\nimport { TableData, TableProps } from './table.types'\n\nimport * as Styles from './table.styles'\n\n/**\n * Tabela de dados com colunas configuráveis (`headers`), seleção de linhas (`selectable`) e conteúdo próprio por coluna (`customRender`).\n * No celular, `mobileLayout=\"cards\"` mostra cada linha como um card.\n * `onRowClick` deixa a linha clicável (com destaque no hover e teclado); `hoverable` só destaca.\n * Para listas grandes, coloque `<Pagination totalItems={...} />` abaixo.\n * @example <Table headers={[{ key: 'nome', label: 'Nome' }]} data={fornecedores} />\n */\nexport const Table = ({\n data,\n headers,\n onSelectionChange,\n selectable,\n selected,\n header,\n footer,\n borderRadius,\n spacing,\n boxShadow,\n mobileLayout = 'scroll',\n onRowClick,\n hoverable,\n ...rest\n}: TableProps) => {\n const [selectedRows, setSelectedRows] = useState<TableData[]>(selected || [])\n\n useEffect(() => {\n if (selected) {\n setSelectedRows(selected)\n }\n }, [selected, selectedRows])\n\n const handleToggleSelectAll = () => {\n let newSelectedRows: TableData[] = []\n if (selectedRows.length !== data.length) {\n newSelectedRows = [...data]\n }\n\n setSelectedRows(newSelectedRows)\n onSelectionChange?.(newSelectedRows)\n }\n\n const handleToggleSelect = (row: TableData) => {\n let newSelectedRows: TableData[] = selectedRows\n if (selectedRows.includes(row)) {\n newSelectedRows = selectedRows.filter(\n (selectedRow) => selectedRow !== row,\n )\n } else {\n newSelectedRows = [...selectedRows, row]\n }\n\n setSelectedRows(newSelectedRows)\n onSelectionChange?.(newSelectedRows)\n }\n\n const renderDefaultRow = (row: TableData, index: number) => (\n <TableRow\n data={row}\n headers={headers}\n selectable={selectable}\n selected={selectedRows.includes(row)}\n onSelect={handleToggleSelect}\n index={index}\n spacing={spacing}\n hoverable={hoverable ?? Boolean(onRowClick)}\n onClick={onRowClick}\n />\n )\n\n return (\n <Styles.TableWrapper\n data-testid=\"table\"\n direction=\"column\"\n borderRadius={borderRadius}\n boxShadow={boxShadow}\n {...rest}\n >\n {header && <Box width=\"100%\">{header}</Box>}\n <Styles.Table $mobileCards={mobileLayout === 'cards'}>\n <TableHead\n headers={headers}\n selectable={selectable}\n selected={selectedRows.length === data.length}\n onSelect={handleToggleSelectAll}\n spacing={spacing}\n />\n <tbody>\n {data.map((row, index) => {\n if (row.customRender) {\n return (\n <Styles.CustomTableRow\n key={`custom-row-${index}`}\n data-testid=\"custom-row\"\n >\n <Styles.TableColumn $align=\"center\" width=\"100%\">\n {row.customRender(row, index, renderDefaultRow)}\n </Styles.TableColumn>\n </Styles.CustomTableRow>\n )\n }\n return renderDefaultRow(row, index)\n })}\n </tbody>\n </Styles.Table>\n {footer && <Box width=\"100%\">{footer}</Box>}\n </Styles.TableWrapper>\n )\n}\n"],"names":["Table","data","headers","onSelectionChange","selectable","selected","header","footer","borderRadius","spacing","boxShadow","mobileLayout","onRowClick","hoverable","rest","selectedRows","setSelectedRows","useState","useEffect","handleToggleSelect","row","newSelectedRows","includes","filter","selectedRow","renderDefaultRow","index","_jsx","TableRow","onSelect","Boolean","onClick","_jsxs","Styles","direction","Box","width","children","TableHead","length","handleToggleSelectAll","map","customRender","$align"],"mappings":"mWAiBO,MAAMA,EAAQA,EACnBC,OACAC,UACAC,oBACAC,aACAC,WACAC,SACAC,SACAC,eACAC,UACAC,YACAC,eAAe,SACfC,aACAC,eACGC,MAEH,MAAOC,EAAcC,GAAmBC,EAAsBZ,GAAY,IAE1Ea,GAAU,KACJb,GACFW,EAAgBX,EAClB,GACC,CAACA,EAAUU,IAEd,MAUMI,EAAsBC,IAC1B,IAAIC,EAA+BN,EAEjCM,EADEN,EAAaO,SAASF,GACNL,EAAaQ,QAC5BC,GAAgBA,IAAgBJ,IAGjB,IAAIL,EAAcK,GAGtCJ,EAAgBK,GAChBlB,IAAoBkB,EAAgB,EAGhCI,EAAmBA,CAACL,EAAgBM,IACxCC,EAACC,EACC,CAAA3B,KAAMmB,EACNlB,QAASA,EACTE,WAAYA,EACZC,SAAUU,EAAaO,SAASF,GAChCS,SAAUV,EACVO,MAAOA,EACPjB,QAASA,EACTI,UAAWA,GAAaiB,QAAQlB,GAChCmB,QAASnB,IAIb,OACEoB,EAACC,iBACa,QACZC,UAAU,SACV1B,aAAcA,EACdE,UAAWA,KACPI,YAEHR,GAAUqB,EAACQ,EAAG,CAACC,MAAM,OAAQC,SAAA/B,IAC9B0B,EAACC,gBAA4C,UAAjBtB,EAAwB0B,SAAA,CAClDV,EAACW,EAAS,CACRpC,QAASA,EACTE,WAAYA,EACZC,SAAUU,EAAawB,SAAWtC,EAAKsC,OACvCV,SApDsBW,KAC5B,IAAInB,EAA+B,GAC/BN,EAAawB,SAAWtC,EAAKsC,SAC/BlB,EAAkB,IAAIpB,IAGxBe,EAAgBK,GAChBlB,IAAoBkB,EAAgB,EA8C9BZ,QAASA,IAEXkB,EAAA,QAAA,CAAAU,SACGpC,EAAKwC,KAAI,CAACrB,EAAKM,IACVN,EAAIsB,aAEJf,EAACM,iBAEa,aAAYI,SAExBV,EAACM,EAAkB,CAAAU,OAAQ,SAASP,MAAM,OACvCC,SAAAjB,EAAIsB,aAAatB,EAAKM,EAAOD,MAJb,cAAAC,KASlBD,EAAiBL,EAAKM,UAIlCnB,GAAUoB,EAACQ,EAAI,CAAAC,MAAM,OAAMC,SAAE9B,MACV"}
1
+ {"version":3,"file":"table.comp.js","sources":["../../../../../src/components/layout/table/table.comp.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport { Box } from '../box'\nimport { TableHead } from '../table-head'\nimport { TableRow } from '../table-row'\n\nimport { TableData, TableProps } from './table.types'\n\nimport * as Styles from './table.styles'\n\n/**\n * Tabela de dados com colunas configuráveis (`headers`), seleção de linhas (`selectable`) e conteúdo próprio por coluna (`customRender`).\n * No celular, `mobileLayout=\"cards\"` mostra cada linha como um card.\n * `onRowClick` deixa a linha clicável (com destaque no hover e teclado); `hoverable` só destaca.\n * Para listas grandes, coloque `<Pagination totalItems={...} />` abaixo.\n * @example <Table headers={[{ key: 'nome', label: 'Nome' }]} data={fornecedores} />\n */\nexport const Table = ({\n data,\n headers,\n onSelectionChange,\n selectable,\n selected,\n header,\n footer,\n borderRadius,\n spacing,\n boxShadow,\n mobileLayout = 'scroll',\n onRowClick,\n hoverable,\n ...rest\n}: TableProps) => {\n const [selectedRows, setSelectedRows] = useState<TableData[]>(selected || [])\n\n useEffect(() => {\n if (selected) {\n setSelectedRows(selected)\n }\n }, [selected, selectedRows])\n\n const handleToggleSelectAll = () => {\n let newSelectedRows: TableData[] = []\n if (selectedRows.length !== data.length) {\n newSelectedRows = [...data]\n }\n\n setSelectedRows(newSelectedRows)\n onSelectionChange?.(newSelectedRows)\n }\n\n const handleToggleSelect = (row: TableData) => {\n let newSelectedRows: TableData[] = selectedRows\n if (selectedRows.includes(row)) {\n newSelectedRows = selectedRows.filter(\n (selectedRow) => selectedRow !== row,\n )\n } else {\n newSelectedRows = [...selectedRows, row]\n }\n\n setSelectedRows(newSelectedRows)\n onSelectionChange?.(newSelectedRows)\n }\n\n const renderDefaultRow = (row: TableData, index: number) => (\n <TableRow\n key={`row-${index}`}\n data={row}\n headers={headers}\n selectable={selectable}\n selected={selectedRows.includes(row)}\n onSelect={handleToggleSelect}\n index={index}\n spacing={spacing}\n hoverable={hoverable ?? Boolean(onRowClick)}\n onClick={onRowClick}\n />\n )\n\n return (\n <Styles.TableWrapper\n data-testid=\"table\"\n direction=\"column\"\n borderRadius={borderRadius}\n boxShadow={boxShadow}\n {...rest}\n >\n {header && <Box width=\"100%\">{header}</Box>}\n <Styles.Table $mobileCards={mobileLayout === 'cards'}>\n <TableHead\n headers={headers}\n selectable={selectable}\n selected={selectedRows.length === data.length}\n onSelect={handleToggleSelectAll}\n spacing={spacing}\n />\n <tbody>\n {data.map((row, index) => {\n if (row.customRender) {\n return (\n <Styles.CustomTableRow\n key={`custom-row-${index}`}\n data-testid=\"custom-row\"\n >\n <Styles.TableColumn $align=\"center\" width=\"100%\">\n {row.customRender(row, index, renderDefaultRow)}\n </Styles.TableColumn>\n </Styles.CustomTableRow>\n )\n }\n return renderDefaultRow(row, index)\n })}\n </tbody>\n </Styles.Table>\n {footer && <Box width=\"100%\">{footer}</Box>}\n </Styles.TableWrapper>\n )\n}\n"],"names":["Table","data","headers","onSelectionChange","selectable","selected","header","footer","borderRadius","spacing","boxShadow","mobileLayout","onRowClick","hoverable","rest","selectedRows","setSelectedRows","useState","useEffect","handleToggleSelect","row","newSelectedRows","includes","filter","selectedRow","renderDefaultRow","index","_jsx","TableRow","onSelect","Boolean","onClick","_jsxs","Styles","direction","Box","width","children","TableHead","length","handleToggleSelectAll","map","customRender","$align"],"mappings":"mWAiBO,MAAMA,EAAQA,EACnBC,OACAC,UACAC,oBACAC,aACAC,WACAC,SACAC,SACAC,eACAC,UACAC,YACAC,eAAe,SACfC,aACAC,eACGC,MAEH,MAAOC,EAAcC,GAAmBC,EAAsBZ,GAAY,IAE1Ea,GAAU,KACJb,GACFW,EAAgBX,EAClB,GACC,CAACA,EAAUU,IAEd,MAUMI,EAAsBC,IAC1B,IAAIC,EAA+BN,EAEjCM,EADEN,EAAaO,SAASF,GACNL,EAAaQ,QAC5BC,GAAgBA,IAAgBJ,IAGjB,IAAIL,EAAcK,GAGtCJ,EAAgBK,GAChBlB,IAAoBkB,EAAgB,EAGhCI,EAAmBA,CAACL,EAAgBM,IACxCC,EAACC,GAEC3B,KAAMmB,EACNlB,QAASA,EACTE,WAAYA,EACZC,SAAUU,EAAaO,SAASF,GAChCS,SAAUV,EACVO,MAAOA,EACPjB,QAASA,EACTI,UAAWA,GAAaiB,QAAQlB,GAChCmB,QAASnB,GATG,OAAAc,KAahB,OACEM,EAACC,iBACa,QACZC,UAAU,SACV1B,aAAcA,EACdE,UAAWA,KACPI,YAEHR,GAAUqB,EAACQ,EAAG,CAACC,MAAM,OAAQC,SAAA/B,IAC9B0B,EAACC,gBAA4C,UAAjBtB,EAAwB0B,SAAA,CAClDV,EAACW,EAAS,CACRpC,QAASA,EACTE,WAAYA,EACZC,SAAUU,EAAawB,SAAWtC,EAAKsC,OACvCV,SArDsBW,KAC5B,IAAInB,EAA+B,GAC/BN,EAAawB,SAAWtC,EAAKsC,SAC/BlB,EAAkB,IAAIpB,IAGxBe,EAAgBK,GAChBlB,IAAoBkB,EAAgB,EA+C9BZ,QAASA,IAEXkB,EAAA,QAAA,CAAAU,SACGpC,EAAKwC,KAAI,CAACrB,EAAKM,IACVN,EAAIsB,aAEJf,EAACM,iBAEa,aAAYI,SAExBV,EAACM,EAAkB,CAAAU,OAAQ,SAASP,MAAM,OACvCC,SAAAjB,EAAIsB,aAAatB,EAAKM,EAAOD,MAJb,cAAAC,KASlBD,EAAiBL,EAAKM,UAIlCnB,GAAUoB,EAACQ,EAAI,CAAAC,MAAM,OAAMC,SAAE9B,MACV"}
@@ -1,11 +1,12 @@
1
- import{styled as t,css as e}from"styled-components";import{Box as i}from"../box/box.comp.js";import{getThemeColor as d}from"../../../theme/theme.util.js";import{media as o}from"../../../theme/media.js";const a=t(i).withConfig({shouldForwardProp:t=>!["borderRadius","boxShadow"].includes(t)})`
1
+ import{styled as t,css as e}from"styled-components";import{Box as i}from"../box/box.comp.js";import{getThemeColor as d}from"../../../theme/theme.util.js";import{thinScrollbar as o}from"../../../theme/scrollbar.js";import{media as a}from"../../../theme/media.js";const r=t(i).withConfig({shouldForwardProp:t=>!["borderRadius","boxShadow"].includes(t)})`
2
2
  width: 100%;
3
3
  border-radius: ${t=>t.borderRadius??t.theme.border_radius.table};
4
4
  border: 1px solid ${({theme:t})=>d("grey_5",t)};
5
5
  overflow-y: hidden;
6
6
  overflow-x: auto;
7
+ ${o}
7
8
  box-shadow: ${t=>t.boxShadow??void 0};
8
- `,r=t.table`
9
+ `,n=t.table`
9
10
  width: 100%;
10
11
  min-width: fit-content;
11
12
  border-collapse: collapse;
@@ -13,7 +14,7 @@ import{styled as t,css as e}from"styled-components";import{Box as i}from"../box/
13
14
  flex-direction: column;
14
15
 
15
16
  ${({$mobileCards:t,theme:i})=>t&&e`
16
- ${o.down("md")} {
17
+ ${a.down("md")} {
17
18
  min-width: 0;
18
19
 
19
20
  thead {
@@ -59,16 +60,16 @@ import{styled as t,css as e}from"styled-components";import{Box as i}from"../box/
59
60
  }
60
61
  }
61
62
  `}
62
- `,n=t.td`
63
+ `,l=t.td`
63
64
  ${({$align:t})=>`justify-content: ${t};`}
64
65
  padding: 0;
65
66
  display: flex;
66
67
  ${({width:t})=>t?`\n width: ${t};\n `:"\n flex: 1;\n "}
67
- min-width: ${({minWidth:t})=>t??void 0};
68
- `,l=t.tr`
68
+ min-width: ${({$minWidth:t})=>t??void 0};
69
+ `,s=t.tr`
69
70
  display: flex;
70
71
  border-bottom: 1px solid ${({theme:t})=>d("grey_5",t)};
71
- `,s=t.td`
72
+ `,p=t.td`
72
73
  padding: 0;
73
74
  display: flex;
74
75
  justify-content: center;
@@ -78,5 +79,5 @@ import{styled as t,css as e}from"styled-components";import{Box as i}from"../box/
78
79
  padding-right: 0;
79
80
  padding: 0;
80
81
  }
81
- `;export{l as CustomTableRow,s as SelectableColumn,r as Table,n as TableColumn,a as TableWrapper};
82
+ `;export{s as CustomTableRow,p as SelectableColumn,n as Table,l as TableColumn,r as TableWrapper};
82
83
  //# sourceMappingURL=table.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.styles.js","sources":["../../../../../src/components/layout/table/table.styles.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { getThemeColor, media } from '../../../theme'\nimport { Box } from '../box'\n\nimport { CellAlign } from './table.types'\n\nexport const TableWrapper = styled(Box).withConfig({\n shouldForwardProp: (prop) => !['borderRadius', 'boxShadow'].includes(prop),\n})`\n width: 100%;\n border-radius: ${(props) =>\n props.borderRadius ?? props.theme.border_radius.table};\n border: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n overflow-y: hidden;\n overflow-x: auto;\n box-shadow: ${(props) => props.boxShadow ?? undefined};\n`\n\nexport const Table = styled.table<{ $mobileCards?: boolean }>`\n width: 100%;\n min-width: fit-content;\n border-collapse: collapse;\n display: flex;\n flex-direction: column;\n\n ${({ $mobileCards, theme }) =>\n $mobileCards &&\n css`\n ${media.down('md')} {\n min-width: 0;\n\n thead {\n display: none;\n }\n\n tbody {\n display: flex;\n flex-direction: column;\n gap: ${theme.spacing[1]};\n padding: ${theme.spacing[1]};\n }\n\n tr[data-testid='table-row'] {\n flex-direction: column;\n align-items: stretch;\n gap: ${theme.spacing[1]};\n min-height: 0;\n padding: ${theme.spacing[2]};\n border: 1px solid ${getThemeColor('grey_5', theme)};\n border-radius: ${theme.radius.lg};\n }\n\n tr[data-testid='table-row'] > td {\n width: 100%;\n min-width: 0;\n justify-content: space-between;\n align-items: center;\n gap: ${theme.spacing[2]};\n }\n\n tr[data-testid='table-row'] > td[data-label]::before {\n content: attr(data-label);\n flex: none;\n max-width: 45%;\n font-size: ${theme.typography.textSize.caption};\n color: ${getThemeColor('grey_3', theme)};\n }\n\n tr[data-testid='table-row'] > td[data-label] > * {\n width: auto;\n text-align: right;\n }\n }\n `}\n`\n\nexport const TableColumn = styled.td<{\n $align: CellAlign\n width?: string\n minWidth?: string\n}>`\n ${({ $align }) => `justify-content: ${$align};`}\n padding: 0;\n display: flex;\n ${({ width }) => {\n if (width) {\n return `\n width: ${width};\n `\n }\n return `\n flex: 1;\n `\n }}\n min-width: ${({ minWidth }) => minWidth ?? undefined};\n`\n\nexport const CustomTableRow = styled.tr`\n display: flex;\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n`\n\nexport const SelectableColumn = styled.td`\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:last-child {\n padding-right: 0;\n padding: 0;\n }\n`\n"],"names":["TableWrapper","styled","Box","withConfig","shouldForwardProp","prop","includes","props","borderRadius","theme","border_radius","table","getThemeColor","boxShadow","undefined","Table","$mobileCards","css","media","down","spacing","radius","lg","typography","textSize","caption","TableColumn","td","$align","width","minWidth","CustomTableRow","tr","SelectableColumn"],"mappings":"0MAOO,MAAMA,EAAeC,EAAOC,GAAKC,WAAW,CACjDC,kBAAoBC,IAAU,CAAC,eAAgB,aAAaC,SAASD,IACrE;;mBAEkBE,GAChBA,EAAMC,cAAgBD,EAAME,MAAMC,cAAcC;sBAC9B,EAAGF,WAAYG,EAAc,SAAUH;;;gBAG5CF,GAAUA,EAAMM,gBAAaC;EAGjCC,EAAQd,EAAOU,KAAiC;;;;;;;IAOzD,EAAGK,eAAcP,WACjBO,GACAC,CAAG;QACCC,EAAMC,KAAK;;;;;;;;;;iBAUFV,EAAMW,QAAQ;qBACVX,EAAMW,QAAQ;;;;;;iBAMlBX,EAAMW,QAAQ;;qBAEVX,EAAMW,QAAQ;8BACLR,EAAc,SAAUH;2BAC3BA,EAAMY,OAAOC;;;;;;;;iBAQvBb,EAAMW,QAAQ;;;;;;;uBAORX,EAAMc,WAAWC,SAASC;mBAC9Bb,EAAc,SAAUH;;;;;;;;;EAW9BiB,EAAczB,EAAO0B,EAIhC;IACE,EAAGC,YAAa,oBAAoBA;;;IAGpC,EAAGC,WACCA,EACK,oBACIA,aAGN;eAII,EAAGC,cAAeA,QAAYhB;EAGhCiB,EAAiB9B,EAAO+B,EAAE;;6BAEV,EAAGvB,WAAYG,EAAc,SAAUH;EAGvDwB,EAAmBhC,EAAO0B,EAAE;;;;;;;;;;"}
1
+ {"version":3,"file":"table.styles.js","sources":["../../../../../src/components/layout/table/table.styles.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { getThemeColor, media, thinScrollbar } from '../../../theme'\nimport { Box } from '../box'\n\nimport { CellAlign } from './table.types'\n\nexport const TableWrapper = styled(Box).withConfig({\n shouldForwardProp: (prop) => !['borderRadius', 'boxShadow'].includes(prop),\n})`\n width: 100%;\n border-radius: ${(props) =>\n props.borderRadius ?? props.theme.border_radius.table};\n border: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n overflow-y: hidden;\n overflow-x: auto;\n ${thinScrollbar}\n box-shadow: ${(props) => props.boxShadow ?? undefined};\n`\n\nexport const Table = styled.table<{ $mobileCards?: boolean }>`\n width: 100%;\n min-width: fit-content;\n border-collapse: collapse;\n display: flex;\n flex-direction: column;\n\n ${({ $mobileCards, theme }) =>\n $mobileCards &&\n css`\n ${media.down('md')} {\n min-width: 0;\n\n thead {\n display: none;\n }\n\n tbody {\n display: flex;\n flex-direction: column;\n gap: ${theme.spacing[1]};\n padding: ${theme.spacing[1]};\n }\n\n tr[data-testid='table-row'] {\n flex-direction: column;\n align-items: stretch;\n gap: ${theme.spacing[1]};\n min-height: 0;\n padding: ${theme.spacing[2]};\n border: 1px solid ${getThemeColor('grey_5', theme)};\n border-radius: ${theme.radius.lg};\n }\n\n tr[data-testid='table-row'] > td {\n width: 100%;\n min-width: 0;\n justify-content: space-between;\n align-items: center;\n gap: ${theme.spacing[2]};\n }\n\n tr[data-testid='table-row'] > td[data-label]::before {\n content: attr(data-label);\n flex: none;\n max-width: 45%;\n font-size: ${theme.typography.textSize.caption};\n color: ${getThemeColor('grey_3', theme)};\n }\n\n tr[data-testid='table-row'] > td[data-label] > * {\n width: auto;\n text-align: right;\n }\n }\n `}\n`\n\nexport const TableColumn = styled.td<{\n $align: CellAlign\n width?: string\n $minWidth?: string\n}>`\n ${({ $align }) => `justify-content: ${$align};`}\n padding: 0;\n display: flex;\n ${({ width }) => {\n if (width) {\n return `\n width: ${width};\n `\n }\n return `\n flex: 1;\n `\n }}\n min-width: ${({ $minWidth }) => $minWidth ?? undefined};\n`\n\nexport const CustomTableRow = styled.tr`\n display: flex;\n border-bottom: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n`\n\nexport const SelectableColumn = styled.td`\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:last-child {\n padding-right: 0;\n padding: 0;\n }\n`\n"],"names":["TableWrapper","styled","Box","withConfig","shouldForwardProp","prop","includes","props","borderRadius","theme","border_radius","table","getThemeColor","thinScrollbar","boxShadow","undefined","Table","$mobileCards","css","media","down","spacing","radius","lg","typography","textSize","caption","TableColumn","td","$align","width","$minWidth","CustomTableRow","tr","SelectableColumn"],"mappings":"sQAOO,MAAMA,EAAeC,EAAOC,GAAKC,WAAW,CACjDC,kBAAoBC,IAAU,CAAC,eAAgB,aAAaC,SAASD,IACrE;;mBAEkBE,GAChBA,EAAMC,cAAgBD,EAAME,MAAMC,cAAcC;sBAC9B,EAAGF,WAAYG,EAAc,SAAUH;;;IAGzDI;gBACaN,GAAUA,EAAMO,gBAAaC;EAGjCC,EAAQf,EAAOU,KAAiC;;;;;;;IAOzD,EAAGM,eAAcR,WACjBQ,GACAC,CAAG;QACCC,EAAMC,KAAK;;;;;;;;;;iBAUFX,EAAMY,QAAQ;qBACVZ,EAAMY,QAAQ;;;;;;iBAMlBZ,EAAMY,QAAQ;;qBAEVZ,EAAMY,QAAQ;8BACLT,EAAc,SAAUH;2BAC3BA,EAAMa,OAAOC;;;;;;;;iBAQvBd,EAAMY,QAAQ;;;;;;;uBAORZ,EAAMe,WAAWC,SAASC;mBAC9Bd,EAAc,SAAUH;;;;;;;;;EAW9BkB,EAAc1B,EAAO2B,EAIhC;IACE,EAAGC,YAAa,oBAAoBA;;;IAGpC,EAAGC,WACCA,EACK,oBACIA,aAGN;eAII,EAAGC,eAAgBA,QAAahB;EAGlCiB,EAAiB/B,EAAOgC,EAAE;;6BAEV,EAAGxB,WAAYG,EAAc,SAAUH;EAGvDyB,EAAmBjC,EAAO2B,EAAE;;;;;;;;;;"}