@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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
const basePropGenerator = ({
|
|
3
|
+
display,
|
|
4
|
+
margin,
|
|
5
|
+
marginTop,
|
|
6
|
+
marginBottom,
|
|
7
|
+
marginLeft,
|
|
8
|
+
marginRight,
|
|
9
|
+
m,
|
|
10
|
+
mt,
|
|
11
|
+
mb,
|
|
12
|
+
ml,
|
|
13
|
+
mr,
|
|
14
|
+
mx,
|
|
15
|
+
my,
|
|
16
|
+
padding,
|
|
17
|
+
paddingTop,
|
|
18
|
+
paddingBottom,
|
|
19
|
+
paddingLeft,
|
|
20
|
+
paddingRight,
|
|
21
|
+
p,
|
|
22
|
+
pt,
|
|
23
|
+
pb,
|
|
24
|
+
pr,
|
|
25
|
+
pl,
|
|
26
|
+
px,
|
|
27
|
+
py,
|
|
28
|
+
printHidden,
|
|
29
|
+
printVisible,
|
|
30
|
+
hidden,
|
|
31
|
+
xsUpHidden,
|
|
32
|
+
smUpHidden,
|
|
33
|
+
mdUpHidden,
|
|
34
|
+
lgUpHidden,
|
|
35
|
+
xlUpHidden,
|
|
36
|
+
xsHidden,
|
|
37
|
+
smHidden,
|
|
38
|
+
mdHidden,
|
|
39
|
+
lgHidden,
|
|
40
|
+
xlHidden,
|
|
41
|
+
className
|
|
42
|
+
}) => clsx(className, {
|
|
43
|
+
[`ds-display-${display}`]: display !== void 0 ? true : void 0,
|
|
44
|
+
[`ds-m-${margin}`]: margin !== void 0 ? true : void 0,
|
|
45
|
+
[`ds-mt-${marginTop}`]: marginTop !== void 0 ? true : void 0,
|
|
46
|
+
[`ds-mb-${marginBottom}`]: marginBottom !== void 0 ? true : void 0,
|
|
47
|
+
[`ds-mr-${marginRight}`]: marginRight !== void 0 ? true : void 0,
|
|
48
|
+
[`ds-ml-${marginLeft}`]: marginLeft !== void 0 ? true : void 0,
|
|
49
|
+
[`ds-m-${m}`]: m !== void 0 ? true : void 0,
|
|
50
|
+
[`ds-mt-${mt}`]: mt !== void 0 ? true : void 0,
|
|
51
|
+
[`ds-mb-${mb}`]: mb !== void 0 ? true : void 0,
|
|
52
|
+
[`ds-mr-${mr}`]: mr !== void 0 ? true : void 0,
|
|
53
|
+
[`ds-ml-${ml}`]: ml !== void 0 ? true : void 0,
|
|
54
|
+
[`ds-mx-${mx}`]: mx !== void 0 ? true : void 0,
|
|
55
|
+
[`ds-my-${my}`]: my !== void 0 ? true : void 0,
|
|
56
|
+
[`ds-p-${padding}`]: padding !== void 0 ? true : void 0,
|
|
57
|
+
[`ds-pt-${paddingTop}`]: paddingTop !== void 0 ? true : void 0,
|
|
58
|
+
[`ds-pb-${paddingBottom}`]: paddingBottom !== void 0 ? true : void 0,
|
|
59
|
+
[`ds-pr-${paddingRight}`]: paddingRight !== void 0 ? true : void 0,
|
|
60
|
+
[`ds-pl-${paddingLeft}`]: paddingLeft !== void 0 ? true : void 0,
|
|
61
|
+
[`ds-p-${p}`]: p !== void 0 ? true : void 0,
|
|
62
|
+
[`ds-pt-${pt}`]: pt !== void 0 ? true : void 0,
|
|
63
|
+
[`ds-pb-${pb}`]: pb !== void 0 ? true : void 0,
|
|
64
|
+
[`ds-pr-${pr}`]: pr !== void 0 ? true : void 0,
|
|
65
|
+
[`ds-pl-${pl}`]: pl !== void 0 ? true : void 0,
|
|
66
|
+
[`ds-px-${px}`]: px !== void 0 ? true : void 0,
|
|
67
|
+
[`ds-py-${py}`]: py !== void 0 ? true : void 0,
|
|
68
|
+
"ds-print-hidden": !!printHidden,
|
|
69
|
+
"ds-print-visible-block": printVisible === "block",
|
|
70
|
+
"ds-print-visible-inline": printVisible === "inline",
|
|
71
|
+
"ds-hidden": !!hidden,
|
|
72
|
+
"ds-hidden-xs-up": !!xsUpHidden,
|
|
73
|
+
"ds-hidden-sm-up": !!smUpHidden,
|
|
74
|
+
"ds-hidden-md-up": !!mdUpHidden,
|
|
75
|
+
"ds-hidden-lg-up": !!lgUpHidden,
|
|
76
|
+
"ds-hidden-xl-up": !!xlUpHidden,
|
|
77
|
+
"ds-hidden-xs": !!xsHidden,
|
|
78
|
+
"ds-hidden-sm": !!smHidden,
|
|
79
|
+
"ds-hidden-md": !!mdHidden,
|
|
80
|
+
"ds-hidden-lg": !!lgHidden,
|
|
81
|
+
"ds-hidden-xl": !!xlHidden
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
basePropGenerator
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=utils.js.map
|
package/Base/utils.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const basePropGenerator: ({ display, margin, marginTop, marginBottom, marginLeft, marginRight, m, mt, mb, ml, mr, mx, my, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, p, pt, pb, pr, pl, px, py, printHidden, printVisible, hidden, xsUpHidden, smUpHidden, mdUpHidden, lgUpHidden, xlUpHidden, xsHidden, smHidden, mdHidden, lgHidden, xlHidden, className, }: {
|
|
2
|
+
display: any;
|
|
3
|
+
margin: any;
|
|
4
|
+
marginTop: any;
|
|
5
|
+
marginBottom: any;
|
|
6
|
+
marginLeft: any;
|
|
7
|
+
marginRight: any;
|
|
8
|
+
m: any;
|
|
9
|
+
mt: any;
|
|
10
|
+
mb: any;
|
|
11
|
+
ml: any;
|
|
12
|
+
mr: any;
|
|
13
|
+
mx: any;
|
|
14
|
+
my: any;
|
|
15
|
+
padding: any;
|
|
16
|
+
paddingTop: any;
|
|
17
|
+
paddingBottom: any;
|
|
18
|
+
paddingLeft: any;
|
|
19
|
+
paddingRight: any;
|
|
20
|
+
p: any;
|
|
21
|
+
pt: any;
|
|
22
|
+
pb: any;
|
|
23
|
+
pr: any;
|
|
24
|
+
pl: any;
|
|
25
|
+
px: any;
|
|
26
|
+
py: any;
|
|
27
|
+
printHidden: any;
|
|
28
|
+
printVisible: any;
|
|
29
|
+
hidden: any;
|
|
30
|
+
xsUpHidden: any;
|
|
31
|
+
smUpHidden: any;
|
|
32
|
+
mdUpHidden: any;
|
|
33
|
+
lgUpHidden: any;
|
|
34
|
+
xlUpHidden: any;
|
|
35
|
+
xsHidden: any;
|
|
36
|
+
smHidden: any;
|
|
37
|
+
mdHidden: any;
|
|
38
|
+
lgHidden: any;
|
|
39
|
+
xlHidden: any;
|
|
40
|
+
className: any;
|
|
41
|
+
}) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Base/utils.ts"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\n\nexport const basePropGenerator = ({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n className,\n}) =>\n clsx(className, {\n [`ds-display-${display}`]: display !== undefined ? true : undefined,\n [`ds-m-${margin}`]: margin !== undefined ? true : undefined,\n [`ds-mt-${marginTop}`]: marginTop !== undefined ? true : undefined,\n [`ds-mb-${marginBottom}`]: marginBottom !== undefined ? true : undefined,\n [`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,\n [`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,\n [`ds-m-${m}`]: m !== undefined ? true : undefined,\n [`ds-mt-${mt}`]: mt !== undefined ? true : undefined,\n [`ds-mb-${mb}`]: mb !== undefined ? true : undefined,\n [`ds-mr-${mr}`]: mr !== undefined ? true : undefined,\n [`ds-ml-${ml}`]: ml !== undefined ? true : undefined,\n [`ds-mx-${mx}`]: mx !== undefined ? true : undefined,\n [`ds-my-${my}`]: my !== undefined ? true : undefined,\n [`ds-p-${padding}`]: padding !== undefined ? true : undefined,\n [`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,\n [`ds-pb-${paddingBottom}`]: paddingBottom !== undefined ? true : undefined,\n [`ds-pr-${paddingRight}`]: paddingRight !== undefined ? true : undefined,\n [`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,\n [`ds-p-${p}`]: p !== undefined ? true : undefined,\n [`ds-pt-${pt}`]: pt !== undefined ? true : undefined,\n [`ds-pb-${pb}`]: pb !== undefined ? true : undefined,\n [`ds-pr-${pr}`]: pr !== undefined ? true : undefined,\n [`ds-pl-${pl}`]: pl !== undefined ? true : undefined,\n [`ds-px-${px}`]: px !== undefined ? true : undefined,\n [`ds-py-${py}`]: py !== undefined ? true : undefined,\n 'ds-print-hidden': !!printHidden,\n 'ds-print-visible-block': printVisible === 'block',\n 'ds-print-visible-inline': printVisible === 'inline',\n 'ds-hidden': !!hidden,\n 'ds-hidden-xs-up': !!xsUpHidden,\n 'ds-hidden-sm-up': !!smUpHidden,\n 'ds-hidden-md-up': !!mdUpHidden,\n 'ds-hidden-lg-up': !!lgUpHidden,\n 'ds-hidden-xl-up': !!xlUpHidden,\n 'ds-hidden-xs': !!xsHidden,\n 'ds-hidden-sm': !!smHidden,\n 'ds-hidden-md': !!mdHidden,\n 'ds-hidden-lg': !!lgHidden,\n 'ds-hidden-xl': !!xlHidden,\n });\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEV,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,KAAK,WAAW;AAAA,EACd,CAAC,cAAc,OAAO,EAAE,GAAG,YAAY,SAAY,OAAO;AAAA,EAC1D,CAAC,QAAQ,MAAM,EAAE,GAAG,WAAW,SAAY,OAAO;AAAA,EAClD,CAAC,SAAS,SAAS,EAAE,GAAG,cAAc,SAAY,OAAO;AAAA,EACzD,CAAC,SAAS,YAAY,EAAE,GAAG,iBAAiB,SAAY,OAAO;AAAA,EAC/D,CAAC,SAAS,WAAW,EAAE,GAAG,gBAAgB,SAAY,OAAO;AAAA,EAC7D,CAAC,SAAS,UAAU,EAAE,GAAG,eAAe,SAAY,OAAO;AAAA,EAC3D,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,SAAY,OAAO;AAAA,EACxC,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,QAAQ,OAAO,EAAE,GAAG,YAAY,SAAY,OAAO;AAAA,EACpD,CAAC,SAAS,UAAU,EAAE,GAAG,eAAe,SAAY,OAAO;AAAA,EAC3D,CAAC,SAAS,aAAa,EAAE,GAAG,kBAAkB,SAAY,OAAO;AAAA,EACjE,CAAC,SAAS,YAAY,EAAE,GAAG,iBAAiB,SAAY,OAAO;AAAA,EAC/D,CAAC,SAAS,WAAW,EAAE,GAAG,gBAAgB,SAAY,OAAO;AAAA,EAC7D,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,SAAY,OAAO;AAAA,EACxC,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,SAAY,OAAO;AAAA,EAC3C,mBAAmB,CAAC,CAAC;AAAA,EACrB,0BAA0B,iBAAiB;AAAA,EAC3C,2BAA2B,iBAAiB;AAAA,EAC5C,aAAa,CAAC,CAAC;AAAA,EACf,mBAAmB,CAAC,CAAC;AAAA,EACrB,mBAAmB,CAAC,CAAC;AAAA,EACrB,mBAAmB,CAAC,CAAC;AAAA,EACrB,mBAAmB,CAAC,CAAC;AAAA,EACrB,mBAAmB,CAAC,CAAC;AAAA,EACrB,gBAAgB,CAAC,CAAC;AAAA,EAClB,gBAAgB,CAAC,CAAC;AAAA,EAClB,gBAAgB,CAAC,CAAC;AAAA,EAClB,gBAAgB,CAAC,CAAC;AAAA,EAClB,gBAAgB,CAAC,CAAC;AACpB,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useContext, useMemo, useState } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
const WrapperContext = React.createContext(
|
|
4
|
+
(cls) => {
|
|
5
|
+
return cls;
|
|
6
|
+
}
|
|
7
|
+
);
|
|
8
|
+
const Wrapper = React.memo(({ children }) => {
|
|
9
|
+
const [className, setClassName] = useState("");
|
|
10
|
+
return /* @__PURE__ */ React.createElement(WrapperContext.Provider, { value: setClassName }, /* @__PURE__ */ React.createElement(View, { className, focusable: false }, children));
|
|
11
|
+
});
|
|
12
|
+
const wrap = (Component) => {
|
|
13
|
+
const WrappedComponent = React.forwardRef(function InnerComponent({ className, onBlur, onFocus, ...props }, ref) {
|
|
14
|
+
const setClassName = useContext(WrapperContext);
|
|
15
|
+
const wrapperClassNames = [];
|
|
16
|
+
const beforeClassNames = [];
|
|
17
|
+
const afterClassNames = [];
|
|
18
|
+
const focusedWrapperClassNames = [];
|
|
19
|
+
const classNames = useMemo(
|
|
20
|
+
() => (className?.split(" ") || []).filter((cls) => {
|
|
21
|
+
if (cls.endsWith("__wrapper")) {
|
|
22
|
+
wrapperClassNames.push(cls);
|
|
23
|
+
focusedWrapperClassNames.push(`${cls}--focus`);
|
|
24
|
+
return false;
|
|
25
|
+
} else if (cls.endsWith("__before")) {
|
|
26
|
+
beforeClassNames.push(cls);
|
|
27
|
+
return false;
|
|
28
|
+
} else if (cls.endsWith("__after")) {
|
|
29
|
+
afterClassNames.push(cls);
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}),
|
|
34
|
+
[className]
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, beforeClassNames.length ? /* @__PURE__ */ React.createElement(View, { focusable: false, className: beforeClassNames.join(" ") }) : "", /* @__PURE__ */ React.createElement(
|
|
37
|
+
Component,
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
onFocus: (e) => {
|
|
41
|
+
setClassName(focusedWrapperClassNames.join(" "));
|
|
42
|
+
onFocus && onFocus(e);
|
|
43
|
+
},
|
|
44
|
+
onBlur: (e) => {
|
|
45
|
+
setClassName(wrapperClassNames.join(" "));
|
|
46
|
+
onBlur && onBlur(e);
|
|
47
|
+
},
|
|
48
|
+
className: classNames.join(" "),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
), afterClassNames.length ? /* @__PURE__ */ React.createElement(View, { focusable: false, className: afterClassNames.join(" ") }) : "");
|
|
52
|
+
});
|
|
53
|
+
return React.forwardRef(function Wrapped(props, ref) {
|
|
54
|
+
const children = useMemo(
|
|
55
|
+
() => /* @__PURE__ */ React.createElement(WrappedComponent, { ...props, ref }),
|
|
56
|
+
[]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ React.createElement(Wrapper, null, children);
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
wrap
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=wrap.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Base/wrap.native.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useContext, useMemo, useState } from 'react';\nimport { View } from 'react-native';\n\ninterface WrapperContextType {\n (cls: string): void;\n}\n\nconst WrapperContext = React.createContext<WrapperContextType>(\n (cls: string) => {\n return cls;\n }\n);\n\nconst Wrapper = React.memo(({ children }: { children?: React.ReactNode }) => {\n const [className, setClassName] = useState('');\n return (\n <WrapperContext.Provider value={setClassName}>\n <View className={className} focusable={false}>\n {children}\n </View>\n </WrapperContext.Provider>\n );\n});\n\ninterface WrappedComponentProps {\n className?: string;\n onBlur?: (e: unknown) => void;\n onFocus?: (e: unknown) => void;\n}\n\nexport const wrap = (Component: React.ElementType) => {\n const WrappedComponent = React.forwardRef(function InnerComponent(\n { className, onBlur, onFocus, ...props }: WrappedComponentProps,\n ref\n ) {\n const setClassName = useContext(WrapperContext);\n const wrapperClassNames: string[] = [];\n const beforeClassNames: string[] = [];\n const afterClassNames: string[] = [];\n const focusedWrapperClassNames: string[] = [];\n const classNames = useMemo(\n () =>\n (className?.split(' ') || []).filter((cls) => {\n if (cls.endsWith('__wrapper')) {\n wrapperClassNames.push(cls);\n focusedWrapperClassNames.push(`${cls}--focus`);\n return false;\n } else if (cls.endsWith('__before')) {\n beforeClassNames.push(cls);\n return false;\n } else if (cls.endsWith('__after')) {\n afterClassNames.push(cls);\n return false;\n }\n return true;\n }),\n [className]\n );\n return (\n <>\n {beforeClassNames.length ? (\n <View focusable={false} className={beforeClassNames.join(' ')} />\n ) : (\n ''\n )}\n <Component\n ref={ref}\n onFocus={(e: unknown) => {\n setClassName(focusedWrapperClassNames.join(' '));\n onFocus && onFocus(e);\n }}\n onBlur={(e: unknown) => {\n setClassName(wrapperClassNames.join(' '));\n onBlur && onBlur(e);\n }}\n className={classNames.join(' ')}\n {...props}\n />\n {afterClassNames.length ? (\n <View focusable={false} className={afterClassNames.join(' ')} />\n ) : (\n ''\n )}\n </>\n );\n });\n return React.forwardRef(function Wrapped(props, ref) {\n const children = useMemo(\n () => <WrappedComponent {...props} ref={ref} />,\n []\n );\n return <Wrapper>{children}</Wrapper>;\n });\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,SAAS,YAAY,SAAS,gBAAgB;AACrD,SAAS,YAAY;AAMrB,MAAM,iBAAiB,MAAM;AAAA,EAC3B,CAAC,QAAgB;AACf,WAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAU,MAAM,KAAK,CAAC,EAAE,SAAS,MAAsC;AAC3E,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,EAAE;AAC7C,SACE,oCAAC,eAAe,UAAf,EAAwB,OAAO,gBAC9B,oCAAC,QAAK,WAAsB,WAAW,SACpC,QACH,CACF;AAEJ,CAAC;AAQM,MAAM,OAAO,CAAC,cAAiC;AACpD,QAAM,mBAAmB,MAAM,WAAW,SAAS,eACjD,EAAE,WAAW,QAAQ,SAAS,GAAG,MAAM,GACvC,KACA;AACA,UAAM,eAAe,WAAW,cAAc;AAC9C,UAAM,oBAA8B,CAAC;AACrC,UAAM,mBAA6B,CAAC;AACpC,UAAM,kBAA4B,CAAC;AACnC,UAAM,2BAAqC,CAAC;AAC5C,UAAM,aAAa;AAAA,MACjB,OACG,WAAW,MAAM,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,QAAQ;AAC5C,YAAI,IAAI,SAAS,WAAW,GAAG;AAC7B,4BAAkB,KAAK,GAAG;AAC1B,mCAAyB,KAAK,GAAG,GAAG,SAAS;AAC7C,iBAAO;AAAA,QACT,WAAW,IAAI,SAAS,UAAU,GAAG;AACnC,2BAAiB,KAAK,GAAG;AACzB,iBAAO;AAAA,QACT,WAAW,IAAI,SAAS,SAAS,GAAG;AAClC,0BAAgB,KAAK,GAAG;AACxB,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT,CAAC;AAAA,MACH,CAAC,SAAS;AAAA,IACZ;AACA,WACE,0DACG,iBAAiB,SAChB,oCAAC,QAAK,WAAW,OAAO,WAAW,iBAAiB,KAAK,GAAG,GAAG,IAE/D,IAEF;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS,CAAC,MAAe;AACvB,uBAAa,yBAAyB,KAAK,GAAG,CAAC;AAC/C,qBAAW,QAAQ,CAAC;AAAA,QACtB;AAAA,QACA,QAAQ,CAAC,MAAe;AACtB,uBAAa,kBAAkB,KAAK,GAAG,CAAC;AACxC,oBAAU,OAAO,CAAC;AAAA,QACpB;AAAA,QACA,WAAW,WAAW,KAAK,GAAG;AAAA,QAC7B,GAAG;AAAA;AAAA,IACN,GACC,gBAAgB,SACf,oCAAC,QAAK,WAAW,OAAO,WAAW,gBAAgB,KAAK,GAAG,GAAG,IAE9D,EAEJ;AAAA,EAEJ,CAAC;AACD,SAAO,MAAM,WAAW,SAAS,QAAQ,OAAO,KAAK;AACnD,UAAM,WAAW;AAAA,MACf,MAAM,oCAAC,oBAAkB,GAAG,OAAO,KAAU;AAAA,MAC7C,CAAC;AAAA,IACH;AACA,WAAO,oCAAC,eAAS,QAAS;AAAA,EAC5B,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/CallToAction/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const CallToAction = React.forwardRef(function CallToAction2({ printHidden = tru
|
|
|
14
14
|
...props
|
|
15
15
|
},
|
|
16
16
|
children,
|
|
17
|
-
/* @__PURE__ */ React.createElement(ChevronIcon,
|
|
17
|
+
/* @__PURE__ */ React.createElement(ChevronIcon, { className: "ds-btn-cta__icon" })
|
|
18
18
|
);
|
|
19
19
|
});
|
|
20
20
|
var CallToAction_default = CallToAction;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CallToAction/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';\nimport { ChevronIcon } from '@digigov/react-icons';\n\nexport interface CallToActionProps extends ButtonLinkProps {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,gBAAqC;AAC5C,SAAS,mBAAmB;AAMrB,MAAM,eAAe,MAAM,WAGhC,SAASA,cACT,EAAE,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GACpD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,cAAc;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,IACD,oCAAC,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';\nimport { ChevronIcon } from '@digigov/react-icons';\n\nexport interface CallToActionProps extends ButtonLinkProps {}\n/**\n * Use this button for the main call to action on your service\u2019s start page.\n */\nexport const CallToAction = React.forwardRef<\n HTMLAnchorElement,\n CallToActionProps\n>(function CallToAction(\n { printHidden = true, className, children, ...props },\n ref\n) {\n return (\n <ButtonLink\n ref={ref}\n printHidden={printHidden}\n className={clsx(className, {\n 'ds-btn-cta': true,\n })}\n {...props}\n >\n {children}\n <ChevronIcon className=\"ds-btn-cta__icon\" />\n </ButtonLink>\n );\n});\n\nexport default CallToAction;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,gBAAqC;AAC5C,SAAS,mBAAmB;AAMrB,MAAM,eAAe,MAAM,WAGhC,SAASA,cACT,EAAE,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GACpD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,cAAc;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,IACD,oCAAC,eAAY,WAAU,oBAAmB;AAAA,EAC5C;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["CallToAction"]
|
|
7
7
|
}
|
package/Card/index.js
CHANGED
package/Card/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Card/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CardProps extends BaseProps<'div'> {\n /**\n * By default, we recommend using Cards without border style. Card border increases the contrast to its background.\n * divider\n * `variant` property is optional.\n * @value 'border'\n * @value 'divider'\n * @value 'border-top'\n */\n variant?: 'border' | 'divider' | 'border-top';\n\n /**\n *borderColor property is optional and it is used to set the color of the Card's border.\n *\n *\n * @value 'light'\n * @value 'dark'\n */\n borderColor?: 'light' | 'dark';\n\n /**\n *callToAction property is optional and it is used to set the content of the Card clickable.\n *\n *\n * @value true\n * @value false\n */\n callToAction?: boolean;\n /**\n * dense is optional.\n * @value true Card will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * fullHeight is optional.\n * @value true Card will be have it's full height.\n * @value false\n * @default false\n * */\n fullHeight?: boolean;\n}\n/**\n * Cards can be used to divide and organise interface content for better understandability and readability.\n * Cards can help your users to scan through vast amounts of information quicker.\n * Use Card as parent component to wrap CardHeading, CardContent and CartAction components\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(\n { variant, borderColor, callToAction, dense, fullHeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-card': true,\n 'ds-card--dense': dense,\n 'ds-card--border': variant === 'border',\n 'ds-card--border-top': variant === 'border-top',\n 'ds-card--divider': variant === 'divider',\n 'ds-card--cta': callToAction,\n 'ds-card--border-light': borderColor === 'light',\n 'ds-card--border-dark': borderColor === 'dark',\n 'ds-card--full-height': fullHeight,\n })}\n {...props}\n >\n <div\n className={clsx({\n 'ds-card__body': true,\n })}\n >\n {children}\n </
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkDzB,MAAM,OAAO,MAAM,WAAsC,SAASA,MACvE,EAAE,SAAS,aAAa,cAAc,OAAO,YAAY,WAAW,UAAU,GAAG,MAAM,GACvF,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,kBAAkB;AAAA,QAClB,mBAAmB,YAAY;AAAA,QAC/B,uBAAuB,YAAY;AAAA,QACnC,oBAAoB,YAAY;AAAA,QAChC,gBAAgB;AAAA,QAChB,yBAAyB,gBAAgB;AAAA,QACzC,wBAAwB,gBAAgB;AAAA,QACxC,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK;AAAA,UACd,iBAAiB;AAAA,QACnB,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CardProps extends BaseProps<'div'> {\n /**\n * By default, we recommend using Cards without border style. Card border increases the contrast to its background.\n * divider\n * `variant` property is optional.\n * @value 'border'\n * @value 'divider'\n * @value 'border-top'\n */\n variant?: 'border' | 'divider' | 'border-top';\n\n /**\n *borderColor property is optional and it is used to set the color of the Card's border.\n *\n *\n * @value 'light'\n * @value 'dark'\n */\n borderColor?: 'light' | 'dark';\n\n /**\n *callToAction property is optional and it is used to set the content of the Card clickable.\n *\n *\n * @value true\n * @value false\n */\n callToAction?: boolean;\n /**\n * dense is optional.\n * @value true Card will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * fullHeight is optional.\n * @value true Card will be have it's full height.\n * @value false\n * @default false\n * */\n fullHeight?: boolean;\n}\n/**\n * Cards can be used to divide and organise interface content for better understandability and readability.\n * Cards can help your users to scan through vast amounts of information quicker.\n * Use Card as parent component to wrap CardHeading, CardContent and CartAction components\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(\n { variant, borderColor, callToAction, dense, fullHeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-card': true,\n 'ds-card--dense': dense,\n 'ds-card--border': variant === 'border',\n 'ds-card--border-top': variant === 'border-top',\n 'ds-card--divider': variant === 'divider',\n 'ds-card--cta': callToAction,\n 'ds-card--border-light': borderColor === 'light',\n 'ds-card--border-dark': borderColor === 'dark',\n 'ds-card--full-height': fullHeight,\n })}\n {...props}\n >\n <Base\n as=\"div\"\n className={clsx({\n 'ds-card__body': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default Card;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkDzB,MAAM,OAAO,MAAM,WAAsC,SAASA,MACvE,EAAE,SAAS,aAAa,cAAc,OAAO,YAAY,WAAW,UAAU,GAAG,MAAM,GACvF,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,kBAAkB;AAAA,QAClB,mBAAmB,YAAY;AAAA,QAC/B,uBAAuB,YAAY;AAAA,QACnC,oBAAoB,YAAY;AAAA,QAChC,gBAAgB;AAAA,QAChB,yBAAyB,gBAAgB;AAAA,QACzC,wBAAwB,gBAAgB;AAAA,QACxC,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,WAAW,KAAK;AAAA,UACd,iBAAiB;AAAA,QACnB,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
|
|
6
6
|
"names": ["Card"]
|
|
7
7
|
}
|
package/CheckboxItem/index.js
CHANGED
|
@@ -2,11 +2,13 @@ import React from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
import ChoiceDividerText from "@digigov/react-core/ChoiceDividerText";
|
|
5
|
+
import CheckboxItemInput from "@digigov/react-core/CheckboxItemInput";
|
|
5
6
|
import LabelContainer from "@digigov/react-core/LabelContainer";
|
|
6
7
|
const CheckboxItem = React.forwardRef(function CheckboxItem2({ name, value, dividerText, className, disabled, children, ...props }, ref) {
|
|
7
8
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, dividerText && /* @__PURE__ */ React.createElement(ChoiceDividerText, null, dividerText), /* @__PURE__ */ React.createElement(
|
|
8
|
-
|
|
9
|
+
Base,
|
|
9
10
|
{
|
|
11
|
+
as: "div",
|
|
10
12
|
className: clsx(className, {
|
|
11
13
|
"ds-checkboxes__item": true
|
|
12
14
|
})
|
|
@@ -20,21 +22,7 @@ const CheckboxItem = React.forwardRef(function CheckboxItem2({ name, value, divi
|
|
|
20
22
|
})
|
|
21
23
|
},
|
|
22
24
|
children,
|
|
23
|
-
/* @__PURE__ */ React.createElement(
|
|
24
|
-
Base,
|
|
25
|
-
{
|
|
26
|
-
as: "input",
|
|
27
|
-
ref,
|
|
28
|
-
type: "checkbox",
|
|
29
|
-
name,
|
|
30
|
-
value,
|
|
31
|
-
className: clsx({
|
|
32
|
-
"ds-checkboxes__input": true
|
|
33
|
-
}),
|
|
34
|
-
disabled,
|
|
35
|
-
...props
|
|
36
|
-
}
|
|
37
|
-
)
|
|
25
|
+
/* @__PURE__ */ React.createElement(CheckboxItemInput, { ref, name, value, disabled, ...props })
|
|
38
26
|
)
|
|
39
27
|
));
|
|
40
28
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CheckboxItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport ChoiceDividerText from '@digigov/react-core/ChoiceDividerText';\nimport LabelContainer from '@digigov/react-core/LabelContainer';\n\nexport interface CheckboxItemProps extends BaseProps<'input'> {\n /**\n * dividerText is optional.\n * Add this prop to add a choice divider on top of a checkbox item.\n * The string is the text that it will appear above this checkbox item.\n */\n dividerText?: string;\n}\n/**\n * Details for the CheckboxItem.\n * CheckboxItem component allows the user to select one or more checkboxes\n * CheckboxItem must be used inside Checkbox component\n */\nexport const CheckboxItem = React.forwardRef<\n HTMLInputElement,\n CheckboxItemProps\n>(function CheckboxItem(\n { name, value, dividerText, className, disabled, children, ...props },\n ref\n) {\n return (\n <>\n {dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}\n <div\n className={clsx(className, {\n 'ds-checkboxes__item': true,\n })}\n >\n <LabelContainer\n className={clsx({\n 'ds-checkboxes__label': true,\n 'ds-checkboxes__label--disabled': disabled,\n })}\n >\n {children}\n <
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,uBAAuB;AAC9B,OAAO,oBAAoB;AAepB,MAAM,eAAe,MAAM,WAGhC,SAASA,cACT,EAAE,MAAM,OAAO,aAAa,WAAW,UAAU,UAAU,GAAG,MAAM,GACpE,KACA;AACA,SACE,0DACG,eAAe,oCAAC,yBAAmB,WAAY,GAChD;AAAA,IAAC;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport ChoiceDividerText from '@digigov/react-core/ChoiceDividerText';\nimport CheckboxItemInput from '@digigov/react-core/CheckboxItemInput';\nimport LabelContainer from '@digigov/react-core/LabelContainer';\n\nexport interface CheckboxItemProps extends BaseProps<'input'> {\n /**\n * dividerText is optional.\n * Add this prop to add a choice divider on top of a checkbox item.\n * The string is the text that it will appear above this checkbox item.\n */\n dividerText?: string;\n}\n/**\n * Details for the CheckboxItem.\n * CheckboxItem component allows the user to select one or more checkboxes\n * CheckboxItem must be used inside Checkbox component\n */\nexport const CheckboxItem = React.forwardRef<\n HTMLInputElement,\n CheckboxItemProps\n>(function CheckboxItem(\n { name, value, dividerText, className, disabled, children, ...props },\n ref\n) {\n return (\n <>\n {dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}\n <Base as='div'\n className={clsx(className, {\n 'ds-checkboxes__item': true,\n })}\n >\n <LabelContainer\n className={clsx({\n 'ds-checkboxes__label': true,\n 'ds-checkboxes__label--disabled': disabled,\n })}\n >\n {children}\n <CheckboxItemInput ref={ref} name={name} value={value} disabled={disabled} {...props} />\n </LabelContainer>\n </Base>\n </>\n );\n});\n\nexport default CheckboxItem;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,uBAAuB;AAC9B,OAAO,uBAAuB;AAC9B,OAAO,oBAAoB;AAepB,MAAM,eAAe,MAAM,WAGhC,SAASA,cACT,EAAE,MAAM,OAAO,aAAa,WAAW,UAAU,UAAU,GAAG,MAAM,GACpE,KACA;AACA,SACE,0DACG,eAAe,oCAAC,yBAAmB,WAAY,GAChD;AAAA,IAAC;AAAA;AAAA,MAAK,IAAG;AAAA,MACP,WAAW,KAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA;AAAA,IAED;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK;AAAA,UACd,wBAAwB;AAAA,UACxB,kCAAkC;AAAA,QACpC,CAAC;AAAA;AAAA,MAEA;AAAA,MACD,oCAAC,qBAAkB,KAAU,MAAY,OAAc,UAAqB,GAAG,OAAO;AAAA,IACxF;AAAA,EACF,CACF;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["CheckboxItem"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxItemInput/index.tsx"],
|
|
4
|
+
"sourcesContent": ["export * from '@digigov/react-core/CheckboxItemInput/index.web';\nexport { default as default } from '@digigov/react-core/CheckboxItemInput/index.web';"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,SAAoB,WAAXA,gBAA0B;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import extend from "@digigov/react-core/utils/extend.native";
|
|
2
|
+
import CoreCheckboxItemInput from "@digigov/react-core/CheckboxItemInput/index.web";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
const CheckboxItemInput = extend(
|
|
5
|
+
CoreCheckboxItemInput,
|
|
6
|
+
({ className, ...props }) => {
|
|
7
|
+
return {
|
|
8
|
+
...props,
|
|
9
|
+
className: clsx(className, {
|
|
10
|
+
"ds-checkboxes__input__wrapper": true
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
var index_native_default = CheckboxItemInput;
|
|
16
|
+
export {
|
|
17
|
+
CheckboxItemInput,
|
|
18
|
+
index_native_default as default
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CheckboxItemInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/CheckboxItemInput/index.web").CheckboxItemInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
|
|
2
|
+
className?: string;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
|
+
export default CheckboxItemInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxItemInput/index.native.tsx"],
|
|
4
|
+
"sourcesContent": ["import extend from '@digigov/react-core/utils/extend.native';\nimport CoreCheckboxItemInput from '@digigov/react-core/CheckboxItemInput/index.web';\nimport clsx from 'clsx';\n\nexport const CheckboxItemInput = extend(\n CoreCheckboxItemInput,\n ({ className, ...props }) => {\n return {\n ...props,\n className: clsx(className, {\n 'ds-checkboxes__input__wrapper': true,\n }),\n };\n }\n);\n\nexport default CheckboxItemInput;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,OAAO,2BAA2B;AAClC,OAAO,UAAU;AAEV,MAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA,CAAC,EAAE,WAAW,GAAG,MAAM,MAAM;AAC3B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,WAAW,KAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import Base from "@digigov/react-core/Base";
|
|
4
|
+
const CheckboxItemInput = React.forwardRef(function CheckboxItemInput2({ name, value, className, disabled, children, ...props }, ref) {
|
|
5
|
+
return /* @__PURE__ */ React.createElement(
|
|
6
|
+
Base,
|
|
7
|
+
{
|
|
8
|
+
as: "input",
|
|
9
|
+
ref,
|
|
10
|
+
type: "checkbox",
|
|
11
|
+
name,
|
|
12
|
+
value,
|
|
13
|
+
className: clsx({
|
|
14
|
+
"ds-checkboxes__input": true
|
|
15
|
+
}),
|
|
16
|
+
disabled,
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
var index_web_default = CheckboxItemInput;
|
|
22
|
+
export {
|
|
23
|
+
CheckboxItemInput,
|
|
24
|
+
index_web_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface CheckboxItemInputProps extends BaseProps<'input'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Details for the CheckboxItem.
|
|
7
|
+
* CheckboxItemInput component is the input component for CheckboxItem.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CheckboxItemInput: React.ForwardRefExoticComponent<Omit<CheckboxItemInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export default CheckboxItemInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxItemInput/index.web.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CheckboxItemInputProps extends BaseProps<'input'> { }\n/**\n * Details for the CheckboxItem.\n * CheckboxItemInput component is the input component for CheckboxItem.\n */\nexport const CheckboxItemInput = React.forwardRef<\n HTMLInputElement,\n CheckboxItemInputProps\n>(function CheckboxItemInput(\n { name, value, className, disabled, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"input\"\n ref={ref}\n type=\"checkbox\"\n name={name}\n value={value}\n className={clsx({\n 'ds-checkboxes__input': true,\n })}\n disabled={disabled}\n {...props}\n />\n\n );\n});\n\nexport default CheckboxItemInput;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,oBAAoB,MAAM,WAGrC,SAASA,mBACT,EAAE,MAAM,OAAO,WAAW,UAAU,UAAU,GAAG,MAAM,GACvD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,WAAW,KAAK;AAAA,QACd,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAGJ,CAAC;AAED,IAAO,oBAAQ;",
|
|
6
|
+
"names": ["CheckboxItemInput"]
|
|
7
|
+
}
|
package/Chip/index.js
CHANGED
|
@@ -16,8 +16,9 @@ const Chip = React.forwardRef(function Chip2({ className, onDelete, onClick, chi
|
|
|
16
16
|
onClick
|
|
17
17
|
},
|
|
18
18
|
/* @__PURE__ */ React.createElement(
|
|
19
|
-
|
|
19
|
+
Base,
|
|
20
20
|
{
|
|
21
|
+
as: "div",
|
|
21
22
|
role: onClick && "button",
|
|
22
23
|
tabIndex: onClick && 0,
|
|
23
24
|
className: "ds-chip__content"
|
package/Chip/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Chip/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { CloseIcon } from '@digigov/react-icons';\n\nexport interface ChipProps extends BaseProps<'li'> {\n /**\n\n */\n onDelete?: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;\n}\n/**\n * Chips can be used to represent small blocks of information.\n * Chip component must be inside ChipContainer component.\n */\nexport const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(\n { className, onDelete, onClick, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-chip': true,\n 'ds-chip--deletable': !!onDelete,\n })}\n {...props}\n onClick={onClick}\n >\n <div\n role={onClick && 'button'}\n tabIndex={onClick && 0}\n className=\"ds-chip__content\"\n >\n {children}\n {onDelete && (\n <CloseIcon\n onClick={(e) => {\n e.stopPropagation();\n onDelete(e);\n }}\n />\n )}\n </
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,iBAAiB;AAYnB,MAAM,OAAO,MAAM,WAAqC,SAASA,MACtE,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,sBAAsB,CAAC,CAAC;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA,MACJ;AAAA;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { CloseIcon } from '@digigov/react-icons';\n\nexport interface ChipProps extends BaseProps<'li'> {\n /**\n\n */\n onDelete?: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;\n}\n/**\n * Chips can be used to represent small blocks of information.\n * Chip component must be inside ChipContainer component.\n */\nexport const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(\n { className, onDelete, onClick, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-chip': true,\n 'ds-chip--deletable': !!onDelete,\n })}\n {...props}\n onClick={onClick}\n >\n <Base as='div'\n role={onClick && 'button'}\n tabIndex={onClick && 0}\n className=\"ds-chip__content\"\n >\n {children}\n {onDelete && (\n <CloseIcon\n onClick={(e) => {\n e.stopPropagation();\n onDelete(e);\n }}\n />\n )}\n </Base>\n </Base>\n );\n});\n\nexport default Chip;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,iBAAiB;AAYnB,MAAM,OAAO,MAAM,WAAqC,SAASA,MACtE,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,sBAAsB,CAAC,CAAC;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA,MACJ;AAAA;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QAAK,IAAG;AAAA,QACP,MAAM,WAAW;AAAA,QACjB,UAAU,WAAW;AAAA,QACrB,WAAU;AAAA;AAAA,MAET;AAAA,MACA,YACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,qBAAS,CAAC;AAAA,UACZ;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
|
|
6
6
|
"names": ["Chip"]
|
|
7
7
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface CodeBlockContainerProps extends BaseProps<'div'> {
|
|
4
|
-
/**
|
|
5
|
-
* wrapLines prop is optional.
|
|
6
|
-
* wrapLines prop is used to wrap the lines horizontally over the container.
|
|
7
|
-
* @value true is used to activate the wrapLines styles.
|
|
8
|
-
* @value false is used to deactivate the wrapLines styles.
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
wrapLines?: true | false;
|
|
12
4
|
}
|
|
13
5
|
/**
|
|
14
|
-
* CodeBlockContainer
|
|
6
|
+
* CodeBlockContainer is a component for displaying code.
|
|
15
7
|
*
|
|
16
8
|
*/
|
|
17
9
|
export declare const CodeBlockContainer: React.ForwardRefExoticComponent<Omit<CodeBlockContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const CodeBlockContainer = React.forwardRef(function CodeBlockContainer2({ className,
|
|
4
|
+
const CodeBlockContainer = React.forwardRef(function CodeBlockContainer2({ className, children, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
6
|
Base,
|
|
7
7
|
{
|
|
8
8
|
as: "div",
|
|
9
9
|
ref,
|
|
10
10
|
className: clsx(className, {
|
|
11
|
-
"ds-code-block__container": true
|
|
12
|
-
"ds-code-block__container--wrap-lines": wrapLines
|
|
11
|
+
"ds-code-block__container": true
|
|
13
12
|
}),
|
|
14
13
|
...props
|
|
15
14
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CodeBlockContainer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContainerProps extends BaseProps<'div'> {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContainerProps extends BaseProps<'div'> { }\n/**\n * CodeBlockContainer is a component for displaying code.\n *\n */\nexport const CodeBlockContainer = React.forwardRef<\n HTMLDivElement,\n CodeBlockContainerProps\n>(function CodeBlockContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-code-block__container': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default CodeBlockContainer;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBAAmB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,4BAA4B;AAAA,MAC9B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
|
|
6
6
|
"names": ["CodeBlockContainer"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { BaseProps } from '@digigov/react-core/Base';
|
|
|
3
3
|
export interface CodeBlockContentProps extends BaseProps<'pre'> {
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* CodeBlockContent can be used as content inside the CodeBlockContainer
|
|
6
|
+
* CodeBlockContent can be used as content inside the CodeBlockContainer.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
export declare const CodeBlockContent: React.ForwardRefExoticComponent<Omit<CodeBlockContentProps, "ref"> & React.RefAttributes<HTMLPreElement>>;
|
|
@@ -2,9 +2,10 @@ import React from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
const CodeBlockContent = React.forwardRef(function CodeBlockContent2({ className, children, ...props }, ref) {
|
|
5
|
-
return /* @__PURE__ */ React.createElement(Base, { as: "pre", ref, className
|
|
6
|
-
|
|
5
|
+
return /* @__PURE__ */ React.createElement(Base, { as: "pre", ref, className, ...props }, /* @__PURE__ */ React.createElement(
|
|
6
|
+
Base,
|
|
7
7
|
{
|
|
8
|
+
as: "code",
|
|
8
9
|
className: clsx({
|
|
9
10
|
"ds-code-block__content": true
|
|
10
11
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CodeBlockContent/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContentProps extends BaseProps<'pre'> { }\n/**\n * CodeBlockContent can be used as content inside the CodeBlockContainer
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,oCAAC,QAAK,IAAG,OAAM,KAAU,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContentProps extends BaseProps<'pre'> { }\n/**\n * CodeBlockContent can be used as content inside the CodeBlockContainer.\n *\n */\nexport const CodeBlockContent = React.forwardRef<\n HTMLPreElement,\n CodeBlockContentProps\n>(function CodeBlockContent({ className, children, ...props }, ref) {\n return (\n <Base as=\"pre\" ref={ref} className={className} {...props}>\n <Base\n as=\"code\"\n className={clsx({\n 'ds-code-block__content': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default CodeBlockContent;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAOzB,MAAM,mBAAmB,MAAM,WAGpC,SAASA,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,oCAAC,QAAK,IAAG,OAAM,KAAU,WAAuB,GAAG,SACjD;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,WAAW,KAAK;AAAA,QACd,0BAA0B;AAAA,MAC5B,CAAC;AAAA;AAAA,IAEA;AAAA,EACH,CACF;AAEJ,CAAC;AAED,IAAO,2BAAQ;",
|
|
6
6
|
"names": ["CodeBlockContent"]
|
|
7
7
|
}
|