@ornikar/kitt-universal 27.4.0 → 27.5.1-canary.3a59d4ae3422049417956fa37f27d2e8f5f84aba.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/AGENTS.md +30 -0
- package/CHANGELOG.md +28 -0
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/GoogleMapsAutocompleteProvider/GoogleMapsAutocompleteProvider.d.ts.map +1 -1
- package/dist/definitions/MapMarker/MapMarker.d.ts +2 -5
- package/dist/definitions/MapMarker/MapMarker.d.ts.map +1 -1
- package/dist/definitions/MapMarker/constants.d.ts +6 -0
- package/dist/definitions/MapMarker/constants.d.ts.map +1 -0
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts +2 -1
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
- 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/TimePicker/TimePicker.web.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/cardModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/fullscreenModal.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/shadows.d.ts +4 -2
- package/dist/definitions/themes/late-ocean/shadows.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/skeleton.d.ts +2 -1
- package/dist/definitions/themes/late-ocean/skeleton.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 +665 -289
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +665 -289
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +555 -178
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +2 -2
- package/dist/index-node-22.17.cjs.web.js +522 -172
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +555 -178
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +2 -2
- package/dist/index-node-22.17.es.web.mjs +522 -172
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +664 -316
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +641 -284
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +219 -46
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +219 -46
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +219 -46
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +219 -46
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +219 -46
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +219 -46
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +219 -46
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +219 -46
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/scripts/codemods/__testfixtures__/card-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/card-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/card-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/wrongOrder.output.js +15 -0
- 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/parameters.input.tsx +21 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/wrongOrder.output.js +15 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/wrongOrder.output.js +15 -0
- package/scripts/codemods/__tests__/card-modal.test.js +10 -0
- package/scripts/codemods/__tests__/csf1-csf2.test.ts +10 -0
- package/scripts/codemods/__tests__/fullscreen-modal.test.js +10 -0
- package/scripts/codemods/__tests__/navigation-modal.test.js +10 -0
- package/scripts/codemods/card-modal.js +155 -0
- package/scripts/codemods/csf1-csf2.js +257 -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/modals.js +0 -102
|
@@ -740,9 +740,19 @@ const card = {
|
|
|
740
740
|
};
|
|
741
741
|
|
|
742
742
|
const webAnimationContentDuration$2 = 400;
|
|
743
|
-
const webAnimationContentEasing$2 =
|
|
743
|
+
const webAnimationContentEasing$2 = {
|
|
744
|
+
x1: 0.77,
|
|
745
|
+
y1: 0,
|
|
746
|
+
x2: 0.175,
|
|
747
|
+
y2: 1
|
|
748
|
+
};
|
|
744
749
|
const webAnimationOverlayDuration$2 = 250;
|
|
745
|
-
const webAnimationOverlayEasing$2 =
|
|
750
|
+
const webAnimationOverlayEasing$2 = {
|
|
751
|
+
x1: 0.42,
|
|
752
|
+
y1: 0,
|
|
753
|
+
x2: 1,
|
|
754
|
+
y2: 1
|
|
755
|
+
};
|
|
746
756
|
const maxWidth = 540;
|
|
747
757
|
const overlayHorizontalPadding = 24;
|
|
748
758
|
const cardModal = {
|
|
@@ -834,9 +844,19 @@ const choices = {
|
|
|
834
844
|
};
|
|
835
845
|
|
|
836
846
|
const webAnimationContentDuration$1 = 400;
|
|
837
|
-
const webAnimationContentEasing$1 =
|
|
847
|
+
const webAnimationContentEasing$1 = {
|
|
848
|
+
x1: 0.77,
|
|
849
|
+
y1: 0,
|
|
850
|
+
x2: 0.175,
|
|
851
|
+
y2: 1
|
|
852
|
+
};
|
|
838
853
|
const webAnimationOverlayDuration$1 = 250;
|
|
839
|
-
const webAnimationOverlayEasing$1 =
|
|
854
|
+
const webAnimationOverlayEasing$1 = {
|
|
855
|
+
x1: 0.42,
|
|
856
|
+
y1: 0,
|
|
857
|
+
x2: 1,
|
|
858
|
+
y2: 1
|
|
859
|
+
};
|
|
840
860
|
const dialogModal = {
|
|
841
861
|
borderRadius: spacing * 2,
|
|
842
862
|
maxWidth: 540,
|
|
@@ -1768,9 +1788,19 @@ const forms = {
|
|
|
1768
1788
|
};
|
|
1769
1789
|
|
|
1770
1790
|
const webAnimationContentDuration = 600;
|
|
1771
|
-
const webAnimationContentEasing =
|
|
1791
|
+
const webAnimationContentEasing = {
|
|
1792
|
+
x1: 0.77,
|
|
1793
|
+
y1: 0,
|
|
1794
|
+
x2: 0.175,
|
|
1795
|
+
y2: 1
|
|
1796
|
+
};
|
|
1772
1797
|
const webAnimationOverlayDuration = 250;
|
|
1773
|
-
const webAnimationOverlayEasing =
|
|
1798
|
+
const webAnimationOverlayEasing = {
|
|
1799
|
+
x1: 0.42,
|
|
1800
|
+
y1: 0,
|
|
1801
|
+
x2: 1,
|
|
1802
|
+
y2: 1
|
|
1803
|
+
};
|
|
1774
1804
|
const fullscreenModal = {
|
|
1775
1805
|
header: {
|
|
1776
1806
|
height: 56
|
|
@@ -1863,43 +1893,8 @@ const highlight = {
|
|
|
1863
1893
|
}
|
|
1864
1894
|
};
|
|
1865
1895
|
|
|
1866
|
-
const getIconSizeFromFontSize = fontSize => {
|
|
1867
|
-
if (fontSize <= 14) return 16;
|
|
1868
|
-
if (fontSize <= 16) return 20;
|
|
1869
|
-
return 24;
|
|
1870
|
-
};
|
|
1871
|
-
const createTypographyIconSizeConfig = (baseAndSmallFontSize, mediumAndWideFontSize) => {
|
|
1872
|
-
const baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1873
|
-
const mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1874
|
-
return {
|
|
1875
|
-
baseAndSmall: {
|
|
1876
|
-
iconSize: baseAndSmallIconSize
|
|
1877
|
-
},
|
|
1878
|
-
mediumAndWide: {
|
|
1879
|
-
iconSize: mediumAndWideIconSize
|
|
1880
|
-
}
|
|
1881
|
-
};
|
|
1882
|
-
};
|
|
1883
1896
|
const icon = {
|
|
1884
|
-
defaultSize: 20
|
|
1885
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1886
|
-
typographySize: {
|
|
1887
|
-
// also known as xxlarge
|
|
1888
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1889
|
-
// also known as xlarge
|
|
1890
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1891
|
-
// also known as medium
|
|
1892
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1893
|
-
// also known as xsmall
|
|
1894
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1895
|
-
// also known as xxsmall
|
|
1896
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1897
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1898
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1899
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1900
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1901
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1902
|
-
}
|
|
1897
|
+
defaultSize: 20
|
|
1903
1898
|
};
|
|
1904
1899
|
|
|
1905
1900
|
const iconButton = {
|
|
@@ -1918,8 +1913,8 @@ const listItem = {
|
|
|
1918
1913
|
|
|
1919
1914
|
const mapMarker = {
|
|
1920
1915
|
home: {
|
|
1921
|
-
default:
|
|
1922
|
-
selected:
|
|
1916
|
+
default: deepPurpleColorPalette['grey.9'],
|
|
1917
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1923
1918
|
svg: {
|
|
1924
1919
|
height: 36
|
|
1925
1920
|
},
|
|
@@ -1929,8 +1924,8 @@ const mapMarker = {
|
|
|
1929
1924
|
}
|
|
1930
1925
|
},
|
|
1931
1926
|
meetingPoint: {
|
|
1932
|
-
default:
|
|
1933
|
-
selected:
|
|
1927
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
1928
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1934
1929
|
svg: {
|
|
1935
1930
|
width: 40,
|
|
1936
1931
|
height: 43
|
|
@@ -2326,6 +2321,183 @@ const skeleton = {
|
|
|
2326
2321
|
}
|
|
2327
2322
|
};
|
|
2328
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
|
+
|
|
2329
2501
|
const tag = {
|
|
2330
2502
|
borderRadius: 16,
|
|
2331
2503
|
icon: {
|
|
@@ -2465,6 +2637,7 @@ const theme = {
|
|
|
2465
2637
|
picker,
|
|
2466
2638
|
shadows,
|
|
2467
2639
|
skeleton,
|
|
2640
|
+
tabBar,
|
|
2468
2641
|
tag,
|
|
2469
2642
|
tooltip,
|
|
2470
2643
|
typography,
|
|
@@ -2566,7 +2739,7 @@ function ActionCardDisabled({
|
|
|
2566
2739
|
});
|
|
2567
2740
|
}
|
|
2568
2741
|
|
|
2569
|
-
const _excluded$
|
|
2742
|
+
const _excluded$S = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2570
2743
|
function ActionCard(_ref) {
|
|
2571
2744
|
let {
|
|
2572
2745
|
children,
|
|
@@ -2578,7 +2751,7 @@ function ActionCard(_ref) {
|
|
|
2578
2751
|
isPressed,
|
|
2579
2752
|
isFocused
|
|
2580
2753
|
} = _ref,
|
|
2581
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2754
|
+
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
2582
2755
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2583
2756
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2584
2757
|
borderRadius: borderRadius,
|
|
@@ -2879,17 +3052,21 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2879
3052
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2880
3053
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2881
3054
|
};
|
|
3055
|
+
const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
3056
|
+
// check if all values are not undefined
|
|
3057
|
+
const isAllValuesUndefined = Object.values(type).every(value => value === undefined);
|
|
3058
|
+
|
|
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
|
+
};
|
|
2882
3062
|
|
|
2883
|
-
const _excluded$
|
|
3063
|
+
const _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2884
3064
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2885
3065
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2886
3066
|
const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
2887
3067
|
function useTypographyColor() {
|
|
2888
3068
|
return useContext(TypographyColorContext);
|
|
2889
3069
|
}
|
|
2890
|
-
function useTypographyAncestorType() {
|
|
2891
|
-
return useContext(TypographyTypeContext);
|
|
2892
|
-
}
|
|
2893
3070
|
const TypographyDefaultColorContext = /*#__PURE__*/createContext(undefined);
|
|
2894
3071
|
function useTypographyDefaultColor() {
|
|
2895
3072
|
return useContext(TypographyDefaultColorContext);
|
|
@@ -2992,7 +3169,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
|
|
|
2992
3169
|
};
|
|
2993
3170
|
}
|
|
2994
3171
|
function Typography(_ref) {
|
|
2995
|
-
var
|
|
3172
|
+
var _typographyType$base;
|
|
2996
3173
|
let {
|
|
2997
3174
|
accessibilityRole,
|
|
2998
3175
|
base: legacyBase,
|
|
@@ -3010,12 +3187,14 @@ function Typography(_ref) {
|
|
|
3010
3187
|
variant,
|
|
3011
3188
|
color
|
|
3012
3189
|
} = _ref,
|
|
3013
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3190
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$R);
|
|
3014
3191
|
const sx = useSx();
|
|
3015
3192
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3193
|
+
const typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3016
3194
|
const defaultColor = useTypographyDefaultColor();
|
|
3017
3195
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3018
|
-
const
|
|
3196
|
+
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3197
|
+
const baseOrDefaultToBody = (_typographyType$base = typographyType.base) !== null && _typographyType$base !== void 0 ? _typographyType$base : 'body-m';
|
|
3019
3198
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3020
3199
|
const fontSizeForNativeBase = createNativeBaseFontSize(_objectSpread(_objectSpread({}, type), {}, {
|
|
3021
3200
|
base: baseOrDefaultToBody
|
|
@@ -3050,7 +3229,7 @@ function Typography(_ref) {
|
|
|
3050
3229
|
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3051
3230
|
value: typographyFamily,
|
|
3052
3231
|
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3053
|
-
value:
|
|
3232
|
+
value: typographyType,
|
|
3054
3233
|
children: text
|
|
3055
3234
|
})
|
|
3056
3235
|
}) : text;
|
|
@@ -3149,32 +3328,14 @@ function Icon({
|
|
|
3149
3328
|
});
|
|
3150
3329
|
}
|
|
3151
3330
|
|
|
3152
|
-
const _excluded$
|
|
3331
|
+
const _excluded$Q = ["color", "size"],
|
|
3153
3332
|
_excluded2$5 = ["color"];
|
|
3154
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3155
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3156
|
-
}
|
|
3157
|
-
function createNativeBaseIconSize(type) {
|
|
3158
|
-
const typeWithMediumForced = _objectSpread(_objectSpread({}, type), {}, {
|
|
3159
|
-
medium: type.medium || type.small || type.base
|
|
3160
|
-
});
|
|
3161
|
-
const iconSizeForNativeBase = {};
|
|
3162
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(typeName => {
|
|
3163
|
-
const value = typeWithMediumForced[typeName];
|
|
3164
|
-
if (value) {
|
|
3165
|
-
iconSizeForNativeBase[typeName] = `kitt.icon.typographySize.${value}.${getIconSizeConfigKeyFromTypeName(typeName)}.iconSize`;
|
|
3166
|
-
}
|
|
3167
|
-
});
|
|
3168
|
-
return iconSizeForNativeBase;
|
|
3169
|
-
}
|
|
3170
3333
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3171
3334
|
let {
|
|
3172
3335
|
color,
|
|
3173
3336
|
size
|
|
3174
3337
|
} = _ref,
|
|
3175
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3176
|
-
const ancestorType = useTypographyAncestorType();
|
|
3177
|
-
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3338
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
3178
3339
|
const colorValue = getTypographyColorValue(color);
|
|
3179
3340
|
const sx = useSx();
|
|
3180
3341
|
const {
|
|
@@ -3183,7 +3344,7 @@ function TypographyIconSpecifiedColor(_ref) {
|
|
|
3183
3344
|
color: colorValue
|
|
3184
3345
|
});
|
|
3185
3346
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
3186
|
-
size:
|
|
3347
|
+
size: size,
|
|
3187
3348
|
color: colorStyleValue
|
|
3188
3349
|
}));
|
|
3189
3350
|
}
|
|
@@ -3217,7 +3378,7 @@ const getButtonTextColorByType = (type, variant, isHovered, isPressed, isDisable
|
|
|
3217
3378
|
return `${baseKey}.default`;
|
|
3218
3379
|
};
|
|
3219
3380
|
|
|
3220
|
-
const _excluded$
|
|
3381
|
+
const _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3221
3382
|
function ButtonContentChildren({
|
|
3222
3383
|
type,
|
|
3223
3384
|
icon,
|
|
@@ -3317,7 +3478,7 @@ function ButtonContent(_ref) {
|
|
|
3317
3478
|
innerSpacing,
|
|
3318
3479
|
size
|
|
3319
3480
|
} = _ref,
|
|
3320
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3481
|
+
props = _objectWithoutProperties(_ref, _excluded$P);
|
|
3321
3482
|
const color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3322
3483
|
return /*#__PURE__*/jsx(View, {
|
|
3323
3484
|
_web: {
|
|
@@ -3565,7 +3726,7 @@ function LoaderIcon({
|
|
|
3565
3726
|
});
|
|
3566
3727
|
}
|
|
3567
3728
|
|
|
3568
|
-
const _excluded$
|
|
3729
|
+
const _excluded$O = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3569
3730
|
const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3570
3731
|
let {
|
|
3571
3732
|
as,
|
|
@@ -3577,7 +3738,7 @@ const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3577
3738
|
medium: false
|
|
3578
3739
|
}
|
|
3579
3740
|
} = _ref,
|
|
3580
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3741
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
3581
3742
|
const [isLoading, setIsLoading] = useState(false);
|
|
3582
3743
|
const mountedRef = useRef(false);
|
|
3583
3744
|
// securing the loading state with a ref to avoid user action between rerenders
|
|
@@ -3628,7 +3789,7 @@ function ActionsButton(_ref) {
|
|
|
3628
3789
|
}, props));
|
|
3629
3790
|
}
|
|
3630
3791
|
|
|
3631
|
-
const _excluded$
|
|
3792
|
+
const _excluded$N = ["children", "layout", "reversed"];
|
|
3632
3793
|
function getCurrentLayout(layout) {
|
|
3633
3794
|
if (!layout) return {
|
|
3634
3795
|
base: 'stretch',
|
|
@@ -3661,7 +3822,7 @@ function Actions(_ref) {
|
|
|
3661
3822
|
base: false
|
|
3662
3823
|
}
|
|
3663
3824
|
} = _ref,
|
|
3664
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3825
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
3665
3826
|
const shouldReverse = typeof reversed === 'boolean' ? {
|
|
3666
3827
|
base: !!reversed
|
|
3667
3828
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3716,7 +3877,7 @@ function getInitials(firstname, lastname) {
|
|
|
3716
3877
|
return `${firstname[0]}${lastname[0]}`.toUpperCase();
|
|
3717
3878
|
}
|
|
3718
3879
|
|
|
3719
|
-
const _excluded$
|
|
3880
|
+
const _excluded$M = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3720
3881
|
function AvatarContent({
|
|
3721
3882
|
size,
|
|
3722
3883
|
src,
|
|
@@ -3782,7 +3943,7 @@ function Avatar(_ref) {
|
|
|
3782
3943
|
dark,
|
|
3783
3944
|
disabled
|
|
3784
3945
|
} = _ref,
|
|
3785
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3946
|
+
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
3786
3947
|
const currentSize = getCurrentSize({
|
|
3787
3948
|
size,
|
|
3788
3949
|
sizeVariant
|
|
@@ -3820,7 +3981,7 @@ function Avatar(_ref) {
|
|
|
3820
3981
|
});
|
|
3821
3982
|
}
|
|
3822
3983
|
|
|
3823
|
-
const _excluded$
|
|
3984
|
+
const _excluded$L = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints"];
|
|
3824
3985
|
function BottomSheetComp(_ref, ref) {
|
|
3825
3986
|
let {
|
|
3826
3987
|
children: Content,
|
|
@@ -3830,7 +3991,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3830
3991
|
enableDynamicSizing = true,
|
|
3831
3992
|
snapPoints = ['100%']
|
|
3832
3993
|
} = _ref,
|
|
3833
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3994
|
+
rest = _objectWithoutProperties(_ref, _excluded$L);
|
|
3834
3995
|
const {
|
|
3835
3996
|
top
|
|
3836
3997
|
} = useSafeAreaInsets();
|
|
@@ -4009,7 +4170,12 @@ function NativeOpacityAnimation$2({
|
|
|
4009
4170
|
duration,
|
|
4010
4171
|
easing
|
|
4011
4172
|
} = theme.kitt.cardModal.animation.overlay;
|
|
4012
|
-
const
|
|
4173
|
+
const {
|
|
4174
|
+
x1,
|
|
4175
|
+
y1,
|
|
4176
|
+
x2,
|
|
4177
|
+
y2
|
|
4178
|
+
} = easing;
|
|
4013
4179
|
return {
|
|
4014
4180
|
opacity: withTiming(visible ? 1 : 0, {
|
|
4015
4181
|
duration,
|
|
@@ -4047,7 +4213,12 @@ function NativeRotationAnimation$1({
|
|
|
4047
4213
|
duration,
|
|
4048
4214
|
easing
|
|
4049
4215
|
} = theme.kitt.cardModal.animation.content;
|
|
4050
|
-
const
|
|
4216
|
+
const {
|
|
4217
|
+
x1,
|
|
4218
|
+
y1,
|
|
4219
|
+
x2,
|
|
4220
|
+
y2
|
|
4221
|
+
} = easing;
|
|
4051
4222
|
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4052
4223
|
duration,
|
|
4053
4224
|
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
@@ -4131,7 +4302,7 @@ function CardModalAnimation({
|
|
|
4131
4302
|
});
|
|
4132
4303
|
}
|
|
4133
4304
|
|
|
4134
|
-
const _excluded$
|
|
4305
|
+
const _excluded$K = ["children", "visible", "onClose", "onExited"];
|
|
4135
4306
|
function CardModalBehaviour(_ref) {
|
|
4136
4307
|
let {
|
|
4137
4308
|
children,
|
|
@@ -4139,7 +4310,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4139
4310
|
onClose,
|
|
4140
4311
|
onExited
|
|
4141
4312
|
} = _ref,
|
|
4142
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4313
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
4143
4314
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4144
4315
|
useEffect(() => {
|
|
4145
4316
|
if (visible === true) {
|
|
@@ -4161,7 +4332,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4161
4332
|
});
|
|
4162
4333
|
}
|
|
4163
4334
|
|
|
4164
|
-
const _excluded$
|
|
4335
|
+
const _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4165
4336
|
function CardModalBody(_ref) {
|
|
4166
4337
|
let {
|
|
4167
4338
|
children,
|
|
@@ -4174,7 +4345,7 @@ function CardModalBody(_ref) {
|
|
|
4174
4345
|
medium: 'kitt.6'
|
|
4175
4346
|
}
|
|
4176
4347
|
} = _ref,
|
|
4177
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4348
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4178
4349
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4179
4350
|
showsVerticalScrollIndicator: false,
|
|
4180
4351
|
_contentContainerStyle: {
|
|
@@ -4186,7 +4357,7 @@ function CardModalBody(_ref) {
|
|
|
4186
4357
|
}));
|
|
4187
4358
|
}
|
|
4188
4359
|
|
|
4189
|
-
const _excluded$
|
|
4360
|
+
const _excluded$I = ["children", "padding", "hasSeparator"];
|
|
4190
4361
|
function CardModalFooter(_ref) {
|
|
4191
4362
|
let {
|
|
4192
4363
|
children,
|
|
@@ -4196,7 +4367,7 @@ function CardModalFooter(_ref) {
|
|
|
4196
4367
|
},
|
|
4197
4368
|
hasSeparator = true
|
|
4198
4369
|
} = _ref,
|
|
4199
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4370
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4200
4371
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4201
4372
|
marginTop: "kitt.2",
|
|
4202
4373
|
padding: padding,
|
|
@@ -4210,7 +4381,7 @@ function CardModalFooter(_ref) {
|
|
|
4210
4381
|
}));
|
|
4211
4382
|
}
|
|
4212
4383
|
|
|
4213
|
-
const _excluded$
|
|
4384
|
+
const _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4214
4385
|
function CardModalHeader(_ref) {
|
|
4215
4386
|
let {
|
|
4216
4387
|
children,
|
|
@@ -4223,7 +4394,7 @@ function CardModalHeader(_ref) {
|
|
|
4223
4394
|
right,
|
|
4224
4395
|
left
|
|
4225
4396
|
} = _ref,
|
|
4226
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4397
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4227
4398
|
const defaultContainerPadding = {
|
|
4228
4399
|
base: 'kitt.4',
|
|
4229
4400
|
medium: 'kitt.6'
|
|
@@ -4261,7 +4432,7 @@ function CardModalHeader(_ref) {
|
|
|
4261
4432
|
}));
|
|
4262
4433
|
}
|
|
4263
4434
|
|
|
4264
|
-
const _excluded$
|
|
4435
|
+
const _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4265
4436
|
function CardModal(_ref) {
|
|
4266
4437
|
let {
|
|
4267
4438
|
backgroundColor = 'kitt.uiBackgroundLight',
|
|
@@ -4272,7 +4443,7 @@ function CardModal(_ref) {
|
|
|
4272
4443
|
body,
|
|
4273
4444
|
footer
|
|
4274
4445
|
} = _ref,
|
|
4275
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4446
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4276
4447
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4277
4448
|
overflow: "hidden",
|
|
4278
4449
|
backgroundColor: backgroundColor,
|
|
@@ -4526,13 +4697,13 @@ function ChoiceItemContainer({
|
|
|
4526
4697
|
}));
|
|
4527
4698
|
}
|
|
4528
4699
|
|
|
4529
|
-
const _excluded$
|
|
4700
|
+
const _excluded$F = ["direction", "contentContainerStyle"];
|
|
4530
4701
|
function ChoicesContainer(_ref) {
|
|
4531
4702
|
let {
|
|
4532
4703
|
direction,
|
|
4533
4704
|
contentContainerStyle
|
|
4534
4705
|
} = _ref,
|
|
4535
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4706
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4536
4707
|
if (direction === 'row') {
|
|
4537
4708
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4538
4709
|
horizontal: true,
|
|
@@ -4624,7 +4795,12 @@ function NativeOpacityAnimation$1({
|
|
|
4624
4795
|
duration,
|
|
4625
4796
|
easing
|
|
4626
4797
|
} = theme.kitt.dialogModal.animation.overlay;
|
|
4627
|
-
const
|
|
4798
|
+
const {
|
|
4799
|
+
x1,
|
|
4800
|
+
y1,
|
|
4801
|
+
x2,
|
|
4802
|
+
y2
|
|
4803
|
+
} = easing;
|
|
4628
4804
|
return {
|
|
4629
4805
|
opacity: withTiming(visible ? 1 : 0, {
|
|
4630
4806
|
duration,
|
|
@@ -4662,7 +4838,12 @@ function NativeRotationAnimation({
|
|
|
4662
4838
|
duration,
|
|
4663
4839
|
easing
|
|
4664
4840
|
} = theme.kitt.dialogModal.animation.content;
|
|
4665
|
-
const
|
|
4841
|
+
const {
|
|
4842
|
+
x1,
|
|
4843
|
+
y1,
|
|
4844
|
+
x2,
|
|
4845
|
+
y2
|
|
4846
|
+
} = easing;
|
|
4666
4847
|
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4667
4848
|
duration,
|
|
4668
4849
|
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
@@ -4748,7 +4929,7 @@ function DialogModalAnimation({
|
|
|
4748
4929
|
});
|
|
4749
4930
|
}
|
|
4750
4931
|
|
|
4751
|
-
const _excluded$
|
|
4932
|
+
const _excluded$E = ["children", "visible", "onClose", "onExited"];
|
|
4752
4933
|
function DialogModalBehaviour(_ref) {
|
|
4753
4934
|
let {
|
|
4754
4935
|
children,
|
|
@@ -4756,7 +4937,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4756
4937
|
onClose,
|
|
4757
4938
|
onExited
|
|
4758
4939
|
} = _ref,
|
|
4759
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4940
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4760
4941
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4761
4942
|
useEffect(() => {
|
|
4762
4943
|
if (visible === true) {
|
|
@@ -4784,7 +4965,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4784
4965
|
});
|
|
4785
4966
|
}
|
|
4786
4967
|
|
|
4787
|
-
const _excluded$
|
|
4968
|
+
const _excluded$D = ["stretch"];
|
|
4788
4969
|
function DialogModal({
|
|
4789
4970
|
illustration,
|
|
4790
4971
|
title,
|
|
@@ -4826,7 +5007,7 @@ function DialogModalButton(_ref) {
|
|
|
4826
5007
|
let {
|
|
4827
5008
|
stretch = true
|
|
4828
5009
|
} = _ref,
|
|
4829
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5010
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4830
5011
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4831
5012
|
stretch: stretch
|
|
4832
5013
|
}, props));
|
|
@@ -4860,7 +5041,7 @@ function Emoji({
|
|
|
4860
5041
|
});
|
|
4861
5042
|
}
|
|
4862
5043
|
|
|
4863
|
-
const _excluded$
|
|
5044
|
+
const _excluded$C = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4864
5045
|
_excluded2$4 = ["phoneNumber", "children"],
|
|
4865
5046
|
_excluded3$3 = ["phoneNumber", "children"],
|
|
4866
5047
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4872,7 +5053,7 @@ function ExternalAppLink(_ref) {
|
|
|
4872
5053
|
onPress,
|
|
4873
5054
|
onOpenAppError
|
|
4874
5055
|
} = _ref,
|
|
4875
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5056
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
4876
5057
|
const href = `${appScheme}:${appValue}`;
|
|
4877
5058
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
|
|
4878
5059
|
href: href
|
|
@@ -4966,7 +5147,7 @@ function useOpenExternalLink(errorHandler) {
|
|
|
4966
5147
|
};
|
|
4967
5148
|
}
|
|
4968
5149
|
|
|
4969
|
-
const _excluded$
|
|
5150
|
+
const _excluded$B = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
|
|
4970
5151
|
function ExternalLink(_ref) {
|
|
4971
5152
|
let {
|
|
4972
5153
|
as: Component,
|
|
@@ -4976,7 +5157,7 @@ function ExternalLink(_ref) {
|
|
|
4976
5157
|
// eslint-disable-next-line no-console
|
|
4977
5158
|
onOpenLinkError = console.error
|
|
4978
5159
|
} = _ref,
|
|
4979
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5160
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
4980
5161
|
const openExternalLink = useOpenExternalLink();
|
|
4981
5162
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4982
5163
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -5035,7 +5216,7 @@ function InputTextContainer({
|
|
|
5035
5216
|
});
|
|
5036
5217
|
}
|
|
5037
5218
|
|
|
5038
|
-
const _excluded$
|
|
5219
|
+
const _excluded$A = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5039
5220
|
const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5040
5221
|
let {
|
|
5041
5222
|
id,
|
|
@@ -5052,7 +5233,7 @@ const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5052
5233
|
height,
|
|
5053
5234
|
onSubmitEditing
|
|
5054
5235
|
} = _ref,
|
|
5055
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5236
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
5056
5237
|
const theme = useTheme();
|
|
5057
5238
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5058
5239
|
base: 'body-m'
|
|
@@ -5177,13 +5358,13 @@ function AutocompleteItemsListContainer({
|
|
|
5177
5358
|
});
|
|
5178
5359
|
}
|
|
5179
5360
|
|
|
5180
|
-
const _excluded$
|
|
5361
|
+
const _excluded$z = ["children", "testID"];
|
|
5181
5362
|
function AutocompleteOption(_ref) {
|
|
5182
5363
|
let {
|
|
5183
5364
|
children,
|
|
5184
5365
|
testID = 'kitt.Autocomplete.option'
|
|
5185
5366
|
} = _ref,
|
|
5186
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5367
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
5187
5368
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5188
5369
|
paddingX: {
|
|
5189
5370
|
base: 'kitt.2',
|
|
@@ -5196,7 +5377,7 @@ function AutocompleteOption(_ref) {
|
|
|
5196
5377
|
}));
|
|
5197
5378
|
}
|
|
5198
5379
|
|
|
5199
|
-
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"],
|
|
5200
5381
|
_excluded2$3 = ["onClick", "onPress"],
|
|
5201
5382
|
_excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5202
5383
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5238,7 +5419,7 @@ function Autocomplete(_ref) {
|
|
|
5238
5419
|
zIndex = 1000,
|
|
5239
5420
|
maxItemContainerHeight
|
|
5240
5421
|
} = _ref,
|
|
5241
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5422
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5242
5423
|
const childrenArray = Children.toArray(children);
|
|
5243
5424
|
const items = childrenArray.filter(isReactElement).map(child => ({
|
|
5244
5425
|
child,
|
|
@@ -5459,7 +5640,7 @@ function getBorderColor$1({
|
|
|
5459
5640
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5460
5641
|
}
|
|
5461
5642
|
|
|
5462
|
-
const _excluded$
|
|
5643
|
+
const _excluded$x = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5463
5644
|
const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5464
5645
|
let {
|
|
5465
5646
|
checked,
|
|
@@ -5470,7 +5651,7 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5470
5651
|
onBlur,
|
|
5471
5652
|
onFocus
|
|
5472
5653
|
} = _ref,
|
|
5473
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5654
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5474
5655
|
const theme = useTheme();
|
|
5475
5656
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5476
5657
|
hitSlop: hitSlop
|
|
@@ -5799,7 +5980,7 @@ function PartContainer({
|
|
|
5799
5980
|
});
|
|
5800
5981
|
}
|
|
5801
5982
|
|
|
5802
|
-
const _excluded$
|
|
5983
|
+
const _excluded$w = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5803
5984
|
const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5804
5985
|
let {
|
|
5805
5986
|
id,
|
|
@@ -5819,7 +6000,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5819
6000
|
onFocus,
|
|
5820
6001
|
onSubmitEditing
|
|
5821
6002
|
} = _ref;
|
|
5822
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
6003
|
+
_objectWithoutProperties(_ref, _excluded$w);
|
|
5823
6004
|
const monthRef = useRef(null);
|
|
5824
6005
|
const yearRef = useRef(null);
|
|
5825
6006
|
const defaultValue = value;
|
|
@@ -6020,7 +6201,7 @@ const PressableDateInputs = /*#__PURE__*/forwardRef(({
|
|
|
6020
6201
|
});
|
|
6021
6202
|
});
|
|
6022
6203
|
|
|
6023
|
-
const _excluded$
|
|
6204
|
+
const _excluded$v = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
|
|
6024
6205
|
const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6025
6206
|
let {
|
|
6026
6207
|
onBlur,
|
|
@@ -6031,7 +6212,7 @@ const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6031
6212
|
value,
|
|
6032
6213
|
onChange
|
|
6033
6214
|
} = _ref,
|
|
6034
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6215
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
6035
6216
|
const [isFocused, setIsFocused] = useState(false);
|
|
6036
6217
|
const [currentValue, setCurrentValue] = useState(value);
|
|
6037
6218
|
const handleClose = () => {
|
|
@@ -6101,7 +6282,7 @@ function PlatformDateTimePicker({
|
|
|
6101
6282
|
}));
|
|
6102
6283
|
}
|
|
6103
6284
|
|
|
6104
|
-
const _excluded$
|
|
6285
|
+
const _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
6105
6286
|
function ModalTitle({
|
|
6106
6287
|
children
|
|
6107
6288
|
}) {
|
|
@@ -6122,7 +6303,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
6122
6303
|
onClose,
|
|
6123
6304
|
onChange
|
|
6124
6305
|
} = _ref,
|
|
6125
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6306
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
6126
6307
|
const [currentValue, setCurrentValue] = useState(value);
|
|
6127
6308
|
|
|
6128
6309
|
// Prevent unsynced value between the modal and its parent state
|
|
@@ -6165,7 +6346,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
6165
6346
|
});
|
|
6166
6347
|
}
|
|
6167
6348
|
|
|
6168
|
-
const _excluded$
|
|
6349
|
+
const _excluded$t = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
|
|
6169
6350
|
const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6170
6351
|
let {
|
|
6171
6352
|
value,
|
|
@@ -6181,7 +6362,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6181
6362
|
onFocus,
|
|
6182
6363
|
onBlur
|
|
6183
6364
|
} = _ref,
|
|
6184
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6365
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
6185
6366
|
const [isPickerUIVisible, setIsPickerUIVisible] = useState(isDefaultVisible);
|
|
6186
6367
|
const [isFocused, setIsFocused] = useState(false);
|
|
6187
6368
|
const [currentValue, setCurrentValue] = useState(value);
|
|
@@ -6219,7 +6400,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6219
6400
|
});
|
|
6220
6401
|
});
|
|
6221
6402
|
|
|
6222
|
-
const _excluded$
|
|
6403
|
+
const _excluded$s = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
|
|
6223
6404
|
const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6224
6405
|
let {
|
|
6225
6406
|
value,
|
|
@@ -6229,7 +6410,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6229
6410
|
onChange,
|
|
6230
6411
|
onBlur
|
|
6231
6412
|
} = _ref,
|
|
6232
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6413
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6233
6414
|
if (Platform.OS === 'android') {
|
|
6234
6415
|
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
6235
6416
|
ref: ref,
|
|
@@ -6251,7 +6432,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6251
6432
|
}, props));
|
|
6252
6433
|
});
|
|
6253
6434
|
|
|
6254
|
-
const _excluded$
|
|
6435
|
+
const _excluded$r = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
|
|
6255
6436
|
const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6256
6437
|
let {
|
|
6257
6438
|
fillMode = 'native',
|
|
@@ -6259,7 +6440,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6259
6440
|
value,
|
|
6260
6441
|
onSubmitEditing
|
|
6261
6442
|
} = _ref,
|
|
6262
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6443
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6263
6444
|
// in apps, final-form can give a string value that will break the component
|
|
6264
6445
|
const currentValue = value || undefined;
|
|
6265
6446
|
if (fillMode === 'keyboard') {
|
|
@@ -6289,13 +6470,13 @@ function DocumentPicker({
|
|
|
6289
6470
|
// ensure that the press event is not prevented by Button component
|
|
6290
6471
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
6291
6472
|
onPress: async () => {
|
|
6292
|
-
var _childElement$props$o, _childElement$props
|
|
6473
|
+
var _childElement$props$o, _childElement$props, _result$assets$;
|
|
6293
6474
|
if (disabled) return;
|
|
6294
6475
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
6295
6476
|
const result = await getDocumentAsync(_objectSpread(_objectSpread({}, documentPickerOptions), {}, {
|
|
6296
6477
|
multiple: false
|
|
6297
6478
|
}));
|
|
6298
|
-
if (!result.canceled && result.assets[0]
|
|
6479
|
+
if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
|
|
6299
6480
|
onDocumentUpload(result.assets[0].file);
|
|
6300
6481
|
}
|
|
6301
6482
|
},
|
|
@@ -6322,7 +6503,7 @@ function ImagePicker({
|
|
|
6322
6503
|
const result = await launchImageLibraryAsync(_objectSpread(_objectSpread({}, imagePickerOptions), {}, {
|
|
6323
6504
|
allowsMultipleSelection: false
|
|
6324
6505
|
}));
|
|
6325
|
-
if (!result.canceled) {
|
|
6506
|
+
if (!result.canceled && result.assets[0]) {
|
|
6326
6507
|
onImageSelected(result.assets[0]);
|
|
6327
6508
|
}
|
|
6328
6509
|
},
|
|
@@ -6331,12 +6512,12 @@ function ImagePicker({
|
|
|
6331
6512
|
});
|
|
6332
6513
|
}
|
|
6333
6514
|
|
|
6334
|
-
const _excluded$
|
|
6515
|
+
const _excluded$q = ["children"];
|
|
6335
6516
|
function ListItemContent(_ref) {
|
|
6336
6517
|
let {
|
|
6337
6518
|
children
|
|
6338
6519
|
} = _ref,
|
|
6339
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6520
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
6340
6521
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6341
6522
|
alignSelf: "center",
|
|
6342
6523
|
flexBasis: "0%",
|
|
@@ -6347,7 +6528,7 @@ function ListItemContent(_ref) {
|
|
|
6347
6528
|
}));
|
|
6348
6529
|
}
|
|
6349
6530
|
|
|
6350
|
-
const _excluded$
|
|
6531
|
+
const _excluded$p = ["children", "side"],
|
|
6351
6532
|
_excluded2$2 = ["children", "align"];
|
|
6352
6533
|
// Handles the vertical alignment of the side elements of the list item
|
|
6353
6534
|
function ListItemSideContainer(_ref) {
|
|
@@ -6355,7 +6536,7 @@ function ListItemSideContainer(_ref) {
|
|
|
6355
6536
|
children,
|
|
6356
6537
|
side = 'left'
|
|
6357
6538
|
} = _ref,
|
|
6358
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6539
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
6359
6540
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6360
6541
|
flexDirection: "row",
|
|
6361
6542
|
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
@@ -6377,7 +6558,7 @@ function ListItemSideContent(_ref2) {
|
|
|
6377
6558
|
}));
|
|
6378
6559
|
}
|
|
6379
6560
|
|
|
6380
|
-
const _excluded$
|
|
6561
|
+
const _excluded$o = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
6381
6562
|
function ListItem(_ref) {
|
|
6382
6563
|
let {
|
|
6383
6564
|
children,
|
|
@@ -6387,7 +6568,7 @@ function ListItem(_ref) {
|
|
|
6387
6568
|
right,
|
|
6388
6569
|
onPress
|
|
6389
6570
|
} = _ref,
|
|
6390
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6571
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
6391
6572
|
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
6392
6573
|
const wrapperProps = onPress ? _objectSpread({
|
|
6393
6574
|
accessibilityRole: 'button',
|
|
@@ -6420,12 +6601,12 @@ ListItem.Content = ListItemContent;
|
|
|
6420
6601
|
ListItem.SideContent = ListItemSideContent;
|
|
6421
6602
|
ListItem.SideContainer = ListItemSideContainer;
|
|
6422
6603
|
|
|
6423
|
-
const _excluded$
|
|
6604
|
+
const _excluded$n = ["title"];
|
|
6424
6605
|
function BottomSheetActionsItem(_ref) {
|
|
6425
6606
|
let {
|
|
6426
6607
|
title
|
|
6427
6608
|
} = _ref,
|
|
6428
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6609
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
6429
6610
|
return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
|
|
6430
6611
|
children: /*#__PURE__*/jsx(ListItem, {
|
|
6431
6612
|
withPadding: true,
|
|
@@ -6774,17 +6955,17 @@ function GoogleMapsAutocompleteProvider({
|
|
|
6774
6955
|
dispatch({
|
|
6775
6956
|
type: 'search-error'
|
|
6776
6957
|
});
|
|
6777
|
-
return;
|
|
6778
6958
|
}
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6959
|
+
if (results) {
|
|
6960
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
6961
|
+
searchResultsCache.current[value] = results;
|
|
6962
|
+
dispatch({
|
|
6963
|
+
type: 'search-success',
|
|
6964
|
+
payload: {
|
|
6965
|
+
results
|
|
6966
|
+
}
|
|
6967
|
+
});
|
|
6968
|
+
}
|
|
6788
6969
|
} catch (error) {
|
|
6789
6970
|
dispatch({
|
|
6790
6971
|
type: 'search-error'
|
|
@@ -6921,7 +7102,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6921
7102
|
};
|
|
6922
7103
|
}
|
|
6923
7104
|
|
|
6924
|
-
const _excluded$
|
|
7105
|
+
const _excluded$m = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6925
7106
|
function InputAddress(_ref) {
|
|
6926
7107
|
let {
|
|
6927
7108
|
initialValue,
|
|
@@ -6930,7 +7111,7 @@ function InputAddress(_ref) {
|
|
|
6930
7111
|
emptyResultsElement,
|
|
6931
7112
|
onChange
|
|
6932
7113
|
} = _ref,
|
|
6933
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7114
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
6934
7115
|
const {
|
|
6935
7116
|
state,
|
|
6936
7117
|
onInputChange,
|
|
@@ -7026,12 +7207,12 @@ const InputIban = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7026
7207
|
}, props));
|
|
7027
7208
|
});
|
|
7028
7209
|
|
|
7029
|
-
const _excluded$
|
|
7210
|
+
const _excluded$l = ["onChange"];
|
|
7030
7211
|
const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7031
7212
|
let {
|
|
7032
7213
|
onChange
|
|
7033
7214
|
} = _ref,
|
|
7034
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7215
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7035
7216
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7036
7217
|
ref: ref
|
|
7037
7218
|
}, props), {}, {
|
|
@@ -7048,13 +7229,13 @@ const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7048
7229
|
}));
|
|
7049
7230
|
});
|
|
7050
7231
|
|
|
7051
|
-
const _excluded$
|
|
7232
|
+
const _excluded$k = ["isPasswordDefaultVisible", "right"];
|
|
7052
7233
|
const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7053
7234
|
let {
|
|
7054
7235
|
isPasswordDefaultVisible,
|
|
7055
7236
|
right
|
|
7056
7237
|
} = _ref,
|
|
7057
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7238
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7058
7239
|
const [isVisible, setIsVisible] = useState(Boolean(isPasswordDefaultVisible));
|
|
7059
7240
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7060
7241
|
ref: ref
|
|
@@ -7075,7 +7256,7 @@ const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7075
7256
|
}));
|
|
7076
7257
|
});
|
|
7077
7258
|
|
|
7078
|
-
const _excluded$
|
|
7259
|
+
const _excluded$j = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
7079
7260
|
function isPhoneNumberValid(number) {
|
|
7080
7261
|
return isValidNumber(number);
|
|
7081
7262
|
}
|
|
@@ -7089,7 +7270,7 @@ const InputPhone = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
7089
7270
|
phoneNumberLength = 10,
|
|
7090
7271
|
onChange
|
|
7091
7272
|
} = _ref,
|
|
7092
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7273
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7093
7274
|
const currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
7094
7275
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7095
7276
|
ref: ref
|
|
@@ -7541,7 +7722,7 @@ function RadioButton({
|
|
|
7541
7722
|
});
|
|
7542
7723
|
}
|
|
7543
7724
|
|
|
7544
|
-
const _excluded$
|
|
7725
|
+
const _excluded$i = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7545
7726
|
function RadioButtonGroupItem(_ref) {
|
|
7546
7727
|
let props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7547
7728
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7556,7 +7737,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7556
7737
|
onBlur,
|
|
7557
7738
|
onChange
|
|
7558
7739
|
} = _ref2,
|
|
7559
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7740
|
+
props = _objectWithoutProperties(_ref2, _excluded$i);
|
|
7560
7741
|
const [currentValue, setCurrentValue] = useState(value);
|
|
7561
7742
|
const handleChange = newValue => {
|
|
7562
7743
|
if (disabled) return;
|
|
@@ -7585,14 +7766,14 @@ function RadioButtonGroup(_ref2) {
|
|
|
7585
7766
|
}
|
|
7586
7767
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7587
7768
|
|
|
7588
|
-
const _excluded$
|
|
7769
|
+
const _excluded$h = ["helper", "limit"];
|
|
7589
7770
|
const TextArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7590
7771
|
var _props$value, _props$value2;
|
|
7591
7772
|
let {
|
|
7592
7773
|
helper,
|
|
7593
7774
|
limit
|
|
7594
7775
|
} = _ref,
|
|
7595
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7776
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
7596
7777
|
const shouldDisplayLimit = limit && limit > 0;
|
|
7597
7778
|
const isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7598
7779
|
const limitContainerAnimatedStyle = useAnimatedStyle(() => ({
|
|
@@ -7748,7 +7929,7 @@ function ToggleAnimated({
|
|
|
7748
7929
|
});
|
|
7749
7930
|
}
|
|
7750
7931
|
|
|
7751
|
-
const _excluded$
|
|
7932
|
+
const _excluded$g = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7752
7933
|
const getLabelTypographyType = size => {
|
|
7753
7934
|
return size === 'medium' ? 'body-m' : 'body-l';
|
|
7754
7935
|
};
|
|
@@ -7764,7 +7945,7 @@ function Toggle(_ref) {
|
|
|
7764
7945
|
value = false,
|
|
7765
7946
|
onChange = () => {}
|
|
7766
7947
|
} = _ref,
|
|
7767
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7948
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
7768
7949
|
const theme = useKittTheme();
|
|
7769
7950
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
7770
7951
|
alignItems: "center"
|
|
@@ -7802,7 +7983,7 @@ function Toggle(_ref) {
|
|
|
7802
7983
|
}));
|
|
7803
7984
|
}
|
|
7804
7985
|
|
|
7805
|
-
const _excluded$
|
|
7986
|
+
const _excluded$f = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
7806
7987
|
function FullscreenModalBody(_ref) {
|
|
7807
7988
|
let {
|
|
7808
7989
|
children,
|
|
@@ -7810,7 +7991,7 @@ function FullscreenModalBody(_ref) {
|
|
|
7810
7991
|
style,
|
|
7811
7992
|
shouldHandleTopNotch
|
|
7812
7993
|
} = _ref,
|
|
7813
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7994
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
7814
7995
|
const {
|
|
7815
7996
|
bottom,
|
|
7816
7997
|
top
|
|
@@ -7838,14 +8019,14 @@ function FullscreenModalBody(_ref) {
|
|
|
7838
8019
|
}));
|
|
7839
8020
|
}
|
|
7840
8021
|
|
|
7841
|
-
const _excluded$
|
|
8022
|
+
const _excluded$e = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
7842
8023
|
function FullscreenModalFooter(_ref) {
|
|
7843
8024
|
let {
|
|
7844
8025
|
shouldHandleBottomNotch = true,
|
|
7845
8026
|
hasSeparator = true,
|
|
7846
8027
|
children
|
|
7847
8028
|
} = _ref,
|
|
7848
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8029
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
7849
8030
|
const {
|
|
7850
8031
|
bottom
|
|
7851
8032
|
} = useSafeAreaInsets();
|
|
@@ -7873,7 +8054,12 @@ function NativeOpacityAnimation({
|
|
|
7873
8054
|
duration,
|
|
7874
8055
|
easing
|
|
7875
8056
|
} = theme.kitt.fullscreenModal.animation.overlay;
|
|
7876
|
-
const
|
|
8057
|
+
const {
|
|
8058
|
+
x1,
|
|
8059
|
+
y1,
|
|
8060
|
+
x2,
|
|
8061
|
+
y2
|
|
8062
|
+
} = easing;
|
|
7877
8063
|
return {
|
|
7878
8064
|
opacity: withTiming(visible ? 1 : 0, {
|
|
7879
8065
|
duration,
|
|
@@ -7912,7 +8098,12 @@ function NativeSlideInAnimation({
|
|
|
7912
8098
|
duration,
|
|
7913
8099
|
easing
|
|
7914
8100
|
} = theme.kitt.fullscreenModal.animation.content;
|
|
7915
|
-
const
|
|
8101
|
+
const {
|
|
8102
|
+
x1,
|
|
8103
|
+
y1,
|
|
8104
|
+
x2,
|
|
8105
|
+
y2
|
|
8106
|
+
} = easing;
|
|
7916
8107
|
return {
|
|
7917
8108
|
transform: [{
|
|
7918
8109
|
translateY: withTiming(visible ? 0 : wHeight, {
|
|
@@ -7996,7 +8187,7 @@ function FullscreenModalAnimation({
|
|
|
7996
8187
|
});
|
|
7997
8188
|
}
|
|
7998
8189
|
|
|
7999
|
-
const _excluded$
|
|
8190
|
+
const _excluded$d = ["children", "visible", "onClose", "onExited"];
|
|
8000
8191
|
function FullscreenModalBehaviour(_ref) {
|
|
8001
8192
|
let {
|
|
8002
8193
|
children,
|
|
@@ -8004,7 +8195,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8004
8195
|
onClose,
|
|
8005
8196
|
onExited
|
|
8006
8197
|
} = _ref,
|
|
8007
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8198
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
8008
8199
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
8009
8200
|
useEffect(() => {
|
|
8010
8201
|
if (visible === true) {
|
|
@@ -8049,7 +8240,7 @@ function FullscreenModalContainer({
|
|
|
8049
8240
|
});
|
|
8050
8241
|
}
|
|
8051
8242
|
|
|
8052
|
-
const _excluded$
|
|
8243
|
+
const _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
8053
8244
|
function FullscreenModalHeader(_ref) {
|
|
8054
8245
|
let {
|
|
8055
8246
|
hasSeparator = true,
|
|
@@ -8060,7 +8251,7 @@ function FullscreenModalHeader(_ref) {
|
|
|
8060
8251
|
left,
|
|
8061
8252
|
shouldHandleTopNotch = true
|
|
8062
8253
|
} = _ref,
|
|
8063
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8254
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8064
8255
|
const {
|
|
8065
8256
|
top
|
|
8066
8257
|
} = useSafeAreaInsets();
|
|
@@ -8431,7 +8622,7 @@ const getButtonTypeAndVariant = iconColor => {
|
|
|
8431
8622
|
}
|
|
8432
8623
|
};
|
|
8433
8624
|
|
|
8434
|
-
const _excluded$
|
|
8625
|
+
const _excluded$b = ["color", "ariaLabel"];
|
|
8435
8626
|
/**
|
|
8436
8627
|
* @deprecated IconButton should only be used as a navigation button
|
|
8437
8628
|
* Other use cases should use a <Button> component with an icon
|
|
@@ -8441,7 +8632,7 @@ function IconButton(_ref) {
|
|
|
8441
8632
|
color = 'black',
|
|
8442
8633
|
ariaLabel
|
|
8443
8634
|
} = _ref,
|
|
8444
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8635
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8445
8636
|
const {
|
|
8446
8637
|
type: legacyColorToType,
|
|
8447
8638
|
variant: legacyColorToVariant
|
|
@@ -8573,12 +8764,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxs(Svg, _objectSpread(_object
|
|
|
8573
8764
|
width: 34,
|
|
8574
8765
|
height: 36,
|
|
8575
8766
|
viewBox: "0 0 34 36",
|
|
8576
|
-
fill: "
|
|
8767
|
+
fill: "currentColor",
|
|
8577
8768
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8578
8769
|
}, props), {}, {
|
|
8579
8770
|
children: [/*#__PURE__*/jsx(Path, {
|
|
8580
8771
|
d: "M17 .5C26.113.5 33.5 7.887 33.5 17c0 8.272-6.087 15.121-14.025 16.315-.05.008-.157.054-.337.211-.173.151-.351.345-.56.57a5.972 5.972 0 0 1-.662.637c-.232.181-.545.367-.916.367-.37 0-.684-.186-.916-.367a5.972 5.972 0 0 1-.662-.637c-.209-.224-.387-.419-.56-.57-.18-.157-.287-.203-.337-.21C6.586 32.12.5 25.271.5 17 .5 7.887 7.887.5 17 .5Z",
|
|
8581
|
-
fill: "#7B66FF",
|
|
8582
8772
|
stroke: "#fff"
|
|
8583
8773
|
}), /*#__PURE__*/jsx(Path, {
|
|
8584
8774
|
d: "M17 10a5.506 5.506 0 0 0-5.5 5.5c0 4.706 5 8.26 5.213 8.41a.5.5 0 0 0 .574 0c.213-.15 5.213-3.704 5.213-8.41A5.506 5.506 0 0 0 17 10Zm0 3.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z",
|
|
@@ -8603,6 +8793,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsx(Svg, _objectSpread(_objectSpre
|
|
|
8603
8793
|
})
|
|
8604
8794
|
}));
|
|
8605
8795
|
|
|
8796
|
+
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8797
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
8798
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8799
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8800
|
+
return MapMarkerVariantEnum;
|
|
8801
|
+
}({});
|
|
8802
|
+
|
|
8606
8803
|
const SCALE_DURATION = 300;
|
|
8607
8804
|
const TRANSLATE_Y_DURATION = 150;
|
|
8608
8805
|
const useNativeAnimation = ({
|
|
@@ -8659,19 +8856,13 @@ const getBackgroundColor = ({
|
|
|
8659
8856
|
isSelected,
|
|
8660
8857
|
variant
|
|
8661
8858
|
}) => {
|
|
8662
|
-
if (variant ===
|
|
8859
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
8663
8860
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
|
|
8664
8861
|
}
|
|
8665
8862
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
8666
8863
|
};
|
|
8667
8864
|
|
|
8668
|
-
const _excluded$
|
|
8669
|
-
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8670
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
8671
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8672
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8673
|
-
return MapMarkerVariantEnum;
|
|
8674
|
-
}({});
|
|
8865
|
+
const _excluded$a = ["onPress", "testID"];
|
|
8675
8866
|
function StaticMapMarker$1({
|
|
8676
8867
|
variant,
|
|
8677
8868
|
isHovered,
|
|
@@ -8734,7 +8925,7 @@ function MapMarker(_ref) {
|
|
|
8734
8925
|
onPress,
|
|
8735
8926
|
testID
|
|
8736
8927
|
} = _ref,
|
|
8737
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8928
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
8738
8929
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8739
8930
|
testID: testID,
|
|
8740
8931
|
onPress: onPress,
|
|
@@ -8881,6 +9072,7 @@ const createKittSpaces = theme => {
|
|
|
8881
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]));
|
|
8882
9073
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
|
|
8883
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;
|
|
8884
9076
|
const spaces = createKittSpaces(theme);
|
|
8885
9077
|
const appBreakpoints = (appTheme === null || appTheme === void 0 ? void 0 : appTheme.breakpoints) || {};
|
|
8886
9078
|
const extendedTheme = extendTheme({
|
|
@@ -9583,6 +9775,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9583
9775
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
9584
9776
|
}
|
|
9585
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
|
+
}
|
|
9586
9920
|
}
|
|
9587
9921
|
}),
|
|
9588
9922
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.colors
|
|
@@ -9658,6 +9992,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9658
9992
|
highlight: {
|
|
9659
9993
|
borderRadius: theme.highlight.borderRadius
|
|
9660
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
|
+
},
|
|
9661
10033
|
tag: {
|
|
9662
10034
|
borderRadius: theme.tag.borderRadius
|
|
9663
10035
|
},
|
|
@@ -11292,7 +11664,7 @@ NavigationBottomSheet.Header = NavigationBottomSheetHeader;
|
|
|
11292
11664
|
NavigationBottomSheet.Body = NavigationBottomSheetBody;
|
|
11293
11665
|
NavigationBottomSheet.Footer = NavigationBottomSheetFooter;
|
|
11294
11666
|
|
|
11295
|
-
const _excluded$
|
|
11667
|
+
const _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
11296
11668
|
function NavigationModalBehaviour(_ref) {
|
|
11297
11669
|
let {
|
|
11298
11670
|
children,
|
|
@@ -11303,7 +11675,7 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11303
11675
|
onExit,
|
|
11304
11676
|
onClose
|
|
11305
11677
|
} = _ref,
|
|
11306
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11678
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
11307
11679
|
const AnimationComponent = useBreakpointValue({
|
|
11308
11680
|
base: FullscreenModalAnimation,
|
|
11309
11681
|
small: CardModalAnimation
|
|
@@ -11889,7 +12261,7 @@ function SkeletonContent({
|
|
|
11889
12261
|
});
|
|
11890
12262
|
}
|
|
11891
12263
|
|
|
11892
|
-
const _excluded$
|
|
12264
|
+
const _excluded$8 = ["isLoading", "style"],
|
|
11893
12265
|
_excluded2$1 = ["size"],
|
|
11894
12266
|
_excluded3$1 = ["size"],
|
|
11895
12267
|
_excluded4$1 = ["size"];
|
|
@@ -11898,7 +12270,7 @@ function Skeleton(_ref) {
|
|
|
11898
12270
|
isLoading = false,
|
|
11899
12271
|
style
|
|
11900
12272
|
} = _ref,
|
|
11901
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12273
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
11902
12274
|
const [width, setWidth] = useState(0);
|
|
11903
12275
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11904
12276
|
overflow: "hidden",
|
|
@@ -12080,7 +12452,7 @@ function getShouldDisplay2x() {
|
|
|
12080
12452
|
return currentDevicePixelRatio > 1;
|
|
12081
12453
|
}
|
|
12082
12454
|
|
|
12083
|
-
const _excluded$
|
|
12455
|
+
const _excluded$7 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
|
|
12084
12456
|
const mapBoxMaxPictureWidth = 1280;
|
|
12085
12457
|
|
|
12086
12458
|
// Mapbox requestable width for image is between 1 - 1280px
|
|
@@ -12099,7 +12471,7 @@ function StaticMap(_ref) {
|
|
|
12099
12471
|
onLoaded,
|
|
12100
12472
|
onError
|
|
12101
12473
|
} = _ref,
|
|
12102
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12474
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
12103
12475
|
const [currentWidth, setCurrentWidth] = useState(getPictureWidth(width));
|
|
12104
12476
|
const [isLoading, setIsLoading] = useState(true);
|
|
12105
12477
|
const [hasError, setHasError] = useState(false);
|
|
@@ -12177,13 +12549,13 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
12177
12549
|
StaticMap.Error = StaticMapError;
|
|
12178
12550
|
StaticMap.Marker = StaticMapMarker;
|
|
12179
12551
|
|
|
12180
|
-
const _excluded$
|
|
12552
|
+
const _excluded$6 = ["direction", "wrap"];
|
|
12181
12553
|
function Flex(_ref) {
|
|
12182
12554
|
let {
|
|
12183
12555
|
direction,
|
|
12184
12556
|
wrap = 'wrap'
|
|
12185
12557
|
} = _ref,
|
|
12186
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12558
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
12187
12559
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12188
12560
|
flexDirection: direction,
|
|
12189
12561
|
flexWrap: wrap
|
|
@@ -12325,7 +12697,7 @@ function Story({
|
|
|
12325
12697
|
});
|
|
12326
12698
|
}
|
|
12327
12699
|
|
|
12328
|
-
const _excluded$
|
|
12700
|
+
const _excluded$5 = ["title", "children", "internalIsDemoSection"],
|
|
12329
12701
|
_excluded2 = ["title", "children"],
|
|
12330
12702
|
_excluded3 = ["title", "children"],
|
|
12331
12703
|
_excluded4 = ["children"];
|
|
@@ -12335,7 +12707,7 @@ function StorySection(_ref) {
|
|
|
12335
12707
|
children,
|
|
12336
12708
|
internalIsDemoSection
|
|
12337
12709
|
} = _ref,
|
|
12338
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12710
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
12339
12711
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
12340
12712
|
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
12341
12713
|
marginBottom: "kitt.8"
|
|
@@ -12491,128 +12863,132 @@ const StoryGrid = {
|
|
|
12491
12863
|
Col: StoryGridCol
|
|
12492
12864
|
};
|
|
12493
12865
|
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
return isActive ? kittTheme.colors.primary : kittTheme.colors.blackLight;
|
|
12510
|
-
}
|
|
12511
|
-
}
|
|
12512
|
-
}
|
|
12513
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
12514
|
-
const {
|
|
12515
|
-
kitt: kittTheme
|
|
12516
|
-
} = useKittTheme();
|
|
12517
|
-
switch (color) {
|
|
12518
|
-
case 'black':
|
|
12519
|
-
{
|
|
12520
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12521
|
-
}
|
|
12522
|
-
case 'white':
|
|
12523
|
-
{
|
|
12524
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
12525
|
-
}
|
|
12526
|
-
default:
|
|
12527
|
-
{
|
|
12528
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12529
|
-
}
|
|
12530
|
-
}
|
|
12531
|
-
}
|
|
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
|
+
};
|
|
12532
12881
|
function TabBarItem({
|
|
12533
12882
|
name,
|
|
12534
12883
|
icon,
|
|
12535
|
-
|
|
12884
|
+
variant = 'default',
|
|
12885
|
+
type = 'underline',
|
|
12886
|
+
color,
|
|
12536
12887
|
testID,
|
|
12888
|
+
disabled,
|
|
12537
12889
|
isActive = false,
|
|
12890
|
+
isFocusedInternal = false,
|
|
12891
|
+
isHoveredInternal = false,
|
|
12892
|
+
isPressedInternal = false,
|
|
12538
12893
|
onPress
|
|
12539
12894
|
}) {
|
|
12540
|
-
|
|
12541
|
-
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}`;
|
|
12542
12899
|
return /*#__PURE__*/jsx(Pressable, {
|
|
12900
|
+
disabled: disabled,
|
|
12543
12901
|
testID: testID,
|
|
12544
12902
|
onPress: onPress,
|
|
12545
|
-
children:
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
children:
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
,
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
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
|
+
}
|
|
12570
12939
|
});
|
|
12571
12940
|
}
|
|
12572
12941
|
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
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
|
+
}) {
|
|
12584
12952
|
const sx = useSx();
|
|
12585
|
-
const {
|
|
12586
|
-
kitt: kittTheme
|
|
12587
|
-
} = useKittTheme();
|
|
12588
12953
|
const tabItems = tabs.map((tab, index) => renderTabItem({
|
|
12589
12954
|
tab,
|
|
12590
12955
|
index,
|
|
12591
12956
|
isActive: activeTabIndex === index
|
|
12592
12957
|
}));
|
|
12593
|
-
|
|
12958
|
+
let styles = {
|
|
12594
12959
|
justifyContent: align,
|
|
12595
12960
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
12596
|
-
minWidth: '100%'
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
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';
|
|
12600
12974
|
return /*#__PURE__*/jsx(ScrollView, {
|
|
12601
12975
|
horizontal: true,
|
|
12602
12976
|
showsHorizontalScrollIndicator: false,
|
|
12603
12977
|
contentContainerStyle: scrollViewStyles,
|
|
12604
|
-
children: /*#__PURE__*/jsx(HStack,
|
|
12605
|
-
space: align === 'center' ? 'kitt.16' :
|
|
12606
|
-
}, props), {}, {
|
|
12978
|
+
children: /*#__PURE__*/jsx(HStack, {
|
|
12979
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
12607
12980
|
children: Children.map(tabItems, (child, index) => {
|
|
12608
12981
|
const tab = tabs[index];
|
|
12982
|
+
if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
|
|
12609
12983
|
return /*#__PURE__*/jsx(View, {
|
|
12610
12984
|
children: /*#__PURE__*/cloneElement(child, {
|
|
12611
12985
|
color,
|
|
12986
|
+
variant: definedVariant,
|
|
12987
|
+
type,
|
|
12612
12988
|
onPress: event => {
|
|
12613
12989
|
var _child$props$onPress, _child$props;
|
|
12614
12990
|
onChangeTab({
|
|
12615
|
-
tab
|
|
12991
|
+
tab,
|
|
12616
12992
|
index
|
|
12617
12993
|
});
|
|
12618
12994
|
(_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
|
|
@@ -12620,7 +12996,7 @@ function TabBar(_ref) {
|
|
|
12620
12996
|
})
|
|
12621
12997
|
}, tab.key);
|
|
12622
12998
|
})
|
|
12623
|
-
})
|
|
12999
|
+
})
|
|
12624
13000
|
});
|
|
12625
13001
|
}
|
|
12626
13002
|
TabBar.Item = TabBarItem;
|