@1money/component-ui 0.0.54 → 0.0.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1money/component-ui",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "React Components based on primereact for 1money front-end projects",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -175,6 +175,12 @@
175
175
  "source": "readme",
176
176
  "compilable": true
177
177
  },
178
+ "0e108d8c30e072c42d4f176f082dc9355d81b15249eb59b0db8dedf54018daf2": {
179
+ "title": "Figma Auto Conversion Table",
180
+ "code": "{\n const [expandedKeys, setExpandedKeys] = useState<React.Key[]>(['activity-row-2']);\n\n return (\n <div style={figmaFrameStyle}>\n <Table<ActivityLedgerRow>\n rowKey=\"id\"\n size=\"small\"\n variant=\"stroke\"\n pagination={false}\n columns={activityLedgerColumns}\n dataSource={activityLedgerRows}\n expandable={{\n expandedRowKeys: expandedKeys,\n onExpandedRowsChange: (keys) => setExpandedKeys([...keys]),\n rowExpandable: (record) => Boolean(record.details?.length),\n expandedRowRender: (record) => (\n record.details\n ? <ActivityLedgerDetailsPanel details={record.details} />\n : null\n ),\n }}\n />\n </div>\n );\n }",
181
+ "source": "stories",
182
+ "compilable": true
183
+ },
178
184
  "0e53815284d097cccdcb6cdff3952b42734dda8b58b4cdeac1948e5f1d2b3587": {
179
185
  "title": "Expandable List",
180
186
  "code": "<WalletRegistryStory\n dataSource={expandableListRows}\n defaultExpandedKeys={['wallet-big-tom', 'wallet-global-treasury']}\n />",
@@ -259,12 +265,6 @@
259
265
  "source": "canonical",
260
266
  "compilable": true
261
267
  },
262
- "1c879c8d080ccdc8a79261e997d29861634e6ae8f74d950f7305a1167ddb1fb5": {
263
- "title": "Figma Auto Conversion Table",
264
- "code": "{\n const [expandedKeys, setExpandedKeys] = useState<React.Key[]>(['activity-row-2']);\n\n const handleToggle = (rowId: string) => {\n setExpandedKeys((currentKeys) => (\n currentKeys.includes(rowId)\n ? currentKeys.filter((key) => key !== rowId)\n : [...currentKeys, rowId]\n ));\n };\n\n return (\n <div style={figmaFrameStyle}>\n <Table<ActivityLedgerRow>\n rowKey=\"id\"\n size=\"small\"\n variant=\"stroke\"\n pagination={false}\n columns={createActivityLedgerColumns({\n expandedKeys,\n onToggle: handleToggle,\n })}\n dataSource={activityLedgerRows}\n expandable={{\n showExpandColumn: false,\n expandedRowKeys: expandedKeys,\n rowExpandable: (record) => Boolean(record.details?.length),\n expandedRowRender: (record) => (\n record.details\n ? <ActivityLedgerDetailsPanel details={record.details} />\n : null\n ),\n }}\n />\n </div>\n );\n }",
265
- "source": "stories",
266
- "compilable": true
267
- },
268
268
  "1d0cc410e4f667fa13d9ad249ca801acda6fd51fc78c87c3b00209163c48df6b": {
269
269
  "title": "Range Selection",
270
270
  "code": "<Calendar\n label=\"Date Range\"\n selectionMode=\"range\"\n numberOfMonths={2}\n/>",
@@ -283,12 +283,6 @@
283
283
  "source": "stories",
284
284
  "compilable": false
285
285
  },
