@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
|
@@ -760,9 +760,19 @@ const card = {
|
|
|
760
760
|
};
|
|
761
761
|
|
|
762
762
|
const webAnimationContentDuration$2 = 400;
|
|
763
|
-
const webAnimationContentEasing$2 =
|
|
763
|
+
const webAnimationContentEasing$2 = {
|
|
764
|
+
x1: 0.77,
|
|
765
|
+
y1: 0,
|
|
766
|
+
x2: 0.175,
|
|
767
|
+
y2: 1
|
|
768
|
+
};
|
|
764
769
|
const webAnimationOverlayDuration$2 = 250;
|
|
765
|
-
const webAnimationOverlayEasing$2 =
|
|
770
|
+
const webAnimationOverlayEasing$2 = {
|
|
771
|
+
x1: 0.42,
|
|
772
|
+
y1: 0,
|
|
773
|
+
x2: 1,
|
|
774
|
+
y2: 1
|
|
775
|
+
};
|
|
766
776
|
const maxWidth = 540;
|
|
767
777
|
const overlayHorizontalPadding = 24;
|
|
768
778
|
const cardModal = {
|
|
@@ -854,9 +864,19 @@ const choices = {
|
|
|
854
864
|
};
|
|
855
865
|
|
|
856
866
|
const webAnimationContentDuration$1 = 400;
|
|
857
|
-
const webAnimationContentEasing$1 =
|
|
867
|
+
const webAnimationContentEasing$1 = {
|
|
868
|
+
x1: 0.77,
|
|
869
|
+
y1: 0,
|
|
870
|
+
x2: 0.175,
|
|
871
|
+
y2: 1
|
|
872
|
+
};
|
|
858
873
|
const webAnimationOverlayDuration$1 = 250;
|
|
859
|
-
const webAnimationOverlayEasing$1 =
|
|
874
|
+
const webAnimationOverlayEasing$1 = {
|
|
875
|
+
x1: 0.42,
|
|
876
|
+
y1: 0,
|
|
877
|
+
x2: 1,
|
|
878
|
+
y2: 1
|
|
879
|
+
};
|
|
860
880
|
const dialogModal = {
|
|
861
881
|
borderRadius: spacing * 2,
|
|
862
882
|
maxWidth: 540,
|
|
@@ -1788,9 +1808,19 @@ const forms = {
|
|
|
1788
1808
|
};
|
|
1789
1809
|
|
|
1790
1810
|
const webAnimationContentDuration = 600;
|
|
1791
|
-
const webAnimationContentEasing =
|
|
1811
|
+
const webAnimationContentEasing = {
|
|
1812
|
+
x1: 0.77,
|
|
1813
|
+
y1: 0,
|
|
1814
|
+
x2: 0.175,
|
|
1815
|
+
y2: 1
|
|
1816
|
+
};
|
|
1792
1817
|
const webAnimationOverlayDuration = 250;
|
|
1793
|
-
const webAnimationOverlayEasing =
|
|
1818
|
+
const webAnimationOverlayEasing = {
|
|
1819
|
+
x1: 0.42,
|
|
1820
|
+
y1: 0,
|
|
1821
|
+
x2: 1,
|
|
1822
|
+
y2: 1
|
|
1823
|
+
};
|
|
1794
1824
|
const fullscreenModal = {
|
|
1795
1825
|
header: {
|
|
1796
1826
|
height: 56
|
|
@@ -1883,43 +1913,8 @@ const highlight = {
|
|
|
1883
1913
|
}
|
|
1884
1914
|
};
|
|
1885
1915
|
|
|
1886
|
-
const getIconSizeFromFontSize = fontSize => {
|
|
1887
|
-
if (fontSize <= 14) return 16;
|
|
1888
|
-
if (fontSize <= 16) return 20;
|
|
1889
|
-
return 24;
|
|
1890
|
-
};
|
|
1891
|
-
const createTypographyIconSizeConfig = (baseAndSmallFontSize, mediumAndWideFontSize) => {
|
|
1892
|
-
const baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1893
|
-
const mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1894
|
-
return {
|
|
1895
|
-
baseAndSmall: {
|
|
1896
|
-
iconSize: baseAndSmallIconSize
|
|
1897
|
-
},
|
|
1898
|
-
mediumAndWide: {
|
|
1899
|
-
iconSize: mediumAndWideIconSize
|
|
1900
|
-
}
|
|
1901
|
-
};
|
|
1902
|
-
};
|
|
1903
1916
|
const icon = {
|
|
1904
|
-
defaultSize: 20
|
|
1905
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1906
|
-
typographySize: {
|
|
1907
|
-
// also known as xxlarge
|
|
1908
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1909
|
-
// also known as xlarge
|
|
1910
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1911
|
-
// also known as medium
|
|
1912
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1913
|
-
// also known as xsmall
|
|
1914
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1915
|
-
// also known as xxsmall
|
|
1916
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1917
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1918
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1919
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1920
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1921
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1922
|
-
}
|
|
1917
|
+
defaultSize: 20
|
|
1923
1918
|
};
|
|
1924
1919
|
|
|
1925
1920
|
const iconButton = {
|
|
@@ -1938,8 +1933,8 @@ const listItem = {
|
|
|
1938
1933
|
|
|
1939
1934
|
const mapMarker = {
|
|
1940
1935
|
home: {
|
|
1941
|
-
default:
|
|
1942
|
-
selected:
|
|
1936
|
+
default: deepPurpleColorPalette['grey.9'],
|
|
1937
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1943
1938
|
svg: {
|
|
1944
1939
|
height: 36
|
|
1945
1940
|
},
|
|
@@ -1949,8 +1944,8 @@ const mapMarker = {
|
|
|
1949
1944
|
}
|
|
1950
1945
|
},
|
|
1951
1946
|
meetingPoint: {
|
|
1952
|
-
default:
|
|
1953
|
-
selected:
|
|
1947
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
1948
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1954
1949
|
svg: {
|
|
1955
1950
|
width: 40,
|
|
1956
1951
|
height: 43
|
|
@@ -2346,6 +2341,183 @@ const skeleton = {
|
|
|
2346
2341
|
}
|
|
2347
2342
|
};
|
|
2348
2343
|
|
|
2344
|
+
const tabBar = {
|
|
2345
|
+
underline: {
|
|
2346
|
+
default: {
|
|
2347
|
+
active: {
|
|
2348
|
+
color: {
|
|
2349
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2350
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2351
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2352
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2353
|
+
},
|
|
2354
|
+
indicator: {
|
|
2355
|
+
backgroundColor: deepPurpleColorPalette['deepPurple.8']
|
|
2356
|
+
}
|
|
2357
|
+
},
|
|
2358
|
+
inactive: {
|
|
2359
|
+
color: {
|
|
2360
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2361
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2362
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2363
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2364
|
+
},
|
|
2365
|
+
indicator: {
|
|
2366
|
+
backgroundColor: undefined
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
disabled: {
|
|
2370
|
+
color: {
|
|
2371
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2372
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2373
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2374
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2375
|
+
},
|
|
2376
|
+
indicator: {
|
|
2377
|
+
backgroundColor: undefined
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
borderBottomColor: deepPurpleColorPalette['beige.3']
|
|
2381
|
+
},
|
|
2382
|
+
revert: {
|
|
2383
|
+
active: {
|
|
2384
|
+
color: {
|
|
2385
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2386
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2387
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2388
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2389
|
+
},
|
|
2390
|
+
indicator: {
|
|
2391
|
+
backgroundColor: deepPurpleColorPalette['grey.0']
|
|
2392
|
+
}
|
|
2393
|
+
},
|
|
2394
|
+
inactive: {
|
|
2395
|
+
color: {
|
|
2396
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2397
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2398
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2399
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2400
|
+
},
|
|
2401
|
+
indicator: {
|
|
2402
|
+
backgroundColor: undefined
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2405
|
+
disabled: {
|
|
2406
|
+
color: {
|
|
2407
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2408
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2409
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2410
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2411
|
+
},
|
|
2412
|
+
indicator: {
|
|
2413
|
+
backgroundColor: undefined
|
|
2414
|
+
}
|
|
2415
|
+
},
|
|
2416
|
+
borderBottomColor: deepPurpleColorPalette['white-alpha.20']
|
|
2417
|
+
}
|
|
2418
|
+
},
|
|
2419
|
+
solid: {
|
|
2420
|
+
default: {
|
|
2421
|
+
active: {
|
|
2422
|
+
color: {
|
|
2423
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2424
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2425
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2426
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2427
|
+
},
|
|
2428
|
+
backgroundColor: {
|
|
2429
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2430
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2431
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2432
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2433
|
+
},
|
|
2434
|
+
borderRadius: 4,
|
|
2435
|
+
indicator: {
|
|
2436
|
+
backgroundColor: undefined
|
|
2437
|
+
}
|
|
2438
|
+
},
|
|
2439
|
+
inactive: {
|
|
2440
|
+
color: {
|
|
2441
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2442
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2443
|
+
hovered: deepPurpleColorPalette['grey.5'],
|
|
2444
|
+
pressed: deepPurpleColorPalette['grey.5']
|
|
2445
|
+
},
|
|
2446
|
+
backgroundColor: {
|
|
2447
|
+
default: undefined,
|
|
2448
|
+
focused: undefined,
|
|
2449
|
+
hovered: deepPurpleColorPalette['beige.1'],
|
|
2450
|
+
pressed: deepPurpleColorPalette['beige.1']
|
|
2451
|
+
},
|
|
2452
|
+
borderRadius: 4,
|
|
2453
|
+
indicator: {
|
|
2454
|
+
backgroundColor: undefined
|
|
2455
|
+
}
|
|
2456
|
+
},
|
|
2457
|
+
disabled: {
|
|
2458
|
+
color: {
|
|
2459
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2460
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2461
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2462
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2463
|
+
},
|
|
2464
|
+
indicator: {
|
|
2465
|
+
backgroundColor: undefined
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
},
|
|
2469
|
+
revert: {
|
|
2470
|
+
active: {
|
|
2471
|
+
color: {
|
|
2472
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2473
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2474
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2475
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2476
|
+
},
|
|
2477
|
+
backgroundColor: {
|
|
2478
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2479
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2480
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2481
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2482
|
+
},
|
|
2483
|
+
borderRadius: 4,
|
|
2484
|
+
indicator: {
|
|
2485
|
+
backgroundColor: undefined
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
inactive: {
|
|
2489
|
+
color: {
|
|
2490
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2491
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2492
|
+
hovered: deepPurpleColorPalette['white-alpha.80'],
|
|
2493
|
+
pressed: deepPurpleColorPalette['white-alpha.80']
|
|
2494
|
+
},
|
|
2495
|
+
backgroundColor: {
|
|
2496
|
+
default: undefined,
|
|
2497
|
+
focused: undefined,
|
|
2498
|
+
hovered: deepPurpleColorPalette['white-alpha.10'],
|
|
2499
|
+
pressed: deepPurpleColorPalette['white-alpha.10']
|
|
2500
|
+
},
|
|
2501
|
+
borderRadius: 4,
|
|
2502
|
+
indicator: {
|
|
2503
|
+
backgroundColor: undefined
|
|
2504
|
+
}
|
|
2505
|
+
},
|
|
2506
|
+
disabled: {
|
|
2507
|
+
color: {
|
|
2508
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2509
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2510
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2511
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2512
|
+
},
|
|
2513
|
+
indicator: {
|
|
2514
|
+
backgroundColor: undefined
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2349
2521
|
const tag = {
|
|
2350
2522
|
borderRadius: 16,
|
|
2351
2523
|
icon: {
|
|
@@ -2485,6 +2657,7 @@ const theme = {
|
|
|
2485
2657
|
picker,
|
|
2486
2658
|
shadows,
|
|
2487
2659
|
skeleton,
|
|
2660
|
+
tabBar,
|
|
2488
2661
|
tag,
|
|
2489
2662
|
tooltip,
|
|
2490
2663
|
typography,
|
|
@@ -2897,6 +3070,13 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2897
3070
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2898
3071
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2899
3072
|
};
|
|
3073
|
+
const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
3074
|
+
// check if all values are not undefined
|
|
3075
|
+
const isAllValuesUndefined = Object.values(type).every(value => value === undefined);
|
|
3076
|
+
|
|
3077
|
+
// if every values are undefined and we hgave a typographyTypeInContext, we use the parent typography type (typographyTypeInContext)
|
|
3078
|
+
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3079
|
+
};
|
|
2900
3080
|
|
|
2901
3081
|
const TypographyFamilyContext = /*#__PURE__*/React.createContext(null);
|
|
2902
3082
|
const TypographyTypeContext = /*#__PURE__*/React.createContext(null);
|
|
@@ -2904,9 +3084,6 @@ const TypographyColorContext = /*#__PURE__*/React.createContext('black');
|
|
|
2904
3084
|
function useTypographyColor() {
|
|
2905
3085
|
return React.useContext(TypographyColorContext);
|
|
2906
3086
|
}
|
|
2907
|
-
function useTypographyAncestorType() {
|
|
2908
|
-
return React.useContext(TypographyTypeContext);
|
|
2909
|
-
}
|
|
2910
3087
|
const TypographyDefaultColorContext = /*#__PURE__*/React.createContext(undefined);
|
|
2911
3088
|
function useTypographyDefaultColor() {
|
|
2912
3089
|
return React.useContext(TypographyDefaultColorContext);
|
|
@@ -3029,9 +3206,11 @@ function Typography({
|
|
|
3029
3206
|
}) {
|
|
3030
3207
|
const sx = nativeBase.useSx();
|
|
3031
3208
|
const typographyFamilyInContext = React.useContext(TypographyFamilyContext);
|
|
3209
|
+
const typographyTypeInContext = React.useContext(TypographyTypeContext);
|
|
3032
3210
|
const defaultColor = useTypographyDefaultColor();
|
|
3033
3211
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3034
|
-
const
|
|
3212
|
+
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3213
|
+
const baseOrDefaultToBody = typographyType.base ?? 'body-m';
|
|
3035
3214
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3036
3215
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
3037
3216
|
...type,
|
|
@@ -3070,7 +3249,7 @@ function Typography({
|
|
|
3070
3249
|
const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(TypographyFamilyContext.Provider, {
|
|
3071
3250
|
value: typographyFamily,
|
|
3072
3251
|
children: /*#__PURE__*/jsxRuntime.jsx(TypographyTypeContext.Provider, {
|
|
3073
|
-
value:
|
|
3252
|
+
value: typographyType,
|
|
3074
3253
|
children: text
|
|
3075
3254
|
})
|
|
3076
3255
|
}) : text;
|
|
@@ -3171,30 +3350,11 @@ function Icon({
|
|
|
3171
3350
|
});
|
|
3172
3351
|
}
|
|
3173
3352
|
|
|
3174
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3175
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3176
|
-
}
|
|
3177
|
-
function createNativeBaseIconSize(type) {
|
|
3178
|
-
const typeWithMediumForced = {
|
|
3179
|
-
...type,
|
|
3180
|
-
medium: type.medium || type.small || type.base
|
|
3181
|
-
};
|
|
3182
|
-
const iconSizeForNativeBase = {};
|
|
3183
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(typeName => {
|
|
3184
|
-
const value = typeWithMediumForced[typeName];
|
|
3185
|
-
if (value) {
|
|
3186
|
-
iconSizeForNativeBase[typeName] = `kitt.icon.typographySize.${value}.${getIconSizeConfigKeyFromTypeName(typeName)}.iconSize`;
|
|
3187
|
-
}
|
|
3188
|
-
});
|
|
3189
|
-
return iconSizeForNativeBase;
|
|
3190
|
-
}
|
|
3191
3353
|
function TypographyIconSpecifiedColor({
|
|
3192
3354
|
color,
|
|
3193
3355
|
size,
|
|
3194
3356
|
...props
|
|
3195
3357
|
}) {
|
|
3196
|
-
const ancestorType = useTypographyAncestorType();
|
|
3197
|
-
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3198
3358
|
const colorValue = getTypographyColorValue(color);
|
|
3199
3359
|
const sx = nativeBase.useSx();
|
|
3200
3360
|
const {
|
|
@@ -3204,7 +3364,7 @@ function TypographyIconSpecifiedColor({
|
|
|
3204
3364
|
});
|
|
3205
3365
|
return /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
3206
3366
|
...props,
|
|
3207
|
-
size:
|
|
3367
|
+
size: size,
|
|
3208
3368
|
color: colorStyleValue
|
|
3209
3369
|
});
|
|
3210
3370
|
}
|
|
@@ -4035,7 +4195,12 @@ function NativeOpacityAnimation$2({
|
|
|
4035
4195
|
duration,
|
|
4036
4196
|
easing
|
|
4037
4197
|
} = theme.kitt.cardModal.animation.overlay;
|
|
4038
|
-
const
|
|
4198
|
+
const {
|
|
4199
|
+
x1,
|
|
4200
|
+
y1,
|
|
4201
|
+
x2,
|
|
4202
|
+
y2
|
|
4203
|
+
} = easing;
|
|
4039
4204
|
return {
|
|
4040
4205
|
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4041
4206
|
duration,
|
|
@@ -4073,7 +4238,12 @@ function NativeRotationAnimation$1({
|
|
|
4073
4238
|
duration,
|
|
4074
4239
|
easing
|
|
4075
4240
|
} = theme.kitt.cardModal.animation.content;
|
|
4076
|
-
const
|
|
4241
|
+
const {
|
|
4242
|
+
x1,
|
|
4243
|
+
y1,
|
|
4244
|
+
x2,
|
|
4245
|
+
y2
|
|
4246
|
+
} = easing;
|
|
4077
4247
|
rotation.value = Animated.withTiming(visible ? 0 : 5, {
|
|
4078
4248
|
duration,
|
|
4079
4249
|
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
@@ -4646,7 +4816,12 @@ function NativeOpacityAnimation$1({
|
|
|
4646
4816
|
duration,
|
|
4647
4817
|
easing
|
|
4648
4818
|
} = theme.kitt.dialogModal.animation.overlay;
|
|
4649
|
-
const
|
|
4819
|
+
const {
|
|
4820
|
+
x1,
|
|
4821
|
+
y1,
|
|
4822
|
+
x2,
|
|
4823
|
+
y2
|
|
4824
|
+
} = easing;
|
|
4650
4825
|
return {
|
|
4651
4826
|
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4652
4827
|
duration,
|
|
@@ -4684,7 +4859,12 @@ function NativeRotationAnimation({
|
|
|
4684
4859
|
duration,
|
|
4685
4860
|
easing
|
|
4686
4861
|
} = theme.kitt.dialogModal.animation.content;
|
|
4687
|
-
const
|
|
4862
|
+
const {
|
|
4863
|
+
x1,
|
|
4864
|
+
y1,
|
|
4865
|
+
x2,
|
|
4866
|
+
y2
|
|
4867
|
+
} = easing;
|
|
4688
4868
|
rotation.value = Animated.withTiming(visible ? 0 : 5, {
|
|
4689
4869
|
duration,
|
|
4690
4870
|
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
@@ -6306,7 +6486,7 @@ function DocumentPicker({
|
|
|
6306
6486
|
...documentPickerOptions,
|
|
6307
6487
|
multiple: false
|
|
6308
6488
|
});
|
|
6309
|
-
if (!result.canceled && result.assets[0]
|
|
6489
|
+
if (!result.canceled && result.assets[0]?.file) {
|
|
6310
6490
|
onDocumentUpload(result.assets[0].file);
|
|
6311
6491
|
}
|
|
6312
6492
|
},
|
|
@@ -6333,7 +6513,7 @@ function ImagePicker({
|
|
|
6333
6513
|
...imagePickerOptions,
|
|
6334
6514
|
allowsMultipleSelection: false
|
|
6335
6515
|
});
|
|
6336
|
-
if (!result.canceled) {
|
|
6516
|
+
if (!result.canceled && result.assets[0]) {
|
|
6337
6517
|
onImageSelected(result.assets[0]);
|
|
6338
6518
|
}
|
|
6339
6519
|
},
|
|
@@ -6782,17 +6962,17 @@ function GoogleMapsAutocompleteProvider({
|
|
|
6782
6962
|
dispatch({
|
|
6783
6963
|
type: 'search-error'
|
|
6784
6964
|
});
|
|
6785
|
-
return;
|
|
6786
6965
|
}
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6966
|
+
if (results) {
|
|
6967
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
6968
|
+
searchResultsCache.current[value] = results;
|
|
6969
|
+
dispatch({
|
|
6970
|
+
type: 'search-success',
|
|
6971
|
+
payload: {
|
|
6972
|
+
results
|
|
6973
|
+
}
|
|
6974
|
+
});
|
|
6975
|
+
}
|
|
6796
6976
|
} catch (error) {
|
|
6797
6977
|
dispatch({
|
|
6798
6978
|
type: 'search-error'
|
|
@@ -7870,7 +8050,12 @@ function NativeOpacityAnimation({
|
|
|
7870
8050
|
duration,
|
|
7871
8051
|
easing
|
|
7872
8052
|
} = theme.kitt.fullscreenModal.animation.overlay;
|
|
7873
|
-
const
|
|
8053
|
+
const {
|
|
8054
|
+
x1,
|
|
8055
|
+
y1,
|
|
8056
|
+
x2,
|
|
8057
|
+
y2
|
|
8058
|
+
} = easing;
|
|
7874
8059
|
return {
|
|
7875
8060
|
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
7876
8061
|
duration,
|
|
@@ -7909,7 +8094,12 @@ function NativeSlideInAnimation({
|
|
|
7909
8094
|
duration,
|
|
7910
8095
|
easing
|
|
7911
8096
|
} = theme.kitt.fullscreenModal.animation.content;
|
|
7912
|
-
const
|
|
8097
|
+
const {
|
|
8098
|
+
x1,
|
|
8099
|
+
y1,
|
|
8100
|
+
x2,
|
|
8101
|
+
y2
|
|
8102
|
+
} = easing;
|
|
7913
8103
|
return {
|
|
7914
8104
|
transform: [{
|
|
7915
8105
|
translateY: Animated.withTiming(visible ? 0 : wHeight, {
|
|
@@ -8567,12 +8757,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
|
8567
8757
|
width: 34,
|
|
8568
8758
|
height: 36,
|
|
8569
8759
|
viewBox: "0 0 34 36",
|
|
8570
|
-
fill: "
|
|
8760
|
+
fill: "currentColor",
|
|
8571
8761
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8572
8762
|
...props,
|
|
8573
8763
|
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
8574
8764
|
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",
|
|
8575
|
-
fill: "#7B66FF",
|
|
8576
8765
|
stroke: "#fff"
|
|
8577
8766
|
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
8578
8767
|
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",
|
|
@@ -8597,6 +8786,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
|
8597
8786
|
})
|
|
8598
8787
|
});
|
|
8599
8788
|
|
|
8789
|
+
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8790
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
8791
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8792
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8793
|
+
return MapMarkerVariantEnum;
|
|
8794
|
+
}({});
|
|
8795
|
+
|
|
8600
8796
|
const SCALE_DURATION = 300;
|
|
8601
8797
|
const TRANSLATE_Y_DURATION = 150;
|
|
8602
8798
|
const useNativeAnimation = ({
|
|
@@ -8653,18 +8849,12 @@ const getBackgroundColor = ({
|
|
|
8653
8849
|
isSelected,
|
|
8654
8850
|
variant
|
|
8655
8851
|
}) => {
|
|
8656
|
-
if (variant ===
|
|
8852
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
8657
8853
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
|
|
8658
8854
|
}
|
|
8659
8855
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
8660
8856
|
};
|
|
8661
8857
|
|
|
8662
|
-
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8663
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
8664
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8665
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8666
|
-
return MapMarkerVariantEnum;
|
|
8667
|
-
}({});
|
|
8668
8858
|
function StaticMapMarker$1({
|
|
8669
8859
|
variant,
|
|
8670
8860
|
isHovered,
|
|
@@ -9577,6 +9767,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9577
9767
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
9578
9768
|
}
|
|
9579
9769
|
}
|
|
9770
|
+
},
|
|
9771
|
+
tabBar: {
|
|
9772
|
+
underline: {
|
|
9773
|
+
default: {
|
|
9774
|
+
active: {
|
|
9775
|
+
color: {
|
|
9776
|
+
default: theme.tabBar.underline.default.active.color.default,
|
|
9777
|
+
focused: theme.tabBar.underline.default.active.color.focused,
|
|
9778
|
+
hovered: theme.tabBar.underline.default.active.color.hovered,
|
|
9779
|
+
pressed: theme.tabBar.underline.default.active.color.pressed
|
|
9780
|
+
},
|
|
9781
|
+
indicator: {
|
|
9782
|
+
backgroundColor: theme.tabBar.underline.default.active.indicator.backgroundColor
|
|
9783
|
+
}
|
|
9784
|
+
},
|
|
9785
|
+
inactive: {
|
|
9786
|
+
color: {
|
|
9787
|
+
default: theme.tabBar.underline.default.inactive.color.default,
|
|
9788
|
+
focused: theme.tabBar.underline.default.inactive.color.focused,
|
|
9789
|
+
hovered: theme.tabBar.underline.default.inactive.color.hovered,
|
|
9790
|
+
pressed: theme.tabBar.underline.default.inactive.color.pressed
|
|
9791
|
+
}
|
|
9792
|
+
},
|
|
9793
|
+
disabled: {
|
|
9794
|
+
color: {
|
|
9795
|
+
default: theme.tabBar.underline.default.disabled.color.default,
|
|
9796
|
+
focused: theme.tabBar.underline.default.disabled.color.focused,
|
|
9797
|
+
hovered: theme.tabBar.underline.default.disabled.color.hovered,
|
|
9798
|
+
pressed: theme.tabBar.underline.default.disabled.color.pressed
|
|
9799
|
+
}
|
|
9800
|
+
},
|
|
9801
|
+
borderBottomColor: theme.tabBar.underline.default.borderBottomColor
|
|
9802
|
+
},
|
|
9803
|
+
revert: {
|
|
9804
|
+
active: {
|
|
9805
|
+
color: {
|
|
9806
|
+
default: theme.tabBar.underline.revert.active.color.default,
|
|
9807
|
+
focused: theme.tabBar.underline.revert.active.color.focused,
|
|
9808
|
+
hovered: theme.tabBar.underline.revert.active.color.hovered,
|
|
9809
|
+
pressed: theme.tabBar.underline.revert.active.color.pressed
|
|
9810
|
+
},
|
|
9811
|
+
indicator: {
|
|
9812
|
+
backgroundColor: theme.tabBar.underline.revert.active.indicator.backgroundColor
|
|
9813
|
+
}
|
|
9814
|
+
},
|
|
9815
|
+
inactive: {
|
|
9816
|
+
color: {
|
|
9817
|
+
default: theme.tabBar.underline.revert.inactive.color.default,
|
|
9818
|
+
focused: theme.tabBar.underline.revert.inactive.color.focused,
|
|
9819
|
+
hovered: theme.tabBar.underline.revert.inactive.color.hovered,
|
|
9820
|
+
pressed: theme.tabBar.underline.revert.inactive.color.pressed
|
|
9821
|
+
}
|
|
9822
|
+
},
|
|
9823
|
+
disabled: {
|
|
9824
|
+
color: {
|
|
9825
|
+
default: theme.tabBar.underline.revert.disabled.color.default,
|
|
9826
|
+
focused: theme.tabBar.underline.revert.disabled.color.focused,
|
|
9827
|
+
hovered: theme.tabBar.underline.revert.disabled.color.hovered,
|
|
9828
|
+
pressed: theme.tabBar.underline.revert.disabled.color.pressed
|
|
9829
|
+
}
|
|
9830
|
+
},
|
|
9831
|
+
borderBottomColor: theme.tabBar.underline.revert.borderBottomColor
|
|
9832
|
+
}
|
|
9833
|
+
},
|
|
9834
|
+
solid: {
|
|
9835
|
+
default: {
|
|
9836
|
+
active: {
|
|
9837
|
+
color: {
|
|
9838
|
+
default: theme.tabBar.solid.default.active.color.default,
|
|
9839
|
+
focused: theme.tabBar.solid.default.active.color.focused,
|
|
9840
|
+
hovered: theme.tabBar.solid.default.active.color.hovered,
|
|
9841
|
+
pressed: theme.tabBar.solid.default.active.color.pressed
|
|
9842
|
+
},
|
|
9843
|
+
backgroundColor: {
|
|
9844
|
+
default: theme.tabBar.solid.default.active.backgroundColor?.default,
|
|
9845
|
+
focused: theme.tabBar.solid.default.active.backgroundColor?.focused,
|
|
9846
|
+
hovered: theme.tabBar.solid.default.active.backgroundColor?.hovered,
|
|
9847
|
+
pressed: theme.tabBar.solid.default.active.backgroundColor?.pressed
|
|
9848
|
+
}
|
|
9849
|
+
},
|
|
9850
|
+
inactive: {
|
|
9851
|
+
color: {
|
|
9852
|
+
default: theme.tabBar.solid.default.inactive.color.default,
|
|
9853
|
+
focused: theme.tabBar.solid.default.inactive.color.focused,
|
|
9854
|
+
hovered: theme.tabBar.solid.default.inactive.color.hovered,
|
|
9855
|
+
pressed: theme.tabBar.solid.default.inactive.color.pressed
|
|
9856
|
+
},
|
|
9857
|
+
backgroundColor: {
|
|
9858
|
+
default: theme.tabBar.solid.default.inactive.backgroundColor?.default,
|
|
9859
|
+
focused: theme.tabBar.solid.default.inactive.backgroundColor?.focused,
|
|
9860
|
+
hovered: theme.tabBar.solid.default.inactive.backgroundColor?.hovered,
|
|
9861
|
+
pressed: theme.tabBar.solid.default.inactive.backgroundColor?.pressed
|
|
9862
|
+
}
|
|
9863
|
+
},
|
|
9864
|
+
disabled: {
|
|
9865
|
+
color: {
|
|
9866
|
+
default: theme.tabBar.solid.default.disabled.color.default,
|
|
9867
|
+
focused: theme.tabBar.solid.default.disabled.color.focused,
|
|
9868
|
+
hovered: theme.tabBar.solid.default.disabled.color.hovered,
|
|
9869
|
+
pressed: theme.tabBar.solid.default.disabled.color.pressed
|
|
9870
|
+
}
|
|
9871
|
+
}
|
|
9872
|
+
},
|
|
9873
|
+
revert: {
|
|
9874
|
+
active: {
|
|
9875
|
+
color: {
|
|
9876
|
+
default: theme.tabBar.solid.revert.active.color.default,
|
|
9877
|
+
focused: theme.tabBar.solid.revert.active.color.focused,
|
|
9878
|
+
hovered: theme.tabBar.solid.revert.active.color.hovered,
|
|
9879
|
+
pressed: theme.tabBar.solid.revert.active.color.pressed
|
|
9880
|
+
},
|
|
9881
|
+
backgroundColor: {
|
|
9882
|
+
default: theme.tabBar.solid.revert.active.backgroundColor?.default,
|
|
9883
|
+
focused: theme.tabBar.solid.revert.active.backgroundColor?.focused,
|
|
9884
|
+
hovered: theme.tabBar.solid.revert.active.backgroundColor?.hovered,
|
|
9885
|
+
pressed: theme.tabBar.solid.revert.active.backgroundColor?.pressed
|
|
9886
|
+
}
|
|
9887
|
+
},
|
|
9888
|
+
inactive: {
|
|
9889
|
+
color: {
|
|
9890
|
+
default: theme.tabBar.solid.revert.inactive.color.default,
|
|
9891
|
+
focused: theme.tabBar.solid.revert.inactive.color.focused,
|
|
9892
|
+
hovered: theme.tabBar.solid.revert.inactive.color.hovered,
|
|
9893
|
+
pressed: theme.tabBar.solid.revert.inactive.color.pressed
|
|
9894
|
+
},
|
|
9895
|
+
backgroundColor: {
|
|
9896
|
+
default: theme.tabBar.solid.revert.inactive.backgroundColor?.default,
|
|
9897
|
+
focused: theme.tabBar.solid.revert.inactive.backgroundColor?.focused,
|
|
9898
|
+
hovered: theme.tabBar.solid.revert.inactive.backgroundColor?.hovered,
|
|
9899
|
+
pressed: theme.tabBar.solid.revert.inactive.backgroundColor?.pressed
|
|
9900
|
+
}
|
|
9901
|
+
},
|
|
9902
|
+
disabled: {
|
|
9903
|
+
color: {
|
|
9904
|
+
default: theme.tabBar.solid.revert.disabled.color.default,
|
|
9905
|
+
focused: theme.tabBar.solid.revert.disabled.color.focused,
|
|
9906
|
+
hovered: theme.tabBar.solid.revert.disabled.color.hovered,
|
|
9907
|
+
pressed: theme.tabBar.solid.revert.disabled.color.pressed
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9910
|
+
}
|
|
9911
|
+
}
|
|
9580
9912
|
}
|
|
9581
9913
|
},
|
|
9582
9914
|
app: appTheme?.colors
|
|
@@ -9653,6 +9985,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9653
9985
|
highlight: {
|
|
9654
9986
|
borderRadius: theme.highlight.borderRadius
|
|
9655
9987
|
},
|
|
9988
|
+
tabBar: {
|
|
9989
|
+
underline: {
|
|
9990
|
+
default: {
|
|
9991
|
+
active: {
|
|
9992
|
+
borderRadius: theme.tabBar.underline.default.active.borderRadius
|
|
9993
|
+
},
|
|
9994
|
+
inactive: {
|
|
9995
|
+
borderRadius: theme.tabBar.underline.default.inactive.borderRadius
|
|
9996
|
+
}
|
|
9997
|
+
},
|
|
9998
|
+
revert: {
|
|
9999
|
+
active: {
|
|
10000
|
+
borderRadius: theme.tabBar.underline.revert.active.borderRadius
|
|
10001
|
+
},
|
|
10002
|
+
inactive: {
|
|
10003
|
+
borderRadius: theme.tabBar.underline.revert.inactive.borderRadius
|
|
10004
|
+
}
|
|
10005
|
+
}
|
|
10006
|
+
},
|
|
10007
|
+
solid: {
|
|
10008
|
+
default: {
|
|
10009
|
+
active: {
|
|
10010
|
+
borderRadius: theme.tabBar.solid.default.active.borderRadius
|
|
10011
|
+
},
|
|
10012
|
+
inactive: {
|
|
10013
|
+
borderRadius: theme.tabBar.solid.default.inactive.borderRadius
|
|
10014
|
+
}
|
|
10015
|
+
},
|
|
10016
|
+
revert: {
|
|
10017
|
+
active: {
|
|
10018
|
+
borderRadius: theme.tabBar.solid.revert.active.borderRadius
|
|
10019
|
+
},
|
|
10020
|
+
inactive: {
|
|
10021
|
+
borderRadius: theme.tabBar.solid.revert.inactive.borderRadius
|
|
10022
|
+
}
|
|
10023
|
+
}
|
|
10024
|
+
}
|
|
10025
|
+
},
|
|
9656
10026
|
tag: {
|
|
9657
10027
|
borderRadius: theme.tag.borderRadius
|
|
9658
10028
|
},
|
|
@@ -12488,125 +12858,132 @@ const StoryGrid = {
|
|
|
12488
12858
|
Col: StoryGridCol
|
|
12489
12859
|
};
|
|
12490
12860
|
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
return isActive ? kittTheme.colors.primary : kittTheme.colors.blackLight;
|
|
12507
|
-
}
|
|
12508
|
-
}
|
|
12509
|
-
}
|
|
12510
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
12511
|
-
const {
|
|
12512
|
-
kitt: kittTheme
|
|
12513
|
-
} = useKittTheme();
|
|
12514
|
-
switch (color) {
|
|
12515
|
-
case 'black':
|
|
12516
|
-
{
|
|
12517
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12518
|
-
}
|
|
12519
|
-
case 'white':
|
|
12520
|
-
{
|
|
12521
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
12522
|
-
}
|
|
12523
|
-
default:
|
|
12524
|
-
{
|
|
12525
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12526
|
-
}
|
|
12527
|
-
}
|
|
12528
|
-
}
|
|
12861
|
+
const getVariantFromColor = color => {
|
|
12862
|
+
if (color === 'white') return 'revert';
|
|
12863
|
+
return 'default';
|
|
12864
|
+
};
|
|
12865
|
+
const getTabBarItemActiveState = (isActive, disabled) => {
|
|
12866
|
+
if (disabled) return 'disabled';
|
|
12867
|
+
if (isActive) return 'active';
|
|
12868
|
+
return 'inactive';
|
|
12869
|
+
};
|
|
12870
|
+
const getTabBarItemState = (isHovered, isPressed, isFocused) => {
|
|
12871
|
+
if (isHovered) return 'hovered';
|
|
12872
|
+
if (isPressed) return 'pressed';
|
|
12873
|
+
if (isFocused) return 'focused';
|
|
12874
|
+
return 'default';
|
|
12875
|
+
};
|
|
12529
12876
|
function TabBarItem({
|
|
12530
12877
|
name,
|
|
12531
12878
|
icon,
|
|
12532
|
-
|
|
12879
|
+
variant = 'default',
|
|
12880
|
+
type = 'underline',
|
|
12881
|
+
color,
|
|
12533
12882
|
testID,
|
|
12883
|
+
disabled,
|
|
12534
12884
|
isActive = false,
|
|
12885
|
+
isFocusedInternal = false,
|
|
12886
|
+
isHoveredInternal = false,
|
|
12887
|
+
isPressedInternal = false,
|
|
12535
12888
|
onPress
|
|
12536
12889
|
}) {
|
|
12537
|
-
|
|
12538
|
-
const
|
|
12890
|
+
// Keep backward compatibility with color property
|
|
12891
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12892
|
+
const activeState = getTabBarItemActiveState(isActive, disabled);
|
|
12893
|
+
const baseTheme = `kitt.tabBar.${type}.${definedVariant}.${activeState}`;
|
|
12539
12894
|
return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
|
|
12895
|
+
disabled: disabled,
|
|
12540
12896
|
testID: testID,
|
|
12541
12897
|
onPress: onPress,
|
|
12542
|
-
children:
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
children:
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
,
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12898
|
+
children: ({
|
|
12899
|
+
isHovered,
|
|
12900
|
+
isPressed,
|
|
12901
|
+
isFocused
|
|
12902
|
+
}) => {
|
|
12903
|
+
const state = getTabBarItemState(isHovered || isHoveredInternal, isPressed || isPressedInternal, isFocused || isFocusedInternal);
|
|
12904
|
+
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
12905
|
+
alignItems: "center",
|
|
12906
|
+
position: "relative",
|
|
12907
|
+
paddingY: "kitt.2",
|
|
12908
|
+
paddingRight: "kitt.2",
|
|
12909
|
+
paddingLeft: icon ? undefined : 'kitt.2',
|
|
12910
|
+
backgroundColor: `${baseTheme}.backgroundColor.${state}`,
|
|
12911
|
+
borderRadius: `${baseTheme}.borderRadius`,
|
|
12912
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12913
|
+
marginRight: "kitt.2",
|
|
12914
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
12915
|
+
color: `${baseTheme}.color.${state}`,
|
|
12916
|
+
icon: icon
|
|
12917
|
+
})
|
|
12918
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
12919
|
+
base: "label-large",
|
|
12920
|
+
numberOfLines: 1,
|
|
12921
|
+
color: `${baseTheme}.color.${state}`,
|
|
12922
|
+
children: name
|
|
12923
|
+
}), type !== 'solid' ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12924
|
+
backgroundColor: `${baseTheme}.indicator.backgroundColor`,
|
|
12925
|
+
position: "absolute",
|
|
12926
|
+
bottom: -1 // in order to be over tab bar's border bottom
|
|
12927
|
+
,
|
|
12928
|
+
left: 0,
|
|
12929
|
+
right: 0,
|
|
12930
|
+
height: 2
|
|
12931
|
+
}) : null]
|
|
12932
|
+
});
|
|
12933
|
+
}
|
|
12567
12934
|
});
|
|
12568
12935
|
}
|
|
12569
12936
|
|
|
12570
12937
|
function TabBar({
|
|
12571
12938
|
tabs,
|
|
12572
|
-
|
|
12939
|
+
variant = 'default',
|
|
12940
|
+
type = 'underline',
|
|
12573
12941
|
align = 'left',
|
|
12942
|
+
color,
|
|
12574
12943
|
activeTabIndex = 0,
|
|
12575
12944
|
renderTabItem,
|
|
12576
|
-
onChangeTab
|
|
12577
|
-
...props
|
|
12945
|
+
onChangeTab
|
|
12578
12946
|
}) {
|
|
12579
12947
|
const sx = nativeBase.useSx();
|
|
12580
|
-
const {
|
|
12581
|
-
kitt: kittTheme
|
|
12582
|
-
} = useKittTheme();
|
|
12583
12948
|
const tabItems = tabs.map((tab, index) => renderTabItem({
|
|
12584
12949
|
tab,
|
|
12585
12950
|
index,
|
|
12586
12951
|
isActive: activeTabIndex === index
|
|
12587
12952
|
}));
|
|
12588
|
-
|
|
12953
|
+
let styles = {
|
|
12589
12954
|
justifyContent: align,
|
|
12590
12955
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
12591
|
-
minWidth: '100%'
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12956
|
+
minWidth: '100%'
|
|
12957
|
+
};
|
|
12958
|
+
|
|
12959
|
+
// Keep backward compatibility with color property
|
|
12960
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12961
|
+
if (type !== 'solid') {
|
|
12962
|
+
styles = {
|
|
12963
|
+
...styles,
|
|
12964
|
+
borderBottomWidth: 1,
|
|
12965
|
+
borderBottomColor: `kitt.tabBar.${type}.${definedVariant}.borderBottomColor`
|
|
12966
|
+
};
|
|
12967
|
+
}
|
|
12968
|
+
const scrollViewStyles = sx(styles);
|
|
12969
|
+
const space = type === 'solid' ? 'kitt.2' : 'kitt.4';
|
|
12595
12970
|
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
12596
12971
|
horizontal: true,
|
|
12597
12972
|
showsHorizontalScrollIndicator: false,
|
|
12598
12973
|
contentContainerStyle: scrollViewStyles,
|
|
12599
12974
|
children: /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
12600
|
-
space: align === 'center' ? 'kitt.16' :
|
|
12601
|
-
...props,
|
|
12975
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
12602
12976
|
children: React.Children.map(tabItems, (child, index) => {
|
|
12603
12977
|
const tab = tabs[index];
|
|
12978
|
+
if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
|
|
12604
12979
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12605
12980
|
children: /*#__PURE__*/React.cloneElement(child, {
|
|
12606
12981
|
color,
|
|
12982
|
+
variant: definedVariant,
|
|
12983
|
+
type,
|
|
12607
12984
|
onPress: event => {
|
|
12608
12985
|
onChangeTab({
|
|
12609
|
-
tab
|
|
12986
|
+
tab,
|
|
12610
12987
|
index
|
|
12611
12988
|
});
|
|
12612
12989
|
child.props.onPress?.(event);
|