dhre-ui-kit 0.0.153 → 0.0.155
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 +162 -85
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +162 -85
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1899,7 +1899,6 @@ const Accordion = ({
|
|
|
1899
1899
|
headerComponent,
|
|
1900
1900
|
disabled = false,
|
|
1901
1901
|
icon,
|
|
1902
|
-
onHeaderPress,
|
|
1903
1902
|
titleVariant = "B4_REGULAR"
|
|
1904
1903
|
}) => {
|
|
1905
1904
|
const contentRef = useRef(null);
|
|
@@ -1934,22 +1933,30 @@ const Accordion = ({
|
|
|
1934
1933
|
},
|
|
1935
1934
|
testID: testId
|
|
1936
1935
|
},
|
|
1937
|
-
/* @__PURE__ */ React.createElement(
|
|
1938
|
-
|
|
1936
|
+
/* @__PURE__ */ React.createElement(
|
|
1937
|
+
Pressable,
|
|
1939
1938
|
{
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1939
|
+
style: [styles$m.header, headerStyle, disabled && { opacity: 0.5 }],
|
|
1940
|
+
onPress: !disabled ? onToggle : void 0
|
|
1941
|
+
},
|
|
1942
|
+
headerComponent ? headerComponent() : /* @__PURE__ */ React.createElement(
|
|
1943
|
+
CustomTypography,
|
|
1944
|
+
{
|
|
1945
|
+
variant: titleVariant,
|
|
1946
|
+
text: title,
|
|
1947
|
+
style: {
|
|
1948
|
+
...styles$m.title,
|
|
1949
|
+
color: theme.CONTENT_PRIMARY,
|
|
1950
|
+
...titleStyle
|
|
1951
|
+
}
|
|
1946
1952
|
}
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
+
),
|
|
1954
|
+
React.cloneElement(icon, {
|
|
1955
|
+
width: moderateScale(20),
|
|
1956
|
+
height: moderateScale(20),
|
|
1957
|
+
style: styles$m.iconStyle
|
|
1958
|
+
})
|
|
1959
|
+
),
|
|
1953
1960
|
optionalElement ? optionalElement() : null,
|
|
1954
1961
|
isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$m.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1955
1962
|
View,
|
|
@@ -4212,17 +4219,48 @@ const styles$1 = StyleSheet.create({
|
|
|
4212
4219
|
appointmentInfo: {
|
|
4213
4220
|
flex: 1,
|
|
4214
4221
|
flexDirection: "row",
|
|
4215
|
-
|
|
4222
|
+
flexWrap: "wrap",
|
|
4223
|
+
rowGap: verticalScale(16)
|
|
4216
4224
|
},
|
|
4217
4225
|
infoColumn: {
|
|
4218
|
-
|
|
4226
|
+
width: "50%",
|
|
4219
4227
|
rowGap: verticalScale(4)
|
|
4220
4228
|
},
|
|
4229
|
+
infoRow: {
|
|
4230
|
+
flexDirection: "row",
|
|
4231
|
+
columnGap: horizontalScale(4)
|
|
4232
|
+
},
|
|
4221
4233
|
locationInfo: {
|
|
4222
4234
|
rowGap: verticalScale(4)
|
|
4223
4235
|
},
|
|
4224
4236
|
getDirectionsText: {
|
|
4225
4237
|
textDecorationLine: "underline"
|
|
4238
|
+
},
|
|
4239
|
+
infoContainer: {
|
|
4240
|
+
padding: moderateScale(8),
|
|
4241
|
+
flexDirection: "row",
|
|
4242
|
+
columnGap: horizontalScale(8),
|
|
4243
|
+
borderRadius: moderateScale(8)
|
|
4244
|
+
},
|
|
4245
|
+
actionsContainer: {
|
|
4246
|
+
borderTopWidth: 1,
|
|
4247
|
+
paddingTop: verticalScale(16),
|
|
4248
|
+
flexDirection: "row"
|
|
4249
|
+
},
|
|
4250
|
+
viewText: {
|
|
4251
|
+
flex: 1,
|
|
4252
|
+
textDecorationLine: "underline",
|
|
4253
|
+
alignSelf: "center",
|
|
4254
|
+
textAlign: "left"
|
|
4255
|
+
},
|
|
4256
|
+
actionIcons: {
|
|
4257
|
+
flexDirection: "row",
|
|
4258
|
+
columnGap: horizontalScale(16)
|
|
4259
|
+
},
|
|
4260
|
+
iconContainer: {
|
|
4261
|
+
width: moderateScale(32),
|
|
4262
|
+
height: moderateScale(32),
|
|
4263
|
+
borderRadius: moderateScale(25)
|
|
4226
4264
|
}
|
|
4227
4265
|
});
|
|
4228
4266
|
|
|
@@ -4234,11 +4272,18 @@ const AppointmentCard = ({
|
|
|
4234
4272
|
title,
|
|
4235
4273
|
headerTitle,
|
|
4236
4274
|
headerSubtitle,
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4275
|
+
onViewDetailsPress,
|
|
4276
|
+
statusIcon,
|
|
4277
|
+
infoIcon,
|
|
4278
|
+
deleteIcon,
|
|
4279
|
+
editIcon,
|
|
4280
|
+
onDeletePress,
|
|
4281
|
+
onEditPress,
|
|
4282
|
+
onDirectionPress,
|
|
4283
|
+
data,
|
|
4284
|
+
viewText,
|
|
4285
|
+
info,
|
|
4286
|
+
directionText
|
|
4242
4287
|
}) => {
|
|
4243
4288
|
const { theme } = useTheme();
|
|
4244
4289
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -4254,93 +4299,125 @@ const AppointmentCard = ({
|
|
|
4254
4299
|
borderBottomColor: theme.BORDER_SEPERATOR_HEADER
|
|
4255
4300
|
},
|
|
4256
4301
|
headerStyle: styles$1.accordionHeader,
|
|
4257
|
-
headerComponent: () => /* @__PURE__ */ React.createElement(
|
|
4258
|
-
Pressable,
|
|
4259
|
-
{
|
|
4260
|
-
style: styles$1.accordionHeaderContent,
|
|
4261
|
-
onPress: onHeaderPress
|
|
4262
|
-
},
|
|
4263
|
-
headerIcon,
|
|
4264
|
-
/* @__PURE__ */ React.createElement(View, { style: styles$1.accordionText }, /* @__PURE__ */ React.createElement(
|
|
4265
|
-
CustomTypography,
|
|
4266
|
-
{
|
|
4267
|
-
text: headerTitle,
|
|
4268
|
-
variant: FontStyle.L2_REGULAR,
|
|
4269
|
-
style: { color: theme.CONTENT_SECONDRY }
|
|
4270
|
-
}
|
|
4271
|
-
), /* @__PURE__ */ React.createElement(
|
|
4272
|
-
CustomTypography,
|
|
4273
|
-
{
|
|
4274
|
-
text: headerSubtitle,
|
|
4275
|
-
variant: FontStyle.B3_REGULAR,
|
|
4276
|
-
style: { color: theme.CONTENT_PRIMARY }
|
|
4277
|
-
}
|
|
4278
|
-
))
|
|
4279
|
-
),
|
|
4280
|
-
icon
|
|
4281
|
-
},
|
|
4282
|
-
/* @__PURE__ */ React.createElement(
|
|
4283
|
-
View,
|
|
4284
|
-
{
|
|
4285
|
-
style: {
|
|
4286
|
-
...styles$1.accordionDetails,
|
|
4287
|
-
borderTopColor: theme.BORDER_SEPERATOR_HEADER
|
|
4288
|
-
}
|
|
4289
|
-
},
|
|
4290
|
-
/* @__PURE__ */ React.createElement(View, { style: styles$1.appointmentInfo }, /* @__PURE__ */ React.createElement(View, { style: styles$1.infoColumn }, /* @__PURE__ */ React.createElement(
|
|
4302
|
+
headerComponent: () => /* @__PURE__ */ React.createElement(View, { style: styles$1.accordionHeaderContent }, headerIcon, /* @__PURE__ */ React.createElement(View, { style: styles$1.accordionText }, /* @__PURE__ */ React.createElement(
|
|
4291
4303
|
CustomTypography,
|
|
4292
4304
|
{
|
|
4293
|
-
text:
|
|
4294
|
-
variant: FontStyle.
|
|
4305
|
+
text: headerTitle,
|
|
4306
|
+
variant: FontStyle.L2_REGULAR,
|
|
4295
4307
|
style: { color: theme.CONTENT_SECONDRY }
|
|
4296
4308
|
}
|
|
4297
4309
|
), /* @__PURE__ */ React.createElement(
|
|
4298
4310
|
CustomTypography,
|
|
4299
4311
|
{
|
|
4300
|
-
text:
|
|
4301
|
-
variant: FontStyle.
|
|
4312
|
+
text: headerSubtitle,
|
|
4313
|
+
variant: FontStyle.B3_REGULAR,
|
|
4302
4314
|
style: { color: theme.CONTENT_PRIMARY }
|
|
4303
4315
|
}
|
|
4304
|
-
)),
|
|
4316
|
+
))),
|
|
4317
|
+
icon
|
|
4318
|
+
},
|
|
4319
|
+
/* @__PURE__ */ React.createElement(
|
|
4320
|
+
View,
|
|
4321
|
+
{
|
|
4322
|
+
style: [
|
|
4323
|
+
styles$1.accordionDetails,
|
|
4324
|
+
{ borderTopColor: theme.BORDER_SEPERATOR_HEADER }
|
|
4325
|
+
]
|
|
4326
|
+
},
|
|
4327
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$1.appointmentInfo }, data.map(({ title: title2, value, isLocation, isStatus }) => /* @__PURE__ */ React.createElement(View, { style: styles$1.infoColumn, key: title2 }, /* @__PURE__ */ React.createElement(
|
|
4305
4328
|
CustomTypography,
|
|
4306
4329
|
{
|
|
4307
|
-
text:
|
|
4330
|
+
text: title2,
|
|
4308
4331
|
variant: FontStyle.L3_REGULAR,
|
|
4309
4332
|
style: { color: theme.CONTENT_SECONDRY }
|
|
4310
4333
|
}
|
|
4311
|
-
), /* @__PURE__ */ React.createElement(
|
|
4334
|
+
), /* @__PURE__ */ React.createElement(View, { style: styles$1.infoRow }, isStatus && statusIcon, /* @__PURE__ */ React.createElement(
|
|
4312
4335
|
CustomTypography,
|
|
4313
4336
|
{
|
|
4314
|
-
text:
|
|
4337
|
+
text: value,
|
|
4315
4338
|
variant: FontStyle.L1_REGULAR,
|
|
4316
|
-
style: {
|
|
4339
|
+
style: {
|
|
4340
|
+
color: isStatus ? theme.WARNING : theme.CONTENT_PRIMARY
|
|
4341
|
+
}
|
|
4317
4342
|
}
|
|
4318
|
-
))
|
|
4319
|
-
/* @__PURE__ */ React.createElement(View, { style: styles$1.locationInfo }, /* @__PURE__ */ React.createElement(
|
|
4343
|
+
)), isLocation && /* @__PURE__ */ React.createElement(
|
|
4320
4344
|
CustomTypography,
|
|
4321
4345
|
{
|
|
4322
|
-
text:
|
|
4323
|
-
variant: FontStyle.
|
|
4324
|
-
style:
|
|
4346
|
+
text: directionText,
|
|
4347
|
+
variant: FontStyle.L2_REGULAR,
|
|
4348
|
+
style: [
|
|
4349
|
+
styles$1.getDirectionsText,
|
|
4350
|
+
{ color: theme.CONTENT_PRIMARY }
|
|
4351
|
+
],
|
|
4352
|
+
onPress: onDirectionPress
|
|
4325
4353
|
}
|
|
4326
|
-
),
|
|
4327
|
-
|
|
4354
|
+
)))),
|
|
4355
|
+
/* @__PURE__ */ React.createElement(
|
|
4356
|
+
View,
|
|
4328
4357
|
{
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4358
|
+
style: [
|
|
4359
|
+
styles$1.infoContainer,
|
|
4360
|
+
{
|
|
4361
|
+
backgroundColor: theme.SURFACE_TERTIARY
|
|
4362
|
+
}
|
|
4363
|
+
]
|
|
4364
|
+
},
|
|
4365
|
+
infoIcon,
|
|
4366
|
+
/* @__PURE__ */ React.createElement(
|
|
4367
|
+
CustomTypography,
|
|
4368
|
+
{
|
|
4369
|
+
text: info,
|
|
4370
|
+
variant: FontStyle.L2_REGULAR,
|
|
4371
|
+
style: { flex: 1, color: theme.CONTENT_SECONDRY }
|
|
4372
|
+
}
|
|
4373
|
+
)
|
|
4374
|
+
),
|
|
4375
|
+
/* @__PURE__ */ React.createElement(
|
|
4376
|
+
View,
|
|
4335
4377
|
{
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4378
|
+
style: [
|
|
4379
|
+
styles$1.actionsContainer,
|
|
4380
|
+
{
|
|
4381
|
+
borderTopColor: theme.BORDER_SEPERATOR_HEADER
|
|
4382
|
+
}
|
|
4383
|
+
]
|
|
4384
|
+
},
|
|
4385
|
+
/* @__PURE__ */ React.createElement(
|
|
4386
|
+
CustomTypography,
|
|
4387
|
+
{
|
|
4388
|
+
text: viewText,
|
|
4389
|
+
variant: FontStyle.L2_REGULAR,
|
|
4390
|
+
style: [
|
|
4391
|
+
styles$1.viewText,
|
|
4392
|
+
{
|
|
4393
|
+
color: theme.CONTENT_PRIMARY
|
|
4394
|
+
}
|
|
4395
|
+
],
|
|
4396
|
+
onPress: onViewDetailsPress
|
|
4341
4397
|
}
|
|
4342
|
-
|
|
4343
|
-
|
|
4398
|
+
),
|
|
4399
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$1.actionIcons }, /* @__PURE__ */ React.createElement(
|
|
4400
|
+
CustomIcon,
|
|
4401
|
+
{
|
|
4402
|
+
icon: deleteIcon,
|
|
4403
|
+
containerStyle: {
|
|
4404
|
+
...styles$1.iconContainer,
|
|
4405
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
4406
|
+
},
|
|
4407
|
+
onPress: onDeletePress
|
|
4408
|
+
}
|
|
4409
|
+
), /* @__PURE__ */ React.createElement(
|
|
4410
|
+
CustomIcon,
|
|
4411
|
+
{
|
|
4412
|
+
icon: editIcon,
|
|
4413
|
+
containerStyle: {
|
|
4414
|
+
...styles$1.iconContainer,
|
|
4415
|
+
backgroundColor: theme.SURFACE_INVERTED
|
|
4416
|
+
},
|
|
4417
|
+
onPress: onEditPress
|
|
4418
|
+
}
|
|
4419
|
+
))
|
|
4420
|
+
)
|
|
4344
4421
|
)
|
|
4345
4422
|
);
|
|
4346
4423
|
};
|