@molecule/app-ui-react-native 1.0.6 → 1.0.7
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAmB,SAAS,EAAQ,MAAM,cAAc,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD;;GAEG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAmB,SAAS,EAAQ,MAAM,cAAc,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD;;GAEG;AACH,eAAO,MAAM,KAAK,8EAmGjB,CAAA"}
|
package/dist/components/Input.js
CHANGED
|
@@ -32,5 +32,5 @@ export const Input = forwardRef(({ label, error, hint, size = 'md', leftElement,
|
|
|
32
32
|
if (onChange) {
|
|
33
33
|
onChange({ target: { value: text } });
|
|
34
34
|
}
|
|
35
|
-
}, onFocus: onFocus, onBlur: onBlur, secureTextEntry: secureTextEntry, keyboardType: keyboardType, accessibilityLabel: typeof label === 'string' ? label : undefined }), clearable && !!value && (_jsx(Pressable, { className: cm.inputClearButton, onPress: handleClear, children: _jsx(Text, { children: t('ui.
|
|
35
|
+
}, onFocus: onFocus, onBlur: onBlur, secureTextEntry: secureTextEntry, keyboardType: keyboardType, accessibilityLabel: typeof label === 'string' ? label : undefined }), clearable && !!value && (_jsx(Pressable, { className: cm.inputClearButton, onPress: handleClear, accessibilityRole: "button", accessibilityLabel: t('ui.input.clear', undefined, { defaultValue: 'Clear' }), children: _jsx(Text, { children: t('ui.icon.close', undefined, { defaultValue: '✕' }) }) })), !!rightElement && !clearable && (_jsx(View, { className: cm.inputRightElement, children: rightElement }))] }), !!error && typeof error === 'string' && _jsx(Text, { className: cm.formError, children: error }), !!hint && !error && _jsx(Text, { className: cm.formHint, children: hint })] }));
|
|
36
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAGvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAGvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiIhD,CAAA"}
|
|
@@ -42,5 +42,13 @@ export const Pagination = ({ page, totalPages, onChange, siblings = 1, boundarie
|
|
|
42
42
|
return [...new Set(items)];
|
|
43
43
|
};
|
|
44
44
|
const pages = buildPaginationRange();
|
|
45
|
-
return (_jsx(View, { className: cm.cn(cm.paginationRoot, className), testID: testId, accessibilityRole: "toolbar", accessibilityLabel: t('ui.pagination.nav', undefined, { defaultValue: 'Pagination' }), children: _jsxs(View, { className: cm.paginationContent, children: [showFirstLast && (_jsx(Pressable, { className: cm.paginationPrevious, onPress: () => onChange?.(1), disabled: page <= 1, accessibilityLabel: t('ui.pagination.first', undefined, {
|
|
45
|
+
return (_jsx(View, { className: cm.cn(cm.paginationRoot, className), testID: testId, accessibilityRole: "toolbar", accessibilityLabel: t('ui.pagination.nav', undefined, { defaultValue: 'Pagination' }), children: _jsxs(View, { className: cm.paginationContent, children: [showFirstLast && (_jsx(Pressable, { className: cm.paginationPrevious, onPress: () => onChange?.(1), disabled: page <= 1, accessibilityLabel: t('ui.pagination.first', undefined, {
|
|
46
|
+
defaultValue: 'Go to first page',
|
|
47
|
+
}), children: _jsx(Text, { children: t('ui.icon.chevronsLeft', undefined, { defaultValue: '«' }) }) })), _jsx(Pressable, { className: cm.paginationPrevious, onPress: () => onChange?.(page - 1), disabled: page <= 1, accessibilityLabel: t('ui.pagination.previous', undefined, {
|
|
48
|
+
defaultValue: 'Go to previous page',
|
|
49
|
+
}), children: _jsx(Text, { children: t('ui.icon.chevronLeft', undefined, { defaultValue: '‹' }) }) }), pages.map((item, i) => item === 'ellipsis' ? (_jsx(View, { className: cm.paginationEllipsis, children: _jsx(Text, { children: t('ui.icon.ellipsis', undefined, { defaultValue: '…' }) }) }, `ellipsis-${i}`)) : (_jsx(Pressable, { className: cm.cn(cm.paginationLink, cm.pagination({ active: item === page, size })), onPress: () => onChange?.(item), accessibilityRole: "button", accessibilityState: { selected: item === page }, accessibilityLabel: t('ui.pagination.goToPage', { page: String(item) }, { defaultValue: `Page ${item}` }), children: _jsx(Text, { children: item }) }, item))), _jsx(Pressable, { className: cm.paginationNext, onPress: () => onChange?.(page + 1), disabled: page >= totalPages, accessibilityLabel: t('ui.pagination.next', undefined, {
|
|
50
|
+
defaultValue: 'Go to next page',
|
|
51
|
+
}), children: _jsx(Text, { children: t('ui.icon.chevronRight', undefined, { defaultValue: '›' }) }) }), showFirstLast && (_jsx(Pressable, { className: cm.paginationNext, onPress: () => onChange?.(totalPages), disabled: page >= totalPages, accessibilityLabel: t('ui.pagination.last', undefined, {
|
|
52
|
+
defaultValue: 'Go to last page',
|
|
53
|
+
}), children: _jsx(Text, { children: t('ui.icon.chevronsRight', undefined, { defaultValue: '»' }) }) }))] }) }));
|
|
46
54
|
};
|
package/dist/components/Table.js
CHANGED
|
@@ -35,7 +35,7 @@ export const Table = ({ columns = [], data = [], rowKey, onRowClick, striped, bo
|
|
|
35
35
|
onSort(String(col.key), sort?.key === String(col.key) && sort?.direction === 'asc' ? 'desc' : 'asc'), disabled: !col.sortable, children: [_jsx(Text, { children: col.header }), col.sortable && sort?.key === String(col.key) && (_jsx(Text, { className: cm.tableSortIcon, children: sort.direction === 'asc'
|
|
36
36
|
? t('ui.icon.sortAsc', undefined, { defaultValue: '↑' })
|
|
37
37
|
: t('ui.icon.sortDesc', undefined, { defaultValue: '↓' }) }))] }, String(col.key)))) }), loading && (_jsx(View, { className: cm.tableLoadingOverlay, children: _jsx(Spinner, { size: "md" }) })), data.length === 0 && !loading ? (_jsx(View, { className: cm.tableEmptyCell, children: _jsx(Text, { className: cm.textMuted, children: emptyMessage ||
|
|
38
|
-
t('ui.table.empty', undefined, { defaultValue: 'No data' }) }) })) : (_jsx(FlatList, { data: data, keyExtractor: (item, index) => getRowKey(item, index), renderItem: ({ item, index }) => {
|
|
38
|
+
t('ui.table.empty', undefined, { defaultValue: 'No data available' }) }) })) : (_jsx(FlatList, { data: data, keyExtractor: (item, index) => getRowKey(item, index), renderItem: ({ item, index }) => {
|
|
39
39
|
const row = item;
|
|
40
40
|
return (_jsx(Pressable, { className: cm.cn(cm.tableRow, striped && index % 2 === 1 && cm.tableRowStriped, hoverable && cm.tableRowHoverable, onRowClick && cm.tableRowClickable), onPress: () => onRowClick?.(row, index), disabled: !onRowClick, children: columns.map((col) => {
|
|
41
41
|
const cellValue = row[col.key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-ui-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "React Native UI component implementations for molecule.dev",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-ui-react-native",
|
|
6
6
|
"type": "module",
|
|
@@ -36,9 +36,10 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@molecule/app-i18n": "1.1.2",
|
|
38
38
|
"@molecule/app-icons": "1.0.3",
|
|
39
|
-
"@molecule/app-ui": "1.3.
|
|
39
|
+
"@molecule/app-ui": "1.3.11",
|
|
40
40
|
"@types/node": "26.6.5",
|
|
41
41
|
"react": "19.3.1",
|
|
42
|
+
"react-dom": "19.3.1",
|
|
42
43
|
"typescript": "6.0.3",
|
|
43
44
|
"vitest": "4.1.12"
|
|
44
45
|
},
|