@stella-source/stellasource-dsl 5.1.0 → 5.2.0
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 +32 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Table/styles.d.ts +7 -2
- package/dist/cjs/types/components/TextField/NumberInput/NumberInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/NumberInput/types.d.ts +1 -0
- package/dist/cjs/types/components/TextField/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/PasswordInput/types.d.ts +1 -0
- package/dist/cjs/types/components/TextField/TextFieldContainer.d.ts +1 -1
- package/dist/cjs/types/components/TextField/TextInput/TextInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/TextInput/types.d.ts +1 -0
- package/dist/cjs/types/components/TextField/styles.d.ts +8 -2
- package/dist/cjs/types/components/TextField/types.d.ts +1 -0
- package/dist/esm/index.esm.js +32 -16
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/Table/styles.d.ts +7 -2
- package/dist/esm/types/components/TextField/NumberInput/NumberInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/NumberInput/types.d.ts +1 -0
- package/dist/esm/types/components/TextField/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/PasswordInput/types.d.ts +1 -0
- package/dist/esm/types/components/TextField/TextFieldContainer.d.ts +1 -1
- package/dist/esm/types/components/TextField/TextInput/TextInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/TextInput/types.d.ts +1 -0
- package/dist/esm/types/components/TextField/styles.d.ts +8 -2
- package/dist/esm/types/components/TextField/types.d.ts +1 -0
- package/dist/index.d.ts +6 -3
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ interface HeaderIconButtonProps {
|
|
|
5
5
|
}
|
|
6
6
|
interface PaginationProps {
|
|
7
7
|
$hasData?: boolean;
|
|
8
|
+
$isEmpty: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare const HeaderCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "$isPinnedLeft" | "$isPinnedRight" | "$columnInfo" | "$filterMenuOpen"> & {
|
|
10
11
|
$isPinnedLeft?: boolean;
|
|
@@ -33,7 +34,11 @@ declare const SortButton: import("styled-components/dist/types").IStyledComponen
|
|
|
33
34
|
as?: import("styled-components").WebTarget | undefined;
|
|
34
35
|
forwardedAs?: import("styled-components").WebTarget | undefined;
|
|
35
36
|
}, keyof HeaderIconButtonProps> & HeaderIconButtonProps, never>>> & string;
|
|
36
|
-
declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("
|
|
37
|
+
declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isEmpty"> & {
|
|
38
|
+
$isEmpty: boolean;
|
|
39
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isEmpty"> & {
|
|
40
|
+
$isEmpty: boolean;
|
|
41
|
+
}, never>>> & string;
|
|
37
42
|
declare const CellRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isClickable"> & {
|
|
38
43
|
$isClickable: boolean;
|
|
39
44
|
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isClickable"> & {
|
|
@@ -69,7 +74,7 @@ declare const LoadingShimmer: import("styled-components/dist/types").IStyledComp
|
|
|
69
74
|
$width?: string;
|
|
70
75
|
$height?: string;
|
|
71
76
|
}, never>>> & string;
|
|
72
|
-
declare const CustomPagination: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps,
|
|
77
|
+
declare const CustomPagination: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, keyof PaginationProps> & PaginationProps, never> & Partial<Pick<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, keyof PaginationProps> & PaginationProps, never>>> & string & Omit<({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: import("../Pagination/types").PaginationProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
73
78
|
declare const KebabAlign: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
74
79
|
declare const EmptyTableCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>>> & string;
|
|
75
80
|
declare const EmptyTableSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "$size"> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NumberInputProps } from "./types";
|
|
3
|
-
declare const NumberInput: ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, isTruncated, helperTextAffectLayout, hideLabel, disabled, isLoading, hasError, thousandSeparator, decimalPlaces, allowNegativeNumbers, ariaDescribedBy, enableAutocomplete, isDegrees, }: NumberInputProps) => React.JSX.Element;
|
|
3
|
+
declare const NumberInput: ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, isTruncated, helperTextAffectLayout, hideLabel, disabled, isLoading, hasError, thousandSeparator, decimalPlaces, allowNegativeNumbers, ariaDescribedBy, enableAutocomplete, isDegrees, labelPosition, }: NumberInputProps) => React.JSX.Element;
|
|
4
4
|
export default NumberInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PasswordInputProps } from "./types";
|
|
3
|
-
declare const PasswordInput: ({ id, className, htmlProps, label, placeholder, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign, isHidden, helperTextAffectLayout, hideLabel, disabled, hasError, ariaDescribedBy, enableAutocomplete, }: PasswordInputProps) => React.JSX.Element;
|
|
3
|
+
declare const PasswordInput: ({ id, className, htmlProps, label, placeholder, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign, isHidden, helperTextAffectLayout, hideLabel, disabled, hasError, ariaDescribedBy, enableAutocomplete, labelPosition, }: PasswordInputProps) => React.JSX.Element;
|
|
4
4
|
export default PasswordInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextFieldContainerProps } from "./types";
|
|
3
|
-
declare const TextFieldContainer: ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout, disabled, hideLabel, isLoading, hasError, isRequired, }: TextFieldContainerProps) => React.JSX.Element;
|
|
3
|
+
declare const TextFieldContainer: ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout, disabled, hideLabel, isLoading, hasError, isRequired, labelPosition, }: TextFieldContainerProps) => React.JSX.Element;
|
|
4
4
|
export default TextFieldContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextInputProps } from "./types";
|
|
3
|
-
declare const TextInput: ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, helperTextAffectLayout, hideLabel, disabled, hasError, isLoading, ariaDescribedBy, enableAutocomplete, }: TextInputProps) => React.JSX.Element;
|
|
3
|
+
declare const TextInput: ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, helperTextAffectLayout, hideLabel, disabled, hasError, isLoading, ariaDescribedBy, enableAutocomplete, labelPosition, }: TextInputProps) => React.JSX.Element;
|
|
4
4
|
export default TextInput;
|
|
@@ -4,14 +4,20 @@ interface TextFieldInputProps {
|
|
|
4
4
|
$isDisabled?: boolean;
|
|
5
5
|
$isLoading?: boolean;
|
|
6
6
|
}
|
|
7
|
+
interface WrapperProps {
|
|
8
|
+
$labelPosition?: "top" | "left";
|
|
9
|
+
}
|
|
7
10
|
interface TextFieldWrapperProps {
|
|
8
11
|
$isDisabled?: boolean;
|
|
9
12
|
$hasError?: boolean;
|
|
10
13
|
$isLoading?: boolean;
|
|
14
|
+
$labelPosition?: "top" | "left";
|
|
11
15
|
}
|
|
12
|
-
declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
16
|
+
declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$labelPosition"> & WrapperProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$labelPosition"> & WrapperProps, never>>> & string;
|
|
17
|
+
declare const InputColumn: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
18
|
+
declare const LabelAligner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
13
19
|
declare const TextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof TextFieldWrapperProps> & TextFieldWrapperProps, "className"> & Partial<Pick<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof TextFieldWrapperProps> & TextFieldWrapperProps, "className">>> & string;
|
|
14
20
|
declare const TextFieldInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof TextFieldInputProps> & TextFieldInputProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof TextFieldInputProps> & TextFieldInputProps, never>>> & string;
|
|
15
21
|
declare const Category: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
16
22
|
declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
17
|
-
export { Wrapper, TextFieldWrapper, TextFieldInput, Category, IconContainer };
|
|
23
|
+
export { Wrapper, InputColumn, LabelAligner, TextFieldWrapper, TextFieldInput, Category, IconContainer, };
|
package/dist/esm/index.esm.js
CHANGED
|
@@ -18157,12 +18157,24 @@ const IconButton = forwardRef(({ iconName, onClick, disabled, variant = "primary
|
|
|
18157
18157
|
|
|
18158
18158
|
const Wrapper = styled.div `
|
|
18159
18159
|
display: flex;
|
|
18160
|
-
flex-direction: column;
|
|
18160
|
+
flex-direction: ${({ $labelPosition }) => $labelPosition === "left" ? "row" : "column"};
|
|
18161
|
+
align-items: ${({ $labelPosition }) => $labelPosition === "left" ? "flex-start" : "stretch"};
|
|
18162
|
+
gap: ${({ $labelPosition }) => ($labelPosition === "left" ? "10px" : "0")};
|
|
18161
18163
|
min-width: 60px;
|
|
18162
18164
|
max-width: 400px;
|
|
18163
18165
|
position: relative;
|
|
18164
18166
|
width: 100%;
|
|
18165
18167
|
`;
|
|
18168
|
+
const InputColumn = styled.div `
|
|
18169
|
+
display: flex;
|
|
18170
|
+
flex-direction: column;
|
|
18171
|
+
flex: 1;
|
|
18172
|
+
`;
|
|
18173
|
+
const LabelAligner = styled.div `
|
|
18174
|
+
height: 32px;
|
|
18175
|
+
display: flex;
|
|
18176
|
+
align-items: center;
|
|
18177
|
+
`;
|
|
18166
18178
|
const TextFieldWrapper = styled.div.attrs({
|
|
18167
18179
|
className: "DSL-stella-textfield",
|
|
18168
18180
|
}) `
|
|
@@ -18174,7 +18186,7 @@ const TextFieldWrapper = styled.div.attrs({
|
|
|
18174
18186
|
border: 1px solid ${Styles.color.grey.medium};
|
|
18175
18187
|
border-radius: 6px;
|
|
18176
18188
|
overflow: hidden;
|
|
18177
|
-
margin-top: 3px;
|
|
18189
|
+
margin-top: ${({ $labelPosition }) => $labelPosition === "left" ? "0" : "3px"};
|
|
18178
18190
|
background-color: ${({ $isDisabled }) => $isDisabled ? Styles.color.grey.pale : "white"};
|
|
18179
18191
|
outline: ${({ $hasError }) => $hasError && `${Styles.color.states.error} auto 1px`};
|
|
18180
18192
|
cursor: ${({ $isDisabled, $isLoading }) => {
|
|
@@ -18233,10 +18245,9 @@ const IconContainer = styled.div `
|
|
|
18233
18245
|
margin-right: 5px;
|
|
18234
18246
|
`;
|
|
18235
18247
|
|
|
18236
|
-
const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout = true, disabled = false, hideLabel = false, isLoading = false, hasError = false, isRequired = false, }) => {
|
|
18237
|
-
|
|
18238
|
-
a__default.createElement(
|
|
18239
|
-
a__default.createElement(TextFieldWrapper, { id: id, "$hasError": hasError, "$isDisabled": disabled, "$isLoading": isLoading, "data-testid": "text-input-wrapper" },
|
|
18248
|
+
const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout = true, disabled = false, hideLabel = false, isLoading = false, hasError = false, isRequired = false, labelPosition = "top", }) => {
|
|
18249
|
+
const inputAndHelper = (a__default.createElement(a__default.Fragment, null,
|
|
18250
|
+
a__default.createElement(TextFieldWrapper, { id: id, "$hasError": hasError, "$isDisabled": disabled, "$isLoading": isLoading, "$labelPosition": labelPosition, "data-testid": "text-input-wrapper" },
|
|
18240
18251
|
leftCategory && a__default.createElement(Category, null, leftCategory),
|
|
18241
18252
|
children,
|
|
18242
18253
|
isLoading && (a__default.createElement(IconContainer, null,
|
|
@@ -18245,9 +18256,13 @@ const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, classNa
|
|
|
18245
18256
|
a__default.createElement(StellaIcon, { dataTestId: "end-icon", iconName: endIcon }))),
|
|
18246
18257
|
rightCategory && a__default.createElement(Category, null, rightCategory)),
|
|
18247
18258
|
helperText && (a__default.createElement(HelperText, { id: `${id}-helper-text`, text: helperText, affectLayout: helperTextAffectLayout, type: hasError ? "error" : "info" }))));
|
|
18259
|
+
return (a__default.createElement(Wrapper, { "data-testid": dataTestId, className: className, "$labelPosition": labelPosition },
|
|
18260
|
+
labelPosition === "left" ? (a__default.createElement(LabelAligner, null,
|
|
18261
|
+
a__default.createElement(Label, { tooltipText: tooltipText, required: isRequired, labelValue: label, hideLabel: hideLabel, id: `${id}-label`, htmlFor: `${id}-text-field` }))) : (a__default.createElement(Label, { tooltipText: tooltipText, required: isRequired, labelValue: label, hideLabel: hideLabel, id: `${id}-label`, htmlFor: `${id}-text-field` })),
|
|
18262
|
+
labelPosition === "left" ? (a__default.createElement(InputColumn, null, inputAndHelper)) : (inputAndHelper)));
|
|
18248
18263
|
};
|
|
18249
18264
|
|
|
18250
|
-
const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "", textAlign = "left", helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, isLoading = false, ariaDescribedBy, enableAutocomplete = false, }) => {
|
|
18265
|
+
const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "", textAlign = "left", helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, isLoading = false, ariaDescribedBy, enableAutocomplete = false, labelPosition, }) => {
|
|
18251
18266
|
const containerProps = {
|
|
18252
18267
|
id,
|
|
18253
18268
|
label,
|
|
@@ -18263,6 +18278,7 @@ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus,
|
|
|
18263
18278
|
endIcon,
|
|
18264
18279
|
disabled,
|
|
18265
18280
|
isLoading,
|
|
18281
|
+
labelPosition,
|
|
18266
18282
|
};
|
|
18267
18283
|
const [inputValue, setInputValue] = useState("");
|
|
18268
18284
|
const valueToUse = value ?? inputValue;
|
|
@@ -18279,7 +18295,7 @@ const CustomIconButton$2 = styled(IconButton) `
|
|
|
18279
18295
|
margin-right: 2px;
|
|
18280
18296
|
`;
|
|
18281
18297
|
|
|
18282
|
-
const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter Password", onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign = "left", isHidden = true, helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, ariaDescribedBy, enableAutocomplete = false, }) => {
|
|
18298
|
+
const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter Password", onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign = "left", isHidden = true, helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, ariaDescribedBy, enableAutocomplete = false, labelPosition, }) => {
|
|
18283
18299
|
const containerProps = {
|
|
18284
18300
|
id,
|
|
18285
18301
|
label,
|
|
@@ -18293,6 +18309,7 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
|
|
|
18293
18309
|
leftCategory: undefined,
|
|
18294
18310
|
hideLabel,
|
|
18295
18311
|
disabled,
|
|
18312
|
+
labelPosition,
|
|
18296
18313
|
};
|
|
18297
18314
|
const [inputValue, setInputValue] = useState("");
|
|
18298
18315
|
const [show, setShow] = useState(!isHidden);
|
|
@@ -18331,7 +18348,7 @@ const formatDynamicNumbersWithCommas = (num, decimalPlaces, isDegrees) => {
|
|
|
18331
18348
|
: "";
|
|
18332
18349
|
};
|
|
18333
18350
|
|
|
18334
|
-
const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "0", textAlign = "left", isTruncated = false, helperTextAffectLayout = true, hideLabel = false, disabled = false, isLoading = false, hasError = false, thousandSeparator = true, decimalPlaces = 0, allowNegativeNumbers = false, ariaDescribedBy, enableAutocomplete = false, isDegrees = false, }) => {
|
|
18351
|
+
const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "0", textAlign = "left", isTruncated = false, helperTextAffectLayout = true, hideLabel = false, disabled = false, isLoading = false, hasError = false, thousandSeparator = true, decimalPlaces = 0, allowNegativeNumbers = false, ariaDescribedBy, enableAutocomplete = false, isDegrees = false, labelPosition, }) => {
|
|
18335
18352
|
const containerProps = {
|
|
18336
18353
|
id,
|
|
18337
18354
|
label,
|
|
@@ -18347,6 +18364,7 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
|
|
|
18347
18364
|
leftCategory,
|
|
18348
18365
|
hideLabel,
|
|
18349
18366
|
disabled,
|
|
18367
|
+
labelPosition,
|
|
18350
18368
|
};
|
|
18351
18369
|
const [inputValue, setInputValue] = useState("");
|
|
18352
18370
|
const [placeholderText, setPlaceholderText] = useState(placeholder);
|
|
@@ -22095,6 +22113,7 @@ const HeaderRow = styled.tr `
|
|
|
22095
22113
|
background-color: ${Styles.color.grey.pale};
|
|
22096
22114
|
min-height: 50px;
|
|
22097
22115
|
height: 50px;
|
|
22116
|
+
display: ${({ $isEmpty }) => ($isEmpty ? "none" : "table-row")};
|
|
22098
22117
|
`;
|
|
22099
22118
|
const CellRow = styled.tr `
|
|
22100
22119
|
min-height: 50px;
|
|
@@ -22308,6 +22327,7 @@ const LoadingShimmer = styled.div `
|
|
|
22308
22327
|
`;
|
|
22309
22328
|
const CustomPagination = styled(Pagination) `
|
|
22310
22329
|
border-top: ${({ $hasData }) => $hasData ? "0px" : `1px solid ${Styles.color.grey.light}`};
|
|
22330
|
+
display: ${({ $isEmpty }) => ($isEmpty ? "none" : "flex")};
|
|
22311
22331
|
`;
|
|
22312
22332
|
const KebabAlign = styled.div `
|
|
22313
22333
|
display: flex;
|
|
@@ -22324,12 +22344,8 @@ const EmptyTableSection = styled.section `
|
|
|
22324
22344
|
flex-direction: column;
|
|
22325
22345
|
justify-content: center;
|
|
22326
22346
|
align-items: center;
|
|
22327
|
-
position: absolute;
|
|
22328
22347
|
gap: 20px;
|
|
22329
|
-
|
|
22330
|
-
left: 0;
|
|
22331
|
-
right: 0;
|
|
22332
|
-
margin: 80px auto 0;
|
|
22348
|
+
margin: 0 auto;
|
|
22333
22349
|
`;
|
|
22334
22350
|
const EmptyTableHeader = styled.p `
|
|
22335
22351
|
display: flex;
|
|
@@ -22981,7 +22997,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22981
22997
|
}, key: index + "loading-row" }, Array.from({
|
|
22982
22998
|
length: 10,
|
|
22983
22999
|
}).map((_, i) => (a__default.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a__default.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
|
|
22984
|
-
a__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a__default.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
|
|
23000
|
+
a__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a__default.createElement(HeaderRow, { key: headerGroup.id, "$isEmpty": table.getRowModel().rows.length === 0 }, headerGroup.headers.map((header, i) => {
|
|
22985
23001
|
return (a__default.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
|
|
22986
23002
|
setFilterMenuOpen((prev) => ({
|
|
22987
23003
|
...prev,
|
|
@@ -23047,7 +23063,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
23047
23063
|
renderExpandedRow &&
|
|
23048
23064
|
!!renderExpandedRow(row) && (a__default.createElement(ExpandedContentRow, null,
|
|
23049
23065
|
a__default.createElement(ExpandedContentCell, { colSpan: table.getVisibleLeafColumns().length }, renderExpandedRow(row))))))))))),
|
|
23050
|
-
showPagination && paginationDetails?.totalRows > 0 && (a__default.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
|
|
23066
|
+
showPagination && paginationDetails?.totalRows > 0 && (a__default.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, "$isEmpty": table.getRowModel().rows.length === 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
|
|
23051
23067
|
table.toggleAllRowsSelected(false);
|
|
23052
23068
|
setPageIndex(page);
|
|
23053
23069
|
setPagination((prev) => ({
|