blockforce-design-system 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +54 -49
- package/lib/ai/components.json +151 -5
- package/lib/ai/tokens.md +1 -1
- package/lib/commonjs/components/charts/chart-legend/chart-legend.comp.js +1 -1
- package/lib/commonjs/components/charts/chart-legend/chart-legend.comp.js.map +1 -1
- package/lib/commonjs/components/charts/chart-legend/chart-legend.styles.js +22 -15
- package/lib/commonjs/components/charts/chart-legend/chart-legend.styles.js.map +1 -1
- package/lib/commonjs/components/data-display/calendar/calendar.styles.js +14 -13
- package/lib/commonjs/components/data-display/calendar/calendar.styles.js.map +1 -1
- package/lib/commonjs/components/data-display/matrix/matrix.styles.js +22 -21
- package/lib/commonjs/components/data-display/matrix/matrix.styles.js.map +1 -1
- package/lib/commonjs/components/data-display/side-panel/side-panel.styles.js +11 -10
- package/lib/commonjs/components/data-display/side-panel/side-panel.styles.js.map +1 -1
- package/lib/commonjs/components/forms/autocomplete/autocomplete.styles.js +8 -21
- package/lib/commonjs/components/forms/autocomplete/autocomplete.styles.js.map +1 -1
- package/lib/commonjs/components/icons/icon-box/icon-box.comp.js +1 -1
- package/lib/commonjs/components/icons/icon-box/icon-box.comp.js.map +1 -1
- package/lib/commonjs/components/icons/icon-box/icon-box.styles.js +7 -4
- package/lib/commonjs/components/icons/icon-box/icon-box.styles.js.map +1 -1
- package/lib/commonjs/components/layout/card/card.styles.js +3 -52
- package/lib/commonjs/components/layout/card/card.styles.js.map +1 -1
- package/lib/commonjs/components/layout/drawer/drawer.styles.js +7 -5
- package/lib/commonjs/components/layout/drawer/drawer.styles.js.map +1 -1
- package/lib/commonjs/components/layout/modal/modal.styles.js +7 -18
- package/lib/commonjs/components/layout/modal/modal.styles.js.map +1 -1
- package/lib/commonjs/components/layout/popover/popover.styles.js +3 -2
- package/lib/commonjs/components/layout/popover/popover.styles.js.map +1 -1
- package/lib/commonjs/components/layout/slider/slider.styles.js +5 -26
- package/lib/commonjs/components/layout/slider/slider.styles.js.map +1 -1
- package/lib/commonjs/components/layout/table/table.comp.js +1 -1
- package/lib/commonjs/components/layout/table/table.comp.js.map +1 -1
- package/lib/commonjs/components/layout/table/table.styles.js +18 -17
- package/lib/commonjs/components/layout/table/table.styles.js.map +1 -1
- package/lib/commonjs/components/layout/table-head/table-head.comp.js +1 -1
- package/lib/commonjs/components/layout/table-head/table-head.comp.js.map +1 -1
- package/lib/commonjs/components/layout/table-head/table-head.styles.js +1 -1
- package/lib/commonjs/components/layout/table-head/table-head.styles.js.map +1 -1
- package/lib/commonjs/components/layout/table-row/table-row.comp.js +1 -1
- package/lib/commonjs/components/layout/table-row/table-row.comp.js.map +1 -1
- package/lib/commonjs/components/navigation/navigation-card/navigation-card.comp.js +2 -0
- package/lib/commonjs/components/navigation/navigation-card/navigation-card.comp.js.map +1 -0
- package/lib/commonjs/components/navigation/navigation-card/navigation-card.styles.js +47 -0
- package/lib/commonjs/components/navigation/navigation-card/navigation-card.styles.js.map +1 -0
- package/lib/commonjs/components/navigation/navigation-card/navigation-cards.comp.js +2 -0
- package/lib/commonjs/components/navigation/navigation-card/navigation-cards.comp.js.map +1 -0
- package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.comp.js +2 -0
- package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.comp.js.map +1 -0
- package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.styles.js +91 -0
- package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.styles.js.map +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/theme/gradient-border.js +51 -0
- package/lib/commonjs/theme/gradient-border.js.map +1 -0
- package/lib/commonjs/theme/scrollbar.js +39 -0
- package/lib/commonjs/theme/scrollbar.js.map +1 -0
- package/lib/index.d.ts +168 -4
- package/lib/module/components/charts/chart-legend/chart-legend.comp.js +1 -1
- package/lib/module/components/charts/chart-legend/chart-legend.comp.js.map +1 -1
- package/lib/module/components/charts/chart-legend/chart-legend.styles.js +21 -14
- package/lib/module/components/charts/chart-legend/chart-legend.styles.js.map +1 -1
- package/lib/module/components/data-display/calendar/calendar.styles.js +17 -16
- package/lib/module/components/data-display/calendar/calendar.styles.js.map +1 -1
- package/lib/module/components/data-display/matrix/matrix.styles.js +20 -19
- package/lib/module/components/data-display/matrix/matrix.styles.js.map +1 -1
- package/lib/module/components/data-display/side-panel/side-panel.styles.js +10 -9
- package/lib/module/components/data-display/side-panel/side-panel.styles.js.map +1 -1
- package/lib/module/components/forms/autocomplete/autocomplete.styles.js +8 -21
- package/lib/module/components/forms/autocomplete/autocomplete.styles.js.map +1 -1
- package/lib/module/components/icons/icon-box/icon-box.comp.js +1 -1
- package/lib/module/components/icons/icon-box/icon-box.comp.js.map +1 -1
- package/lib/module/components/icons/icon-box/icon-box.styles.js +7 -4
- package/lib/module/components/icons/icon-box/icon-box.styles.js.map +1 -1
- package/lib/module/components/layout/card/card.styles.js +3 -52
- package/lib/module/components/layout/card/card.styles.js.map +1 -1
- package/lib/module/components/layout/drawer/drawer.styles.js +7 -5
- package/lib/module/components/layout/drawer/drawer.styles.js.map +1 -1
- package/lib/module/components/layout/modal/modal.styles.js +7 -18
- package/lib/module/components/layout/modal/modal.styles.js.map +1 -1
- package/lib/module/components/layout/popover/popover.styles.js +2 -1
- package/lib/module/components/layout/popover/popover.styles.js.map +1 -1
- package/lib/module/components/layout/slider/slider.styles.js +5 -26
- package/lib/module/components/layout/slider/slider.styles.js.map +1 -1
- package/lib/module/components/layout/table/table.comp.js +1 -1
- package/lib/module/components/layout/table/table.comp.js.map +1 -1
- package/lib/module/components/layout/table/table.styles.js +9 -8
- package/lib/module/components/layout/table/table.styles.js.map +1 -1
- package/lib/module/components/layout/table-head/table-head.comp.js +1 -1
- package/lib/module/components/layout/table-head/table-head.comp.js.map +1 -1
- package/lib/module/components/layout/table-head/table-head.styles.js +1 -1
- package/lib/module/components/layout/table-head/table-head.styles.js.map +1 -1
- package/lib/module/components/layout/table-row/table-row.comp.js +1 -1
- package/lib/module/components/layout/table-row/table-row.comp.js.map +1 -1
- package/lib/module/components/navigation/navigation-card/navigation-card.comp.js +2 -0
- package/lib/module/components/navigation/navigation-card/navigation-card.comp.js.map +1 -0
- package/lib/module/components/navigation/navigation-card/navigation-card.styles.js +47 -0
- package/lib/module/components/navigation/navigation-card/navigation-card.styles.js.map +1 -0
- package/lib/module/components/navigation/navigation-card/navigation-cards.comp.js +2 -0
- package/lib/module/components/navigation/navigation-card/navigation-cards.comp.js.map +1 -0
- package/lib/module/components/navigation/navigation-sections/navigation-sections.comp.js +2 -0
- package/lib/module/components/navigation/navigation-sections/navigation-sections.comp.js.map +1 -0
- package/lib/module/components/navigation/navigation-sections/navigation-sections.styles.js +91 -0
- package/lib/module/components/navigation/navigation-sections/navigation-sections.styles.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/theme/gradient-border.js +51 -0
- package/lib/module/theme/gradient-border.js.map +1 -0
- package/lib/module/theme/scrollbar.js +39 -0
- package/lib/module/theme/scrollbar.js.map +1 -0
- package/llms-full.txt +105 -2
- package/llms.txt +15 -2
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";var e=require("styled-components"),t=require("../../../theme/theme.util.js");const o="260px",i=e.css`
|
|
2
|
+
${({theme:e})=>`${e.motion.duration.normal} ${e.motion.easing.default}`}
|
|
3
|
+
`,r=e.styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: ${({theme:e})=>e.spacing.md};
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
9
|
+
border-radius: ${({theme:e})=>e.radius.xl};
|
|
10
|
+
background-color: ${({theme:e})=>t.getThemeColor("white",e)};
|
|
11
|
+
box-shadow: ${({theme:e})=>e.shadow.sm};
|
|
12
|
+
`,s=e.styled.section`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
16
|
+
width: 100%;
|
|
17
|
+
`,a=e.styled.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
21
|
+
`,n=e.styled.h2`
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-size: ${({theme:e})=>e.typography.textSize.bodySm};
|
|
24
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
|
|
25
|
+
color: ${({theme:e})=>t.getThemeColor("grey_2",e)};
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
letter-spacing: ${"0.06em"};
|
|
28
|
+
`,l=e.styled.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
align-items: stretch;
|
|
32
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
33
|
+
width: 100%;
|
|
34
|
+
`,d=e.styled.span`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
opacity: ${.6};
|
|
38
|
+
transition:
|
|
39
|
+
transform ${i},
|
|
40
|
+
opacity ${i};
|
|
41
|
+
`,m=e.styled.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
flex: 1 1 ${o};
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: ${({theme:e})=>e.spacing[1.5]};
|
|
46
|
+
min-width: min(${o}, 100%);
|
|
47
|
+
padding: ${({theme:e})=>e.spacing[1.5]}
|
|
48
|
+
${({theme:e})=>e.spacing.md};
|
|
49
|
+
border: 1px solid ${({theme:e})=>t.getThemeColor("grey_5",e)};
|
|
50
|
+
border-radius: ${({theme:e})=>e.radius.md};
|
|
51
|
+
background-color: ${({theme:e})=>t.getThemeColor("white",e)};
|
|
52
|
+
transition:
|
|
53
|
+
transform ${i},
|
|
54
|
+
background-color ${i},
|
|
55
|
+
box-shadow ${i};
|
|
56
|
+
|
|
57
|
+
${({$clickable:o,theme:i})=>o&&e.css`
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
user-select: none;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
transform: translateY(-${"2px"});
|
|
63
|
+
box-shadow: ${i.shadow.sm};
|
|
64
|
+
background-color: ${t.getThemeColor("grey_6",i)};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:hover ${d} {
|
|
68
|
+
transform: translateX(${"3px"});
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:focus-visible {
|
|
73
|
+
outline: none;
|
|
74
|
+
box-shadow: ${i.shadow.focus};
|
|
75
|
+
}
|
|
76
|
+
`}
|
|
77
|
+
`,h=e.styled.div`
|
|
78
|
+
display: flex;
|
|
79
|
+
flex: 1;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
`,p=e.styled.span`
|
|
83
|
+
display: -webkit-box;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
font-size: ${({theme:e})=>e.typography.textSize.bodySm};
|
|
86
|
+
line-height: ${({theme:e})=>e.typography.lineHeight.snug};
|
|
87
|
+
color: ${({theme:e})=>t.getThemeColor("grey_3",e)};
|
|
88
|
+
-webkit-line-clamp: 2;
|
|
89
|
+
-webkit-box-orient: vertical;
|
|
90
|
+
`;exports.Arrow=d,exports.Content=h,exports.Description=p,exports.Grid=l,exports.Item=m,exports.Panel=r,exports.Section=s,exports.SectionHeader=a,exports.SectionLabel=n;
|
|
91
|
+
//# sourceMappingURL=navigation-sections.styles.js.map
|
package/lib/commonjs/components/navigation/navigation-sections/navigation-sections.styles.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-sections.styles.js","sources":["../../../../../src/components/navigation/navigation-sections/navigation-sections.styles.tsx"],"sourcesContent":["import { css, styled } from 'styled-components'\n\nimport { getThemeColor } from '../../../theme'\n\n/** Largura mínima de cada atalho. Abaixo disso, ele desce para a linha de baixo. */\nconst ITEM_MIN_WIDTH = '260px'\n\n/** Quanto a seta aparece em repouso; no hover ela fica inteira. */\nconst ARROW_REST_OPACITY = 0.6\n\n/** Quanto o atalho sobe e a seta anda no hover. */\nconst HOVER_LIFT = '2px'\nconst ARROW_SHIFT = '3px'\n\n/** Espaço entre as letras do nome da seção, que fica em maiúsculas. */\nconst LABEL_LETTER_SPACING = '0.06em'\n\nconst transition = css`\n ${({ theme }) =>\n `${theme.motion.duration.normal} ${theme.motion.easing.default}`}\n`\n\nexport const Panel = styled.div`\n display: flex;\n flex-direction: column;\n gap: ${({ theme }) => theme.spacing.md};\n width: 100%;\n padding: ${({ theme }) => theme.spacing.md};\n border-radius: ${({ theme }) => theme.radius.xl};\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n box-shadow: ${({ theme }) => theme.shadow.sm};\n`\n\nexport const Section = styled.section`\n display: flex;\n flex-direction: column;\n gap: ${({ theme }) => theme.spacing.sm};\n width: 100%;\n`\n\nexport const SectionHeader = styled.div`\n display: flex;\n align-items: center;\n gap: ${({ theme }) => theme.spacing.sm};\n`\n\nexport const SectionLabel = styled.h2`\n margin: 0;\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n font-weight: ${({ theme }) => theme.typography.fontWeight.medium};\n color: ${({ theme }) => getThemeColor('grey_2', theme)};\n text-transform: uppercase;\n letter-spacing: ${LABEL_LETTER_SPACING};\n`\n\nexport const Grid = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: ${({ theme }) => theme.spacing.sm};\n width: 100%;\n`\n\nexport const Arrow = styled.span`\n display: flex;\n flex-shrink: 0;\n opacity: ${ARROW_REST_OPACITY};\n transition:\n transform ${transition},\n opacity ${transition};\n`\n\nexport const Item = styled.div<{ $clickable: boolean }>`\n display: flex;\n flex: 1 1 ${ITEM_MIN_WIDTH};\n align-items: center;\n gap: ${({ theme }) => theme.spacing[1.5]};\n min-width: min(${ITEM_MIN_WIDTH}, 100%);\n padding: ${({ theme }) => theme.spacing[1.5]}\n ${({ theme }) => theme.spacing.md};\n border: 1px solid ${({ theme }) => getThemeColor('grey_5', theme)};\n border-radius: ${({ theme }) => theme.radius.md};\n background-color: ${({ theme }) => getThemeColor('white', theme)};\n transition:\n transform ${transition},\n background-color ${transition},\n box-shadow ${transition};\n\n ${({ $clickable, theme }) =>\n $clickable &&\n css`\n cursor: pointer;\n user-select: none;\n\n &:hover {\n transform: translateY(-${HOVER_LIFT});\n box-shadow: ${theme.shadow.sm};\n background-color: ${getThemeColor('grey_6', theme)};\n }\n\n &:hover ${Arrow} {\n transform: translateX(${ARROW_SHIFT});\n opacity: 1;\n }\n\n &:focus-visible {\n outline: none;\n box-shadow: ${theme.shadow.focus};\n }\n `}\n`\n\nexport const Content = styled.div`\n display: flex;\n flex: 1;\n flex-direction: column;\n min-width: 0;\n`\n\nexport const Description = styled.span`\n display: -webkit-box;\n overflow: hidden;\n font-size: ${({ theme }) => theme.typography.textSize.bodySm};\n line-height: ${({ theme }) => theme.typography.lineHeight.snug};\n color: ${({ theme }) => getThemeColor('grey_3', theme)};\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n`\n"],"names":["ITEM_MIN_WIDTH","transition","css","theme","motion","duration","normal","easing","default","Panel","styled","div","spacing","md","radius","xl","getThemeColor","shadow","sm","Section","section","SectionHeader","SectionLabel","h2","typography","textSize","bodySm","fontWeight","medium","Grid","Arrow","span","Item","$clickable","focus","Content","Description","lineHeight","snug"],"mappings":"0FAKA,MAAMA,EAAiB,QAYjBC,EAAaC,EAAAA,GAAG;IAClB,EAAGC,WACH,GAAGA,EAAMC,OAAOC,SAASC,UAAUH,EAAMC,OAAOG,OAAOC;EAG9CC,EAAQC,EAAMA,OAACC,GAAG;;;SAGtB,EAAGR,WAAYA,EAAMS,QAAQC;;aAEzB,EAAGV,WAAYA,EAAMS,QAAQC;mBACvB,EAAGV,WAAYA,EAAMW,OAAOC;sBACzB,EAAGZ,WAAYa,EAAaA,cAAC,QAASb;gBAC5C,EAAGA,WAAYA,EAAMc,OAAOC;EAG/BC,EAAUT,EAAMA,OAACU,OAAO;;;SAG5B,EAAGjB,WAAYA,EAAMS,QAAQM;;EAIzBG,EAAgBX,EAAMA,OAACC,GAAG;;;SAG9B,EAAGR,WAAYA,EAAMS,QAAQM;EAGzBI,EAAeZ,EAAMA,OAACa,EAAE;;eAEtB,EAAGpB,WAAYA,EAAMqB,WAAWC,SAASC;iBACvC,EAAGvB,WAAYA,EAAMqB,WAAWG,WAAWC;WACjD,EAAGzB,WAAYa,EAAaA,cAAC,SAAUb;;oBAnCrB;EAwChB0B,EAAOnB,EAAMA,OAACC,GAAG;;;;SAIrB,EAAGR,WAAYA,EAAMS,QAAQM;;EAIzBY,EAAQpB,EAAMA,OAACqB,IAAI;;;aAvDL;;gBA4DX9B;cACFA;EAGD+B,EAAOtB,EAAMA,OAACC,GAA4B;;cAEzCX;;SAEL,EAAGG,WAAYA,EAAMS,QAAQ;mBACnBZ;aACN,EAAGG,WAAYA,EAAMS,QAAQ;MACpC,EAAGT,WAAYA,EAAMS,QAAQC;sBACb,EAAGV,WAAYa,EAAaA,cAAC,SAAUb;mBAC1C,EAAGA,WAAYA,EAAMW,OAAOD;sBACzB,EAAGV,WAAYa,EAAaA,cAAC,QAASb;;gBAE5CF;uBACOA;iBACNA;;IAEb,EAAGgC,aAAY9B,WACf8B,GACA/B,EAAAA,GAAG;;;;;iCA/EY;sBAqFGC,EAAMc,OAAOC;4BACPF,EAAaA,cAAC,SAAUb;;;gBAGpC2B;gCAxFI;;;;;;sBA+FE3B,EAAMc,OAAOiB;;;EAKtBC,EAAUzB,EAAMA,OAACC,GAAG;;;;;EAOpByB,EAAc1B,EAAMA,OAACqB,IAAI;;;eAGvB,EAAG5B,WAAYA,EAAMqB,WAAWC,SAASC;iBACvC,EAAGvB,WAAYA,EAAMqB,WAAWa,WAAWC;WACjD,EAAGnC,WAAYa,EAAaA,cAAC,SAAUb;;;"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./components/buttons/button/button.comp.js"),o=require("./components/buttons/icon-button/icon-button.comp.js"),t=require("./components/charts/doughnut-chart/doughnut-chart.comp.js"),r=require("./components/charts/bar-chart/bar-chart.comp.js"),s=require("./components/charts/line-chart/line-chart.comp.js"),i=require("./components/charts/treemap-chart/treemap-chart.comp.js"),
|
|
1
|
+
"use strict";var e=require("./components/buttons/button/button.comp.js"),o=require("./components/buttons/icon-button/icon-button.comp.js"),t=require("./components/charts/doughnut-chart/doughnut-chart.comp.js"),r=require("./components/charts/bar-chart/bar-chart.comp.js"),s=require("./components/charts/line-chart/line-chart.comp.js"),i=require("./components/charts/treemap-chart/treemap-chart.comp.js"),a=require("./components/charts/chart-legend/chart-legend.comp.js"),n=require("./components/data-display/calendar/calendar.comp.js"),p=require("./components/data-display/info-item/info-item.comp.js"),c=require("./components/data-display/matrix/matrix.comp.js"),m=require("./components/data-display/tinted-section/tinted-section.comp.js"),l=require("./components/data-display/tree-node/tree-node.comp.js"),u=require("./components/data-display/canvas-controls/canvas-controls.comp.js"),x=require("./components/data-display/side-panel/side-panel.comp.js"),d=require("./components/feedback/spinner/spinner.comp.js"),g=require("./components/feedback/tooltip/tooltip.comp.js"),h=require("./components/feedback/skeleton/skeleton.comp.js"),T=require("./components/feedback/tag/tag.comp.js"),j=require("./components/feedback/toast/toast.comp.js"),C=require("./components/feedback/toast/toast.provider.js"),q=require("./components/feedback/empty-state/empty-state.comp.js"),v=require("./components/feedback/alert/alert.comp.js"),b=require("./components/feedback/progress-bar/progress-bar.comp.js"),f=require("./components/feedback/confirm-dialog/confirm-dialog.comp.js"),k=require("./components/feedback/confirm-dialog/confirm-dialog.provider.js"),S=require("./components/forms/autocomplete/autocomplete.comp.js"),I=require("./components/forms/checkbox/checkbox.comp.js"),y=require("./components/forms/date/month-picker/month-picker.comp.js"),D=require("./components/forms/date/date-picker/date.utils.js"),P=require("./components/forms/date/date-picker/date-picker.comp.js"),w=require("./components/forms/date/date-picker/date-range-picker.comp.js"),B=require("./components/forms/file/drag-n-drop/drag-n-drop.comp.js"),L=require("./components/forms/file/file-preview/file-preview.comp.js"),R=require("./components/forms/file/file-image-preview/file-image-preview.comp.js"),A=require("./components/forms/file/file-preview-list/file-preview-list.comp.js"),O=require("./components/forms/file/file-image-preview-list/file-image-preview-list.comp.js"),E=require("./components/forms/input/input.comp.js"),N=require("./components/forms/select/select.comp.js"),F=require("./components/forms/switch/switch.comp.js"),_=require("./components/forms/textarea/textarea.comp.js"),M=require("./components/forms/search-input/search-input.comp.js"),H=require("./components/forms/radio-group/radio-group.comp.js"),U=require("./components/icons/icon/icon.comp.js"),V=require("./components/icons/icon/icon.utils.js"),z=require("./components/icons/icon-box/icon-box.comp.js"),G=require("./components/images/image/image.comp.js"),K=require("./components/images/avatar/avatar.comp.js"),Q=require("./components/layout/accordion/accordion.comp.js"),X=require("./components/layout/box/box.comp.js"),J=require("./components/layout/modal/modal.comp.js"),W=require("./components/layout/timeline/timeline.comp.js"),Y=require("./components/layout/treeview/treeview.comp.js"),Z=require("./components/layout/popover/popover.comp.js"),$=require("./components/layout/table/table.comp.js"),ee=require("./components/layout/slider/slider.comp.js"),oe=require("./components/layout/drawer/drawer.comp.js"),te=require("./components/layout/card/card.comp.js"),re=require("./components/layout/title-card/title-card.comp.js"),se=require("./components/layout/stat-card/stat-card.comp.js"),ie=require("./components/layout/divider/divider.comp.js"),ae=require("./components/navigation/pagination/pagination.comp.js"),ne=require("./components/navigation/tabs/tabs.comp.js"),pe=require("./components/navigation/text-link/text-link.comp.js"),ce=require("./components/navigation/table-pagination/table-pagination.comp.js"),me=require("./components/navigation/breadcrumb/breadcrumb.comp.js"),le=require("./components/navigation/action-menu/action-menu.comp.js"),ue=require("./components/navigation/stepper/stepper.comp.js"),xe=require("./components/navigation/view-toggle/view-toggle.comp.js"),de=require("./components/navigation/navigation-card/navigation-card.comp.js"),ge=require("./components/navigation/navigation-card/navigation-cards.comp.js"),he=require("./components/navigation/navigation-sections/navigation-sections.comp.js"),Te=require("./components/typography/text/text.comp.js"),je=require("./hooks/use-breakpoint.js"),Ce=require("./theme/generated/tokens.js"),qe=require("./theme/create-theme.js"),ve=require("./theme/chart-colors.js"),be=require("./theme/client-theme.js"),fe=require("./theme/default-theme.js"),ke=require("./theme/global-styles.js"),Se=require("./theme/gradient-border.js"),Ie=require("./theme/media.js"),ye=require("./theme/scrollbar.js"),De=require("./theme/theme-provider.js"),Pe=require("./theme/theme.util.js");exports.Button=e.Button,exports.IconButton=o.IconButton,exports.DoughnutChart=t.DoughnutChart,exports.BarChart=r.BarChart,exports.LineChart=s.LineChart,exports.TreemapChart=i.TreemapChart,exports.ChartLegend=a.ChartLegend,exports.Calendar=n.Calendar,exports.InfoItem=p.InfoItem,exports.Matrix=c.Matrix,exports.getBand=c.getBand,exports.TintedSection=m.TintedSection,exports.TreeNode=l.TreeNode,exports.CanvasButton=u.CanvasButton,exports.CanvasPanel=u.CanvasPanel,exports.DirectionToggle=u.DirectionToggle,exports.FullscreenToggle=u.FullscreenToggle,exports.SelectableItem=x.SelectableItem,exports.SidePanel=x.SidePanel,exports.Spinner=d.Spinner,exports.Tooltip=g.Tooltip,exports.Skeleton=h.Skeleton,exports.Tag=T.Tag,exports.Toast=j.Toast,exports.ToastStackStyles=j.ToastStackStyles,exports.ToastProvider=C.ToastProvider,exports.useToast=C.useToast,exports.EmptyState=q.EmptyState,exports.Alert=v.Alert,exports.ProgressBar=b.ProgressBar,exports.ConfirmDialog=f.ConfirmDialog,exports.ConfirmDialogProvider=k.ConfirmDialogProvider,exports.useConfirm=k.useConfirm,exports.Autocomplete=S.Autocomplete,exports.CustomAutocomplete=S.CustomAutocomplete,exports.CheckBox=I.CheckBox,exports.Checkbox=I.Checkbox,exports.CustomCheckBox=I.CustomCheckBox,exports.MonthPicker=y.MonthPicker,exports.formatDateKey=D.formatDateKey,exports.parseDateText=D.parseDateText,exports.DEFAULT_DATE_LABELS=P.DEFAULT_DATE_LABELS,exports.DatePicker=P.DatePicker,exports.initialDay=P.initialDay,exports.DateRangePicker=w.DateRangePicker,exports.DragNDrop=B.DragNDrop,exports.FileDropzone=B.FileDropzone,exports.FilePreview=L.FilePreview,exports.FileImagePreview=R.FileImagePreview,exports.FilePreviewList=A.FilePreviewList,exports.FileImagePreviewList=O.FileImagePreviewList,exports.CustomInput=E.CustomInput,exports.Input=E.Input,exports.Select=N.Select,exports.CustomSwitch=F.CustomSwitch,exports.Switch=F.Switch,exports.CustomTextArea=_.CustomTextArea,exports.TextArea=_.TextArea,exports.SearchInput=M.SearchInput,exports.RadioGroup=H.RadioGroup,exports.Icon=U.Icon,exports.LUCIDE_PREFIX=V.LUCIDE_PREFIX,exports.allIconsOptions=V.allIconsOptions,exports.customIconsOptions=V.customIconsOptions,exports.isLucideName=V.isLucideName,exports.parseIconNameToLucide=V.parseIconNameToLucide,exports.parseIconNameToRemixIcon=V.parseIconNameToRemixIcon,exports.IconBox=z.IconBox,exports.Image=G.Image,exports.Avatar=K.Avatar,exports.Accordion=Q.Accordion,exports.Box=X.Box,exports.CustomBox=X.CustomBox,exports.Modal=J.Modal,exports.Timeline=W.Timeline,exports.TreeView=Y.TreeView,exports.Treeview=Y.Treeview,exports.Popover=Z.Popover,exports.Table=$.Table,exports.Carousel=ee.Carousel,exports.Slider=ee.Slider,exports.Drawer=oe.Drawer,exports.Card=te.Card,exports.TitleCard=re.TitleCard,exports.StatCard=se.StatCard,exports.Divider=ie.Divider,exports.Pagination=ae.Pagination,exports.Tabs=ne.Tabs,exports.TextLink=pe.TextLink,exports.TablePagination=ce.TablePagination,exports.Breadcrumb=me.Breadcrumb,exports.ActionMenu=le.ActionMenu,exports.Stepper=ue.Stepper,exports.ViewToggle=xe.ViewToggle,exports.NavigationCard=de.NavigationCard,exports.NavigationCards=ge.NavigationCards,exports.NavigationSections=he.NavigationSections,exports.Text=Te.Text,exports.useBreakpoint=je.useBreakpoint,exports.useIsMobile=je.useIsMobile,exports.useIsTablet=je.useIsTablet,exports.useMediaQuery=je.useMediaQuery,exports.tokens=Ce.tokens,exports.createTheme=qe.createTheme,exports.CHART_COLOR_ORDER=ve.CHART_COLOR_ORDER,exports.CHART_OTHER_COLOR=ve.CHART_OTHER_COLOR,exports.getChartColors=ve.getChartColors,exports.SUPPORTED_CLIENT_FONTS=be.SUPPORTED_CLIENT_FONTS,exports.createClientTheme=be.createClientTheme,exports.getClientThemeIssues=be.getClientThemeIssues,exports.defaultTheme=fe.defaultTheme,exports.legacyTheme=fe.legacyTheme,exports.GlobalStyle=ke.GlobalStyle,exports.gradientBorder=Se.gradientBorder,exports.breakpointValues=Ie.breakpointValues,exports.media=Ie.media,exports.thinScrollbar=ye.thinScrollbar,exports.thinScrollbarOnHover=ye.thinScrollbarOnHover,exports.ThemeProvider=De.ThemeProvider,exports.adjustColorBrightness=Pe.adjustColorBrightness,exports.getContrastRatio=Pe.getContrastRatio,exports.getLuminance=Pe.getLuminance,exports.getReadableTextColor=Pe.getReadableTextColor,exports.getThemeColor=Pe.getThemeColor,exports.getThemeContrastColor=Pe.getThemeContrastColor,exports.getThemeSize=Pe.getThemeSize,exports.getThemeSpacing=Pe.getThemeSpacing,exports.mixColors=Pe.mixColors;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";var r=require("styled-components");const e=r.keyframes`
|
|
2
|
+
to {
|
|
3
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
4
|
+
}
|
|
5
|
+
`;exports.gradientBorder=({animated:o,width:t,radius:n,theme:a})=>{const i=a;return o?r.css`
|
|
6
|
+
position: relative;
|
|
7
|
+
isolation: isolate;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border: none;
|
|
10
|
+
background: transparent;
|
|
11
|
+
|
|
12
|
+
&::before {
|
|
13
|
+
content: '';
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 50%;
|
|
16
|
+
left: 50%;
|
|
17
|
+
z-index: -2;
|
|
18
|
+
width: max(250%, 1200px);
|
|
19
|
+
aspect-ratio: 1;
|
|
20
|
+
background: conic-gradient(
|
|
21
|
+
${i.colors.primary},
|
|
22
|
+
${i.colors.secondary},
|
|
23
|
+
${i.colors.primary}
|
|
24
|
+
);
|
|
25
|
+
transform: translate(-50%, -50%);
|
|
26
|
+
animation: ${e} 4s linear infinite;
|
|
27
|
+
will-change: transform;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::after {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: ${t}px;
|
|
34
|
+
z-index: -1;
|
|
35
|
+
border-radius: max(0px, calc(${n} - ${t}px));
|
|
36
|
+
background: ${i.colors.white};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (prefers-reduced-motion: reduce) {
|
|
40
|
+
&::before {
|
|
41
|
+
animation: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`:r.css`
|
|
45
|
+
border: ${t}px solid transparent;
|
|
46
|
+
background:
|
|
47
|
+
linear-gradient(${i.colors.white}, ${i.colors.white})
|
|
48
|
+
padding-box,
|
|
49
|
+
${i.colors.brand.gradient} border-box;
|
|
50
|
+
`};
|
|
51
|
+
//# sourceMappingURL=gradient-border.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient-border.js","sources":["../../../src/theme/gradient-border.ts"],"sourcesContent":["import { css, DefaultTheme, keyframes } from 'styled-components'\n\nimport type { ThemeProps } from './theme.types'\n\nconst spin = keyframes`\n to {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n`\n\n/** Opções da borda no gradiente da marca. */\nexport interface GradientBorderOptions {\n /** Gira as cores da marca devagar. Quem pediu menos movimento no sistema vê a borda parada. */\n animated?: boolean\n /** Grossura da borda em px. */\n width: number\n /** Raio externo da peça (ex. `'12px'`, `'9999px'`), para arredondar o fundo de dentro. */\n radius: string\n /** Tema do styled-components (o `theme` das props do styled). */\n theme: DefaultTheme | ThemeProps\n}\n\n/**\n * Borda no gradiente da marca (45°, roxo → teal), fixa ou girando. Fundo branco por dentro.\n * É a borda do `Card` com `gradientBorder` e do `IconBox` com `gradientBorder`.\n * A animada gira só uma camada com `transform`, sem repintar o conteúdo.\n * @example\n * const Box = styled.div`\n * ${({ theme }) => gradientBorder({ animated: true, width: 2, radius: theme.radius.full, theme })}\n * `\n */\nexport const gradientBorder = ({\n animated,\n width,\n radius,\n theme: styledTheme,\n}: GradientBorderOptions) => {\n const theme = styledTheme as ThemeProps\n return animated\n ? css`\n position: relative;\n isolation: isolate;\n overflow: hidden;\n border: none;\n background: transparent;\n\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: -2;\n width: max(250%, 1200px);\n aspect-ratio: 1;\n background: conic-gradient(\n ${theme.colors.primary},\n ${theme.colors.secondary},\n ${theme.colors.primary}\n );\n transform: translate(-50%, -50%);\n animation: ${spin} 4s linear infinite;\n will-change: transform;\n }\n\n &::after {\n content: '';\n position: absolute;\n inset: ${width}px;\n z-index: -1;\n border-radius: max(0px, calc(${radius} - ${width}px));\n background: ${theme.colors.white};\n }\n\n @media (prefers-reduced-motion: reduce) {\n &::before {\n animation: none;\n }\n }\n `\n : css`\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 `\n}\n"],"names":["spin","keyframes","gradientBorder","animated","width","radius","theme","styledTheme","css","colors","primary","secondary","white","brand","gradient"],"mappings":"gDAIA,MAAMA,EAAOC,EAAAA,SAAS;;;;yBA2BQC,EAC5BC,WACAC,QACAC,SACAC,MAAOC,MAEP,MAAMD,EAAQC,EACd,OAAOJ,EACHK,EAAAA,GAAG;;;;;;;;;;;;;;;;cAgBKF,EAAMG,OAAOC;cACbJ,EAAMG,OAAOE;cACbL,EAAMG,OAAOC;;;uBAGJV;;;;;;;mBAOJI;;yCAEsBC,OAAYD;wBAC7BE,EAAMG,OAAOG;;;;;;;;QAS/BJ,EAAAA,GAAG;kBACSJ;;4BAEUE,EAAMG,OAAOG,UAAUN,EAAMG,OAAOG;;YAEpDN,EAAMG,OAAOI,MAAMC;OACxB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";var r=require("styled-components"),e=require("./theme.util.js");const t=r.css`
|
|
2
|
+
scrollbar-width: thin;
|
|
3
|
+
scrollbar-color: ${({theme:r})=>e.getThemeColor("grey_4",r)} transparent;
|
|
4
|
+
|
|
5
|
+
&::-webkit-scrollbar {
|
|
6
|
+
width: ${({theme:r})=>r.spacing.xs};
|
|
7
|
+
height: ${({theme:r})=>r.spacing.xs};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&::-webkit-scrollbar-track {
|
|
11
|
+
background: transparent;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&::-webkit-scrollbar-thumb {
|
|
15
|
+
border-radius: ${({theme:r})=>r.radius.full};
|
|
16
|
+
background: ${({theme:r})=>e.getThemeColor("grey_4",r)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
20
|
+
background: ${({theme:r})=>e.getThemeColor("grey_3",r)};
|
|
21
|
+
}
|
|
22
|
+
`,o=r.css`
|
|
23
|
+
${t}
|
|
24
|
+
scrollbar-color: transparent transparent;
|
|
25
|
+
|
|
26
|
+
&::-webkit-scrollbar-thumb {
|
|
27
|
+
background: transparent;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
scrollbar-color: ${({theme:r})=>e.getThemeColor("grey_4",r)}
|
|
32
|
+
transparent;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover::-webkit-scrollbar-thumb {
|
|
36
|
+
background: ${({theme:r})=>e.getThemeColor("grey_4",r)};
|
|
37
|
+
}
|
|
38
|
+
`;exports.thinScrollbar=t,exports.thinScrollbarOnHover=o;
|
|
39
|
+
//# sourceMappingURL=scrollbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbar.js","sources":["../../../src/theme/scrollbar.ts"],"sourcesContent":["import { css } from 'styled-components'\n\nimport { getThemeColor } from './theme.util'\n\n/**\n * Barra de rolagem fina, a mesma em toda área que rola (regra de ouro 12): 4px, polegar\n * `grey_4` (`grey_3` no hover), trilho transparente e raio `full`. Use dentro do styled de\n * qualquer contêiner com `overflow: auto`, em vez de escrever `::-webkit-scrollbar`.\n * @example\n * const List = styled.ul`\n * overflow-y: auto;\n * ${thinScrollbar}\n * `\n */\nexport const thinScrollbar = css`\n scrollbar-width: thin;\n scrollbar-color: ${({ theme }) => getThemeColor('grey_4', theme)} transparent;\n\n &::-webkit-scrollbar {\n width: ${({ theme }) => theme.spacing.xs};\n height: ${({ theme }) => theme.spacing.xs};\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }) => theme.radius.full};\n background: ${({ theme }) => getThemeColor('grey_4', theme)};\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: ${({ theme }) => getThemeColor('grey_3', theme)};\n }\n`\n\n/**\n * Barra fina que só aparece com o mouse em cima, para faixas que rolam de lado (ex. Carousel).\n * No celular, sem hover, a rolagem continua pelo toque.\n */\nexport const thinScrollbarOnHover = css`\n ${thinScrollbar}\n scrollbar-color: transparent transparent;\n\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &:hover {\n scrollbar-color: ${({ theme }) => getThemeColor('grey_4', theme)}\n transparent;\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background: ${({ theme }) => getThemeColor('grey_4', theme)};\n }\n`\n"],"names":["thinScrollbar","css","theme","getThemeColor","spacing","xs","radius","full","thinScrollbarOnHover"],"mappings":"6EAcO,MAAMA,EAAgBC,EAAAA,GAAG;;qBAEX,EAAGC,WAAYC,EAAaA,cAAC,SAAUD;;;aAG/C,EAAGA,WAAYA,EAAME,QAAQC;cAC5B,EAAGH,WAAYA,EAAME,QAAQC;;;;;;;;qBAQtB,EAAGH,WAAYA,EAAMI,OAAOC;kBAC/B,EAAGL,WAAYC,EAAaA,cAAC,SAAUD;;;;kBAIvC,EAAGA,WAAYC,EAAaA,cAAC,SAAUD;;EAQ5CM,EAAuBP,EAAAA,GAAG;IACnCD;;;;;;;;uBAQmB,EAAGE,WAAYC,EAAaA,cAAC,SAAUD;;;;;kBAK5C,EAAGA,WAAYC,EAAaA,cAAC,SAAUD;;"}
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as LuIcons from 'react-icons/lu';
|
|
|
5
5
|
import * as RiIcons from 'react-icons/ri';
|
|
6
6
|
import { Placement } from '@popperjs/core';
|
|
7
7
|
import * as styled_components from 'styled-components';
|
|
8
|
+
import { DefaultTheme } from 'styled-components';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Tema completo do design system.
|
|
@@ -362,6 +363,28 @@ declare const legacyTheme: ThemeProps;
|
|
|
362
363
|
|
|
363
364
|
declare const GlobalStyle: react.NamedExoticComponent<styled_components.ExecutionProps & object>;
|
|
364
365
|
|
|
366
|
+
/** Opções da borda no gradiente da marca. */
|
|
367
|
+
interface GradientBorderOptions {
|
|
368
|
+
/** Gira as cores da marca devagar. Quem pediu menos movimento no sistema vê a borda parada. */
|
|
369
|
+
animated?: boolean;
|
|
370
|
+
/** Grossura da borda em px. */
|
|
371
|
+
width: number;
|
|
372
|
+
/** Raio externo da peça (ex. `'12px'`, `'9999px'`), para arredondar o fundo de dentro. */
|
|
373
|
+
radius: string;
|
|
374
|
+
/** Tema do styled-components (o `theme` das props do styled). */
|
|
375
|
+
theme: DefaultTheme | ThemeProps;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Borda no gradiente da marca (45°, roxo → teal), fixa ou girando. Fundo branco por dentro.
|
|
379
|
+
* É a borda do `Card` com `gradientBorder` e do `IconBox` com `gradientBorder`.
|
|
380
|
+
* A animada gira só uma camada com `transform`, sem repintar o conteúdo.
|
|
381
|
+
* @example
|
|
382
|
+
* const Box = styled.div`
|
|
383
|
+
* ${({ theme }) => gradientBorder({ animated: true, width: 2, radius: theme.radius.full, theme })}
|
|
384
|
+
* `
|
|
385
|
+
*/
|
|
386
|
+
declare const gradientBorder: ({ animated, width, radius, theme: styledTheme, }: GradientBorderOptions) => styled_components.RuleSet<object>;
|
|
387
|
+
|
|
365
388
|
declare const tokens: {
|
|
366
389
|
readonly color: {
|
|
367
390
|
readonly purple: {
|
|
@@ -593,6 +616,23 @@ declare const media: {
|
|
|
593
616
|
between: (from: Breakpoint, to: Breakpoint) => string;
|
|
594
617
|
};
|
|
595
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Barra de rolagem fina, a mesma em toda área que rola (regra de ouro 12): 4px, polegar
|
|
621
|
+
* `grey_4` (`grey_3` no hover), trilho transparente e raio `full`. Use dentro do styled de
|
|
622
|
+
* qualquer contêiner com `overflow: auto`, em vez de escrever `::-webkit-scrollbar`.
|
|
623
|
+
* @example
|
|
624
|
+
* const List = styled.ul`
|
|
625
|
+
* overflow-y: auto;
|
|
626
|
+
* ${thinScrollbar}
|
|
627
|
+
* `
|
|
628
|
+
*/
|
|
629
|
+
declare const thinScrollbar: styled_components.RuleSet<object>;
|
|
630
|
+
/**
|
|
631
|
+
* Barra fina que só aparece com o mouse em cima, para faixas que rolam de lado (ex. Carousel).
|
|
632
|
+
* No celular, sem hover, a rolagem continua pelo toque.
|
|
633
|
+
*/
|
|
634
|
+
declare const thinScrollbarOnHover: styled_components.RuleSet<object>;
|
|
635
|
+
|
|
596
636
|
interface ThemeProviderProps {
|
|
597
637
|
children: React.ReactNode;
|
|
598
638
|
theme: ThemeProps;
|
|
@@ -1008,25 +1048,37 @@ declare const TreemapChart: ({ width, height, data, valueFormatter, }: TreemapCh
|
|
|
1008
1048
|
interface ChartLegendItem {
|
|
1009
1049
|
/** Nome da série ou categoria. */
|
|
1010
1050
|
label: string;
|
|
1011
|
-
/** Cor da bolinha, igual à do gráfico: token do tema ou valor CSS. */
|
|
1051
|
+
/** Cor da marca (bolinha ou quadradinho), igual à do gráfico: token do tema ou valor CSS. */
|
|
1012
1052
|
color: ThemeColors | string;
|
|
1013
1053
|
/** Valor ao lado do nome (ex. "42%", "1.240 kg"). */
|
|
1014
1054
|
value?: ReactNode;
|
|
1015
1055
|
}
|
|
1056
|
+
/** Visual da legenda. */
|
|
1057
|
+
type ChartLegendVariant = 'dot' | 'square';
|
|
1016
1058
|
/** Props for the ChartLegend component */
|
|
1017
1059
|
interface ChartLegendProps {
|
|
1018
1060
|
/** Itens da legenda, na ordem do gráfico. */
|
|
1019
1061
|
items: ChartLegendItem[];
|
|
1020
1062
|
/** `row`: itens lado a lado, quebrando linha. `column`: um por linha, com o valor alinhado à direita. @default 'row' */
|
|
1021
1063
|
direction?: 'row' | 'column';
|
|
1064
|
+
/**
|
|
1065
|
+
* Visual da legenda.
|
|
1066
|
+
* - `dot`: bolinha, nome e valor em destaque (à direita no `column`).
|
|
1067
|
+
* - `square`: quadradinho e "Nome: valor" na mesma linha, em texto pequeno. É o das roscas das
|
|
1068
|
+
* dashboards da plataforma (cards por status).
|
|
1069
|
+
* @default 'dot'
|
|
1070
|
+
*/
|
|
1071
|
+
variant?: ChartLegendVariant;
|
|
1022
1072
|
}
|
|
1023
1073
|
|
|
1024
1074
|
/**
|
|
1025
1075
|
* Legenda de gráfico: bolinha na cor da série, nome e valor opcional.
|
|
1026
1076
|
* Use ao lado ou abaixo de qualquer gráfico; o DoughnutChart já monta a dele com a prop `legend`.
|
|
1077
|
+
* `variant="square"` é a legenda das roscas das dashboards: quadradinho e "Nome: valor".
|
|
1027
1078
|
* @example <ChartLegend items={[{ label: 'Aprovados', color: 'success', value: '60%' }]} />
|
|
1079
|
+
* @example <ChartLegend variant="square" direction="column" items={[{ label: 'Pendentes', color: 'chart.purple', value: 850 }]} />
|
|
1028
1080
|
*/
|
|
1029
|
-
declare const ChartLegend: ({ items, direction }: ChartLegendProps) => react_jsx_runtime.JSX.Element;
|
|
1081
|
+
declare const ChartLegend: ({ items, direction, variant, }: ChartLegendProps) => react_jsx_runtime.JSX.Element;
|
|
1030
1082
|
|
|
1031
1083
|
/** Um evento marcado num dia do calendário. */
|
|
1032
1084
|
interface CalendarEvent {
|
|
@@ -1958,6 +2010,8 @@ declare const parseIconNameToLucide: (name: string) => LuIconName;
|
|
|
1958
2010
|
declare const customIconsOptions: readonly ["rocket", "graph", "receipt"];
|
|
1959
2011
|
declare const allIconsOptions: string[];
|
|
1960
2012
|
|
|
2013
|
+
/** Formato da caixa do IconBox. */
|
|
2014
|
+
type IconBoxShape = 'square' | 'circle';
|
|
1961
2015
|
/** Props for the IconBox component */
|
|
1962
2016
|
interface IconBoxProps {
|
|
1963
2017
|
/** Ícone mostrado dentro da caixa. */
|
|
@@ -1971,15 +2025,31 @@ interface IconBoxProps {
|
|
|
1971
2025
|
* @default 24
|
|
1972
2026
|
*/
|
|
1973
2027
|
size?: number;
|
|
2028
|
+
/**
|
|
2029
|
+
* Formato da caixa. `square` é o dos títulos de card e números; `circle` é para quem age
|
|
2030
|
+
* (agente de IA, assistente), ao lado de um nome.
|
|
2031
|
+
* @default 'square'
|
|
2032
|
+
*/
|
|
2033
|
+
shape?: IconBoxShape;
|
|
2034
|
+
/**
|
|
2035
|
+
* Borda no gradiente da marca, como no Card.
|
|
2036
|
+
* - `true`: borda fixa (1px), para destacar.
|
|
2037
|
+
* - `'animated'`: borda (2px) com as cores da marca girando devagar, para algo vivo ou em
|
|
2038
|
+
* andamento (um agente trabalhando). Use um por tela; quem pediu menos movimento no sistema vê
|
|
2039
|
+
* a borda parada.
|
|
2040
|
+
*/
|
|
2041
|
+
gradientBorder?: boolean | 'animated';
|
|
1974
2042
|
}
|
|
1975
2043
|
|
|
1976
2044
|
/**
|
|
1977
2045
|
* Ícone dentro de uma caixinha com borda e sombra leve. É o ícone dos títulos de card e dos números
|
|
1978
2046
|
* das dashboards. Sem `color`, o ícone vem no gradiente da marca.
|
|
2047
|
+
* `shape="circle"` com `gradientBorder="animated"` é o ícone de um agente de IA ao lado do nome dele.
|
|
1979
2048
|
* Use para identificar um bloco; não use como botão (use IconButton).
|
|
1980
2049
|
* @example <IconBox icon="file_list3" />
|
|
2050
|
+
* @example <IconBox icon="robot2" shape="circle" gradientBorder="animated" />
|
|
1981
2051
|
*/
|
|
1982
|
-
declare const IconBox: ({ icon, color, size }: IconBoxProps) => react_jsx_runtime.JSX.Element;
|
|
2052
|
+
declare const IconBox: ({ icon, color, size, shape, gradientBorder, }: IconBoxProps) => react_jsx_runtime.JSX.Element;
|
|
1983
2053
|
|
|
1984
2054
|
/**
|
|
1985
2055
|
* Validation state for form fields.
|
|
@@ -3558,6 +3628,100 @@ interface ViewToggleProps<V extends string = string> {
|
|
|
3558
3628
|
*/
|
|
3559
3629
|
declare const ViewToggle: <V extends string = string>({ options, value, onChange, "aria-label": ariaLabel, size, fullWidth, }: ViewToggleProps<V>) => react_jsx_runtime.JSX.Element;
|
|
3560
3630
|
|
|
3631
|
+
/** Props for the NavigationCard component */
|
|
3632
|
+
interface NavigationCardProps {
|
|
3633
|
+
/** Ícone do atalho, em gradiente dentro de um círculo. */
|
|
3634
|
+
icon: IconsName;
|
|
3635
|
+
/** Nome da tela para onde o atalho leva (ex. "Produtos"). */
|
|
3636
|
+
title: string;
|
|
3637
|
+
/** Uma frase sobre o que a pessoa encontra lá. */
|
|
3638
|
+
description: string;
|
|
3639
|
+
/** Chamado ao clicar ou apertar Enter/Espaço. Sem ele, o card é só ilustração e não recebe foco. */
|
|
3640
|
+
onClick?: () => void;
|
|
3641
|
+
/** `data-testid` do card, para testes. @default 'navigation-card' */
|
|
3642
|
+
'data-testid'?: string;
|
|
3643
|
+
}
|
|
3644
|
+
/** Um atalho da lista do NavigationCards. */
|
|
3645
|
+
interface NavigationCardsItem extends NavigationCardProps {
|
|
3646
|
+
/** Chave única do atalho na lista. */
|
|
3647
|
+
key: string;
|
|
3648
|
+
}
|
|
3649
|
+
/** Props for the NavigationCards component */
|
|
3650
|
+
interface NavigationCardsProps {
|
|
3651
|
+
/** Atalhos, na ordem em que aparecem (até uns cinco). */
|
|
3652
|
+
items: NavigationCardsItem[];
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
/**
|
|
3656
|
+
* Atalho para outra tela, em card: ícone no círculo, título e descrição centralizados e a seta
|
|
3657
|
+
* no canto. Use em linha, com poucos atalhos (até uns cinco), pelo NavigationCards.
|
|
3658
|
+
* Para muitos atalhos ou atalhos em grupos, use NavigationSections; para link no meio do texto, TextLink.
|
|
3659
|
+
* @example <NavigationCard icon="barcode_box" title="Produtos" description="Total de produtos cadastrados" onClick={goToProducts} />
|
|
3660
|
+
*/
|
|
3661
|
+
declare const NavigationCard: ({ icon, title, description, onClick, "data-testid": testId, }: NavigationCardProps) => react_jsx_runtime.JSX.Element;
|
|
3662
|
+
|
|
3663
|
+
/**
|
|
3664
|
+
* Linha de atalhos em card (NavigationCard) no topo de uma dashboard. Os cards dividem a
|
|
3665
|
+
* largura e descem para a linha de baixo quando não cabem (mínimo de 220px cada).
|
|
3666
|
+
* Use com poucos atalhos (até uns cinco); para muitos ou em grupos, use NavigationSections.
|
|
3667
|
+
* @example
|
|
3668
|
+
* <NavigationCards
|
|
3669
|
+
* items={[
|
|
3670
|
+
* { key: 'products', icon: 'barcode_box', title: 'Produtos', description: 'Total de produtos cadastrados' },
|
|
3671
|
+
* { key: 'orders', icon: 'checkbox_circle', title: 'Pedidos de compra', description: 'Registre e acompanhe pedidos' },
|
|
3672
|
+
* ]}
|
|
3673
|
+
* />
|
|
3674
|
+
*/
|
|
3675
|
+
declare const NavigationCards: ({ items }: NavigationCardsProps) => react_jsx_runtime.JSX.Element;
|
|
3676
|
+
|
|
3677
|
+
/** Um atalho dentro de uma seção do NavigationSections. */
|
|
3678
|
+
interface NavigationSectionItem {
|
|
3679
|
+
/** Chave única do atalho na seção. */
|
|
3680
|
+
key: string;
|
|
3681
|
+
/** Ícone do atalho, numa caixinha (IconBox). */
|
|
3682
|
+
icon: IconsName;
|
|
3683
|
+
/** Nome da tela para onde o atalho leva (ex. "Fornecedores"). */
|
|
3684
|
+
title: string;
|
|
3685
|
+
/** O que a pessoa encontra lá. Corta em duas linhas. */
|
|
3686
|
+
description: string;
|
|
3687
|
+
/** Chamado ao clicar ou apertar Enter/Espaço. Sem ele, o atalho é só ilustração e não recebe foco. */
|
|
3688
|
+
onClick?: () => void;
|
|
3689
|
+
}
|
|
3690
|
+
/** Um grupo de atalhos do NavigationSections. */
|
|
3691
|
+
interface NavigationSection {
|
|
3692
|
+
/** Chave única da seção. */
|
|
3693
|
+
key: string;
|
|
3694
|
+
/** Ícone pequeno antes do nome da seção. */
|
|
3695
|
+
icon: IconsName;
|
|
3696
|
+
/** Nome da seção (ex. "Cadastro & Configuração"). Aparece em maiúsculas. */
|
|
3697
|
+
title: string;
|
|
3698
|
+
/** Atalhos da seção, na ordem em que aparecem. */
|
|
3699
|
+
items: NavigationSectionItem[];
|
|
3700
|
+
}
|
|
3701
|
+
/** Props for the NavigationSections component */
|
|
3702
|
+
interface NavigationSectionsProps {
|
|
3703
|
+
/** Seções, de cima para baixo. Seção sem atalho não aparece. */
|
|
3704
|
+
sections: NavigationSection[];
|
|
3705
|
+
}
|
|
3706
|
+
|
|
3707
|
+
/**
|
|
3708
|
+
* Painel de atalhos agrupados em seções, para o topo de módulos com muitas telas (Compliance,
|
|
3709
|
+
* Relatórios). Cada atalho é uma linha com ícone em caixa, título, descrição de até duas
|
|
3710
|
+
* linhas e seta. Para poucos atalhos soltos (até uns cinco), use NavigationCards.
|
|
3711
|
+
* @example
|
|
3712
|
+
* <NavigationSections
|
|
3713
|
+
* sections={[
|
|
3714
|
+
* {
|
|
3715
|
+
* key: 'register',
|
|
3716
|
+
* icon: 'file_list',
|
|
3717
|
+
* title: 'Cadastro & Configuração',
|
|
3718
|
+
* items: [{ key: 'providers', icon: 'user_community', title: 'Fornecedores', description: 'Gerencie e monitore seus fornecedores', onClick: goToProviders }],
|
|
3719
|
+
* },
|
|
3720
|
+
* ]}
|
|
3721
|
+
* />
|
|
3722
|
+
*/
|
|
3723
|
+
declare const NavigationSections: ({ sections }: NavigationSectionsProps) => react_jsx_runtime.JSX.Element;
|
|
3724
|
+
|
|
3561
3725
|
/** Props for the Text component — the main typography primitive */
|
|
3562
3726
|
interface TextProps {
|
|
3563
3727
|
/** Text content or child elements */
|
|
@@ -3635,4 +3799,4 @@ declare const useIsTablet: (options?: ScreenHookOptions) => boolean;
|
|
|
3635
3799
|
*/
|
|
3636
3800
|
declare const useBreakpoint: ({ ssr }?: ScreenHookOptions) => Breakpoint | "base";
|
|
3637
3801
|
|
|
3638
|
-
export { Accordion, type AccordionProps, ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, type AlertStatus, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, BarChart, type BarChartData, type BarChartProps, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type Breakpoint, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_COLOR_ORDER, CHART_OTHER_COLOR, type CSSCursor, Calendar, type CalendarEvent, type CalendarLabels, type CalendarLegendItem, type CalendarProps, CanvasButton, type CanvasButtonProps, CanvasPanel, type CanvasPanelProps, Card, type CardProps, type CardVariant, Carousel, type CarouselProps, type CellAlign, type ChartColorName, ChartLegend, type ChartLegendItem, type ChartLegendProps, CheckBox, type CheckBoxProps, Checkbox, type CheckboxAlign, type CheckboxProps, type ClientFont, type ClientThemeIssue, type ClientThemeOptions, ConfirmDialog, type ConfirmDialogProps, ConfirmDialogProvider, type ConfirmDialogReason, type ConfirmOptions, CustomAutocomplete, CustomBox, CustomCheckBox, type CustomIconName, type CustomIconProps, CustomInput, CustomSwitch, CustomTextArea, DEFAULT_DATE_LABELS, DatePicker, type DatePickerLabels, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeepPartial, DirectionToggle, type DirectionToggleProps, Divider, type DividerProps, DoughnutChart, type DoughnutChartProps, DragNDrop, type DragNDropProps, Drawer, type DrawerAnchor, type DrawerProps, EmptyState, type EmptyStateProps, type ExternalIconName, FileDropzone, type FileDropzoneProps, FileImagePreview, FileImagePreviewList, type FileImagePreviewListProps, type FileImagePreviewProps, FilePreview, FilePreviewList, type FilePreviewListProps, type FilePreviewProps, FullscreenToggle, type FullscreenToggleProps, GlobalStyle, Icon, IconBox, type IconBoxProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, type IconsName, Image, type ImageProps, InfoItem, type InfoItemProps, Input, type InputProps, LUCIDE_PREFIX, type LegacyButtonSize, LineChart, type LineChartData, type LineChartProps, type LineChartSeries, type LuIconName, type LucideIconName, Matrix, type MatrixAxisItem, type MatrixBand, type MatrixCell, type MatrixCellStyle, type MatrixItem, type MatrixKey, type MatrixLegendItem, type MatrixProps, Modal, type ModalProps, MonthPicker, type MonthPickerProps, Pagination, type PaginationProps, type PartsProps, Popover, type PopoverPosition, type PopoverProps, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, type RadioOption, type RiIconName, SUPPORTED_CLIENT_FONTS, type ScreenHookOptions, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, SelectableItem, type SelectableItemProps, SidePanel, type SidePanelProps, type SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, type SpacingName, Spinner, type SpinnerProps, StatCard, type StatCardProps, type StepState, Stepper, type StepperLabels, type StepperProps, type StepperStep, Switch, type SwitchProps, type TabItem, Table, type TableData, type TableHeader, TablePagination, type TablePaginationProps, type TableProps, Tabs, type TabsProps, type TabsVariant, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextElementTags, TextLink, type TextLinkProps, type TextProps, type Theme, type ThemeColorPath, type ThemeColors, type ThemeProps, CustomThemeProvider as ThemeProvider, Timeline, type TimelineProps, TintedSection, type TintedSectionProps, TitleCard, type TitleCardProps, Toast, type ToastApi, type ToastConfig, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, ToastStackStyles, type ToastType, type Tokens, Tooltip, type TooltipProps, type TreeDirection, TreeNode, type TreeNodeBaseProps, type TreeNodeCaptionProps, type TreeNodeProps, type TreeNodeTitleProps, TreeView, type TreeViewProps, TreemapChart, type TreemapChartData, type TreemapChartProps, Treeview, type TreeviewProps, ViewToggle, type ViewToggleOption, type ViewToggleProps, adjustColorBrightness, allIconsOptions, breakpointValues, createClientTheme, createTheme, customIconsOptions, defaultTheme, formatDateKey, getBand, getChartColors, getClientThemeIssues, getContrastRatio, getLuminance, getReadableTextColor, getThemeColor, getThemeContrastColor, getThemeSize, getThemeSpacing, initialDay, isLucideName, legacyTheme, media, mixColors, parseDateText, parseIconNameToLucide, parseIconNameToRemixIcon, tokens, useBreakpoint, useConfirm, useIsMobile, useIsTablet, useMediaQuery, useToast };
|
|
3802
|
+
export { Accordion, type AccordionProps, ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, type AlertStatus, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, BarChart, type BarChartData, type BarChartProps, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type Breakpoint, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_COLOR_ORDER, CHART_OTHER_COLOR, type CSSCursor, Calendar, type CalendarEvent, type CalendarLabels, type CalendarLegendItem, type CalendarProps, CanvasButton, type CanvasButtonProps, CanvasPanel, type CanvasPanelProps, Card, type CardProps, type CardVariant, Carousel, type CarouselProps, type CellAlign, type ChartColorName, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartLegendVariant, CheckBox, type CheckBoxProps, Checkbox, type CheckboxAlign, type CheckboxProps, type ClientFont, type ClientThemeIssue, type ClientThemeOptions, ConfirmDialog, type ConfirmDialogProps, ConfirmDialogProvider, type ConfirmDialogReason, type ConfirmOptions, CustomAutocomplete, CustomBox, CustomCheckBox, type CustomIconName, type CustomIconProps, CustomInput, CustomSwitch, CustomTextArea, DEFAULT_DATE_LABELS, DatePicker, type DatePickerLabels, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DeepPartial, DirectionToggle, type DirectionToggleProps, Divider, type DividerProps, DoughnutChart, type DoughnutChartProps, DragNDrop, type DragNDropProps, Drawer, type DrawerAnchor, type DrawerProps, EmptyState, type EmptyStateProps, type ExternalIconName, FileDropzone, type FileDropzoneProps, FileImagePreview, FileImagePreviewList, type FileImagePreviewListProps, type FileImagePreviewProps, FilePreview, FilePreviewList, type FilePreviewListProps, type FilePreviewProps, FullscreenToggle, type FullscreenToggleProps, GlobalStyle, type GradientBorderOptions, Icon, IconBox, type IconBoxProps, type IconBoxShape, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, type IconsName, Image, type ImageProps, InfoItem, type InfoItemProps, Input, type InputProps, LUCIDE_PREFIX, type LegacyButtonSize, LineChart, type LineChartData, type LineChartProps, type LineChartSeries, type LuIconName, type LucideIconName, Matrix, type MatrixAxisItem, type MatrixBand, type MatrixCell, type MatrixCellStyle, type MatrixItem, type MatrixKey, type MatrixLegendItem, type MatrixProps, Modal, type ModalProps, MonthPicker, type MonthPickerProps, NavigationCard, type NavigationCardProps, NavigationCards, type NavigationCardsItem, type NavigationCardsProps, type NavigationSection, type NavigationSectionItem, NavigationSections, type NavigationSectionsProps, Pagination, type PaginationProps, type PartsProps, Popover, type PopoverPosition, type PopoverProps, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, type RadioOption, type RiIconName, SUPPORTED_CLIENT_FONTS, type ScreenHookOptions, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, SelectableItem, type SelectableItemProps, SidePanel, type SidePanelProps, type SizeType, Skeleton, type SkeletonProps, Slider, type SliderProps, type SpacingName, Spinner, type SpinnerProps, StatCard, type StatCardProps, type StepState, Stepper, type StepperLabels, type StepperProps, type StepperStep, Switch, type SwitchProps, type TabItem, Table, type TableData, type TableHeader, TablePagination, type TablePaginationProps, type TableProps, Tabs, type TabsProps, type TabsVariant, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextElementTags, TextLink, type TextLinkProps, type TextProps, type Theme, type ThemeColorPath, type ThemeColors, type ThemeProps, CustomThemeProvider as ThemeProvider, Timeline, type TimelineProps, TintedSection, type TintedSectionProps, TitleCard, type TitleCardProps, Toast, type ToastApi, type ToastConfig, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, ToastStackStyles, type ToastType, type Tokens, Tooltip, type TooltipProps, type TreeDirection, TreeNode, type TreeNodeBaseProps, type TreeNodeCaptionProps, type TreeNodeProps, type TreeNodeTitleProps, TreeView, type TreeViewProps, TreemapChart, type TreemapChartData, type TreemapChartProps, Treeview, type TreeviewProps, ViewToggle, type ViewToggleOption, type ViewToggleProps, adjustColorBrightness, allIconsOptions, breakpointValues, createClientTheme, createTheme, customIconsOptions, defaultTheme, formatDateKey, getBand, getChartColors, getClientThemeIssues, getContrastRatio, getLuminance, getReadableTextColor, getThemeColor, getThemeContrastColor, getThemeSize, getThemeSpacing, gradientBorder, initialDay, isLucideName, legacyTheme, media, mixColors, parseDateText, parseIconNameToLucide, parseIconNameToRemixIcon, thinScrollbar, thinScrollbarOnHover, tokens, useBreakpoint, useConfirm, useIsMobile, useIsTablet, useMediaQuery, useToast };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{List as
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as i}from"react/jsx-runtime";import{List as l,Item as a,Marker as t,Label as d,Value as n}from"./chart-legend.styles.js";const o=({items:o,direction:c="row",variant:h="dot"})=>e(l,{$direction:c,$variant:h,"data-testid":"chart-legend",children:o.map((l=>r(a,{$variant:h,children:[e(t,{$color:l.color,$variant:h,"aria-hidden":"true"}),"square"===h?r(d,{title:l.label,children:[l.label,void 0!==l.value&&r(i,{children:[": ",l.value]})]}):r(i,{children:[e(d,{title:l.label,children:l.label}),void 0!==l.value&&e(n,{$direction:c,children:l.value})]})]},l.label)))});export{o as ChartLegend};
|
|
2
2
|
//# sourceMappingURL=chart-legend.comp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-legend.comp.js","sources":["../../../../../src/components/charts/chart-legend/chart-legend.comp.tsx"],"sourcesContent":["import { ChartLegendProps } from './chart-legend.types'\n\nimport * as Styles from './chart-legend.styles'\n\n/**\n * Legenda de gráfico: bolinha na cor da série, nome e valor opcional.\n * Use ao lado ou abaixo de qualquer gráfico; o DoughnutChart já monta a dele com a prop `legend`.\n * @example <ChartLegend items={[{ label: 'Aprovados', color: 'success', value: '60%' }]} />\n */\nexport const ChartLegend = ({
|
|
1
|
+
{"version":3,"file":"chart-legend.comp.js","sources":["../../../../../src/components/charts/chart-legend/chart-legend.comp.tsx"],"sourcesContent":["import { ChartLegendProps } from './chart-legend.types'\n\nimport * as Styles from './chart-legend.styles'\n\n/**\n * Legenda de gráfico: bolinha na cor da série, nome e valor opcional.\n * Use ao lado ou abaixo de qualquer gráfico; o DoughnutChart já monta a dele com a prop `legend`.\n * `variant=\"square\"` é a legenda das roscas das dashboards: quadradinho e \"Nome: valor\".\n * @example <ChartLegend items={[{ label: 'Aprovados', color: 'success', value: '60%' }]} />\n * @example <ChartLegend variant=\"square\" direction=\"column\" items={[{ label: 'Pendentes', color: 'chart.purple', value: 850 }]} />\n */\nexport const ChartLegend = ({\n items,\n direction = 'row',\n variant = 'dot',\n}: ChartLegendProps) => (\n <Styles.List\n $direction={direction}\n $variant={variant}\n data-testid=\"chart-legend\"\n >\n {items.map((item) => (\n <Styles.Item key={item.label} $variant={variant}>\n <Styles.Marker\n $color={item.color}\n $variant={variant}\n aria-hidden=\"true\"\n />\n {variant === 'square' ? (\n <Styles.Label title={item.label}>\n {item.label}\n {item.value !== undefined && <>: {item.value}</>}\n </Styles.Label>\n ) : (\n <>\n <Styles.Label title={item.label}>{item.label}</Styles.Label>\n {item.value !== undefined && (\n <Styles.Value $direction={direction}>{item.value}</Styles.Value>\n )}\n </>\n )}\n </Styles.Item>\n ))}\n </Styles.List>\n)\n"],"names":["ChartLegend","items","direction","variant","_jsx","Styles","$direction","$variant","children","map","item","_jsxs","color","title","label","undefined","value","_Fragment"],"mappings":"4JAWO,MAAMA,EAAcA,EACzBC,QACAC,YAAY,MACZC,UAAU,SAEVC,EAACC,EACa,CAAAC,WAAAJ,EACFK,SAAAJ,gBACE,eAAcK,SAEzBP,EAAMQ,KAAKC,GACVC,EAACN,EAAuC,CAAAE,SAAAJ,YACtCC,EAACC,UACSK,EAAKE,MAAKL,SACRJ,EAAO,cACL,SAED,WAAZA,EACCQ,EAACN,EAAY,CAACQ,MAAOH,EAAKI,MAAKN,SAAA,CAC5BE,EAAKI,WACUC,IAAfL,EAAKM,OAAuBL,oBAAKD,EAAKM,YAGzCL,EAAAM,EAAA,CAAAT,SAAA,CACEJ,EAACC,EAAY,CAACQ,MAAOH,EAAKI,MAAQN,SAAAE,EAAKI,aACvBC,IAAfL,EAAKM,OACJZ,EAACC,EAAyB,CAAAC,WAAAJ,EAAYM,SAAAE,EAAKM,aAfjCN,EAAKI"}
|
|
@@ -1,40 +1,47 @@
|
|
|
1
|
-
import{styled as e,css as t}from"styled-components";import{getThemeColor as
|
|
1
|
+
import{styled as e,css as t}from"styled-components";import{getThemeColor as i}from"../../../theme/theme.util.js";const o=e.ul`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 0;
|
|
4
4
|
padding: 0;
|
|
5
5
|
list-style: none;
|
|
6
6
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
7
7
|
|
|
8
|
-
${({$direction:e,theme:o})=>"row"===e?t`
|
|
8
|
+
${({$direction:e,$variant:i,theme:o})=>"row"===e?t`
|
|
9
9
|
flex-wrap: wrap;
|
|
10
10
|
gap: ${o.spacing.xs} ${o.spacing.md};
|
|
11
11
|
`:t`
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
gap: ${o.spacing.sm};
|
|
13
|
+
gap: ${"square"===i?o.spacing.xs:o.spacing.sm};
|
|
14
14
|
`}
|
|
15
|
-
`,
|
|
15
|
+
`,a=e.li`
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
gap: ${({theme:e})=>e.spacing.sm};
|
|
19
19
|
min-width: 0;
|
|
20
|
-
font-size: ${({theme:
|
|
21
|
-
color: ${({theme:
|
|
22
|
-
`,
|
|
20
|
+
font-size: ${({$variant:e,theme:t})=>"square"===e?t.typography.textSize.caption:t.typography.textSize.bodySm};
|
|
21
|
+
color: ${({$variant:e,theme:t})=>"square"===e?t.colors.grey_1:t.colors.grey_2};
|
|
22
|
+
`,n=e.span`
|
|
23
23
|
flex: none;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
background: ${({$color:e,theme:t})=>i(e,t)};
|
|
25
|
+
|
|
26
|
+
${({$variant:e,theme:i})=>"square"===e?t`
|
|
27
|
+
width: ${i.spacing.md};
|
|
28
|
+
height: ${i.spacing.md};
|
|
29
|
+
border-radius: ${i.radius.sm};
|
|
30
|
+
`:t`
|
|
31
|
+
width: 10px;
|
|
32
|
+
height: 10px;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
`}
|
|
35
|
+
`,r=e.span`
|
|
29
36
|
min-width: 0;
|
|
30
37
|
overflow: hidden;
|
|
31
38
|
text-overflow: ellipsis;
|
|
32
39
|
white-space: nowrap;
|
|
33
|
-
`,
|
|
40
|
+
`,s=e.span`
|
|
34
41
|
flex: none;
|
|
35
42
|
margin-left: ${({$direction:e})=>"column"===e?"auto":"0"};
|
|
36
43
|
padding-left: ${({theme:e})=>e.spacing.sm};
|
|
37
44
|
font-weight: ${({theme:e})=>e.typography.fontWeight.semibold};
|
|
38
45
|
color: ${({theme:e})=>e.colors.grey_1};
|
|
39
|
-
`;export{
|
|
46
|
+
`;export{a as Item,r as Label,o as List,n as Marker,s as Value};
|
|
40
47
|
//# sourceMappingURL=chart-legend.styles.js.map
|