@scmlatam/web-ui 0.2.63 → 0.2.65

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.
@@ -1,3 +1,3 @@
1
1
  import { SelectProps } from './types/types';
2
- declare const CustomSelect: ({ label, value, setValue, values, placeholder, disabled, fullWidth, white, }: SelectProps) => import("react").JSX.Element;
2
+ declare const CustomSelect: ({ label, value, setValue, values, placeholder, disabled, fullWidth, white, search, }: SelectProps) => import("react").JSX.Element;
3
3
  export { CustomSelect };
@@ -8,6 +8,8 @@ export { FormField, FormGrid, FormShell } from '../rb-components/form';
8
8
  export type { FormFieldProps, FormFieldSpan, FormGridColumnGap, FormGridProps, FormGridRowGap, FormShellProps, FormShellSize, } from '../rb-components/form';
9
9
  export { RbList, RbListItem } from '../rb-components/list';
10
10
  export type { RbListItemProps, RbListProps, RbListSize, RbListVariant, } from '../rb-components/list';
11
+ export { RbTransferList } from '../rb-components/transfer-list';
12
+ export type { RbTransferListChangeDetails, RbTransferListItem, RbTransferListItemId, RbTransferListLabels, RbTransferListProps, } from '../rb-components/transfer-list';
11
13
  export { PillsTabs, PillsTabs as RbPillsTabs, TabPanel, TabPanel as RbTabPanel, } from '../rb-components/navigation';
12
14
  export type { PillsTabItem, PillsTabsProps, TabPanelItem, TabPanelProps, } from '../rb-components/navigation';
13
15
  export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, CustomIndefiniteDatePicker, CustomDateControl, Calendario, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, ConfirmDialog, RbContextMenu, Checkbox, Radio, RbStepper, cn, } from '../rb-components/ui';
@@ -0,0 +1 @@
1
+ export declare function TransferListSection(): import("react").JSX.Element;
@@ -8,3 +8,4 @@ export * from './navigation';
8
8
  export * from './tree-panel';
9
9
  export * from './timeline';
10
10
  export * from './images';