286
- "1df04178d3aa417559337049bac95bb324b380eefa44e8c04836ddf3595bc5b8": {
287
- "title": "Expandable Column Config",
288
- "code": "{\n const rows: RowExpandableDemoRow[] = [\n { id: 'r1', title: 'Order #1001', notes: 'Awaiting carrier handoff.' },\n { id: 'r2', title: 'Order #1002', notes: 'Refund issued for SKU-ABC.' },\n { id: 'r3', title: 'Order #1003', notes: 'Customer requested expedited shipping.' },\n ];\n\n const columns: TableColumn<RowExpandableDemoRow>[] = [\n { key: 'title', dataIndex: 'title', title: 'Order' },\n {\n key: 'status',\n title: 'Status',\n render: () => <Tag label=\"Open\" color=\"success\" />,\n },\n ];\n\n return (\n <div style={{ width: 720 }}>\n <TypographyBody className=\"om-mb-3\">\n Custom <code>columnTitle</code> / <code>columnWidth</code> / <code>fixed</code> on\n the expand column, plus <code>defaultExpandAllRows</code> to seed every\n row open on mount.\n </TypographyBody>\n <Table<RowExpandableDemoRow>\n rowKey=\"id\"\n size=\"small\"\n variant=\"stroke\"\n pagination={false}\n dataSource={rows}\n columns={columns}\n expandable={{\n columnTitle: 'Detail',\n columnWidth: 72,\n fixed: 'left',\n defaultExpandAllRows: true,\n expandedRowRender: (record) => (\n <div style={{ padding: '8px 16px', background: '#fafafa' }}>\n <TypographyLabel>{record.notes}</TypographyLabel>\n </div>\n ),\n }}\n />\n </div>\n );\n }",
289
- "source": "stories",
290
- "compilable": true
291
- },
292
286
  "1e2ce5743dcd5a069489baf67169280a5ebfc7ed959fc8cb1f7f52f846c1b544": {
293
287
  "title": "Text Variant",
294
288
  "code": "<div style={columnStyle}>\n {BUTTON_SIZES.map((size) => (\n <div key={size}>\n <h3 style={sectionHeaderStyle}>Text - {size}</h3>\n <div style={rowStyle}>\n <Button {...args} variant={BUTTON_VARIANT.text} size={size}>\n Button\n </Button>\n <Button {...args} variant={BUTTON_VARIANT.text} size={size} disabled>\n Disabled\n </Button>\n <Button {...args} variant={BUTTON_VARIANT.text} size={size} loading>\n Loading\n </Button>\n </div>\n </div>\n ))}\n </div>",
@@ -655,6 +649,12 @@
655
649
  "source": "canonical",
656
650
  "compilable": true
657
651
  },
652
+ "3eedd50d52a64053a324f9cfc7c8ca991eed3d650f88c0731fa85be7fe1352c2": {
653
+ "title": "Footer",
654
+ "code": "{\n const rows = portfolioRows.slice(0, 4);\n const totalBalance = rows.reduce((sum, r) => sum + r.balance, 0);\n\n return (\n <Table<PortfolioRow>\n rowKey=\"id\"\n variant=\"stroke\"\n pagination={false}\n dataSource={rows}\n columns={portfolioColumns}\n footer={(currentPageData) => (\n <Flex align=\"center\" justify=\"space-between\" gap=\"middle\">\n <Flex align=\"center\" gap=\"small\">\n <Tag\n color=\"neutral\"\n size=\"small\"\n label={`${currentPageData.length} ${\n currentPageData.length === 1 ? 'wallet' : 'wallets'\n }`}\n removable={false}\n />\n <TypographyLabel size=\"md\" color=\"default-tertiary\">\n Total balance · {formatBalance(totalBalance)}\n </TypographyLabel>\n </Flex>\n <Flex align=\"center\" gap=\"small\">\n <Button size=\"small\" variant=\"text\" color=\"grey\">\n Export\n </Button>\n <Button\n size=\"small\"\n color=\"primary\"\n iconStart={<Icons name=\"add\" size={16} />}\n >\n New wallet\n </Button>\n </Flex>\n </Flex>\n )}\n />\n );\n }",
655
+ "source": "stories",
656
+ "compilable": true
657
+ },
658
658
  "3eeffae8089eb4c5263987d1efdbdb531b44459ca7f63135ee8f3a215faa0928": {
659
659
  "title": "No Arrow",
660
660
  "code": "<div style={ANCHOR_WRAPPER_STYLE}>\n <button id=\"tooltip-no-arrow\">Hover me</button>\n <Tooltip {...args} anchorSelect=\"#tooltip-no-arrow\" />\n </div>",
@@ -841,6 +841,12 @@
841
841
  "source": "stories",
842
842
  "compilable": false
843
843
  },
