@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
|
@@ -733,9 +733,19 @@ const card = {
|
|
|
733
733
|
};
|
|
734
734
|
|
|
735
735
|
const webAnimationContentDuration$2 = 400;
|
|
736
|
-
const webAnimationContentEasing$2 =
|
|
736
|
+
const webAnimationContentEasing$2 = {
|
|
737
|
+
x1: 0.77,
|
|
738
|
+
y1: 0,
|
|
739
|
+
x2: 0.175,
|
|
740
|
+
y2: 1
|
|
741
|
+
};
|
|
737
742
|
const webAnimationOverlayDuration$2 = 250;
|
|
738
|
-
const webAnimationOverlayEasing$2 =
|
|
743
|
+
const webAnimationOverlayEasing$2 = {
|
|
744
|
+
x1: 0.42,
|
|
745
|
+
y1: 0,
|
|
746
|
+
x2: 1,
|
|
747
|
+
y2: 1
|
|
748
|
+
};
|
|
739
749
|
const maxWidth = 540;
|
|
740
750
|
const overlayHorizontalPadding = 24;
|
|
741
751
|
const cardModal = {
|
|
@@ -827,9 +837,19 @@ const choices = {
|
|
|
827
837
|
};
|
|
828
838
|
|
|
829
839
|
const webAnimationContentDuration$1 = 400;
|
|
830
|
-
const webAnimationContentEasing$1 =
|
|
840
|
+
const webAnimationContentEasing$1 = {
|
|
841
|
+
x1: 0.77,
|
|
842
|
+
y1: 0,
|
|
843
|
+
x2: 0.175,
|
|
844
|
+
y2: 1
|
|
845
|
+
};
|
|
831
846
|
const webAnimationOverlayDuration$1 = 250;
|
|
832
|
-
const webAnimationOverlayEasing$1 =
|
|
847
|
+
const webAnimationOverlayEasing$1 = {
|
|
848
|
+
x1: 0.42,
|
|
849
|
+
y1: 0,
|
|
850
|
+
x2: 1,
|
|
851
|
+
y2: 1
|
|
852
|
+
};
|
|
833
853
|
const dialogModal = {
|
|
834
854
|
borderRadius: spacing * 2,
|
|
835
855
|
maxWidth: 540,
|
|
@@ -1761,9 +1781,19 @@ const forms = {
|
|
|
1761
1781
|
};
|
|
1762
1782
|
|
|
1763
1783
|
const webAnimationContentDuration = 600;
|
|
1764
|
-
const webAnimationContentEasing =
|
|
1784
|
+
const webAnimationContentEasing = {
|
|
1785
|
+
x1: 0.77,
|
|
1786
|
+
y1: 0,
|
|
1787
|
+
x2: 0.175,
|
|
1788
|
+
y2: 1
|
|
1789
|
+
};
|
|
1765
1790
|
const webAnimationOverlayDuration = 250;
|
|
1766
|
-
const webAnimationOverlayEasing =
|
|
1791
|
+
const webAnimationOverlayEasing = {
|
|
1792
|
+
x1: 0.42,
|
|
1793
|
+
y1: 0,
|
|
1794
|
+
x2: 1,
|
|
1795
|
+
y2: 1
|
|
1796
|
+
};
|
|
1767
1797
|
const fullscreenModal = {
|
|
1768
1798
|
header: {
|
|
1769
1799
|
height: 56
|
|
@@ -1856,43 +1886,8 @@ const highlight = {
|
|
|
1856
1886
|
}
|
|
1857
1887
|
};
|
|
1858
1888
|
|
|
1859
|
-
const getIconSizeFromFontSize = fontSize => {
|
|
1860
|
-
if (fontSize <= 14) return 16;
|
|
1861
|
-
if (fontSize <= 16) return 20;
|
|
1862
|
-
return 24;
|
|
1863
|
-
};
|
|
1864
|
-
const createTypographyIconSizeConfig = (baseAndSmallFontSize, mediumAndWideFontSize) => {
|
|
1865
|
-
const baseAndSmallIconSize = getIconSizeFromFontSize(baseAndSmallFontSize);
|
|
1866
|
-
const mediumAndWideIconSize = getIconSizeFromFontSize(mediumAndWideFontSize);
|
|
1867
|
-
return {
|
|
1868
|
-
baseAndSmall: {
|
|
1869
|
-
iconSize: baseAndSmallIconSize
|
|
1870
|
-
},
|
|
1871
|
-
mediumAndWide: {
|
|
1872
|
-
iconSize: mediumAndWideIconSize
|
|
1873
|
-
}
|
|
1874
|
-
};
|
|
1875
|
-
};
|
|
1876
1889
|
const icon = {
|
|
1877
|
-
defaultSize: 20
|
|
1878
|
-
// Note: this is based on typography updated sizes, not current https://github.com/ornikar/kitt/pull/2130
|
|
1879
|
-
typographySize: {
|
|
1880
|
-
// also known as xxlarge
|
|
1881
|
-
header1: createTypographyIconSizeConfig(40, 56),
|
|
1882
|
-
// also known as xlarge
|
|
1883
|
-
header2: createTypographyIconSizeConfig(32, 48),
|
|
1884
|
-
// also known as medium
|
|
1885
|
-
header3: createTypographyIconSizeConfig(24, 40),
|
|
1886
|
-
// also known as xsmall
|
|
1887
|
-
header4: createTypographyIconSizeConfig(18, 24),
|
|
1888
|
-
// also known as xxsmall
|
|
1889
|
-
header5: createTypographyIconSizeConfig(18, 18),
|
|
1890
|
-
'body-large': createTypographyIconSizeConfig(18, 24),
|
|
1891
|
-
'body-medium': createTypographyIconSizeConfig(18, 18),
|
|
1892
|
-
body: createTypographyIconSizeConfig(16, 16),
|
|
1893
|
-
'body-small': createTypographyIconSizeConfig(14, 14),
|
|
1894
|
-
'body-xsmall': createTypographyIconSizeConfig(12, 12)
|
|
1895
|
-
}
|
|
1890
|
+
defaultSize: 20
|
|
1896
1891
|
};
|
|
1897
1892
|
|
|
1898
1893
|
const iconButton = {
|
|
@@ -1911,8 +1906,8 @@ const listItem = {
|
|
|
1911
1906
|
|
|
1912
1907
|
const mapMarker = {
|
|
1913
1908
|
home: {
|
|
1914
|
-
default:
|
|
1915
|
-
selected:
|
|
1909
|
+
default: deepPurpleColorPalette['grey.9'],
|
|
1910
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1916
1911
|
svg: {
|
|
1917
1912
|
height: 36
|
|
1918
1913
|
},
|
|
@@ -1922,8 +1917,8 @@ const mapMarker = {
|
|
|
1922
1917
|
}
|
|
1923
1918
|
},
|
|
1924
1919
|
meetingPoint: {
|
|
1925
|
-
default:
|
|
1926
|
-
selected:
|
|
1920
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
1921
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1927
1922
|
svg: {
|
|
1928
1923
|
width: 40,
|
|
1929
1924
|
height: 43
|
|
@@ -2319,6 +2314,183 @@ const skeleton$1 = {
|
|
|
2319
2314
|
}
|
|
2320
2315
|
};
|
|
2321
2316
|
|
|
2317
|
+
const tabBar = {
|
|
2318
|
+
underline: {
|
|
2319
|
+
default: {
|
|
2320
|
+
active: {
|
|
2321
|
+
color: {
|
|
2322
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2323
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2324
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2325
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2326
|
+
},
|
|
2327
|
+
indicator: {
|
|
2328
|
+
backgroundColor: deepPurpleColorPalette['deepPurple.8']
|
|
2329
|
+
}
|
|
2330
|
+
},
|
|
2331
|
+
inactive: {
|
|
2332
|
+
color: {
|
|
2333
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2334
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2335
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2336
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2337
|
+
},
|
|
2338
|
+
indicator: {
|
|
2339
|
+
backgroundColor: undefined
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
disabled: {
|
|
2343
|
+
color: {
|
|
2344
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2345
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2346
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2347
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2348
|
+
},
|
|
2349
|
+
indicator: {
|
|
2350
|
+
backgroundColor: undefined
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
borderBottomColor: deepPurpleColorPalette['beige.3']
|
|
2354
|
+
},
|
|
2355
|
+
revert: {
|
|
2356
|
+
active: {
|
|
2357
|
+
color: {
|
|
2358
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2359
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2360
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2361
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2362
|
+
},
|
|
2363
|
+
indicator: {
|
|
2364
|
+
backgroundColor: deepPurpleColorPalette['grey.0']
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
inactive: {
|
|
2368
|
+
color: {
|
|
2369
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2370
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2371
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2372
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2373
|
+
},
|
|
2374
|
+
indicator: {
|
|
2375
|
+
backgroundColor: undefined
|
|
2376
|
+
}
|
|
2377
|
+
},
|
|
2378
|
+
disabled: {
|
|
2379
|
+
color: {
|
|
2380
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2381
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2382
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2383
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2384
|
+
},
|
|
2385
|
+
indicator: {
|
|
2386
|
+
backgroundColor: undefined
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
borderBottomColor: deepPurpleColorPalette['white-alpha.20']
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
solid: {
|
|
2393
|
+
default: {
|
|
2394
|
+
active: {
|
|
2395
|
+
color: {
|
|
2396
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2397
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2398
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2399
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2400
|
+
},
|
|
2401
|
+
backgroundColor: {
|
|
2402
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2403
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2404
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2405
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2406
|
+
},
|
|
2407
|
+
borderRadius: 4,
|
|
2408
|
+
indicator: {
|
|
2409
|
+
backgroundColor: undefined
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
inactive: {
|
|
2413
|
+
color: {
|
|
2414
|
+
default: deepPurpleColorPalette['grey.5'],
|
|
2415
|
+
focused: deepPurpleColorPalette['grey.5'],
|
|
2416
|
+
hovered: deepPurpleColorPalette['grey.5'],
|
|
2417
|
+
pressed: deepPurpleColorPalette['grey.5']
|
|
2418
|
+
},
|
|
2419
|
+
backgroundColor: {
|
|
2420
|
+
default: undefined,
|
|
2421
|
+
focused: undefined,
|
|
2422
|
+
hovered: deepPurpleColorPalette['beige.1'],
|
|
2423
|
+
pressed: deepPurpleColorPalette['beige.1']
|
|
2424
|
+
},
|
|
2425
|
+
borderRadius: 4,
|
|
2426
|
+
indicator: {
|
|
2427
|
+
backgroundColor: undefined
|
|
2428
|
+
}
|
|
2429
|
+
},
|
|
2430
|
+
disabled: {
|
|
2431
|
+
color: {
|
|
2432
|
+
default: deepPurpleColorPalette['grey.3'],
|
|
2433
|
+
focused: deepPurpleColorPalette['grey.3'],
|
|
2434
|
+
hovered: deepPurpleColorPalette['grey.3'],
|
|
2435
|
+
pressed: deepPurpleColorPalette['grey.3']
|
|
2436
|
+
},
|
|
2437
|
+
indicator: {
|
|
2438
|
+
backgroundColor: undefined
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
},
|
|
2442
|
+
revert: {
|
|
2443
|
+
active: {
|
|
2444
|
+
color: {
|
|
2445
|
+
default: deepPurpleColorPalette['deepPurple.8'],
|
|
2446
|
+
focused: deepPurpleColorPalette['deepPurple.8'],
|
|
2447
|
+
hovered: deepPurpleColorPalette['deepPurple.8'],
|
|
2448
|
+
pressed: deepPurpleColorPalette['deepPurple.8']
|
|
2449
|
+
},
|
|
2450
|
+
backgroundColor: {
|
|
2451
|
+
default: deepPurpleColorPalette['grey.0'],
|
|
2452
|
+
focused: deepPurpleColorPalette['grey.0'],
|
|
2453
|
+
hovered: deepPurpleColorPalette['grey.0'],
|
|
2454
|
+
pressed: deepPurpleColorPalette['grey.0']
|
|
2455
|
+
},
|
|
2456
|
+
borderRadius: 4,
|
|
2457
|
+
indicator: {
|
|
2458
|
+
backgroundColor: undefined
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
inactive: {
|
|
2462
|
+
color: {
|
|
2463
|
+
default: deepPurpleColorPalette['white-alpha.80'],
|
|
2464
|
+
focused: deepPurpleColorPalette['white-alpha.80'],
|
|
2465
|
+
hovered: deepPurpleColorPalette['white-alpha.80'],
|
|
2466
|
+
pressed: deepPurpleColorPalette['white-alpha.80']
|
|
2467
|
+
},
|
|
2468
|
+
backgroundColor: {
|
|
2469
|
+
default: undefined,
|
|
2470
|
+
focused: undefined,
|
|
2471
|
+
hovered: deepPurpleColorPalette['white-alpha.10'],
|
|
2472
|
+
pressed: deepPurpleColorPalette['white-alpha.10']
|
|
2473
|
+
},
|
|
2474
|
+
borderRadius: 4,
|
|
2475
|
+
indicator: {
|
|
2476
|
+
backgroundColor: undefined
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
disabled: {
|
|
2480
|
+
color: {
|
|
2481
|
+
default: deepPurpleColorPalette['white-alpha.20'],
|
|
2482
|
+
focused: deepPurpleColorPalette['white-alpha.20'],
|
|
2483
|
+
hovered: deepPurpleColorPalette['white-alpha.20'],
|
|
2484
|
+
pressed: deepPurpleColorPalette['white-alpha.20']
|
|
2485
|
+
},
|
|
2486
|
+
indicator: {
|
|
2487
|
+
backgroundColor: undefined
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2322
2494
|
const tag = {
|
|
2323
2495
|
borderRadius: 16,
|
|
2324
2496
|
icon: {
|
|
@@ -2458,6 +2630,7 @@ const theme = {
|
|
|
2458
2630
|
picker,
|
|
2459
2631
|
shadows,
|
|
2460
2632
|
skeleton: skeleton$1,
|
|
2633
|
+
tabBar,
|
|
2461
2634
|
tag,
|
|
2462
2635
|
tooltip,
|
|
2463
2636
|
typography,
|
|
@@ -2881,6 +3054,13 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2881
3054
|
if (typographyFamilyInContext != null) return typographyFamilyInContext;
|
|
2882
3055
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2883
3056
|
};
|
|
3057
|
+
const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
3058
|
+
// check if all values are not undefined
|
|
3059
|
+
const isAllValuesUndefined = Object.values(type).every(value => value === undefined);
|
|
3060
|
+
|
|
3061
|
+
// if every values are undefined and we hgave a typographyTypeInContext, we use the parent typography type (typographyTypeInContext)
|
|
3062
|
+
return !!isAllValuesUndefined && !!typographyTypeInContext ? typographyTypeInContext : type;
|
|
3063
|
+
};
|
|
2884
3064
|
|
|
2885
3065
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2886
3066
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
@@ -2888,9 +3068,6 @@ const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
|
2888
3068
|
function useTypographyColor() {
|
|
2889
3069
|
return useContext(TypographyColorContext);
|
|
2890
3070
|
}
|
|
2891
|
-
function useTypographyAncestorType() {
|
|
2892
|
-
return useContext(TypographyTypeContext);
|
|
2893
|
-
}
|
|
2894
3071
|
const TypographyDefaultColorContext = /*#__PURE__*/createContext(undefined);
|
|
2895
3072
|
function useTypographyDefaultColor() {
|
|
2896
3073
|
return useContext(TypographyDefaultColorContext);
|
|
@@ -3013,9 +3190,11 @@ function Typography({
|
|
|
3013
3190
|
}) {
|
|
3014
3191
|
const sx = useSx();
|
|
3015
3192
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3193
|
+
const typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3016
3194
|
const defaultColor = useTypographyDefaultColor();
|
|
3017
3195
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3018
|
-
const
|
|
3196
|
+
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3197
|
+
const baseOrDefaultToBody = typographyType.base ?? 'body-m';
|
|
3019
3198
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3020
3199
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
3021
3200
|
...type,
|
|
@@ -3054,7 +3233,7 @@ function Typography({
|
|
|
3054
3233
|
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3055
3234
|
value: typographyFamily,
|
|
3056
3235
|
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3057
|
-
value:
|
|
3236
|
+
value: typographyType,
|
|
3058
3237
|
children: text
|
|
3059
3238
|
})
|
|
3060
3239
|
}) : text;
|
|
@@ -3155,30 +3334,11 @@ function Icon({
|
|
|
3155
3334
|
});
|
|
3156
3335
|
}
|
|
3157
3336
|
|
|
3158
|
-
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3159
|
-
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
3160
|
-
}
|
|
3161
|
-
function createNativeBaseIconSize(type) {
|
|
3162
|
-
const typeWithMediumForced = {
|
|
3163
|
-
...type,
|
|
3164
|
-
medium: type.medium || type.small || type.base
|
|
3165
|
-
};
|
|
3166
|
-
const iconSizeForNativeBase = {};
|
|
3167
|
-
[KittBreakpointNameEnum.BASE, KittBreakpointNameEnum.SMALL, KittBreakpointNameEnum.MEDIUM, KittBreakpointNameEnum.LARGE, KittBreakpointNameEnum.WIDE].forEach(typeName => {
|
|
3168
|
-
const value = typeWithMediumForced[typeName];
|
|
3169
|
-
if (value) {
|
|
3170
|
-
iconSizeForNativeBase[typeName] = `kitt.icon.typographySize.${value}.${getIconSizeConfigKeyFromTypeName(typeName)}.iconSize`;
|
|
3171
|
-
}
|
|
3172
|
-
});
|
|
3173
|
-
return iconSizeForNativeBase;
|
|
3174
|
-
}
|
|
3175
3337
|
function TypographyIconSpecifiedColor({
|
|
3176
3338
|
color,
|
|
3177
3339
|
size,
|
|
3178
3340
|
...props
|
|
3179
3341
|
}) {
|
|
3180
|
-
const ancestorType = useTypographyAncestorType();
|
|
3181
|
-
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3182
3342
|
const colorValue = getTypographyColorValue(color);
|
|
3183
3343
|
const sx = useSx();
|
|
3184
3344
|
const {
|
|
@@ -3188,7 +3348,7 @@ function TypographyIconSpecifiedColor({
|
|
|
3188
3348
|
});
|
|
3189
3349
|
return /*#__PURE__*/jsx(Icon, {
|
|
3190
3350
|
...props,
|
|
3191
|
-
size:
|
|
3351
|
+
size: size,
|
|
3192
3352
|
color: colorStyleValue
|
|
3193
3353
|
});
|
|
3194
3354
|
}
|
|
@@ -5699,7 +5859,7 @@ function DocumentPicker({
|
|
|
5699
5859
|
...documentPickerOptions,
|
|
5700
5860
|
multiple: false
|
|
5701
5861
|
});
|
|
5702
|
-
if (!result.canceled && result.assets[0]
|
|
5862
|
+
if (!result.canceled && result.assets[0]?.file) {
|
|
5703
5863
|
onDocumentUpload(result.assets[0].file);
|
|
5704
5864
|
}
|
|
5705
5865
|
},
|
|
@@ -5730,7 +5890,7 @@ function ImagePicker({
|
|
|
5730
5890
|
...imagePickerOptions,
|
|
5731
5891
|
allowsMultipleSelection: false
|
|
5732
5892
|
});
|
|
5733
|
-
if (!result.canceled) {
|
|
5893
|
+
if (!result.canceled && result.assets[0]) {
|
|
5734
5894
|
onImageSelected(result.assets[0]);
|
|
5735
5895
|
}
|
|
5736
5896
|
},
|
|
@@ -5988,17 +6148,17 @@ function GoogleMapsAutocompleteProvider({
|
|
|
5988
6148
|
dispatch({
|
|
5989
6149
|
type: 'search-error'
|
|
5990
6150
|
});
|
|
5991
|
-
return;
|
|
5992
6151
|
}
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6152
|
+
if (results) {
|
|
6153
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
6154
|
+
searchResultsCache.current[value] = results;
|
|
6155
|
+
dispatch({
|
|
6156
|
+
type: 'search-success',
|
|
6157
|
+
payload: {
|
|
6158
|
+
results
|
|
6159
|
+
}
|
|
6160
|
+
});
|
|
6161
|
+
}
|
|
6002
6162
|
} catch (error) {
|
|
6003
6163
|
dispatch({
|
|
6004
6164
|
type: 'search-error'
|
|
@@ -7759,12 +7919,11 @@ const SvgPinMarkerinline = props => /*#__PURE__*/jsxs("svg", {
|
|
|
7759
7919
|
width: 34,
|
|
7760
7920
|
height: 36,
|
|
7761
7921
|
viewBox: "0 0 34 36",
|
|
7762
|
-
fill: "
|
|
7922
|
+
fill: "currentColor",
|
|
7763
7923
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7764
7924
|
...props,
|
|
7765
7925
|
children: [/*#__PURE__*/jsx("path", {
|
|
7766
7926
|
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",
|
|
7767
|
-
fill: "#7B66FF",
|
|
7768
7927
|
stroke: "#fff"
|
|
7769
7928
|
}), /*#__PURE__*/jsx("path", {
|
|
7770
7929
|
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",
|
|
@@ -7789,6 +7948,13 @@ const SvgShadowinline = props => /*#__PURE__*/jsx("svg", {
|
|
|
7789
7948
|
})
|
|
7790
7949
|
});
|
|
7791
7950
|
|
|
7951
|
+
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
7952
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
7953
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
7954
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
7955
|
+
return MapMarkerVariantEnum;
|
|
7956
|
+
}({});
|
|
7957
|
+
|
|
7792
7958
|
const SCALE_DURATION = 300;
|
|
7793
7959
|
const TRANSLATE_Y_DURATION = 150;
|
|
7794
7960
|
const useNativeAnimation = ({
|
|
@@ -7845,18 +8011,12 @@ const getBackgroundColor$1 = ({
|
|
|
7845
8011
|
isSelected,
|
|
7846
8012
|
variant
|
|
7847
8013
|
}) => {
|
|
7848
|
-
if (variant ===
|
|
8014
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
7849
8015
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home.default;
|
|
7850
8016
|
}
|
|
7851
8017
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint.default;
|
|
7852
8018
|
};
|
|
7853
8019
|
|
|
7854
|
-
let MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
7855
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
7856
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
7857
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
7858
|
-
return MapMarkerVariantEnum;
|
|
7859
|
-
}({});
|
|
7860
8020
|
function StaticMapMarker$1({
|
|
7861
8021
|
variant,
|
|
7862
8022
|
isHovered,
|
|
@@ -8769,6 +8929,148 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8769
8929
|
backgroundColor: theme.picker.web.optionsContainer.backgroundColor
|
|
8770
8930
|
}
|
|
8771
8931
|
}
|
|
8932
|
+
},
|
|
8933
|
+
tabBar: {
|
|
8934
|
+
underline: {
|
|
8935
|
+
default: {
|
|
8936
|
+
active: {
|
|
8937
|
+
color: {
|
|
8938
|
+
default: theme.tabBar.underline.default.active.color.default,
|
|
8939
|
+
focused: theme.tabBar.underline.default.active.color.focused,
|
|
8940
|
+
hovered: theme.tabBar.underline.default.active.color.hovered,
|
|
8941
|
+
pressed: theme.tabBar.underline.default.active.color.pressed
|
|
8942
|
+
},
|
|
8943
|
+
indicator: {
|
|
8944
|
+
backgroundColor: theme.tabBar.underline.default.active.indicator.backgroundColor
|
|
8945
|
+
}
|
|
8946
|
+
},
|
|
8947
|
+
inactive: {
|
|
8948
|
+
color: {
|
|
8949
|
+
default: theme.tabBar.underline.default.inactive.color.default,
|
|
8950
|
+
focused: theme.tabBar.underline.default.inactive.color.focused,
|
|
8951
|
+
hovered: theme.tabBar.underline.default.inactive.color.hovered,
|
|
8952
|
+
pressed: theme.tabBar.underline.default.inactive.color.pressed
|
|
8953
|
+
}
|
|
8954
|
+
},
|
|
8955
|
+
disabled: {
|
|
8956
|
+
color: {
|
|
8957
|
+
default: theme.tabBar.underline.default.disabled.color.default,
|
|
8958
|
+
focused: theme.tabBar.underline.default.disabled.color.focused,
|
|
8959
|
+
hovered: theme.tabBar.underline.default.disabled.color.hovered,
|
|
8960
|
+
pressed: theme.tabBar.underline.default.disabled.color.pressed
|
|
8961
|
+
}
|
|
8962
|
+
},
|
|
8963
|
+
borderBottomColor: theme.tabBar.underline.default.borderBottomColor
|
|
8964
|
+
},
|
|
8965
|
+
revert: {
|
|
8966
|
+
active: {
|
|
8967
|
+
color: {
|
|
8968
|
+
default: theme.tabBar.underline.revert.active.color.default,
|
|
8969
|
+
focused: theme.tabBar.underline.revert.active.color.focused,
|
|
8970
|
+
hovered: theme.tabBar.underline.revert.active.color.hovered,
|
|
8971
|
+
pressed: theme.tabBar.underline.revert.active.color.pressed
|
|
8972
|
+
},
|
|
8973
|
+
indicator: {
|
|
8974
|
+
backgroundColor: theme.tabBar.underline.revert.active.indicator.backgroundColor
|
|
8975
|
+
}
|
|
8976
|
+
},
|
|
8977
|
+
inactive: {
|
|
8978
|
+
color: {
|
|
8979
|
+
default: theme.tabBar.underline.revert.inactive.color.default,
|
|
8980
|
+
focused: theme.tabBar.underline.revert.inactive.color.focused,
|
|
8981
|
+
hovered: theme.tabBar.underline.revert.inactive.color.hovered,
|
|
8982
|
+
pressed: theme.tabBar.underline.revert.inactive.color.pressed
|
|
8983
|
+
}
|
|
8984
|
+
},
|
|
8985
|
+
disabled: {
|
|
8986
|
+
color: {
|
|
8987
|
+
default: theme.tabBar.underline.revert.disabled.color.default,
|
|
8988
|
+
focused: theme.tabBar.underline.revert.disabled.color.focused,
|
|
8989
|
+
hovered: theme.tabBar.underline.revert.disabled.color.hovered,
|
|
8990
|
+
pressed: theme.tabBar.underline.revert.disabled.color.pressed
|
|
8991
|
+
}
|
|
8992
|
+
},
|
|
8993
|
+
borderBottomColor: theme.tabBar.underline.revert.borderBottomColor
|
|
8994
|
+
}
|
|
8995
|
+
},
|
|
8996
|
+
solid: {
|
|
8997
|
+
default: {
|
|
8998
|
+
active: {
|
|
8999
|
+
color: {
|
|
9000
|
+
default: theme.tabBar.solid.default.active.color.default,
|
|
9001
|
+
focused: theme.tabBar.solid.default.active.color.focused,
|
|
9002
|
+
hovered: theme.tabBar.solid.default.active.color.hovered,
|
|
9003
|
+
pressed: theme.tabBar.solid.default.active.color.pressed
|
|
9004
|
+
},
|
|
9005
|
+
backgroundColor: {
|
|
9006
|
+
default: theme.tabBar.solid.default.active.backgroundColor?.default,
|
|
9007
|
+
focused: theme.tabBar.solid.default.active.backgroundColor?.focused,
|
|
9008
|
+
hovered: theme.tabBar.solid.default.active.backgroundColor?.hovered,
|
|
9009
|
+
pressed: theme.tabBar.solid.default.active.backgroundColor?.pressed
|
|
9010
|
+
}
|
|
9011
|
+
},
|
|
9012
|
+
inactive: {
|
|
9013
|
+
color: {
|
|
9014
|
+
default: theme.tabBar.solid.default.inactive.color.default,
|
|
9015
|
+
focused: theme.tabBar.solid.default.inactive.color.focused,
|
|
9016
|
+
hovered: theme.tabBar.solid.default.inactive.color.hovered,
|
|
9017
|
+
pressed: theme.tabBar.solid.default.inactive.color.pressed
|
|
9018
|
+
},
|
|
9019
|
+
backgroundColor: {
|
|
9020
|
+
default: theme.tabBar.solid.default.inactive.backgroundColor?.default,
|
|
9021
|
+
focused: theme.tabBar.solid.default.inactive.backgroundColor?.focused,
|
|
9022
|
+
hovered: theme.tabBar.solid.default.inactive.backgroundColor?.hovered,
|
|
9023
|
+
pressed: theme.tabBar.solid.default.inactive.backgroundColor?.pressed
|
|
9024
|
+
}
|
|
9025
|
+
},
|
|
9026
|
+
disabled: {
|
|
9027
|
+
color: {
|
|
9028
|
+
default: theme.tabBar.solid.default.disabled.color.default,
|
|
9029
|
+
focused: theme.tabBar.solid.default.disabled.color.focused,
|
|
9030
|
+
hovered: theme.tabBar.solid.default.disabled.color.hovered,
|
|
9031
|
+
pressed: theme.tabBar.solid.default.disabled.color.pressed
|
|
9032
|
+
}
|
|
9033
|
+
}
|
|
9034
|
+
},
|
|
9035
|
+
revert: {
|
|
9036
|
+
active: {
|
|
9037
|
+
color: {
|
|
9038
|
+
default: theme.tabBar.solid.revert.active.color.default,
|
|
9039
|
+
focused: theme.tabBar.solid.revert.active.color.focused,
|
|
9040
|
+
hovered: theme.tabBar.solid.revert.active.color.hovered,
|
|
9041
|
+
pressed: theme.tabBar.solid.revert.active.color.pressed
|
|
9042
|
+
},
|
|
9043
|
+
backgroundColor: {
|
|
9044
|
+
default: theme.tabBar.solid.revert.active.backgroundColor?.default,
|
|
9045
|
+
focused: theme.tabBar.solid.revert.active.backgroundColor?.focused,
|
|
9046
|
+
hovered: theme.tabBar.solid.revert.active.backgroundColor?.hovered,
|
|
9047
|
+
pressed: theme.tabBar.solid.revert.active.backgroundColor?.pressed
|
|
9048
|
+
}
|
|
9049
|
+
},
|
|
9050
|
+
inactive: {
|
|
9051
|
+
color: {
|
|
9052
|
+
default: theme.tabBar.solid.revert.inactive.color.default,
|
|
9053
|
+
focused: theme.tabBar.solid.revert.inactive.color.focused,
|
|
9054
|
+
hovered: theme.tabBar.solid.revert.inactive.color.hovered,
|
|
9055
|
+
pressed: theme.tabBar.solid.revert.inactive.color.pressed
|
|
9056
|
+
},
|
|
9057
|
+
backgroundColor: {
|
|
9058
|
+
default: theme.tabBar.solid.revert.inactive.backgroundColor?.default,
|
|
9059
|
+
focused: theme.tabBar.solid.revert.inactive.backgroundColor?.focused,
|
|
9060
|
+
hovered: theme.tabBar.solid.revert.inactive.backgroundColor?.hovered,
|
|
9061
|
+
pressed: theme.tabBar.solid.revert.inactive.backgroundColor?.pressed
|
|
9062
|
+
}
|
|
9063
|
+
},
|
|
9064
|
+
disabled: {
|
|
9065
|
+
color: {
|
|
9066
|
+
default: theme.tabBar.solid.revert.disabled.color.default,
|
|
9067
|
+
focused: theme.tabBar.solid.revert.disabled.color.focused,
|
|
9068
|
+
hovered: theme.tabBar.solid.revert.disabled.color.hovered,
|
|
9069
|
+
pressed: theme.tabBar.solid.revert.disabled.color.pressed
|
|
9070
|
+
}
|
|
9071
|
+
}
|
|
9072
|
+
}
|
|
9073
|
+
}
|
|
8772
9074
|
}
|
|
8773
9075
|
},
|
|
8774
9076
|
app: appTheme?.colors
|
|
@@ -8845,6 +9147,44 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8845
9147
|
highlight: {
|
|
8846
9148
|
borderRadius: theme.highlight.borderRadius
|
|
8847
9149
|
},
|
|
9150
|
+
tabBar: {
|
|
9151
|
+
underline: {
|
|
9152
|
+
default: {
|
|
9153
|
+
active: {
|
|
9154
|
+
borderRadius: theme.tabBar.underline.default.active.borderRadius
|
|
9155
|
+
},
|
|
9156
|
+
inactive: {
|
|
9157
|
+
borderRadius: theme.tabBar.underline.default.inactive.borderRadius
|
|
9158
|
+
}
|
|
9159
|
+
},
|
|
9160
|
+
revert: {
|
|
9161
|
+
active: {
|
|
9162
|
+
borderRadius: theme.tabBar.underline.revert.active.borderRadius
|
|
9163
|
+
},
|
|
9164
|
+
inactive: {
|
|
9165
|
+
borderRadius: theme.tabBar.underline.revert.inactive.borderRadius
|
|
9166
|
+
}
|
|
9167
|
+
}
|
|
9168
|
+
},
|
|
9169
|
+
solid: {
|
|
9170
|
+
default: {
|
|
9171
|
+
active: {
|
|
9172
|
+
borderRadius: theme.tabBar.solid.default.active.borderRadius
|
|
9173
|
+
},
|
|
9174
|
+
inactive: {
|
|
9175
|
+
borderRadius: theme.tabBar.solid.default.inactive.borderRadius
|
|
9176
|
+
}
|
|
9177
|
+
},
|
|
9178
|
+
revert: {
|
|
9179
|
+
active: {
|
|
9180
|
+
borderRadius: theme.tabBar.solid.revert.active.borderRadius
|
|
9181
|
+
},
|
|
9182
|
+
inactive: {
|
|
9183
|
+
borderRadius: theme.tabBar.solid.revert.inactive.borderRadius
|
|
9184
|
+
}
|
|
9185
|
+
}
|
|
9186
|
+
}
|
|
9187
|
+
},
|
|
8848
9188
|
tag: {
|
|
8849
9189
|
borderRadius: theme.tag.borderRadius
|
|
8850
9190
|
},
|
|
@@ -10891,6 +11231,7 @@ function Picker({
|
|
|
10891
11231
|
paddingY: "kitt.2",
|
|
10892
11232
|
children: childrenArray.map((child, index) => {
|
|
10893
11233
|
const currentValue = items[index];
|
|
11234
|
+
if (currentValue === undefined) throw new Error(`Picker: No value found for item at index ${index}`);
|
|
10894
11235
|
const {
|
|
10895
11236
|
onClick,
|
|
10896
11237
|
'aria-selected': ariaSelected,
|
|
@@ -11587,125 +11928,132 @@ const StoryGrid = {
|
|
|
11587
11928
|
Col: StoryGridCol
|
|
11588
11929
|
};
|
|
11589
11930
|
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
return isActive ? kittTheme.colors.primary : kittTheme.colors.blackLight;
|
|
11606
|
-
}
|
|
11607
|
-
}
|
|
11608
|
-
}
|
|
11609
|
-
function useTabBarIndicatorColor(color, isActive) {
|
|
11610
|
-
const {
|
|
11611
|
-
kitt: kittTheme
|
|
11612
|
-
} = useKittTheme();
|
|
11613
|
-
switch (color) {
|
|
11614
|
-
case 'black':
|
|
11615
|
-
{
|
|
11616
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
11617
|
-
}
|
|
11618
|
-
case 'white':
|
|
11619
|
-
{
|
|
11620
|
-
return isActive ? kittTheme.palettes.deepPurple.white : kittTheme.palettes.deepPurple.transparent;
|
|
11621
|
-
}
|
|
11622
|
-
default:
|
|
11623
|
-
{
|
|
11624
|
-
return isActive ? kittTheme.colors.primary : kittTheme.palettes.deepPurple.transparent;
|
|
11625
|
-
}
|
|
11626
|
-
}
|
|
11627
|
-
}
|
|
11931
|
+
const getVariantFromColor = color => {
|
|
11932
|
+
if (color === 'white') return 'revert';
|
|
11933
|
+
return 'default';
|
|
11934
|
+
};
|
|
11935
|
+
const getTabBarItemActiveState = (isActive, disabled) => {
|
|
11936
|
+
if (disabled) return 'disabled';
|
|
11937
|
+
if (isActive) return 'active';
|
|
11938
|
+
return 'inactive';
|
|
11939
|
+
};
|
|
11940
|
+
const getTabBarItemState = (isHovered, isPressed, isFocused) => {
|
|
11941
|
+
if (isHovered) return 'hovered';
|
|
11942
|
+
if (isPressed) return 'pressed';
|
|
11943
|
+
if (isFocused) return 'focused';
|
|
11944
|
+
return 'default';
|
|
11945
|
+
};
|
|
11628
11946
|
function TabBarItem({
|
|
11629
11947
|
name,
|
|
11630
11948
|
icon,
|
|
11631
|
-
|
|
11949
|
+
variant = 'default',
|
|
11950
|
+
type = 'underline',
|
|
11951
|
+
color,
|
|
11632
11952
|
testID,
|
|
11953
|
+
disabled,
|
|
11633
11954
|
isActive = false,
|
|
11955
|
+
isFocusedInternal = false,
|
|
11956
|
+
isHoveredInternal = false,
|
|
11957
|
+
isPressedInternal = false,
|
|
11634
11958
|
onPress
|
|
11635
11959
|
}) {
|
|
11636
|
-
|
|
11637
|
-
const
|
|
11960
|
+
// Keep backward compatibility with color property
|
|
11961
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
11962
|
+
const activeState = getTabBarItemActiveState(isActive, disabled);
|
|
11963
|
+
const baseTheme = `kitt.tabBar.${type}.${definedVariant}.${activeState}`;
|
|
11638
11964
|
return /*#__PURE__*/jsx(Pressable, {
|
|
11965
|
+
disabled: disabled,
|
|
11639
11966
|
testID: testID,
|
|
11640
11967
|
onPress: onPress,
|
|
11641
|
-
children:
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
children:
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
,
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11968
|
+
children: ({
|
|
11969
|
+
isHovered,
|
|
11970
|
+
isPressed,
|
|
11971
|
+
isFocused
|
|
11972
|
+
}) => {
|
|
11973
|
+
const state = getTabBarItemState(isHovered || isHoveredInternal, isPressed || isPressedInternal, isFocused || isFocusedInternal);
|
|
11974
|
+
return /*#__PURE__*/jsxs(HStack, {
|
|
11975
|
+
alignItems: "center",
|
|
11976
|
+
position: "relative",
|
|
11977
|
+
paddingY: "kitt.2",
|
|
11978
|
+
paddingRight: "kitt.2",
|
|
11979
|
+
paddingLeft: icon ? undefined : 'kitt.2',
|
|
11980
|
+
backgroundColor: `${baseTheme}.backgroundColor.${state}`,
|
|
11981
|
+
borderRadius: `${baseTheme}.borderRadius`,
|
|
11982
|
+
children: [icon ? /*#__PURE__*/jsx(View, {
|
|
11983
|
+
marginRight: "kitt.2",
|
|
11984
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
11985
|
+
color: `${baseTheme}.color.${state}`,
|
|
11986
|
+
icon: icon
|
|
11987
|
+
})
|
|
11988
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
11989
|
+
base: "label-large",
|
|
11990
|
+
numberOfLines: 1,
|
|
11991
|
+
color: `${baseTheme}.color.${state}`,
|
|
11992
|
+
children: name
|
|
11993
|
+
}), type !== 'solid' ? /*#__PURE__*/jsx(View, {
|
|
11994
|
+
backgroundColor: `${baseTheme}.indicator.backgroundColor`,
|
|
11995
|
+
position: "absolute",
|
|
11996
|
+
bottom: -1 // in order to be over tab bar's border bottom
|
|
11997
|
+
,
|
|
11998
|
+
left: 0,
|
|
11999
|
+
right: 0,
|
|
12000
|
+
height: 2
|
|
12001
|
+
}) : null]
|
|
12002
|
+
});
|
|
12003
|
+
}
|
|
11666
12004
|
});
|
|
11667
12005
|
}
|
|
11668
12006
|
|
|
11669
12007
|
function TabBar({
|
|
11670
12008
|
tabs,
|
|
11671
|
-
|
|
12009
|
+
variant = 'default',
|
|
12010
|
+
type = 'underline',
|
|
11672
12011
|
align = 'left',
|
|
12012
|
+
color,
|
|
11673
12013
|
activeTabIndex = 0,
|
|
11674
12014
|
renderTabItem,
|
|
11675
|
-
onChangeTab
|
|
11676
|
-
...props
|
|
12015
|
+
onChangeTab
|
|
11677
12016
|
}) {
|
|
11678
12017
|
const sx = useSx();
|
|
11679
|
-
const {
|
|
11680
|
-
kitt: kittTheme
|
|
11681
|
-
} = useKittTheme();
|
|
11682
12018
|
const tabItems = tabs.map((tab, index) => renderTabItem({
|
|
11683
12019
|
tab,
|
|
11684
12020
|
index,
|
|
11685
12021
|
isActive: activeTabIndex === index
|
|
11686
12022
|
}));
|
|
11687
|
-
|
|
12023
|
+
let styles = {
|
|
11688
12024
|
justifyContent: align,
|
|
11689
12025
|
paddingRight: align === 'center' ? 'kitt.2' : 'kitt.12',
|
|
11690
|
-
minWidth: '100%'
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
12026
|
+
minWidth: '100%'
|
|
12027
|
+
};
|
|
12028
|
+
|
|
12029
|
+
// Keep backward compatibility with color property
|
|
12030
|
+
const definedVariant = color ? getVariantFromColor(color) : variant;
|
|
12031
|
+
if (type !== 'solid') {
|
|
12032
|
+
styles = {
|
|
12033
|
+
...styles,
|
|
12034
|
+
borderBottomWidth: 1,
|
|
12035
|
+
borderBottomColor: `kitt.tabBar.${type}.${definedVariant}.borderBottomColor`
|
|
12036
|
+
};
|
|
12037
|
+
}
|
|
12038
|
+
const scrollViewStyles = sx(styles);
|
|
12039
|
+
const space = type === 'solid' ? 'kitt.2' : 'kitt.4';
|
|
11694
12040
|
return /*#__PURE__*/jsx(ScrollView, {
|
|
11695
12041
|
horizontal: true,
|
|
11696
12042
|
showsHorizontalScrollIndicator: false,
|
|
11697
12043
|
contentContainerStyle: scrollViewStyles,
|
|
11698
12044
|
children: /*#__PURE__*/jsx(HStack, {
|
|
11699
|
-
space: align === 'center' ? 'kitt.16' :
|
|
11700
|
-
...props,
|
|
12045
|
+
space: align === 'center' ? 'kitt.16' : space,
|
|
11701
12046
|
children: Children.map(tabItems, (child, index) => {
|
|
11702
12047
|
const tab = tabs[index];
|
|
12048
|
+
if (!tab) throw new Error(`TabBar: tab is undefined at index ${index}`);
|
|
11703
12049
|
return /*#__PURE__*/jsx(View, {
|
|
11704
12050
|
children: /*#__PURE__*/cloneElement(child, {
|
|
11705
12051
|
color,
|
|
12052
|
+
variant: definedVariant,
|
|
12053
|
+
type,
|
|
11706
12054
|
onPress: event => {
|
|
11707
12055
|
onChangeTab({
|
|
11708
|
-
tab
|
|
12056
|
+
tab,
|
|
11709
12057
|
index
|
|
11710
12058
|
});
|
|
11711
12059
|
child.props.onPress?.(event);
|
|
@@ -11853,6 +12201,7 @@ const TimePicker = /*#__PURE__*/forwardRef(({
|
|
|
11853
12201
|
// Format is hh:mm hence 5 characters
|
|
11854
12202
|
if (currentInputValue.length < 5 || !currentInputValue.includes(':')) return;
|
|
11855
12203
|
const [hours, minutes] = currentInputValue.split(':');
|
|
12204
|
+
if (!hours || !minutes) return;
|
|
11856
12205
|
|
|
11857
12206
|
// Prepare the next date. It clones the date value passed as prop if available
|
|
11858
12207
|
const nextDate = value ? new Date(value) : new Date();
|
|
@@ -11893,6 +12242,7 @@ const TimePicker = /*#__PURE__*/forwardRef(({
|
|
|
11893
12242
|
// When input has a value which is more than ':'
|
|
11894
12243
|
if (hasSeparator && sanitizedValue.length > 1) {
|
|
11895
12244
|
const [hours, minutes] = sanitizedValue.split(':');
|
|
12245
|
+
if (!hours || !minutes) return;
|
|
11896
12246
|
const currentHours = getDisplayedHours(hours);
|
|
11897
12247
|
const currentMinutes = getDisplayedMinutes(minutes);
|
|
11898
12248
|
const nextValue = `${currentHours}:${currentMinutes}`;
|