@digigov/react-core 2.0.0-8e254888 → 2.0.0-a402a664
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/Accordion/index.native.d.ts +1 -5
- package/AccordionSection/index.native.d.ts +1 -3
- package/BackLinkBase/index.d.ts +9 -0
- package/BackLinkBase/index.js +29 -0
- package/BackLinkBase/index.js.map +7 -0
- package/{CallToAction → BackLinkBase}/package.json +1 -1
- package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/Base/index.native.js.map +2 -2
- package/Base/index.web.d.ts +1 -1
- package/Base/index.web.js.map +1 -1
- package/Base/mapping.native.d.ts +1 -1
- package/Base/mapping.native.js.map +2 -2
- package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
- package/BreadcrumbsListItemLinkBase/index.js +23 -0
- package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
- package/{AutoCompleteInputTypeahead → BreadcrumbsListItemLinkBase}/package.json +1 -1
- package/Button/index.js +1 -0
- package/Button/index.js.map +2 -2
- package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
- package/ButtonLinkBase/index.js +27 -0
- package/ButtonLinkBase/index.js.map +7 -0
- package/{FooterLink → ButtonLinkBase}/package.json +1 -1
- package/CallToActionBase/index.d.ts +9 -0
- package/{CallToAction → CallToActionBase}/index.js +6 -6
- package/CallToActionBase/index.js.map +7 -0
- package/CallToActionBase/package.json +6 -0
- package/CopyToClipboardMessage/index.native.d.ts +1 -3
- package/DateInputItem/index.native.d.ts +1 -3
- package/Details/index.native.d.ts +1 -3
- package/FooterLinkBase/index.d.ts +9 -0
- package/FooterLinkBase/index.js +23 -0
- package/FooterLinkBase/index.js.map +7 -0
- package/{ButtonLink → FooterLinkBase}/package.json +1 -1
- package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
- package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
- package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
- package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
- package/GovGRLogoBase/index.d.ts +9 -0
- package/GovGRLogoBase/index.js +43 -0
- package/GovGRLogoBase/index.js.map +7 -0
- package/{BackLink → GovGRLogoBase}/package.json +1 -1
- package/HeaderLogoBase/index.d.ts +19 -0
- package/HeaderLogoBase/index.js +33 -0
- package/HeaderLogoBase/index.js.map +7 -0
- package/HeaderLogoBase/package.json +6 -0
- package/HeaderSecondaryLogoBase/index.d.ts +19 -0
- package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
- package/HeaderSecondaryLogoBase/index.js.map +7 -0
- package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
- package/HeaderTitleBase/index.d.ts +9 -0
- package/HeaderTitleBase/index.js +24 -0
- package/HeaderTitleBase/index.js.map +7 -0
- package/HeaderTitleBase/package.json +6 -0
- package/LinkBase/index.js +1 -0
- package/LinkBase/index.js.map +2 -2
- package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
- package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
- package/NavListItemActionBase/index.js.map +7 -0
- package/NavListItemActionBase/package.json +6 -0
- package/NavListItemActionContainer/index.native.d.ts +0 -2
- package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
- package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
- package/NavListItemLinkBase/index.js.map +7 -0
- package/NavListItemLinkBase/package.json +6 -0
- package/NotificationBannerLink/index.native.d.ts +1 -3
- package/Table/index.d.ts +9 -0
- package/Table/index.js +4 -1
- package/Table/index.js.map +2 -2
- package/TableDataCell/index.d.ts +13 -0
- package/TableDataCell/index.js +10 -1
- package/TableDataCell/index.js.map +2 -2
- package/TextArea/index.native.d.ts +1 -3
- package/TextInput/index.native.d.ts +1 -3
- package/Typography/index.d.ts +1 -1
- package/Typography/index.js +15 -17
- package/Typography/index.js.map +2 -2
- package/WarningText/index.d.ts +7 -0
- package/WarningText/index.js +10 -2
- package/WarningText/index.js.map +2 -2
- package/cjs/BackLinkBase/index.js +62 -0
- package/cjs/BackLinkBase/index.js.map +7 -0
- package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/cjs/Base/index.native.js.map +2 -2
- package/cjs/Base/index.web.js.map +1 -1
- package/cjs/Base/mapping.native.js.map +2 -2
- package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
- package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
- package/cjs/Button/index.js +1 -0
- package/cjs/Button/index.js.map +2 -2
- package/cjs/ButtonLinkBase/index.js +60 -0
- package/cjs/ButtonLinkBase/index.js.map +7 -0
- package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
- package/cjs/CallToActionBase/index.js.map +7 -0
- package/cjs/FooterLinkBase/index.js +56 -0
- package/cjs/FooterLinkBase/index.js.map +7 -0
- package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
- package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
- package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
- package/cjs/GovGRLogoBase/index.js.map +7 -0
- package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
- package/cjs/HeaderLogoBase/index.js.map +7 -0
- package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
- package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
- package/cjs/{HeaderTitle → HeaderTitleBase}/index.js +11 -11
- package/cjs/HeaderTitleBase/index.js.map +7 -0
- package/cjs/LinkBase/index.js +1 -0
- package/cjs/LinkBase/index.js.map +2 -2
- package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
- package/cjs/NavListItemActionBase/index.js.map +7 -0
- package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
- package/cjs/NavListItemLinkBase/index.js.map +7 -0
- package/cjs/Table/index.js +4 -1
- package/cjs/Table/index.js.map +2 -2
- package/cjs/TableDataCell/index.js +10 -1
- package/cjs/TableDataCell/index.js.map +2 -2
- package/cjs/Typography/index.js +15 -17
- package/cjs/Typography/index.js.map +2 -2
- package/cjs/WarningText/index.js +10 -2
- package/cjs/WarningText/index.js.map +2 -2
- package/cjs/index.js +20 -22
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +11 -12
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +32 -34
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/index.native/index.js +32 -34
- package/cjs/utils/index.native.js.map +2 -2
- package/index.d.ts +10 -11
- package/index.js +11 -12
- package/index.js.map +2 -2
- package/lazy/index.js +11 -12
- package/package.json +5 -5
- package/registry/index.js +32 -34
- package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
- package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
- package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
- package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
- package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/BackLinkBase/index.test.tsx +15 -0
- package/src/BackLinkBase/index.tsx +36 -0
- package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
- package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
- package/src/Base/index.native.tsx +2 -2
- package/src/Base/index.web.tsx +2 -2
- package/src/Base/mapping.native.tsx +1 -1
- package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
- package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
- package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
- package/src/Button/index.tsx +1 -0
- package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
- package/src/ButtonLinkBase/index.test.tsx +75 -0
- package/src/ButtonLinkBase/index.tsx +55 -0
- package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/CallToActionBase/index.test.tsx +10 -0
- package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
- package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
- package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
- package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
- package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/FooterLinkBase/index.test.tsx +16 -0
- package/src/FooterLinkBase/index.tsx +27 -0
- package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/GovGRLogoBase/index.test.tsx +8 -0
- package/src/GovGRLogoBase/index.tsx +43 -0
- package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
- package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/HeaderLogoBase/index.test.tsx +8 -0
- package/src/HeaderLogoBase/index.tsx +44 -0
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
- package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/HeaderTitleBase/index.test.tsx +17 -0
- package/src/HeaderTitleBase/index.tsx +28 -0
- package/src/LinkBase/index.tsx +1 -0
- package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
- package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
- package/src/NavListItemActionBase/index.test.tsx +42 -0
- package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
- package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
- package/src/NavListItemLinkBase/index.test.tsx +41 -0
- package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
- package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
- package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
- package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
- package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TableDataCell/index.tsx +23 -1
- package/src/Typography/index.tsx +21 -20
- package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
- package/src/WarningText/index.test.tsx +5 -0
- package/src/WarningText/index.tsx +17 -2
- package/src/index.ts +10 -11
- package/src/lazy.js +11 -12
- package/src/registry.js +32 -34
- package/src/utils/index.native.tsx +56 -54
- package/utils/index.native/index.js +32 -34
- package/utils/index.native.d.ts +3 -6
- package/utils/index.native.js.map +2 -2
- package/AutoCompleteInputTypeahead/index.d.ts +0 -11
- package/AutoCompleteInputTypeahead/index.js +0 -25
- package/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/BackLink/index.d.ts +0 -9
- package/BackLink/index.js +0 -31
- package/BackLink/index.js.map +0 -7
- package/BreadcrumbsListItemLink/index.js +0 -24
- package/BreadcrumbsListItemLink/index.js.map +0 -7
- package/ButtonLink/index.js +0 -29
- package/ButtonLink/index.js.map +0 -7
- package/CallToAction/index.d.ts +0 -9
- package/CallToAction/index.js.map +0 -7
- package/FooterLink/index.d.ts +0 -9
- package/FooterLink/index.js +0 -25
- package/FooterLink/index.js.map +0 -7
- package/GovGRLogo/govgr-logo-base64/package.json +0 -6
- package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
- package/GovGRLogo/index.d.ts +0 -9
- package/GovGRLogo/index.js +0 -45
- package/GovGRLogo/index.js.map +0 -7
- package/GovGRLogo/package.json +0 -6
- package/HeaderLogo/index.d.ts +0 -19
- package/HeaderLogo/index.js +0 -35
- package/HeaderLogo/index.js.map +0 -7
- package/HeaderLogo/package.json +0 -6
- package/HeaderSecondaryLogo/index.d.ts +0 -19
- package/HeaderSecondaryLogo/index.js.map +0 -7
- package/HeaderSecondaryLogo/package.json +0 -6
- package/HeaderTitle/index.d.ts +0 -9
- package/HeaderTitle/index.js +0 -24
- package/HeaderTitle/index.js.map +0 -7
- package/HeaderTitle/package.json +0 -6
- package/NavListItemAction/index.js.map +0 -7
- package/NavListItemAction/package.json +0 -6
- package/NavListItemLink/index.js.map +0 -7
- package/NavListItemLink/index.test.d.ts +0 -1
- package/NavListItemLink/package.json +0 -6
- package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
- package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/cjs/BackLink/index.js +0 -64
- package/cjs/BackLink/index.js.map +0 -7
- package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
- package/cjs/ButtonLink/index.js +0 -62
- package/cjs/ButtonLink/index.js.map +0 -7
- package/cjs/CallToAction/index.js.map +0 -7
- package/cjs/FooterLink/index.js +0 -58
- package/cjs/FooterLink/index.js.map +0 -7
- package/cjs/GovGRLogo/index.js.map +0 -7
- package/cjs/HeaderLogo/index.js +0 -68
- package/cjs/HeaderLogo/index.js.map +0 -7
- package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
- package/cjs/HeaderTitle/index.js.map +0 -7
- package/cjs/NavListItemAction/index.js.map +0 -7
- package/cjs/NavListItemLink/index.js.map +0 -7
- package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
- package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
- package/src/BackLink/index.test.tsx +0 -13
- package/src/BackLink/index.tsx +0 -35
- package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
- package/src/ButtonLink/index.test.tsx +0 -69
- package/src/ButtonLink/index.tsx +0 -54
- package/src/CallToAction/index.test.tsx +0 -10
- package/src/FooterLink/index.test.tsx +0 -14
- package/src/FooterLink/index.tsx +0 -26
- package/src/GovGRLogo/index.test.tsx +0 -8
- package/src/GovGRLogo/index.tsx +0 -42
- package/src/HeaderLogo/index.test.tsx +0 -8
- package/src/HeaderLogo/index.tsx +0 -43
- package/src/HeaderTitle/index.test.tsx +0 -16
- package/src/HeaderTitle/index.tsx +0 -28
- package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
- package/src/NavListItemAction/index.test.tsx +0 -11
- package/src/NavListItemLink/index.test.tsx +0 -39
- /package/{AutoCompleteInputTypeahead → BackLinkBase}/index.test.d.ts +0 -0
- /package/{BackLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
- /package/{BreadcrumbsListItemLink → ButtonLinkBase}/index.test.d.ts +0 -0
- /package/{ButtonLink → CallToActionBase}/index.test.d.ts +0 -0
- /package/{CallToAction → FooterLinkBase}/index.test.d.ts +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
- /package/{FooterLink → GovGRLogoBase}/index.test.d.ts +0 -0
- /package/{GovGRLogo → HeaderLogoBase}/index.test.d.ts +0 -0
- /package/{HeaderLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
- /package/{HeaderSecondaryLogo → HeaderTitleBase}/index.test.d.ts +0 -0
- /package/{HeaderTitle → NavListItemActionBase}/index.test.d.ts +0 -0
- /package/{NavListItemAction → NavListItemLinkBase}/index.test.d.ts +0 -0
- /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
- /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
|
@@ -2,10 +2,10 @@ import React from "react";
|
|
|
2
2
|
import NavListItemActionContainer from "@digigov/react-core/NavListItemActionContainer";
|
|
3
3
|
import NavListItemBadge from "@digigov/react-core/NavListItemBadge";
|
|
4
4
|
import NavListItemButton from "@digigov/react-core/NavListItemButton";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import NavListItemLinkBase from "@digigov/react-core/NavListItemLinkBase";
|
|
6
|
+
const NavListItemActionBase = React.forwardRef(function NavListItemActionBase2({ label, arrow = false, href, className, children, ...props }, ref) {
|
|
7
7
|
return /* @__PURE__ */ React.createElement(NavListItemActionContainer, null, href ? /* @__PURE__ */ React.createElement(
|
|
8
|
-
|
|
8
|
+
NavListItemLinkBase,
|
|
9
9
|
{
|
|
10
10
|
...props,
|
|
11
11
|
href,
|
|
@@ -24,9 +24,9 @@ const NavListItemAction = React.forwardRef(function NavListItemAction2({ label,
|
|
|
24
24
|
children || label
|
|
25
25
|
), props.badgeText && /* @__PURE__ */ React.createElement(NavListItemBadge, { text: props.badgeText }));
|
|
26
26
|
});
|
|
27
|
-
var
|
|
27
|
+
var NavListItemActionBase_default = NavListItemActionBase;
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
NavListItemActionBase,
|
|
30
|
+
NavListItemActionBase_default as default
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/NavListItemActionBase/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLinkBase, {\n NavListItemLinkBaseProps,\n} from '@digigov/react-core/NavListItemLinkBase';\n\nexport type LinkButtonJoinProps = NavListItemLinkBaseProps &\n NavListItemButtonProps;\nexport interface NavListItemActionBaseProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemActionBase.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemActionBase = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionBaseProps\n>(function NavListItemActionBase(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLinkBase\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLinkBase>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {props.badgeText && <NavListItemBadge text={props.badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemActionBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAA6B;AACpC,OAAO,gCAAgC;AACvC,OAAO,sBAAsB;AAC7B,OAAO,uBAEA;AACP,OAAO,yBAEA;AAyBA,MAAM,wBAAwB,MAAM,WAGzC,SAASA,uBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,GAC5D,KACA;AACA,SACE,oCAAC,kCACE,OACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,MAAM,aAAa,oCAAC,oBAAiB,MAAM,MAAM,WAAW,CAC/D;AAEJ,CAAC;AAED,IAAO,gCAAQ;",
|
|
6
|
+
"names": ["NavListItemActionBase"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { NavListItemActionContainerProps } from '@digigov/react-core/NavListItemActionContainer/index.web';
|
|
2
2
|
export declare const NavListItemActionContainer: import("react").ForwardRefExoticComponent<Omit<NavListItemActionContainerProps & {
|
|
3
3
|
borderBottom?: boolean;
|
|
4
|
-
} & {
|
|
5
|
-
className?: string;
|
|
6
4
|
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
7
5
|
export default NavListItemActionContainer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
3
|
+
export interface NavListItemLinkBaseProps extends LinkBaseProps {
|
|
4
4
|
/**
|
|
5
5
|
* When the NavListItemLink is active, that means that we are in this option / page of the Nav.
|
|
6
6
|
* active is optional.
|
|
@@ -13,5 +13,5 @@ export interface NavListItemLinkProps extends BaseProps<'a'> {
|
|
|
13
13
|
/**
|
|
14
14
|
* NavListItemLink is an <a> element. It should be inside the NavListItem component.
|
|
15
15
|
*/
|
|
16
|
-
export declare const
|
|
17
|
-
export default
|
|
16
|
+
export declare const NavListItemLinkBase: React.ForwardRefExoticComponent<Omit<NavListItemLinkBaseProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
|
+
export default NavListItemLinkBase;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import { LinkBase } from "@digigov/react-core/LinkBase";
|
|
4
|
+
const NavListItemLinkBase = React.forwardRef(function NavListItemLinkBase2({ active, href, className, children, ...props }, ref) {
|
|
5
5
|
return /* @__PURE__ */ React.createElement(
|
|
6
|
-
|
|
6
|
+
LinkBase,
|
|
7
7
|
{
|
|
8
8
|
href,
|
|
9
9
|
ref,
|
|
@@ -16,9 +16,9 @@ const NavListItemLink = React.forwardRef(function NavListItemLink2({ active, hre
|
|
|
16
16
|
children
|
|
17
17
|
);
|
|
18
18
|
});
|
|
19
|
-
var
|
|
19
|
+
var NavListItemLinkBase_default = NavListItemLinkBase;
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
NavListItemLinkBase,
|
|
22
|
+
NavListItemLinkBase_default as default
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/NavListItemLinkBase/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';\n\nexport interface NavListItemLinkBaseProps extends LinkBaseProps {\n /**\n * When the NavListItemLink is active, that means that we are in this option / page of the Nav.\n * active is optional.\n *\n * @value true\n * @value false\n */\n active?: boolean;\n}\n/**\n * NavListItemLink is an <a> element. It should be inside the NavListItem component.\n */\nexport const NavListItemLinkBase = React.forwardRef<\n HTMLAnchorElement,\n NavListItemLinkBaseProps\n>(function NavListItemLinkBase(\n { active, href, className, children, ...props },\n ref\n) {\n return (\n <LinkBase\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-nav__list-item-link': true,\n 'ds-nav__list-item-link--active': active,\n })}\n {...props}\n >\n {children}\n </LinkBase>\n );\n});\n\nexport default NavListItemLinkBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,gBAA+B;AAejC,MAAM,sBAAsB,MAAM,WAGvC,SAASA,qBACT,EAAE,QAAQ,MAAM,WAAW,UAAU,GAAG,MAAM,GAC9C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,kCAAkC;AAAA,MACpC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,8BAAQ;",
|
|
6
|
+
"names": ["NavListItemLinkBase"]
|
|
7
|
+
}
|
|
@@ -2,7 +2,5 @@ import { NotificationBannerLinkProps } from '@digigov/react-core/NotificationBan
|
|
|
2
2
|
interface AdditionalProps {
|
|
3
3
|
variant?: 'error' | 'success';
|
|
4
4
|
}
|
|
5
|
-
export declare const NotificationBannerLink: import("react").ForwardRefExoticComponent<Omit<NotificationBannerLinkProps & AdditionalProps &
|
|
6
|
-
className?: string;
|
|
7
|
-
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
5
|
+
export declare const NotificationBannerLink: import("react").ForwardRefExoticComponent<Omit<NotificationBannerLinkProps & AdditionalProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
8
6
|
export default NotificationBannerLink;
|
package/Table/index.d.ts
CHANGED
|
@@ -45,6 +45,15 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
45
45
|
* @default 'default'
|
|
46
46
|
*/
|
|
47
47
|
variant?: 'zebra' | 'default';
|
|
48
|
+
/**
|
|
49
|
+
* verticalAlign is optional.
|
|
50
|
+
* The verticalAlign property sets vertical alignment of the table-cells.
|
|
51
|
+
* @value 'top'
|
|
52
|
+
* @value 'middle'
|
|
53
|
+
* @value 'bottom'
|
|
54
|
+
* @default 'middle'
|
|
55
|
+
*/
|
|
56
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
59
|
* Table component is used to wrap the sub components of a table
|
package/Table/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const Table = React.forwardRef(
|
|
|
8
8
|
dense = false,
|
|
9
9
|
verticalBorders = false,
|
|
10
10
|
stacked = "never",
|
|
11
|
+
verticalAlign = "middle",
|
|
11
12
|
className,
|
|
12
13
|
children,
|
|
13
14
|
...props
|
|
@@ -26,7 +27,9 @@ const Table = React.forwardRef(
|
|
|
26
27
|
"ds-table--light": headerVariant === "light",
|
|
27
28
|
"ds-table--dense": dense,
|
|
28
29
|
"ds-table--zebra": variant === "zebra",
|
|
29
|
-
"ds-table--vertical-lines": verticalBorders
|
|
30
|
+
"ds-table--vertical-lines": verticalBorders,
|
|
31
|
+
"ds-table--align-top": verticalAlign === "top",
|
|
32
|
+
"ds-table--align-bottom": verticalAlign === "bottom"
|
|
30
33
|
}),
|
|
31
34
|
...props
|
|
32
35
|
},
|
package/Table/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Table/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
|
|
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 TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n /**\n * verticalAlign is optional.\n * The verticalAlign property sets vertical alignment of the table-cells.\n * @value 'top'\n * @value 'middle'\n * @value 'bottom'\n * @default 'middle'\n */\n verticalAlign?: 'top' | 'middle' | 'bottom';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n verticalAlign = 'middle',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n 'ds-table--align-top': verticalAlign === 'top',\n 'ds-table--align-bottom': verticalAlign === 'bottom',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA4DzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,UAC5B,uBAAuB,kBAAkB;AAAA,UACzC,0BAA0B,kBAAkB;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["Table"]
|
|
7
7
|
}
|
package/TableDataCell/index.d.ts
CHANGED
|
@@ -10,6 +10,19 @@ export interface TableDataCellProps extends BaseProps<'td'> {
|
|
|
10
10
|
* @default 'text'
|
|
11
11
|
*/
|
|
12
12
|
dataType?: 'text' | 'numeric';
|
|
13
|
+
/**
|
|
14
|
+
* variant is optional.
|
|
15
|
+
* Use this prop to control the bottom border of the table-cell.
|
|
16
|
+
* @value 'border'
|
|
17
|
+
* @value 'none'
|
|
18
|
+
* @default 'border'
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'border' | 'none';
|
|
21
|
+
/**
|
|
22
|
+
* wordBreak is optional.
|
|
23
|
+
* Use this prop to control the word break of the table-cell contents.
|
|
24
|
+
*/
|
|
25
|
+
wordBreak?: 'break-all' | 'none';
|
|
13
26
|
}
|
|
14
27
|
/**
|
|
15
28
|
* Use TableDataCell inside the Table component to fill the data of a cell in a table.
|
package/TableDataCell/index.js
CHANGED
|
@@ -1,7 +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 TableDataCell = React.forwardRef(function TableDataCell2({
|
|
4
|
+
const TableDataCell = React.forwardRef(function TableDataCell2({
|
|
5
|
+
dataType = "text",
|
|
6
|
+
variant = "border",
|
|
7
|
+
wordBreak = "none",
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) {
|
|
5
12
|
return /* @__PURE__ */ React.createElement(
|
|
6
13
|
Base,
|
|
7
14
|
{
|
|
@@ -9,6 +16,8 @@ const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "tex
|
|
|
9
16
|
ref,
|
|
10
17
|
className: clsx(className, {
|
|
11
18
|
"ds-table__cell": true,
|
|
19
|
+
"ds-table__cell--border": variant === "border",
|
|
20
|
+
"ds-table__cell--break-all": wordBreak === "break-all",
|
|
12
21
|
"ds-table__cell--numeric": dataType === "numeric"
|
|
13
22
|
}),
|
|
14
23
|
...props
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TableDataCell/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n {
|
|
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// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n /**\n * variant is optional.\n * Use this prop to control the bottom border of the table-cell.\n * @value 'border'\n * @value 'none'\n * @default 'border'\n */\n variant?: 'border' | 'none';\n /**\n * wordBreak is optional.\n * Use this prop to control the word break of the table-cell contents.\n */\n wordBreak?: 'break-all' | 'none';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n {\n dataType = 'text',\n variant = 'border',\n wordBreak = 'none',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--border': variant === 'border',\n 'ds-table__cell--break-all': wordBreak === 'break-all',\n 'ds-table__cell--numeric': dataType === 'numeric',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA8BzB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT;AAAA,EACE,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,kBAAkB;AAAA,QAClB,0BAA0B,YAAY;AAAA,QACtC,6BAA6B,cAAc;AAAA,QAC3C,2BAA2B,aAAa;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["TableDataCell"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement> &
|
|
2
|
-
className?: string;
|
|
3
|
-
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
2
|
export default TextArea;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> &
|
|
2
|
-
className?: string;
|
|
3
|
-
}, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
2
|
export default TextInput;
|
package/Typography/index.d.ts
CHANGED
|
@@ -26,5 +26,5 @@ export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | '
|
|
|
26
26
|
* Typography component is used as generic component for typography.
|
|
27
27
|
* Use Typography component to extend components such as Heading, NormalText Paragraph etc.
|
|
28
28
|
*/
|
|
29
|
-
export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
29
|
+
export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
30
30
|
export default Typography;
|
package/Typography/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
-
const Typography = React.forwardRef(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
);
|
|
4
|
+
const Typography = React.forwardRef(function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
|
|
5
|
+
return /* @__PURE__ */ React.createElement(
|
|
6
|
+
Base,
|
|
7
|
+
{
|
|
8
|
+
as,
|
|
9
|
+
ref,
|
|
10
|
+
className: clsx(className, {
|
|
11
|
+
[`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
|
|
12
|
+
[`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
|
|
13
|
+
}),
|
|
14
|
+
...props
|
|
15
|
+
},
|
|
16
|
+
children
|
|
17
|
+
);
|
|
18
|
+
});
|
|
21
19
|
var Typography_default = Typography;
|
|
22
20
|
export {
|
|
23
21
|
Typography,
|
package/Typography/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Typography/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<\n HTMLSpanElement | HTMLParagraphElement | HTMLHeadingElement,\n TypographyProps\n>(function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Typography;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM,WAG9B,SAASA,YACT,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,QAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,MACrD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["Typography"]
|
|
7
7
|
}
|
package/WarningText/index.d.ts
CHANGED
|
@@ -14,6 +14,13 @@ export interface WarningTextProps extends BaseProps<'div'> {
|
|
|
14
14
|
* @default false
|
|
15
15
|
* */
|
|
16
16
|
dense?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* strong is optional.
|
|
19
|
+
* @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.
|
|
20
|
+
* @value false WarningText will be a simple div element.
|
|
21
|
+
* @default true
|
|
22
|
+
* */
|
|
23
|
+
strong?: boolean;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* WarningText.
|
package/WarningText/index.js
CHANGED
|
@@ -3,7 +3,15 @@ import clsx from "clsx";
|
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
import { WarningTextAssistive } from "@digigov/react-core/WarningTextAssistive";
|
|
5
5
|
const WarningText = React.forwardRef(
|
|
6
|
-
function WarningText2({
|
|
6
|
+
function WarningText2({
|
|
7
|
+
className,
|
|
8
|
+
strong = true,
|
|
9
|
+
assistiveText = "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE",
|
|
10
|
+
dense,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) {
|
|
14
|
+
const Component = strong ? "strong" : "div";
|
|
7
15
|
return /* @__PURE__ */ React.createElement(
|
|
8
16
|
Base,
|
|
9
17
|
{
|
|
@@ -28,7 +36,7 @@ const WarningText = React.forwardRef(
|
|
|
28
36
|
/* @__PURE__ */ React.createElement(
|
|
29
37
|
Base,
|
|
30
38
|
{
|
|
31
|
-
as:
|
|
39
|
+
as: Component,
|
|
32
40
|
className: clsx({
|
|
33
41
|
"ds-warning-text__content": true
|
|
34
42
|
})
|
package/WarningText/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/WarningText/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';\nexport interface WarningTextProps extends BaseProps<'div'> {\n /**\n * assistiveText is optional.\n * Default value is \"\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE\".\n * assistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n assistiveText?: string;\n /**\n * dense is optional.\n * @value true WarningText will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n}\n/**\n * WarningText.\n * Use the WarningText component when you need to warn users about something important.\n * The component is used with a text inside it.\n */\nexport const WarningText = React.forwardRef<HTMLDivElement, WarningTextProps>(\n function WarningText(\n {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,4BAA4B;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';\nexport interface WarningTextProps extends BaseProps<'div'> {\n /**\n * assistiveText is optional.\n * Default value is \"\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE\".\n * assistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n assistiveText?: string;\n /**\n * dense is optional.\n * @value true WarningText will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * strong is optional.\n * @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.\n * @value false WarningText will be a simple div element.\n * @default true\n * */\n strong?: boolean;\n}\n/**\n * WarningText.\n * Use the WarningText component when you need to warn users about something important.\n * The component is used with a text inside it.\n */\nexport const WarningText = React.forwardRef<HTMLDivElement, WarningTextProps>(\n function WarningText(\n {\n className,\n strong = true,\n assistiveText = '\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE',\n dense,\n children,\n ...props\n },\n ref\n ) {\n const Component = strong ? 'strong' : 'div';\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-warning-text': true,\n 'ds-warning-text--dense': dense,\n })}\n {...props}\n >\n <Base\n as=\"div\"\n className={clsx({\n 'ds-warning-text__icon': true,\n })}\n >\n !\n </Base>\n\n <Base\n as={Component}\n className={clsx({\n 'ds-warning-text__content': true,\n })}\n >\n <WarningTextAssistive>{assistiveText}</WarningTextAssistive>\n {children}\n </Base>\n </Base>\n );\n }\n);\n\nexport default WarningText;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,SAAS,4BAA4B;AA4B9B,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,YAAY,SAAS,WAAW;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,0BAA0B;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,IAAG;AAAA,UACH,WAAW,KAAK;AAAA,YACd,yBAAyB;AAAA,UAC3B,CAAC;AAAA;AAAA,QACF;AAAA,MAED;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,IAAI;AAAA,UACJ,WAAW,KAAK;AAAA,YACd,4BAA4B;AAAA,UAC9B,CAAC;AAAA;AAAA,QAED,oCAAC,4BAAsB,aAAc;AAAA,QACpC;AAAA,MACH;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["WarningText"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var BackLinkBase_exports = {};
|
|
29
|
+
__export(BackLinkBase_exports, {
|
|
30
|
+
BackLinkBase: () => BackLinkBase,
|
|
31
|
+
default: () => BackLinkBase_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(BackLinkBase_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_clsx = __toESM(require("clsx"));
|
|
36
|
+
var import_LinkBase = require("@digigov/react-core/LinkBase");
|
|
37
|
+
var import_react_icons = require("@digigov/react-icons");
|
|
38
|
+
const BackLinkBase = import_react.default.forwardRef(function BackLinkBase2({ href, printHidden = true, className, children, ...props }, ref) {
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
40
|
+
import_LinkBase.LinkBase,
|
|
41
|
+
{
|
|
42
|
+
href,
|
|
43
|
+
printHidden,
|
|
44
|
+
defaultStyle: false,
|
|
45
|
+
onClick: () => !href && window.history.back(),
|
|
46
|
+
ref,
|
|
47
|
+
className: (0, import_clsx.default)(className, {
|
|
48
|
+
"ds-back-link": true
|
|
49
|
+
}),
|
|
50
|
+
tabIndex: 0,
|
|
51
|
+
...props
|
|
52
|
+
},
|
|
53
|
+
/* @__PURE__ */ import_react.default.createElement(import_react_icons.CaretIcon, { direction: "left" }),
|
|
54
|
+
children
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
var BackLinkBase_default = BackLinkBase;
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
BackLinkBase
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/BackLinkBase/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';\nimport { CaretIcon } from '@digigov/react-icons';\n\nexport interface BackLinkBaseProps extends LinkBaseProps {}\n/**\n * Use BackLinkBase component to help users go back to the previous page in a multi-page transaction.\n */\nexport const BackLinkBase = React.forwardRef<\n HTMLAnchorElement,\n BackLinkBaseProps\n>(function BackLinkBase(\n { href, printHidden = true, className, children, ...props },\n ref\n) {\n return (\n <LinkBase\n href={href}\n printHidden={printHidden}\n defaultStyle={false}\n onClick={() => !href && window.history.back()}\n ref={ref}\n className={clsx(className, {\n 'ds-back-link': true,\n })}\n tabIndex={0}\n {...props}\n >\n <CaretIcon direction={'left'} />\n {children}\n </LinkBase>\n );\n});\n\nexport default BackLinkBase;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,sBAAwC;AACxC,yBAA0B;AAMnB,MAAM,eAAe,aAAAA,QAAM,WAGhC,SAASC,cACT,EAAE,MAAM,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd,SAAS,MAAM,CAAC,QAAQ,OAAO,QAAQ,KAAK;AAAA,MAC5C;AAAA,MACA,eAAW,YAAAE,SAAK,WAAW;AAAA,QACzB,gBAAgB;AAAA,MAClB,CAAC;AAAA,MACD,UAAU;AAAA,MACT,GAAG;AAAA;AAAA,IAEJ,6BAAAF,QAAA,cAAC,gCAAU,WAAW,QAAQ;AAAA,IAC7B;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["React", "BackLinkBase", "clsx"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/Base/compat/Input/CheckboxInput.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type CheckboxInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const CheckboxInput = React.forwardRef<\n HTMLInputElement,\n CheckboxInputProps\n>(function CheckboxInput({ checked, value, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n currentTarget: {\n value,\n checked: !checked,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n return (\n // @ts-ignore\n <TouchableOpacity\n ref={ref as Ref<TouchableOpacity>}\n onPress={handlePress}\n {...props}\n >\n {checked && <View className=\"ds-checkboxes__input--checked\" />}\n </TouchableOpacity>\n );\n});\n\nexport default CheckboxInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAmE;AACnE,0BAAuC;AAOhC,MAAM,gBAAgB,aAAAA,QAAM,WAGjC,SAASC,eAAc,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,QAAM,cAAc,MAAM;AACxB,QAAI,UAAU;AACZ,YAAM,iBAAiB;AAAA,QACrB,eAAe;AAAA,UACb;AAAA,UACA,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AACA,eAAS,cAAc;AAAA,IACzB;AAAA,EACF;AACA;AAAA;AAAA,IAEE,6BAAAD,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAG;AAAA;AAAA,MAEH,WAAW,6BAAAA,QAAA,cAAC,4BAAK,WAAU,iCAAgC;AAAA,IAC9D;AAAA;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
|
|
6
6
|
"names": ["React", "CheckboxInput"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/Base/compat/Input/RadioInput.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type RadioInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ value, checked, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: value,\n checked: true,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <TouchableOpacity\n ref={ref as Ref<typeof TouchableOpacity>}\n onPress={handlePress}\n {...(props as any)}\n >\n {checked && <View className=\"ds-radios__input--checked\" />}\n </TouchableOpacity>\n );\n }\n);\n\nexport default RadioInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAmE;AACnE,0BAAuC;AAOhC,MAAM,aAAa,aAAAA,QAAM;AAAA,EAC9B,SAASC,YAAW,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/D,UAAM,cAAc,MAAM;AACxB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,WACE,6BAAAD,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,MAEJ,WAAW,6BAAAA,QAAA,cAAC,4BAAK,WAAU,6BAA4B;AAAA,IAC1D;AAAA,EAEJ;AACF;AAEA,IAAO,4BAAQ;",
|
|
6
6
|
"names": ["React", "RadioInput"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Base/index.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { useMemo, type JSX } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType,\n>(\n {\n as,\n display,\n children,\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 'aria-expanded': ariaExpanded,\n ...props\n }: BaseProps<C>,\n ref: React.ComponentPropsWithRef<C>['ref']\n) {\n const classNames = className?.split(' ') || [];\n let applyBasePropsToWrapper = true;\n\n const basePropToClassName = 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 });\n\n if (typeof children === 'string') {\n children = [children];\n }\n if (Array.isArray(children)) {\n const textClassNames = classNames\n ?.map((className) => `${className}__text`)\n .join(' ');\n children = children.map((child, index) => {\n if (Array.isArray(child)) {\n return child.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} className={textClassNames}>\n {child}\n </Text>\n );\n }\n return child;\n });\n } else if (typeof child === 'string') {\n if (as && textHtmlTags.includes(as as string)) {\n applyBasePropsToWrapper = false;\n }\n return (\n <Text\n key={index}\n className={\n applyBasePropsToWrapper\n ? textClassNames\n : `${textClassNames} ${basePropToClassName}`\n }\n {...(props.onClick && {\n onPress: props.onClick,\n })}\n >\n {child}\n </Text>\n );\n }\n return child;\n });\n }\n const Component = useMemo(() => {\n const C = mapping[as as keyof JSX.IntrinsicElements] || View;\n if (\n classNames.find((className) =>\n className.match(/__wrapper|__before|__after$/)\n )\n ) {\n return wrap(C);\n }\n return C;\n }, [className]);\n\n Object.keys(props).forEach((k) => {\n if (k.startsWith('aria')) {\n if (BooleanMapper[props[k as keyof typeof props]] !== undefined) {\n props[k as keyof typeof props] =\n BooleanMapper[props[k as keyof typeof props]];\n }\n }\n });\n return (\n <Component\n {...props}\n ref={ref}\n aria-expanded={\n (ariaExpanded as unknown as string) === 'false'\n ? false\n : ariaExpanded === true\n ? true\n : undefined\n }\n className={\n applyBasePropsToWrapper\n ? `${basePropToClassName} ${className}`\n : className\n }\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["React", "Base", "className", "child", "index"]
|
|
7
7
|
}
|