@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Checkbox, Label, Row, Column, Text } from '@/index';
|
|
2
|
+
import { Checkbox, Label, Row, Column, Text, Heading } from '@/index';
|
|
3
3
|
|
|
4
4
|
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
5
5
|
|
|
@@ -7,15 +7,7 @@ export const AlignmentOfCheckboxGroup = () => (
|
|
|
7
7
|
<div>
|
|
8
8
|
<Row>
|
|
9
9
|
<Column>
|
|
10
|
-
<
|
|
11
|
-
{days.map((day, index) => {
|
|
12
|
-
return <Checkbox key={index} label={day} defaultChecked={index < 2} className={index !== 0 ? 'mt-4' : ''} />;
|
|
13
|
-
})}
|
|
14
|
-
<div className="pt-5">
|
|
15
|
-
<Text>Vertical Alignment</Text>
|
|
16
|
-
</div>
|
|
17
|
-
</Column>
|
|
18
|
-
<Column>
|
|
10
|
+
<Heading size="s">Horizontal Alignment</Heading>
|
|
19
11
|
<Label>Days</Label>
|
|
20
12
|
<div className="d-flex">
|
|
21
13
|
{days.map((day, index) => {
|
|
@@ -24,9 +16,15 @@ export const AlignmentOfCheckboxGroup = () => (
|
|
|
24
16
|
);
|
|
25
17
|
})}
|
|
26
18
|
</div>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
</Column>
|
|
20
|
+
</Row>
|
|
21
|
+
<Row>
|
|
22
|
+
<Column className="pt-5 mt-8">
|
|
23
|
+
<Heading size="s">Vertical Alignment</Heading>
|
|
24
|
+
<Label>Days</Label>
|
|
25
|
+
{days.map((day, index) => {
|
|
26
|
+
return <Checkbox key={index} label={day} defaultChecked={index < 2} className={index !== 0 ? 'mt-4' : ''} />;
|
|
27
|
+
})}
|
|
30
28
|
</Column>
|
|
31
29
|
</Row>
|
|
32
30
|
</div>
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
_showSelectedItems,
|
|
11
11
|
_isOpenControlled,
|
|
12
12
|
_isSelectAllPresent,
|
|
13
|
+
scrollToOptionIndex,
|
|
13
14
|
} from './utility';
|
|
14
15
|
import { BaseProps } from '@/utils/types';
|
|
15
16
|
import { ChangeEvent } from '@/common.type';
|
|
@@ -192,6 +193,10 @@ interface SharedDropdownProps extends DropdownListProps, BaseProps {
|
|
|
192
193
|
* Callback function called when dropdown is closed
|
|
193
194
|
*/
|
|
194
195
|
onClose?: (selected: any[], name?: string | number) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Specify the option index which needs to be focused
|
|
198
|
+
*/
|
|
199
|
+
tabIndex?: number;
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
type SyncDropdownProps = SyncProps & SharedDropdownProps;
|
|
@@ -219,6 +224,7 @@ interface DropdownState {
|
|
|
219
224
|
selected: OptionSchema[];
|
|
220
225
|
tempSelected: OptionSchema[];
|
|
221
226
|
previousSelected: OptionSchema[];
|
|
227
|
+
scrollIndex?: number;
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
/**
|
|
@@ -383,6 +389,11 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
383
389
|
|
|
384
390
|
fetchFunction(searchTerm).then((res: any) => {
|
|
385
391
|
const { options, count } = res;
|
|
392
|
+
if (res.scrollToIndex) {
|
|
393
|
+
setTimeout(() => {
|
|
394
|
+
scrollToOptionIndex(res.scrollToIndex, options);
|
|
395
|
+
}, 0);
|
|
396
|
+
}
|
|
386
397
|
if (!res.searchTerm || (res.searchTerm && res.searchTerm === this.state.searchTerm)) {
|
|
387
398
|
updatedAsync = searchTerm === '' ? count > this.staticLimit : updatedAsync;
|
|
388
399
|
|
|
@@ -395,6 +406,7 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
395
406
|
|
|
396
407
|
this.setState({
|
|
397
408
|
...this.state,
|
|
409
|
+
scrollIndex: res.scrollToIndex || 0,
|
|
398
410
|
optionsLength,
|
|
399
411
|
loading: false,
|
|
400
412
|
async: updatedAsync,
|
|
@@ -716,14 +728,17 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
716
728
|
selectAll,
|
|
717
729
|
triggerLabel,
|
|
718
730
|
previousSelected,
|
|
731
|
+
scrollIndex,
|
|
719
732
|
} = this.state;
|
|
720
733
|
|
|
721
734
|
const { withSelectAll = true, withCheckbox } = this.props;
|
|
722
735
|
|
|
723
|
-
const { triggerOptions = {}, selected, ...rest } = this.props;
|
|
736
|
+
const { triggerOptions = {}, selected, tabIndex, ...rest } = this.props;
|
|
724
737
|
const remainingOptionsLen = searchedOptionsLength - options.length;
|
|
725
738
|
|
|
726
|
-
const firstEnabledOption =
|
|
739
|
+
const firstEnabledOption = tabIndex
|
|
740
|
+
? tabIndex
|
|
741
|
+
: _isSelectAllPresent(searchTerm, remainingOptionsLen, withSelectAll, withCheckbox)
|
|
727
742
|
? 0
|
|
728
743
|
: options.findIndex((option) => !option.disabled);
|
|
729
744
|
|
|
@@ -752,6 +767,7 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
752
767
|
onOptionSelect={this.onOptionSelect}
|
|
753
768
|
onSelectAll={this.onSelectAll}
|
|
754
769
|
customTrigger={triggerOptions.customTrigger}
|
|
770
|
+
scrollIndex={scrollIndex}
|
|
755
771
|
{...rest}
|
|
756
772
|
/>
|
|
757
773
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { scrollIntoView, _isEqual, _isSelectAllPresent } from './utility';
|
|
2
|
+
import { scrollIntoView, _isEqual, _isSelectAllPresent, scrollToOptionIndex } from './utility';
|
|
3
3
|
import { Popover, Checkbox, Button, Text, Input } from '@/index';
|
|
4
4
|
import { PopoverProps } from '@/index.type';
|
|
5
5
|
import DropdownButton, { TriggerProps } from './DropdownButton';
|
|
@@ -145,6 +145,11 @@ export interface DropdownListProps extends TriggerAndOptionProps {
|
|
|
145
145
|
* Adds custom placeholder to searchBar
|
|
146
146
|
*/
|
|
147
147
|
searchPlaceholder?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Specify index of option where cursor should scroll
|
|
150
|
+
* @ignore
|
|
151
|
+
*/
|
|
152
|
+
scrollIndex?: number;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
interface OptionsProps extends DropdownListProps, BaseProps {
|
|
@@ -212,6 +217,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
212
217
|
toggleDropdown,
|
|
213
218
|
className,
|
|
214
219
|
searchPlaceholder = 'Search..',
|
|
220
|
+
scrollIndex,
|
|
215
221
|
} = props;
|
|
216
222
|
|
|
217
223
|
const baseProps = extractBaseProps(props);
|
|
@@ -225,10 +231,8 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
225
231
|
const [popoverStyle, setPopoverStyle] = React.useState<PopoverProps['customStyle']>();
|
|
226
232
|
const [cursor, setCursor] = React.useState(firstEnabledOption);
|
|
227
233
|
|
|
228
|
-
// Re-initializes its value to 0 on every re-render
|
|
229
|
-
let animateOrder = 0;
|
|
230
|
-
|
|
231
234
|
React.useEffect(() => {
|
|
235
|
+
let timer: any;
|
|
232
236
|
if (dropdownOpen) {
|
|
233
237
|
const { width, minWidth, maxWidth } = props;
|
|
234
238
|
const popperWidth = triggerRef.current?.clientWidth;
|
|
@@ -241,7 +245,18 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
241
245
|
};
|
|
242
246
|
|
|
243
247
|
setPopoverStyle(popperWrapperStyle);
|
|
248
|
+
|
|
249
|
+
// scrolls to current time
|
|
250
|
+
if (scrollIndex && tempSelected.length === 0) {
|
|
251
|
+
timer = setTimeout(() => {
|
|
252
|
+
scrollToOptionIndex(scrollIndex, listOptions);
|
|
253
|
+
}, 100);
|
|
254
|
+
}
|
|
244
255
|
}
|
|
256
|
+
|
|
257
|
+
return () => {
|
|
258
|
+
clearTimeout(timer);
|
|
259
|
+
};
|
|
245
260
|
}, [dropdownOpen]);
|
|
246
261
|
|
|
247
262
|
React.useEffect(() => {
|
|
@@ -285,27 +300,11 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
285
300
|
return Dropdown;
|
|
286
301
|
};
|
|
287
302
|
|
|
288
|
-
const animateClass = classNames({
|
|
289
|
-
['fade-in']: dropdownOpen,
|
|
290
|
-
['opacity-0']: dropdownOpen,
|
|
291
|
-
['Dropdown-items']: true,
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
const getAnimateOrderStyle = (order: number) => {
|
|
295
|
-
const animateStyle: React.CSSProperties = {
|
|
296
|
-
animationDelay: dropdownOpen ? order * 20 + 'ms' : '',
|
|
297
|
-
};
|
|
298
|
-
return animateStyle;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
303
|
const getDropdownSectionClass = (showClearButton?: boolean) => {
|
|
302
|
-
return classNames(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
animateClass
|
|
308
|
-
);
|
|
304
|
+
return classNames({
|
|
305
|
+
['Dropdown-section']: true,
|
|
306
|
+
['Dropdown-section--withClear']: showClearButton,
|
|
307
|
+
});
|
|
309
308
|
};
|
|
310
309
|
|
|
311
310
|
const dropdownClass = classNames(
|
|
@@ -320,14 +319,11 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
320
319
|
['Dropdown-wrapper--wrap']: !truncateOption,
|
|
321
320
|
});
|
|
322
321
|
|
|
323
|
-
const SelectAllClass = classNames(
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
animateClass
|
|
330
|
-
);
|
|
322
|
+
const SelectAllClass = classNames({
|
|
323
|
+
['Option-checkbox']: true,
|
|
324
|
+
['Option-checkbox--active']: cursor === 0,
|
|
325
|
+
['OptionWrapper']: true,
|
|
326
|
+
});
|
|
331
327
|
|
|
332
328
|
const onToggleDropdown = (open: boolean, type?: string) => {
|
|
333
329
|
toggleDropdown(open, type);
|
|
@@ -369,7 +365,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
369
365
|
const renderFooter = () => {
|
|
370
366
|
const { footerLabel = 'Search for more options' } = props;
|
|
371
367
|
return (
|
|
372
|
-
<div className=
|
|
368
|
+
<div className="Dropdown-footer">
|
|
373
369
|
<Text size="small" appearance={'subtle'}>
|
|
374
370
|
{footerLabel}
|
|
375
371
|
</Text>
|
|
@@ -382,7 +378,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
382
378
|
const isClearDisabled = selected.every((option) => option.disabled);
|
|
383
379
|
|
|
384
380
|
return (
|
|
385
|
-
<div className={getDropdownSectionClass(selectedGroup)}
|
|
381
|
+
<div className={getDropdownSectionClass(selectedGroup)}>
|
|
386
382
|
<Text size="small" appearance={'subtle'}>
|
|
387
383
|
{group}
|
|
388
384
|
</Text>
|
|
@@ -404,7 +400,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
404
400
|
const renderApplyButton = () => {
|
|
405
401
|
const disable = _isEqual(previousSelected, tempSelected);
|
|
406
402
|
return (
|
|
407
|
-
<div className=
|
|
403
|
+
<div className="Dropdown-buttonWrapper">
|
|
408
404
|
<Button
|
|
409
405
|
ref={dropdownCancelButtonRef}
|
|
410
406
|
className="mr-4"
|
|
@@ -432,7 +428,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
432
428
|
|
|
433
429
|
const renderSearch = () => {
|
|
434
430
|
return (
|
|
435
|
-
<div className=
|
|
431
|
+
<div className="Dropdown-inputWrapper">
|
|
436
432
|
<Input
|
|
437
433
|
name="Dropdown-search"
|
|
438
434
|
icon={'search'}
|
|
@@ -469,11 +465,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
469
465
|
const label = selectAllLabel.trim() ? selectAllLabel.trim() : 'Select All';
|
|
470
466
|
|
|
471
467
|
return (
|
|
472
|
-
<div
|
|
473
|
-
style={getAnimateOrderStyle(++animateOrder)}
|
|
474
|
-
className={SelectAllClass}
|
|
475
|
-
onMouseEnter={() => updateActiveOption(0, true)}
|
|
476
|
-
>
|
|
468
|
+
<div className={SelectAllClass} onMouseEnter={() => updateActiveOption(0, true)}>
|
|
477
469
|
<Checkbox
|
|
478
470
|
label={label}
|
|
479
471
|
onChange={onSelectAll}
|
|
@@ -497,22 +489,20 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
497
489
|
const active = selectAllPresent ? index + 1 === cursor : index === cursor;
|
|
498
490
|
const optionIsSelected = tempSelected.findIndex((option) => option.value === item.value) !== -1;
|
|
499
491
|
return (
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
/>
|
|
515
|
-
</div>
|
|
492
|
+
<Option
|
|
493
|
+
optionData={item}
|
|
494
|
+
truncateOption={truncateOption}
|
|
495
|
+
selected={optionIsSelected}
|
|
496
|
+
index={index}
|
|
497
|
+
updateActiveOption={updateActiveOption}
|
|
498
|
+
optionRenderer={optionRenderer}
|
|
499
|
+
active={active}
|
|
500
|
+
checkboxes={withCheckbox}
|
|
501
|
+
menu={menu}
|
|
502
|
+
onClick={() => optionClickHandler(item)}
|
|
503
|
+
onChange={(e) => props.onSelect(item, e.target.checked)}
|
|
504
|
+
optionType={props.optionType}
|
|
505
|
+
/>
|
|
516
506
|
);
|
|
517
507
|
};
|
|
518
508
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dropdown } from '@/index';
|
|
3
|
+
import { Uncontrolled, Controlled } from './_common_/types';
|
|
4
|
+
|
|
5
|
+
// CSF format story
|
|
6
|
+
export const LabelInline = () => {
|
|
7
|
+
const options = [
|
|
8
|
+
{
|
|
9
|
+
label: 'All',
|
|
10
|
+
value: 'all',
|
|
11
|
+
selected: true,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'Draft',
|
|
15
|
+
value: 'draft',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'In Progress',
|
|
19
|
+
value: 'in_progress',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: 'Sent',
|
|
23
|
+
value: 'sent',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: 'Scheduled',
|
|
27
|
+
value: 'scheduled',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Partially Failed',
|
|
31
|
+
value: 'partially_failed',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'Completely Failed',
|
|
35
|
+
value: 'completely_failed',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
return (
|
|
39
|
+
<div>
|
|
40
|
+
<Dropdown options={options} className="w-25" inlineLabel="Status" withCheckbox={true} />
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
title: 'Components/Dropdown/Label Inline',
|
|
47
|
+
component: Dropdown,
|
|
48
|
+
parameters: {
|
|
49
|
+
docs: {
|
|
50
|
+
docPage: {
|
|
51
|
+
title: 'Dropdown',
|
|
52
|
+
props: {
|
|
53
|
+
components: { Uncontrolled, Controlled },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -4,7 +4,7 @@ import { Uncontrolled, Controlled } from './_common_/types';
|
|
|
4
4
|
import Label from '../../label';
|
|
5
5
|
|
|
6
6
|
// CSF format story
|
|
7
|
-
export const
|
|
7
|
+
export const LabelOnTop = () => {
|
|
8
8
|
const options = [
|
|
9
9
|
{
|
|
10
10
|
label: 'All',
|
|
@@ -37,18 +37,17 @@ export const labelPositionInDropdown = () =>{
|
|
|
37
37
|
},
|
|
38
38
|
];
|
|
39
39
|
return (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
<div>
|
|
41
|
+
<div className="w-25 mb-9">
|
|
42
|
+
<Label withInput={true}>Status</Label>
|
|
43
|
+
<Dropdown options={options} className="w-100" withCheckbox={true} />
|
|
44
|
+
</div>
|
|
44
45
|
</div>
|
|
45
|
-
<Dropdown options={options} className="w-25" inlineLabel="Status" withCheckbox={true} />
|
|
46
|
-
</div>
|
|
47
46
|
);
|
|
48
|
-
}
|
|
47
|
+
};
|
|
49
48
|
|
|
50
49
|
export default {
|
|
51
|
-
title: 'Components/Dropdown/Label
|
|
50
|
+
title: 'Components/Dropdown/Label On Top',
|
|
52
51
|
component: Dropdown,
|
|
53
52
|
parameters: {
|
|
54
53
|
docs: {
|
|
@@ -19,7 +19,7 @@ const DefaultOption = (props: OptionTypeProps) => {
|
|
|
19
19
|
>
|
|
20
20
|
{/* eslint-enable */}
|
|
21
21
|
<div className={'Option-label'}>
|
|
22
|
-
<Text className={textClassName} appearance={appearance}>
|
|
22
|
+
<Text className={textClassName} appearance={appearance} id={optionData.optionID}>
|
|
23
23
|
{label}
|
|
24
24
|
</Text>
|
|
25
25
|
</div>
|
|
@@ -51,3 +51,9 @@ export const getSelectAll = (selected: Option[], optionsLength: number, disabled
|
|
|
51
51
|
}
|
|
52
52
|
return { indeterminate: false, checked: false };
|
|
53
53
|
};
|
|
54
|
+
|
|
55
|
+
export const scrollToOptionIndex = (scrollIndex: number, listOptions: any) => {
|
|
56
|
+
const optionID = listOptions && listOptions[scrollIndex]?.optionID;
|
|
57
|
+
const targetOption = document.getElementById(optionID);
|
|
58
|
+
targetOption && targetOption.scrollIntoView && targetOption.scrollIntoView({ block: 'center' });
|
|
59
|
+
};
|
|
@@ -6,9 +6,9 @@ export const image = () => {
|
|
|
6
6
|
<Icon size={50}>
|
|
7
7
|
<img
|
|
8
8
|
alt="Innovaccer logo"
|
|
9
|
-
src="https://innovaccer.com/
|
|
10
|
-
width="
|
|
11
|
-
height="
|
|
9
|
+
src="https://design.innovaccer.com/images/withoutType.png"
|
|
10
|
+
width="50"
|
|
11
|
+
height="50"
|
|
12
12
|
/>
|
|
13
13
|
</Icon>
|
|
14
14
|
);
|
|
@@ -12,6 +12,9 @@ export const COMMON_MIME_TYPES = new Map([
|
|
|
12
12
|
['zip', 'application/zip'],
|
|
13
13
|
['doc', 'application/msword'],
|
|
14
14
|
['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
|
|
15
|
+
['csv', 'text/csv'],
|
|
16
|
+
['xlss', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
|
|
17
|
+
['xls', 'application/vnd.ms-excel'],
|
|
15
18
|
]);
|
|
16
19
|
|
|
17
20
|
const FILES_TO_IGNORE = ['.DS_Store', 'Thumbs.db'];
|
|
@@ -3,7 +3,7 @@ import { action } from '@/utils/action';
|
|
|
3
3
|
import { Heading, Text, Sidesheet, ModalDescription, Button } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const twoSteps = () => {
|
|
6
|
-
const [page, setPage] = React.useState(
|
|
6
|
+
const [page, setPage] = React.useState(1);
|
|
7
7
|
const [animate, setAnimate] = React.useState(true);
|
|
8
8
|
const [open, setOpen] = React.useState(false);
|
|
9
9
|
const seperator = false;
|
|
@@ -77,7 +77,9 @@ export const twoSteps = () => {
|
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
79
|
<div>
|
|
80
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
80
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
81
|
+
Open Sidesheet
|
|
82
|
+
</Button>
|
|
81
83
|
<Sidesheet {...options}>
|
|
82
84
|
<div className={animate ? 'fade-in' : ''} onAnimationEnd={() => setAnimate(false)}>
|
|
83
85
|
<Heading size="s">{`Page ${page}`}</Heading>
|
|
@@ -92,11 +94,11 @@ export const twoSteps = () => {
|
|
|
92
94
|
|
|
93
95
|
const customCode = `() => {
|
|
94
96
|
const [open, setOpen] = React.useState(false);
|
|
95
|
-
const [page, setPage] = React.useState(
|
|
97
|
+
const [page, setPage] = React.useState(1);
|
|
96
98
|
const [animate, setAnimate] = React.useState(true);
|
|
97
99
|
|
|
98
100
|
const onClose = () => {
|
|
99
|
-
setOpen(
|
|
101
|
+
setOpen(false);
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
React.useEffect(() => {
|
|
@@ -13,7 +13,7 @@ export const all = () => {
|
|
|
13
13
|
|
|
14
14
|
const endDate = new Date('Jan 20 2021');
|
|
15
15
|
|
|
16
|
-
const view = '
|
|
16
|
+
const view = 'date';
|
|
17
17
|
|
|
18
18
|
const rangePicker = false;
|
|
19
19
|
|
|
@@ -37,13 +37,11 @@ export const all = () => {
|
|
|
37
37
|
if (rangeLimit) attr.rangeLimit = rangeLimit;
|
|
38
38
|
if (yearNav !== -1) attr.yearNav = yearNav;
|
|
39
39
|
if (monthNav !== -1) attr.monthNav = monthNav;
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
// we redefine this function here because in storybook.json we donot get imported functions.
|
|
42
|
-
const convertToDate = (
|
|
43
|
-
d, format, validators
|
|
44
|
-
) => {
|
|
42
|
+
const convertToDate = (d, format, validators) => {
|
|
45
43
|
let dateVal;
|
|
46
|
-
|
|
44
|
+
|
|
47
45
|
if (d) {
|
|
48
46
|
if (typeof d === 'number') {
|
|
49
47
|
dateVal = new Date(d);
|
package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx
CHANGED
|
@@ -28,6 +28,8 @@ export const withSingleInput = () => {
|
|
|
28
28
|
|
|
29
29
|
const monthNav = -1;
|
|
30
30
|
|
|
31
|
+
const open = false;
|
|
32
|
+
|
|
31
33
|
const attr = {};
|
|
32
34
|
if (disabledBefore) attr.disabledBefore = disabledBefore;
|
|
33
35
|
if (disabledAfter) attr.disabledAfter = disabledAfter;
|
|
@@ -55,6 +57,7 @@ export const withSingleInput = () => {
|
|
|
55
57
|
label: 'Date',
|
|
56
58
|
}}
|
|
57
59
|
{...attr}
|
|
60
|
+
open={open}
|
|
58
61
|
/>
|
|
59
62
|
</div>
|
|
60
63
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Modal, Button, Paragraph, HorizontalNav, Dropdown, Label } from '@/index';
|
|
3
|
+
import { Modal, Button, Paragraph, HorizontalNav, Dropdown, Label, Heading } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const leftAlignedNavigationTabs = () => {
|
|
6
6
|
const options = [];
|
|
@@ -44,6 +44,17 @@ export const leftAlignedNavigationTabs = () => {
|
|
|
44
44
|
setActive(menu);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
const subHeading = (
|
|
48
|
+
<HorizontalNav align="left" menus={data} active={active} onClick={onClickHandler} className="ml-5 mt-4" />
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const header = (
|
|
52
|
+
<div>
|
|
53
|
+
<Heading className="ml-7 mb-3">Medication</Heading>
|
|
54
|
+
{subHeading}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
|
|
47
58
|
return (
|
|
48
59
|
<div>
|
|
49
60
|
<Paragraph>
|
|
@@ -69,9 +80,7 @@ export const leftAlignedNavigationTabs = () => {
|
|
|
69
80
|
open={open}
|
|
70
81
|
dimension="large"
|
|
71
82
|
onClose={onClose}
|
|
72
|
-
|
|
73
|
-
heading: 'Medication',
|
|
74
|
-
}}
|
|
83
|
+
header={header}
|
|
75
84
|
footer={
|
|
76
85
|
<>
|
|
77
86
|
<Button appearance="basic">Discard</Button>
|
|
@@ -80,11 +89,9 @@ export const leftAlignedNavigationTabs = () => {
|
|
|
80
89
|
</Button>
|
|
81
90
|
</>
|
|
82
91
|
}
|
|
92
|
+
seperator={true}
|
|
83
93
|
>
|
|
84
|
-
<div className="
|
|
85
|
-
<HorizontalNav menus={data} active={active} onClick={onClickHandler} />
|
|
86
|
-
</div>
|
|
87
|
-
<div className="pt-5 w-50">
|
|
94
|
+
<div className="py-5 w-50">
|
|
88
95
|
<Label withInput={true} required={true}>
|
|
89
96
|
Type
|
|
90
97
|
</Label>
|
|
@@ -144,6 +151,23 @@ const customCode = `() => {
|
|
|
144
151
|
setActive(menu);
|
|
145
152
|
};
|
|
146
153
|
|
|
154
|
+
const subHeading = (
|
|
155
|
+
<HorizontalNav
|
|
156
|
+
align="left"
|
|
157
|
+
menus={data}
|
|
158
|
+
active={active}
|
|
159
|
+
onClick={onClickHandler}
|
|
160
|
+
className="ml-5 mt-4"
|
|
161
|
+
/>
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
const header = (
|
|
165
|
+
<div>
|
|
166
|
+
<Heading className="ml-7 mb-3">Medication</Heading>
|
|
167
|
+
{subHeading}
|
|
168
|
+
</div>
|
|
169
|
+
);
|
|
170
|
+
|
|
147
171
|
return (
|
|
148
172
|
<div>
|
|
149
173
|
<Paragraph>
|
|
@@ -160,24 +184,16 @@ const customCode = `() => {
|
|
|
160
184
|
open={open}
|
|
161
185
|
dimension="large"
|
|
162
186
|
onClose={onClose}
|
|
163
|
-
|
|
164
|
-
heading: 'Medication',
|
|
165
|
-
}}
|
|
187
|
+
header={header}
|
|
166
188
|
footer={(
|
|
167
189
|
<>
|
|
168
190
|
<Button appearance="basic">Discard</Button>
|
|
169
191
|
<Button appearance="primary" className="ml-4">Create</Button>
|
|
170
192
|
</>
|
|
171
193
|
)}
|
|
194
|
+
seperator={true}
|
|
172
195
|
>
|
|
173
|
-
<div className="
|
|
174
|
-
<HorizontalNav
|
|
175
|
-
menus={data}
|
|
176
|
-
active={active}
|
|
177
|
-
onClick={onClickHandler}
|
|
178
|
-
/>
|
|
179
|
-
</div>
|
|
180
|
-
<div className="pt-5 w-50">
|
|
196
|
+
<div className="py-5 w-50">
|
|
181
197
|
<Label withInput={true} required={true}>Type</Label>
|
|
182
198
|
<Dropdown
|
|
183
199
|
options={options}
|
|
@@ -75,7 +75,7 @@ export const Responsiveness = () => {
|
|
|
75
75
|
const navigation = <Navigation menus={navigationData} onClick={onClickHandler} active={active} />;
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
|
-
<div className="w-100
|
|
78
|
+
<div className="w-100 py-6 bg-secondary-lightest">
|
|
79
79
|
<PageHeader
|
|
80
80
|
navigationPosition="bottom"
|
|
81
81
|
title="Pac Follow-Up Protocol"
|
|
@@ -174,7 +174,7 @@ const customCode = `() => {
|
|
|
174
174
|
);
|
|
175
175
|
|
|
176
176
|
return (
|
|
177
|
-
<div className="
|
|
177
|
+
<div className="py-6 bg-secondary-lightest">
|
|
178
178
|
<PageHeader
|
|
179
179
|
navigationPosition="bottom"
|
|
180
180
|
title="Pac Follow-Up Protocol"
|
|
@@ -39,7 +39,7 @@ export const withNavigation = () => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<div className="w-100
|
|
42
|
+
<div className="w-100 py-6 bg-secondary-lightest">
|
|
43
43
|
<PageHeader {...options} />
|
|
44
44
|
</div>
|
|
45
45
|
);
|
|
@@ -77,7 +77,7 @@ const customCode = `() => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
|
-
<div className="w-100
|
|
80
|
+
<div className="w-100 py-6 bg-secondary-lightest">
|
|
81
81
|
<PageHeader {...options} />
|
|
82
82
|
</div>
|
|
83
83
|
);
|