@hero-design/rn 8.91.1 → 8.91.4
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +27 -0
- package/es/index.js +170 -77
- package/lib/index.js +170 -77
- package/package.json +1 -1
- package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +12 -12
- package/src/components/BottomSheet/StyledBottomSheet.tsx +0 -10
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +0 -16
- package/src/components/Calendar/CalendarRange.tsx +5 -1
- package/src/components/Calendar/__tests__/helper.spec.ts +20 -8
- package/src/components/Calendar/helpers.ts +6 -2
- package/src/components/Checkbox/StyledCheckbox.tsx +3 -3
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Checkbox/__tests__/index.spec.tsx +11 -7
- package/src/components/Checkbox/index.tsx +11 -2
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +63 -3
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +21 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +21 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +42 -18
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/FAB/StyledFAB.tsx +1 -5
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +4 -4
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +2 -1
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
- package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +40 -2
- package/src/components/Search/SearchOneLine.tsx +3 -1
- package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +7 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +147 -47
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -38
- package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +2 -2
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Switch/StyledSwitch.tsx +1 -0
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +7 -3
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +337 -16
- package/src/components/TextInput/__tests__/index.spec.tsx +2 -0
- package/src/components/TextInput/index.tsx +7 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +42 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +42 -10
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +52 -29
- package/src/theme/components/bottomSheet.ts +2 -9
- package/src/theme/components/checkbox.ts +7 -0
- package/src/theme/components/fab.ts +5 -9
- package/src/theme/components/switch.ts +5 -5
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +2 -0
- package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +2 -0
- package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +2 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +2 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +6 -3
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +5 -3
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +6 -3
- package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +2 -0
- package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +2 -0
- package/src/theme/global/colors/ehWorkDark.ts +1 -0
- package/src/theme/global/colors/global.ts +3 -0
- package/src/theme/global/colors/swagLight.ts +1 -0
- package/src/theme/global/colors/swagLightGlobal.ts +3 -3
- package/src/theme/global/colors/swagLightJobs.ts +3 -1
- package/src/theme/global/colors/types.ts +2 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/ehWorkDark.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/swagLight.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/ehWorkDark.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/index.spec.ts +24 -0
- package/src/theme/global/shadows/__tests__/swagLight.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +7 -0
- package/src/theme/global/shadows/ehWorkDark.ts +37 -0
- package/src/theme/global/shadows/index.ts +23 -0
- package/src/theme/global/shadows/swagLight.ts +37 -0
- package/src/theme/global/shadows/swagLightJobs.ts +37 -0
- package/src/theme/global/shadows/types.ts +16 -0
- package/stats/8.91.2/rn-stats.html +4842 -0
- package/stats/8.91.3/rn-stats.html +4844 -0
- package/stats/8.91.4/rn-stats.html +4842 -0
- package/types/components/Calendar/helpers.d.ts +5 -2
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
- package/types/components/Checkbox/index.d.ts +2 -1
- package/types/components/TextInput/index.d.ts +3 -1
- package/types/theme/components/bottomSheet.d.ts +1 -10
- package/types/theme/components/checkbox.d.ts +7 -0
- package/types/theme/components/chip.d.ts +1 -10
- package/types/theme/components/fab.d.ts +2 -9
- package/types/theme/components/floatingIsland.d.ts +1 -10
- package/types/theme/components/slider.d.ts +1 -10
- package/types/theme/components/switch.d.ts +1 -1
- package/types/theme/components/textInput.d.ts +1 -0
- package/types/theme/global/colors/swagLightJobs.d.ts +2 -50
- package/types/theme/global/colors/types.d.ts +2 -0
- package/types/theme/global/index.d.ts +2 -12
- package/types/theme/global/shadows/ehWorkDark.d.ts +3 -0
- package/types/theme/global/shadows/index.d.ts +5 -0
- package/types/theme/global/shadows/swagLight.d.ts +3 -0
- package/types/theme/global/shadows/swagLightJobs.d.ts +3 -0
- package/types/theme/global/shadows/types.d.ts +15 -0
- package/src/theme/global/shadows.ts +0 -19
- package/types/theme/global/shadows.d.ts +0 -16
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:3014) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~[0m
|
|
11
11
|
[39m
|
|
12
12
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
13
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
13
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m55s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.91.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3699](https://github.com/Thinkei/hero-design/pull/3699) [`8e1eb77ac97e7b367b74361717772c7e15a61627`](https://github.com/Thinkei/hero-design/commit/8e1eb77ac97e7b367b74361717772c7e15a61627) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [FAB][bottomsheet] Update color
|
|
8
|
+
|
|
9
|
+
- FAB: Update button and backdrop color and shadow
|
|
10
|
+
- BottomSheet: Remove shadow and update backdrop color
|
|
11
|
+
|
|
12
|
+
- [#3704](https://github.com/Thinkei/hero-design/pull/3704) [`643421d7d76789a9bb7f65a850d1c754bed52449`](https://github.com/Thinkei/hero-design/commit/643421d7d76789a9bb7f65a850d1c754bed52449) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Calendar.Range] Allow selecting same date
|
|
13
|
+
|
|
14
|
+
## 8.91.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#3696](https://github.com/Thinkei/hero-design/pull/3696) [`769f2738b4d870703ad169290f3cc36305920a28`](https://github.com/Thinkei/hero-design/commit/769f2738b4d870703ad169290f3cc36305920a28) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Update mobile shadow tokens
|
|
19
|
+
|
|
20
|
+
## 8.91.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#3694](https://github.com/Thinkei/hero-design/pull/3694) [`6b5810543df428ac5e4ffb6be8a3a0c820177d23`](https://github.com/Thinkei/hero-design/commit/6b5810543df428ac5e4ffb6be8a3a0c820177d23) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Checkbox][switch] Update color
|
|
25
|
+
|
|
26
|
+
- [#3695](https://github.com/Thinkei/hero-design/pull/3695) [`5b3d9e000462957834b653bf9f2a3934f39aca6b`](https://github.com/Thinkei/hero-design/commit/5b3d9e000462957834b653bf9f2a3934f39aca6b) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Search.OneLine][textinput] Update placeholder color
|
|
27
|
+
|
|
28
|
+
- [#3697](https://github.com/Thinkei/hero-design/pull/3697) [`0bb02b0f890e99650c5dce6afc231da2c3507539`](https://github.com/Thinkei/hero-design/commit/0bb02b0f890e99650c5dce6afc231da2c3507539) Thanks [@luanlai2201](https://github.com/luanlai2201)! - [TextInput][richtexteditor] Add element to wrap the label
|
|
29
|
+
|
|
3
30
|
## 8.91.1
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -1910,8 +1910,10 @@ var globalPalette$1 = {
|
|
|
1910
1910
|
archived: palette$9.silverChalice,
|
|
1911
1911
|
mutedArchived: palette$9.silverChaliceLight20,
|
|
1912
1912
|
archivedSurface: palette$9.cumberlandFog,
|
|
1913
|
-
onArchivedSurface: palette$9.windsorGrey
|
|
1913
|
+
onArchivedSurface: palette$9.windsorGrey,
|
|
1914
1914
|
// End of Updated 21 / Nov / 22
|
|
1915
|
+
black: '#000000',
|
|
1916
|
+
white: '#ffffff'
|
|
1915
1917
|
};
|
|
1916
1918
|
|
|
1917
1919
|
var swagBrandSystemPallete$1 = {
|
|
@@ -1986,10 +1988,10 @@ var swagDarkSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, glo
|
|
|
1986
1988
|
|
|
1987
1989
|
var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1), {}, {
|
|
1988
1990
|
onDefaultGlobalSurface: palette$3.offBlack,
|
|
1989
|
-
mutedOnDefaultGlobalSurface:
|
|
1990
|
-
inactiveOnDefaultGlobalSurface:
|
|
1991
|
+
mutedOnDefaultGlobalSurface: '#4d6265',
|
|
1992
|
+
inactiveOnDefaultGlobalSurface: '#808f91',
|
|
1991
1993
|
primaryOutline: palette$3.offBlack,
|
|
1992
|
-
inactiveOutline:
|
|
1994
|
+
inactiveOutline: '#808f91'
|
|
1993
1995
|
});
|
|
1994
1996
|
|
|
1995
1997
|
var swagBrandSystemPallete = {
|
|
@@ -2005,9 +2007,12 @@ var swagBrandSystemPallete = {
|
|
|
2005
2007
|
decorativeSecondary: '#fdfbff',
|
|
2006
2008
|
decorativeSecondarySurface: '#f0e6ff'
|
|
2007
2009
|
};
|
|
2008
|
-
var swagSystemPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete)
|
|
2010
|
+
var swagSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete), {}, {
|
|
2011
|
+
name: 'swagLight'
|
|
2012
|
+
});
|
|
2009
2013
|
|
|
2010
2014
|
var swagLightJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
|
|
2015
|
+
name: 'swagLightJobs',
|
|
2011
2016
|
secondary: '#40d1ff',
|
|
2012
2017
|
onSecondary: '#460078',
|
|
2013
2018
|
secondaryHighlightedSurface: '#ecfaff',
|
|
@@ -2124,7 +2129,8 @@ var ehWorkDarkSystemPalette = {
|
|
|
2124
2129
|
decorativeSecondary: '#280541',
|
|
2125
2130
|
decorativeSecondarySurface: '#4c1d95',
|
|
2126
2131
|
// Theme Mode
|
|
2127
|
-
themeMode: 'dark'
|
|
2132
|
+
themeMode: 'dark',
|
|
2133
|
+
name: 'ehWorkDark'
|
|
2128
2134
|
};
|
|
2129
2135
|
|
|
2130
2136
|
var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
@@ -2289,19 +2295,116 @@ var getRadii = function getRadii(baseRadius) {
|
|
|
2289
2295
|
};
|
|
2290
2296
|
};
|
|
2291
2297
|
|
|
2292
|
-
var
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2298
|
+
var swagLightShadowPalette = {
|
|
2299
|
+
"default": {
|
|
2300
|
+
shadowOffset: {
|
|
2301
|
+
width: 0,
|
|
2302
|
+
height: 2
|
|
2303
|
+
},
|
|
2304
|
+
shadowColor: swagSystemPalette.primaryOutline,
|
|
2305
|
+
shadowOpacity: 0.12,
|
|
2306
|
+
shadowRadius: 4,
|
|
2307
|
+
elevation: 3
|
|
2308
|
+
},
|
|
2309
|
+
cardDrawer: {
|
|
2310
|
+
shadowOffset: {
|
|
2311
|
+
width: 0,
|
|
2312
|
+
height: 2
|
|
2313
|
+
},
|
|
2314
|
+
shadowColor: '#001f23',
|
|
2315
|
+
shadowOpacity: 0.12,
|
|
2316
|
+
shadowRadius: 2,
|
|
2317
|
+
elevation: 6
|
|
2318
|
+
},
|
|
2319
|
+
tabBar: {
|
|
2320
|
+
shadowOffset: {
|
|
2321
|
+
width: 0,
|
|
2322
|
+
height: -4
|
|
2323
|
+
},
|
|
2324
|
+
shadowColor: '#001f23',
|
|
2325
|
+
shadowOpacity: 0.04,
|
|
2326
|
+
shadowRadius: 6,
|
|
2327
|
+
elevation: 10
|
|
2328
|
+
}
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
var swagLightJobsShadowPalette = {
|
|
2332
|
+
"default": {
|
|
2333
|
+
shadowOffset: {
|
|
2334
|
+
width: 0,
|
|
2335
|
+
height: 2
|
|
2336
|
+
},
|
|
2337
|
+
shadowColor: swagLightJobsSystemPalette.primaryOutline,
|
|
2338
|
+
shadowOpacity: 0.12,
|
|
2339
|
+
shadowRadius: 4,
|
|
2340
|
+
elevation: 3
|
|
2341
|
+
},
|
|
2342
|
+
cardDrawer: {
|
|
2343
|
+
shadowOffset: {
|
|
2344
|
+
width: 0,
|
|
2345
|
+
height: 2
|
|
2346
|
+
},
|
|
2347
|
+
shadowColor: '#001f23',
|
|
2348
|
+
shadowOpacity: 0.12,
|
|
2349
|
+
shadowRadius: 2,
|
|
2350
|
+
elevation: 6
|
|
2351
|
+
},
|
|
2352
|
+
tabBar: {
|
|
2353
|
+
shadowOffset: {
|
|
2354
|
+
width: 0,
|
|
2355
|
+
height: -4
|
|
2356
|
+
},
|
|
2357
|
+
shadowColor: '#001f23',
|
|
2358
|
+
shadowOpacity: 0.04,
|
|
2359
|
+
shadowRadius: 6,
|
|
2360
|
+
elevation: 10
|
|
2361
|
+
}
|
|
2362
|
+
};
|
|
2363
|
+
|
|
2364
|
+
var ehWorkDarkShadowPalette = {
|
|
2365
|
+
"default": {
|
|
2366
|
+
shadowOffset: {
|
|
2367
|
+
width: 0,
|
|
2368
|
+
height: 2
|
|
2369
|
+
},
|
|
2370
|
+
shadowColor: ehWorkDarkSystemPalette.primaryOutline,
|
|
2371
|
+
shadowOpacity: 0.12,
|
|
2372
|
+
shadowRadius: 4,
|
|
2373
|
+
elevation: 3
|
|
2374
|
+
},
|
|
2375
|
+
cardDrawer: {
|
|
2376
|
+
shadowOffset: {
|
|
2377
|
+
width: 0,
|
|
2378
|
+
height: 2
|
|
2379
|
+
},
|
|
2380
|
+
shadowColor: '#000000',
|
|
2381
|
+
shadowOpacity: 0.56,
|
|
2382
|
+
shadowRadius: 2,
|
|
2383
|
+
elevation: 6
|
|
2384
|
+
},
|
|
2385
|
+
tabBar: {
|
|
2386
|
+
shadowOffset: {
|
|
2387
|
+
width: 0,
|
|
2388
|
+
height: -4
|
|
2389
|
+
},
|
|
2390
|
+
shadowColor: '#000000',
|
|
2391
|
+
shadowOpacity: 0.24,
|
|
2392
|
+
shadowRadius: 6,
|
|
2393
|
+
elevation: 10
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2397
|
+
var getShadows = function getShadows(palette) {
|
|
2398
|
+
switch (palette.name) {
|
|
2399
|
+
case 'swagLight':
|
|
2400
|
+
return swagLightShadowPalette;
|
|
2401
|
+
case 'swagLightJobs':
|
|
2402
|
+
return swagLightJobsShadowPalette;
|
|
2403
|
+
case 'ehWorkDark':
|
|
2404
|
+
return ehWorkDarkShadowPalette;
|
|
2405
|
+
default:
|
|
2406
|
+
return swagLightShadowPalette;
|
|
2407
|
+
}
|
|
2305
2408
|
};
|
|
2306
2409
|
|
|
2307
2410
|
var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
|
|
@@ -2563,7 +2666,7 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
2563
2666
|
var colors = {
|
|
2564
2667
|
shadow: theme.colors.primaryOutline,
|
|
2565
2668
|
background: theme.colors.defaultGlobalSurface,
|
|
2566
|
-
backdrop: theme.colors.
|
|
2669
|
+
backdrop: theme.colors.black,
|
|
2567
2670
|
floatingHeaderIconBackground: theme.colors.archivedSurface
|
|
2568
2671
|
};
|
|
2569
2672
|
var sizes = {
|
|
@@ -2580,15 +2683,6 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
2580
2683
|
floatingInnerPadding: theme.space.small,
|
|
2581
2684
|
floatingHeaderIconPadding: theme.space.small
|
|
2582
2685
|
};
|
|
2583
|
-
var shadows = {
|
|
2584
|
-
offset: {
|
|
2585
|
-
width: 0,
|
|
2586
|
-
height: 3
|
|
2587
|
-
},
|
|
2588
|
-
opacity: 0.4,
|
|
2589
|
-
radius: theme.radii.xlarge,
|
|
2590
|
-
elevation: 10
|
|
2591
|
-
};
|
|
2592
2686
|
var radii = {
|
|
2593
2687
|
"default": theme.radii.xlarge,
|
|
2594
2688
|
floating: theme.radii['5xlarge'],
|
|
@@ -2596,7 +2690,6 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
2596
2690
|
};
|
|
2597
2691
|
return {
|
|
2598
2692
|
colors: colors,
|
|
2599
|
-
shadows: shadows,
|
|
2600
2693
|
radii: radii,
|
|
2601
2694
|
sizes: sizes,
|
|
2602
2695
|
space: space
|
|
@@ -2808,8 +2901,15 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
|
|
|
2808
2901
|
var colors = {
|
|
2809
2902
|
borders: {
|
|
2810
2903
|
"default": theme.colors.primaryOutline,
|
|
2904
|
+
checked: theme.colors.primaryOutline,
|
|
2811
2905
|
disabled: theme.colors.disabledOutline,
|
|
2812
2906
|
readonly: theme.colors.inactiveOutline
|
|
2907
|
+
},
|
|
2908
|
+
checkboxBorder: {
|
|
2909
|
+
"default": theme.colors.primaryOutline,
|
|
2910
|
+
checked: theme.colors.primary,
|
|
2911
|
+
disabled: theme.colors.disabledOutline,
|
|
2912
|
+
readonly: theme.colors.mutedOnDefaultGlobalSurface
|
|
2813
2913
|
}
|
|
2814
2914
|
};
|
|
2815
2915
|
var space = {
|
|
@@ -3033,12 +3133,12 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
3033
3133
|
buttonBackground: theme.colors.overlayGlobalSurface,
|
|
3034
3134
|
buttonPressedBackground: theme.colors.overlayGlobalSurface,
|
|
3035
3135
|
buttonActiveBackground: theme.colors.overlayGlobalSurface,
|
|
3036
|
-
icon: theme.colors.
|
|
3136
|
+
icon: theme.colors.onDarkGlobalSurface,
|
|
3037
3137
|
actionItemBackground: theme.colors.overlayGlobalSurface,
|
|
3038
3138
|
actionItemPressedBackground: theme.colors.overlayGlobalSurface,
|
|
3039
|
-
backdropBackground: theme.colors.
|
|
3040
|
-
titleText: theme.colors.
|
|
3041
|
-
actionItemText: theme.colors.
|
|
3139
|
+
backdropBackground: theme.colors.black,
|
|
3140
|
+
titleText: theme.colors.onDarkGlobalSurface,
|
|
3141
|
+
actionItemText: theme.colors.onDarkGlobalSurface
|
|
3042
3142
|
};
|
|
3043
3143
|
var sizes = {
|
|
3044
3144
|
width: theme.sizes.xxxxxlarge,
|
|
@@ -3062,11 +3162,7 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
3062
3162
|
icon: theme.lineHeights.large
|
|
3063
3163
|
};
|
|
3064
3164
|
var shadows = {
|
|
3065
|
-
|
|
3066
|
-
opacity: theme.shadows["default"].shadowOpacity,
|
|
3067
|
-
radius: theme.shadows["default"].shadowRadius,
|
|
3068
|
-
elevation: theme.shadows["default"].elevation,
|
|
3069
|
-
color: theme.shadows["default"].shadowColor
|
|
3165
|
+
"default": theme.shadows.cardDrawer
|
|
3070
3166
|
};
|
|
3071
3167
|
var space = {
|
|
3072
3168
|
actionItemPadding: theme.space.smallMedium,
|
|
@@ -3582,14 +3678,14 @@ var getSwipeableTheme = function getSwipeableTheme(theme) {
|
|
|
3582
3678
|
var getSwitchTheme = function getSwitchTheme(theme) {
|
|
3583
3679
|
var colors = {
|
|
3584
3680
|
backgroundColors: {
|
|
3585
|
-
checked: theme.colors.
|
|
3681
|
+
checked: theme.colors.pressedSurface,
|
|
3586
3682
|
unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
3587
|
-
'disabled-checked': theme.colors.
|
|
3588
|
-
'disabled-unchecked': theme.colors.
|
|
3683
|
+
'disabled-checked': theme.colors.inactiveOnDefaultGlobalSurface,
|
|
3684
|
+
'disabled-unchecked': theme.colors.inactiveOnDefaultGlobalSurface
|
|
3589
3685
|
},
|
|
3590
|
-
thumb: theme.colors.
|
|
3686
|
+
thumb: theme.colors.white,
|
|
3591
3687
|
selector: {
|
|
3592
|
-
background: theme.colors.
|
|
3688
|
+
background: theme.colors.neutralGlobalSurface,
|
|
3593
3689
|
textBackground: theme.colors.decorativePrimarySurface
|
|
3594
3690
|
}
|
|
3595
3691
|
};
|
|
@@ -3745,7 +3841,8 @@ var getTextInputTheme = function getTextInputTheme(theme) {
|
|
|
3745
3841
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
3746
3842
|
readonly: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
3747
3843
|
filled: theme.colors.onDefaultGlobalSurface
|
|
3748
|
-
}
|
|
3844
|
+
},
|
|
3845
|
+
placeholder: theme.colors.mutedOnDefaultGlobalSurface
|
|
3749
3846
|
};
|
|
3750
3847
|
var space = {
|
|
3751
3848
|
containerPadding: theme.space.medium,
|
|
@@ -9690,11 +9787,6 @@ var StyledFloatingBottomSheet = index$a(Animated.View)(function (_ref2) {
|
|
|
9690
9787
|
var theme = _ref2.theme;
|
|
9691
9788
|
return {
|
|
9692
9789
|
width: '100%',
|
|
9693
|
-
shadowColor: theme.__hd__.bottomSheet.colors.shadow,
|
|
9694
|
-
shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
|
|
9695
|
-
shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
|
|
9696
|
-
shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
|
|
9697
|
-
elevation: theme.__hd__.bottomSheet.shadows.elevation,
|
|
9698
9790
|
backgroundColor: theme.__hd__.bottomSheet.colors.background,
|
|
9699
9791
|
borderRadius: theme.__hd__.bottomSheet.radii.floating,
|
|
9700
9792
|
maxHeight: '100%',
|
|
@@ -9708,11 +9800,6 @@ var StyledBottomSheet = index$a(AnimatedSafeAreaView)(function (_ref3) {
|
|
|
9708
9800
|
borderTopRightRadius: theme.__hd__.bottomSheet.radii["default"],
|
|
9709
9801
|
backgroundColor: theme.__hd__.bottomSheet.colors.background,
|
|
9710
9802
|
width: '100%',
|
|
9711
|
-
shadowColor: theme.__hd__.bottomSheet.colors.shadow,
|
|
9712
|
-
shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
|
|
9713
|
-
shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
|
|
9714
|
-
shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
|
|
9715
|
-
elevation: theme.__hd__.bottomSheet.shadows.elevation,
|
|
9716
9803
|
maxHeight: '94%'
|
|
9717
9804
|
};
|
|
9718
9805
|
});
|
|
@@ -13070,8 +13157,8 @@ var setStartOrEndDate = function setStartOrEndDate(_ref2) {
|
|
|
13070
13157
|
var date = _ref2.date,
|
|
13071
13158
|
startDate = _ref2.startDate,
|
|
13072
13159
|
endDate = _ref2.endDate;
|
|
13073
|
-
// Prevent selecting same date
|
|
13074
|
-
if (isEqDate(date, startDate) || isEqDate(date, endDate)) {
|
|
13160
|
+
// Prevent selecting same date when both dates are set
|
|
13161
|
+
if (startDate && endDate && (isEqDate(date, startDate) || isEqDate(date, endDate))) {
|
|
13075
13162
|
return {
|
|
13076
13163
|
startDate: startDate,
|
|
13077
13164
|
endDate: endDate
|
|
@@ -13240,7 +13327,7 @@ var CalendarRange = function CalendarRange(_ref) {
|
|
|
13240
13327
|
if (isEqDate(value === null || value === void 0 ? void 0 : value.startDate, date) || isEqDate(value === null || value === void 0 ? void 0 : value.endDate, date)) {
|
|
13241
13328
|
return /*#__PURE__*/React__default.createElement(SelectedDate, {
|
|
13242
13329
|
isStart: isEqDate(date, value === null || value === void 0 ? void 0 : value.startDate),
|
|
13243
|
-
showConnector: !!(value !== null && value !== void 0 && value.startDate) && !!(value !== null && value !== void 0 && value.endDate),
|
|
13330
|
+
showConnector: !!(value !== null && value !== void 0 && value.startDate) && !!(value !== null && value !== void 0 && value.endDate) && !isEqDate(value.startDate, value.endDate),
|
|
13244
13331
|
key: date.toDateString(),
|
|
13245
13332
|
date: date,
|
|
13246
13333
|
onPress: function onPress() {
|
|
@@ -14352,7 +14439,7 @@ var StyledCheckbox = index$a(View)(function (_ref4) {
|
|
|
14352
14439
|
flex: 1,
|
|
14353
14440
|
borderRadius: theme.__hd__.checkbox.radii.icon,
|
|
14354
14441
|
borderWidth: theme.__hd__.checkbox.borderWidths.icon,
|
|
14355
|
-
borderColor: theme.__hd__.checkbox.colors.
|
|
14442
|
+
borderColor: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
|
|
14356
14443
|
};
|
|
14357
14444
|
});
|
|
14358
14445
|
var StyledCheckMark = index$a(Icon)(function (_ref5) {
|
|
@@ -14361,19 +14448,23 @@ var StyledCheckMark = index$a(Icon)(function (_ref5) {
|
|
|
14361
14448
|
return {
|
|
14362
14449
|
position: 'absolute',
|
|
14363
14450
|
top: theme.__hd__.checkbox.space.iconTop,
|
|
14364
|
-
color: theme.__hd__.checkbox.colors.
|
|
14451
|
+
color: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
|
|
14365
14452
|
};
|
|
14366
14453
|
});
|
|
14367
14454
|
|
|
14368
14455
|
var getThemeState = function getThemeState(_ref) {
|
|
14369
14456
|
var disabled = _ref.disabled,
|
|
14370
|
-
readonly = _ref.readonly
|
|
14457
|
+
readonly = _ref.readonly,
|
|
14458
|
+
checked = _ref.checked;
|
|
14371
14459
|
if (disabled) {
|
|
14372
14460
|
return 'disabled';
|
|
14373
14461
|
}
|
|
14374
14462
|
if (readonly) {
|
|
14375
14463
|
return 'readonly';
|
|
14376
14464
|
}
|
|
14465
|
+
if (checked) {
|
|
14466
|
+
return 'checked';
|
|
14467
|
+
}
|
|
14377
14468
|
return 'default';
|
|
14378
14469
|
};
|
|
14379
14470
|
var Checkbox = function Checkbox(_ref2) {
|
|
@@ -14391,7 +14482,8 @@ var Checkbox = function Checkbox(_ref2) {
|
|
|
14391
14482
|
useDeprecation("Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.", withBorder === true);
|
|
14392
14483
|
var themeState = getThemeState({
|
|
14393
14484
|
disabled: disabled,
|
|
14394
|
-
readonly: readonly
|
|
14485
|
+
readonly: readonly,
|
|
14486
|
+
checked: checked
|
|
14395
14487
|
});
|
|
14396
14488
|
return /*#__PURE__*/React__default.createElement(StyledWrapper$8, {
|
|
14397
14489
|
onPress: onPress,
|
|
@@ -14584,11 +14676,13 @@ var renderInput$1 = function renderInput(_ref3) {
|
|
|
14584
14676
|
var variant = _ref3.variant,
|
|
14585
14677
|
nativeInputProps = _ref3.nativeInputProps,
|
|
14586
14678
|
renderInputValue = _ref3.renderInputValue,
|
|
14587
|
-
ref = _ref3.ref
|
|
14679
|
+
ref = _ref3.ref,
|
|
14680
|
+
theme = _ref3.theme;
|
|
14588
14681
|
return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
|
|
14589
14682
|
themeVariant: variant,
|
|
14590
14683
|
multiline: variant === 'textarea' || nativeInputProps.multiline,
|
|
14591
|
-
ref: ref
|
|
14684
|
+
ref: ref,
|
|
14685
|
+
placeholderTextColor: theme.__hd__.textInput.colors.placeholder
|
|
14592
14686
|
}));
|
|
14593
14687
|
};
|
|
14594
14688
|
var renderSuffix$1 = function renderSuffix(_ref4) {
|
|
@@ -14843,13 +14937,14 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
14843
14937
|
},
|
|
14844
14938
|
themeState: state,
|
|
14845
14939
|
testID: "input-label-asterisk"
|
|
14846
|
-
}, "*"), label)), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
|
|
14940
|
+
}, "*"), /*#__PURE__*/React__default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
|
|
14847
14941
|
variant: variant,
|
|
14848
14942
|
nativeInputProps: nativeInputProps,
|
|
14849
14943
|
renderInputValue: renderInputValue,
|
|
14850
14944
|
ref: function ref(rnTextInputRef) {
|
|
14851
14945
|
innerTextInput.current = rnTextInputRef;
|
|
14852
|
-
}
|
|
14946
|
+
},
|
|
14947
|
+
theme: theme
|
|
14853
14948
|
})), renderSuffix$1({
|
|
14854
14949
|
state: state,
|
|
14855
14950
|
loading: loading,
|
|
@@ -16152,7 +16247,7 @@ var AnimatedTouchableHighlight = Animated.createAnimatedComponent(TouchableOpaci
|
|
|
16152
16247
|
var StyledFAB$2 = index$a(AnimatedTouchableHighlight)(function (_ref) {
|
|
16153
16248
|
var theme = _ref.theme,
|
|
16154
16249
|
themeActive = _ref.themeActive;
|
|
16155
|
-
return {
|
|
16250
|
+
return _objectSpread2({
|
|
16156
16251
|
backgroundColor: themeActive ? theme.__hd__.fab.colors.buttonActiveBackground : theme.__hd__.fab.colors.buttonBackground,
|
|
16157
16252
|
borderRadius: theme.radii.rounded,
|
|
16158
16253
|
alignItems: 'center',
|
|
@@ -16160,13 +16255,8 @@ var StyledFAB$2 = index$a(AnimatedTouchableHighlight)(function (_ref) {
|
|
|
16160
16255
|
alignSelf: 'flex-start',
|
|
16161
16256
|
padding: theme.__hd__.fab.space.containerPadding,
|
|
16162
16257
|
flexDirection: 'row',
|
|
16163
|
-
elevation: theme.__hd__.fab.shadows.elevation,
|
|
16164
|
-
shadowColor: theme.__hd__.fab.shadows.color,
|
|
16165
|
-
shadowOffset: theme.__hd__.fab.shadows.offset,
|
|
16166
|
-
shadowRadius: theme.__hd__.fab.shadows.radius,
|
|
16167
|
-
shadowOpacity: theme.__hd__.fab.shadows.opacity,
|
|
16168
16258
|
height: theme.__hd__.fab.sizes.height
|
|
16169
|
-
};
|
|
16259
|
+
}, theme.__hd__.fab.shadows["default"]);
|
|
16170
16260
|
});
|
|
16171
16261
|
var StyledFABIcon = index$a(Icon)(function (_ref2) {
|
|
16172
16262
|
var theme = _ref2.theme;
|
|
@@ -16462,7 +16552,7 @@ var StyledBackdrop = index$a(AnimatedPressable)(function (_ref2) {
|
|
|
16462
16552
|
right: 0,
|
|
16463
16553
|
top: 0,
|
|
16464
16554
|
bottom: 0,
|
|
16465
|
-
opacity: 0.
|
|
16555
|
+
opacity: 0.4,
|
|
16466
16556
|
backgroundColor: theme.__hd__.fab.colors.backdropBackground
|
|
16467
16557
|
};
|
|
16468
16558
|
});
|
|
@@ -19459,7 +19549,8 @@ var StyledWrapper$2 = index$a(View)(function (_ref) {
|
|
|
19459
19549
|
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
19460
19550
|
backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
|
|
19461
19551
|
display: 'flex',
|
|
19462
|
-
justifyContent: 'center'
|
|
19552
|
+
justifyContent: 'center',
|
|
19553
|
+
opacity: themeVariant.includes('disabled') ? 0.4 : 1
|
|
19463
19554
|
};
|
|
19464
19555
|
});
|
|
19465
19556
|
var StyledKnot = index$a(Animated.View)(function (_ref2) {
|
|
@@ -39814,7 +39905,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
39814
39905
|
backgroundColor: theme.__hd__.textInput.colors.labelBackground
|
|
39815
39906
|
},
|
|
39816
39907
|
themeState: state
|
|
39817
|
-
}, "*"), label)), /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
|
|
39908
|
+
}, "*"), /*#__PURE__*/React__default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
|
|
39818
39909
|
onLayout: onLayout
|
|
39819
39910
|
}, /*#__PURE__*/React__default.createElement(StyledBorderBackDrop, {
|
|
39820
39911
|
themeState: state,
|
|
@@ -40209,6 +40300,7 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
40209
40300
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40210
40301
|
isFocused = _React$useState2[0],
|
|
40211
40302
|
setIsFocused = _React$useState2[1];
|
|
40303
|
+
var theme = useTheme();
|
|
40212
40304
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
40213
40305
|
var isEmptyValue = displayText.length === 0;
|
|
40214
40306
|
var state = getState({
|
|
@@ -40293,7 +40385,8 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
40293
40385
|
maxLength: maxLength,
|
|
40294
40386
|
value: value,
|
|
40295
40387
|
defaultValue: defaultValue,
|
|
40296
|
-
placeholder: placeholder
|
|
40388
|
+
placeholder: placeholder,
|
|
40389
|
+
placeholderTextColor: theme.__hd__.textInput.colors.placeholder
|
|
40297
40390
|
}),
|
|
40298
40391
|
ref: function ref(rnTextInputRef) {
|
|
40299
40392
|
innerTextInput.current = rnTextInputRef;
|