@payfit/unity-components 3.29.60 → 3.29.61
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/core/components/action-bar/parts/ActionBarOverflowMenu.d.ts +1 -1
- package/dist/esm/core/components/action-bar/parts/ActionBarPrefixArea.d.ts +1 -1
- package/dist/esm/core/components/actionable/Actionable.js +13 -13
- package/dist/esm/core/components/alert/parts/AlertActions.d.ts +1 -1
- package/dist/esm/core/components/anchor/Anchor.d.ts +1 -1
- package/dist/esm/core/components/app-menu/parts/AppMenu.context.d.ts +1 -1
- package/dist/esm/core/components/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/esm/core/components/autocomplete/parts/AutocompleteItem.d.ts +1 -1
- package/dist/esm/core/components/autocomplete/parts/AutocompleteItemGroup.d.ts +1 -1
- package/dist/esm/core/components/autocomplete/parts/AutocompletePanel.d.ts +1 -1
- package/dist/esm/core/components/avatar/Avatar.d.ts +1 -1
- package/dist/esm/core/components/avatar/Avatar.js +7 -7
- package/dist/esm/core/components/avatar/AvatarWithTooltip.js +4 -4
- package/dist/esm/core/components/avatar/InteractiveAvatar.js +4 -4
- package/dist/esm/core/components/avatar/parts/AvatarPair.d.ts +1 -1
- package/dist/esm/core/components/badge/Badge.d.ts +1 -1
- package/dist/esm/core/components/badge/parts/BadgeDot.d.ts +1 -1
- package/dist/esm/core/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/dist/esm/core/components/bottom-sheet/parts/BottomSheetContent.d.ts +1 -1
- package/dist/esm/core/components/bottom-sheet/parts/BottomSheetFooter.d.ts +1 -1
- package/dist/esm/core/components/bottom-sheet/parts/BottomSheetHeader.d.ts +1 -1
- package/dist/esm/core/components/bottom-sheet/test-utils.d.ts +1 -1
- package/dist/esm/core/components/breadcrumbs/Breadcrumbs.context.d.ts +1 -1
- package/dist/esm/core/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/esm/core/components/button/Button.d.ts +1 -1
- package/dist/esm/core/components/card/Card.d.ts +1 -1
- package/dist/esm/core/components/card/parts/CardContent.d.ts +1 -1
- package/dist/esm/core/components/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/dist/esm/core/components/client-side-pagination/ClientSidePagination.d.ts +1 -1
- package/dist/esm/core/components/client-side-pagination/parts/PaginationEllipsis.d.ts +1 -1
- package/dist/esm/core/components/client-side-pagination/parts/PaginationJumpDialog.js +8 -8
- package/dist/esm/core/components/client-side-pagination/parts/RawPaginationLink.d.ts +1 -1
- package/dist/esm/core/components/collapsible/Collapsible.d.ts +1 -1
- package/dist/esm/core/components/collapsible/parts/CollapsibleContent.d.ts +1 -1
- package/dist/esm/core/components/collapsible-group/CollapsibleGroup.d.ts +1 -1
- package/dist/esm/core/components/dialog/Dialog.d.ts +1 -1
- package/dist/esm/core/components/dialog/parts/DialogActions/DialogButton.d.ts +1 -1
- package/dist/esm/core/components/dropzone/DropzoneOverlay.js +6 -6
- package/dist/esm/core/components/error-state/ErrorState.d.ts +1 -1
- package/dist/esm/core/components/error-state/initConfig.d.ts +2 -2
- package/dist/esm/core/components/error-state/initConfig.js +7 -7
- package/dist/esm/core/components/fieldset/Fieldset.d.ts +1 -1
- package/dist/esm/core/components/filter/Filter.types.d.ts +1 -1
- package/dist/esm/core/components/filter/parts/FilterButton.d.ts +2 -2
- package/dist/esm/core/components/filter/parts/FilterPopover.d.ts +1 -1
- package/dist/esm/core/components/filter-toolbar/parts/AddFilter.d.ts +1 -1
- package/dist/esm/core/components/filter-toolbar/parts/AddFilterItem.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/FunnelLayout.context.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelBody.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelPage.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelPageContent.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelPageFooter.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelPageHeader.d.ts +1 -1
- package/dist/esm/core/components/funnel-layout/parts/FunnelSidebar.d.ts +1 -1
- package/dist/esm/core/components/icon/Icon.d.ts +1 -1
- package/dist/esm/core/components/icon-button/CircularIconButton.d.ts +1 -1
- package/dist/esm/core/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/core/components/link/RawLink.d.ts +1 -1
- package/dist/esm/core/components/link-button/RawLinkButton.d.ts +1 -1
- package/dist/esm/core/components/menu/parts/MenuHeader.d.ts +1 -1
- package/dist/esm/core/components/menu/parts/MenuTrigger.d.ts +1 -1
- package/dist/esm/core/components/multi-select/MultiSelect.js +8 -8
- package/dist/esm/core/components/nav/parts/RawNavItem.d.ts +1 -1
- package/dist/esm/core/components/number-input/NumberInput.d.ts +1 -1
- package/dist/esm/core/components/page/Page.d.ts +1 -1
- package/dist/esm/core/components/page/parts/PageHeader.d.ts +1 -1
- package/dist/esm/core/components/pagination/Pagination.d.ts +1 -1
- package/dist/esm/core/components/pagination/parts/PaginationContent.d.ts +1 -1
- package/dist/esm/core/components/pagination/parts/PaginationEllipsis.d.ts +1 -1
- package/dist/esm/core/components/pagination/parts/RawPaginationLink.d.ts +1 -1
- package/dist/esm/core/components/pagination/parts/RawPaginationNext.d.ts +1 -1
- package/dist/esm/core/components/pagination/parts/RawPaginationPrevious.d.ts +1 -1
- package/dist/esm/core/components/phone-number/parts/PhoneNumberItem.d.ts +1 -1
- package/dist/esm/core/components/pill/Pill.d.ts +1 -1
- package/dist/esm/core/components/progress-bar/ProgressBar.d.ts +1 -1
- package/dist/esm/core/components/promo-dialog/PromoDialog.d.ts +1 -1
- package/dist/esm/core/components/radio-button-group/parts/RadioButton.d.ts +1 -1
- package/dist/esm/core/components/radio-button-group/parts/RadioIndicator.d.ts +1 -1
- package/dist/esm/core/components/search/Search.d.ts +1 -1
- package/dist/esm/core/components/segmented-button-group/parts/ToggleButton.d.ts +1 -1
- package/dist/esm/core/components/segmented-button-group/parts/ToggleButton.js +4 -4
- package/dist/esm/core/components/select-list/parts/SelectedItemsSection.d.ts +1 -1
- package/dist/esm/core/components/selectable-button-group/SelectableButtonGroup.d.ts +1 -1
- package/dist/esm/core/components/selectable-button-group/parts/SelectableButton.js +7 -7
- package/dist/esm/core/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.d.ts +1 -1
- package/dist/esm/core/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.d.ts +1 -1
- package/dist/esm/core/components/side-panel/SidePanel.d.ts +1 -1
- package/dist/esm/core/components/side-panel/parts/SidePanelContent.d.ts +1 -1
- package/dist/esm/core/components/side-panel/parts/SidePanelFooter.d.ts +1 -1
- package/dist/esm/core/components/side-panel/parts/SidePanelHeader.d.ts +1 -1
- package/dist/esm/core/components/stepper/Stepper.context.d.ts +1 -1
- package/dist/esm/core/components/table/parts/TableEmptyState.d.ts +3 -3
- package/dist/esm/core/components/table/parts/TablePagination.d.ts +1 -1
- package/dist/esm/core/components/tabs/Tabs.context.d.ts +1 -1
- package/dist/esm/core/components/tabs/Tabs.d.ts +1 -1
- package/dist/esm/core/components/task-menu/TaskMenu.d.ts +1 -1
- package/dist/esm/core/components/task-menu/parts/RawTask.d.ts +1 -1
- package/dist/esm/core/components/text/Text.d.ts +1 -1
- package/dist/esm/core/components/timeline/Timeline.d.ts +1 -1
- package/dist/esm/core/components/toast/UnityToast.d.ts +1 -1
- package/dist/esm/core/components/toast/parts/ToastAction.d.ts +1 -1
- package/dist/esm/core/components/toggle-switch/ToggleSwitch.d.ts +1 -1
- package/dist/esm/core/components/toggle-switch-group/ToggleSwitchGroup.d.ts +1 -1
- package/dist/esm/docs/reference/catalog/CatalogCard.d.ts +1 -1
- package/dist/esm/modules/ai-kit/components/ai-button/AIButton.d.ts +1 -1
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerActions.d.ts +1 -1
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.d.ts +1 -1
- package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardActions.d.ts +1 -1
- package/dist/esm/modules/ai-kit/components/ai-structured-input/hooks/use-ai-structured-input-navigation.d.ts +1 -4
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.d.ts +1 -1
- package/dist/esm/modules/ai-kit/index.d.ts +4 -4
- package/dist/esm/modules/tanstack-form/components/checkbox-field/TanstackCheckboxField.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/checkbox-group-field/TanstackCheckGroupField.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/date-picker-field/TanstackDatePickerField.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/date-range-picker-field/TanstackDateRangePickerField.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/inline-field/parts/InlineFieldReadView.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/inline-field-group/parts/InlineFieldGroupReadView.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/password-field/parts/PasswordFieldDetails.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/password-field/parts/ValidationRuleItem.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/components/text-field/TanstackTextField.d.ts +1 -1
- package/dist/esm/modules/tanstack-form/hooks/tanstack-form-default-values.d.ts +1 -4
- package/dist/esm/modules/tanstack-table/components/data-table/DataTable.d.ts +1 -1
- package/dist/esm/modules/tanstack-table/components/data-table/DataTable.js +7 -7
- package/package.json +6 -6
- package/skills/unity-data-table/SKILL.md +9 -10
- package/skills/unity-data-table/references/patterns.md +28 -30
- package/skills/unity-find-component/SKILL.md +23 -26
- package/skills/unity-layout/SKILL.md +16 -4
- package/skills/unity-layout/references/patterns.md +10 -2
- package/skills/unity-migrate-from-midnight/SKILL.md +8 -2
- package/skills/unity-navigation/SKILL.md +3 -2
- package/skills/unity-navigation/references/patterns.md +9 -7
- package/skills/unity-overlays/SKILL.md +8 -2
- package/skills/unity-overlays/references/patterns.md +21 -22
- package/skills/unity-tanstack-form/SKILL.md +18 -15
- package/skills/unity-tanstack-form/references/patterns.md +3 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VariantProps } from '@payfit/unity-themes';
|
|
2
1
|
import { SwitchFieldProps as AriaSwitchFieldProps } from 'react-aria-components/Switch';
|
|
2
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
3
3
|
export declare const toggleSwitch: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
isDisabled: {
|
|
5
5
|
false: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VariantProps } from '@payfit/unity-themes';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
3
3
|
export declare const toggleSwitchGroup: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex uy:flex-col uy:gap-50", {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
4
|
export interface ToggleSwitchGroupProps extends VariantProps<typeof toggleSwitchGroup> {
|
|
5
5
|
/** The label for the group. */
|
|
@@ -4,5 +4,5 @@ interface CatalogCardProps {
|
|
|
4
4
|
principalTitle?: string;
|
|
5
5
|
relatedTitles: string[];
|
|
6
6
|
}
|
|
7
|
-
export declare function CatalogCard({ entry, principalTitle, relatedTitles
|
|
7
|
+
export declare function CatalogCard({ entry, principalTitle, relatedTitles }: CatalogCardProps): import('react/jsx-runtime').JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UnityIcon } from '@payfit/unity-icons';
|
|
2
1
|
import { PropsWithChildren } from 'react';
|
|
3
2
|
import { ButtonProps as AriaButtonProps } from 'react-aria-components/Button';
|
|
3
|
+
import { UnityIcon } from '@payfit/unity-icons';
|
|
4
4
|
/**
|
|
5
5
|
* Configures an AI-assisted action and inherits standard React Aria button
|
|
6
6
|
* behavior such as `onPress`, `isDisabled`, and `type`.
|
|
@@ -20,6 +20,6 @@ export interface AIComposerActionsProps {
|
|
|
20
20
|
* @see {@link AIComposerActionsProps} for all available props.
|
|
21
21
|
*/
|
|
22
22
|
export declare const AIComposerActions: {
|
|
23
|
-
({ left, right, className
|
|
23
|
+
({ left, right, className }: AIComposerActionsProps): import('react/jsx-runtime').JSX.Element;
|
|
24
24
|
displayName: string;
|
|
25
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { UnityIcon } from '@payfit/unity-icons';
|
|
3
2
|
import { TagProps } from 'react-aria-components/TagGroup';
|
|
3
|
+
import { UnityIcon } from '@payfit/unity-icons';
|
|
4
4
|
export type AIComposerAttachmentProps = Omit<TagProps, 'children' | 'className' | 'style'> & {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
/** Identifies the attachment type before its name. */
|
|
@@ -15,7 +15,7 @@ export type AIOutcomeCardActionsProps = PropsWithChildren<Pick<HTMLAttributes<HT
|
|
|
15
15
|
* @param props.className - Additional classes merged with the suffix layout.
|
|
16
16
|
*/
|
|
17
17
|
declare const AIOutcomeCardActions: {
|
|
18
|
-
({ children, className
|
|
18
|
+
({ children, className }: AIOutcomeCardActionsProps): import('react/jsx-runtime').JSX.Element;
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
21
|
export { AIOutcomeCardActions };
|
|
@@ -9,10 +9,7 @@ export interface AIStructuredInputNavigationStep<TStepId extends string = string
|
|
|
9
9
|
autoAdvanceOnAnswer: boolean;
|
|
10
10
|
}
|
|
11
11
|
/** Options for `useAIStructuredInputNavigation`. */
|
|
12
|
-
export interface UseAIStructuredInputNavigationOptions<TSteps extends readonly [
|
|
13
|
-
AIStructuredInputNavigationStep,
|
|
14
|
-
...AIStructuredInputNavigationStep[]
|
|
15
|
-
]> {
|
|
12
|
+
export interface UseAIStructuredInputNavigationOptions<TSteps extends readonly [AIStructuredInputNavigationStep, ...AIStructuredInputNavigationStep[]]> {
|
|
16
13
|
/**
|
|
17
14
|
* Ordered step IDs and required per-step answer-advance policy. Append new
|
|
18
15
|
* steps at the end; removing or reordering existing steps is unsupported.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CardProps } from '../../../../core/components/card/Card.js';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { CardProps } from '../../../../core/components/card/Card.js';
|
|
3
3
|
import { AIProposalCardState } from './ProposalCard.context.js';
|
|
4
4
|
export interface AIProposalCardProps extends Omit<CardProps, 'children' | 'density'> {
|
|
5
5
|
/** Compound AIProposalCard parts that describe the proposed operation. */
|
|
@@ -5,11 +5,11 @@ export { AIProposalCardSubtitle, type AIProposalCardSubtitleProps, } from './com
|
|
|
5
5
|
export { AIProposalCardTitle, type AIProposalCardTitleProps, } from './components/proposal-card/parts/ProposalCardTitle.js';
|
|
6
6
|
export { AIProposalCardContent, type AIProposalCardContentProps, } from './components/proposal-card/parts/ProposalCardContent.js';
|
|
7
7
|
export { AIProposalCardActions, type AIProposalCardActionsProps, } from './components/proposal-card/parts/ProposalCardActions.js';
|
|
8
|
-
export { PayfitAIBrand, type PayfitAIBrandProps
|
|
8
|
+
export { PayfitAIBrand, type PayfitAIBrandProps } from './components/payfit-ai-brand/PayfitAIBrand.js';
|
|
9
9
|
export { AITriggerButton, type AITriggerButtonBrandSlotProps, type AITriggerButtonProps, } from './components/ai-trigger-button/AITriggerButton.js';
|
|
10
10
|
export { AIComposerAttachment, type AIComposerAttachmentProps, } from './components/ai-composer/parts/AIComposerAttachment.js';
|
|
11
11
|
export { AIComposerAttachmentsGroup, type AIComposerAttachmentsGroupProps, } from './components/ai-composer/parts/AIComposerAttachmentsGroup.js';
|
|
12
|
-
export { AIComposer, type AIComposerProps
|
|
12
|
+
export { AIComposer, type AIComposerProps } from './components/ai-composer/AIComposer.js';
|
|
13
13
|
export { type AIComposerEnterKeyBehavior, type AIComposerState, } from './components/ai-composer/AIComposer.context.js';
|
|
14
14
|
export { AIComposerAction, type AIComposerActionProps, } from './components/ai-composer/parts/AIComposerAction.js';
|
|
15
15
|
export { AIComposerActions, type AIComposerActionsProps, } from './components/ai-composer/parts/AIComposerActions.js';
|
|
@@ -23,11 +23,11 @@ export { AIStructuredInputFreeTextAnswer, type AIStructuredInputFreeTextAnswerPr
|
|
|
23
23
|
export { AIStructuredInputStep, type AIStructuredInputStepProps, } from './components/ai-structured-input/parts/AIStructuredInputStep.js';
|
|
24
24
|
export { AIStructuredInputStepTitle, type AIStructuredInputStepTitleProps, } from './components/ai-structured-input/parts/AIStructuredInputStepTitle.js';
|
|
25
25
|
export { useAIStructuredInputNavigation, type AIStructuredInputNavigationStep, type UseAIStructuredInputNavigationOptions, type UseAIStructuredInputNavigationResult, } from './components/ai-structured-input/hooks/use-ai-structured-input-navigation.js';
|
|
26
|
-
export { aiGradientEffect, aiGradientSurfaceEffect
|
|
26
|
+
export { aiGradientEffect, aiGradientSurfaceEffect } from './utils/ai-gradient-effect.js';
|
|
27
27
|
export { aiKitForm, useAIKitForm } from './hooks/use-ai-kit-form.js';
|
|
28
28
|
export type { AIStructuredInputAnswerValue, TanstackAIStructuredInputAnswersFieldProps, } from './components/ai-structured-input/form/TanstackAIStructuredInputAnswersField.js';
|
|
29
29
|
export type { TanstackAIStructuredInputFormProps } from './components/ai-structured-input/form/TanstackAIStructuredInputForm.js';
|
|
30
|
-
export { useAIKitFieldContext, useAIKitFormContext
|
|
30
|
+
export { useAIKitFieldContext, useAIKitFormContext } from './hooks/ai-kit-form-context.js';
|
|
31
31
|
export { AIChatEventFeedback, type AIChatEventFeedbackProps, } from './components/aichat-event-feedback/AIChatEventFeedback.js';
|
|
32
32
|
export { RawAIOutcomeCard, type RawAIOutcomeCardProps, } from './components/ai-outcome-card/RawAIOutcomeCard.js';
|
|
33
33
|
export { AIOutcomeCardIcon, type AIOutcomeCardIconProps, } from './components/ai-outcome-card/parts/AIOutcomeCardIcon.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TanstackCheckboxProps } from '../checkbox/TanstackCheckbox.js';
|
|
3
2
|
import { LabelProps } from '../../../../core/components/label/Label.js';
|
|
3
|
+
import { TanstackCheckboxProps } from '../checkbox/TanstackCheckbox.js';
|
|
4
4
|
export interface FieldProps extends Pick<LabelProps, 'isRequired' | 'requiredVariant'> {
|
|
5
5
|
/** The label for the checkbox. */
|
|
6
6
|
children: ReactNode;
|
package/dist/esm/modules/tanstack-form/components/checkbox-group-field/TanstackCheckGroupField.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TanstackCheckboxGroupProps } from '../checkbox-group/TanstackCheckboxGroup.js';
|
|
3
2
|
import { LabelProps } from '../../../../core/components/label/Label.js';
|
|
3
|
+
import { TanstackCheckboxGroupProps } from '../checkbox-group/TanstackCheckboxGroup.js';
|
|
4
4
|
export interface FieldProps extends Pick<LabelProps, 'isRequired' | 'requiredVariant'> {
|
|
5
5
|
/** Helper text to display below the group. */
|
|
6
6
|
helperText?: ReactNode;
|
package/dist/esm/modules/tanstack-form/components/date-picker-field/TanstackDatePickerField.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TanstackDatePickerProps } from '../date-picker/TanstackDatePicker.js';
|
|
3
2
|
import { LabelProps } from '../../../../core/components/label/Label.js';
|
|
3
|
+
import { TanstackDatePickerProps } from '../date-picker/TanstackDatePicker.js';
|
|
4
4
|
export type TanstackDatePickerFieldProps = TanstackDatePickerProps & Pick<LabelProps, 'isRequired' | 'requiredVariant'> & {
|
|
5
5
|
/** The label for the date picker field. */
|
|
6
6
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TanstackDateRangePickerProps } from '../date-range-picker/TanstackDateRangePicker.js';
|
|
3
2
|
import { LabelProps } from '../../../../core/components/label/Label.js';
|
|
3
|
+
import { TanstackDateRangePickerProps } from '../date-range-picker/TanstackDateRangePicker.js';
|
|
4
4
|
export type TanstackDateRangePickerFieldProps = TanstackDateRangePickerProps & Pick<LabelProps, 'isRequired' | 'requiredVariant'> & {
|
|
5
5
|
/** The label for the date range picker field. */
|
|
6
6
|
label: string;
|
package/dist/esm/modules/tanstack-form/components/inline-field/parts/InlineFieldReadView.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface InlineFieldReadViewProps {
|
|
|
69
69
|
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/core/components/inline-field GitHub}
|
|
70
70
|
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/forms-reference-inlinefield--docs unity-components.payfit.io}
|
|
71
71
|
*/
|
|
72
|
-
export declare function InlineFieldReadView({ children, successMessage
|
|
72
|
+
export declare function InlineFieldReadView({ children, successMessage }: InlineFieldReadViewProps): import('react/jsx-runtime').JSX.Element;
|
|
73
73
|
export declare namespace InlineFieldReadView {
|
|
74
74
|
var displayName: string;
|
|
75
75
|
}
|
|
@@ -50,7 +50,7 @@ export interface InlineFieldGroupReadViewProps extends PropsWithChildren {
|
|
|
50
50
|
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/core/components/inline-field-group GitHub}
|
|
51
51
|
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/forms-reference-inlinefieldgroup--docs unity-components.payfit.io}
|
|
52
52
|
*/
|
|
53
|
-
export declare function InlineFieldGroupReadView({ children, className
|
|
53
|
+
export declare function InlineFieldGroupReadView({ children, className }: InlineFieldGroupReadViewProps): import('react/jsx-runtime').JSX.Element;
|
|
54
54
|
export declare namespace InlineFieldGroupReadView {
|
|
55
55
|
var displayName: string;
|
|
56
56
|
}
|
package/dist/esm/modules/tanstack-form/components/password-field/parts/PasswordFieldDetails.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ interface PasswordFieldDetailsProps {
|
|
|
12
12
|
* Displays the validation rules checklist for password requirements
|
|
13
13
|
* Renders a list of ValidationRuleItem components with a title
|
|
14
14
|
*/
|
|
15
|
-
export declare function PasswordFieldDetails({ id, title, rules
|
|
15
|
+
export declare function PasswordFieldDetails({ id, title, rules }: PasswordFieldDetailsProps): import('react/jsx-runtime').JSX.Element | null;
|
|
16
16
|
export {};
|
package/dist/esm/modules/tanstack-form/components/password-field/parts/ValidationRuleItem.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ interface ValidationRuleItemProps {
|
|
|
12
12
|
* Individual validation rule item with status icon
|
|
13
13
|
* Displays a check circle icon that changes based on the rule's status
|
|
14
14
|
*/
|
|
15
|
-
export declare function ValidationRuleItem({ id, label, status
|
|
15
|
+
export declare function ValidationRuleItem({ id, label, status }: ValidationRuleItemProps): import('react/jsx-runtime').JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TanstackInputProps } from '../input/TanstackInput.js';
|
|
3
2
|
import { LabelProps } from '../../../../core/components/label/Label.js';
|
|
3
|
+
import { TanstackInputProps } from '../input/TanstackInput.js';
|
|
4
4
|
import { TanstackTextAreaProps } from '../text-area/TanstackTextArea.js';
|
|
5
5
|
interface FieldProps extends Pick<LabelProps, 'isRequired' | 'requiredVariant'> {
|
|
6
6
|
/** The label for the text field. */
|
|
@@ -17,10 +17,7 @@ type DeepAllowUndefined<T> = T extends Array<infer Item> ? Array<DeepAllowUndefi
|
|
|
17
17
|
* Paths are expressed as tuples of object keys. Use `number` to target every
|
|
18
18
|
* item in an array, for example `['answers', number, 'questionId']`.
|
|
19
19
|
*/
|
|
20
|
-
type KeepRequiredAtPath<T, Path extends readonly unknown[]> = Path extends [] ? Exclude<T, undefined> : T extends Array<infer Item> ? Path extends [number, ...infer Rest extends readonly unknown[]] ? Array<KeepRequiredAtPath<Item, Rest>> : T : Path extends [
|
|
21
|
-
infer Key extends keyof T,
|
|
22
|
-
...infer Rest extends readonly unknown[]
|
|
23
|
-
] ? Omit<T, Key> & {
|
|
20
|
+
type KeepRequiredAtPath<T, Path extends readonly unknown[]> = Path extends [] ? Exclude<T, undefined> : T extends Array<infer Item> ? Path extends [number, ...infer Rest extends readonly unknown[]] ? Array<KeepRequiredAtPath<Item, Rest>> : T : Path extends [infer Key extends keyof T, ...infer Rest extends readonly unknown[]] ? Omit<T, Key> & {
|
|
24
21
|
[K in Key]-?: KeepRequiredAtPath<Exclude<T[Key], undefined>, Rest>;
|
|
25
22
|
} : T;
|
|
26
23
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ReactTable as TableType, Row, RowData, TableFeatures } from '@tanstack/react-table';
|
|
3
3
|
import { TablePaginationProps } from '../../../../core/components/table/parts/TablePagination.js';
|
|
4
4
|
import { TableProps, TableRootProps } from '../../../../core/components/table/Table.js';
|
|
@@ -10,8 +10,8 @@ import { ColumnSortHeader as f, isSortableHeader as p } from "./parts/ColumnSort
|
|
|
10
10
|
import { useMemo as m, useRef as h } from "react";
|
|
11
11
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
12
|
import { useId as y } from "react-aria/useId";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { useSelector as b } from "@tanstack/react-store";
|
|
14
|
+
import { flexRender as x } from "@tanstack/react-table";
|
|
15
15
|
//#region src/modules/tanstack-table/components/data-table/DataTable.tsx
|
|
16
16
|
var S = ({ children: t, columnNameId: n, helperText: r }) => r === void 0 ? /* @__PURE__ */ _(g, { children: t }) : /* @__PURE__ */ v("div", {
|
|
17
17
|
className: "uy:flex uy:gap-50 uy:items-center",
|
|
@@ -22,7 +22,7 @@ var S = ({ children: t, columnNameId: n, helperText: r }) => r === void 0 ? /* @
|
|
|
22
22
|
color: "content.neutral.lowest"
|
|
23
23
|
})]
|
|
24
24
|
}), C = ({ table: e, tableRef: t, pagination: n, onPageChange: r, onPageHover: i, onPageSizeChange: a }) => {
|
|
25
|
-
let o = e.atoms.pagination, { pageIndex: s, pageSize: c } =
|
|
25
|
+
let o = e.atoms.pagination, { pageIndex: s, pageSize: c } = b(m(() => ({
|
|
26
26
|
get: () => o.get(),
|
|
27
27
|
subscribe: (e) => o.subscribe((n) => {
|
|
28
28
|
t.current?.scrollToTop(), e(n);
|
|
@@ -46,14 +46,14 @@ var S = ({ children: t, columnNameId: n, helperText: r }) => r === void 0 ? /* @
|
|
|
46
46
|
itemLabel: n.labels?.itemLabel
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
function w({ table: e, isLoading: u, error: m, emptyState: g, loadingState:
|
|
49
|
+
function w({ table: e, isLoading: u, error: m, emptyState: g, loadingState: b, errorState: w, pagination: T, minRows: E, maxRows: D, onPageChange: O, onPageHover: k, onPageSizeChange: A, children: j, enableVirtualization: M, estimatedRowHeight: N, overscan: P, onErrorButtonPress: F, onNoDataButtonPress: I, noDataDescription: L, onNoSearchResultsButtonPress: R, ...z }) {
|
|
50
50
|
let B = h(null), V = y(), H = d(e), U = {
|
|
51
51
|
label: z.label,
|
|
52
52
|
description: z.description,
|
|
53
53
|
isHorizontalScrollEnabled: z.isHorizontalScrollEnabled,
|
|
54
54
|
layout: z.layout
|
|
55
55
|
}, W = () => {
|
|
56
|
-
if (u) return
|
|
56
|
+
if (u) return b ?? /* @__PURE__ */ _(o, {});
|
|
57
57
|
if (m) return w ?? /* @__PURE__ */ _(a, { onButtonPress: F });
|
|
58
58
|
}, G = () => {
|
|
59
59
|
let t = e.state, n = t.globalFilter !== void 0 && t.globalFilter !== "", r = t.columnFilters !== void 0 && t.columnFilters.length > 0;
|
|
@@ -92,7 +92,7 @@ function w({ table: e, isLoading: u, error: m, emptyState: g, loadingState: x, e
|
|
|
92
92
|
helperText: c?.helperText,
|
|
93
93
|
children: /* @__PURE__ */ _("span", {
|
|
94
94
|
id: s,
|
|
95
|
-
children:
|
|
95
|
+
children: x(r.column.columnDef.header, r.getContext())
|
|
96
96
|
})
|
|
97
97
|
})
|
|
98
98
|
}) : o ? /* @__PURE__ */ _(S, {
|
|
@@ -100,7 +100,7 @@ function w({ table: e, isLoading: u, error: m, emptyState: g, loadingState: x, e
|
|
|
100
100
|
helperText: c?.helperText,
|
|
101
101
|
children: /* @__PURE__ */ _("span", {
|
|
102
102
|
id: s,
|
|
103
|
-
children:
|
|
103
|
+
children: x(r.column.columnDef.header, r.getContext())
|
|
104
104
|
})
|
|
105
105
|
}) : null
|
|
106
106
|
}, r.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "3.29.
|
|
3
|
+
"version": "3.29.61",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"tanstack-intent"
|
|
6
6
|
],
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@formatjs/intl": "4.1.12",
|
|
99
99
|
"@internationalized/date": "3.12.4",
|
|
100
|
-
"@payfit/unity-illustrations": "3.29.
|
|
100
|
+
"@payfit/unity-illustrations": "3.29.61",
|
|
101
101
|
"@radix-ui/react-avatar": "1.3.1",
|
|
102
102
|
"@radix-ui/react-slot": "1.5.0",
|
|
103
103
|
"@react-aria/interactions": "3.28.1",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
137
137
|
"@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
|
|
138
138
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
139
|
-
"@payfit/unity-icons": "3.29.
|
|
140
|
-
"@payfit/unity-themes": "3.29.
|
|
139
|
+
"@payfit/unity-icons": "3.29.61",
|
|
140
|
+
"@payfit/unity-themes": "3.29.61",
|
|
141
141
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
142
142
|
"@storybook/addon-a11y": "10.6.1",
|
|
143
143
|
"@storybook/addon-designs": "12.0.0",
|
|
@@ -174,8 +174,8 @@
|
|
|
174
174
|
"vitest": "5.1.1"
|
|
175
175
|
},
|
|
176
176
|
"peerDependencies": {
|
|
177
|
-
"@payfit/unity-icons": "3.29.
|
|
178
|
-
"@payfit/unity-themes": "3.29.
|
|
177
|
+
"@payfit/unity-icons": "3.29.61",
|
|
178
|
+
"@payfit/unity-themes": "3.29.61",
|
|
179
179
|
"@storybook/react-vite": "^10",
|
|
180
180
|
"@tanstack/form-core": "1.33.5",
|
|
181
181
|
"@tanstack/react-form": "1.33.5",
|
|
@@ -34,12 +34,6 @@ them; memoize derived data when its source would otherwise create a new array.
|
|
|
34
34
|
```tsx
|
|
35
35
|
import { useMemo } from 'react'
|
|
36
36
|
|
|
37
|
-
import {
|
|
38
|
-
DataTable,
|
|
39
|
-
DataTableRoot,
|
|
40
|
-
TableCell,
|
|
41
|
-
TableRow,
|
|
42
|
-
} from '@payfit/unity-components'
|
|
43
37
|
import {
|
|
44
38
|
createColumnHelper,
|
|
45
39
|
createPaginatedRowModel,
|
|
@@ -49,6 +43,8 @@ import {
|
|
|
49
43
|
useTable,
|
|
50
44
|
} from '@tanstack/react-table'
|
|
51
45
|
|
|
46
|
+
import { DataTable, DataTableRoot, TableCell, TableRow } from '@payfit/unity-components'
|
|
47
|
+
|
|
52
48
|
type Employee = {
|
|
53
49
|
id: string
|
|
54
50
|
name: string
|
|
@@ -86,10 +82,13 @@ export function EmployeeTable({ employees }: { employees: Employee[] }) {
|
|
|
86
82
|
|
|
87
83
|
return (
|
|
88
84
|
<DataTableRoot>
|
|
89
|
-
<DataTable
|
|
90
|
-
{
|
|
85
|
+
<DataTable
|
|
86
|
+
table={table}
|
|
87
|
+
layout="fixed"
|
|
88
|
+
>
|
|
89
|
+
{(row) => (
|
|
91
90
|
<TableRow key={row.id}>
|
|
92
|
-
{row.getVisibleCells().map(cell => (
|
|
91
|
+
{row.getVisibleCells().map((cell) => (
|
|
93
92
|
<TableCell key={cell.id}>
|
|
94
93
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
95
94
|
</TableCell>
|
|
@@ -175,7 +174,7 @@ Wrong:
|
|
|
175
174
|
<Table layout="fixed">
|
|
176
175
|
<TableHeader>…</TableHeader>
|
|
177
176
|
<TableBody>
|
|
178
|
-
{data.map(row => (
|
|
177
|
+
{data.map((row) => (
|
|
179
178
|
<TableRow>…</TableRow>
|
|
180
179
|
))}
|
|
181
180
|
</TableBody>
|
|
@@ -8,7 +8,6 @@ checkboxes), `helperText` (renders a tooltip next to the header), and
|
|
|
8
8
|
`headerClassName` (required when `layout="fixed"`).
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
import { Badge } from '@payfit/unity-components'
|
|
12
11
|
import {
|
|
13
12
|
columnFilteringFeature,
|
|
14
13
|
createColumnHelper,
|
|
@@ -19,6 +18,8 @@ import {
|
|
|
19
18
|
tableFeatures,
|
|
20
19
|
} from '@tanstack/react-table'
|
|
21
20
|
|
|
21
|
+
import { Badge } from '@payfit/unity-components'
|
|
22
|
+
|
|
22
23
|
const features = tableFeatures({
|
|
23
24
|
columnFilteringFeature,
|
|
24
25
|
filteredRowModel: createFilteredRowModel(),
|
|
@@ -38,13 +39,9 @@ export const employeeColumns = [
|
|
|
38
39
|
header: 'Status',
|
|
39
40
|
enableColumnFilter: true,
|
|
40
41
|
filterFn: filterFn_equalsString,
|
|
41
|
-
cell: info => {
|
|
42
|
+
cell: (info) => {
|
|
42
43
|
const status = info.getValue()
|
|
43
|
-
return
|
|
44
|
-
<Badge variant={status === 'active' ? 'success' : 'neutral'}>
|
|
45
|
-
{status}
|
|
46
|
-
</Badge>
|
|
47
|
-
)
|
|
44
|
+
return <Badge variant={status === 'active' ? 'success' : 'neutral'}>{status}</Badge>
|
|
48
45
|
},
|
|
49
46
|
meta: { helperText: 'Active employees can sign in.' },
|
|
50
47
|
}),
|
|
@@ -65,11 +62,7 @@ current page's slice as `data` and supply `rowCount` or `pageCount`.
|
|
|
65
62
|
```tsx
|
|
66
63
|
import { useMemo, useState } from 'react'
|
|
67
64
|
|
|
68
|
-
import {
|
|
69
|
-
rowPaginationFeature,
|
|
70
|
-
tableFeatures,
|
|
71
|
-
useTable,
|
|
72
|
-
} from '@tanstack/react-table'
|
|
65
|
+
import { rowPaginationFeature, tableFeatures, useTable } from '@tanstack/react-table'
|
|
73
66
|
|
|
74
67
|
export function ServerTable({ totalCount, fetchPage }: Props) {
|
|
75
68
|
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 20 })
|
|
@@ -95,9 +88,9 @@ export function ServerTable({ totalCount, fetchPage }: Props) {
|
|
|
95
88
|
return (
|
|
96
89
|
<DataTableRoot>
|
|
97
90
|
<DataTable table={table}>
|
|
98
|
-
{row => (
|
|
91
|
+
{(row) => (
|
|
99
92
|
<TableRow key={row.id}>
|
|
100
|
-
{row.getVisibleCells().map(cell => (
|
|
93
|
+
{row.getVisibleCells().map((cell) => (
|
|
101
94
|
<TableCell key={cell.id}>
|
|
102
95
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
103
96
|
</TableCell>
|
|
@@ -120,7 +113,6 @@ multi-selects, text fields, etc.
|
|
|
120
113
|
```tsx
|
|
121
114
|
import type { FilterDef } from '@payfit/unity-components'
|
|
122
115
|
|
|
123
|
-
import { FilterToolbar, Select, SelectItem } from '@payfit/unity-components'
|
|
124
116
|
import {
|
|
125
117
|
columnFilteringFeature,
|
|
126
118
|
createFilteredRowModel,
|
|
@@ -128,17 +120,22 @@ import {
|
|
|
128
120
|
useTable,
|
|
129
121
|
} from '@tanstack/react-table'
|
|
130
122
|
|
|
123
|
+
import { FilterToolbar, Select, SelectItem } from '@payfit/unity-components'
|
|
124
|
+
|
|
131
125
|
const filterDefs: FilterDef[] = [
|
|
132
126
|
{
|
|
133
127
|
id: 'status',
|
|
134
128
|
label: 'Status',
|
|
135
129
|
renderControl: (value, onChange) => (
|
|
136
|
-
<Select
|
|
130
|
+
<Select
|
|
131
|
+
selectedKey={value as string}
|
|
132
|
+
onSelectionChange={onChange}
|
|
133
|
+
>
|
|
137
134
|
<SelectItem id="active">Active</SelectItem>
|
|
138
135
|
<SelectItem id="inactive">Inactive</SelectItem>
|
|
139
136
|
</Select>
|
|
140
137
|
),
|
|
141
|
-
renderLabel: value => String(value),
|
|
138
|
+
renderLabel: (value) => String(value),
|
|
142
139
|
},
|
|
143
140
|
]
|
|
144
141
|
|
|
@@ -157,17 +154,15 @@ export function FilteredTable() {
|
|
|
157
154
|
<>
|
|
158
155
|
<FilterToolbar
|
|
159
156
|
filterDefs={filterDefs}
|
|
160
|
-
onChange={applied =>
|
|
161
|
-
table.setColumnFilters(
|
|
162
|
-
applied.map(f => ({ id: f.id, value: f.value })),
|
|
163
|
-
)
|
|
157
|
+
onChange={(applied) =>
|
|
158
|
+
table.setColumnFilters(applied.map((f) => ({ id: f.id, value: f.value })))
|
|
164
159
|
}
|
|
165
160
|
/>
|
|
166
161
|
<DataTableRoot>
|
|
167
162
|
<DataTable table={table}>
|
|
168
|
-
{row => (
|
|
163
|
+
{(row) => (
|
|
169
164
|
<TableRow key={row.id}>
|
|
170
|
-
{row.getVisibleCells().map(cell => (
|
|
165
|
+
{row.getVisibleCells().map((cell) => (
|
|
171
166
|
<TableCell key={cell.id}>
|
|
172
167
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
173
168
|
</TableCell>
|
|
@@ -201,7 +196,7 @@ const checkboxColumn = columnHelper.display({
|
|
|
201
196
|
<CheckboxStandalone
|
|
202
197
|
isSelected={table.getIsAllPageRowsSelected()}
|
|
203
198
|
isIndeterminate={table.getIsSomePageRowsSelected()}
|
|
204
|
-
onChange={value => table.toggleAllPageRowsSelected(value)}
|
|
199
|
+
onChange={(value) => table.toggleAllPageRowsSelected(value)}
|
|
205
200
|
slot="selection"
|
|
206
201
|
>
|
|
207
202
|
Select all
|
|
@@ -210,7 +205,7 @@ const checkboxColumn = columnHelper.display({
|
|
|
210
205
|
cell: ({ row }) => (
|
|
211
206
|
<CheckboxStandalone
|
|
212
207
|
isSelected={row.getIsSelected()}
|
|
213
|
-
onChange={value => row.toggleSelected(value)}
|
|
208
|
+
onChange={(value) => row.toggleSelected(value)}
|
|
214
209
|
slot="selection"
|
|
215
210
|
>
|
|
216
211
|
Select row
|
|
@@ -233,9 +228,12 @@ export function BulkTable() {
|
|
|
233
228
|
return (
|
|
234
229
|
<DataTableRoot>
|
|
235
230
|
<DataTable table={table}>
|
|
236
|
-
{row => (
|
|
237
|
-
<TableRow
|
|
238
|
-
{row.
|
|
231
|
+
{(row) => (
|
|
232
|
+
<TableRow
|
|
233
|
+
key={row.id}
|
|
234
|
+
isSelected={row.getIsSelected()}
|
|
235
|
+
>
|
|
236
|
+
{row.getVisibleCells().map((cell) => (
|
|
239
237
|
<TableCell key={cell.id}>
|
|
240
238
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
241
239
|
</TableCell>
|
|
@@ -246,8 +244,8 @@ export function BulkTable() {
|
|
|
246
244
|
<DataTableBulkActions
|
|
247
245
|
table={table}
|
|
248
246
|
actions={[
|
|
249
|
-
{ id: 'archive', label: 'Archive', onAction: rows => archive(rows) },
|
|
250
|
-
{ id: 'delete', label: 'Delete', onAction: rows => remove(rows) },
|
|
247
|
+
{ id: 'archive', label: 'Archive', onAction: (rows) => archive(rows) },
|
|
248
|
+
{ id: 'delete', label: 'Delete', onAction: (rows) => remove(rows) },
|
|
251
249
|
]}
|
|
252
250
|
/>
|
|
253
251
|
</DataTableRoot>
|
|
@@ -57,31 +57,28 @@ If a named export covers the use case, import it. No abstractions over the
|
|
|
57
57
|
top.
|
|
58
58
|
|
|
59
59
|
```tsx
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
DialogActions,
|
|
64
|
-
DialogContent,
|
|
65
|
-
Pill,
|
|
66
|
-
} from '@payfit/unity-components'
|
|
67
|
-
|
|
68
|
-
export function ConfirmDelete({
|
|
69
|
-
isOpen,
|
|
70
|
-
onClose,
|
|
71
|
-
}: {
|
|
72
|
-
isOpen: boolean
|
|
73
|
-
onClose: () => void
|
|
74
|
-
}) {
|
|
60
|
+
import { Button, Dialog, DialogActions, DialogContent, Pill } from '@payfit/unity-components'
|
|
61
|
+
|
|
62
|
+
export function ConfirmDelete({ isOpen, onClose }: { isOpen: boolean; onClose: () => void }) {
|
|
75
63
|
return (
|
|
76
|
-
<Dialog
|
|
64
|
+
<Dialog
|
|
65
|
+
isOpen={isOpen}
|
|
66
|
+
onOpenChange={onClose}
|
|
67
|
+
>
|
|
77
68
|
<DialogContent>
|
|
78
69
|
<Pill color="danger">Destructive</Pill>
|
|
79
70
|
</DialogContent>
|
|
80
71
|
<DialogActions>
|
|
81
|
-
<Button
|
|
72
|
+
<Button
|
|
73
|
+
variant="secondary"
|
|
74
|
+
onPress={onClose}
|
|
75
|
+
>
|
|
82
76
|
Cancel
|
|
83
77
|
</Button>
|
|
84
|
-
<Button
|
|
78
|
+
<Button
|
|
79
|
+
color="danger"
|
|
80
|
+
onPress={onClose}
|
|
81
|
+
>
|
|
85
82
|
Delete
|
|
86
83
|
</Button>
|
|
87
84
|
</DialogActions>
|
|
@@ -97,9 +94,10 @@ Aria primitives, style with the `uy:` prefix, and merge classes with
|
|
|
97
94
|
`uyMerge` / `uyTv`.
|
|
98
95
|
|
|
99
96
|
```tsx
|
|
100
|
-
import { uyTv } from '@payfit/unity-themes'
|
|
101
97
|
import { ToggleButton } from 'react-aria-components'
|
|
102
98
|
|
|
99
|
+
import { uyTv } from '@payfit/unity-themes'
|
|
100
|
+
|
|
103
101
|
const toggleStyles = uyTv({
|
|
104
102
|
base: 'uy:inline-flex uy:items-center uy:gap-100 uy:rounded-100 uy:px-200 uy:py-100',
|
|
105
103
|
variants: {
|
|
@@ -178,9 +176,7 @@ Wrong:
|
|
|
178
176
|
|
|
179
177
|
```tsx
|
|
180
178
|
const Tag = ({ children }) => (
|
|
181
|
-
<span className="uy:rounded-full uy:px-200 uy:py-100 uy:bg-surface-primary">
|
|
182
|
-
{children}
|
|
183
|
-
</span>
|
|
179
|
+
<span className="uy:rounded-full uy:px-200 uy:py-100 uy:bg-surface-primary">{children}</span>
|
|
184
180
|
)
|
|
185
181
|
```
|
|
186
182
|
|
|
@@ -241,7 +237,10 @@ Source: AGENTS.md "Do NOT use (deprecated)"
|
|
|
241
237
|
Wrong:
|
|
242
238
|
|
|
243
239
|
```tsx
|
|
244
|
-
<FormField
|
|
240
|
+
<FormField
|
|
241
|
+
label="Name"
|
|
242
|
+
error={errors.name}
|
|
243
|
+
>
|
|
245
244
|
<Input {...register('name')} />
|
|
246
245
|
</FormField>
|
|
247
246
|
```
|
|
@@ -249,9 +248,7 @@ Wrong:
|
|
|
249
248
|
Correct:
|
|
250
249
|
|
|
251
250
|
```tsx
|
|
252
|
-
<form.AppField name="name">
|
|
253
|
-
{field => <field.TextField label="Name" />}
|
|
254
|
-
</form.AppField>
|
|
251
|
+
<form.AppField name="name">{(field) => <field.TextField label="Name" />}</form.AppField>
|
|
255
252
|
```
|
|
256
253
|
|
|
257
254
|
Manual `FormField` + `Input` skips the label-for/aria-describedby wiring,
|
|
@@ -42,11 +42,20 @@ import { Card, Flex, Grid, GridItem, Text } from '@payfit/unity-components'
|
|
|
42
42
|
export function PayslipSummary() {
|
|
43
43
|
return (
|
|
44
44
|
<Card>
|
|
45
|
-
<Flex
|
|
46
|
-
|
|
45
|
+
<Flex
|
|
46
|
+
direction="col"
|
|
47
|
+
gap="200"
|
|
48
|
+
>
|
|
49
|
+
<Text
|
|
50
|
+
variant="h3"
|
|
51
|
+
asElement="h2"
|
|
52
|
+
>
|
|
47
53
|
Payslip
|
|
48
54
|
</Text>
|
|
49
|
-
<Grid
|
|
55
|
+
<Grid
|
|
56
|
+
cols={12}
|
|
57
|
+
className="uy:gap-200 uy:md:gap-300"
|
|
58
|
+
>
|
|
50
59
|
<GridItem colSpan={6}>Gross</GridItem>
|
|
51
60
|
<GridItem colSpan={6}>Net</GridItem>
|
|
52
61
|
</Grid>
|
|
@@ -99,7 +108,10 @@ Wrong:
|
|
|
99
108
|
Correct:
|
|
100
109
|
|
|
101
110
|
```tsx
|
|
102
|
-
<Flex
|
|
111
|
+
<Flex
|
|
112
|
+
gap="100"
|
|
113
|
+
className="uy:md:gap-200"
|
|
114
|
+
/>
|
|
103
115
|
```
|
|
104
116
|
|
|
105
117
|
### Use a generic element for semantic typography
|