@attraccess/plugins-frontend-ui 0.0.4
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/README.md +7 -0
- package/index-BsoDY1sP.mjs +2522 -0
- package/index-ZwVKNfcP.mjs +17953 -0
- package/index.d.ts +3 -0
- package/index.mjs +15 -0
- package/lib/components/ResourceSelector/ResourceSelector.d.ts +9 -0
- package/lib/components/attraccess-user/AttraccessUser.d.ts +9 -0
- package/lib/components/datetime-display/DateTimeDisplay.d.ts +8 -0
- package/lib/components/duration-display/DurationDisplay.d.ts +12 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/user-search/UserSearch.d.ts +7 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/useFormatDateTime.d.ts +6 -0
- package/lib/hooks/useFormatDuration.d.ts +7 -0
- package/lib/hooks/useUrlQuery.d.ts +1 -0
- package/lib/i18n.d.ts +13 -0
- package/package.json +15 -0
package/index.d.ts
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { H as e, I as r, J as t, L as o, R as i, U as u, Q as m, K as D, N as c, O as l, S as n, P as p } from "./index-ZwVKNfcP.mjs";
|
|
2
|
+
export {
|
|
3
|
+
e as AttraccessUser,
|
|
4
|
+
r as DateTimeDisplay,
|
|
5
|
+
t as DurationDisplay,
|
|
6
|
+
o as ListboxWrapper,
|
|
7
|
+
i as ResourceSelector,
|
|
8
|
+
u as UserSearch,
|
|
9
|
+
m as i18n,
|
|
10
|
+
D as useDateTimeFormatter,
|
|
11
|
+
c as useFormatDateTime,
|
|
12
|
+
l as useFormatedDuration,
|
|
13
|
+
n as useTranslations,
|
|
14
|
+
p as useUrlQuery
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
selection: number[];
|
|
5
|
+
onSelectionChange: (selection: number[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListboxWrapper: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ResourceSelector(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UserProps } from '@heroui/react';
|
|
2
|
+
import { User } from '../../../../../react-query-client/src/index.ts';
|
|
3
|
+
|
|
4
|
+
interface AttraccessUserProps {
|
|
5
|
+
user?: User;
|
|
6
|
+
description?: UserProps['description'];
|
|
7
|
+
}
|
|
8
|
+
export declare function AttraccessUser(props: AttraccessUserProps & Omit<UserProps, 'avatarProps' | 'description' | 'name'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DateTimeOptions } from '../../hooks';
|
|
2
|
+
|
|
3
|
+
interface DateTimeDisplayProps {
|
|
4
|
+
date?: Date | string | number | null;
|
|
5
|
+
options?: DateTimeOptions;
|
|
6
|
+
}
|
|
7
|
+
export declare function DateTimeDisplay(props: DateTimeDisplayProps & React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface DurationDisplayProps {
|
|
4
|
+
minutes: number | null;
|
|
5
|
+
alternativeText?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component to display a duration in a localized format
|
|
9
|
+
* using the Intl.DurationFormat API
|
|
10
|
+
*/
|
|
11
|
+
export declare function DurationDisplay({ minutes, alternativeText, ...spanProps }: DurationDisplayProps & React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DateTimeOptions {
|
|
2
|
+
showTime?: boolean;
|
|
3
|
+
showDate?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useDateTimeFormatter(options?: DateTimeOptions): (date?: Date | string | number | null) => string;
|
|
6
|
+
export declare function useFormatDateTime(date?: Date | string | number | null, options?: DateTimeOptions): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hook for formatting duration values using the Intl.DurationFormat API (if supported)
|
|
3
|
+
* and respecting the current language settings.
|
|
4
|
+
*
|
|
5
|
+
* @returns A function that formats minutes into a localized duration string
|
|
6
|
+
*/
|
|
7
|
+
export declare function useFormatedDuration(minutes: number): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useUrlQuery(): URLSearchParams;
|
package/lib/i18n.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
|
|
3
|
+
export declare const i18n: import('i18next').i18n;
|
|
4
|
+
type TranslationRecord = Record<string, unknown>;
|
|
5
|
+
interface TranslationModule {
|
|
6
|
+
default: TranslationRecord;
|
|
7
|
+
}
|
|
8
|
+
interface TranslationModules {
|
|
9
|
+
en: TranslationModule | TranslationRecord;
|
|
10
|
+
de: TranslationModule | TranslationRecord;
|
|
11
|
+
}
|
|
12
|
+
export declare function useTranslations<T extends TranslationModules>(namespace: string, translations: T): ReturnType<typeof useTranslation>;
|
|
13
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@attraccess/plugins-frontend-ui",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./index.mjs",
|
|
12
|
+
"require": "./index.js"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|