blockforce-design-system 2.0.6 → 2.0.9

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 (35) hide show
  1. package/MIGRATION.md +4 -0
  2. package/lib/ai/components.json +5 -5
  3. package/lib/ai/tokens.md +1 -1
  4. package/lib/commonjs/components/buttons/button/button.comp.js +1 -1
  5. package/lib/commonjs/components/buttons/button/button.comp.js.map +1 -1
  6. package/lib/commonjs/components/buttons/button/button.styles.js +85 -60
  7. package/lib/commonjs/components/buttons/button/button.styles.js.map +1 -1
  8. package/lib/commonjs/components/feedback/alert/alert.styles.js +23 -22
  9. package/lib/commonjs/components/feedback/alert/alert.styles.js.map +1 -1
  10. package/lib/commonjs/components/feedback/tag/tag.styles.js +17 -15
  11. package/lib/commonjs/components/feedback/tag/tag.styles.js.map +1 -1
  12. package/lib/commonjs/components/icons/icon/icon.comp.js +1 -1
  13. package/lib/commonjs/components/icons/icon/icon.comp.js.map +1 -1
  14. package/lib/commonjs/components/icons/icon/icon.context.js +2 -0
  15. package/lib/commonjs/components/icons/icon/icon.context.js.map +1 -0
  16. package/lib/commonjs/theme/gradient-border-print.js +16 -0
  17. package/lib/commonjs/theme/gradient-border-print.js.map +1 -0
  18. package/lib/index.d.ts +5 -4
  19. package/lib/module/components/buttons/button/button.comp.js +1 -1
  20. package/lib/module/components/buttons/button/button.comp.js.map +1 -1
  21. package/lib/module/components/buttons/button/button.styles.js +101 -76
  22. package/lib/module/components/buttons/button/button.styles.js.map +1 -1
  23. package/lib/module/components/feedback/alert/alert.styles.js +23 -22
  24. package/lib/module/components/feedback/alert/alert.styles.js.map +1 -1
  25. package/lib/module/components/feedback/tag/tag.styles.js +14 -12
  26. package/lib/module/components/feedback/tag/tag.styles.js.map +1 -1
  27. package/lib/module/components/icons/icon/icon.comp.js +1 -1
  28. package/lib/module/components/icons/icon/icon.comp.js.map +1 -1
  29. package/lib/module/components/icons/icon/icon.context.js +2 -0
  30. package/lib/module/components/icons/icon/icon.context.js.map +1 -0
  31. package/lib/module/theme/gradient-border-print.js +16 -0
  32. package/lib/module/theme/gradient-border-print.js.map +1 -0
  33. package/llms-full.txt +5 -4
  34. package/llms.txt +1 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"alert.styles.js","sources":["../../../../../src/components/feedback/alert/alert.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { AlertStatus } from './alert.types'\n\nexport const Wrapper = styled.div<{ $status: AlertStatus }>`\n display: flex;\n align-items: flex-start;\n gap: ${({ theme }) => theme.spacing.sm};\n width: 100%;\n padding: ${({ theme }) => `${theme.spacing[1.5]} ${theme.spacing.md}`};\n border: 1px solid ${({ $status, theme }) => theme.colors.state[$status]};\n border-radius: ${({ theme }) => theme.radius.md};\n background: ${({ $status, theme }) => theme.colors.stateSubtle[$status]};\n font-family: ${({ theme }) => theme.typography.fontFamily};\n`\n\nexport const IconSlot = styled.span`\n display: flex;\n flex: none;\n padding-top: 1px;\n`\n\nexport const Content = styled.div`\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n`\n\nexport const Title = styled.span<{ $status: AlertStatus }>`\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n font-weight: ${({ theme }) => theme.typography.fontWeight.semibold};\n color: ${({ $status, theme }) => theme.colors.stateText[$status]};\n`\n\nexport const Body = styled.div`\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n line-height: ${({ theme }) => theme.typography.lineHeight.normal};\n color: ${({ theme }) => theme.colors.grey_1};\n`\n\nexport const Side = styled.div`\n display: flex;\n flex: none;\n align-items: center;\n gap: ${({ theme }) => theme.spacing.xs};\n margin: -4px -8px -4px 0;\n color: ${({ theme }) => theme.colors.grey_1};\n\n & > button:not([data-testid='icon-button']),\n & > a {\n color: inherit;\n }\n`\n"],"names":["Wrapper","styled","div","theme","spacing","sm","md","$status","colors","state","radius","stateSubtle","typography","fontFamily","IconSlot","span","Content","Title","textSize","bodySm","fontWeight","semibold","stateText","Body","lineHeight","normal","grey_1","Side","xs"],"mappings":"2CAIaA,MAAAA,EAAUC,EAAOC,GAA6B;;;SAGlD,EAAGC,WAAYA,EAAMC,QAAQC;;aAEzB,EAAGF,cAAeA,EAAMC,QAAQ,QAAQD,EAAMC,QAAQE;sBAC7C,EAAGC,UAASJ,WAAYA,EAAMK,OAAOC,MAAMF;mBAC9C,EAAGJ,WAAYA,EAAMO,OAAOJ;gBAC/B,EAAGC,UAASJ,WAAYA,EAAMK,OAAOG,YAAYJ;iBAChD,EAAGJ,WAAYA,EAAMS,WAAWC;EAGpCC,EAAWb,EAAOc,IAAI;;;;EAMtBC,EAAUf,EAAOC,GAAG;;;;;;EAQpBe,EAAQhB,EAAOc,IAA8B;eAC3C,EAAGZ,WAAYA,EAAMS,WAAWM,SAASC;iBACvC,EAAGhB,WAAYA,EAAMS,WAAWQ,WAAWC;WACjD,EAAGd,UAASJ,WAAYA,EAAMK,OAAOc,UAAUf;EAG7CgB,EAAOtB,EAAOC,GAAG;eACf,EAAGC,WAAYA,EAAMS,WAAWM,SAASC;iBACvC,EAAGhB,WAAYA,EAAMS,WAAWY,WAAWC;WACjD,EAAGtB,WAAYA,EAAMK,OAAOkB;EAG1BC,EAAO1B,EAAOC,GAAG;;;;SAIrB,EAAGC,WAAYA,EAAMC,QAAQwB;;WAE3B,EAAGzB,WAAYA,EAAMK,OAAOkB;;;;;;"}
