@ornikar/kitt-universal 27.9.1-canary.51004cd27185355acc481c9933556ade7509bc80.0 → 27.9.1-canary.7887d5a9313c31fdf8e4d5a4b645a75389e9e991.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 +3 -8
- package/dist/definitions/CardModal/CardModalBody.d.ts +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalHeader.d.ts +17 -3
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +18 -3
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +7 -6
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.d.ts.map +1 -1
- package/dist/definitions/TopNavBar/TopNavBar.d.ts +1 -1
- package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +8 -4
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +276 -154
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +276 -154
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +266 -152
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +252 -143
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +267 -153
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +253 -144
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +282 -160
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +336 -220
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +3 -3
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +3 -3
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +3 -3
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +3 -3
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +3 -3
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +3 -3
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +3 -3
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +3 -3
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1805,12 +1805,12 @@ const fullscreenModal = {
|
|
|
1805
1805
|
header: {
|
|
1806
1806
|
height: 56
|
|
1807
1807
|
},
|
|
1808
|
-
|
|
1808
|
+
sharedHorizontalPadding: 16,
|
|
1809
1809
|
footer: {
|
|
1810
1810
|
verticalPadding: 12
|
|
1811
1811
|
},
|
|
1812
1812
|
body: {
|
|
1813
|
-
verticalPadding:
|
|
1813
|
+
verticalPadding: 24
|
|
1814
1814
|
},
|
|
1815
1815
|
animation: {
|
|
1816
1816
|
overlay: {
|
|
@@ -2630,8 +2630,8 @@ const theme = {
|
|
|
2630
2630
|
forms,
|
|
2631
2631
|
highlight,
|
|
2632
2632
|
icon,
|
|
2633
|
-
iconButton,
|
|
2634
2633
|
buttonBadge,
|
|
2634
|
+
iconButton,
|
|
2635
2635
|
listItem,
|
|
2636
2636
|
pageLoader,
|
|
2637
2637
|
picker,
|
|
@@ -4199,13 +4199,21 @@ function CardModalBehaviour({
|
|
|
4199
4199
|
|
|
4200
4200
|
function CardModalBody({
|
|
4201
4201
|
children,
|
|
4202
|
-
|
|
4202
|
+
paddingX = {
|
|
4203
|
+
base: 'kitt.4',
|
|
4204
|
+
medium: 'kitt.6'
|
|
4205
|
+
},
|
|
4206
|
+
paddingY = {
|
|
4207
|
+
base: 'kitt.4',
|
|
4208
|
+
medium: 'kitt.6'
|
|
4209
|
+
},
|
|
4203
4210
|
...props
|
|
4204
4211
|
}) {
|
|
4205
4212
|
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
4206
4213
|
showsVerticalScrollIndicator: false,
|
|
4207
4214
|
_contentContainerStyle: {
|
|
4208
|
-
|
|
4215
|
+
paddingX,
|
|
4216
|
+
paddingY
|
|
4209
4217
|
},
|
|
4210
4218
|
...props,
|
|
4211
4219
|
children: children
|
|
@@ -4235,145 +4243,53 @@ function CardModalFooter({
|
|
|
4235
4243
|
});
|
|
4236
4244
|
}
|
|
4237
4245
|
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
case 'black':
|
|
4241
|
-
return {
|
|
4242
|
-
type: 'tertiary'
|
|
4243
|
-
};
|
|
4244
|
-
case 'secondary':
|
|
4245
|
-
return {
|
|
4246
|
-
type: 'secondary'
|
|
4247
|
-
};
|
|
4248
|
-
case 'primary':
|
|
4249
|
-
return {
|
|
4250
|
-
type: 'primary'
|
|
4251
|
-
};
|
|
4252
|
-
case 'primary-plain':
|
|
4253
|
-
return {
|
|
4254
|
-
type: 'primary'
|
|
4255
|
-
};
|
|
4256
|
-
case 'ghost':
|
|
4257
|
-
return {
|
|
4258
|
-
type: 'tertiary',
|
|
4259
|
-
variant: 'revert'
|
|
4260
|
-
};
|
|
4261
|
-
default:
|
|
4262
|
-
return {
|
|
4263
|
-
type: 'secondary'
|
|
4264
|
-
};
|
|
4265
|
-
}
|
|
4266
|
-
};
|
|
4267
|
-
|
|
4268
|
-
/**
|
|
4269
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
4270
|
-
* Other use cases should use a <Button> component with an icon
|
|
4271
|
-
*/
|
|
4272
|
-
function IconButton({
|
|
4273
|
-
color = 'black',
|
|
4274
|
-
ariaLabel,
|
|
4275
|
-
...props
|
|
4276
|
-
}) {
|
|
4277
|
-
const {
|
|
4278
|
-
type: legacyColorToType,
|
|
4279
|
-
variant: legacyColorToVariant
|
|
4280
|
-
} = getButtonTypeAndVariant(color);
|
|
4281
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4282
|
-
variant: legacyColorToVariant,
|
|
4283
|
-
type: legacyColorToType,
|
|
4284
|
-
...props
|
|
4285
|
-
});
|
|
4286
|
-
}
|
|
4287
|
-
function CloseIconButton(props) {
|
|
4288
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4289
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
4290
|
-
...props
|
|
4291
|
-
});
|
|
4292
|
-
}
|
|
4293
|
-
|
|
4294
|
-
function TopNavBar({
|
|
4295
|
-
left,
|
|
4296
|
-
right,
|
|
4246
|
+
function CardModalHeader({
|
|
4247
|
+
children,
|
|
4297
4248
|
title,
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4249
|
+
paddingBottom = {
|
|
4250
|
+
base: 'kitt.4',
|
|
4251
|
+
medium: 'kitt.2'
|
|
4252
|
+
},
|
|
4253
|
+
hasSeparator = true,
|
|
4254
|
+
right,
|
|
4255
|
+
left,
|
|
4256
|
+
...props
|
|
4302
4257
|
}) {
|
|
4303
|
-
const
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
}
|
|
4307
|
-
return /*#__PURE__*/jsxRuntime.
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
justifyContent: "center",
|
|
4312
|
-
paddingX: "kitt.2",
|
|
4313
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4314
|
-
paddingBottom: "kitt.3",
|
|
4315
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4258
|
+
const defaultContainerPadding = {
|
|
4259
|
+
base: 'kitt.4',
|
|
4260
|
+
medium: 'kitt.6'
|
|
4261
|
+
};
|
|
4262
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4263
|
+
...props,
|
|
4264
|
+
padding: paddingBottom,
|
|
4265
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4316
4266
|
borderColor: "kitt.separator",
|
|
4317
|
-
|
|
4267
|
+
justifyContent: "center",
|
|
4268
|
+
width: "100%",
|
|
4269
|
+
height: "kitt.cardModal.header.height",
|
|
4270
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4271
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4272
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4318
4273
|
alignItems: "center",
|
|
4319
|
-
|
|
4320
|
-
|
|
4274
|
+
flexDirection: "row",
|
|
4275
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4276
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4277
|
+
width: "kitt.iconButton.width",
|
|
4278
|
+
children: left
|
|
4279
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4321
4280
|
flexGrow: "1",
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
textAlign: titleAlign,
|
|
4281
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4282
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4283
|
+
children: [title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4284
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4327
4285
|
variant: "bold",
|
|
4328
|
-
ellipsizeMode: "tail",
|
|
4329
|
-
numberOfLines: 1,
|
|
4330
4286
|
children: title
|
|
4331
|
-
}) : null
|
|
4332
|
-
})
|
|
4333
|
-
width: "kitt.iconButton.width"
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
paddingX: "kitt.2",
|
|
4338
|
-
children: [stickers ? /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
4339
|
-
width: "100%",
|
|
4340
|
-
space: "kitt.1",
|
|
4341
|
-
flexShrink: 1,
|
|
4342
|
-
flexWrap: "wrap",
|
|
4343
|
-
style: {
|
|
4344
|
-
rowGap: theme.getSpacing(1)
|
|
4345
|
-
},
|
|
4346
|
-
children: stickers.map((sticker, index) =>
|
|
4347
|
-
/*#__PURE__*/
|
|
4348
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
4349
|
-
jsxRuntime.jsx(View, {
|
|
4350
|
-
children: sticker
|
|
4351
|
-
}, index))
|
|
4352
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4353
|
-
base: "heading-m",
|
|
4354
|
-
children: title
|
|
4355
|
-
})]
|
|
4356
|
-
}) : null]
|
|
4357
|
-
});
|
|
4358
|
-
}
|
|
4359
|
-
function CloseButton(props) {
|
|
4360
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4361
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
4362
|
-
...props
|
|
4363
|
-
});
|
|
4364
|
-
}
|
|
4365
|
-
function BackButton(props) {
|
|
4366
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4367
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.ArrowLeftRegularIcon, {}),
|
|
4368
|
-
...props
|
|
4369
|
-
});
|
|
4370
|
-
}
|
|
4371
|
-
TopNavBar.CloseButton = CloseButton;
|
|
4372
|
-
TopNavBar.BackButton = BackButton;
|
|
4373
|
-
|
|
4374
|
-
function CardModalHeader(props) {
|
|
4375
|
-
return /*#__PURE__*/jsxRuntime.jsx(TopNavBar, {
|
|
4376
|
-
...props
|
|
4287
|
+
}) : null, children]
|
|
4288
|
+
}), right ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4289
|
+
width: "kitt.iconButton.width",
|
|
4290
|
+
children: right
|
|
4291
|
+
}) : null]
|
|
4292
|
+
})
|
|
4377
4293
|
});
|
|
4378
4294
|
}
|
|
4379
4295
|
|
|
@@ -7436,16 +7352,60 @@ function FullscreenModalContainer({
|
|
|
7436
7352
|
}
|
|
7437
7353
|
|
|
7438
7354
|
function FullscreenModalHeader({
|
|
7355
|
+
hasSeparator = true,
|
|
7356
|
+
isTransparent,
|
|
7357
|
+
title,
|
|
7358
|
+
children,
|
|
7359
|
+
right,
|
|
7360
|
+
left,
|
|
7439
7361
|
shouldHandleTopNotch = true,
|
|
7440
7362
|
...props
|
|
7441
7363
|
}) {
|
|
7442
7364
|
const {
|
|
7443
7365
|
top
|
|
7444
7366
|
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7367
|
+
const hasRight = Boolean(right);
|
|
7368
|
+
const hasLeft = Boolean(left);
|
|
7369
|
+
const hasContent = Boolean(title || children);
|
|
7445
7370
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7371
|
+
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
7372
|
+
minHeight: "kitt.fullscreenModal.header.height",
|
|
7373
|
+
width: "100%",
|
|
7374
|
+
justifyContent: "center",
|
|
7446
7375
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7447
|
-
|
|
7448
|
-
|
|
7376
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7377
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7378
|
+
borderBottomColor: "kitt.separator",
|
|
7379
|
+
borderBottomWidth: hasSeparator ? 1 : undefined,
|
|
7380
|
+
...props,
|
|
7381
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
7382
|
+
flexDirection: "row",
|
|
7383
|
+
alignItems: "center",
|
|
7384
|
+
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
7385
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7386
|
+
width: "kitt.iconButton.width",
|
|
7387
|
+
children: left
|
|
7388
|
+
}) : null, title ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7389
|
+
flexGrow: 1,
|
|
7390
|
+
flexShrink: 1,
|
|
7391
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7392
|
+
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
7393
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
7394
|
+
variant: "bold",
|
|
7395
|
+
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
7396
|
+
children: title
|
|
7397
|
+
})
|
|
7398
|
+
}) : null, children ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7399
|
+
flexGrow: 1,
|
|
7400
|
+
flexShrink: 1,
|
|
7401
|
+
alignItems: "center",
|
|
7402
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7403
|
+
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
7404
|
+
children: children
|
|
7405
|
+
}) : null, right || left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7406
|
+
width: "kitt.iconButton.width",
|
|
7407
|
+
children: right
|
|
7408
|
+
}) : null]
|
|
7449
7409
|
})
|
|
7450
7410
|
});
|
|
7451
7411
|
}
|
|
@@ -7711,6 +7671,62 @@ function Highlight({
|
|
|
7711
7671
|
});
|
|
7712
7672
|
}
|
|
7713
7673
|
|
|
7674
|
+
const getButtonTypeAndVariant = iconColor => {
|
|
7675
|
+
switch (iconColor) {
|
|
7676
|
+
case 'black':
|
|
7677
|
+
return {
|
|
7678
|
+
type: 'tertiary'
|
|
7679
|
+
};
|
|
7680
|
+
case 'secondary':
|
|
7681
|
+
return {
|
|
7682
|
+
type: 'secondary'
|
|
7683
|
+
};
|
|
7684
|
+
case 'primary':
|
|
7685
|
+
return {
|
|
7686
|
+
type: 'primary'
|
|
7687
|
+
};
|
|
7688
|
+
case 'primary-plain':
|
|
7689
|
+
return {
|
|
7690
|
+
type: 'primary'
|
|
7691
|
+
};
|
|
7692
|
+
case 'ghost':
|
|
7693
|
+
return {
|
|
7694
|
+
type: 'tertiary',
|
|
7695
|
+
variant: 'revert'
|
|
7696
|
+
};
|
|
7697
|
+
default:
|
|
7698
|
+
return {
|
|
7699
|
+
type: 'secondary'
|
|
7700
|
+
};
|
|
7701
|
+
}
|
|
7702
|
+
};
|
|
7703
|
+
|
|
7704
|
+
/**
|
|
7705
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
7706
|
+
* Other use cases should use a <Button> component with an icon
|
|
7707
|
+
*/
|
|
7708
|
+
function IconButton({
|
|
7709
|
+
color = 'black',
|
|
7710
|
+
ariaLabel,
|
|
7711
|
+
...props
|
|
7712
|
+
}) {
|
|
7713
|
+
const {
|
|
7714
|
+
type: legacyColorToType,
|
|
7715
|
+
variant: legacyColorToVariant
|
|
7716
|
+
} = getButtonTypeAndVariant(color);
|
|
7717
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
7718
|
+
variant: legacyColorToVariant,
|
|
7719
|
+
type: legacyColorToType,
|
|
7720
|
+
...props
|
|
7721
|
+
});
|
|
7722
|
+
}
|
|
7723
|
+
function CloseIconButton(props) {
|
|
7724
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
7725
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
7726
|
+
...props
|
|
7727
|
+
});
|
|
7728
|
+
}
|
|
7729
|
+
|
|
7714
7730
|
function InfoCard({
|
|
7715
7731
|
title,
|
|
7716
7732
|
action,
|
|
@@ -9519,6 +9535,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9519
9535
|
},
|
|
9520
9536
|
icon: theme.icon,
|
|
9521
9537
|
cardModal: {
|
|
9538
|
+
header: {
|
|
9539
|
+
height: theme.cardModal.header.height
|
|
9540
|
+
},
|
|
9522
9541
|
maxWidth: theme.cardModal.maxWidth,
|
|
9523
9542
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
9524
9543
|
minHeight: theme.cardModal.minHeight
|
|
@@ -9823,6 +9842,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9823
9842
|
width: theme.iconButton.width,
|
|
9824
9843
|
height: theme.iconButton.height
|
|
9825
9844
|
},
|
|
9845
|
+
fullscreenModal: {
|
|
9846
|
+
header: {
|
|
9847
|
+
height: theme.fullscreenModal.header.height
|
|
9848
|
+
}
|
|
9849
|
+
},
|
|
9826
9850
|
pageLoader: {
|
|
9827
9851
|
size: theme.pageLoader.size
|
|
9828
9852
|
},
|
|
@@ -9920,7 +9944,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9920
9944
|
}
|
|
9921
9945
|
},
|
|
9922
9946
|
fullscreenModal: {
|
|
9923
|
-
horizontalPadding: theme.fullscreenModal.
|
|
9947
|
+
horizontalPadding: theme.fullscreenModal.sharedHorizontalPadding,
|
|
9924
9948
|
body: {
|
|
9925
9949
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
9926
9950
|
},
|
|
@@ -10897,11 +10921,17 @@ function NavigationBottomSheet({
|
|
|
10897
10921
|
})
|
|
10898
10922
|
});
|
|
10899
10923
|
}
|
|
10900
|
-
function NavigationBottomSheetHeader(
|
|
10924
|
+
function NavigationBottomSheetHeader({
|
|
10925
|
+
children,
|
|
10926
|
+
left
|
|
10927
|
+
}) {
|
|
10901
10928
|
return /*#__PURE__*/jsxRuntime.jsx(NavigationModal.Header, {
|
|
10902
|
-
|
|
10929
|
+
title: children,
|
|
10930
|
+
left: left,
|
|
10903
10931
|
right: /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour.CloseButton, {
|
|
10904
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
10932
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
10933
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {})
|
|
10934
|
+
})
|
|
10905
10935
|
})
|
|
10906
10936
|
});
|
|
10907
10937
|
}
|
|
@@ -12646,6 +12676,85 @@ function Tooltip({
|
|
|
12646
12676
|
Tooltip.Arrow = Arrow;
|
|
12647
12677
|
Tooltip.Content = TooltipContent;
|
|
12648
12678
|
|
|
12679
|
+
function TopNavBar({
|
|
12680
|
+
left,
|
|
12681
|
+
right,
|
|
12682
|
+
title,
|
|
12683
|
+
titleAlign = 'center',
|
|
12684
|
+
stickers,
|
|
12685
|
+
mode = 'default',
|
|
12686
|
+
hasSeparator = true
|
|
12687
|
+
}) {
|
|
12688
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
12689
|
+
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
12690
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
12691
|
+
width: "100%",
|
|
12692
|
+
height: mode === 'default' ? 56 : undefined,
|
|
12693
|
+
justifyContent: "center",
|
|
12694
|
+
paddingX: "kitt.2",
|
|
12695
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
12696
|
+
paddingBottom: "kitt.3",
|
|
12697
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
12698
|
+
borderColor: "kitt.separator",
|
|
12699
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
12700
|
+
alignItems: "center",
|
|
12701
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
12702
|
+
children: [left ?? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12703
|
+
width: "kitt.button.minWidth"
|
|
12704
|
+
}), mode === 'default' ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12705
|
+
flexGrow: "1",
|
|
12706
|
+
flexShrink: 1,
|
|
12707
|
+
paddingRight: "kitt.2",
|
|
12708
|
+
paddingLeft: "kitt.2",
|
|
12709
|
+
children: title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
12710
|
+
textAlign: titleAlign,
|
|
12711
|
+
variant: "bold",
|
|
12712
|
+
ellipsizeMode: "tail",
|
|
12713
|
+
numberOfLines: 1,
|
|
12714
|
+
children: title
|
|
12715
|
+
}) : null
|
|
12716
|
+
}) : null, right ?? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12717
|
+
width: "kitt.button.minWidth"
|
|
12718
|
+
})]
|
|
12719
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
12720
|
+
space: "kitt.4",
|
|
12721
|
+
paddingX: "kitt.2",
|
|
12722
|
+
children: [stickers ? /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
12723
|
+
width: "100%",
|
|
12724
|
+
space: "kitt.1",
|
|
12725
|
+
flexShrink: 1,
|
|
12726
|
+
flexWrap: "wrap",
|
|
12727
|
+
style: {
|
|
12728
|
+
rowGap: theme.getSpacing(1)
|
|
12729
|
+
},
|
|
12730
|
+
children: stickers.map((sticker, index) =>
|
|
12731
|
+
/*#__PURE__*/
|
|
12732
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
12733
|
+
jsxRuntime.jsx(View, {
|
|
12734
|
+
children: sticker
|
|
12735
|
+
}, index))
|
|
12736
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
12737
|
+
base: "heading-m",
|
|
12738
|
+
children: title
|
|
12739
|
+
})]
|
|
12740
|
+
}) : null]
|
|
12741
|
+
});
|
|
12742
|
+
}
|
|
12743
|
+
function CloseButton(props) {
|
|
12744
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
12745
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
12746
|
+
...props
|
|
12747
|
+
});
|
|
12748
|
+
}
|
|
12749
|
+
function BackButton(props) {
|
|
12750
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
12751
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.ArrowLeftRegularIcon, {}),
|
|
12752
|
+
...props
|
|
12753
|
+
});
|
|
12754
|
+
}
|
|
12755
|
+
TopNavBar.CloseButton = CloseButton;
|
|
12756
|
+
TopNavBar.BackButton = BackButton;
|
|
12757
|
+
|
|
12649
12758
|
function getTypographyTypeConfig(type, theme) {
|
|
12650
12759
|
const {
|
|
12651
12760
|
configs
|