uikit-react-public 0.11.20 → 0.14.21
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/Badge/Badge.d.ts +6 -0
- package/dist/components/Badge/Badge.stories.d.ts +15 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Calendar/Calendar.d.ts +3 -0
- package/dist/components/Calendar/Calendar.stories.d.ts +42 -0
- package/dist/components/Calendar/Calendar.types.d.ts +18 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/subcomponents/AcademicWeeks.d.ts +7 -0
- package/dist/components/Calendar/subcomponents/ColumnHeading.d.ts +7 -0
- package/dist/components/Calendar/subcomponents/Controls.d.ts +6 -0
- package/dist/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.d.ts +3 -3
- package/dist/components/{Datepicker → Calendar}/subcomponents/EventDot.d.ts +2 -2
- package/dist/components/Calendar/subcomponents/Grid.d.ts +11 -0
- package/dist/components/Calendar/subcomponents/index.d.ts +7 -0
- package/dist/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.d.ts +1 -1
- package/dist/components/Calendar/utils/index.d.ts +4 -0
- package/dist/components/Calendar/utils/normaliseMonth/normaliseMonth.d.ts +9 -0
- package/dist/components/Calendar/utils/parseDateFromString/parseDateFromString.d.ts +9 -0
- package/dist/components/Calendar/utils/parseDateFromString/parseDateFromString.test.d.ts +1 -0
- package/dist/components/CookieNotice/CookieNotice.d.ts +16 -0
- package/dist/components/CookieNotice/index.d.ts +2 -0
- package/dist/components/Datepicker/Datepicker.d.ts +3 -16
- package/dist/components/Datepicker/Datepicker.stories.d.ts +9 -3
- package/dist/components/Datepicker/Datepicker.types.d.ts +23 -7
- package/dist/components/Datepicker/index.d.ts +1 -2
- package/dist/components/Datepicker/subcomponents/CustomDatepicker.d.ts +17 -0
- package/dist/components/Datepicker/subcomponents/DatepickerInput.d.ts +10 -0
- package/dist/components/Datepicker/subcomponents/NativeDatepicker.d.ts +6 -0
- package/dist/components/Datepicker/subcomponents/Panel.d.ts +6 -0
- package/dist/components/Datepicker/subcomponents/VisibleField.d.ts +12 -0
- package/dist/components/Datepicker/subcomponents/index.d.ts +5 -7
- package/dist/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.d.ts +17 -0
- package/dist/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts +1 -0
- package/dist/components/Datepicker/utils/index.d.ts +2 -3
- package/dist/components/Datepicker/utils/parseInputValue/parseInputValue.d.ts +11 -0
- package/dist/components/Datepicker/utils/parseInputValue/parseInputValue.test.d.ts +1 -0
- package/dist/components/Dialog/BaseDialog.d.ts +7 -2
- package/dist/components/FileInput/FileInput.d.ts +8 -0
- package/dist/components/FileInput/FileInput.stories.d.ts +16 -0
- package/dist/components/FileInput/__tests__/FileInput.test.d.ts +1 -0
- package/dist/components/FileInput/index.d.ts +2 -0
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Header/Header.d.ts +4 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Link/BaseLink.d.ts +10 -0
- package/dist/components/Link/Link.d.ts +5 -10
- package/dist/components/Link/Link.stories.d.ts +1 -1
- package/dist/components/Link/index.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -1
- package/dist/components/Menu/MenuContent.d.ts +2 -1
- package/dist/components/Menu/MenuItem.d.ts +2 -0
- package/dist/components/Menu/MenuSection.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +16 -0
- package/dist/components/Search/Search.stories.d.ts +34 -0
- package/dist/components/Search/__tests__/Search.test.d.ts +1 -0
- package/dist/components/Search/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +3 -7
- package/dist/components/Select/Select.types.d.ts +19 -14
- package/dist/components/Select/subcomponents/CustomOption.d.ts +1 -1
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +1 -2
- package/dist/components/Select/subcomponents/Panel.d.ts +1 -1
- package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -4
- package/dist/components/StandaloneLink/StandaloneLink.d.ts +12 -0
- package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +13 -0
- package/dist/components/StandaloneLink/__tests__/StandaloneLink.test.d.ts +1 -0
- package/dist/components/StandaloneLink/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +10 -8
- package/dist/components/Table/Table.stories.d.ts +21 -0
- package/dist/components/Table/Table.types.d.ts +11 -0
- package/dist/components/Table/__tests__/Table.test.d.ts +1 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/subcomponents/Body.d.ts +4 -0
- package/dist/components/Table/subcomponents/Cell/Cell.d.ts +12 -0
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +313 -0
- package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +10 -0
- package/dist/components/Table/subcomponents/Cell/__tests__/Cell.test.d.ts +1 -0
- package/dist/components/Table/subcomponents/Head.d.ts +4 -0
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +13 -0
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +312 -0
- package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +10 -0
- package/dist/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.d.ts +1 -0
- package/dist/components/Table/subcomponents/Row.d.ts +5 -0
- package/dist/components/Table/subcomponents/SortIcon.d.ts +7 -0
- package/dist/components/Table/subcomponents/index.d.ts +10 -0
- package/dist/components/Tabs/Tab.d.ts +1 -1
- package/dist/components/Tabs/TabContext.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +3 -0
- package/dist/components/Timepicker/Timepicker.d.ts +10 -0
- package/dist/components/Timepicker/Timepicker.stories.d.ts +7 -0
- package/dist/components/Timepicker/__tests__/Timepicker.test.d.ts +1 -0
- package/dist/components/Timepicker/index.d.ts +2 -0
- package/dist/components/Timepicker/utils/convertDateToTimeString.d.ts +2 -0
- package/dist/components/Timepicker/utils/convertDateToTimeString.test.d.ts +1 -0
- package/dist/components/Timepicker/utils/index.d.ts +1 -0
- package/dist/components/WeekPicker/WeekPicker.d.ts +3 -0
- package/dist/components/WeekPicker/index.d.ts +1 -0
- package/dist/components/WeekPicker/subcomponents/CustomDatepicker.d.ts +17 -0
- package/dist/components/WeekPicker/subcomponents/DatepickerInput.d.ts +13 -0
- package/dist/components/WeekPicker/subcomponents/VisibleField.d.ts +15 -0
- package/dist/components/WeekPicker/subcomponents/index.d.ts +3 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useFocusTrap.d.ts +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6006 -4599
- package/dist/theme/defaultTheme.d.ts +7 -0
- package/dist/theme/useTheme.d.ts +14 -0
- package/dist/utils/__tests__/capitalise.test.d.ts +1 -0
- package/dist/utils/capitalise.d.ts +2 -0
- package/lib/components/Alert/Alert.tsx +7 -1
- package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +4 -0
- package/lib/components/Badge/Badge.stories.tsx +19 -0
- package/lib/components/Badge/Badge.tsx +48 -0
- package/lib/components/Badge/index.ts +2 -0
- package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +4 -4
- package/lib/components/Button/Button.tsx +5 -2
- package/lib/components/Calendar/Calendar.stories.tsx +209 -0
- package/lib/components/Calendar/Calendar.tsx +121 -0
- package/lib/components/Calendar/Calendar.types.ts +21 -0
- package/lib/components/Calendar/__tests__/Calendar.test.tsx +71 -0
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +1218 -0
- package/lib/components/Calendar/index.ts +6 -0
- package/lib/components/{Datepicker → Calendar}/subcomponents/AcademicWeek.tsx +1 -1
- package/lib/components/{Datepicker → Calendar}/subcomponents/AcademicWeeks.tsx +9 -7
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +40 -0
- package/lib/components/{Datepicker/subcomponents/MonthSelector/MonthSelector.tsx → Calendar/subcomponents/Controls.tsx} +17 -17
- package/lib/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.stories.tsx +8 -8
- package/lib/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.tsx +28 -16
- package/lib/components/{Datepicker → Calendar}/subcomponents/EventDot.tsx +3 -3
- package/lib/components/Calendar/subcomponents/Grid.tsx +116 -0
- package/lib/components/Calendar/subcomponents/index.ts +7 -0
- package/lib/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.test.ts +1 -1
- package/lib/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.ts +1 -1
- package/lib/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.test.ts +29 -65
- package/lib/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.ts +11 -43
- package/lib/components/Calendar/utils/index.ts +4 -0
- package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.test.ts +40 -0
- package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.ts +16 -0
- package/lib/components/Calendar/utils/parseDateFromString/parseDateFromString.test.ts +15 -0
- package/lib/components/Calendar/utils/parseDateFromString/parseDateFromString.ts +19 -0
- package/lib/components/CookieNotice/CookieNotice.tsx +114 -0
- package/lib/components/CookieNotice/index.ts +2 -0
- package/lib/components/Datepicker/Datepicker.stories.tsx +128 -64
- package/lib/components/Datepicker/Datepicker.tsx +34 -114
- package/lib/components/Datepicker/Datepicker.types.ts +38 -9
- package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +53 -112
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +92 -747
- package/lib/components/Datepicker/index.ts +1 -2
- package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +209 -0
- package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +74 -0
- package/lib/components/Datepicker/subcomponents/NativeDatepicker.tsx +70 -0
- package/lib/components/Datepicker/subcomponents/Panel.tsx +32 -0
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +104 -0
- package/lib/components/Datepicker/subcomponents/index.ts +5 -7
- package/lib/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.ts +32 -0
- package/lib/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.ts +23 -0
- package/lib/components/Datepicker/utils/index.ts +2 -3
- package/lib/components/Datepicker/utils/parseInputValue/parseInputValue.test.ts +110 -0
- package/lib/components/Datepicker/utils/parseInputValue/parseInputValue.ts +57 -0
- package/lib/components/Dialog/BaseDialog.tsx +44 -4
- package/lib/components/Field/__tests__/Field.test.tsx +148 -148
- package/lib/components/FileInput/FileInput.stories.tsx +70 -0
- package/lib/components/FileInput/FileInput.tsx +68 -0
- package/lib/components/FileInput/__tests__/FileInput.test.tsx +99 -0
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +91 -0
- package/lib/components/FileInput/index.ts +2 -0
- package/lib/components/Footer/Footer.tsx +3 -3
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +31 -31
- package/lib/components/Header/Header.tsx +19 -2
- package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +4 -4
- package/lib/components/Heading/Documentation.mdx +1 -1
- package/lib/components/Heading/Heading.tsx +1 -1
- package/lib/components/Heading/__tests__/Heading.test.tsx +7 -19
- package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +7 -7
- package/lib/components/Label/Label.tsx +0 -2
- package/lib/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +7 -7
- package/lib/components/Link/BaseLink.tsx +84 -0
- package/lib/components/Link/Link.tsx +72 -32
- package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +3 -3
- package/lib/components/Link/__tests__/link.test.tsx +6 -13
- package/lib/components/Link/index.ts +1 -1
- package/lib/components/Menu/Menu.context.tsx +3 -1
- package/lib/components/Menu/Menu.tsx +5 -2
- package/lib/components/Menu/MenuContent.tsx +9 -6
- package/lib/components/Menu/MenuItem.tsx +20 -3
- package/lib/components/Menu/MenuSection.tsx +4 -3
- package/lib/components/Pagination/PaginationControls.tsx +1 -3
- package/lib/components/Search/Search.stories.tsx +41 -0
- package/lib/components/Search/Search.tsx +167 -0
- package/lib/components/Search/__tests__/Search.test.tsx +94 -0
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +179 -0
- package/lib/components/Search/index.ts +2 -0
- package/lib/components/Select/Select.stories.tsx +8 -35
- package/lib/components/Select/Select.tsx +2 -2
- package/lib/components/Select/Select.types.ts +20 -15
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +3 -3
- package/lib/components/Select/subcomponents/CustomOption.tsx +22 -9
- package/lib/components/Select/subcomponents/CustomSelect.tsx +31 -20
- package/lib/components/Select/subcomponents/Panel.tsx +4 -5
- package/lib/components/Select/subcomponents/VisibleField.tsx +26 -22
- package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +32 -0
- package/lib/components/StandaloneLink/StandaloneLink.tsx +183 -0
- package/lib/components/StandaloneLink/__tests__/StandaloneLink.test.tsx +57 -0
- package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +19 -0
- package/lib/components/StandaloneLink/index.ts +2 -0
- package/lib/components/Table/Table.stories.tsx +337 -0
- package/lib/components/Table/Table.tsx +42 -67
- package/lib/components/Table/Table.types.ts +14 -0
- package/lib/components/Table/__tests__/Table.test.tsx +121 -0
- package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +210 -0
- package/lib/components/Table/index.ts +8 -1
- package/lib/components/Table/subcomponents/Body.tsx +18 -0
- package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +151 -0
- package/lib/components/Table/subcomponents/Cell/Cell.tsx +72 -0
- package/lib/components/Table/subcomponents/Cell/CellContent.tsx +91 -0
- package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +115 -0
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +107 -0
- package/lib/components/Table/subcomponents/Head.tsx +34 -0
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +85 -0
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +99 -0
- package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +61 -0
- package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +137 -0
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +110 -0
- package/lib/components/Table/subcomponents/Row.tsx +49 -0
- package/lib/components/Table/subcomponents/SortIcon.tsx +63 -0
- package/lib/components/Table/subcomponents/index.ts +14 -0
- package/lib/components/Tabs/Tab.tsx +3 -3
- package/lib/components/Tabs/TabContext.tsx +1 -0
- package/lib/components/Tabs/Tabs.stories.tsx +9 -3
- package/lib/components/Tabs/Tabs.tsx +10 -32
- package/lib/components/Tabs/__tests__/Tabs.test.tsx +10 -4
- package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +32 -32
- package/lib/components/Timepicker/Timepicker.stories.tsx +43 -0
- package/lib/components/Timepicker/Timepicker.tsx +96 -0
- package/lib/components/Timepicker/__tests__/Timepicker.test.tsx +55 -0
- package/lib/components/Timepicker/__tests__/__snapshots__/Timepicker.test.tsx.snap +19 -0
- package/lib/components/Timepicker/index.tsx +2 -0
- package/lib/components/Timepicker/utils/convertDateToTimeString.test.ts +54 -0
- package/lib/components/Timepicker/utils/convertDateToTimeString.ts +10 -0
- package/lib/components/Timepicker/utils/index.ts +1 -0
- package/lib/components/WeekPicker/WeekPicker.tsx +26 -0
- package/lib/components/WeekPicker/index.ts +1 -0
- package/lib/components/WeekPicker/subcomponents/CustomDatepicker.tsx +298 -0
- package/lib/components/WeekPicker/subcomponents/DatepickerInput.tsx +111 -0
- package/lib/components/WeekPicker/subcomponents/VisibleField.tsx +126 -0
- package/lib/components/WeekPicker/subcomponents/index.ts +3 -0
- package/lib/components/index.ts +20 -0
- package/lib/hooks/index.ts +2 -0
- package/lib/hooks/useFocusTrap.ts +123 -0
- package/lib/index.ts +1 -0
- package/lib/theme/defaultTheme.ts +7 -0
- package/lib/utils/__tests__/capitalise.test.ts +40 -0
- package/lib/utils/capitalise.ts +4 -0
- package/package.json +2 -2
- package/dist/components/Datepicker/subcomponents/AcademicWeeks.d.ts +0 -7
- package/dist/components/Datepicker/subcomponents/CalendarGrid/CalendarGrid.d.ts +0 -8
- package/dist/components/Datepicker/subcomponents/CalendarGrid/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/CalendarMenu/CalendarMenu.d.ts +0 -12
- package/dist/components/Datepicker/subcomponents/CalendarMenu/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/ColumnHeadings/ColumnHeadings.d.ts +0 -2
- package/dist/components/Datepicker/subcomponents/ColumnHeadings/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/DateField/DateField.d.ts +0 -7
- package/dist/components/Datepicker/subcomponents/DateField/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/Day/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/MonthSelector/MonthSelector.d.ts +0 -6
- package/dist/components/Datepicker/subcomponents/MonthSelector/index.d.ts +0 -1
- package/dist/components/Datepicker/subcomponents/Native/Native.d.ts +0 -9
- package/dist/components/Datepicker/subcomponents/Native/index.d.ts +0 -1
- package/dist/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.d.ts +0 -20
- package/lib/components/Datepicker/subcomponents/CalendarGrid/CalendarGrid.tsx +0 -54
- package/lib/components/Datepicker/subcomponents/CalendarGrid/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/CalendarMenu/CalendarMenu.tsx +0 -90
- package/lib/components/Datepicker/subcomponents/CalendarMenu/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/ColumnHeadings/ColumnHeadings.tsx +0 -35
- package/lib/components/Datepicker/subcomponents/ColumnHeadings/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/DateField/DateField.tsx +0 -155
- package/lib/components/Datepicker/subcomponents/DateField/__tests__/DateField.test.tsx +0 -191
- package/lib/components/Datepicker/subcomponents/DateField/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/Day/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/MonthSelector/index.ts +0 -1
- package/lib/components/Datepicker/subcomponents/Native/Native.tsx +0 -59
- package/lib/components/Datepicker/subcomponents/Native/index.ts +0 -1
- package/lib/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.test.ts +0 -41
- package/lib/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.ts +0 -48
- package/lib/components/Field/__tests__/__snapshots__/Field.test.tsx.snap +0 -300
- /package/dist/components/{Datepicker/subcomponents/DateField/__tests__/DateField.test.d.ts → Calendar/__tests__/Calendar.test.d.ts} +0 -0
- /package/dist/components/{Datepicker → Calendar}/subcomponents/AcademicWeek.d.ts +0 -0
- /package/dist/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.stories.d.ts +0 -0
- /package/dist/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.test.d.ts +0 -0
- /package/dist/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.d.ts +0 -0
- /package/dist/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.test.d.ts +0 -0
- /package/dist/components/{Datepicker/utils/parseDateForDateField/parseDateForDateField.test.d.ts → Calendar/utils/normaliseMonth/normaliseMonth.test.d.ts} +0 -0
|
@@ -3,6 +3,8 @@ export declare const NAME = "ucl-uikit-menu__item";
|
|
|
3
3
|
export interface MenuItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
4
4
|
testId?: string;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
|
+
secondary?: boolean;
|
|
7
|
+
externalLink?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const _default: React.NamedExoticComponent<MenuItemProps>;
|
|
8
10
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React, HTMLAttributes } from 'react';
|
|
2
2
|
export declare const NAME = "ucl-uikit-menu__section";
|
|
3
|
-
export interface MenuSectionProps extends HTMLAttributes<
|
|
3
|
+
export interface MenuSectionProps extends HTMLAttributes<HTMLLIElement> {
|
|
4
4
|
testId?: string;
|
|
5
5
|
}
|
|
6
6
|
declare const MenuSection: React.FC<MenuSectionProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { InputProps, IconButtonProps } from '../..';
|
|
3
|
+
import { MarginProps } from '../common/marginsStyle';
|
|
4
|
+
export interface SearchBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
onSearch?: (searchTerms: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
inputProps?: InputProps;
|
|
9
|
+
clearButtonProps?: IconButtonProps;
|
|
10
|
+
submitButtonProps?: IconButtonProps;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
export type SearchProps = SearchBaseProps & MarginProps;
|
|
14
|
+
export declare const NAME = "ucl-uikit-search";
|
|
15
|
+
declare const Search: ({ placeholder, testId, onSearch, disabled, m, mv, mh, mt, mb, ml, mr, noMargins, inputProps, clearButtonProps, submitButtonProps, className, ...props }: SearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Search;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ placeholder, testId, onSearch, disabled, m, mv, mh, mt, mb, ml, mr, noMargins, inputProps, clearButtonProps, submitButtonProps, className, ...props }: import('./Search').SearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
placeholder: {
|
|
10
|
+
control: {
|
|
11
|
+
type: "text";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
disabled: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "boolean";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
testId: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "text";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
onSearch: {
|
|
25
|
+
action: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
tags: string[];
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
export declare const Default: Story;
|
|
33
|
+
export declare const Disabled: Story;
|
|
34
|
+
export declare const WithPlaceholder: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SelectProps } from './Select.types';
|
|
2
|
-
declare const Select: (props: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Select: <T extends string | number = string>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Select;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (props: import('./Select.types').SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: <T extends string | number = string>(props: import('./Select.types').SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
argTypes: {
|
|
6
6
|
value: {
|
|
7
7
|
control: {
|
|
@@ -28,12 +28,9 @@ declare const meta: {
|
|
|
28
28
|
type: "text";
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
lineBreak: {
|
|
32
32
|
control: {
|
|
33
|
-
type: "
|
|
34
|
-
min: number;
|
|
35
|
-
max: number;
|
|
36
|
-
step: number;
|
|
33
|
+
type: "boolean";
|
|
37
34
|
};
|
|
38
35
|
};
|
|
39
36
|
};
|
|
@@ -50,7 +47,6 @@ export default meta;
|
|
|
50
47
|
type Story = StoryObj<typeof meta>;
|
|
51
48
|
export declare const Default: Story;
|
|
52
49
|
export declare const Native: Story;
|
|
53
|
-
export declare const OptionsWithIcons: Story;
|
|
54
50
|
export declare const Disabled: Story;
|
|
55
51
|
export declare const WithPlaceholder: Story;
|
|
56
52
|
export declare const SingleLongOption: Story;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Maps to a native <option> element in <NativeSelect>
|
|
4
4
|
* or a <CustomOption> in <CustomSelect>
|
|
5
5
|
*/
|
|
6
|
-
export type OptionData = {
|
|
6
|
+
export type OptionData<T> = {
|
|
7
7
|
/**
|
|
8
8
|
* Display text shown to the user
|
|
9
9
|
*/
|
|
@@ -12,22 +12,24 @@ export type OptionData = {
|
|
|
12
12
|
* Data-friendly value that is returned when the option is selected
|
|
13
13
|
* We assume this will be submitted to a server or used in some other way
|
|
14
14
|
*/
|
|
15
|
-
value:
|
|
15
|
+
value: T;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Only used by <CustomOption>
|
|
19
|
-
* Takes in an actual <Icon> component
|
|
17
|
+
* Apply additional props to a select option component.
|
|
20
18
|
*/
|
|
19
|
+
optionProps?: Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
Deprecated
|
|
22
|
+
*/
|
|
21
23
|
icon?: React.ReactNode;
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
26
|
* Top level props that <Select> accepts when implemented
|
|
25
27
|
*/
|
|
26
|
-
interface BaseSelectProps {
|
|
28
|
+
interface BaseSelectProps<T = string> {
|
|
27
29
|
/**
|
|
28
30
|
* An array of option data, to be rendered either natively or custom
|
|
29
31
|
*/
|
|
30
|
-
options: OptionData[];
|
|
32
|
+
options: OptionData<T>[];
|
|
31
33
|
/**
|
|
32
34
|
* Placeholder text shown when no option is selected
|
|
33
35
|
* Displayed in visible field of custom implementation
|
|
@@ -53,11 +55,13 @@ interface BaseSelectProps {
|
|
|
53
55
|
* Internal props for the custom implementation, with <div> as root element
|
|
54
56
|
* onChange already exists on <div>. We override it.
|
|
55
57
|
*/
|
|
56
|
-
export type CustomSelectProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & BaseSelectProps & {
|
|
58
|
+
export type CustomSelectProps<T> = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & BaseSelectProps<T> & {
|
|
57
59
|
native?: false;
|
|
58
|
-
value?:
|
|
60
|
+
value?: T;
|
|
59
61
|
disabled?: boolean;
|
|
60
|
-
|
|
62
|
+
lineBreak?: boolean;
|
|
63
|
+
panelClassName?: string;
|
|
64
|
+
onValueChange?: (value: T, ev: React.UIEvent) => void;
|
|
61
65
|
ref?: React.RefObject<HTMLDivElement | null>;
|
|
62
66
|
};
|
|
63
67
|
/**
|
|
@@ -68,15 +72,16 @@ export type NativeSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> &
|
|
|
68
72
|
native: true;
|
|
69
73
|
ref?: React.RefObject<HTMLSelectElement | null>;
|
|
70
74
|
};
|
|
71
|
-
export type SelectProps = NativeSelectProps | CustomSelectProps
|
|
75
|
+
export type SelectProps<T> = NativeSelectProps | CustomSelectProps<T>;
|
|
72
76
|
/**
|
|
73
77
|
* Each option as displayed in the Panel of <CustomSelect>
|
|
74
78
|
* Roughly equivalent to a custom version of <option>
|
|
75
79
|
*/
|
|
76
|
-
export interface CustomOptionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
77
|
-
value:
|
|
80
|
+
export interface CustomOptionProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
81
|
+
value: T;
|
|
78
82
|
testId?: string;
|
|
79
83
|
isSelected?: boolean;
|
|
80
|
-
onSelect: (event: React.MouseEvent, value:
|
|
84
|
+
onSelect: (event: React.MouseEvent, value: T) => void;
|
|
85
|
+
lineBreak?: boolean;
|
|
81
86
|
}
|
|
82
87
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CustomOptionProps } from '../Select.types';
|
|
2
|
-
declare const CustomOption: ({ value, isSelected, onSelect, testId, className, children, ...props }: CustomOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const CustomOption: <T extends string | number>({ value, isSelected, onSelect, lineBreak, testId, className, children, ...props }: CustomOptionProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CustomOption;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { CustomSelectProps } from '../Select.types';
|
|
2
|
-
|
|
3
|
-
declare const CustomSelect: ({ value, options, onValueChange, disabled, placeholder, width, testId, className, ref, ...props }: CustomSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const CustomSelect: <T extends string | number>({ value, options, onValueChange, disabled, placeholder, lineBreak, width, testId, className, panelClassName, ref, ...props }: CustomSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default CustomSelect;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OptionData } from '../Select.types';
|
|
2
|
-
interface VisibleFieldProps {
|
|
2
|
+
interface VisibleFieldProps<T> {
|
|
3
3
|
isOpen?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
selectedOption: OptionData | null | undefined;
|
|
5
|
+
selectedOption: OptionData<T> | null | undefined;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
8
|
+
declare const VisibleField: <T extends string | number>({ selectedOption, isOpen, placeholder, disabled, }: VisibleFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default VisibleField;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { IconProps } from '../Icon';
|
|
3
|
+
import { BaseLinkProps } from '../Link/BaseLink';
|
|
4
|
+
import { MarginProps } from '../common/marginsStyle';
|
|
5
|
+
export interface StandaloneLinkBaseProps extends BaseLinkProps {
|
|
6
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
7
|
+
icon?: ReactElement<IconProps>;
|
|
8
|
+
iconPosition?: 'left' | 'right';
|
|
9
|
+
}
|
|
10
|
+
export type StandaloneLinkProps = StandaloneLinkBaseProps & MarginProps;
|
|
11
|
+
declare const StandaloneLink: import('react').ForwardRefExoticComponent<StandaloneLinkBaseProps & MarginProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
export default StandaloneLink;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('./StandaloneLink').StandaloneLinkBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
args: {
|
|
6
|
+
children: string;
|
|
7
|
+
href: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const NewTab: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { TableProps } from './Table.types';
|
|
2
|
+
declare const Table: {
|
|
3
|
+
({ testId, className, children, ref, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Head: ({ className, children, ...props }: import('./subcomponents').TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Body: ({ className, children, ...props }: import('./subcomponents').TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Row: ({ selected, className, children, ...props }: import('./subcomponents').TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export default Table;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ testId, className, children, ref, ...props }: import('./Table.types').TableProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Head: ({ className, children, ...props }: import('./subcomponents').TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
HeadCell: ({ variant, accessor, sort, onSortChange, showSortIcon, checked, onCheck, testId, className, children, ...props }: import('./subcomponents').TableHeadCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Body: ({ className, children, ...props }: import('./subcomponents').TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Row: ({ selected, className, children, ...props }: import('./subcomponents').TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: import('./subcomponents').TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: string;
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Simple: Story;
|
|
20
|
+
export declare const CellVariants: Story;
|
|
21
|
+
export declare const WithHeaderCellCheckbox: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ColumnVariant = 'default' | 'numeric' | 'checkbox' | 'button';
|
|
2
|
+
export type SortOrder = 'asc' | 'desc' | null;
|
|
3
|
+
export type SortPattern = {
|
|
4
|
+
accessor: string | null;
|
|
5
|
+
order: SortOrder;
|
|
6
|
+
};
|
|
7
|
+
export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
8
|
+
testId?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
ref?: React.Ref<HTMLTableElement>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ColumnVariant } from '../../Table.types';
|
|
2
|
+
export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
3
|
+
variant?: ColumnVariant;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onCheck?: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
onButtonClick?: (event: React.UIEvent) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Cell: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Cell;
|