11
+ export * from './transfer-list';
@@ -0,0 +1,2 @@
1
+ import { RbTransferListProps } from './transferList.types';
2
+ export declare function RbTransferList({ dataSource, value, defaultValue, onChange, titles, showSearch, showClearAll, onClearAll, title, labels, showSelectAll, disabled, panelHeight, className, }: RbTransferListProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { RbTransferList } from './RbTransferList';
2
+ export type { RbTransferListChangeDetails, RbTransferListItem, RbTransferListItemId, RbTransferListLabels, RbTransferListProps, } from './transferList.types';
@@ -0,0 +1,41 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type RbTransferListItemId = string | number;
3
+ export interface RbTransferListItem {
4
+ id: RbTransferListItemId;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface RbTransferListChangeDetails {
9
+ action: "add" | "remove" | "clear";
10
+ movedIds: RbTransferListItemId[];
11
+ }
12
+ export interface RbTransferListLabels {
13
+ availableTitle: string;
14
+ selectedTitle: string;
15
+ selectAll: string;
16
+ clearAll: string;
17
+ add: string;
18
+ remove: string;
19
+ availableEmpty: string;
20
+ selectedEmpty: string;
21
+ searchPlaceholder: string;
22
+ search: string;
23
+ noResults: string;
24
+ moved: (count: number, destination: string) => string;
25
+ }
26
+ export interface RbTransferListProps {
27
+ dataSource?: readonly RbTransferListItem[];
28
+ value?: readonly RbTransferListItemId[];
29
+ defaultValue?: readonly RbTransferListItemId[];
30
+ onChange?: (value: RbTransferListItemId[], details: RbTransferListChangeDetails) => void;
31
+ titles?: readonly [string, string];
32
+ showSearch?: boolean;
33
+ showClearAll?: boolean;
34
+ onClearAll?: () => void;
35
+ title?: ReactNode;
36
+ labels?: Partial<RbTransferListLabels>;
37
+ showSelectAll?: boolean;
38
+ disabled?: boolean;
39
+ panelHeight?: CSSProperties["height"];
40
+ className?: string;
41
+ }
@@ -0,0 +1,16 @@
1
+ import { RbTransferListChangeDetails, RbTransferListItem, RbTransferListItemId } from './transferList.types';
2
+ export declare function filterTransferItems(items: readonly RbTransferListItem[], query: string): readonly RbTransferListItem[];
3
+ export declare function normalizeTransferIds(items: readonly RbTransferListItem[], ids: readonly RbTransferListItemId[]): RbTransferListItemId[];
4
+ export declare function getTransferCheckState(items: readonly RbTransferListItem[], checkedIds: readonly RbTransferListItemId[]): {
5
+ eligibleIds: RbTransferListItemId[];
6
+ checked: boolean;
7
+ indeterminate: boolean;
8
+ count: number;
9
+ };
10
+ export declare function applyTransfer(items: readonly RbTransferListItem[], selectedIds: readonly RbTransferListItemId[], checkedIds: readonly RbTransferListItemId[], action: RbTransferListChangeDetails["action"]): {
11
+ selectedIds: RbTransferListItemId[];
12
+ details: {
13
+ action: "clear" | "add" | "remove";
14
+ movedIds: RbTransferListItemId[];
15
+ };
16
+ };
@@ -27,6 +27,8 @@ declare const meta: {
27
27
  export default meta;
28
28
  type Story = StoryObj<typeof meta>;
29
29
  export declare const Basica: Story;
30
+ export declare const CeldasDeshabilitadasConColumnasFijadas: Story;
31
+ export declare const PlanificacionConDiasCerrados: Story;
30
32
  export declare const Full: Story;
31
33
  export declare const Vacia: Story;
32
34
  export declare const VaciaMediana: Story;
@@ -0,0 +1,77 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { RbTransferList, RbTransferListItem, RbTransferListItemId } from '../../components/rb';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof RbTransferList;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
11
+ dataSource?: readonly RbTransferListItem[] | undefined;
12
+ value?: readonly RbTransferListItemId[] | undefined;
13
+ defaultValue?: readonly RbTransferListItemId[] | undefined;
14
+ onChange?: ((value: RbTransferListItemId[], details: import('../../rb-components').RbTransferListChangeDetails) => void) | undefined;
15
+ titles?: readonly [string, string] | undefined;
16
+ showSearch?: boolean | undefined;
17
+ showClearAll?: boolean | undefined;
18
+ onClearAll?: (() => void) | undefined;
19
+ title?: import('react').ReactNode;
20
+ labels?: Partial<import('../../rb-components').RbTransferListLabels> | undefined;
21
+ showSelectAll?: boolean | undefined;
22
+ disabled?: boolean | undefined;
23
+ panelHeight?: import("csstype").Property.Height<string | number> | undefined;
24
+ className?: string | undefined;
25
+ }>) => import("react").JSX.Element)[];
26
+ args: {
27
+ dataSource: RbTransferListItem[];
28
+ title: string;
29
+ defaultValue: string[];
30
+ showSearch: true;
31
+ };
32
+ argTypes: {
33
+ showSelectAll: {
34
+ control: "boolean";
35
+ description: string;
36
+ };
37
+ value: {
38
+ description: string;
39
+ };
40
+ onChange: {
41
+ description: string;
42
+ };
43
+ showSearch: {
44
+ control: "boolean";
45
+ description: string;
46
+ };
47
+ showClearAll: {
48
+ control: "boolean";
49
+ description: string;
50
+ };
51
+ titles: {
52
+ control: "object";
53
+ };
54
+ labels: {
55
+ control: "object";
56
+ };
57
+ };
58
+ };
59
+ export default meta;
60
+ type Story = StoryObj<typeof meta>;
61
+ export declare const Basico: Story;
62
+ export declare const SinBusqueda: Story;
63
+ export declare const SeleccionTotalYParcial: Story;
64
+ export declare const SinSeleccionGlobal: Story;
65
+ export declare const Teclado: Story;
66
+ export declare const Controlado: Story;
67
+ export declare const ControladoSinConfirmar: Story;
68
+ export declare const Vacio: Story;
69
+ export declare const Deshabilitado: Story;
70
+ export declare const ElementosDeshabilitados: Story;
71
+ export declare const DatosDinamicos: Story;
72
+ export declare const TextosLargosYScroll: Story;
73
+ export declare const Movil: Story;
74
+ export declare const DosGrupos: Story;
75
+ export declare const Busqueda: Story;
76
+ export declare const BusquedaDestino: Story;
77
+ export declare const SinBorrarTodo: Story;