@sqrzro/ui 4.0.0-alpha.7 → 4.0.0-alpha.71
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/components/buttons/ActionButton/index.d.ts +8 -6
- package/dist/components/buttons/ActionButton/index.js +3 -27
- package/dist/components/buttons/Button/index.d.ts +7 -6
- package/dist/components/buttons/Button/index.js +9 -19
- package/dist/components/collections/Collection/index.d.ts +7 -3
- package/dist/components/collections/Collection/index.js +9 -7
- package/dist/components/collections/DataTable/index.d.ts +14 -0
- package/dist/components/collections/DataTable/index.js +14 -0
- package/dist/components/collections/DefinitionList/index.d.ts +13 -0
- package/dist/components/collections/DefinitionList/index.js +13 -0
- package/dist/components/collections/EmptyMessage/index.d.ts +1 -1
- package/dist/components/collections/EmptyMessage/index.js +6 -4
- package/dist/components/collections/EmptyMessageAction/index.d.ts +2 -2
- package/dist/components/collections/EmptyMessageAction/index.js +1 -1
- package/dist/components/collections/List/index.d.ts +6 -3
- package/dist/components/collections/List/index.js +2 -2
- package/dist/components/collections/ListClientComponent/index.d.ts +7 -4
- package/dist/components/collections/ListClientComponent/index.js +8 -5
- package/dist/components/collections/ListItem/index.d.ts +10 -3
- package/dist/components/collections/ListItem/index.js +15 -23
- package/dist/components/collections/ListItemMenu/index.d.ts +8 -0
- package/dist/components/collections/ListItemMenu/index.js +7 -0
- package/dist/components/collections/ListItemMeta/index.d.ts +6 -4
- package/dist/components/collections/ListItemMeta/index.js +13 -17
- package/dist/components/collections/ListItemSecondary/index.d.ts +5 -3
- package/dist/components/collections/ListItemSecondary/index.js +12 -8
- package/dist/components/collections/Pagination/index.d.ts +1 -1
- package/dist/components/collections/Pagination/index.js +6 -7
- package/dist/components/collections/PaginationLink/index.d.ts +9 -0
- package/dist/components/collections/PaginationLink/index.js +9 -0
- package/dist/components/collections/Table/index.d.ts +3 -4
- package/dist/components/collections/Table/index.js +2 -8
- package/dist/components/collections/TableClientComponent/index.d.ts +7 -6
- package/dist/components/collections/TableClientComponent/index.js +11 -26
- package/dist/components/collections/TableRow/index.d.ts +13 -0
- package/dist/components/collections/TableRow/index.js +15 -0
- package/dist/components/collections/interfaces.d.ts +41 -34
- package/dist/components/collections/lang.js +1 -1
- package/dist/components/collections/utility/is-paginated.d.ts +1 -1
- package/dist/components/collections/utility/is-right-aligned.d.ts +3 -0
- package/dist/components/collections/utility/is-right-aligned.js +11 -0
- package/dist/components/collections/utility/normalize-href.d.ts +2 -0
- package/dist/components/collections/utility/normalize-href.js +8 -0
- package/dist/components/collections/utility/render-cell.d.ts +5 -0
- package/dist/components/collections/utility/render-cell.js +33 -0
- package/dist/components/elements/Badge/index.d.ts +12 -0
- package/dist/components/elements/Badge/index.js +9 -0
- package/dist/components/elements/ContentLink/index.d.ts +4 -0
- package/dist/components/elements/ContentLink/index.js +7 -0
- package/dist/components/elements/InfoPanel/index.d.ts +13 -0
- package/dist/components/elements/InfoPanel/index.js +20 -0
- package/dist/components/{utility → elements}/Link/index.d.ts +3 -2
- package/dist/components/{utility → elements}/Link/index.js +10 -9
- package/dist/components/elements/Menu/index.d.ts +19 -0
- package/dist/components/elements/Menu/index.js +17 -0
- package/dist/components/elements/MenuItem/index.d.ts +9 -0
- package/dist/components/elements/MenuItem/index.js +14 -0
- package/dist/components/elements/Page/index.d.ts +19 -0
- package/dist/components/elements/Page/index.js +18 -0
- package/dist/components/elements/Reference/index.d.ts +9 -0
- package/dist/components/elements/Reference/index.js +16 -0
- package/dist/components/elements/Summary/index.d.ts +13 -0
- package/dist/components/elements/Summary/index.js +22 -0
- package/dist/components/errors/AppError/index.d.ts +19 -0
- package/dist/components/errors/AppError/index.js +9 -0
- package/dist/components/errors/AppForbiddenError/index.d.ts +7 -0
- package/dist/components/errors/AppForbiddenError/index.js +6 -0
- package/dist/components/errors/AppNotFoundError/index.d.ts +7 -0
- package/dist/components/errors/AppNotFoundError/index.js +6 -0
- package/dist/components/errors/AppServerError/index.d.ts +8 -0
- package/dist/components/errors/AppServerError/index.js +17 -0
- package/dist/components/index.d.ts +35 -6
- package/dist/components/index.js +17 -3
- package/dist/components/modals/ConfirmModal/index.d.ts +5 -3
- package/dist/components/modals/ConfirmModal/index.js +3 -3
- package/dist/components/modals/Modal/index.d.ts +4 -4
- package/dist/components/modals/Modal/index.js +3 -3
- package/dist/components/modals/ModalActions/index.d.ts +3 -3
- package/dist/components/modals/ModalActions/index.js +4 -3
- package/dist/components/utility/Action/index.d.ts +11 -0
- package/dist/components/utility/Action/index.js +48 -0
- package/dist/components/utility/ActionList/index.d.ts +5 -5
- package/dist/components/utility/ActionList/index.js +5 -3
- package/dist/components/utility/AppBody/index.d.ts +5 -0
- package/dist/components/utility/AppBody/index.js +9 -0
- package/dist/components/utility/Calendar/index.d.ts +32 -0
- package/dist/components/utility/Calendar/index.js +66 -0
- package/dist/components/utility/CalendarDay/index.d.ts +11 -0
- package/dist/components/utility/CalendarDay/index.js +22 -0
- package/dist/components/utility/Confirmable/index.d.ts +9 -0
- package/dist/components/utility/Confirmable/index.js +14 -0
- package/dist/components/utility/Container/index.d.ts +1 -1
- package/dist/components/utility/Container/index.js +2 -2
- package/dist/components/utility/Loader/index.d.ts +1 -1
- package/dist/components/utility/Loader/index.js +5 -4
- package/dist/components/utility/Popover/index.d.ts +1 -1
- package/dist/components/utility/Popover/index.js +5 -5
- package/dist/components/utility/Toast/index.d.ts +2 -2
- package/dist/components/utility/Toast/index.js +6 -4
- package/dist/components/utility/Toaster/index.js +5 -5
- package/dist/filters/components/FilterBar/index.d.ts +5 -2
- package/dist/filters/components/FilterBarClientComponent/index.d.ts +2 -4
- package/dist/filters/components/FilterBarClientComponent/index.js +3 -43
- package/dist/filters/components/FilterClearButton/index.d.ts +7 -2
- package/dist/filters/components/FilterClearButton/index.js +8 -4
- package/dist/filters/components/FilterControl/index.d.ts +1 -1
- package/dist/filters/components/FilterControl/index.js +11 -4
- package/dist/filters/components/FilterItem/index.d.ts +2 -1
- package/dist/filters/components/FilterItem/index.js +3 -7
- package/dist/filters/components/FilterPanel/index.d.ts +1 -1
- package/dist/filters/{utility/filter.d.ts → filter.d.ts} +1 -1
- package/dist/filters/{utility/filter.js → filter.js} +8 -8
- package/dist/filters/filters/BooleanFilter/index.js +1 -1
- package/dist/filters/filters/CalendarFilter/index.js +3 -2
- package/dist/filters/filters/DateFilter/index.d.ts +1 -1
- package/dist/filters/filters/DateFilter/index.js +9 -4
- package/dist/filters/filters/DropdownFilter/index.js +1 -1
- package/dist/filters/filters/Filter/index.d.ts +5 -4
- package/dist/filters/filters/Filter/index.js +7 -7
- package/dist/filters/filters/SearchFilter/index.d.ts +7 -2
- package/dist/filters/filters/SearchFilter/index.js +8 -8
- package/dist/filters/filters/interfaces.d.ts +0 -2
- package/dist/filters/index.d.ts +2 -1
- package/dist/filters/index.js +2 -1
- package/dist/filters/interfaces.d.ts +2 -2
- package/dist/filters/utility/render-value.js +5 -5
- package/dist/forms/components/Autocomplete/index.d.ts +2 -2
- package/dist/forms/components/Autocomplete/index.js +3 -3
- package/dist/forms/components/AutocompleteList/index.d.ts +7 -0
- package/dist/forms/components/AutocompleteList/index.js +15 -0
- package/dist/forms/components/BaseCalendarInput/index.d.ts +11 -0
- package/dist/forms/components/BaseCalendarInput/index.js +22 -0
- package/dist/forms/components/CSVInput/index.d.ts +11 -0
- package/dist/forms/components/CSVInput/index.js +32 -0
- package/dist/forms/components/CalendarInput/index.d.ts +6 -0
- package/dist/forms/components/CalendarInput/index.js +14 -0
- package/dist/forms/components/ColorInput/index.d.ts +16 -0
- package/dist/forms/components/ColorInput/index.js +14 -0
- package/dist/forms/components/Dropdown/index.d.ts +1 -1
- package/dist/forms/components/Dropdown/index.js +9 -8
- package/dist/forms/components/DropdownItem/index.d.ts +9 -0
- package/dist/forms/components/DropdownItem/index.js +9 -0
- package/dist/forms/components/DropdownList/index.d.ts +1 -1
- package/dist/forms/components/DropdownList/index.js +7 -11
- package/dist/forms/components/EditableForm/index.d.ts +3 -3
- package/dist/forms/components/EditableForm/index.js +9 -9
- package/dist/forms/components/EditableFormField/index.d.ts +1 -1
- package/dist/forms/components/EditableFormField/index.js +3 -3
- package/dist/forms/components/EditableFormFields/index.d.ts +12 -0
- package/dist/forms/components/EditableFormFields/index.js +44 -1
- package/dist/forms/components/Form/index.d.ts +4 -2
- package/dist/forms/components/Form/index.js +7 -6
- package/dist/forms/components/FormError/index.d.ts +2 -2
- package/dist/forms/components/FormError/index.js +7 -5
- package/dist/forms/components/FormField/index.d.ts +7 -5
- package/dist/forms/components/FormField/index.js +15 -7
- package/dist/forms/components/FormFields/index.d.ts +22 -2
- package/dist/forms/components/FormFields/index.js +44 -2
- package/dist/forms/components/FormLabel/index.d.ts +1 -1
- package/dist/forms/components/FormLabel/index.js +4 -3
- package/dist/forms/components/ImageInput/index.d.ts +17 -0
- package/dist/forms/components/ImageInput/index.js +46 -0
- package/dist/forms/components/ImageInputPanel/index.d.ts +10 -0
- package/dist/forms/components/ImageInputPanel/index.js +34 -0
- package/dist/forms/components/ModalForm/index.d.ts +3 -2
- package/dist/forms/components/ModalForm/index.js +5 -4
- package/dist/forms/components/NumberInput/index.d.ts +1 -1
- package/dist/forms/components/PasswordComplexity/index.d.ts +16 -0
- package/dist/forms/components/PasswordComplexity/index.js +14 -0
- package/dist/forms/components/PasswordComplexityItem/index.d.ts +8 -0
- package/dist/forms/components/PasswordComplexityItem/index.js +10 -0
- package/dist/forms/components/PasswordInput/index.d.ts +1 -1
- package/dist/forms/components/PasswordInput/index.js +6 -6
- package/dist/forms/components/PointsInput/index.d.ts +5 -0
- package/dist/forms/components/{MoneyInput → PointsInput}/index.js +3 -3
- package/dist/forms/components/RangeCalendarInput/index.d.ts +6 -0
- package/dist/forms/components/RangeCalendarInput/index.js +14 -0
- package/dist/forms/components/StaticTextInput/index.d.ts +2 -2
- package/dist/forms/components/StaticTextInput/index.js +6 -7
- package/dist/forms/components/Switch/index.d.ts +9 -3
- package/dist/forms/components/Switch/index.js +7 -5
- package/dist/forms/components/TextArea/index.d.ts +14 -0
- package/dist/forms/components/TextArea/index.js +15 -0
- package/dist/forms/components/TextInput/index.d.ts +1 -1
- package/dist/forms/components/TextInput/index.js +5 -4
- package/dist/forms/hooks/useAutocomplete.d.ts +8 -6
- package/dist/forms/hooks/useAutocomplete.js +4 -4
- package/dist/forms/hooks/useDropdown.d.ts +5 -7
- package/dist/forms/hooks/useDropdown.js +5 -5
- package/dist/forms/hooks/useEditableDropdown.d.ts +4 -0
- package/dist/forms/hooks/useEditableDropdown.js +6 -0
- package/dist/forms/hooks/useEditableForm.js +8 -1
- package/dist/forms/hooks/useForm.d.ts +7 -14
- package/dist/forms/hooks/useForm.js +25 -27
- package/dist/forms/hooks/useModalForm.d.ts +2 -2
- package/dist/forms/hooks/useModalForm.js +9 -2
- package/dist/forms/index.d.ts +22 -6
- package/dist/forms/index.js +9 -4
- package/dist/forms/interfaces.d.ts +8 -1
- package/dist/forms/utility/extract-input-props.js +1 -0
- package/dist/forms/utility/format-date-value.d.ts +2 -0
- package/dist/forms/utility/format-date-value.js +13 -0
- package/dist/forms/utility/format-file-size.d.ts +2 -0
- package/dist/forms/utility/format-file-size.js +11 -0
- package/dist/forms/utility/preprocess-image.d.ts +6 -0
- package/dist/forms/utility/preprocess-image.js +58 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/useConfirmable.d.ts +21 -0
- package/dist/hooks/useConfirmable.js +58 -0
- package/dist/hooks/useDownload.d.ts +2 -0
- package/dist/hooks/useDownload.js +18 -0
- package/dist/hooks/usePopover.d.ts +12 -0
- package/dist/hooks/usePopover.js +24 -0
- package/dist/hooks/useSelected.d.ts +12 -0
- package/dist/hooks/useSelected.js +35 -0
- package/dist/hooks/useServerAction.d.ts +10 -0
- package/dist/hooks/useServerAction.js +17 -0
- package/dist/hooks/useSuccess.d.ts +10 -0
- package/dist/hooks/useSuccess.js +22 -0
- package/dist/mail/Mail/index.d.ts +8 -0
- package/dist/mail/Mail/index.js +108 -0
- package/dist/mail/MailBlock/index.d.ts +5 -0
- package/dist/mail/MailBlock/index.js +5 -0
- package/dist/mail/MailButton/index.d.ts +8 -0
- package/dist/mail/MailButton/index.js +28 -0
- package/dist/mail/MailTable/index.d.ts +9 -0
- package/dist/mail/MailTable/index.js +7 -0
- package/dist/mail/index.d.ts +8 -0
- package/dist/mail/index.js +4 -0
- package/dist/mail/utility/convert-to-datauri.d.ts +2 -0
- package/dist/mail/utility/convert-to-datauri.js +37 -0
- package/dist/mail/utility/interfaces.d.ts +23 -0
- package/dist/mail/utility/mail-config.d.ts +4 -0
- package/dist/mail/utility/mail-config.js +42 -0
- package/dist/navigation/components/AppNavigation/index.d.ts +3 -1
- package/dist/navigation/components/AppNavigation/index.js +4 -4
- package/dist/navigation/components/AppNavigationItem/index.d.ts +5 -3
- package/dist/navigation/components/AppNavigationItem/index.js +16 -7
- package/dist/navigation/components/Tabs/index.js +1 -4
- package/dist/navigation/hooks/useNavigation.d.ts +3 -3
- package/dist/navigation/hooks/useNavigation.js +5 -5
- package/dist/styles/classnames/config.d.ts +93 -0
- package/dist/styles/classnames/config.js +1 -0
- package/dist/styles/classnames/interfaces.d.ts +56 -0
- package/dist/styles/classnames/interfaces.js +1 -0
- package/dist/styles/classnames/utility/apply-sizes.d.ts +3 -0
- package/dist/styles/classnames/utility/apply-sizes.js +21 -0
- package/dist/styles/classnames/utility/apply-variants.d.ts +3 -0
- package/dist/styles/classnames/utility/apply-variants.js +26 -0
- package/dist/styles/classnames/utility/is-classname-object.d.ts +3 -0
- package/dist/styles/classnames/utility/is-classname-object.js +7 -0
- package/dist/styles/classnames/utility/parse-classnames.d.ts +6 -0
- package/dist/styles/classnames/utility/parse-classnames.js +33 -0
- package/dist/styles/context.d.ts +28 -0
- package/dist/styles/context.js +19 -0
- package/dist/styles/icons/config.d.ts +28 -0
- package/dist/styles/icons/config.js +1 -0
- package/dist/styles/icons/interfaces.d.ts +4 -0
- package/dist/styles/icons/interfaces.js +1 -0
- package/dist/styles/index.d.ts +6 -2
- package/dist/styles/index.js +2 -1
- package/dist/styles/styles.css +60 -0
- package/dist/utility/compare-dates.d.ts +2 -0
- package/dist/utility/compare-dates.js +13 -0
- package/dist/utility/get-date-state.d.ts +8 -0
- package/dist/utility/get-date-state.js +63 -0
- package/dist/utility/get-days.d.ts +2 -0
- package/dist/utility/get-days.js +5 -0
- package/dist/utility/get-weeks.d.ts +2 -0
- package/dist/utility/get-weeks.js +31 -0
- package/dist/utility/index.d.ts +1 -1
- package/dist/utility/interfaces.d.ts +33 -17
- package/dist/utility/is-data-object-array.d.ts +3 -0
- package/dist/utility/is-data-object-array.js +5 -0
- package/dist/utility/is-data-object.d.ts +3 -0
- package/dist/utility/is-data-object.js +4 -0
- package/package.json +34 -22
- package/dist/components/buttons/ConfirmableButton/index.d.ts +0 -7
- package/dist/components/buttons/ConfirmableButton/index.js +0 -13
- package/dist/components/collections/utility/filter-columns.d.ts +0 -3
- package/dist/components/collections/utility/filter-columns.js +0 -8
- package/dist/components/collections/utility/get-selected-from-search-params.d.ts +0 -2
- package/dist/components/collections/utility/get-selected-from-search-params.js +0 -5
- package/dist/components/collections/utility/set-selected-to-search-params.d.ts +0 -2
- package/dist/components/collections/utility/set-selected-to-search-params.js +0 -4
- package/dist/components/utility/ClassNames/index.d.ts +0 -6
- package/dist/components/utility/ClassNames/index.js +0 -7
- package/dist/components/utility/Page/index.d.ts +0 -18
- package/dist/components/utility/Page/index.js +0 -34
- package/dist/components/utility/RootLayout/index.d.ts +0 -15
- package/dist/components/utility/RootLayout/index.js +0 -14
- package/dist/forms/components/MoneyInput/index.d.ts +0 -5
- package/dist/styles/config.d.ts +0 -64
- package/dist/styles/config.js +0 -43
- package/dist/styles/icons.d.ts +0 -15
- package/dist/styles/icons.js +0 -7
- package/dist/styles/interfaces.d.ts +0 -41
- /package/dist/{styles → mail/utility}/interfaces.js +0 -0
- /package/dist/styles/{tw.d.ts → classnames/utility/tw.d.ts} +0 -0
- /package/dist/styles/{tw.js → classnames/utility/tw.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const DAYS_IN_WEEK = 7;
|
|
2
|
+
const SUNDAY = 6;
|
|
3
|
+
// Most date libraries start the week on Sunday (US). We want to start on Monday (UK).
|
|
4
|
+
function adjustDayOfWeek(num) {
|
|
5
|
+
return num === 0 ? SUNDAY : num - 1;
|
|
6
|
+
}
|
|
7
|
+
function getWeeks(date) {
|
|
8
|
+
const firstDay = new Date(date);
|
|
9
|
+
firstDay.setDate(1);
|
|
10
|
+
const firstDayofMonth = adjustDayOfWeek(firstDay.getDay());
|
|
11
|
+
const daysInMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
12
|
+
// First, fill an array with nulls from Monday until whatver day the first of the month is
|
|
13
|
+
const days = Array(firstDayofMonth).fill(null);
|
|
14
|
+
// Now, add subsequential dates to the array until we reach the number of days in the month
|
|
15
|
+
for (let index = 0; index < daysInMonth; index += 1) {
|
|
16
|
+
const dt = new Date(firstDay);
|
|
17
|
+
dt.setDate(dt.getDate() + index);
|
|
18
|
+
days.push(dt);
|
|
19
|
+
}
|
|
20
|
+
// Fill up the array with nulls until it's a multiple of 7
|
|
21
|
+
while (days.length % DAYS_IN_WEEK) {
|
|
22
|
+
days.push(null);
|
|
23
|
+
}
|
|
24
|
+
// Split the array into 7s, to create a multidimensional array of weeks and days in those weeks
|
|
25
|
+
const weeks = [];
|
|
26
|
+
for (let index = 0; index < days.length; index += DAYS_IN_WEEK) {
|
|
27
|
+
weeks.push(days.slice(index, index + DAYS_IN_WEEK));
|
|
28
|
+
}
|
|
29
|
+
return weeks;
|
|
30
|
+
}
|
|
31
|
+
export default getWeeks;
|
package/dist/utility/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type * from './interfaces';
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { UseSuccessArgs } from '../hooks/useSuccess';
|
|
2
|
+
export type ActionEvent = React.MouseEvent<HTMLAnchorElement> | React.MouseEvent<HTMLButtonElement>;
|
|
3
|
+
export interface SimpleActionObject {
|
|
4
|
+
details?: React.ReactNode;
|
|
5
|
+
href?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
isSubmittable?: boolean;
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
onClick?: (event?: ActionEvent) => void;
|
|
12
|
+
searchParams?: Record<string, string>;
|
|
13
|
+
variant?: StyleVariant[] | StyleVariant;
|
|
14
|
+
}
|
|
15
|
+
export interface ActionObject<Data, Response> extends SimpleActionObject, UseSuccessArgs<Response> {
|
|
16
|
+
action?: (data: Data) => Promise<Response>;
|
|
17
|
+
confirmable?: ConfirmableObject<Data, Response>;
|
|
18
|
+
data?: Data;
|
|
19
|
+
}
|
|
20
|
+
export interface ConfirmableObject<Data, Response> extends UseSuccessArgs<Response> {
|
|
21
|
+
actions?: Omit<ActionObject<Data, Response>, 'confirmable'>[];
|
|
3
22
|
confirmText?: string;
|
|
4
23
|
description?: React.ReactNode;
|
|
5
24
|
icon?: React.ReactNode;
|
|
6
25
|
isLoading?: boolean;
|
|
7
26
|
modalIcon?: React.ReactNode;
|
|
8
27
|
onBeforeConfirm?: () => void;
|
|
9
|
-
onConfirm
|
|
28
|
+
onConfirm?: () => void;
|
|
10
29
|
submitLabel?: string;
|
|
11
|
-
title?:
|
|
30
|
+
title?: React.ReactNode;
|
|
12
31
|
}
|
|
13
|
-
export interface
|
|
14
|
-
action?: string;
|
|
15
|
-
confirmable?: ConfirmableObject;
|
|
16
|
-
details?: React.ReactNode;
|
|
17
|
-
href?: string;
|
|
18
|
-
icon?: React.ReactNode;
|
|
19
|
-
isDisabled?: boolean;
|
|
20
|
-
isLoading?: boolean;
|
|
21
|
-
isSubmittable?: boolean;
|
|
32
|
+
export interface DataObject {
|
|
22
33
|
label: React.ReactNode;
|
|
23
|
-
|
|
24
|
-
variant?: ButtonVariant;
|
|
34
|
+
value: React.ReactNode;
|
|
25
35
|
}
|
|
26
36
|
export interface NextLayoutProps {
|
|
27
37
|
children: React.ReactNode;
|
|
@@ -31,5 +41,11 @@ export interface NextPageProps {
|
|
|
31
41
|
params?: Promise<Record<string, string>> | null;
|
|
32
42
|
searchParams?: Promise<Record<string, string>> | null;
|
|
33
43
|
}
|
|
34
|
-
export type
|
|
35
|
-
|
|
44
|
+
export type ReferenceObject = {
|
|
45
|
+
id?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
path?: string;
|
|
48
|
+
reference?: string;
|
|
49
|
+
};
|
|
50
|
+
export type SizeVariant = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
|
|
51
|
+
export type StyleVariant = 'bordered' | 'danger' | 'error' | 'hollow' | 'info' | 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning';
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.71",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "ISC",
|
|
8
8
|
"exports": {
|
|
9
|
+
"./addon": {
|
|
10
|
+
"types": "./dist/addon/index.d.ts",
|
|
11
|
+
"default": "./dist/addon/index.js"
|
|
12
|
+
},
|
|
9
13
|
"./components": {
|
|
10
14
|
"types": "./dist/components/index.d.ts",
|
|
11
15
|
"default": "./dist/components/index.js"
|
|
@@ -22,6 +26,10 @@
|
|
|
22
26
|
"types": "./dist/hooks/index.d.ts",
|
|
23
27
|
"default": "./dist/hooks/index.js"
|
|
24
28
|
},
|
|
29
|
+
"./mail": {
|
|
30
|
+
"types": "./dist/mail/index.d.ts",
|
|
31
|
+
"default": "./dist/mail/index.js"
|
|
32
|
+
},
|
|
25
33
|
"./navigation": {
|
|
26
34
|
"types": "./dist/navigation/index.d.ts",
|
|
27
35
|
"default": "./dist/navigation/index.js"
|
|
@@ -30,6 +38,9 @@
|
|
|
30
38
|
"types": "./dist/styles/index.d.ts",
|
|
31
39
|
"default": "./dist/styles/index.js"
|
|
32
40
|
},
|
|
41
|
+
"./styles.css": {
|
|
42
|
+
"default": "./dist/styles/styles.css"
|
|
43
|
+
},
|
|
33
44
|
"./utility": {
|
|
34
45
|
"types": "./dist/utility/index.d.ts",
|
|
35
46
|
"default": "./dist/utility/index.js"
|
|
@@ -40,39 +51,40 @@
|
|
|
40
51
|
],
|
|
41
52
|
"dependencies": {
|
|
42
53
|
"clsx": "^2.1.1",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"react
|
|
46
|
-
"
|
|
54
|
+
"drizzle-orm": "^0.45.2",
|
|
55
|
+
"next": "^16.2.10",
|
|
56
|
+
"react": "^19.2.7",
|
|
57
|
+
"react-dom": "^19.2.7",
|
|
58
|
+
"tailwind-merge": "^3.6.0",
|
|
47
59
|
"use-deep-compare-effect": "^1.8.1",
|
|
48
|
-
"@sqrzro/
|
|
60
|
+
"@sqrzro/addons": "^4.0.0-alpha.13",
|
|
61
|
+
"@sqrzro/utility": "^4.0.0-alpha.20"
|
|
49
62
|
},
|
|
50
63
|
"devDependencies": {
|
|
51
|
-
"@storybook/addon-a11y": "^10.
|
|
52
|
-
"@storybook/addon-docs": "^10.
|
|
53
|
-
"@storybook/nextjs": "^10.
|
|
54
|
-
"@testing-library/react": "^16.3.
|
|
64
|
+
"@storybook/addon-a11y": "^10.5.0",
|
|
65
|
+
"@storybook/addon-docs": "^10.5.0",
|
|
66
|
+
"@storybook/nextjs": "^10.5.0",
|
|
67
|
+
"@testing-library/react": "^16.3.2",
|
|
55
68
|
"@testing-library/user-event": "^14.6.1",
|
|
56
|
-
"@types/react": "^19.2.
|
|
69
|
+
"@types/react": "^19.2.17",
|
|
57
70
|
"@types/react-dom": "^19.2.3",
|
|
58
|
-
"concurrently": "^9.2.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"rimraf": "^6.1.
|
|
62
|
-
"storybook": "^10.
|
|
63
|
-
"tsc-alias": "^1.
|
|
71
|
+
"concurrently": "^9.2.4",
|
|
72
|
+
"cpx": "^1.5.0",
|
|
73
|
+
"next-router-mock": "^1.0.5",
|
|
74
|
+
"rimraf": "^6.1.3",
|
|
75
|
+
"storybook": "^10.5.0",
|
|
76
|
+
"tsc-alias": "^1.9.1",
|
|
64
77
|
"tslib": "^2.8.1",
|
|
65
|
-
"typescript": "^5.9.3"
|
|
66
|
-
"@sqrzro/prettier-config": "^4.0.0-alpha.1"
|
|
78
|
+
"typescript": "^5.9.3"
|
|
67
79
|
},
|
|
68
80
|
"scripts": {
|
|
69
|
-
"build": "pnpm clean && tsc -p tsconfig.build.json && tsc-alias",
|
|
81
|
+
"build": "pnpm clean && tsc -p tsconfig.build.json && tsc-alias && pnpm build:css",
|
|
82
|
+
"build:css": "cpx \"./src/**/*.css\" ./dist",
|
|
70
83
|
"clean": "rimraf ./dist",
|
|
71
|
-
"dev": "(concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc-alias -w\")",
|
|
84
|
+
"dev": "pnpm build:css && (concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc-alias -w\")",
|
|
72
85
|
"docs:start": "storybook dev -p 6006",
|
|
73
86
|
"docs:build": "storybook build",
|
|
74
87
|
"lint": "tsc --noEmit && eslint \"./src/**/*.ts\"",
|
|
75
|
-
"prettier": "prettier --write \"./src/**/*.tsx\" \"./src/**/*.ts\"",
|
|
76
88
|
"start": "pnpm dev"
|
|
77
89
|
}
|
|
78
90
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ConfirmableObject } from '../../../utility/interfaces';
|
|
2
|
-
import type { ButtonProps } from '../Button';
|
|
3
|
-
export type ConfirmableButtonProps = ButtonProps & {
|
|
4
|
-
confirmable: ConfirmableObject;
|
|
5
|
-
};
|
|
6
|
-
declare function ConfirmableButton({ confirmable, ...buttonProps }: Readonly<ConfirmableButtonProps>): React.ReactElement;
|
|
7
|
-
export default ConfirmableButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Fragment } from 'react';
|
|
4
|
-
import Button from '../Button';
|
|
5
|
-
function ConfirmableButton({ confirmable, ...buttonProps }) {
|
|
6
|
-
// const { handle, modalProps } = useConfirmable<HTMLButtonElement>({
|
|
7
|
-
// isLoading,
|
|
8
|
-
// onBeforeConfirm,
|
|
9
|
-
// onConfirm: (event) => onClick?.(event),
|
|
10
|
-
// });
|
|
11
|
-
return (_jsx(Fragment, { children: _jsx(Button, { ...buttonProps, icon: confirmable.icon, isLoading: confirmable.isLoading }) }));
|
|
12
|
-
}
|
|
13
|
-
export default ConfirmableButton;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { NavigationObject } from '../../../navigation/interfaces';
|
|
3
|
-
import type { NextPageProps } from '../../../utility/interfaces';
|
|
4
|
-
interface PageTemplateProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
tabs: NavigationObject[] | null;
|
|
7
|
-
title: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export interface PageProps<T> {
|
|
10
|
-
readonly children: React.ReactNode | ((data: T) => React.ReactNode);
|
|
11
|
-
readonly fn?: (params?: Promise<Record<string, string>> | null) => Promise<T>;
|
|
12
|
-
readonly pageProps?: NextPageProps;
|
|
13
|
-
readonly tabs?: NavigationObject[] | ((data: T) => NavigationObject[] | null);
|
|
14
|
-
readonly template?: (props: PageTemplateProps) => React.ReactElement;
|
|
15
|
-
readonly title?: React.ReactNode | ((data: T) => React.ReactNode);
|
|
16
|
-
}
|
|
17
|
-
declare function Page<T>(props: PageProps<T>): React.ReactElement;
|
|
18
|
-
export default Page;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense } from 'react';
|
|
3
|
-
function getChildren(props, data) {
|
|
4
|
-
if (typeof props.children === 'function') {
|
|
5
|
-
return data ? props.children(data) : null;
|
|
6
|
-
}
|
|
7
|
-
return props.children;
|
|
8
|
-
}
|
|
9
|
-
function getTabs(props, data) {
|
|
10
|
-
if (typeof props.tabs === 'function') {
|
|
11
|
-
return data ? props.tabs(data) : null;
|
|
12
|
-
}
|
|
13
|
-
return props.tabs ?? null;
|
|
14
|
-
}
|
|
15
|
-
function getTitle(props, data) {
|
|
16
|
-
if (typeof props.title === 'function') {
|
|
17
|
-
return data ? props.title(data) : null;
|
|
18
|
-
}
|
|
19
|
-
return props.title;
|
|
20
|
-
}
|
|
21
|
-
async function PageComponent(props) {
|
|
22
|
-
const data = props.fn ? await props.fn(props.pageProps?.params) : null;
|
|
23
|
-
const children = getChildren(props, data);
|
|
24
|
-
const tabs = getTabs(props, data);
|
|
25
|
-
const title = getTitle(props, data);
|
|
26
|
-
if (props.template) {
|
|
27
|
-
return props.template({ children, tabs, title });
|
|
28
|
-
}
|
|
29
|
-
return children;
|
|
30
|
-
}
|
|
31
|
-
function Page(props) {
|
|
32
|
-
return (_jsx(Suspense, { fallback: props.template?.({ children: null, tabs: null, title: '•••' }), children: _jsx(PageComponent, { ...props }) }));
|
|
33
|
-
}
|
|
34
|
-
export default Page;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type RegisteredClassNames } from '../../../styles/config';
|
|
2
|
-
import type { ClassNameProps } from '../../../styles/interfaces';
|
|
3
|
-
export interface RootLayoutClassNames {
|
|
4
|
-
root: string;
|
|
5
|
-
content: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RootLayoutProps extends ClassNameProps<RootLayoutClassNames> {
|
|
8
|
-
readonly children: React.ReactNode;
|
|
9
|
-
readonly classNameConfig?: RegisteredClassNames;
|
|
10
|
-
readonly font?: {
|
|
11
|
-
variable: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
declare function RootLayout({ children, classNameConfig, classNameProps, classNames, font, }: RootLayoutProps): React.ReactElement;
|
|
15
|
-
export default RootLayout;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getClassNames, registerClassNames } from '../../../styles/config';
|
|
3
|
-
import ClassNames from '../ClassNames';
|
|
4
|
-
import Toaster from '../Toaster';
|
|
5
|
-
function RootLayout({ children, classNameConfig, classNameProps, classNames, font, }) {
|
|
6
|
-
if (classNameConfig) {
|
|
7
|
-
registerClassNames(classNameConfig);
|
|
8
|
-
}
|
|
9
|
-
const componentClassNames = classNames || getClassNames('rootLayout')?.(classNameProps);
|
|
10
|
-
return (_jsxs("html", { lang: "en", className: font?.variable, children: [_jsx("head", { children: _jsx("link", { href: "/images/favicon.svg", rel: "icon" }) }), _jsxs("body", { className: componentClassNames?.root, children: [_jsx("script", { dangerouslySetInnerHTML: {
|
|
11
|
-
__html: "(function(d){var v=d.createElement('div'),t=d.createElement('style'),s=v.style;s.overflowY='scroll';s.width='50';s.height='50';d.body.append(v);t.innerHTML='body:has([data-modal][open]){padding-right:'+(v.offsetWidth-v.clientWidth)+'px}';d.body.append(t);v.remove()}(document))",
|
|
12
|
-
} }), classNameConfig ? _jsx(ClassNames, { data: classNameConfig }) : null, _jsx("div", { className: componentClassNames?.content, children: children }), _jsx(Toaster, {})] })] }));
|
|
13
|
-
}
|
|
14
|
-
export default RootLayout;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { NumberInputComponentProps, NumberInputProps } from '../NumberInput';
|
|
2
|
-
export type MoneyInputComponentProps = NumberInputComponentProps;
|
|
3
|
-
export type MoneyInputProps = NumberInputProps;
|
|
4
|
-
declare function MoneyInput({ name, onChange, prefix, value, ...props }: Readonly<MoneyInputProps>): React.ReactElement;
|
|
5
|
-
export default MoneyInput;
|
package/dist/styles/config.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { ButtonClassNames } from '../components/buttons/Button';
|
|
2
|
-
import type { TextButtonClassNames } from '../components/buttons/TextButton';
|
|
3
|
-
import type { EmptyMessageClassNames } from '../components/collections/EmptyMessage';
|
|
4
|
-
import type { ListItemClassNames } from '../components/collections/ListItem';
|
|
5
|
-
import type { ListItemMetaClassNames } from '../components/collections/ListItemMeta';
|
|
6
|
-
import type { PaginationClassNames } from '../components/collections/Pagination';
|
|
7
|
-
import type { TableClassNames } from '../components/collections/Table';
|
|
8
|
-
import type { ModalClassNames } from '../components/modals/Modal';
|
|
9
|
-
import type { ActionListClassNames } from '../components/utility/ActionList';
|
|
10
|
-
import type { ContainerClassNames } from '../components/utility/Container';
|
|
11
|
-
import type { LinkClassNames } from '../components/utility/Link';
|
|
12
|
-
import type { LoaderClassNames } from '../components/utility/Loader';
|
|
13
|
-
import type { PopoverClassNames } from '../components/utility/Popover';
|
|
14
|
-
import type { RootLayoutClassNames } from '../components/utility/RootLayout';
|
|
15
|
-
import type { ToastClassNames } from '../components/utility/Toast';
|
|
16
|
-
import type { FilterBarClassNames } from '../filters/components/FilterBar';
|
|
17
|
-
import type { FilterItemClassNames } from '../filters/components/FilterItem';
|
|
18
|
-
import type { FilterPanelClassNames } from '../filters/components/FilterPanel';
|
|
19
|
-
import type { DropdownClassNames } from '../forms/components/Dropdown';
|
|
20
|
-
import type { EditableFormClassNames } from '../forms/components/EditableForm';
|
|
21
|
-
import type { EditableFormFieldClassNames } from '../forms/components/EditableFormField';
|
|
22
|
-
import type { FormClassNames } from '../forms/components/Form';
|
|
23
|
-
import type { FormFieldClassNames } from '../forms/components/FormField';
|
|
24
|
-
import type { PasswordInputClassNames } from '../forms/components/PasswordInput';
|
|
25
|
-
import type { StaticTextInputClassNames } from '../forms/components/StaticTextInput';
|
|
26
|
-
import type { SwitchClassNames } from '../forms/components/Switch';
|
|
27
|
-
import type { TextInputClassNames } from '../forms/components/TextInput';
|
|
28
|
-
import type { AppNavigationClassNames } from '../navigation/components/AppNavigation';
|
|
29
|
-
import type { TabsClassNames } from '../navigation/components/Tabs';
|
|
30
|
-
type ComponentClassNames<T> = Partial<T>;
|
|
31
|
-
export interface RegisteredClassNames {
|
|
32
|
-
actionList?: ComponentClassNames<ActionListClassNames>;
|
|
33
|
-
appNavigation?: ComponentClassNames<AppNavigationClassNames>;
|
|
34
|
-
button?: ComponentClassNames<ButtonClassNames>;
|
|
35
|
-
container?: ComponentClassNames<ContainerClassNames>;
|
|
36
|
-
dropdown?: ComponentClassNames<DropdownClassNames>;
|
|
37
|
-
editableForm?: ComponentClassNames<EditableFormClassNames>;
|
|
38
|
-
editableFormField?: ComponentClassNames<EditableFormFieldClassNames>;
|
|
39
|
-
emptyMessage?: ComponentClassNames<EmptyMessageClassNames>;
|
|
40
|
-
filterBar?: ComponentClassNames<FilterBarClassNames>;
|
|
41
|
-
filterItem?: ComponentClassNames<FilterItemClassNames>;
|
|
42
|
-
filterPanel?: ComponentClassNames<FilterPanelClassNames>;
|
|
43
|
-
form?: ComponentClassNames<FormClassNames>;
|
|
44
|
-
formField?: ComponentClassNames<FormFieldClassNames>;
|
|
45
|
-
link?: ComponentClassNames<LinkClassNames>;
|
|
46
|
-
listItem?: ComponentClassNames<ListItemClassNames>;
|
|
47
|
-
listItemMeta?: ComponentClassNames<ListItemMetaClassNames>;
|
|
48
|
-
loader?: ComponentClassNames<LoaderClassNames>;
|
|
49
|
-
modal?: ComponentClassNames<ModalClassNames>;
|
|
50
|
-
pagination?: ComponentClassNames<PaginationClassNames>;
|
|
51
|
-
passwordInput?: ComponentClassNames<PasswordInputClassNames>;
|
|
52
|
-
popover?: ComponentClassNames<PopoverClassNames>;
|
|
53
|
-
rootLayout?: ComponentClassNames<RootLayoutClassNames>;
|
|
54
|
-
staticTextInput?: ComponentClassNames<StaticTextInputClassNames>;
|
|
55
|
-
switch?: ComponentClassNames<SwitchClassNames>;
|
|
56
|
-
table?: ComponentClassNames<TableClassNames>;
|
|
57
|
-
tabs?: ComponentClassNames<TabsClassNames>;
|
|
58
|
-
textButton?: ComponentClassNames<TextButtonClassNames>;
|
|
59
|
-
textInput?: ComponentClassNames<TextInputClassNames>;
|
|
60
|
-
toast?: ComponentClassNames<ToastClassNames>;
|
|
61
|
-
}
|
|
62
|
-
export declare function registerClassNames(data: RegisteredClassNames): void;
|
|
63
|
-
export declare function getClassNames<K extends keyof RegisteredClassNames>(componentName: K): (props?: Record<string, unknown>) => RegisteredClassNames[K];
|
|
64
|
-
export {};
|
package/dist/styles/config.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// import type { ActionListClassNames } from '../elements/ActionList';
|
|
2
|
-
// import type { AppNavigationClassNames } from '../navigation/components/AppNavigation';
|
|
3
|
-
// import type { BadgeClassNames } from '../elements/Badge';
|
|
4
|
-
// import type { CalendarClassNames } from '../forms/Calendar';
|
|
5
|
-
// import type { CalendarInputClassNames } from '../forms/CalendarInput';
|
|
6
|
-
// import type { CalendarNavigationClassNames } from '../forms/CalendarNavigation';
|
|
7
|
-
// import type { CheckboxInputClassNames } from '../forms/CheckboxInput';
|
|
8
|
-
// import type { CodeInputClassNames } from '../forms/CodeInput';
|
|
9
|
-
// import type { ColorInputClassNames } from '../forms/ColorInput';
|
|
10
|
-
// import type { CSVInputClassNames } from '../forms/CSVInput';
|
|
11
|
-
// import type { DefinitionListClassNames } from '../elements/DefinitionList';
|
|
12
|
-
// import type { DropdownClassNames } from '../forms/Dropdown';
|
|
13
|
-
// import type { EditableFormClassNames } from '../forms/EditableForm';
|
|
14
|
-
// import type { EditableFormFieldClassNames } from '../forms/EditableFormField';
|
|
15
|
-
// import type { FieldsetClassNames } from '../forms/Fieldset';
|
|
16
|
-
// import type { FilterBarClassNames } from '../filters/components/FilterBar';
|
|
17
|
-
// import type { FilterItemClassNames } from '../filters/components/FilterItem';
|
|
18
|
-
// import type { FilterPanelClassNames } from '../filters/components/FilterPanel';
|
|
19
|
-
// import type { FormClassNames } from '../forms/Form';
|
|
20
|
-
// import type { ImageInputClassNames } from '../forms/ImageInput';
|
|
21
|
-
// import type { InfoPanelClassNames } from '../elements/InfoPanel';
|
|
22
|
-
// import type { ListMenuClassNames } from '../lists/ListMenu';
|
|
23
|
-
// import type { ListMenuButtonClassNames } from '../lists/ListMenuButton';
|
|
24
|
-
// import type { LoadingModalClassNames } from '../modals/LoadingModal';
|
|
25
|
-
// import type { ModalClassNames } from '../modals/Modal';
|
|
26
|
-
// import type { MultiInputClassNames } from '../forms/MultiInput';
|
|
27
|
-
// import type { ObjectInputClassNames } from '../forms/ObjectInput';
|
|
28
|
-
// import type { RadioInputClassNames } from '../forms/RadioInput';
|
|
29
|
-
// import type { StaticTextInputClassNames } from '../forms/StaticTextInput';
|
|
30
|
-
// import type { SwitchClassNames } from '../forms/Switch';
|
|
31
|
-
// import type { PasswordInputClassNames } from '../forms/PasswordInput';
|
|
32
|
-
// import type { TableClassNames } from '../tables/Table';
|
|
33
|
-
// import type { TextAreaClassNames } from '../forms/TextArea';
|
|
34
|
-
// import type { TextInputClassNames } from '../forms/TextInput';
|
|
35
|
-
// import type { ToastClassNames } from '../elements/Toast';
|
|
36
|
-
// import type { TooltipClassNames } from '../elements/Tooltip';
|
|
37
|
-
let registeredClassNames = {};
|
|
38
|
-
export function registerClassNames(data) {
|
|
39
|
-
registeredClassNames = { ...registeredClassNames, ...data };
|
|
40
|
-
}
|
|
41
|
-
export function getClassNames(componentName) {
|
|
42
|
-
return () => registeredClassNames[componentName];
|
|
43
|
-
}
|
package/dist/styles/icons.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type IconComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> & {
|
|
2
|
-
title?: string;
|
|
3
|
-
titleId?: string;
|
|
4
|
-
} & React.RefAttributes<SVGSVGElement>>;
|
|
5
|
-
export interface RegisteredIcons {
|
|
6
|
-
'collection.empty'?: IconComponent;
|
|
7
|
-
'filter.panel'?: IconComponent;
|
|
8
|
-
'filter.search'?: IconComponent;
|
|
9
|
-
password?: IconComponent;
|
|
10
|
-
'utility.success'?: IconComponent;
|
|
11
|
-
'utility.error'?: IconComponent;
|
|
12
|
-
}
|
|
13
|
-
export declare function registerIcons(data: RegisteredIcons): void;
|
|
14
|
-
export declare function getIcon(componentName: keyof RegisteredIcons): IconComponent | null;
|
|
15
|
-
export {};
|
package/dist/styles/icons.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ButtonVariant, StyleVariant } from "../utility/interfaces";
|
|
2
|
-
export interface ClassNameProps<T> {
|
|
3
|
-
classNames?: Partial<T>;
|
|
4
|
-
classNameProps?: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export interface CheckableClassName {
|
|
7
|
-
default?: string;
|
|
8
|
-
checked?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ErrorableClassName {
|
|
11
|
-
default?: string;
|
|
12
|
-
error?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface FocusableClassName {
|
|
15
|
-
default?: string;
|
|
16
|
-
focused?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface HighlightableClassName {
|
|
19
|
-
default?: string;
|
|
20
|
-
highlighted?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface LoadableClassName {
|
|
23
|
-
default?: string;
|
|
24
|
-
loading?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface SelectableClassName {
|
|
27
|
-
default?: string;
|
|
28
|
-
selected?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface SizableClassName {
|
|
31
|
-
default?: string;
|
|
32
|
-
lg?: string;
|
|
33
|
-
md?: string;
|
|
34
|
-
sm?: string;
|
|
35
|
-
}
|
|
36
|
-
export type StylableClassName = Partial<Record<StyleVariant, string>> & {
|
|
37
|
-
default?: string;
|
|
38
|
-
};
|
|
39
|
-
export type StylableButtonClassName = Partial<Record<ButtonVariant, string>> & {
|
|
40
|
-
default?: string;
|
|
41
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|