@digigov/react-core 2.0.0-6c42d5eb → 2.0.0-6e3977bc
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/Base/compat/Input/CheckboxInput.native/index.js +33 -0
- package/Base/compat/Input/CheckboxInput.native/package.json +6 -0
- package/Base/compat/Input/CheckboxInput.native.d.ts +4 -0
- package/Base/compat/Input/CheckboxInput.native.js.map +7 -0
- package/Base/compat/Input/RadioInput.native/index.js +32 -0
- package/Base/compat/Input/RadioInput.native/package.json +6 -0
- package/Base/compat/Input/RadioInput.native.d.ts +4 -0
- package/Base/compat/Input/RadioInput.native.js.map +7 -0
- package/Base/compat/Input/StringInput.native/index.js +99 -0
- package/Base/compat/Input/StringInput.native/package.json +6 -0
- package/Base/compat/Input/StringInput.native.d.ts +7 -0
- package/Base/compat/Input/StringInput.native.js.map +7 -0
- package/Base/compat/Input/index.native/index.js +24 -0
- package/Base/compat/Input/index.native/package.json +6 -0
- package/Base/compat/Input/index.native.d.ts +7 -0
- package/Base/compat/Input/index.native.js.map +7 -0
- package/Base/compat/button.native/index.js +48 -0
- package/Base/compat/button.native/package.json +6 -0
- package/Base/compat/button.native.d.ts +5 -0
- package/Base/compat/button.native.js.map +7 -0
- package/Base/compat/details.native/index.js +40 -0
- package/Base/compat/details.native/package.json +6 -0
- package/Base/compat/details.native.d.ts +8 -0
- package/Base/compat/details.native.js.map +7 -0
- package/Base/compat/li.native/index.js +9 -0
- package/Base/compat/li.native/package.json +6 -0
- package/Base/compat/li.native.d.ts +6 -0
- package/Base/compat/li.native.js.map +7 -0
- package/Base/compat/ol.native/index.js +33 -0
- package/Base/compat/ol.native/package.json +6 -0
- package/Base/compat/ol.native.d.ts +6 -0
- package/Base/compat/ol.native.js.map +7 -0
- package/Base/index.d.ts +2 -95
- package/Base/index.js +3 -98
- package/Base/index.js.map +3 -3
- package/Base/index.native/index.js +160 -0
- package/Base/index.native/package.json +6 -0
- package/Base/index.native.d.ts +7 -0
- package/Base/index.native.js.map +7 -0
- package/Base/index.web/index.js +104 -0
- package/Base/index.web/package.json +6 -0
- package/Base/index.web.d.ts +97 -0
- package/Base/index.web.js.map +7 -0
- package/Base/mapping.native/index.js +34 -0
- package/Base/mapping.native/package.json +6 -0
- package/Base/mapping.native.d.ts +6 -0
- package/Base/mapping.native.js.map +7 -0
- package/Base/utils/index.js +86 -0
- package/Base/utils/package.json +6 -0
- package/Base/utils.d.ts +41 -0
- package/Base/utils.js.map +7 -0
- package/Base/wrap.native/index.js +64 -0
- package/Base/wrap.native/package.json +6 -0
- package/Base/wrap.native.d.ts +2 -0
- package/Base/wrap.native.js.map +7 -0
- package/CallToAction/index.js +1 -1
- package/CallToAction/index.js.map +2 -2
- package/Card/index.js +2 -1
- package/Card/index.js.map +2 -2
- package/CheckboxItem/index.js +4 -16
- package/CheckboxItem/index.js.map +2 -2
- package/CheckboxItemInput/index.d.ts +2 -0
- package/CheckboxItemInput/index.js +6 -0
- package/CheckboxItemInput/index.js.map +7 -0
- package/CheckboxItemInput/index.native/index.js +20 -0
- package/CheckboxItemInput/index.native/package.json +6 -0
- package/CheckboxItemInput/index.native.d.ts +4 -0
- package/CheckboxItemInput/index.native.js.map +7 -0
- package/CheckboxItemInput/index.web/index.js +26 -0
- package/CheckboxItemInput/index.web/package.json +6 -0
- package/CheckboxItemInput/index.web.d.ts +10 -0
- package/CheckboxItemInput/index.web.js.map +7 -0
- package/CheckboxItemInput/package.json +6 -0
- package/Chip/index.js +2 -1
- package/Chip/index.js.map +2 -2
- package/CodeBlockContainer/index.d.ts +1 -1
- package/CodeBlockContainer/index.js.map +1 -1
- package/CodeBlockContent/index.d.ts +1 -1
- package/CodeBlockContent/index.js +2 -1
- package/CodeBlockContent/index.js.map +2 -2
- package/CodeBlockHeader/index.d.ts +1 -1
- package/CodeBlockHeader/index.js +1 -3
- package/CodeBlockHeader/index.js.map +2 -2
- package/CopyToClipboardContainer/index.d.ts +2 -31
- package/CopyToClipboardContainer/index.js +3 -40
- package/CopyToClipboardContainer/index.js.map +3 -3
- package/CopyToClipboardContainer/index.web/index.js +44 -0
- package/CopyToClipboardContainer/index.web/package.json +6 -0
- package/CopyToClipboardContainer/index.web.d.ts +31 -0
- package/CopyToClipboardContainer/index.web.js.map +7 -0
- package/CopyToClipboardMessage/index.d.ts +2 -18
- package/CopyToClipboardMessage/index.js +3 -21
- package/CopyToClipboardMessage/index.js.map +3 -3
- package/CopyToClipboardMessage/index.native/index.js +18 -0
- package/CopyToClipboardMessage/index.native/package.json +6 -0
- package/CopyToClipboardMessage/index.native.d.ts +6 -0
- package/CopyToClipboardMessage/index.native.js.map +7 -0
- package/CopyToClipboardMessage/index.web/index.js +24 -0
- package/CopyToClipboardMessage/index.web/package.json +6 -0
- package/CopyToClipboardMessage/index.web.d.ts +18 -0
- package/CopyToClipboardMessage/index.web.js.map +7 -0
- package/DateInputItem/index.d.ts +2 -26
- package/DateInputItem/index.js +3 -41
- package/DateInputItem/index.js.map +3 -3
- package/DateInputItem/index.native/index.js +17 -0
- package/DateInputItem/index.native/package.json +6 -0
- package/DateInputItem/index.native.d.ts +4 -0
- package/DateInputItem/index.native.js.map +7 -0
- package/DateInputItem/index.web/index.js +32 -0
- package/DateInputItem/index.web/package.json +6 -0
- package/DateInputItem/index.web.d.ts +26 -0
- package/DateInputItem/index.web.js.map +7 -0
- package/Details/index.d.ts +2 -10
- package/Details/index.js +3 -22
- package/Details/index.js.map +3 -3
- package/Details/index.native/index.js +17 -0
- package/Details/index.native/package.json +6 -0
- package/Details/index.native.d.ts +4 -0
- package/Details/index.native.js.map +7 -0
- package/Details/index.web/index.js +25 -0
- package/Details/index.web/package.json +6 -0
- package/Details/index.web.d.ts +10 -0
- package/Details/index.web.js.map +7 -0
- package/FieldsetLegend/index.js +1 -4
- package/FieldsetLegend/index.js.map +2 -2
- package/LabelTitle/index.js +2 -4
- package/LabelTitle/index.js.map +2 -2
- package/NavListItemActionContainer/index.d.ts +2 -10
- package/NavListItemActionContainer/index.js +3 -20
- package/NavListItemActionContainer/index.js.map +3 -3
- package/NavListItemActionContainer/index.native/index.js +17 -0
- package/NavListItemActionContainer/index.native/package.json +6 -0
- package/NavListItemActionContainer/index.native.d.ts +7 -0
- package/NavListItemActionContainer/index.native.js.map +7 -0
- package/NavListItemActionContainer/index.web/index.js +23 -0
- package/NavListItemActionContainer/index.web/package.json +6 -0
- package/NavListItemActionContainer/index.web.d.ts +10 -0
- package/NavListItemActionContainer/index.web.js.map +7 -0
- package/NotificationBannerLink/index.d.ts +2 -11
- package/NotificationBannerLink/index.js +3 -19
- package/NotificationBannerLink/index.js.map +3 -3
- package/NotificationBannerLink/index.native/index.js +16 -0
- package/NotificationBannerLink/index.native/package.json +6 -0
- package/NotificationBannerLink/index.native.d.ts +8 -0
- package/NotificationBannerLink/index.native.js.map +7 -0
- package/NotificationBannerLink/index.web/index.js +22 -0
- package/NotificationBannerLink/index.web/package.json +6 -0
- package/NotificationBannerLink/index.web.d.ts +11 -0
- package/NotificationBannerLink/index.web.js.map +7 -0
- package/PhaseBanner/index.js +2 -1
- package/PhaseBanner/index.js.map +2 -2
- package/PhaseBannerTag/index.d.ts +2 -2
- package/PhaseBannerTag/index.js +1 -1
- package/PhaseBannerTag/index.js.map +1 -1
- package/PhaseBannerText/index.js +1 -1
- package/PhaseBannerText/index.js.map +2 -2
- package/RadioItem/index.js +2 -1
- package/RadioItem/index.js.map +2 -2
- package/SummaryList/index.d.ts +1 -1
- package/SummaryList/index.js.map +2 -2
- package/SummaryListItemKey/index.d.ts +14 -0
- package/SummaryListItemKey/index.js +5 -2
- package/SummaryListItemKey/index.js.map +2 -2
- package/TextArea/index.d.ts +2 -24
- package/TextArea/index.js +3 -27
- package/TextArea/index.js.map +3 -3
- package/TextArea/index.native/index.js +16 -0
- package/TextArea/index.native/package.json +6 -0
- package/TextArea/index.native.d.ts +4 -0
- package/TextArea/index.native.js.map +7 -0
- package/TextArea/index.web/index.js +30 -0
- package/TextArea/index.web/package.json +6 -0
- package/TextArea/index.web.d.ts +24 -0
- package/TextArea/index.web.js.map +7 -0
- package/TextInput/index.d.ts +2 -46
- package/TextInput/index.js +3 -40
- package/TextInput/index.js.map +3 -3
- package/TextInput/index.native/index.js +19 -0
- package/TextInput/index.native/package.json +6 -0
- package/TextInput/index.native.d.ts +4 -0
- package/TextInput/index.native.js.map +7 -0
- package/TextInput/index.web/index.js +43 -0
- package/TextInput/index.web/package.json +6 -0
- package/TextInput/index.web.d.ts +46 -0
- package/TextInput/index.web.js.map +7 -0
- package/Unpurge/index.js +35 -0
- package/Unpurge/index.js.map +2 -2
- package/WarningText/index.js +7 -12
- package/WarningText/index.js.map +2 -2
- package/WarningTextAssistive/index.d.ts +15 -0
- package/WarningTextAssistive/index.js +23 -0
- package/WarningTextAssistive/index.js.map +7 -0
- package/WarningTextAssistive/package.json +6 -0
- package/cjs/Base/compat/Input/CheckboxInput.native/index.js +66 -0
- package/cjs/Base/compat/Input/CheckboxInput.native.js.map +7 -0
- package/cjs/Base/compat/Input/RadioInput.native/index.js +65 -0
- package/cjs/Base/compat/Input/RadioInput.native.js.map +7 -0
- package/cjs/Base/compat/Input/StringInput.native/index.js +129 -0
- package/cjs/Base/compat/Input/StringInput.native.js.map +7 -0
- package/cjs/Base/compat/Input/index.native/index.js +55 -0
- package/cjs/Base/compat/Input/index.native.js.map +7 -0
- package/cjs/Base/compat/button.native/index.js +81 -0
- package/cjs/Base/compat/button.native.js.map +7 -0
- package/cjs/Base/compat/details.native/index.js +65 -0
- package/cjs/Base/compat/details.native.js.map +7 -0
- package/cjs/Base/compat/li.native/index.js +42 -0
- package/cjs/Base/compat/li.native.js.map +7 -0
- package/cjs/Base/compat/ol.native/index.js +66 -0
- package/cjs/Base/compat/ol.native.js.map +7 -0
- package/cjs/Base/index.js +5 -99
- package/cjs/Base/index.js.map +3 -3
- package/cjs/Base/index.native/index.js +193 -0
- package/cjs/Base/index.native.js.map +7 -0
- package/cjs/Base/index.web/index.js +137 -0
- package/cjs/Base/index.web.js.map +7 -0
- package/cjs/Base/mapping.native/index.js +67 -0
- package/cjs/Base/mapping.native.js.map +7 -0
- package/cjs/Base/utils/index.js +119 -0
- package/cjs/Base/utils.js.map +7 -0
- package/cjs/Base/wrap.native/index.js +97 -0
- package/cjs/Base/wrap.native.js.map +7 -0
- package/cjs/CallToAction/index.js +1 -1
- package/cjs/CallToAction/index.js.map +2 -2
- package/cjs/Card/index.js +2 -1
- package/cjs/Card/index.js.map +2 -2
- package/cjs/CheckboxItem/index.js +4 -16
- package/cjs/CheckboxItem/index.js.map +3 -3
- package/cjs/CheckboxItemInput/index.js +40 -0
- package/cjs/CheckboxItemInput/index.js.map +7 -0
- package/cjs/CheckboxItemInput/index.native/index.js +53 -0
- package/cjs/CheckboxItemInput/index.native.js.map +7 -0
- package/cjs/CheckboxItemInput/index.web/index.js +59 -0
- package/cjs/CheckboxItemInput/index.web.js.map +7 -0
- package/cjs/Chip/index.js +2 -1
- package/cjs/Chip/index.js.map +2 -2
- package/cjs/CodeBlockContainer/index.js.map +1 -1
- package/cjs/CodeBlockContent/index.js +2 -1
- package/cjs/CodeBlockContent/index.js.map +2 -2
- package/cjs/CodeBlockHeader/index.js +1 -3
- package/cjs/CodeBlockHeader/index.js.map +2 -2
- package/cjs/CopyToClipboardContainer/index.js +5 -41
- package/cjs/CopyToClipboardContainer/index.js.map +3 -3
- package/cjs/CopyToClipboardContainer/index.web/index.js +77 -0
- package/cjs/CopyToClipboardContainer/index.web.js.map +7 -0
- package/cjs/CopyToClipboardMessage/index.js +5 -22
- package/cjs/CopyToClipboardMessage/index.js.map +3 -3
- package/cjs/CopyToClipboardMessage/index.native/index.js +51 -0
- package/cjs/CopyToClipboardMessage/index.native.js.map +7 -0
- package/cjs/CopyToClipboardMessage/index.web/index.js +57 -0
- package/cjs/CopyToClipboardMessage/index.web.js.map +7 -0
- package/cjs/DateInputItem/index.js +5 -42
- package/cjs/DateInputItem/index.js.map +3 -3
- package/cjs/DateInputItem/index.native/index.js +50 -0
- package/cjs/DateInputItem/index.native.js.map +7 -0
- package/cjs/DateInputItem/index.web/index.js +65 -0
- package/cjs/DateInputItem/index.web.js.map +7 -0
- package/cjs/Details/index.js +5 -23
- package/cjs/Details/index.js.map +3 -3
- package/cjs/Details/index.native/index.js +50 -0
- package/cjs/Details/index.native.js.map +7 -0
- package/cjs/Details/index.web/index.js +58 -0
- package/cjs/Details/index.web.js.map +7 -0
- package/cjs/FieldsetLegend/index.js +1 -4
- package/cjs/FieldsetLegend/index.js.map +2 -2
- package/cjs/LabelTitle/index.js +2 -4
- package/cjs/LabelTitle/index.js.map +2 -2
- package/cjs/NavListItemActionContainer/index.js +5 -21
- package/cjs/NavListItemActionContainer/index.js.map +3 -3
- package/cjs/NavListItemActionContainer/index.native/index.js +50 -0
- package/cjs/NavListItemActionContainer/index.native.js.map +7 -0
- package/cjs/NavListItemActionContainer/index.web/index.js +56 -0
- package/cjs/NavListItemActionContainer/index.web.js.map +7 -0
- package/cjs/NotificationBannerLink/index.js +5 -20
- package/cjs/NotificationBannerLink/index.js.map +3 -3
- package/cjs/NotificationBannerLink/index.native/index.js +49 -0
- package/cjs/NotificationBannerLink/index.native.js.map +7 -0
- package/cjs/NotificationBannerLink/index.web/index.js +55 -0
- package/cjs/NotificationBannerLink/index.web.js.map +7 -0
- package/cjs/PhaseBanner/index.js +2 -1
- package/cjs/PhaseBanner/index.js.map +2 -2
- package/cjs/PhaseBannerTag/index.js +1 -1
- package/cjs/PhaseBannerTag/index.js.map +1 -1
- package/cjs/PhaseBannerText/index.js +1 -1
- package/cjs/PhaseBannerText/index.js.map +2 -2
- package/cjs/RadioItem/index.js +2 -1
- package/cjs/RadioItem/index.js.map +3 -3
- package/cjs/SummaryList/index.js.map +2 -2
- package/cjs/SummaryListItemKey/index.js +5 -2
- package/cjs/SummaryListItemKey/index.js.map +2 -2
- package/cjs/TextArea/index.js +5 -28
- package/cjs/TextArea/index.js.map +3 -3
- package/cjs/TextArea/index.native/index.js +49 -0
- package/cjs/TextArea/index.native.js.map +7 -0
- package/cjs/TextArea/index.web/index.js +63 -0
- package/cjs/TextArea/index.web.js.map +7 -0
- package/cjs/TextInput/index.js +5 -41
- package/cjs/TextInput/index.js.map +3 -3
- package/cjs/TextInput/index.native/index.js +52 -0
- package/cjs/TextInput/index.native.js.map +7 -0
- package/cjs/TextInput/index.web/index.js +76 -0
- package/cjs/TextInput/index.web.js.map +7 -0
- package/cjs/Unpurge/index.js +35 -0
- package/cjs/Unpurge/index.js.map +2 -2
- package/cjs/WarningText/index.js +7 -12
- package/cjs/WarningText/index.js.map +2 -2
- package/cjs/WarningTextAssistive/index.js +56 -0
- package/cjs/WarningTextAssistive/index.js.map +7 -0
- package/cjs/index.js +5 -1
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +12 -10
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +27 -1
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/extend.native/index.js +47 -0
- package/cjs/utils/extend.native.js.map +7 -0
- package/index.d.ts +2 -0
- package/index.js +3 -1
- package/index.js.map +2 -2
- package/lazy/index.js +12 -10
- package/lazy.d.ts +219 -217
- package/lazy.js.map +2 -2
- package/package.json +21 -4
- package/registry/index.js +27 -1
- package/registry.d.ts +13 -0
- package/registry.js.map +2 -2
- package/src/Base/compat/Input/CheckboxInput.native.tsx +40 -0
- package/src/Base/compat/Input/RadioInput.native.tsx +39 -0
- package/src/Base/compat/Input/StringInput.native.tsx +115 -0
- package/src/Base/compat/Input/index.native.tsx +28 -0
- package/src/Base/compat/button.native.tsx +53 -0
- package/src/Base/compat/details.native.tsx +68 -0
- package/src/Base/compat/li.native.tsx +11 -0
- package/src/Base/compat/ol.native.tsx +41 -0
- package/src/Base/index.native.tsx +185 -0
- package/src/Base/index.tsx +2 -257
- package/src/Base/index.web.tsx +259 -0
- package/src/Base/mapping.native.tsx +41 -0
- package/src/Base/utils.ts +84 -0
- package/src/Base/wrap.native.tsx +94 -0
- package/src/CallToAction/index.tsx +2 -2
- package/src/Card/index.tsx +3 -2
- package/src/CheckboxItem/index.tsx +4 -14
- package/src/CheckboxItemInput/index.native.tsx +17 -0
- package/src/CheckboxItemInput/index.tsx +2 -0
- package/src/CheckboxItemInput/index.web.tsx +34 -0
- package/src/Chip/index.tsx +2 -2
- package/src/CodeBlockContainer/index.tsx +1 -1
- package/src/CodeBlockContent/index.tsx +4 -3
- package/src/CodeBlockHeader/index.tsx +2 -4
- package/src/CopyToClipboardContainer/index.tsx +2 -74
- package/src/CopyToClipboardContainer/index.web.tsx +75 -0
- package/src/CopyToClipboardMessage/index.native.tsx +21 -0
- package/src/CopyToClipboardMessage/index.tsx +2 -41
- package/src/CopyToClipboardMessage/index.web.tsx +41 -0
- package/src/DateInputItem/index.native.tsx +12 -0
- package/src/DateInputItem/index.tsx +2 -64
- package/src/DateInputItem/index.web.tsx +53 -0
- package/src/Details/index.native.tsx +14 -0
- package/src/Details/index.tsx +2 -27
- package/src/Details/index.web.tsx +27 -0
- package/src/FieldsetLegend/index.tsx +1 -4
- package/src/LabelTitle/index.tsx +2 -4
- package/src/NavListItemActionContainer/index.native.tsx +18 -0
- package/src/NavListItemActionContainer/index.tsx +2 -28
- package/src/NavListItemActionContainer/index.web.tsx +28 -0
- package/src/NotificationBannerLink/index.native.tsx +22 -0
- package/src/NotificationBannerLink/index.tsx +2 -28
- package/src/NotificationBannerLink/index.web.tsx +28 -0
- package/src/PhaseBanner/index.tsx +2 -2
- package/src/PhaseBannerTag/index.tsx +3 -3
- package/src/PhaseBannerText/__snapshots__/index.test.tsx.snap +1 -1
- package/src/PhaseBannerText/index.tsx +1 -1
- package/src/RadioItem/index.tsx +2 -2
- package/src/SummaryList/index.tsx +7 -5
- package/src/SummaryListItemKey/index.tsx +24 -2
- package/src/TextArea/index.native.tsx +11 -0
- package/src/TextArea/index.tsx +2 -50
- package/src/TextArea/index.web.tsx +50 -0
- package/src/TextInput/index.native.tsx +15 -0
- package/src/TextInput/index.tsx +2 -87
- package/src/TextInput/index.web.tsx +87 -0
- package/src/Unpurge/index.tsx +35 -0
- package/src/WarningText/index.tsx +12 -15
- package/src/WarningTextAssistive/index.tsx +37 -0
- package/src/index.ts +2 -0
- package/src/lazy.js +12 -10
- package/src/registry.js +28 -2
- package/src/utils/extend.native.tsx +36 -0
- package/utils/extend.native/index.js +14 -0
- package/utils/extend.native/package.json +6 -0
- package/utils/extend.native.d.ts +23 -0
- package/utils/extend.native.js.map +7 -0
|
@@ -1,74 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface CopyToClipboardContainerProps extends BaseProps<'div'> {
|
|
6
|
-
/**
|
|
7
|
-
* @value 'tooltip' is used when you want to show the message inside a tooltip.
|
|
8
|
-
* @value 'banner' is used when you want to show the message inside a banner.
|
|
9
|
-
* @default 'tooltip'
|
|
10
|
-
*/
|
|
11
|
-
variant?: 'tooltip' | 'banner';
|
|
12
|
-
/**
|
|
13
|
-
* tooltipAlign is optional.
|
|
14
|
-
* tooltipAlign prop adds tooltip right or left and is used only if variant is tooltip.
|
|
15
|
-
* @value 'right'
|
|
16
|
-
* @value 'left'
|
|
17
|
-
* @default 'right'
|
|
18
|
-
*/
|
|
19
|
-
tooltipAlign?: 'right' | 'left';
|
|
20
|
-
/**
|
|
21
|
-
* dense is optional.
|
|
22
|
-
* affects only the density of the tooltip.
|
|
23
|
-
* @value true tooltip will be dense.
|
|
24
|
-
* @value false
|
|
25
|
-
* @default false
|
|
26
|
-
* */
|
|
27
|
-
dense?: boolean;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* CopyToClipboardContainer is a wrapper component for CopyToClipboardMessage
|
|
31
|
-
*/
|
|
32
|
-
export const CopyToClipboardContainer = React.forwardRef<
|
|
33
|
-
HTMLDivElement,
|
|
34
|
-
CopyToClipboardContainerProps
|
|
35
|
-
>(function CopyToClipboardContainer(
|
|
36
|
-
{
|
|
37
|
-
variant = 'tooltip',
|
|
38
|
-
tooltipAlign = 'right',
|
|
39
|
-
className,
|
|
40
|
-
dense,
|
|
41
|
-
children,
|
|
42
|
-
...props
|
|
43
|
-
},
|
|
44
|
-
ref
|
|
45
|
-
) {
|
|
46
|
-
return (
|
|
47
|
-
<Base
|
|
48
|
-
as="div"
|
|
49
|
-
ref={ref}
|
|
50
|
-
{...props}
|
|
51
|
-
className={clsx(className, {
|
|
52
|
-
'ds-copy-to-clipboard': true,
|
|
53
|
-
})}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
<div
|
|
57
|
-
className={clsx(className, {
|
|
58
|
-
'ds-copy-to-clipboard__tooltip': variant === 'tooltip',
|
|
59
|
-
'ds-copy-to-clipboard__tooltip--dense':
|
|
60
|
-
variant === 'tooltip' && dense,
|
|
61
|
-
'ds-copy-to-clipboard__tooltip--left':
|
|
62
|
-
variant === 'tooltip' && tooltipAlign === 'left',
|
|
63
|
-
'ds-copy-to-clipboard__tooltip--right':
|
|
64
|
-
variant === 'tooltip' && tooltipAlign === 'right',
|
|
65
|
-
'ds-copy-to-clipboard__banner': variant === 'banner',
|
|
66
|
-
})}
|
|
67
|
-
>
|
|
68
|
-
{children}
|
|
69
|
-
</div>
|
|
70
|
-
</Base>
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export default CopyToClipboardContainer;
|
|
1
|
+
export * from '@digigov/react-core/CopyToClipboardContainer/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/CopyToClipboardContainer/index.web';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface CopyToClipboardContainerProps extends BaseProps<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* @value 'tooltip' is used when you want to show the message inside a tooltip.
|
|
8
|
+
* @value 'banner' is used when you want to show the message inside a banner.
|
|
9
|
+
* @default 'tooltip'
|
|
10
|
+
*/
|
|
11
|
+
variant?: 'tooltip' | 'banner';
|
|
12
|
+
/**
|
|
13
|
+
* tooltipAlign is optional.
|
|
14
|
+
* tooltipAlign prop adds tooltip right or left and is used only if variant is tooltip.
|
|
15
|
+
* @value 'right'
|
|
16
|
+
* @value 'left'
|
|
17
|
+
* @default 'right'
|
|
18
|
+
*/
|
|
19
|
+
tooltipAlign?: 'right' | 'left';
|
|
20
|
+
/**
|
|
21
|
+
* dense is optional.
|
|
22
|
+
* affects only the density of the tooltip.
|
|
23
|
+
* @value true tooltip will be dense.
|
|
24
|
+
* @value false
|
|
25
|
+
* @default false
|
|
26
|
+
* */
|
|
27
|
+
dense?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* CopyToClipboardContainer is a wrapper component for CopyToClipboardMessage
|
|
31
|
+
*/
|
|
32
|
+
export const CopyToClipboardContainer = React.forwardRef<
|
|
33
|
+
HTMLDivElement,
|
|
34
|
+
CopyToClipboardContainerProps
|
|
35
|
+
>(function CopyToClipboardContainer(
|
|
36
|
+
{
|
|
37
|
+
variant = 'tooltip',
|
|
38
|
+
tooltipAlign = 'right',
|
|
39
|
+
className,
|
|
40
|
+
dense,
|
|
41
|
+
children,
|
|
42
|
+
...props
|
|
43
|
+
},
|
|
44
|
+
ref
|
|
45
|
+
) {
|
|
46
|
+
return (
|
|
47
|
+
<Base
|
|
48
|
+
as="div"
|
|
49
|
+
ref={ref}
|
|
50
|
+
{...props}
|
|
51
|
+
className={clsx(className, {
|
|
52
|
+
'ds-copy-to-clipboard': true,
|
|
53
|
+
})}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
<Base
|
|
57
|
+
as="div"
|
|
58
|
+
className={clsx(className, {
|
|
59
|
+
'ds-copy-to-clipboard__tooltip': variant === 'tooltip',
|
|
60
|
+
'ds-copy-to-clipboard__tooltip--dense':
|
|
61
|
+
variant === 'tooltip' && dense,
|
|
62
|
+
'ds-copy-to-clipboard__tooltip--left':
|
|
63
|
+
variant === 'tooltip' && tooltipAlign === 'left',
|
|
64
|
+
'ds-copy-to-clipboard__tooltip--right':
|
|
65
|
+
variant === 'tooltip' && tooltipAlign === 'right',
|
|
66
|
+
'ds-copy-to-clipboard__banner': variant === 'banner',
|
|
67
|
+
})}
|
|
68
|
+
>
|
|
69
|
+
{children}
|
|
70
|
+
</Base>
|
|
71
|
+
</Base>
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export default CopyToClipboardContainer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import CoreCopyToClipboardMessage, {
|
|
2
|
+
CopyToClipboardMessageProps,
|
|
3
|
+
} from '@digigov/react-core/CopyToClipboardMessage/index.web';
|
|
4
|
+
import { CopyToClipboardContainerProps } from '@digigov/react-core/CopyToClipboardContainer';
|
|
5
|
+
import { extend } from '@digigov/react-core/utils/extend.native';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const CopyToClipboardMessage = extend<
|
|
9
|
+
CopyToClipboardMessageProps,
|
|
10
|
+
CopyToClipboardContainerProps
|
|
11
|
+
>(CoreCopyToClipboardMessage, ({ dense, className, ...props }) => {
|
|
12
|
+
return {
|
|
13
|
+
className: clsx(className, {
|
|
14
|
+
'ds-copy-to-clipboard__before': true,
|
|
15
|
+
'ds-copy-to-clipboard__message--dense': dense,
|
|
16
|
+
}),
|
|
17
|
+
...props,
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export default CopyToClipboardMessage;
|
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface CopyToClipboardMessageProps extends BaseProps<'div'> {
|
|
6
|
-
/**
|
|
7
|
-
* enabled is a boolean prop passed from the CopyToClipboard component.
|
|
8
|
-
* When it's true it shows the CopyToClipboardMessage component and it activates the animation that hides the component after 3s.
|
|
9
|
-
* When it's false it resets the animations of the CopyToClipboardMessage.
|
|
10
|
-
* @value true
|
|
11
|
-
* @value false
|
|
12
|
-
*/
|
|
13
|
-
enabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* CopyToClipboardMessage is used to show a message that a text is being copied.
|
|
17
|
-
* This component is used inside the CopyToClipboard component that lies inside the digigov/ui library
|
|
18
|
-
*/
|
|
19
|
-
export const CopyToClipboardMessage = React.forwardRef<
|
|
20
|
-
HTMLDivElement,
|
|
21
|
-
CopyToClipboardMessageProps
|
|
22
|
-
>(function CopyToClipboardMessage(
|
|
23
|
-
{ enabled, className, children, ...props },
|
|
24
|
-
ref
|
|
25
|
-
) {
|
|
26
|
-
return (
|
|
27
|
-
<Base
|
|
28
|
-
as="div"
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={clsx(className, {
|
|
31
|
-
'ds-copy-to-clipboard__message': true,
|
|
32
|
-
'ds-copy-to-clipboard--hidden': !enabled,
|
|
33
|
-
})}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
</Base>
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export default CopyToClipboardMessage;
|
|
1
|
+
export * from '@digigov/react-core/CopyToClipboardMessage/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/CopyToClipboardMessage/index.web';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface CopyToClipboardMessageProps extends BaseProps<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* enabled is a boolean prop passed from the CopyToClipboard component.
|
|
8
|
+
* When it's true it shows the CopyToClipboardMessage component and it activates the animation that hides the component after 3s.
|
|
9
|
+
* When it's false it resets the animations of the CopyToClipboardMessage.
|
|
10
|
+
* @value true
|
|
11
|
+
* @value false
|
|
12
|
+
*/
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CopyToClipboardMessage is used to show a message that a text is being copied.
|
|
17
|
+
* This component is used inside the CopyToClipboard component that lies inside the digigov/ui library
|
|
18
|
+
*/
|
|
19
|
+
export const CopyToClipboardMessage = React.forwardRef<
|
|
20
|
+
HTMLDivElement,
|
|
21
|
+
CopyToClipboardMessageProps
|
|
22
|
+
>(function CopyToClipboardMessage(
|
|
23
|
+
{ enabled, className, children, ...props },
|
|
24
|
+
ref
|
|
25
|
+
) {
|
|
26
|
+
return (
|
|
27
|
+
<Base
|
|
28
|
+
as="div"
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={clsx(className, {
|
|
31
|
+
'ds-copy-to-clipboard__message': true,
|
|
32
|
+
'ds-copy-to-clipboard--hidden': !enabled,
|
|
33
|
+
})}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</Base>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export default CopyToClipboardMessage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import extend from '@digigov/react-core/utils/extend.native';
|
|
2
|
+
import CoreDateInputItem from '@digigov/react-core/DateInputItem/index.web';
|
|
3
|
+
export const DateInputItem = extend(
|
|
4
|
+
CoreDateInputItem,
|
|
5
|
+
({ className, ...props }) => {
|
|
6
|
+
return {
|
|
7
|
+
...props,
|
|
8
|
+
onChange: undefined,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
export default DateInputItem;
|
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface DateInputItemProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* Width property is optional.
|
|
8
|
-
* Use this property for year field to grow width.
|
|
9
|
-
* @value 2
|
|
10
|
-
* @value 4
|
|
11
|
-
* @default 2
|
|
12
|
-
*/
|
|
13
|
-
width?: 2 | 4;
|
|
14
|
-
/**
|
|
15
|
-
* error is optional. The default value is false.
|
|
16
|
-
* Use this prop when there is an error at the input.
|
|
17
|
-
* @value true
|
|
18
|
-
* @value false
|
|
19
|
-
*/
|
|
20
|
-
error?: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Details for the DateInputItem.
|
|
24
|
-
* DateInputItem component is used for displaying date.
|
|
25
|
-
* DateInputItem component must be included inside DateInput component as children component
|
|
26
|
-
*/
|
|
27
|
-
export const DateInputItem = React.forwardRef<
|
|
28
|
-
HTMLInputElement,
|
|
29
|
-
DateInputItemProps
|
|
30
|
-
>(function DateInputItem(
|
|
31
|
-
{ name, width = 2, error, className, children, ...props },
|
|
32
|
-
ref
|
|
33
|
-
) {
|
|
34
|
-
return (
|
|
35
|
-
<div
|
|
36
|
-
className={clsx(className, {
|
|
37
|
-
'ds-date-input__item': true,
|
|
38
|
-
})}
|
|
39
|
-
>
|
|
40
|
-
<label
|
|
41
|
-
className={clsx({
|
|
42
|
-
'ds-label': true,
|
|
43
|
-
})}
|
|
44
|
-
>
|
|
45
|
-
{children}
|
|
46
|
-
<Base
|
|
47
|
-
as="input"
|
|
48
|
-
ref={ref}
|
|
49
|
-
type="text"
|
|
50
|
-
name={name}
|
|
51
|
-
className={clsx({
|
|
52
|
-
'ds-input': true,
|
|
53
|
-
'ds-input--width-2-char': width === 2,
|
|
54
|
-
'ds-input--width-4-char': width === 4,
|
|
55
|
-
'ds-input--error': error,
|
|
56
|
-
})}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
</label>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export default DateInputItem;
|
|
1
|
+
export * from '@digigov/react-core/DateInputItem/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/DateInputItem/index.web';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import { TextInput } from '@digigov/react-core/TextInput';
|
|
5
|
+
|
|
6
|
+
export interface DateInputItemProps extends BaseProps<'input'> {
|
|
7
|
+
/**
|
|
8
|
+
* Width property is optional.
|
|
9
|
+
* Use this property for year field to grow width.
|
|
10
|
+
* @value 2
|
|
11
|
+
* @value 4
|
|
12
|
+
* @default 2
|
|
13
|
+
*/
|
|
14
|
+
width?: 2 | 4;
|
|
15
|
+
/**
|
|
16
|
+
* error is optional. The default value is false.
|
|
17
|
+
* Use this prop when there is an error at the input.
|
|
18
|
+
* @value true
|
|
19
|
+
* @value false
|
|
20
|
+
*/
|
|
21
|
+
error?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Details for the DateInputItem.
|
|
25
|
+
* DateInputItem component is used for displaying date.
|
|
26
|
+
* DateInputItem component must be included inside DateInput component as children component
|
|
27
|
+
*/
|
|
28
|
+
export const DateInputItem = React.forwardRef<
|
|
29
|
+
HTMLInputElement,
|
|
30
|
+
DateInputItemProps
|
|
31
|
+
>(function DateInputItem(
|
|
32
|
+
{ name, width = 2, error, className, children, ...props },
|
|
33
|
+
ref
|
|
34
|
+
) {
|
|
35
|
+
return (
|
|
36
|
+
<Base as='div'
|
|
37
|
+
className={clsx(className, {
|
|
38
|
+
'ds-date-input__item': true,
|
|
39
|
+
})}
|
|
40
|
+
>
|
|
41
|
+
<Base as='label'
|
|
42
|
+
className={clsx({
|
|
43
|
+
'ds-label': true,
|
|
44
|
+
})}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
<TextInput ref={ref} type="text" name={name} maxWidth={`${width}-char`} error={error} {...props} />
|
|
48
|
+
</Base>
|
|
49
|
+
</Base>
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export default DateInputItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import CoreDetails from '@digigov/react-core/Details/index.web';
|
|
2
|
+
import { extend } from '@digigov/react-core/utils/extend.native';
|
|
3
|
+
|
|
4
|
+
export const Details = extend(CoreDetails, ({ className, ...props }) => {
|
|
5
|
+
return {
|
|
6
|
+
className,
|
|
7
|
+
closeIcon: '▶',
|
|
8
|
+
openIcon: '▼',
|
|
9
|
+
placement: 'before',
|
|
10
|
+
...props,
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export default Details;
|
package/src/Details/index.tsx
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface DetailsProps extends BaseProps<'details'> { }
|
|
6
|
-
/**
|
|
7
|
-
* Details is used to make a page easier to scan when it contains information that only some users will need.
|
|
8
|
-
* Details component wraps DetailsSummary and DetailsContent as children components
|
|
9
|
-
*/
|
|
10
|
-
export const Details = React.forwardRef<HTMLDetailsElement, DetailsProps>(
|
|
11
|
-
function Details({ className, children, ...props }, ref) {
|
|
12
|
-
return (
|
|
13
|
-
<Base
|
|
14
|
-
as="details"
|
|
15
|
-
ref={ref}
|
|
16
|
-
className={clsx(className, {
|
|
17
|
-
'ds-details': true,
|
|
18
|
-
})}
|
|
19
|
-
{...props}
|
|
20
|
-
>
|
|
21
|
-
{children}
|
|
22
|
-
</Base>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default Details;
|
|
1
|
+
export * from "@digigov/react-core/Details/index.web";
|
|
2
|
+
export {default as default} from "@digigov/react-core/Details/index.web";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface DetailsProps extends BaseProps<'details'> { }
|
|
6
|
+
/**
|
|
7
|
+
* Details is used to make a page easier to scan when it contains information that only some users will need.
|
|
8
|
+
* Details component wraps DetailsSummary and DetailsContent as children components
|
|
9
|
+
*/
|
|
10
|
+
export const Details = React.forwardRef<HTMLDetailsElement, DetailsProps>(
|
|
11
|
+
function Details({ className, children, ...props }, ref) {
|
|
12
|
+
return (
|
|
13
|
+
<Base
|
|
14
|
+
as="details"
|
|
15
|
+
ref={ref}
|
|
16
|
+
className={clsx(className, {
|
|
17
|
+
'ds-details': true,
|
|
18
|
+
})}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</Base>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export default Details;
|
|
@@ -39,10 +39,7 @@ export const FieldsetLegend = React.forwardRef<
|
|
|
39
39
|
ref={ref}
|
|
40
40
|
className={clsx(className, {
|
|
41
41
|
'ds-fieldset__legend': true,
|
|
42
|
-
|
|
43
|
-
'ds-heading-lg': size === 'lg',
|
|
44
|
-
'ds-heading-md': size === 'md',
|
|
45
|
-
'ds-heading-sm': size === 'sm',
|
|
42
|
+
[`ds-fieldset__legend--${size}`]: size !== undefined,
|
|
46
43
|
})}
|
|
47
44
|
{...(heading && { role: 'heading', 'aria-level': 1 })}
|
|
48
45
|
{...props}
|
package/src/LabelTitle/index.tsx
CHANGED
|
@@ -34,10 +34,8 @@ export const LabelTitle = React.forwardRef<HTMLSpanElement, LabelFieldProps>(
|
|
|
34
34
|
as="span"
|
|
35
35
|
ref={ref}
|
|
36
36
|
className={clsx(className, {
|
|
37
|
-
'ds-
|
|
38
|
-
|
|
39
|
-
'ds-heading-md': size === 'md',
|
|
40
|
-
'ds-heading-sm': size === 'sm',
|
|
37
|
+
'ds-label__title': true,
|
|
38
|
+
[`ds-label__title--${size}`]: size !== undefined,
|
|
41
39
|
})}
|
|
42
40
|
{...(heading && { role: 'heading', 'aria-level': 1 })}
|
|
43
41
|
{...props}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import CoreNavListItemActionContainer, {
|
|
3
|
+
NavListItemActionContainerProps,
|
|
4
|
+
} from '@digigov/react-core/NavListItemActionContainer/index.web';
|
|
5
|
+
import extend from '@digigov/react-core/utils/extend.native';
|
|
6
|
+
|
|
7
|
+
export const NavListItemActionContainer = extend<
|
|
8
|
+
NavListItemActionContainerProps,
|
|
9
|
+
{ borderBottom?: boolean }
|
|
10
|
+
>(CoreNavListItemActionContainer, ({ className, borderBottom, ...props }) => {
|
|
11
|
+
return {
|
|
12
|
+
...props,
|
|
13
|
+
className: clsx(className, {
|
|
14
|
+
'ds-nav__list-item--border-bottom': borderBottom,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
export default NavListItemActionContainer;
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface NavListItemActionContainerProps extends BaseProps<'li'> { }
|
|
6
|
-
/**
|
|
7
|
-
* NavListItemActionContainer must be inside the NavList.
|
|
8
|
-
* This component has a items of NavListItemLink component inside.
|
|
9
|
-
*/
|
|
10
|
-
export const NavListItemActionContainer = React.forwardRef<
|
|
11
|
-
HTMLLIElement,
|
|
12
|
-
NavListItemActionContainerProps
|
|
13
|
-
>(function NavListItemActionContainer({ className, children, ...props }, ref) {
|
|
14
|
-
return (
|
|
15
|
-
<Base
|
|
16
|
-
as="li"
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={clsx(className, {
|
|
19
|
-
'ds-nav__list-item': true,
|
|
20
|
-
})}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Base>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default NavListItemActionContainer;
|
|
1
|
+
export * from '@digigov/react-core/NavListItemActionContainer/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/NavListItemActionContainer/index.web';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface NavListItemActionContainerProps extends BaseProps<'li'> { }
|
|
6
|
+
/**
|
|
7
|
+
* NavListItemActionContainer must be inside the NavList.
|
|
8
|
+
* This component has a items of NavListItemLink component inside.
|
|
9
|
+
*/
|
|
10
|
+
export const NavListItemActionContainer = React.forwardRef<
|
|
11
|
+
HTMLLIElement,
|
|
12
|
+
NavListItemActionContainerProps
|
|
13
|
+
>(function NavListItemActionContainer({ className, children, ...props }, ref) {
|
|
14
|
+
return (
|
|
15
|
+
<Base
|
|
16
|
+
as="li"
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={clsx(className, {
|
|
19
|
+
'ds-nav__list-item': true,
|
|
20
|
+
})}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</Base>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default NavListItemActionContainer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import CoreNotificationBannerLink, {
|
|
2
|
+
NotificationBannerLinkProps,
|
|
3
|
+
} from '@digigov/react-core/NotificationBannerLink/index.web';
|
|
4
|
+
import { extend } from '@digigov/react-core/utils/extend.native';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
interface AdditionalProps {
|
|
8
|
+
variant?: 'error' | 'success';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const NotificationBannerLink = extend<
|
|
12
|
+
NotificationBannerLinkProps,
|
|
13
|
+
AdditionalProps
|
|
14
|
+
>(CoreNotificationBannerLink, ({ variant, className, ...props }) => ({
|
|
15
|
+
className: clsx(className, {
|
|
16
|
+
'ds-notification-banner__link--error': variant === 'error',
|
|
17
|
+
'ds-notification-banner__link--success': variant === 'success',
|
|
18
|
+
}),
|
|
19
|
+
...props,
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
export default NotificationBannerLink;
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import LinkBase, { LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
|
-
|
|
5
|
-
export interface NotificationBannerLinkProps extends LinkBaseProps { }
|
|
6
|
-
/**
|
|
7
|
-
* Details for the NotificationBannerLink.
|
|
8
|
-
* NotificationBannerLink allow users to click their way from page to page.
|
|
9
|
-
* NotificationBannerLink must be wrapped inside NotificationContent component as children
|
|
10
|
-
*/
|
|
11
|
-
export const NotificationBannerLink = React.forwardRef<
|
|
12
|
-
HTMLAnchorElement,
|
|
13
|
-
NotificationBannerLinkProps
|
|
14
|
-
>(function NotificationBannerLink({ className, children, ...props }, ref) {
|
|
15
|
-
return (
|
|
16
|
-
<LinkBase
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={clsx(className, {
|
|
19
|
-
'ds-notification-banner__link': true,
|
|
20
|
-
})}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</LinkBase>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default NotificationBannerLink;
|
|
1
|
+
export * from '@digigov/react-core/NotificationBannerLink/index.web';
|
|
2
|
+
export {default as default} from '@digigov/react-core/NotificationBannerLink/index.web';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import LinkBase, { LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
|
+
|
|
5
|
+
export interface NotificationBannerLinkProps extends LinkBaseProps { }
|
|
6
|
+
/**
|
|
7
|
+
* Details for the NotificationBannerLink.
|
|
8
|
+
* NotificationBannerLink allow users to click their way from page to page.
|
|
9
|
+
* NotificationBannerLink must be wrapped inside NotificationContent component as children
|
|
10
|
+
*/
|
|
11
|
+
export const NotificationBannerLink = React.forwardRef<
|
|
12
|
+
HTMLAnchorElement,
|
|
13
|
+
NotificationBannerLinkProps
|
|
14
|
+
>(function NotificationBannerLink({ className, children, ...props }, ref) {
|
|
15
|
+
return (
|
|
16
|
+
<LinkBase
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={clsx(className, {
|
|
19
|
+
'ds-notification-banner__link': true,
|
|
20
|
+
})}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</LinkBase>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default NotificationBannerLink;
|
|
@@ -31,13 +31,13 @@ export const PhaseBanner = React.forwardRef<HTMLDivElement, PhaseBannerProps>(
|
|
|
31
31
|
})}
|
|
32
32
|
{...props}
|
|
33
33
|
>
|
|
34
|
-
<p
|
|
34
|
+
<Base as="p"
|
|
35
35
|
className={clsx({
|
|
36
36
|
'ds-phase-banner__content': true,
|
|
37
37
|
})}
|
|
38
38
|
>
|
|
39
39
|
{children}
|
|
40
|
-
</
|
|
40
|
+
</Base>
|
|
41
41
|
</Base>
|
|
42
42
|
);
|
|
43
43
|
}
|