844
+ "5a377a26c6ff1d855746de603b966dc47d7c9bcb12b73a0bcf2d990f55822934": {
845
+ "title": "Figma Wallet Registry",
846
+ "code": "<WalletRegistryStory\n dataSource={walletRegistryRows}\n defaultExpandedKeys={['wallet-customer-funds']}\n />",
847
+ "source": "stories",
848
+ "compilable": true
849
+ },
844
850
  "5a4df64ed15fd8845be815f9f67cd01c0f22d1a22431c653c972f7ab6cff60f7": {
845
851
  "title": "Import",
846
852
  "code": "import { Slider } from '@1money/component-ui';\n// or\nimport { Slider } from '@1money/component-ui/Slider';",
@@ -979,6 +985,12 @@
979
985
  "source": "stories",
980
986
  "compilable": true
981
987
  },
988
+ "6854c5f90061bab89ea2f1b25443380f6f6b7ddd60ae4e3fb450ed6688c5a743": {
989
+ "title": "Fixed And Sticky",
990
+ "code": "<Table<PortfolioRow>\n rowKey=\"id\"\n pagination={false}\n sticky\n scroll={{ x: 1120, y: 280 }}\n dataSource={portfolioRows}\n columns={[\n {\n ...portfolioColumns[0],\n width: 280,\n fixed: 'left',\n },\n { ...portfolioColumns[1], width: 160 },\n { ...portfolioColumns[2], width: 140 },\n {\n key: 'owner',\n dataIndex: 'owner',\n title: 'Owner',\n width: 220,\n },\n {\n key: 'balance',\n dataIndex: 'balance',\n title: 'Balance',\n width: 160,\n align: 'right',\n render: (value) => formatBalance(value as number),\n },\n {\n ...portfolioColumns[4],\n width: 160,\n fixed: 'right',\n },\n ]}\n />",
991
+ "source": "stories",
992
+ "compilable": true
993
+ },
982
994
  "69b3c7f7f0c52a2b442c48facf31fa65600796fb8e47401b6b3c432389dbf92d": {
983
995
  "title": "Slider Story",
984
996
  "code": "<ProForm\n {...args}\n initialValues={{ volume: 50, price: 200 }}\n onFinish={(values) => alert(JSON.stringify(values, null, 2))}\n >\n <ProFormSlider\n name=\"volume\"\n label=\"Volume\"\n fieldProps={{ min: 0, max: 100, step: 1 }}\n />\n <ProFormSlider\n name=\"price\"\n label=\"Price\"\n fieldProps={{ min: 0, max: 1000, step: 10, valuePrefix: '$' }}\n />\n </ProForm>",
@@ -1009,12 +1021,6 @@
1009
1021
  "source": "readme",
1010
1022
  "compilable": true
1011
1023
  },
