@innovaccer/design-system 2.13.2 → 2.13.4-1
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/core/components/atoms/checkbox/__stories__/Alignment.story.jsx +11 -13
- package/core/components/atoms/dropdown/Dropdown.tsx +18 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +47 -57
- package/core/components/atoms/dropdown/__stories__/LabelInline.story.jsx +58 -0
- package/core/components/atoms/dropdown/__stories__/{LabelPositionInDropdown.story.jsx → LabelOnTop.story.jsx} +8 -9
- package/core/components/atoms/dropdown/option/DefaultOption.tsx +1 -1
- package/core/components/atoms/dropdown/utility.tsx +6 -0
- package/core/components/atoms/icon/__stories__/variants/Image.story.jsx +3 -3
- package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +4 -0
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +3 -0
- package/core/components/molecules/sidesheet/__stories__/variants/twoSteps.story.jsx +6 -4
- package/core/components/organisms/calendar/__stories__/index.story.jsx +4 -6
- package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx +3 -0
- package/core/components/organisms/horizontalNav/__stories__/leftAlign.story.jsx +35 -19
- package/core/components/organisms/pageHeader/__stories__/Responsiveness.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigationL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepper.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepperL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabsL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilter.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilterL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigationL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withStepperL1.story.jsx +4 -4
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.jsx +4 -4
- package/core/components/organisms/timePicker/TimePicker.tsx +6 -113
- package/core/components/organisms/timePicker/TimePickerWithInput.tsx +124 -0
- package/core/components/organisms/timePicker/TimePickerWithSearch.tsx +198 -0
- package/core/components/organisms/timePicker/__stories__/TimeIntervals.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/disabledOption.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/fromTo.story.jsx +72 -0
- package/core/components/organisms/timePicker/__stories__/showDuration.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/withDatePicker.story.jsx +88 -0
- package/core/components/organisms/timePicker/__stories__/{index.story.jsx → withInput.story.jsx} +6 -3
- package/core/components/organisms/timePicker/__stories__/withSearch.story.jsx +89 -0
- package/core/components/organisms/timePicker/__tests__/TimePickerWithSearch.test.tsx +486 -0
- package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePickerWithSearch.test.tsx.snap +169 -0
- package/core/components/organisms/timePicker/index.tsx +2 -0
- package/core/components/organisms/timePicker/utility/searchUtils.tsx +295 -0
- package/core/components/organisms/timePicker/utility/timePickerUtility.tsx +219 -0
- package/core/components/organisms/timePicker/utils.tsx +1 -1
- package/core/index.tsx +1 -0
- package/css/dist/index.css +4 -10
- package/css/dist/index.css.map +1 -1
- package/css/src/components/dropdown.css +2 -6
- package/css/src/components/metricInput.css +1 -0
- package/css/src/components/modal.css +1 -2
- package/dist/core/components/atoms/dropdown/Dropdown.d.ts +2 -0
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +1 -0
- package/dist/core/components/atoms/dropdown/utility.d.ts +1 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +22 -22
- package/dist/core/components/organisms/timePicker/TimePicker.d.ts +5 -13
- package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +24 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +32 -0
- package/dist/core/components/organisms/timePicker/index.d.ts +2 -0
- package/dist/core/components/organisms/timePicker/utility/searchUtils.d.ts +7 -0
- package/dist/core/components/organisms/timePicker/utility/timePickerUtility.d.ts +19 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/index.esm.js +709 -46
- package/dist/index.js +638 -68
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/docs/.eslintrc.json +32 -1
- package/docs/.prettierrc +6 -0
- package/docs/README.md +14 -0
- package/docs/cypress/e2e/main.cy.js +35 -0
- package/docs/cypress/fixtures/example.json +5 -0
- package/docs/cypress/support/commands.ts +37 -0
- package/docs/cypress/support/e2e.ts +20 -0
- package/docs/cypress.config.js +9 -0
- package/docs/package.json +16 -2
- package/docs/src/components/Colors/Colors.js +13 -41
- package/docs/src/components/Container/ComponentsContainer.js +10 -30
- package/docs/src/components/Container/Container.js +10 -41
- package/docs/src/components/ErrorBoundary.js +9 -3
- package/docs/src/components/Footer/Footer.js +11 -10
- package/docs/src/components/GlobalSearch/index.js +47 -44
- package/docs/src/components/Header/Header.css +4 -0
- package/docs/src/components/Header/Header.js +25 -19
- package/docs/src/components/Layout.js +110 -172
- package/docs/src/components/LeftNav/LeftNav.js +12 -28
- package/docs/src/components/Logos/Logos.js +12 -26
- package/docs/src/components/MDXHeading.js +12 -18
- package/docs/src/components/Meta.js +9 -9
- package/docs/src/components/PropsTable/ArgJsDoc.tsx +2 -6
- package/docs/src/components/PropsTable/ArgRow.tsx +19 -47
- package/docs/src/components/PropsTable/ArgValue.tsx +50 -93
- package/docs/src/components/PropsTable/EmptyBlock.tsx +2 -5
- package/docs/src/components/PropsTable/SectionRow.tsx +7 -18
- package/docs/src/components/PropsTable/Table.tsx +43 -130
- package/docs/src/components/PropsTable/generateImports.tsx +1 -3
- package/docs/src/components/PropsTable/index.js +94 -140
- package/docs/src/components/PropsTable/prism.css +19 -20
- package/docs/src/components/Rules/DONTs.js +1 -6
- package/docs/src/components/Rules/DOs.js +1 -6
- package/docs/src/components/Rules/IconWrapper.js +6 -7
- package/docs/src/components/Rules/InlineMessage.js +1 -5
- package/docs/src/components/Rules/Rules.js +18 -28
- package/docs/src/components/TableOfContent/TableOfContent.js +49 -54
- package/docs/src/components/css/global.css +1 -1
- package/docs/src/components/css/prism.css +1 -1
- package/docs/src/components/css/style.css +7 -3
- package/docs/src/components/templates/Default.js +1 -1
- package/docs/src/components/templates/Homepage.js +4 -6
- package/docs/src/data/components/Overview.js +49 -56
- package/docs/src/data/components/images/Calendar.png +0 -0
- package/docs/src/data/components/images/MetaList.png +0 -0
- package/docs/src/data/components/images/PageHeader.png +0 -0
- package/docs/src/data/components/images/TimePicker.png +0 -0
- package/docs/src/data/components/images/mobile/Badge.png +0 -0
- package/docs/src/data/components/images/mobile/Dropdown.png +0 -0
- package/docs/src/data/components/images/mobile/Message.png +0 -0
- package/docs/src/data/components/images/mobile/MetaList.png +0 -0
- package/docs/src/data/components/images/mobile/Slider.png +0 -0
- package/docs/src/data/components/images/mobile/StatusHint.png +0 -0
- package/docs/src/data/components/images/mobile/Stepper.png +0 -0
- package/docs/src/data/components/index.js +168 -321
- package/docs/src/data/components/mobile.js +85 -125
- package/docs/src/data/components/overview.css +4 -2
- package/docs/src/data/components/patterns.js +25 -59
- package/docs/src/data/header-items.yaml +1 -0
- package/docs/src/data/nav/components.yaml +1 -7
- package/docs/src/pages/404.js +7 -17
- package/docs/src/pages/components/avatar/usage.mdx +1 -0
- package/docs/src/pages/components/button/usage.mdx +2 -2
- package/docs/src/pages/components/calendar/usage.mdx +3 -3
- package/docs/src/pages/components/chips/images/actionchip-state.png +0 -0
- package/docs/src/pages/components/chips/images/inputchips-state.png +0 -0
- package/docs/src/pages/components/chips/images/selectionchip-state.png +0 -0
- package/docs/src/pages/components/chips/usage.mdx +24 -2
- package/docs/src/pages/components/datePicker/images/datePicker-3.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-6.png +0 -0
- package/docs/src/pages/components/datePicker/usage.mdx +9 -2
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-3.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-1.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-4.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/usage.mdx +4 -4
- package/docs/src/pages/components/inputs/usage.mdx +7 -7
- package/docs/src/pages/components/tabs/images/tabs-1.png +0 -0
- package/docs/src/pages/content/button-guidelines/tabs/button-glossary.mdx +1776 -1
- package/docs/src/pages/content/button-guidelines/tabs/confusing-buttons.mdx +479 -8
- package/docs/src/pages/content/email-guidelines.mdx +3 -3
- package/docs/src/pages/content/house-rules/tabs/date,-time-&-numbers.mdx +24 -0
- package/docs/src/pages/content/house-rules/tabs/grammer.mdx +42 -2
- package/docs/src/pages/content/house-rules/tabs/punctuations.mdx +32 -0
- package/docs/src/pages/foundations/colors.mdx +338 -24
- package/docs/src/pages/foundations/layout/index.mdx +57 -82
- package/docs/src/pages/foundations/response-time.mdx +32 -77
- package/docs/src/pages/index.js +92 -121
- package/docs/src/pages/mobile/components/badges/images/badge-1.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-2.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-3.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-4.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-5.png +0 -0
- package/docs/src/pages/mobile/components/badges/usage.mdx +100 -0
- package/docs/src/pages/mobile/components/card/images/mcard-1.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-2.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-3.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-4.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-5.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-6.png +0 -0
- package/docs/src/pages/mobile/components/card/usage.mdx +54 -67
- package/docs/src/pages/mobile/components/checkbox/images/checkbox-1.png +0 -0
- package/docs/src/pages/mobile/components/checkbox/usage.mdx +26 -2
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-1.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-10.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-11.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-2.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-3.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-4.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-5.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-6.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-7.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-8.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-9.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/usage.mdx +88 -0
- package/docs/src/pages/mobile/components/message/images/messages-1.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-10.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-11.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-12.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-2.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-3.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-4.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-5.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-6.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-7.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-8.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-9.png +0 -0
- package/docs/src/pages/mobile/components/message/usage.mdx +170 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-1.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-2.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-3.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-4.png +0 -0
- package/docs/src/pages/mobile/components/metaList/usage.mdx +71 -0
- package/docs/src/pages/mobile/components/slider/images/slider-1.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-2.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-3.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-4.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-5.png +0 -0
- package/docs/src/pages/mobile/components/slider/usage.mdx +83 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-1.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-2.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-3.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-4.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-5.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-6.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-7.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/usage.mdx +108 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-1.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-2.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-3.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-4.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-5.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-6.png +0 -0
- package/docs/src/pages/mobile/components/steppers/usage.mdx +111 -0
- package/docs/src/pages/mobile/foundations/layout/images/layout-2.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/index.mdx +3 -1
- package/docs/src/pages/mobile/foundations/page-types/index.mdx +0 -214
- package/docs/src/pages/mobile/foundations/spacing/index.mdx +5 -0
- package/docs/src/pages/mobile/foundations/typography.mdx +1 -1
- package/docs/src/pages/patterns/uiStates/usage.mdx +92 -0
- package/docs/src/util/Frontmatter.js +4 -4
- package/docs/src/util/HeaderItems.js +2 -1
- package/docs/src/util/Helpers.js +3 -3
- package/docs/src/util/HomeIcons.js +91 -53
- package/docs/src/util/InPageNavItems.js +2 -6
- package/docs/src/util/Logos.js +2 -2
- package/docs/src/util/MdsChangelog.js +5 -10
- package/docs/src/util/MediumBlogs.js +13 -13
- package/docs/src/util/NavItems.js +14 -17
- package/docs/src/util/Search.js +2 -2
- package/docs/src/util/StorybookData.js +2 -4
- package/docs/src/util/constants.js +1 -5
- package/docs/src/util/context/NavContext.js +1 -4
- package/docs/src/util/hooks/useMetadata.js +1 -1
- package/package.json +1 -1
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-3.png +0 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertToTwoDigit,
|
|
3
|
+
_isTimeInAM,
|
|
4
|
+
_isTimeInPM,
|
|
5
|
+
checkTimeDifference,
|
|
6
|
+
getTimeDifference,
|
|
7
|
+
} from './timePickerUtility';
|
|
8
|
+
import { OptionSchema } from '@/components/atoms/dropdown/option';
|
|
9
|
+
|
|
10
|
+
interface timeObj {
|
|
11
|
+
hour: string;
|
|
12
|
+
min: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const convertMinTo60 = (time: string) => {
|
|
16
|
+
const parseNum = parseInt(time, 10);
|
|
17
|
+
if (parseNum < 10) return time;
|
|
18
|
+
|
|
19
|
+
const timeInNum = parseNum > 60 ? parseNum % 60 : parseNum;
|
|
20
|
+
const min = (timeInNum.toString() + '0').slice(0, 2);
|
|
21
|
+
return min;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const get24HourCurrentTime = () => {
|
|
25
|
+
const today = new Date();
|
|
26
|
+
return convertToTwoDigit(today.getHours()) + ':' + convertToTwoDigit(today.getMinutes());
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const convertHourTo24 = (time: string) => {
|
|
30
|
+
const timeInNum = parseInt(time, 10) % 24;
|
|
31
|
+
return timeInNum.toString();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const convertHourTo12 = (time: string) => {
|
|
35
|
+
const timeInNum = parseInt(time, 10) % 12;
|
|
36
|
+
return timeInNum.toString();
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const _checkNumber = (str: string) => {
|
|
40
|
+
const numberRegex = /^[0-9]+$/;
|
|
41
|
+
return numberRegex.test(str);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const _checkNumberWithAMPM = (str: string) => {
|
|
45
|
+
const numberWithAMPMRegex = /^[0-9]+[ AaMmPp]+$/;
|
|
46
|
+
return numberWithAMPMRegex.test(str);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const _checkNumberWithSpecialChar = (str: string) => {
|
|
50
|
+
const numberWithSpecialCharRegex = /^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/;
|
|
51
|
+
return numberWithSpecialCharRegex.test(str);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const _checkNumberWithSpecialCharAMPM = (str: string) => {
|
|
55
|
+
const numberWithSpecialCharAMPM = /^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/;
|
|
56
|
+
return numberWithSpecialCharAMPM.test(str);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const specialCharRegex = /[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @param searchTime in [number special-char number] format
|
|
63
|
+
* @returns timeObj with hour & minute in 24 hour format
|
|
64
|
+
*/
|
|
65
|
+
const getTimeFromNumberWithSpecialChar = (searchTime: string) => {
|
|
66
|
+
const time = searchTime.split(specialCharRegex);
|
|
67
|
+
const hour = convertHourTo24(time[0]);
|
|
68
|
+
const hh = convertToTwoDigit(hour);
|
|
69
|
+
|
|
70
|
+
const min = time[1] !== '' ? convertMinTo60(time[1]) : '00';
|
|
71
|
+
const mm = (min + '0').slice(0, 2);
|
|
72
|
+
|
|
73
|
+
return { hour: hh, min: mm };
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* If search term only contains number
|
|
78
|
+
* @param searchTerm
|
|
79
|
+
* @returns timeObj with hour & minute in 24 hour format
|
|
80
|
+
*/
|
|
81
|
+
const getSearchTimeFromNumber = (searchTerm: string, show12HourFormat?: boolean) => {
|
|
82
|
+
const searchLen = searchTerm.length;
|
|
83
|
+
const searchTimeInNum = parseInt(searchTerm, 10);
|
|
84
|
+
const firstTwoTerm = searchTerm.slice(0, 2);
|
|
85
|
+
let hh = '00';
|
|
86
|
+
let mm = '00';
|
|
87
|
+
|
|
88
|
+
switch (searchLen) {
|
|
89
|
+
case 1: // if search term length is 1 consider it as hour
|
|
90
|
+
hh = '0' + searchTerm;
|
|
91
|
+
break;
|
|
92
|
+
|
|
93
|
+
case 2: // if search term length is 2
|
|
94
|
+
if (searchTimeInNum <= 24 || (show12HourFormat && searchTimeInNum <= 12)) {
|
|
95
|
+
// consider it as hour
|
|
96
|
+
hh = convertToTwoDigit(searchTerm);
|
|
97
|
+
} else {
|
|
98
|
+
// consider first term as hour and last term as min
|
|
99
|
+
hh = '0' + searchTerm[0];
|
|
100
|
+
mm = convertMinTo60(searchTerm[1] + '0');
|
|
101
|
+
// mm = searchTerm[1] + '0';
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
|
|
105
|
+
case 3:
|
|
106
|
+
hh = '0' + searchTerm[0];
|
|
107
|
+
mm = convertMinTo60(searchTerm.slice(1));
|
|
108
|
+
break;
|
|
109
|
+
|
|
110
|
+
case 4:
|
|
111
|
+
hh = show12HourFormat ? convertHourTo12(firstTwoTerm) : convertHourTo24(firstTwoTerm);
|
|
112
|
+
mm = convertMinTo60(searchTerm.slice(2));
|
|
113
|
+
break;
|
|
114
|
+
|
|
115
|
+
default:
|
|
116
|
+
// set time as -1 in case of invalid time
|
|
117
|
+
hh = '-1';
|
|
118
|
+
mm = '-1';
|
|
119
|
+
}
|
|
120
|
+
return { hour: hh, min: mm };
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @param searchTime in [number AMPM] format
|
|
125
|
+
* @returns timeObj with hour & minute in 24 hour format
|
|
126
|
+
*/
|
|
127
|
+
const getTimeFromNumberWithAMPM = (searchTime: string) => {
|
|
128
|
+
const timeArr = searchTime.split(/[\saAmMpP]/);
|
|
129
|
+
const { hour, min } = getSearchTimeFromNumber(timeArr[0], true);
|
|
130
|
+
|
|
131
|
+
return { hour, min };
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @param searchTerm entered by user in any format
|
|
136
|
+
* @returns modified search term in 24 hour format
|
|
137
|
+
*/
|
|
138
|
+
export const formatSearchTerm = (optionList: string[], searchTerm: string) => {
|
|
139
|
+
let searchTime = { hour: '00', min: '00' };
|
|
140
|
+
|
|
141
|
+
// If search term only contains numbers
|
|
142
|
+
if (_checkNumber(searchTerm)) {
|
|
143
|
+
const searchTimeInHHMM = getSearchTimeFromNumber(searchTerm);
|
|
144
|
+
|
|
145
|
+
if (parseInt(searchTimeInHHMM.hour) <= 12 && parseInt(searchTimeInHHMM.hour) > 0) {
|
|
146
|
+
// switch to AM/PM based on current time
|
|
147
|
+
searchTime = getCurrentRelativeTime(optionList, searchTimeInHHMM);
|
|
148
|
+
} else {
|
|
149
|
+
searchTime = searchTimeInHHMM;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// if search term contains numbers along with [ampm]
|
|
154
|
+
else if (_checkNumberWithAMPM(searchTerm)) {
|
|
155
|
+
searchTime = getTimeFromNumberWithAMPM(searchTerm);
|
|
156
|
+
searchTime.hour = convert12To24HourFormat(searchTime.hour, searchTerm);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// if search term contains numbers along with special character
|
|
160
|
+
else if (_checkNumberWithSpecialChar(searchTerm)) {
|
|
161
|
+
const searchTimeInHHMM = getTimeFromNumberWithSpecialChar(searchTerm);
|
|
162
|
+
|
|
163
|
+
if (parseInt(searchTimeInHHMM.hour) <= 12) {
|
|
164
|
+
// switch to AM/PM based on current time
|
|
165
|
+
searchTime = getCurrentRelativeTime(optionList, searchTimeInHHMM);
|
|
166
|
+
} else {
|
|
167
|
+
searchTime = searchTimeInHHMM;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// if search term contains numbers, special character & [AmPm]
|
|
172
|
+
else if (_checkNumberWithSpecialCharAMPM(searchTerm)) {
|
|
173
|
+
const timeWithoutAMPM = searchTerm.replace(/[\saApPmM]/g, '');
|
|
174
|
+
|
|
175
|
+
if (_checkNumber(timeWithoutAMPM)) {
|
|
176
|
+
searchTime = getSearchTimeFromNumber(timeWithoutAMPM, true);
|
|
177
|
+
} else if (_checkNumberWithSpecialChar(timeWithoutAMPM)) {
|
|
178
|
+
searchTime = getTimeFromNumberWithSpecialChar(timeWithoutAMPM);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
searchTime.hour = convert12To24HourFormat(searchTime.hour, searchTerm);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return searchTime;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @param hours
|
|
189
|
+
* @param searchTerm
|
|
190
|
+
* @returns hours based on AM/PM in 24 hour format
|
|
191
|
+
*/
|
|
192
|
+
const convert12To24HourFormat = (hours: string, searchTerm: string) => {
|
|
193
|
+
if (hours === '12' && _isTimeInAM(searchTerm)) {
|
|
194
|
+
hours = '00';
|
|
195
|
+
} else if (_isTimeInPM(searchTerm) && hours !== '12') {
|
|
196
|
+
hours = (parseInt(hours, 10) + 12).toString();
|
|
197
|
+
}
|
|
198
|
+
return hours;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Switch to AM/PM time based on current time
|
|
203
|
+
* @param optionList
|
|
204
|
+
* @param searchTime
|
|
205
|
+
*/
|
|
206
|
+
const getCurrentRelativeTime = (optionList: string[], searchTime: timeObj) => {
|
|
207
|
+
const searchTimeStr = `${searchTime.hour}:${searchTime.min}`;
|
|
208
|
+
const currentTime = get24HourCurrentTime();
|
|
209
|
+
const greaterTime = checkTimeDifference(currentTime, searchTimeStr);
|
|
210
|
+
const currentTimeIndex = findClosestTimeIndex(optionList, currentTime);
|
|
211
|
+
const searchTimeIndex = findClosestTimeIndex(optionList, searchTimeStr);
|
|
212
|
+
|
|
213
|
+
if (greaterTime && currentTimeIndex > searchTimeIndex) {
|
|
214
|
+
const hourIn24Format = parseInt(searchTime.hour, 10) + 12;
|
|
215
|
+
searchTime.hour = hourIn24Format.toString();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return searchTime;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const findClosestTimeIndex = (optionList: string[], searchItem: string) => {
|
|
222
|
+
let closestItemIndex = 0;
|
|
223
|
+
const minTime = { hour: 100, mins: 100 };
|
|
224
|
+
|
|
225
|
+
for (let index = 0; index < optionList.length; index++) {
|
|
226
|
+
const { hour, minute } = getTimeDifference(searchItem, optionList[index]);
|
|
227
|
+
if (hour < minTime.hour || (hour === minTime.hour && minute < minTime.mins)) {
|
|
228
|
+
minTime.hour = hour;
|
|
229
|
+
minTime.mins = minute;
|
|
230
|
+
closestItemIndex = index;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return closestItemIndex;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Get index of search term from option list
|
|
239
|
+
* @param optionList
|
|
240
|
+
* @param searchTerm
|
|
241
|
+
* @returns Index of the search term in option list
|
|
242
|
+
*/
|
|
243
|
+
export const getSearchIndex = (optionList: string[], searchTerm: string) => {
|
|
244
|
+
let { hour, min } = formatSearchTerm(optionList, searchTerm);
|
|
245
|
+
if (min === '60') {
|
|
246
|
+
min = '00';
|
|
247
|
+
hour = (parseInt(hour, 10) + 1).toString();
|
|
248
|
+
}
|
|
249
|
+
const searchItem = `${hour}:${min}`;
|
|
250
|
+
|
|
251
|
+
const searchIndex = findClosestTimeIndex(optionList, searchItem);
|
|
252
|
+
return searchIndex;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @param searchTerm
|
|
257
|
+
* @returns count number of digits present inside search term
|
|
258
|
+
*/
|
|
259
|
+
const countNumberInStr = (searchTerm: string) => {
|
|
260
|
+
return searchTerm.match(/\d/g)?.length || 0;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const isValidSearchTerm = (searchTerm: string) => {
|
|
264
|
+
const totalDigit = countNumberInStr(searchTerm);
|
|
265
|
+
return totalDigit > 0 && totalDigit < 5;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const getValueFromOptionList = (optionList: OptionSchema[]) => {
|
|
269
|
+
const list = optionList.map((option: any) => option.value);
|
|
270
|
+
return list;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
const getSearchValueIndex = (options: string[], searchTerm: string): number => {
|
|
274
|
+
// Search Term is valid if it contains number
|
|
275
|
+
if (!isValidSearchTerm(searchTerm)) {
|
|
276
|
+
return -1;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const searchIndex = getSearchIndex(options, searchTerm);
|
|
280
|
+
return searchIndex;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export const getScrollIndex = (dropdownOptionList: OptionSchema[], searchTerm: string): number => {
|
|
284
|
+
const optionList = getValueFromOptionList(dropdownOptionList);
|
|
285
|
+
|
|
286
|
+
if (searchTerm === '') {
|
|
287
|
+
// return current time index
|
|
288
|
+
const currTime = get24HourCurrentTime();
|
|
289
|
+
|
|
290
|
+
const currTimeIndex = findClosestTimeIndex(optionList, currTime);
|
|
291
|
+
return currTimeIndex;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return getSearchValueIndex(optionList, searchTerm);
|
|
295
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { TimePickerDropdownProps, TimeFormat } from '../TimePickerWithSearch';
|
|
2
|
+
|
|
3
|
+
const parseDate = (date_time: any) => {
|
|
4
|
+
const d = new Date();
|
|
5
|
+
d.setHours(date_time.substring(0, 2));
|
|
6
|
+
d.setMinutes(date_time.substring(3, 5));
|
|
7
|
+
return d;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const isFormat12Hour = (format: string) => {
|
|
11
|
+
return format === '12-Hour';
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const isTimeIn12HourFormat = (time: string) => {
|
|
15
|
+
return _isTimeInAM(time) || _isTimeInPM(time);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const _isTimeInAM = (time: string) => {
|
|
19
|
+
return time.includes('a') || time.includes('A');
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const _isTimeInPM = (time: string) => {
|
|
23
|
+
return time.includes('p') || time.includes('P');
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Convert time from 12 hour format to 24 hour format
|
|
28
|
+
* @param timeStr in hh:mm [AM/PM] format
|
|
29
|
+
* @returns time in HH:MM format
|
|
30
|
+
*/
|
|
31
|
+
export const convert12To24HourFormat = (timeStr: string) => {
|
|
32
|
+
const [time, modifier] = timeStr.split(' ');
|
|
33
|
+
const timeArr = time.split(':');
|
|
34
|
+
let hours = timeArr[0];
|
|
35
|
+
const minutes = timeArr[1];
|
|
36
|
+
|
|
37
|
+
if (hours === '12' && _isTimeInAM(modifier)) {
|
|
38
|
+
hours = '00';
|
|
39
|
+
}
|
|
40
|
+
if (_isTimeInPM(modifier) && hours !== '12') {
|
|
41
|
+
hours = (parseInt(hours, 10) + 12).toString();
|
|
42
|
+
}
|
|
43
|
+
return `${hours}:${minutes}`;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param val
|
|
48
|
+
* @returns insert 0 at start in case of single digit
|
|
49
|
+
*/
|
|
50
|
+
export const convertToTwoDigit = (val: string | number) => {
|
|
51
|
+
return ('0' + val).slice(-2);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Convert time from 24 hour format to 12 hour format
|
|
56
|
+
* @param timeStr in HH:MM format
|
|
57
|
+
* @returns time in hh:mm [AM/PM] format
|
|
58
|
+
*/
|
|
59
|
+
export const convert24To12HourFormat = (timeStr: string) => {
|
|
60
|
+
const timeArr = timeStr.split(':');
|
|
61
|
+
const hours = parseInt(timeArr[0], 10);
|
|
62
|
+
const modifier = hours >= 12 ? 'PM' : 'AM';
|
|
63
|
+
|
|
64
|
+
const convertedHours = hours % 12 || 12;
|
|
65
|
+
let hoursInString = convertedHours.toString();
|
|
66
|
+
hoursInString = convertToTwoDigit(hoursInString);
|
|
67
|
+
|
|
68
|
+
const minutes = timeArr[1];
|
|
69
|
+
|
|
70
|
+
const result = `${hoursInString.toString()}:${minutes} ${modifier}`;
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const getTimeIn24HrFormat = (timeStr: string) => {
|
|
75
|
+
if (isTimeIn12HourFormat(timeStr)) {
|
|
76
|
+
return convert12To24HourFormat(timeStr);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return timeStr;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @param startTime in HH:MM format
|
|
84
|
+
* @param endTime in HH:MM format
|
|
85
|
+
* @returns returns true if start time is greater than end time
|
|
86
|
+
*/
|
|
87
|
+
export const checkTimeDifference = (startTime: string, endTime: string) => {
|
|
88
|
+
const parseStartTime = parseDate(startTime);
|
|
89
|
+
const parseEndTime = parseDate(endTime);
|
|
90
|
+
return parseStartTime > parseEndTime;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @param startTime in HH:MM format
|
|
95
|
+
* @param endTime in HH:MM format
|
|
96
|
+
* @param interval
|
|
97
|
+
* @returns array of 24 hour time list based on interval
|
|
98
|
+
*/
|
|
99
|
+
const get24HourTimeList = (startTime: string, endTime: string, interval: number) => {
|
|
100
|
+
const timeList = [];
|
|
101
|
+
const parseStartTime = parseDate(startTime);
|
|
102
|
+
const parseEndTime = parseDate(endTime);
|
|
103
|
+
|
|
104
|
+
while (parseStartTime <= parseEndTime) {
|
|
105
|
+
timeList.push(parseStartTime.toTimeString().substring(0, 5));
|
|
106
|
+
parseStartTime.setMinutes(parseStartTime.getMinutes() + interval);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return timeList;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @param startTime in HH:MM format
|
|
114
|
+
* @param interval
|
|
115
|
+
* @returns time list in 24 hour format including times option for next day
|
|
116
|
+
*/
|
|
117
|
+
const getReverseTimeList = (startTime: string, endTime: string, interval: number) => {
|
|
118
|
+
const timeList = get24HourTimeList('00:00', '23:59', interval);
|
|
119
|
+
const startTimeIndex = timeList.indexOf(startTime);
|
|
120
|
+
const endTimeIndex = timeList.indexOf(endTime);
|
|
121
|
+
const nextDayTimeIndex = endTime === '' ? startTimeIndex : endTimeIndex + 1;
|
|
122
|
+
|
|
123
|
+
const presentDayList = timeList.slice(startTimeIndex);
|
|
124
|
+
const nextDayList = timeList.slice(0, nextDayTimeIndex);
|
|
125
|
+
const result = presentDayList.concat(nextDayList);
|
|
126
|
+
|
|
127
|
+
return result;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const getTimeListIn24HourFormat = (startTime: string, endTime: string, interval: number) => {
|
|
131
|
+
if (endTime === '' || checkTimeDifference(startTime, endTime)) {
|
|
132
|
+
return getReverseTimeList(startTime, endTime, interval);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return get24HourTimeList(startTime, endTime, interval);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const getTimeDifference = (startTime: string, endTime: string) => {
|
|
139
|
+
const timeStart = new Date('07/07/2022 ' + startTime);
|
|
140
|
+
const timeEnd = new Date('07/07/2022 ' + endTime);
|
|
141
|
+
|
|
142
|
+
const diff = timeEnd.getTime() - timeStart.getTime();
|
|
143
|
+
const diff_as_date = new Date(diff);
|
|
144
|
+
|
|
145
|
+
const hour = diff_as_date.getUTCHours();
|
|
146
|
+
const minute = diff_as_date.getUTCMinutes();
|
|
147
|
+
|
|
148
|
+
return { hour, minute };
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const getCustomLabel = (time: string, timeFormat: TimeFormat, showDuration?: boolean, referenceTime?: string) => {
|
|
152
|
+
let label = time;
|
|
153
|
+
if (isFormat12Hour(timeFormat)) {
|
|
154
|
+
label = convert24To12HourFormat(time);
|
|
155
|
+
}
|
|
156
|
+
if (showDuration && referenceTime) {
|
|
157
|
+
const { hour, minute } = getTimeDifference(referenceTime, time);
|
|
158
|
+
const timeDiffLabel = ` (${hour} hr ${minute} min)`;
|
|
159
|
+
label += timeDiffLabel;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return label;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const isOptionDisabled = (time: string, timeFormat: TimeFormat, disabledSlotList: string[]) => {
|
|
166
|
+
let timeValue = time;
|
|
167
|
+
if (isFormat12Hour(timeFormat)) {
|
|
168
|
+
timeValue = convert24To12HourFormat(time);
|
|
169
|
+
}
|
|
170
|
+
if (disabledSlotList.includes(timeValue)) {
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return false;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const convertTimeToOptionList = (
|
|
178
|
+
timeList: string[],
|
|
179
|
+
timeFormat: TimeFormat,
|
|
180
|
+
id = 'TimePicker-Option-key',
|
|
181
|
+
showDuration?: boolean,
|
|
182
|
+
referenceTime?: string,
|
|
183
|
+
disabledSlotList?: string[]
|
|
184
|
+
) => {
|
|
185
|
+
const optionList = timeList.map((time, index) => {
|
|
186
|
+
return {
|
|
187
|
+
label: getCustomLabel(time, timeFormat, showDuration, referenceTime),
|
|
188
|
+
value: time,
|
|
189
|
+
disabled: disabledSlotList && isOptionDisabled(time, timeFormat, disabledSlotList),
|
|
190
|
+
selected: false,
|
|
191
|
+
optionID: id + index,
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
return optionList;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const computeEndTime = (startTime: string | undefined) => {
|
|
198
|
+
return startTime ? '' : '23:59';
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const getDropdownOptionList = (props: TimePickerDropdownProps) => {
|
|
202
|
+
const { startTime, endTime, interval, timeFormat, showDuration, disabledSlotList, id } = props;
|
|
203
|
+
|
|
204
|
+
const startTimeIn24Hr = startTime ? getTimeIn24HrFormat(startTime) : '00:00';
|
|
205
|
+
const endTimeIn24Hr = endTime ? getTimeIn24HrFormat(endTime) : computeEndTime(startTime);
|
|
206
|
+
|
|
207
|
+
const timeList = getTimeListIn24HourFormat(startTimeIn24Hr, endTimeIn24Hr, interval);
|
|
208
|
+
|
|
209
|
+
const dropdownOptionList = convertTimeToOptionList(
|
|
210
|
+
timeList,
|
|
211
|
+
timeFormat,
|
|
212
|
+
id,
|
|
213
|
+
showDuration,
|
|
214
|
+
startTime,
|
|
215
|
+
disabledSlotList
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
return dropdownOptionList;
|
|
219
|
+
};
|
package/core/index.tsx
CHANGED
|
@@ -65,6 +65,7 @@ export { Placeholder } from './components/molecules/placeholder';
|
|
|
65
65
|
export { EditableInput } from './components/molecules/editableInput';
|
|
66
66
|
export { EditableChipInput } from './components/molecules/editableChipInput';
|
|
67
67
|
export { PlaceholderParagraph } from './components/atoms/placeholderParagraph';
|
|
68
|
+
export { PlaceholderImage } from './components/atoms/placeholderImage';
|
|
68
69
|
export { ProgressRing } from './components/atoms/progressRing';
|
|
69
70
|
export { Stepper } from './components/molecules/stepper';
|
|
70
71
|
export { DateRangePicker } from './components/organisms/dateRangePicker';
|
package/css/dist/index.css
CHANGED
|
@@ -2085,7 +2085,7 @@ body {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
|
|
2087
2087
|
.Dropdown-inputWrapper {
|
|
2088
|
-
border-bottom: var(--
|
|
2088
|
+
border-bottom: var(--spacing-xs) solid var(--secondary-dark);
|
|
2089
2089
|
}
|
|
2090
2090
|
|
|
2091
2091
|
.Dropdown-input {
|
|
@@ -2095,6 +2095,7 @@ body {
|
|
|
2095
2095
|
.Dropdown-input,
|
|
2096
2096
|
.Dropdown-input:focus-within {
|
|
2097
2097
|
border: unset !important;
|
|
2098
|
+
box-shadow: none !important;
|
|
2098
2099
|
}
|
|
2099
2100
|
|
|
2100
2101
|
.Dropdown-section {
|
|
@@ -2135,13 +2136,6 @@ body {
|
|
|
2135
2136
|
box-sizing: border-box;
|
|
2136
2137
|
}
|
|
2137
2138
|
|
|
2138
|
-
.Dropdown-items {
|
|
2139
|
-
-webkit-animation-timing-function: cubic-bezier(0, 0, 0.38, 0.9);
|
|
2140
|
-
animation-timing-function: cubic-bezier(0, 0, 0.38, 0.9);
|
|
2141
|
-
-webkit-animation-fill-mode: forwards;
|
|
2142
|
-
animation-fill-mode: forwards;
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
2139
|
.Option {
|
|
2146
2140
|
display: flex;
|
|
2147
2141
|
transition: var(--duration--fast-01) var(--standard-productive-curve);
|
|
@@ -3858,6 +3852,7 @@ body {
|
|
|
3858
3852
|
.MetricInput:focus-within {
|
|
3859
3853
|
background: var(--white);
|
|
3860
3854
|
border-color: var(--primary);
|
|
3855
|
+
box-shadow: var(--shadow-spread) var(--primary-shadow);
|
|
3861
3856
|
}
|
|
3862
3857
|
|
|
3863
3858
|
.MetricInput:focus-within .MetricInput-icon {
|
|
@@ -4030,7 +4025,6 @@ body {
|
|
|
4030
4025
|
background-color: var(--white);
|
|
4031
4026
|
border-radius: var(--spacing);
|
|
4032
4027
|
overflow: auto;
|
|
4033
|
-
display: flex;
|
|
4034
4028
|
flex-direction: column;
|
|
4035
4029
|
display: none;
|
|
4036
4030
|
margin: auto;
|
|
@@ -4044,7 +4038,7 @@ body {
|
|
|
4044
4038
|
}
|
|
4045
4039
|
|
|
4046
4040
|
.Modal--open {
|
|
4047
|
-
display:
|
|
4041
|
+
display: flex;
|
|
4048
4042
|
}
|
|
4049
4043
|
|
|
4050
4044
|
.Modal-animation--open {
|