@digigov/react-core 2.0.0-d57821ba → 2.0.0-daaf7bdf
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 -9
- package/CodeBlockContainer/index.js +2 -3
- package/CodeBlockContainer/index.js.map +2 -2
- package/CodeBlockContent/index.d.ts +1 -1
- package/CodeBlockContent/index.js +3 -2
- 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 +78 -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 +2 -3
- package/cjs/CodeBlockContainer/index.js.map +2 -2
- package/cjs/CodeBlockContent/index.js +3 -2
- 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 +78 -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 +3 -16
- package/src/CodeBlockContent/index.tsx +5 -4
- 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 +78 -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
|
@@ -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
|
}
|
|
@@ -2,17 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface PhaseBannerTagProps extends BaseProps<'
|
|
5
|
+
export interface PhaseBannerTagProps extends BaseProps<'span'> { }
|
|
6
6
|
/**
|
|
7
7
|
* PhaseBannerTag is used inside the PhaseBanner component and it requires a text of the phase of the service (ex. Alpha, Beta).
|
|
8
8
|
*/
|
|
9
9
|
export const PhaseBannerTag = React.forwardRef<
|
|
10
|
-
|
|
10
|
+
HTMLSpanElement,
|
|
11
11
|
PhaseBannerTagProps
|
|
12
12
|
>(function PhaseBannerTag({ className, children, ...props }, ref) {
|
|
13
13
|
return (
|
|
14
14
|
<Base
|
|
15
|
-
as="
|
|
15
|
+
as="span"
|
|
16
16
|
ref={ref}
|
|
17
17
|
className={clsx(className, {
|
|
18
18
|
'ds-phase-banner__tag': true,
|
package/src/RadioItem/index.tsx
CHANGED
|
@@ -32,7 +32,7 @@ export const RadioItem = React.forwardRef<HTMLInputElement, RadioItemProps>(
|
|
|
32
32
|
return (
|
|
33
33
|
<>
|
|
34
34
|
{dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}
|
|
35
|
-
<div
|
|
35
|
+
<Base as='div'
|
|
36
36
|
className={clsx(className, {
|
|
37
37
|
'ds-radios__item': true,
|
|
38
38
|
})}
|
|
@@ -57,7 +57,7 @@ export const RadioItem = React.forwardRef<HTMLInputElement, RadioItemProps>(
|
|
|
57
57
|
{...props}
|
|
58
58
|
/>
|
|
59
59
|
</LabelContainer>
|
|
60
|
-
</
|
|
60
|
+
</Base>
|
|
61
61
|
</>
|
|
62
62
|
);
|
|
63
63
|
}
|
|
@@ -20,15 +20,17 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
20
20
|
* @value false
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
|
-
noLastBorder?: boolean
|
|
24
|
-
|
|
23
|
+
noLastBorder?: boolean;
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
|
-
* SummaryList used as a table with summary
|
|
26
|
+
* SummaryList used as a table with summary information.
|
|
28
27
|
* It must contain a list of SummaryListItem components.
|
|
29
28
|
*/
|
|
30
29
|
export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
31
|
-
function SummaryList(
|
|
30
|
+
function SummaryList(
|
|
31
|
+
{ className, noLastBorder = false, border = true, children, ...props },
|
|
32
|
+
ref
|
|
33
|
+
) {
|
|
32
34
|
return (
|
|
33
35
|
<Base
|
|
34
36
|
as="dl"
|
|
@@ -36,7 +38,7 @@ export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
|
36
38
|
className={clsx(className, {
|
|
37
39
|
'ds-summary-list': true,
|
|
38
40
|
'ds-summary-list--no-border': !border,
|
|
39
|
-
'ds-summary-list--no-last-border': noLastBorder
|
|
41
|
+
'ds-summary-list--no-last-border': noLastBorder,
|
|
40
42
|
})}
|
|
41
43
|
{...props}
|
|
42
44
|
>
|
|
@@ -2,7 +2,23 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
|
|
5
|
+
export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
|
|
6
|
+
/**
|
|
7
|
+
* sm shows the width of the key column for small screens.
|
|
8
|
+
* @default 3
|
|
9
|
+
*/
|
|
10
|
+
sm?: WidthValues;
|
|
11
|
+
/**
|
|
12
|
+
* md shows the width of the key column for medium screens.
|
|
13
|
+
*/
|
|
14
|
+
md?: WidthValues;
|
|
15
|
+
/**
|
|
16
|
+
* lg shows the width of the key column for large screens.
|
|
17
|
+
*/
|
|
18
|
+
lg?: WidthValues;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
6
22
|
/**
|
|
7
23
|
* SummaryListItemKey is used within the SummaryListItem component.
|
|
8
24
|
* In this column we place the key information for the row (ex. "Name", "Address", etc).
|
|
@@ -10,13 +26,19 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> { }
|
|
|
10
26
|
export const SummaryListItemKey = React.forwardRef<
|
|
11
27
|
HTMLElement,
|
|
12
28
|
SummaryListItemKeyProps
|
|
13
|
-
>(function SummaryListItemKey(
|
|
29
|
+
>(function SummaryListItemKey(
|
|
30
|
+
{ sm = 3, md, lg, className, children, ...props },
|
|
31
|
+
ref
|
|
32
|
+
) {
|
|
14
33
|
return (
|
|
15
34
|
<Base
|
|
16
35
|
as="dt"
|
|
17
36
|
ref={ref}
|
|
18
37
|
className={clsx(className, {
|
|
19
38
|
'ds-summary-list__key': true,
|
|
39
|
+
[`ds-summary-list__key--sm-${sm}`]: sm !== undefined,
|
|
40
|
+
[`ds-summary-list__key--md-${md}`]: md !== undefined,
|
|
41
|
+
[`ds-summary-list__key--lg-${lg}`]: lg !== undefined,
|
|
20
42
|
})}
|
|
21
43
|
{...props}
|
|
22
44
|
>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import CoreTextArea from '@digigov/react-core/TextArea/index.web';
|
|
3
|
+
import extend from '@digigov/react-core/utils/extend.native';
|
|
4
|
+
export const TextArea = extend(CoreTextArea, ({ className, ...props }) => ({
|
|
5
|
+
...props,
|
|
6
|
+
multiline: true,
|
|
7
|
+
className: clsx(className, {
|
|
8
|
+
'ds-textarea__wrapper': true,
|
|
9
|
+
}),
|
|
10
|
+
}));
|
|
11
|
+
export default TextArea;
|
package/src/TextArea/index.tsx
CHANGED
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface TextAreaProps extends BaseProps<'textarea'> {
|
|
6
|
-
/**
|
|
7
|
-
* error is optional. The default value is false.
|
|
8
|
-
* Use this prop when there is an error at the input.
|
|
9
|
-
* @value true
|
|
10
|
-
* @value false
|
|
11
|
-
*/
|
|
12
|
-
error?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* dense is optional.
|
|
15
|
-
* @value true TextArea will be dense.
|
|
16
|
-
* @value false
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
dense?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Textarea component is used when you need to let users enter an
|
|
23
|
-
* amount of text that’s longer than a single line.
|
|
24
|
-
*/
|
|
25
|
-
export const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(
|
|
26
|
-
function TextArea(
|
|
27
|
-
{ name, rows, error, dense, className, children, ...props },
|
|
28
|
-
ref
|
|
29
|
-
) {
|
|
30
|
-
const defaultRows = dense ? 3 : 6;
|
|
31
|
-
return (
|
|
32
|
-
<Base
|
|
33
|
-
as="textarea"
|
|
34
|
-
name={name}
|
|
35
|
-
rows={rows || defaultRows}
|
|
36
|
-
ref={ref}
|
|
37
|
-
className={clsx(className, {
|
|
38
|
-
'ds-textarea': true,
|
|
39
|
-
'ds-textarea--dense': dense,
|
|
40
|
-
'ds-input--error': error,
|
|
41
|
-
})}
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
</Base>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
export default TextArea;
|
|
1
|
+
export * from '@digigov/react-core/TextArea/index.web';
|
|
2
|
+
export {default as default} from '@digigov/react-core/TextArea/index.web';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface TextAreaProps extends BaseProps<'textarea'> {
|
|
6
|
+
/**
|
|
7
|
+
* error is optional. The default value is false.
|
|
8
|
+
* Use this prop when there is an error at the input.
|
|
9
|
+
* @value true
|
|
10
|
+
* @value false
|
|
11
|
+
*/
|
|
12
|
+
error?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* dense is optional.
|
|
15
|
+
* @value true TextArea will be dense.
|
|
16
|
+
* @value false
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
dense?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Textarea component is used when you need to let users enter an
|
|
23
|
+
* amount of text that’s longer than a single line.
|
|
24
|
+
*/
|
|
25
|
+
export const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(
|
|
26
|
+
function TextArea(
|
|
27
|
+
{ name, rows, error, dense, className, children, ...props },
|
|
28
|
+
ref
|
|
29
|
+
) {
|
|
30
|
+
const defaultRows = dense ? 3 : 6;
|
|
31
|
+
return (
|
|
32
|
+
<Base
|
|
33
|
+
as="textarea"
|
|
34
|
+
name={name}
|
|
35
|
+
rows={rows || defaultRows}
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={clsx(className, {
|
|
38
|
+
'ds-textarea': true,
|
|
39
|
+
'ds-textarea--dense': dense,
|
|
40
|
+
'ds-input--error': error,
|
|
41
|
+
})}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</Base>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
export default TextArea;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import extend from '@digigov/react-core/utils/extend.native';
|
|
2
|
+
import CoreTextInput from '@digigov/react-core/TextInput/index.web';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
export const TextInput = extend(CoreTextInput, ({ className, ...props }) => {
|
|
5
|
+
return {
|
|
6
|
+
...props,
|
|
7
|
+
className: clsx(className, {
|
|
8
|
+
'ds-input__wrapper': props.maxWidth === undefined,
|
|
9
|
+
'ds-input--disabled': props.disabled,
|
|
10
|
+
[`ds-input--width-${props.maxWidth}__wrapper`]:
|
|
11
|
+
props.maxWidth !== undefined,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
export default TextInput;
|
package/src/TextInput/index.tsx
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface TextInputProps extends BaseProps<'input'> {
|
|
6
|
-
/**
|
|
7
|
-
* maxWidth is optional.
|
|
8
|
-
* @value '2-char';
|
|
9
|
-
* @value '3-char';
|
|
10
|
-
* @value '4-char';
|
|
11
|
-
* @value '5-char';
|
|
12
|
-
* @value '10-char';
|
|
13
|
-
* @value '20-char';
|
|
14
|
-
*/
|
|
15
|
-
maxWidth?: '2-char' | '3-char' | '4-char' | '5-char' | '10-char' | '20-char';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* width is optional.
|
|
19
|
-
* Use width prop to define a custom width in your component.
|
|
20
|
-
* @value '25%';
|
|
21
|
-
* @value '33.3%';
|
|
22
|
-
* @value '50%';
|
|
23
|
-
* @value '66.6%';
|
|
24
|
-
* @value '75%';
|
|
25
|
-
* @value '100%';
|
|
26
|
-
* @value 'full';
|
|
27
|
-
*/
|
|
28
|
-
width?: '25%' | '33.3%' | '50%' | '66.6%' | '75%' | '100%' | 'full';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* error is optional. The default value is false.
|
|
32
|
-
* Use this prop when there is an error at the input.
|
|
33
|
-
* @value true
|
|
34
|
-
* @value false
|
|
35
|
-
*/
|
|
36
|
-
error?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* dense is optional.
|
|
39
|
-
* @value true TextInput will be dense.
|
|
40
|
-
* @value false
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
dense?: boolean;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* TextInput component when you need to let users enter text that’s no
|
|
47
|
-
* longer than a single line, such as their name or phone number.
|
|
48
|
-
*/
|
|
49
|
-
export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
50
|
-
function TextInput(
|
|
51
|
-
{
|
|
52
|
-
type = 'text',
|
|
53
|
-
maxWidth,
|
|
54
|
-
width,
|
|
55
|
-
error,
|
|
56
|
-
dense,
|
|
57
|
-
className,
|
|
58
|
-
children,
|
|
59
|
-
...props
|
|
60
|
-
},
|
|
61
|
-
ref
|
|
62
|
-
) {
|
|
63
|
-
return (
|
|
64
|
-
<Base
|
|
65
|
-
as="input"
|
|
66
|
-
type={type}
|
|
67
|
-
ref={ref}
|
|
68
|
-
className={clsx(className, {
|
|
69
|
-
'ds-input': true,
|
|
70
|
-
'ds-input--error': error,
|
|
71
|
-
'ds-input--dense': dense,
|
|
72
|
-
[`ds-input--width-${maxWidth}`]: maxWidth !== undefined,
|
|
73
|
-
'ds-!-width-one-quarter': width === '25%',
|
|
74
|
-
'ds-!-width-one-third': width === '33.3%',
|
|
75
|
-
'ds-!-width-one-half': width === '50%',
|
|
76
|
-
'ds-!-width-two-thirds': width === '66.6%',
|
|
77
|
-
'ds-!-width-three-quarters': width === '75%',
|
|
78
|
-
})}
|
|
79
|
-
{...props}
|
|
80
|
-
>
|
|
81
|
-
{children}
|
|
82
|
-
</Base>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
export default TextInput;
|
|
1
|
+
export * from '@digigov/react-core/TextInput/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/TextInput/index.web';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface TextInputProps extends BaseProps<'input'> {
|
|
6
|
+
/**
|
|
7
|
+
* maxWidth is optional.
|
|
8
|
+
* @value '2-char';
|
|
9
|
+
* @value '3-char';
|
|
10
|
+
* @value '4-char';
|
|
11
|
+
* @value '5-char';
|
|
12
|
+
* @value '10-char';
|
|
13
|
+
* @value '20-char';
|
|
14
|
+
*/
|
|
15
|
+
maxWidth?: '2-char' | '3-char' | '4-char' | '5-char' | '10-char' | '20-char';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* width is optional.
|
|
19
|
+
* Use width prop to define a custom width in your component.
|
|
20
|
+
* @value '25%';
|
|
21
|
+
* @value '33.3%';
|
|
22
|
+
* @value '50%';
|
|
23
|
+
* @value '66.6%';
|
|
24
|
+
* @value '75%';
|
|
25
|
+
* @value '100%';
|
|
26
|
+
* @value 'full';
|
|
27
|
+
*/
|
|
28
|
+
width?: '25%' | '33.3%' | '50%' | '66.6%' | '75%' | '100%' | 'full';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* error is optional. The default value is false.
|
|
32
|
+
* Use this prop when there is an error at the input.
|
|
33
|
+
* @value true
|
|
34
|
+
* @value false
|
|
35
|
+
*/
|
|
36
|
+
error?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* dense is optional.
|
|
39
|
+
* @value true TextInput will be dense.
|
|
40
|
+
* @value false
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
dense?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* TextInput component when you need to let users enter text that’s no
|
|
47
|
+
* longer than a single line, such as their name or phone number.
|
|
48
|
+
*/
|
|
49
|
+
export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
50
|
+
function TextInput(
|
|
51
|
+
{
|
|
52
|
+
type = 'text',
|
|
53
|
+
maxWidth,
|
|
54
|
+
width,
|
|
55
|
+
error,
|
|
56
|
+
dense,
|
|
57
|
+
className,
|
|
58
|
+
children,
|
|
59
|
+
...props
|
|
60
|
+
},
|
|
61
|
+
ref
|
|
62
|
+
) {
|
|
63
|
+
return (
|
|
64
|
+
<Base
|
|
65
|
+
as="input"
|
|
66
|
+
type={type}
|
|
67
|
+
ref={ref}
|
|
68
|
+
className={clsx(className, {
|
|
69
|
+
'ds-input': true,
|
|
70
|
+
'ds-input--error': error,
|
|
71
|
+
'ds-input--dense': dense,
|
|
72
|
+
[`ds-input--width-${maxWidth}`]: maxWidth !== undefined,
|
|
73
|
+
'ds-!-width-one-quarter': width === '25%',
|
|
74
|
+
'ds-!-width-one-third': width === '33.3%',
|
|
75
|
+
'ds-!-width-one-half': width === '50%',
|
|
76
|
+
'ds-!-width-two-thirds': width === '66.6%',
|
|
77
|
+
'ds-!-width-three-quarters': width === '75%',
|
|
78
|
+
})}
|
|
79
|
+
{...props}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</Base>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
export default TextInput;
|
package/src/Unpurge/index.tsx
CHANGED
|
@@ -4,6 +4,9 @@ function Unpurge() {
|
|
|
4
4
|
return (
|
|
5
5
|
<div
|
|
6
6
|
className={`
|
|
7
|
+
ds-display-flex
|
|
8
|
+
ds-display-block
|
|
9
|
+
ds-display-none
|
|
7
10
|
ds-m-0
|
|
8
11
|
ds-m-1
|
|
9
12
|
ds-m-2
|
|
@@ -701,6 +704,81 @@ function Unpurge() {
|
|
|
701
704
|
ds-skeleton--font-md
|
|
702
705
|
ds-skeleton--font-lg
|
|
703
706
|
ds-skeleton--font-xl
|
|
707
|
+
ds-summary-list__key--sm-3
|
|
708
|
+
ds-summary-list__key--sm-4
|
|
709
|
+
ds-summary-list__key--sm-5
|
|
710
|
+
ds-summary-list__key--sm-6
|
|
711
|
+
ds-summary-list__key--sm-7
|
|
712
|
+
ds-summary-list__key--sm-8
|
|
713
|
+
ds-summary-list__key--sm-9
|
|
714
|
+
ds-summary-list__key--md-3
|
|
715
|
+
ds-summary-list__key--md-4
|
|
716
|
+
ds-summary-list__key--md-5
|
|
717
|
+
ds-summary-list__key--md-6
|
|
718
|
+
ds-summary-list__key--md-7
|
|
719
|
+
ds-summary-list__key--md-8
|
|
720
|
+
ds-summary-list__key--md-9
|
|
721
|
+
ds-summary-list__key--lg-3
|
|
722
|
+
ds-summary-list__key--lg-4
|
|
723
|
+
ds-summary-list__key--lg-5
|
|
724
|
+
ds-summary-list__key--lg-6
|
|
725
|
+
ds-summary-list__key--lg-7
|
|
726
|
+
ds-summary-list__key--lg-8
|
|
727
|
+
ds-summary-list__key--lg-9
|
|
728
|
+
ds-fieldset__legend--xl
|
|
729
|
+
ds-fieldset__legend--lg
|
|
730
|
+
ds-fieldset__legend--md
|
|
731
|
+
ds-fieldset__legend--sm
|
|
732
|
+
ds-label__title--xl
|
|
733
|
+
ds-label__title--lg
|
|
734
|
+
ds-label__title--md
|
|
735
|
+
ds-label__title--sm
|
|
736
|
+
ds-code--line-number
|
|
737
|
+
ds-code--highlighted-line
|
|
738
|
+
ds-code--doctag
|
|
739
|
+
ds-code--keyword
|
|
740
|
+
ds-code--meta
|
|
741
|
+
ds-code--template-tag
|
|
742
|
+
ds-code--template-variable
|
|
743
|
+
ds-code--type
|
|
744
|
+
ds-code--title
|
|
745
|
+
ds-code--attr
|
|
746
|
+
ds-code--attribute
|
|
747
|
+
ds-code--literal
|
|
748
|
+
ds-code--number
|
|
749
|
+
ds-code--operator
|
|
750
|
+
ds-code--variable
|
|
751
|
+
ds-code--selector-attr
|
|
752
|
+
ds-code--selector-class
|
|
753
|
+
ds-code--selector-id
|
|
754
|
+
ds-code--regexp
|
|
755
|
+
ds-code--string
|
|
756
|
+
ds-code--meta
|
|
757
|
+
ds-code--built_in
|
|
758
|
+
ds-code--symbol
|
|
759
|
+
ds-code--comment
|
|
760
|
+
ds-code--code
|
|
761
|
+
ds-code--formula
|
|
762
|
+
ds-code--name
|
|
763
|
+
ds-code--quote
|
|
764
|
+
ds-code--selector-tag
|
|
765
|
+
ds-code--selector-pseudo
|
|
766
|
+
ds-code--subst
|
|
767
|
+
ds-code--section
|
|
768
|
+
ds-code--bullet
|
|
769
|
+
ds-code--emphasis
|
|
770
|
+
ds-code--strong
|
|
771
|
+
ds-code--addition
|
|
772
|
+
ds-code--deletion
|
|
773
|
+
ds-code--char
|
|
774
|
+
ds-code--link
|
|
775
|
+
ds-code--params
|
|
776
|
+
ds-code--property
|
|
777
|
+
ds-code--punctuation
|
|
778
|
+
ds-code--tag
|
|
779
|
+
ds-code-block__header--start
|
|
780
|
+
ds-code-block__header--space-between
|
|
781
|
+
ds-code-block__header--end
|
|
704
782
|
`}
|
|
705
783
|
></div>
|
|
706
784
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
4
|
+
import { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';
|
|
5
5
|
export interface WarningTextProps extends BaseProps<'div'> {
|
|
6
6
|
/**
|
|
7
7
|
* assistiveText is optional.
|
|
@@ -37,27 +37,24 @@ export const WarningText = React.forwardRef<HTMLDivElement, WarningTextProps>(
|
|
|
37
37
|
})}
|
|
38
38
|
{...props}
|
|
39
39
|
>
|
|
40
|
-
<
|
|
40
|
+
<Base
|
|
41
|
+
as="div"
|
|
41
42
|
className={clsx({
|
|
42
|
-
|
|
43
|
+
"ds-warning-text__icon": true,
|
|
43
44
|
})}
|
|
44
45
|
>
|
|
45
|
-
|
|
46
|
-
</
|
|
47
|
-
|
|
46
|
+
!
|
|
47
|
+
</Base>
|
|
48
|
+
|
|
49
|
+
<Base
|
|
50
|
+
as="strong"
|
|
48
51
|
className={clsx({
|
|
49
|
-
'ds-warning-
|
|
52
|
+
'ds-warning-text__content': true,
|
|
50
53
|
})}
|
|
51
54
|
>
|
|
52
|
-
<
|
|
53
|
-
className={clsx({
|
|
54
|
-
'ds-warning-text__assistive': true,
|
|
55
|
-
})}
|
|
56
|
-
>
|
|
57
|
-
{assistiveText}
|
|
58
|
-
</span>
|
|
55
|
+
<WarningTextAssistive>{assistiveText}</WarningTextAssistive>
|
|
59
56
|
{children}
|
|
60
|
-
</
|
|
57
|
+
</Base>
|
|
61
58
|
</Base>
|
|
62
59
|
);
|
|
63
60
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import Base, { BaseProps } from "@digigov/react-core/Base";
|
|
4
|
+
|
|
5
|
+
export interface WarningTextAssistiveProps extends BaseProps<"span"> {
|
|
6
|
+
/**
|
|
7
|
+
* assistiveText is optional.
|
|
8
|
+
* Default value is "Προσοχή".
|
|
9
|
+
* assistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
10
|
+
*/
|
|
11
|
+
assistiveText?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Use the WarningTextAssistive component when you need to warn users about something important.
|
|
15
|
+
*/
|
|
16
|
+
export const WarningTextAssistive = React.forwardRef<
|
|
17
|
+
HTMLSpanElement,
|
|
18
|
+
WarningTextAssistiveProps
|
|
19
|
+
>(function WarningTextAssistive(
|
|
20
|
+
{ className, children='Προσοχή', ...props },
|
|
21
|
+
ref
|
|
22
|
+
) {
|
|
23
|
+
return (
|
|
24
|
+
<Base
|
|
25
|
+
as="span"
|
|
26
|
+
{...props}
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={clsx(className, {
|
|
29
|
+
"ds-warning-text__assistive": true,
|
|
30
|
+
})}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</Base>
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export default WarningTextAssistive;
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from '@digigov/react-core/CardContent';
|
|
|
22
22
|
export * from '@digigov/react-core/Checkbox';
|
|
23
23
|
export * from '@digigov/react-core/CheckboxConditional';
|
|
24
24
|
export * from '@digigov/react-core/CheckboxItem';
|
|
25
|
+
export * from '@digigov/react-core/CheckboxItemInput';
|
|
25
26
|
export * from '@digigov/react-core/ChoiceDividerText';
|
|
26
27
|
export * from '@digigov/react-core/Code';
|
|
27
28
|
export * from '@digigov/react-core/CodeBlockContainer';
|
|
@@ -216,3 +217,4 @@ export * from '@digigov/react-core/TaskListItem';
|
|
|
216
217
|
export * from '@digigov/react-core/TaskListItemContent';
|
|
217
218
|
export * from '@digigov/react-core/TaskListItemHeading';
|
|
218
219
|
export * from '@digigov/react-core/TaskListItemTag';
|
|
220
|
+
export * from '@digigov/react-core/WarningTextAssistive';
|