@stella-source/stellasource-dsl 0.2.9 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +8 -27
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +2 -2
- package/dist/cjs/types/components/TableUnitsAndTotals/types.d.ts +12 -25
- package/dist/esm/index.esm.js +9 -28
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/TableUnitsAndTotals/TableUnitsAndTotals.d.ts +2 -2
- package/dist/esm/types/components/TableUnitsAndTotals/types.d.ts +12 -25
- package/dist/index.d.ts +15 -28
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
declare const TableUnitsAndTotals: ({ id, className, value, subValue,
|
|
2
|
+
import { TableUnitsAndTotalsProps } from "./types";
|
|
3
|
+
declare const TableUnitsAndTotals: ({ id, className, value, subValue, valueRightCategory, valueLeftCategory, subValueRightCategory, subValueLeftCategory }: TableUnitsAndTotalsProps) => React.JSX.Element;
|
|
4
4
|
export default TableUnitsAndTotals;
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
TOTAL_PRICE = "total-price",
|
|
3
|
-
TOTAL_WEIGHT = "total-weight"
|
|
4
|
-
}
|
|
5
|
-
export declare enum QuoteCategory {
|
|
6
|
-
ITEM = "/item",
|
|
7
|
-
HOUR = "/hr",
|
|
8
|
-
CWT = "CWT",
|
|
9
|
-
LBS = "lbs",
|
|
10
|
-
KG = "kg",
|
|
11
|
-
TON = "ton"
|
|
12
|
-
}
|
|
13
|
-
interface TableUnitsAndTotalsProps {
|
|
1
|
+
interface TableUnitsAndTotalsCoreProps {
|
|
14
2
|
id?: string;
|
|
15
3
|
className?: string;
|
|
16
4
|
value: number | string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
interface TotalPriceProps {
|
|
21
|
-
variant: `${QuoteVariants.TOTAL_PRICE}`;
|
|
22
|
-
leftCategory?: `${TableUnitsAndTotalsLeftCategory}`;
|
|
5
|
+
valueRightCategory?: string;
|
|
6
|
+
valueLeftCategory?: string;
|
|
23
7
|
}
|
|
24
|
-
interface
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
interface TableUnitsAndTotalsSubValueProps {
|
|
9
|
+
subValue: number | string;
|
|
10
|
+
subValueRightCategory?: string;
|
|
11
|
+
subValueLeftCategory?: string;
|
|
27
12
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
interface TableUnitsAndTotalsWithoutSubValueProps {
|
|
14
|
+
subValue?: never;
|
|
15
|
+
subValueRightCategory?: never;
|
|
16
|
+
subValueLeftCategory?: never;
|
|
31
17
|
}
|
|
18
|
+
export type TableUnitsAndTotalsProps = TableUnitsAndTotalsCoreProps & (TableUnitsAndTotalsSubValueProps | TableUnitsAndTotalsWithoutSubValueProps);
|
|
32
19
|
export {};
|
package/dist/esm/index.esm.js
CHANGED
|
@@ -21589,25 +21589,6 @@ const Sync = ({ dataTestId, onClick, className, id, showTime = false, labelPosit
|
|
|
21589
21589
|
a__default.createElement(CustomLabel, { htmlFor: id, id: `${id}-label`, labelValue: showTime ? `Last Updated at ${time}` : "" })));
|
|
21590
21590
|
};
|
|
21591
21591
|
|
|
21592
|
-
var QuoteVariants;
|
|
21593
|
-
(function (QuoteVariants) {
|
|
21594
|
-
QuoteVariants["TOTAL_PRICE"] = "total-price";
|
|
21595
|
-
QuoteVariants["TOTAL_WEIGHT"] = "total-weight";
|
|
21596
|
-
})(QuoteVariants || (QuoteVariants = {}));
|
|
21597
|
-
var QuoteCategory;
|
|
21598
|
-
(function (QuoteCategory) {
|
|
21599
|
-
QuoteCategory["ITEM"] = "/item";
|
|
21600
|
-
QuoteCategory["HOUR"] = "/hr";
|
|
21601
|
-
QuoteCategory["CWT"] = "CWT";
|
|
21602
|
-
QuoteCategory["LBS"] = "lbs";
|
|
21603
|
-
QuoteCategory["KG"] = "kg";
|
|
21604
|
-
QuoteCategory["TON"] = "ton";
|
|
21605
|
-
})(QuoteCategory || (QuoteCategory = {}));
|
|
21606
|
-
var TableUnitsAndTotalsLeftCategory;
|
|
21607
|
-
(function (TableUnitsAndTotalsLeftCategory) {
|
|
21608
|
-
TableUnitsAndTotalsLeftCategory["US_CURRENCY"] = "$";
|
|
21609
|
-
})(TableUnitsAndTotalsLeftCategory || (TableUnitsAndTotalsLeftCategory = {}));
|
|
21610
|
-
|
|
21611
21592
|
const Container = styled.div `
|
|
21612
21593
|
display: flex;
|
|
21613
21594
|
justify-content: space-between;
|
|
@@ -21640,18 +21621,18 @@ const SubHeaderText = styled.span `
|
|
|
21640
21621
|
line-height: normal;
|
|
21641
21622
|
`;
|
|
21642
21623
|
|
|
21643
|
-
const TableUnitsAndTotals = ({ id, className, value, subValue,
|
|
21644
|
-
|
|
21645
|
-
|
|
21646
|
-
|
|
21647
|
-
|
|
21648
|
-
|
|
21649
|
-
|
|
21624
|
+
const TableUnitsAndTotals = ({ id, className, value, subValue, valueRightCategory, valueLeftCategory, subValueRightCategory, subValueLeftCategory }) => {
|
|
21625
|
+
let header = valueLeftCategory ?? "";
|
|
21626
|
+
header += value;
|
|
21627
|
+
header += valueRightCategory ? ` ${valueRightCategory}` : "";
|
|
21628
|
+
let subHeader = subValueLeftCategory ?? "";
|
|
21629
|
+
subHeader += subValue;
|
|
21630
|
+
subHeader += subValueRightCategory ? ` ${subValueRightCategory}` : "";
|
|
21650
21631
|
return (a__default.createElement(Container, { id: id, className: className },
|
|
21651
21632
|
a__default.createElement(Column, { "$align": "right" },
|
|
21652
21633
|
a__default.createElement(HeaderText, null, header),
|
|
21653
|
-
|
|
21634
|
+
subValue && a__default.createElement(SubHeaderText, null, subHeader))));
|
|
21654
21635
|
};
|
|
21655
21636
|
|
|
21656
|
-
export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput,
|
|
21637
|
+
export { HelperText, IconButton, Label, Loader, NumberInput, Pagination, PasswordInput, StellaButton, StellaButtonVariant, StellaIcon, Styles, Sync, Table, TableUnitsAndTotals, TextInput, Tooltip };
|
|
21657
21638
|
//# sourceMappingURL=index.esm.js.map
|