1
+ {"version":3,"file":"alert.styles.js","sources":["../../../../../src/components/feedback/alert/alert.styles.tsx"],"sourcesContent":["import { styled } from 'styled-components'\n\nimport { AlertStatus } from './alert.types'\n\nexport const Wrapper = styled.div<{ $status: AlertStatus }>`\n display: flex;\n align-items: flex-start;\n gap: ${({ theme }) => theme.spacing.sm};\n width: 100%;\n padding: ${({ theme }) => `${theme.spacing[1.5]} ${theme.spacing.md}`};\n border: 1px solid ${({ $status, theme }) => theme.colors.state[$status]};\n border-radius: ${({ theme }) => theme.radius.md};\n background: ${({ $status, theme }) => theme.colors.stateSubtle[$status]};\n font-family: ${({ theme }) => theme.typography.fontFamily};\n`\n\nexport const IconSlot = styled.span`\n display: flex;\n flex: none;\n padding-top: 1px;\n`\n\nexport const Content = styled.div`\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n`\n\nexport const Title = styled.span<{ $status: AlertStatus }>`\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n font-weight: ${({ theme }) => theme.typography.fontWeight.semibold};\n color: ${({ $status, theme }) => theme.colors.stateText[$status]};\n`\n\nexport const Body = styled.div`\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n line-height: ${({ theme }) => theme.typography.lineHeight.normal};\n color: ${({ theme }) => theme.colors.grey_1};\n`\n\nexport const Side = styled.div`\n display: flex;\n flex: none;\n align-items: center;\n gap: ${({ theme }) => theme.spacing.xs};\n margin: -4px -8px -4px 0;\n color: ${({ theme }) => theme.colors.grey_1};\n\n & > button[data-variant='text'],\n & > button:not([data-variant]):not([data-testid='icon-button']),\n & > a {\n color: inherit;\n }\n`\n"],"names":["Wrapper","styled","div","theme","spacing","sm","md","$status","colors","state","radius","stateSubtle","typography","fontFamily","IconSlot","span","Content","Title","textSize","bodySm","fontWeight","semibold","stateText","Body","lineHeight","normal","grey_1","Side","xs"],"mappings":"2CAIaA,MAAAA,EAAUC,EAAOC,GAA6B;;;SAGlD,EAAGC,WAAYA,EAAMC,QAAQC;;aAEzB,EAAGF,cAAeA,EAAMC,QAAQ,QAAQD,EAAMC,QAAQE;sBAC7C,EAAGC,UAASJ,WAAYA,EAAMK,OAAOC,MAAMF;mBAC9C,EAAGJ,WAAYA,EAAMO,OAAOJ;gBAC/B,EAAGC,UAASJ,WAAYA,EAAMK,OAAOG,YAAYJ;iBAChD,EAAGJ,WAAYA,EAAMS,WAAWC;EAGpCC,EAAWb,EAAOc,IAAI;;;;EAMtBC,EAAUf,EAAOC,GAAG;;;;;;EAQpBe,EAAQhB,EAAOc,IAA8B;eAC3C,EAAGZ,WAAYA,EAAMS,WAAWM,SAASC;iBACvC,EAAGhB,WAAYA,EAAMS,WAAWQ,WAAWC;WACjD,EAAGd,UAASJ,WAAYA,EAAMK,OAAOc,UAAUf;EAG7CgB,EAAOtB,EAAOC,GAAG;eACf,EAAGC,WAAYA,EAAMS,WAAWM,SAASC;iBACvC,EAAGhB,WAAYA,EAAMS,WAAWY,WAAWC;WACjD,EAAGtB,WAAYA,EAAMK,OAAOkB;EAG1BC,EAAO1B,EAAOC,GAAG;;;;SAIrB,EAAGC,WAAYA,EAAMC,QAAQwB;;WAE3B,EAAGzB,WAAYA,EAAMK,OAAOkB;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import{styled as e,css as o}from"styled-components";import{getThemeColor as t,mixColors as r,getReadableTextColor as i}from"../../../theme/theme.util.js";import{Box as n}from"../../layout/box/box.comp.js";const a=e=>e.replace(/^state\./,""),l=e(n)`
1
+ import{styled as e,css as o}from"styled-components";import{gradientBorderPrint as t}from"../../../theme/gradient-border-print.js";import{getThemeColor as r,mixColors as i,getReadableTextColor as n}from"../../../theme/theme.util.js";import{Box as a}from"../../layout/box/box.comp.js";const l=e=>e.replace(/^state\./,""),s=e(a)`
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  vertical-align: middle;
@@ -7,7 +7,7 @@ import{styled as e,css as o}from"styled-components";import{getThemeColor as t,mi
7
7
  padding: 4px 8px;
8
8
  width: ${({$width:e})=>e||"auto"};
9
9
 
10
- ${({$gradient:e,$color:n,$backgroundColor:l,$borderColor:s,theme:c})=>e?o`
10
+ ${({$gradient:e,$color:a,$backgroundColor:s,$borderColor:d,theme:c})=>e?o`
11
11
  background-color: transparent;
12
12
  border: none;
13
13
 
@@ -28,32 +28,34 @@ import{styled as e,css as o}from"styled-components";import{getThemeColor as t,mi
28
28
  mask-composite: exclude;
29
29
  pointer-events: none;
30
30
  }
31
+
32
+ ${t(1,c)}
31
33
  `:o`
32
- background-color: ${l?t(l,c):((e,o)=>o.colors.stateSubtle[a(e)]??`color-mix(in srgb, ${t(e,o)} 13%, ${o.colors.white})`)(n,c)};
33
- color: ${((e,o)=>{const n=a(e);if(o.colors.stateText[n])return o.colors.stateText[n];if(e.startsWith("grey_"))return t(e,o);const l=t(e,o),s=r(l,o.colors.white,.13);return s?i(e,o,s):l})(n,c)};
34
- border: 1px solid ${t(s??n,c)};
34
+ background-color: ${s?r(s,c):((e,o)=>o.colors.stateSubtle[l(e)]??`color-mix(in srgb, ${r(e,o)} 13%, ${o.colors.white})`)(a,c)};
35
+ color: ${((e,o)=>{const t=l(e);if(o.colors.stateText[t])return o.colors.stateText[t];if(e.startsWith("grey_"))return r(e,o);const a=r(e,o),s=i(a,o.colors.white,.13);return s?n(e,o,s):a})(a,c)};
36
+ border: 1px solid ${r(d??a,c)};
35
37
  `}
36
38
  cursor: ${({$clickable:e})=>e?"pointer":"default"};
37
39
 
38
- ${({$clickable:e,theme:r})=>e&&o`
40
+ ${({$clickable:e,theme:t})=>e&&o`
39
41
  &:hover {
40
42
  opacity: 0.8;
41
43
  }
42
44
 
43
45
  &:focus-visible {
44
- outline: 2px solid ${t("primary",r)};
46
+ outline: 2px solid ${r("primary",t)};
45
47
  outline-offset: 2px;
46
48
  }
47
49
  `}
48
- `,s=e(n)`
50
+ `,d=e(a)`
49
51
  width: ${({$outlined:e})=>e?"10px":"8px"};
50
52
  height: ${({$outlined:e})=>e?"10px":"8px"};
51
53
  border-radius: 50%;
52
- background-color: ${({$color:e,theme:o})=>t(e,o)};
54
+ background-color: ${({$color:e,theme:o})=>r(e,o)};
53
55
  flex: none;
54
56
 
55
- ${({$outlined:e,$outlineColor:r,theme:i})=>e&&o`
56
- box-shadow: 0 0 0 1px ${t(r??"grey_1",i)};
57
+ ${({$outlined:e,$outlineColor:t,theme:i})=>e&&o`
58
+ box-shadow: 0 0 0 1px ${r(t??"grey_1",i)};
57
59
  `}
58
60
  `,c=e.span`
59
61
  text-align: center;
@@ -67,5 +69,5 @@ import{styled as e,css as o}from"styled-components";import{getThemeColor as t,mi
67
69
  `:o`
68
70
  color: inherit;
69
71
  `}
70
- `;export{s as StatusDot,c as TagText,l as TagWrapper};
72
+ `;export{d as StatusDot,c as TagText,s as TagWrapper};
71
73
  //# sourceMappingURL=tag.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tag.styles.js","sources":["../../../../../src/components/feedback/tag/tag.styles.tsx"],"sourcesContent":["import { css, DefaultTheme, styled } from 'styled-components'\n\nimport { getReadableTextColor, getThemeColor, mixColors } from '../../../theme'\nimport { Box } from '../../layout/box'\n\n/**\n * Texto da etiqueta: cor de estado vira o tom de texto do estado (`stateText`); outras cores (exceto cinzas)\n * escurecem só o necessário para ter contraste sobre o fundo claro da etiqueta.\n */\nconst TINT = 0.13\n\nconst stateOf = (color: string) =>\n color.replace(/^state\\./, '') as keyof DefaultTheme['colors']['stateText']\n\nconst getTagBackground = (color: string, theme: DefaultTheme) =>\n theme.colors.stateSubtle[stateOf(color)] ??\n `color-mix(in srgb, ${getThemeColor(color, theme)} ${TINT * 100}%, ${theme.colors.white})`\n\nconst getTagTextColor = (color: string, theme: DefaultTheme) => {\n const state = stateOf(color)\n if (theme.colors.stateText[state]) return theme.colors.stateText[state]\n if (color.startsWith('grey_')) return getThemeColor(color, theme)\n const solid = getThemeColor(color, theme)\n const background = mixColors(solid, theme.colors.white, TINT)\n return background ? getReadableTextColor(color, theme, background) : solid\n}\n\nexport const TagWrapper = styled(Box)<{\n $color: string\n $backgroundColor?: string\n $width?: string\n $borderColor?: string\n $gradient?: boolean\n $clickable?: boolean\n}>`\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n border-radius: ${({ theme }) => theme.radius['2xl']};\n font-size: ${({ theme }) => theme.typography.textSize.caption};\n padding: 4px 8px;\n width: ${({ $width }) => $width || 'auto'};\n\n ${({ $gradient, $color, $backgroundColor, $borderColor, theme }) => {\n if ($gradient) {\n return css`\n background-color: transparent;\n border: none;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: ${theme.radius['2xl']};\n padding: 1px;\n background: ${theme.colors.brand.gradient};\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n pointer-events: none;\n }\n `\n }\n\n return css`\n background-color: ${$backgroundColor\n ? getThemeColor($backgroundColor, theme)\n : getTagBackground($color, theme)};\n color: ${getTagTextColor($color, theme)};\n border: 1px solid ${getThemeColor($borderColor ?? $color, theme)};\n `\n }}\n cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};\n\n ${({ $clickable, theme }) =>\n $clickable &&\n css`\n &:hover {\n opacity: 0.8;\n }\n\n &:focus-visible {\n outline: 2px solid ${getThemeColor('primary', theme)};\n outline-offset: 2px;\n }\n `}\n`\n\n/**\n * Ponto de status. `$outlined` desenha um anel escuro: num ponto de 8px, cores claras\n * (como o amarelo de alerta) ficam abaixo de 3:1 sobre o fundo do chip.\n */\nexport const StatusDot = styled(Box)<{\n $color: string\n $outlined?: boolean\n $outlineColor?: string\n}>`\n width: ${({ $outlined }) => ($outlined ? '10px' : '8px')};\n height: ${({ $outlined }) => ($outlined ? '10px' : '8px')};\n border-radius: 50%;\n background-color: ${({ $color, theme }) => getThemeColor($color, theme)};\n flex: none;\n\n ${({ $outlined, $outlineColor, theme }) =>\n $outlined &&\n css`\n box-shadow: 0 0 0 1px ${getThemeColor($outlineColor ?? 'grey_1', theme)};\n `}\n`\n\n/**\n * Texto da tag, centralizado: um rótulo que quebra em duas linhas numa coluna estreita\n * continua com cara de pílula, sem a segunda linha encostada à esquerda.\n */\nexport const TagText = styled.span<{\n $gradient?: boolean\n}>`\n text-align: center;\n\n ${({ $gradient, theme }) =>\n $gradient\n ? css`\n background: ${theme.colors.brand.gradient};\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n -webkit-text-fill-color: transparent;\n `\n : css`\n color: inherit;\n `}\n`\n"],"names":["stateOf","color","replace","TagWrapper","styled","Box","theme","radius","typography","textSize","caption","$width","$gradient","$color","$backgroundColor","$borderColor","css","colors","brand","gradient","getThemeColor","getTagBackground","stateSubtle","white","getTagTextColor","state","stateText","startsWith","solid","background","mixColors","getReadableTextColor","$clickable","StatusDot","$outlined","$outlineColor","TagText","span"],"mappings":"6MASA,MAEMA,EAAWC,GACfA,EAAMC,QAAQ,WAAY,IAefC,EAAaC,EAAOC,EAO/B;;;;mBAIiB,EAAGC,WAAYA,EAAMC,OAAO;eAChC,EAAGD,WAAYA,EAAME,WAAWC,SAASC;;WAE7C,EAAGC,YAAaA,GAAU;;IAEjC,EAAGC,YAAWC,SAAQC,mBAAkBC,eAAcT,WAClDM,EACKI,CAAG;;;;;;;;2BAQWV,EAAMC,OAAO;;wBAEhBD,EAAMW,OAAOC,MAAMC;;;;;;;;;;;QAchCH,CAAG;0BACYF,EAChBM,EAAcN,EAAkBR,GAzDjBe,EAACpB,EAAeK,IACvCA,EAAMW,OAAOK,YAAYtB,EAAQC,KACjC,sBAAsBmB,EAAcnB,EAAOK,WAA0BA,EAAMW,OAAOM,SAwD1EF,CAAiBR,EAAQP;eAtDXkB,EAACvB,EAAeK,KACtC,MAAMmB,EAAQzB,EAAQC,GACtB,GAAIK,EAAMW,OAAOS,UAAUD,GAAQ,OAAOnB,EAAMW,OAAOS,UAAUD,GACjE,GAAIxB,EAAM0B,WAAW,SAAU,OAAOP,EAAcnB,EAAOK,GAC3D,MAAMsB,EAAQR,EAAcnB,EAAOK,GAC7BuB,EAAaC,EAAUF,EAAOtB,EAAMW,OAAOM,MAdtC,KAeX,OAAOM,EAAaE,EAAqB9B,EAAOK,EAAOuB,GAAcD,CAAK,EAiD7DJ,CAAgBX,EAAQP;0BACbc,EAAcL,GAAgBF,EAAQP;;YAGpD,EAAG0B,gBAAkBA,EAAa,UAAY;;IAEtD,EAAGA,aAAY1B,WACf0B,GACAhB,CAAG;;;;;;6BAMsBI,EAAc,UAAWd;;;;EAUzC2B,EAAY7B,EAAOC,EAI9B;WACS,EAAG6B,eAAiBA,EAAY,OAAS;YACxC,EAAGA,eAAiBA,EAAY,OAAS;;sBAE/B,EAAGrB,SAAQP,WAAYc,EAAcP,EAAQP;;;IAG/D,EAAG4B,YAAWC,gBAAe7B,WAC7B4B,GACAlB,CAAG;8BACuBI,EAAce,GAAiB,SAAU7B;;EAQ1D8B,EAAUhC,EAAOiC,IAE5B;;;IAGE,EAAGzB,YAAWN,WACdM,EACII,CAAG;wBACaV,EAAMW,OAAOC,MAAMC;;;;;UAMnCH,CAAG;;;"}
1
+ {"version":3,"file":"tag.styles.js","sources":["../../../../../src/components/feedback/tag/tag.styles.tsx"],"sourcesContent":["import { css, DefaultTheme, styled } from 'styled-components'\n\nimport { getReadableTextColor, getThemeColor, mixColors } from '../../../theme'\nimport { gradientBorderPrint } from '../../../theme/gradient-border-print'\nimport { Box } from '../../layout/box'\n\n/**\n * Texto da etiqueta: cor de estado vira o tom de texto do estado (`stateText`); outras cores (exceto cinzas)\n * escurecem só o necessário para ter contraste sobre o fundo claro da etiqueta.\n */\nconst TINT = 0.13\n\nconst stateOf = (color: string) =>\n color.replace(/^state\\./, '') as keyof DefaultTheme['colors']['stateText']\n\nconst getTagBackground = (color: string, theme: DefaultTheme) =>\n theme.colors.stateSubtle[stateOf(color)] ??\n `color-mix(in srgb, ${getThemeColor(color, theme)} ${TINT * 100}%, ${theme.colors.white})`\n\nconst getTagTextColor = (color: string, theme: DefaultTheme) => {\n const state = stateOf(color)\n if (theme.colors.stateText[state]) return theme.colors.stateText[state]\n if (color.startsWith('grey_')) return getThemeColor(color, theme)\n const solid = getThemeColor(color, theme)\n const background = mixColors(solid, theme.colors.white, TINT)\n return background ? getReadableTextColor(color, theme, background) : solid\n}\n\nexport const TagWrapper = styled(Box)<{\n $color: string\n $backgroundColor?: string\n $width?: string\n $borderColor?: string\n $gradient?: boolean\n $clickable?: boolean\n}>`\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n border-radius: ${({ theme }) => theme.radius['2xl']};\n font-size: ${({ theme }) => theme.typography.textSize.caption};\n padding: 4px 8px;\n width: ${({ $width }) => $width || 'auto'};\n\n ${({ $gradient, $color, $backgroundColor, $borderColor, theme }) => {\n if ($gradient) {\n return css`\n background-color: transparent;\n border: none;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: ${theme.radius['2xl']};\n padding: 1px;\n background: ${theme.colors.brand.gradient};\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n pointer-events: none;\n }\n\n ${gradientBorderPrint(1, theme)}\n `\n }\n\n return css`\n background-color: ${$backgroundColor\n ? getThemeColor($backgroundColor, theme)\n : getTagBackground($color, theme)};\n color: ${getTagTextColor($color, theme)};\n border: 1px solid ${getThemeColor($borderColor ?? $color, theme)};\n `\n }}\n cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};\n\n ${({ $clickable, theme }) =>\n $clickable &&\n css`\n &:hover {\n opacity: 0.8;\n }\n\n &:focus-visible {\n outline: 2px solid ${getThemeColor('primary', theme)};\n outline-offset: 2px;\n }\n `}\n`\n\n/**\n * Ponto de status. `$outlined` desenha um anel escuro: num ponto de 8px, cores claras\n * (como o amarelo de alerta) ficam abaixo de 3:1 sobre o fundo do chip.\n */\nexport const StatusDot = styled(Box)<{\n $color: string\n $outlined?: boolean\n $outlineColor?: string\n}>`\n width: ${({ $outlined }) => ($outlined ? '10px' : '8px')};\n height: ${({ $outlined }) => ($outlined ? '10px' : '8px')};\n border-radius: 50%;\n background-color: ${({ $color, theme }) => getThemeColor($color, theme)};\n flex: none;\n\n ${({ $outlined, $outlineColor, theme }) =>\n $outlined &&\n css`\n box-shadow: 0 0 0 1px ${getThemeColor($outlineColor ?? 'grey_1', theme)};\n `}\n`\n\n/**\n * Texto da tag, centralizado: um rótulo que quebra em duas linhas numa coluna estreita\n * continua com cara de pílula, sem a segunda linha encostada à esquerda.\n */\nexport const TagText = styled.span<{\n $gradient?: boolean\n}>`\n text-align: center;\n\n ${({ $gradient, theme }) =>\n $gradient\n ? css`\n background: ${theme.colors.brand.gradient};\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n -webkit-text-fill-color: transparent;\n `\n : css`\n color: inherit;\n `}\n`\n"],"names":["stateOf","color","replace","TagWrapper","styled","Box","theme","radius","typography","textSize","caption","$width","$gradient","$color","$backgroundColor","$borderColor","css","colors","brand","gradient","gradientBorderPrint","getThemeColor","getTagBackground","stateSubtle","white","getTagTextColor","state","stateText","startsWith","solid","background","mixColors","getReadableTextColor","$clickable","StatusDot","$outlined","$outlineColor","TagText","span"],"mappings":"2RAUA,MAEMA,EAAWC,GACfA,EAAMC,QAAQ,WAAY,IAefC,EAAaC,EAAOC,EAO/B;;;;mBAIiB,EAAGC,WAAYA,EAAMC,OAAO;eAChC,EAAGD,WAAYA,EAAME,WAAWC,SAASC;;WAE7C,EAAGC,YAAaA,GAAU;;IAEjC,EAAGC,YAAWC,SAAQC,mBAAkBC,eAAcT,WAClDM,EACKI,CAAG;;;;;;;;2BAQWV,EAAMC,OAAO;;wBAEhBD,EAAMW,OAAOC,MAAMC;;;;;;;;;;;;UAYjCC,EAAoB,EAAGd;QAItBU,CAAG;0BACYF,EAChBO,EAAcP,EAAkBR,GA3DjBgB,EAACrB,EAAeK,IACvCA,EAAMW,OAAOM,YAAYvB,EAAQC,KACjC,sBAAsBoB,EAAcpB,EAAOK,WAA0BA,EAAMW,OAAOO,SA0D1EF,CAAiBT,EAAQP;eAxDXmB,EAACxB,EAAeK,KACtC,MAAMoB,EAAQ1B,EAAQC,GACtB,GAAIK,EAAMW,OAAOU,UAAUD,GAAQ,OAAOpB,EAAMW,OAAOU,UAAUD,GACjE,GAAIzB,EAAM2B,WAAW,SAAU,OAAOP,EAAcpB,EAAOK,GAC3D,MAAMuB,EAAQR,EAAcpB,EAAOK,GAC7BwB,EAAaC,EAAUF,EAAOvB,EAAMW,OAAOO,MAdtC,KAeX,OAAOM,EAAaE,EAAqB/B,EAAOK,EAAOwB,GAAcD,CAAK,EAmD7DJ,CAAgBZ,EAAQP;0BACbe,EAAcN,GAAgBF,EAAQP;;YAGpD,EAAG2B,gBAAkBA,EAAa,UAAY;;IAEtD,EAAGA,aAAY3B,WACf2B,GACAjB,CAAG;;;;;;6BAMsBK,EAAc,UAAWf;;;;EAUzC4B,EAAY9B,EAAOC,EAI9B;WACS,EAAG8B,eAAiBA,EAAY,OAAS;YACxC,EAAGA,eAAiBA,EAAY,OAAS;;sBAE/B,EAAGtB,SAAQP,WAAYe,EAAcR,EAAQP;;;IAG/D,EAAG6B,YAAWC,gBAAe9B,WAC7B6B,GACAnB,CAAG;8BACuBK,EAAce,GAAiB,SAAU9B;;EAQ1D+B,EAAUjC,EAAOkC,IAE5B;;;IAGE,EAAG1B,YAAWN,WACdM,EACII,CAAG;wBACaV,EAAMW,OAAOC,MAAMC;;;;;UAMnCH,CAAG;;;"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{useContext as i,useId as o}from"react";import*as n from"react-icons/lu";import*as s from"react-icons/ri";import{ThemeContext as l}from"styled-components";import{getThemeColor as c}from"../../../theme/theme.util.js";import{isLucideName as a,parseIconNameToLucide as d,parseIconNameToRemixIcon as m}from"./icon.utils.js";import{iconsList as p}from"./svg/index.js";import{IconComp as f,HiddenDefs as h}from"./icon.styles.js";const u=({color:u,name:y,size:x=24,fill:g,defs:$,gradient:w,...z})=>{const E=i(l),j=`bf-icon-gradient-${o().replace(/:/g,"")}`,v=w?`url(#${j})`:g,A=w?e("defs",{children:r("linearGradient",{id:j,x1:"1",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"0%",stopColor:c("secondary",E)}),e("stop",{offset:"100%",stopColor:c("primary",E)})]})}):$,C=p(w?`url(#${j})`:c(u||"primary",E),x)[y];if(C){if(w)return r(f,{"data-testid":"icon",children:[e(h,{"aria-hidden":"true",children:A}),C]});if(A&&t.isValidElement(C)){const r=C.props.children;return e(f,{"data-testid":"icon",children:t.cloneElement(C,{},[A,...Array.isArray(r)?r:r?[r]:[]])})}return e(f,{"data-testid":"icon",children:C})}if(a(y)){const i=n[d(y)];return i?A&&v?r(f,{"data-testid":"icon",...z,children:[e(h,{"aria-hidden":"true",children:A}),t.createElement(i,{size:x,stroke:v})]}):e(f,{"data-testid":"icon",...z,children:t.createElement(i,{color:c(u||"primary",E)||u,size:x})}):null}const b=s[m(y)];return b?e(f,A&&v?{"data-testid":"icon",children:r("svg",{width:`${x}px`,height:`${x}px`,viewBox:`0 0 ${x} ${x}`,fill:v,xmlns:"http://www.w3.org/2000/svg",children:[A,t.createElement(b,{size:x,fill:v,style:{position:"relative",zIndex:1}})]})}:{"data-testid":"icon",...z,children:t.createElement(b,{color:c(u||"primary",E)||u,size:x})}):null};export{u as Icon};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{useContext as i,useId as o}from"react";import*as n from"react-icons/lu";import*as s from"react-icons/ri";import{ThemeContext as l}from"styled-components";import{getThemeColor as c}from"../../../theme/theme.util.js";import{IconGradientContext as a}from"./icon.context.js";import{isLucideName as d,parseIconNameToLucide as m,parseIconNameToRemixIcon as p}from"./icon.utils.js";import{iconsList as f}from"./svg/index.js";import{IconComp as h,HiddenDefs as u}from"./icon.styles.js";const y=({color:y,name:x,size:g=24,fill:$,defs:j,gradient:w,...z})=>{const E=i(l),v=i(a)||w,A=`bf-icon-gradient-${o().replace(/:/g,"")}`,C=v?`url(#${A})`:$,b=v?e("defs",{children:r("linearGradient",{id:A,x1:"1",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"0%",stopColor:c("secondary",E)}),e("stop",{offset:"100%",stopColor:c("primary",E)})]})}):j,k=f(v?`url(#${A})`:c(y||"primary",E),g)[x];if(k){if(v)return r(h,{"data-testid":"icon",children:[e(u,{"aria-hidden":"true",children:b}),k]});if(b&&t.isValidElement(k)){const r=k.props.children;return e(h,{"data-testid":"icon",children:t.cloneElement(k,{},[b,...Array.isArray(r)?r:r?[r]:[]])})}return e(h,{"data-testid":"icon",children:k})}if(d(x)){const i=n[m(x)];return i?b&&C?r(h,{"data-testid":"icon",...z,children:[e(u,{"aria-hidden":"true",children:b}),t.createElement(i,{size:g,stroke:C})]}):e(h,{"data-testid":"icon",...z,children:t.createElement(i,{color:c(y||"primary",E)||y,size:g})}):null}const B=s[p(x)];return B?e(h,b&&C?{"data-testid":"icon",children:r("svg",{width:`${g}px`,height:`${g}px`,viewBox:`0 0 ${g} ${g}`,fill:C,xmlns:"http://www.w3.org/2000/svg",children:[b,t.createElement(B,{size:g,fill:C,style:{position:"relative",zIndex:1}})]})}:{"data-testid":"icon",...z,children:t.createElement(B,{color:c(y||"primary",E)||y,size:g})}):null};export{y as Icon};
2
2
  //# sourceMappingURL=icon.comp.js.map
@@ -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\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
+ {"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 { IconGradientContext } from './icon.context'\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 * Dentro de um Button `gradientOutlined`, o ícone sai sempre em gradiente, como o texto do botão.\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: gradientProp,\n ...props\n}: IconProps) => {\n const theme = useContext(ThemeContext)\n const gradient = useContext(IconGradientContext) || gradientProp\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","gradientProp","props","theme","useContext","ThemeContext","IconGradientContext","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":"0hBA0BO,MAAMA,EAAOA,EAClBC,QACAC,OACAC,OAAO,GACPC,KAAMC,EACNC,KAAMC,EACNC,SAAUC,KACPC,MAEH,MAAMC,EAAQC,EAAWC,GACnBL,EAAWI,EAAWE,IAAwBL,EAC9CM,EAAiC,oBAAAC,IAAQC,QAAQ,KAAM,MAEvDb,EAAOI,EAAmB,QAAAO,KAAgBV,EAC1CC,EAAOE,EACXU,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,YAAajB,KACxDO,EAAM,OAAA,CAAAQ,OAAO,OAAOC,UAAWC,EAAc,UAAWjB,UAI5DJ,EAGIsB,EAAaC,EACjBtB,EACY,QAAAO,KACRa,EAAc3B,GAAgB,UAAWU,GAC7CR,GACAD,GAEF,GAAI2B,EAAY,CACd,GAAIrB,EACF,OACEY,EAACW,EAA4B,CAAA,cAAA,iBAC3Bb,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAb,IACtCuB,KAIP,GAAIvB,GAAQ0B,EAAMC,eAAeJ,GAAa,CAC5C,MAAMV,EAAYU,EAAkCnB,MAAMS,SAC1D,OACED,EAACa,EAA4B,CAAA,cAAA,OAC1BZ,SAAAa,EAAME,aAAaL,EAAY,CAAE,EAAE,CAClCvB,KACI6B,MAAMC,QAAQjB,GACdA,EACAA,EACE,CAACA,GACD,MAId,CACA,OAAOD,EAACa,iBAA4B,OAAMZ,SAAEU,GAC9C,CAEA,GAAIQ,EAAanC,GAAO,CACtB,MAAMoC,EAAaC,EAAWC,EAAsBtC,IAEpD,OAAKoC,EAKDhC,GAAQF,EAERgB,EAACW,iBAA4B,UAAWrB,EAAKS,SAAA,CAC3CD,EAACa,EAAiB,CAAA,cAAa,OAAQZ,SAAAb,IACtC0B,EAAMS,cAAcH,EAAY,CAAEnC,OAAMuC,OAAQtC,OAMrDc,EAACa,EAA4B,CAAA,cAAA,UAAWrB,WACrCsB,EAAMS,cAAcH,EAAY,CAC/BrC,MAAO2B,EAAc3B,GAAgB,UAAWU,IAAUV,EAC1DE,WAjBG,IAqBX,CAEA,MAAMwC,EAAYC,EAAUC,EAAyB3C,IAErD,OAAKyC,EAMDzB,EAACa,EAFDzB,GAAQF,EAEqB,CAAA,cAAA,gBAC3BgB,EACE,MAAA,CAAA0B,MAAU,GAAA3C,MACV4C,OAAW,GAAA5C,MACX6C,QAAgB,OAAA7C,KAAQA,IACxBC,KAAMA,EACN6C,MAAM,6BAA4B9B,SAAA,CAEjCb,EACA0B,EAAMS,cAAcE,EAAW,CAC9BxC,KAAMA,EACNC,KAAMA,EACN8C,MAAO,CAAEC,SAAU,WAAYC,OAAQ,SAQlB,CAAA,cAAA,UAAW1C,WACrCsB,EAAMS,cAAcE,EAAW,CAC9B1C,MAAO2B,EAAc3B,GAAgB,UAAWU,IAAUV,EAC1DE,KAAMA,MA5BH,IA8BW"}
@@ -0,0 +1,2 @@
1
+ import{createContext as o}from"react";const r=o(!1);export{r as IconGradientContext};
2
+ //# sourceMappingURL=icon.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.context.js","sources":["../../../../../src/components/icons/icon/icon.context.ts"],"sourcesContent":["import { createContext } from 'react'\n\n/**\n * Quando `true`, todo `Icon` de dentro se pinta com o gradiente da marca, ignorando `color`.\n * O `Button` `gradientOutlined` liga para o ícone acompanhar o texto, que já é gradiente.\n */\nexport const IconGradientContext = createContext(false)\n"],"names":["IconGradientContext","createContext"],"mappings":"4CAMaA,EAAsBC,GAAc"}
@@ -0,0 +1,16 @@
1
+ import{css as o}from"styled-components";const r=(r,t)=>{const e=t;return o`
2
+ @media print {
3
+ border: ${r}px solid transparent;
4
+ background:
5
+ linear-gradient(${e.colors.white}, ${e.colors.white})
6
+ padding-box,
7
+ ${e.colors.brand.gradient} border-box;
8
+ -webkit-print-color-adjust: exact;
9
+ print-color-adjust: exact;
10
+
11
+ &::before {
12
+ display: none;
13
+ }
14
+ }
15
+ `};export{r as gradientBorderPrint};
16
+ //# sourceMappingURL=gradient-border-print.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradient-border-print.js","sources":["../../../src/theme/gradient-border-print.ts"],"sourcesContent":["import { css, DefaultTheme } from 'styled-components'\n\nimport type { ThemeProps } from './theme.types'\n\n/**\n * Na impressão e no \"Salvar como PDF\" do Chrome, `mask-composite` é ignorado: a borda em gradiente\n * feita com máscara no `::before` vira um bloco cheio por cima do texto. Para imprimir, a borda volta\n * a ser o gradiente por baixo de um fundo branco (papel é branco), e as cores saem mesmo com\n * \"Gráficos de plano de fundo\" desligado. Uso interno da `Tag` com `gradient` e do `Button`\n * `gradientOutlined`.\n */\nexport const gradientBorderPrint = (\n width: number,\n styledTheme: DefaultTheme | ThemeProps,\n) => {\n const theme = styledTheme as ThemeProps\n return css`\n @media print {\n border: ${width}px solid transparent;\n background:\n linear-gradient(${theme.colors.white}, ${theme.colors.white})\n padding-box,\n ${theme.colors.brand.gradient} border-box;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n\n &::before {\n display: none;\n }\n }\n `\n}\n"],"names":["gradientBorderPrint","width","styledTheme","theme","css","colors","white","brand","gradient"],"mappings":"8CAWaA,EAAsBA,CACjCC,EACAC,KAEA,MAAMC,EAAQD,EACd,OAAOE,CAAG;;gBAEIH;;0BAEUE,EAAME,OAAOC,UAAUH,EAAME,OAAOC;;UAEpDH,EAAME,OAAOE,MAAMC;;;;;;;;GAQ1B"}
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Blockforce Design System 2.0.5 (completo)
1
+ # Blockforce Design System 2.0.8 (completo)
2
2
 
3
3
  > Pacote `blockforce-design-system`. Storybook: https://designsystem.blockforce.ai
4
4
 
@@ -60,7 +60,7 @@ Botão de ação com texto.
60
60
  - `outlined`: borda cinza. Ação secundária ao lado da principal.
61
61
  - `text`: sem borda nem fundo. Ação discreta (cancelar, ver mais).
62
62
  - `gradient`: chamada principal da marca. No máximo um por tela.
63
- - `gradientOutlined`: borda e texto em gradiente. Destaque secundário.
63
+ - `gradientOutlined`: borda, texto e ícone em gradiente, fundo transparente (fica a cor de onde ele está). Destaque secundário. O `Icon` de dentro já sai em gradiente; não passe `color`.
64
64
 
65
65
  Ao clicar, mostra uma onda a partir do ponto do clique. Com `loading`, mantém a cor e a largura e mostra um spinner no lugar do texto.
66
66
  Não use para ação só com ícone (use IconButton) nem para navegar para outra página (use TextLink).
@@ -89,7 +89,7 @@ Props:
89
89
  - `size` (`sm` | `md` | `lg` | `small`): Tamanho pronto: altura, espaçamento interno e fonte. Sem `size`, o botão usa os valores de sempre (ou os que vierem em `height`, `padding` e `fontSize`, que sempre têm prioridade). - `sm` - 40px, para tabelas, filtros e cards - `md` - 44px, padrão de formulários - `lg` - 52px, para destaque em telas vazias e landing `'small'` (da v1) é aceito por compatibilidade e não muda o tamanho.
90
90
  - `textTransform` (`none` | `uppercase` | `capitalize` | `lowercase`): Text transform style
91
91
  - `title` (`string`): Tooltip text displayed on hover
92
- - `variant` (`gradient` | `contained` | `outlined` | `text` | `gradientOutlined`): Visual style variant of the button - `contained` - filled background (default) - `outlined` - transparent background with border - `text` - no background or border - `gradient` - fundo no gradiente da marca, texto branco. Ação principal da tela (CTA). - `gradientOutlined` - borda e texto no gradiente da marca, fundo branco. Ação secundária de destaque.
92
+ - `variant` (`gradient` | `contained` | `outlined` | `text` | `gradientOutlined`): Visual style variant of the button - `contained` - filled background (default) - `outlined` - transparent background with border - `text` - no background or border - `gradient` - fundo no gradiente da marca, texto branco. Ação principal da tela (CTA). - `gradientOutlined` - borda e texto no gradiente da marca, fundo transparente (segue o fundo de onde está). Ação secundária de destaque.
93
93
  - `width` (`string`): Width as CSS value (e.g. '100%', '200px')
94
94
 
95
95
  ### IconButton (Ações)
@@ -682,7 +682,7 @@ Documentação: https://designsystem.blockforce.ai/?path=/docs/feedback-alert--d
682
682
 
683
683
  Props:
684
684
 
685
- - `action` (`ReactNode`): Ação à direita (ex. um Button `text` "Ver detalhes"). Botões e links aqui usam a cor do texto.
685
+ - `action` (`ReactNode`): Ação à direita (ex. um Button `text` "Ver detalhes"). Button `text` e links usam a cor do texto; os outros Buttons mantêm as próprias cores.
686
686
  - `children` (`ReactNode`): Texto do aviso. Pode ter links ou listas.
687
687
  - `closeLabel` (`string`, padrão `Fechar aviso`): Nome do botão de fechar para leitores de tela.
688
688
  - `icon` (`IconsName`, valores em lib/ai/icons.txt): Troca o ícone padrão do tipo.
@@ -1471,6 +1471,7 @@ Props:
1471
1471
 
1472
1472
  Ícone da biblioteca do DS pelo nome: ícones próprios da Blockforce, Remix e Lucide (`lu:nome`).
1473
1473
  `color` usa as cores do tema e `gradient` pinta com o gradiente da marca. A lista de nomes está em `lib/ai/icons.txt`.
1474
+ Dentro de um Button `gradientOutlined`, o ícone sai sempre em gradiente, como o texto do botão.
1474
1475
  Para ícone clicável use IconButton; para ícone dentro de uma caixinha use IconBox.
1475
1476
 
1476
1477
 
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Blockforce Design System 2.0.5
1
+ # Blockforce Design System 2.0.8
2
2
 
3
3
  > Componentes React (styled-components) e tokens visuais da Blockforce. Pacote `blockforce-design-system`. Storybook com exemplos e props: https://designsystem.blockforce.ai
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockforce-design-system",
3
- "version": "2.0.6",
3
+ "version": "2.0.9",
4
4
  "description": "Design system da Blockforce: componentes React, tema e tokens da marca.",
5
5
  "repository": {
6
6
  "type": "git",