@ornikar/kitt-universal 27.5.1-canary.eac3fc19869888632e3a59913cf9f700a72b0dad.0 → 27.7.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 +15 -4
- package/dist/definitions/TabBar/TabBar.d.ts +6 -4
- package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts +11 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +180 -12
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -12
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/icon.d.ts +0 -20
- package/dist/definitions/themes/late-ocean/icon.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tabBar.d.ts +34 -0
- package/dist/definitions/themes/late-ocean/tabBar.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts +2 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +565 -250
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +565 -250
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +456 -140
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +457 -141
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +456 -140
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +457 -141
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +567 -242
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +566 -241
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +179 -36
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +179 -36
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +179 -36
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +179 -36
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +179 -36
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +179 -36
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +179 -36
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +179 -36
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
- package/scripts/codemods/card-modal.js +155 -0
- package/scripts/codemods/fullscreen-modal.js +155 -0
- package/scripts/codemods/navigation-modal.js +155 -0
- package/scripts/{run-transformers.js → run-codemods.js} +30 -32
- package/scripts/transformers/card-modal.js +0 -101
- package/scripts/transformers/fullscreen-modal.js +0 -101
- package/scripts/transformers/navigation-modal.js +0 -101
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/card-modal.test.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/fullscreen-modal.test.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/navigation-modal.test.js +0 -0
|
@@ -1893,43 +1893,8 @@ const highlight = {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
1895
|
|
|
1896
|
-
const getIconSizeFromFontSize = fontSize => {
|
|
1897
|
-
if (fontSize <= 14) return 16;
|
|
1898
|
-
if (fontSize <= 16) return 20;
|
|
1899
|
-
return 24;
|
|
1900
|
-
};
|
|
1901
|
-
const createTypographyIconSizeConfig = (baseAndSmallFontSize, mediumAndWideFontSize) => {
|
|
1902
|
-
const baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1903
|
-
const mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1904
|
-
return {
|
|
1905
|
-
baseAndSmall: {
|
|
1906
|
-
iconSize: baseAndSmallIconSize
|
|
1907
|
-
},
|
|
1908
|
-
mediumAndWide: {
|
|
1909
|
-
iconSize: mediumAndWideIconSize
|
|
1910
|
-
}
|
|
1911
|
-
};
|
|
1912
|
-
};
|
|
1913
1896
|
const icon = {
|
|
1914
|
-
defaultSize: 20
|
|
1915
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1916
|
-
typographySize: {
|
|
1917
|
-
// also known as xxlarge
|
|
1918
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1919
|
-
// also known as xlarge
|
|
1920
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1921
|
-
// also known as medium
|
|
1922
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1923
|
-
// also known as xsmall
|
|
1924
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1925
|
-
// also known as xxsmall
|
|
1926
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1927
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1928
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1929
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1930
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1931
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1932
|
-
}
|
|
1897
|
+
defaultSize: 20
|
|
1933
1898
|
};
|
|
1934
1899
|
|
|
1935
1900
|
const iconButton = {
|
|
@@ -2356,6 +2321,183 @@ const skeleton = {
|
|
|
2356
2321
|
}
|
|
2357
2322
|
};
|
|
2358
2323
|
|
|
2324
|
+
const tabBar = {
|
|
2325
|
+
underline: {
|
|
2326
|
+
default: {
|
|
2327
|
+
active: {
|
|
2328
|
+
color: {
|
|
2329
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2330
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2331
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2332
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2333
|
+
},
|
|
2334
|
+
indicator: {
|
|
2335
|
+
backgroundColor: deepPurpleColorPalette['deepPurple.8']
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
inactive: {
|
|
2339
|
+
color: {
|
|
2340
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2341
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2342
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2343
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2344
|
+
},
|
|
2345
|
+
indicator: {
|
|
2346
|
+
backgroundColor: undefined
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
disabled: {
|
|
2350
|
+
color: {
|
|
2351
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2352
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2353
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2354
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2355
|
+
},
|
|
2356
|
+
indicator: {
|
|
2357
|
+
backgroundColor: undefined
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
borderBottomColor: deepPurpleColorPalette['beige.3']
|
|
2361
|
+
},
|
|
2362
|
+
revert: {
|
|
2363
|
+
active: {
|
|
2364
|
+
color: {
|
|
2365
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2366
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2367
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2368
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2369
|
+
},
|
|
2370
|
+
indicator: {
|
|
2371
|
+
backgroundColor: deepPurpleColorPalette['grey.0']
|
|
2372
|
+
}
|
|
2373
|
+
},
|
|
2374
|
+
inactive: {
|
|
2375
|
+
color: {
|
|
2376
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2377
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2378
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2379
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2380
|
+
},
|
|
2381
|
+
indicator: {
|
|
2382
|
+
backgroundColor: undefined
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
disabled: {
|
|
2386
|
+
color: {
|
|
2387
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2388
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2389
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2390
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2391
|
+
},
|
|
2392
|
+
indicator: {
|
|
2393
|
+
backgroundColor: undefined
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
borderBottomColor: deepPurpleColorPalette['white-alpha.20']
|
|
2397
|
+
}
|
|
2398
|
+
},
|
|
2399
|
+
solid: {
|
|
2400
|
+
default: {
|
|
2401
|
+
active: {
|
|
2402
|
+
color: {
|
|
2403
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2404
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2405
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2406
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2407
|
+
},
|
|
2408
|
+
backgroundColor: {
|
|
2409
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2410
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2411
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2412
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2413
|
+
},
|
|
2414
|
+
borderRadius: 4,
|
|
2415
|
+
indicator: {
|
|
2416
|
+
backgroundColor: undefined
|
|
2417
|
+
}
|
|
2418
|
+
},
|
|
2419
|
+
inactive: {
|
|
2420
|
+
color: {
|
|
2421
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2422
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2423
|
+
hovered: deepPurpleColorPalette['grey.5'],
|
|
2424
|
+
pressed: deepPurpleColorPalette['grey.5']
|
|
2425
|
+
},
|
|
2426
|
+
backgroundColor: {
|
|
2427
|
+
default: undefined,
|
|
2428
|
+
focused: undefined,
|
|
2429
|
+
hovered: deepPurpleColorPalette['beige.1'],
|
|
2430
|
+
pressed: deepPurpleColorPalette['beige.1']
|
|
2431
|
+
},
|
|
2432
|
+
borderRadius: 4,
|
|
2433
|
+
indicator: {
|
|
2434
|
+
backgroundColor: undefined
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
disabled: {
|
|
2438
|
+
color: {
|
|
2439
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2440
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2441
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2442
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2443
|
+
},
|
|
2444
|
+
indicator: {
|
|
2445
|
+
backgroundColor: undefined
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
revert: {
|
|
2450
|
+
active: {
|
|
2451
|
+
color: {
|
|
2452
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2453
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2454
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2455
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2456
|
+
},
|
|
2457
|
+
backgroundColor: {
|
|
2458
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2459
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2460
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2461
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2462
|
+
},
|
|
2463
|
+
borderRadius: 4,
|
|
2464
|
+
indicator: {
|
|
2465
|
+
backgroundColor: undefined
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
inactive: {
|
|
2469
|
+
color: {
|
|
2470
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2471
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2472
|
+
hovered: deepPurpleColorPalette['white-alpha.80'],
|
|
2473
|
+
pressed: deepPurpleColorPalette['white-alpha.80']
|
|
2474
|
+
},
|
|
2475
|
+
backgroundColor: {
|
|
2476
|
+
default: undefined,
|
|
2477
|
+
focused: undefined,
|
|
2478
|
+
hovered: deepPurpleColorPalette['white-alpha.10'],
|
|
2479
|
+
pressed: deepPurpleColorPalette['white-alpha.10']
|
|
2480
|
+
},
|
|
2481
|
+
borderRadius: 4,
|
|
2482
|
+
indicator: {
|
|
2483
|
+
backgroundColor: undefined
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
disabled: {
|
|
2487
|
+
color: {
|
|
2488
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2489
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2490
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2491
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2492
|
+
},
|
|
2493
|
+
indicator: {
|
|
2494
|
+
backgroundColor: undefined
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2359
2501
|
const tag = {
|
|
2360
2502
|
borderRadius: 16,
|
|
2361
2503
|
icon: {
|
|
@@ -2495,6 +2637,7 @@ const theme = {
|
|
|
2495
2637
|
picker,
|
|
2496
2638
|
shadows,
|
|
2497
2639
|
skeleton,
|
|
2640
|
+
tabBar,
|
|
2498
2641
|
tag,
|
|
2499
2642
|
tooltip,
|
|
2500
2643
|
typography,
|
|
@@ -2596,7 +2739,7 @@ function ActionCardDisabled({
|
|
|
2596
2739
|
});
|
|
2597
2740
|
}
|
|
2598
2741
|
|
|
2599
|
-
const _excluded$
|
|
2742
|
+
const _excluded$S = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2600
2743
|
function ActionCard(_ref) {
|
|
2601
2744
|
let {
|
|
2602
2745
|
children,
|
|
@@ -2608,7 +2751,7 @@ function ActionCard(_ref) {
|
|
|
2608
2751
|
isPressed,
|
|
2609
2752
|
isFocused
|
|
2610
2753
|
} = _ref,
|
|
2611
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2754
|
+
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
2612
2755
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2613
2756
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2614
2757
|
borderRadius: borderRadius,
|
|
@@ -2909,17 +3052,21 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2909
3052
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2910
3053
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2911
3054
|
};
|
|
3055
|
+
const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
3056
|
+
// check if all values are not undefined
|
|
3057
|
+
const isAllValuesUndefined = Object.values(type).every(value => value === undefined);
|
|
2912
3058
|
|
|
2913
|
-
|
|
3059
|
+
// if every values are undefined and we hgave a typographyTypeInContext, we use the parent typography type (typographyTypeInContext)
|
|
3060
|
+
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3061
|
+
};
|
|
3062
|
+
|
|
3063
|
+
const _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2914
3064
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2915
3065
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2916
3066
|
const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
2917
3067
|
function useTypographyColor() {
|
|
2918
3068
|
return useContext(TypographyColorContext);
|
|
2919
3069
|
}
|
|
2920
|
-
function useTypographyAncestorType() {
|
|
2921
|
-
return useContext(TypographyTypeContext);
|
|
2922
|
-
}
|
|
2923
3070
|
const TypographyDefaultColorContext = /*#__PURE__*/createContext(undefined);
|
|
2924
3071
|
function useTypographyDefaultColor() {
|
|
2925
3072
|
return useContext(TypographyDefaultColorContext);
|
|
@@ -3022,7 +3169,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
|
|
|
3022
3169
|
};
|
|
3023
3170
|
}
|
|
3024
3171
|
function Typography(_ref) {
|
|
3025
|
-
var
|
|
3172
|
+
var _typographyType$base;
|
|
3026
3173
|
let {
|
|
3027
3174
|
accessibilityRole,
|
|
3028
3175
|
base: legacyBase,
|
|
@@ -3040,12 +3187,14 @@ function Typography(_ref) {
|
|
|
3040
3187
|
variant,
|
|
3041
3188
|
color
|
|
3042
3189
|
} = _ref,
|
|
3043
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3190
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$R);
|
|
3044
3191
|
const sx = useSx();
|
|
3045
3192
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3193
|
+
const typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3046
3194
|
const defaultColor = useTypographyDefaultColor();
|
|
3047
3195
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3048
|
-
const
|
|
3196
|
+
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3197
|
+
const baseOrDefaultToBody = (_typographyType$base = typographyType.base) !== null && _typographyType$base !== void 0 ? _typographyType$base : 'body-m';
|
|
3049
3198
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3050
3199
|
const fontSizeForNativeBase = createNativeBaseFontSize(_objectSpread(_objectSpread({}, type), {}, {
|
|
3051
3200
|
base: baseOrDefaultToBody
|
|
@@ -3080,7 +3229,7 @@ function Typography(_ref) {
|
|
|
3080
3229
|
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3081
3230
|
value: typographyFamily,
|
|
3082
3231
|
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3083
|
-
value:
|
|
3232
|
+
value: typographyType,
|
|
3084
3233
|
children: text
|
|
3085
3234
|
})
|
|
3086
3235
|
}) : text;
|
|
@@ -3179,32 +3328,14 @@ function Icon({
|
|
|
3179
3328
|
});
|
|
3180
3329
|
}
|
|
3181
3330
|
|
|
3182
|
-
const _excluded$
|
|
3331
|
+
const _excluded$Q = ["color", "size"],
|
|
3183
3332
|
_excluded2$5 = ["color"];
|
|
3184
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3185
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3186
|
-
}
|
|
3187
|
-
function createNativeBaseIconSize(type) {
|
|
3188
|
-
const typeWithMediumForced = _objectSpread(_objectSpread({}, type), {}, {
|
|
3189
|
-
medium: type.medium || type.small || type.base
|
|
3190
|
-
});
|
|
3191
|
-
const iconSizeForNativeBase = {};
|
|
3192
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(typeName => {
|
|
3193
|
-
const value = typeWithMediumForced[typeName];
|
|
3194
|
-
if (value) {
|
|
3195
|
-
iconSizeForNativeBase[typeName] = `kitt.icon.typographySize.${value}.${getIconSizeConfigKeyFromTypeName(typeName)}.iconSize`;
|
|
3196
|
-
}
|
|
3197
|
-
});
|
|
3198
|
-
return iconSizeForNativeBase;
|
|
3199
|
-
}
|
|
3200
3333
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3201
3334
|
let {
|
|
3202
3335
|
color,
|
|
3203
3336
|
size
|
|
3204
3337
|
} = _ref,
|
|
3205
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3206
|
-
const ancestorType = useTypographyAncestorType();
|
|
3207
|
-
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3338
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
3208
3339
|
const colorValue = getTypographyColorValue(color);
|
|
3209
3340
|
const sx = useSx();
|
|
3210
3341
|
const {
|
|
@@ -3213,7 +3344,7 @@ function TypographyIconSpecifiedColor(_ref) {
|
|
|
3213
3344
|
color: colorValue
|
|
3214
3345
|
});
|
|
3215
3346
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
3216
|
-
size:
|
|
3347
|
+
size: size,
|
|
3217
3348
|
color: colorStyleValue
|
|
3218
3349
|
}));
|
|
3219
3350
|
}
|
|
@@ -3247,7 +3378,7 @@ const getButtonTextColorByType = (type, variant, isHovered, isPressed, isDisable
|
|
|
3247
3378
|
return `${baseKey}.default`;
|
|
3248
3379
|
};
|
|
3249
3380
|
|
|
3250
|
-
const _excluded$
|
|
3381
|
+
const _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3251
3382
|
function ButtonContentChildren({
|
|
3252
3383
|
type,
|
|
3253
3384
|
icon,
|
|
@@ -3347,7 +3478,7 @@ function ButtonContent(_ref) {
|
|
|
3347
3478
|
innerSpacing,
|
|
3348
3479
|
size
|
|
3349
3480
|
} = _ref,
|
|
3350
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3481
|
+
props = _objectWithoutProperties(_ref, _excluded$P);
|
|
3351
3482
|
const color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3352
3483
|
return /*#__PURE__*/jsx(View, {
|
|
3353
3484
|
_web: {
|
|
@@ -3595,7 +3726,7 @@ function LoaderIcon({
|
|
|
3595
3726
|
});
|
|
3596
3727
|
}
|
|
3597
3728
|
|
|
3598
|
-
const _excluded$
|
|
3729
|
+
const _excluded$O = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3599
3730
|
const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3600
3731
|
let {
|
|
3601
3732
|
as,
|
|
@@ -3607,7 +3738,7 @@ const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3607
3738
|
medium: false
|
|
3608
3739
|
}
|
|
3609
3740
|
} = _ref,
|
|
3610
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3741
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
3611
3742
|
const [isLoading, setIsLoading] = useState(false);
|
|
3612
3743
|
const mountedRef = useRef(false);
|
|
3613
3744
|
// securing the loading state with a ref to avoid user action between rerenders
|
|
@@ -3658,7 +3789,7 @@ function ActionsButton(_ref) {
|
|
|
3658
3789
|
}, props));
|
|
3659
3790
|
}
|
|
3660
3791
|
|
|
3661
|
-
const _excluded$
|
|
3792
|
+
const _excluded$N = ["children", "layout", "reversed"];
|
|
3662
3793
|
function getCurrentLayout(layout) {
|
|
3663
3794
|
if (!layout) return {
|
|
3664
3795
|
base: 'stretch',
|
|
@@ -3691,7 +3822,7 @@ function Actions(_ref) {
|
|
|
3691
3822
|
base: false
|
|
3692
3823
|
}
|
|
3693
3824
|
} = _ref,
|
|
3694
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3825
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
3695
3826
|
const shouldReverse = typeof reversed === 'boolean' ? {
|
|
3696
3827
|
base: !!reversed
|
|
3697
3828
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3746,7 +3877,7 @@ function getInitials(firstname, lastname) {
|
|
|
3746
3877
|
return `${firstname[0]}${lastname[0]}`.toUpperCase();
|
|
3747
3878
|
}
|
|
3748
3879
|
|
|
3749
|
-
const _excluded$
|
|
3880
|
+
const _excluded$M = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3750
3881
|
function AvatarContent({
|
|
3751
3882
|
size,
|
|
3752
3883
|
src,
|
|
@@ -3812,7 +3943,7 @@ function Avatar(_ref) {
|
|
|
3812
3943
|
dark,
|
|
3813
3944
|
disabled
|
|
3814
3945
|
} = _ref,
|
|
3815
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3946
|
+
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
3816
3947
|
const currentSize = getCurrentSize({
|
|
3817
3948
|
size,
|
|
3818
3949
|
sizeVariant
|
|
@@ -3850,7 +3981,7 @@ function Avatar(_ref) {
|
|
|
3850
3981
|
});
|
|
3851
3982
|
}
|
|
3852
3983
|
|
|
3853
|
-
const _excluded$
|
|
3984
|
+
const _excluded$L = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints"];
|
|
3854
3985
|
function BottomSheetComp(_ref, ref) {
|
|
3855
3986
|
let {
|
|
3856
3987
|
children: Content,
|
|
@@ -3860,7 +3991,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3860
3991
|
enableDynamicSizing = true,
|
|
3861
3992
|
snapPoints = ['100%']
|
|
3862
3993
|
} = _ref,
|
|
3863
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3994
|
+
rest = _objectWithoutProperties(_ref, _excluded$L);
|
|
3864
3995
|
const {
|
|
3865
3996
|
top
|
|
3866
3997
|
} = useSafeAreaInsets();
|
|
@@ -4171,7 +4302,7 @@ function CardModalAnimation({
|
|
|
4171
4302
|
});
|
|
4172
4303
|
}
|
|
4173
4304
|
|
|
4174
|
-
const _excluded$
|
|
4305
|
+
const _excluded$K = ["children", "visible", "onClose", "onExited"];
|
|
4175
4306
|
function CardModalBehaviour(_ref) {
|
|
4176
4307
|
let {
|
|
4177
4308
|
children,
|
|
@@ -4179,7 +4310,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4179
4310
|
onClose,
|
|
4180
4311
|
onExited
|
|
4181
4312
|
} = _ref,
|
|
4182
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4313
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
4183
4314
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4184
4315
|
useEffect(() => {
|
|
4185
4316
|
if (visible === true) {
|
|
@@ -4201,7 +4332,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4201
4332
|
});
|
|
4202
4333
|
}
|
|
4203
4334
|
|
|
4204
|
-
const _excluded$
|
|
4335
|
+
const _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4205
4336
|
function CardModalBody(_ref) {
|
|
4206
4337
|
let {
|
|
4207
4338
|
children,
|
|
@@ -4214,7 +4345,7 @@ function CardModalBody(_ref) {
|
|
|
4214
4345
|
medium: 'kitt.6'
|
|
4215
4346
|
}
|
|
4216
4347
|
} = _ref,
|
|
4217
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4348
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4218
4349
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4219
4350
|
showsVerticalScrollIndicator: false,
|
|
4220
4351
|
_contentContainerStyle: {
|
|
@@ -4226,7 +4357,7 @@ function CardModalBody(_ref) {
|
|
|
4226
4357
|
}));
|
|
4227
4358
|
}
|
|
4228
4359
|
|
|
4229
|
-
const _excluded$
|
|
4360
|
+
const _excluded$I = ["children", "padding", "hasSeparator"];
|
|
4230
4361
|
function CardModalFooter(_ref) {
|
|
4231
4362
|
let {
|
|
4232
4363
|
children,
|
|
@@ -4236,7 +4367,7 @@ function CardModalFooter(_ref) {
|
|
|
4236
4367
|
},
|
|
4237
4368
|
hasSeparator = true
|
|
4238
4369
|
} = _ref,
|
|
4239
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4370
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4240
4371
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4241
4372
|
marginTop: "kitt.2",
|
|
4242
4373
|
padding: padding,
|
|
@@ -4250,7 +4381,7 @@ function CardModalFooter(_ref) {
|
|
|
4250
4381
|
}));
|
|
4251
4382
|
}
|
|
4252
4383
|
|
|
4253
|
-
const _excluded$
|
|
4384
|
+
const _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4254
4385
|
function CardModalHeader(_ref) {
|
|
4255
4386
|
let {
|
|
4256
4387
|
children,
|
|
@@ -4263,7 +4394,7 @@ function CardModalHeader(_ref) {
|
|
|
4263
4394
|
right,
|
|
4264
4395
|
left
|
|
4265
4396
|
} = _ref,
|
|
4266
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4397
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4267
4398
|
const defaultContainerPadding = {
|
|
4268
4399
|
base: 'kitt.4',
|
|
4269
4400
|
medium: 'kitt.6'
|
|
@@ -4301,7 +4432,7 @@ function CardModalHeader(_ref) {
|
|
|
4301
4432
|
}));
|
|
4302
4433
|
}
|
|
4303
4434
|
|
|
4304
|
-
const _excluded$
|
|
4435
|
+
const _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4305
4436
|
function CardModal(_ref) {
|
|
4306
4437
|
let {
|
|
4307
4438
|
backgroundColor = 'kitt.uiBackgroundLight',
|
|
@@ -4312,7 +4443,7 @@ function CardModal(_ref) {
|
|
|
4312
4443
|
body,
|
|
4313
4444
|
footer
|
|
4314
4445
|
} = _ref,
|
|
4315
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4446
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4316
4447
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4317
4448
|
overflow: "hidden",
|
|
4318
4449
|
backgroundColor: backgroundColor,
|
|
@@ -4566,13 +4697,13 @@ function ChoiceItemContainer({
|
|
|
4566
4697
|
}));
|
|
4567
4698
|
}
|
|
4568
4699
|
|
|
4569
|
-
const _excluded$
|
|
4700
|
+
const _excluded$F = ["direction", "contentContainerStyle"];
|
|
4570
4701
|
function ChoicesContainer(_ref) {
|
|
4571
4702
|
let {
|
|
4572
4703
|
direction,
|
|
4573
4704
|
contentContainerStyle
|
|
4574
4705
|
} = _ref,
|
|
4575
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4706
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4576
4707
|
if (direction === 'row') {
|
|
4577
4708
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4578
4709
|
horizontal: true,
|
|
@@ -4798,7 +4929,7 @@ function DialogModalAnimation({
|
|
|
4798
4929
|
});
|
|
4799
4930
|
}
|
|
4800
4931
|
|
|
4801
|
-
const _excluded$
|
|
4932
|
+
const _excluded$E = ["children", "visible", "onClose", "onExited"];
|
|
4802
4933
|
function DialogModalBehaviour(_ref) {
|
|
4803
4934
|
let {
|
|
4804
4935
|
children,
|
|
@@ -4806,7 +4937,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4806
4937
|
onClose,
|
|
4807
4938
|
onExited
|
|
4808
4939
|
} = _ref,
|
|
4809
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4940
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4810
4941
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4811
4942
|
useEffect(() => {
|
|
4812
4943
|
if (visible === true) {
|
|
@@ -4834,7 +4965,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4834
4965
|
});
|
|
4835
4966
|
}
|
|
4836
4967
|
|
|
4837
|
-
const _excluded$
|
|
4968
|
+
const _excluded$D = ["stretch"];
|
|
4838
4969
|
function DialogModal({
|
|
4839
4970
|
illustration,
|
|
4840
4971
|
title,
|
|
@@ -4876,7 +5007,7 @@ function DialogModalButton(_ref) {
|
|
|
4876
5007
|
let {
|
|
4877
5008
|
stretch = true
|
|
4878
5009
|
} = _ref,
|
|
4879
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5010
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4880
5011
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4881
5012
|
stretch: stretch
|
|
4882
5013
|
}, props));
|
|
@@ -4910,7 +5041,7 @@ function Emoji({
|
|
|
4910
5041
|
});
|
|
4911
5042
|
}
|
|
4912
5043
|
|
|
4913
|
-
const _excluded$
|
|
5044
|
+
const _excluded$C = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4914
5045
|
_excluded2$4 = ["phoneNumber", "children"],
|
|
4915
5046
|
_excluded3$3 = ["phoneNumber", "children"],
|
|
4916
5047
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4922,7 +5053,7 @@ function ExternalAppLink(_ref) {
|
|
|
4922
5053
|
onPress,
|
|
4923
5054
|
onOpenAppError
|
|
4924
5055
|
} = _ref,
|
|
4925
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5056
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
4926
5057
|
const href = `${appScheme}:${appValue}`;
|
|
4927
5058
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
|
|
4928
5059
|
href: href
|
|
@@ -5016,7 +5147,7 @@ function useOpenExternalLink(errorHandler) {
|
|
|
5016
5147
|
};
|
|
5017
5148
|
}
|
|
5018
5149
|
|
|
5019
|
-
const _excluded$
|
|
5150
|
+
const _excluded$B = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
|
|
5020
5151
|
function ExternalLink(_ref) {
|
|
5021
5152
|
let {
|
|
5022
5153
|
as: Component,
|
|
@@ -5026,7 +5157,7 @@ function ExternalLink(_ref) {
|
|
|
5026
5157
|
// eslint-disable-next-line no-console
|
|
5027
5158
|
onOpenLinkError = console.error
|
|
5028
5159
|
} = _ref,
|
|
5029
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5160
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5030
5161
|
const openExternalLink = useOpenExternalLink();
|
|
5031
5162
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5032
5163
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -5085,7 +5216,7 @@ function InputTextContainer({
|
|
|
5085
5216
|
});
|
|
5086
5217
|
}
|
|
5087
5218
|
|
|
5088
|
-
const _excluded$
|
|
5219
|
+
const _excluded$A = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5089
5220
|
const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5090
5221
|
let {
|
|
5091
5222
|
id,
|
|
@@ -5102,7 +5233,7 @@ const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5102
5233
|
height,
|
|
5103
5234
|
onSubmitEditing
|
|
5104
5235
|
} = _ref,
|
|
5105
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5236
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
5106
5237
|
const theme = useTheme();
|
|
5107
5238
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5108
5239
|
base: 'body-m'
|
|
@@ -5227,13 +5358,13 @@ function AutocompleteItemsListContainer({
|
|
|
5227
5358
|
});
|
|
5228
5359
|
}
|
|
5229
5360
|
|
|
5230
|
-
const _excluded$
|
|
5361
|
+
const _excluded$z = ["children", "testID"];
|
|
5231
5362
|
function AutocompleteOption(_ref) {
|
|
5232
5363
|
let {
|
|
5233
5364
|
children,
|
|
5234
5365
|
testID = 'kitt.Autocomplete.option'
|
|
5235
5366
|
} = _ref,
|
|
5236
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5367
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
5237
5368
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5238
5369
|
paddingX: {
|
|
5239
5370
|
base: 'kitt.2',
|
|
@@ -5246,7 +5377,7 @@ function AutocompleteOption(_ref) {
|
|
|
5246
5377
|
}));
|
|
5247
5378
|
}
|
|
5248
5379
|
|
|
5249
|
-
const _excluded$
|
|
5380
|
+
const _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
|
|
5250
5381
|
_excluded2$3 = ["onClick", "onPress"],
|
|
5251
5382
|
_excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5252
5383
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5288,7 +5419,7 @@ function Autocomplete(_ref) {
|
|
|
5288
5419
|
zIndex = 1000,
|
|
5289
5420
|
maxItemContainerHeight
|
|
5290
5421
|
} = _ref,
|
|
5291
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5422
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5292
5423
|
const childrenArray = Children.toArray(children);
|
|
5293
5424
|
const items = childrenArray.filter(isReactElement).map(child => ({
|
|
5294
5425
|
child,
|
|
@@ -5509,7 +5640,7 @@ function getBorderColor$1({
|
|
|
5509
5640
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5510
5641
|
}
|
|
5511
5642
|
|
|
5512
|
-
const _excluded$
|
|
5643
|
+
const _excluded$x = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5513
5644
|
const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5514
5645
|
let {
|
|
5515
5646
|
checked,
|
|
@@ -5520,7 +5651,7 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5520
5651
|
onBlur,
|
|
5521
5652
|
onFocus
|
|
5522
5653
|
} = _ref,
|
|
5523
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5654
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5524
5655
|
const theme = useTheme();
|
|
5525
5656
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5526
5657
|
hitSlop: hitSlop
|
|
@@ -5849,7 +5980,7 @@ function PartContainer({
|
|
|
5849
5980
|
});
|
|
5850
5981
|
}
|
|
5851
5982
|
|
|
5852
|
-
const _excluded$
|
|
5983
|
+
const _excluded$w = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5853
5984
|
const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5854
5985
|
let {
|
|
5855
5986
|
id,
|
|
@@ -5869,7 +6000,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5869
6000
|
onFocus,
|
|
5870
6001
|
onSubmitEditing
|
|
5871
6002
|
} = _ref;
|
|
5872
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
6003
|
+
_objectWithoutProperties(_ref, _excluded$w);
|
|
5873
6004
|
const monthRef = useRef(null);
|
|
5874
6005
|
const yearRef = useRef(null);
|
|
5875
6006
|
const defaultValue = value;
|
|
@@ -6070,7 +6201,7 @@ const PressableDateInputs = /*#__PURE__*/forwardRef(({
|
|
|
6070
6201
|
});
|
|
6071
6202
|
});
|
|
6072
6203
|
|
|
6073
|
-
const _excluded$
|
|
6204
|
+
const _excluded$v = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
|
|
6074
6205
|
const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6075
6206
|
let {
|
|
6076
6207
|
onBlur,
|
|
@@ -6081,7 +6212,7 @@ const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6081
6212
|
value,
|
|
6082
6213
|
onChange
|
|
6083
6214
|
} = _ref,
|
|
6084
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6215
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
6085
6216
|
const [isFocused, setIsFocused] = useState(false);
|
|
6086
6217
|
const [currentValue, setCurrentValue] = useState(value);
|
|
6087
6218
|
const handleClose = () => {
|
|
@@ -6151,7 +6282,7 @@ function PlatformDateTimePicker({
|
|
|
6151
6282
|
}));
|
|
6152
6283
|
}
|
|
6153
6284
|
|
|
6154
|
-
const _excluded$
|
|
6285
|
+
const _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
6155
6286
|
function ModalTitle({
|
|
6156
6287
|
children
|
|
6157
6288
|
}) {
|
|
@@ -6172,7 +6303,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
6172
6303
|
onClose,
|
|
6173
6304
|
onChange
|
|
6174
6305
|
} = _ref,
|
|
6175
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6306
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
6176
6307
|
const [currentValue, setCurrentValue] = useState(value);
|
|
6177
6308
|
|
|
6178
6309
|
// Prevent unsynced value between the modal and its parent state
|
|
@@ -6215,7 +6346,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
6215
6346
|
});
|
|
6216
6347
|
}
|
|
6217
6348
|
|
|
6218
|
-
const _excluded$
|
|
6349
|
+
const _excluded$t = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
|
|
6219
6350
|
const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6220
6351
|
let {
|
|
6221
6352
|
value,
|
|
@@ -6231,7 +6362,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6231
6362
|
onFocus,
|
|
6232
6363
|
onBlur
|
|
6233
6364
|
} = _ref,
|
|
6234
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6365
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
6235
6366
|
const [isPickerUIVisible, setIsPickerUIVisible] = useState(isDefaultVisible);
|
|
6236
6367
|
const [isFocused, setIsFocused] = useState(false);
|
|
6237
6368
|
const [currentValue, setCurrentValue] = useState(value);
|
|
@@ -6269,7 +6400,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6269
6400
|
});
|
|
6270
6401
|
});
|
|
6271
6402
|
|
|
6272
|
-
const _excluded$
|
|
6403
|
+
const _excluded$s = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
|
|
6273
6404
|
const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6274
6405
|
let {
|
|
6275
6406
|
value,
|
|
@@ -6279,7 +6410,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6279
6410
|
onChange,
|
|
6280
6411
|
onBlur
|
|
6281
6412
|
} = _ref,
|
|
6282
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6413
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6283
6414
|
if (Platform.OS === 'android') {
|
|
6284
6415
|
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
6285
6416
|
ref: ref,
|
|
@@ -6301,7 +6432,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6301
6432
|
}, props));
|
|
6302
6433
|
});
|
|
6303
6434
|
|
|
6304
|
-
const _excluded$
|
|
6435
|
+
const _excluded$r = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
|
|
6305
6436
|
const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6306
6437
|
let {
|
|
6307
6438
|
fillMode = 'native',
|
|
@@ -6309,7 +6440,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6309
6440
|
value,
|
|
6310
6441
|
onSubmitEditing
|
|
6311
6442
|
} = _ref,
|
|
6312
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6443
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6313
6444
|
// in apps, final-form can give a string value that will break the component
|
|
6314
6445
|
const currentValue = value || undefined;
|
|
6315
6446
|
if (fillMode === 'keyboard') {
|
|
@@ -6381,12 +6512,12 @@ function ImagePicker({
|
|
|
6381
6512
|
});
|
|
6382
6513
|
}
|
|
6383
6514
|
|
|
6384
|
-
const _excluded$
|
|
6515
|
+
const _excluded$q = ["children"];
|
|
6385
6516
|
function ListItemContent(_ref) {
|
|
6386
6517
|
let {
|
|
6387
6518
|
children
|
|
6388
6519
|
} = _ref,
|
|
6389
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6520
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
6390
6521
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6391
6522
|
alignSelf: "center",
|
|
6392
6523
|
flexBasis: "0%",
|
|
@@ -6397,7 +6528,7 @@ function ListItemContent(_ref) {
|
|
|
6397
6528
|
}));
|
|
6398
6529
|
}
|
|
6399
6530
|
|
|
6400
|
-
const _excluded$
|
|
6531
|
+
const _excluded$p = ["children", "side"],
|
|
6401
6532
|
_excluded2$2 = ["children", "align"];
|
|
6402
6533
|
// Handles the vertical alignment of the side elements of the list item
|
|
6403
6534
|
function ListItemSideContainer(_ref) {
|
|
@@ -6405,7 +6536,7 @@ function ListItemSideContainer(_ref) {
|
|
|
6405
6536
|
children,
|
|
6406
6537
|
side = 'left'
|
|
6407
6538
|
} = _ref,
|
|
6408
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6539
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
6409
6540
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6410
6541
|
flexDirection: "row",
|
|
6411
6542
|
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
@@ -6427,7 +6558,7 @@ function ListItemSideContent(_ref2) {
|
|
|
6427
6558
|
}));
|
|
6428
6559
|
}
|
|
6429
6560
|
|
|
6430
|
-
const _excluded$
|
|
6561
|
+
const _excluded$o = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
6431
6562
|
function ListItem(_ref) {
|
|
6432
6563
|
let {
|
|
6433
6564
|
children,
|
|
@@ -6437,7 +6568,7 @@ function ListItem(_ref) {
|
|
|
6437
6568
|
right,
|
|
6438
6569
|
onPress
|
|
6439
6570
|
} = _ref,
|
|
6440
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6571
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
6441
6572
|
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
6442
6573
|
const wrapperProps = onPress ? _objectSpread({
|
|
6443
6574
|
accessibilityRole: 'button',
|
|
@@ -6470,12 +6601,12 @@ ListItem.Content = ListItemContent;
|
|
|
6470
6601
|
ListItem.SideContent = ListItemSideContent;
|
|
6471
6602
|
ListItem.SideContainer = ListItemSideContainer;
|
|
6472
6603
|
|
|
6473
|
-
const _excluded$
|
|
6604
|
+
const _excluded$n = ["title"];
|
|
6474
6605
|
function BottomSheetActionsItem(_ref) {
|
|
6475
6606
|
let {
|
|
6476
6607
|
title
|
|
6477
6608
|
} = _ref,
|
|
6478
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6609
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
6479
6610
|
return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
|
|
6480
6611
|
children: /*#__PURE__*/jsx(ListItem, {
|
|
6481
6612
|
withPadding: true,
|
|
@@ -6971,7 +7102,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6971
7102
|
};
|
|
6972
7103
|
}
|
|
6973
7104
|
|
|
6974
|
-
const _excluded$
|
|
7105
|
+
const _excluded$m = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6975
7106
|
function InputAddress(_ref) {
|
|
6976
7107
|
let {
|
|
6977
7108
|
initialValue,
|
|
@@ -6980,7 +7111,7 @@ function InputAddress(_ref) {
|
|
|
6980
7111
|
emptyResultsElement,
|
|
6981
7112
|
onChange
|
|
6982
7113
|
} = _ref,
|
|
6983
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7114
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
6984
7115
|
const {
|
|
6985
7116
|
state,
|
|
6986
7117
|
onInputChange,
|
|
@@ -7076,12 +7207,12 @@ const InputIban = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7076
7207
|
}, props));
|
|
7077
7208
|
});
|
|
7078
7209
|
|
|
7079
|
-
const _excluded$
|
|
7210
|
+
const _excluded$l = ["onChange"];
|
|
7080
7211
|
const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7081
7212
|
let {
|
|
7082
7213
|
onChange
|
|
7083
7214
|
} = _ref,
|
|
7084
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7215
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7085
7216
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7086
7217
|
ref: ref
|
|
7087
7218
|
}, props), {}, {
|
|
@@ -7098,13 +7229,13 @@ const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7098
7229
|
}));
|
|
7099
7230
|
});
|
|
7100
7231
|
|
|
7101
|
-
const _excluded$
|
|
7232
|
+
const _excluded$k = ["isPasswordDefaultVisible", "right"];
|
|
7102
7233
|
const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7103
7234
|
let {
|
|
7104
7235
|
isPasswordDefaultVisible,
|
|
7105
7236
|
right
|
|
7106
7237
|
} = _ref,
|
|
7107
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7238
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7108
7239
|
const [isVisible, setIsVisible] = useState(Boolean(isPasswordDefaultVisible));
|
|
7109
7240
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7110
7241
|
ref: ref
|
|
@@ -7125,7 +7256,7 @@ const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7125
7256
|
}));
|
|
7126
7257
|
});
|
|
7127
7258
|
|
|
7128
|
-
const _excluded$
|
|
7259
|
+
const _excluded$j = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
7129
7260
|
function isPhoneNumberValid(number) {
|
|
7130
7261
|
return isValidNumber(number);
|
|
7131
7262
|
}
|
|
@@ -7139,7 +7270,7 @@ const InputPhone = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7139
7270
|
phoneNumberLength = 10,
|
|
7140
7271
|
onChange
|
|
7141
7272
|
} = _ref,
|
|
7142
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7273
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7143
7274
|
const currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
7144
7275
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7145
7276
|
ref: ref
|
|
@@ -7591,7 +7722,7 @@ function RadioButton({
|
|
|
7591
7722
|
});
|
|
7592
7723
|
}
|
|
7593
7724
|
|
|
7594
|
-
const _excluded$
|
|
7725
|
+
const _excluded$i = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7595
7726
|
function RadioButtonGroupItem(_ref) {
|
|
7596
7727
|
let props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7597
7728
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7606,7 +7737,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7606
7737
|
onBlur,
|
|
7607
7738
|
onChange
|
|
7608
7739
|
} = _ref2,
|
|
7609
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7740
|
+
props = _objectWithoutProperties(_ref2, _excluded$i);
|
|
7610
7741
|
const [currentValue, setCurrentValue] = useState(value);
|
|
7611
7742
|
const handleChange = newValue => {
|
|
7612
7743
|
if (disabled) return;
|
|
@@ -7635,14 +7766,14 @@ function RadioButtonGroup(_ref2) {
|
|
|
7635
7766
|
}
|
|
7636
7767
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7637
7768
|
|
|
7638
|
-
const _excluded$
|
|
7769
|
+
const _excluded$h = ["helper", "limit"];
|
|
7639
7770
|
const TextArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7640
7771
|
var _props$value, _props$value2;
|
|
7641
7772
|
let {
|
|
7642
7773
|
helper,
|
|
7643
7774
|
limit
|
|
7644
7775
|
} = _ref,
|
|
7645
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7776
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
7646
7777
|
const shouldDisplayLimit = limit && limit > 0;
|
|
7647
7778
|
const isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7648
7779
|
const limitContainerAnimatedStyle = useAnimatedStyle(() => ({
|
|
@@ -7798,7 +7929,7 @@ function ToggleAnimated({
|
|
|
7798
7929
|
});
|
|
7799
7930
|
}
|
|
7800
7931
|
|
|
7801
|
-
const _excluded$
|
|
7932
|
+
const _excluded$g = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7802
7933
|
const getLabelTypographyType = size => {
|
|
7803
7934
|
return size === 'medium' ? 'body-m' : 'body-l';
|
|
7804
7935
|
};
|
|
@@ -7814,7 +7945,7 @@ function Toggle(_ref) {
|
|
|
7814
7945
|
value = false,
|
|
7815
7946
|
onChange = () => {}
|
|
7816
7947
|
} = _ref,
|
|
7817
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7948
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
7818
7949
|
const theme = useKittTheme();
|
|
7819
7950
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
7820
7951
|
alignItems: "center"
|
|
@@ -7852,7 +7983,7 @@ function Toggle(_ref) {
|
|
|
7852
7983
|
}));
|
|
7853
7984
|
}
|
|
7854
7985
|
|
|
7855
|
-
const _excluded$
|
|
7986
|
+
const _excluded$f = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
7856
7987
|
function FullscreenModalBody(_ref) {
|
|
7857
7988
|
let {
|
|
7858
7989
|
children,
|
|
@@ -7860,7 +7991,7 @@ function FullscreenModalBody(_ref) {
|
|
|
7860
7991
|
style,
|
|
7861
7992
|
shouldHandleTopNotch
|
|
7862
7993
|
} = _ref,
|
|
7863
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7994
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
7864
7995
|
const {
|
|
7865
7996
|
bottom,
|
|
7866
7997
|
top
|
|
@@ -7888,14 +8019,14 @@ function FullscreenModalBody(_ref) {
|
|
|
7888
8019
|
}));
|
|
7889
8020
|
}
|
|
7890
8021
|
|
|
7891
|
-
const _excluded$
|
|
8022
|
+
const _excluded$e = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
7892
8023
|
function FullscreenModalFooter(_ref) {
|
|
7893
8024
|
let {
|
|
7894
8025
|
shouldHandleBottomNotch = true,
|
|
7895
8026
|
hasSeparator = true,
|
|
7896
8027
|
children
|
|
7897
8028
|
} = _ref,
|
|
7898
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8029
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
7899
8030
|
const {
|
|
7900
8031
|
bottom
|
|
7901
8032
|
} = useSafeAreaInsets();
|
|
@@ -8056,7 +8187,7 @@ function FullscreenModalAnimation({
|
|
|
8056
8187
|
});
|
|
8057
8188
|
}
|
|
8058
8189
|
|
|
8059
|
-
const _excluded$
|
|
8190
|
+
const _excluded$d = ["children", "visible", "onClose", "onExited"];
|
|
8060
8191
|
function FullscreenModalBehaviour(_ref) {
|
|
8061
8192
|
let {
|
|
8062
8193
|
children,
|
|
@@ -8064,7 +8195,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8064
8195
|
onClose,
|
|
8065
8196
|
onExited
|
|
8066
8197
|
} = _ref,
|
|
8067
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8198
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
8068
8199
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
8069
8200
|
useEffect(() => {
|
|
8070
8201
|
if (visible === true) {
|
|
@@ -8109,7 +8240,7 @@ function FullscreenModalContainer({
|
|
|
8109
8240
|
});
|
|
8110
8241
|
}
|
|
8111
8242
|
|
|
8112
|
-
const _excluded$
|
|
8243
|
+
const _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
8113
8244
|
function FullscreenModalHeader(_ref) {
|
|
8114
8245
|
let {
|
|
8115
8246
|
hasSeparator = true,
|
|
@@ -8120,7 +8251,7 @@ function FullscreenModalHeader(_ref) {
|
|
|
8120
8251
|
left,
|
|
8121
8252
|
shouldHandleTopNotch = true
|
|
8122
8253
|
} = _ref,
|
|
8123
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8254
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8124
8255
|
const {
|
|
8125
8256
|
top
|
|
8126
8257
|
} = useSafeAreaInsets();
|
|
@@ -8491,7 +8622,7 @@ const getButtonTypeAndVariant = iconColor => {
|
|
|
8491
8622
|
}
|
|
8492
8623
|
};
|
|
8493
8624
|
|
|
8494
|
-
const _excluded$
|
|
8625
|
+
const _excluded$b = ["color", "ariaLabel"];
|
|
8495
8626
|
/**
|
|
8496
8627
|
* @deprecated IconButton should only be used as a navigation button
|
|
8497
8628
|
* Other use cases should use a <Button> component with an icon
|
|
@@ -8501,7 +8632,7 @@ function IconButton(_ref) {
|
|
|
8501
8632
|
color = 'black',
|
|
8502
8633
|
ariaLabel
|
|
8503
8634
|
} = _ref,
|
|
8504
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8635
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8505
8636
|
const {
|
|
8506
8637
|
type: legacyColorToType,
|
|
8507
8638
|
variant: legacyColorToVariant
|
|
@@ -8731,7 +8862,7 @@ const getBackgroundColor = ({
|
|
|
8731
8862
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
8732
8863
|
};
|
|
8733
8864
|
|
|
8734
|
-
const _excluded$
|
|
8865
|
+
const _excluded$a = ["onPress", "testID"];
|
|
8735
8866
|
function StaticMapMarker$1({
|
|
8736
8867
|
variant,
|
|
8737
8868
|
isHovered,
|
|
@@ -8794,7 +8925,7 @@ function MapMarker(_ref) {
|
|
|
8794
8925
|
onPress,
|
|
8795
8926
|
testID
|
|
8796
8927
|
} = _ref,
|
|
8797
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8928
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
8798
8929
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8799
8930
|
testID: testID,
|
|
8800
8931
|
onPress: onPress,
|
|
@@ -8941,6 +9072,7 @@ const createKittSpaces = theme => {
|
|
|
8941
9072
|
const overridenNativeBaseSizeandSpaceScale = Object.fromEntries([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96, 0.5, 1.5, 2.5, 3.5].map(value => [value, value]));
|
|
8942
9073
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
|
|
8943
9074
|
function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
9075
|
+
var _theme$tabBar$solid$d, _theme$tabBar$solid$d2, _theme$tabBar$solid$d3, _theme$tabBar$solid$d4, _theme$tabBar$solid$d5, _theme$tabBar$solid$d6, _theme$tabBar$solid$d7, _theme$tabBar$solid$d8, _theme$tabBar$solid$r, _theme$tabBar$solid$r2, _theme$tabBar$solid$r3, _theme$tabBar$solid$r4, _theme$tabBar$solid$r5, _theme$tabBar$solid$r6, _theme$tabBar$solid$r7, _theme$tabBar$solid$r8;
|
|
8944
9076
|
const spaces = createKittSpaces(theme);
|
|
8945
9077
|
const appBreakpoints = (appTheme === null || appTheme === void 0 ? void 0 : appTheme.breakpoints) || {};
|
|
8946
9078
|
const extendedTheme = extendTheme({
|
|
@@ -9643,6 +9775,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9643
9775
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
9644
9776
|
}
|
|
9645
9777
|
}
|
|
9778
|
+
},
|
|
9779
|
+
tabBar: {
|
|
9780
|
+
underline: {
|
|
9781
|
+
default: {
|
|
9782
|
+
active: {
|
|
9783
|
+
color: {
|
|
9784
|
+
default: theme.tabBar.underline.default.active.color.default,
|
|
9785
|
+
focused: theme.tabBar.underline.default.active.color.focused,
|
|
9786
|
+
hovered: theme.tabBar.underline.default.active.color.hovered,
|
|
9787
|
+
pressed: theme.tabBar.underline.default.active.color.pressed
|
|
9788
|
+
},
|
|
9789
|
+
indicator: {
|
|
9790
|
+
backgroundColor: theme.tabBar.underline.default.active.indicator.backgroundColor
|
|
9791
|
+
}
|
|
9792
|
+
},
|
|
9793
|
+
inactive: {
|
|
9794
|
+
color: {
|
|
9795
|
+
default: theme.tabBar.underline.default.inactive.color.default,
|
|
9796
|
+
focused: theme.tabBar.underline.default.inactive.color.focused,
|
|
9797
|
+
hovered: theme.tabBar.underline.default.inactive.color.hovered,
|
|
9798
|
+
pressed: theme.tabBar.underline.default.inactive.color.pressed
|
|
9799
|
+
}
|
|
9800
|
+
},
|
|
9801
|
+
disabled: {
|
|
9802
|
+
color: {
|
|
9803
|
+
default: theme.tabBar.underline.default.disabled.color.default,
|
|
9804
|
+
focused: theme.tabBar.underline.default.disabled.color.focused,
|
|
9805
|
+
hovered: theme.tabBar.underline.default.disabled.color.hovered,
|
|
9806
|
+
pressed: theme.tabBar.underline.default.disabled.color.pressed
|
|
9807
|
+
}
|
|
9808
|
+
},
|
|
9809
|
+
borderBottomColor: theme.tabBar.underline.default.borderBottomColor
|
|
9810
|
+
},
|
|
9811
|
+
revert: {
|
|
9812
|
+
active: {
|
|
9813
|
+
color: {
|
|
9814
|
+
default: theme.tabBar.underline.revert.active.color.default,
|
|
9815
|
+
focused: theme.tabBar.underline.revert.active.color.focused,
|
|
9816
|
+
hovered: theme.tabBar.underline.revert.active.color.hovered,
|
|
9817
|
+
pressed: theme.tabBar.underline.revert.active.color.pressed
|
|
9818
|
+
},
|
|
9819
|
+
indicator: {
|
|
9820
|
+
backgroundColor: theme.tabBar.underline.revert.active.indicator.backgroundColor
|
|
9821
|
+
}
|
|
9822
|
+
},
|
|
9823
|
+
inactive: {
|
|
9824
|
+
color: {
|
|
9825
|
+
default: theme.tabBar.underline.revert.inactive.color.default,
|
|
9826
|
+
focused: theme.tabBar.underline.revert.inactive.color.focused,
|
|
9827
|
+
hovered: theme.tabBar.underline.revert.inactive.color.hovered,
|
|
9828
|
+
pressed: theme.tabBar.underline.revert.inactive.color.pressed
|
|
9829
|
+
}
|
|
9830
|
+
},
|
|
9831
|
+
disabled: {
|
|
9832
|
+
color: {
|
|
9833
|
+
default: theme.tabBar.underline.revert.disabled.color.default,
|
|
9834
|
+
focused: theme.tabBar.underline.revert.disabled.color.focused,
|
|
9835
|
+
hovered: theme.tabBar.underline.revert.disabled.color.hovered,
|
|
9836
|
+
pressed: theme.tabBar.underline.revert.disabled.color.pressed
|
|
9837
|
+
}
|
|
9838
|
+
},
|
|
9839
|
+
borderBottomColor: theme.tabBar.underline.revert.borderBottomColor
|
|
9840
|
+
}
|
|
9841
|
+
},
|
|
9842
|
+
solid: {
|
|
9843
|
+
default: {
|
|
9844
|
+
active: {
|
|
9845
|
+
color: {
|
|
9846
|
+
default: theme.tabBar.solid.default.active.color.default,
|
|
9847
|
+
focused: theme.tabBar.solid.default.active.color.focused,
|
|
9848
|
+
hovered: theme.tabBar.solid.default.active.color.hovered,
|
|
9849
|
+
pressed: theme.tabBar.solid.default.active.color.pressed
|
|
9850
|
+
},
|
|
9851
|
+
backgroundColor: {
|
|
9852
|
+
default: (_theme$tabBar$solid$d = theme.tabBar.solid.default.active.backgroundColor) === null || _theme$tabBar$solid$d === void 0 ? void 0 : _theme$tabBar$solid$d.default,
|
|
9853
|
+
focused: (_theme$tabBar$solid$d2 = theme.tabBar.solid.default.active.backgroundColor) === null || _theme$tabBar$solid$d2 === void 0 ? void 0 : _theme$tabBar$solid$d2.focused,
|
|
9854
|
+
hovered: (_theme$tabBar$solid$d3 = theme.tabBar.solid.default.active.backgroundColor) === null || _theme$tabBar$solid$d3 === void 0 ? void 0 : _theme$tabBar$solid$d3.hovered,
|
|
9855
|
+
pressed: (_theme$tabBar$solid$d4 = theme.tabBar.solid.default.active.backgroundColor) === null || _theme$tabBar$solid$d4 === void 0 ? void 0 : _theme$tabBar$solid$d4.pressed
|
|
9856
|
+
}
|
|
9857
|
+
},
|
|
9858
|
+
inactive: {
|
|
9859
|
+
color: {
|
|
9860
|
+
default: theme.tabBar.solid.default.inactive.color.default,
|
|
9861
|
+
focused: theme.tabBar.solid.default.inactive.color.focused,
|
|
9862
|
+
hovered: theme.tabBar.solid.default.inactive.color.hovered,
|
|
9863
|
+
pressed: theme.tabBar.solid.default.inactive.color.pressed
|
|
9864
|
+
},
|
|
9865
|
+
backgroundColor: {
|
|
9866
|
+
default: (_theme$tabBar$solid$d5 = theme.tabBar.solid.default.inactive.backgroundColor) === null || _theme$tabBar$solid$d5 === void 0 ? void 0 : _theme$tabBar$solid$d5.default,
|
|
9867
|
+
focused: (_theme$tabBar$solid$d6 = theme.tabBar.solid.default.inactive.backgroundColor) === null || _theme$tabBar$solid$d6 === void 0 ? void 0 : _theme$tabBar$solid$d6.focused,
|
|
9868
|
+
hovered: (_theme$tabBar$solid$d7 = theme.tabBar.solid.default.inactive.backgroundColor) === null || _theme$tabBar$solid$d7 === void 0 ? void 0 : _theme$tabBar$solid$d7.hovered,
|
|
9869
|
+
pressed: (_theme$tabBar$solid$d8 = theme.tabBar.solid.default.inactive.backgroundColor) === null || _theme$tabBar$solid$d8 === void 0 ? void 0 : _theme$tabBar$solid$d8.pressed
|
|
9870
|
+
}
|
|
9871
|
+
},
|
|
9872
|
+
disabled: {
|
|
9873
|
+
color: {
|
|
9874
|
+
default: theme.tabBar.solid.default.disabled.color.default,
|
|
9875
|
+
focused: theme.tabBar.solid.default.disabled.color.focused,
|
|
9876
|
+
hovered: theme.tabBar.solid.default.disabled.color.hovered,
|
|
9877
|
+
pressed: theme.tabBar.solid.default.disabled.color.pressed
|
|
9878
|
+
}
|
|
9879
|
+
}
|
|
9880
|
+
},
|
|
9881
|
+
revert: {
|
|
9882
|
+
active: {
|
|
9883
|
+
color: {
|
|
9884
|
+
default: theme.tabBar.solid.revert.active.color.default,
|
|
9885
|
+
focused: theme.tabBar.solid.revert.active.color.focused,
|
|
9886
|
+
hovered: theme.tabBar.solid.revert.active.color.hovered,
|
|
9887
|
+
pressed: theme.tabBar.solid.revert.active.color.pressed
|
|
9888
|
+
},
|
|
9889
|
+
backgroundColor: {
|
|
9890
|
+
default: (_theme$tabBar$solid$r = theme.tabBar.solid.revert.active.backgroundColor) === null || _theme$tabBar$solid$r === void 0 ? void 0 : _theme$tabBar$solid$r.default,
|
|
9891
|
+
focused: (_theme$tabBar$solid$r2 = theme.tabBar.solid.revert.active.backgroundColor) === null || _theme$tabBar$solid$r2 === void 0 ? void 0 : _theme$tabBar$solid$r2.focused,
|
|
9892
|
+
hovered: (_theme$tabBar$solid$r3 = theme.tabBar.solid.revert.active.backgroundColor) === null || _theme$tabBar$solid$r3 === void 0 ? void 0 : _theme$tabBar$solid$r3.hovered,
|
|
9893
|
+
pressed: (_theme$tabBar$solid$r4 = theme.tabBar.solid.revert.active.backgroundColor) === null || _theme$tabBar$solid$r4 === void 0 ? void 0 : _theme$tabBar$solid$r4.pressed
|
|
9894
|
+
}
|
|
9895
|
+
},
|
|
9896
|
+
inactive: {
|
|
9897
|
+
color: {
|
|
9898
|
+
default: theme.tabBar.solid.revert.inactive.color.default,
|
|
9899
|
+
focused: theme.tabBar.solid.revert.inactive.color.focused,
|
|
9900
|
+
hovered: theme.tabBar.solid.revert.inactive.color.hovered,
|
|
9901
|
+
pressed: theme.tabBar.solid.revert.inactive.color.pressed
|
|
9902
|
+
},
|
|
9903
|
+
backgroundColor: {
|
|
9904
|
+
default: (_theme$tabBar$solid$r5 = theme.tabBar.solid.revert.inactive.backgroundColor) === null || _theme$tabBar$solid$r5 === void 0 ? void 0 : _theme$tabBar$solid$r5.default,
|
|
9905
|
+
focused: (_theme$tabBar$solid$r6 = theme.tabBar.solid.revert.inactive.backgroundColor) === null || _theme$tabBar$solid$r6 === void 0 ? void 0 : _theme$tabBar$solid$r6.focused,
|
|
9906
|
+
hovered: (_theme$tabBar$solid$r7 = theme.tabBar.solid.revert.inactive.backgroundColor) === null || _theme$tabBar$solid$r7 === void 0 ? void 0 : _theme$tabBar$solid$r7.hovered,
|
|
9907
|
+
pressed: (_theme$tabBar$solid$r8 = theme.tabBar.solid.revert.inactive.backgroundColor) === null || _theme$tabBar$solid$r8 === void 0 ? void 0 : _theme$tabBar$solid$r8.pressed
|
|
9908
|
+
}
|
|
9909
|
+
},
|
|
9910
|
+
disabled: {
|
|
9911
|
+
color: {
|
|
9912
|
+
default: theme.tabBar.solid.revert.disabled.color.default,
|
|
9913
|
+
focused: theme.tabBar.solid.revert.disabled.color.focused,
|
|
9914
|
+
hovered: theme.tabBar.solid.revert.disabled.color.hovered,
|
|
9915
|
+
pressed: theme.tabBar.solid.revert.disabled.color.pressed
|
|
9916
|
+
}
|
|
9917
|
+
}
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9646
9920
|
}
|
|
9647
9921
|
}),
|
|
9648
9922
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.colors
|
|
@@ -9718,6 +9992,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9718
9992
|
highlight: {
|
|
9719
9993
|
borderRadius: theme.highlight.borderRadius
|
|
9720
9994
|
},
|
|
9995
|
+
tabBar: {
|
|
9996
|
+
underline: {
|
|
9997
|
+
default: {
|
|
9998
|
+
active: {
|
|
9999
|
+
borderRadius: theme.tabBar.underline.default.active.borderRadius
|
|
10000
|
+
},
|
|
10001
|
+
inactive: {
|
|
10002
|
+
borderRadius: theme.tabBar.underline.default.inactive.borderRadius
|
|
10003
|
+
}
|
|
10004
|
+
},
|
|
10005
|
+
revert: {
|
|
10006
|
+
active: {
|
|
10007
|
+
borderRadius: theme.tabBar.underline.revert.active.borderRadius
|
|
10008
|
+
},
|
|
10009
|
+
inactive: {
|
|
10010
|
+
borderRadius: theme.tabBar.underline.revert.inactive.borderRadius
|
|
10011
|
+
}
|
|
10012
|
+
}
|
|
10013
|
+
},
|
|
10014
|
+
solid: {
|
|
10015
|
+
default: {
|
|
10016
|
+
active: {
|
|
10017
|
+
borderRadius: theme.tabBar.solid.default.active.borderRadius
|
|
10018
|
+
},
|
|
10019
|
+
inactive: {
|
|
10020
|
+
borderRadius: theme.tabBar.solid.default.inactive.borderRadius
|
|
10021
|
+
}
|
|
10022
|
+
},
|
|
10023
|
+
revert: {
|
|
10024
|
+
active: {
|
|
10025
|
+
borderRadius: theme.tabBar.solid.revert.active.borderRadius
|
|
10026
|
+
},
|
|
10027
|
+
inactive: {
|
|
10028
|
+
borderRadius: theme.tabBar.solid.revert.inactive.borderRadius
|
|
10029
|
+
}
|
|
10030
|
+
}
|
|
10031
|
+
}
|
|
10032
|
+
},
|
|
9721
10033
|
tag: {
|
|
9722
10034
|
borderRadius: theme.tag.borderRadius
|
|
9723
10035
|
},
|
|
@@ -11352,7 +11664,7 @@ NavigationBottomSheet.Header = NavigationBottomSheetHeader;
|
|
|
11352
11664
|
NavigationBottomSheet.Body = NavigationBottomSheetBody;
|
|
11353
11665
|
NavigationBottomSheet.Footer = NavigationBottomSheetFooter;
|
|
11354
11666
|
|
|
11355
|
-
const _excluded$
|
|
11667
|
+
const _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
11356
11668
|
function NavigationModalBehaviour(_ref) {
|
|
11357
11669
|
let {
|
|
11358
11670
|
children,
|
|
@@ -11363,7 +11675,7 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11363
11675
|
onExit,
|
|
11364
11676
|
onClose
|
|
11365
11677
|
} = _ref,
|
|
11366
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11678
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
11367
11679
|
const AnimationComponent = useBreakpointValue({
|
|
11368
11680
|
base: FullscreenModalAnimation,
|
|
11369
11681
|
small: CardModalAnimation
|
|
@@ -11949,7 +12261,7 @@ function SkeletonContent({
|
|
|
11949
12261
|
});
|
|
11950
12262
|
}
|
|
11951
12263
|
|
|
11952
|
-
const _excluded$
|
|
12264
|
+
const _excluded$8 = ["isLoading", "style"],
|
|
11953
12265
|
_excluded2$1 = ["size"],
|
|
11954
12266
|
_excluded3$1 = ["size"],
|
|
11955
12267
|
_excluded4$1 = ["size"];
|
|
@@ -11958,7 +12270,7 @@ function Skeleton(_ref) {
|
|
|
11958
12270
|
isLoading = false,
|
|
11959
12271
|
style
|
|
11960
12272
|
} = _ref,
|
|
11961
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12273
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
11962
12274
|
const [width, setWidth] = useState(0);
|
|
11963
12275
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11964
12276
|
overflow: "hidden",
|
|
@@ -12140,7 +12452,7 @@ function getShouldDisplay2x() {
|
|
|
12140
12452
|
return currentDevicePixelRatio > 1;
|
|
12141
12453
|
}
|
|
12142
12454
|
|
|
12143
|
-
const _excluded$
|
|
12455
|
+
const _excluded$7 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
|
|
12144
12456
|
const mapBoxMaxPictureWidth = 1280;
|
|
12145
12457
|
|
|
12146
12458
|
// Mapbox requestable width for image is between 1 - 1280px
|
|
@@ -12159,7 +12471,7 @@ function StaticMap(_ref) {
|
|
|
12159
12471
|
onLoaded,
|
|
12160
12472
|
onError
|
|
12161
12473
|
} = _ref,
|
|
12162
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12474
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
12163
12475
|
const [currentWidth, setCurrentWidth] = useState(getPictureWidth(width));
|
|
12164
12476
|
const [isLoading, setIsLoading] = useState(true);
|
|
12165
12477
|
const [hasError, setHasError] = useState(false);
|
|
@@ -12237,13 +12549,13 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
12237
12549
|
StaticMap.Error = StaticMapError;
|
|
12238
12550
|
StaticMap.Marker = StaticMapMarker;
|
|
12239
12551
|
|
|
12240
|
-
const _excluded$
|
|
12552
|
+
const _excluded$6 = ["direction", "wrap"];
|
|
12241
12553
|
function Flex(_ref) {
|
|
12242
12554
|
let {
|
|
12243
12555
|
direction,
|
|
12244
12556
|
wrap = 'wrap'
|
|
12245
12557
|
} = _ref,
|
|
12246
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12558
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
12247
12559
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12248
12560
|
flexDirection: direction,
|
|
12249
12561
|
flexWrap: wrap
|
|
@@ -12385,7 +12697,7 @@ function Story({
|
|
|
12385
12697
|
});
|
|
12386
12698
|
}
|
|
12387
12699
|
|
|
12388
|
-
const _excluded$
|
|
12700
|
+
const _excluded$5 = ["title", "children", "internalIsDemoSection"],
|
|
12389
12701
|
_excluded2 = ["title", "children"],
|
|
12390
12702
|
_excluded3 = ["title", "children"],
|
|
12391
12703
|
_excluded4 = ["children"];
|
|
@@ -12395,7 +12707,7 @@ function StorySection(_ref) {
|
|
|
12395
12707
|
children,
|
|
12396
12708
|
internalIsDemoSection
|
|
12397
12709
|
} = _ref,
|
|
12398
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12710
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
12399
12711
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
12400
12712
|
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
12401
12713
|
marginBottom: "kitt.8"
|
|
@@ -12551,125 +12863,128 @@ const StoryGrid = {
|
|
|
12551
12863
|
Col: StoryGridCol
|
|
12552
12864
|
};
|
|
12553
12865
|
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
return isActive ? kittTheme.colors.primary : kittTheme.colors.blackLight;
|
|
12570
|
-
}
|
|
12571
|
-
}
|
|
12572
|
-
}
|
|
12573
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
12574
|
-
const {
|
|
12575
|
-
kitt: kittTheme
|
|
12576
|
-
} = useKittTheme();
|
|
12577
|
-
switch (color) {
|
|
12578
|
-
case 'black':
|
|
12579
|
-
{
|
|
12580
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12581
|
-
}
|
|
12582
|
-
case 'white':
|
|
12583
|
-
{
|
|
12584
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
12585
|
-
}
|
|
12586
|
-
default:
|
|
12587
|
-
{
|
|
12588
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12589
|
-
}
|
|
12590
|
-
}
|
|
12591
|
-
}
|
|
12866
|
+
const getVariantFromColor = color => {
|
|
12867
|
+
if (color === 'white') return 'revert';
|
|
12868
|
+
return 'default';
|
|
12869
|
+
};
|
|
12870
|
+
const getTabBarItemActiveState = (isActive, disabled) => {
|
|
12871
|
+
if (disabled) return 'disabled';
|
|
12872
|
+
if (isActive) return 'active';
|
|
12873
|
+
return 'inactive';
|
|
12874
|
+
};
|
|
12875
|
+
const getTabBarItemState = (isHovered, isPressed, isFocused) => {
|
|
12876
|
+
if (isHovered) return 'hovered';
|
|
12877
|
+
if (isPressed) return 'pressed';
|
|
12878
|
+
if (isFocused) return 'focused';
|
|
12879
|
+
return 'default';
|
|
12880
|
+
};
|
|
12592
12881
|
function TabBarItem({
|
|
12593
12882
|
name,
|
|
12594
12883
|
icon,
|
|
12595
|
-
|
|
12884
|
+
variant = 'default',
|
|
12885
|
+
type = 'underline',
|
|
12886
|
+
color,
|
|
12596
12887
|
testID,
|
|
12888
|
+
disabled,
|
|
12597
12889
|
isActive = false,
|
|
12890
|
+
isFocusedInternal = false,
|
|
12891
|
+
isHoveredInternal = false,
|
|
12892
|
+
isPressedInternal = false,
|
|
12598
12893
|
onPress
|
|
12599
12894
|
}) {
|
|
12600
|
-
|
|
12601
|
-
const
|
|
12895
|
+
// Keep backward compatibility with color property
|
|
12896
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12897
|
+
const activeState = getTabBarItemActiveState(isActive, disabled);
|
|
12898
|
+
const baseTheme = `kitt.tabBar.${type}.${definedVariant}.${activeState}`;
|
|
12602
12899
|
return /*#__PURE__*/jsx(Pressable, {
|
|
12900
|
+
disabled: disabled,
|
|
12603
12901
|
testID: testID,
|
|
12604
12902
|
onPress: onPress,
|
|
12605
|
-
children:
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
children:
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
,
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12903
|
+
children: ({
|
|
12904
|
+
isHovered,
|
|
12905
|
+
isPressed,
|
|
12906
|
+
isFocused
|
|
12907
|
+
}) => {
|
|
12908
|
+
const state = getTabBarItemState(isHovered || isHoveredInternal, isPressed || isPressedInternal, isFocused || isFocusedInternal);
|
|
12909
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
12910
|
+
alignItems: "center",
|
|
12911
|
+
position: "relative",
|
|
12912
|
+
paddingY: "kitt.2",
|
|
12913
|
+
paddingRight: "kitt.2",
|
|
12914
|
+
paddingLeft: icon ? undefined : 'kitt.2',
|
|
12915
|
+
backgroundColor: `${baseTheme}.backgroundColor.${state}`,
|
|
12916
|
+
borderRadius: `${baseTheme}.borderRadius`,
|
|
12917
|
+
children: [icon ? /*#__PURE__*/jsx(View, {
|
|
12918
|
+
marginRight: "kitt.2",
|
|
12919
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
12920
|
+
color: `${baseTheme}.color.${state}`,
|
|
12921
|
+
icon: icon
|
|
12922
|
+
})
|
|
12923
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
12924
|
+
base: "label-large",
|
|
12925
|
+
numberOfLines: 1,
|
|
12926
|
+
color: `${baseTheme}.color.${state}`,
|
|
12927
|
+
children: name
|
|
12928
|
+
}), type !== 'solid' ? /*#__PURE__*/jsx(View, {
|
|
12929
|
+
backgroundColor: `${baseTheme}.indicator.backgroundColor`,
|
|
12930
|
+
position: "absolute",
|
|
12931
|
+
bottom: -1 // in order to be over tab bar's border bottom
|
|
12932
|
+
,
|
|
12933
|
+
left: 0,
|
|
12934
|
+
right: 0,
|
|
12935
|
+
height: 2
|
|
12936
|
+
}) : null]
|
|
12937
|
+
});
|
|
12938
|
+
}
|
|
12630
12939
|
});
|
|
12631
12940
|
}
|
|
12632
12941
|
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
12942
|
+
function TabBar({
|
|
12943
|
+
tabs,
|
|
12944
|
+
variant = 'default',
|
|
12945
|
+
type = 'underline',
|
|
12946
|
+
align = 'left',
|
|
12947
|
+
color,
|
|
12948
|
+
activeTabIndex = 0,
|
|
12949
|
+
renderTabItem,
|
|
12950
|
+
onChangeTab
|
|
12951
|
+
}) {
|
|
12644
12952
|
const sx = useSx();
|
|
12645
|
-
const {
|
|
12646
|
-
kitt: kittTheme
|
|
12647
|
-
} = useKittTheme();
|
|
12648
12953
|
const tabItems = tabs.map((tab, index) => renderTabItem({
|
|
12649
12954
|
tab,
|
|
12650
12955
|
index,
|
|
12651
12956
|
isActive: activeTabIndex === index
|
|
12652
12957
|
}));
|
|
12653
|
-
|
|
12958
|
+
let styles = {
|
|
12654
12959
|
justifyContent: align,
|
|
12655
12960
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
12656
|
-
minWidth: '100%'
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12961
|
+
minWidth: '100%'
|
|
12962
|
+
};
|
|
12963
|
+
|
|
12964
|
+
// Keep backward compatibility with color property
|
|
12965
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12966
|
+
if (type !== 'solid') {
|
|
12967
|
+
styles = _objectSpread(_objectSpread({}, styles), {}, {
|
|
12968
|
+
borderBottomWidth: 1,
|
|
12969
|
+
borderBottomColor: `kitt.tabBar.${type}.${definedVariant}.borderBottomColor`
|
|
12970
|
+
});
|
|
12971
|
+
}
|
|
12972
|
+
const scrollViewStyles = sx(styles);
|
|
12973
|
+
const space = type === 'solid' ? 'kitt.2' : 'kitt.4';
|
|
12660
12974
|
return /*#__PURE__*/jsx(ScrollView, {
|
|
12661
12975
|
horizontal: true,
|
|
12662
12976
|
showsHorizontalScrollIndicator: false,
|
|
12663
12977
|
contentContainerStyle: scrollViewStyles,
|
|
12664
|
-
children: /*#__PURE__*/jsx(HStack,
|
|
12665
|
-
space: align === 'center' ? 'kitt.16' :
|
|
12666
|
-
}, props), {}, {
|
|
12978
|
+
children: /*#__PURE__*/jsx(HStack, {
|
|
12979
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
12667
12980
|
children: Children.map(tabItems, (child, index) => {
|
|
12668
12981
|
const tab = tabs[index];
|
|
12669
12982
|
if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
|
|
12670
12983
|
return /*#__PURE__*/jsx(View, {
|
|
12671
12984
|
children: /*#__PURE__*/cloneElement(child, {
|
|
12672
12985
|
color,
|
|
12986
|
+
variant: definedVariant,
|
|
12987
|
+
type,
|
|
12673
12988
|
onPress: event => {
|
|
12674
12989
|
var _child$props$onPress, _child$props;
|
|
12675
12990
|
onChangeTab({
|
|
@@ -12681,7 +12996,7 @@ function TabBar(_ref) {
|
|
|
12681
12996
|
})
|
|
12682
12997
|
}, tab.key);
|
|
12683
12998
|
})
|
|
12684
|
-
})
|
|
12999
|
+
})
|
|
12685
13000
|
});
|
|
12686
13001
|
}
|
|
12687
13002
|
TabBar.Item = TabBarItem;
|