@innovaccer/design-system 2.10.0 → 2.11.0-2
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/. npmignore +2 -1
- package/.github/workflows/develop.yml +66 -0
- package/.github/workflows/docs_pull_request.yml +7 -4
- package/.github/workflows/main.yml +62 -14
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +9 -9
- package/core/components/atoms/_chip/index.tsx +10 -8
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +7 -7
- package/core/components/atoms/collapsible/Collapsible.tsx +17 -10
- package/core/components/atoms/collapsible/__stories__/CustomTrigger.story.jsx +123 -0
- package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.jsx +22 -21
- package/core/components/atoms/dropdown/__stories__/DropdownItemsWithCheckbox.story.jsx +22 -21
- package/core/components/atoms/dropdown/__stories__/DropdownItemsWithIcon.story.jsx +26 -25
- package/core/components/atoms/dropdown/__stories__/{DropdownItemsWithInfo.story.tsx.tsx → DropdownItemsWithInfo.story.jsx} +23 -20
- package/core/components/atoms/dropdown/__stories__/DropdownWIthIcon.story.jsx +202 -200
- package/core/components/atoms/dropdown/__stories__/DropdownWithActionButtons.story.jsx +46 -45
- package/core/components/atoms/dropdown/__stories__/DropdownWithCaption.story.jsx +46 -45
- package/core/components/atoms/dropdown/__stories__/Gender.story.jsx +15 -14
- package/core/components/atoms/dropdown/__stories__/LabelPositionInDropdown.story.jsx +35 -34
- package/core/components/atoms/dropdown/__stories__/Languages.story.jsx +18 -17
- package/core/components/atoms/dropdown/__stories__/Menu.story.jsx +20 -18
- package/core/components/atoms/dropdown/__stories__/OptionsLessThan50.story.jsx +12 -9
- package/core/components/atoms/dropdown/__stories__/SearchInDropdown.story.jsx +26 -25
- package/core/components/atoms/dropdown/__stories__/StandardDropdown.story.jsx +29 -28
- package/core/components/atoms/dropdown/__stories__/StatusWithoutLabel.story.jsx +18 -17
- package/core/components/atoms/dropdown/__stories__/WithCheckboxAndSubInfo.story.jsx +26 -25
- package/core/components/atoms/dropdown/__stories__/_common_/types.tsx +3 -2
- package/core/components/atoms/dropdown/__stories__/variants/LoadingType.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/OptionType.story.jsx +2 -2
- package/core/components/atoms/rangeSlider/__stories__/index.story.jsx +2 -3
- package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +2 -2
- package/core/components/molecules/dialog/__stories__/index.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/dimension/Large.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/dimension/Medium.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/dimension/Small.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/primaryButton/Alert.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/primaryButton/Basic.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/primaryButton/Primary.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/primaryButton/Success.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/primaryButton/Transparent.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/secondaryButton/Alert.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/secondaryButton/Basic.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/secondaryButton/Primary.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/secondaryButton/Success.story.jsx +2 -2
- package/core/components/molecules/dialog/__stories__/variants/secondaryButton/Transparent.story.jsx +2 -2
- package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +4 -4
- package/core/components/molecules/fullscreenModal/__stories__/Custom.story.jsx +1 -1
- package/core/components/molecules/fullscreenModal/__stories__/DefaultWidth.story.jsx +2 -4
- package/core/components/molecules/fullscreenModal/__stories__/LargeWidth.story.jsx +2 -4
- package/core/components/molecules/fullscreenModal/__stories__/Layering.story.jsx +1 -3
- package/core/components/molecules/fullscreenModal/__stories__/Scrolling.story.jsx +2 -4
- package/core/components/molecules/fullscreenModal/__stories__/TwoStepWorkflow.story.jsx +2 -2
- package/core/components/molecules/fullscreenModal/__stories__/index.story.jsx +1 -2
- package/core/components/molecules/fullscreenModal/__stories__/twoSteps.story.jsx +1 -1
- package/core/components/molecules/fullscreenModal/__stories__/variants/dimension/Large.story.jsx +1 -1
- package/core/components/molecules/fullscreenModal/__stories__/variants/dimension/Medium.story.jsx +1 -1
- package/core/components/molecules/modal/__stories__/Alert.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/Confirmation.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/Dialog.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/Input.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/Layering.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/NoFooter.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/Scrolling.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/index.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/old.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/variants/dimension/Large.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/variants/dimension/Medium.story.jsx +2 -2
- package/core/components/molecules/modal/__stories__/variants/dimension/Small.story.jsx +2 -2
- package/core/components/molecules/sidesheet/Sidesheet.tsx +1 -1
- package/core/components/molecules/sidesheet/__stories__/index.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/Layering.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/LayeringWithModal.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/dimension/Large.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/dimension/Regular.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/stickyFooter.story.jsx +2 -2
- package/core/components/molecules/sidesheet/__stories__/variants/twoSteps.story.jsx +2 -2
- package/core/components/molecules/tabs/Tab.tsx +8 -0
- package/core/components/molecules/tabs/Tabs.tsx +52 -11
- package/core/components/molecules/tabs/__stories__/DisabledWithActive.story.jsx +64 -0
- package/core/components/molecules/tabs/__stories__/DismissibleTab.story.jsx +88 -0
- package/core/components/molecules/tabs/__tests__/Tabs.test.tsx +14 -0
- package/core/components/molecules/tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +18 -0
- package/core/components/organisms/calendar/__stories__/index.story.jsx +21 -1
- package/core/components/organisms/calendar/__stories__/variants/firstDayOfWeek.story.jsx +1 -1
- package/core/components/organisms/dateRangePicker/__stories__/variants/monthsInView.story.jsx +1 -1
- package/core/components/organisms/grid/Cell.tsx +20 -10
- package/core/components/organisms/grid/Grid.tsx +5 -0
- package/core/components/organisms/horizontalNav/__stories__/leftAlign.story.jsx +2 -2
- package/core/components/organisms/list/__stories__/_common_/types.tsx +3 -2
- package/core/components/organisms/table/__stories__/Filtering.story.jsx +2 -0
- package/core/components/organisms/table/__stories__/_common_/types.tsx +3 -2
- package/core/components/organisms/table/__stories__/variants/customHeaderCellRenderer.story.jsx +420 -0
- package/core/components/organisms/table/__stories__/variants/showHead.story.jsx +1 -1
- package/core/components/organisms/table/__stories__/variants/showMenu.story.jsx +1 -1
- package/core/components/organisms/table/__stories__/variants/size.story.jsx +1 -1
- package/core/components/organisms/table/__stories__/variants/type.story.jsx +1 -1
- package/core/components/organisms/table/__stories__/variants/withCheckbox.story.jsx +1 -1
- package/core/components/organisms/table/__stories__/variants/withHeader.story.jsx +12 -0
- package/core/components/organisms/table/__stories__/variants/withPagination.story.jsx +1 -1
- package/core/components/organisms/verticalNav/MenuItem.tsx +63 -29
- package/core/components/organisms/verticalNav/VerticalNav.tsx +54 -18
- package/core/components/organisms/verticalNav/__stories__/CustomItemsRenderer.story.jsx +2 -2
- package/core/components/organisms/verticalNav/__stories__/CustomOptionsRenderer.story.jsx +246 -0
- package/core/components/organisms/verticalNav/__stories__/CustomTrigger.story.jsx +116 -0
- package/core/components/organisms/verticalNav/__stories__/FlatEdgedVerticalNav.story.jsx +16 -4
- package/core/components/organisms/verticalNav/__stories__/LabelOverflowBehaviour.story.jsx +130 -0
- package/css/dist/index.css +13 -1
- package/css/dist/index.css.map +1 -1
- package/css/src/components/input.css +0 -1
- package/css/src/components/link.css +2 -0
- package/css/src/components/tabs.css +5 -0
- package/css/src/components/verticalNav.css +6 -0
- package/dist/core/components/atoms/collapsible/Collapsible.d.ts +2 -0
- package/dist/core/components/molecules/tabs/Tab.d.ts +2 -0
- package/dist/core/components/molecules/tabs/Tabs.d.ts +7 -0
- package/dist/core/components/organisms/grid/Cell.d.ts +1 -0
- package/dist/core/components/organisms/grid/Grid.d.ts +2 -0
- package/dist/core/components/organisms/verticalNav/VerticalNav.d.ts +2 -0
- package/dist/index.esm.js +204 -52
- package/dist/index.js +196 -47
- 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/.env.development +2 -1
- package/docs/.env.production +2 -0
- package/docs/gatsby-browser.js +5 -1
- package/docs/gatsby-config.js +162 -145
- package/docs/package.json +17 -13
- package/docs/src/components/ErrorBoundary.js +31 -0
- package/docs/src/components/Layout.js +177 -101
- package/docs/src/components/MDXHeading.js +11 -4
- package/docs/src/components/PropsTable/card.css +4 -0
- package/docs/src/components/PropsTable/index.js +70 -37
- package/docs/src/components/PropsTable/sandbox.tsx +4 -1
- package/docs/src/components/TableOfContent/TableOfContent.js +2 -2
- package/docs/src/components/css/global.css +4 -0
- package/docs/src/components/css/style.css +24 -5
- package/docs/src/{pages/components/overview/tabs → data/components}/Overview.js +5 -9
- package/docs/src/data/components/images/mobile/ActionSheet.png +0 -0
- package/docs/src/data/components/images/mobile/BottomNavigation.png +0 -0
- package/docs/src/data/components/images/mobile/BottomSheet.png +0 -0
- package/docs/src/data/components/images/mobile/Buttons.png +0 -0
- package/docs/src/data/components/images/mobile/Card.png +0 -0
- package/docs/src/data/components/images/mobile/Checkbox.png +0 -0
- package/docs/src/data/components/images/mobile/Chips.png +0 -0
- package/docs/src/data/components/images/mobile/Dialog.png +0 -0
- package/docs/src/data/components/images/mobile/Input.png +0 -0
- package/docs/src/data/components/images/mobile/List.png +0 -0
- package/docs/src/data/components/images/mobile/PageHeader.png +0 -0
- package/docs/src/data/components/images/mobile/Radio.png +0 -0
- package/docs/src/data/components/images/mobile/Switch.png +0 -0
- package/docs/src/data/components/images/mobile/Tabs.png +0 -0
- package/docs/src/data/components/images/mobile/Toast.png +0 -0
- package/docs/src/{pages/home → data/components/images}/noresult.png +0 -0
- package/docs/src/data/components/index.js +1 -1
- package/docs/src/data/components/mobile.js +248 -0
- package/docs/src/{pages/components/overview/tabs → data/components}/overview.css +0 -0
- package/docs/src/data/header-items.yaml +2 -2
- package/docs/src/data/home-menu.yaml +1 -1
- package/docs/src/data/nav/components.yaml +1 -1
- package/docs/src/data/nav/introduction.yaml +2 -2
- package/docs/src/data/storybook.json +20696 -8068
- package/docs/src/pages/404.js +9 -5
- package/docs/src/pages/components/avatar/code.mdx +2 -2
- package/docs/src/pages/components/avatar/usage.mdx +55 -11
- package/docs/src/pages/components/badges/code.mdx +2 -2
- package/docs/src/pages/components/badges/usage.mdx +62 -10
- package/docs/src/pages/components/breadcrumbs/code.mdx +2 -2
- package/docs/src/pages/components/breadcrumbs/usage.mdx +5 -5
- package/docs/src/pages/components/button/code.mdx +3 -3
- package/docs/src/pages/components/button/usage.mdx +92 -34
- package/docs/src/pages/components/calendar/code.mdx +2 -2
- package/docs/src/pages/components/calendar/usage.mdx +34 -3
- package/docs/src/pages/components/card/code.mdx +2 -2
- package/docs/src/pages/components/card/usage.mdx +44 -16
- package/docs/src/pages/components/checkbox/code.mdx +2 -2
- package/docs/src/pages/components/checkbox/usage.mdx +42 -7
- package/docs/src/pages/components/chips/usage.mdx +30 -5
- package/docs/src/pages/components/datePicker/usage.mdx +31 -0
- package/docs/src/pages/components/dividers/usage.mdx +1 -1
- package/docs/src/pages/components/dropdowns/images/dropdowns-10.gif +0 -0
- package/docs/src/pages/components/dropdowns/images/dropdowns-11.png +0 -0
- package/docs/src/pages/components/dropdowns/images/dropdowns-12.gif +0 -0
- package/docs/src/pages/components/dropdowns/interactions.mdx +415 -0
- package/docs/src/pages/components/dropdowns/usage.mdx +57 -1
- package/docs/src/pages/components/icons/usage.mdx +49 -3
- package/docs/src/pages/components/index.mdx +7 -2
- package/docs/src/pages/components/inputs/usage.mdx +78 -1
- package/docs/src/pages/components/links/usage.mdx +30 -0
- package/docs/src/pages/components/message/usage.mdx +80 -0
- package/docs/src/pages/components/metaList/usage.mdx +35 -0
- package/docs/src/pages/components/modals/images/modal-13.gif +0 -0
- package/docs/src/pages/components/modals/images/modal-14.gif +0 -0
- package/docs/src/pages/components/modals/images/modal-15.gif +0 -0
- package/docs/src/pages/components/modals/images/modal-16.gif +0 -0
- package/docs/src/pages/components/modals/images/modal-17.gif +0 -0
- package/docs/src/pages/components/modals/interactions.mdx +376 -0
- package/docs/src/pages/components/modals/usage.mdx +84 -1
- package/docs/src/pages/components/navigationHorizontal/images/navigationhoriz-3.gif +0 -0
- package/docs/src/pages/components/navigationHorizontal/interactions.mdx +147 -1
- package/docs/src/pages/components/navigationHorizontal/usage.mdx +27 -67
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-15.gif +0 -0
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-16.gif +0 -0
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-17.gif +0 -0
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-18.gif +0 -0
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-19.gif +0 -0
- package/docs/src/pages/components/navigationVertical/images/navigationvertical-20.gif +0 -0
- package/docs/src/pages/components/navigationVertical/interactions.mdx +877 -1
- package/docs/src/pages/components/navigationVertical/usage.mdx +52 -81
- package/docs/src/pages/components/overview/{tabs/all-components.mdx → all-components.mdx} +3 -2
- package/docs/src/pages/components/overview/status.mdx +15 -0
- package/docs/src/pages/components/pageHeaders/usage.mdx +31 -0
- package/docs/src/pages/components/pagination/usage.mdx +17 -48
- package/docs/src/pages/components/pills/usage.mdx +49 -52
- package/docs/src/pages/components/popover/images/popover-8.gif +0 -0
- package/docs/src/pages/components/popover/images/popover-9.gif +0 -0
- package/docs/src/pages/components/popover/interactions.mdx +83 -0
- package/docs/src/pages/components/popover/usage.mdx +44 -54
- package/docs/src/pages/components/progressIndicators/interactions.mdx +63 -0
- package/docs/src/pages/components/progressIndicators/usage.mdx +25 -1
- package/docs/src/pages/components/radio/usage.mdx +32 -47
- package/docs/src/pages/components/richTextEditor/usage.mdx +90 -62
- package/docs/src/pages/components/sidesheet/usage.mdx +42 -64
- package/docs/src/pages/components/slider/usage.mdx +28 -64
- package/docs/src/pages/components/statusHint/usage.mdx +25 -47
- package/docs/src/pages/components/steppers/images/stepper-7.gif +0 -0
- package/docs/src/pages/components/steppers/images/stepper-8.gif +0 -0
- package/docs/src/pages/components/steppers/interactions.mdx +785 -0
- package/docs/src/pages/components/steppers/usage.mdx +42 -68
- package/docs/src/pages/components/switch/usage.mdx +17 -55
- package/docs/src/pages/components/tabs/images/tabs-8.gif +0 -0
- package/docs/src/pages/components/tabs/interactions.mdx +4 -0
- package/docs/src/pages/components/tabs/usage.mdx +39 -73
- package/docs/src/pages/components/toast/usage.mdx +50 -79
- package/docs/src/pages/components/tooltip/usage.mdx +29 -48
- package/docs/src/pages/content/rules.mdx +82 -2
- package/docs/src/pages/index.js +1 -1
- package/docs/src/pages/introduction/get-started/designers.mdx +201 -85
- package/docs/src/pages/introduction/get-started/images/designers-1.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-2.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-3.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-4.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-5.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-6.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-7.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-8.png +0 -0
- package/docs/src/pages/mobile/components/overview/{tabs/all-components.mdx → all-components.mdx} +5 -2
- package/docs/src/pages/{components/overview/tabs → mobile/components/overview}/status.mdx +2 -2
- package/docs/src/util/Frontmatter.js +4 -1
- package/docs/static/images/image_do.png +0 -0
- package/docs/static/images/image_dont.png +0 -0
- package/docs/static/images/img_do.png +0 -0
- package/docs/static/images/img_dont.png +0 -0
- package/docs/static/images/landscape_do.png +0 -0
- package/docs/tools/develop.sh +2 -1
- package/docs/tools/extract.js +14 -8
- package/package.json +2 -2
- package/docs/src/pages/components/overview/index.mdx +0 -6
- package/docs/src/pages/mobile/components/overview/index.mdx +0 -8
- package/docs/src/pages/mobile/components/overview/tabs/status.mdx +0 -115
package/. npmignore
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: "Dev deployments"
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- develop
|
|
6
|
+
jobs:
|
|
7
|
+
storybook_deploy:
|
|
8
|
+
name: Deploy storybook
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
with:
|
|
13
|
+
ref: develop
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-node@v1
|
|
16
|
+
with:
|
|
17
|
+
node-version: '14.x'
|
|
18
|
+
|
|
19
|
+
- name: npm install
|
|
20
|
+
run: npm ci
|
|
21
|
+
|
|
22
|
+
- name: build css
|
|
23
|
+
run: npm run build-css
|
|
24
|
+
|
|
25
|
+
- name: deploy storybook
|
|
26
|
+
run: npm run deploy-storybook -- --bucket-path=webui-mds-sb-dev --aws-profile=NONE --ci
|
|
27
|
+
env:
|
|
28
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_KEY }}
|
|
29
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_KEY_ID }}
|
|
30
|
+
AWS_REGION: ${{ secrets.DOCS_REGION }}
|
|
31
|
+
|
|
32
|
+
site_deploy:
|
|
33
|
+
name: Deploy docs site
|
|
34
|
+
needs: storybook_deploy
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
defaults:
|
|
37
|
+
run:
|
|
38
|
+
working-directory: ./docs
|
|
39
|
+
env:
|
|
40
|
+
DOCS_BUCKET: webui-mds-docs-dev
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v2
|
|
43
|
+
|
|
44
|
+
- uses: actions/setup-node@v1
|
|
45
|
+
with:
|
|
46
|
+
node-version: '14.x'
|
|
47
|
+
|
|
48
|
+
- name: npm install
|
|
49
|
+
run: npm i
|
|
50
|
+
|
|
51
|
+
- name: extract stories
|
|
52
|
+
run: npm run extract
|
|
53
|
+
env:
|
|
54
|
+
STORYBOOK_HOST: "https://mds-dev.innovaccer.com/iframe.html?id=components-avatargroup-all--all&args=&viewMode=story"
|
|
55
|
+
|
|
56
|
+
- name: build
|
|
57
|
+
run: npm run build
|
|
58
|
+
env:
|
|
59
|
+
DOCS_BUCKET: webui-mds-docs-dev
|
|
60
|
+
|
|
61
|
+
- name: deploy
|
|
62
|
+
run: npm run deploy
|
|
63
|
+
env:
|
|
64
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_KEY }}
|
|
65
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_KEY_ID }}
|
|
66
|
+
AWS_REGION: ${{ secrets.DOCS_REGION }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Docs pull request
|
|
2
2
|
|
|
3
3
|
on: pull_request
|
|
4
4
|
|
|
@@ -6,6 +6,9 @@ jobs:
|
|
|
6
6
|
lint_test_build:
|
|
7
7
|
name: lint, test and build
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
|
+
defaults:
|
|
10
|
+
run:
|
|
11
|
+
working-directory: ./docs
|
|
9
12
|
steps:
|
|
10
13
|
- uses: actions/checkout@v1
|
|
11
14
|
|
|
@@ -13,8 +16,8 @@ jobs:
|
|
|
13
16
|
with:
|
|
14
17
|
node-version: '14.x'
|
|
15
18
|
|
|
16
|
-
- name:
|
|
17
|
-
run:
|
|
19
|
+
- name: npm install
|
|
20
|
+
run: npm install
|
|
18
21
|
|
|
19
22
|
- name: build
|
|
20
|
-
run:
|
|
23
|
+
run: npm run build
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: 'Release new version'
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
@@ -6,29 +6,29 @@ on:
|
|
|
6
6
|
jobs:
|
|
7
7
|
release:
|
|
8
8
|
# uncomment next line as soon as visual tesing starts working
|
|
9
|
-
# needs: visual_test
|
|
9
|
+
# needs: visual_test
|
|
10
10
|
name: Release tag
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
13
|
- uses: actions/checkout@v2
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
- name: Check for release commit
|
|
16
16
|
id: 'is_release_commit'
|
|
17
17
|
uses: /innovaccer/design-system/actions/check-release-commit@master
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
- uses: actions/setup-node@v1
|
|
20
20
|
if: steps.is_release_commit.outputs.result == 1
|
|
21
21
|
with:
|
|
22
22
|
node-version: '14.x'
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
- name: npm install
|
|
25
25
|
if: steps.is_release_commit.outputs.result == 1
|
|
26
26
|
run: npm ci
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
- name: setup git
|
|
29
29
|
if: steps.is_release_commit.outputs.result == 1
|
|
30
30
|
run: git checkout -b preparing-module-for-npm-publish && git config --global user.email "release-bot@innovaccer.com" && git config --global user.name "release-bot"
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
- name: bump module version
|
|
33
33
|
if: steps.is_release_commit.outputs.result == 1
|
|
34
34
|
run: RELEASE_COMMIT=true npm version --no-commit-hooks $(git log -1 --pretty=format:%s) -m "Released %s"
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
- name: remove .npmrc
|
|
47
47
|
if: steps.is_release_commit.outputs.result == 1
|
|
48
48
|
run: rm -rf .npmrc
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
- name: push module tags to github
|
|
51
51
|
if: steps.is_release_commit.outputs.result == 1
|
|
52
52
|
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git $(git log -2 --pretty=format:%B | tail -n1)
|
|
@@ -60,16 +60,64 @@ jobs:
|
|
|
60
60
|
|
|
61
61
|
- name: push version to github
|
|
62
62
|
if: steps.is_release_commit.outputs.result == 1
|
|
63
|
-
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:master
|
|
64
|
-
|
|
63
|
+
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:master
|
|
64
|
+
|
|
65
65
|
- name: deploy storybook
|
|
66
|
-
env:
|
|
67
|
-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
68
66
|
if: steps.is_release_commit.outputs.result == 1
|
|
69
|
-
run: npm run deploy-storybook -- --ci
|
|
70
|
-
|
|
67
|
+
run: npm run deploy-storybook -- --bucket-path=webui-mds-sb-prod --aws-profile=NONE --ci
|
|
68
|
+
env:
|
|
69
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_KEY }}
|
|
70
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_KEY_ID }}
|
|
71
|
+
AWS_REGION: ${{ secrets.DOCS_REGION }}
|
|
72
|
+
|
|
71
73
|
- name: notify release
|
|
72
74
|
if: steps.is_release_commit.outputs.result == 1
|
|
73
75
|
uses: /innovaccer/design-system/actions/notify-release@master
|
|
74
76
|
env:
|
|
75
77
|
GCHAT_PATH: ${{ secrets.GCHAT_PATH }}
|
|
78
|
+
|
|
79
|
+
site_deploy:
|
|
80
|
+
name: Deploy docs site
|
|
81
|
+
needs: release
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
defaults:
|
|
84
|
+
run:
|
|
85
|
+
working-directory: ./docs
|
|
86
|
+
env:
|
|
87
|
+
DOCS_BUCKET: webui-mds-docs-prod
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v2
|
|
90
|
+
|
|
91
|
+
- name: Check for release commit
|
|
92
|
+
id: 'is_release_commit'
|
|
93
|
+
uses: /innovaccer/design-system/actions/check-release-commit@master
|
|
94
|
+
|
|
95
|
+
- uses: actions/setup-node@v1
|
|
96
|
+
if: steps.is_release_commit.outputs.result == 1
|
|
97
|
+
with:
|
|
98
|
+
node-version: '14.x'
|
|
99
|
+
|
|
100
|
+
- name: npm install
|
|
101
|
+
if: steps.is_release_commit.outputs.result == 1
|
|
102
|
+
run: npm i
|
|
103
|
+
|
|
104
|
+
- name: extract stories
|
|
105
|
+
if: steps.is_release_commit.outputs.result == 1
|
|
106
|
+
run: npm run extract
|
|
107
|
+
env:
|
|
108
|
+
STORYBOOK_HOST: 'https://mds.innovaccer.com/iframe.html?id=components-avatargroup-all--all&args=&viewMode=story'
|
|
109
|
+
|
|
110
|
+
- name: build
|
|
111
|
+
if: steps.is_release_commit.outputs.result == 1
|
|
112
|
+
run: npm run build
|
|
113
|
+
env:
|
|
114
|
+
DOCS_BUCKET: webui-mds-docs-prod
|
|
115
|
+
|
|
116
|
+
- name: deploy
|
|
117
|
+
if: steps.is_release_commit.outputs.result == 1
|
|
118
|
+
run: npm run deploy
|
|
119
|
+
env:
|
|
120
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_KEY }}
|
|
121
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_KEY_ID }}
|
|
122
|
+
AWS_REGION: ${{ secrets.DOCS_REGION }}
|
|
123
|
+
DOCS_BUCKET: webui-mds-docs-prod
|
|
@@ -10,7 +10,7 @@ exports[`Chip component
|
|
|
10
10
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
11
11
|
>
|
|
12
12
|
<i
|
|
13
|
-
class="material-icons material-icons-round Icon Icon--
|
|
13
|
+
class="material-icons material-icons-round Icon Icon--inverse Chip-icon Chip-icon--left"
|
|
14
14
|
data-test="DesignSystem-GenericChip--Icon"
|
|
15
15
|
role="button"
|
|
16
16
|
style="font-size: 16px; width: 16px;"
|
|
@@ -38,7 +38,7 @@ exports[`Chip component
|
|
|
38
38
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
39
39
|
>
|
|
40
40
|
<i
|
|
41
|
-
class="material-icons material-icons-round Icon Icon--
|
|
41
|
+
class="material-icons material-icons-round Icon Icon--primary Chip-icon Chip-icon--left"
|
|
42
42
|
data-test="DesignSystem-GenericChip--Icon"
|
|
43
43
|
role="button"
|
|
44
44
|
style="font-size: 16px; width: 16px;"
|
|
@@ -94,7 +94,7 @@ exports[`Chip component
|
|
|
94
94
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
95
95
|
>
|
|
96
96
|
<i
|
|
97
|
-
class="material-icons material-icons-round Icon Icon--
|
|
97
|
+
class="material-icons material-icons-round Icon Icon--primaryLighter Chip-icon Chip-icon--left"
|
|
98
98
|
data-test="DesignSystem-GenericChip--Icon"
|
|
99
99
|
role="button"
|
|
100
100
|
style="font-size: 16px; width: 16px;"
|
|
@@ -122,7 +122,7 @@ exports[`Chip component
|
|
|
122
122
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
123
123
|
>
|
|
124
124
|
<i
|
|
125
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--left"
|
|
125
|
+
class="material-icons material-icons-round Icon Icon--inverse Chip-icon Chip-icon--left"
|
|
126
126
|
data-test="DesignSystem-GenericChip--Icon"
|
|
127
127
|
role="button"
|
|
128
128
|
style="font-size: 16px; width: 16px;"
|
|
@@ -136,7 +136,7 @@ exports[`Chip component
|
|
|
136
136
|
ChipLabel
|
|
137
137
|
</span>
|
|
138
138
|
<i
|
|
139
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--right cursor-pointer"
|
|
139
|
+
class="material-icons material-icons-round Icon Icon--subtle Chip-icon Chip-icon--right cursor-pointer"
|
|
140
140
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
141
141
|
role="button"
|
|
142
142
|
style="font-size: 16px; width: 16px;"
|
|
@@ -159,7 +159,7 @@ exports[`Chip component
|
|
|
159
159
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
160
160
|
>
|
|
161
161
|
<i
|
|
162
|
-
class="material-icons material-icons-round Icon Icon--
|
|
162
|
+
class="material-icons material-icons-round Icon Icon--primary Chip-icon Chip-icon--left"
|
|
163
163
|
data-test="DesignSystem-GenericChip--Icon"
|
|
164
164
|
role="button"
|
|
165
165
|
style="font-size: 16px; width: 16px;"
|
|
@@ -173,7 +173,7 @@ exports[`Chip component
|
|
|
173
173
|
ChipLabel
|
|
174
174
|
</span>
|
|
175
175
|
<i
|
|
176
|
-
class="material-icons material-icons-round Icon Icon--
|
|
176
|
+
class="material-icons material-icons-round Icon Icon--primary Chip-icon Chip-icon--right cursor-pointer"
|
|
177
177
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
178
178
|
role="button"
|
|
179
179
|
style="font-size: 16px; width: 16px;"
|
|
@@ -233,7 +233,7 @@ exports[`Chip component
|
|
|
233
233
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
234
234
|
>
|
|
235
235
|
<i
|
|
236
|
-
class="material-icons material-icons-round Icon Icon--
|
|
236
|
+
class="material-icons material-icons-round Icon Icon--primaryLighter Chip-icon Chip-icon--left"
|
|
237
237
|
data-test="DesignSystem-GenericChip--Icon"
|
|
238
238
|
role="button"
|
|
239
239
|
style="font-size: 16px; width: 16px;"
|
|
@@ -247,7 +247,7 @@ exports[`Chip component
|
|
|
247
247
|
ChipLabel
|
|
248
248
|
</span>
|
|
249
249
|
<i
|
|
250
|
-
class="material-icons material-icons-round Icon Icon--
|
|
250
|
+
class="material-icons material-icons-round Icon Icon--primaryLighter Chip-icon Chip-icon--right"
|
|
251
251
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
252
252
|
role="button"
|
|
253
253
|
style="font-size: 16px; width: 16px;"
|
|
@@ -38,12 +38,14 @@ export const GenericChip = (props: GenericChipProps) => {
|
|
|
38
38
|
if (onClick) onClick();
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const iconAppearance =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const iconAppearance = (align: string) =>
|
|
42
|
+
classNames({
|
|
43
|
+
['disabled']: disabled && !selected,
|
|
44
|
+
['primary']: !disabled && selected,
|
|
45
|
+
['primary_lighter']: disabled && selected,
|
|
46
|
+
['subtle']: !disabled && !selected && align === 'right',
|
|
47
|
+
['inverse']: !disabled && !selected && align === 'left',
|
|
48
|
+
}) as IconProps['appearance'];
|
|
47
49
|
|
|
48
50
|
const textAppearance = classNames({
|
|
49
51
|
['disabled']: disabled && !selected,
|
|
@@ -64,7 +66,7 @@ export const GenericChip = (props: GenericChipProps) => {
|
|
|
64
66
|
<Icon
|
|
65
67
|
data-test="DesignSystem-GenericChip--Icon"
|
|
66
68
|
name={icon}
|
|
67
|
-
appearance={iconAppearance}
|
|
69
|
+
appearance={iconAppearance('left')}
|
|
68
70
|
className={iconClass('left')}
|
|
69
71
|
/>
|
|
70
72
|
)}
|
|
@@ -75,7 +77,7 @@ export const GenericChip = (props: GenericChipProps) => {
|
|
|
75
77
|
<Icon
|
|
76
78
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
77
79
|
name="clear"
|
|
78
|
-
appearance={iconAppearance}
|
|
80
|
+
appearance={iconAppearance('right')}
|
|
79
81
|
className={iconClass('right')}
|
|
80
82
|
onClick={onCloseHandler}
|
|
81
83
|
/>
|
|
@@ -17,7 +17,7 @@ exports[`ChipGroup component
|
|
|
17
17
|
data-test="DesignSystem-ChipGroup--Chip"
|
|
18
18
|
>
|
|
19
19
|
<i
|
|
20
|
-
class="material-icons material-icons-round Icon Icon--
|
|
20
|
+
class="material-icons material-icons-round Icon Icon--inverse Chip-icon Chip-icon--left"
|
|
21
21
|
data-test="DesignSystem-GenericChip--Icon"
|
|
22
22
|
role="button"
|
|
23
23
|
style="font-size: 16px; width: 16px;"
|
|
@@ -40,7 +40,7 @@ exports[`ChipGroup component
|
|
|
40
40
|
data-test="DesignSystem-ChipGroup--Chip"
|
|
41
41
|
>
|
|
42
42
|
<i
|
|
43
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--left"
|
|
43
|
+
class="material-icons material-icons-round Icon Icon--inverse Chip-icon Chip-icon--left"
|
|
44
44
|
data-test="DesignSystem-GenericChip--Icon"
|
|
45
45
|
role="button"
|
|
46
46
|
style="font-size: 16px; width: 16px;"
|
|
@@ -54,7 +54,7 @@ exports[`ChipGroup component
|
|
|
54
54
|
Input
|
|
55
55
|
</span>
|
|
56
56
|
<i
|
|
57
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--right cursor-pointer"
|
|
57
|
+
class="material-icons material-icons-round Icon Icon--subtle Chip-icon Chip-icon--right cursor-pointer"
|
|
58
58
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
59
59
|
role="button"
|
|
60
60
|
style="font-size: 16px; width: 16px;"
|
|
@@ -72,7 +72,7 @@ exports[`ChipGroup component
|
|
|
72
72
|
data-test="DesignSystem-ChipGroup--Chip"
|
|
73
73
|
>
|
|
74
74
|
<i
|
|
75
|
-
class="material-icons material-icons-round Icon Icon--
|
|
75
|
+
class="material-icons material-icons-round Icon Icon--primary Chip-icon Chip-icon--left"
|
|
76
76
|
data-test="DesignSystem-GenericChip--Icon"
|
|
77
77
|
role="button"
|
|
78
78
|
style="font-size: 16px; width: 16px;"
|
|
@@ -86,7 +86,7 @@ exports[`ChipGroup component
|
|
|
86
86
|
Selection
|
|
87
87
|
</span>
|
|
88
88
|
<i
|
|
89
|
-
class="material-icons material-icons-round Icon Icon--
|
|
89
|
+
class="material-icons material-icons-round Icon Icon--primary Chip-icon Chip-icon--right cursor-pointer"
|
|
90
90
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
91
91
|
role="button"
|
|
92
92
|
style="font-size: 16px; width: 16px;"
|
|
@@ -104,7 +104,7 @@ exports[`ChipGroup component
|
|
|
104
104
|
data-test="DesignSystem-ChipGroup--Chip"
|
|
105
105
|
>
|
|
106
106
|
<i
|
|
107
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--left"
|
|
107
|
+
class="material-icons material-icons-round Icon Icon--inverse Chip-icon Chip-icon--left"
|
|
108
108
|
data-test="DesignSystem-GenericChip--Icon"
|
|
109
109
|
role="button"
|
|
110
110
|
style="font-size: 16px; width: 16px;"
|
|
@@ -118,7 +118,7 @@ exports[`ChipGroup component
|
|
|
118
118
|
Selection
|
|
119
119
|
</span>
|
|
120
120
|
<i
|
|
121
|
-
class="material-icons material-icons-round Icon Chip-icon Chip-icon--right cursor-pointer"
|
|
121
|
+
class="material-icons material-icons-round Icon Icon--subtle Chip-icon Chip-icon--right cursor-pointer"
|
|
122
122
|
data-test="DesignSystem-GenericChip--clearButton"
|
|
123
123
|
role="button"
|
|
124
124
|
style="font-size: 16px; width: 16px;"
|
|
@@ -28,10 +28,14 @@ export interface CollapsibleProps extends BaseProps {
|
|
|
28
28
|
* Components to render inside `Collapsible`
|
|
29
29
|
*/
|
|
30
30
|
children: React.ReactChild;
|
|
31
|
+
/**
|
|
32
|
+
* Determines whether to show trigger at bottom of `Collapsible`
|
|
33
|
+
*/
|
|
34
|
+
withTrigger: boolean;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
export const Collapsible = (props: CollapsibleProps) => {
|
|
34
|
-
const { expanded, hoverable, expandedWidth, height, children, className, onToggle } = props;
|
|
38
|
+
const { expanded, hoverable, expandedWidth, height, children, className, onToggle, withTrigger } = props;
|
|
35
39
|
|
|
36
40
|
const [isClicked, setIsClicked] = React.useState(true);
|
|
37
41
|
const [seperator, setSeperator] = React.useState(false);
|
|
@@ -96,15 +100,17 @@ export const Collapsible = (props: CollapsibleProps) => {
|
|
|
96
100
|
>
|
|
97
101
|
{children}
|
|
98
102
|
</div>
|
|
99
|
-
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
{withTrigger && (
|
|
104
|
+
<div data-test="DesignSystem-Collapsible--Footer" className={FooterClass}>
|
|
105
|
+
<Icon
|
|
106
|
+
name={expanded ? 'keyboard_arrow_left' : 'keyboard_arrow_right'}
|
|
107
|
+
data-test="DesignSystem-Collapsible--FooterIcon"
|
|
108
|
+
className="px-5 py-4 my-2 cursor-pointer"
|
|
109
|
+
onClick={onToggleHandler(!expanded, 'click')}
|
|
110
|
+
size={16}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
108
114
|
</div>
|
|
109
115
|
</div>
|
|
110
116
|
);
|
|
@@ -117,6 +123,7 @@ Collapsible.defaultProps = {
|
|
|
117
123
|
hoverable: true,
|
|
118
124
|
height: '100%',
|
|
119
125
|
expandedWidth: 'var(--spacing-9)',
|
|
126
|
+
withTrigger: true,
|
|
120
127
|
};
|
|
121
128
|
|
|
122
129
|
export default Collapsible;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Collapsible from '@/components/atoms/collapsible';
|
|
3
|
+
import { Icon, VerticalNav, Heading } from '@/index';
|
|
4
|
+
|
|
5
|
+
// CSF format story
|
|
6
|
+
export const CustomTrigger = () => {
|
|
7
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
8
|
+
const [active, setActive] = React.useState({
|
|
9
|
+
name: 'To-do\'s.Due',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const data = [
|
|
13
|
+
{
|
|
14
|
+
name: 'To-do\'s',
|
|
15
|
+
label: 'To-do\'s',
|
|
16
|
+
icon: 'assignment_ind',
|
|
17
|
+
count: 31,
|
|
18
|
+
subMenu: [
|
|
19
|
+
{
|
|
20
|
+
name: 'To-do\'s.Due',
|
|
21
|
+
label: 'Due',
|
|
22
|
+
count: 31
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'To-do\'s.Completed',
|
|
26
|
+
label: 'Completed',
|
|
27
|
+
count: 0
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Received',
|
|
33
|
+
label: 'Received',
|
|
34
|
+
count: 0
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Sent',
|
|
38
|
+
label: 'Sent',
|
|
39
|
+
count: 5
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div>
|
|
45
|
+
<div className='d-flex align-items-center mb-3'>
|
|
46
|
+
<Icon name="menu" className="cursor-pointer" onClick={() => setExpanded(!expanded)}></Icon>
|
|
47
|
+
<Heading size='s' className="ml-4">Click to Open</Heading>
|
|
48
|
+
</div>
|
|
49
|
+
<Collapsible withTrigger={false} expanded={expanded} height="100vh">
|
|
50
|
+
<div className="d-flex pt-4">
|
|
51
|
+
<Icon name="events" className="d-flex align-items-center px-5 Text--regular" />
|
|
52
|
+
{expanded && <Text className="mr-6">Collapsible</Text>}
|
|
53
|
+
</div>
|
|
54
|
+
</Collapsible>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const customCode = `() => {
|
|
60
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
61
|
+
const [active, setActive] = React.useState({
|
|
62
|
+
name: 'TODOs.Due',
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const data = [
|
|
66
|
+
{
|
|
67
|
+
name: 'TODOs',
|
|
68
|
+
label: 'TODOs',
|
|
69
|
+
icon: 'assignment_ind',
|
|
70
|
+
count: 31,
|
|
71
|
+
subMenu: [
|
|
72
|
+
{
|
|
73
|
+
name: 'TODOs.Due',
|
|
74
|
+
label: 'Due',
|
|
75
|
+
count: 31
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'TODOs.Completed',
|
|
79
|
+
label: 'Completed',
|
|
80
|
+
count: 0
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Received',
|
|
86
|
+
label: 'Received',
|
|
87
|
+
count: 0
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Sent',
|
|
91
|
+
label: 'Sent',
|
|
92
|
+
count: 5
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<div>
|
|
98
|
+
<div className='d-flex align-items-center mb-3'>
|
|
99
|
+
<Icon name="menu" className="cursor-pointer" onClick={() => setExpanded(!expanded) }></Icon>
|
|
100
|
+
<Heading size='s' className="ml-4">Click to Open</Heading>
|
|
101
|
+
</div>
|
|
102
|
+
<Collapsible withTrigger={false} expanded={expanded} height="100vh">
|
|
103
|
+
<div className="d-flex pt-4">
|
|
104
|
+
<Icon name="events" className="d-flex align-items-center px-5 Text--regular" />
|
|
105
|
+
{expanded && <Text className="mr-6">Collapsible</Text>}
|
|
106
|
+
</div>
|
|
107
|
+
</Collapsible>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
}`;
|
|
111
|
+
|
|
112
|
+
export default {
|
|
113
|
+
title: 'Components/Collapsible/Custom Trigger',
|
|
114
|
+
component: Collapsible,
|
|
115
|
+
parameters: {
|
|
116
|
+
docs: {
|
|
117
|
+
docPage: {
|
|
118
|
+
customCode,
|
|
119
|
+
imports: { collapsible: Collapsible },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
@@ -2,32 +2,33 @@ import * as React from 'react';
|
|
|
2
2
|
import Dropdown from '../Dropdown';
|
|
3
3
|
import Label from '@/components/atoms/label';
|
|
4
4
|
|
|
5
|
-
const options = [
|
|
6
|
-
{
|
|
7
|
-
label: 'Male',
|
|
8
|
-
value: 'Male',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
label: 'Female',
|
|
12
|
-
value: 'Female',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: 'Transgender',
|
|
16
|
-
value: 'Transgender',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: 'Others',
|
|
20
|
-
value: 'Others',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
|
|
24
5
|
// CSF format story
|
|
25
|
-
export const customSearchPlaceholder = () =>
|
|
6
|
+
export const customSearchPlaceholder = () => {
|
|
7
|
+
const options = [
|
|
8
|
+
{
|
|
9
|
+
label: 'Male',
|
|
10
|
+
value: 'Male',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: 'Female',
|
|
14
|
+
value: 'Female',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Transgender',
|
|
18
|
+
value: 'Transgender',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'Others',
|
|
22
|
+
value: 'Others',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
return (
|
|
26
26
|
<div className="mb-10 w-25">
|
|
27
27
|
<Label withInput={true}>Gender</Label>
|
|
28
28
|
<Dropdown options={options} searchPlaceholder="Search Gender" withSearch={true} />
|
|
29
29
|
</div>
|
|
30
|
-
);
|
|
30
|
+
);
|
|
31
|
+
};
|
|
31
32
|
|
|
32
33
|
export default {
|
|
33
34
|
title: 'Components/Dropdown/Custom Search Placeholder',
|
|
@@ -2,29 +2,30 @@ import * as React from 'react';
|
|
|
2
2
|
import { Dropdown } from '@/index';
|
|
3
3
|
import { Uncontrolled, Controlled } from './_common_/types';
|
|
4
4
|
|
|
5
|
-
const options = [
|
|
6
|
-
{
|
|
7
|
-
label: 'Below 18',
|
|
8
|
-
value: 'below_18',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
label: '19 - 35',
|
|
12
|
-
value: '19-35',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: '36 - 55',
|
|
16
|
-
value: '36-55',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: '56 and above',
|
|
20
|
-
value: '56_above',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
|
|
24
5
|
// CSF format story
|
|
25
|
-
export const dropdownItemsWithCheckbox = () =>
|
|
6
|
+
export const dropdownItemsWithCheckbox = () => {
|
|
7
|
+
const options = [
|
|
8
|
+
{
|
|
9
|
+
label: 'Below 18',
|
|
10
|
+
value: 'below_18',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: '19 - 35',
|
|
14
|
+
value: '19-35',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: '36 - 55',
|
|
18
|
+
value: '36-55',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '56 and above',
|
|
22
|
+
value: '56_above',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
return (
|
|
26
26
|
<Dropdown options={options} withCheckbox={true} className="w-25" placeholder="Select" />
|
|
27
|
-
);
|
|
27
|
+
);
|
|
28
|
+
};
|
|
28
29
|
|
|
29
30
|
export default {
|
|
30
31
|
title: 'Components/Dropdown/Dropdown Items With Checkbox',
|