dhre-ui-kit 3.2.0 → 3.3.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/lib/index.js +39 -11
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +39 -11
- package/lib/index.mjs.map +1 -1
- package/lib/theme/themes.d.ts +4 -0
- package/lib/utils/appEnum.d.ts +2 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -225,6 +225,7 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
|
|
|
225
225
|
Theme2["STROKE_ACTIVE"] = "STROKE_ACTIVE";
|
|
226
226
|
Theme2["STROKE_DISABLED_SELECTED"] = "STROKE_DISABLED_SELECTED";
|
|
227
227
|
Theme2["SHADOW_10"] = "SHADOW_10";
|
|
228
|
+
Theme2["SHADOW_SOFT_LIGHTEST"] = "SHADOW_SOFT_LIGHTEST";
|
|
228
229
|
return Theme2;
|
|
229
230
|
})(Theme || {});
|
|
230
231
|
|
|
@@ -912,6 +913,12 @@ const theme = {
|
|
|
912
913
|
[Theme.SHADOW_10]: {
|
|
913
914
|
dark: "rgba(255, 255, 255, 0.20)",
|
|
914
915
|
light: "rgba(0, 0, 0, 0.10)"
|
|
916
|
+
},
|
|
917
|
+
// Figma: effects/dh-shadow/5, "Shadow/Soft/Lightest" (dropdown/menu surfaces).
|
|
918
|
+
[Theme.SHADOW_SOFT_LIGHTEST]: {
|
|
919
|
+
dark: "rgba(255, 255, 255, 0.05)",
|
|
920
|
+
light: "rgba(0, 10, 40, 0.05)"
|
|
921
|
+
// light-theme value pending DHDS Figma spec
|
|
915
922
|
}
|
|
916
923
|
};
|
|
917
924
|
|
|
@@ -11913,19 +11920,32 @@ const CustomDropdown = (props) => {
|
|
|
11913
11920
|
};
|
|
11914
11921
|
const renderItem = (item) => {
|
|
11915
11922
|
const isSelected = item[valueField] === value;
|
|
11916
|
-
return /* @__PURE__ */ React__default["default"].createElement(
|
|
11917
|
-
reactNative.
|
|
11923
|
+
return /* @__PURE__ */ React__default["default"].createElement(
|
|
11924
|
+
reactNative.View,
|
|
11918
11925
|
{
|
|
11919
11926
|
style: [
|
|
11920
|
-
styles$6.
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11927
|
+
styles$6.itemContainer,
|
|
11928
|
+
isSelected && {
|
|
11929
|
+
backgroundColor: theme.SURFACE_INVERTED,
|
|
11930
|
+
borderRadius: DHRE_RADIUS_BASE.RADIUS_8
|
|
11931
|
+
},
|
|
11932
|
+
itemContainerStyle
|
|
11925
11933
|
]
|
|
11926
11934
|
},
|
|
11927
|
-
|
|
11928
|
-
|
|
11935
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
11936
|
+
reactNative.Text,
|
|
11937
|
+
{
|
|
11938
|
+
style: [
|
|
11939
|
+
styles$6.itemText,
|
|
11940
|
+
FONT_STYLES[FontStyle.BODY1_MEDIUM],
|
|
11941
|
+
{ color: isSelected ? theme.CONTENT_INVERTED : theme.CONTENT_PRIMARY },
|
|
11942
|
+
itemTextStyle,
|
|
11943
|
+
isSelected && selectedItemTextStyle
|
|
11944
|
+
]
|
|
11945
|
+
},
|
|
11946
|
+
item[labelField]
|
|
11947
|
+
)
|
|
11948
|
+
);
|
|
11929
11949
|
};
|
|
11930
11950
|
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$6.container, containerStyle] }, label && renderLabel(), /* @__PURE__ */ React__default["default"].createElement(
|
|
11931
11951
|
reactNativeElementDropdown.Dropdown,
|
|
@@ -11978,7 +11998,13 @@ const CustomDropdown = (props) => {
|
|
|
11978
11998
|
backgroundColor: theme.SURFACE_SECONDARY,
|
|
11979
11999
|
borderColor: theme.STROKE_TERTIARY,
|
|
11980
12000
|
borderWidth: 1,
|
|
11981
|
-
borderRadius: DHRE_RADIUS_BASE.RADIUS_8
|
|
12001
|
+
borderRadius: DHRE_RADIUS_BASE.RADIUS_8,
|
|
12002
|
+
padding: DHRE_PADDING_BASE.PADDING_16,
|
|
12003
|
+
shadowColor: theme.SHADOW_SOFT_LIGHTEST,
|
|
12004
|
+
shadowOffset: { width: 0, height: 2 },
|
|
12005
|
+
shadowOpacity: 1,
|
|
12006
|
+
shadowRadius: 10,
|
|
12007
|
+
elevation: 4
|
|
11982
12008
|
},
|
|
11983
12009
|
menuContainerStyle
|
|
11984
12010
|
],
|
|
@@ -12039,8 +12065,10 @@ const styles$6 = reactNative.StyleSheet.create({
|
|
|
12039
12065
|
maxHeight: verticalScale(150)
|
|
12040
12066
|
},
|
|
12041
12067
|
itemContainer: {
|
|
12068
|
+
minHeight: verticalScale(48),
|
|
12042
12069
|
paddingVertical: verticalScale(8),
|
|
12043
|
-
paddingHorizontal: horizontalScale(
|
|
12070
|
+
paddingHorizontal: horizontalScale(16),
|
|
12071
|
+
justifyContent: "center"
|
|
12044
12072
|
},
|
|
12045
12073
|
itemText: {},
|
|
12046
12074
|
helperText: {
|