@ornikar/kitt-universal 27.4.0 → 27.5.1-canary.3a59d4ae3422049417956fa37f27d2e8f5f84aba.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +30 -0
- package/CHANGELOG.md +28 -0
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/GoogleMapsAutocompleteProvider/GoogleMapsAutocompleteProvider.d.ts.map +1 -1
- package/dist/definitions/MapMarker/MapMarker.d.ts +2 -5
- package/dist/definitions/MapMarker/MapMarker.d.ts.map +1 -1
- package/dist/definitions/MapMarker/constants.d.ts +6 -0
- package/dist/definitions/MapMarker/constants.d.ts.map +1 -0
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts +2 -1
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
- package/dist/definitions/TabBar/TabBar.d.ts +6 -4
- package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts +11 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +180 -12
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -12
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/cardModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/icon.d.ts +0 -20
- package/dist/definitions/themes/late-ocean/icon.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/shadows.d.ts +4 -2
- package/dist/definitions/themes/late-ocean/shadows.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/skeleton.d.ts +2 -1
- package/dist/definitions/themes/late-ocean/skeleton.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tabBar.d.ts +34 -0
- package/dist/definitions/themes/late-ocean/tabBar.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts +2 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +665 -289
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +665 -289
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +555 -178
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +2 -2
- package/dist/index-node-22.17.cjs.web.js +522 -172
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +555 -178
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +2 -2
- package/dist/index-node-22.17.es.web.mjs +522 -172
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +664 -316
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +641 -284
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +219 -46
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +219 -46
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +219 -46
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +219 -46
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +219 -46
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +219 -46
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +219 -46
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +219 -46
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/scripts/codemods/__testfixtures__/card-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/card-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/card-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/card-modal/wrongOrder.output.js +15 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.input.tsx +11 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.output.tsx +17 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.input.tsx +88 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.output.tsx +94 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.input.tsx +21 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/fullscreen-modal/wrongOrder.output.js +15 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/basic.input.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/basic.output.js +15 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/withExpressions.input.js +23 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/withExpressions.output.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/wrongOrder.input.js +19 -0
- package/scripts/codemods/__testfixtures__/navigation-modal/wrongOrder.output.js +15 -0
- package/scripts/codemods/__tests__/card-modal.test.js +10 -0
- package/scripts/codemods/__tests__/csf1-csf2.test.ts +10 -0
- package/scripts/codemods/__tests__/fullscreen-modal.test.js +10 -0
- package/scripts/codemods/__tests__/navigation-modal.test.js +10 -0
- package/scripts/codemods/card-modal.js +155 -0
- package/scripts/codemods/csf1-csf2.js +257 -0
- package/scripts/codemods/fullscreen-modal.js +155 -0
- package/scripts/codemods/navigation-modal.js +155 -0
- package/scripts/{run-transformers.js → run-codemods.js} +30 -32
- package/scripts/transformers/modals.js +0 -102
|
@@ -740,9 +740,19 @@ const card = {
|
|
|
740
740
|
};
|
|
741
741
|
|
|
742
742
|
const webAnimationContentDuration$2 = 400;
|
|
743
|
-
const webAnimationContentEasing$2 =
|
|
743
|
+
const webAnimationContentEasing$2 = {
|
|
744
|
+
x1: 0.77,
|
|
745
|
+
y1: 0,
|
|
746
|
+
x2: 0.175,
|
|
747
|
+
y2: 1
|
|
748
|
+
};
|
|
744
749
|
const webAnimationOverlayDuration$2 = 250;
|
|
745
|
-
const webAnimationOverlayEasing$2 =
|
|
750
|
+
const webAnimationOverlayEasing$2 = {
|
|
751
|
+
x1: 0.42,
|
|
752
|
+
y1: 0,
|
|
753
|
+
x2: 1,
|
|
754
|
+
y2: 1
|
|
755
|
+
};
|
|
746
756
|
const maxWidth = 540;
|
|
747
757
|
const overlayHorizontalPadding = 24;
|
|
748
758
|
const cardModal = {
|
|
@@ -834,9 +844,19 @@ const choices = {
|
|
|
834
844
|
};
|
|
835
845
|
|
|
836
846
|
const webAnimationContentDuration$1 = 400;
|
|
837
|
-
const webAnimationContentEasing$1 =
|
|
847
|
+
const webAnimationContentEasing$1 = {
|
|
848
|
+
x1: 0.77,
|
|
849
|
+
y1: 0,
|
|
850
|
+
x2: 0.175,
|
|
851
|
+
y2: 1
|
|
852
|
+
};
|
|
838
853
|
const webAnimationOverlayDuration$1 = 250;
|
|
839
|
-
const webAnimationOverlayEasing$1 =
|
|
854
|
+
const webAnimationOverlayEasing$1 = {
|
|
855
|
+
x1: 0.42,
|
|
856
|
+
y1: 0,
|
|
857
|
+
x2: 1,
|
|
858
|
+
y2: 1
|
|
859
|
+
};
|
|
840
860
|
const dialogModal = {
|
|
841
861
|
borderRadius: spacing * 2,
|
|
842
862
|
maxWidth: 540,
|
|
@@ -1768,9 +1788,19 @@ const forms = {
|
|
|
1768
1788
|
};
|
|
1769
1789
|
|
|
1770
1790
|
const webAnimationContentDuration = 600;
|
|
1771
|
-
const webAnimationContentEasing =
|
|
1791
|
+
const webAnimationContentEasing = {
|
|
1792
|
+
x1: 0.77,
|
|
1793
|
+
y1: 0,
|
|
1794
|
+
x2: 0.175,
|
|
1795
|
+
y2: 1
|
|
1796
|
+
};
|
|
1772
1797
|
const webAnimationOverlayDuration = 250;
|
|
1773
|
-
const webAnimationOverlayEasing =
|
|
1798
|
+
const webAnimationOverlayEasing = {
|
|
1799
|
+
x1: 0.42,
|
|
1800
|
+
y1: 0,
|
|
1801
|
+
x2: 1,
|
|
1802
|
+
y2: 1
|
|
1803
|
+
};
|
|
1774
1804
|
const fullscreenModal = {
|
|
1775
1805
|
header: {
|
|
1776
1806
|
height: 56
|
|
@@ -1863,43 +1893,8 @@ const highlight = {
|
|
|
1863
1893
|
}
|
|
1864
1894
|
};
|
|
1865
1895
|
|
|
1866
|
-
const getIconSizeFromFontSize = fontSize => {
|
|
1867
|
-
if (fontSize <= 14) return 16;
|
|
1868
|
-
if (fontSize <= 16) return 20;
|
|
1869
|
-
return 24;
|
|
1870
|
-
};
|
|
1871
|
-
const createTypographyIconSizeConfig = (baseAndSmallFontSize, mediumAndWideFontSize) => {
|
|
1872
|
-
const baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1873
|
-
const mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1874
|
-
return {
|
|
1875
|
-
baseAndSmall: {
|
|
1876
|
-
iconSize: baseAndSmallIconSize
|
|
1877
|
-
},
|
|
1878
|
-
mediumAndWide: {
|
|
1879
|
-
iconSize: mediumAndWideIconSize
|
|
1880
|
-
}
|
|
1881
|
-
};
|
|
1882
|
-
};
|
|
1883
1896
|
const icon = {
|
|
1884
|
-
defaultSize: 20
|
|
1885
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1886
|
-
typographySize: {
|
|
1887
|
-
// also known as xxlarge
|
|
1888
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1889
|
-
// also known as xlarge
|
|
1890
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1891
|
-
// also known as medium
|
|
1892
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1893
|
-
// also known as xsmall
|
|
1894
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1895
|
-
// also known as xxsmall
|
|
1896
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1897
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1898
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1899
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1900
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1901
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1902
|
-
}
|
|
1897
|
+
defaultSize: 20
|
|
1903
1898
|
};
|
|
1904
1899
|
|
|
1905
1900
|
const iconButton = {
|
|
@@ -1918,8 +1913,8 @@ const listItem = {
|
|
|
1918
1913
|
|
|
1919
1914
|
const mapMarker = {
|
|
1920
1915
|
home: {
|
|
1921
|
-
default:
|
|
1922
|
-
selected:
|
|
1916
|
+
default: deepPurpleColorPalette['grey.9'],
|
|
1917
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1923
1918
|
svg: {
|
|
1924
1919
|
height: 36
|
|
1925
1920
|
},
|
|
@@ -1929,8 +1924,8 @@ const mapMarker = {
|
|
|
1929
1924
|
}
|
|
1930
1925
|
},
|
|
1931
1926
|
meetingPoint: {
|
|
1932
|
-
default:
|
|
1933
|
-
selected:
|
|
1927
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
1928
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1934
1929
|
svg: {
|
|
1935
1930
|
width: 40,
|
|
1936
1931
|
height: 43
|
|
@@ -2326,6 +2321,183 @@ const skeleton$1 = {
|
|
|
2326
2321
|
}
|
|
2327
2322
|
};
|
|
2328
2323
|
|
|
2324
|
+
const tabBar = {
|
|
2325
|
+
underline: {
|
|
2326
|
+
default: {
|
|
2327
|
+
active: {
|
|
2328
|
+
color: {
|
|
2329
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2330
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2331
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2332
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2333
|
+
},
|
|
2334
|
+
indicator: {
|
|
2335
|
+
backgroundColor: deepPurpleColorPalette['deepPurple.8']
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
inactive: {
|
|
2339
|
+
color: {
|
|
2340
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2341
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2342
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2343
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2344
|
+
},
|
|
2345
|
+
indicator: {
|
|
2346
|
+
backgroundColor: undefined
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
disabled: {
|
|
2350
|
+
color: {
|
|
2351
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2352
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2353
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2354
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2355
|
+
},
|
|
2356
|
+
indicator: {
|
|
2357
|
+
backgroundColor: undefined
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
borderBottomColor: deepPurpleColorPalette['beige.3']
|
|
2361
|
+
},
|
|
2362
|
+
revert: {
|
|
2363
|
+
active: {
|
|
2364
|
+
color: {
|
|
2365
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2366
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2367
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2368
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2369
|
+
},
|
|
2370
|
+
indicator: {
|
|
2371
|
+
backgroundColor: deepPurpleColorPalette['grey.0']
|
|
2372
|
+
}
|
|
2373
|
+
},
|
|
2374
|
+
inactive: {
|
|
2375
|
+
color: {
|
|
2376
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2377
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2378
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2379
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2380
|
+
},
|
|
2381
|
+
indicator: {
|
|
2382
|
+
backgroundColor: undefined
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
disabled: {
|
|
2386
|
+
color: {
|
|
2387
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2388
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2389
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2390
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2391
|
+
},
|
|
2392
|
+
indicator: {
|
|
2393
|
+
backgroundColor: undefined
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
borderBottomColor: deepPurpleColorPalette['white-alpha.20']
|
|
2397
|
+
}
|
|
2398
|
+
},
|
|
2399
|
+
solid: {
|
|
2400
|
+
default: {
|
|
2401
|
+
active: {
|
|
2402
|
+
color: {
|
|
2403
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2404
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2405
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2406
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2407
|
+
},
|
|
2408
|
+
backgroundColor: {
|
|
2409
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2410
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2411
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2412
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2413
|
+
},
|
|
2414
|
+
borderRadius: 4,
|
|
2415
|
+
indicator: {
|
|
2416
|
+
backgroundColor: undefined
|
|
2417
|
+
}
|
|
2418
|
+
},
|
|
2419
|
+
inactive: {
|
|
2420
|
+
color: {
|
|
2421
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2422
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2423
|
+
hovered: deepPurpleColorPalette['grey.5'],
|
|
2424
|
+
pressed: deepPurpleColorPalette['grey.5']
|
|
2425
|
+
},
|
|
2426
|
+
backgroundColor: {
|
|
2427
|
+
default: undefined,
|
|
2428
|
+
focused: undefined,
|
|
2429
|
+
hovered: deepPurpleColorPalette['beige.1'],
|
|
2430
|
+
pressed: deepPurpleColorPalette['beige.1']
|
|
2431
|
+
},
|
|
2432
|
+
borderRadius: 4,
|
|
2433
|
+
indicator: {
|
|
2434
|
+
backgroundColor: undefined
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
disabled: {
|
|
2438
|
+
color: {
|
|
2439
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2440
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2441
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2442
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2443
|
+
},
|
|
2444
|
+
indicator: {
|
|
2445
|
+
backgroundColor: undefined
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
revert: {
|
|
2450
|
+
active: {
|
|
2451
|
+
color: {
|
|
2452
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2453
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2454
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2455
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2456
|
+
},
|
|
2457
|
+
backgroundColor: {
|
|
2458
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2459
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2460
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2461
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2462
|
+
},
|
|
2463
|
+
borderRadius: 4,
|
|
2464
|
+
indicator: {
|
|
2465
|
+
backgroundColor: undefined
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
inactive: {
|
|
2469
|
+
color: {
|
|
2470
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2471
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2472
|
+
hovered: deepPurpleColorPalette['white-alpha.80'],
|
|
2473
|
+
pressed: deepPurpleColorPalette['white-alpha.80']
|
|
2474
|
+
},
|
|
2475
|
+
backgroundColor: {
|
|
2476
|
+
default: undefined,
|
|
2477
|
+
focused: undefined,
|
|
2478
|
+
hovered: deepPurpleColorPalette['white-alpha.10'],
|
|
2479
|
+
pressed: deepPurpleColorPalette['white-alpha.10']
|
|
2480
|
+
},
|
|
2481
|
+
borderRadius: 4,
|
|
2482
|
+
indicator: {
|
|
2483
|
+
backgroundColor: undefined
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
disabled: {
|
|
2487
|
+
color: {
|
|
2488
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2489
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2490
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2491
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2492
|
+
},
|
|
2493
|
+
indicator: {
|
|
2494
|
+
backgroundColor: undefined
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2329
2501
|
const tag = {
|
|
2330
2502
|
borderRadius: 16,
|
|
2331
2503
|
icon: {
|
|
@@ -2465,6 +2637,7 @@ const theme = {
|
|
|
2465
2637
|
picker,
|
|
2466
2638
|
shadows,
|
|
2467
2639
|
skeleton: skeleton$1,
|
|
2640
|
+
tabBar,
|
|
2468
2641
|
tag,
|
|
2469
2642
|
tooltip,
|
|
2470
2643
|
typography,
|
|
@@ -2888,6 +3061,13 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2888
3061
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2889
3062
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2890
3063
|
};
|
|
3064
|
+
const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
3065
|
+
// check if all values are not undefined
|
|
3066
|
+
const isAllValuesUndefined = Object.values(type).every(value => value === undefined);
|
|
3067
|
+
|
|
3068
|
+
// if every values are undefined and we hgave a typographyTypeInContext, we use the parent typography type (typographyTypeInContext)
|
|
3069
|
+
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3070
|
+
};
|
|
2891
3071
|
|
|
2892
3072
|
const TypographyFamilyContext = /*#__PURE__*/react.createContext(null);
|
|
2893
3073
|
const TypographyTypeContext = /*#__PURE__*/react.createContext(null);
|
|
@@ -2895,9 +3075,6 @@ const TypographyColorContext = /*#__PURE__*/react.createContext('black');
|
|
|
2895
3075
|
function useTypographyColor() {
|
|
2896
3076
|
return react.useContext(TypographyColorContext);
|
|
2897
3077
|
}
|
|
2898
|
-
function useTypographyAncestorType() {
|
|
2899
|
-
return react.useContext(TypographyTypeContext);
|
|
2900
|
-
}
|
|
2901
3078
|
const TypographyDefaultColorContext = /*#__PURE__*/react.createContext(undefined);
|
|
2902
3079
|
function useTypographyDefaultColor() {
|
|
2903
3080
|
return react.useContext(TypographyDefaultColorContext);
|
|
@@ -3020,9 +3197,11 @@ function Typography({
|
|
|
3020
3197
|
}) {
|
|
3021
3198
|
const sx = nativeBase.useSx();
|
|
3022
3199
|
const typographyFamilyInContext = react.useContext(TypographyFamilyContext);
|
|
3200
|
+
const typographyTypeInContext = react.useContext(TypographyTypeContext);
|
|
3023
3201
|
const defaultColor = useTypographyDefaultColor();
|
|
3024
3202
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3025
|
-
const
|
|
3203
|
+
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3204
|
+
const baseOrDefaultToBody = typographyType.base ?? 'body-m';
|
|
3026
3205
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3027
3206
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
3028
3207
|
...type,
|
|
@@ -3061,7 +3240,7 @@ function Typography({
|
|
|
3061
3240
|
const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(TypographyFamilyContext.Provider, {
|
|
3062
3241
|
value: typographyFamily,
|
|
3063
3242
|
children: /*#__PURE__*/jsxRuntime.jsx(TypographyTypeContext.Provider, {
|
|
3064
|
-
value:
|
|
3243
|
+
value: typographyType,
|
|
3065
3244
|
children: text
|
|
3066
3245
|
})
|
|
3067
3246
|
}) : text;
|
|
@@ -3162,30 +3341,11 @@ function Icon({
|
|
|
3162
3341
|
});
|
|
3163
3342
|
}
|
|
3164
3343
|
|
|
3165
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3166
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3167
|
-
}
|
|
3168
|
-
function createNativeBaseIconSize(type) {
|
|
3169
|
-
const typeWithMediumForced = {
|
|
3170
|
-
...type,
|
|
3171
|
-
medium: type.medium || type.small || type.base
|
|
3172
|
-
};
|
|
3173
|
-
const iconSizeForNativeBase = {};
|
|
3174
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(typeName => {
|
|
3175
|
-
const value = typeWithMediumForced[typeName];
|
|
3176
|
-
if (value) {
|
|
3177
|
-
iconSizeForNativeBase[typeName] = `kitt.icon.typographySize.${value}.${getIconSizeConfigKeyFromTypeName(typeName)}.iconSize`;
|
|
3178
|
-
}
|
|
3179
|
-
});
|
|
3180
|
-
return iconSizeForNativeBase;
|
|
3181
|
-
}
|
|
3182
3344
|
function TypographyIconSpecifiedColor({
|
|
3183
3345
|
color,
|
|
3184
3346
|
size,
|
|
3185
3347
|
...props
|
|
3186
3348
|
}) {
|
|
3187
|
-
const ancestorType = useTypographyAncestorType();
|
|
3188
|
-
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3189
3349
|
const colorValue = getTypographyColorValue(color);
|
|
3190
3350
|
const sx = nativeBase.useSx();
|
|
3191
3351
|
const {
|
|
@@ -3195,7 +3355,7 @@ function TypographyIconSpecifiedColor({
|
|
|
3195
3355
|
});
|
|
3196
3356
|
return /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
3197
3357
|
...props,
|
|
3198
|
-
size:
|
|
3358
|
+
size: size,
|
|
3199
3359
|
color: colorStyleValue
|
|
3200
3360
|
});
|
|
3201
3361
|
}
|
|
@@ -5706,7 +5866,7 @@ function DocumentPicker({
|
|
|
5706
5866
|
...documentPickerOptions,
|
|
5707
5867
|
multiple: false
|
|
5708
5868
|
});
|
|
5709
|
-
if (!result.canceled && result.assets[0]
|
|
5869
|
+
if (!result.canceled && result.assets[0]?.file) {
|
|
5710
5870
|
onDocumentUpload(result.assets[0].file);
|
|
5711
5871
|
}
|
|
5712
5872
|
},
|
|
@@ -5737,7 +5897,7 @@ function ImagePicker({
|
|
|
5737
5897
|
...imagePickerOptions,
|
|
5738
5898
|
allowsMultipleSelection: false
|
|
5739
5899
|
});
|
|
5740
|
-
if (!result.canceled) {
|
|
5900
|
+
if (!result.canceled && result.assets[0]) {
|
|
5741
5901
|
onImageSelected(result.assets[0]);
|
|
5742
5902
|
}
|
|
5743
5903
|
},
|
|
@@ -5995,17 +6155,17 @@ function GoogleMapsAutocompleteProvider({
|
|
|
5995
6155
|
dispatch({
|
|
5996
6156
|
type: 'search-error'
|
|
5997
6157
|
});
|
|
5998
|
-
return;
|
|
5999
6158
|
}
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6159
|
+
if (results) {
|
|
6160
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
6161
|
+
searchResultsCache.current[value] = results;
|
|
6162
|
+
dispatch({
|
|
6163
|
+
type: 'search-success',
|
|
6164
|
+
payload: {
|
|
6165
|
+
results
|
|
6166
|
+
}
|
|
6167
|
+
});
|
|
6168
|
+
}
|
|
6009
6169
|
} catch (error) {
|
|
6010
6170
|
dispatch({
|
|
6011
6171
|
type: 'search-error'
|
|
@@ -7766,12 +7926,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
|
7766
7926
|
width: 34,
|
|
7767
7927
|
height: 36,
|
|
7768
7928
|
viewBox: "0 0 34 36",
|
|
7769
|
-
fill: "
|
|
7929
|
+
fill: "currentColor",
|
|
7770
7930
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7771
7931
|
...props,
|
|
7772
7932
|
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
7773
7933
|
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",
|
|
7774
|
-
fill: "#7B66FF",
|
|
7775
7934
|
stroke: "#fff"
|
|
7776
7935
|
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
7777
7936
|
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",
|
|
@@ -7796,6 +7955,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
|
7796
7955
|
})
|
|
7797
7956
|
});
|
|
7798
7957
|
|
|
7958
|
+
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
7959
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
7960
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
7961
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
7962
|
+
return MapMarkerVariantEnum;
|
|
7963
|
+
}({});
|
|
7964
|
+
|
|
7799
7965
|
const SCALE_DURATION = 300;
|
|
7800
7966
|
const TRANSLATE_Y_DURATION = 150;
|
|
7801
7967
|
const useNativeAnimation = ({
|
|
@@ -7852,18 +8018,12 @@ const getBackgroundColor$1 = ({
|
|
|
7852
8018
|
isSelected,
|
|
7853
8019
|
variant
|
|
7854
8020
|
}) => {
|
|
7855
|
-
if (variant ===
|
|
8021
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
7856
8022
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
|
|
7857
8023
|
}
|
|
7858
8024
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
7859
8025
|
};
|
|
7860
8026
|
|
|
7861
|
-
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
7862
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
7863
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
7864
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
7865
|
-
return MapMarkerVariantEnum;
|
|
7866
|
-
}({});
|
|
7867
8027
|
function StaticMapMarker$1({
|
|
7868
8028
|
variant,
|
|
7869
8029
|
isHovered,
|
|
@@ -8776,6 +8936,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8776
8936
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
8777
8937
|
}
|
|
8778
8938
|
}
|
|
8939
|
+
},
|
|
8940
|
+
tabBar: {
|
|
8941
|
+
underline: {
|
|
8942
|
+
default: {
|
|
8943
|
+
active: {
|
|
8944
|
+
color: {
|
|
8945
|
+
default: theme.tabBar.underline.default.active.color.default,
|
|
8946
|
+
focused: theme.tabBar.underline.default.active.color.focused,
|
|
8947
|
+
hovered: theme.tabBar.underline.default.active.color.hovered,
|
|
8948
|
+
pressed: theme.tabBar.underline.default.active.color.pressed
|
|
8949
|
+
},
|
|
8950
|
+
indicator: {
|
|
8951
|
+
backgroundColor: theme.tabBar.underline.default.active.indicator.backgroundColor
|
|
8952
|
+
}
|
|
8953
|
+
},
|
|
8954
|
+
inactive: {
|
|
8955
|
+
color: {
|
|
8956
|
+
default: theme.tabBar.underline.default.inactive.color.default,
|
|
8957
|
+
focused: theme.tabBar.underline.default.inactive.color.focused,
|
|
8958
|
+
hovered: theme.tabBar.underline.default.inactive.color.hovered,
|
|
8959
|
+
pressed: theme.tabBar.underline.default.inactive.color.pressed
|
|
8960
|
+
}
|
|
8961
|
+
},
|
|
8962
|
+
disabled: {
|
|
8963
|
+
color: {
|
|
8964
|
+
default: theme.tabBar.underline.default.disabled.color.default,
|
|
8965
|
+
focused: theme.tabBar.underline.default.disabled.color.focused,
|
|
8966
|
+
hovered: theme.tabBar.underline.default.disabled.color.hovered,
|
|
8967
|
+
pressed: theme.tabBar.underline.default.disabled.color.pressed
|
|
8968
|
+
}
|
|
8969
|
+
},
|
|
8970
|
+
borderBottomColor: theme.tabBar.underline.default.borderBottomColor
|
|
8971
|
+
},
|
|
8972
|
+
revert: {
|
|
8973
|
+
active: {
|
|
8974
|
+
color: {
|
|
8975
|
+
default: theme.tabBar.underline.revert.active.color.default,
|
|
8976
|
+
focused: theme.tabBar.underline.revert.active.color.focused,
|
|
8977
|
+
hovered: theme.tabBar.underline.revert.active.color.hovered,
|
|
8978
|
+
pressed: theme.tabBar.underline.revert.active.color.pressed
|
|
8979
|
+
},
|
|
8980
|
+
indicator: {
|
|
8981
|
+
backgroundColor: theme.tabBar.underline.revert.active.indicator.backgroundColor
|
|
8982
|
+
}
|
|
8983
|
+
},
|
|
8984
|
+
inactive: {
|
|
8985
|
+
color: {
|
|
8986
|
+
default: theme.tabBar.underline.revert.inactive.color.default,
|
|
8987
|
+
focused: theme.tabBar.underline.revert.inactive.color.focused,
|
|
8988
|
+
hovered: theme.tabBar.underline.revert.inactive.color.hovered,
|
|
8989
|
+
pressed: theme.tabBar.underline.revert.inactive.color.pressed
|
|
8990
|
+
}
|
|
8991
|
+
},
|
|
8992
|
+
disabled: {
|
|
8993
|
+
color: {
|
|
8994
|
+
default: theme.tabBar.underline.revert.disabled.color.default,
|
|
8995
|
+
focused: theme.tabBar.underline.revert.disabled.color.focused,
|
|
8996
|
+
hovered: theme.tabBar.underline.revert.disabled.color.hovered,
|
|
8997
|
+
pressed: theme.tabBar.underline.revert.disabled.color.pressed
|
|
8998
|
+
}
|
|
8999
|
+
},
|
|
9000
|
+
borderBottomColor: theme.tabBar.underline.revert.borderBottomColor
|
|
9001
|
+
}
|
|
9002
|
+
},
|
|
9003
|
+
solid: {
|
|
9004
|
+
default: {
|
|
9005
|
+
active: {
|
|
9006
|
+
color: {
|
|
9007
|
+
default: theme.tabBar.solid.default.active.color.default,
|
|
9008
|
+
focused: theme.tabBar.solid.default.active.color.focused,
|
|
9009
|
+
hovered: theme.tabBar.solid.default.active.color.hovered,
|
|
9010
|
+
pressed: theme.tabBar.solid.default.active.color.pressed
|
|
9011
|
+
},
|
|
9012
|
+
backgroundColor: {
|
|
9013
|
+
default: theme.tabBar.solid.default.active.backgroundColor?.default,
|
|
9014
|
+
focused: theme.tabBar.solid.default.active.backgroundColor?.focused,
|
|
9015
|
+
hovered: theme.tabBar.solid.default.active.backgroundColor?.hovered,
|
|
9016
|
+
pressed: theme.tabBar.solid.default.active.backgroundColor?.pressed
|
|
9017
|
+
}
|
|
9018
|
+
},
|
|
9019
|
+
inactive: {
|
|
9020
|
+
color: {
|
|
9021
|
+
default: theme.tabBar.solid.default.inactive.color.default,
|
|
9022
|
+
focused: theme.tabBar.solid.default.inactive.color.focused,
|
|
9023
|
+
hovered: theme.tabBar.solid.default.inactive.color.hovered,
|
|
9024
|
+
pressed: theme.tabBar.solid.default.inactive.color.pressed
|
|
9025
|
+
},
|
|
9026
|
+
backgroundColor: {
|
|
9027
|
+
default: theme.tabBar.solid.default.inactive.backgroundColor?.default,
|
|
9028
|
+
focused: theme.tabBar.solid.default.inactive.backgroundColor?.focused,
|
|
9029
|
+
hovered: theme.tabBar.solid.default.inactive.backgroundColor?.hovered,
|
|
9030
|
+
pressed: theme.tabBar.solid.default.inactive.backgroundColor?.pressed
|
|
9031
|
+
}
|
|
9032
|
+
},
|
|
9033
|
+
disabled: {
|
|
9034
|
+
color: {
|
|
9035
|
+
default: theme.tabBar.solid.default.disabled.color.default,
|
|
9036
|
+
focused: theme.tabBar.solid.default.disabled.color.focused,
|
|
9037
|
+
hovered: theme.tabBar.solid.default.disabled.color.hovered,
|
|
9038
|
+
pressed: theme.tabBar.solid.default.disabled.color.pressed
|
|
9039
|
+
}
|
|
9040
|
+
}
|
|
9041
|
+
},
|
|
9042
|
+
revert: {
|
|
9043
|
+
active: {
|
|
9044
|
+
color: {
|
|
9045
|
+
default: theme.tabBar.solid.revert.active.color.default,
|
|
9046
|
+
focused: theme.tabBar.solid.revert.active.color.focused,
|
|
9047
|
+
hovered: theme.tabBar.solid.revert.active.color.hovered,
|
|
9048
|
+
pressed: theme.tabBar.solid.revert.active.color.pressed
|
|
9049
|
+
},
|
|
9050
|
+
backgroundColor: {
|
|
9051
|
+
default: theme.tabBar.solid.revert.active.backgroundColor?.default,
|
|
9052
|
+
focused: theme.tabBar.solid.revert.active.backgroundColor?.focused,
|
|
9053
|
+
hovered: theme.tabBar.solid.revert.active.backgroundColor?.hovered,
|
|
9054
|
+
pressed: theme.tabBar.solid.revert.active.backgroundColor?.pressed
|
|
9055
|
+
}
|
|
9056
|
+
},
|
|
9057
|
+
inactive: {
|
|
9058
|
+
color: {
|
|
9059
|
+
default: theme.tabBar.solid.revert.inactive.color.default,
|
|
9060
|
+
focused: theme.tabBar.solid.revert.inactive.color.focused,
|
|
9061
|
+
hovered: theme.tabBar.solid.revert.inactive.color.hovered,
|
|
9062
|
+
pressed: theme.tabBar.solid.revert.inactive.color.pressed
|
|
9063
|
+
},
|
|
9064
|
+
backgroundColor: {
|
|
9065
|
+
default: theme.tabBar.solid.revert.inactive.backgroundColor?.default,
|
|
9066
|
+
focused: theme.tabBar.solid.revert.inactive.backgroundColor?.focused,
|
|
9067
|
+
hovered: theme.tabBar.solid.revert.inactive.backgroundColor?.hovered,
|
|
9068
|
+
pressed: theme.tabBar.solid.revert.inactive.backgroundColor?.pressed
|
|
9069
|
+
}
|
|
9070
|
+
},
|
|
9071
|
+
disabled: {
|
|
9072
|
+
color: {
|
|
9073
|
+
default: theme.tabBar.solid.revert.disabled.color.default,
|
|
9074
|
+
focused: theme.tabBar.solid.revert.disabled.color.focused,
|
|
9075
|
+
hovered: theme.tabBar.solid.revert.disabled.color.hovered,
|
|
9076
|
+
pressed: theme.tabBar.solid.revert.disabled.color.pressed
|
|
9077
|
+
}
|
|
9078
|
+
}
|
|
9079
|
+
}
|
|
9080
|
+
}
|
|
8779
9081
|
}
|
|
8780
9082
|
},
|
|
8781
9083
|
app: appTheme?.colors
|
|
@@ -8852,6 +9154,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8852
9154
|
highlight: {
|
|
8853
9155
|
borderRadius: theme.highlight.borderRadius
|
|
8854
9156
|
},
|
|
9157
|
+
tabBar: {
|
|
9158
|
+
underline: {
|
|
9159
|
+
default: {
|
|
9160
|
+
active: {
|
|
9161
|
+
borderRadius: theme.tabBar.underline.default.active.borderRadius
|
|
9162
|
+
},
|
|
9163
|
+
inactive: {
|
|
9164
|
+
borderRadius: theme.tabBar.underline.default.inactive.borderRadius
|
|
9165
|
+
}
|
|
9166
|
+
},
|
|
9167
|
+
revert: {
|
|
9168
|
+
active: {
|
|
9169
|
+
borderRadius: theme.tabBar.underline.revert.active.borderRadius
|
|
9170
|
+
},
|
|
9171
|
+
inactive: {
|
|
9172
|
+
borderRadius: theme.tabBar.underline.revert.inactive.borderRadius
|
|
9173
|
+
}
|
|
9174
|
+
}
|
|
9175
|
+
},
|
|
9176
|
+
solid: {
|
|
9177
|
+
default: {
|
|
9178
|
+
active: {
|
|
9179
|
+
borderRadius: theme.tabBar.solid.default.active.borderRadius
|
|
9180
|
+
},
|
|
9181
|
+
inactive: {
|
|
9182
|
+
borderRadius: theme.tabBar.solid.default.inactive.borderRadius
|
|
9183
|
+
}
|
|
9184
|
+
},
|
|
9185
|
+
revert: {
|
|
9186
|
+
active: {
|
|
9187
|
+
borderRadius: theme.tabBar.solid.revert.active.borderRadius
|
|
9188
|
+
},
|
|
9189
|
+
inactive: {
|
|
9190
|
+
borderRadius: theme.tabBar.solid.revert.inactive.borderRadius
|
|
9191
|
+
}
|
|
9192
|
+
}
|
|
9193
|
+
}
|
|
9194
|
+
},
|
|
8855
9195
|
tag: {
|
|
8856
9196
|
borderRadius: theme.tag.borderRadius
|
|
8857
9197
|
},
|
|
@@ -10898,6 +11238,7 @@ function Picker({
|
|
|
10898
11238
|
paddingY: "kitt.2",
|
|
10899
11239
|
children: childrenArray.map((child, index) => {
|
|
10900
11240
|
const currentValue = items[index];
|
|
11241
|
+
if (currentValue === undefined) throw new Error(`Picker: No value found for item at index ${index}`);
|
|
10901
11242
|
const {
|
|
10902
11243
|
onClick,
|
|
10903
11244
|
'aria-selected': ariaSelected,
|
|
@@ -11594,125 +11935,132 @@ const StoryGrid = {
|
|
|
11594
11935
|
Col: StoryGridCol
|
|
11595
11936
|
};
|
|
11596
11937
|
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
return isActive ? kittTheme.colors.primary : kittTheme.colors.blackLight;
|
|
11613
|
-
}
|
|
11614
|
-
}
|
|
11615
|
-
}
|
|
11616
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
11617
|
-
const {
|
|
11618
|
-
kitt: kittTheme
|
|
11619
|
-
} = useKittTheme();
|
|
11620
|
-
switch (color) {
|
|
11621
|
-
case 'black':
|
|
11622
|
-
{
|
|
11623
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
11624
|
-
}
|
|
11625
|
-
case 'white':
|
|
11626
|
-
{
|
|
11627
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
11628
|
-
}
|
|
11629
|
-
default:
|
|
11630
|
-
{
|
|
11631
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
11632
|
-
}
|
|
11633
|
-
}
|
|
11634
|
-
}
|
|
11938
|
+
const getVariantFromColor = color => {
|
|
11939
|
+
if (color === 'white') return 'revert';
|
|
11940
|
+
return 'default';
|
|
11941
|
+
};
|
|
11942
|
+
const getTabBarItemActiveState = (isActive, disabled) => {
|
|
11943
|
+
if (disabled) return 'disabled';
|
|
11944
|
+
if (isActive) return 'active';
|
|
11945
|
+
return 'inactive';
|
|
11946
|
+
};
|
|
11947
|
+
const getTabBarItemState = (isHovered, isPressed, isFocused) => {
|
|
11948
|
+
if (isHovered) return 'hovered';
|
|
11949
|
+
if (isPressed) return 'pressed';
|
|
11950
|
+
if (isFocused) return 'focused';
|
|
11951
|
+
return 'default';
|
|
11952
|
+
};
|
|
11635
11953
|
function TabBarItem({
|
|
11636
11954
|
name,
|
|
11637
11955
|
icon,
|
|
11638
|
-
|
|
11956
|
+
variant = 'default',
|
|
11957
|
+
type = 'underline',
|
|
11958
|
+
color,
|
|
11639
11959
|
testID,
|
|
11960
|
+
disabled,
|
|
11640
11961
|
isActive = false,
|
|
11962
|
+
isFocusedInternal = false,
|
|
11963
|
+
isHoveredInternal = false,
|
|
11964
|
+
isPressedInternal = false,
|
|
11641
11965
|
onPress
|
|
11642
11966
|
}) {
|
|
11643
|
-
|
|
11644
|
-
const
|
|
11967
|
+
// Keep backward compatibility with color property
|
|
11968
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
11969
|
+
const activeState = getTabBarItemActiveState(isActive, disabled);
|
|
11970
|
+
const baseTheme = `kitt.tabBar.${type}.${definedVariant}.${activeState}`;
|
|
11645
11971
|
return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
|
|
11972
|
+
disabled: disabled,
|
|
11646
11973
|
testID: testID,
|
|
11647
11974
|
onPress: onPress,
|
|
11648
|
-
children:
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
children:
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
,
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11975
|
+
children: ({
|
|
11976
|
+
isHovered,
|
|
11977
|
+
isPressed,
|
|
11978
|
+
isFocused
|
|
11979
|
+
}) => {
|
|
11980
|
+
const state = getTabBarItemState(isHovered || isHoveredInternal, isPressed || isPressedInternal, isFocused || isFocusedInternal);
|
|
11981
|
+
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
11982
|
+
alignItems: "center",
|
|
11983
|
+
position: "relative",
|
|
11984
|
+
paddingY: "kitt.2",
|
|
11985
|
+
paddingRight: "kitt.2",
|
|
11986
|
+
paddingLeft: icon ? undefined : 'kitt.2',
|
|
11987
|
+
backgroundColor: `${baseTheme}.backgroundColor.${state}`,
|
|
11988
|
+
borderRadius: `${baseTheme}.borderRadius`,
|
|
11989
|
+
children: [icon ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
11990
|
+
marginRight: "kitt.2",
|
|
11991
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
11992
|
+
color: `${baseTheme}.color.${state}`,
|
|
11993
|
+
icon: icon
|
|
11994
|
+
})
|
|
11995
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
11996
|
+
base: "label-large",
|
|
11997
|
+
numberOfLines: 1,
|
|
11998
|
+
color: `${baseTheme}.color.${state}`,
|
|
11999
|
+
children: name
|
|
12000
|
+
}), type !== 'solid' ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
12001
|
+
backgroundColor: `${baseTheme}.indicator.backgroundColor`,
|
|
12002
|
+
position: "absolute",
|
|
12003
|
+
bottom: -1 // in order to be over tab bar's border bottom
|
|
12004
|
+
,
|
|
12005
|
+
left: 0,
|
|
12006
|
+
right: 0,
|
|
12007
|
+
height: 2
|
|
12008
|
+
}) : null]
|
|
12009
|
+
});
|
|
12010
|
+
}
|
|
11673
12011
|
});
|
|
11674
12012
|
}
|
|
11675
12013
|
|
|
11676
12014
|
function TabBar({
|
|
11677
12015
|
tabs,
|
|
11678
|
-
|
|
12016
|
+
variant = 'default',
|
|
12017
|
+
type = 'underline',
|
|
11679
12018
|
align = 'left',
|
|
12019
|
+
color,
|
|
11680
12020
|
activeTabIndex = 0,
|
|
11681
12021
|
renderTabItem,
|
|
11682
|
-
onChangeTab
|
|
11683
|
-
...props
|
|
12022
|
+
onChangeTab
|
|
11684
12023
|
}) {
|
|
11685
12024
|
const sx = nativeBase.useSx();
|
|
11686
|
-
const {
|
|
11687
|
-
kitt: kittTheme
|
|
11688
|
-
} = useKittTheme();
|
|
11689
12025
|
const tabItems = tabs.map((tab, index) => renderTabItem({
|
|
11690
12026
|
tab,
|
|
11691
12027
|
index,
|
|
11692
12028
|
isActive: activeTabIndex === index
|
|
11693
12029
|
}));
|
|
11694
|
-
|
|
12030
|
+
let styles = {
|
|
11695
12031
|
justifyContent: align,
|
|
11696
12032
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
11697
|
-
minWidth: '100%'
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
12033
|
+
minWidth: '100%'
|
|
12034
|
+
};
|
|
12035
|
+
|
|
12036
|
+
// Keep backward compatibility with color property
|
|
12037
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12038
|
+
if (type !== 'solid') {
|
|
12039
|
+
styles = {
|
|
12040
|
+
...styles,
|
|
12041
|
+
borderBottomWidth: 1,
|
|
12042
|
+
borderBottomColor: `kitt.tabBar.${type}.${definedVariant}.borderBottomColor`
|
|
12043
|
+
};
|
|
12044
|
+
}
|
|
12045
|
+
const scrollViewStyles = sx(styles);
|
|
12046
|
+
const space = type === 'solid' ? 'kitt.2' : 'kitt.4';
|
|
11701
12047
|
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
11702
12048
|
horizontal: true,
|
|
11703
12049
|
showsHorizontalScrollIndicator: false,
|
|
11704
12050
|
contentContainerStyle: scrollViewStyles,
|
|
11705
12051
|
children: /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
11706
|
-
space: align === 'center' ? 'kitt.16' :
|
|
11707
|
-
...props,
|
|
12052
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
11708
12053
|
children: react.Children.map(tabItems, (child, index) => {
|
|
11709
12054
|
const tab = tabs[index];
|
|
12055
|
+
if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
|
|
11710
12056
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
11711
12057
|
children: /*#__PURE__*/react.cloneElement(child, {
|
|
11712
12058
|
color,
|
|
12059
|
+
variant: definedVariant,
|
|
12060
|
+
type,
|
|
11713
12061
|
onPress: event => {
|
|
11714
12062
|
onChangeTab({
|
|
11715
|
-
tab
|
|
12063
|
+
tab,
|
|
11716
12064
|
index
|
|
11717
12065
|
});
|
|
11718
12066
|
child.props.onPress?.(event);
|
|
@@ -11860,6 +12208,7 @@ const TimePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
11860
12208
|
// Format is hh:mm hence 5 characters
|
|
11861
12209
|
if (currentInputValue.length < 5 || !currentInputValue.includes(':')) return;
|
|
11862
12210
|
const [hours, minutes] = currentInputValue.split(':');
|
|
12211
|
+
if (!hours || !minutes) return;
|
|
11863
12212
|
|
|
11864
12213
|
// Prepare the next date. It clones the date value passed as prop if available
|
|
11865
12214
|
const nextDate = value ? new Date(value) : new Date();
|
|
@@ -11900,6 +12249,7 @@ const TimePicker = /*#__PURE__*/react.forwardRef(({
|
|
|
11900
12249
|
// When input has a value which is more than ':'
|
|
11901
12250
|
if (hasSeparator && sanitizedValue.length > 1) {
|
|
11902
12251
|
const [hours, minutes] = sanitizedValue.split(':');
|
|
12252
|
+
if (!hours || !minutes) return;
|
|
11903
12253
|
const currentHours = getDisplayedHours(hours);
|
|
11904
12254
|
const currentMinutes = getDisplayedMinutes(minutes);
|
|
11905
12255
|
const nextValue = `${currentHours}:${currentMinutes}`;
|