@ornikar/kitt-universal 27.8.0 → 27.9.1-canary.4b911192ae095bb2eb65643367ed285b3f849cd8.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 +23 -0
- 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 +3 -17
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +3 -18
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +6 -7
- 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 +14 -12
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +0 -1
- package/dist/definitions/themes/default.d.ts.map +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/definitions/utils/storybook/KittThemeDecorator.d.ts +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +153 -285
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +153 -285
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +151 -275
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +142 -261
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +152 -276
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +143 -262
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +159 -291
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +219 -345
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +2 -8
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +2 -8
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +2 -8
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +2 -8
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +2 -8
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +2 -8
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +2 -8
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +2 -8
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.input.tsx +11 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.output.tsx +17 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.input.tsx +88 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.output.tsx +94 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.input.tsx +77 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.output.tsx +92 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.input.tsx +21 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
- package/scripts/codemods/__tests__/csf1-csf2.test.js +10 -0
- package/scripts/codemods/codemod-template.js +27 -0
- package/scripts/codemods/csf1-csf2.js +323 -0
- package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -6
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +0 -1
|
@@ -1805,12 +1805,12 @@ const fullscreenModal = {
|
|
|
1805
1805
|
header: {
|
|
1806
1806
|
height: 56
|
|
1807
1807
|
},
|
|
1808
|
-
|
|
1808
|
+
horizontalPadding: 16,
|
|
1809
1809
|
footer: {
|
|
1810
1810
|
verticalPadding: 12
|
|
1811
1811
|
},
|
|
1812
1812
|
body: {
|
|
1813
|
-
verticalPadding:
|
|
1813
|
+
verticalPadding: 16
|
|
1814
1814
|
},
|
|
1815
1815
|
animation: {
|
|
1816
1816
|
overlay: {
|
|
@@ -1897,11 +1897,6 @@ const icon = {
|
|
|
1897
1897
|
defaultSize: 20
|
|
1898
1898
|
};
|
|
1899
1899
|
|
|
1900
|
-
const iconButton = {
|
|
1901
|
-
width: button.height.medium,
|
|
1902
|
-
height: button.height.medium
|
|
1903
|
-
};
|
|
1904
|
-
|
|
1905
1900
|
const listItem = {
|
|
1906
1901
|
padding: '12px 16px',
|
|
1907
1902
|
verticalPadding: 12,
|
|
@@ -2631,7 +2626,6 @@ const theme = {
|
|
|
2631
2626
|
highlight,
|
|
2632
2627
|
icon,
|
|
2633
2628
|
buttonBadge,
|
|
2634
|
-
iconButton,
|
|
2635
2629
|
listItem,
|
|
2636
2630
|
pageLoader,
|
|
2637
2631
|
picker,
|
|
@@ -4199,21 +4193,13 @@ function CardModalBehaviour({
|
|
|
4199
4193
|
|
|
4200
4194
|
function CardModalBody({
|
|
4201
4195
|
children,
|
|
4202
|
-
|
|
4203
|
-
base: 'kitt.4',
|
|
4204
|
-
medium: 'kitt.6'
|
|
4205
|
-
},
|
|
4206
|
-
paddingY = {
|
|
4207
|
-
base: 'kitt.4',
|
|
4208
|
-
medium: 'kitt.6'
|
|
4209
|
-
},
|
|
4196
|
+
padding = 'kitt.4',
|
|
4210
4197
|
...props
|
|
4211
4198
|
}) {
|
|
4212
4199
|
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
4213
4200
|
showsVerticalScrollIndicator: false,
|
|
4214
4201
|
_contentContainerStyle: {
|
|
4215
|
-
|
|
4216
|
-
paddingY
|
|
4202
|
+
padding
|
|
4217
4203
|
},
|
|
4218
4204
|
...props,
|
|
4219
4205
|
children: children
|
|
@@ -4243,53 +4229,145 @@ function CardModalFooter({
|
|
|
4243
4229
|
});
|
|
4244
4230
|
}
|
|
4245
4231
|
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4232
|
+
const getButtonTypeAndVariant = iconColor => {
|
|
4233
|
+
switch (iconColor) {
|
|
4234
|
+
case 'black':
|
|
4235
|
+
return {
|
|
4236
|
+
type: 'tertiary'
|
|
4237
|
+
};
|
|
4238
|
+
case 'secondary':
|
|
4239
|
+
return {
|
|
4240
|
+
type: 'secondary'
|
|
4241
|
+
};
|
|
4242
|
+
case 'primary':
|
|
4243
|
+
return {
|
|
4244
|
+
type: 'primary'
|
|
4245
|
+
};
|
|
4246
|
+
case 'primary-plain':
|
|
4247
|
+
return {
|
|
4248
|
+
type: 'primary'
|
|
4249
|
+
};
|
|
4250
|
+
case 'ghost':
|
|
4251
|
+
return {
|
|
4252
|
+
type: 'tertiary',
|
|
4253
|
+
variant: 'revert'
|
|
4254
|
+
};
|
|
4255
|
+
default:
|
|
4256
|
+
return {
|
|
4257
|
+
type: 'secondary'
|
|
4258
|
+
};
|
|
4259
|
+
}
|
|
4260
|
+
};
|
|
4261
|
+
|
|
4262
|
+
/**
|
|
4263
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
4264
|
+
* Other use cases should use a <Button> component with an icon
|
|
4265
|
+
*/
|
|
4266
|
+
function IconButton({
|
|
4267
|
+
color = 'black',
|
|
4268
|
+
ariaLabel,
|
|
4256
4269
|
...props
|
|
4257
4270
|
}) {
|
|
4258
|
-
const
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
};
|
|
4262
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4271
|
+
const {
|
|
4272
|
+
type: legacyColorToType,
|
|
4273
|
+
variant: legacyColorToVariant
|
|
4274
|
+
} = getButtonTypeAndVariant(color);
|
|
4275
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4276
|
+
variant: legacyColorToVariant,
|
|
4277
|
+
type: legacyColorToType,
|
|
4278
|
+
...props
|
|
4279
|
+
});
|
|
4280
|
+
}
|
|
4281
|
+
function CloseIconButton(props) {
|
|
4282
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4283
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
4284
|
+
...props
|
|
4285
|
+
});
|
|
4286
|
+
}
|
|
4287
|
+
|
|
4288
|
+
function TopNavBar({
|
|
4289
|
+
left,
|
|
4290
|
+
right,
|
|
4291
|
+
title,
|
|
4292
|
+
titleAlign = 'center',
|
|
4293
|
+
stickers,
|
|
4294
|
+
mode = 'default',
|
|
4295
|
+
hasSeparator = true
|
|
4296
|
+
}) {
|
|
4297
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
4298
|
+
const leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4299
|
+
width: "kitt.button.minWidth"
|
|
4300
|
+
});
|
|
4301
|
+
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
4302
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4268
4303
|
width: "100%",
|
|
4269
|
-
height:
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4304
|
+
height: mode === 'default' ? 56 : undefined,
|
|
4305
|
+
justifyContent: "center",
|
|
4306
|
+
paddingX: "kitt.2",
|
|
4307
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4308
|
+
paddingBottom: "kitt.3",
|
|
4309
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4310
|
+
borderColor: "kitt.separator",
|
|
4311
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
4273
4312
|
alignItems: "center",
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
children: [left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4277
|
-
width: "kitt.iconButton.width",
|
|
4278
|
-
children: left
|
|
4279
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4313
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
4314
|
+
children: [left ?? leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4280
4315
|
flexGrow: "1",
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4316
|
+
flexShrink: 1,
|
|
4317
|
+
paddingRight: "kitt.2",
|
|
4318
|
+
paddingLeft: "kitt.2",
|
|
4319
|
+
children: title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4320
|
+
textAlign: titleAlign,
|
|
4285
4321
|
variant: "bold",
|
|
4322
|
+
ellipsizeMode: "tail",
|
|
4323
|
+
numberOfLines: 1,
|
|
4286
4324
|
children: title
|
|
4287
|
-
}) : null
|
|
4288
|
-
}), right
|
|
4289
|
-
width: "kitt.
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4325
|
+
}) : null
|
|
4326
|
+
}) : null, right ?? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4327
|
+
width: "kitt.button.minWidth"
|
|
4328
|
+
})]
|
|
4329
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
4330
|
+
space: "kitt.4",
|
|
4331
|
+
paddingX: "kitt.2",
|
|
4332
|
+
children: [stickers ? /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
4333
|
+
width: "100%",
|
|
4334
|
+
space: "kitt.1",
|
|
4335
|
+
flexShrink: 1,
|
|
4336
|
+
flexWrap: "wrap",
|
|
4337
|
+
style: {
|
|
4338
|
+
rowGap: theme.getSpacing(1)
|
|
4339
|
+
},
|
|
4340
|
+
children: stickers.map((sticker, index) =>
|
|
4341
|
+
/*#__PURE__*/
|
|
4342
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4343
|
+
jsxRuntime.jsx(View, {
|
|
4344
|
+
children: sticker
|
|
4345
|
+
}, index))
|
|
4346
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4347
|
+
base: "heading-m",
|
|
4348
|
+
children: title
|
|
4349
|
+
})]
|
|
4350
|
+
}) : null]
|
|
4351
|
+
});
|
|
4352
|
+
}
|
|
4353
|
+
function CloseButton(props) {
|
|
4354
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4355
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
4356
|
+
...props
|
|
4357
|
+
});
|
|
4358
|
+
}
|
|
4359
|
+
function BackButton(props) {
|
|
4360
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4361
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.ArrowLeftRegularIcon, {}),
|
|
4362
|
+
...props
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
TopNavBar.CloseButton = CloseButton;
|
|
4366
|
+
TopNavBar.BackButton = BackButton;
|
|
4367
|
+
|
|
4368
|
+
function CardModalHeader(props) {
|
|
4369
|
+
return /*#__PURE__*/jsxRuntime.jsx(TopNavBar, {
|
|
4370
|
+
...props
|
|
4293
4371
|
});
|
|
4294
4372
|
}
|
|
4295
4373
|
|
|
@@ -7352,60 +7430,16 @@ function FullscreenModalContainer({
|
|
|
7352
7430
|
}
|
|
7353
7431
|
|
|
7354
7432
|
function FullscreenModalHeader({
|
|
7355
|
-
hasSeparator = true,
|
|
7356
|
-
isTransparent,
|
|
7357
|
-
title,
|
|
7358
|
-
children,
|
|
7359
|
-
right,
|
|
7360
|
-
left,
|
|
7361
7433
|
shouldHandleTopNotch = true,
|
|
7362
7434
|
...props
|
|
7363
7435
|
}) {
|
|
7364
7436
|
const {
|
|
7365
7437
|
top
|
|
7366
7438
|
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7367
|
-
const hasRight = Boolean(right);
|
|
7368
|
-
const hasLeft = Boolean(left);
|
|
7369
|
-
const hasContent = Boolean(title || children);
|
|
7370
7439
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7371
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
7372
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
7373
|
-
width: "100%",
|
|
7374
|
-
justifyContent: "center",
|
|
7375
7440
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7376
|
-
|
|
7377
|
-
|
|
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]
|
|
7441
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TopNavBar, {
|
|
7442
|
+
...props
|
|
7409
7443
|
})
|
|
7410
7444
|
});
|
|
7411
7445
|
}
|
|
@@ -7671,62 +7705,6 @@ function Highlight({
|
|
|
7671
7705
|
});
|
|
7672
7706
|
}
|
|
7673
7707
|
|
|
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
|
-
|
|
7730
7708
|
function InfoCard({
|
|
7731
7709
|
title,
|
|
7732
7710
|
action,
|
|
@@ -9535,9 +9513,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9535
9513
|
},
|
|
9536
9514
|
icon: theme.icon,
|
|
9537
9515
|
cardModal: {
|
|
9538
|
-
header: {
|
|
9539
|
-
height: theme.cardModal.header.height
|
|
9540
|
-
},
|
|
9541
9516
|
maxWidth: theme.cardModal.maxWidth,
|
|
9542
9517
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
9543
9518
|
minHeight: theme.cardModal.minHeight
|
|
@@ -9838,15 +9813,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9838
9813
|
}
|
|
9839
9814
|
}
|
|
9840
9815
|
},
|
|
9841
|
-
iconButton: {
|
|
9842
|
-
width: theme.iconButton.width,
|
|
9843
|
-
height: theme.iconButton.height
|
|
9844
|
-
},
|
|
9845
|
-
fullscreenModal: {
|
|
9846
|
-
header: {
|
|
9847
|
-
height: theme.fullscreenModal.header.height
|
|
9848
|
-
}
|
|
9849
|
-
},
|
|
9850
9816
|
pageLoader: {
|
|
9851
9817
|
size: theme.pageLoader.size
|
|
9852
9818
|
},
|
|
@@ -9944,7 +9910,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9944
9910
|
}
|
|
9945
9911
|
},
|
|
9946
9912
|
fullscreenModal: {
|
|
9947
|
-
horizontalPadding: theme.fullscreenModal.
|
|
9913
|
+
horizontalPadding: theme.fullscreenModal.horizontalPadding,
|
|
9948
9914
|
body: {
|
|
9949
9915
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
9950
9916
|
},
|
|
@@ -10921,17 +10887,11 @@ function NavigationBottomSheet({
|
|
|
10921
10887
|
})
|
|
10922
10888
|
});
|
|
10923
10889
|
}
|
|
10924
|
-
function NavigationBottomSheetHeader({
|
|
10925
|
-
children,
|
|
10926
|
-
left
|
|
10927
|
-
}) {
|
|
10890
|
+
function NavigationBottomSheetHeader(props) {
|
|
10928
10891
|
return /*#__PURE__*/jsxRuntime.jsx(NavigationModal.Header, {
|
|
10929
|
-
|
|
10930
|
-
left: left,
|
|
10892
|
+
...props,
|
|
10931
10893
|
right: /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour.CloseButton, {
|
|
10932
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
10933
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {})
|
|
10934
|
-
})
|
|
10894
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TopNavBar.CloseButton, {})
|
|
10935
10895
|
})
|
|
10936
10896
|
});
|
|
10937
10897
|
}
|
|
@@ -12676,85 +12636,6 @@ function Tooltip({
|
|
|
12676
12636
|
Tooltip.Arrow = Arrow;
|
|
12677
12637
|
Tooltip.Content = TooltipContent;
|
|
12678
12638
|
|
|
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
|
-
|
|
12758
12639
|
function getTypographyTypeConfig(type, theme) {
|
|
12759
12640
|
const {
|
|
12760
12641
|
configs
|