@digigov/react-icons 2.0.0-cbc56209 → 2.0.0-daaf7bdf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccessibilityIcon/config/index.js +16 -13
- package/AccessibilityIcon/config.js.map +7 -0
- package/AccessibilityIcon/index.js +10 -8
- package/AccessibilityIcon/index.js.map +7 -0
- package/ArrowIcon/config/index.js +11 -21
- package/ArrowIcon/config.js.map +7 -0
- package/ArrowIcon/index.js +10 -8
- package/ArrowIcon/index.js.map +7 -0
- package/Base/index.d.ts +95 -0
- package/Base/index.js +102 -0
- package/Base/index.js.map +7 -0
- package/{Icon/index.test → Base}/package.json +1 -1
- package/BurgerIcon/config/index.js +23 -27
- package/BurgerIcon/config.js.map +7 -0
- package/BurgerIcon/index.js +10 -8
- package/BurgerIcon/index.js.map +7 -0
- package/CancelIcon/config/index.js +10 -7
- package/CancelIcon/config.js.map +7 -0
- package/CancelIcon/index.js +10 -8
- package/CancelIcon/index.js.map +7 -0
- package/CaretIcon/config/index.js +11 -21
- package/CaretIcon/config.js.map +7 -0
- package/CaretIcon/index.js +10 -8
- package/CaretIcon/index.js.map +7 -0
- package/ChatIcon/config/index.js +11 -16
- package/ChatIcon/config.js.map +7 -0
- package/ChatIcon/index.js +10 -8
- package/ChatIcon/index.js.map +7 -0
- package/CheckIcon/config/index.js +10 -7
- package/CheckIcon/config.js.map +7 -0
- package/CheckIcon/index.js +10 -8
- package/CheckIcon/index.js.map +7 -0
- package/ChevronIcon/config/index.js +11 -21
- package/ChevronIcon/config.js.map +7 -0
- package/ChevronIcon/index.js +10 -8
- package/ChevronIcon/index.js.map +7 -0
- package/CloseIcon/config/index.js +10 -7
- package/CloseIcon/config.js.map +7 -0
- package/CloseIcon/index.js +10 -8
- package/CloseIcon/index.js.map +7 -0
- package/DownloadIcon/config/index.js +10 -12
- package/DownloadIcon/config.js.map +7 -0
- package/DownloadIcon/index.js +10 -8
- package/DownloadIcon/index.js.map +7 -0
- package/ExclamationIcon/config/index.js +10 -12
- package/ExclamationIcon/config.js.map +7 -0
- package/ExclamationIcon/index.js +10 -8
- package/ExclamationIcon/index.js.map +7 -0
- package/GlobeIcon/config/index.js +10 -7
- package/GlobeIcon/config.js.map +7 -0
- package/GlobeIcon/index.js +10 -8
- package/GlobeIcon/index.js.map +7 -0
- package/Icon/index.d.ts +2 -2
- package/Icon/index.js +29 -29
- package/Icon/index.js.map +7 -0
- package/LockIcon/config/index.js +10 -7
- package/LockIcon/config.js.map +7 -0
- package/LockIcon/index.js +10 -8
- package/LockIcon/index.js.map +7 -0
- package/LoginIcon/config/index.js +10 -10
- package/LoginIcon/config.js.map +7 -0
- package/LoginIcon/index.js +10 -8
- package/LoginIcon/index.js.map +7 -0
- package/MinusIcon/config/index.js +10 -10
- package/MinusIcon/config.js.map +7 -0
- package/MinusIcon/index.js +10 -8
- package/MinusIcon/index.js.map +7 -0
- package/MoreVertIcon/config/index.js +10 -19
- package/MoreVertIcon/config.js.map +7 -0
- package/MoreVertIcon/index.js +10 -8
- package/MoreVertIcon/index.js.map +7 -0
- package/PdfFileIcon/config/index.js +10 -13
- package/PdfFileIcon/config.js.map +7 -0
- package/PdfFileIcon/index.js +10 -8
- package/PdfFileIcon/index.js.map +7 -0
- package/PlusIcon/config/index.js +10 -7
- package/PlusIcon/config.js.map +7 -0
- package/PlusIcon/index.js +10 -8
- package/PlusIcon/index.js.map +7 -0
- package/PrintIcon/config/index.js +10 -13
- package/PrintIcon/config.js.map +7 -0
- package/PrintIcon/index.js +10 -8
- package/PrintIcon/index.js.map +7 -0
- package/ReplyIcon/config/index.js +10 -7
- package/ReplyIcon/config.js.map +7 -0
- package/ReplyIcon/index.js +10 -8
- package/ReplyIcon/index.js.map +7 -0
- package/RestoreIcon/config/index.js +10 -15
- package/RestoreIcon/config.js.map +7 -0
- package/RestoreIcon/index.js +10 -8
- package/RestoreIcon/index.js.map +7 -0
- package/SearchIcon/config/index.js +10 -7
- package/SearchIcon/config.js.map +7 -0
- package/SearchIcon/index.js +10 -8
- package/SearchIcon/index.js.map +7 -0
- package/SvgIcon/index.d.ts +37 -0
- package/SvgIcon/index.js +30 -0
- package/SvgIcon/index.js.map +7 -0
- package/SvgIcon/index.test.d.ts +1 -0
- package/{ChatIcon/index.test → SvgIcon}/package.json +1 -1
- package/UncheckIcon/config/index.js +10 -7
- package/UncheckIcon/config.js.map +7 -0
- package/UncheckIcon/index.js +10 -8
- package/UncheckIcon/index.js.map +7 -0
- package/cjs/AccessibilityIcon/config/index.js +47 -19
- package/cjs/AccessibilityIcon/config.js.map +7 -0
- package/cjs/AccessibilityIcon/index.js +42 -14
- package/cjs/AccessibilityIcon/index.js.map +7 -0
- package/cjs/ArrowIcon/config/index.js +43 -27
- package/cjs/ArrowIcon/config.js.map +7 -0
- package/cjs/ArrowIcon/index.js +42 -14
- package/cjs/ArrowIcon/index.js.map +7 -0
- package/cjs/Base/index.js +135 -0
- package/cjs/Base/index.js.map +7 -0
- package/cjs/BurgerIcon/config/index.js +55 -33
- package/cjs/BurgerIcon/config.js.map +7 -0
- package/cjs/BurgerIcon/index.js +42 -14
- package/cjs/BurgerIcon/index.js.map +7 -0
- package/cjs/CancelIcon/config/index.js +41 -13
- package/cjs/CancelIcon/config.js.map +7 -0
- package/cjs/CancelIcon/index.js +42 -14
- package/cjs/CancelIcon/index.js.map +7 -0
- package/cjs/CaretIcon/config/index.js +43 -27
- package/cjs/CaretIcon/config.js.map +7 -0
- package/cjs/CaretIcon/index.js +42 -14
- package/cjs/CaretIcon/index.js.map +7 -0
- package/cjs/ChatIcon/config/index.js +43 -22
- package/cjs/ChatIcon/config.js.map +7 -0
- package/cjs/ChatIcon/index.js +42 -14
- package/cjs/ChatIcon/index.js.map +7 -0
- package/cjs/CheckIcon/config/index.js +41 -13
- package/cjs/CheckIcon/config.js.map +7 -0
- package/cjs/CheckIcon/index.js +42 -14
- package/cjs/CheckIcon/index.js.map +7 -0
- package/cjs/ChevronIcon/config/index.js +43 -27
- package/cjs/ChevronIcon/config.js.map +7 -0
- package/cjs/ChevronIcon/index.js +42 -14
- package/cjs/ChevronIcon/index.js.map +7 -0
- package/cjs/CloseIcon/config/index.js +41 -13
- package/cjs/CloseIcon/config.js.map +7 -0
- package/cjs/CloseIcon/index.js +42 -14
- package/cjs/CloseIcon/index.js.map +7 -0
- package/cjs/DownloadIcon/config/index.js +41 -18
- package/cjs/DownloadIcon/config.js.map +7 -0
- package/cjs/DownloadIcon/index.js +42 -14
- package/cjs/DownloadIcon/index.js.map +7 -0
- package/cjs/ExclamationIcon/config/index.js +41 -18
- package/cjs/ExclamationIcon/config.js.map +7 -0
- package/cjs/ExclamationIcon/index.js +42 -14
- package/cjs/ExclamationIcon/index.js.map +7 -0
- package/cjs/GlobeIcon/config/index.js +41 -13
- package/cjs/GlobeIcon/config.js.map +7 -0
- package/cjs/GlobeIcon/index.js +42 -14
- package/cjs/GlobeIcon/index.js.map +7 -0
- package/cjs/Icon/index.js +61 -38
- package/cjs/Icon/index.js.map +7 -0
- package/cjs/LockIcon/config/index.js +41 -13
- package/cjs/LockIcon/config.js.map +7 -0
- package/cjs/LockIcon/index.js +42 -14
- package/cjs/LockIcon/index.js.map +7 -0
- package/cjs/LoginIcon/config/index.js +41 -16
- package/cjs/LoginIcon/config.js.map +7 -0
- package/cjs/LoginIcon/index.js +42 -14
- package/cjs/LoginIcon/index.js.map +7 -0
- package/cjs/MinusIcon/config/index.js +41 -16
- package/cjs/MinusIcon/config.js.map +7 -0
- package/cjs/MinusIcon/index.js +42 -14
- package/cjs/MinusIcon/index.js.map +7 -0
- package/cjs/MoreVertIcon/config/index.js +41 -25
- package/cjs/MoreVertIcon/config.js.map +7 -0
- package/cjs/MoreVertIcon/index.js +42 -14
- package/cjs/MoreVertIcon/index.js.map +7 -0
- package/cjs/PdfFileIcon/config/index.js +41 -19
- package/cjs/PdfFileIcon/config.js.map +7 -0
- package/cjs/PdfFileIcon/index.js +42 -14
- package/cjs/PdfFileIcon/index.js.map +7 -0
- package/cjs/PlusIcon/config/index.js +41 -13
- package/cjs/PlusIcon/config.js.map +7 -0
- package/cjs/PlusIcon/index.js +42 -14
- package/cjs/PlusIcon/index.js.map +7 -0
- package/cjs/PrintIcon/config/index.js +41 -19
- package/cjs/PrintIcon/config.js.map +7 -0
- package/cjs/PrintIcon/index.js +42 -14
- package/cjs/PrintIcon/index.js.map +7 -0
- package/cjs/ReplyIcon/config/index.js +41 -13
- package/cjs/ReplyIcon/config.js.map +7 -0
- package/cjs/ReplyIcon/index.js +42 -14
- package/cjs/ReplyIcon/index.js.map +7 -0
- package/cjs/RestoreIcon/config/index.js +41 -21
- package/cjs/RestoreIcon/config.js.map +7 -0
- package/cjs/RestoreIcon/index.js +42 -14
- package/cjs/RestoreIcon/index.js.map +7 -0
- package/cjs/SearchIcon/config/index.js +41 -13
- package/cjs/SearchIcon/config.js.map +7 -0
- package/cjs/SearchIcon/index.js +42 -14
- package/cjs/SearchIcon/index.js.map +7 -0
- package/cjs/SvgIcon/index.js +63 -0
- package/cjs/SvgIcon/index.js.map +7 -0
- package/cjs/UncheckIcon/config/index.js +41 -13
- package/cjs/UncheckIcon/config.js.map +7 -0
- package/cjs/UncheckIcon/index.js +42 -14
- package/cjs/UncheckIcon/index.js.map +7 -0
- package/cjs/icons/index.js +66 -258
- package/cjs/icons.js.map +7 -0
- package/cjs/index.js +66 -258
- package/cjs/index.js.map +7 -0
- package/cjs/lazy/index.js +61 -228
- package/cjs/lazy.js.map +7 -0
- package/cjs/registry/index.js +102 -72
- package/cjs/registry.js.map +7 -0
- package/icons/index.js +24 -24
- package/icons.js.map +7 -0
- package/index.js +25 -24
- package/index.js.map +7 -0
- package/lazy/index.js +33 -171
- package/lazy.d.ts +3 -1
- package/lazy.js.map +7 -0
- package/package.json +4 -8
- package/registry/index.js +74 -64
- package/registry.d.ts +2 -0
- package/registry.js.map +7 -0
- package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +189 -371
- package/src/AccessibilityIcon/config.tsx +5 -4
- package/src/AccessibilityIcon/index.test.tsx +10 -10
- package/src/ArrowIcon/__snapshots__/index.test.tsx.snap +52 -131
- package/src/ArrowIcon/config.tsx +5 -4
- package/src/ArrowIcon/index.test.tsx +5 -5
- package/src/Base/index.tsx +258 -0
- package/src/BurgerIcon/__snapshots__/index.test.tsx.snap +168 -289
- package/src/BurgerIcon/config.tsx +6 -5
- package/src/BurgerIcon/index.test.tsx +7 -7
- package/src/CancelIcon/__snapshots__/index.test.tsx.snap +91 -233
- package/src/CancelIcon/config.tsx +3 -2
- package/src/CancelIcon/index.test.tsx +8 -8
- package/src/CaretIcon/__snapshots__/index.test.tsx.snap +52 -131
- package/src/CaretIcon/config.tsx +5 -4
- package/src/CaretIcon/index.test.tsx +5 -5
- package/src/ChatIcon/__snapshots__/index.test.tsx.snap +104 -267
- package/src/ChatIcon/config.tsx +3 -2
- package/src/ChatIcon/index.test.tsx +9 -9
- package/src/CheckIcon/__snapshots__/index.test.tsx.snap +104 -266
- package/src/CheckIcon/config.tsx +3 -2
- package/src/CheckIcon/index.test.tsx +9 -9
- package/src/ChevronIcon/__snapshots__/index.test.tsx.snap +52 -131
- package/src/ChevronIcon/config.tsx +5 -4
- package/src/ChevronIcon/index.test.tsx +5 -5
- package/src/CloseIcon/__snapshots__/index.test.tsx.snap +13 -29
- package/src/CloseIcon/config.tsx +3 -2
- package/src/CloseIcon/index.test.tsx +2 -2
- package/src/DownloadIcon/__snapshots__/index.test.tsx.snap +147 -289
- package/src/DownloadIcon/config.tsx +6 -5
- package/src/DownloadIcon/index.test.tsx +8 -8
- package/src/ExclamationIcon/__snapshots__/index.test.tsx.snap +126 -268
- package/src/ExclamationIcon/config.tsx +4 -3
- package/src/ExclamationIcon/index.test.tsx +8 -8
- package/src/GlobeIcon/__snapshots__/index.test.tsx.snap +52 -128
- package/src/GlobeIcon/config.tsx +3 -2
- package/src/GlobeIcon/index.test.tsx +5 -5
- package/src/Icon/__snapshots__/index.test.tsx.snap +127 -270
- package/src/Icon/index.test.tsx +11 -11
- package/src/Icon/index.tsx +2 -2
- package/src/LockIcon/__snapshots__/index.test.tsx.snap +91 -233
- package/src/LockIcon/config.tsx +3 -2
- package/src/LockIcon/index.test.tsx +8 -8
- package/src/LoginIcon/__snapshots__/index.test.tsx.snap +112 -254
- package/src/LoginIcon/config.tsx +4 -3
- package/src/LoginIcon/index.test.tsx +8 -8
- package/src/MinusIcon/__snapshots__/index.test.tsx.snap +112 -254
- package/src/MinusIcon/config.tsx +4 -3
- package/src/MinusIcon/index.test.tsx +8 -8
- package/src/MoreVertIcon/__snapshots__/index.test.tsx.snap +225 -407
- package/src/MoreVertIcon/config.tsx +5 -4
- package/src/MoreVertIcon/index.test.tsx +10 -10
- package/src/PdfFileIcon/__snapshots__/index.test.tsx.snap +182 -324
- package/src/PdfFileIcon/config.tsx +10 -9
- package/src/PdfFileIcon/index.test.tsx +8 -8
- package/src/PlusIcon/__snapshots__/index.test.tsx.snap +91 -233
- package/src/PlusIcon/config.tsx +3 -2
- package/src/PlusIcon/index.test.tsx +8 -8
- package/src/PrintIcon/__snapshots__/index.test.tsx.snap +133 -275
- package/src/PrintIcon/config.tsx +4 -3
- package/src/PrintIcon/index.test.tsx +8 -8
- package/src/ReplyIcon/__snapshots__/index.test.tsx.snap +91 -233
- package/src/ReplyIcon/config.tsx +3 -2
- package/src/ReplyIcon/index.test.tsx +8 -8
- package/src/RestoreIcon/__snapshots__/index.test.tsx.snap +147 -289
- package/src/RestoreIcon/config.tsx +5 -4
- package/src/RestoreIcon/index.test.tsx +8 -8
- package/src/SearchIcon/__snapshots__/index.test.tsx.snap +13 -29
- package/src/SearchIcon/config.tsx +3 -2
- package/src/SearchIcon/index.test.tsx +2 -2
- package/src/SvgIcon/__snapshots__/index.test.tsx.snap +254 -0
- package/src/SvgIcon/index.test.tsx +96 -0
- package/src/SvgIcon/index.tsx +72 -0
- package/src/UncheckIcon/__snapshots__/index.test.tsx.snap +117 -299
- package/src/UncheckIcon/config.tsx +3 -2
- package/src/UncheckIcon/index.test.tsx +10 -10
- package/src/lazy.js +2 -0
- package/src/registry.js +4 -0
- package/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -408
- package/AccessibilityIcon/index.test/index.js +0 -57
- package/AccessibilityIcon/index.test/package.json +0 -6
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/ArrowIcon/index.test/index.js +0 -25
- package/ArrowIcon/index.test/package.json +0 -6
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -320
- package/BurgerIcon/index.test/index.js +0 -38
- package/BurgerIcon/index.test/package.json +0 -6
- package/CancelIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/CancelIcon/index.test/index.js +0 -45
- package/CancelIcon/index.test/package.json +0 -6
- package/CaretIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/CaretIcon/index.test/index.js +0 -25
- package/CaretIcon/index.test/package.json +0 -6
- package/ChatIcon/__snapshots__/index.test.tsx.snap +0 -300
- package/ChatIcon/index.test/index.js +0 -51
- package/CheckIcon/__snapshots__/index.test.tsx.snap +0 -299
- package/CheckIcon/index.test/index.js +0 -51
- package/CheckIcon/index.test/package.json +0 -6
- package/ChevronIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/ChevronIcon/index.test/index.js +0 -25
- package/ChevronIcon/index.test/package.json +0 -6
- package/CloseIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/CloseIcon/index.test/index.js +0 -7
- package/CloseIcon/index.test/package.json +0 -6
- package/DownloadIcon/__snapshots__/index.test.tsx.snap +0 -318
- package/DownloadIcon/index.test/index.js +0 -45
- package/DownloadIcon/index.test/package.json +0 -6
- package/ExclamationIcon/__snapshots__/index.test.tsx.snap +0 -297
- package/ExclamationIcon/index.test/index.js +0 -45
- package/ExclamationIcon/index.test/package.json +0 -6
- package/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -145
- package/GlobeIcon/index.test/index.js +0 -25
- package/GlobeIcon/index.test/package.json +0 -6
- package/Icon/__snapshots__/index.test.tsx.snap +0 -342
- package/Icon/index.test/index.js +0 -62
- package/LockIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/LockIcon/index.test/index.js +0 -45
- package/LockIcon/index.test/package.json +0 -6
- package/LoginIcon/__snapshots__/index.test.tsx.snap +0 -283
- package/LoginIcon/index.test/index.js +0 -45
- package/LoginIcon/index.test/package.json +0 -6
- package/MinusIcon/__snapshots__/index.test.tsx.snap +0 -283
- package/MinusIcon/index.test/index.js +0 -45
- package/MinusIcon/index.test/package.json +0 -6
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -444
- package/MoreVertIcon/index.test/index.js +0 -57
- package/MoreVertIcon/index.test/package.json +0 -6
- package/PdfFileIcon/__snapshots__/index.test.tsx.snap +0 -353
- package/PdfFileIcon/index.test/index.js +0 -45
- package/PdfFileIcon/index.test/package.json +0 -6
- package/PlusIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/PlusIcon/index.test/index.js +0 -45
- package/PlusIcon/index.test/package.json +0 -6
- package/PrintIcon/__snapshots__/index.test.tsx.snap +0 -304
- package/PrintIcon/index.test/index.js +0 -45
- package/PrintIcon/index.test/package.json +0 -6
- package/ReplyIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/ReplyIcon/index.test/index.js +0 -45
- package/ReplyIcon/index.test/package.json +0 -6
- package/RestoreIcon/__snapshots__/index.test.tsx.snap +0 -318
- package/RestoreIcon/index.test/index.js +0 -45
- package/RestoreIcon/index.test/package.json +0 -6
- package/SearchIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/SearchIcon/index.test/index.js +0 -7
- package/SearchIcon/index.test/package.json +0 -6
- package/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -336
- package/UncheckIcon/index.test/index.js +0 -57
- package/UncheckIcon/index.test/package.json +0 -6
- package/cjs/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -408
- package/cjs/AccessibilityIcon/index.test/index.js +0 -60
- package/cjs/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/cjs/ArrowIcon/index.test/index.js +0 -28
- package/cjs/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -320
- package/cjs/BurgerIcon/index.test/index.js +0 -41
- package/cjs/CancelIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/cjs/CancelIcon/index.test/index.js +0 -48
- package/cjs/CaretIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/cjs/CaretIcon/index.test/index.js +0 -28
- package/cjs/ChatIcon/__snapshots__/index.test.tsx.snap +0 -300
- package/cjs/ChatIcon/index.test/index.js +0 -54
- package/cjs/CheckIcon/__snapshots__/index.test.tsx.snap +0 -299
- package/cjs/CheckIcon/index.test/index.js +0 -54
- package/cjs/ChevronIcon/__snapshots__/index.test.tsx.snap +0 -148
- package/cjs/ChevronIcon/index.test/index.js +0 -28
- package/cjs/CloseIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/cjs/CloseIcon/index.test/index.js +0 -10
- package/cjs/DownloadIcon/__snapshots__/index.test.tsx.snap +0 -318
- package/cjs/DownloadIcon/index.test/index.js +0 -48
- package/cjs/ExclamationIcon/__snapshots__/index.test.tsx.snap +0 -297
- package/cjs/ExclamationIcon/index.test/index.js +0 -48
- package/cjs/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -145
- package/cjs/GlobeIcon/index.test/index.js +0 -28
- package/cjs/Icon/__snapshots__/index.test.tsx.snap +0 -342
- package/cjs/Icon/index.test/index.js +0 -65
- package/cjs/LockIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/cjs/LockIcon/index.test/index.js +0 -48
- package/cjs/LoginIcon/__snapshots__/index.test.tsx.snap +0 -283
- package/cjs/LoginIcon/index.test/index.js +0 -48
- package/cjs/MinusIcon/__snapshots__/index.test.tsx.snap +0 -283
- package/cjs/MinusIcon/index.test/index.js +0 -48
- package/cjs/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -444
- package/cjs/MoreVertIcon/index.test/index.js +0 -60
- package/cjs/PdfFileIcon/__snapshots__/index.test.tsx.snap +0 -353
- package/cjs/PdfFileIcon/index.test/index.js +0 -48
- package/cjs/PlusIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/cjs/PlusIcon/index.test/index.js +0 -48
- package/cjs/PrintIcon/__snapshots__/index.test.tsx.snap +0 -304
- package/cjs/PrintIcon/index.test/index.js +0 -48
- package/cjs/ReplyIcon/__snapshots__/index.test.tsx.snap +0 -262
- package/cjs/ReplyIcon/index.test/index.js +0 -48
- package/cjs/RestoreIcon/__snapshots__/index.test.tsx.snap +0 -318
- package/cjs/RestoreIcon/index.test/index.js +0 -48
- package/cjs/SearchIcon/__snapshots__/index.test.tsx.snap +0 -34
- package/cjs/SearchIcon/index.test/index.js +0 -10
- package/cjs/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -336
- package/cjs/UncheckIcon/index.test/index.js +0 -60
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
|
|
4
4
|
import AccessibilityIcon from '@digigov/react-icons/AccessibilityIcon';
|
|
5
5
|
|
|
6
6
|
it('renders the AccessibilityIcon with no props', () => {
|
|
7
|
-
expect(
|
|
7
|
+
expect(render(<AccessibilityIcon />).baseElement).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
9
|
it('renders the AccessibilityIcon with prop size=s', () => {
|
|
10
|
-
expect(
|
|
10
|
+
expect(render(<AccessibilityIcon size="sm" />).baseElement).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
12
|
it('renders the AccessibilityIcon with prop size=l', () => {
|
|
13
|
-
expect(
|
|
13
|
+
expect(render(<AccessibilityIcon size="lg" />).baseElement).toMatchSnapshot();
|
|
14
14
|
});
|
|
15
15
|
it('renders the AccessibilityIcon with prop color=base-content', () => {
|
|
16
|
-
expect(
|
|
16
|
+
expect(render(<AccessibilityIcon color="base-content" />).baseElement).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
it('renders the AccessibilityIcon with prop color=primary', () => {
|
|
19
|
-
expect(
|
|
19
|
+
expect(render(<AccessibilityIcon color="primary" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the AccessibilityIcon with prop color=success', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(render(<AccessibilityIcon color="success" />).baseElement).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
it('renders the AccessibilityIcon with prop color=error', () => {
|
|
25
|
-
expect(
|
|
25
|
+
expect(render(<AccessibilityIcon color="error" />).baseElement).toMatchSnapshot();
|
|
26
26
|
});
|
|
27
27
|
it('renders the AccessibilityIcon with prop color=warning and size=s', () => {
|
|
28
28
|
expect(
|
|
29
|
-
|
|
29
|
+
render(<AccessibilityIcon color="warning" size="sm" />).baseElement
|
|
30
30
|
).toMatchSnapshot();
|
|
31
31
|
});
|
|
32
32
|
it('renders the AccessibilityIcon with prop color=error and size= xl', () => {
|
|
33
33
|
expect(
|
|
34
|
-
|
|
34
|
+
render(<AccessibilityIcon color="warning" size="xl" />).baseElement
|
|
35
35
|
).toMatchSnapshot();
|
|
36
36
|
});
|
|
@@ -1,148 +1,69 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the ArrowIcon with direction down prop 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<ForwardRef(SvgIcon)
|
|
12
|
-
className="ds-svg-icon--arrow"
|
|
4
|
+
<body>
|
|
5
|
+
<div>
|
|
6
|
+
<svg
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
class="ds-svg-icon--arrow ds-svg-icon"
|
|
9
|
+
focusable="false"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
13
11
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
>
|
|
21
|
-
<svg
|
|
22
|
-
aria-hidden="true"
|
|
23
|
-
className="ds-svg-icon--arrow ds-svg-icon"
|
|
24
|
-
focusable="false"
|
|
25
|
-
viewBox="0 0 24 24"
|
|
26
|
-
>
|
|
27
|
-
<arrow
|
|
28
|
-
direction="down"
|
|
29
|
-
>
|
|
30
|
-
<polygon
|
|
31
|
-
points="19.7 9.6 13.7 15.52 13.7 2.07 10.37 2 10.32 15.52 4.4 9.6 2 12 12 22 22 12 19.7 9.6"
|
|
32
|
-
/>
|
|
33
|
-
</arrow>
|
|
34
|
-
</svg>
|
|
35
|
-
</ForwardRef(Base)>
|
|
36
|
-
</ForwardRef(SvgIcon)>
|
|
37
|
-
</ForwardRef(Icon)>
|
|
38
|
-
</ArrowIcon>
|
|
12
|
+
<polygon
|
|
13
|
+
points="19.7 9.6 13.7 15.52 13.7 2.07 10.37 2 10.32 15.52 4.4 9.6 2 12 12 22 22 12 19.7 9.6"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
</div>
|
|
17
|
+
</body>
|
|
39
18
|
`;
|
|
40
19
|
|
|
41
20
|
exports[`renders the ArrowIcon with direction left prop 1`] = `
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<ForwardRef(SvgIcon)
|
|
50
|
-
className="ds-svg-icon--arrow"
|
|
21
|
+
<body>
|
|
22
|
+
<div>
|
|
23
|
+
<svg
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
class="ds-svg-icon--arrow ds-svg-icon"
|
|
26
|
+
focusable="false"
|
|
27
|
+
viewBox="0 0 24 24"
|
|
51
28
|
>
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
>
|
|
59
|
-
<svg
|
|
60
|
-
aria-hidden="true"
|
|
61
|
-
className="ds-svg-icon--arrow ds-svg-icon"
|
|
62
|
-
focusable="false"
|
|
63
|
-
viewBox="0 0 24 24"
|
|
64
|
-
>
|
|
65
|
-
<arrow
|
|
66
|
-
direction="left"
|
|
67
|
-
>
|
|
68
|
-
<polygon
|
|
69
|
-
points="14.4 19.7 8.48 13.7 21.93 13.7 22 10.37 8.48 10.32 14.4 4.4 12 2 2 12 12 22 14.4 19.7"
|
|
70
|
-
/>
|
|
71
|
-
</arrow>
|
|
72
|
-
</svg>
|
|
73
|
-
</ForwardRef(Base)>
|
|
74
|
-
</ForwardRef(SvgIcon)>
|
|
75
|
-
</ForwardRef(Icon)>
|
|
76
|
-
</ArrowIcon>
|
|
29
|
+
<polygon
|
|
30
|
+
points="14.4 19.7 8.48 13.7 21.93 13.7 22 10.37 8.48 10.32 14.4 4.4 12 2 2 12 12 22 14.4 19.7"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
77
35
|
`;
|
|
78
36
|
|
|
79
37
|
exports[`renders the ArrowIcon with direction up prop 1`] = `
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<ForwardRef(SvgIcon)
|
|
88
|
-
className="ds-svg-icon--arrow"
|
|
38
|
+
<body>
|
|
39
|
+
<div>
|
|
40
|
+
<svg
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
class="ds-svg-icon--arrow ds-svg-icon"
|
|
43
|
+
focusable="false"
|
|
44
|
+
viewBox="0 0 24 24"
|
|
89
45
|
>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
>
|
|
97
|
-
<svg
|
|
98
|
-
aria-hidden="true"
|
|
99
|
-
className="ds-svg-icon--arrow ds-svg-icon"
|
|
100
|
-
focusable="false"
|
|
101
|
-
viewBox="0 0 24 24"
|
|
102
|
-
>
|
|
103
|
-
<arrow
|
|
104
|
-
direction="up"
|
|
105
|
-
>
|
|
106
|
-
<polygon
|
|
107
|
-
points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12"
|
|
108
|
-
/>
|
|
109
|
-
</arrow>
|
|
110
|
-
</svg>
|
|
111
|
-
</ForwardRef(Base)>
|
|
112
|
-
</ForwardRef(SvgIcon)>
|
|
113
|
-
</ForwardRef(Icon)>
|
|
114
|
-
</ArrowIcon>
|
|
46
|
+
<polygon
|
|
47
|
+
points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12"
|
|
48
|
+
/>
|
|
49
|
+
</svg>
|
|
50
|
+
</div>
|
|
51
|
+
</body>
|
|
115
52
|
`;
|
|
116
53
|
|
|
117
54
|
exports[`renders the ArrowIcon with no props, direction prop is right by default 1`] = `
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
55
|
+
<body>
|
|
56
|
+
<div>
|
|
57
|
+
<svg
|
|
58
|
+
aria-hidden="true"
|
|
59
|
+
class="ds-svg-icon--arrow ds-svg-icon"
|
|
60
|
+
focusable="false"
|
|
61
|
+
viewBox="0 0 24 24"
|
|
124
62
|
>
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
>
|
|
132
|
-
<svg
|
|
133
|
-
aria-hidden="true"
|
|
134
|
-
className="ds-svg-icon--arrow ds-svg-icon"
|
|
135
|
-
focusable="false"
|
|
136
|
-
viewBox="0 0 24 24"
|
|
137
|
-
>
|
|
138
|
-
<arrow>
|
|
139
|
-
<polygon
|
|
140
|
-
points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12"
|
|
141
|
-
/>
|
|
142
|
-
</arrow>
|
|
143
|
-
</svg>
|
|
144
|
-
</ForwardRef(Base)>
|
|
145
|
-
</ForwardRef(SvgIcon)>
|
|
146
|
-
</ForwardRef(Icon)>
|
|
147
|
-
</ArrowIcon>
|
|
63
|
+
<polygon
|
|
64
|
+
points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12"
|
|
65
|
+
/>
|
|
66
|
+
</svg>
|
|
67
|
+
</div>
|
|
68
|
+
</body>
|
|
148
69
|
`;
|
package/src/ArrowIcon/config.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Base from '@digigov/react-icons/Base';
|
|
2
3
|
|
|
3
4
|
export interface ArrowType {
|
|
4
5
|
/**
|
|
@@ -15,16 +16,16 @@ export const arrow: React.FC<ArrowType> = ({ direction = 'up' }) => {
|
|
|
15
16
|
return (
|
|
16
17
|
<>
|
|
17
18
|
{direction === 'left' && (
|
|
18
|
-
<polygon points="14.4 19.7 8.48 13.7 21.93 13.7 22 10.37 8.48 10.32 14.4 4.4 12 2 2 12 12 22 14.4 19.7" />
|
|
19
|
+
<Base as="polygon" points="14.4 19.7 8.48 13.7 21.93 13.7 22 10.37 8.48 10.32 14.4 4.4 12 2 2 12 12 22 14.4 19.7" />
|
|
19
20
|
)}
|
|
20
21
|
{direction === 'right' && (
|
|
21
|
-
<polygon points="9.6 4.3 15.52 10.3 2.07 10.3 2 13.63 15.52 13.68 9.6 19.6 12 22 22 12 12 2 9.6 4.3" />
|
|
22
|
+
<Base as="polygon" points="9.6 4.3 15.52 10.3 2.07 10.3 2 13.63 15.52 13.68 9.6 19.6 12 22 22 12 12 2 9.6 4.3" />
|
|
22
23
|
)}
|
|
23
24
|
{direction === 'up' && (
|
|
24
|
-
<polygon points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12" />
|
|
25
|
+
<Base as="polygon" points="22 12 12 2 2 12 4.3 14.4 10.3 8.48 10.3 21.93 13.63 22 13.68 8.48 19.6 14.4 22 12" />
|
|
25
26
|
)}
|
|
26
27
|
{direction === 'down' && (
|
|
27
|
-
<polygon points="19.7 9.6 13.7 15.52 13.7 2.07 10.37 2 10.32 15.52 4.4 9.6 2 12 12 22 22 12 19.7 9.6" />
|
|
28
|
+
<Base as="polygon" points="19.7 9.6 13.7 15.52 13.7 2.07 10.37 2 10.32 15.52 4.4 9.6 2 12 12 22 22 12 19.7 9.6" />
|
|
28
29
|
)}
|
|
29
30
|
</>
|
|
30
31
|
);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
|
|
4
4
|
import ArrowIcon from '@digigov/react-icons/ArrowIcon';
|
|
5
5
|
|
|
6
6
|
it('renders the ArrowIcon with no props, direction prop is right by default', () => {
|
|
7
|
-
expect(
|
|
7
|
+
expect(render(<ArrowIcon />).baseElement).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
it('renders the ArrowIcon with direction left prop', () => {
|
|
11
|
-
expect(
|
|
11
|
+
expect(render(<ArrowIcon direction="left" />).baseElement).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
it('renders the ArrowIcon with direction up prop', () => {
|
|
15
|
-
expect(
|
|
15
|
+
expect(render(<ArrowIcon direction="up" />).baseElement).toMatchSnapshot();
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
it('renders the ArrowIcon with direction down prop', () => {
|
|
19
|
-
expect(
|
|
19
|
+
expect(render(<ArrowIcon direction="down" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
|
|
4
|
+
type AsProp<C extends React.ElementType> = {
|
|
5
|
+
as?: C;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
9
|
+
|
|
10
|
+
// This is the first reusable type utility we built
|
|
11
|
+
type PolymorphicComponentProp<
|
|
12
|
+
C extends React.ElementType,
|
|
13
|
+
Props = Record<string, unknown>,
|
|
14
|
+
> = React.PropsWithChildren<Props & AsProp<C>> &
|
|
15
|
+
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
16
|
+
|
|
17
|
+
// This is a new type utitlity with ref!
|
|
18
|
+
type PolymorphicComponentPropWithRef<
|
|
19
|
+
C extends React.ElementType,
|
|
20
|
+
Props = Record<string, unknown>,
|
|
21
|
+
> = PolymorphicComponentProp<C, Props> & { ref?: any };
|
|
22
|
+
|
|
23
|
+
// This is the type for the "ref" only
|
|
24
|
+
type PolymorphicRef<C extends React.ElementType> =
|
|
25
|
+
React.ComponentPropsWithRef<C>['ref'];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This is the updated component props using PolymorphicComponentPropWithRef
|
|
29
|
+
*/
|
|
30
|
+
export type BaseProps<C extends React.ElementType> =
|
|
31
|
+
PolymorphicComponentPropWithRef<
|
|
32
|
+
C,
|
|
33
|
+
{
|
|
34
|
+
/** margin is optional. It has not a default value. */
|
|
35
|
+
margin?: spacingValues;
|
|
36
|
+
/** marginTop is optional. It has not a default value. */
|
|
37
|
+
marginTop?: spacingValues;
|
|
38
|
+
/** marginBottom is optional. It has not a default value. */
|
|
39
|
+
marginBottom?: spacingValues;
|
|
40
|
+
/** marginLeft is optional. It has not a default value. */
|
|
41
|
+
marginLeft?: spacingValues;
|
|
42
|
+
/** marginRight is optional. It has not a default value. */
|
|
43
|
+
marginRight?: spacingValues;
|
|
44
|
+
/** Alternative for margin. Margin is optional. It has not a default value. */
|
|
45
|
+
m?: spacingValues;
|
|
46
|
+
/** Alternative for marginTop. MarginTop is optional. It has not a default value. */
|
|
47
|
+
mt?: spacingValues;
|
|
48
|
+
/** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
|
|
49
|
+
mb?: spacingValues;
|
|
50
|
+
/** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
|
|
51
|
+
ml?: spacingValues;
|
|
52
|
+
/** Alternative for marginRight. MarginRight is optional. It has not a default value. */
|
|
53
|
+
mr?: spacingValues;
|
|
54
|
+
/** Alternative for marginX. MarginX is optional. It has not a default value. */
|
|
55
|
+
mx?: spacingValues;
|
|
56
|
+
/** Alternative for marginY. MarginY is optional. It has not a default value. */
|
|
57
|
+
my?: spacingValues;
|
|
58
|
+
/** padding is optional. It has not a default value. */
|
|
59
|
+
padding?: spacingValues;
|
|
60
|
+
/** paddingTop is optional. It has not a default value. */
|
|
61
|
+
paddingTop?: spacingValues;
|
|
62
|
+
/** paddingBottom is optional. It has not a default value. */
|
|
63
|
+
paddingBottom?: spacingValues;
|
|
64
|
+
/** paddingLeft is optional. It has not a default value. */
|
|
65
|
+
paddingLeft?: spacingValues;
|
|
66
|
+
/** paddingRight is optional. It has not a default value. */
|
|
67
|
+
paddingRight?: spacingValues;
|
|
68
|
+
/** Alternative for padding. Padding is optional. It has not a default value. */
|
|
69
|
+
p?: spacingValues;
|
|
70
|
+
/** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
|
|
71
|
+
pt?: spacingValues;
|
|
72
|
+
/** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
|
|
73
|
+
pb?: spacingValues;
|
|
74
|
+
/** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
|
|
75
|
+
pl?: spacingValues;
|
|
76
|
+
/** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
|
|
77
|
+
pr?: spacingValues;
|
|
78
|
+
/** Alternative for paddingX. PaddingX is optional. It has not a default value. */
|
|
79
|
+
px?: spacingValues;
|
|
80
|
+
/** Alternative for paddingY. PaddingY is optional. It has not a default value. */
|
|
81
|
+
py?: spacingValues;
|
|
82
|
+
/** printHidden is optional. Default value is false. When true, the component is hidden at print. */
|
|
83
|
+
printHidden?: boolean;
|
|
84
|
+
/** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
|
|
85
|
+
printVisible?: 'block' | 'inline';
|
|
86
|
+
/** Components will be hidden at all screen sizes. */
|
|
87
|
+
hidden?: boolean;
|
|
88
|
+
/** Components will be hidden from 'xs' screen size and up. */
|
|
89
|
+
xsUpHidden?: boolean;
|
|
90
|
+
/** Components will be hidden from 'sm' screen size and up. */
|
|
91
|
+
smUpHidden?: boolean;
|
|
92
|
+
/** Components will be hidden from 'md' screen size and up. */
|
|
93
|
+
mdUpHidden?: boolean;
|
|
94
|
+
/** Components will be hidden from 'lg' screen size and up. */
|
|
95
|
+
lgUpHidden?: boolean;
|
|
96
|
+
/** Components will be hidden from 'xl' screen size and up. */
|
|
97
|
+
xlUpHidden?: boolean;
|
|
98
|
+
/** Components will be hidden between xs and sm screen size. */
|
|
99
|
+
xsHidden?: boolean;
|
|
100
|
+
/** Components will be hidden between sm and md screen size. */
|
|
101
|
+
smHidden?: boolean;
|
|
102
|
+
/** Components will be hidden between md and lg screen size. */
|
|
103
|
+
mdHidden?: boolean;
|
|
104
|
+
/** Components will be hidden between lg and xl screen size. */
|
|
105
|
+
lgHidden?: boolean;
|
|
106
|
+
/** Components will be hidden between xl and 2xl screen size. */
|
|
107
|
+
xlHidden?: boolean;
|
|
108
|
+
}
|
|
109
|
+
>;
|
|
110
|
+
|
|
111
|
+
type spacingValues =
|
|
112
|
+
| 0
|
|
113
|
+
| 0.5
|
|
114
|
+
| 1
|
|
115
|
+
| 1.5
|
|
116
|
+
| 2
|
|
117
|
+
| 2.5
|
|
118
|
+
| 3
|
|
119
|
+
| 3.5
|
|
120
|
+
| 4
|
|
121
|
+
| 5
|
|
122
|
+
| 6
|
|
123
|
+
| 7
|
|
124
|
+
| 8
|
|
125
|
+
| 9
|
|
126
|
+
| 10
|
|
127
|
+
| 11
|
|
128
|
+
| 12
|
|
129
|
+
| 14
|
|
130
|
+
| 16
|
|
131
|
+
| 20
|
|
132
|
+
| 24
|
|
133
|
+
| 28
|
|
134
|
+
| 32
|
|
135
|
+
| 36
|
|
136
|
+
| 40
|
|
137
|
+
| 44
|
|
138
|
+
| 48
|
|
139
|
+
| 52
|
|
140
|
+
| 56
|
|
141
|
+
| 60
|
|
142
|
+
| 64
|
|
143
|
+
| 72
|
|
144
|
+
| 80
|
|
145
|
+
| 96;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* This is the type used in the type annotation for the component
|
|
149
|
+
*/
|
|
150
|
+
type BaseComponent = <C extends React.ElementType = 'span'>(
|
|
151
|
+
props: BaseProps<C>
|
|
152
|
+
) => React.ReactNode | null;
|
|
153
|
+
|
|
154
|
+
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
155
|
+
C extends React.ElementType = 'span',
|
|
156
|
+
>(
|
|
157
|
+
{
|
|
158
|
+
as,
|
|
159
|
+
margin,
|
|
160
|
+
marginTop,
|
|
161
|
+
marginBottom,
|
|
162
|
+
marginLeft,
|
|
163
|
+
marginRight,
|
|
164
|
+
m,
|
|
165
|
+
mt,
|
|
166
|
+
mb,
|
|
167
|
+
ml,
|
|
168
|
+
mr,
|
|
169
|
+
mx,
|
|
170
|
+
my,
|
|
171
|
+
padding,
|
|
172
|
+
paddingTop,
|
|
173
|
+
paddingBottom,
|
|
174
|
+
paddingLeft,
|
|
175
|
+
paddingRight,
|
|
176
|
+
p,
|
|
177
|
+
pt,
|
|
178
|
+
pb,
|
|
179
|
+
pr,
|
|
180
|
+
pl,
|
|
181
|
+
px,
|
|
182
|
+
py,
|
|
183
|
+
printHidden,
|
|
184
|
+
printVisible,
|
|
185
|
+
hidden,
|
|
186
|
+
xsUpHidden,
|
|
187
|
+
smUpHidden,
|
|
188
|
+
mdUpHidden,
|
|
189
|
+
lgUpHidden,
|
|
190
|
+
xlUpHidden,
|
|
191
|
+
xsHidden,
|
|
192
|
+
smHidden,
|
|
193
|
+
mdHidden,
|
|
194
|
+
lgHidden,
|
|
195
|
+
xlHidden,
|
|
196
|
+
children,
|
|
197
|
+
className,
|
|
198
|
+
...props
|
|
199
|
+
}: BaseProps<C>,
|
|
200
|
+
ref?: PolymorphicRef<C>
|
|
201
|
+
) {
|
|
202
|
+
const Component = as || 'span';
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<Component
|
|
206
|
+
as={as}
|
|
207
|
+
className={clsx(className, {
|
|
208
|
+
[`ds-m-${margin}`]: margin !== undefined ? true : undefined,
|
|
209
|
+
[`ds-mt-${marginTop}`]: marginTop !== undefined ? true : undefined,
|
|
210
|
+
[`ds-mb-${marginBottom}`]:
|
|
211
|
+
marginBottom !== undefined ? true : undefined,
|
|
212
|
+
[`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,
|
|
213
|
+
[`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,
|
|
214
|
+
[`ds-m-${m}`]: m !== undefined ? true : undefined,
|
|
215
|
+
[`ds-mt-${mt}`]: mt !== undefined ? true : undefined,
|
|
216
|
+
[`ds-mb-${mb}`]: mb !== undefined ? true : undefined,
|
|
217
|
+
[`ds-mr-${mr}`]: mr !== undefined ? true : undefined,
|
|
218
|
+
[`ds-ml-${ml}`]: ml !== undefined ? true : undefined,
|
|
219
|
+
[`ds-mx-${mx}`]: mx !== undefined ? true : undefined,
|
|
220
|
+
[`ds-my-${my}`]: my !== undefined ? true : undefined,
|
|
221
|
+
[`ds-p-${padding}`]: padding !== undefined ? true : undefined,
|
|
222
|
+
[`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,
|
|
223
|
+
[`ds-pb-${paddingBottom}`]:
|
|
224
|
+
paddingBottom !== undefined ? true : undefined,
|
|
225
|
+
[`ds-pr-${paddingRight}`]:
|
|
226
|
+
paddingRight !== undefined ? true : undefined,
|
|
227
|
+
[`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,
|
|
228
|
+
[`ds-p-${p}`]: p !== undefined ? true : undefined,
|
|
229
|
+
[`ds-pt-${pt}`]: pt !== undefined ? true : undefined,
|
|
230
|
+
[`ds-pb-${pb}`]: pb !== undefined ? true : undefined,
|
|
231
|
+
[`ds-pr-${pr}`]: pr !== undefined ? true : undefined,
|
|
232
|
+
[`ds-pl-${pl}`]: pl !== undefined ? true : undefined,
|
|
233
|
+
[`ds-px-${px}`]: px !== undefined ? true : undefined,
|
|
234
|
+
[`ds-py-${py}`]: py !== undefined ? true : undefined,
|
|
235
|
+
'ds-print-hidden': !!printHidden,
|
|
236
|
+
'ds-print-visible-block': printVisible === 'block',
|
|
237
|
+
'ds-print-visible-inline': printVisible === 'inline',
|
|
238
|
+
'ds-hidden': !!hidden,
|
|
239
|
+
'ds-hidden-xs-up': !!xsUpHidden,
|
|
240
|
+
'ds-hidden-sm-up': !!smUpHidden,
|
|
241
|
+
'ds-hidden-md-up': !!mdUpHidden,
|
|
242
|
+
'ds-hidden-lg-up': !!lgUpHidden,
|
|
243
|
+
'ds-hidden-xl-up': !!xlUpHidden,
|
|
244
|
+
'ds-hidden-xs': !!xsHidden,
|
|
245
|
+
'ds-hidden-sm': !!smHidden,
|
|
246
|
+
'ds-hidden-md': !!mdHidden,
|
|
247
|
+
'ds-hidden-lg': !!lgHidden,
|
|
248
|
+
'ds-hidden-xl': !!xlHidden,
|
|
249
|
+
})}
|
|
250
|
+
ref={ref}
|
|
251
|
+
{...props}
|
|
252
|
+
>
|
|
253
|
+
{children}
|
|
254
|
+
</Component>
|
|
255
|
+
);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
export default Base;
|