@dcs-tech/ui-native 0.0.0-stage → 0.16.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/CHANGELOG.md +186 -0
- package/README.md +179 -2
- package/dist/components/Button/Button.js +61 -0
- package/dist/components/Button/buttonStyle.js +100 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +60 -0
- package/dist/components/Checkbox/checkboxStyle.js +44 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/DataTable/BulkRun.js +85 -0
- package/dist/components/DataTable/CardList.js +70 -0
- package/dist/components/DataTable/DataTable.js +53 -0
- package/dist/components/DataTable/DataTableScrollView.js +33 -0
- package/dist/components/DataTable/DragSelect.js +153 -0
- package/dist/components/DataTable/LayoutSwitcher.js +48 -0
- package/dist/components/DataTable/Pager.js +15 -0
- package/dist/components/DataTable/RowActions.js +28 -0
- package/dist/components/DataTable/RowDetail.js +80 -0
- package/dist/components/DataTable/RowMenuSheet.js +72 -0
- package/dist/components/DataTable/SortSheet.js +25 -0
- package/dist/components/DataTable/SplitList.js +30 -0
- package/dist/components/DataTable/StatusRow.js +48 -0
- package/dist/components/DataTable/SwipeRow.js +125 -0
- package/dist/components/DataTable/ToolButton.js +9 -0
- package/dist/components/DataTable/Toolbar.js +53 -0
- package/dist/components/DataTable/cells.js +21 -0
- package/dist/components/DataTable/dataTableStyle.js +218 -0
- package/dist/components/DataTable/filters/FilterConditionRow.js +49 -0
- package/dist/components/DataTable/filters/FilterGroupEditor.js +21 -0
- package/dist/components/DataTable/filters/FilterSheet.js +69 -0
- package/dist/components/DataTable/filters/SavedFilterBar.js +39 -0
- package/dist/components/DataTable/filters/filterStyle.js +82 -0
- package/dist/components/DataTable/index.js +3 -0
- package/dist/components/DataTable/persistence/adapters.js +78 -0
- package/dist/components/DataTable/persistence/useViewPrefs.js +76 -0
- package/dist/components/DataTable/rowParts.js +47 -0
- package/dist/components/DataTable/useTableState.js +345 -0
- package/dist/components/DatePicker/Calendar.js +28 -0
- package/dist/components/DatePicker/DatePicker.js +300 -0
- package/dist/components/DatePicker/PeriodGrid.js +17 -0
- package/dist/components/DatePicker/PeriodPicker.js +216 -0
- package/dist/components/DatePicker/TimeField.js +50 -0
- package/dist/components/DatePicker/datePickerStyle.js +157 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/Dialog/Dialog.js +104 -0
- package/dist/components/Dialog/DialogHost.js +71 -0
- package/dist/components/Dialog/dialogStyle.js +72 -0
- package/dist/components/Dialog/index.js +2 -0
- package/dist/components/FieldContext/FieldContext.js +50 -0
- package/dist/components/FieldContext/index.js +1 -0
- package/dist/components/FieldWrapper/FieldWrapper.js +23 -0
- package/dist/components/FieldWrapper/fieldWrapperStyle.js +64 -0
- package/dist/components/FieldWrapper/index.js +1 -0
- package/dist/components/Icon/Icon.js +124 -0
- package/dist/components/Icon/IconContext.js +12 -0
- package/dist/components/Icon/iconStyle.js +59 -0
- package/dist/components/Icon/icons.js +252 -0
- package/dist/components/Icon/index.js +4 -0
- package/dist/components/Icon/useIconDone.js +19 -0
- package/dist/components/Input/Input.js +71 -0
- package/dist/components/Input/index.js +1 -0
- package/dist/components/Input/inputStyle.js +47 -0
- package/dist/components/Press/Ripple.js +92 -0
- package/dist/components/Press/index.js +1 -0
- package/dist/components/Press/measure.js +3 -0
- package/dist/components/Radio/Radio.js +54 -0
- package/dist/components/Radio/index.js +1 -0
- package/dist/components/Radio/radioStyle.js +45 -0
- package/dist/components/Select/Select.js +83 -0
- package/dist/components/Select/SelectSheet.js +85 -0
- package/dist/components/Select/index.js +1 -0
- package/dist/components/Suggest/Suggest.js +101 -0
- package/dist/components/Suggest/index.js +1 -0
- package/dist/components/Switch/Switch.js +71 -0
- package/dist/components/Switch/index.js +1 -0
- package/dist/components/Switch/switchStyle.js +59 -0
- package/dist/components/Toast/ToastHost.js +76 -0
- package/dist/components/Toast/ToastItem.js +115 -0
- package/dist/components/Toast/ToastLayer.js +21 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/toast.types.js +1 -0
- package/dist/components/Toast/toastStyle.js +73 -0
- package/dist/components/Toggle/ToggleField.js +20 -0
- package/dist/components/Toggle/ToggleGroupFrame.js +10 -0
- package/dist/components/UIProvider/UIProvider.js +14 -0
- package/dist/components/UIProvider/context.js +58 -0
- package/dist/components/UIProvider/index.js +1 -0
- package/dist/components/styles/color.js +35 -0
- package/dist/components/styles/fieldControl.js +102 -0
- package/dist/components/styles/popupList.js +102 -0
- package/dist/components/styles/toggle.js +64 -0
- package/dist/components/styles/webValues.js +147 -0
- package/dist/index.js +15 -0
- package/dist/locales/hi.js +1 -0
- package/dist/locales/ta.js +1 -0
- package/dist/types/components/Button/Button.d.ts +31 -0
- package/dist/types/components/Button/buttonStyle.d.ts +46 -0
- package/dist/types/components/Button/index.d.ts +3 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +60 -0
- package/dist/types/components/Checkbox/checkboxStyle.d.ts +16 -0
- package/dist/types/components/Checkbox/index.d.ts +3 -0
- package/dist/types/components/DataTable/BulkRun.d.ts +11 -0
- package/dist/types/components/DataTable/CardList.d.ts +18 -0
- package/dist/types/components/DataTable/DataTable.d.ts +11 -0
- package/dist/types/components/DataTable/DataTableScrollView.d.ts +10 -0
- package/dist/types/components/DataTable/DragSelect.d.ts +12 -0
- package/dist/types/components/DataTable/LayoutSwitcher.d.ts +23 -0
- package/dist/types/components/DataTable/Pager.d.ts +5 -0
- package/dist/types/components/DataTable/RowActions.d.ts +13 -0
- package/dist/types/components/DataTable/RowDetail.d.ts +15 -0
- package/dist/types/components/DataTable/RowMenuSheet.d.ts +5 -0
- package/dist/types/components/DataTable/SortSheet.d.ts +8 -0
- package/dist/types/components/DataTable/SplitList.d.ts +9 -0
- package/dist/types/components/DataTable/StatusRow.d.ts +7 -0
- package/dist/types/components/DataTable/SwipeRow.d.ts +25 -0
- package/dist/types/components/DataTable/ToolButton.d.ts +13 -0
- package/dist/types/components/DataTable/Toolbar.d.ts +8 -0
- package/dist/types/components/DataTable/cells.d.ts +13 -0
- package/dist/types/components/DataTable/dataTableStyle.d.ts +139 -0
- package/dist/types/components/DataTable/filters/FilterConditionRow.d.ts +12 -0
- package/dist/types/components/DataTable/filters/FilterGroupEditor.d.ts +13 -0
- package/dist/types/components/DataTable/filters/FilterSheet.d.ts +5 -0
- package/dist/types/components/DataTable/filters/SavedFilterBar.d.ts +20 -0
- package/dist/types/components/DataTable/filters/filterStyle.d.ts +46 -0
- package/dist/types/components/DataTable/index.d.ts +5 -0
- package/dist/types/components/DataTable/persistence/adapters.d.ts +12 -0
- package/dist/types/components/DataTable/persistence/useViewPrefs.d.ts +20 -0
- package/dist/types/components/DataTable/rowParts.d.ts +32 -0
- package/dist/types/components/DataTable/useTableState.d.ts +103 -0
- package/dist/types/components/DatePicker/Calendar.d.ts +11 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +65 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +11 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +10 -0
- package/dist/types/components/DatePicker/TimeField.d.ts +15 -0
- package/dist/types/components/DatePicker/datePickerStyle.d.ts +75 -0
- package/dist/types/components/DatePicker/index.d.ts +4 -0
- package/dist/types/components/Dialog/Dialog.d.ts +35 -0
- package/dist/types/components/Dialog/DialogHost.d.ts +45 -0
- package/dist/types/components/Dialog/dialogStyle.d.ts +23 -0
- package/dist/types/components/Dialog/index.d.ts +4 -0
- package/dist/types/components/FieldContext/FieldContext.d.ts +43 -0
- package/dist/types/components/FieldContext/index.d.ts +3 -0
- package/dist/types/components/FieldWrapper/FieldWrapper.d.ts +23 -0
- package/dist/types/components/FieldWrapper/fieldWrapperStyle.d.ts +24 -0
- package/dist/types/components/FieldWrapper/index.d.ts +3 -0
- package/dist/types/components/Icon/Icon.d.ts +37 -0
- package/dist/types/components/Icon/IconContext.d.ts +12 -0
- package/dist/types/components/Icon/iconStyle.d.ts +10 -0
- package/dist/types/components/Icon/icons.d.ts +250 -0
- package/dist/types/components/Icon/index.d.ts +7 -0
- package/dist/types/components/Icon/useIconDone.d.ts +4 -0
- package/dist/types/components/Input/Input.d.ts +53 -0
- package/dist/types/components/Input/index.d.ts +3 -0
- package/dist/types/components/Input/inputStyle.d.ts +11 -0
- package/dist/types/components/Press/Ripple.d.ts +20 -0
- package/dist/types/components/Press/index.d.ts +2 -0
- package/dist/types/components/Press/measure.d.ts +8 -0
- package/dist/types/components/Radio/Radio.d.ts +58 -0
- package/dist/types/components/Radio/index.d.ts +3 -0
- package/dist/types/components/Radio/radioStyle.d.ts +17 -0
- package/dist/types/components/Select/Select.d.ts +49 -0
- package/dist/types/components/Select/SelectSheet.d.ts +34 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/Suggest/Suggest.d.ts +44 -0
- package/dist/types/components/Suggest/index.d.ts +3 -0
- package/dist/types/components/Switch/Switch.d.ts +42 -0
- package/dist/types/components/Switch/index.d.ts +3 -0
- package/dist/types/components/Switch/switchStyle.d.ts +29 -0
- package/dist/types/components/Toast/ToastHost.d.ts +12 -0
- package/dist/types/components/Toast/ToastItem.d.ts +17 -0
- package/dist/types/components/Toast/ToastLayer.d.ts +11 -0
- package/dist/types/components/Toast/index.d.ts +5 -0
- package/dist/types/components/Toast/toast.types.d.ts +37 -0
- package/dist/types/components/Toast/toastStyle.d.ts +22 -0
- package/dist/types/components/Toggle/ToggleField.d.ts +31 -0
- package/dist/types/components/Toggle/ToggleGroupFrame.d.ts +14 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +17 -0
- package/dist/types/components/UIProvider/context.d.ts +22 -0
- package/dist/types/components/UIProvider/index.d.ts +2 -0
- package/dist/types/components/styles/color.d.ts +2 -0
- package/dist/types/components/styles/fieldControl.d.ts +26 -0
- package/dist/types/components/styles/popupList.d.ts +48 -0
- package/dist/types/components/styles/toggle.d.ts +26 -0
- package/dist/types/components/styles/webValues.d.ts +157 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/locales/hi.d.ts +1 -0
- package/dist/types/locales/ta.d.ts +1 -0
- package/package.json +85 -4
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps } from '../Button/Button';
|
|
3
|
+
export type DialogActionProps = Omit<ButtonProps, 'onPress' | 'loading' | 'children'>;
|
|
4
|
+
export interface DialogChoice extends DialogActionProps {
|
|
5
|
+
value: string;
|
|
6
|
+
label: NonNullable<ButtonProps['label']>;
|
|
7
|
+
action?: (...args: any[]) => unknown;
|
|
8
|
+
args?: unknown[];
|
|
9
|
+
}
|
|
10
|
+
interface BaseOptions {
|
|
11
|
+
title?: string;
|
|
12
|
+
message: React.ReactNode;
|
|
13
|
+
cancelLabel?: string | null;
|
|
14
|
+
cancelButton?: DialogActionProps;
|
|
15
|
+
}
|
|
16
|
+
export interface ConfirmOptions extends BaseOptions {
|
|
17
|
+
confirmLabel?: string;
|
|
18
|
+
tone?: 'primary' | 'danger';
|
|
19
|
+
confirmButton?: DialogActionProps;
|
|
20
|
+
action?: (...args: any[]) => unknown;
|
|
21
|
+
args?: unknown[];
|
|
22
|
+
}
|
|
23
|
+
export interface ChooseOptions extends BaseOptions {
|
|
24
|
+
choices: DialogChoice[];
|
|
25
|
+
}
|
|
26
|
+
export interface AlertOptions {
|
|
27
|
+
title?: string;
|
|
28
|
+
message: React.ReactNode;
|
|
29
|
+
okLabel?: string;
|
|
30
|
+
tone?: 'primary' | 'danger';
|
|
31
|
+
okButton?: DialogActionProps;
|
|
32
|
+
}
|
|
33
|
+
export interface DialogApi {
|
|
34
|
+
confirm: (opts: ConfirmOptions) => Promise<boolean>;
|
|
35
|
+
choose: (opts: ChooseOptions) => Promise<string | null>;
|
|
36
|
+
alert: (opts: AlertOptions) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare const useDialog: () => DialogApi;
|
|
39
|
+
export declare function DialogHost({ children }: {
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
}): React.JSX.Element;
|
|
42
|
+
export declare namespace DialogHost {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { Tokens } from '@dcs-tech/tokens';
|
|
3
|
+
export type DialogPlacement = 'center' | 'right' | 'left' | 'top' | 'bottom';
|
|
4
|
+
export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
5
|
+
export interface DialogLook {
|
|
6
|
+
frame: ViewStyle;
|
|
7
|
+
panel: ViewStyle;
|
|
8
|
+
header: ViewStyle;
|
|
9
|
+
title: TextStyle;
|
|
10
|
+
subtitle: TextStyle;
|
|
11
|
+
body: ViewStyle;
|
|
12
|
+
footer: ViewStyle;
|
|
13
|
+
close: ViewStyle;
|
|
14
|
+
closeIconSize: number;
|
|
15
|
+
}
|
|
16
|
+
export interface EdgeInsets {
|
|
17
|
+
top: number;
|
|
18
|
+
right: number;
|
|
19
|
+
bottom: number;
|
|
20
|
+
left: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const NO_INSETS: EdgeInsets;
|
|
23
|
+
export declare function dialogLook(t: Tokens, placement: DialogPlacement, size: DialogSize, narrow: boolean, padded: boolean, insets?: EdgeInsets): DialogLook;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Dialog, DialogOpenProvider, useDialogOpen } from './Dialog';
|
|
2
|
+
export type { DialogProps, DialogPlacement, DialogSize } from './Dialog';
|
|
3
|
+
export { DialogHost, useDialog } from './DialogHost';
|
|
4
|
+
export type { DialogApi, DialogChoice, DialogActionProps, ConfirmOptions, ChooseOptions, AlertOptions } from './DialogHost';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ControlLayout, ControlSize, ControlVariant, FieldContextValue, ToggleVariant } from '@dcs-tech/core';
|
|
3
|
+
export declare const FieldContext: React.Context<FieldContextValue>;
|
|
4
|
+
export declare const useFieldContext: () => FieldContextValue;
|
|
5
|
+
export interface FieldProviderProps {
|
|
6
|
+
size?: ControlSize;
|
|
7
|
+
variant?: ControlVariant;
|
|
8
|
+
layout?: ControlLayout;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const FieldProvider: React.FC<FieldProviderProps>;
|
|
14
|
+
export interface FieldSurfaceInput {
|
|
15
|
+
size?: ControlSize;
|
|
16
|
+
variant?: ControlVariant;
|
|
17
|
+
layout?: ControlLayout;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ResolvedFieldSurface {
|
|
22
|
+
size: ControlSize;
|
|
23
|
+
variant: ControlVariant;
|
|
24
|
+
layout: ControlLayout;
|
|
25
|
+
shownLayout: ControlLayout;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readOnly: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const STACK_BELOW_WIDTH = 640;
|
|
30
|
+
export declare function useFieldSurface(own: FieldSurfaceInput): ResolvedFieldSurface;
|
|
31
|
+
export interface ResolvedToggleSurface {
|
|
32
|
+
size: ControlSize;
|
|
33
|
+
variant: ToggleVariant;
|
|
34
|
+
layout: 'inline' | 'cell';
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare function useToggleSurface(own: {
|
|
39
|
+
size?: ControlSize;
|
|
40
|
+
variant?: ToggleVariant;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
}): ResolvedToggleSurface;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { FieldContext, FieldProvider, useFieldContext, useFieldSurface, useToggleSurface, STACK_BELOW_WIDTH } from './FieldContext';
|
|
2
|
+
export type { FieldProviderProps, FieldSurfaceInput, ResolvedFieldSurface, ResolvedToggleSurface } from './FieldContext';
|
|
3
|
+
export type { FieldContextValue } from '@dcs-tech/core';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { ControlLayout, ControlSize, FieldWidth } from '@dcs-tech/core';
|
|
4
|
+
export interface FieldWrapperProps {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
error?: React.ReactNode;
|
|
7
|
+
hint?: React.ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
size?: ControlSize;
|
|
10
|
+
layout?: ControlLayout;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
width?: FieldWidth;
|
|
13
|
+
focused?: boolean;
|
|
14
|
+
extraMessages?: React.ReactNode;
|
|
15
|
+
labelId?: string;
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
testID?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare function FieldWrapper({ label, error, hint, required, size: sizeProp, layout: layoutProp, disabled: disabledProp, width, focused, extraMessages, labelId, style, testID, children, }: FieldWrapperProps): React.JSX.Element;
|
|
21
|
+
export declare namespace FieldWrapper {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { Tokens } from '@dcs-tech/tokens';
|
|
3
|
+
import type { ControlLayout, ControlSize, FieldWidth } from '@dcs-tech/core';
|
|
4
|
+
export interface FieldWrapperState {
|
|
5
|
+
size: ControlSize;
|
|
6
|
+
layout: ControlLayout;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
error: boolean;
|
|
9
|
+
focused: boolean;
|
|
10
|
+
labelled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface FieldWrapperLook {
|
|
13
|
+
root: ViewStyle;
|
|
14
|
+
labelRow: ViewStyle;
|
|
15
|
+
label: TextStyle;
|
|
16
|
+
required: TextStyle;
|
|
17
|
+
content: ViewStyle;
|
|
18
|
+
messages: ViewStyle;
|
|
19
|
+
error: TextStyle;
|
|
20
|
+
hint: TextStyle;
|
|
21
|
+
errorIconSize: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function fieldWrapperLook(t: Tokens, s: FieldWrapperState): FieldWrapperLook;
|
|
24
|
+
export declare function fieldWidthStyle(t: Tokens, width: FieldWidth | undefined, layout: ControlLayout): ViewStyle;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { IconBadge, IconDefinition, IconSize, IconTone, IconVariant, IconWeight } from '@dcs-tech/core';
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
icon: IconDefinition;
|
|
6
|
+
size?: IconSize;
|
|
7
|
+
tone?: IconTone;
|
|
8
|
+
color?: string;
|
|
9
|
+
filled?: boolean;
|
|
10
|
+
weight?: IconWeight;
|
|
11
|
+
variant?: IconVariant;
|
|
12
|
+
duotoneTone?: IconTone;
|
|
13
|
+
label?: string;
|
|
14
|
+
done?: boolean;
|
|
15
|
+
badge?: IconBadge;
|
|
16
|
+
badgeTone?: IconTone;
|
|
17
|
+
badgeMax?: number;
|
|
18
|
+
badgeLabel?: string;
|
|
19
|
+
mark?: IconDefinition | IconComponent;
|
|
20
|
+
markTone?: IconTone;
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
testID?: string;
|
|
23
|
+
}
|
|
24
|
+
export type ViewRef = React.ComponentRef<typeof View>;
|
|
25
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<ViewRef>>;
|
|
26
|
+
export type IconComponentProps = Omit<IconProps, 'icon'>;
|
|
27
|
+
export type IconComponent = React.ForwardRefExoticComponent<IconComponentProps & React.RefAttributes<ViewRef>> & {
|
|
28
|
+
readonly icon: IconDefinition;
|
|
29
|
+
};
|
|
30
|
+
export declare function createIcon(icon: IconDefinition, displayName: string): IconComponent;
|
|
31
|
+
export interface IconSwapProps extends IconComponentProps {
|
|
32
|
+
on: boolean;
|
|
33
|
+
icon: IconComponent | IconDefinition;
|
|
34
|
+
onIcon: IconComponent | IconDefinition;
|
|
35
|
+
onLabel?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const IconSwap: React.ForwardRefExoticComponent<IconSwapProps & React.RefAttributes<ViewRef>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconDefaults } from '@dcs-tech/core';
|
|
3
|
+
export interface IconProviderProps extends IconDefaults {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const IconProvider: React.FC<IconProviderProps>;
|
|
7
|
+
export declare const useIconDefaults: () => IconDefaults;
|
|
8
|
+
export interface IconSlot {
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const IconSlotContext: React.Context<IconSlot>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Tokens } from '@dcs-tech/tokens';
|
|
2
|
+
import type { IconSize, IconTone } from '@dcs-tech/core';
|
|
3
|
+
export declare function iconPixels(t: Tokens, own: IconSize | undefined, provider: IconSize | undefined, slot: number | undefined): number;
|
|
4
|
+
export declare function iconToneColor(t: Tokens, tone: IconTone): string;
|
|
5
|
+
export declare function iconDuotoneColor(t: Tokens, tone: IconTone): string;
|
|
6
|
+
export declare function iconBadgeColors(t: Tokens, tone: IconTone): {
|
|
7
|
+
bg: string;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function iconShapeColor(t: Tokens, color: string, fallback: string): string;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export declare const IconChevronLeft: import("./Icon").IconComponent;
|
|
2
|
+
export declare const IconChevronRight: import("./Icon").IconComponent;
|
|
3
|
+
export declare const IconChevronUp: import("./Icon").IconComponent;
|
|
4
|
+
export declare const IconChevronDown: import("./Icon").IconComponent;
|
|
5
|
+
export declare const IconFirstPage: import("./Icon").IconComponent;
|
|
6
|
+
export declare const IconLastPage: import("./Icon").IconComponent;
|
|
7
|
+
export declare const IconArrowLeft: import("./Icon").IconComponent;
|
|
8
|
+
export declare const IconArrowUp: import("./Icon").IconComponent;
|
|
9
|
+
export declare const IconArrowDown: import("./Icon").IconComponent;
|
|
10
|
+
export declare const IconArrowToTop: import("./Icon").IconComponent;
|
|
11
|
+
export declare const IconArrowToBottom: import("./Icon").IconComponent;
|
|
12
|
+
export declare const IconOpenExternal: import("./Icon").IconComponent;
|
|
13
|
+
export declare const IconExpandAll: import("./Icon").IconComponent;
|
|
14
|
+
export declare const IconCollapseAll: import("./Icon").IconComponent;
|
|
15
|
+
export declare const IconDragHandle: import("./Icon").IconComponent;
|
|
16
|
+
export declare const IconMoreVertical: import("./Icon").IconComponent;
|
|
17
|
+
export declare const IconMoreHorizontal: import("./Icon").IconComponent;
|
|
18
|
+
export declare const IconHome: import("./Icon").IconComponent;
|
|
19
|
+
export declare const IconMenu: import("./Icon").IconComponent;
|
|
20
|
+
export declare const IconSwapHorizontal: import("./Icon").IconComponent;
|
|
21
|
+
export declare const IconArrowRight: import("./Icon").IconComponent;
|
|
22
|
+
export declare const IconArrowUpRight: import("./Icon").IconComponent;
|
|
23
|
+
export declare const IconPanelLeft: import("./Icon").IconComponent;
|
|
24
|
+
export declare const IconPanelRight: import("./Icon").IconComponent;
|
|
25
|
+
export declare const IconClose: import("./Icon").IconComponent;
|
|
26
|
+
export declare const IconAdd: import("./Icon").IconComponent;
|
|
27
|
+
export declare const IconDelete: import("./Icon").IconComponent;
|
|
28
|
+
export declare const IconEdit: import("./Icon").IconComponent;
|
|
29
|
+
export declare const IconCopy: import("./Icon").IconComponent;
|
|
30
|
+
export declare const IconCopyRow: import("./Icon").IconComponent;
|
|
31
|
+
export declare const IconSave: import("./Icon").IconComponent;
|
|
32
|
+
export declare const IconShare: import("./Icon").IconComponent;
|
|
33
|
+
export declare const IconPrint: import("./Icon").IconComponent;
|
|
34
|
+
export declare const IconDownload: import("./Icon").IconComponent;
|
|
35
|
+
export declare const IconExport: import("./Icon").IconComponent;
|
|
36
|
+
export declare const IconReset: import("./Icon").IconComponent;
|
|
37
|
+
export declare const IconSearch: import("./Icon").IconComponent;
|
|
38
|
+
export declare const IconCheck: import("./Icon").IconComponent;
|
|
39
|
+
export declare const IconPlay: import("./Icon").IconComponent;
|
|
40
|
+
export declare const IconPause: import("./Icon").IconComponent;
|
|
41
|
+
export declare const IconBug: import("./Icon").IconComponent;
|
|
42
|
+
export declare const IconSettings: import("./Icon").IconComponent;
|
|
43
|
+
export declare const IconSliders: import("./Icon").IconComponent;
|
|
44
|
+
export declare const IconUpload: import("./Icon").IconComponent;
|
|
45
|
+
export declare const IconRefresh: import("./Icon").IconComponent;
|
|
46
|
+
export declare const IconAlignLeft: import("./Icon").IconComponent;
|
|
47
|
+
export declare const IconAlignCenter: import("./Icon").IconComponent;
|
|
48
|
+
export declare const IconAlignRight: import("./Icon").IconComponent;
|
|
49
|
+
export declare const IconUndo: import("./Icon").IconComponent;
|
|
50
|
+
export declare const IconRedo: import("./Icon").IconComponent;
|
|
51
|
+
export declare const IconRepeat: import("./Icon").IconComponent;
|
|
52
|
+
export declare const IconLink: import("./Icon").IconComponent;
|
|
53
|
+
export declare const IconUnlink: import("./Icon").IconComponent;
|
|
54
|
+
export declare const IconScissors: import("./Icon").IconComponent;
|
|
55
|
+
export declare const IconMinus: import("./Icon").IconComponent;
|
|
56
|
+
export declare const IconPlusCircle: import("./Icon").IconComponent;
|
|
57
|
+
export declare const IconMinusCircle: import("./Icon").IconComponent;
|
|
58
|
+
export declare const IconMaximize: import("./Icon").IconComponent;
|
|
59
|
+
export declare const IconMinimize: import("./Icon").IconComponent;
|
|
60
|
+
export declare const IconWrench: import("./Icon").IconComponent;
|
|
61
|
+
export declare const IconFilter: import("./Icon").IconComponent;
|
|
62
|
+
export declare const IconFilterOnly: import("./Icon").IconComponent;
|
|
63
|
+
export declare const IconFilterAdd: import("./Icon").IconComponent;
|
|
64
|
+
export declare const IconFilterExclude: import("./Icon").IconComponent;
|
|
65
|
+
export declare const IconFilterRow: import("./Icon").IconComponent;
|
|
66
|
+
export declare const IconSort: import("./Icon").IconComponent;
|
|
67
|
+
export declare const IconColumns: import("./Icon").IconComponent;
|
|
68
|
+
export declare const IconPivot: import("./Icon").IconComponent;
|
|
69
|
+
export declare const IconOpenDetail: import("./Icon").IconComponent;
|
|
70
|
+
export declare const IconGroupBy: import("./Icon").IconComponent;
|
|
71
|
+
export declare const IconAutoFit: import("./Icon").IconComponent;
|
|
72
|
+
export declare const IconSelectRows: import("./Icon").IconComponent;
|
|
73
|
+
export declare const IconViews: import("./Icon").IconComponent;
|
|
74
|
+
export declare const IconCustomize: import("./Icon").IconComponent;
|
|
75
|
+
export declare const IconLayoutTable: import("./Icon").IconComponent;
|
|
76
|
+
export declare const IconLayoutCards: import("./Icon").IconComponent;
|
|
77
|
+
export declare const IconLayoutSplit: import("./Icon").IconComponent;
|
|
78
|
+
export declare const IconLayoutList: import("./Icon").IconComponent;
|
|
79
|
+
export declare const IconInsights: import("./Icon").IconComponent;
|
|
80
|
+
export declare const IconBolt: import("./Icon").IconComponent;
|
|
81
|
+
export declare const IconClick: import("./Icon").IconComponent;
|
|
82
|
+
export declare const IconPin: import("./Icon").IconComponent;
|
|
83
|
+
export declare const IconPinOff: import("./Icon").IconComponent;
|
|
84
|
+
export declare const IconStar: import("./Icon").IconComponent;
|
|
85
|
+
export declare const IconBookmark: import("./Icon").IconComponent;
|
|
86
|
+
export declare const IconBookmarkAdd: import("./Icon").IconComponent;
|
|
87
|
+
export declare const IconCheckbox: import("./Icon").IconComponent;
|
|
88
|
+
export declare const IconEye: import("./Icon").IconComponent;
|
|
89
|
+
export declare const IconEyeOff: import("./Icon").IconComponent;
|
|
90
|
+
export declare const IconLock: import("./Icon").IconComponent;
|
|
91
|
+
export declare const IconUnlock: import("./Icon").IconComponent;
|
|
92
|
+
export declare const IconHeart: import("./Icon").IconComponent;
|
|
93
|
+
export declare const IconBookmarkCheck: import("./Icon").IconComponent;
|
|
94
|
+
export declare const IconCircle: import("./Icon").IconComponent;
|
|
95
|
+
export declare const IconSuccess: import("./Icon").IconComponent;
|
|
96
|
+
export declare const IconWarning: import("./Icon").IconComponent;
|
|
97
|
+
export declare const IconError: import("./Icon").IconComponent;
|
|
98
|
+
export declare const IconSpinner: import("./Icon").IconComponent;
|
|
99
|
+
export declare const IconInfo: import("./Icon").IconComponent;
|
|
100
|
+
export declare const IconHelp: import("./Icon").IconComponent;
|
|
101
|
+
export declare const IconBan: import("./Icon").IconComponent;
|
|
102
|
+
export declare const IconCancel: import("./Icon").IconComponent;
|
|
103
|
+
export declare const IconCheckDouble: import("./Icon").IconComponent;
|
|
104
|
+
export declare const IconFile: import("./Icon").IconComponent;
|
|
105
|
+
export declare const IconFileText: import("./Icon").IconComponent;
|
|
106
|
+
export declare const IconFileSheet: import("./Icon").IconComponent;
|
|
107
|
+
export declare const IconBraces: import("./Icon").IconComponent;
|
|
108
|
+
export declare const IconCode: import("./Icon").IconComponent;
|
|
109
|
+
export declare const IconGlobe: import("./Icon").IconComponent;
|
|
110
|
+
export declare const IconDatabase: import("./Icon").IconComponent;
|
|
111
|
+
export declare const IconFolder: import("./Icon").IconComponent;
|
|
112
|
+
export declare const IconFilePlus: import("./Icon").IconComponent;
|
|
113
|
+
export declare const IconFileCheck: import("./Icon").IconComponent;
|
|
114
|
+
export declare const IconFileUpload: import("./Icon").IconComponent;
|
|
115
|
+
export declare const IconFileDownload: import("./Icon").IconComponent;
|
|
116
|
+
export declare const IconImageAdd: import("./Icon").IconComponent;
|
|
117
|
+
export declare const IconZoomIn: import("./Icon").IconComponent;
|
|
118
|
+
export declare const IconZoomOut: import("./Icon").IconComponent;
|
|
119
|
+
export declare const IconRotateLeft: import("./Icon").IconComponent;
|
|
120
|
+
export declare const IconRotateRight: import("./Icon").IconComponent;
|
|
121
|
+
export declare const IconFlip: import("./Icon").IconComponent;
|
|
122
|
+
export declare const IconRuler: import("./Icon").IconComponent;
|
|
123
|
+
export declare const IconHand: import("./Icon").IconComponent;
|
|
124
|
+
export declare const IconImage: import("./Icon").IconComponent;
|
|
125
|
+
export declare const IconCrop: import("./Icon").IconComponent;
|
|
126
|
+
export declare const IconUser: import("./Icon").IconComponent;
|
|
127
|
+
export declare const IconUsers: import("./Icon").IconComponent;
|
|
128
|
+
export declare const IconCalendar: import("./Icon").IconComponent;
|
|
129
|
+
export declare const IconClock: import("./Icon").IconComponent;
|
|
130
|
+
export declare const IconStore: import("./Icon").IconComponent;
|
|
131
|
+
export declare const IconCard: import("./Icon").IconComponent;
|
|
132
|
+
export declare const IconHistory: import("./Icon").IconComponent;
|
|
133
|
+
export declare const IconClockPlus: import("./Icon").IconComponent;
|
|
134
|
+
export declare const IconBriefcase: import("./Icon").IconComponent;
|
|
135
|
+
export declare const IconBook: import("./Icon").IconComponent;
|
|
136
|
+
export declare const IconClipboard: import("./Icon").IconComponent;
|
|
137
|
+
export declare const IconClipboardList: import("./Icon").IconComponent;
|
|
138
|
+
export declare const IconClipboardCheck: import("./Icon").IconComponent;
|
|
139
|
+
export declare const IconHierarchy: import("./Icon").IconComponent;
|
|
140
|
+
export declare const IconBranch: import("./Icon").IconComponent;
|
|
141
|
+
export declare const IconShapes: import("./Icon").IconComponent;
|
|
142
|
+
export declare const IconScale: import("./Icon").IconComponent;
|
|
143
|
+
export declare const IconLifeBuoy: import("./Icon").IconComponent;
|
|
144
|
+
export declare const IconAward: import("./Icon").IconComponent;
|
|
145
|
+
export declare const IconTarget: import("./Icon").IconComponent;
|
|
146
|
+
export declare const IconBarChart: import("./Icon").IconComponent;
|
|
147
|
+
export declare const IconSparkles: import("./Icon").IconComponent;
|
|
148
|
+
export declare const IconHandshake: import("./Icon").IconComponent;
|
|
149
|
+
export declare const IconBold: import("./Icon").IconComponent;
|
|
150
|
+
export declare const IconItalic: import("./Icon").IconComponent;
|
|
151
|
+
export declare const IconUnderline: import("./Icon").IconComponent;
|
|
152
|
+
export declare const IconStrikethrough: import("./Icon").IconComponent;
|
|
153
|
+
export declare const IconFontSize: import("./Icon").IconComponent;
|
|
154
|
+
export declare const IconText: import("./Icon").IconComponent;
|
|
155
|
+
export declare const IconEraser: import("./Icon").IconComponent;
|
|
156
|
+
export declare const IconHash: import("./Icon").IconComponent;
|
|
157
|
+
export declare const IconListNumbered: import("./Icon").IconComponent;
|
|
158
|
+
export declare const IconListCheck: import("./Icon").IconComponent;
|
|
159
|
+
export declare const IconListBulleted: import("./Icon").IconComponent;
|
|
160
|
+
export declare const IconQuote: import("./Icon").IconComponent;
|
|
161
|
+
export declare const IconHeading: import("./Icon").IconComponent;
|
|
162
|
+
export declare const IconAlignJustify: import("./Icon").IconComponent;
|
|
163
|
+
export declare const IconIndent: import("./Icon").IconComponent;
|
|
164
|
+
export declare const IconOutdent: import("./Icon").IconComponent;
|
|
165
|
+
export declare const IconCodeBlock: import("./Icon").IconComponent;
|
|
166
|
+
export declare const IconTextDirection: import("./Icon").IconComponent;
|
|
167
|
+
export declare const IconHighlighter: import("./Icon").IconComponent;
|
|
168
|
+
export declare const IconTextColor: import("./Icon").IconComponent;
|
|
169
|
+
export declare const IconListPlus: import("./Icon").IconComponent;
|
|
170
|
+
export declare const IconListMinus: import("./Icon").IconComponent;
|
|
171
|
+
export declare const IconUserAdd: import("./Icon").IconComponent;
|
|
172
|
+
export declare const IconUserCheck: import("./Icon").IconComponent;
|
|
173
|
+
export declare const IconUserSearch: import("./Icon").IconComponent;
|
|
174
|
+
export declare const IconUserSettings: import("./Icon").IconComponent;
|
|
175
|
+
export declare const IconUserShield: import("./Icon").IconComponent;
|
|
176
|
+
export declare const IconAccountCircle: import("./Icon").IconComponent;
|
|
177
|
+
export declare const IconIdCard: import("./Icon").IconComponent;
|
|
178
|
+
export declare const IconLogout: import("./Icon").IconComponent;
|
|
179
|
+
export declare const IconKey: import("./Icon").IconComponent;
|
|
180
|
+
export declare const IconShield: import("./Icon").IconComponent;
|
|
181
|
+
export declare const IconShieldCheck: import("./Icon").IconComponent;
|
|
182
|
+
export declare const IconThumbUp: import("./Icon").IconComponent;
|
|
183
|
+
export declare const IconThumbDown: import("./Icon").IconComponent;
|
|
184
|
+
export declare const IconFlag: import("./Icon").IconComponent;
|
|
185
|
+
export declare const IconBadgeCheck: import("./Icon").IconComponent;
|
|
186
|
+
export declare const IconMail: import("./Icon").IconComponent;
|
|
187
|
+
export declare const IconPhone: import("./Icon").IconComponent;
|
|
188
|
+
export declare const IconPhoneCall: import("./Icon").IconComponent;
|
|
189
|
+
export declare const IconMessage: import("./Icon").IconComponent;
|
|
190
|
+
export declare const IconComment: import("./Icon").IconComponent;
|
|
191
|
+
export declare const IconSend: import("./Icon").IconComponent;
|
|
192
|
+
export declare const IconAtSign: import("./Icon").IconComponent;
|
|
193
|
+
export declare const IconBell: import("./Icon").IconComponent;
|
|
194
|
+
export declare const IconInbox: import("./Icon").IconComponent;
|
|
195
|
+
export declare const IconCart: import("./Icon").IconComponent;
|
|
196
|
+
export declare const IconShoppingBag: import("./Icon").IconComponent;
|
|
197
|
+
export declare const IconWallet: import("./Icon").IconComponent;
|
|
198
|
+
export declare const IconCoins: import("./Icon").IconComponent;
|
|
199
|
+
export declare const IconBanknote: import("./Icon").IconComponent;
|
|
200
|
+
export declare const IconReceipt: import("./Icon").IconComponent;
|
|
201
|
+
export declare const IconInvoice: import("./Icon").IconComponent;
|
|
202
|
+
export declare const IconCalculator: import("./Icon").IconComponent;
|
|
203
|
+
export declare const IconPercent: import("./Icon").IconComponent;
|
|
204
|
+
export declare const IconTag: import("./Icon").IconComponent;
|
|
205
|
+
export declare const IconGift: import("./Icon").IconComponent;
|
|
206
|
+
export declare const IconPointOfSale: import("./Icon").IconComponent;
|
|
207
|
+
export declare const IconBank: import("./Icon").IconComponent;
|
|
208
|
+
export declare const IconRupee: import("./Icon").IconComponent;
|
|
209
|
+
export declare const IconUpi: import("./Icon").IconComponent;
|
|
210
|
+
export declare const IconUpiTagline: import("./Icon").IconComponent;
|
|
211
|
+
export declare const IconUpiMono: import("./Icon").IconComponent;
|
|
212
|
+
export declare const IconDollar: import("./Icon").IconComponent;
|
|
213
|
+
export declare const IconTruck: import("./Icon").IconComponent;
|
|
214
|
+
export declare const IconPackage: import("./Icon").IconComponent;
|
|
215
|
+
export declare const IconBoxes: import("./Icon").IconComponent;
|
|
216
|
+
export declare const IconArchive: import("./Icon").IconComponent;
|
|
217
|
+
export declare const IconWarehouse: import("./Icon").IconComponent;
|
|
218
|
+
export declare const IconBuilding: import("./Icon").IconComponent;
|
|
219
|
+
export declare const IconLocationPin: import("./Icon").IconComponent;
|
|
220
|
+
export declare const IconMap: import("./Icon").IconComponent;
|
|
221
|
+
export declare const IconRoute: import("./Icon").IconComponent;
|
|
222
|
+
export declare const IconBarcode: import("./Icon").IconComponent;
|
|
223
|
+
export declare const IconQrCode: import("./Icon").IconComponent;
|
|
224
|
+
export declare const IconScan: import("./Icon").IconComponent;
|
|
225
|
+
export declare const IconMonitor: import("./Icon").IconComponent;
|
|
226
|
+
export declare const IconSmartphone: import("./Icon").IconComponent;
|
|
227
|
+
export declare const IconTablet: import("./Icon").IconComponent;
|
|
228
|
+
export declare const IconCloud: import("./Icon").IconComponent;
|
|
229
|
+
export declare const IconCloudOff: import("./Icon").IconComponent;
|
|
230
|
+
export declare const IconCloudUpload: import("./Icon").IconComponent;
|
|
231
|
+
export declare const IconCloudDownload: import("./Icon").IconComponent;
|
|
232
|
+
export declare const IconWifiOff: import("./Icon").IconComponent;
|
|
233
|
+
export declare const IconPower: import("./Icon").IconComponent;
|
|
234
|
+
export declare const IconMoon: import("./Icon").IconComponent;
|
|
235
|
+
export declare const IconSun: import("./Icon").IconComponent;
|
|
236
|
+
export declare const IconPalette: import("./Icon").IconComponent;
|
|
237
|
+
export declare const IconPipette: import("./Icon").IconComponent;
|
|
238
|
+
export declare const IconDashboard: import("./Icon").IconComponent;
|
|
239
|
+
export declare const IconLayers: import("./Icon").IconComponent;
|
|
240
|
+
export declare const IconGrid: import("./Icon").IconComponent;
|
|
241
|
+
export declare const IconAspectRatio: import("./Icon").IconComponent;
|
|
242
|
+
export declare const IconGridSnap: import("./Icon").IconComponent;
|
|
243
|
+
export declare const IconFileSettings: import("./Icon").IconComponent;
|
|
244
|
+
export declare const IconFileReturn: import("./Icon").IconComponent;
|
|
245
|
+
export declare const IconListClock: import("./Icon").IconComponent;
|
|
246
|
+
export declare const IconPriceChange: import("./Icon").IconComponent;
|
|
247
|
+
export declare const IconQuickReply: import("./Icon").IconComponent;
|
|
248
|
+
export declare const IconMagicWand: import("./Icon").IconComponent;
|
|
249
|
+
export declare const IconBrush: import("./Icon").IconComponent;
|
|
250
|
+
export declare const IconRoad: import("./Icon").IconComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Icon, IconSwap, createIcon } from './Icon';
|
|
2
|
+
export type { IconProps, IconComponentProps, IconComponent, IconSwapProps, ViewRef } from './Icon';
|
|
3
|
+
export { IconProvider, useIconDefaults } from './IconContext';
|
|
4
|
+
export type { IconProviderProps } from './IconContext';
|
|
5
|
+
export { useIconDone } from './useIconDone';
|
|
6
|
+
export type { UseIconDoneOptions } from './useIconDone';
|
|
7
|
+
export * from './icons';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInput, type StyleProp, type TextInputProps, type TextInputSubmitEditingEvent, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { ControlLayout, ControlSize, ControlVariant, FieldChangeEvent, FieldWidth, IconConfig } from '@dcs-tech/core';
|
|
4
|
+
export type NativeInputType = 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search';
|
|
5
|
+
export interface InputProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: string | number;
|
|
9
|
+
defaultValue?: string | number;
|
|
10
|
+
onChange?: (event: FieldChangeEvent<string>) => void;
|
|
11
|
+
onChangeText?: (text: string) => void;
|
|
12
|
+
type?: NativeInputType;
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
hint?: React.ReactNode;
|
|
16
|
+
error?: React.ReactNode;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
autoFocus?: boolean;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
showCharCount?: boolean;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
prefix?: React.ReactNode;
|
|
25
|
+
suffix?: React.ReactNode;
|
|
26
|
+
icon?: IconConfig;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
rows?: number;
|
|
29
|
+
size?: ControlSize;
|
|
30
|
+
variant?: ControlVariant;
|
|
31
|
+
layout?: ControlLayout;
|
|
32
|
+
width?: FieldWidth;
|
|
33
|
+
style?: StyleProp<ViewStyle>;
|
|
34
|
+
inputMode?: TextInputProps['inputMode'];
|
|
35
|
+
spellCheck?: boolean;
|
|
36
|
+
autoComplete?: TextInputProps['autoComplete'];
|
|
37
|
+
returnKeyType?: TextInputProps['returnKeyType'];
|
|
38
|
+
onSubmitEditing?: (event: TextInputSubmitEditingEvent) => void;
|
|
39
|
+
onFocus?: () => void;
|
|
40
|
+
onBlur?: () => void;
|
|
41
|
+
'aria-label'?: string;
|
|
42
|
+
testID?: string;
|
|
43
|
+
}
|
|
44
|
+
export type TextInputRef = React.ComponentRef<typeof TextInput>;
|
|
45
|
+
export interface InputHandle {
|
|
46
|
+
focus(opts?: {
|
|
47
|
+
select?: boolean;
|
|
48
|
+
caret?: 'start' | 'end';
|
|
49
|
+
}): void;
|
|
50
|
+
blur(): void;
|
|
51
|
+
readonly element: TextInputRef | null;
|
|
52
|
+
}
|
|
53
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputHandle>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { Tokens } from '@dcs-tech/tokens';
|
|
3
|
+
export declare const PASSWORD_TOGGLE_BOX = 24;
|
|
4
|
+
export declare function affixStyle(t: Tokens, side: 'prefix' | 'suffix'): {
|
|
5
|
+
box: ViewStyle;
|
|
6
|
+
text: TextStyle;
|
|
7
|
+
};
|
|
8
|
+
export declare function clearButtonStyle(t: Tokens, pressed: boolean): ViewStyle;
|
|
9
|
+
export declare function passwordToggleStyle(t: Tokens, pressed: boolean): ViewStyle;
|
|
10
|
+
export declare function charCountStyle(t: Tokens, error: boolean): TextStyle;
|
|
11
|
+
export declare function multilineTextStyle(t: Tokens, fontSize: number, rows: number | undefined): TextStyle;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type GestureResponderEvent } from 'react-native';
|
|
3
|
+
import type { ViewRef } from '../Icon/Icon';
|
|
4
|
+
export interface RippleOptions {
|
|
5
|
+
color: string;
|
|
6
|
+
centered?: boolean;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface Ripple {
|
|
10
|
+
ref: React.RefObject<ViewRef | null>;
|
|
11
|
+
onPressIn: (e: GestureResponderEvent) => void;
|
|
12
|
+
onPressOut: () => void;
|
|
13
|
+
layer: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function useRipple({ color, centered, enabled }: RippleOptions, radius: number | undefined): Ripple;
|
|
16
|
+
export declare function usePressHold(enabled?: boolean): {
|
|
17
|
+
pressed: boolean;
|
|
18
|
+
onPressIn: () => void;
|
|
19
|
+
onPressOut: () => void;
|
|
20
|
+
};
|