@payfit/unity-components 1.0.0 → 1.1.0
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/esm/components/action-bar/ActionBar.d.ts +153 -0
- package/dist/esm/components/action-bar/ActionBar.js +173 -0
- package/dist/esm/components/action-bar/parts/ActionBarAction.d.ts +44 -0
- package/dist/esm/components/action-bar/parts/ActionBarAction.js +45 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.d.ts +44 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.js +46 -0
- package/dist/esm/components/actionable/Actionable.js +20 -21
- package/dist/esm/components/alert/Alert.d.ts +1 -1
- package/dist/esm/components/alert/Alert.js +1 -1
- package/dist/esm/components/alert/parts/AlertActions.d.ts +1 -1
- package/dist/esm/components/alert/parts/AlertActions.js +1 -1
- package/dist/esm/components/alert/parts/AlertContent.d.ts +1 -1
- package/dist/esm/components/alert/parts/AlertTitle.d.ts +1 -1
- package/dist/esm/components/anchor/Anchor.js +1 -1
- package/dist/esm/components/app-layout/AppLayout.js +6 -6
- package/dist/esm/components/app-menu/parts/AppMenuFooter.js +30 -30
- package/dist/esm/components/app-menu/parts/AppMenuNavContent.js +1 -1
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/esm/components/autocomplete/Autocomplete.js +14 -14
- package/dist/esm/components/autocomplete/parts/AutocompleteClearButton.js +5 -5
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompleteItem.js +4 -4
- package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.js +12 -12
- package/dist/esm/components/autocomplete/parts/AutocompletePanel.d.ts +1 -1
- package/dist/esm/components/autocomplete/parts/AutocompletePanel.js +7 -7
- package/dist/esm/components/avatar/Avatar.d.ts +1 -1
- package/dist/esm/components/avatar/Avatar.js +15 -16
- package/dist/esm/components/avatar/Avatar.variants.js +1 -1
- package/dist/esm/components/avatar/parts/AvatarFallback.d.ts +1 -1
- package/dist/esm/components/avatar/parts/AvatarFallback.js +9 -10
- package/dist/esm/components/avatar/parts/AvatarImage.js +12 -12
- package/dist/esm/components/avatar/parts/AvatarPair.d.ts +1 -1
- package/dist/esm/components/avatar/parts/AvatarPair.js +4 -4
- package/dist/esm/components/badge/Badge.d.ts +1 -1
- package/dist/esm/components/badge/Badge.js +31 -35
- package/dist/esm/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/BottomSheet.js +14 -14
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.js +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.js +11 -11
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.d.ts +1 -1
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.js +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.d.ts +4 -4
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.js +6 -6
- package/dist/esm/components/breadcrumbs/Breadcrumbs.context.d.ts +1 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +3 -3
- package/dist/esm/components/button/Button.js +33 -41
- package/dist/esm/components/button/Button.variants.d.ts +1 -1
- package/dist/esm/components/button/Button.variants.js +1 -1
- package/dist/esm/components/checkbox/Checkbox.js +53 -49
- package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +1 -1
- package/dist/esm/components/checkbox-field/CheckboxField.js +39 -34
- package/dist/esm/components/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/dist/esm/components/checkbox-group/CheckboxGroup.js +12 -12
- package/dist/esm/components/collapsible/Collapsible.js +22 -16
- package/dist/esm/components/collapsible/parts/CollapsibleContent.js +16 -7
- package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +23 -23
- package/dist/esm/components/data-table/DataTable.d.ts +48 -17
- package/dist/esm/components/data-table/DataTable.js +104 -60
- package/dist/esm/components/data-table/mocks/employee-columns.d.ts +4 -0
- package/dist/esm/components/data-table/parts/DataTableBulkActions.d.ts +55 -0
- package/dist/esm/components/data-table/parts/DataTableBulkActions.js +65 -0
- package/dist/esm/components/data-table/parts/DataTableRoot.d.ts +37 -0
- package/dist/esm/components/data-table/parts/DataTableRoot.js +13 -0
- package/dist/esm/components/date-calendar/DateCalendar.js +8 -8
- package/dist/esm/components/date-picker/DatePicker.js +9 -9
- package/dist/esm/components/date-picker/parts/DateInput.js +7 -7
- package/dist/esm/components/date-picker-field/DatePickerField.js +12 -12
- package/dist/esm/components/definition-tooltip/DefinitionTooltip.js +4 -4
- package/dist/esm/components/dialog/Dialog.d.ts +1 -1
- package/dist/esm/components/dialog/Dialog.js +9 -9
- package/dist/esm/components/dialog/parts/DialogActions/DialogButton.d.ts +1 -1
- package/dist/esm/components/fieldset/Fieldset.d.ts +1 -1
- package/dist/esm/components/fieldset/Fieldset.js +4 -4
- package/dist/esm/components/flex/Flex.d.ts +1 -1
- package/dist/esm/components/flex/Flex.variants.js +189 -207
- package/dist/esm/components/flex/FlexItem.d.ts +1 -1
- package/dist/esm/components/form/Form.context.d.ts +1 -4
- package/dist/esm/components/form/Form.context.js +11 -13
- package/dist/esm/components/form/Form.d.ts +13 -11
- package/dist/esm/components/form/Form.js +45 -48
- package/dist/esm/components/form-field/FormField.context.d.ts +1 -6
- package/dist/esm/components/form-field/FormField.context.js +39 -47
- package/dist/esm/components/form-field/FormField.d.ts +0 -2
- package/dist/esm/components/form-field/FormField.js +37 -42
- package/dist/esm/components/form-field/parts/FormContextualLink.js +17 -17
- package/dist/esm/components/form-field/parts/FormControl.js +39 -35
- package/dist/esm/components/form-field/parts/FormFeedbackText.js +15 -17
- package/dist/esm/components/full-page-loader/FullPageLoader.js +7 -7
- package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +2 -2
- package/dist/esm/components/funnel-layout/FunnelLayout.js +26 -26
- package/dist/esm/components/funnel-layout/parts/FunnelBody.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelBody.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelPage.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPage.js +10 -10
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageActions.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageActions.js +13 -13
- package/dist/esm/components/funnel-layout/parts/FunnelPageContent.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageContent.js +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +7 -7
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.js +4 -4
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +7 -7
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +9 -9
- package/dist/esm/components/grid/Grid.d.ts +1 -1
- package/dist/esm/components/grid/Grid.variants.d.ts +1 -1
- package/dist/esm/components/grid/Grid.variants.js +3 -3
- package/dist/esm/components/grid/GridItem.d.ts +1 -1
- package/dist/esm/components/icon/Icon.d.ts +1 -1
- package/dist/esm/components/icon/Icon.js +1 -1
- package/dist/esm/components/icon-button/CircularIconButton.d.ts +1 -1
- package/dist/esm/components/icon-button/CircularIconButton.js +21 -20
- package/dist/esm/components/icon-button/IconButton.variants.d.ts +1 -1
- package/dist/esm/components/icon-button/IconButton.variants.js +2 -2
- package/dist/esm/components/input/Input.js +6 -6
- package/dist/esm/components/label/Label.js +13 -13
- package/dist/esm/components/link/Link.d.ts +11 -1
- package/dist/esm/components/link/Link.js +32 -30
- package/dist/esm/components/link/Link.variants.d.ts +141 -30
- package/dist/esm/components/link/Link.variants.js +44 -16
- package/dist/esm/components/menu/parts/MenuItem.js +8 -8
- package/dist/esm/components/multi-select/parts/MultiSelectButton.js +14 -14
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.js +5 -5
- package/dist/esm/components/multi-select/parts/MultiSelectOption.js +3 -3
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.js +1 -1
- package/dist/esm/components/multi-select-field/MultiSelectField.js +6 -6
- package/dist/esm/components/nav/parts/NavGroup.js +28 -29
- package/dist/esm/components/nav/parts/NavItem.d.ts +1 -1
- package/dist/esm/components/nav/parts/NavItem.js +13 -14
- package/dist/esm/components/number-field/NumberField.js +14 -14
- package/dist/esm/components/number-input/NumberInput.d.ts +2 -2
- package/dist/esm/components/number-input/NumberInput.js +37 -37
- package/dist/esm/components/page/Page.d.ts +1 -1
- package/dist/esm/components/page/Page.js +5 -5
- package/dist/esm/components/page/parts/PageHeader.d.ts +1 -1
- package/dist/esm/components/page/parts/PageHeader.js +4 -4
- package/dist/esm/components/pagination/Pagination.d.ts +1 -1
- package/dist/esm/components/pagination/Pagination.js +16 -16
- package/dist/esm/components/pagination/parts/PaginationEllipsis.d.ts +1 -1
- package/dist/esm/components/pagination/parts/PaginationEllipsis.js +8 -8
- package/dist/esm/components/pagination/parts/PaginationJumpDialog.js +9 -9
- package/dist/esm/components/pagination/parts/PaginationLink.d.ts +1 -1
- package/dist/esm/components/pagination/parts/PaginationLink.js +6 -6
- package/dist/esm/components/payfit-brand/PayFitBrand.js +4 -4
- package/dist/esm/components/pill/Pill.d.ts +1 -1
- package/dist/esm/components/pill/Pill.js +1 -1
- package/dist/esm/components/popover/Popover.js +5 -5
- package/dist/esm/components/popover/parts/PopoverHeader.js +7 -7
- package/dist/esm/components/progress-bar/ProgressBar.js +11 -11
- package/dist/esm/components/radio-button-group/parts/RadioButton.d.ts +1 -1
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +5 -5
- package/dist/esm/components/search/Search.d.ts +1 -1
- package/dist/esm/components/search/Search.js +14 -14
- package/dist/esm/components/segmented-button-group/parts/ToggleButton.js +10 -10
- package/dist/esm/components/select/Select.js +12 -12
- package/dist/esm/components/select/parts/SearchInput.js +7 -7
- package/dist/esm/components/select/parts/SelectButton.js +17 -14
- package/dist/esm/components/select/parts/SelectOption.js +4 -4
- package/dist/esm/components/select/parts/SelectOptionGroup.js +8 -8
- package/dist/esm/components/select/parts/SelectOptionHelper.js +1 -1
- package/dist/esm/components/select-field/SelectField.d.ts +1 -1
- package/dist/esm/components/select-field/SelectField.js +16 -16
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.ts +1 -1
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +8 -8
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +10 -10
- package/dist/esm/components/selectable-card/internals/Content.js +5 -5
- package/dist/esm/components/selectable-card/internals/Description.js +1 -1
- package/dist/esm/components/selectable-card/internals/Illustration.js +3 -3
- package/dist/esm/components/selectable-card/internals/SelectedIndicator.js +4 -4
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.d.ts +1 -1
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/RadioIndicator.js +3 -3
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.d.ts +1 -1
- package/dist/esm/components/selectable-card/selectableCard.variant.js +1 -1
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +22 -22
- package/dist/esm/components/side-panel/SidePanel.d.ts +1 -1
- package/dist/esm/components/side-panel/SidePanel.js +6 -6
- package/dist/esm/components/side-panel/parts/SidePanelContent.d.ts +1 -1
- package/dist/esm/components/side-panel/parts/SidePanelContent.js +9 -9
- package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.js +11 -11
- package/dist/esm/components/side-panel/parts/SidePanelFooter.d.ts +1 -1
- package/dist/esm/components/side-panel/parts/SidePanelFooter.js +4 -4
- package/dist/esm/components/side-panel/parts/SidePanelHeader.d.ts +4 -4
- package/dist/esm/components/side-panel/parts/SidePanelHeader.js +6 -6
- package/dist/esm/components/skip-links/SkipLinks.d.ts +79 -0
- package/dist/esm/components/skip-links/SkipLinks.js +80 -0
- package/dist/esm/components/spinner/Spinner.js +5 -5
- package/dist/esm/components/table/Table.js +101 -100
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.d.ts +1 -19
- package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +147 -95
- package/dist/esm/components/table/parts/TableBody.js +1 -1
- package/dist/esm/components/table/parts/TableCell.d.ts +17 -1
- package/dist/esm/components/table/parts/TableCell.js +45 -41
- package/dist/esm/components/table/parts/TableColumnHeader.d.ts +2 -1
- package/dist/esm/components/table/parts/TableColumnHeader.js +63 -57
- package/dist/esm/components/table/parts/TableEmptyState.d.ts +1 -1
- package/dist/esm/components/table/parts/TableEmptyState.js +1 -1
- package/dist/esm/components/table/parts/TableHeader.d.ts +3 -3
- package/dist/esm/components/table/parts/TableHeader.js +28 -26
- package/dist/esm/components/table/parts/TablePagination.d.ts +1 -1
- package/dist/esm/components/table/parts/TablePagination.js +9 -9
- package/dist/esm/components/table/parts/TableRow.d.ts +1 -1
- package/dist/esm/components/table/parts/TableRow.js +36 -34
- package/dist/esm/components/tabs/Tabs.context.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.variant.js +1 -1
- package/dist/esm/components/tabs/parts/NavigationButton.js +12 -12
- package/dist/esm/components/tabs/parts/Tab.d.ts +3 -2
- package/dist/esm/components/tabs/parts/Tab.js +12 -12
- package/dist/esm/components/tabs/parts/TabPanel.d.ts +4 -2
- package/dist/esm/components/tabs/parts/TabPanel.js +7 -7
- package/dist/esm/components/task-menu/TaskMenu.d.ts +1 -1
- package/dist/esm/components/task-menu/TaskMenu.js +7 -7
- package/dist/esm/components/task-menu/parts/Content.js +6 -6
- package/dist/esm/components/task-menu/parts/Header.js +7 -7
- package/dist/esm/components/task-menu/parts/SubTask.js +6 -6
- package/dist/esm/components/task-menu/parts/Task.d.ts +1 -1
- package/dist/esm/components/task-menu/parts/Task.js +12 -12
- package/dist/esm/components/task-menu/parts/TaskGroup.js +7 -7
- package/dist/esm/components/task-menu/parts/task.variants.js +1 -1
- package/dist/esm/components/text/Text.d.ts +1 -1
- package/dist/esm/components/text/Text.variants.js +1 -1
- package/dist/esm/components/text-area/TextArea.js +6 -6
- package/dist/esm/components/text-field/TextField.js +5 -5
- package/dist/esm/components/toast/UnityToast.d.ts +1 -1
- package/dist/esm/components/toast/UnityToast.js +11 -11
- package/dist/esm/components/toggle-switch/ToggleSwitch.d.ts +1 -1
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -4
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +35 -31
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.d.ts +1 -1
- package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +5 -5
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +43 -38
- package/dist/esm/components/tooltip/Tooltip.d.ts +2 -0
- package/dist/esm/components/tooltip/Tooltip.js +27 -19
- package/dist/esm/hooks/use-form.js +7 -7
- package/dist/esm/index.d.ts +6 -1
- package/dist/esm/index.js +366 -352
- package/dist/esm/integrations/react-router/v5/UnityReactRouterV5Provider.js +28 -0
- package/dist/esm/integrations/react-router/v5/index.d.ts +1 -0
- package/dist/esm/integrations/react-router/v5.js +4 -0
- package/i18n/en-GB.json +6 -0
- package/i18n/es-ES.json +6 -0
- package/i18n/fr-FR.json +6 -0
- package/package.json +38 -35
- package/dist/esm/providers/router/integrations/UnityReactRouterV5Provider.js +0 -28
- /package/dist/esm/{providers/router/integrations → integrations/react-router/v5}/UnityReactRouterV5Provider.d.ts +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as y, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as S } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { uyTv as h } from "@payfit/unity-themes";
|
|
4
|
+
import { useFormContext as b } from "react-hook-form";
|
|
5
5
|
import { FormField as j } from "../form-field/FormField.js";
|
|
6
6
|
import { FormControl as C } from "../form-field/parts/FormControl.js";
|
|
7
7
|
import { FormFeedbackText as N } from "../form-field/parts/FormFeedbackText.js";
|
|
8
|
-
import { FormHelperText as
|
|
9
|
-
import { FormLabel as
|
|
10
|
-
import { Select as
|
|
11
|
-
const
|
|
8
|
+
import { FormHelperText as T } from "../form-field/parts/FormHelperText.js";
|
|
9
|
+
import { FormLabel as g } from "../form-field/parts/FormLabel.js";
|
|
10
|
+
import { Select as k } from "../select/Select.js";
|
|
11
|
+
const v = h({
|
|
12
12
|
base: "uy:flex uy:flex-col uy:gap-100"
|
|
13
|
-
}),
|
|
13
|
+
}), w = ({
|
|
14
14
|
children: t,
|
|
15
15
|
feedbackText: e,
|
|
16
16
|
helperText: r,
|
|
@@ -25,7 +25,7 @@ const w = b({
|
|
|
25
25
|
items: d,
|
|
26
26
|
...F
|
|
27
27
|
}, a) => {
|
|
28
|
-
const { control: u } =
|
|
28
|
+
const { control: u } = b(), x = {
|
|
29
29
|
isRequired: l,
|
|
30
30
|
isInvalid: f,
|
|
31
31
|
isDisabled: n,
|
|
@@ -36,13 +36,13 @@ const w = b({
|
|
|
36
36
|
{
|
|
37
37
|
control: u,
|
|
38
38
|
name: m,
|
|
39
|
-
className:
|
|
39
|
+
className: v(),
|
|
40
40
|
...x,
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */ o(
|
|
43
|
-
r && /* @__PURE__ */ o(
|
|
42
|
+
/* @__PURE__ */ o(g, { requiredVariant: c, children: i }),
|
|
43
|
+
r && /* @__PURE__ */ o(T, { children: r }),
|
|
44
44
|
/* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
|
|
45
|
-
|
|
45
|
+
k,
|
|
46
46
|
{
|
|
47
47
|
ref: a,
|
|
48
48
|
name: m,
|
|
@@ -56,10 +56,10 @@ const w = b({
|
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
|
-
},
|
|
60
|
-
return
|
|
59
|
+
}, H = S(function(e, r) {
|
|
60
|
+
return w(e, r);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
H.displayName = "SelectField";
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
H as SelectField
|
|
65
65
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { AriaToggleButtonGroupProps } from 'react-aria';
|
|
2
3
|
import { Key } from 'react-stately';
|
|
3
|
-
import { VariantProps } from 'tailwind-variants';
|
|
4
4
|
export declare const selectableButtonGroup: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex uy:gap-100", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex uy:gap-100", unknown, unknown, undefined>>;
|
|
5
5
|
export interface SelectableButtonGroupProps extends VariantProps<typeof selectableButtonGroup>, Omit<AriaToggleButtonGroupProps, 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'style'> {
|
|
6
6
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d, useRef as m } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { uyTv as f } from "@payfit/unity-themes";
|
|
4
|
+
import { useToggleButtonGroup as s, mergeProps as g } from "react-aria";
|
|
5
|
+
import { useToggleGroupState as v } from "react-stately";
|
|
6
6
|
import { SelectableButtonGroupContext as y } from "./SelectableButtonGroup.context.js";
|
|
7
|
-
const G =
|
|
7
|
+
const G = f({
|
|
8
8
|
base: "uy:flex uy:gap-100"
|
|
9
9
|
}), S = d((e, r) => {
|
|
10
|
-
const t = m(null), a =
|
|
10
|
+
const t = m(null), a = v({
|
|
11
11
|
...e,
|
|
12
12
|
selectedKeys: e.value,
|
|
13
13
|
defaultSelectedKeys: e.defaultValue,
|
|
@@ -15,13 +15,13 @@ const G = v({
|
|
|
15
15
|
var l;
|
|
16
16
|
(l = e.onChange) == null || l.call(e, Array.from(c));
|
|
17
17
|
}
|
|
18
|
-
}), { groupProps: n } =
|
|
18
|
+
}), { groupProps: n } = s(e, a, t), u = G({ className: e.className }), { ref: i } = g({ ref: t }, { ref: r });
|
|
19
19
|
return /* @__PURE__ */ o(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
...n,
|
|
23
|
-
className:
|
|
24
|
-
ref:
|
|
23
|
+
className: u,
|
|
24
|
+
ref: i,
|
|
25
25
|
"data-dd-privacy": "allow",
|
|
26
26
|
"aria-invalid": e.isInvalid,
|
|
27
27
|
children: /* @__PURE__ */ o(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as h, useRef as I, useContext as w } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { uyTv as B } from "@payfit/unity-themes";
|
|
4
|
+
import { useToggleButtonGroupItem as N, mergeProps as S } from "react-aria";
|
|
5
5
|
import { Icon as G } from "../../icon/Icon.js";
|
|
6
6
|
import { Spinner as P } from "../../spinner/Spinner.js";
|
|
7
7
|
import { SelectableButtonGroupContext as R } from "../SelectableButtonGroup.context.js";
|
|
8
|
-
const
|
|
8
|
+
const T = B({
|
|
9
9
|
// add the component styles
|
|
10
10
|
slots: {
|
|
11
11
|
base: [
|
|
@@ -58,23 +58,23 @@ const j = S({
|
|
|
58
58
|
hasIcon: !1,
|
|
59
59
|
isInvalid: !1
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), j = h(
|
|
62
62
|
(r, c) => {
|
|
63
63
|
const a = I(null), s = w(R);
|
|
64
64
|
if (!s)
|
|
65
65
|
throw new Error(
|
|
66
66
|
"SelectableButton must be used within a ToggleButtonGroup component"
|
|
67
67
|
);
|
|
68
|
-
const { state: b, isInvalid: d } = s, { buttonProps: u, isPressed: f, isSelected: l } =
|
|
68
|
+
const { state: b, isInvalid: d } = s, { buttonProps: u, isPressed: f, isSelected: l } = N(
|
|
69
69
|
{ id: r.value, ...r },
|
|
70
70
|
b,
|
|
71
71
|
a
|
|
72
|
-
), { ref: y } =
|
|
72
|
+
), { ref: y } = S({ ref: a }, { ref: c }), {
|
|
73
73
|
isDisabled: m = !1,
|
|
74
74
|
isLoading: e = !1,
|
|
75
75
|
prefixIcon: t,
|
|
76
76
|
children: i
|
|
77
|
-
} = r, { base: p, icon: g, label: v } =
|
|
77
|
+
} = r, { base: p, icon: g, label: v } = T({
|
|
78
78
|
hasIcon: !!t && !e,
|
|
79
79
|
isInvalid: !!d
|
|
80
80
|
});
|
|
@@ -110,8 +110,8 @@ const j = S({
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
|
-
|
|
113
|
+
j.displayName = "SelectableButton";
|
|
114
114
|
export {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
j as SelectableButton,
|
|
116
|
+
T as selectableButton
|
|
117
117
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { uyTv as e } from "@payfit/unity-themes";
|
|
3
|
+
const y = e({
|
|
4
4
|
base: ["uy:flex uy:flex-col", "uy:py-300 uy:pl-150 uy:pr-300"]
|
|
5
|
-
}),
|
|
5
|
+
}), r = ({ children: o }) => /* @__PURE__ */ t("div", { className: y(), children: o });
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
r as Content,
|
|
8
|
+
y as content
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { uyTv as s } from "@payfit/unity-themes";
|
|
3
3
|
const r = s({
|
|
4
4
|
base: ["uy:mb-300"]
|
|
5
|
-
}), a = ({ children:
|
|
5
|
+
}), a = ({ children: o }) => /* @__PURE__ */ t("div", { className: r(), children: o });
|
|
6
6
|
export {
|
|
7
7
|
a as Illustration,
|
|
8
8
|
r as illustration
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
const c =
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
3
|
+
const c = t({
|
|
4
4
|
base: ["uy:py-250 uy:px-150"]
|
|
5
|
-
}), a = ({ children:
|
|
5
|
+
}), a = ({ children: e }) => /* @__PURE__ */ o("div", { className: c(), children: e });
|
|
6
6
|
export {
|
|
7
7
|
a as SelectedIndicator,
|
|
8
8
|
c as selectedIndicator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { CheckboxProps as AriaCheckboxProps } from 'react-aria-components';
|
|
3
|
-
import { VariantProps } from 'tailwind-variants';
|
|
4
4
|
import { selectableCard } from '../../selectableCard.variant.js';
|
|
5
5
|
export interface SelectableCardCheckboxProps extends Omit<AriaCheckboxProps, 'children'>, VariantProps<typeof selectableCard> {
|
|
6
6
|
/**
|
package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/RadioIndicator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { uyTv as e } from "@payfit/unity-themes";
|
|
3
|
+
const t = e({
|
|
4
4
|
base: "",
|
|
5
5
|
variants: {
|
|
6
6
|
isSelected: {
|
|
@@ -51,7 +51,7 @@ const e = t({
|
|
|
51
51
|
children: /* @__PURE__ */ o("g", { id: "Radio input", children: /* @__PURE__ */ o(
|
|
52
52
|
"path",
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
54
|
+
className: t({ isSelected: r }),
|
|
55
55
|
id: "Background",
|
|
56
56
|
d: "M2.625 10C2.625 5.9269 5.9269 2.625 10 2.625C14.0731 2.625 17.375 5.9269 17.375 10C17.375 14.0731 14.0731 17.375 10 17.375C5.9269 17.375 2.625 14.0731 2.625 10Z",
|
|
57
57
|
fill: "white",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
3
|
import { RadioProps } from 'react-aria-components';
|
|
3
|
-
import { VariantProps } from 'tailwind-variants';
|
|
4
4
|
import { selectableCard } from '../../selectableCard.variant.js';
|
|
5
5
|
export interface SelectableCardRadioProps extends Omit<RadioProps, 'children'>, PropsWithChildren<VariantProps<typeof selectableCard>> {
|
|
6
6
|
/**
|
package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
3
|
import { useFormContext as f } from "react-hook-form";
|
|
4
|
-
import { FormField as
|
|
5
|
-
import { FormControl as
|
|
6
|
-
import { FormFeedbackText as
|
|
7
|
-
import { FormHelperText as
|
|
4
|
+
import { FormField as n } from "../form-field/FormField.js";
|
|
5
|
+
import { FormControl as F } from "../form-field/parts/FormControl.js";
|
|
6
|
+
import { FormFeedbackText as u } from "../form-field/parts/FormFeedbackText.js";
|
|
7
|
+
import { FormHelperText as x } from "../form-field/parts/FormHelperText.js";
|
|
8
8
|
import { FormLabel as b } from "../form-field/parts/FormLabel.js";
|
|
9
|
-
import { SelectableCardRadioGroup as
|
|
10
|
-
const
|
|
9
|
+
import { SelectableCardRadioGroup as h } from "../selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.js";
|
|
10
|
+
const C = s(
|
|
11
11
|
({
|
|
12
12
|
children: m,
|
|
13
13
|
name: r,
|
|
14
|
-
isRequired:
|
|
15
|
-
requiredVariant:
|
|
16
|
-
label:
|
|
14
|
+
isRequired: t,
|
|
15
|
+
requiredVariant: l,
|
|
16
|
+
label: i,
|
|
17
17
|
helperText: a,
|
|
18
|
-
feedbackText:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const { control:
|
|
18
|
+
feedbackText: y,
|
|
19
|
+
...c
|
|
20
|
+
}, d) => {
|
|
21
|
+
const { control: p } = f();
|
|
22
22
|
return /* @__PURE__ */ e(
|
|
23
|
-
|
|
23
|
+
n,
|
|
24
24
|
{
|
|
25
25
|
...{
|
|
26
|
-
isRequired:
|
|
26
|
+
isRequired: t
|
|
27
27
|
},
|
|
28
|
-
control:
|
|
28
|
+
control: p,
|
|
29
29
|
name: r,
|
|
30
30
|
className: "uy:gap-150",
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ e("div", { className: "uy:flex-col uy:gap-50", children: [
|
|
33
|
-
/* @__PURE__ */ o(b, { requiredVariant:
|
|
34
|
-
/* @__PURE__ */ o(
|
|
33
|
+
/* @__PURE__ */ o(b, { requiredVariant: l, children: i }),
|
|
34
|
+
/* @__PURE__ */ o(x, { children: a })
|
|
35
35
|
] }),
|
|
36
|
-
/* @__PURE__ */ o(
|
|
37
|
-
/* @__PURE__ */ o(
|
|
36
|
+
/* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(h, { ref: d, name: r, ...c, children: m }) }),
|
|
37
|
+
/* @__PURE__ */ o(u, {})
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
|
|
43
|
+
C.displayName = "SelectableCardRadioGroupField";
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
C as SelectableCardRadioGroupField
|
|
46
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
export declare const sidePanel: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as c, useEffect as g } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { uyTv as x } from "@payfit/unity-themes";
|
|
4
|
+
import { ModalOverlay as h, Modal as v, Dialog as w } from "react-aria-components";
|
|
5
5
|
import { SidePanelDragIndicator as p } from "./parts/SidePanelDragIndicator.js";
|
|
6
|
-
const N =
|
|
6
|
+
const N = x({
|
|
7
7
|
slots: {
|
|
8
8
|
overlay: [
|
|
9
9
|
"uy:md:bg-gradient-to-r uy:md:from-grayscale-l12/0 uy:md:to-grayscale-l12/10 uy:md:from-70% uy:md:via-100%",
|
|
@@ -37,7 +37,7 @@ const N = w({
|
|
|
37
37
|
return g(() => {
|
|
38
38
|
d && (e ?? a) && (document.documentElement.style.overflow = "", document.body.style.overflow = "");
|
|
39
39
|
}, [d, e, a]), /* @__PURE__ */ t(
|
|
40
|
-
|
|
40
|
+
h,
|
|
41
41
|
{
|
|
42
42
|
className: n(),
|
|
43
43
|
isOpen: e,
|
|
@@ -46,7 +46,7 @@ const N = w({
|
|
|
46
46
|
isDismissable: i,
|
|
47
47
|
isKeyboardDismissDisabled: r,
|
|
48
48
|
children: /* @__PURE__ */ s(
|
|
49
|
-
|
|
49
|
+
v,
|
|
50
50
|
{
|
|
51
51
|
"data-dd-privacy": "allow",
|
|
52
52
|
...y,
|
|
@@ -55,7 +55,7 @@ const N = w({
|
|
|
55
55
|
"data-unity-side-panel": !0,
|
|
56
56
|
children: [
|
|
57
57
|
/* @__PURE__ */ t(p, {}),
|
|
58
|
-
/* @__PURE__ */ t(
|
|
58
|
+
/* @__PURE__ */ t(w, { className: f(), children: o })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
61
61
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
export declare const sidePanelContent: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
4
|
+
const y = t({
|
|
5
5
|
slots: {
|
|
6
6
|
base: [
|
|
7
7
|
"uy:bg-surface-neutral",
|
|
@@ -13,14 +13,14 @@ const a = s({
|
|
|
13
13
|
"uy:h-full uy:min-h-0"
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
|
-
}),
|
|
16
|
+
}), a = s(
|
|
17
17
|
({ children: o, ...l }, r) => {
|
|
18
|
-
const { base: n, scroller:
|
|
19
|
-
return /* @__PURE__ */ e("section", { ref: r, className: n(), ...l, children: /* @__PURE__ */ e("div", { className:
|
|
18
|
+
const { base: n, scroller: u } = y();
|
|
19
|
+
return /* @__PURE__ */ e("section", { ref: r, className: n(), ...l, children: /* @__PURE__ */ e("div", { className: u(), children: o }) });
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
|
-
|
|
22
|
+
a.displayName = "SidePanelContent";
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
a as SidePanelContent,
|
|
25
|
+
y as sidePanelContent
|
|
26
26
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as x, useContext as D } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { uyTv as b } from "@payfit/unity-themes";
|
|
4
|
+
import { useDrag as h } from "@use-gesture/react";
|
|
5
|
+
import { OverlayTriggerStateContext as v } from "react-aria-components";
|
|
6
6
|
import { useBreakpointListener as P } from "../../../hooks/use-breakpoint-listener.js";
|
|
7
|
-
const S =
|
|
7
|
+
const S = b({
|
|
8
8
|
slots: {
|
|
9
9
|
base: [
|
|
10
10
|
"uy:md:hidden uy:mx-auto uy:pt-300 uy:w-500",
|
|
@@ -12,13 +12,13 @@ const S = v({
|
|
|
12
12
|
],
|
|
13
13
|
indicator: "uy:h-50 uy:rounded-pill uy:bg-content-neutral-lowest"
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
16
|
-
function
|
|
17
|
-
const r = x(null), n = D(
|
|
15
|
+
}), T = 100;
|
|
16
|
+
function I() {
|
|
17
|
+
const r = x(null), n = D(v), s = P(), { base: i, indicator: l } = S(), u = s === "xs" || s === "sm", c = h(
|
|
18
18
|
(d) => {
|
|
19
19
|
var o;
|
|
20
20
|
const {
|
|
21
|
-
movement: [
|
|
21
|
+
movement: [N, e],
|
|
22
22
|
direction: [E, m],
|
|
23
23
|
intentional: f,
|
|
24
24
|
cancel: y,
|
|
@@ -38,7 +38,7 @@ function N() {
|
|
|
38
38
|
t.style.transform = "translate3d(0, 0, 0)";
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
t.style.transform = `translate3d(0, ${e}px, 0)`, t.style.transition = "none", p && f && (e >
|
|
41
|
+
t.style.transform = `translate3d(0, ${e}px, 0)`, t.style.transition = "none", p && f && (e > T || m > 0 ? n && setTimeout(() => {
|
|
42
42
|
n.close();
|
|
43
43
|
}, 50) : (t.style.transform = "translate3d(0, 0, 0)", t.style.transition = "transform 0.3s ease"));
|
|
44
44
|
}
|
|
@@ -60,8 +60,8 @@ function N() {
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
I.displayName = "SidePanelDragIndicator";
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
I as SidePanelDragIndicator,
|
|
66
66
|
S as sidePanelDragIndicator
|
|
67
67
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
export declare const sidePanelFooter: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
4
4
|
export interface SidePanelFooterProps extends PropsWithChildren<VariantProps<typeof sidePanelFooter>> {
|
|
5
5
|
className?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
const a =
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
4
|
+
const a = t({
|
|
5
5
|
base: [
|
|
6
6
|
"uy:py-200 uy:px-300 uy:w-full",
|
|
7
7
|
"uy:flex uy:items-center uy:justify-end uy:gap-100 uy:shrink-0",
|
|
@@ -10,7 +10,7 @@ const a = y({
|
|
|
10
10
|
"uy:mt-auto",
|
|
11
11
|
"uy:pb-[max(env(safe-area-inset-bottom),var(--uy-spacing-200))] uy:md:pb-200"
|
|
12
12
|
]
|
|
13
|
-
}), d =
|
|
13
|
+
}), d = y(
|
|
14
14
|
({ children: e, ...r }, o) => /* @__PURE__ */ u("footer", { ref: o, className: a(), ...r, children: e })
|
|
15
15
|
);
|
|
16
16
|
d.displayName = "SidePanelFooter";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
export declare const sidePanelHeader: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
6
|
-
base?: import('tailwind-merge').ClassNameValue;
|
|
7
6
|
content?: import('tailwind-merge').ClassNameValue;
|
|
7
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
8
8
|
heading?: import('tailwind-merge').ClassNameValue;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
} | {
|
|
12
12
|
[x: string]: {
|
|
13
13
|
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
14
|
-
base?: import('tailwind-merge').ClassNameValue;
|
|
15
14
|
content?: import('tailwind-merge').ClassNameValue;
|
|
15
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
16
16
|
heading?: import('tailwind-merge').ClassNameValue;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -23,8 +23,8 @@ export declare const sidePanelHeader: import('tailwind-variants').TVReturnType<{
|
|
|
23
23
|
}, undefined, {
|
|
24
24
|
[key: string]: {
|
|
25
25
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
26
|
-
base?: import('tailwind-merge').ClassNameValue;
|
|
27
26
|
content?: import('tailwind-merge').ClassNameValue;
|
|
27
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
28
28
|
heading?: import('tailwind-merge').ClassNameValue;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { uyTv as y } from "@payfit/unity-themes";
|
|
4
|
+
import { Heading as i } from "react-aria-components";
|
|
5
5
|
import { CircularIconButton as c } from "../../icon-button/CircularIconButton.js";
|
|
6
|
-
const d =
|
|
6
|
+
const d = y({
|
|
7
7
|
// add the component styles
|
|
8
8
|
slots: {
|
|
9
9
|
base: [
|
|
@@ -19,9 +19,9 @@ const d = i({
|
|
|
19
19
|
}
|
|
20
20
|
}), m = s(
|
|
21
21
|
({ children: t, ...o }, r) => {
|
|
22
|
-
const { base:
|
|
23
|
-
return /* @__PURE__ */ e("header", { ref: r, className:
|
|
24
|
-
/* @__PURE__ */ e(
|
|
22
|
+
const { base: u, content: n, heading: l } = d();
|
|
23
|
+
return /* @__PURE__ */ e("header", { ref: r, className: u(), ...o, children: /* @__PURE__ */ a("div", { className: n(), children: [
|
|
24
|
+
/* @__PURE__ */ e(i, { slot: "title", className: l(), children: t }),
|
|
25
25
|
/* @__PURE__ */ e(
|
|
26
26
|
c,
|
|
27
27
|
{
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
export interface SkipLinksProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
|
|
3
|
+
/** Optional label for the skip links navigation. Defaults to "Skip to:" */
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SkipLinkProps extends PropsWithChildren<HTMLAttributes<HTMLAnchorElement>> {
|
|
7
|
+
/** The target element ID to skip to */
|
|
8
|
+
targetId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SkipLinks component provides keyboard navigation shortcuts to important sections of the page
|
|
12
|
+
*
|
|
13
|
+
* The SkipLinks component creates accessible navigation shortcuts that appear when focused,
|
|
14
|
+
* allowing keyboard users to quickly jump to important sections like main content, toolbars,
|
|
15
|
+
* or action areas. It follows WCAG guidelines for skip navigation.
|
|
16
|
+
* @param props - The props for the SkipLinks component
|
|
17
|
+
* @param props.label - Optional label for the skip links navigation section
|
|
18
|
+
* @param props.children - SkipLink components
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { SkipLinks, SkipLink } from '@payfit/unity-components'
|
|
22
|
+
*
|
|
23
|
+
* function TableWithActions() {
|
|
24
|
+
* return (
|
|
25
|
+
* <div>
|
|
26
|
+
* <SkipLinks label="Quick navigation:">
|
|
27
|
+
* <SkipLink targetId="main-content">
|
|
28
|
+
* Skip to main content
|
|
29
|
+
* </SkipLink>
|
|
30
|
+
* <SkipLink targetId="table-actions-toolbar">
|
|
31
|
+
* Skip to actions
|
|
32
|
+
* </SkipLink>
|
|
33
|
+
* </SkipLinks>
|
|
34
|
+
* <div id="main-content" tabIndex={-1}>
|
|
35
|
+
* Main content
|
|
36
|
+
* </div>
|
|
37
|
+
* <div id="table-actions-toolbar" tabIndex={-1}>
|
|
38
|
+
* Action bar content
|
|
39
|
+
* </div>
|
|
40
|
+
* </div>
|
|
41
|
+
* )
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
* @remarks
|
|
45
|
+
* - Skip links are visually hidden by default and become visible when focused
|
|
46
|
+
* - Each link should target an element with a valid ID and tabIndex={-1}
|
|
47
|
+
* - The component follows WCAG 2.1 guidelines for skip navigation
|
|
48
|
+
* @see {@link SkipLinksProps} for all available props
|
|
49
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/skip-links GitHub}
|
|
50
|
+
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library Figma}
|
|
51
|
+
*/
|
|
52
|
+
declare const SkipLinks: import('react').ForwardRefExoticComponent<SkipLinksProps & import('react').RefAttributes<HTMLElement>>;
|
|
53
|
+
/**
|
|
54
|
+
* SkipLink component represents a single skip navigation link
|
|
55
|
+
*
|
|
56
|
+
* The SkipLink component should be used as a child of SkipLinks to create individual
|
|
57
|
+
* navigation shortcuts. It automatically handles focus management and accessibility.
|
|
58
|
+
* @param props - The props for the SkipLink component
|
|
59
|
+
* @param props.targetId - The ID of the target element to skip to
|
|
60
|
+
* @param props.children - The link text content
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* import { SkipLink } from '@payfit/unity-components'
|
|
64
|
+
*
|
|
65
|
+
* function Example() {
|
|
66
|
+
* return (
|
|
67
|
+
* <SkipLink targetId="main-content">
|
|
68
|
+
* Skip to main content
|
|
69
|
+
* </SkipLink>
|
|
70
|
+
* )
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
* @remarks
|
|
74
|
+
* - Should only be used as a child of SkipLinks component
|
|
75
|
+
* - Automatically focuses the target element when activated
|
|
76
|
+
* @see {@link SkipLinkProps} for all available props
|
|
77
|
+
*/
|
|
78
|
+
declare const SkipLink: import('react').ForwardRefExoticComponent<SkipLinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
79
|
+
export { SkipLinks, SkipLink };
|