@patternfly/react-core 4.273.3 → 4.274.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/CHANGELOG.md +24 -0
- package/components/Chip/Chip.d.ts.map +1 -1
- package/components/Chip/Chip.js +5 -4
- package/components/Chip/Chip.js.map +1 -1
- package/components/Menu/MenuGroup.d.ts +1 -1
- package/components/Menu/MenuGroup.d.ts.map +1 -1
- package/components/Menu/MenuGroup.js.map +1 -1
- package/components/Text/TextList.d.ts +2 -0
- package/components/Text/TextList.d.ts.map +1 -1
- package/components/Text/TextList.js +3 -2
- package/components/Text/TextList.js.map +1 -1
- package/dist/esm/components/Chip/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip/Chip.js +5 -4
- package/dist/esm/components/Chip/Chip.js.map +1 -1
- package/dist/esm/components/Menu/MenuGroup.d.ts +1 -1
- package/dist/esm/components/Menu/MenuGroup.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuGroup.js.map +1 -1
- package/dist/esm/components/Text/TextList.d.ts +2 -0
- package/dist/esm/components/Text/TextList.d.ts.map +1 -1
- package/dist/esm/components/Text/TextList.js +3 -2
- package/dist/esm/components/Text/TextList.js.map +1 -1
- package/dist/esm/next/components/Wizard/Wizard.d.ts +11 -14
- package/dist/esm/next/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/Wizard.js +30 -23
- package/dist/esm/next/components/Wizard/Wizard.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardContext.d.ts +16 -16
- package/dist/esm/next/components/Wizard/WizardContext.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardContext.js +17 -19
- package/dist/esm/next/components/Wizard/WizardContext.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardFooter.d.ts +8 -5
- package/dist/esm/next/components/Wizard/WizardFooter.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardFooter.js +1 -1
- package/dist/esm/next/components/Wizard/WizardFooter.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardHeader.d.ts +1 -1
- package/dist/esm/next/components/Wizard/WizardHeader.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavInternal.d.ts +2 -2
- package/dist/esm/next/components/Wizard/WizardNavInternal.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavInternal.js +15 -9
- package/dist/esm/next/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavItem.d.ts +10 -4
- package/dist/esm/next/components/Wizard/WizardNavItem.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavItem.js +10 -9
- package/dist/esm/next/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardStep.d.ts +3 -3
- package/dist/esm/next/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardStep.js +4 -2
- package/dist/esm/next/components/Wizard/WizardStep.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardToggle.d.ts +4 -4
- package/dist/esm/next/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardToggle.js +1 -1
- package/dist/esm/next/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/esm/next/components/Wizard/hooks/index.d.ts +1 -0
- package/dist/esm/next/components/Wizard/hooks/index.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/hooks/index.js +1 -0
- package/dist/esm/next/components/Wizard/hooks/index.js.map +1 -1
- package/dist/esm/next/components/Wizard/hooks/useGetMergedSteps.d.ts +9 -0
- package/dist/esm/next/components/Wizard/hooks/useGetMergedSteps.d.ts.map +1 -0
- package/dist/esm/next/components/Wizard/hooks/useGetMergedSteps.js +33 -0
- package/dist/esm/next/components/Wizard/hooks/useGetMergedSteps.js.map +1 -0
- package/dist/esm/next/components/Wizard/index.d.ts +2 -2
- package/dist/esm/next/components/Wizard/index.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/index.js +2 -2
- package/dist/esm/next/components/Wizard/index.js.map +1 -1
- package/dist/esm/next/components/Wizard/types.d.ts +13 -19
- package/dist/esm/next/components/Wizard/types.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/types.js +6 -0
- package/dist/esm/next/components/Wizard/types.js.map +1 -1
- package/dist/esm/next/components/Wizard/utils.d.ts +5 -6
- package/dist/esm/next/components/Wizard/utils.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/utils.js +15 -22
- package/dist/esm/next/components/Wizard/utils.js.map +1 -1
- package/dist/js/components/Chip/Chip.d.ts.map +1 -1
- package/dist/js/components/Chip/Chip.js +4 -4
- package/dist/js/components/Chip/Chip.js.map +1 -1
- package/dist/js/components/Menu/MenuGroup.d.ts +1 -1
- package/dist/js/components/Menu/MenuGroup.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuGroup.js.map +1 -1
- package/dist/js/components/Text/TextList.d.ts +2 -0
- package/dist/js/components/Text/TextList.d.ts.map +1 -1
- package/dist/js/components/Text/TextList.js +3 -2
- package/dist/js/components/Text/TextList.js.map +1 -1
- package/dist/js/next/components/Wizard/Wizard.d.ts +11 -14
- package/dist/js/next/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/Wizard.js +28 -21
- package/dist/js/next/components/Wizard/Wizard.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardContext.d.ts +16 -16
- package/dist/js/next/components/Wizard/WizardContext.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardContext.js +16 -17
- package/dist/js/next/components/Wizard/WizardContext.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardFooter.d.ts +8 -5
- package/dist/js/next/components/Wizard/WizardFooter.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardFooter.js +1 -1
- package/dist/js/next/components/Wizard/WizardFooter.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardHeader.d.ts +1 -1
- package/dist/js/next/components/Wizard/WizardHeader.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavInternal.d.ts +2 -2
- package/dist/js/next/components/Wizard/WizardNavInternal.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavInternal.js +15 -9
- package/dist/js/next/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavItem.d.ts +10 -4
- package/dist/js/next/components/Wizard/WizardNavItem.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavItem.js +10 -8
- package/dist/js/next/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardStep.d.ts +3 -3
- package/dist/js/next/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardStep.js +4 -2
- package/dist/js/next/components/Wizard/WizardStep.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardToggle.d.ts +4 -4
- package/dist/js/next/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardToggle.js +1 -1
- package/dist/js/next/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/js/next/components/Wizard/hooks/index.d.ts +1 -0
- package/dist/js/next/components/Wizard/hooks/index.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/hooks/index.js +3 -1
- package/dist/js/next/components/Wizard/hooks/index.js.map +1 -1
- package/dist/js/next/components/Wizard/hooks/useGetMergedSteps.d.ts +9 -0
- package/dist/js/next/components/Wizard/hooks/useGetMergedSteps.d.ts.map +1 -0
- package/dist/js/next/components/Wizard/hooks/useGetMergedSteps.js +38 -0
- package/dist/js/next/components/Wizard/hooks/useGetMergedSteps.js.map +1 -0
- package/dist/js/next/components/Wizard/index.d.ts +2 -2
- package/dist/js/next/components/Wizard/index.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/index.js +4 -2
- package/dist/js/next/components/Wizard/index.js.map +1 -1
- package/dist/js/next/components/Wizard/types.d.ts +13 -19
- package/dist/js/next/components/Wizard/types.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/types.js +7 -1
- package/dist/js/next/components/Wizard/types.js.map +1 -1
- package/dist/js/next/components/Wizard/utils.d.ts +5 -6
- package/dist/js/next/components/Wizard/utils.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/utils.js +17 -25
- package/dist/js/next/components/Wizard/utils.js.map +1 -1
- package/dist/umd/react-core.min.js +2 -2
- package/next/components/Wizard/Wizard.d.ts +11 -14
- package/next/components/Wizard/Wizard.d.ts.map +1 -1
- package/next/components/Wizard/Wizard.js +30 -23
- package/next/components/Wizard/Wizard.js.map +1 -1
- package/next/components/Wizard/WizardContext.d.ts +16 -16
- package/next/components/Wizard/WizardContext.d.ts.map +1 -1
- package/next/components/Wizard/WizardContext.js +17 -19
- package/next/components/Wizard/WizardContext.js.map +1 -1
- package/next/components/Wizard/WizardFooter.d.ts +8 -5
- package/next/components/Wizard/WizardFooter.d.ts.map +1 -1
- package/next/components/Wizard/WizardFooter.js +1 -1
- package/next/components/Wizard/WizardFooter.js.map +1 -1
- package/next/components/Wizard/WizardHeader.d.ts +1 -1
- package/next/components/Wizard/WizardHeader.d.ts.map +1 -1
- package/next/components/Wizard/WizardNavInternal.d.ts +2 -2
- package/next/components/Wizard/WizardNavInternal.d.ts.map +1 -1
- package/next/components/Wizard/WizardNavInternal.js +15 -9
- package/next/components/Wizard/WizardNavInternal.js.map +1 -1
- package/next/components/Wizard/WizardNavItem.d.ts +10 -4
- package/next/components/Wizard/WizardNavItem.d.ts.map +1 -1
- package/next/components/Wizard/WizardNavItem.js +10 -9
- package/next/components/Wizard/WizardNavItem.js.map +1 -1
- package/next/components/Wizard/WizardStep.d.ts +3 -3
- package/next/components/Wizard/WizardStep.d.ts.map +1 -1
- package/next/components/Wizard/WizardStep.js +4 -2
- package/next/components/Wizard/WizardStep.js.map +1 -1
- package/next/components/Wizard/WizardToggle.d.ts +4 -4
- package/next/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/next/components/Wizard/WizardToggle.js +1 -1
- package/next/components/Wizard/WizardToggle.js.map +1 -1
- package/next/components/Wizard/hooks/index.d.ts +1 -0
- package/next/components/Wizard/hooks/index.d.ts.map +1 -1
- package/next/components/Wizard/hooks/index.js +1 -0
- package/next/components/Wizard/hooks/index.js.map +1 -1
- package/next/components/Wizard/hooks/useGetMergedSteps.d.ts +9 -0
- package/next/components/Wizard/hooks/useGetMergedSteps.d.ts.map +1 -0
- package/next/components/Wizard/hooks/useGetMergedSteps.js +33 -0
- package/next/components/Wizard/hooks/useGetMergedSteps.js.map +1 -0
- package/next/components/Wizard/index.d.ts +2 -2
- package/next/components/Wizard/index.d.ts.map +1 -1
- package/next/components/Wizard/index.js +2 -2
- package/next/components/Wizard/index.js.map +1 -1
- package/next/components/Wizard/types.d.ts +13 -19
- package/next/components/Wizard/types.d.ts.map +1 -1
- package/next/components/Wizard/types.js +6 -0
- package/next/components/Wizard/types.js.map +1 -1
- package/next/components/Wizard/utils.d.ts +5 -6
- package/next/components/Wizard/utils.d.ts.map +1 -1
- package/next/components/Wizard/utils.js +15 -22
- package/next/components/Wizard/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Chip/Chip.tsx +4 -2
- package/src/components/Chip/__tests__/Chip.test.tsx +9 -0
- package/src/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap +55 -0
- package/src/components/ChipGroup/__tests__/__snapshots__/ChipGroup.test.tsx.snap +4 -0
- package/src/components/Menu/MenuGroup.tsx +2 -2
- package/src/components/Modal/examples/Modal.md +46 -11
- package/src/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +2 -0
- package/src/components/Text/TextList.tsx +5 -1
- package/src/components/Text/__tests__/TextList.test.tsx +5 -0
- package/src/components/Text/examples/Text.md +5 -0
- package/src/components/Text/examples/TextPlainList.tsx +24 -0
- package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +2 -0
- package/src/next/components/Wizard/Wizard.tsx +71 -46
- package/src/next/components/Wizard/WizardContext.tsx +38 -43
- package/src/next/components/Wizard/WizardFooter.tsx +10 -6
- package/src/next/components/Wizard/WizardHeader.tsx +1 -1
- package/src/next/components/Wizard/WizardNavInternal.tsx +51 -43
- package/src/next/components/Wizard/WizardNavItem.tsx +21 -14
- package/src/next/components/Wizard/WizardStep.tsx +8 -6
- package/src/next/components/Wizard/WizardToggle.tsx +5 -5
- package/src/next/components/Wizard/__tests__/Wizard.test.tsx +129 -26
- package/src/next/components/Wizard/__tests__/WizardStep.test.tsx +5 -5
- package/src/next/components/Wizard/__tests__/WizardToggle.test.tsx +2 -2
- package/src/next/components/Wizard/__tests__/utils.test.tsx +3 -17
- package/src/next/components/Wizard/examples/Wizard.md +69 -41
- package/src/next/components/Wizard/examples/WizardBasic.tsx +6 -12
- package/src/next/components/Wizard/examples/WizardBasicDisabledSteps.tsx +22 -0
- package/src/next/components/Wizard/examples/WizardEnabledOnFormValidation.tsx +84 -0
- package/src/next/components/Wizard/examples/WizardExpandableSteps.tsx +42 -0
- package/src/next/components/Wizard/examples/WizardGetCurrentStep.tsx +53 -0
- package/src/next/components/Wizard/examples/WizardProgressiveSteps.tsx +31 -0
- package/src/next/components/Wizard/examples/WizardStepDrawerContent.tsx +80 -0
- package/src/next/components/Wizard/examples/WizardStepErrorStatus.tsx +55 -0
- package/src/next/components/Wizard/examples/WizardStepVisitRequired.tsx +22 -0
- package/src/next/components/Wizard/examples/WizardToggleStepVisibility.tsx +57 -0
- package/src/next/components/Wizard/examples/WizardValidateOnButtonPress.tsx +183 -0
- package/src/next/components/Wizard/examples/WizardWithCustomFooter.tsx +107 -0
- package/src/next/components/Wizard/examples/{WizardCustomNav.tsx → WizardWithCustomNav.tsx} +11 -11
- package/src/next/components/Wizard/examples/WizardWithCustomNavItem.tsx +22 -0
- package/src/next/components/Wizard/examples/WizardWithHeader.tsx +26 -0
- package/src/next/components/Wizard/examples/WizardWithNavAnchors.tsx +46 -0
- package/src/next/components/Wizard/examples/WizardWithSubmitProgress.tsx +86 -0
- package/src/next/components/Wizard/examples/WizardWithinModal.tsx +41 -0
- package/src/next/components/Wizard/hooks/index.ts +1 -0
- package/src/next/components/Wizard/hooks/useGetMergedSteps.tsx +45 -0
- package/src/next/components/Wizard/index.ts +2 -2
- package/src/next/components/Wizard/types.tsx +19 -29
- package/src/next/components/Wizard/utils.ts +27 -33
- package/src/next/components/Wizard/examples/WizardKitchenSink.tsx +0 -243
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.274.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.274.0...@patternfly/react-core@4.274.1) (2023-01-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [4.274.0](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.273.3...@patternfly/react-core@4.274.0) (2023-01-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* forward given role to chip component ([#8383](https://github.com/patternfly/patternfly-react/issues/8383)) ([d550980](https://github.com/patternfly/patternfly-react/commit/d55098088e5e3cd08220e012fd465985a37d7dcd)), closes [#8353](https://github.com/patternfly/patternfly-react/issues/8353) [/github.com/patternfly/patternfly-react/pull/8383#issuecomment-1329742421](https://github.com//github.com/patternfly/patternfly-react/pull/8383/issues/issuecomment-1329742421)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **TextList:** added isPlain prop ([#8562](https://github.com/patternfly/patternfly-react/issues/8562)) ([e76f4e8](https://github.com/patternfly/patternfly-react/commit/e76f4e845439b24f8275ef7036a2c36808455bf4))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [4.273.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.273.2...@patternfly/react-core@4.273.3) (2023-01-19)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @patternfly/react-core
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAW,eAAe,EAAE,MAAM,YAAY,CAAC;AAItD,OAAO,EAAgB,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,SAAS;IAC3E,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,iIAAiI;IACjI,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mEAAmE;IACnE,eAAe,CAAC,EACZ,eAAe,GACf,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,aAAa,GACb,WAAW,CAAC;IAEhB,gIAAgI;IAChI,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,UAAU,SAAS;IACjB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GACb,WAAW,CAAC;IAEhB,gIAAgI;IAChI,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,UAAU,SAAS;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAC7D,MAAM,CAAC,WAAW,SAAU;gBAChB,KAAK,EAAE,SAAS;IAO5B,IAAI,mCAAsC;IAE1C,MAAM,CAAC,YAAY,EAAE,SAAS,CAS5B;IAEF,iBAAiB;IAMjB,YAAY;;MAET;IAEH,kBAAkB,oBAkBhB;IAEF,eAAe,CAAC,EAAE,EAAE,MAAM;IAgC1B,UAAU,aAAc,MAAM,iBAU5B;IAEF,MAAM;CAQP"}
|
package/components/Chip/Chip.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { css } from '@patternfly/react-styles';
|
|
3
4
|
import { Button } from '../Button';
|
|
@@ -14,9 +15,9 @@ export class Chip extends React.Component {
|
|
|
14
15
|
'--pf-c-chip__text--MaxWidth': this.props.textMaxWidth
|
|
15
16
|
});
|
|
16
17
|
this.renderOverflowChip = () => {
|
|
17
|
-
const { children, className, onClick, ouiaId } =
|
|
18
|
+
const _a = this.props, { children, className, onClick, ouiaId } = _a, props = __rest(_a, ["children", "className", "onClick", "ouiaId"]);
|
|
18
19
|
const Component = this.props.component;
|
|
19
|
-
return (React.createElement(Component, Object.assign({ onClick: onClick }, (this.props.textMaxWidth && Object.assign({ style: this.setChipStyle() }, this.props.style)), { className: css(styles.chip, styles.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
20
|
+
return (React.createElement(Component, Object.assign({ onClick: onClick }, (this.props.textMaxWidth && Object.assign({ style: this.setChipStyle() }, this.props.style)), { className: css(styles.chip, styles.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
20
21
|
React.createElement("span", { className: css(styles.chipText) }, children)));
|
|
21
22
|
};
|
|
22
23
|
this.renderChip = (randomId) => {
|
|
@@ -37,11 +38,11 @@ export class Chip extends React.Component {
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
renderInnerChip(id) {
|
|
40
|
-
const { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } =
|
|
41
|
+
const _a = this.props, { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } = _a, props = __rest(_a, ["children", "className", "onClick", "closeBtnAriaLabel", "isReadOnly", "component", "ouiaId"]);
|
|
41
42
|
const Component = component;
|
|
42
43
|
return (React.createElement(Component, Object.assign({}, (this.props.textMaxWidth && {
|
|
43
44
|
style: this.setChipStyle()
|
|
44
|
-
}), { className: css(styles.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
45
|
+
}), { className: css(styles.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
45
46
|
React.createElement("span", { ref: this.span, className: css(styles.chipText), id: id }, children),
|
|
46
47
|
!isReadOnly && (React.createElement(Button, { onClick: onClick, variant: "plain", "aria-label": closeBtnAriaLabel, id: `remove_${id}`, "aria-labelledby": `remove_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
47
48
|
React.createElement(TimesIcon, { "aria-hidden": "true" })))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAC;AACtD,OAAO,SAAS,MAAM,mDAAmD,CAAC;AAC1E,OAAO,MAAM,MAAM,mDAAmD,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA6C1E,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,SAA+B;IAE7D,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;QAMf,SAAI,GAAG,KAAK,CAAC,SAAS,EAAmB,CAAC;QAmB1C,iBAAY,GAAG,GAAG,EAAE,CAAC,CAAC;YACpB,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;SACvD,CAAC,CAAC;QAEH,uBAAkB,GAAG,GAAG,EAAE;YACxB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAC;AACtD,OAAO,SAAS,MAAM,mDAAmD,CAAC;AAC1E,OAAO,MAAM,MAAM,mDAAmD,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,YAAY,E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AAE,KAAwB;CACpC,CAAC"}
|
|
@@ -5,7 +5,7 @@ export interface MenuGroupProps extends Omit<React.HTMLProps<HTMLElement>, 'labe
|
|
|
5
5
|
/** Additional classes added to the MenuGroup */
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Group label */
|
|
8
|
-
label?: React.ReactNode
|
|
8
|
+
label?: React.ReactNode;
|
|
9
9
|
/** ID for title label */
|
|
10
10
|
titleId?: string;
|
|
11
11
|
/** Forwarded ref */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC7D;AA4BD,eAAO,MAAM,SAAS,u2LAEpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,mDAAmD,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAiB/C,MAAM,aAAa,GAA4C,CAAC,EAQ/C,EAAE,EAAE;QAR2C,EAC9D,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,EAAE,EACZ,QAAQ,EACR,iBAAiB,EAAE,YAAY,GAAG,IAAI,OAEvB,EADZ,KAAK,cAPsD,8EAQ/D,CADS;IAER,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,CACL,iDAAa,KAAK,IAAE,SAAS,EAAE,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ;QAC9E;YACG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAC/C,oBAAC,OAAO,IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,OAAO,IACxD,
|
|
1
|
+
{"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,mDAAmD,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAiB/C,MAAM,aAAa,GAA4C,CAAC,EAQ/C,EAAE,EAAE;QAR2C,EAC9D,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,EAAE,EACZ,QAAQ,EACR,iBAAiB,EAAE,YAAY,GAAG,IAAI,OAEvB,EADZ,KAAK,cAPsD,8EAQ/D,CADS;IAER,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC;IACnE,OAAO,CACL,iDAAa,KAAK,IAAE,SAAS,EAAE,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ;QAC9E;YACG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAC/C,oBAAC,OAAO,IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,OAAO,IACxD,KAAK,CACE,CACX,CAAC,CAAC,CAAC,CACF,KAAK,CACN;YACA,QAAQ,CACR,CACK,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAqB,EAAE,GAA2B,EAAE,EAAE,CAAC,CAChG,oBAAC,aAAa,oBAAK,KAAK,IAAE,QAAQ,EAAE,GAAG,IAAI,CAC5C,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -11,6 +11,8 @@ export interface TextListProps extends React.HTMLProps<HTMLElement> {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
/** The text list component */
|
|
13
13
|
component?: 'ul' | 'ol' | 'dl';
|
|
14
|
+
/** Modifies the list to include plain styling */
|
|
15
|
+
isPlain?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export declare const TextList: React.FunctionComponent<TextListProps>;
|
|
16
18
|
//# sourceMappingURL=TextList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextList.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextList.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,oBAAY,gBAAgB;IAC1B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;IACjE,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAc3D,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import styles from '@patternfly/react-styles/css/components/Content/content';
|
|
3
4
|
import { css } from '@patternfly/react-styles';
|
|
4
5
|
export var TextListVariants;
|
|
5
6
|
(function (TextListVariants) {
|
|
@@ -8,9 +9,9 @@ export var TextListVariants;
|
|
|
8
9
|
TextListVariants["dl"] = "dl";
|
|
9
10
|
})(TextListVariants || (TextListVariants = {}));
|
|
10
11
|
export const TextList = (_a) => {
|
|
11
|
-
var { children = null, className = '', component = TextListVariants.ul } = _a, props = __rest(_a, ["children", "className", "component"]);
|
|
12
|
+
var { children = null, className = '', component = TextListVariants.ul, isPlain = false } = _a, props = __rest(_a, ["children", "className", "component", "isPlain"]);
|
|
12
13
|
const Component = component;
|
|
13
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css(className) }), children));
|
|
14
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(isPlain && styles.modifiers.plain, className) }), children));
|
|
14
15
|
};
|
|
15
16
|
TextList.displayName = 'TextList';
|
|
16
17
|
//# sourceMappingURL=TextList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextList.js","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,6BAAS,CAAA;IACT,6BAAS,CAAA;AACX,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;
|
|
1
|
+
{"version":3,"file":"TextList.js","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yDAAyD,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,6BAAS,CAAA;IACT,6BAAS,CAAA;AACX,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAaD,MAAM,CAAC,MAAM,QAAQ,GAA2C,CAAC,EAMjD,EAAE,EAAE;QAN6C,EAC/D,QAAQ,GAAG,IAAI,EACf,SAAS,G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IAC5C,iIAAiI;IACjI,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mEAAmE;IACnE,eAAe,CAAC,EACZ,eAAe,GACf,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,aAAa,GACb,WAAW,CAAC;IAEhB,gIAAgI;IAChI,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,UAAU,SAAS;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAC7D,MAAM,CAAC,WAAW,SAAU;gBAChB,KAAK,EAAE,SAAS;IAO5B,IAAI,mCAAsC;IAE1C,MAAM,CAAC,YAAY,EAAE,SAAS,CAS5B;IAEF,iBAAiB;IAMjB,YAAY;;MAET;IAEH,kBAAkB,oBAkBhB;IAEF,eAAe,CAAC,EAAE,EAAE,MAAM;IAgC1B,UAAU,aAAc,MAAM,iBAU5B;IAEF,MAAM;CAQP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { css } from '@patternfly/react-styles';
|
|
3
4
|
import { Button } from '../Button';
|
|
@@ -14,9 +15,9 @@ export class Chip extends React.Component {
|
|
|
14
15
|
'--pf-c-chip__text--MaxWidth': this.props.textMaxWidth
|
|
15
16
|
});
|
|
16
17
|
this.renderOverflowChip = () => {
|
|
17
|
-
const { children, className, onClick, ouiaId } =
|
|
18
|
+
const _a = this.props, { children, className, onClick, ouiaId } = _a, props = __rest(_a, ["children", "className", "onClick", "ouiaId"]);
|
|
18
19
|
const Component = this.props.component;
|
|
19
|
-
return (React.createElement(Component, Object.assign({ onClick: onClick }, (this.props.textMaxWidth && Object.assign({ style: this.setChipStyle() }, this.props.style)), { className: css(styles.chip, styles.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
20
|
+
return (React.createElement(Component, Object.assign({ onClick: onClick }, (this.props.textMaxWidth && Object.assign({ style: this.setChipStyle() }, this.props.style)), { className: css(styles.chip, styles.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
20
21
|
React.createElement("span", { className: css(styles.chipText) }, children)));
|
|
21
22
|
};
|
|
22
23
|
this.renderChip = (randomId) => {
|
|
@@ -37,11 +38,11 @@ export class Chip extends React.Component {
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
renderInnerChip(id) {
|
|
40
|
-
const { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } =
|
|
41
|
+
const _a = this.props, { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } = _a, props = __rest(_a, ["children", "className", "onClick", "closeBtnAriaLabel", "isReadOnly", "component", "ouiaId"]);
|
|
41
42
|
const Component = component;
|
|
42
43
|
return (React.createElement(Component, Object.assign({}, (this.props.textMaxWidth && {
|
|
43
44
|
style: this.setChipStyle()
|
|
44
|
-
}), { className: css(styles.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
45
|
+
}), { className: css(styles.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
45
46
|
React.createElement("span", { ref: this.span, className: css(styles.chipText), id: id }, children),
|
|
46
47
|
!isReadOnly && (React.createElement(Button, { onClick: onClick, variant: "plain", "aria-label": closeBtnAriaLabel, id: `remove_${id}`, "aria-labelledby": `remove_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
47
48
|
React.createElement(TimesIcon, { "aria-hidden": "true" })))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAC;AACtD,OAAO,SAAS,MAAM,mDAAmD,CAAC;AAC1E,OAAO,MAAM,MAAM,mDAAmD,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAa,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA6C1E,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,SAA+B;IAE7D,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;QAMf,SAAI,GAAG,KAAK,CAAC,SAAS,EAAmB,CAAC;QAmB1C,iBAAY,GAAG,GAAG,EAAE,CAAC,CAAC;YACpB,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;SACvD,CAAC,CAAC;QAEH,uBAAkB,GAAG,GAAG,EAAE;YACxB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MA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Y,GAAc;IAC/B,iBAAiB,EAAE,OAAO;IAC1B,SAAS,EAAE,EAAE;IACb,cAAc,EAAE,KAAK;IACrB,UAAU,EAAE,KAAK;IACjB,eAAe,EAAE,KAAqD;IACtE,6DAA6D;IAC7D,OAAO,EAAE,CAAC,EAAoB,EAAE,EAAE,CAAC,SAAgB;IACnD,SAAS,EAAE,KAAwB;CACpC,CAAC"}
|
|
@@ -5,7 +5,7 @@ export interface MenuGroupProps extends Omit<React.HTMLProps<HTMLElement>, 'labe
|
|
|
5
5
|
/** Additional classes added to the MenuGroup */
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Group label */
|
|
8
|
-
label?: React.ReactNode
|
|
8
|
+
label?: React.ReactNode;
|
|
9
9
|
/** ID for title label */
|
|
10
10
|
titleId?: string;
|
|
11
11
|
/** Forwarded ref */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAA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,IAAI,CAC5C,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -11,6 +11,8 @@ export interface TextListProps extends React.HTMLProps<HTMLElement> {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
/** The text list component */
|
|
13
13
|
component?: 'ul' | 'ol' | 'dl';
|
|
14
|
+
/** Modifies the list to include plain styling */
|
|
15
|
+
isPlain?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export declare const TextList: React.FunctionComponent<TextListProps>;
|
|
16
18
|
//# sourceMappingURL=TextList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextList.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextList.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,oBAAY,gBAAgB;IAC1B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;IACjE,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAc3D,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import styles from '@patternfly/react-styles/css/components/Content/content';
|
|
3
4
|
import { css } from '@patternfly/react-styles';
|
|
4
5
|
export var TextListVariants;
|
|
5
6
|
(function (TextListVariants) {
|
|
@@ -8,9 +9,9 @@ export var TextListVariants;
|
|
|
8
9
|
TextListVariants["dl"] = "dl";
|
|
9
10
|
})(TextListVariants || (TextListVariants = {}));
|
|
10
11
|
export const TextList = (_a) => {
|
|
11
|
-
var { children = null, className = '', component = TextListVariants.ul } = _a, props = __rest(_a, ["children", "className", "component"]);
|
|
12
|
+
var { children = null, className = '', component = TextListVariants.ul, isPlain = false } = _a, props = __rest(_a, ["children", "className", "component", "isPlain"]);
|
|
12
13
|
const Component = component;
|
|
13
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css(className) }), children));
|
|
14
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(isPlain && styles.modifiers.plain, className) }), children));
|
|
14
15
|
};
|
|
15
16
|
TextList.displayName = 'TextList';
|
|
16
17
|
//# sourceMappingURL=TextList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextList.js","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,6BAAS,CAAA;IACT,6BAAS,CAAA;AACX,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;
|
|
1
|
+
{"version":3,"file":"TextList.js","sourceRoot":"","sources":["../../../../src/components/Text/TextList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yDAAyD,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,6BAAS,CAAA;IACT,6BAAS,CAAA;AACX,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAaD,MAAM,CAAC,MAAM,QAAQ,GAA2C,CAAC,EAMjD,EAAE,EAAE;QAN6C,EAC/D,QAAQ,GAAG,IAAI,EACf,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,gBAAgB,CAAC,EAAE,EAC/B,OAAO,GAAG,KAAK,OAED,EADX,KAAK,cALuD,iDAMhE,CADS;IAER,MAAM,SAAS,GAAQ,SAAS,CAAC;IAEjC,OAAO,CACL,oBAAC,SAAS,oBAAK,KAAK,IAAE,SAAS,EAAE,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,KAC/E,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { WizardStepProps } from './WizardStep';
|
|
2
|
+
import { WizardStepType, WizardFooterType, WizardNavType, WizardStepChangeScope } from './types';
|
|
4
3
|
/**
|
|
5
4
|
* Wrapper for all steps and hosts state, including navigation helpers, within context.
|
|
6
5
|
* The WizardContext provided by default gives any child of wizard access to those resources.
|
|
7
6
|
*/
|
|
8
7
|
export interface WizardProps extends React.HTMLProps<HTMLDivElement> {
|
|
9
8
|
/** Step components */
|
|
10
|
-
children: React.
|
|
9
|
+
children: React.ReactNode | React.ReactNode[];
|
|
11
10
|
/** Wizard header */
|
|
12
11
|
header?: React.ReactNode;
|
|
13
12
|
/** Wizard footer */
|
|
@@ -22,21 +21,19 @@ export interface WizardProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
22
21
|
width?: number | string;
|
|
23
22
|
/** Custom height of the wizard */
|
|
24
23
|
height?: number | string;
|
|
25
|
-
/** Disables
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
/** Callback function
|
|
30
|
-
|
|
31
|
-
/** Callback function after back button is clicked */
|
|
32
|
-
onBack?: WizardNavStepFunction;
|
|
24
|
+
/** Disables steps that haven't been visited. Defaults to false. */
|
|
25
|
+
isVisitRequired?: boolean;
|
|
26
|
+
/** Progressively shows steps, where all steps following the active step are hidden. Defaults to false. */
|
|
27
|
+
isProgressive?: boolean;
|
|
28
|
+
/** Callback function when navigating between steps */
|
|
29
|
+
onStepChange?: (event: React.MouseEvent<HTMLButtonElement>, currentStep: WizardStepType, prevStep: WizardStepType, scope: WizardStepChangeScope) => void | Promise<void>;
|
|
33
30
|
/** Callback function to save at the end of the wizard, if not specified uses onClose */
|
|
34
|
-
onSave?: () => void | Promise<void>;
|
|
31
|
+
onSave?: (event: React.MouseEvent<HTMLButtonElement>) => void | Promise<void>;
|
|
35
32
|
/** Callback function to close the wizard */
|
|
36
|
-
onClose?: () => void;
|
|
33
|
+
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
37
34
|
}
|
|
38
35
|
export declare const Wizard: {
|
|
39
|
-
({ children, footer, height, width, className, header, nav, startIndex,
|
|
36
|
+
({ children, footer, height, width, className, header, nav, startIndex, isVisitRequired, isProgressive, onStepChange, onSave, onClose, ...wrapperProps }: WizardProps): JSX.Element;
|
|
40
37
|
displayName: string;
|
|
41
38
|
};
|
|
42
39
|
//# sourceMappingURL=Wizard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/Wizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Wizard.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/Wizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAEL,cAAc,EAEd,gBAAgB,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ehB,WAAW;;CA8Gb,CAAC"}
|
|
@@ -1,38 +1,45 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import findLastIndex from 'lodash/findLastIndex';
|
|
4
3
|
import { css } from '@patternfly/react-styles';
|
|
5
4
|
import styles from '@patternfly/react-styles/css/components/Wizard/wizard';
|
|
6
|
-
import { isWizardParentStep, isCustomWizardNav } from './types';
|
|
7
|
-
import { buildSteps
|
|
5
|
+
import { isWizardParentStep, isCustomWizardNav, WizardStepChangeScope } from './types';
|
|
6
|
+
import { buildSteps } from './utils';
|
|
8
7
|
import { useWizardContext, WizardContextProvider } from './WizardContext';
|
|
9
8
|
import { WizardToggle } from './WizardToggle';
|
|
10
9
|
import { WizardNavInternal } from './WizardNavInternal';
|
|
11
10
|
export const Wizard = (_a) => {
|
|
12
|
-
var { children, footer, height, width, className, header, nav, startIndex = 1,
|
|
11
|
+
var { children, footer, height, width, className, header, nav, startIndex = 1, isVisitRequired = false, isProgressive = false, onStepChange, onSave, onClose } = _a, wrapperProps = __rest(_a, ["children", "footer", "height", "width", "className", "header", "nav", "startIndex", "isVisitRequired", "isProgressive", "onStepChange", "onSave", "onClose"]);
|
|
13
12
|
const [activeStepIndex, setActiveStepIndex] = React.useState(startIndex);
|
|
14
13
|
const initialSteps = buildSteps(children);
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
14
|
+
const firstStepRef = React.useRef(initialSteps[startIndex - 1]);
|
|
15
|
+
// When the startIndex maps to a parent step, focus on the first sub-step
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
if (isWizardParentStep(firstStepRef.current)) {
|
|
18
|
+
setActiveStepIndex(startIndex + 1);
|
|
19
|
+
}
|
|
20
|
+
}, [startIndex]);
|
|
21
|
+
const goToNextStep = (event, steps = initialSteps) => {
|
|
22
|
+
const newStep = steps.find(step => step.index > activeStepIndex && !step.isHidden && !step.isDisabled && !isWizardParentStep(step));
|
|
23
|
+
if (activeStepIndex >= steps.length || !(newStep === null || newStep === void 0 ? void 0 : newStep.index)) {
|
|
24
|
+
return onSave ? onSave(event) : onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
20
25
|
}
|
|
21
26
|
const currStep = isWizardParentStep(steps[activeStepIndex]) ? steps[activeStepIndex + 1] : steps[activeStepIndex];
|
|
22
27
|
const prevStep = steps[activeStepIndex - 1];
|
|
23
|
-
setActiveStepIndex(
|
|
24
|
-
|
|
28
|
+
setActiveStepIndex(newStep === null || newStep === void 0 ? void 0 : newStep.index);
|
|
29
|
+
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(event, currStep, prevStep, WizardStepChangeScope.Next);
|
|
25
30
|
};
|
|
26
|
-
const goToPrevStep = (steps = initialSteps) => {
|
|
27
|
-
const
|
|
31
|
+
const goToPrevStep = (event, steps = initialSteps) => {
|
|
32
|
+
const newStep = [...steps]
|
|
33
|
+
.reverse()
|
|
34
|
+
.find((step) => step.index < activeStepIndex && !step.isHidden && !step.isDisabled && !isWizardParentStep(step));
|
|
28
35
|
const currStep = isWizardParentStep(steps[activeStepIndex - 2])
|
|
29
36
|
? steps[activeStepIndex - 3]
|
|
30
37
|
: steps[activeStepIndex - 2];
|
|
31
38
|
const prevStep = steps[activeStepIndex - 1];
|
|
32
|
-
setActiveStepIndex(
|
|
33
|
-
|
|
39
|
+
setActiveStepIndex(newStep === null || newStep === void 0 ? void 0 : newStep.index);
|
|
40
|
+
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(event, currStep, prevStep, WizardStepChangeScope.Back);
|
|
34
41
|
};
|
|
35
|
-
const goToStepByIndex = (steps = initialSteps, index) => {
|
|
42
|
+
const goToStepByIndex = (event, steps = initialSteps, index) => {
|
|
36
43
|
const lastStepIndex = steps.length + 1;
|
|
37
44
|
// Handle index when out of bounds or hidden
|
|
38
45
|
if (index < 1) {
|
|
@@ -44,13 +51,13 @@ export const Wizard = (_a) => {
|
|
|
44
51
|
const currStep = steps[index - 1];
|
|
45
52
|
const prevStep = steps[activeStepIndex - 1];
|
|
46
53
|
setActiveStepIndex(index);
|
|
47
|
-
|
|
54
|
+
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(event, currStep, prevStep, WizardStepChangeScope.Nav);
|
|
48
55
|
};
|
|
49
56
|
const goToStepById = (steps = initialSteps, id) => {
|
|
50
57
|
const step = steps.find(step => step.id === id);
|
|
51
58
|
const stepIndex = step === null || step === void 0 ? void 0 : step.index;
|
|
52
59
|
const lastStepIndex = steps.length + 1;
|
|
53
|
-
if (stepIndex > 0 && stepIndex < lastStepIndex && !step.isHidden) {
|
|
60
|
+
if (stepIndex > 0 && stepIndex < lastStepIndex && !step.isDisabled && !step.isHidden) {
|
|
54
61
|
setActiveStepIndex(stepIndex);
|
|
55
62
|
}
|
|
56
63
|
};
|
|
@@ -58,24 +65,24 @@ export const Wizard = (_a) => {
|
|
|
58
65
|
const step = steps.find(step => step.name === name);
|
|
59
66
|
const stepIndex = step === null || step === void 0 ? void 0 : step.index;
|
|
60
67
|
const lastStepIndex = steps.length + 1;
|
|
61
|
-
if (stepIndex > 0 && stepIndex < lastStepIndex && !step.isHidden) {
|
|
68
|
+
if (stepIndex > 0 && stepIndex < lastStepIndex && !step.isDisabled && !step.isHidden) {
|
|
62
69
|
setActiveStepIndex(stepIndex);
|
|
63
70
|
}
|
|
64
71
|
};
|
|
65
72
|
return (React.createElement(WizardContextProvider, { steps: initialSteps, activeStepIndex: activeStepIndex, footer: footer, onNext: goToNextStep, onBack: goToPrevStep, onClose: onClose, goToStepById: goToStepById, goToStepByName: goToStepByName, goToStepByIndex: goToStepByIndex },
|
|
66
73
|
React.createElement("div", Object.assign({ className: css(styles.wizard, className), style: Object.assign(Object.assign({}, (height ? { height } : {})), (width ? { width } : {})) }, wrapperProps),
|
|
67
74
|
header,
|
|
68
|
-
React.createElement(WizardInternal, { nav: nav,
|
|
75
|
+
React.createElement(WizardInternal, { nav: nav, isVisitRequired: isVisitRequired, isProgressive: isProgressive }))));
|
|
69
76
|
};
|
|
70
|
-
const WizardInternal = ({ nav,
|
|
77
|
+
const WizardInternal = ({ nav, isVisitRequired, isProgressive }) => {
|
|
71
78
|
const { activeStep, steps, footer, goToStepByIndex } = useWizardContext();
|
|
72
79
|
const [isNavExpanded, setIsNavExpanded] = React.useState(false);
|
|
73
80
|
const wizardNav = React.useMemo(() => {
|
|
74
81
|
if (isCustomWizardNav(nav)) {
|
|
75
82
|
return typeof nav === 'function' ? nav(isNavExpanded, steps, activeStep, goToStepByIndex) : nav;
|
|
76
83
|
}
|
|
77
|
-
return React.createElement(WizardNavInternal, { nav: nav, isNavExpanded: isNavExpanded,
|
|
78
|
-
}, [activeStep,
|
|
84
|
+
return (React.createElement(WizardNavInternal, { nav: nav, isNavExpanded: isNavExpanded, isVisitRequired: isVisitRequired, isProgressive: isProgressive }));
|
|
85
|
+
}, [activeStep, isVisitRequired, isProgressive, goToStepByIndex, isNavExpanded, nav, steps]);
|
|
79
86
|
return (React.createElement(WizardToggle, { nav: wizardNav, footer: footer, steps: steps, activeStep: activeStep, isNavExpanded: isNavExpanded, toggleNavExpanded: () => setIsNavExpanded(prevIsExpanded => !prevIsExpanded) }));
|
|
80
87
|
};
|
|
81
88
|
Wizard.displayName = 'Wizard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/Wizard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/Wizard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,MAAM,MAAM,uDAAuD,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAElB,iBAAiB,EAGjB,qBAAqB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MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WizardStepType, WizardFooterType } from './types';
|
|
3
3
|
import { WizardFooterProps } from './WizardFooter';
|
|
4
4
|
export interface WizardContextProps {
|
|
5
5
|
/** List of steps */
|
|
6
|
-
steps:
|
|
6
|
+
steps: WizardStepType[];
|
|
7
7
|
/** Current step */
|
|
8
|
-
activeStep:
|
|
8
|
+
activeStep: WizardStepType;
|
|
9
9
|
/** Footer element */
|
|
10
10
|
footer: React.ReactElement;
|
|
11
|
+
/** Close the wizard */
|
|
12
|
+
close: () => void;
|
|
11
13
|
/** Navigate to the next step */
|
|
12
|
-
|
|
14
|
+
goToNextStep: () => void | Promise<void>;
|
|
13
15
|
/** Navigate to the previous step */
|
|
14
|
-
|
|
15
|
-
/** Close the wizard */
|
|
16
|
-
onClose: () => void;
|
|
16
|
+
goToPrevStep: () => void | Promise<void>;
|
|
17
17
|
/** Navigate to step by ID */
|
|
18
18
|
goToStepById: (id: number | string) => void;
|
|
19
19
|
/** Navigate to step by name */
|
|
@@ -23,22 +23,22 @@ export interface WizardContextProps {
|
|
|
23
23
|
/** Update the footer with any react element */
|
|
24
24
|
setFooter: (footer: React.ReactElement | Partial<WizardFooterProps>) => void;
|
|
25
25
|
/** Get step by ID */
|
|
26
|
-
getStep: (stepId: number | string) =>
|
|
26
|
+
getStep: (stepId: number | string) => WizardStepType;
|
|
27
27
|
/** Set step by ID */
|
|
28
|
-
setStep: (step: Pick<
|
|
28
|
+
setStep: (step: Pick<WizardStepType, 'id'> & Partial<WizardStepType>) => void;
|
|
29
29
|
}
|
|
30
30
|
export declare const WizardContext: React.Context<WizardContextProps>;
|
|
31
31
|
export interface WizardContextProviderProps {
|
|
32
|
-
steps:
|
|
32
|
+
steps: WizardStepType[];
|
|
33
33
|
activeStepIndex: number;
|
|
34
34
|
footer: WizardFooterType;
|
|
35
35
|
children: React.ReactElement;
|
|
36
|
-
onNext(steps:
|
|
37
|
-
onBack(steps:
|
|
38
|
-
onClose(): void;
|
|
39
|
-
goToStepById(steps:
|
|
40
|
-
goToStepByName(steps:
|
|
41
|
-
goToStepByIndex(steps:
|
|
36
|
+
onNext(event: React.MouseEvent<HTMLButtonElement>, steps: WizardStepType[]): void;
|
|
37
|
+
onBack(event: React.MouseEvent<HTMLButtonElement>, steps: WizardStepType[]): void;
|
|
38
|
+
onClose(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
39
|
+
goToStepById(steps: WizardStepType[], id: number | string): void;
|
|
40
|
+
goToStepByName(steps: WizardStepType[], name: string): void;
|
|
41
|
+
goToStepByIndex(event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLAnchorElement>, steps: WizardStepType[], index: number): void;
|
|
42
42
|
}
|
|
43
43
|
export declare const WizardContextProvider: React.FunctionComponent<WizardContextProviderProps>;
|
|
44
44
|
export declare const useWizardContext: () => WizardContextProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardContext.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"WizardContext.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAyC,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGlG,OAAO,EAAgB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,mBAAmB;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,qBAAqB;IACrB,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B,u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