1012
- "6f1ac382a21af48aded6d900902e14d386aec026b6a51b8efa0fbac1f515290a": {
1013
- "title": "Fixed And Sticky",
1014
- "code": "<Table<PortfolioRow>\n rowKey=\"id\"\n pagination={false}\n sticky\n scroll={{ x: 1120, y: 280 }}\n dataSource={portfolioRows}\n columns={[\n {\n ...portfolioColumns[0],\n fixed: 'left',\n },\n portfolioColumns[1],\n portfolioColumns[2],\n {\n key: 'owner',\n dataIndex: 'owner',\n title: 'Owner',\n width: 220,\n },\n {\n key: 'balance',\n dataIndex: 'balance',\n title: 'Balance',\n width: 160,\n align: 'right',\n render: (value) => formatBalance(value as number),\n },\n {\n ...portfolioColumns[4],\n fixed: 'right',\n },\n ]}\n />",
1015
- "source": "stories",
1016
- "compilable": true
1017
- },
1018
1024
  "6f2b7da00479a6033fdaca36f0646a924c61cbf09cd0e07da6948a884af98a61": {
1019
1025
  "title": "Dependency",
1020
1026
  "code": "<ProForm\n {...args}\n initialValues={{ hasAccount: false, accountType: '' }}\n >\n <ProFormSwitch name=\"hasAccount\" label=\"Has Account\" />\n <ProFormDependency name={['hasAccount']}>\n {({ hasAccount }) =>\n hasAccount ? (\n <>\n <ProFormText\n name=\"accountId\"\n label=\"Account ID\"\n rules={[{ required: true }]}\n />\n <ProFormText name=\"accountName\" label=\"Account Name\" />\n </>\n ) : null\n }\n </ProFormDependency>\n </ProForm>",
@@ -1183,12 +1189,6 @@
1183
1189
  "source": "stories",
1184
1190
  "compilable": false
1185
1191
  },
1186
- "823cd3e869e470f99c6b9d6cb00a728fee68347e270789bbf153257c2169bfc3": {
1187
- "title": "Footer",
1188
- "code": "{\n const rows = portfolioRows.slice(0, 4);\n const totalBalance = rows.reduce((sum, r) => sum + r.balance, 0);\n\n return (\n <div>\n <TypographyBody size=\"sm\" color=\"default-tertiary\" style={hintStyle}>\n The <code>footer</code> render prop renders a free-form panel below the\n table body. It receives the current page&rsquo;s rows so it can compute\n totals or render bulk actions.\n </TypographyBody>\n <Table<PortfolioRow>\n rowKey=\"id\"\n variant=\"stroke\"\n pagination={false}\n dataSource={rows}\n columns={portfolioColumns}\n footer={(currentPageData) => (\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n }}\n >\n <TypographyLabel>\n Showing {currentPageData.length} wallet\n {currentPageData.length === 1 ? '' : 's'}\n </TypographyLabel>\n <TypographyLabel>\n Total balance: ${totalBalance.toLocaleString()}\n </TypographyLabel>\n </div>\n )}\n />\n </div>\n );\n }",
1189
- "source": "stories",
1190
- "compilable": true
1191
- },
1192
1192
  "829d1add076b11f67d3d30e761c7861b952e35bb1ae8a1c71c99a97bbf5318a9": {
1193
1193
  "title": "All States",
1194
1194
  "code": "<div style={previewStackStyle}>\n <Cell {...args}>Authenticator app</Cell>\n <Cell {...args} className=\"om-component-ui-cell-hovered\">\n Authenticator app\n </Cell>\n <Cell {...args} active>\n Authenticator app\n </Cell>\n <Cell {...args} disabled>\n Authenticator app\n </Cell>\n </div>",
@@ -1387,6 +1387,12 @@
1387
1387
  "source": "canonical",
1388
1388
  "compilable": true
1389
1389
  },
