Compare commits
73 Commits
stable
...
server-bud
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6988db3f4a | ||
|
|
97ce99497f | ||
|
|
6af875972e | ||
|
|
6ffe7fba4e | ||
|
|
323a97849a | ||
|
|
04153b7408 | ||
|
|
082d957694 | ||
|
|
1af9491e4f | ||
|
|
df2f9daa1f | ||
|
|
270fb862bb | ||
|
|
c4658f9455 | ||
|
|
c711e2b6c1 | ||
|
|
4b48f09112 | ||
|
|
6c7df7c1f9 | ||
|
|
0b9b440a7a | ||
|
|
ebb83aca51 | ||
|
|
e5c2ef47ac | ||
|
|
af068d1f89 | ||
|
|
35fe969b1b | ||
|
|
cc44fad62e | ||
|
|
42294d4a53 | ||
|
|
d8fcd43324 | ||
|
|
ccb07e12db | ||
|
|
f2267587c8 | ||
|
|
4bc34776fb | ||
|
|
63657a8496 | ||
|
|
b3e82c55f6 | ||
|
|
9a45d6707d | ||
|
|
46138997d1 | ||
|
|
c19d5a5722 | ||
|
|
c2cb61eb70 | ||
|
|
ca5cd55585 | ||
|
|
6fd5164987 | ||
|
|
60a864a790 | ||
|
|
c510f722ef | ||
|
|
1fed3ebbd7 | ||
|
|
84e4cda6ad | ||
|
|
4fb5bbca34 | ||
|
|
e0805c125f | ||
|
|
a2fc6bdd31 | ||
|
|
866f4891ce | ||
|
|
0f7a1e6b97 | ||
|
|
0b15ba18a0 | ||
|
|
cfc8186da1 | ||
|
|
47ad1492dc | ||
|
|
90af0466f4 | ||
|
|
98e4ece50a | ||
|
|
9e82032595 | ||
|
|
abb6e86f35 | ||
|
|
c8d14cae09 | ||
|
|
d815a22f6b | ||
|
|
d5e2030d23 | ||
|
|
f9b8dde199 | ||
|
|
c17cd28525 | ||
|
|
5ebbff4f87 | ||
|
|
ca2a930bd5 | ||
|
|
7346198360 | ||
|
|
17c4d168fa | ||
|
|
b74175e660 | ||
|
|
3628deee95 | ||
|
|
7650eed644 | ||
|
|
eeeb1d3bcd | ||
|
|
3863ce369d | ||
|
|
e10b105756 | ||
|
|
89006275a0 | ||
|
|
b4f423eac0 | ||
|
|
d5f55cee80 | ||
|
|
fcf110749d | ||
|
|
6db52ca7a8 | ||
|
|
e91f8e7e06 | ||
|
|
1425671d16 | ||
|
|
61364fb846 | ||
|
|
1a5f83d78c |
3
.gitignore
vendored
@@ -53,3 +53,6 @@ bundle.mobile.js.map
|
|||||||
|
|
||||||
# build output
|
# build output
|
||||||
package.tgz
|
package.tgz
|
||||||
|
|
||||||
|
# Fly.io configuration
|
||||||
|
fly.toml
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ if ! [ -d packages/desktop-client/locale ]; then
|
|||||||
git clone https://github.com/actualbudget/translations packages/desktop-client/locale
|
git clone https://github.com/actualbudget/translations packages/desktop-client/locale
|
||||||
fi
|
fi
|
||||||
pushd packages/desktop-client/locale > /dev/null
|
pushd packages/desktop-client/locale > /dev/null
|
||||||
|
git checkout .
|
||||||
git pull
|
git pull
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
packages/desktop-client/bin/remove-untranslated-languages
|
packages/desktop-client/bin/remove-untranslated-languages
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ if ! [ -d packages/desktop-client/locale ]; then
|
|||||||
git clone https://github.com/actualbudget/translations packages/desktop-client/locale
|
git clone https://github.com/actualbudget/translations packages/desktop-client/locale
|
||||||
fi
|
fi
|
||||||
pushd packages/desktop-client/locale > /dev/null
|
pushd packages/desktop-client/locale > /dev/null
|
||||||
|
git checkout .
|
||||||
git pull
|
git pull
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
packages/desktop-client/bin/remove-untranslated-languages
|
packages/desktop-client/bin/remove-untranslated-languages
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ export default [
|
|||||||
'packages/api/@types',
|
'packages/api/@types',
|
||||||
'packages/api/migrations',
|
'packages/api/migrations',
|
||||||
'packages/crdt/dist',
|
'packages/crdt/dist',
|
||||||
|
'packages/component-library/src/icons/**/*',
|
||||||
'packages/desktop-client/bundle.browser.js',
|
'packages/desktop-client/bundle.browser.js',
|
||||||
'packages/desktop-client/build/',
|
'packages/desktop-client/build/',
|
||||||
'packages/desktop-client/build-electron/',
|
'packages/desktop-client/build-electron/',
|
||||||
@@ -102,7 +103,6 @@ export default [
|
|||||||
'packages/desktop-client/public/data/',
|
'packages/desktop-client/public/data/',
|
||||||
'packages/desktop-client/**/node_modules/*',
|
'packages/desktop-client/**/node_modules/*',
|
||||||
'packages/desktop-client/node_modules/',
|
'packages/desktop-client/node_modules/',
|
||||||
'packages/desktop-client/src/icons/**/*',
|
|
||||||
'packages/desktop-client/test-results/',
|
'packages/desktop-client/test-results/',
|
||||||
'packages/desktop-client/playwright-report/',
|
'packages/desktop-client/playwright-report/',
|
||||||
'packages/desktop-electron/client-build/',
|
'packages/desktop-electron/client-build/',
|
||||||
@@ -789,7 +789,6 @@ export default [
|
|||||||
'packages/desktop-client/src/components/select/DateSelect.tsx',
|
'packages/desktop-client/src/components/select/DateSelect.tsx',
|
||||||
'packages/desktop-client/src/components/sidebar/Tools.tsx',
|
'packages/desktop-client/src/components/sidebar/Tools.tsx',
|
||||||
'packages/desktop-client/src/components/sort.tsx',
|
'packages/desktop-client/src/components/sort.tsx',
|
||||||
'packages/desktop-client/src/components/spreadsheet/useSheetValue.ts',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -7,14 +7,22 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/css": "^11.13.4",
|
"@emotion/css": "^11.13.4",
|
||||||
"react-aria-components": "^1.4.1"
|
"react-aria-components": "^1.7.0",
|
||||||
|
"usehooks-ts": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@svgr/cli": "^8.1.0",
|
||||||
"@types/react": "^18.2.0",
|
"@types/react": "^18.2.0",
|
||||||
"react": "18.2.0"
|
"react": "18.2.0"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"./icons/*": "./src/icons/*.tsx",
|
"./hooks/*": "./src/hooks/*.ts",
|
||||||
|
"./icons/logo": "./src/icons/logo/index.ts",
|
||||||
|
"./icons/v0": "./src/icons/v0/index.ts",
|
||||||
|
"./icons/v1": "./src/icons/v1/index.ts",
|
||||||
|
"./icons/v2": "./src/icons/v2/index.ts",
|
||||||
|
"./icons/AnimatedLoading": "./src/icons/AnimatedLoading.tsx",
|
||||||
|
"./icons/Loading": "./src/icons/Loading.tsx",
|
||||||
"./aligned-text": "./src/AlignedText.tsx",
|
"./aligned-text": "./src/AlignedText.tsx",
|
||||||
"./block": "./src/Block.tsx",
|
"./block": "./src/Block.tsx",
|
||||||
"./button": "./src/Button.tsx",
|
"./button": "./src/Button.tsx",
|
||||||
@@ -22,10 +30,12 @@
|
|||||||
"./form-error": "./src/FormError.tsx",
|
"./form-error": "./src/FormError.tsx",
|
||||||
"./initial-focus": "./src/InitialFocus.ts",
|
"./initial-focus": "./src/InitialFocus.ts",
|
||||||
"./inline-field": "./src/InlineField.tsx",
|
"./inline-field": "./src/InlineField.tsx",
|
||||||
|
"./input": "./src/Input.tsx",
|
||||||
"./label": "./src/Label.tsx",
|
"./label": "./src/Label.tsx",
|
||||||
"./menu": "./src/Menu.tsx",
|
"./menu": "./src/Menu.tsx",
|
||||||
"./paragraph": "./src/Paragraph.tsx",
|
"./paragraph": "./src/Paragraph.tsx",
|
||||||
"./popover": "./src/Popover.tsx",
|
"./popover": "./src/Popover.tsx",
|
||||||
|
"./select": "./src/Select.tsx",
|
||||||
"./space-between": "./src/SpaceBetween.tsx",
|
"./space-between": "./src/SpaceBetween.tsx",
|
||||||
"./stack": "./src/Stack.tsx",
|
"./stack": "./src/Stack.tsx",
|
||||||
"./styles": "./src/styles.ts",
|
"./styles": "./src/styles.ts",
|
||||||
@@ -36,5 +46,8 @@
|
|||||||
"./toggle": "./src/Toggle.tsx",
|
"./toggle": "./src/Toggle.tsx",
|
||||||
"./tooltip": "./src/Tooltip.tsx",
|
"./tooltip": "./src/Tooltip.tsx",
|
||||||
"./view": "./src/View.tsx"
|
"./view": "./src/View.tsx"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --template template.ts --index-template index-template.ts --typescript --expand-props start -d . ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,12 @@ import React, {
|
|||||||
type InputHTMLAttributes,
|
type InputHTMLAttributes,
|
||||||
type KeyboardEvent,
|
type KeyboardEvent,
|
||||||
type Ref,
|
type Ref,
|
||||||
useRef,
|
|
||||||
} from 'react';
|
} from 'react';
|
||||||
|
|
||||||
import { styles } from '@actual-app/components/styles';
|
|
||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
|
|
||||||
import { useMergedRefs } from '../../hooks/useMergedRefs';
|
import { styles, type CSSProperties } from './styles';
|
||||||
import { useProperFocus } from '../../hooks/useProperFocus';
|
import { theme } from './theme';
|
||||||
import { theme, type CSSProperties } from '../../style';
|
|
||||||
|
|
||||||
export const defaultInputStyle = {
|
export const defaultInputStyle = {
|
||||||
outline: 0,
|
outline: 0,
|
||||||
@@ -29,7 +26,6 @@ type InputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|||||||
onEscape?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
onEscape?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
||||||
onChangeValue?: (newValue: string) => void;
|
onChangeValue?: (newValue: string) => void;
|
||||||
onUpdate?: (newValue: string) => void;
|
onUpdate?: (newValue: string) => void;
|
||||||
focused?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function Input({
|
export function Input({
|
||||||
@@ -39,18 +35,12 @@ export function Input({
|
|||||||
onEscape,
|
onEscape,
|
||||||
onChangeValue,
|
onChangeValue,
|
||||||
onUpdate,
|
onUpdate,
|
||||||
focused,
|
|
||||||
className,
|
className,
|
||||||
...nativeProps
|
...nativeProps
|
||||||
}: InputProps) {
|
}: InputProps) {
|
||||||
const ref = useRef<HTMLInputElement>(null);
|
|
||||||
useProperFocus(ref, focused);
|
|
||||||
|
|
||||||
const mergedRef = useMergedRefs<HTMLInputElement>(ref, inputRef);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
ref={mergedRef}
|
ref={inputRef}
|
||||||
className={cx(
|
className={cx(
|
||||||
css(
|
css(
|
||||||
defaultInputStyle,
|
defaultInputStyle,
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
import { useRef, useState, type CSSProperties } from 'react';
|
import { useRef, useState, type CSSProperties } from 'react';
|
||||||
|
|
||||||
import { Button } from '@actual-app/components/button';
|
import { Button } from './Button';
|
||||||
import { Menu } from '@actual-app/components/menu';
|
import { SvgExpandArrow } from './icons/v0';
|
||||||
import { Popover } from '@actual-app/components/popover';
|
import { Menu } from './Menu';
|
||||||
import { View } from '@actual-app/components/view';
|
import { Popover } from './Popover';
|
||||||
|
import { View } from './View';
|
||||||
import { SvgExpandArrow } from '../../icons/v0';
|
|
||||||
|
|
||||||
function isValueOption<Value>(
|
function isValueOption<Value>(
|
||||||
option: readonly [Value, string] | typeof Menu.line,
|
option: readonly [Value, string] | typeof Menu.line,
|
||||||
23
packages/component-library/src/hooks/useResponsive.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { useWindowSize } from 'usehooks-ts';
|
||||||
|
|
||||||
|
import { breakpoints } from '../tokens';
|
||||||
|
|
||||||
|
export function useResponsive() {
|
||||||
|
const { height, width } = useWindowSize({
|
||||||
|
debounceDelay: 250,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Possible view modes: narrow, small, medium, wide
|
||||||
|
// To check if we're at least small width, check !isNarrowWidth
|
||||||
|
return {
|
||||||
|
// atLeastMediumWidth is provided to avoid checking (isMediumWidth || isWideWidth)
|
||||||
|
atLeastMediumWidth: width >= breakpoints.medium,
|
||||||
|
isNarrowWidth: width < breakpoints.small,
|
||||||
|
isSmallWidth: width >= breakpoints.small && width < breakpoints.medium,
|
||||||
|
isMediumWidth: width >= breakpoints.medium && width < breakpoints.wide,
|
||||||
|
// No atLeastWideWidth because that's identical to isWideWidth
|
||||||
|
isWideWidth: width >= breakpoints.wide,
|
||||||
|
height,
|
||||||
|
width,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ function indexTemplate(filePaths) {
|
|||||||
const basename = path.basename(filePath, path.extname(filePath));
|
const basename = path.basename(filePath, path.extname(filePath));
|
||||||
const exportName = `Svg${basename}`;
|
const exportName = `Svg${basename}`;
|
||||||
return `export { ${exportName} } from './${basename}'`;
|
return `export { ${exportName} } from './${basename}'`;
|
||||||
})
|
});
|
||||||
return exportEntries.join('\n');
|
return exportEntries.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = indexTemplate
|
module.exports = indexTemplate;
|
||||||
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
@@ -1,5 +1,5 @@
|
|||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
const template = ({ imports, interfaces, componentName, props, jsx }, { tpl }) => {
|
const tmpl = ({ imports, interfaces, componentName, props, jsx }, { tpl }) => {
|
||||||
return tpl`
|
return tpl`
|
||||||
${imports};
|
${imports};
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ ${interfaces};
|
|||||||
export const ${componentName} = (${props}) => (
|
export const ${componentName} = (${props}) => (
|
||||||
${jsx}
|
${jsx}
|
||||||
);
|
);
|
||||||
`
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = template
|
module.exports = tmpl;
|
||||||
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 601 B |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 817 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |