dhre-ui-kit 0.0.153 → 0.0.154
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.d.ts +17 -6
- package/lib/index.js +161 -85
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +161 -85
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -354,7 +354,6 @@ interface AccordionProps {
|
|
|
354
354
|
headerComponent?: () => React$1.ReactNode;
|
|
355
355
|
disabled?: boolean;
|
|
356
356
|
icon: React$1.ReactElement;
|
|
357
|
-
onHeaderPress?: () => void;
|
|
358
357
|
titleVariant?: string;
|
|
359
358
|
}
|
|
360
359
|
|
|
@@ -1043,11 +1042,23 @@ interface AppointmentCardProps {
|
|
|
1043
1042
|
title: string;
|
|
1044
1043
|
headerTitle: string;
|
|
1045
1044
|
headerSubtitle: string;
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1045
|
+
onViewDetailsPress: () => void;
|
|
1046
|
+
statusIcon: React$1.ReactElement;
|
|
1047
|
+
infoIcon: React$1.ReactElement;
|
|
1048
|
+
deleteIcon: React$1.ReactElement;
|
|
1049
|
+
editIcon: React$1.ReactElement;
|
|
1050
|
+
onDeletePress: () => void;
|
|
1051
|
+
onEditPress: () => void;
|
|
1052
|
+
onDirectionPress: () => void;
|
|
1053
|
+
data: {
|
|
1054
|
+
title: string;
|
|
1055
|
+
value: string;
|
|
1056
|
+
isLocation?: boolean;
|
|
1057
|
+
isStatus?: boolean;
|
|
1058
|
+
}[];
|
|
1059
|
+
viewText: string;
|
|
1060
|
+
info: string;
|
|
1061
|
+
directionText: string;
|
|
1051
1062
|
}
|
|
1052
1063
|
|
|
1053
1064
|
declare const _default$1: (props: AppointmentCardProps) => React$1.JSX.Element;
|
package/lib/index.js
CHANGED
|
@@ -1932,7 +1932,6 @@ const Accordion = ({
|
|
|
1932
1932
|
headerComponent,
|
|
1933
1933
|
disabled = false,
|
|
1934
1934
|
icon,
|
|
1935
|
-
onHeaderPress,
|
|
1936
1935
|
titleVariant = "B4_REGULAR"
|
|
1937
1936
|
}) => {
|
|
1938
1937
|
const contentRef = React.useRef(null);
|
|
@@ -1967,22 +1966,30 @@ const Accordion = ({
|
|
|
1967
1966
|
},
|
|
1968
1967
|
testID: testId
|
|
1969
1968
|
},
|
|
1970
|
-
/* @__PURE__ */ React__default["default"].createElement(
|
|
1971
|
-
|
|
1969
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
1970
|
+
reactNative.Pressable,
|
|
1972
1971
|
{
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1972
|
+
style: [styles$m.header, headerStyle, disabled && { opacity: 0.5 }],
|
|
1973
|
+
onPress: !disabled ? onToggle : void 0
|
|
1974
|
+
},
|
|
1975
|
+
headerComponent ? headerComponent() : /* @__PURE__ */ React__default["default"].createElement(
|
|
1976
|
+
CustomTypography,
|
|
1977
|
+
{
|
|
1978
|
+
variant: titleVariant,
|
|
1979
|
+
text: title,
|
|
1980
|
+
style: {
|
|
1981
|
+
...styles$m.title,
|
|
1982
|
+
color: theme.CONTENT_PRIMARY,
|
|
1983
|
+
...titleStyle
|
|
1984
|
+
}
|
|
1979
1985
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
+
),
|
|
1987
|
+
React__default["default"].cloneElement(icon, {
|
|
1988
|
+
width: moderateScale(20),
|
|
1989
|
+
height: moderateScale(20),
|
|
1990
|
+
style: styles$m.iconStyle
|
|
1991
|
+
})
|
|
1992
|
+
),
|
|
1986
1993
|
optionalElement ? optionalElement() : null,
|
|
1987
1994
|
isOpen && /* @__PURE__ */ React__default["default"].createElement(reactNative.Animated.View, { style: [styles$m.content, { height: cardHeight }] }, /* @__PURE__ */ React__default["default"].createElement(
|
|
1988
1995
|
reactNative.View,
|
|
@@ -4245,17 +4252,47 @@ const styles$1 = reactNative.StyleSheet.create({
|
|
|
4245
4252
|
appointmentInfo: {
|
|
4246
4253
|
flex: 1,
|
|
4247
4254
|
flexDirection: "row",
|
|
4248
|
-
|
|
4255
|
+
flexWrap: "wrap",
|
|
4256
|
+
rowGap: verticalScale(16)
|
|
4249
4257
|
},
|
|
4250
4258
|
infoColumn: {
|
|
4251
|
-
|
|
4259
|
+
width: "50%",
|
|
4252
4260
|
rowGap: verticalScale(4)
|
|
4253
4261
|
},
|
|
4262
|
+
infoRow: {
|
|
4263
|
+
flexDirection: "row",
|
|
4264
|
+
columnGap: horizontalScale(4)
|
|
4265
|
+
},
|
|
4254
4266
|
locationInfo: {
|
|
4255
4267
|
rowGap: verticalScale(4)
|
|
4256
4268
|
},
|
|
4257
4269
|
getDirectionsText: {
|
|
4258
4270
|
textDecorationLine: "underline"
|
|
4271
|
+
},
|
|
4272
|
+
infoContainer: {
|
|
4273
|
+
padding: moderateScale(8),
|
|
4274
|
+
flexDirection: "row",
|
|
4275
|
+
columnGap: horizontalScale(8),
|
|
4276
|
+
borderRadius: moderateScale(8)
|
|
4277
|
+
},
|
|
4278
|
+
actionsContainer: {
|
|
4279
|
+
borderTopWidth: 1,
|
|
4280
|
+
paddingTop: verticalScale(16),
|
|
4281
|
+
flexDirection: "row"
|
|
4282
|
+
},
|
|
4283
|
+
viewText: {
|
|
4284
|
+
flex: 1,
|
|
4285
|
+
textDecorationLine: "underline",
|
|
4286
|
+
alignSelf: "center"
|
|
4287
|
+
},
|
|
4288
|
+
actionIcons: {
|
|
4289
|
+
flexDirection: "row",
|
|
4290
|
+
columnGap: horizontalScale(16)
|
|
4291
|
+
},
|
|
4292
|
+
iconContainer: {
|
|
4293
|
+
width: moderateScale(32),
|
|
4294
|
+
height: moderateScale(32),
|
|
4295
|
+
borderRadius: moderateScale(25)
|
|
4259
4296
|
}
|
|
4260
4297
|
});
|
|
4261
4298
|
|
|
@@ -4267,11 +4304,18 @@ const AppointmentCard = ({
|
|
|
4267
4304
|
title,
|
|
4268
4305
|
headerTitle,
|
|
4269
4306
|
headerSubtitle,
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4307
|
+
onViewDetailsPress,
|
|
4308
|
+
statusIcon,
|
|
4309
|
+
infoIcon,
|
|
4310
|
+
deleteIcon,
|
|
4311
|
+
editIcon,
|
|
4312
|
+
onDeletePress,
|
|
4313
|
+
onEditPress,
|
|
4314
|
+
onDirectionPress,
|
|
4315
|
+
data,
|
|
4316
|
+
viewText,
|
|
4317
|
+
info,
|
|
4318
|
+
directionText
|
|
4275
4319
|
}) => {
|
|
4276
4320
|
const { theme } = useTheme();
|
|
4277
4321
|
return /* @__PURE__ */ React__default["default"].createElement(
|
|
@@ -4287,93 +4331,125 @@ const AppointmentCard = ({
|
|
|
4287
4331
|
borderBottomColor: theme.BORDER_SEPERATOR_HEADER
|
|
4288
4332
|
},
|
|
4289
4333
|
headerStyle: styles$1.accordionHeader,
|
|
4290
|
-
headerComponent: () => /* @__PURE__ */ React__default["default"].createElement(
|
|
4291
|
-
reactNative.Pressable,
|
|
4292
|
-
{
|
|
4293
|
-
style: styles$1.accordionHeaderContent,
|
|
4294
|
-
onPress: onHeaderPress
|
|
4295
|
-
},
|
|
4296
|
-
headerIcon,
|
|
4297
|
-
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.accordionText }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4298
|
-
CustomTypography,
|
|
4299
|
-
{
|
|
4300
|
-
text: headerTitle,
|
|
4301
|
-
variant: FontStyle.L2_REGULAR,
|
|
4302
|
-
style: { color: theme.CONTENT_SECONDRY }
|
|
4303
|
-
}
|
|
4304
|
-
), /* @__PURE__ */ React__default["default"].createElement(
|
|
4305
|
-
CustomTypography,
|
|
4306
|
-
{
|
|
4307
|
-
text: headerSubtitle,
|
|
4308
|
-
variant: FontStyle.B3_REGULAR,
|
|
4309
|
-
style: { color: theme.CONTENT_PRIMARY }
|
|
4310
|
-
}
|
|
4311
|
-
))
|
|
4312
|
-
),
|
|
4313
|
-
icon
|
|
4314
|
-
},
|
|
4315
|
-
/* @__PURE__ */ React__default["default"].createElement(
|
|
4316
|
-
reactNative.View,
|
|
4317
|
-
{
|
|
4318
|
-
style: {
|
|
4319
|
-
...styles$1.accordionDetails,
|
|
4320
|
-
borderTopColor: theme.BORDER_SEPERATOR_HEADER
|
|
4321
|
-
}
|
|
4322
|
-
},
|
|
4323
|
-
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.appointmentInfo }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.infoColumn }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4334
|
+
headerComponent: () => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.accordionHeaderContent }, headerIcon, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.accordionText }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4324
4335
|
CustomTypography,
|
|
4325
4336
|
{
|
|
4326
|
-
text:
|
|
4327
|
-
variant: FontStyle.
|
|
4337
|
+
text: headerTitle,
|
|
4338
|
+
variant: FontStyle.L2_REGULAR,
|
|
4328
4339
|
style: { color: theme.CONTENT_SECONDRY }
|
|
4329
4340
|
}
|
|
4330
4341
|
), /* @__PURE__ */ React__default["default"].createElement(
|
|
4331
4342
|
CustomTypography,
|
|
4332
4343
|
{
|
|
4333
|
-
text:
|
|
4334
|
-
variant: FontStyle.
|
|
4344
|
+
text: headerSubtitle,
|
|
4345
|
+
variant: FontStyle.B3_REGULAR,
|
|
4335
4346
|
style: { color: theme.CONTENT_PRIMARY }
|
|
4336
4347
|
}
|
|
4337
|
-
)),
|
|
4348
|
+
))),
|
|
4349
|
+
icon
|
|
4350
|
+
},
|
|
4351
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
4352
|
+
reactNative.View,
|
|
4353
|
+
{
|
|
4354
|
+
style: [
|
|
4355
|
+
styles$1.accordionDetails,
|
|
4356
|
+
{ borderTopColor: theme.BORDER_SEPERATOR_HEADER }
|
|
4357
|
+
]
|
|
4358
|
+
},
|
|
4359
|
+
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.appointmentInfo }, data.map(({ title: title2, value, isLocation, isStatus }) => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.infoColumn, key: title2 }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4338
4360
|
CustomTypography,
|
|
4339
4361
|
{
|
|
4340
|
-
text:
|
|
4362
|
+
text: title2,
|
|
4341
4363
|
variant: FontStyle.L3_REGULAR,
|
|
4342
4364
|
style: { color: theme.CONTENT_SECONDRY }
|
|
4343
4365
|
}
|
|
4344
|
-
), /* @__PURE__ */ React__default["default"].createElement(
|
|
4366
|
+
), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.infoRow }, isStatus && statusIcon, /* @__PURE__ */ React__default["default"].createElement(
|
|
4345
4367
|
CustomTypography,
|
|
4346
4368
|
{
|
|
4347
|
-
text:
|
|
4369
|
+
text: value,
|
|
4348
4370
|
variant: FontStyle.L1_REGULAR,
|
|
4349
|
-
style: {
|
|
4371
|
+
style: {
|
|
4372
|
+
color: isStatus ? theme.WARNING : theme.CONTENT_PRIMARY
|
|
4373
|
+
}
|
|
4350
4374
|
}
|
|
4351
|
-
))
|
|
4352
|
-
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.locationInfo }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4375
|
+
)), isLocation && /* @__PURE__ */ React__default["default"].createElement(
|
|
4353
4376
|
CustomTypography,
|
|
4354
4377
|
{
|
|
4355
|
-
text:
|
|
4356
|
-
variant: FontStyle.
|
|
4357
|
-
style:
|
|
4378
|
+
text: directionText,
|
|
4379
|
+
variant: FontStyle.L2_REGULAR,
|
|
4380
|
+
style: [
|
|
4381
|
+
styles$1.getDirectionsText,
|
|
4382
|
+
{ color: theme.CONTENT_PRIMARY }
|
|
4383
|
+
],
|
|
4384
|
+
onPress: onDirectionPress
|
|
4358
4385
|
}
|
|
4359
|
-
),
|
|
4360
|
-
|
|
4386
|
+
)))),
|
|
4387
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
4388
|
+
reactNative.View,
|
|
4361
4389
|
{
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4390
|
+
style: [
|
|
4391
|
+
styles$1.infoContainer,
|
|
4392
|
+
{
|
|
4393
|
+
backgroundColor: theme.SURFACE_TERTIARY
|
|
4394
|
+
}
|
|
4395
|
+
]
|
|
4396
|
+
},
|
|
4397
|
+
infoIcon,
|
|
4398
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
4399
|
+
CustomTypography,
|
|
4400
|
+
{
|
|
4401
|
+
text: info,
|
|
4402
|
+
variant: FontStyle.L2_REGULAR,
|
|
4403
|
+
style: { flex: 1, color: theme.CONTENT_SECONDRY }
|
|
4404
|
+
}
|
|
4405
|
+
)
|
|
4406
|
+
),
|
|
4407
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
4408
|
+
reactNative.View,
|
|
4368
4409
|
{
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4410
|
+
style: [
|
|
4411
|
+
styles$1.actionsContainer,
|
|
4412
|
+
{
|
|
4413
|
+
borderTopColor: theme.BORDER_SEPERATOR_HEADER
|
|
4414
|
+
}
|
|
4415
|
+
]
|
|
4416
|
+
},
|
|
4417
|
+
/* @__PURE__ */ React__default["default"].createElement(
|
|
4418
|
+
CustomTypography,
|
|
4419
|
+
{
|
|
4420
|
+
text: viewText,
|
|
4421
|
+
variant: FontStyle.L2_REGULAR,
|
|
4422
|
+
style: [
|
|
4423
|
+
styles$1.viewText,
|
|
4424
|
+
{
|
|
4425
|
+
color: theme.CONTENT_PRIMARY
|
|
4426
|
+
}
|
|
4427
|
+
],
|
|
4428
|
+
onPress: onViewDetailsPress
|
|
4374
4429
|
}
|
|
4375
|
-
|
|
4376
|
-
|
|
4430
|
+
),
|
|
4431
|
+
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$1.actionIcons }, /* @__PURE__ */ React__default["default"].createElement(
|
|
4432
|
+
CustomIcon,
|
|
4433
|
+
{
|
|
4434
|
+
icon: deleteIcon,
|
|
4435
|
+
containerStyle: {
|
|
4436
|
+
...styles$1.iconContainer,
|
|
4437
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
4438
|
+
},
|
|
4439
|
+
onPress: onDeletePress
|
|
4440
|
+
}
|
|
4441
|
+
), /* @__PURE__ */ React__default["default"].createElement(
|
|
4442
|
+
CustomIcon,
|
|
4443
|
+
{
|
|
4444
|
+
icon: editIcon,
|
|
4445
|
+
containerStyle: {
|
|
4446
|
+
...styles$1.iconContainer,
|
|
4447
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
4448
|
+
},
|
|
4449
|
+
onPress: onEditPress
|
|
4450
|
+
}
|
|
4451
|
+
))
|
|
4452
|
+
)
|
|
4377
4453
|
)
|
|
4378
4454
|
);
|
|
4379
4455
|
};
|