@dfx.swiss/react-components 1.1.1 → 1.1.2-beta.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.
@@ -1,12 +1,13 @@
1
1
  import { Asset } from '../definitions/asset';
2
2
  import { Fiat } from '../definitions/fiat';
3
- interface DfxYourCurrencyWalletSectionProps {
3
+ import { ControlProps } from './form/Form';
4
+ interface DfxYourCurrencyWalletSectionProps extends ControlProps {
4
5
  currencies: Fiat[];
5
6
  currencyElementName: string;
6
7
  asset: Asset;
7
8
  assetProtocol: string;
8
9
  onAssetClick: () => void;
9
10
  }
10
- export default function DfxYourCurrencyWalletSection({ currencies, currencyElementName, asset, assetProtocol, onAssetClick, }: DfxYourCurrencyWalletSectionProps): import("react/jsx-runtime").JSX.Element;
11
+ export default function DfxYourCurrencyWalletSection({ control, currencies, currencyElementName, asset, assetProtocol, onAssetClick, }: DfxYourCurrencyWalletSectionProps): import("react/jsx-runtime").JSX.Element;
11
12
  export {};
12
13
  //# sourceMappingURL=DfxYourCurrencyWalletSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DfxYourCurrencyWalletSection.d.ts","sourceRoot":"","sources":["../../src/stories/DfxYourCurrencyWalletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAK3C,UAAU,iCAAiC;IACzC,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,UAAU,EACV,mBAAmB,EACnB,KAAK,EACL,aAAa,EACb,YAAY,GACb,EAAE,iCAAiC,2CAoCnC"}
1
+ {"version":3,"file":"DfxYourCurrencyWalletSection.d.ts","sourceRoot":"","sources":["../../src/stories/DfxYourCurrencyWalletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,UAAU,iCAAkC,SAAQ,YAAY;IAC9D,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,OAAO,EACP,UAAU,EACV,mBAAmB,EACnB,KAAK,EACL,aAAa,EACb,YAAY,GACb,EAAE,iCAAiC,2CAqCnC"}
@@ -14,7 +14,7 @@ import DfxIcon, { IconColor, IconSize, IconVariant } from './DfxIcon';
14
14
  import StyledDropdown from './form/StyledDropdown';
15
15
  import StyledCoinListItem from './StyledCoinListItem';
16
16
  export default function DfxYourCurrencyWalletSection(_a) {
17
- var currencies = _a.currencies, currencyElementName = _a.currencyElementName, asset = _a.asset, assetProtocol = _a.assetProtocol, onAssetClick = _a.onAssetClick;
18
- return (_jsxs("div", __assign({ className: "flex justify-between items-center" }, { children: [_jsx("div", __assign({ className: "basis-5/12 shrink-1" }, { children: _jsx(StyledDropdown, { name: currencyElementName, label: "Your Currency", labelIcon: IconVariant.BANK, items: currencies, labelFunc: function (item) { return item.name; }, descriptionFunc: function (item) { return 'todo ' + item.name; } }) })), _jsx("div", __assign({ className: "basis-2/12 shrink-0 flex justify-center pt-9" }, { children: _jsx("div", __assign({ className: " " }, { children: _jsx(DfxIcon, { icon: IconVariant.ARROW_RIGHT, size: IconSize.LG, color: IconColor.GRAY }) })) })), _jsxs("div", __assign({ className: "basis-5/12 shrink-1" }, { children: [_jsxs("div", __assign({ className: "flex ml-3.5 mb-2.5" }, { children: [_jsx(DfxIcon, { icon: IconVariant.WALLET, size: IconSize.SM, color: IconColor.BLUE }), _jsx("label", __assign({ className: "text-dfxBlue-800 text-base font-semibold pl-3.5" }, { children: "Your Wallet" }))] })), _jsx("div", __assign({ className: "border border-dfxGray-400 rounded px-2 py-1.5 drop-shadow-sm" }, { children: _jsx(StyledCoinListItem, { asset: asset, isToken: false, protocol: assetProtocol, onClick: onAssetClick, disabled: true }) }))] }))] })));
17
+ var control = _a.control, currencies = _a.currencies, currencyElementName = _a.currencyElementName, asset = _a.asset, assetProtocol = _a.assetProtocol, onAssetClick = _a.onAssetClick;
18
+ return (_jsxs("div", __assign({ className: "flex justify-between items-center" }, { children: [_jsx("div", __assign({ className: "basis-5/12 shrink-1" }, { children: _jsx(StyledDropdown, { control: control, name: currencyElementName, label: "Your Currency", labelIcon: IconVariant.BANK, items: currencies, labelFunc: function (item) { return item.name; }, descriptionFunc: function (item) { return 'todo ' + item.name; } }) })), _jsx("div", __assign({ className: "basis-2/12 shrink-0 flex justify-center pt-9" }, { children: _jsx("div", __assign({ className: " " }, { children: _jsx(DfxIcon, { icon: IconVariant.ARROW_RIGHT, size: IconSize.LG, color: IconColor.GRAY }) })) })), _jsxs("div", __assign({ className: "basis-5/12 shrink-1" }, { children: [_jsxs("div", __assign({ className: "flex ml-3.5 mb-2.5" }, { children: [_jsx(DfxIcon, { icon: IconVariant.WALLET, size: IconSize.SM, color: IconColor.BLUE }), _jsx("label", __assign({ className: "text-dfxBlue-800 text-base font-semibold pl-3.5" }, { children: "Your Wallet" }))] })), _jsx("div", __assign({ className: "border border-dfxGray-400 rounded px-2 py-1.5 drop-shadow-sm" }, { children: _jsx(StyledCoinListItem, { asset: asset, isToken: false, protocol: assetProtocol, onClick: onAssetClick, disabled: true }) }))] }))] })));
19
19
  }
20
20
  //# sourceMappingURL=DfxYourCurrencyWalletSection.js.map
@@ -1 +1 @@
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AO,SAAS,EAAC,iDAAiD,iCAAoB,KAClF,EACN,uBAAK,SAAS,EAAC,8DAA8D,gBAC3E,KAAC,kBAAkB,IACjB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,IAAI,GACd,IACE,KACF,KACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"DfxYourCurrencyWalletSection.js","sourceRoot":"","sources":["../../src/stories/DfxYourCurrencyWalletSection.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEtE,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAUtD,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EAOjB;QANlC,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,mBAAmB,yBAAA,EACnB,KAAK,WAAA,EACL,aAAa,mBAAA,EACb,YAAY,kBAAA;IAEZ,OAAO,CACL,wBAAK,SAAS,EAAC,oCAAoC,iBACjD,uBAAK,SAAS,EAAC,qBAAqB,gBAClC,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAC,eAAe,EACrB,SAAS,EAAE,WAAW,CAAC,IAAI,EAC3B,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,IAAI,EAAT,CAAS,EAC9B,eAAe,EAAE,UAAC,IAAI,IAAK,OAAA,OAAO,GAAG,IAAI,CAAC,IAAI,EAAnB,CAAmB,GAC9C,IACE,EACN,uBAAK,SAAS,EAAC,8CAA8C,gBAC3D,uBAAK,SAAS,EAAC,GAAG,gBAChB,KAAC,OAAO,IAAC,IAAI,EAAE,WAAW,CAAC,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,GAAI,IAChF,IACF,EACN,wBAAK,SAAS,EAAC,qBAAqB,iBAClC,wBAAK,SAAS,EAAC,oBAAoB,iBACjC,KAAC,OAAO,IAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,GAAI,EAE/E,yBAAO,SAAS,EAAC,iDAAiD,iCAAoB,KAClF,EACN,uBAAK,SAAS,EAAC,8DAA8D,gBAC3E,KAAC,kBAAkB,IACjB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,IAAI,GACd,IACE,KACF,KACF,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@dfx.swiss/react-components",
4
- "version": "1.1.1",
4
+ "version": "1.1.2-beta.0",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -70,15 +70,15 @@
70
70
  ]
71
71
  },
72
72
  "devDependencies": {
73
- "@storybook/addon-actions": "^6.5.13",
74
- "@storybook/addon-essentials": "^6.5.13",
75
- "@storybook/addon-interactions": "^6.5.13",
76
- "@storybook/addon-links": "^6.5.13",
77
- "@storybook/builder-webpack5": "^6.5.13",
78
- "@storybook/manager-webpack5": "^6.5.13",
79
- "@storybook/node-logger": "^6.5.13",
73
+ "@storybook/addon-actions": "^6.5.16",
74
+ "@storybook/addon-essentials": "^6.5.16",
75
+ "@storybook/addon-interactions": "^6.5.16",
76
+ "@storybook/addon-links": "^6.5.16",
77
+ "@storybook/builder-webpack5": "^6.5.16",
78
+ "@storybook/manager-webpack5": "^6.5.16",
79
+ "@storybook/node-logger": "^6.5.16",
80
80
  "@storybook/preset-create-react-app": "^4.1.2",
81
- "@storybook/react": "^6.5.13",
81
+ "@storybook/react": "^6.5.16",
82
82
  "@storybook/testing-library": "^0.0.13",
83
83
  "autoprefixer": "^10.4.13",
84
84
  "babel-plugin-named-exports-order": "^0.0.2",
@@ -87,5 +87,5 @@
87
87
  "tailwindcss": "^3.2.4",
88
88
  "webpack": "^5.75.0"
89
89
  },
90
- "gitHead": "baa0fa9c819a27a8fb5b7ee65a0bb785e7376d07"
90
+ "gitHead": "abfc033e08408d94a83d0a6fdda09d5d2058ab3e"
91
91
  }