@rabbitio/ui-kit 1.0.0-beta.42 → 1.0.0-beta.45
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/.gitlab-ci.yml +29 -0
- package/.husky/commit-msg +8 -0
- package/.husky/pre-push +1 -0
- package/README.md +13 -4
- package/dist/index.cjs +1545 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +23630 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +1318 -103
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1534 -149
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1544 -152
- package/dist/index.umd.js.map +1 -1
- package/package.json +16 -3
- package/src/assets/image/icons/arrow-tosca.svg +3 -0
- package/src/assets/image/icons/arrow-white.svg +14 -0
- package/src/assets/image/icons/failed-validation-icon.svg +15 -0
- package/src/assets/image/icons/successful-validation-icon.svg +10 -0
- package/src/common/amountUtils.js +4 -2
- package/src/common/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +14 -0
- package/src/common/utils/cache.js +4 -4
- package/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx +44 -0
- package/src/components/atoms/BackgroundTitle/background-title.module.scss +52 -0
- package/src/components/atoms/Validation/Validation.jsx +130 -0
- package/src/components/atoms/Validation/validation.module.scss +15 -0
- package/src/components/atoms/buttons/Close/Close.jsx +64 -0
- package/src/components/atoms/buttons/Close/close.module.scss +75 -0
- package/src/components/atoms/buttons/LinkButton/LinkButton.jsx +121 -0
- package/src/components/atoms/buttons/LinkButton/link-button.module.scss +45 -0
- package/src/components/organisms/Dialog/Dialog.jsx +515 -0
- package/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx +122 -0
- package/src/components/organisms/Dialog/DialogButtons/dialog-buttons.module.scss +25 -0
- package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +664 -0
- package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +362 -0
- package/src/components/organisms/Dialog/dialog.module.scss +223 -0
- package/src/components/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +139 -0
- package/src/components/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +71 -0
- package/src/components/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +144 -0
- package/src/components/utils/inputValueProviders.js +58 -0
- package/src/constants/organisms/dialog/DialogStep/dialogStep.js +1 -0
- package/src/constants/organisms/dialog/dialog.js +29 -0
- package/src/index.js +11 -0
- package/src/robustExteranlApiCallerService/robustExternalAPICallerService.js +3 -1
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +787 -0
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +745 -0
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +31 -0
- package/src/swaps-lib/external-apis/swapProvider.js +17 -4
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +91 -30
- package/src/swaps-lib/models/baseSwapCreationInfo.js +4 -1
- package/src/swaps-lib/models/existingSwap.js +3 -0
- package/src/swaps-lib/models/existingSwapWithFiatData.js +4 -0
- package/src/swaps-lib/services/publicSwapService.js +32 -4
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +506 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +1311 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getAllSupportedCurrencies.test.js +76 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getDepositCurrencies.test.js +82 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +1892 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getWithdrawalCurrencies.test.js +111 -0
- package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +88 -0
- package/stories/stubs/exampleContent.jsx +20 -0
- package/styles/fonts/NunitoSans-Bold.ttf +0 -0
- package/styles/fonts/NunitoSans-ExtraBold.ttf +0 -0
- package/styles/fonts/NunitoSans-Light.ttf +0 -0
- package/styles/fonts/NunitoSans-Regular.ttf +0 -0
- package/styles/fonts/NunitoSans-SemiBold.ttf +0 -0
- package/styles/index.scss +14 -13
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- build
|
|
3
|
+
- test
|
|
4
|
+
# - release
|
|
5
|
+
|
|
6
|
+
test:
|
|
7
|
+
stage: test
|
|
8
|
+
image: node:iron
|
|
9
|
+
cache:
|
|
10
|
+
key: "$CI_COMMIT_REF_SLUG"
|
|
11
|
+
paths:
|
|
12
|
+
- node_modules/
|
|
13
|
+
variables:
|
|
14
|
+
GIT_STRATEGY: fetch
|
|
15
|
+
script:
|
|
16
|
+
- npm install --force --no-fund # --no-optional
|
|
17
|
+
- npm run test
|
|
18
|
+
|
|
19
|
+
build:
|
|
20
|
+
stage: build
|
|
21
|
+
image: node:iron
|
|
22
|
+
cache:
|
|
23
|
+
key: "$CI_COMMIT_REF_SLUG"
|
|
24
|
+
paths:
|
|
25
|
+
- node_modules/
|
|
26
|
+
script:
|
|
27
|
+
- HUSKY=true npm install --force --no-fund
|
|
28
|
+
# use "- unset CI" if needed to ignore warnings - dirty workaround due to React's way to fail builds having warnings
|
|
29
|
+
- npm run build
|
package/.husky/pre-push
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npm run build && git diff --quiet || (echo 'Uncommitted changes detected. Please commit or stash them. If you have no uncommitted changes this error is caused by running npm run build - you forget to do this. Please add build result to commit and retry.' && exit 1)
|
package/README.md
CHANGED
|
@@ -29,8 +29,8 @@ import "@rabbitio/ui-kit/index.css";
|
|
|
29
29
|
~~~
|
|
30
30
|
|
|
31
31
|
# Adding new component
|
|
32
|
-
1. Add a directory for component under the semantically corresponding subdirectory inside **./
|
|
33
|
-
2. Under the
|
|
32
|
+
1. Add a directory for component under the semantically corresponding subdirectory inside **./src/components** and add **<Component>.js**, **<Component>.module.scss** to this directory
|
|
33
|
+
2. Under the **./stories** directory repeat the directories structure from **./src/components** and implement **<Component>.stories.js** there
|
|
34
34
|
3. Add the implemented component import to barrel file **./stories/index.js**
|
|
35
35
|
~~~javascript
|
|
36
36
|
export { default as <Component> } from "./path/to/<Component>";
|
|
@@ -45,9 +45,18 @@ sudo docker run -d -p 6006:6006 storybook-app
|
|
|
45
45
|
~~~
|
|
46
46
|
|
|
47
47
|
# Publishing
|
|
48
|
-
1. Increase version number
|
|
49
|
-
2. Run
|
|
48
|
+
1. Increase version number
|
|
49
|
+
2. Run npm run build. Ensure that all the uncommitted changes are planned to be published as build command will build them all into the bundle.
|
|
50
|
+
3. Commit and push changes
|
|
51
|
+
4. Run:
|
|
50
52
|
~~~bash
|
|
51
53
|
npm login
|
|
52
54
|
npm publish --access public
|
|
53
55
|
~~~
|
|
56
|
+
|
|
57
|
+
# Dev details
|
|
58
|
+
1. The repository uses husky to assure
|
|
59
|
+
1. each commit message ends with task_id=<id>
|
|
60
|
+
2. there is no uncommitted changes when pushing (to avoid pushing not built changes)
|
|
61
|
+
2. The repository follows git-flow branching model
|
|
62
|
+
3. There is a basic CI/CD setup
|