@pagopa/io-app-design-system 1.16.0 → 1.17.0
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/README.md +131 -54
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +6 -2
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/codeInput/CodeInput.js +103 -0
- package/lib/commonjs/components/codeInput/CodeInput.js.map +1 -0
- package/lib/commonjs/components/codeInput/index.js +17 -0
- package/lib/commonjs/components/codeInput/index.js.map +1 -0
- package/lib/commonjs/components/icons/Icon.js +2 -0
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/README.md +79 -19
- package/lib/commonjs/components/icons/svg/IconSparkles.js +30 -0
- package/lib/commonjs/components/icons/svg/IconSparkles.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/lib/commonjs/components/index.js +48 -26
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +5 -4
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +4 -3
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +87 -0
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemInfo.js +18 -14
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +5 -30
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +15 -23
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +4 -22
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +69 -10
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +64 -0
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemTransaction.js +8 -5
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +17 -0
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/listitems/index.js +22 -0
- package/lib/commonjs/components/listitems/index.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js +103 -0
- package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -0
- package/lib/commonjs/components/modules/index.js +11 -0
- package/lib/commonjs/components/modules/index.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberPad.js +7 -10
- package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
- package/lib/commonjs/components/pictograms/Pictogram.js +19 -1
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/pictograms/README.md +103 -14
- package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js +82 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js +43 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js +64 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js +15 -9
- package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js +79 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js +60 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js +58 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEnded.js +43 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEnded.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js +58 -0
- package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramPending.js +15 -9
- package/lib/commonjs/components/pictograms/svg/PictogramPending.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js +91 -0
- package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/lib/commonjs/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/lib/commonjs/components/radio/RadioGroup.js +2 -1
- package/lib/commonjs/components/radio/RadioGroup.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +52 -0
- package/lib/commonjs/components/stepper/Stepper.js.map +1 -0
- package/lib/commonjs/components/stepper/index.js +17 -0
- package/lib/commonjs/components/stepper/index.js.map +1 -0
- package/lib/commonjs/components/typography/H1.js +5 -3
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +5 -3
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +5 -3
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +2 -1
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +4 -2
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +7 -3
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmall.js +6 -1
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmallAlt.js +39 -0
- package/lib/commonjs/components/typography/LabelSmallAlt.js.map +1 -0
- package/lib/commonjs/components/typography/README.md +23 -0
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/lib/commonjs/components/typography/index.js +11 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -2
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/codeInput/CodeInput.js +94 -0
- package/lib/module/components/codeInput/CodeInput.js.map +1 -0
- package/lib/module/components/codeInput/index.js +2 -0
- package/lib/module/components/codeInput/index.js.map +1 -0
- package/lib/module/components/icons/Icon.js +2 -0
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/README.md +79 -19
- package/lib/module/components/icons/svg/IconSparkles.js +21 -0
- package/lib/module/components/icons/svg/IconSparkles.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/lib/module/components/index.js +5 -3
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +5 -4
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +4 -3
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +77 -0
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -0
- package/lib/module/components/listitems/ListItemInfo.js +18 -14
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +7 -32
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +17 -26
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +6 -24
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +69 -10
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +54 -0
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -0
- package/lib/module/components/listitems/ListItemTransaction.js +10 -7
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/lib/module/components/listitems/__test__/listitem.test.js +17 -0
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/listitems/index.js +2 -0
- package/lib/module/components/listitems/index.js.map +1 -1
- package/lib/module/components/modules/ModuleCheckout.js +95 -0
- package/lib/module/components/modules/ModuleCheckout.js.map +1 -0
- package/lib/module/components/modules/index.js +1 -0
- package/lib/module/components/modules/index.js.map +1 -1
- package/lib/module/components/numberpad/NumberPad.js +6 -7
- package/lib/module/components/numberpad/NumberPad.js.map +1 -1
- package/lib/module/components/pictograms/Pictogram.js +19 -1
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/pictograms/README.md +103 -14
- package/lib/module/components/pictograms/svg/PictogramBiometric.js +74 -0
- package/lib/module/components/pictograms/svg/PictogramBiometric.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedEnded.js +35 -0
- package/lib/module/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js +56 -0
- package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedPending.js +15 -9
- package/lib/module/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js +71 -0
- package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js +52 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js +50 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEnded.js +35 -0
- package/lib/module/components/pictograms/svg/PictogramEnded.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramLostConnection.js +50 -0
- package/lib/module/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramPending.js +15 -9
- package/lib/module/components/pictograms/svg/PictogramPending.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramQrCode.js +83 -0
- package/lib/module/components/pictograms/svg/PictogramQrCode.js.map +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/lib/module/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/lib/module/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/lib/module/components/radio/RadioGroup.js +2 -1
- package/lib/module/components/radio/RadioGroup.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +43 -0
- package/lib/module/components/stepper/Stepper.js.map +1 -0
- package/lib/module/components/stepper/index.js +2 -0
- package/lib/module/components/stepper/index.js.map +1 -0
- package/lib/module/components/typography/H1.js +5 -3
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +5 -3
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +5 -3
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +2 -1
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -2
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +7 -3
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/LabelSmall.js +6 -1
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/LabelSmallAlt.js +32 -0
- package/lib/module/components/typography/LabelSmallAlt.js.map +1 -0
- package/lib/module/components/typography/README.md +23 -0
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/lib/module/components/typography/index.js +1 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/codeInput/CodeInput.d.ts +11 -0
- package/lib/typescript/components/codeInput/CodeInput.d.ts.map +1 -0
- package/lib/typescript/components/codeInput/index.d.ts +2 -0
- package/lib/typescript/components/codeInput/index.d.ts.map +1 -0
- package/lib/typescript/components/icons/Icon.d.ts +1 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconSparkles.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSparkles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +5 -3
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts +34 -0
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemInfo.d.ts +8 -3
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts +4 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts +2 -2
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts +21 -3
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts +13 -0
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/index.d.ts +2 -0
- package/lib/typescript/components/listitems/index.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCheckout.d.ts +15 -0
- package/lib/typescript/components/modules/ModuleCheckout.d.ts.map +1 -0
- package/lib/typescript/components/modules/index.d.ts +1 -0
- package/lib/typescript/components/modules/index.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts +2 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts +7 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedPending.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramPending.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts.map +1 -0
- package/lib/typescript/components/radio/RadioGroup.d.ts +4 -3
- package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/components/stepper/Stepper.d.ts +8 -0
- package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -0
- package/lib/typescript/components/stepper/index.d.ts +2 -0
- package/lib/typescript/components/stepper/index.d.ts.map +1 -0
- package/lib/typescript/components/typography/H1.d.ts +1 -1
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +1 -1
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +1 -1
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +1 -1
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts +14 -0
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +1 -0
- package/lib/typescript/components/typography/index.d.ts +1 -0
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/package.json +9 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/src/components/checkbox/AnimatedCheckbox.tsx +6 -4
- package/src/components/codeInput/CodeInput.tsx +121 -0
- package/src/components/codeInput/index.tsx +1 -0
- package/src/components/icons/Icon.tsx +2 -0
- package/src/components/icons/README.md +79 -19
- package/src/components/icons/svg/IconSparkles.tsx +14 -0
- package/src/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/src/components/index.tsx +5 -3
- package/src/components/layout/HeaderSecondLevel.tsx +6 -9
- package/src/components/listitems/ListItemAction.tsx +4 -3
- package/src/components/listitems/ListItemHeader.tsx +146 -0
- package/src/components/listitems/ListItemInfo.tsx +33 -16
- package/src/components/listitems/ListItemInfoCopy.tsx +14 -57
- package/src/components/listitems/ListItemNav.tsx +32 -44
- package/src/components/listitems/ListItemNavAlert.tsx +21 -42
- package/src/components/listitems/ListItemRadio.tsx +99 -12
- package/src/components/listitems/ListItemRadioWithAmount.tsx +69 -0
- package/src/components/listitems/ListItemTransaction.tsx +12 -7
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/src/components/listitems/__test__/listitem.test.tsx +21 -0
- package/src/components/listitems/index.tsx +2 -0
- package/src/components/modules/ModuleCheckout.tsx +98 -0
- package/src/components/modules/index.tsx +1 -0
- package/src/components/numberpad/NumberPad.tsx +7 -8
- package/src/components/pictograms/Pictogram.tsx +23 -2
- package/src/components/pictograms/README.md +103 -14
- package/src/components/pictograms/svg/PictogramBiometric.tsx +78 -0
- package/src/components/pictograms/svg/PictogramBleedEnded.tsx +38 -0
- package/src/components/pictograms/svg/PictogramBleedLostConnection.tsx +66 -0
- package/src/components/pictograms/svg/PictogramBleedPending.tsx +17 -9
- package/src/components/pictograms/svg/PictogramBleedQrCode.tsx +86 -0
- package/src/components/pictograms/svg/PictogramEmailDotCheck.tsx +53 -0
- package/src/components/pictograms/svg/PictogramEmailDotNotif.tsx +51 -0
- package/src/components/pictograms/svg/PictogramEnded.tsx +34 -0
- package/src/components/pictograms/svg/PictogramLostConnection.tsx +58 -0
- package/src/components/pictograms/svg/PictogramPending.tsx +17 -9
- package/src/components/pictograms/svg/PictogramQrCode.tsx +102 -0
- package/src/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/src/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/src/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/src/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/src/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/src/components/radio/RadioGroup.tsx +5 -4
- package/src/components/stepper/Stepper.tsx +62 -0
- package/src/components/stepper/index.tsx +1 -0
- package/src/components/typography/H1.tsx +8 -3
- package/src/components/typography/H2.tsx +8 -3
- package/src/components/typography/H3.tsx +8 -3
- package/src/components/typography/H4.tsx +5 -1
- package/src/components/typography/H6.tsx +6 -1
- package/src/components/typography/Hero.tsx +10 -3
- package/src/components/typography/LabelSmall.tsx +8 -1
- package/src/components/typography/LabelSmallAlt.tsx +51 -0
- package/src/components/typography/README.md +23 -0
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/src/components/typography/index.tsx +1 -0
- package/lib/commonjs/components/icons/generateNewIcons.js +0 -165
- package/lib/commonjs/components/icons/generateNewIcons.js.map +0 -1
- package/lib/commonjs/components/icons/generateNewTimestamp.js +0 -8
- package/lib/commonjs/components/icons/generateNewTimestamp.js.map +0 -1
- package/lib/commonjs/components/icons/timestamp.txt +0 -1
- package/lib/commonjs/components/pictograms/generateNewPictograms.js +0 -163
- package/lib/commonjs/components/pictograms/generateNewPictograms.js.map +0 -1
- package/lib/commonjs/components/pictograms/timestamp.txt +0 -1
- package/lib/commonjs/stories/ButtonDS.stories.js +0 -34
- package/lib/commonjs/stories/ButtonDS.stories.js.map +0 -1
- package/lib/commonjs/stories/H1.stories.js +0 -33
- package/lib/commonjs/stories/H1.stories.js.map +0 -1
- package/lib/commonjs/stories/H2.stories.js +0 -33
- package/lib/commonjs/stories/H2.stories.js.map +0 -1
- package/lib/commonjs/stories/H3.stories.js +0 -33
- package/lib/commonjs/stories/H3.stories.js.map +0 -1
- package/lib/commonjs/stories/H4.stories.js +0 -33
- package/lib/commonjs/stories/H4.stories.js.map +0 -1
- package/lib/commonjs/stories/H5.stories.js +0 -33
- package/lib/commonjs/stories/H5.stories.js.map +0 -1
- package/lib/commonjs/stories/H6.stories.js +0 -33
- package/lib/commonjs/stories/H6.stories.js.map +0 -1
- package/lib/commonjs/stories/Label.stories.js +0 -33
- package/lib/commonjs/stories/Label.stories.js.map +0 -1
- package/lib/commonjs/stories/LabelSmall.stories.js +0 -33
- package/lib/commonjs/stories/LabelSmall.stories.js.map +0 -1
- package/lib/commonjs/stories/Link.stories.js +0 -33
- package/lib/commonjs/stories/Link.stories.js.map +0 -1
- package/lib/commonjs/stories/ModuleIDP.stories.js +0 -45
- package/lib/commonjs/stories/ModuleIDP.stories.js.map +0 -1
- package/lib/commonjs/stories/Monospace.stories.js +0 -33
- package/lib/commonjs/stories/Monospace.stories.js.map +0 -1
- package/lib/module/components/icons/generateNewIcons.js +0 -163
- package/lib/module/components/icons/generateNewIcons.js.map +0 -1
- package/lib/module/components/icons/generateNewTimestamp.js +0 -6
- package/lib/module/components/icons/generateNewTimestamp.js.map +0 -1
- package/lib/module/components/icons/timestamp.txt +0 -1
- package/lib/module/components/pictograms/generateNewPictograms.js +0 -161
- package/lib/module/components/pictograms/generateNewPictograms.js.map +0 -1
- package/lib/module/components/pictograms/timestamp.txt +0 -1
- package/lib/module/stories/ButtonDS.stories.js +0 -27
- package/lib/module/stories/ButtonDS.stories.js.map +0 -1
- package/lib/module/stories/H1.stories.js +0 -26
- package/lib/module/stories/H1.stories.js.map +0 -1
- package/lib/module/stories/H2.stories.js +0 -26
- package/lib/module/stories/H2.stories.js.map +0 -1
- package/lib/module/stories/H3.stories.js +0 -26
- package/lib/module/stories/H3.stories.js.map +0 -1
- package/lib/module/stories/H4.stories.js +0 -26
- package/lib/module/stories/H4.stories.js.map +0 -1
- package/lib/module/stories/H5.stories.js +0 -26
- package/lib/module/stories/H5.stories.js.map +0 -1
- package/lib/module/stories/H6.stories.js +0 -26
- package/lib/module/stories/H6.stories.js.map +0 -1
- package/lib/module/stories/Label.stories.js +0 -26
- package/lib/module/stories/Label.stories.js.map +0 -1
- package/lib/module/stories/LabelSmall.stories.js +0 -26
- package/lib/module/stories/LabelSmall.stories.js.map +0 -1
- package/lib/module/stories/Link.stories.js +0 -26
- package/lib/module/stories/Link.stories.js.map +0 -1
- package/lib/module/stories/ModuleIDP.stories.js +0 -37
- package/lib/module/stories/ModuleIDP.stories.js.map +0 -1
- package/lib/module/stories/Monospace.stories.js +0 -26
- package/lib/module/stories/Monospace.stories.js.map +0 -1
- package/lib/typescript/stories/ButtonDS.stories.d.ts +0 -14
- package/lib/typescript/stories/ButtonDS.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H1.stories.d.ts +0 -19
- package/lib/typescript/stories/H1.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H2.stories.d.ts +0 -19
- package/lib/typescript/stories/H2.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H3.stories.d.ts +0 -19
- package/lib/typescript/stories/H3.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H4.stories.d.ts +0 -19
- package/lib/typescript/stories/H4.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H5.stories.d.ts +0 -19
- package/lib/typescript/stories/H5.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H6.stories.d.ts +0 -19
- package/lib/typescript/stories/H6.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Label.stories.d.ts +0 -21
- package/lib/typescript/stories/Label.stories.d.ts.map +0 -1
- package/lib/typescript/stories/LabelSmall.stories.d.ts +0 -21
- package/lib/typescript/stories/LabelSmall.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Link.stories.d.ts +0 -21
- package/lib/typescript/stories/Link.stories.d.ts.map +0 -1
- package/lib/typescript/stories/ModuleIDP.stories.d.ts +0 -24
- package/lib/typescript/stories/ModuleIDP.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Monospace.stories.d.ts +0 -19
- package/lib/typescript/stories/Monospace.stories.d.ts.map +0 -1
- package/src/components/icons/generateNewIcons.js +0 -186
- package/src/components/icons/generateNewTimestamp.js +0 -7
- package/src/components/icons/timestamp.txt +0 -1
- package/src/components/pictograms/generateNewPictograms.js +0 -181
- package/src/components/pictograms/timestamp.txt +0 -1
- package/src/stories/ButtonDS.stories.ts +0 -31
- package/src/stories/H1.stories.ts +0 -28
- package/src/stories/H2.stories.ts +0 -28
- package/src/stories/H3.stories.ts +0 -28
- package/src/stories/H4.stories.ts +0 -28
- package/src/stories/H5.stories.ts +0 -28
- package/src/stories/H6.stories.ts +0 -28
- package/src/stories/Label.stories.ts +0 -28
- package/src/stories/LabelSmall.stories.ts +0 -28
- package/src/stories/Link.stories.ts +0 -28
- package/src/stories/ModuleIDP.stories.tsx +0 -44
- package/src/stories/Monospace.stories.ts +0 -28
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Link.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAUwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ImageSourcePropType } from "react-native";
|
|
4
|
-
declare const meta: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: ({ name, localLogo, logo, withLooseSpacing, onPress, testID }: import("../components/modules/ModuleIDP").default) => React.JSX.Element;
|
|
7
|
-
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
8
|
-
name: string;
|
|
9
|
-
localLogo: ImageSourcePropType;
|
|
10
|
-
logo: ImageSourcePropType;
|
|
11
|
-
accessibilityLabel?: string | undefined;
|
|
12
|
-
onPress?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
13
|
-
withLooseSpacing?: boolean | undefined;
|
|
14
|
-
testID?: string | undefined;
|
|
15
|
-
}>) => React.JSX.Element)[];
|
|
16
|
-
parameters: {
|
|
17
|
-
layout: string;
|
|
18
|
-
};
|
|
19
|
-
tags: string[];
|
|
20
|
-
};
|
|
21
|
-
export default meta;
|
|
22
|
-
type Story = StoryObj<typeof meta>;
|
|
23
|
-
export declare const Primary: Story;
|
|
24
|
-
//# sourceMappingURL=ModuleIDP.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleIDP.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/ModuleIDP.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAkBwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: (props: Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"Medium", "bluegrey" | "bluegreyDark"> & {
|
|
6
|
-
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
|
-
}) => import("react").JSX.Element;
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
actions: {
|
|
11
|
-
argTypesRegex: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
tags: string[];
|
|
15
|
-
};
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof meta>;
|
|
18
|
-
export declare const Primary: Story;
|
|
19
|
-
//# sourceMappingURL=Monospace.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Monospace.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Monospace.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;CAU4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
DRAFT for an AUTOMATIC process to generate new icon components
|
|
7
|
-
(`Icon....tsx`) from the SVG files exported from Figma.
|
|
8
|
-
|
|
9
|
-
Prerequisites:
|
|
10
|
-
- The icon must be exported from the 24 × 24 frame
|
|
11
|
-
- The icon must be saved with the final name
|
|
12
|
-
- To learn more about naming conventions, please read the local README
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// STEPS:
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 1. Only process the newly added files
|
|
19
|
-
*
|
|
20
|
-
* Suggested path:
|
|
21
|
-
* 1. Files that need to be processed must be in the `svg/originals` folder.
|
|
22
|
-
* 2. Add a new file with the timestamp of the last process run.
|
|
23
|
-
* The file must be committed along with others.
|
|
24
|
-
* 3. Only files added after that timestamp value will be processed.
|
|
25
|
-
* 4. After the process run, update the new file with the current timestamp.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 2. Optimize SVG files with SVGO package (https://github.com/svg/svgo)
|
|
30
|
-
*
|
|
31
|
-
* Suggested path:
|
|
32
|
-
* 1. Add `svgo` to the `package.json` to use it as an executable
|
|
33
|
-
* 2. Configure it with the following parameters:
|
|
34
|
-
* - removeDimensions
|
|
35
|
-
* - removeRasterImages
|
|
36
|
-
* - removeScriptElement
|
|
37
|
-
* - removeViewBox (disabled)
|
|
38
|
-
* 3. Overwrite the original files
|
|
39
|
-
* 4. Optionally save the old ones in a `tmp` folder, which may be useful
|
|
40
|
-
* for debugging purposes.
|
|
41
|
-
* - Consider adding a `--debug' flag to the
|
|
42
|
-
* command to enable this behavior.
|
|
43
|
-
* - Add the `tmp` folder to `.gitignore` to keep the folder clean
|
|
44
|
-
* 5. Check the files after the optimizations
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 3. Create the relative React component (with .tsx)
|
|
49
|
-
*
|
|
50
|
-
* Suggested path:
|
|
51
|
-
* - For every new SVG file:
|
|
52
|
-
* 1. Copy all the code contained in the `<svg>` tag
|
|
53
|
-
* 2. Use the file `_IconTemplate.tsx` as component template
|
|
54
|
-
* - Replace `IconTemplate` with the original SVG name
|
|
55
|
-
* - Remove all the comments inserted in the component file
|
|
56
|
-
* 3. Replace the `{SVGContent}` placeholder with the code copied
|
|
57
|
-
* in the step 1, replacing all the tags with the appropriate
|
|
58
|
-
* React ones. E.g: `path` becomes `Path` and so on…
|
|
59
|
-
* 4. Replace all the color values, set in hexadecimal format, with the
|
|
60
|
-
* `currentColor` attribute.
|
|
61
|
-
* E.g: fill="#CCCCCC" -> fill="currentColor"
|
|
62
|
-
* 5. Save a new file in the `svg` folder with the same filename
|
|
63
|
-
* of the relative SVG file and extension `.tsx`.
|
|
64
|
-
* E.g: svg/originals/IconProfile.svg -> svg/IconProfile.tsx
|
|
65
|
-
* 6. Save the list of processed SVG files and corresponding generated
|
|
66
|
-
* React components to a separate file. Add it to the `.gitignore`
|
|
67
|
-
* to keep the folder clean.
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
const path = require("path");
|
|
71
|
-
const join = path.join;
|
|
72
|
-
const { optimize } = require("svgo");
|
|
73
|
-
const prettier = require("prettier");
|
|
74
|
-
const fs = require("fs-extra");
|
|
75
|
-
const { transform } = require("@svgr/core");
|
|
76
|
-
|
|
77
|
-
const svgDir = join(__dirname, "svg/originals");
|
|
78
|
-
const tsxDir = join(__dirname, "svg");
|
|
79
|
-
const templateFilePath = join(__dirname, "svg/_IconTemplate.tsx");
|
|
80
|
-
const timestampFilePath = join(__dirname, "timestamp.txt");
|
|
81
|
-
|
|
82
|
-
const convertTimestampToReadableFormat = timestamp =>
|
|
83
|
-
new Date(timestamp).toLocaleString("it-IT", {
|
|
84
|
-
timeZone: "Europe/Rome"
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
fs.readFile(timestampFilePath, "utf8", (err, timestamp) => {
|
|
88
|
-
if (err) {
|
|
89
|
-
console.log("Timestamp file not found.");
|
|
90
|
-
throw err;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
console.log(
|
|
94
|
-
"Last processed timestamp:",
|
|
95
|
-
convertTimestampToReadableFormat(timestamp)
|
|
96
|
-
);
|
|
97
|
-
console.log(`————————————————`);
|
|
98
|
-
|
|
99
|
-
fs.readdir(svgDir, (err, files) => {
|
|
100
|
-
if (err) {
|
|
101
|
-
throw err;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
files.forEach(file => {
|
|
105
|
-
const filePath = join(svgDir, file);
|
|
106
|
-
const fileStats = fs.statSync(filePath);
|
|
107
|
-
|
|
108
|
-
/* Only process files with a more recent creation
|
|
109
|
-
date later than the timestamp value */
|
|
110
|
-
if (fileStats.mtime > new Date(timestamp)) {
|
|
111
|
-
const data = fs.readFileSync(filePath, "utf8");
|
|
112
|
-
|
|
113
|
-
// Check if the file is an SVG
|
|
114
|
-
if (!file.endsWith(".svg")) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Using SVGO to optimize the SVG
|
|
119
|
-
const result = optimize(data, {
|
|
120
|
-
path: filePath,
|
|
121
|
-
plugins: [
|
|
122
|
-
"removeDimensions",
|
|
123
|
-
"removeRasterImages",
|
|
124
|
-
"removeScriptElement",
|
|
125
|
-
"removeViewBox"
|
|
126
|
-
]
|
|
127
|
-
});
|
|
128
|
-
// Overwrite original SVG file with optimized code
|
|
129
|
-
fs.writeFileSync(filePath, result.data);
|
|
130
|
-
|
|
131
|
-
// Convert SVG to JSX using `svgr`
|
|
132
|
-
const jsxCode = transform.sync(result.data, {
|
|
133
|
-
// Optimize SVG code using SVGO
|
|
134
|
-
svgo: true,
|
|
135
|
-
svgoConfig: {
|
|
136
|
-
removeRasterImages: true,
|
|
137
|
-
removeScriptElement: true,
|
|
138
|
-
removeUselessDefs: true
|
|
139
|
-
},
|
|
140
|
-
// Transform tags in Capital Case for React Native
|
|
141
|
-
native: true,
|
|
142
|
-
// Remove `width` and `height` attrs
|
|
143
|
-
dimensions: false,
|
|
144
|
-
/* Prettify the result */
|
|
145
|
-
plugins: ["@svgr/plugin-jsx"]
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
/* Replace hardcoded color value with `currentColor` */
|
|
149
|
-
const jsxCodeWithoutHardcodedColors = jsxCode.replace(
|
|
150
|
-
/fill="[^"]*"/g,
|
|
151
|
-
'fill="currentColor"'
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
// Extract only the Path tags from the JSX code
|
|
155
|
-
const pathTagRegex = /<Path[^>]*\/>/g;
|
|
156
|
-
const pathTags = jsxCodeWithoutHardcodedColors.match(pathTagRegex);
|
|
157
|
-
const jsxCodeWithPathOnly = pathTags.join("");
|
|
158
|
-
|
|
159
|
-
const template = fs.readFileSync(templateFilePath, "utf8");
|
|
160
|
-
const componentData = template
|
|
161
|
-
.replace(/IconTemplate/g, file.replace(".svg", ""))
|
|
162
|
-
.replace(/\/\/.*\n/g, "") // Remove lines starting with //
|
|
163
|
-
.replace(`{/* SVGContent */}`, jsxCodeWithPathOnly);
|
|
164
|
-
|
|
165
|
-
const fileWithTsxExtension = file.replace(".svg", ".tsx");
|
|
166
|
-
const tsxFilePath = join(tsxDir, fileWithTsxExtension);
|
|
167
|
-
fs.writeFileSync(
|
|
168
|
-
tsxFilePath,
|
|
169
|
-
prettier.format(componentData, { parser: "typescript" })
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
console.log(`${file} → ${fileWithTsxExtension}`);
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
const newTimestamp = new Date();
|
|
177
|
-
const convertedISOTimestamp = newTimestamp.toISOString();
|
|
178
|
-
fs.writeFileSync(timestampFilePath, convertedISOTimestamp);
|
|
179
|
-
|
|
180
|
-
const readableUpdatedTimestamp =
|
|
181
|
-
convertTimestampToReadableFormat(newTimestamp);
|
|
182
|
-
|
|
183
|
-
console.log(`————————————————`);
|
|
184
|
-
console.log("Updated timestamp:", readableUpdatedTimestamp);
|
|
185
|
-
});
|
|
186
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2023-10-30T09:55:59.147Z
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
DRAFT for an AUTOMATIC process to generate new pictogram components
|
|
7
|
-
(`Pictogram....tsx`) from the SVG files exported from Figma.
|
|
8
|
-
|
|
9
|
-
Prerequisites:
|
|
10
|
-
- The pictogram must be exported from the 240 × 240 frame
|
|
11
|
-
- The pictogram must be saved with the final name
|
|
12
|
-
- To learn more about naming conventions, please read the local README
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// STEPS:
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 1. Only process the newly added files
|
|
19
|
-
*
|
|
20
|
-
* Suggested path:
|
|
21
|
-
* 1. Files that need to be processed must be in the `svg/originals` folder.
|
|
22
|
-
* 2. Add a new file with the timestamp of the last process run.
|
|
23
|
-
* The file must be committed along with others.
|
|
24
|
-
* 3. Only files added after that timestamp value will be processed.
|
|
25
|
-
* 4. After the process run, update the new file with the current timestamp.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 2. Optimize SVG files with SVGO package (https://github.com/svg/svgo)
|
|
30
|
-
*
|
|
31
|
-
* Suggested path:
|
|
32
|
-
* 1. Add `svgo` to the `package.json` to use it as an executable
|
|
33
|
-
* 2. Configure it with the following parameters:
|
|
34
|
-
* - removeDimensions
|
|
35
|
-
* - removeRasterImages
|
|
36
|
-
* - removeScriptElement
|
|
37
|
-
* - removeViewBox (disabled)
|
|
38
|
-
* 3. Overwrite the original files
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 3. Create the relative React component (with .tsx)
|
|
43
|
-
*
|
|
44
|
-
* Suggested path:
|
|
45
|
-
* - For every new SVG file:
|
|
46
|
-
* 1. Copy all the code contained in the `<svg>` tag
|
|
47
|
-
* 2. Use the file `_PictogramTemplate.tsx` as component template
|
|
48
|
-
* - Replace `PictogramTemplate` with the original SVG name
|
|
49
|
-
* - Remove all the comments inserted in the component file
|
|
50
|
-
* 3. Replace the `{SVGContent}` placeholder with the code copied
|
|
51
|
-
* in the step 1, replacing all the tags with the appropriate
|
|
52
|
-
* React ones. E.g: `path` becomes `Path` and so on…
|
|
53
|
-
* 4. Replace all the color values, set in hexadecimal format, with the
|
|
54
|
-
* correct `colorValues…` chromatic value.
|
|
55
|
-
* E.g: fill="#CCCCCC" -> fill="colorValues.hands"
|
|
56
|
-
* 5. Save a new file in the `svg` folder with the same filename
|
|
57
|
-
* of the relative SVG file and extension `.tsx`.
|
|
58
|
-
* E.g: svg/originals/PictogramProfile.svg -> svg/PictogramProfile.tsx
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
const path = require("path");
|
|
62
|
-
const join = path.join;
|
|
63
|
-
const { optimize } = require("svgo");
|
|
64
|
-
const prettier = require("prettier");
|
|
65
|
-
const fs = require("fs-extra");
|
|
66
|
-
const { transform } = require("@svgr/core");
|
|
67
|
-
|
|
68
|
-
const svgDir = join(__dirname, "svg/originals");
|
|
69
|
-
const tsxDir = join(__dirname, "svg");
|
|
70
|
-
const templateFilePath = join(__dirname, "svg/_PictogramTemplate.tsx");
|
|
71
|
-
const timestampFilePath = join(__dirname, "timestamp.txt");
|
|
72
|
-
|
|
73
|
-
const colorMapValues = {
|
|
74
|
-
"#0B3EE3": "{colorValues.hands}",
|
|
75
|
-
"#AAEEEF": "{colorValues.main}",
|
|
76
|
-
"#00C5CA": "{colorValues.secondary}"
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const convertTimestampToReadableFormat = timestamp =>
|
|
80
|
-
new Date(timestamp).toLocaleString("it-IT", {
|
|
81
|
-
timeZone: "Europe/Rome"
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
fs.readFile(timestampFilePath, "utf8", (err, timestamp) => {
|
|
85
|
-
if (err) {
|
|
86
|
-
console.log("Timestamp file not found.");
|
|
87
|
-
throw err;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
console.log(
|
|
91
|
-
"Last processed timestamp:",
|
|
92
|
-
convertTimestampToReadableFormat(timestamp)
|
|
93
|
-
);
|
|
94
|
-
console.log(`————————————————`);
|
|
95
|
-
|
|
96
|
-
fs.readdir(svgDir, (err, files) => {
|
|
97
|
-
if (err) {
|
|
98
|
-
throw err;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
files.forEach(file => {
|
|
102
|
-
const filePath = join(svgDir, file);
|
|
103
|
-
const fileStats = fs.statSync(filePath);
|
|
104
|
-
|
|
105
|
-
/* Only process files with a more recent creation
|
|
106
|
-
date later than the timestamp value */
|
|
107
|
-
if (fileStats.mtime > new Date(timestamp)) {
|
|
108
|
-
const data = fs.readFileSync(filePath, "utf8");
|
|
109
|
-
|
|
110
|
-
// Check if the file is an SVG
|
|
111
|
-
if (!file.endsWith(".svg")) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Using SVGO to optimize the SVG
|
|
116
|
-
const result = optimize(data, {
|
|
117
|
-
path: filePath,
|
|
118
|
-
plugins: [
|
|
119
|
-
"removeDimensions",
|
|
120
|
-
"removeRasterImages",
|
|
121
|
-
"removeScriptElement",
|
|
122
|
-
"removeUselessDefs"
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
// Overwrite original SVG file with optimized code
|
|
126
|
-
fs.writeFileSync(filePath, result.data);
|
|
127
|
-
|
|
128
|
-
// Convert SVG to JSX using `svgr`
|
|
129
|
-
const jsxCode = transform.sync(result.data, {
|
|
130
|
-
// Optimize SVG code using SVGO
|
|
131
|
-
svgo: true,
|
|
132
|
-
svgoConfig: {
|
|
133
|
-
removeRasterImages: true,
|
|
134
|
-
removeScriptElement: true,
|
|
135
|
-
removeUselessDefs: true
|
|
136
|
-
},
|
|
137
|
-
// Transform tags in Capital Case for React Native
|
|
138
|
-
native: true,
|
|
139
|
-
// Remove `width` and `height` attrs
|
|
140
|
-
dimensions: false,
|
|
141
|
-
/* Replace the hardcoded color value with one
|
|
142
|
-
obtained from `colorMapValues`. */
|
|
143
|
-
replaceAttrValues: colorMapValues,
|
|
144
|
-
/* Prettify the result */
|
|
145
|
-
plugins: ["@svgr/plugin-jsx"]
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
// Extract only the Path tags from the JSX code
|
|
149
|
-
const pathTagRegex = /<Path[^>]*\/>/g;
|
|
150
|
-
const pathTags = jsxCode.match(pathTagRegex);
|
|
151
|
-
const jsxCodeWithPathOnly = pathTags.join("");
|
|
152
|
-
|
|
153
|
-
const template = fs.readFileSync(templateFilePath, "utf8");
|
|
154
|
-
const componentData = template
|
|
155
|
-
.replace(/PictogramTemplate/g, file.replace(".svg", ""))
|
|
156
|
-
.replace(/\/\/.*\n/g, "") // Remove lines starting with //
|
|
157
|
-
.replace(`{/* SVGContent */}`, jsxCodeWithPathOnly);
|
|
158
|
-
|
|
159
|
-
// Save the file with the same filename with `.tsx` extension
|
|
160
|
-
const fileWithTsxExtension = file.replace(".svg", ".tsx");
|
|
161
|
-
const tsxFilePath = join(tsxDir, fileWithTsxExtension);
|
|
162
|
-
fs.writeFileSync(
|
|
163
|
-
tsxFilePath,
|
|
164
|
-
prettier.format(componentData, { parser: "typescript" })
|
|
165
|
-
);
|
|
166
|
-
|
|
167
|
-
console.log(`${file} → ${fileWithTsxExtension}`);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
const newTimestamp = new Date();
|
|
172
|
-
const convertedISOTimestamp = newTimestamp.toISOString();
|
|
173
|
-
fs.writeFileSync(timestampFilePath, convertedISOTimestamp);
|
|
174
|
-
|
|
175
|
-
const readableUpdatedTimestamp =
|
|
176
|
-
convertTimestampToReadableFormat(newTimestamp);
|
|
177
|
-
|
|
178
|
-
console.log(`————————————————`);
|
|
179
|
-
console.log("Updated timestamp:", readableUpdatedTimestamp);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2023-10-30T13:28:58.366Z
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { action } from "@storybook/addon-actions";
|
|
3
|
-
|
|
4
|
-
import { ButtonSolid } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/ButtonSolid",
|
|
9
|
-
component: ButtonSolid,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered"
|
|
13
|
-
},
|
|
14
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
15
|
-
tags: ["autodocs"]
|
|
16
|
-
} satisfies Meta<typeof ButtonSolid>;
|
|
17
|
-
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
color: "primary",
|
|
25
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
26
|
-
label: "Primary button",
|
|
27
|
-
onPress: e => {
|
|
28
|
-
action("clicked")(e);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H1 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H1",
|
|
9
|
-
component: H1,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H1>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H2 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H2",
|
|
9
|
-
component: H2,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H2>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H3 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H3",
|
|
9
|
-
component: H3,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H3>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H4 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H4",
|
|
9
|
-
component: H4,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H4>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H5 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H5",
|
|
9
|
-
component: H5,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H5>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { H6 } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/H6",
|
|
9
|
-
component: H6,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof H6>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { Alert } from "react-native";
|
|
4
|
-
import { Label } from "../components";
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "Example/Label",
|
|
9
|
-
component: Label,
|
|
10
|
-
parameters: {
|
|
11
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
12
|
-
layout: "centered",
|
|
13
|
-
actions: { argTypesRegex: "^on.*" }
|
|
14
|
-
},
|
|
15
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
16
|
-
tags: ["autodocs"],
|
|
17
|
-
} satisfies Meta<typeof Label>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Primary: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
accessibilityLabel: "Tap to trigger test alert",
|
|
25
|
-
onPress: () => Alert.alert("Alert", "Action triggered"),
|
|
26
|
-
children: "Hello World"
|
|
27
|
-
}
|
|
28
|
-
};
|