stratosphere-ui 0.2.0 → 0.2.1
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/common/types.d.ts +4 -0
- package/dist/components/Form/FormControl.d.ts +2 -1
- package/dist/components/Form/types.d.ts +0 -4
- package/dist/index.d.ts +1 -0
- package/dist/stratosphere-ui.js +12 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/transformers.d.ts +3 -0
- package/package.json +1 -1
package/dist/common/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { InputProps } from 'react-daisyui';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
|
-
import { FormFieldProps
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
5
|
+
import { Transform } from '../../common';
|
|
5
6
|
export interface FormControlProps<Values extends FieldValues, TOutput> extends FormFieldProps<Values>, Omit<InputProps, 'name'> {
|
|
6
7
|
elementLeft?: ReactNode;
|
|
7
8
|
elementRight?: ReactNode;
|
|
@@ -16,7 +16,3 @@ export interface ComboboxProps<DataItem extends GenericDataType, Values extends
|
|
|
16
16
|
setShowDropdown: Dispatch<SetStateAction<boolean>>;
|
|
17
17
|
setSelectedItems: Dispatch<SetStateAction<DataItem[]>>;
|
|
18
18
|
}
|
|
19
|
-
export interface Transform<TOutput> {
|
|
20
|
-
output: (val: string) => TOutput | null;
|
|
21
|
-
input: (val: TOutput) => string;
|
|
22
|
-
}
|
package/dist/index.d.ts
CHANGED
package/dist/stratosphere-ui.js
CHANGED
|
@@ -26940,7 +26940,7 @@ const jP = ({
|
|
|
26940
26940
|
name: R,
|
|
26941
26941
|
onChange: ({ target: { value: ee } }) => {
|
|
26942
26942
|
const oe = N === void 0 ? ee : N.output(ee);
|
|
26943
|
-
oe !==
|
|
26943
|
+
oe !== void 0 && $(R, oe, {
|
|
26944
26944
|
shouldDirty: !0,
|
|
26945
26945
|
shouldTouch: !0
|
|
26946
26946
|
});
|
|
@@ -30112,6 +30112,15 @@ const FI = My, zI = ({
|
|
|
30112
30112
|
]
|
|
30113
30113
|
}
|
|
30114
30114
|
);
|
|
30115
|
+
}, l3 = {
|
|
30116
|
+
input: (r) => r !== null ? r.toString() : "",
|
|
30117
|
+
output: (r) => {
|
|
30118
|
+
const s = parseInt(r);
|
|
30119
|
+
return Number.isNaN(s) ? null : s;
|
|
30120
|
+
}
|
|
30121
|
+
}, i3 = {
|
|
30122
|
+
input: (r) => r ?? "",
|
|
30123
|
+
output: (r) => r.length > 0 ? r : null
|
|
30115
30124
|
};
|
|
30116
30125
|
export {
|
|
30117
30126
|
YI as AlertMessages,
|
|
@@ -30148,6 +30157,8 @@ export {
|
|
|
30148
30157
|
r3 as Tabs,
|
|
30149
30158
|
a3 as TypeaheadSelect,
|
|
30150
30159
|
U$ as WarningIcon,
|
|
30160
|
+
l3 as integerInputTransformer,
|
|
30161
|
+
i3 as nullEmptyStringTransformer,
|
|
30151
30162
|
D$ as useAlertMessages,
|
|
30152
30163
|
UP as useDebouncedValue,
|
|
30153
30164
|
Nm as useFieldColor,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './transformers';
|