@sybilion/uilib 1.3.95 → 1.3.97
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/dist/esm/components/ui/Button/Button.styl.js +2 -2
- package/dist/esm/components/ui/Card/Card.js +5 -5
- package/dist/esm/components/ui/Card/Card.styl.js +2 -2
- package/dist/esm/components/ui/Table/Table.styl.js +1 -1
- package/dist/esm/components/widgets/PerformanceChart/PerformanceChart.styl.js +2 -2
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +5 -5
- package/dist/esm/types/src/components/ui/Card/Card.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Card/Card.types.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/ui/Button/Button.styl +11 -6
- package/src/components/ui/Card/Card.styl +9 -0
- package/src/components/ui/Card/Card.styl.d.ts +4 -0
- package/src/components/ui/Card/Card.tsx +17 -8
- package/src/components/ui/Card/Card.types.ts +1 -0
- package/src/components/ui/Table/Table.styl +15 -15
- package/src/components/widgets/PerformanceChart/PerformanceChart.styl +3 -0
- package/src/components/widgets/PerformanceChart/PerformanceChart.styl.d.ts +1 -0
- package/src/components/widgets/PerformanceChart/PerformanceTable.tsx +8 -8
- package/src/docs/pages/CardPage.tsx +59 -10
- package/src/docs/pages/TablePage.tsx +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Button_root__NT88y{align-items:center;border:0;border-radius:var(--radius-button);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:Manrope,sans-serif;font-size:15px;font-weight:500;gap:10px;justify-content:center;line-height:1;outline:none;transition:all var(--dur-base) var(--ease-standard);white-space:nowrap}.Button_root__NT88y:disabled{opacity:.5;pointer-events:none}.Button_root__NT88y:focus-visible{border-color:var(--ring);ring:3px var(--ring-50)}.Button_root__NT88y[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive-200)}.Button_root__NT88y svg{flex-shrink:0;pointer-events:none}.Button_default__xZ4lt{background-color:var(--primary);color:var(--primary-foreground)}.Button_default__xZ4lt:hover{background-color:var(--sb-gray-800)}.Button_destructive__g1Ume{background-color:var(--destructive);color:#fff}.Button_destructive__g1Ume:hover{background-color:var(--destructive-900)}.Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-200)}.dark .Button_destructive__g1Ume{background-color:var(--destructive-600)}.dark .Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-400)}.Button_outline__E4R5l{background-color:var(--background);border:1px solid var(--border)}.Button_outline__E4R5l:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .Button_outline__E4R5l{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .Button_outline__E4R5l:hover{background-color:var(--sb-gray-800)}.Button_secondary__ptn3U{background-color:var(--secondary);color:var(--secondary-foreground)}.Button_secondary__ptn3U:hover{background-color:var(--secondary-800)}.Button_ghost__okHgV:hover{background-color:var(--accent);color:var(--accent-foreground)}.dark .Button_ghost__okHgV:hover{background-color:var(--accent-500)}.Button_link__yHy2o{color:var(--primary);text-decoration:underline;text-underline-offset:4px}.Button_link__yHy2o:hover{text-decoration:underline}.
|
|
4
|
-
var S = {"root":"Button_root__NT88y","default":"Button_default__xZ4lt","destructive":"Button_destructive__g1Ume","outline":"Button_outline__E4R5l","secondary":"Button_secondary__ptn3U","ghost":"Button_ghost__okHgV","link":"Button_link__yHy2o","
|
|
3
|
+
var css_248z = ".Button_root__NT88y{align-items:center;border:0;border-radius:var(--radius-button);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:Manrope,sans-serif;font-size:15px;font-weight:500;gap:10px;justify-content:center;line-height:1;outline:none;transition:all var(--dur-base) var(--ease-standard);white-space:nowrap}.Button_root__NT88y:disabled{opacity:.5;pointer-events:none}.Button_root__NT88y:focus-visible{border-color:var(--ring);ring:3px var(--ring-50)}.Button_root__NT88y[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive-200)}.Button_root__NT88y svg{flex-shrink:0;pointer-events:none}.Button_default__xZ4lt{background-color:var(--primary);color:var(--primary-foreground)}.Button_default__xZ4lt:hover{background-color:var(--sb-gray-800)}.Button_destructive__g1Ume{background-color:var(--destructive);color:#fff}.Button_destructive__g1Ume:hover{background-color:var(--destructive-900)}.Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-200)}.dark .Button_destructive__g1Ume{background-color:var(--destructive-600)}.dark .Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-400)}.Button_outline__E4R5l{background-color:var(--background);border:1px solid var(--border)}.Button_outline__E4R5l:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .Button_outline__E4R5l{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .Button_outline__E4R5l:hover{background-color:var(--sb-gray-800)}.Button_secondary__ptn3U{background-color:var(--secondary);color:var(--secondary-foreground)}.Button_secondary__ptn3U:hover{background-color:var(--secondary-800)}.Button_ghost__okHgV:hover{background-color:var(--accent);color:var(--accent-foreground)}.dark .Button_ghost__okHgV:hover{background-color:var(--accent-500)}.Button_link__yHy2o{color:var(--primary);text-decoration:underline;text-underline-offset:4px}.Button_link__yHy2o:hover{text-decoration:underline}.Button_sizeSm__skgOG{border-radius:var(--p-5);font-size:13px;height:30px;padding:0 14px}.Button_sizeMd__7MeqU{border-radius:var(--p-4);height:44px;padding:var(--p-3) var(--p-4)}.Button_sizeLg__Xfon-{border-radius:var(--p-4);font-size:var(--text-base);height:48px;padding:0 var(--p-6)}.Button_sizeIcon__9ef49{height:48px;padding:0;width:48px}.Button_sizeIcon__9ef49.Button_sizeSm__skgOG{height:36px;padding:0;width:36px}.Button_sizeIcon__9ef49.Button_sizeMd__7MeqU{height:48px;padding:0;width:48px}.Button_sizeIcon__9ef49.Button_sizeLg__Xfon-{height:56px;padding:0;width:56px}";
|
|
4
|
+
var S = {"root":"Button_root__NT88y","default":"Button_default__xZ4lt","destructive":"Button_destructive__g1Ume","outline":"Button_outline__E4R5l","secondary":"Button_secondary__ptn3U","ghost":"Button_ghost__okHgV","link":"Button_link__yHy2o","sizeSm":"Button_sizeSm__skgOG","sizeMd":"Button_sizeMd__7MeqU","sizeLg":"Button_sizeLg__Xfon-","sizeIcon":"Button_sizeIcon__9ef49"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import cn from 'classnames';
|
|
3
2
|
import { useRef, useEffect } from 'react';
|
|
4
|
-
import { TextWithDeferTooltip } from '../TextWithDeferTooltip/TextWithDeferTooltip.js';
|
|
5
|
-
import { Scroll } from '@homecode/ui';
|
|
6
3
|
import S from './Card.styl.js';
|
|
4
|
+
import { Scroll } from '@homecode/ui';
|
|
5
|
+
import { TextWithDeferTooltip } from '../TextWithDeferTooltip/TextWithDeferTooltip.js';
|
|
6
|
+
import cn from 'classnames';
|
|
7
7
|
|
|
8
8
|
const SCROLL_OFFSET = 300;
|
|
9
|
-
function Card({ className, paddingSize = 'm', ...props }) {
|
|
10
|
-
return (jsx("div", { className: cn(S.root, S[`padding-${paddingSize}`], className), ...props }));
|
|
9
|
+
function Card({ className, paddingSize = 'm', radiusSize = 'm', ...props }) {
|
|
10
|
+
return (jsx("div", { className: cn(S.root, S[`padding-${paddingSize}`], S[`radius-${radiusSize}`], className), ...props }));
|
|
11
11
|
}
|
|
12
12
|
function LinkCard({ className, ...props }) {
|
|
13
13
|
return (jsx("a", { target: "_blank", rel: "noopener noreferrer", "data-slot": "link-card", className: cn(S.root, className), ...props }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Card_root__8q1qb{background-color:var(--card);border:1px solid var(--border);border-radius:var(--radius-card);box-shadow:var(--shadow-1);color:var(--card-foreground);display:flex;flex-direction:column;gap:var(--p-4);max-height:100%;position:relative}.Card_root__8q1qb.Card_padding-s__lpLdw{padding:var(--p-4)}.Card_root__8q1qb.Card_padding-m__TvrUr{padding:var(--p-6)}.Card_root__8q1qb.Card_padding-l__lRXKf{padding:var(--p-8)}.Card_header__5P3LR{align-items:flex-start;display:flex;font-size:var(--text-base);gap:var(--p-4);justify-content:space-between}.Card_header__5P3LR:has([data-slot=card-action]){grid-template-columns:1fr auto}.Card_icon__-gwqq{align-items:center;border-radius:calc(var(--p-4) - 2px);box-shadow:inset 0 0 0 1px var(--border);display:flex;flex-shrink:0;height:var(--p-12);justify-content:center;width:var(--p-12)}.Card_icon__-gwqq.Card_withBackground__v0pKJ{background:var(--page-color);box-shadow:none}.Card_icon__-gwqq>img,.Card_icon__-gwqq>svg{height:var(--p-5);width:var(--p-5)}.Card_headerText__GEqp9{flex-grow:1;overflow:hidden;width:100%}.Card_scroll__iUPCa{max-height:100%;overflow:hidden;padding-right:var(--p-6);width:calc(100% + var(--p-6))}.Card_scroll__iUPCa [data-slot=card-content]{padding-right:1px}.Card_centered__BIpG2,.Card_fullHeight__EU9J4{display:flex;flex-direction:column}.Card_centered__BIpG2{align-items:center;justify-content:center}.Card_fullHeight__EU9J4{flex-grow:1}.Card_description__gjvqz,.Card_title__wDAJw{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.Card_title__wDAJw{font-size:var(--text-lg);font-weight:500;line-height:var(--p-7);overflow:hidden}.Card_description__gjvqz{color:var(--muted-foreground);font-size:var(--text-sm);max-width:100%;word-break:break-word}.Card_action__Y2YHY{grid-column-start:2;grid-row-span:2;align-self:start;grid-row-start:1;justify-self:end}.Card_footer__T0BW7{align-items:center;display:flex;flex-shrink:0;justify-content:space-between;overflow:hidden}.Card_footer__T0BW7.border-t{padding-top:var(--p-6)}";
|
|
4
|
-
var S = {"root":"Card_root__8q1qb","padding-s":"Card_padding-s__lpLdw","padding-m":"Card_padding-m__TvrUr","padding-l":"Card_padding-l__lRXKf","header":"Card_header__5P3LR","icon":"Card_icon__-gwqq","withBackground":"Card_withBackground__v0pKJ","headerText":"Card_headerText__GEqp9","scroll":"Card_scroll__iUPCa","centered":"Card_centered__BIpG2","fullHeight":"Card_fullHeight__EU9J4","title":"Card_title__wDAJw","description":"Card_description__gjvqz","action":"Card_action__Y2YHY","footer":"Card_footer__T0BW7"};
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Card_root__8q1qb{background-color:var(--card);border:1px solid var(--border);border-radius:var(--radius-card);box-shadow:var(--shadow-1);color:var(--card-foreground);display:flex;flex-direction:column;gap:var(--p-4);max-height:100%;position:relative}.Card_root__8q1qb.Card_padding-s__lpLdw{padding:var(--p-4)}.Card_root__8q1qb.Card_padding-m__TvrUr{padding:var(--p-6)}.Card_root__8q1qb.Card_padding-l__lRXKf{padding:var(--p-8)}.Card_root__8q1qb.Card_radius-s__gfnoW{border-radius:var(--p-2)}.Card_root__8q1qb.Card_radius-m__DspuG{border-radius:var(--p-3)}.Card_root__8q1qb.Card_radius-l__3WwF3{border-radius:var(--p-4)}.Card_root__8q1qb.Card_radius-xl__dji47{border-radius:var(--p-5)}.Card_header__5P3LR{align-items:flex-start;display:flex;font-size:var(--text-base);gap:var(--p-4);justify-content:space-between}.Card_header__5P3LR:has([data-slot=card-action]){grid-template-columns:1fr auto}.Card_icon__-gwqq{align-items:center;border-radius:calc(var(--p-4) - 2px);box-shadow:inset 0 0 0 1px var(--border);display:flex;flex-shrink:0;height:var(--p-12);justify-content:center;width:var(--p-12)}.Card_icon__-gwqq.Card_withBackground__v0pKJ{background:var(--page-color);box-shadow:none}.Card_icon__-gwqq>img,.Card_icon__-gwqq>svg{height:var(--p-5);width:var(--p-5)}.Card_headerText__GEqp9{flex-grow:1;overflow:hidden;width:100%}.Card_scroll__iUPCa{max-height:100%;overflow:hidden;padding-right:var(--p-6);width:calc(100% + var(--p-6))}.Card_scroll__iUPCa [data-slot=card-content]{padding-right:1px}.Card_centered__BIpG2,.Card_fullHeight__EU9J4{display:flex;flex-direction:column}.Card_centered__BIpG2{align-items:center;justify-content:center}.Card_fullHeight__EU9J4{flex-grow:1}.Card_description__gjvqz,.Card_title__wDAJw{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.Card_title__wDAJw{font-size:var(--text-lg);font-weight:500;line-height:var(--p-7);overflow:hidden}.Card_description__gjvqz{color:var(--muted-foreground);font-size:var(--text-sm);max-width:100%;word-break:break-word}.Card_action__Y2YHY{grid-column-start:2;grid-row-span:2;align-self:start;grid-row-start:1;justify-self:end}.Card_footer__T0BW7{align-items:center;display:flex;flex-shrink:0;justify-content:space-between;overflow:hidden}.Card_footer__T0BW7.border-t{padding-top:var(--p-6)}";
|
|
4
|
+
var S = {"root":"Card_root__8q1qb","padding-s":"Card_padding-s__lpLdw","padding-m":"Card_padding-m__TvrUr","padding-l":"Card_padding-l__lRXKf","radius-s":"Card_radius-s__gfnoW","radius-m":"Card_radius-m__DspuG","radius-l":"Card_radius-l__3WwF3","radius-xl":"Card_radius-xl__dji47","header":"Card_header__5P3LR","icon":"Card_icon__-gwqq","withBackground":"Card_withBackground__v0pKJ","headerText":"Card_headerText__GEqp9","scroll":"Card_scroll__iUPCa","centered":"Card_centered__BIpG2","fullHeight":"Card_fullHeight__EU9J4","title":"Card_title__wDAJw","description":"Card_description__gjvqz","action":"Card_action__Y2YHY","footer":"Card_footer__T0BW7"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Table_tableContainer__5D8Ht{overflow-x:auto;position:relative;width:100%}.Table_scrollContainer__8-Zr9{width:100%}.Table_scrollInner__QcOf7{display:block}.Table_scrollbar__Zs9-w{bottom:-6px}.Table_withBackground__ASHzK{background-color:var(--background);border-radius:var(--p-4);padding:0 var(--p-6)}.Table_table__OuLba{caption-side:bottom;font-size:var(--text-sm);overflow:hidden;width:100%}.Table_table__OuLba[data-size=sm]{font-size:var(--text-xs)}.Table_table__OuLba[data-size=sm] .Table_tableCell__rJJqf,.Table_table__OuLba[data-size=sm] .Table_tableHead__SSL9f{height:auto;padding:var(--p-2) var(--p-3)}.Table_table__OuLba[data-size=md]{font-size:var(--text-sm)}.Table_table__OuLba[data-size=md] .Table_tableCell__rJJqf,.Table_table__OuLba[data-size=md] .Table_tableHead__SSL9f{height:
|
|
3
|
+
var css_248z = ".Table_tableContainer__5D8Ht{overflow-x:auto;position:relative;width:100%}.Table_scrollContainer__8-Zr9{width:100%}.Table_scrollInner__QcOf7{display:block}.Table_scrollbar__Zs9-w{bottom:-6px}.Table_withBackground__ASHzK{background-color:var(--background);border-radius:var(--p-4);padding:0 var(--p-6)}.Table_table__OuLba{caption-side:bottom;font-size:var(--text-sm);overflow:hidden;width:100%}.Table_table__OuLba[data-size=sm]{font-size:var(--text-xs)}.Table_table__OuLba[data-size=sm] .Table_tableCell__rJJqf,.Table_table__OuLba[data-size=sm] .Table_tableHead__SSL9f{height:auto;padding:var(--p-2) var(--p-3)}.Table_table__OuLba[data-size=md]{font-size:var(--text-sm)}.Table_table__OuLba[data-size=md] .Table_tableCell__rJJqf,.Table_table__OuLba[data-size=md] .Table_tableHead__SSL9f{height:auto;padding:var(--p-3) var(--p-4)}.Table_table__OuLba[data-size=lg]{font-size:var(--text-base)}.Table_table__OuLba[data-size=lg] .Table_tableCell__rJJqf,.Table_table__OuLba[data-size=lg] .Table_tableHead__SSL9f{height:auto;padding:var(--p-5) var(--p-5)}.Table_table__OuLba.Table_withPaddings__zUGoU .Table_tableCell__rJJqf:first-child,.Table_table__OuLba.Table_withPaddings__zUGoU .Table_tableHead__SSL9f:first-child{padding-left:var(--p-6)}.Table_table__OuLba.Table_withPaddings__zUGoU .Table_tableCell__rJJqf:last-child,.Table_table__OuLba.Table_withPaddings__zUGoU .Table_tableHead__SSL9f:last-child{padding-right:var(--p-6)}.Table_tableBody__YyhVh{position:relative}.Table_tableBody__YyhVh tr:last-child{border-bottom:0}.Table_tableFooter__CJXND{background-color:var(--muted-50);font-weight:500}.Table_tableFooter__CJXND tr:last-child{border-bottom:0}.Table_tableRow__CdFFX{border-bottom:1px solid var(--border);position:relative;transition-duration:.15s;transition-property:background-color,color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.Table_tableBody__YyhVh:last-child .Table_tableRow__CdFFX:last-child .Table_tableCell__rJJqf:first-child{border-bottom-left-radius:var(--p-3)}.Table_tableBody__YyhVh:last-child .Table_tableRow__CdFFX:last-child .Table_tableCell__rJJqf:last-child{border-bottom-right-radius:var(--p-3)}.Table_tableBody__YyhVh .Table_tableRow__CdFFX:hover,.Table_tableRow__CdFFX[data-state=selected]{background-color:var(--muted-50)}.Table_tableHead__SSL9f{color:var(--muted-foreground);font-weight:500;min-width:0;text-align:left;vertical-align:middle;white-space:nowrap}.Table_tableHead__SSL9f:has([role=checkbox]){padding-right:0}.Table_tableHead__SSL9f [role=checkbox]{transform:translateY(2px)}.Table_tableCell__rJJqf,.Table_tableHead__SSL9f{min-width:0;position:relative;vertical-align:middle;white-space:nowrap;z-index:1}.Table_tableCell__rJJqf:has([role=checkbox]),.Table_tableHead__SSL9f:has([role=checkbox]){padding-right:0}.Table_tableCell__rJJqf [role=checkbox],.Table_tableHead__SSL9f [role=checkbox]{transform:translateY(2px)}.Table_cellValue__WCD3J{align-items:center;color:var(--muted-foreground);display:flex;gap:var(--p-1)}";
|
|
4
4
|
var S = {"tableContainer":"Table_tableContainer__5D8Ht","scrollContainer":"Table_scrollContainer__8-Zr9","scrollInner":"Table_scrollInner__QcOf7","scrollbar":"Table_scrollbar__Zs9-w","withBackground":"Table_withBackground__ASHzK","table":"Table_table__OuLba","tableHead":"Table_tableHead__SSL9f","tableCell":"Table_tableCell__rJJqf","withPaddings":"Table_withPaddings__zUGoU","tableBody":"Table_tableBody__YyhVh","tableFooter":"Table_tableFooter__CJXND","tableRow":"Table_tableRow__CdFFX","cellValue":"Table_cellValue__WCD3J"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PerformanceChart_root__sda5D{transition:opacity .3s ease-out}.PerformanceChart_root__sda5D,.PerformanceChart_viewTabs__5aHg1{display:flex;flex:1;flex-direction:column;min-height:0;width:100%}.PerformanceChart_toolbarRow__SwRJc{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--p-4);margin-bottom:var(--p-4);width:100%}.PerformanceChart_toolBarRight__ODMr4{align-items:center;display:flex;flex-grow:1;gap:var(--p-4);justify-content:flex-end}.PerformanceChart_viewTabsList__fNv-x{align-items:center;background-color:transparent;display:inline-flex;flex-shrink:0;flex-wrap:wrap;gap:var(--p-2);margin-bottom:0}.PerformanceChart_perHorizonChartWrap__j15JS{min-height:var(--chart-height);position:relative;width:100%}.PerformanceChart_perHorizonChartWrapLoading__1ZGCz .PerformanceChart_chartContainer__qXeA8{opacity:.3;pointer-events:none}.PerformanceChart_perHorizonChartWrapLoading__1ZGCz .recharts-line-dots{display:none}.PerformanceChart_performanceLoadingLayer__GmfFi{inset:0;pointer-events:none;position:absolute;z-index:10}.PerformanceChart_chartEmptyOverlay__zrZ5M{align-items:center;display:flex;inset:0;justify-content:center;padding:var(--p-6);pointer-events:none;position:absolute;z-index:11}.PerformanceChart_chartEmptyOverlay__zrZ5M a{pointer-events:auto}.PerformanceChart_performanceLoadingText__Jwxg3{color:var(--foreground);font-size:16px;font-weight:500}.PerformanceChart_loading__sCsV8{opacity:.5}.PerformanceChart_loaded__a-dM9{opacity:1}.PerformanceChart_chartContainer__qXeA8{margin-left:calc(var(--page-x-padding)*-1 + 26px);max-width:calc(100% + 60px);transition:opacity .3s ease-out;width:calc(100% + 60px)}.PerformanceChart_chartContainer__qXeA8 [data-slot=skeleton]{filter:opacity(.6);height:100%!important;position:relative;width:100%!important}.PerformanceChart_loaded__a-dM9 .PerformanceChart_chartContainer__qXeA8 [data-slot=skeleton]{opacity:0}.PerformanceChart_chartContainer__qXeA8 svg{overflow:visible}@media (max-width:768px){.PerformanceChart_chartContainer__qXeA8{margin-left:calc(var(--page-x-padding)*-1 + 10px);max-width:calc(100% + 30px);width:calc(100% + 30px)}}.PerformanceChart_isEmpty__Xutg2 .PerformanceChart_chartContainer__qXeA8{opacity:.3;pointer-events:none}.PerformanceChart_isEmpty__Xutg2 .recharts-line-dots{display:none}.PerformanceChart_tableSection__tTV55{--side-margin:calc(var(--page-x-padding)*-1);display:flex;flex-direction:column;gap:var(--p-4);margin:var(--p-6) var(--side-margin) 0 var(--side-margin)}.PerformanceChart_tableWrapper__3uB5y{position:relative}.PerformanceChart_tableContainer__PyPUV{overflow-x:auto;position:relative;width:100%}.PerformanceChart_table__8GI8O{background:var(--card);border-radius:14px;box-shadow:inset 0 0 0 1px var(--border)}.PerformanceChart_table__8GI8O td:first-child,.PerformanceChart_table__8GI8O th:first-child{padding-left:var(--p-10)!important}.PerformanceChart_table__8GI8O td:last-child,.PerformanceChart_table__8GI8O th:last-child{padding-right:0!important}.PerformanceChart_tableCustomDataFooterRow__011Jx td{border-top:1px solid var(--border);text-align:center;vertical-align:middle}.PerformanceChart_tableCustomDataFooterCell__zeEFL:first-child:last-child{padding:0!important;text-align:center}.PerformanceChart_tableCustomDataFooterCell__zeEFL:first-child:last-child button{border-radius:0;height:calc(100% - 2px);width:calc(100% - 2px)}.PerformanceChart_scrollbar__f3WD9{bottom:calc(var(--p-7)*-1 + 2px)!important}.PerformanceChart_forecastCell__vItmM{align-items:center;display:flex;gap:8px}.PerformanceChart_colorCircle__-uXyr{border-radius:10px;flex-shrink:0;height:20px;margin-left:-10px;width:5px}.PerformanceChart_emptyState__UCpW4{color:var(--muted-foreground);display:block;left:0;padding:var(--p-4) var(--p-10);position:absolute;text-align:center;top:calc(50% - 4em);width:100%;z-index:1}.PerformanceChart_performanceLoadingLayer__GmfFi .PerformanceChart_emptyState__UCpW4{color:var(--foreground)}.PerformanceChart_emptyState__UCpW4 a{padding:0 var(--p-1);text-decoration:underline}.PerformanceChart_emptyState__UCpW4 a:hover{color:var(--sb-cyan-400)}";
|
|
4
|
-
var S = {"root":"PerformanceChart_root__sda5D","viewTabs":"PerformanceChart_viewTabs__5aHg1","toolbarRow":"PerformanceChart_toolbarRow__SwRJc","toolBarRight":"PerformanceChart_toolBarRight__ODMr4","viewTabsList":"PerformanceChart_viewTabsList__fNv-x","perHorizonChartWrap":"PerformanceChart_perHorizonChartWrap__j15JS","perHorizonChartWrapLoading":"PerformanceChart_perHorizonChartWrapLoading__1ZGCz","chartContainer":"PerformanceChart_chartContainer__qXeA8","performanceLoadingLayer":"PerformanceChart_performanceLoadingLayer__GmfFi","chartEmptyOverlay":"PerformanceChart_chartEmptyOverlay__zrZ5M","performanceLoadingText":"PerformanceChart_performanceLoadingText__Jwxg3","loading":"PerformanceChart_loading__sCsV8","loaded":"PerformanceChart_loaded__a-dM9","isEmpty":"PerformanceChart_isEmpty__Xutg2","tableSection":"PerformanceChart_tableSection__tTV55","tableWrapper":"PerformanceChart_tableWrapper__3uB5y","tableContainer":"PerformanceChart_tableContainer__PyPUV","table":"PerformanceChart_table__8GI8O","tableCustomDataFooterRow":"PerformanceChart_tableCustomDataFooterRow__011Jx","tableCustomDataFooterCell":"PerformanceChart_tableCustomDataFooterCell__zeEFL","scrollbar":"PerformanceChart_scrollbar__f3WD9","forecastCell":"PerformanceChart_forecastCell__vItmM","colorCircle":"PerformanceChart_colorCircle__-uXyr","emptyState":"PerformanceChart_emptyState__UCpW4"};
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PerformanceChart_root__sda5D{transition:opacity .3s ease-out}.PerformanceChart_root__sda5D,.PerformanceChart_viewTabs__5aHg1{display:flex;flex:1;flex-direction:column;min-height:0;width:100%}.PerformanceChart_toolbarRow__SwRJc{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--p-4);margin-bottom:var(--p-4);width:100%}.PerformanceChart_toolBarRight__ODMr4{align-items:center;display:flex;flex-grow:1;gap:var(--p-4);justify-content:flex-end}.PerformanceChart_viewTabsList__fNv-x{align-items:center;background-color:transparent;display:inline-flex;flex-shrink:0;flex-wrap:wrap;gap:var(--p-2);margin-bottom:0}.PerformanceChart_perHorizonChartWrap__j15JS{min-height:var(--chart-height);position:relative;width:100%}.PerformanceChart_perHorizonChartWrapLoading__1ZGCz .PerformanceChart_chartContainer__qXeA8{opacity:.3;pointer-events:none}.PerformanceChart_perHorizonChartWrapLoading__1ZGCz .recharts-line-dots{display:none}.PerformanceChart_performanceLoadingLayer__GmfFi{inset:0;pointer-events:none;position:absolute;z-index:10}.PerformanceChart_chartEmptyOverlay__zrZ5M{align-items:center;display:flex;inset:0;justify-content:center;padding:var(--p-6);pointer-events:none;position:absolute;z-index:11}.PerformanceChart_chartEmptyOverlay__zrZ5M a{pointer-events:auto}.PerformanceChart_performanceLoadingText__Jwxg3{color:var(--foreground);font-size:16px;font-weight:500}.PerformanceChart_loading__sCsV8{opacity:.5}.PerformanceChart_loaded__a-dM9{opacity:1}.PerformanceChart_chartContainer__qXeA8{margin-left:calc(var(--page-x-padding)*-1 + 26px);max-width:calc(100% + 60px);transition:opacity .3s ease-out;width:calc(100% + 60px)}.PerformanceChart_chartContainer__qXeA8 [data-slot=skeleton]{filter:opacity(.6);height:100%!important;position:relative;width:100%!important}.PerformanceChart_loaded__a-dM9 .PerformanceChart_chartContainer__qXeA8 [data-slot=skeleton]{opacity:0}.PerformanceChart_chartContainer__qXeA8 svg{overflow:visible}@media (max-width:768px){.PerformanceChart_chartContainer__qXeA8{margin-left:calc(var(--page-x-padding)*-1 + 10px);max-width:calc(100% + 30px);width:calc(100% + 30px)}}.PerformanceChart_isEmpty__Xutg2 .PerformanceChart_chartContainer__qXeA8{opacity:.3;pointer-events:none}.PerformanceChart_isEmpty__Xutg2 .recharts-line-dots{display:none}.PerformanceChart_tableSection__tTV55{--side-margin:calc(var(--page-x-padding)*-1);display:flex;flex-direction:column;gap:var(--p-4);margin:var(--p-6) var(--side-margin) 0 var(--side-margin)}.PerformanceChart_tableWrapper__3uB5y{position:relative}.PerformanceChart_tableContainer__PyPUV{overflow-x:auto;position:relative;width:100%}.PerformanceChart_table__8GI8O{background:var(--card);border-radius:14px;box-shadow:inset 0 0 0 1px var(--border)}.PerformanceChart_table__8GI8O td:first-child,.PerformanceChart_table__8GI8O th:first-child{padding-left:var(--p-10)!important}.PerformanceChart_table__8GI8O td:last-child,.PerformanceChart_table__8GI8O th:last-child{padding-right:0!important}.PerformanceChart_tableCustomDataFooterRow__011Jx td{border-top:1px solid var(--border);text-align:center;vertical-align:middle}.PerformanceChart_tableCustomDataFooterCell__zeEFL:first-child:last-child{padding:0!important;text-align:center}.PerformanceChart_tableCustomDataFooterCell__zeEFL:first-child:last-child button{border-radius:0;height:calc(100% - 2px);width:calc(100% - 2px)}.PerformanceChart_scrollbar__f3WD9{bottom:calc(var(--p-7)*-1 + 2px)!important}.PerformanceChart_forecastCell__vItmM{align-items:center;display:flex;gap:8px}.PerformanceChart_editCustomPerformanceButton__jmzox{margin:-12px 0 -8px}.PerformanceChart_colorCircle__-uXyr{border-radius:10px;flex-shrink:0;height:20px;margin-left:-10px;width:5px}.PerformanceChart_emptyState__UCpW4{color:var(--muted-foreground);display:block;left:0;padding:var(--p-4) var(--p-10);position:absolute;text-align:center;top:calc(50% - 4em);width:100%;z-index:1}.PerformanceChart_performanceLoadingLayer__GmfFi .PerformanceChart_emptyState__UCpW4{color:var(--foreground)}.PerformanceChart_emptyState__UCpW4 a{padding:0 var(--p-1);text-decoration:underline}.PerformanceChart_emptyState__UCpW4 a:hover{color:var(--sb-cyan-400)}";
|
|
4
|
+
var S = {"root":"PerformanceChart_root__sda5D","viewTabs":"PerformanceChart_viewTabs__5aHg1","toolbarRow":"PerformanceChart_toolbarRow__SwRJc","toolBarRight":"PerformanceChart_toolBarRight__ODMr4","viewTabsList":"PerformanceChart_viewTabsList__fNv-x","perHorizonChartWrap":"PerformanceChart_perHorizonChartWrap__j15JS","perHorizonChartWrapLoading":"PerformanceChart_perHorizonChartWrapLoading__1ZGCz","chartContainer":"PerformanceChart_chartContainer__qXeA8","performanceLoadingLayer":"PerformanceChart_performanceLoadingLayer__GmfFi","chartEmptyOverlay":"PerformanceChart_chartEmptyOverlay__zrZ5M","performanceLoadingText":"PerformanceChart_performanceLoadingText__Jwxg3","loading":"PerformanceChart_loading__sCsV8","loaded":"PerformanceChart_loaded__a-dM9","isEmpty":"PerformanceChart_isEmpty__Xutg2","tableSection":"PerformanceChart_tableSection__tTV55","tableWrapper":"PerformanceChart_tableWrapper__3uB5y","tableContainer":"PerformanceChart_tableContainer__PyPUV","table":"PerformanceChart_table__8GI8O","tableCustomDataFooterRow":"PerformanceChart_tableCustomDataFooterRow__011Jx","tableCustomDataFooterCell":"PerformanceChart_tableCustomDataFooterCell__zeEFL","scrollbar":"PerformanceChart_scrollbar__f3WD9","forecastCell":"PerformanceChart_forecastCell__vItmM","editCustomPerformanceButton":"PerformanceChart_editCustomPerformanceButton__jmzox","colorCircle":"PerformanceChart_colorCircle__-uXyr","emptyState":"PerformanceChart_emptyState__UCpW4"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
2
3
|
import React__default, { useMemo, useRef } from 'react';
|
|
4
|
+
import { Table, TableHeader, TableRow, TableHead, TableCellValue, TableBody, TableCell } from '../../ui/Table/Table.js';
|
|
5
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from '../../ui/Tooltip/Tooltip.js';
|
|
6
|
+
import { calculateAccuracy, formatError, calculateBenefit, formatROI, getForecastModelDisplayName, formatAccuracy, formatBenefit } from './performanceChart.helpers.js';
|
|
3
7
|
import { Button } from '../../ui/Button/Button.js';
|
|
4
8
|
import { FORECAST_LINE_COLORS } from '../../ui/ChartAreaInteractive/ChartLines.js';
|
|
5
9
|
import '../../ui/Page/AppBanner/AppBanner.styl.js';
|
|
6
|
-
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
7
10
|
import 'classnames';
|
|
8
11
|
import '../../ui/Page/AppShell/AppShell.js';
|
|
9
12
|
import 'react-router-dom';
|
|
10
13
|
import '../../ui/Sidebar/Sidebar.js';
|
|
11
14
|
import '../../ui/Page/Breadcrumbs/Breadcrumbs.styl.js';
|
|
12
15
|
import '../../ui/Page/pageContext.js';
|
|
13
|
-
import { Tooltip, TooltipTrigger, TooltipContent } from '../../ui/Tooltip/Tooltip.js';
|
|
14
16
|
import '../../ui/Page/PageHeader/PageHeader.styl.js';
|
|
15
17
|
import '../../ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl.js';
|
|
16
18
|
import '../../ui/Page/PageContent/PageContent.styl.js';
|
|
@@ -24,9 +26,7 @@ import '../../ui/Tabs/Tabs.styl.js';
|
|
|
24
26
|
import '../../ui/Page/PageTabs/PageTabs.styl.js';
|
|
25
27
|
import '../../ui/Page/PageColumns/PageColumns.styl.js';
|
|
26
28
|
import '../../ui/Page/SectionHeader/SectionHeader.styl.js';
|
|
27
|
-
import { Table, TableHeader, TableRow, TableHead, TableCellValue, TableBody, TableCell } from '../../ui/Table/Table.js';
|
|
28
29
|
import S from './PerformanceChart.styl.js';
|
|
29
|
-
import { calculateAccuracy, formatError, calculateBenefit, formatROI, getForecastModelDisplayName, formatAccuracy, formatBenefit } from './performanceChart.helpers.js';
|
|
30
30
|
|
|
31
31
|
const DEFAULT_INVESTMENT_COST = 35000; // Investment Cost (IC) - annual cost of solution
|
|
32
32
|
const CUSTOM_PERFORMANCE_ROW_COLOR = 'var(--sb-purple-400)';
|
|
@@ -126,7 +126,7 @@ function PerformanceTable({ forecastModels, adjustParameters, onAdjustParameters
|
|
|
126
126
|
};
|
|
127
127
|
}, [customPerformance, driftModel, adjustParameters]);
|
|
128
128
|
const showCustomActionsColumn = Boolean(customRow);
|
|
129
|
-
return (jsx("div", { className: S.tableSection, children: jsx("div", { className: S.tableWrapper, children: jsx(PageXScroll, { size: "md", fullWidth: true, innerClassName: S.tableContainer, scrollbarClassName: S.scrollbar, children: jsxs(Table, { withPaddings: true, className: S.table, children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { children: jsxs(TableCellValue, { children: ["Forecast", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "Sybilion AI forecast vs other forecasting methods: MEAN, Seasonal, ARMA, ARIMA, Linear, Theta" })] })] }) }), jsx(TableHead, { children: "Accuracy" }), jsx(TableHead, { children: "Error" }), jsx(TableHead, { children: jsxs(TableCellValue, { children: ["ROI", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "ROI is calculated using default contract annual price." })] })] }) }), jsx(TableHead, { children: jsxs(TableCellValue, { children: ["Benefit p/a", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "Annual Benefit of using Sybilion AI forecast compared to alternative forecasting methods. Calculated using default assumptions: Procurement Volume \u20AC100,000,000 \u00B7 Variable Share 50% \u00B7 Controllable Share 60%" })] })] }) }), showCustomActionsColumn && jsx(TableHead, {})] }) }), jsxs(TableBody, { children: [sybilionRow && (jsx(ModelTableRow, { modelKey: sybilionRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: sybilionRow.color } }), sybilionRow.forecast] }) }), jsx(TableCell, { children: sybilionRow.accuracy }), jsx(TableCell, { children: sybilionRow.error }), jsx(TableCell, { children: sybilionRow.roi }), jsx(TableCell, { children: sybilionRow.benefit }), showCustomActionsColumn && jsx(TableCell, {})] }, sybilionRow.key) })), driftRow && (jsx(ModelTableRow, { modelKey: driftRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: driftRow.color } }), driftRow.forecast] }) }), jsx(TableCell, { children: driftRow.accuracy }), jsx(TableCell, { children: driftRow.error }), jsx(TableCell, { children: driftRow.roi }), jsx(TableCell, { children: driftRow.benefit }), showCustomActionsColumn && jsx(TableCell, {})] }, driftRow.key) })), customRow && (jsx(ModelTableRow, { modelKey: customRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: customRow.color } }), customRow.forecast] }) }), jsx(TableCell, { children: customRow.accuracy }), jsx(TableCell, { children: customRow.error }), jsx(TableCell, { children: customRow.roi }), jsx(TableCell, { children: customRow.benefit }), showCustomActionsColumn && (jsx(TableCell, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx(Button, { type: "button", variant: "ghost", icon: true, "aria-label": "Edit custom performance data", onClick: () => onEditCustomPerformance?.(), children: jsx(Pencil, { size: 16 }) }) }), jsx(TooltipContent, { side: "top", children: "Edit custom performance data" })] }) }))] }, customRow.key) })), showAddEditCustomDataButton && !customPerformance && (jsx(TableRow, { className: S.tableCustomDataFooterRow, children: jsx(TableCell, { colSpan: 5 + (showCustomActionsColumn ? 1 : 0), className: S.tableCustomDataFooterCell, children: jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: addEditCustomDataDisabled, onClick: () => onEditCustomPerformance?.(), children: [jsx(TableIcon, { size: 16 }), "Add custom data"] }) }) }))] })] }) }) }) }));
|
|
129
|
+
return (jsx("div", { className: S.tableSection, children: jsx("div", { className: S.tableWrapper, children: jsx(PageXScroll, { size: "md", fullWidth: true, innerClassName: S.tableContainer, scrollbarClassName: S.scrollbar, children: jsxs(Table, { withPaddings: true, className: S.table, children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { children: jsxs(TableCellValue, { children: ["Forecast", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "Sybilion AI forecast vs other forecasting methods: MEAN, Seasonal, ARMA, ARIMA, Linear, Theta" })] })] }) }), jsx(TableHead, { children: "Accuracy" }), jsx(TableHead, { children: "Error" }), jsx(TableHead, { children: jsxs(TableCellValue, { children: ["ROI", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "ROI is calculated using default contract annual price." })] })] }) }), jsx(TableHead, { children: jsxs(TableCellValue, { children: ["Benefit p/a", jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(InfoIcon, { size: 16, style: { cursor: 'help' } }) }) }), jsx(TooltipContent, { side: "top", maxWidth: 300, children: "Annual Benefit of using Sybilion AI forecast compared to alternative forecasting methods. Calculated using default assumptions: Procurement Volume \u20AC100,000,000 \u00B7 Variable Share 50% \u00B7 Controllable Share 60%" })] })] }) }), showCustomActionsColumn && jsx(TableHead, {})] }) }), jsxs(TableBody, { children: [sybilionRow && (jsx(ModelTableRow, { modelKey: sybilionRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: sybilionRow.color } }), sybilionRow.forecast] }) }), jsx(TableCell, { children: sybilionRow.accuracy }), jsx(TableCell, { children: sybilionRow.error }), jsx(TableCell, { children: sybilionRow.roi }), jsx(TableCell, { children: sybilionRow.benefit }), showCustomActionsColumn && jsx(TableCell, {})] }, sybilionRow.key) })), driftRow && (jsx(ModelTableRow, { modelKey: driftRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: driftRow.color } }), driftRow.forecast] }) }), jsx(TableCell, { children: driftRow.accuracy }), jsx(TableCell, { children: driftRow.error }), jsx(TableCell, { children: driftRow.roi }), jsx(TableCell, { children: driftRow.benefit }), showCustomActionsColumn && jsx(TableCell, {})] }, driftRow.key) })), customRow && (jsx(ModelTableRow, { modelKey: customRow.key, row: jsxs(TableRow, { children: [jsx(TableCell, { children: jsxs("div", { className: S.forecastCell, children: [jsx("span", { className: S.colorCircle, style: { backgroundColor: customRow.color } }), customRow.forecast] }) }), jsx(TableCell, { children: customRow.accuracy }), jsx(TableCell, { children: customRow.error }), jsx(TableCell, { children: customRow.roi }), jsx(TableCell, { children: customRow.benefit }), showCustomActionsColumn && (jsx(TableCell, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx(Button, { className: S.editCustomPerformanceButton, type: "button", variant: "ghost", icon: true, "aria-label": "Edit custom performance data", onClick: () => onEditCustomPerformance?.(), children: jsx(Pencil, { size: 16 }) }) }), jsx(TooltipContent, { side: "top", children: "Edit custom performance data" })] }) }))] }, customRow.key) })), showAddEditCustomDataButton && !customPerformance && (jsx(TableRow, { className: S.tableCustomDataFooterRow, children: jsx(TableCell, { colSpan: 5 + (showCustomActionsColumn ? 1 : 0), className: S.tableCustomDataFooterCell, children: jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: addEditCustomDataDisabled, onClick: () => onEditCustomPerformance?.(), children: [jsx(TableIcon, { size: 16 }), "Add custom data"] }) }) }))] })] }) }) }) }));
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export { PerformanceTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, DetailedHTMLProps } from 'react';
|
|
2
2
|
import type { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps } from './Card.types';
|
|
3
|
-
declare function Card({ className, paddingSize, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Card({ className, paddingSize, radiusSize, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function LinkCard({ className, ...props }: CardProps & DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function CardHeader({ className, icon, iconWithBackground, textsClassName, title, titleClassName, description, descriptionClassName, children, tooltipProps, ...props }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function CardTitle({ className, ...props }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TextWithDeferTooltipProps } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
2
2
|
export interface CardProps extends React.ComponentProps<'div'> {
|
|
3
3
|
paddingSize?: 's' | 'm' | 'l';
|
|
4
|
+
radiusSize?: 's' | 'm' | 'l' | 'xl';
|
|
4
5
|
}
|
|
5
6
|
export interface CardHeaderProps extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
6
7
|
className?: string;
|
package/package.json
CHANGED
|
@@ -98,18 +98,23 @@
|
|
|
98
98
|
text-decoration underline
|
|
99
99
|
|
|
100
100
|
// Size styles
|
|
101
|
-
.sizeMd
|
|
102
|
-
padding var(--p-3) var(--p-5)
|
|
103
101
|
|
|
104
102
|
.sizeSm
|
|
105
|
-
|
|
103
|
+
height 30px
|
|
104
|
+
padding 0 14px
|
|
106
105
|
font-size 13px
|
|
107
|
-
border-radius var(--
|
|
106
|
+
border-radius var(--p-5)
|
|
107
|
+
|
|
108
|
+
.sizeMd
|
|
109
|
+
height 44px
|
|
110
|
+
padding var(--p-3) var(--p-4)
|
|
111
|
+
border-radius var(--p-4)
|
|
108
112
|
|
|
109
113
|
.sizeLg
|
|
110
|
-
|
|
114
|
+
height 48px
|
|
115
|
+
padding 0 var(--p-6)
|
|
111
116
|
font-size var(--text-base)
|
|
112
|
-
border-radius var(--
|
|
117
|
+
border-radius var(--p-4)
|
|
113
118
|
|
|
114
119
|
// Icon buttons: square, sized per size variant, same radius as the size variant
|
|
115
120
|
.sizeIcon
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
&.padding-l
|
|
20
20
|
padding var(--p-8)
|
|
21
21
|
|
|
22
|
+
&.radius-s
|
|
23
|
+
border-radius var(--p-2)
|
|
24
|
+
&.radius-m
|
|
25
|
+
border-radius var(--p-3)
|
|
26
|
+
&.radius-l
|
|
27
|
+
border-radius var(--p-4)
|
|
28
|
+
&.radius-xl
|
|
29
|
+
border-radius var(--p-5)
|
|
30
|
+
|
|
22
31
|
.header
|
|
23
32
|
display flex
|
|
24
33
|
gap var(--p-4)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import cn from 'classnames';
|
|
2
1
|
import {
|
|
3
2
|
AnchorHTMLAttributes,
|
|
4
3
|
DetailedHTMLProps,
|
|
@@ -6,11 +5,6 @@ import {
|
|
|
6
5
|
useEffect,
|
|
7
6
|
useRef,
|
|
8
7
|
} from 'react';
|
|
9
|
-
|
|
10
|
-
import { TextWithDeferTooltip } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
11
|
-
import { Scroll } from '@homecode/ui';
|
|
12
|
-
|
|
13
|
-
import S from './Card.styl';
|
|
14
8
|
import type {
|
|
15
9
|
CardActionProps,
|
|
16
10
|
CardContentProps,
|
|
@@ -21,12 +15,27 @@ import type {
|
|
|
21
15
|
CardTitleProps,
|
|
22
16
|
} from './Card.types';
|
|
23
17
|
|
|
18
|
+
import S from './Card.styl';
|
|
19
|
+
import { Scroll } from '@homecode/ui';
|
|
20
|
+
import { TextWithDeferTooltip } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
21
|
+
import cn from 'classnames';
|
|
22
|
+
|
|
24
23
|
const SCROLL_OFFSET = 300;
|
|
25
24
|
|
|
26
|
-
function Card({
|
|
25
|
+
function Card({
|
|
26
|
+
className,
|
|
27
|
+
paddingSize = 'm',
|
|
28
|
+
radiusSize = 'm',
|
|
29
|
+
...props
|
|
30
|
+
}: CardProps) {
|
|
27
31
|
return (
|
|
28
32
|
<div
|
|
29
|
-
className={cn(
|
|
33
|
+
className={cn(
|
|
34
|
+
S.root,
|
|
35
|
+
S[`padding-${paddingSize}`],
|
|
36
|
+
S[`radius-${radiusSize}`],
|
|
37
|
+
className,
|
|
38
|
+
)}
|
|
30
39
|
{...props}
|
|
31
40
|
/>
|
|
32
41
|
);
|
|
@@ -2,6 +2,7 @@ import { TextWithDeferTooltipProps } from '#uilib/components/ui/TextWithDeferToo
|
|
|
2
2
|
|
|
3
3
|
export interface CardProps extends React.ComponentProps<'div'> {
|
|
4
4
|
paddingSize?: 's' | 'm' | 'l';
|
|
5
|
+
radiusSize?: 's' | 'm' | 'l' | 'xl';
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
export interface CardHeaderProps extends Omit<
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
|
|
37
37
|
.tableHead
|
|
38
38
|
.tableCell
|
|
39
|
-
padding var(--p-
|
|
40
|
-
height
|
|
39
|
+
padding var(--p-3) var(--p-4)
|
|
40
|
+
height auto
|
|
41
41
|
|
|
42
42
|
&[data-size="lg"]
|
|
43
43
|
font-size var(--text-base)
|
|
44
44
|
|
|
45
45
|
.tableHead
|
|
46
46
|
.tableCell
|
|
47
|
-
padding var(--p-5) var(--p-
|
|
47
|
+
padding var(--p-5) var(--p-5)
|
|
48
48
|
height auto
|
|
49
49
|
|
|
50
50
|
&.withPaddings
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
.tableBody
|
|
59
59
|
position relative
|
|
60
60
|
|
|
61
|
-
&:not(:first-child)::before
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
// &:not(:first-child)::before
|
|
62
|
+
// content ''
|
|
63
|
+
// display block
|
|
64
|
+
// height 1px
|
|
65
|
+
// position absolute
|
|
66
|
+
// left 0
|
|
67
|
+
// right 0
|
|
68
|
+
// background-color var(--border)
|
|
69
|
+
|
|
70
|
+
// .withBackground &
|
|
71
|
+
// left var(--p-6)
|
|
72
|
+
// right var(--p-6)
|
|
73
73
|
|
|
74
74
|
tr:last-child
|
|
75
75
|
border-bottom 0
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
2
2
|
import React, { useMemo, useRef } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Button } from '#uilib/components/ui/Button';
|
|
5
|
-
import { FORECAST_LINE_COLORS } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
6
|
-
import { PageXScroll } from '#uilib/components/ui/Page';
|
|
7
3
|
import {
|
|
8
4
|
Table,
|
|
9
5
|
TableBody,
|
|
@@ -18,9 +14,6 @@ import {
|
|
|
18
14
|
TooltipContent,
|
|
19
15
|
TooltipTrigger,
|
|
20
16
|
} from '#uilib/components/ui/Tooltip';
|
|
21
|
-
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
22
|
-
|
|
23
|
-
import S from './PerformanceChart.styl';
|
|
24
17
|
import {
|
|
25
18
|
calculateAccuracy,
|
|
26
19
|
calculateBenefit,
|
|
@@ -31,6 +24,12 @@ import {
|
|
|
31
24
|
getForecastModelDisplayName,
|
|
32
25
|
} from './performanceChart.helpers';
|
|
33
26
|
|
|
27
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
28
|
+
import { FORECAST_LINE_COLORS } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
29
|
+
import { PageXScroll } from '#uilib/components/ui/Page';
|
|
30
|
+
import S from './PerformanceChart.styl';
|
|
31
|
+
import cn from 'classnames';
|
|
32
|
+
|
|
34
33
|
const DEFAULT_INVESTMENT_COST = 35000; // Investment Cost (IC) - annual cost of solution
|
|
35
34
|
|
|
36
35
|
const CUSTOM_PERFORMANCE_ROW_COLOR = 'var(--sb-purple-400)';
|
|
@@ -333,6 +332,7 @@ export function PerformanceTable({
|
|
|
333
332
|
<Tooltip>
|
|
334
333
|
<TooltipTrigger asChild>
|
|
335
334
|
<Button
|
|
335
|
+
className={S.editCustomPerformanceButton}
|
|
336
336
|
type="button"
|
|
337
337
|
variant="ghost"
|
|
338
338
|
icon
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Button } from '#uilib/components/ui/Button';
|
|
2
1
|
import {
|
|
3
2
|
Card,
|
|
4
3
|
CardContent,
|
|
@@ -8,14 +7,16 @@ import {
|
|
|
8
7
|
CardTitle,
|
|
9
8
|
LinkCard,
|
|
10
9
|
} from '#uilib/components/ui/Card';
|
|
11
|
-
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
12
|
-
import { PackageIcon } from '@phosphor-icons/react';
|
|
13
10
|
|
|
14
11
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
12
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
15
13
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
16
14
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
15
|
+
import { PackageIcon } from '@phosphor-icons/react';
|
|
16
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
17
17
|
|
|
18
18
|
const PADDING_SIZES = ['s', 'm', 'l'] as const;
|
|
19
|
+
const RADIUS_SIZES = ['s', 'm', 'l', 'xl'] as const;
|
|
19
20
|
|
|
20
21
|
const CARD_WIDTH = 280;
|
|
21
22
|
|
|
@@ -25,7 +26,7 @@ export default function CardPage() {
|
|
|
25
26
|
<AppPageHeader
|
|
26
27
|
breadcrumbs={[{ label: 'Card' }]}
|
|
27
28
|
title="Card"
|
|
28
|
-
subheader="Padding sizes, slot compositions, and link card."
|
|
29
|
+
subheader="Padding and radius sizes, slot compositions, and link card."
|
|
29
30
|
actions={<DocsHeaderActions />}
|
|
30
31
|
/>
|
|
31
32
|
<DocsGuidance
|
|
@@ -57,8 +58,13 @@ export default function CardPage() {
|
|
|
57
58
|
}}
|
|
58
59
|
>
|
|
59
60
|
{PADDING_SIZES.map(p => (
|
|
60
|
-
<Card
|
|
61
|
-
|
|
61
|
+
<Card
|
|
62
|
+
key={p}
|
|
63
|
+
paddingSize={p}
|
|
64
|
+
radiusSize={p}
|
|
65
|
+
style={{ width: CARD_WIDTH }}
|
|
66
|
+
>
|
|
67
|
+
<CardHeader title={`Padding "${p}"`} />
|
|
62
68
|
<CardContent>
|
|
63
69
|
<p style={{ margin: 0 }}>
|
|
64
70
|
Inner padding via <code>paddingSize="{p}"</code>.
|
|
@@ -68,6 +74,33 @@ export default function CardPage() {
|
|
|
68
74
|
))}
|
|
69
75
|
</div>
|
|
70
76
|
</section>
|
|
77
|
+
<section>
|
|
78
|
+
<h3 style={{ marginBottom: '1rem' }}>Radius sizes</h3>
|
|
79
|
+
<div
|
|
80
|
+
style={{
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexWrap: 'wrap',
|
|
83
|
+
gap: '1rem',
|
|
84
|
+
alignItems: 'flex-start',
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
{RADIUS_SIZES.map(r => (
|
|
88
|
+
<Card
|
|
89
|
+
key={r}
|
|
90
|
+
radiusSize={r}
|
|
91
|
+
paddingSize="s"
|
|
92
|
+
style={{ width: CARD_WIDTH }}
|
|
93
|
+
>
|
|
94
|
+
<CardHeader title={`Radius "${r}"`} />
|
|
95
|
+
<CardContent>
|
|
96
|
+
<p style={{ margin: 0 }}>
|
|
97
|
+
Corner radius via <code>radiusSize="{r}"</code>.
|
|
98
|
+
</p>
|
|
99
|
+
</CardContent>
|
|
100
|
+
</Card>
|
|
101
|
+
))}
|
|
102
|
+
</div>
|
|
103
|
+
</section>
|
|
71
104
|
<section>
|
|
72
105
|
<h3 style={{ marginBottom: '1rem' }}>Slot compositions</h3>
|
|
73
106
|
<div style={{ overflowX: 'auto' }}>
|
|
@@ -93,7 +126,11 @@ export default function CardPage() {
|
|
|
93
126
|
header + content + footer
|
|
94
127
|
</td>
|
|
95
128
|
<td style={{ padding: '0.5rem' }}>
|
|
96
|
-
<Card
|
|
129
|
+
<Card
|
|
130
|
+
paddingSize="m"
|
|
131
|
+
radiusSize="xl"
|
|
132
|
+
style={{ width: CARD_WIDTH }}
|
|
133
|
+
>
|
|
97
134
|
<CardHeader
|
|
98
135
|
icon={<PackageIcon />}
|
|
99
136
|
title="Card title"
|
|
@@ -122,7 +159,11 @@ export default function CardPage() {
|
|
|
122
159
|
header + content
|
|
123
160
|
</td>
|
|
124
161
|
<td style={{ padding: '0.5rem' }}>
|
|
125
|
-
<Card
|
|
162
|
+
<Card
|
|
163
|
+
paddingSize="m"
|
|
164
|
+
radiusSize="xl"
|
|
165
|
+
style={{ width: CARD_WIDTH }}
|
|
166
|
+
>
|
|
126
167
|
<CardHeader
|
|
127
168
|
title="No footer"
|
|
128
169
|
description="Content only below the header."
|
|
@@ -145,7 +186,11 @@ export default function CardPage() {
|
|
|
145
186
|
content only
|
|
146
187
|
</td>
|
|
147
188
|
<td style={{ padding: '0.5rem' }}>
|
|
148
|
-
<Card
|
|
189
|
+
<Card
|
|
190
|
+
paddingSize="m"
|
|
191
|
+
radiusSize="xl"
|
|
192
|
+
style={{ width: CARD_WIDTH }}
|
|
193
|
+
>
|
|
149
194
|
<CardContent>
|
|
150
195
|
<CardTitle>Standalone title</CardTitle>
|
|
151
196
|
<div style={{ marginTop: '0.25rem' }}>
|
|
@@ -169,7 +214,11 @@ export default function CardPage() {
|
|
|
169
214
|
icon with background
|
|
170
215
|
</td>
|
|
171
216
|
<td style={{ padding: '0.5rem' }}>
|
|
172
|
-
<Card
|
|
217
|
+
<Card
|
|
218
|
+
paddingSize="m"
|
|
219
|
+
radiusSize="xl"
|
|
220
|
+
style={{ width: CARD_WIDTH }}
|
|
221
|
+
>
|
|
173
222
|
<CardHeader
|
|
174
223
|
icon={<PackageIcon />}
|
|
175
224
|
iconWithBackground
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
1
|
+
import { PageContentSection, PageXScroll } from '#uilib/components/ui/Page';
|
|
2
2
|
import {
|
|
3
3
|
Table,
|
|
4
4
|
TableBody,
|
|
@@ -80,10 +80,10 @@ export default function TablePage() {
|
|
|
80
80
|
'Use size="sm" on Table when you need tighter row density.',
|
|
81
81
|
]}
|
|
82
82
|
/>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
<PageXScroll>
|
|
84
|
+
<section
|
|
85
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
86
|
+
>
|
|
87
87
|
<h3 style={{ marginBottom: '1rem' }}>Sizes</h3>
|
|
88
88
|
<p
|
|
89
89
|
style={{
|
|
@@ -151,7 +151,7 @@ export default function TablePage() {
|
|
|
151
151
|
</table>
|
|
152
152
|
</div>
|
|
153
153
|
</section>
|
|
154
|
-
</
|
|
154
|
+
</PageXScroll>
|
|
155
155
|
</>
|
|
156
156
|
);
|
|
157
157
|
}
|