@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
package/dist/index.es.js
CHANGED
|
@@ -755,9 +755,19 @@ var card = {
|
|
|
755
755
|
};
|
|
756
756
|
|
|
757
757
|
var webAnimationContentDuration$2 = 400;
|
|
758
|
-
var webAnimationContentEasing$2 =
|
|
758
|
+
var webAnimationContentEasing$2 = {
|
|
759
|
+
x1: 0.77,
|
|
760
|
+
y1: 0,
|
|
761
|
+
x2: 0.175,
|
|
762
|
+
y2: 1
|
|
763
|
+
};
|
|
759
764
|
var webAnimationOverlayDuration$2 = 250;
|
|
760
|
-
var webAnimationOverlayEasing$2 =
|
|
765
|
+
var webAnimationOverlayEasing$2 = {
|
|
766
|
+
x1: 0.42,
|
|
767
|
+
y1: 0,
|
|
768
|
+
x2: 1,
|
|
769
|
+
y2: 1
|
|
770
|
+
};
|
|
761
771
|
var maxWidth = 540;
|
|
762
772
|
var overlayHorizontalPadding = 24;
|
|
763
773
|
var cardModal = {
|
|
@@ -849,9 +859,19 @@ var choices = {
|
|
|
849
859
|
};
|
|
850
860
|
|
|
851
861
|
var webAnimationContentDuration$1 = 400;
|
|
852
|
-
var webAnimationContentEasing$1 =
|
|
862
|
+
var webAnimationContentEasing$1 = {
|
|
863
|
+
x1: 0.77,
|
|
864
|
+
y1: 0,
|
|
865
|
+
x2: 0.175,
|
|
866
|
+
y2: 1
|
|
867
|
+
};
|
|
853
868
|
var webAnimationOverlayDuration$1 = 250;
|
|
854
|
-
var webAnimationOverlayEasing$1 =
|
|
869
|
+
var webAnimationOverlayEasing$1 = {
|
|
870
|
+
x1: 0.42,
|
|
871
|
+
y1: 0,
|
|
872
|
+
x2: 1,
|
|
873
|
+
y2: 1
|
|
874
|
+
};
|
|
855
875
|
var dialogModal = {
|
|
856
876
|
borderRadius: spacing * 2,
|
|
857
877
|
maxWidth: 540,
|
|
@@ -1783,9 +1803,19 @@ var forms = {
|
|
|
1783
1803
|
};
|
|
1784
1804
|
|
|
1785
1805
|
var webAnimationContentDuration = 600;
|
|
1786
|
-
var webAnimationContentEasing =
|
|
1806
|
+
var webAnimationContentEasing = {
|
|
1807
|
+
x1: 0.77,
|
|
1808
|
+
y1: 0,
|
|
1809
|
+
x2: 0.175,
|
|
1810
|
+
y2: 1
|
|
1811
|
+
};
|
|
1787
1812
|
var webAnimationOverlayDuration = 250;
|
|
1788
|
-
var webAnimationOverlayEasing =
|
|
1813
|
+
var webAnimationOverlayEasing = {
|
|
1814
|
+
x1: 0.42,
|
|
1815
|
+
y1: 0,
|
|
1816
|
+
x2: 1,
|
|
1817
|
+
y2: 1
|
|
1818
|
+
};
|
|
1789
1819
|
var fullscreenModal = {
|
|
1790
1820
|
header: {
|
|
1791
1821
|
height: 56
|
|
@@ -1878,43 +1908,8 @@ var highlight = {
|
|
|
1878
1908
|
}
|
|
1879
1909
|
};
|
|
1880
1910
|
|
|
1881
|
-
var getIconSizeFromFontSize = function (fontSize) {
|
|
1882
|
-
if (fontSize <= 14) return 16;
|
|
1883
|
-
if (fontSize <= 16) return 20;
|
|
1884
|
-
return 24;
|
|
1885
|
-
};
|
|
1886
|
-
var createTypographyIconSizeConfig = function (baseAndSmallFontSize, mediumAndWideFontSize) {
|
|
1887
|
-
var baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1888
|
-
var mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1889
|
-
return {
|
|
1890
|
-
baseAndSmall: {
|
|
1891
|
-
iconSize: baseAndSmallIconSize
|
|
1892
|
-
},
|
|
1893
|
-
mediumAndWide: {
|
|
1894
|
-
iconSize: mediumAndWideIconSize
|
|
1895
|
-
}
|
|
1896
|
-
};
|
|
1897
|
-
};
|
|
1898
1911
|
var icon = {
|
|
1899
|
-
defaultSize: 20
|
|
1900
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1901
|
-
typographySize: {
|
|
1902
|
-
// also known as xxlarge
|
|
1903
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1904
|
-
// also known as xlarge
|
|
1905
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1906
|
-
// also known as medium
|
|
1907
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1908
|
-
// also known as xsmall
|
|
1909
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1910
|
-
// also known as xxsmall
|
|
1911
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1912
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1913
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1914
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1915
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1916
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1917
|
-
}
|
|
1912
|
+
defaultSize: 20
|
|
1918
1913
|
};
|
|
1919
1914
|
|
|
1920
1915
|
var iconButton = {
|
|
@@ -1933,8 +1928,8 @@ var listItem = {
|
|
|
1933
1928
|
|
|
1934
1929
|
var mapMarker = {
|
|
1935
1930
|
home: {
|
|
1936
|
-
"default":
|
|
1937
|
-
selected:
|
|
1931
|
+
"default": deepPurpleColorPalette['grey.9'],
|
|
1932
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1938
1933
|
svg: {
|
|
1939
1934
|
height: 36
|
|
1940
1935
|
},
|
|
@@ -1944,8 +1939,8 @@ var mapMarker = {
|
|
|
1944
1939
|
}
|
|
1945
1940
|
},
|
|
1946
1941
|
meetingPoint: {
|
|
1947
|
-
"default":
|
|
1948
|
-
selected:
|
|
1942
|
+
"default": deepPurpleColorPalette['deepPurple.8'],
|
|
1943
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1949
1944
|
svg: {
|
|
1950
1945
|
width: 40,
|
|
1951
1946
|
height: 43
|
|
@@ -2341,6 +2336,183 @@ var skeleton = {
|
|
|
2341
2336
|
}
|
|
2342
2337
|
};
|
|
2343
2338
|
|
|
2339
|
+
var tabBar = {
|
|
2340
|
+
underline: {
|
|
2341
|
+
"default": {
|
|
2342
|
+
active: {
|
|
2343
|
+
color: {
|
|
2344
|
+
"default": deepPurpleColorPalette['deepPurple.8'],
|
|
2345
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2346
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2347
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2348
|
+
},
|
|
2349
|
+
indicator: {
|
|
2350
|
+
backgroundColor: deepPurpleColorPalette['deepPurple.8']
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
inactive: {
|
|
2354
|
+
color: {
|
|
2355
|
+
"default": deepPurpleColorPalette['grey.5'],
|
|
2356
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2357
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2358
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2359
|
+
},
|
|
2360
|
+
indicator: {
|
|
2361
|
+
backgroundColor: undefined
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
disabled: {
|
|
2365
|
+
color: {
|
|
2366
|
+
"default": deepPurpleColorPalette['grey.3'],
|
|
2367
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2368
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2369
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2370
|
+
},
|
|
2371
|
+
indicator: {
|
|
2372
|
+
backgroundColor: undefined
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
borderBottomColor: deepPurpleColorPalette['beige.3']
|
|
2376
|
+
},
|
|
2377
|
+
revert: {
|
|
2378
|
+
active: {
|
|
2379
|
+
color: {
|
|
2380
|
+
"default": deepPurpleColorPalette['grey.0'],
|
|
2381
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2382
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2383
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2384
|
+
},
|
|
2385
|
+
indicator: {
|
|
2386
|
+
backgroundColor: deepPurpleColorPalette['grey.0']
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
inactive: {
|
|
2390
|
+
color: {
|
|
2391
|
+
"default": deepPurpleColorPalette['white-alpha.80'],
|
|
2392
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2393
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2394
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2395
|
+
},
|
|
2396
|
+
indicator: {
|
|
2397
|
+
backgroundColor: undefined
|
|
2398
|
+
}
|
|
2399
|
+
},
|
|
2400
|
+
disabled: {
|
|
2401
|
+
color: {
|
|
2402
|
+
"default": deepPurpleColorPalette['white-alpha.20'],
|
|
2403
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2404
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2405
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2406
|
+
},
|
|
2407
|
+
indicator: {
|
|
2408
|
+
backgroundColor: undefined
|
|
2409
|
+
}
|
|
2410
|
+
},
|
|
2411
|
+
borderBottomColor: deepPurpleColorPalette['white-alpha.20']
|
|
2412
|
+
}
|
|
2413
|
+
},
|
|
2414
|
+
solid: {
|
|
2415
|
+
"default": {
|
|
2416
|
+
active: {
|
|
2417
|
+
color: {
|
|
2418
|
+
"default": deepPurpleColorPalette['grey.0'],
|
|
2419
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2420
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2421
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2422
|
+
},
|
|
2423
|
+
backgroundColor: {
|
|
2424
|
+
"default": deepPurpleColorPalette['deepPurple.8'],
|
|
2425
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2426
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2427
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2428
|
+
},
|
|
2429
|
+
borderRadius: 4,
|
|
2430
|
+
indicator: {
|
|
2431
|
+
backgroundColor: undefined
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2434
|
+
inactive: {
|
|
2435
|
+
color: {
|
|
2436
|
+
"default": deepPurpleColorPalette['grey.5'],
|
|
2437
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2438
|
+
hovered: deepPurpleColorPalette['grey.5'],
|
|
2439
|
+
pressed: deepPurpleColorPalette['grey.5']
|
|
2440
|
+
},
|
|
2441
|
+
backgroundColor: {
|
|
2442
|
+
"default": undefined,
|
|
2443
|
+
focused: undefined,
|
|
2444
|
+
hovered: deepPurpleColorPalette['beige.1'],
|
|
2445
|
+
pressed: deepPurpleColorPalette['beige.1']
|
|
2446
|
+
},
|
|
2447
|
+
borderRadius: 4,
|
|
2448
|
+
indicator: {
|
|
2449
|
+
backgroundColor: undefined
|
|
2450
|
+
}
|
|
2451
|
+
},
|
|
2452
|
+
disabled: {
|
|
2453
|
+
color: {
|
|
2454
|
+
"default": deepPurpleColorPalette['grey.3'],
|
|
2455
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2456
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2457
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2458
|
+
},
|
|
2459
|
+
indicator: {
|
|
2460
|
+
backgroundColor: undefined
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
},
|
|
2464
|
+
revert: {
|
|
2465
|
+
active: {
|
|
2466
|
+
color: {
|
|
2467
|
+
"default": deepPurpleColorPalette['deepPurple.8'],
|
|
2468
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2469
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2470
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2471
|
+
},
|
|
2472
|
+
backgroundColor: {
|
|
2473
|
+
"default": deepPurpleColorPalette['grey.0'],
|
|
2474
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2475
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2476
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2477
|
+
},
|
|
2478
|
+
borderRadius: 4,
|
|
2479
|
+
indicator: {
|
|
2480
|
+
backgroundColor: undefined
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
inactive: {
|
|
2484
|
+
color: {
|
|
2485
|
+
"default": deepPurpleColorPalette['white-alpha.80'],
|
|
2486
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2487
|
+
hovered: deepPurpleColorPalette['white-alpha.80'],
|
|
2488
|
+
pressed: deepPurpleColorPalette['white-alpha.80']
|
|
2489
|
+
},
|
|
2490
|
+
backgroundColor: {
|
|
2491
|
+
"default": undefined,
|
|
2492
|
+
focused: undefined,
|
|
2493
|
+
hovered: deepPurpleColorPalette['white-alpha.10'],
|
|
2494
|
+
pressed: deepPurpleColorPalette['white-alpha.10']
|
|
2495
|
+
},
|
|
2496
|
+
borderRadius: 4,
|
|
2497
|
+
indicator: {
|
|
2498
|
+
backgroundColor: undefined
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
disabled: {
|
|
2502
|
+
color: {
|
|
2503
|
+
"default": deepPurpleColorPalette['white-alpha.20'],
|
|
2504
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2505
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2506
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2507
|
+
},
|
|
2508
|
+
indicator: {
|
|
2509
|
+
backgroundColor: undefined
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2344
2516
|
var tag = {
|
|
2345
2517
|
borderRadius: 16,
|
|
2346
2518
|
icon: {
|
|
@@ -2482,6 +2654,7 @@ var theme = {
|
|
|
2482
2654
|
picker: picker,
|
|
2483
2655
|
shadows: shadows,
|
|
2484
2656
|
skeleton: skeleton,
|
|
2657
|
+
tabBar: tabBar,
|
|
2485
2658
|
tag: tag,
|
|
2486
2659
|
tooltip: tooltip,
|
|
2487
2660
|
typography: typography,
|
|
@@ -2582,7 +2755,7 @@ function ActionCardDisabled(_ref) {
|
|
|
2582
2755
|
});
|
|
2583
2756
|
}
|
|
2584
2757
|
|
|
2585
|
-
var _excluded$
|
|
2758
|
+
var _excluded$S = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2586
2759
|
function ActionCard(_ref) {
|
|
2587
2760
|
var children = _ref.children,
|
|
2588
2761
|
_ref$variant = _ref.variant,
|
|
@@ -2595,7 +2768,7 @@ function ActionCard(_ref) {
|
|
|
2595
2768
|
isHovered = _ref.isHovered,
|
|
2596
2769
|
isPressed = _ref.isPressed,
|
|
2597
2770
|
isFocused = _ref.isFocused,
|
|
2598
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2771
|
+
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
2599
2772
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2600
2773
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2601
2774
|
borderRadius: borderRadius,
|
|
@@ -2909,17 +3082,23 @@ var getTypographyFamilyWithAncestorValue = function (type, typographyFamilyInCon
|
|
|
2909
3082
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2910
3083
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2911
3084
|
};
|
|
3085
|
+
var getTypographyTypeWithAncestorValue = function (type, typographyTypeInContext) {
|
|
3086
|
+
// check if all values are not undefined
|
|
3087
|
+
var isAllValuesUndefined = Object.values(type).every(function (value) {
|
|
3088
|
+
return value === undefined;
|
|
3089
|
+
});
|
|
3090
|
+
|
|
3091
|
+
// if every values are undefined and we hgave a typographyTypeInContext, we use the parent typography type (typographyTypeInContext)
|
|
3092
|
+
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3093
|
+
};
|
|
2912
3094
|
|
|
2913
|
-
var _excluded$
|
|
3095
|
+
var _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2914
3096
|
var TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2915
3097
|
var TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2916
3098
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
2917
3099
|
function useTypographyColor() {
|
|
2918
3100
|
return useContext(TypographyColorContext);
|
|
2919
3101
|
}
|
|
2920
|
-
function useTypographyAncestorType() {
|
|
2921
|
-
return useContext(TypographyTypeContext);
|
|
2922
|
-
}
|
|
2923
3102
|
var TypographyDefaultColorContext = /*#__PURE__*/createContext(undefined);
|
|
2924
3103
|
function useTypographyDefaultColor() {
|
|
2925
3104
|
return useContext(TypographyDefaultColorContext);
|
|
@@ -3020,7 +3199,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
|
|
|
3020
3199
|
};
|
|
3021
3200
|
}
|
|
3022
3201
|
function Typography(_ref2) {
|
|
3023
|
-
var
|
|
3202
|
+
var _typographyType$base;
|
|
3024
3203
|
var accessibilityRole = _ref2.accessibilityRole,
|
|
3025
3204
|
legacyBase = _ref2.base,
|
|
3026
3205
|
legacySmall = _ref2.small,
|
|
@@ -3037,12 +3216,14 @@ function Typography(_ref2) {
|
|
|
3037
3216
|
} : _ref2$type,
|
|
3038
3217
|
variant = _ref2.variant,
|
|
3039
3218
|
color = _ref2.color,
|
|
3040
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
3219
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$R);
|
|
3041
3220
|
var sx = useSx();
|
|
3042
3221
|
var typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3222
|
+
var typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3043
3223
|
var defaultColor = useTypographyDefaultColor();
|
|
3044
3224
|
var hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3045
|
-
var
|
|
3225
|
+
var typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3226
|
+
var baseOrDefaultToBody = (_typographyType$base = typographyType.base) !== null && _typographyType$base !== void 0 ? _typographyType$base : 'body-m';
|
|
3046
3227
|
var typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3047
3228
|
var fontSizeForNativeBase = createNativeBaseFontSize(_objectSpread(_objectSpread({}, type), {}, {
|
|
3048
3229
|
base: baseOrDefaultToBody
|
|
@@ -3079,7 +3260,7 @@ function Typography(_ref2) {
|
|
|
3079
3260
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3080
3261
|
value: typographyFamily,
|
|
3081
3262
|
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3082
|
-
value:
|
|
3263
|
+
value: typographyType,
|
|
3083
3264
|
children: text
|
|
3084
3265
|
})
|
|
3085
3266
|
}) : text;
|
|
@@ -3177,30 +3358,12 @@ function Icon(_ref) {
|
|
|
3177
3358
|
});
|
|
3178
3359
|
}
|
|
3179
3360
|
|
|
3180
|
-
var _excluded$
|
|
3361
|
+
var _excluded$Q = ["color", "size"],
|
|
3181
3362
|
_excluded2$5 = ["color"];
|
|
3182
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3183
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3184
|
-
}
|
|
3185
|
-
function createNativeBaseIconSize(type) {
|
|
3186
|
-
var typeWithMediumForced = _objectSpread(_objectSpread({}, type), {}, {
|
|
3187
|
-
medium: type.medium || type.small || type.base
|
|
3188
|
-
});
|
|
3189
|
-
var iconSizeForNativeBase = {};
|
|
3190
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(function (typeName) {
|
|
3191
|
-
var value = typeWithMediumForced[typeName];
|
|
3192
|
-
if (value) {
|
|
3193
|
-
iconSizeForNativeBase[typeName] = "kitt.icon.typographySize.".concat(value, ".").concat(getIconSizeConfigKeyFromTypeName(typeName), ".iconSize");
|
|
3194
|
-
}
|
|
3195
|
-
});
|
|
3196
|
-
return iconSizeForNativeBase;
|
|
3197
|
-
}
|
|
3198
3363
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3199
3364
|
var color = _ref.color,
|
|
3200
3365
|
size = _ref.size,
|
|
3201
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3202
|
-
var ancestorType = useTypographyAncestorType();
|
|
3203
|
-
var iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3366
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
3204
3367
|
var colorValue = getTypographyColorValue(color);
|
|
3205
3368
|
var sx = useSx();
|
|
3206
3369
|
var _sx = sx({
|
|
@@ -3208,7 +3371,7 @@ function TypographyIconSpecifiedColor(_ref) {
|
|
|
3208
3371
|
}),
|
|
3209
3372
|
colorStyleValue = _sx.color;
|
|
3210
3373
|
return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
|
|
3211
|
-
size:
|
|
3374
|
+
size: size,
|
|
3212
3375
|
color: colorStyleValue
|
|
3213
3376
|
}));
|
|
3214
3377
|
}
|
|
@@ -3240,7 +3403,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed, is
|
|
|
3240
3403
|
return "".concat(baseKey, ".default");
|
|
3241
3404
|
};
|
|
3242
3405
|
|
|
3243
|
-
var _excluded$
|
|
3406
|
+
var _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3244
3407
|
function ButtonContentChildren(_ref) {
|
|
3245
3408
|
var type = _ref.type,
|
|
3246
3409
|
icon = _ref.icon,
|
|
@@ -3340,7 +3503,7 @@ function ButtonContent(_ref2) {
|
|
|
3340
3503
|
_ref2.isFocused;
|
|
3341
3504
|
var innerSpacing = _ref2.innerSpacing,
|
|
3342
3505
|
size = _ref2.size,
|
|
3343
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3506
|
+
props = _objectWithoutProperties(_ref2, _excluded$P);
|
|
3344
3507
|
var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3345
3508
|
return /*#__PURE__*/jsx(View, {
|
|
3346
3509
|
_web: {
|
|
@@ -3585,7 +3748,7 @@ function LoaderIcon(_ref) {
|
|
|
3585
3748
|
});
|
|
3586
3749
|
}
|
|
3587
3750
|
|
|
3588
|
-
var _excluded$
|
|
3751
|
+
var _excluded$O = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3589
3752
|
var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3590
3753
|
var as = _ref.as,
|
|
3591
3754
|
onPress = _ref.onPress,
|
|
@@ -3596,7 +3759,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3596
3759
|
base: true,
|
|
3597
3760
|
medium: false
|
|
3598
3761
|
} : _ref$stretch,
|
|
3599
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3762
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
3600
3763
|
var _useState = useState(false),
|
|
3601
3764
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3602
3765
|
isLoading = _useState2[0],
|
|
@@ -3674,7 +3837,7 @@ function ActionsButton(_ref) {
|
|
|
3674
3837
|
}, props));
|
|
3675
3838
|
}
|
|
3676
3839
|
|
|
3677
|
-
var _excluded$
|
|
3840
|
+
var _excluded$N = ["children", "layout", "reversed"];
|
|
3678
3841
|
function getCurrentLayout(layout) {
|
|
3679
3842
|
if (!layout) return {
|
|
3680
3843
|
base: 'stretch',
|
|
@@ -3706,7 +3869,7 @@ function Actions(_ref) {
|
|
|
3706
3869
|
reversed = _ref$reversed === void 0 ? {
|
|
3707
3870
|
base: false
|
|
3708
3871
|
} : _ref$reversed,
|
|
3709
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3872
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
3710
3873
|
var shouldReverse = typeof reversed === 'boolean' ? {
|
|
3711
3874
|
base: !!reversed
|
|
3712
3875
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3759,7 +3922,7 @@ function getInitials(firstname, lastname) {
|
|
|
3759
3922
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
3760
3923
|
}
|
|
3761
3924
|
|
|
3762
|
-
var _excluded$
|
|
3925
|
+
var _excluded$M = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3763
3926
|
function AvatarContent(_ref) {
|
|
3764
3927
|
var size = _ref.size,
|
|
3765
3928
|
src = _ref.src,
|
|
@@ -3822,7 +3985,7 @@ function Avatar(_ref2) {
|
|
|
3822
3985
|
height = _ref2.height,
|
|
3823
3986
|
dark = _ref2.dark,
|
|
3824
3987
|
disabled = _ref2.disabled,
|
|
3825
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3988
|
+
props = _objectWithoutProperties(_ref2, _excluded$M);
|
|
3826
3989
|
var currentSize = getCurrentSize({
|
|
3827
3990
|
size: size,
|
|
3828
3991
|
sizeVariant: sizeVariant
|
|
@@ -3860,7 +4023,7 @@ function Avatar(_ref2) {
|
|
|
3860
4023
|
});
|
|
3861
4024
|
}
|
|
3862
4025
|
|
|
3863
|
-
var _excluded$
|
|
4026
|
+
var _excluded$L = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints"];
|
|
3864
4027
|
function BottomSheetComp(_ref, ref) {
|
|
3865
4028
|
var Content = _ref.children,
|
|
3866
4029
|
_ref$hasScrollView = _ref.hasScrollView,
|
|
@@ -3873,7 +4036,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3873
4036
|
enableDynamicSizing = _ref$enableDynamicSiz === void 0 ? true : _ref$enableDynamicSiz,
|
|
3874
4037
|
_ref$snapPoints = _ref.snapPoints,
|
|
3875
4038
|
snapPoints = _ref$snapPoints === void 0 ? ['100%'] : _ref$snapPoints,
|
|
3876
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4039
|
+
rest = _objectWithoutProperties(_ref, _excluded$L);
|
|
3877
4040
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
3878
4041
|
top = _useSafeAreaInsets.top;
|
|
3879
4042
|
var Wrapper = useMemo(function () {
|
|
@@ -4054,11 +4217,10 @@ function NativeOpacityAnimation$2(_ref) {
|
|
|
4054
4217
|
var _theme$kitt$cardModal = theme.kitt.cardModal.animation.overlay,
|
|
4055
4218
|
duration = _theme$kitt$cardModal.duration,
|
|
4056
4219
|
easing = _theme$kitt$cardModal.easing;
|
|
4057
|
-
var
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
y2 = _easing[3];
|
|
4220
|
+
var x1 = easing.x1,
|
|
4221
|
+
y1 = easing.y1,
|
|
4222
|
+
x2 = easing.x2,
|
|
4223
|
+
y2 = easing.y2;
|
|
4062
4224
|
return {
|
|
4063
4225
|
opacity: withTiming(visible ? 1 : 0, {
|
|
4064
4226
|
duration: duration,
|
|
@@ -4094,11 +4256,10 @@ function NativeRotationAnimation$1(_ref) {
|
|
|
4094
4256
|
var _theme$kitt$cardModal = theme.kitt.cardModal.animation.content,
|
|
4095
4257
|
duration = _theme$kitt$cardModal.duration,
|
|
4096
4258
|
easing = _theme$kitt$cardModal.easing;
|
|
4097
|
-
var
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
y2 = _easing[3];
|
|
4259
|
+
var x1 = easing.x1,
|
|
4260
|
+
y1 = easing.y1,
|
|
4261
|
+
x2 = easing.x2,
|
|
4262
|
+
y2 = easing.y2;
|
|
4102
4263
|
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4103
4264
|
duration: duration,
|
|
4104
4265
|
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
@@ -4187,13 +4348,13 @@ function CardModalAnimation(_ref) {
|
|
|
4187
4348
|
});
|
|
4188
4349
|
}
|
|
4189
4350
|
|
|
4190
|
-
var _excluded$
|
|
4351
|
+
var _excluded$K = ["children", "visible", "onClose", "onExited"];
|
|
4191
4352
|
function CardModalBehaviour(_ref) {
|
|
4192
4353
|
var children = _ref.children,
|
|
4193
4354
|
visible = _ref.visible,
|
|
4194
4355
|
onClose = _ref.onClose,
|
|
4195
4356
|
onExited = _ref.onExited,
|
|
4196
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4357
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
4197
4358
|
var _useState = useState(visible),
|
|
4198
4359
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4199
4360
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4218,7 +4379,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4218
4379
|
});
|
|
4219
4380
|
}
|
|
4220
4381
|
|
|
4221
|
-
var _excluded$
|
|
4382
|
+
var _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4222
4383
|
function CardModalBody(_ref) {
|
|
4223
4384
|
var children = _ref.children,
|
|
4224
4385
|
_ref$paddingX = _ref.paddingX,
|
|
@@ -4231,7 +4392,7 @@ function CardModalBody(_ref) {
|
|
|
4231
4392
|
base: 'kitt.4',
|
|
4232
4393
|
medium: 'kitt.6'
|
|
4233
4394
|
} : _ref$paddingY,
|
|
4234
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4395
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4235
4396
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4236
4397
|
showsVerticalScrollIndicator: false,
|
|
4237
4398
|
_contentContainerStyle: {
|
|
@@ -4243,7 +4404,7 @@ function CardModalBody(_ref) {
|
|
|
4243
4404
|
}));
|
|
4244
4405
|
}
|
|
4245
4406
|
|
|
4246
|
-
var _excluded$
|
|
4407
|
+
var _excluded$I = ["children", "padding", "hasSeparator"];
|
|
4247
4408
|
function CardModalFooter(_ref) {
|
|
4248
4409
|
var children = _ref.children,
|
|
4249
4410
|
_ref$padding = _ref.padding,
|
|
@@ -4253,7 +4414,7 @@ function CardModalFooter(_ref) {
|
|
|
4253
4414
|
} : _ref$padding,
|
|
4254
4415
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4255
4416
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4256
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4417
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4257
4418
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4258
4419
|
marginTop: "kitt.2",
|
|
4259
4420
|
padding: padding,
|
|
@@ -4267,7 +4428,7 @@ function CardModalFooter(_ref) {
|
|
|
4267
4428
|
}));
|
|
4268
4429
|
}
|
|
4269
4430
|
|
|
4270
|
-
var _excluded$
|
|
4431
|
+
var _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4271
4432
|
function CardModalHeader(_ref) {
|
|
4272
4433
|
var children = _ref.children,
|
|
4273
4434
|
title = _ref.title,
|
|
@@ -4280,7 +4441,7 @@ function CardModalHeader(_ref) {
|
|
|
4280
4441
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4281
4442
|
right = _ref.right,
|
|
4282
4443
|
left = _ref.left,
|
|
4283
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4444
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4284
4445
|
var defaultContainerPadding = {
|
|
4285
4446
|
base: 'kitt.4',
|
|
4286
4447
|
medium: 'kitt.6'
|
|
@@ -4318,7 +4479,7 @@ function CardModalHeader(_ref) {
|
|
|
4318
4479
|
}));
|
|
4319
4480
|
}
|
|
4320
4481
|
|
|
4321
|
-
var _excluded$
|
|
4482
|
+
var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4322
4483
|
function CardModal(_ref) {
|
|
4323
4484
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4324
4485
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
@@ -4329,7 +4490,7 @@ function CardModal(_ref) {
|
|
|
4329
4490
|
header = _ref.header,
|
|
4330
4491
|
body = _ref.body,
|
|
4331
4492
|
footer = _ref.footer,
|
|
4332
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4493
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4333
4494
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4334
4495
|
overflow: "hidden",
|
|
4335
4496
|
backgroundColor: backgroundColor,
|
|
@@ -4575,11 +4736,11 @@ function ChoiceItemContainer(_ref) {
|
|
|
4575
4736
|
}));
|
|
4576
4737
|
}
|
|
4577
4738
|
|
|
4578
|
-
var _excluded$
|
|
4739
|
+
var _excluded$F = ["direction", "contentContainerStyle"];
|
|
4579
4740
|
function ChoicesContainer(_ref) {
|
|
4580
4741
|
var direction = _ref.direction,
|
|
4581
4742
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
4582
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4743
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4583
4744
|
if (direction === 'row') {
|
|
4584
4745
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4585
4746
|
horizontal: true,
|
|
@@ -4672,11 +4833,10 @@ function NativeOpacityAnimation$1(_ref) {
|
|
|
4672
4833
|
var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.overlay,
|
|
4673
4834
|
duration = _theme$kitt$dialogMod.duration,
|
|
4674
4835
|
easing = _theme$kitt$dialogMod.easing;
|
|
4675
|
-
var
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
y2 = _easing[3];
|
|
4836
|
+
var x1 = easing.x1,
|
|
4837
|
+
y1 = easing.y1,
|
|
4838
|
+
x2 = easing.x2,
|
|
4839
|
+
y2 = easing.y2;
|
|
4680
4840
|
return {
|
|
4681
4841
|
opacity: withTiming(visible ? 1 : 0, {
|
|
4682
4842
|
duration: duration,
|
|
@@ -4712,11 +4872,10 @@ function NativeRotationAnimation(_ref) {
|
|
|
4712
4872
|
var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.content,
|
|
4713
4873
|
duration = _theme$kitt$dialogMod.duration,
|
|
4714
4874
|
easing = _theme$kitt$dialogMod.easing;
|
|
4715
|
-
var
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
y2 = _easing[3];
|
|
4875
|
+
var x1 = easing.x1,
|
|
4876
|
+
y1 = easing.y1,
|
|
4877
|
+
x2 = easing.x2,
|
|
4878
|
+
y2 = easing.y2;
|
|
4720
4879
|
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4721
4880
|
duration: duration,
|
|
4722
4881
|
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
@@ -4807,13 +4966,13 @@ function DialogModalAnimation(_ref) {
|
|
|
4807
4966
|
});
|
|
4808
4967
|
}
|
|
4809
4968
|
|
|
4810
|
-
var _excluded$
|
|
4969
|
+
var _excluded$E = ["children", "visible", "onClose", "onExited"];
|
|
4811
4970
|
function DialogModalBehaviour(_ref) {
|
|
4812
4971
|
var children = _ref.children,
|
|
4813
4972
|
visible = _ref.visible,
|
|
4814
4973
|
onClose = _ref.onClose,
|
|
4815
4974
|
onExited = _ref.onExited,
|
|
4816
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4975
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4817
4976
|
var _useState = useState(visible),
|
|
4818
4977
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4819
4978
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4844,7 +5003,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4844
5003
|
});
|
|
4845
5004
|
}
|
|
4846
5005
|
|
|
4847
|
-
var _excluded$
|
|
5006
|
+
var _excluded$D = ["stretch"];
|
|
4848
5007
|
function DialogModal(_ref) {
|
|
4849
5008
|
var illustration = _ref.illustration,
|
|
4850
5009
|
title = _ref.title,
|
|
@@ -4884,7 +5043,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
4884
5043
|
function DialogModalButton(_ref2) {
|
|
4885
5044
|
var _ref2$stretch = _ref2.stretch,
|
|
4886
5045
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
4887
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
5046
|
+
props = _objectWithoutProperties(_ref2, _excluded$D);
|
|
4888
5047
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4889
5048
|
stretch: stretch
|
|
4890
5049
|
}, props));
|
|
@@ -4921,7 +5080,7 @@ function Emoji(_ref) {
|
|
|
4921
5080
|
});
|
|
4922
5081
|
}
|
|
4923
5082
|
|
|
4924
|
-
var _excluded$
|
|
5083
|
+
var _excluded$C = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4925
5084
|
_excluded2$4 = ["phoneNumber", "children"],
|
|
4926
5085
|
_excluded3$3 = ["phoneNumber", "children"],
|
|
4927
5086
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4931,7 +5090,7 @@ function ExternalAppLink(_ref) {
|
|
|
4931
5090
|
appValue = _ref.appValue,
|
|
4932
5091
|
onPress = _ref.onPress,
|
|
4933
5092
|
onOpenAppError = _ref.onOpenAppError,
|
|
4934
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5093
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
4935
5094
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
4936
5095
|
var handleOnPress = /*#__PURE__*/function () {
|
|
4937
5096
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -5083,7 +5242,7 @@ function useOpenExternalLink(errorHandler) {
|
|
|
5083
5242
|
}();
|
|
5084
5243
|
}
|
|
5085
5244
|
|
|
5086
|
-
var _excluded$
|
|
5245
|
+
var _excluded$B = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
|
|
5087
5246
|
function ExternalLink(_ref) {
|
|
5088
5247
|
var Component = _ref.as,
|
|
5089
5248
|
href = _ref.href,
|
|
@@ -5092,7 +5251,7 @@ function ExternalLink(_ref) {
|
|
|
5092
5251
|
onPress = _ref.onPress,
|
|
5093
5252
|
_ref$onOpenLinkError = _ref.onOpenLinkError,
|
|
5094
5253
|
onOpenLinkError = _ref$onOpenLinkError === void 0 ? console.error : _ref$onOpenLinkError,
|
|
5095
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5254
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5096
5255
|
var openExternalLink = useOpenExternalLink();
|
|
5097
5256
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5098
5257
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -5149,7 +5308,7 @@ function InputTextContainer(_ref) {
|
|
|
5149
5308
|
});
|
|
5150
5309
|
}
|
|
5151
5310
|
|
|
5152
|
-
var _excluded$
|
|
5311
|
+
var _excluded$A = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5153
5312
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5154
5313
|
var id = _ref.id,
|
|
5155
5314
|
right = _ref.right;
|
|
@@ -5170,7 +5329,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5170
5329
|
multiline = _ref.multiline,
|
|
5171
5330
|
height = _ref.height,
|
|
5172
5331
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5173
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5332
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
5174
5333
|
var theme = useTheme();
|
|
5175
5334
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5176
5335
|
base: 'body-m'
|
|
@@ -5295,12 +5454,12 @@ function AutocompleteItemsListContainer(_ref) {
|
|
|
5295
5454
|
});
|
|
5296
5455
|
}
|
|
5297
5456
|
|
|
5298
|
-
var _excluded$
|
|
5457
|
+
var _excluded$z = ["children", "testID"];
|
|
5299
5458
|
function AutocompleteOption(_ref) {
|
|
5300
5459
|
var children = _ref.children,
|
|
5301
5460
|
_ref$testID = _ref.testID,
|
|
5302
5461
|
testID = _ref$testID === void 0 ? 'kitt.Autocomplete.option' : _ref$testID,
|
|
5303
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5462
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
5304
5463
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5305
5464
|
paddingX: {
|
|
5306
5465
|
base: 'kitt.2',
|
|
@@ -5313,7 +5472,7 @@ function AutocompleteOption(_ref) {
|
|
|
5313
5472
|
}));
|
|
5314
5473
|
}
|
|
5315
5474
|
|
|
5316
|
-
var _excluded$
|
|
5475
|
+
var _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"],
|
|
5317
5476
|
_excluded2$3 = ["onClick", "onPress"],
|
|
5318
5477
|
_excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5319
5478
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5353,7 +5512,7 @@ function Autocomplete(_ref) {
|
|
|
5353
5512
|
_ref$zIndex = _ref.zIndex,
|
|
5354
5513
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5355
5514
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5356
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5515
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5357
5516
|
var childrenArray = Children.toArray(_children);
|
|
5358
5517
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5359
5518
|
return {
|
|
@@ -5568,7 +5727,7 @@ function getBorderColor$1(_ref) {
|
|
|
5568
5727
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5569
5728
|
}
|
|
5570
5729
|
|
|
5571
|
-
var _excluded$
|
|
5730
|
+
var _excluded$x = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5572
5731
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5573
5732
|
var checked = _ref.checked,
|
|
5574
5733
|
_ref$hitSlop = _ref.hitSlop,
|
|
@@ -5578,7 +5737,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5578
5737
|
onChange = _ref.onChange,
|
|
5579
5738
|
onBlur = _ref.onBlur,
|
|
5580
5739
|
onFocus = _ref.onFocus,
|
|
5581
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5740
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5582
5741
|
var theme = useTheme();
|
|
5583
5742
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5584
5743
|
hitSlop: hitSlop
|
|
@@ -5896,7 +6055,7 @@ function PartContainer(_ref) {
|
|
|
5896
6055
|
});
|
|
5897
6056
|
}
|
|
5898
6057
|
|
|
5899
|
-
var _excluded$
|
|
6058
|
+
var _excluded$w = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5900
6059
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5901
6060
|
var id = _ref.id,
|
|
5902
6061
|
value = _ref.value,
|
|
@@ -5914,7 +6073,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5914
6073
|
onBlur = _ref.onBlur,
|
|
5915
6074
|
onFocus = _ref.onFocus,
|
|
5916
6075
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
5917
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
6076
|
+
_objectWithoutProperties(_ref, _excluded$w);
|
|
5918
6077
|
var monthRef = useRef(null);
|
|
5919
6078
|
var yearRef = useRef(null);
|
|
5920
6079
|
var defaultValue = value;
|
|
@@ -6123,7 +6282,7 @@ var PressableDateInputs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6123
6282
|
});
|
|
6124
6283
|
});
|
|
6125
6284
|
|
|
6126
|
-
var _excluded$
|
|
6285
|
+
var _excluded$v = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
|
|
6127
6286
|
var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6128
6287
|
var onBlur = _ref.onBlur,
|
|
6129
6288
|
onFocus = _ref.onFocus,
|
|
@@ -6132,7 +6291,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6132
6291
|
isDefaultVisible = _ref.isDefaultVisible,
|
|
6133
6292
|
value = _ref.value,
|
|
6134
6293
|
_onChange = _ref.onChange,
|
|
6135
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6294
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
6136
6295
|
var _useState = useState(false),
|
|
6137
6296
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6138
6297
|
isFocused = _useState2[0],
|
|
@@ -6208,7 +6367,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6208
6367
|
}));
|
|
6209
6368
|
}
|
|
6210
6369
|
|
|
6211
|
-
var _excluded$
|
|
6370
|
+
var _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
6212
6371
|
function ModalTitle(_ref) {
|
|
6213
6372
|
var children = _ref.children;
|
|
6214
6373
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
@@ -6226,7 +6385,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6226
6385
|
validateButtonLabel = _ref2.validateButtonLabel,
|
|
6227
6386
|
onClose = _ref2.onClose,
|
|
6228
6387
|
onChange = _ref2.onChange,
|
|
6229
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6388
|
+
props = _objectWithoutProperties(_ref2, _excluded$u);
|
|
6230
6389
|
var _useState = useState(value),
|
|
6231
6390
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6232
6391
|
currentValue = _useState2[0],
|
|
@@ -6272,7 +6431,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6272
6431
|
});
|
|
6273
6432
|
}
|
|
6274
6433
|
|
|
6275
|
-
var _excluded$
|
|
6434
|
+
var _excluded$t = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
|
|
6276
6435
|
var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6277
6436
|
var value = _ref.value,
|
|
6278
6437
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -6286,7 +6445,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6286
6445
|
onChange = _ref.onChange,
|
|
6287
6446
|
onFocus = _ref.onFocus,
|
|
6288
6447
|
onBlur = _ref.onBlur,
|
|
6289
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6448
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
6290
6449
|
var _useState = useState(isDefaultVisible),
|
|
6291
6450
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6292
6451
|
isPickerUIVisible = _useState2[0],
|
|
@@ -6333,7 +6492,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6333
6492
|
});
|
|
6334
6493
|
});
|
|
6335
6494
|
|
|
6336
|
-
var _excluded$
|
|
6495
|
+
var _excluded$s = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
|
|
6337
6496
|
var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6338
6497
|
var value = _ref.value,
|
|
6339
6498
|
pickerUITestID = _ref.pickerUITestID,
|
|
@@ -6341,7 +6500,7 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6341
6500
|
pickerDefaultDate = _ref.pickerDefaultDate,
|
|
6342
6501
|
onChange = _ref.onChange,
|
|
6343
6502
|
onBlur = _ref.onBlur,
|
|
6344
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6503
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6345
6504
|
if (Platform.OS === 'android') {
|
|
6346
6505
|
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
6347
6506
|
ref: ref,
|
|
@@ -6363,14 +6522,14 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6363
6522
|
}, props));
|
|
6364
6523
|
});
|
|
6365
6524
|
|
|
6366
|
-
var _excluded$
|
|
6525
|
+
var _excluded$r = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
|
|
6367
6526
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6368
6527
|
var _ref$fillMode = _ref.fillMode,
|
|
6369
6528
|
fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
|
|
6370
6529
|
enterKeyHint = _ref.enterKeyHint,
|
|
6371
6530
|
value = _ref.value,
|
|
6372
6531
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
6373
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6532
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6374
6533
|
// in apps, final-form can give a string value that will break the component
|
|
6375
6534
|
var currentValue = value || undefined;
|
|
6376
6535
|
if (fillMode === 'keyboard') {
|
|
@@ -6397,7 +6556,7 @@ function DocumentPicker(_ref) {
|
|
|
6397
6556
|
var childElement = Children.only(children);
|
|
6398
6557
|
var handlePickDocument = /*#__PURE__*/function () {
|
|
6399
6558
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6400
|
-
var _childElement$props$o, _childElement$props
|
|
6559
|
+
var _childElement$props$o, _childElement$props, _result$assets$;
|
|
6401
6560
|
var result;
|
|
6402
6561
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
6403
6562
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6415,7 +6574,7 @@ function DocumentPicker(_ref) {
|
|
|
6415
6574
|
}));
|
|
6416
6575
|
case 5:
|
|
6417
6576
|
result = _context.sent;
|
|
6418
|
-
if (!result.canceled && result.assets[0]
|
|
6577
|
+
if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
|
|
6419
6578
|
onDocumentUpload(result.assets[0].file);
|
|
6420
6579
|
}
|
|
6421
6580
|
case 7:
|
|
@@ -6464,7 +6623,7 @@ function ImagePicker(_ref) {
|
|
|
6464
6623
|
}));
|
|
6465
6624
|
case 5:
|
|
6466
6625
|
result = _context.sent;
|
|
6467
|
-
if (!result.canceled) {
|
|
6626
|
+
if (!result.canceled && result.assets[0]) {
|
|
6468
6627
|
onImageSelected(result.assets[0]);
|
|
6469
6628
|
}
|
|
6470
6629
|
case 7:
|
|
@@ -6486,10 +6645,10 @@ function ImagePicker(_ref) {
|
|
|
6486
6645
|
});
|
|
6487
6646
|
}
|
|
6488
6647
|
|
|
6489
|
-
var _excluded$
|
|
6648
|
+
var _excluded$q = ["children"];
|
|
6490
6649
|
function ListItemContent(_ref) {
|
|
6491
6650
|
var children = _ref.children,
|
|
6492
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6651
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
6493
6652
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6494
6653
|
alignSelf: "center",
|
|
6495
6654
|
flexBasis: "0%",
|
|
@@ -6500,14 +6659,14 @@ function ListItemContent(_ref) {
|
|
|
6500
6659
|
}));
|
|
6501
6660
|
}
|
|
6502
6661
|
|
|
6503
|
-
var _excluded$
|
|
6662
|
+
var _excluded$p = ["children", "side"],
|
|
6504
6663
|
_excluded2$2 = ["children", "align"];
|
|
6505
6664
|
// Handles the vertical alignment of the side elements of the list item
|
|
6506
6665
|
function ListItemSideContainer(_ref) {
|
|
6507
6666
|
var children = _ref.children,
|
|
6508
6667
|
_ref$side = _ref.side,
|
|
6509
6668
|
side = _ref$side === void 0 ? 'left' : _ref$side,
|
|
6510
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6669
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
6511
6670
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
6512
6671
|
flexDirection: "row",
|
|
6513
6672
|
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
@@ -6528,7 +6687,7 @@ function ListItemSideContent(_ref2) {
|
|
|
6528
6687
|
}));
|
|
6529
6688
|
}
|
|
6530
6689
|
|
|
6531
|
-
var _excluded$
|
|
6690
|
+
var _excluded$o = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
6532
6691
|
function ListItem(_ref) {
|
|
6533
6692
|
var children = _ref.children,
|
|
6534
6693
|
withPadding = _ref.withPadding,
|
|
@@ -6536,7 +6695,7 @@ function ListItem(_ref) {
|
|
|
6536
6695
|
left = _ref.left,
|
|
6537
6696
|
right = _ref.right,
|
|
6538
6697
|
onPress = _ref.onPress,
|
|
6539
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6698
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
6540
6699
|
var Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
6541
6700
|
var wrapperProps = onPress ? _objectSpread({
|
|
6542
6701
|
accessibilityRole: 'button',
|
|
@@ -6569,10 +6728,10 @@ ListItem.Content = ListItemContent;
|
|
|
6569
6728
|
ListItem.SideContent = ListItemSideContent;
|
|
6570
6729
|
ListItem.SideContainer = ListItemSideContainer;
|
|
6571
6730
|
|
|
6572
|
-
var _excluded$
|
|
6731
|
+
var _excluded$n = ["title"];
|
|
6573
6732
|
function BottomSheetActionsItem(_ref) {
|
|
6574
6733
|
var title = _ref.title,
|
|
6575
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6734
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
6576
6735
|
return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
|
|
6577
6736
|
children: /*#__PURE__*/jsx(ListItem, {
|
|
6578
6737
|
withPadding: true,
|
|
@@ -6990,36 +7149,34 @@ function GoogleMapsAutocompleteProvider(_ref) {
|
|
|
6990
7149
|
_yield$predictionsPro = _context.sent;
|
|
6991
7150
|
results = _yield$predictionsPro.results;
|
|
6992
7151
|
status = _yield$predictionsPro.status;
|
|
6993
|
-
if (
|
|
6994
|
-
|
|
6995
|
-
|
|
7152
|
+
if (status !== 'OK') {
|
|
7153
|
+
dispatch({
|
|
7154
|
+
type: 'search-error'
|
|
7155
|
+
});
|
|
6996
7156
|
}
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
}
|
|
7009
|
-
});
|
|
7010
|
-
_context.next = 20;
|
|
7157
|
+
if (results) {
|
|
7158
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
7159
|
+
searchResultsCache.current[value] = results;
|
|
7160
|
+
dispatch({
|
|
7161
|
+
type: 'search-success',
|
|
7162
|
+
payload: {
|
|
7163
|
+
results: results
|
|
7164
|
+
}
|
|
7165
|
+
});
|
|
7166
|
+
}
|
|
7167
|
+
_context.next = 17;
|
|
7011
7168
|
break;
|
|
7012
|
-
case
|
|
7013
|
-
_context.prev =
|
|
7169
|
+
case 14:
|
|
7170
|
+
_context.prev = 14;
|
|
7014
7171
|
_context.t0 = _context["catch"](4);
|
|
7015
7172
|
dispatch({
|
|
7016
7173
|
type: 'search-error'
|
|
7017
7174
|
});
|
|
7018
|
-
case
|
|
7175
|
+
case 17:
|
|
7019
7176
|
case "end":
|
|
7020
7177
|
return _context.stop();
|
|
7021
7178
|
}
|
|
7022
|
-
}, _callee, null, [[4,
|
|
7179
|
+
}, _callee, null, [[4, 14]]);
|
|
7023
7180
|
}));
|
|
7024
7181
|
return function () {
|
|
7025
7182
|
return _ref2.apply(this, arguments);
|
|
@@ -7178,7 +7335,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
7178
7335
|
};
|
|
7179
7336
|
}
|
|
7180
7337
|
|
|
7181
|
-
var _excluded$
|
|
7338
|
+
var _excluded$m = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
7182
7339
|
function InputAddress(_ref) {
|
|
7183
7340
|
var initialValue = _ref.initialValue,
|
|
7184
7341
|
_ref$itemToString = _ref.itemToString,
|
|
@@ -7186,7 +7343,7 @@ function InputAddress(_ref) {
|
|
|
7186
7343
|
errorElement = _ref.errorElement,
|
|
7187
7344
|
emptyResultsElement = _ref.emptyResultsElement,
|
|
7188
7345
|
_onChange = _ref.onChange,
|
|
7189
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7346
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
7190
7347
|
var _useGoogleMapsAutocom = useGoogleMapsAutocomplete(),
|
|
7191
7348
|
state = _useGoogleMapsAutocom.state,
|
|
7192
7349
|
_onInputChange = _useGoogleMapsAutocom.onInputChange,
|
|
@@ -7283,10 +7440,10 @@ var InputIban = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
7283
7440
|
}, props));
|
|
7284
7441
|
});
|
|
7285
7442
|
|
|
7286
|
-
var _excluded$
|
|
7443
|
+
var _excluded$l = ["onChange"];
|
|
7287
7444
|
var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7288
7445
|
var onChange = _ref.onChange,
|
|
7289
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7446
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7290
7447
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7291
7448
|
ref: ref
|
|
7292
7449
|
}, props), {}, {
|
|
@@ -7303,11 +7460,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7303
7460
|
}));
|
|
7304
7461
|
});
|
|
7305
7462
|
|
|
7306
|
-
var _excluded$
|
|
7463
|
+
var _excluded$k = ["isPasswordDefaultVisible", "right"];
|
|
7307
7464
|
var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7308
7465
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
7309
7466
|
right = _ref.right,
|
|
7310
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7467
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7311
7468
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
7312
7469
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7313
7470
|
isVisible = _useState2[0],
|
|
@@ -7335,7 +7492,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7335
7492
|
}));
|
|
7336
7493
|
});
|
|
7337
7494
|
|
|
7338
|
-
var _excluded$
|
|
7495
|
+
var _excluded$j = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
7339
7496
|
function isPhoneNumberValid(number) {
|
|
7340
7497
|
return isValidNumber(number);
|
|
7341
7498
|
}
|
|
@@ -7349,7 +7506,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7349
7506
|
_ref$phoneNumberLengt = _ref.phoneNumberLength,
|
|
7350
7507
|
phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
|
|
7351
7508
|
onChange = _ref.onChange,
|
|
7352
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7509
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7353
7510
|
var currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
7354
7511
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
7355
7512
|
ref: ref
|
|
@@ -7786,7 +7943,7 @@ function RadioButton(_ref) {
|
|
|
7786
7943
|
});
|
|
7787
7944
|
}
|
|
7788
7945
|
|
|
7789
|
-
var _excluded$
|
|
7946
|
+
var _excluded$i = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7790
7947
|
function RadioButtonGroupItem(_ref) {
|
|
7791
7948
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7792
7949
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7799,7 +7956,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7799
7956
|
onFocus = _ref2.onFocus,
|
|
7800
7957
|
onBlur = _ref2.onBlur,
|
|
7801
7958
|
onChange = _ref2.onChange,
|
|
7802
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7959
|
+
props = _objectWithoutProperties(_ref2, _excluded$i);
|
|
7803
7960
|
var _useState = useState(value),
|
|
7804
7961
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7805
7962
|
currentValue = _useState2[0],
|
|
@@ -7831,12 +7988,12 @@ function RadioButtonGroup(_ref2) {
|
|
|
7831
7988
|
}
|
|
7832
7989
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7833
7990
|
|
|
7834
|
-
var _excluded$
|
|
7991
|
+
var _excluded$h = ["helper", "limit"];
|
|
7835
7992
|
var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7836
7993
|
var _props$value, _props$value2;
|
|
7837
7994
|
var helper = _ref.helper,
|
|
7838
7995
|
limit = _ref.limit,
|
|
7839
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7996
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
7840
7997
|
var shouldDisplayLimit = limit && limit > 0;
|
|
7841
7998
|
var isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7842
7999
|
var limitContainerAnimatedStyle = useAnimatedStyle(function () {
|
|
@@ -7995,7 +8152,7 @@ function ToggleAnimated(_ref) {
|
|
|
7995
8152
|
});
|
|
7996
8153
|
}
|
|
7997
8154
|
|
|
7998
|
-
var _excluded$
|
|
8155
|
+
var _excluded$g = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7999
8156
|
var getLabelTypographyType = function (size) {
|
|
8000
8157
|
return size === 'medium' ? 'body-m' : 'body-l';
|
|
8001
8158
|
};
|
|
@@ -8017,7 +8174,7 @@ function Toggle(_ref) {
|
|
|
8017
8174
|
value = _ref$value === void 0 ? false : _ref$value,
|
|
8018
8175
|
_ref$onChange = _ref.onChange,
|
|
8019
8176
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
8020
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8177
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
8021
8178
|
var theme = useKittTheme();
|
|
8022
8179
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
8023
8180
|
alignItems: "center"
|
|
@@ -8056,13 +8213,13 @@ function Toggle(_ref) {
|
|
|
8056
8213
|
}));
|
|
8057
8214
|
}
|
|
8058
8215
|
|
|
8059
|
-
var _excluded$
|
|
8216
|
+
var _excluded$f = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
8060
8217
|
function FullscreenModalBody(_ref) {
|
|
8061
8218
|
var children = _ref.children,
|
|
8062
8219
|
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
8063
8220
|
style = _ref.style,
|
|
8064
8221
|
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
8065
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8222
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
8066
8223
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8067
8224
|
bottom = _useSafeAreaInsets.bottom,
|
|
8068
8225
|
top = _useSafeAreaInsets.top;
|
|
@@ -8082,14 +8239,14 @@ function FullscreenModalBody(_ref) {
|
|
|
8082
8239
|
}));
|
|
8083
8240
|
}
|
|
8084
8241
|
|
|
8085
|
-
var _excluded$
|
|
8242
|
+
var _excluded$e = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
8086
8243
|
function FullscreenModalFooter(_ref) {
|
|
8087
8244
|
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
8088
8245
|
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
8089
8246
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
8090
8247
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
8091
8248
|
children = _ref.children,
|
|
8092
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8249
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
8093
8250
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8094
8251
|
bottom = _useSafeAreaInsets.bottom;
|
|
8095
8252
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
@@ -8114,11 +8271,10 @@ function NativeOpacityAnimation(_ref) {
|
|
|
8114
8271
|
var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.overlay,
|
|
8115
8272
|
duration = _theme$kitt$fullscree.duration,
|
|
8116
8273
|
easing = _theme$kitt$fullscree.easing;
|
|
8117
|
-
var
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
y2 = _easing[3];
|
|
8274
|
+
var x1 = easing.x1,
|
|
8275
|
+
y1 = easing.y1,
|
|
8276
|
+
x2 = easing.x2,
|
|
8277
|
+
y2 = easing.y2;
|
|
8122
8278
|
return {
|
|
8123
8279
|
opacity: withTiming(visible ? 1 : 0, {
|
|
8124
8280
|
duration: duration,
|
|
@@ -8154,11 +8310,10 @@ function NativeSlideInAnimation(_ref) {
|
|
|
8154
8310
|
var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.content,
|
|
8155
8311
|
duration = _theme$kitt$fullscree.duration,
|
|
8156
8312
|
easing = _theme$kitt$fullscree.easing;
|
|
8157
|
-
var
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
y2 = _easing[3];
|
|
8313
|
+
var x1 = easing.x1,
|
|
8314
|
+
y1 = easing.y1,
|
|
8315
|
+
x2 = easing.x2,
|
|
8316
|
+
y2 = easing.y2;
|
|
8162
8317
|
return {
|
|
8163
8318
|
transform: [{
|
|
8164
8319
|
translateY: withTiming(visible ? 0 : wHeight, {
|
|
@@ -8247,13 +8402,13 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8247
8402
|
});
|
|
8248
8403
|
}
|
|
8249
8404
|
|
|
8250
|
-
var _excluded$
|
|
8405
|
+
var _excluded$d = ["children", "visible", "onClose", "onExited"];
|
|
8251
8406
|
function FullscreenModalBehaviour(_ref) {
|
|
8252
8407
|
var children = _ref.children,
|
|
8253
8408
|
visible = _ref.visible,
|
|
8254
8409
|
onClose = _ref.onClose,
|
|
8255
8410
|
onExited = _ref.onExited,
|
|
8256
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8411
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
8257
8412
|
var _useState = useState(visible),
|
|
8258
8413
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8259
8414
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -8300,7 +8455,7 @@ function FullscreenModalContainer(_ref) {
|
|
|
8300
8455
|
});
|
|
8301
8456
|
}
|
|
8302
8457
|
|
|
8303
|
-
var _excluded$
|
|
8458
|
+
var _excluded$c = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
8304
8459
|
function FullscreenModalHeader(_ref) {
|
|
8305
8460
|
var _ref$hasSeparator = _ref.hasSeparator,
|
|
8306
8461
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
@@ -8311,7 +8466,7 @@ function FullscreenModalHeader(_ref) {
|
|
|
8311
8466
|
left = _ref.left,
|
|
8312
8467
|
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
8313
8468
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
8314
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8469
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8315
8470
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8316
8471
|
top = _useSafeAreaInsets.top;
|
|
8317
8472
|
var hasRight = Boolean(right);
|
|
@@ -8686,7 +8841,7 @@ var getButtonTypeAndVariant = function (iconColor) {
|
|
|
8686
8841
|
}
|
|
8687
8842
|
};
|
|
8688
8843
|
|
|
8689
|
-
var _excluded$
|
|
8844
|
+
var _excluded$b = ["color", "ariaLabel"];
|
|
8690
8845
|
/**
|
|
8691
8846
|
* @deprecated IconButton should only be used as a navigation button
|
|
8692
8847
|
* Other use cases should use a <Button> component with an icon
|
|
@@ -8695,7 +8850,7 @@ function IconButton(_ref) {
|
|
|
8695
8850
|
var _ref$color = _ref.color,
|
|
8696
8851
|
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
8697
8852
|
_ref.ariaLabel;
|
|
8698
|
-
var props = _objectWithoutProperties(_ref, _excluded$
|
|
8853
|
+
var props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8699
8854
|
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
8700
8855
|
legacyColorToType = _getButtonTypeAndVari.type,
|
|
8701
8856
|
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
@@ -8832,12 +8987,11 @@ var SvgPinMarkerinline = function SvgPinMarkerinline(props) {
|
|
|
8832
8987
|
width: 34,
|
|
8833
8988
|
height: 36,
|
|
8834
8989
|
viewBox: "0 0 34 36",
|
|
8835
|
-
fill: "
|
|
8990
|
+
fill: "currentColor",
|
|
8836
8991
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8837
8992
|
}, props), {}, {
|
|
8838
8993
|
children: [/*#__PURE__*/jsx("path", {
|
|
8839
8994
|
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",
|
|
8840
|
-
fill: "#7B66FF",
|
|
8841
8995
|
stroke: "#fff"
|
|
8842
8996
|
}), /*#__PURE__*/jsx("path", {
|
|
8843
8997
|
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",
|
|
@@ -8865,6 +9019,13 @@ var SvgShadowinline = function SvgShadowinline(props) {
|
|
|
8865
9019
|
}));
|
|
8866
9020
|
};
|
|
8867
9021
|
|
|
9022
|
+
var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
9023
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
9024
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
9025
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
9026
|
+
return MapMarkerVariantEnum;
|
|
9027
|
+
}({});
|
|
9028
|
+
|
|
8868
9029
|
var SCALE_DURATION = 300;
|
|
8869
9030
|
var TRANSLATE_Y_DURATION = 150;
|
|
8870
9031
|
var useNativeAnimation = function (_ref) {
|
|
@@ -8919,19 +9080,13 @@ var getBackgroundColor = function (_ref) {
|
|
|
8919
9080
|
var isHovered = _ref.isHovered,
|
|
8920
9081
|
isSelected = _ref.isSelected,
|
|
8921
9082
|
variant = _ref.variant;
|
|
8922
|
-
if (variant ===
|
|
9083
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
8923
9084
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home["default"];
|
|
8924
9085
|
}
|
|
8925
9086
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
8926
9087
|
};
|
|
8927
9088
|
|
|
8928
|
-
var _excluded$
|
|
8929
|
-
var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8930
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
8931
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8932
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8933
|
-
return MapMarkerVariantEnum;
|
|
8934
|
-
}({});
|
|
9089
|
+
var _excluded$a = ["onPress", "testID"];
|
|
8935
9090
|
function StaticMapMarker$1(_ref) {
|
|
8936
9091
|
var variant = _ref.variant,
|
|
8937
9092
|
isHovered = _ref.isHovered,
|
|
@@ -8990,7 +9145,7 @@ function StaticMapMarker$1(_ref) {
|
|
|
8990
9145
|
function MapMarker(_ref2) {
|
|
8991
9146
|
var onPress = _ref2.onPress,
|
|
8992
9147
|
testID = _ref2.testID,
|
|
8993
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
9148
|
+
props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
8994
9149
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8995
9150
|
testID: testID,
|
|
8996
9151
|
onPress: onPress,
|
|
@@ -9139,6 +9294,7 @@ var overridenNativeBaseSizeandSpaceScale = Object.fromEntries([1, 2, 3, 4, 5, 6,
|
|
|
9139
9294
|
}));
|
|
9140
9295
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type -- let typescript infer types
|
|
9141
9296
|
function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
9297
|
+
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;
|
|
9142
9298
|
var spaces = createKittSpaces(theme);
|
|
9143
9299
|
var appBreakpoints = (appTheme === null || appTheme === void 0 ? void 0 : appTheme.breakpoints) || {};
|
|
9144
9300
|
var extendedTheme = extendTheme({
|
|
@@ -9841,6 +9997,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9841
9997
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
9842
9998
|
}
|
|
9843
9999
|
}
|
|
10000
|
+
},
|
|
10001
|
+
tabBar: {
|
|
10002
|
+
underline: {
|
|
10003
|
+
"default": {
|
|
10004
|
+
active: {
|
|
10005
|
+
color: {
|
|
10006
|
+
"default": theme.tabBar.underline["default"].active.color["default"],
|
|
10007
|
+
focused: theme.tabBar.underline["default"].active.color.focused,
|
|
10008
|
+
hovered: theme.tabBar.underline["default"].active.color.hovered,
|
|
10009
|
+
pressed: theme.tabBar.underline["default"].active.color.pressed
|
|
10010
|
+
},
|
|
10011
|
+
indicator: {
|
|
10012
|
+
backgroundColor: theme.tabBar.underline["default"].active.indicator.backgroundColor
|
|
10013
|
+
}
|
|
10014
|
+
},
|
|
10015
|
+
inactive: {
|
|
10016
|
+
color: {
|
|
10017
|
+
"default": theme.tabBar.underline["default"].inactive.color["default"],
|
|
10018
|
+
focused: theme.tabBar.underline["default"].inactive.color.focused,
|
|
10019
|
+
hovered: theme.tabBar.underline["default"].inactive.color.hovered,
|
|
10020
|
+
pressed: theme.tabBar.underline["default"].inactive.color.pressed
|
|
10021
|
+
}
|
|
10022
|
+
},
|
|
10023
|
+
disabled: {
|
|
10024
|
+
color: {
|
|
10025
|
+
"default": theme.tabBar.underline["default"].disabled.color["default"],
|
|
10026
|
+
focused: theme.tabBar.underline["default"].disabled.color.focused,
|
|
10027
|
+
hovered: theme.tabBar.underline["default"].disabled.color.hovered,
|
|
10028
|
+
pressed: theme.tabBar.underline["default"].disabled.color.pressed
|
|
10029
|
+
}
|
|
10030
|
+
},
|
|
10031
|
+
borderBottomColor: theme.tabBar.underline["default"].borderBottomColor
|
|
10032
|
+
},
|
|
10033
|
+
revert: {
|
|
10034
|
+
active: {
|
|
10035
|
+
color: {
|
|
10036
|
+
"default": theme.tabBar.underline.revert.active.color["default"],
|
|
10037
|
+
focused: theme.tabBar.underline.revert.active.color.focused,
|
|
10038
|
+
hovered: theme.tabBar.underline.revert.active.color.hovered,
|
|
10039
|
+
pressed: theme.tabBar.underline.revert.active.color.pressed
|
|
10040
|
+
},
|
|
10041
|
+
indicator: {
|
|
10042
|
+
backgroundColor: theme.tabBar.underline.revert.active.indicator.backgroundColor
|
|
10043
|
+
}
|
|
10044
|
+
},
|
|
10045
|
+
inactive: {
|
|
10046
|
+
color: {
|
|
10047
|
+
"default": theme.tabBar.underline.revert.inactive.color["default"],
|
|
10048
|
+
focused: theme.tabBar.underline.revert.inactive.color.focused,
|
|
10049
|
+
hovered: theme.tabBar.underline.revert.inactive.color.hovered,
|
|
10050
|
+
pressed: theme.tabBar.underline.revert.inactive.color.pressed
|
|
10051
|
+
}
|
|
10052
|
+
},
|
|
10053
|
+
disabled: {
|
|
10054
|
+
color: {
|
|
10055
|
+
"default": theme.tabBar.underline.revert.disabled.color["default"],
|
|
10056
|
+
focused: theme.tabBar.underline.revert.disabled.color.focused,
|
|
10057
|
+
hovered: theme.tabBar.underline.revert.disabled.color.hovered,
|
|
10058
|
+
pressed: theme.tabBar.underline.revert.disabled.color.pressed
|
|
10059
|
+
}
|
|
10060
|
+
},
|
|
10061
|
+
borderBottomColor: theme.tabBar.underline.revert.borderBottomColor
|
|
10062
|
+
}
|
|
10063
|
+
},
|
|
10064
|
+
solid: {
|
|
10065
|
+
"default": {
|
|
10066
|
+
active: {
|
|
10067
|
+
color: {
|
|
10068
|
+
"default": theme.tabBar.solid["default"].active.color["default"],
|
|
10069
|
+
focused: theme.tabBar.solid["default"].active.color.focused,
|
|
10070
|
+
hovered: theme.tabBar.solid["default"].active.color.hovered,
|
|
10071
|
+
pressed: theme.tabBar.solid["default"].active.color.pressed
|
|
10072
|
+
},
|
|
10073
|
+
backgroundColor: {
|
|
10074
|
+
"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"],
|
|
10075
|
+
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,
|
|
10076
|
+
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,
|
|
10077
|
+
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
|
|
10078
|
+
}
|
|
10079
|
+
},
|
|
10080
|
+
inactive: {
|
|
10081
|
+
color: {
|
|
10082
|
+
"default": theme.tabBar.solid["default"].inactive.color["default"],
|
|
10083
|
+
focused: theme.tabBar.solid["default"].inactive.color.focused,
|
|
10084
|
+
hovered: theme.tabBar.solid["default"].inactive.color.hovered,
|
|
10085
|
+
pressed: theme.tabBar.solid["default"].inactive.color.pressed
|
|
10086
|
+
},
|
|
10087
|
+
backgroundColor: {
|
|
10088
|
+
"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"],
|
|
10089
|
+
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,
|
|
10090
|
+
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,
|
|
10091
|
+
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
|
|
10092
|
+
}
|
|
10093
|
+
},
|
|
10094
|
+
disabled: {
|
|
10095
|
+
color: {
|
|
10096
|
+
"default": theme.tabBar.solid["default"].disabled.color["default"],
|
|
10097
|
+
focused: theme.tabBar.solid["default"].disabled.color.focused,
|
|
10098
|
+
hovered: theme.tabBar.solid["default"].disabled.color.hovered,
|
|
10099
|
+
pressed: theme.tabBar.solid["default"].disabled.color.pressed
|
|
10100
|
+
}
|
|
10101
|
+
}
|
|
10102
|
+
},
|
|
10103
|
+
revert: {
|
|
10104
|
+
active: {
|
|
10105
|
+
color: {
|
|
10106
|
+
"default": theme.tabBar.solid.revert.active.color["default"],
|
|
10107
|
+
focused: theme.tabBar.solid.revert.active.color.focused,
|
|
10108
|
+
hovered: theme.tabBar.solid.revert.active.color.hovered,
|
|
10109
|
+
pressed: theme.tabBar.solid.revert.active.color.pressed
|
|
10110
|
+
},
|
|
10111
|
+
backgroundColor: {
|
|
10112
|
+
"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"],
|
|
10113
|
+
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,
|
|
10114
|
+
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,
|
|
10115
|
+
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
|
|
10116
|
+
}
|
|
10117
|
+
},
|
|
10118
|
+
inactive: {
|
|
10119
|
+
color: {
|
|
10120
|
+
"default": theme.tabBar.solid.revert.inactive.color["default"],
|
|
10121
|
+
focused: theme.tabBar.solid.revert.inactive.color.focused,
|
|
10122
|
+
hovered: theme.tabBar.solid.revert.inactive.color.hovered,
|
|
10123
|
+
pressed: theme.tabBar.solid.revert.inactive.color.pressed
|
|
10124
|
+
},
|
|
10125
|
+
backgroundColor: {
|
|
10126
|
+
"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"],
|
|
10127
|
+
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,
|
|
10128
|
+
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,
|
|
10129
|
+
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
|
|
10130
|
+
}
|
|
10131
|
+
},
|
|
10132
|
+
disabled: {
|
|
10133
|
+
color: {
|
|
10134
|
+
"default": theme.tabBar.solid.revert.disabled.color["default"],
|
|
10135
|
+
focused: theme.tabBar.solid.revert.disabled.color.focused,
|
|
10136
|
+
hovered: theme.tabBar.solid.revert.disabled.color.hovered,
|
|
10137
|
+
pressed: theme.tabBar.solid.revert.disabled.color.pressed
|
|
10138
|
+
}
|
|
10139
|
+
}
|
|
10140
|
+
}
|
|
10141
|
+
}
|
|
9844
10142
|
}
|
|
9845
10143
|
}),
|
|
9846
10144
|
app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.colors
|
|
@@ -9916,6 +10214,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9916
10214
|
highlight: {
|
|
9917
10215
|
borderRadius: theme.highlight.borderRadius
|
|
9918
10216
|
},
|
|
10217
|
+
tabBar: {
|
|
10218
|
+
underline: {
|
|
10219
|
+
"default": {
|
|
10220
|
+
active: {
|
|
10221
|
+
borderRadius: theme.tabBar.underline["default"].active.borderRadius
|
|
10222
|
+
},
|
|
10223
|
+
inactive: {
|
|
10224
|
+
borderRadius: theme.tabBar.underline["default"].inactive.borderRadius
|
|
10225
|
+
}
|
|
10226
|
+
},
|
|
10227
|
+
revert: {
|
|
10228
|
+
active: {
|
|
10229
|
+
borderRadius: theme.tabBar.underline.revert.active.borderRadius
|
|
10230
|
+
},
|
|
10231
|
+
inactive: {
|
|
10232
|
+
borderRadius: theme.tabBar.underline.revert.inactive.borderRadius
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
},
|
|
10236
|
+
solid: {
|
|
10237
|
+
"default": {
|
|
10238
|
+
active: {
|
|
10239
|
+
borderRadius: theme.tabBar.solid["default"].active.borderRadius
|
|
10240
|
+
},
|
|
10241
|
+
inactive: {
|
|
10242
|
+
borderRadius: theme.tabBar.solid["default"].inactive.borderRadius
|
|
10243
|
+
}
|
|
10244
|
+
},
|
|
10245
|
+
revert: {
|
|
10246
|
+
active: {
|
|
10247
|
+
borderRadius: theme.tabBar.solid.revert.active.borderRadius
|
|
10248
|
+
},
|
|
10249
|
+
inactive: {
|
|
10250
|
+
borderRadius: theme.tabBar.solid.revert.inactive.borderRadius
|
|
10251
|
+
}
|
|
10252
|
+
}
|
|
10253
|
+
}
|
|
10254
|
+
},
|
|
9919
10255
|
tag: {
|
|
9920
10256
|
borderRadius: theme.tag.borderRadius
|
|
9921
10257
|
},
|
|
@@ -11551,7 +11887,7 @@ NavigationBottomSheet.Header = NavigationBottomSheetHeader;
|
|
|
11551
11887
|
NavigationBottomSheet.Body = NavigationBottomSheetBody;
|
|
11552
11888
|
NavigationBottomSheet.Footer = NavigationBottomSheetFooter;
|
|
11553
11889
|
|
|
11554
|
-
var _excluded$
|
|
11890
|
+
var _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
11555
11891
|
function NavigationModalBehaviour(_ref) {
|
|
11556
11892
|
var children = _ref.children,
|
|
11557
11893
|
visible = _ref.visible,
|
|
@@ -11561,7 +11897,7 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11561
11897
|
onEnter = _ref.onEnter,
|
|
11562
11898
|
onExit = _ref.onExit,
|
|
11563
11899
|
onClose = _ref.onClose,
|
|
11564
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11900
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
11565
11901
|
var AnimationComponent = useBreakpointValue({
|
|
11566
11902
|
base: FullscreenModalAnimation,
|
|
11567
11903
|
small: CardModalAnimation
|
|
@@ -12154,7 +12490,7 @@ function SkeletonContent(_ref) {
|
|
|
12154
12490
|
});
|
|
12155
12491
|
}
|
|
12156
12492
|
|
|
12157
|
-
var _excluded$
|
|
12493
|
+
var _excluded$8 = ["isLoading", "style"],
|
|
12158
12494
|
_excluded2$1 = ["size"],
|
|
12159
12495
|
_excluded3$1 = ["size"],
|
|
12160
12496
|
_excluded4$1 = ["size"];
|
|
@@ -12162,7 +12498,7 @@ function Skeleton(_ref) {
|
|
|
12162
12498
|
var _ref$isLoading = _ref.isLoading,
|
|
12163
12499
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
12164
12500
|
style = _ref.style,
|
|
12165
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12501
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
12166
12502
|
var _useState = useState(0),
|
|
12167
12503
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12168
12504
|
width = _useState2[0],
|
|
@@ -12341,7 +12677,7 @@ function getShouldDisplay2x() {
|
|
|
12341
12677
|
return currentDevicePixelRatio > 1;
|
|
12342
12678
|
}
|
|
12343
12679
|
|
|
12344
|
-
var _excluded$
|
|
12680
|
+
var _excluded$7 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
|
|
12345
12681
|
var mapBoxMaxPictureWidth = 1280;
|
|
12346
12682
|
|
|
12347
12683
|
// Mapbox requestable width for image is between 1 - 1280px
|
|
@@ -12359,7 +12695,7 @@ function StaticMap(_ref) {
|
|
|
12359
12695
|
center = _ref.center,
|
|
12360
12696
|
onLoaded = _ref.onLoaded,
|
|
12361
12697
|
onError = _ref.onError,
|
|
12362
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12698
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
12363
12699
|
var _useState = useState(getPictureWidth(width)),
|
|
12364
12700
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12365
12701
|
currentWidth = _useState2[0],
|
|
@@ -12449,12 +12785,12 @@ StaticMap.Loader = StaticMapLoader;
|
|
|
12449
12785
|
StaticMap.Error = StaticMapError;
|
|
12450
12786
|
StaticMap.Marker = StaticMapMarker;
|
|
12451
12787
|
|
|
12452
|
-
var _excluded$
|
|
12788
|
+
var _excluded$6 = ["direction", "wrap"];
|
|
12453
12789
|
function Flex(_ref) {
|
|
12454
12790
|
var direction = _ref.direction,
|
|
12455
12791
|
_ref$wrap = _ref.wrap,
|
|
12456
12792
|
wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
|
|
12457
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12793
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
12458
12794
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12459
12795
|
flexDirection: direction,
|
|
12460
12796
|
flexWrap: wrap
|
|
@@ -12592,7 +12928,7 @@ function Story(_ref) {
|
|
|
12592
12928
|
});
|
|
12593
12929
|
}
|
|
12594
12930
|
|
|
12595
|
-
var _excluded$
|
|
12931
|
+
var _excluded$5 = ["title", "children", "internalIsDemoSection"],
|
|
12596
12932
|
_excluded2 = ["title", "children"],
|
|
12597
12933
|
_excluded3 = ["title", "children"],
|
|
12598
12934
|
_excluded4 = ["children"];
|
|
@@ -12600,7 +12936,7 @@ function StorySection(_ref) {
|
|
|
12600
12936
|
var title = _ref.title,
|
|
12601
12937
|
children = _ref.children,
|
|
12602
12938
|
internalIsDemoSection = _ref.internalIsDemoSection,
|
|
12603
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12939
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
12604
12940
|
if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
|
|
12605
12941
|
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
12606
12942
|
marginBottom: "kitt.8"
|
|
@@ -12740,99 +13076,100 @@ var StoryGrid = {
|
|
|
12740
13076
|
Col: StoryGridCol
|
|
12741
13077
|
};
|
|
12742
13078
|
|
|
12743
|
-
function
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
}
|
|
12759
|
-
}
|
|
12760
|
-
}
|
|
12761
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
12762
|
-
var _useKittTheme2 = useKittTheme(),
|
|
12763
|
-
kittTheme = _useKittTheme2.kitt;
|
|
12764
|
-
switch (color) {
|
|
12765
|
-
case 'black':
|
|
12766
|
-
{
|
|
12767
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12768
|
-
}
|
|
12769
|
-
case 'white':
|
|
12770
|
-
{
|
|
12771
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
12772
|
-
}
|
|
12773
|
-
default:
|
|
12774
|
-
{
|
|
12775
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
12776
|
-
}
|
|
12777
|
-
}
|
|
12778
|
-
}
|
|
13079
|
+
var getVariantFromColor = function (color) {
|
|
13080
|
+
if (color === 'white') return 'revert';
|
|
13081
|
+
return 'default';
|
|
13082
|
+
};
|
|
13083
|
+
var getTabBarItemActiveState = function (isActive, disabled) {
|
|
13084
|
+
if (disabled) return 'disabled';
|
|
13085
|
+
if (isActive) return 'active';
|
|
13086
|
+
return 'inactive';
|
|
13087
|
+
};
|
|
13088
|
+
var getTabBarItemState = function (isHovered, isPressed, isFocused) {
|
|
13089
|
+
if (isHovered) return 'hovered';
|
|
13090
|
+
if (isPressed) return 'pressed';
|
|
13091
|
+
if (isFocused) return 'focused';
|
|
13092
|
+
return 'default';
|
|
13093
|
+
};
|
|
12779
13094
|
function TabBarItem(_ref) {
|
|
12780
13095
|
var name = _ref.name,
|
|
12781
13096
|
icon = _ref.icon,
|
|
12782
|
-
_ref$
|
|
12783
|
-
|
|
13097
|
+
_ref$variant = _ref.variant,
|
|
13098
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13099
|
+
_ref$type = _ref.type,
|
|
13100
|
+
type = _ref$type === void 0 ? 'underline' : _ref$type,
|
|
13101
|
+
color = _ref.color,
|
|
12784
13102
|
testID = _ref.testID,
|
|
13103
|
+
disabled = _ref.disabled,
|
|
12785
13104
|
_ref$isActive = _ref.isActive,
|
|
12786
13105
|
isActive = _ref$isActive === void 0 ? false : _ref$isActive,
|
|
13106
|
+
_ref$isFocusedInterna = _ref.isFocusedInternal,
|
|
13107
|
+
isFocusedInternal = _ref$isFocusedInterna === void 0 ? false : _ref$isFocusedInterna,
|
|
13108
|
+
_ref$isHoveredInterna = _ref.isHoveredInternal,
|
|
13109
|
+
isHoveredInternal = _ref$isHoveredInterna === void 0 ? false : _ref$isHoveredInterna,
|
|
13110
|
+
_ref$isPressedInterna = _ref.isPressedInternal,
|
|
13111
|
+
isPressedInternal = _ref$isPressedInterna === void 0 ? false : _ref$isPressedInterna,
|
|
12787
13112
|
onPress = _ref.onPress;
|
|
12788
|
-
|
|
12789
|
-
var
|
|
13113
|
+
// Keep backward compatibility with color property
|
|
13114
|
+
var definedVariant = color ? getVariantFromColor(color) : variant;
|
|
13115
|
+
var activeState = getTabBarItemActiveState(isActive, disabled);
|
|
13116
|
+
var baseTheme = "kitt.tabBar.".concat(type, ".").concat(definedVariant, ".").concat(activeState);
|
|
12790
13117
|
return /*#__PURE__*/jsx(Pressable, {
|
|
13118
|
+
disabled: disabled,
|
|
12791
13119
|
testID: testID,
|
|
12792
13120
|
onPress: onPress,
|
|
12793
|
-
children:
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
13121
|
+
children: function children(_ref2) {
|
|
13122
|
+
var isHovered = _ref2.isHovered,
|
|
13123
|
+
isPressed = _ref2.isPressed,
|
|
13124
|
+
isFocused = _ref2.isFocused;
|
|
13125
|
+
var state = getTabBarItemState(isHovered || isHoveredInternal, isPressed || isPressedInternal, isFocused || isFocusedInternal);
|
|
13126
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
13127
|
+
alignItems: "center",
|
|
13128
|
+
position: "relative",
|
|
13129
|
+
paddingY: "kitt.2",
|
|
13130
|
+
paddingRight: "kitt.2",
|
|
13131
|
+
paddingLeft: icon ? undefined : 'kitt.2',
|
|
13132
|
+
backgroundColor: "".concat(baseTheme, ".backgroundColor.").concat(state),
|
|
13133
|
+
borderRadius: "".concat(baseTheme, ".borderRadius"),
|
|
13134
|
+
children: [icon ? /*#__PURE__*/jsx(View, {
|
|
13135
|
+
marginRight: "kitt.2",
|
|
13136
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
13137
|
+
color: "".concat(baseTheme, ".color.").concat(state),
|
|
13138
|
+
icon: icon
|
|
13139
|
+
})
|
|
13140
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13141
|
+
base: "label-large",
|
|
13142
|
+
numberOfLines: 1,
|
|
13143
|
+
color: "".concat(baseTheme, ".color.").concat(state),
|
|
13144
|
+
children: name
|
|
13145
|
+
}), type !== 'solid' ? /*#__PURE__*/jsx(View, {
|
|
13146
|
+
backgroundColor: "".concat(baseTheme, ".indicator.backgroundColor"),
|
|
13147
|
+
position: "absolute",
|
|
13148
|
+
bottom: -1 // in order to be over tab bar's border bottom
|
|
13149
|
+
,
|
|
13150
|
+
left: 0,
|
|
13151
|
+
right: 0,
|
|
13152
|
+
height: 2
|
|
13153
|
+
}) : null]
|
|
13154
|
+
});
|
|
13155
|
+
}
|
|
12818
13156
|
});
|
|
12819
13157
|
}
|
|
12820
13158
|
|
|
12821
|
-
var _excluded$5 = ["tabs", "color", "align", "activeTabIndex", "renderTabItem", "onChangeTab"];
|
|
12822
13159
|
function TabBar(_ref) {
|
|
12823
13160
|
var tabs = _ref.tabs,
|
|
12824
|
-
_ref$
|
|
12825
|
-
|
|
13161
|
+
_ref$variant = _ref.variant,
|
|
13162
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13163
|
+
_ref$type = _ref.type,
|
|
13164
|
+
type = _ref$type === void 0 ? 'underline' : _ref$type,
|
|
12826
13165
|
_ref$align = _ref.align,
|
|
12827
13166
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
13167
|
+
color = _ref.color,
|
|
12828
13168
|
_ref$activeTabIndex = _ref.activeTabIndex,
|
|
12829
13169
|
activeTabIndex = _ref$activeTabIndex === void 0 ? 0 : _ref$activeTabIndex,
|
|
12830
13170
|
renderTabItem = _ref.renderTabItem,
|
|
12831
|
-
onChangeTab = _ref.onChangeTab
|
|
12832
|
-
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
13171
|
+
onChangeTab = _ref.onChangeTab;
|
|
12833
13172
|
var sx = useSx();
|
|
12834
|
-
var _useKittTheme = useKittTheme(),
|
|
12835
|
-
kittTheme = _useKittTheme.kitt;
|
|
12836
13173
|
var tabItems = tabs.map(function (tab, index) {
|
|
12837
13174
|
return renderTabItem({
|
|
12838
13175
|
tab: tab,
|
|
@@ -12840,29 +13177,40 @@ function TabBar(_ref) {
|
|
|
12840
13177
|
isActive: activeTabIndex === index
|
|
12841
13178
|
});
|
|
12842
13179
|
});
|
|
12843
|
-
var
|
|
13180
|
+
var styles = {
|
|
12844
13181
|
justifyContent: align,
|
|
12845
13182
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
12846
|
-
minWidth: '100%'
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
13183
|
+
minWidth: '100%'
|
|
13184
|
+
};
|
|
13185
|
+
|
|
13186
|
+
// Keep backward compatibility with color property
|
|
13187
|
+
var definedVariant = color ? getVariantFromColor(color) : variant;
|
|
13188
|
+
if (type !== 'solid') {
|
|
13189
|
+
styles = _objectSpread(_objectSpread({}, styles), {}, {
|
|
13190
|
+
borderBottomWidth: 1,
|
|
13191
|
+
borderBottomColor: "kitt.tabBar.".concat(type, ".").concat(definedVariant, ".borderBottomColor")
|
|
13192
|
+
});
|
|
13193
|
+
}
|
|
13194
|
+
var scrollViewStyles = sx(styles);
|
|
13195
|
+
var space = type === 'solid' ? 'kitt.2' : 'kitt.4';
|
|
12850
13196
|
return /*#__PURE__*/jsx(ScrollView, {
|
|
12851
13197
|
horizontal: true,
|
|
12852
13198
|
showsHorizontalScrollIndicator: false,
|
|
12853
13199
|
contentContainerStyle: scrollViewStyles,
|
|
12854
|
-
children: /*#__PURE__*/jsx(HStack,
|
|
12855
|
-
space: align === 'center' ? 'kitt.16' :
|
|
12856
|
-
}, props), {}, {
|
|
13200
|
+
children: /*#__PURE__*/jsx(HStack, {
|
|
13201
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
12857
13202
|
children: Children.map(tabItems, function (child, index) {
|
|
12858
13203
|
var tab = tabs[index];
|
|
13204
|
+
if (!tab) throw new Error("TabBar: tab is undefined at index ".concat(index));
|
|
12859
13205
|
return /*#__PURE__*/jsx(View, {
|
|
12860
13206
|
children: /*#__PURE__*/cloneElement(child, {
|
|
12861
13207
|
color: color,
|
|
13208
|
+
variant: definedVariant,
|
|
13209
|
+
type: type,
|
|
12862
13210
|
onPress: function onPress(event) {
|
|
12863
13211
|
var _child$props$onPress, _child$props;
|
|
12864
13212
|
onChangeTab({
|
|
12865
|
-
tab:
|
|
13213
|
+
tab: tab,
|
|
12866
13214
|
index: index
|
|
12867
13215
|
});
|
|
12868
13216
|
(_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
|
|
@@ -12870,7 +13218,7 @@ function TabBar(_ref) {
|
|
|
12870
13218
|
})
|
|
12871
13219
|
}, tab.key);
|
|
12872
13220
|
})
|
|
12873
|
-
})
|
|
13221
|
+
})
|
|
12874
13222
|
});
|
|
12875
13223
|
}
|
|
12876
13224
|
TabBar.Item = TabBarItem;
|