@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,35 +1,37 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import r, { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import r, { memo as l, forwardRef as s, useMemo as y } from "react";
|
|
3
|
+
import { uyTv as m } from "@payfit/unity-themes";
|
|
4
|
+
const b = m({
|
|
5
5
|
base: [
|
|
6
6
|
"uy:h-500 uy:bg-surface-neutral-lowest uy:rounded-tl-100 uy:rounded-tr-100 uy:overflow-hidden",
|
|
7
7
|
"uy:sticky uy:top-0 uy:z-[1]",
|
|
8
8
|
"uy:[&_tr]:border-b uy:[&_tr]:border-solid uy:[&_tr]:border-b-border-neutral-enabled"
|
|
9
9
|
]
|
|
10
|
-
}),
|
|
11
|
-
(
|
|
12
|
-
|
|
13
|
-
e,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
}), i = l(
|
|
11
|
+
s(
|
|
12
|
+
({ children: o, ...a }, d) => {
|
|
13
|
+
const u = y(() => r.Children.map(o, (e, n) => r.isValidElement(e) ? r.cloneElement(
|
|
14
|
+
e,
|
|
15
|
+
{
|
|
16
|
+
rowIndex: n,
|
|
17
|
+
...e.props
|
|
18
|
+
}
|
|
19
|
+
) : e), [o]);
|
|
20
|
+
return /* @__PURE__ */ t(
|
|
21
|
+
"thead",
|
|
22
|
+
{
|
|
23
|
+
ref: d,
|
|
24
|
+
className: b(),
|
|
25
|
+
"data-dd-privacy": "allow",
|
|
26
|
+
...a,
|
|
27
|
+
children: /* @__PURE__ */ t("tr", { children: u })
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
)
|
|
30
32
|
);
|
|
31
|
-
|
|
33
|
+
i.displayName = "TableHeader";
|
|
32
34
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
i as TableHeader,
|
|
36
|
+
b as tableHeader
|
|
35
37
|
};
|
|
@@ -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
|
import { PaginationProps } from '../../pagination/Pagination.js';
|
|
4
4
|
export declare const tablePagination: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
5
5
|
type PageSizeOption = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as x, useState as I } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Pagination as
|
|
7
|
-
import { SelectOption as
|
|
3
|
+
import { uyTv as j } from "@payfit/unity-themes";
|
|
4
|
+
import { useId as L } from "react-aria";
|
|
5
|
+
import { useIntl as T } from "react-intl";
|
|
6
|
+
import { Pagination as O } from "../../pagination/Pagination.js";
|
|
7
|
+
import { SelectOption as R } from "../../select/parts/SelectOption.js";
|
|
8
8
|
import { Select as C } from "../../select/Select.js";
|
|
9
|
-
const E =
|
|
9
|
+
const E = j({
|
|
10
10
|
base: [
|
|
11
11
|
"uy:bg-surface-neutral-lowest",
|
|
12
12
|
"uy:sticky uy:bottom-0",
|
|
@@ -34,7 +34,7 @@ const E = O({
|
|
|
34
34
|
onPageSizeChange: o,
|
|
35
35
|
itemLabel: c = "unity:component:table:pagination:item",
|
|
36
36
|
...M
|
|
37
|
-
} = y, a =
|
|
37
|
+
} = y, a = L(), l = T(), [$, z] = I(P), S = {
|
|
38
38
|
pageCount: t,
|
|
39
39
|
defaultPage: p,
|
|
40
40
|
currentPage: u,
|
|
@@ -87,7 +87,7 @@ const E = O({
|
|
|
87
87
|
}
|
|
88
88
|
) }),
|
|
89
89
|
/* @__PURE__ */ e("div", { className: "uy:justify-self-center", children: t > 1 && /* @__PURE__ */ e(
|
|
90
|
-
|
|
90
|
+
O,
|
|
91
91
|
{
|
|
92
92
|
...S,
|
|
93
93
|
"aria-labelledby": `table-pagination-${a}-label`
|
|
@@ -123,7 +123,7 @@ const E = O({
|
|
|
123
123
|
o == null || o(d), z(d);
|
|
124
124
|
},
|
|
125
125
|
"aria-labelledby": `table-pagination-${a}-pagesize-label`,
|
|
126
|
-
children: (i) => /* @__PURE__ */ e(
|
|
126
|
+
children: (i) => /* @__PURE__ */ e(R, { id: i.value, children: i.label })
|
|
127
127
|
}
|
|
128
128
|
) })
|
|
129
129
|
] }) })
|
|
@@ -36,5 +36,5 @@ export declare const tableRow: import('tailwind-variants').TVReturnType<{} | {}
|
|
|
36
36
|
* {@link https://unity-components.payfit.io/?path=/story/data-table-tablerow--docs|API and Demos} •
|
|
37
37
|
* {@link https://payfit.design|Design docs}
|
|
38
38
|
*/
|
|
39
|
-
declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement
|
|
39
|
+
declare const TableRow: React.MemoExoticComponent<React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>>;
|
|
40
40
|
export { TableRow };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import n, { memo as c, forwardRef as y, useMemo as f, Children as m, cloneElement as p } from "react";
|
|
3
|
+
import { uyTv as v } from "@payfit/unity-themes";
|
|
4
|
+
const g = v({
|
|
5
5
|
base: [
|
|
6
6
|
"uy:group uy:h-500",
|
|
7
7
|
"uy:bg-surface-neutral uy:border-b uy:border-solid uy:border-b-border-neutral-enabled",
|
|
@@ -10,37 +10,39 @@ const m = y({
|
|
|
10
10
|
"uy:aria-[selected=true]:bg-surface-neutral-selected uy:aria-[selected=true]:border-b-border-neutral-selected",
|
|
11
11
|
"uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-offset-[-2px] uy:focus-visible:outline-utility-focus-ring"
|
|
12
12
|
]
|
|
13
|
-
}),
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
e,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
13
|
+
}), R = c(
|
|
14
|
+
y(
|
|
15
|
+
({ children: o, className: a, rowIndex: r = 0, onKeyDown: u, isSelected: t, ...s }, l) => {
|
|
16
|
+
const i = f(() => m.map(o, (e, b) => n.isValidElement(e) ? p(
|
|
17
|
+
e,
|
|
18
|
+
{
|
|
19
|
+
rowIndex: r,
|
|
20
|
+
colIndex: b,
|
|
21
|
+
...e.props
|
|
22
|
+
}
|
|
23
|
+
) : e), [o, r]);
|
|
24
|
+
return /* @__PURE__ */ d(
|
|
25
|
+
"tr",
|
|
26
|
+
{
|
|
27
|
+
ref: l,
|
|
28
|
+
role: "row",
|
|
29
|
+
className: g({ className: a }),
|
|
30
|
+
"aria-rowindex": r + 1,
|
|
31
|
+
"aria-selected": t,
|
|
32
|
+
onKeyDown: (e) => {
|
|
33
|
+
u == null || u(e);
|
|
34
|
+
},
|
|
35
|
+
"data-dd-privacy": "mask",
|
|
36
|
+
"data-selectable": t !== void 0,
|
|
37
|
+
...s,
|
|
38
|
+
children: i
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
)
|
|
41
43
|
);
|
|
42
|
-
|
|
44
|
+
R.displayName = "TableRow";
|
|
43
45
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
R as TableRow,
|
|
47
|
+
g as tableRow
|
|
46
48
|
};
|
|
@@ -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
|
import { tabsVariant } from './Tabs.variant.js';
|
|
4
4
|
interface TabsContextValue {
|
|
5
5
|
variant: VariantProps<typeof tabsVariant>['variant'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { TabsProps as AriaTabsProps } from 'react-aria-components';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import { tabsVariant } from './Tabs.variant.js';
|
|
4
4
|
export interface TabsProps extends Omit<AriaTabsProps, 'isDisabled' | 'orientation' | 'className' | 'style' | 'disabledKeys' | 'keyboardActivation' | 'slot'>, VariantProps<typeof tabsVariant> {
|
|
5
5
|
/** set to true to make the tabs scrollable */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Icon as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { uyTv as a } from "@payfit/unity-themes";
|
|
3
|
+
import { Button as s } from "react-aria-components";
|
|
4
|
+
import { Icon as y } from "../../icon/Icon.js";
|
|
5
|
+
const i = a({
|
|
6
6
|
slots: {
|
|
7
7
|
base: "uy:absolute uy:pt-150 uy:pb-150",
|
|
8
8
|
button: "uy:rounded-circle uy:hover:text-content-neutral-hover uy:focus-visible:outline-2 uy:focus-visible:outline-offset-2 uy:focus-visible:outline-utility-focus-ring",
|
|
@@ -18,17 +18,17 @@ const n = s({
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
}), g = ({ direction: t, onPress:
|
|
22
|
-
const { base:
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
21
|
+
}), g = ({ direction: t, onPress: e }) => {
|
|
22
|
+
const { base: o, button: l, icon: r } = i({ direction: t });
|
|
23
|
+
return /* @__PURE__ */ u("div", { className: o(), children: /* @__PURE__ */ u(
|
|
24
|
+
s,
|
|
25
25
|
{
|
|
26
26
|
id: `scroll-${t}`,
|
|
27
27
|
className: l(),
|
|
28
28
|
"aria-label": `Scroll ${t}`,
|
|
29
|
-
onPress:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
|
|
29
|
+
onPress: e,
|
|
30
|
+
children: /* @__PURE__ */ u(
|
|
31
|
+
y,
|
|
32
32
|
{
|
|
33
33
|
className: r(),
|
|
34
34
|
"aria-labelledby": `scroll-${t}`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TabProps as AriaTabProps } from 'react-aria-components';
|
|
3
|
-
export interface TabProps extends Omit<AriaTabProps, 'isDisabled' | 'className' | 'style' | 'download' | 'ping' | 'routerOptions'> {
|
|
2
|
+
import { TabProps as AriaTabProps, Key } from 'react-aria-components';
|
|
3
|
+
export interface TabProps extends Omit<AriaTabProps, 'isDisabled' | 'className' | 'style' | 'download' | 'ping' | 'routerOptions' | 'id'> {
|
|
4
|
+
id: Key | undefined;
|
|
4
5
|
suffix?: ReactNode;
|
|
5
6
|
}
|
|
6
7
|
declare const Tab: import('react').ForwardRefExoticComponent<TabProps & {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Tab as
|
|
4
|
-
import { useTabsContext as
|
|
5
|
-
import { tabsVariant as
|
|
6
|
-
const
|
|
7
|
-
({ children: a, suffix: r,
|
|
8
|
-
const { variant:
|
|
9
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import { Tab as p } from "react-aria-components";
|
|
4
|
+
import { useTabsContext as c } from "../Tabs.context.js";
|
|
5
|
+
import { tabsVariant as f } from "../Tabs.variant.js";
|
|
6
|
+
const T = b(
|
|
7
|
+
({ children: a, suffix: r, id: o, ...t }, s) => {
|
|
8
|
+
const { variant: m, scrollable: n } = c(), { tab: e } = f({ variant: m, scrollable: n });
|
|
9
|
+
return /* @__PURE__ */ i(p, { ref: s, id: o, ...t, className: e(), children: [
|
|
10
10
|
a,
|
|
11
|
-
r ? /* @__PURE__ */
|
|
11
|
+
r ? /* @__PURE__ */ l("span", { children: r }) : null
|
|
12
12
|
] });
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
|
|
15
|
+
T.displayName = "Tab";
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
T as Tab
|
|
18
18
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { TabPanelProps as AriaTabPanelProps } from 'react-aria-components';
|
|
2
|
-
export
|
|
1
|
+
import { TabPanelProps as AriaTabPanelProps, Key } from 'react-aria-components';
|
|
2
|
+
export interface TabPanelProps extends Omit<AriaTabPanelProps, 'classname' | 'style' | 'id'> {
|
|
3
|
+
id: Key | undefined;
|
|
4
|
+
}
|
|
3
5
|
declare const TabPanel: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
6
|
export { TabPanel };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { TabPanel as
|
|
4
|
-
const
|
|
5
|
-
({ children: a,
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { TabPanel as n } from "react-aria-components";
|
|
4
|
+
const p = t(
|
|
5
|
+
({ children: a, id: r, ...o }, e) => /* @__PURE__ */ m(n, { "data-dd-privacy": "mask", id: r, ref: e, ...o, children: a })
|
|
6
6
|
);
|
|
7
|
-
|
|
7
|
+
p.displayName = "TabPanel";
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
p as TabPanel
|
|
10
10
|
};
|
|
@@ -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 taskMenu: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as u } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { uyTv as d } from "@payfit/unity-themes";
|
|
4
4
|
import { useBreakpointListener as l } from "../../hooks/use-breakpoint-listener.js";
|
|
5
|
-
import { Content as
|
|
6
|
-
import { Header as
|
|
7
|
-
import { TaskMenuProvider as
|
|
5
|
+
import { Content as y } from "./parts/Content.js";
|
|
6
|
+
import { Header as f } from "./parts/Header.js";
|
|
7
|
+
import { TaskMenuProvider as p } from "./TaskMenu.context.js";
|
|
8
8
|
const c = d({
|
|
9
9
|
slots: {
|
|
10
10
|
base: [
|
|
@@ -15,9 +15,9 @@ const c = d({
|
|
|
15
15
|
}), b = u(
|
|
16
16
|
({ children: o, label: s, ...t }, a) => {
|
|
17
17
|
const { base: n } = c(), e = l(), i = e === "xs" || e === "sm";
|
|
18
|
-
return /* @__PURE__ */ r("nav", { ...t, className: n(), ref: a, "aria-label": s, children: /* @__PURE__ */ m(
|
|
19
|
-
i && /* @__PURE__ */ r(
|
|
20
|
-
/* @__PURE__ */ r(
|
|
18
|
+
return /* @__PURE__ */ r("nav", { ...t, className: n(), ref: a, "aria-label": s, children: /* @__PURE__ */ m(p, { children: [
|
|
19
|
+
i && /* @__PURE__ */ r(f, {}),
|
|
20
|
+
/* @__PURE__ */ r(y, { children: o })
|
|
21
21
|
] }) });
|
|
22
22
|
}
|
|
23
23
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { uyTv as a } from "@payfit/unity-themes";
|
|
3
|
+
import { FocusScope as p, useOverlay as f, mergeProps as b } from "react-aria";
|
|
4
4
|
import { useBreakpointListener as i } from "../../../hooks/use-breakpoint-listener.js";
|
|
5
5
|
import { useTaskMenuContext as r } from "../TaskMenu.context.js";
|
|
6
|
-
const v =
|
|
6
|
+
const v = a({
|
|
7
7
|
base: [
|
|
8
8
|
"uy:flex uy:flex-col uy:mt-100",
|
|
9
9
|
"uy:flex uy:md:flex-col uy:md:gap-200 uy:md:list-none uy:md:mt-0",
|
|
@@ -15,7 +15,7 @@ const v = b({
|
|
|
15
15
|
state: o,
|
|
16
16
|
overlayProps: c,
|
|
17
17
|
overlayRef: t
|
|
18
|
-
} = r(), u = i(), y = u === "xs" || u === "sm", { overlayProps: m } =
|
|
18
|
+
} = r(), u = i(), y = u === "xs" || u === "sm", { overlayProps: m } = f(
|
|
19
19
|
{
|
|
20
20
|
onClose: () => o == null ? void 0 : o.close(),
|
|
21
21
|
isOpen: o == null ? void 0 : o.isOpen,
|
|
@@ -26,7 +26,7 @@ const v = b({
|
|
|
26
26
|
return /* @__PURE__ */ n(
|
|
27
27
|
"ol",
|
|
28
28
|
{
|
|
29
|
-
...
|
|
29
|
+
...b(m, c),
|
|
30
30
|
ref: t,
|
|
31
31
|
className: v(),
|
|
32
32
|
id: e,
|
|
@@ -36,7 +36,7 @@ const v = b({
|
|
|
36
36
|
);
|
|
37
37
|
}, d = ({ children: s }) => {
|
|
38
38
|
const { state: e } = r();
|
|
39
|
-
return !!(e != null && e.isOpen) && /* @__PURE__ */ n("div", { className: "uy:absolute uy:z-9 uy:top-full uy:inset-x-0 uy:h-[100dvh] uy:bg-surface-neutral", children: /* @__PURE__ */ n(
|
|
39
|
+
return !!(e != null && e.isOpen) && /* @__PURE__ */ n("div", { className: "uy:absolute uy:z-9 uy:top-full uy:inset-x-0 uy:h-[100dvh] uy:bg-surface-neutral", children: /* @__PURE__ */ n(p, { contain: !0, restoreFocus: !0, autoFocus: !0, children: /* @__PURE__ */ n(l, { children: s }) }) });
|
|
40
40
|
}, x = ({ children: s }) => {
|
|
41
41
|
const e = i();
|
|
42
42
|
return e === "xs" || e === "sm" ? /* @__PURE__ */ n(d, { children: s }) : /* @__PURE__ */ n(l, { children: s });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { uyTv as m } from "@payfit/unity-themes";
|
|
3
|
+
import { useIntl as p } from "react-intl";
|
|
4
4
|
import { IconButton as c } from "../../icon-button/IconButton.js";
|
|
5
5
|
import { Text as f } from "../../text/Text.js";
|
|
6
6
|
import { useTaskMenuContext as y } from "../TaskMenu.context.js";
|
|
7
|
-
const h =
|
|
7
|
+
const h = m({
|
|
8
8
|
slots: {
|
|
9
9
|
header: ["uy:flex uy:px-300 uy:py-200 uy:gap-200 uy:shadow-raising"],
|
|
10
10
|
headerSelectedTask: ["uy:flex-1 uy:basis-full uy:self-center"]
|
|
@@ -17,13 +17,13 @@ const h = p({
|
|
|
17
17
|
state: e,
|
|
18
18
|
triggerProps: a,
|
|
19
19
|
triggerRef: i
|
|
20
|
-
} = y(), l =
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
} = y(), l = p(), { header: t, headerSelectedTask: u } = h();
|
|
21
|
+
return /* @__PURE__ */ d("div", { className: t(), children: [
|
|
22
22
|
/* @__PURE__ */ o(
|
|
23
23
|
f,
|
|
24
24
|
{
|
|
25
25
|
asElement: "span",
|
|
26
|
-
className:
|
|
26
|
+
className: u(),
|
|
27
27
|
"aria-describedby": r,
|
|
28
28
|
children: n == null ? void 0 : n.label
|
|
29
29
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as O, useEffect as z } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { uyTv as E } from "@payfit/unity-themes";
|
|
4
|
+
import { Link as F, Button as R } from "react-aria-components";
|
|
5
|
+
import { useIntl as A, FormattedMessage as g } from "react-intl";
|
|
6
6
|
import { useRouter as D } from "../../../providers/router/RouterProvider.js";
|
|
7
7
|
import { Icon as y } from "../../icon/Icon.js";
|
|
8
8
|
import { Text as I } from "../../text/Text.js";
|
|
9
9
|
import { useTaskMenuContext as V } from "../TaskMenu.context.js";
|
|
10
10
|
import G from "./dot.svg.js";
|
|
11
11
|
import { commonTask as H } from "./task.variants.js";
|
|
12
|
-
const J =
|
|
12
|
+
const J = E({
|
|
13
13
|
extend: H,
|
|
14
14
|
slots: {
|
|
15
15
|
base: ["uy:gap-300 uy:py-100", "uy:md:py-50"],
|
|
@@ -134,7 +134,7 @@ const J = A({
|
|
|
134
134
|
uniqueId: r,
|
|
135
135
|
...p
|
|
136
136
|
}, h) => {
|
|
137
|
-
const k =
|
|
137
|
+
const k = A(), u = D(), { currentTask: a, setCurrentTask: l, state: m } = V();
|
|
138
138
|
z(() => {
|
|
139
139
|
o && (u != null && u.isActive(o.toString(), i)) && (l == null || l({ uniqueId: r, label: n }));
|
|
140
140
|
}, [o, i, u, r, n]);
|
|
@@ -147,7 +147,7 @@ const J = A({
|
|
|
147
147
|
"data-current": c,
|
|
148
148
|
"aria-current": c ? "page" : void 0
|
|
149
149
|
}
|
|
150
|
-
), x = o ?
|
|
150
|
+
), x = o ? F : R;
|
|
151
151
|
return /* @__PURE__ */ s(
|
|
152
152
|
"li",
|
|
153
153
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
3
|
import { AriaButtonProps } from 'react-aria';
|
|
3
|
-
import { VariantProps } from 'tailwind-variants';
|
|
4
4
|
export declare const task: import('tailwind-variants').TVReturnType<{
|
|
5
5
|
isSelected: {
|
|
6
6
|
false: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as w, useEffect as z } from "react";
|
|
3
|
+
import { uyTv as A } from "@payfit/unity-themes";
|
|
3
4
|
import { Link as B, Button as C } from "react-aria-components";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { tv as V } from "tailwind-variants";
|
|
5
|
+
import { useIntl as V, FormattedMessage as b } from "react-intl";
|
|
6
6
|
import { useRouter as D } from "../../../providers/router/RouterProvider.js";
|
|
7
7
|
import { Icon as h } from "../../icon/Icon.js";
|
|
8
8
|
import { Text as v } from "../../text/Text.js";
|
|
9
9
|
import { useTaskMenuContext as G } from "../TaskMenu.context.js";
|
|
10
10
|
import { commonTask as H } from "./task.variants.js";
|
|
11
|
-
const I =
|
|
11
|
+
const I = A({
|
|
12
12
|
extend: H,
|
|
13
13
|
slots: {
|
|
14
14
|
base: [],
|
|
@@ -55,7 +55,7 @@ const I = V({
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
]
|
|
58
|
-
}), J =
|
|
58
|
+
}), J = w(
|
|
59
59
|
({
|
|
60
60
|
href: n,
|
|
61
61
|
isExact: p = !1,
|
|
@@ -67,17 +67,17 @@ const I = V({
|
|
|
67
67
|
uniqueId: o,
|
|
68
68
|
...y
|
|
69
69
|
}, S) => {
|
|
70
|
-
const r = D(), g =
|
|
71
|
-
currentTask:
|
|
70
|
+
const r = D(), g = V(), {
|
|
71
|
+
currentTask: u,
|
|
72
72
|
setCurrentTask: t,
|
|
73
|
-
state:
|
|
73
|
+
state: d,
|
|
74
74
|
expandedTaskGroup: f,
|
|
75
75
|
toggleTaskGroup: i
|
|
76
76
|
} = G(), M = n ? B : C;
|
|
77
|
-
|
|
77
|
+
z(() => {
|
|
78
78
|
n && (r != null && r.isActive(n.toString(), p)) && (t == null || t({ uniqueId: o, label: s }));
|
|
79
79
|
}, [n, p, r, s, o]);
|
|
80
|
-
const a = (
|
|
80
|
+
const a = (u == null ? void 0 : u.uniqueId) === o, L = Object.assign(
|
|
81
81
|
{},
|
|
82
82
|
a !== void 0 && {
|
|
83
83
|
"data-current": a,
|
|
@@ -93,8 +93,8 @@ const I = V({
|
|
|
93
93
|
{
|
|
94
94
|
className: O(),
|
|
95
95
|
href: n,
|
|
96
|
-
onPress: (
|
|
97
|
-
t == null || t({ uniqueId: o, label: s }),
|
|
96
|
+
onPress: (T) => {
|
|
97
|
+
t == null || t({ uniqueId: o, label: s }), d == null || d.toggle(), f && (i == null || i(f)), m == null || m(T);
|
|
98
98
|
},
|
|
99
99
|
...L,
|
|
100
100
|
...y,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as j, Children as d, isValidElement as u, cloneElement as A } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { uyTv as V } from "@payfit/unity-themes";
|
|
4
|
+
import { useId as $ } from "react-aria";
|
|
5
|
+
import { Button as B } from "react-aria-components";
|
|
6
|
+
import { useIntl as D } from "react-intl";
|
|
7
7
|
import { Icon as F } from "../../icon/Icon.js";
|
|
8
8
|
import { Text as g } from "../../text/Text.js";
|
|
9
9
|
import { useTaskMenuContext as H } from "../TaskMenu.context.js";
|
|
10
10
|
import { commonTask as O } from "./task.variants.js";
|
|
11
|
-
const P =
|
|
11
|
+
const P = V({
|
|
12
12
|
extend: O,
|
|
13
13
|
slots: {
|
|
14
14
|
base: ["uy:relative uy:flex-col uy:px-200", "uy:md:px-0"],
|
|
@@ -84,7 +84,7 @@ const P = D({
|
|
|
84
84
|
uniqueId: y,
|
|
85
85
|
...S
|
|
86
86
|
}, h) => {
|
|
87
|
-
const { currentTask: l, setCurrentTask: i, toggleTaskGroup: m, expandedTaskGroup: k } = H(), b =
|
|
87
|
+
const { currentTask: l, setCurrentTask: i, toggleTaskGroup: m, expandedTaskGroup: k } = H(), b = $(), T = D(), a = k === y, N = (o) => {
|
|
88
88
|
if (m == null || m(y), !o) {
|
|
89
89
|
const x = U(e);
|
|
90
90
|
if (u(x)) {
|
|
@@ -109,7 +109,7 @@ const P = D({
|
|
|
109
109
|
className: w(),
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ c(
|
|
112
|
-
|
|
112
|
+
B,
|
|
113
113
|
{
|
|
114
114
|
id: f,
|
|
115
115
|
className: C(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
1
2
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import { text } from './Text.variants.js';
|
|
4
4
|
export type ValidTextElements = 'p' | 'span' | 'div' | 'abbr' | 'dfn' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'em' | 'strong' | 'small';
|
|
5
5
|
export type TextProps = PropsWithChildren<HTMLAttributes<HTMLSpanElement> & {
|