1390
+ "96adc03431b83a0ec2fec308a77078fec9ffeb4ce1808f1833ce2ddbb679d126": {
1391
+ "title": "Nested Data Index",
1392
+ "code": "<div>\n <TypographyBody size=\"sm\" color=\"default-tertiary\" style={hintStyle}>\n Columns read from <code>user.profile.name</code>,{' '}\n <code>user.profile.email</code>, and <code>balance.fiat</code> via\n array-form <code>dataIndex</code>.\n </TypographyBody>\n <Table<NestedWalletRow>\n rowKey=\"id\"\n pagination={false}\n dataSource={nestedRows}\n columns={[\n {\n key: 'name',\n dataIndex: ['user', 'profile', 'name'],\n title: 'Name',\n },\n {\n key: 'email',\n dataIndex: ['user', 'profile', 'email'],\n title: 'Email',\n },\n {\n key: 'asset',\n dataIndex: ['balance', 'asset'],\n title: 'Asset',\n },\n {\n key: 'fiat',\n dataIndex: ['balance', 'fiat'],\n title: 'Balance',\n align: 'right',\n sorter: (a, b) => a.balance.fiat - b.balance.fiat,\n render: (value) => formatBalance(value as number),\n },\n ]}\n />\n </div>",
1393
+ "source": "stories",
1394
+ "compilable": true
1395
+ },
1390
1396
  "96e3c221e0a0bb936b1030912f88f56c0139a1804d4797492df913b9ec7b3766": {
1391
1397
  "title": "Nested",
1392
1398
  "code": "<Dropdown\n {...args}\n content={\n <div style={panelContentStyle}>\n <button type=\"button\" className=\"om-dropdown-item\">\n Profile\n </button>\n <Dropdown\n placement=\"right-start\"\n content={\n <div style={panelContentStyle}>\n <button type=\"button\" className=\"om-dropdown-item\">\n English\n </button>\n <button type=\"button\" className=\"om-dropdown-item\">\n 中文\n </button>\n <button type=\"button\" className=\"om-dropdown-item\">\n 日本語\n </button>\n </div>\n }\n >\n <button type=\"button\" className=\"om-dropdown-item\" style={{ justifyContent: 'space-between' }}>\n Language\n <Icons name=\"chevronRight\" size={14} color=\"#9fa3a3\" />\n </button>\n </Dropdown>\n <button type=\"button\" className=\"om-dropdown-item\">\n Settings\n </button>\n <button type=\"button\" className=\"om-dropdown-item\" style={{ color: '#e53935' }}>\n Sign out\n </button>\n </div>\n }\n >\n <Button>Menu</Button>\n </Dropdown>",
@@ -1453,12 +1459,6 @@
1453
1459
  "source": "canonical",
1454
1460
  "compilable": true
1455
1461
  },
1456
- "9c1283e9fdf9b6890dff56e79eee2e25f49c665934a1a11e56ef9e636b23642d": {
1457
- "title": "Figma Wallet Registry",
1458
- "code": "<WalletRegistryStory\n dataSource={walletRegistryRows}\n defaultExpandedKeys={['wallet-ops']}\n />",
1459
- "source": "stories",
1460
- "compilable": true
1461
- },
1462
1462
  "9eae41b47da6d3b07d6bfdb98fe407b6be85aa68db3fe695699cf9588b65eda8": {
1463
1463
  "title": "Placements",
1464
1464
  "code": "{\n const placements: Placement[] = [\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n ];\n\n return (\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 12,\n padding: 120,\n justifyContent: 'center',\n }}\n >\n {placements.map((placement) => (\n <Dropdown\n {...args}\n key={placement}\n placement={placement}\n content={\n <div style={{ padding: 8, fontSize: 13, whiteSpace: 'nowrap' }}>\n {placement}\n </div>\n }\n >\n <Button size=\"small\">{placement}</Button>\n </Dropdown>\n ))}\n </div>\n );\n }",
@@ -2053,12 +2053,6 @@
2053
2053
  "source": "stories",
2054
2054
  "compilable": false
2055
2055
  },
