dhre-ui-kit 3.3.0 → 3.4.2
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/lib/components/button/Button.interface.d.ts +7 -5
- package/lib/components/button/Button.styles.d.ts +7 -32
- package/lib/components/chip/Chip.styles.d.ts +1 -1
- package/lib/components/customHeader/CustomHeader.interface.d.ts +2 -0
- package/lib/components/dateRangePicker/DateRangePicker.styles.d.ts +0 -8
- package/lib/components/radio-button-group/RadioButtonGroup.interface.d.ts +3 -2
- package/lib/components/singleSelectionTag/TagSingleSelection.styles.d.ts +0 -1
- package/lib/index.js +324 -265
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +320 -265
- package/lib/index.mjs.map +1 -1
- package/lib/theme/colors.d.ts +13 -5
- package/lib/theme/gradients.d.ts +9 -0
- package/lib/theme/themes.d.ts +76 -0
- package/lib/utils/appEnum.d.ts +19 -0
- package/package.json +1 -1
|
@@ -54,13 +54,15 @@ export interface CustomButtonProps {
|
|
|
54
54
|
loaderColor?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Visual style of the button.
|
|
57
|
-
* - `'primary'`
|
|
58
|
-
* - `'secondary'`
|
|
59
|
-
* - `'
|
|
60
|
-
* - `'
|
|
57
|
+
* - `'primary'` – theme-aware fill (white on dark / navy on light) · no border · contrasting label
|
|
58
|
+
* - `'secondary'` – theme-aware inverted fill · contrasting border · contrasting label
|
|
59
|
+
* - `'tertiary'` – solid brand-teal fill · no border · static white label
|
|
60
|
+
* - `'quaternary'` – no fill · brand-teal outline · theme-aware label
|
|
61
|
+
* - `'link'` – no fill · no border · cyan link-colour label · compact content-height layout (DHDS Buttons/Link Text)
|
|
62
|
+
* - `'default'` – layout only (size-aware padding / height / gap) · no imposed colours · full consumer control via containerStyle / textStyle / titleColor
|
|
61
63
|
* @default 'primary'
|
|
62
64
|
*/
|
|
63
|
-
variant?: 'primary' | 'secondary' | 'link' | 'default';
|
|
65
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'link' | 'default';
|
|
64
66
|
/**
|
|
65
67
|
* Controls height and horizontal padding.
|
|
66
68
|
* - `'large'` – 48 dp · 24 dp h-padding · Body 2 Medium (Body 1 Medium for link)
|
|
@@ -74,13 +74,13 @@ export default styles;
|
|
|
74
74
|
* Static color tokens mapped to DHDS Figma variables for the Button component.
|
|
75
75
|
*
|
|
76
76
|
* THEME-AWARE NOTE (v2):
|
|
77
|
-
* Background, text, and border colours for
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* below remain as static design tokens (they do not change between themes).
|
|
77
|
+
* Background, text, and border colours for every variant are resolved at
|
|
78
|
+
* runtime via `useTheme()` in Button.tsx so that both light and dark modes
|
|
79
|
+
* are supported correctly.
|
|
81
80
|
*
|
|
82
|
-
* The legacy constants (PRIMARY_DEFAULT_BG, PRIMARY_TEXT, etc.) are
|
|
83
|
-
* for backward compatibility in case any consumer imports them
|
|
81
|
+
* The legacy constants below (PRIMARY_DEFAULT_BG, PRIMARY_TEXT, etc.) are
|
|
82
|
+
* preserved for backward compatibility in case any consumer imports them
|
|
83
|
+
* directly.
|
|
84
84
|
*/
|
|
85
85
|
export declare const BUTTON_COLORS: {
|
|
86
86
|
/** @deprecated resolved via Theme.BUTTON_DEFAULT_FILL in Button.tsx */
|
|
@@ -97,20 +97,13 @@ export declare const BUTTON_COLORS: {
|
|
|
97
97
|
readonly SECONDARY_TEXT: string;
|
|
98
98
|
/** @deprecated resolved via Theme.STROKE_DISABLED_DARK in Button.tsx */
|
|
99
99
|
readonly DISABLED_TEXT: string;
|
|
100
|
-
/** --DH-Gradient/Stroke/Primary-button start → cyan */
|
|
101
|
-
readonly GRADIENT_BORDER_START: string;
|
|
102
|
-
/** --DH-Gradient/Stroke/Primary-button end → blue */
|
|
103
|
-
readonly GRADIENT_BORDER_END: "#3590E1";
|
|
104
100
|
/** @deprecated resolved via Theme.BORDER_INVERTED in Button.tsx */
|
|
105
101
|
readonly SECONDARY_BORDER: string;
|
|
106
102
|
/** @deprecated resolved via Theme.STROKE_DISABLED_DARK in Button.tsx */
|
|
107
103
|
readonly DISABLED_BORDER: string;
|
|
108
104
|
};
|
|
109
105
|
/**
|
|
110
|
-
* Per-size layout styles.
|
|
111
|
-
* `pressable` → applied to the Pressable (all variants).
|
|
112
|
-
* `gradientWrapper`→ applied to the LinearGradient shell (primary default only);
|
|
113
|
-
* padding:1 creates the visible 1 dp gradient border.
|
|
106
|
+
* Per-size layout styles applied to the Pressable (all variants).
|
|
114
107
|
*/
|
|
115
108
|
export declare const BUTTON_SIZE_STYLES: {
|
|
116
109
|
largePressable: {
|
|
@@ -124,12 +117,6 @@ export declare const BUTTON_SIZE_STYLES: {
|
|
|
124
117
|
borderRadius: number;
|
|
125
118
|
overflow: "hidden";
|
|
126
119
|
};
|
|
127
|
-
largeGradientWrapper: {
|
|
128
|
-
borderRadius: number;
|
|
129
|
-
padding: number;
|
|
130
|
-
overflow: "hidden";
|
|
131
|
-
height: number;
|
|
132
|
-
};
|
|
133
120
|
mediumPressable: {
|
|
134
121
|
minHeight: number;
|
|
135
122
|
paddingHorizontal: number;
|
|
@@ -141,12 +128,6 @@ export declare const BUTTON_SIZE_STYLES: {
|
|
|
141
128
|
borderRadius: number;
|
|
142
129
|
overflow: "hidden";
|
|
143
130
|
};
|
|
144
|
-
mediumGradientWrapper: {
|
|
145
|
-
borderRadius: number;
|
|
146
|
-
padding: number;
|
|
147
|
-
overflow: "hidden";
|
|
148
|
-
height: number;
|
|
149
|
-
};
|
|
150
131
|
smallPressable: {
|
|
151
132
|
minHeight: number;
|
|
152
133
|
paddingHorizontal: number;
|
|
@@ -158,12 +139,6 @@ export declare const BUTTON_SIZE_STYLES: {
|
|
|
158
139
|
borderRadius: number;
|
|
159
140
|
overflow: "hidden";
|
|
160
141
|
};
|
|
161
|
-
smallGradientWrapper: {
|
|
162
|
-
borderRadius: number;
|
|
163
|
-
padding: number;
|
|
164
|
-
overflow: "hidden";
|
|
165
|
-
height: number;
|
|
166
|
-
};
|
|
167
142
|
};
|
|
168
143
|
/**
|
|
169
144
|
* Compact inline-layout containers for the `link` variant.
|
|
@@ -10,6 +10,8 @@ export interface IconConfig {
|
|
|
10
10
|
export interface CustomHeaderProps {
|
|
11
11
|
/** Header title text. */
|
|
12
12
|
title: string;
|
|
13
|
+
/** Overrides the title text color. Defaults to the current theme's `CONTENT_PRIMARY`. */
|
|
14
|
+
titleColor?: string;
|
|
13
15
|
/** TestID for the root container. Defaults to `'CUSTOM-HEADER'`. */
|
|
14
16
|
testId?: string;
|
|
15
17
|
/**
|
|
@@ -23,14 +23,6 @@ declare const styles: {
|
|
|
23
23
|
};
|
|
24
24
|
applyButton: {
|
|
25
25
|
marginTop: number;
|
|
26
|
-
height: number;
|
|
27
|
-
minHeight: number;
|
|
28
|
-
paddingHorizontal: number;
|
|
29
|
-
paddingVertical: number;
|
|
30
|
-
justifyContent: "center";
|
|
31
|
-
alignItems: "center";
|
|
32
|
-
borderRadius: number;
|
|
33
|
-
borderWidth: number;
|
|
34
26
|
};
|
|
35
27
|
};
|
|
36
28
|
export default styles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ViewStyle } from
|
|
2
|
-
import { FontStyle } from
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { FontStyle } from '../../utils/appEnum';
|
|
3
3
|
export type RadioButtonItem = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
@@ -14,4 +14,5 @@ export interface RadioButtonGroupProps {
|
|
|
14
14
|
size?: 'large' | 'small';
|
|
15
15
|
fontVariant?: FontStyle;
|
|
16
16
|
radioColor?: string;
|
|
17
|
+
disabled?: boolean;
|
|
17
18
|
}
|