@crystaltech/hsms-shared-ui 0.7.16 → 0.7.17
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/{Loader--w3bdiMN.js → Loader-D1FpX_bV.js} +65 -52
- package/dist/Loader-DQV7fRR-.cjs +1 -0
- package/dist/components/CustomAutoComplete.d.ts +2 -1
- package/dist/components/CustomFilter.d.ts +1 -0
- package/dist/components/DataTable.d.ts +1 -1
- package/dist/components/ProfilePages.d.ts +15 -1
- package/dist/components/ui/CustomSwitch.d.ts +3 -1
- package/dist/components/ui/CustomTextfield.d.ts +2 -1
- package/dist/components/ui/Footer.d.ts +6 -1
- package/dist/hooks/useSyncedLocalStorage.d.ts +14 -2
- package/dist/index.es.js +10048 -10531
- package/dist/index.js +75 -75
- package/dist/preMountSplash.es.js +5069 -5068
- package/dist/preMountSplash.iife.js +91 -91
- package/dist/preMountSplash.js +67 -67
- package/dist/routes/ProtectedRoute.d.ts +3 -0
- package/dist/sw.js +1 -1
- package/dist/utils/safeStorage.d.ts +14 -0
- package/package.json +3 -3
- package/dist/Loader-CmCUvExV.cjs +0 -1
|
@@ -4,8 +4,9 @@ interface CustomAutoCompleteProps<T> {
|
|
|
4
4
|
label: string;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
multiple?: boolean;
|
|
7
|
+
id?: string;
|
|
7
8
|
getOptionLabel: (option: T) => string;
|
|
8
9
|
onChange: (value: T[] | T | null) => void;
|
|
9
10
|
}
|
|
10
|
-
declare const CustomAutoComplete: <T>({ options, defaultValue, label, placeholder, multiple, getOptionLabel, onChange, }: CustomAutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const CustomAutoComplete: <T>({ options, defaultValue, label, placeholder, multiple, id, getOptionLabel, onChange, }: CustomAutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default CustomAutoComplete;
|
|
@@ -16,7 +16,7 @@ export interface TableConfig<T = Record<string, string | number | boolean>> {
|
|
|
16
16
|
icon: JSX.Element;
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
|
-
export default function
|
|
19
|
+
export default function DataTable({ config, data, }: {
|
|
20
20
|
config: TableConfig;
|
|
21
21
|
data: Array<Record<string, string | number | boolean>>;
|
|
22
22
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
export interface ProfileData {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
name: string;
|
|
4
|
+
bio: string;
|
|
5
|
+
email: string;
|
|
6
|
+
location: string;
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ProfilePagesProps {
|
|
10
|
+
/** Profiles to render. Provided by the consuming app. */
|
|
11
|
+
profiles?: ProfileData[];
|
|
12
|
+
/** Called with the profile that was edited. */
|
|
13
|
+
onEditClick?: (profile: ProfileData) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const ProfilePages: ({ profiles, onEditClick }: ProfilePagesProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
16
|
export default ProfilePages;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface CustomSwitchProps {
|
|
2
2
|
checked: boolean;
|
|
3
3
|
onChange: (checked: boolean) => void;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
label?: string;
|
|
4
6
|
}
|
|
5
|
-
declare function CustomSwitch({ checked, onChange }: CustomSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CustomSwitch({ checked, onChange, ariaLabel, label }: CustomSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export default CustomSwitch;
|
|
@@ -3,6 +3,7 @@ type CustomTextFieldProps = Omit<TextFieldProps, "onChange" | "value"> & {
|
|
|
3
3
|
value: string;
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
label?: string;
|
|
6
|
+
id?: string;
|
|
6
7
|
};
|
|
7
|
-
declare function CustomTextField({ value, onChange, label, ...props }: CustomTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CustomTextField({ value, onChange, label, id, ...props }: CustomTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default CustomTextField;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface FooterProps {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Replaces the default attribution entirely. Hosts that already render
|
|
5
|
+
* their own copyright line should pass it here — the default is not
|
|
6
|
+
* appended, so the two never appear together.
|
|
7
|
+
*/
|
|
8
|
+
footerText?: React.ReactNode;
|
|
4
9
|
}
|
|
5
10
|
declare const Footer: React.FC<FooterProps>;
|
|
6
11
|
export default Footer;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Same-tab localStorage writes fire no `storage` event — the browser only
|
|
3
|
+
* notifies *other* tabs. Consumers therefore never learn about a value the
|
|
4
|
+
* host app wrote after they mounted (e.g. user_info during login) until the
|
|
5
|
+
* next page load.
|
|
6
|
+
*
|
|
7
|
+
* Wrapping the mutators once makes every same-tab write observable, whoever
|
|
8
|
+
* performs it, without asking writers to dispatch anything.
|
|
9
|
+
*/
|
|
10
|
+
export declare const STORAGE_WRITE_EVENT = "hsms-storage-write";
|
|
11
|
+
export declare function observeLocalStorageWrites(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Sync a JSON value from localStorage. Picks up cross-tab storage events,
|
|
14
|
+
* same-tab writes from any source, and an optional explicit custom event.
|
|
15
|
+
* Returns the parsed value or null.
|
|
4
16
|
*/
|
|
5
17
|
export declare function useSyncedLocalStorageJSON<T>(key: string, customEventName?: string): T | null;
|