2056
- "da7b2e8d26561713d8946001e3c1ba6ea8c38e7fe99e4982b9eadd4fec64215d": {
2057
- "title": "Nested Data Index",
2058
- "code": "<div>\n <TypographyBody size=\"sm\" color=\"default-tertiary\" style={hintStyle}>\n Columns read from <code>user.profile.name</code>,{' '}\n <code>user.profile.email</code>, and <code>balance.fiat</code> via\n array-form <code>dataIndex</code>.\n </TypographyBody>\n <Table<NestedWalletRow>\n rowKey=\"id\"\n pagination={false}\n dataSource={nestedRows}\n columns={[\n {\n key: 'name',\n dataIndex: ['user', 'profile', 'name'],\n title: 'Name',\n width: 220,\n },\n {\n key: 'email',\n dataIndex: ['user', 'profile', 'email'],\n title: 'Email',\n width: 260,\n },\n {\n key: 'asset',\n dataIndex: ['balance', 'asset'],\n title: 'Asset',\n width: 120,\n },\n {\n key: 'fiat',\n dataIndex: ['balance', 'fiat'],\n title: 'Balance',\n width: 160,\n align: 'right',\n sorter: (a, b) => a.balance.fiat - b.balance.fiat,\n render: (value) => formatBalance(value as number),\n },\n ]}\n />\n </div>",
2059
- "source": "stories",
2060
- "compilable": true
2061
- },
2062
2056
  "db11dae227995e92880a75b42e93f034782b06757a643753f468b4e0b598692a": {
2063
2057
  "title": "Filter Wrap Spacing",
2064
2058
  "code": "<div style={DEMO_PAGE_STYLE}>\n <Space size={[8, 12]} wrap style={{ maxWidth: 640 }}>\n <div style={DEMO_CHIP_ITEM_STYLE}>All</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>High Risk</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>KYC Pending</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>Manual Review</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>Today</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>This Week</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>Large Amount</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>USDT</div>\n <div style={DEMO_CHIP_ITEM_STYLE}>USD</div>\n </Space>\n </div>",
@@ -13846,15 +13846,11 @@
13846
13846
  "source": "stories"
13847
13847
  },
13848
13848
  {
13849
- "hash": "1df04178d3aa417559337049bac95bb324b380eefa44e8c04836ddf3595bc5b8",
13849
+ "hash": "5a377a26c6ff1d855746de603b966dc47d7c9bcb12b73a0bcf2d990f55822934",
13850
13850
  "source": "stories"
13851
13851
  },
13852
13852
  {
13853
- "hash": "9c1283e9fdf9b6890dff56e79eee2e25f49c665934a1a11e56ef9e636b23642d",
13854
- "source": "stories"
13855
- },
13856
- {
13857
- "hash": "1c879c8d080ccdc8a79261e997d29861634e6ae8f74d950f7305a1167ddb1fb5",
13853
+ "hash": "0e108d8c30e072c42d4f176f082dc9355d81b15249eb59b0db8dedf54018daf2",
13858
13854
  "source": "stories"
13859
13855
  },
13860
13856
  {
@@ -13866,7 +13862,7 @@
13866
13862
  "source": "stories"
13867
13863
  },
13868
13864
  {
13869
- "hash": "6f1ac382a21af48aded6d900902e14d386aec026b6a51b8efa0fbac1f515290a",
13865
+ "hash": "6854c5f90061bab89ea2f1b25443380f6f6b7ddd60ae4e3fb450ed6688c5a743",
13870
13866
  "source": "stories"
13871
13867
  },
13872
13868
  {
@@ -13902,7 +13898,7 @@
13902
13898
  "source": "stories"
13903
13899
  },
13904
13900
  {
13905
- "hash": "da7b2e8d26561713d8946001e3c1ba6ea8c38e7fe99e4982b9eadd4fec64215d",
13901
+ "hash": "96adc03431b83a0ec2fec308a77078fec9ffeb4ce1808f1833ce2ddbb679d126",
13906
13902
  "source": "stories"
13907
13903
  },
13908
13904
  {
@@ -13910,7 +13906,7 @@
13910
13906
  "source": "stories"
13911
13907
  },
13912
13908
  {
13913
- "hash": "823cd3e869e470f99c6b9d6cb00a728fee68347e270789bbf153257c2169bfc3",
13909
+ "hash": "3eedd50d52a64053a324f9cfc7c8ca991eed3d650f88c0731fa85be7fe1352c2",
13914
13910
  "source": "stories"
13915
13911
  }
13916
13912
  ]
@@ -32,7 +32,7 @@ import resolveImport from './tools/resolve-import.mjs';
32
32
  import getLibraryInfo from './tools/get-library-info.mjs';
33
33
 
34
34
  const EXPECTED_SCHEMA_VERSION = '1';
35
- const SERVER_NAME = '1money-react-ui';
35
+ const SERVER_NAME = '1money-components-ui';
36
36
  const SERVER_VERSION = '0.1.0';
37
37
 
38
38
  const __filename = fileURLToPath(import.meta.url);