@flux-ui/types 3.0.0-next.4 → 3.0.0-next.41
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/README.md +2 -44
- package/package.json +9 -19
- package/src/common.ts +7 -5
- package/src/components.ts +32 -0
- package/src/filter.ts +50 -5
- package/src/form.ts +26 -0
- package/src/index.ts +25 -4
- package/src/statistics.ts +7 -0
- package/src/font-awesome.ts +0 -4838
- package/src/material-symbols.ts +0 -3508
- package/tsconfig.json +0 -45
package/README.md
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@flux-ui/types`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
targets Vue 3+. Please read the following instructions and checks in order to proceed.
|
|
5
|
-
|
|
6
|
-
## 📦 Registry
|
|
7
|
-
|
|
8
|
-
- The UI library package is available under `@flux-ui/components`.
|
|
9
|
-
- The Dashboard library package is available under `@flux-ui/dashboard`.
|
|
10
|
-
- The internal package is available under `@flux-ui/internals`.
|
|
11
|
-
|
|
12
|
-
## ⚠️ Requirements
|
|
13
|
-
|
|
14
|
-
- Install Node.js ^22
|
|
15
|
-
- Install pnpm using `npm i -g pnpm`.
|
|
16
|
-
- Configure a new environment variable `FONTAWESOME_NPM_AUTH_TOKEN`. This should be a valid Font Awesome private npm auth token.
|
|
17
|
-
- Use `pnpm install` to install the required packages.
|
|
18
|
-
- Use `pnpm dev` to start a build watcher for both targets.
|
|
19
|
-
- Use `pnpm build` to build a production bundle.
|
|
20
|
-
- Use `pnpm link` to link the dist folder of flux to your global node_modules.
|
|
21
|
-
|
|
22
|
-
## 🪵 Git
|
|
23
|
-
|
|
24
|
-
All commit messages and branches will be in English.
|
|
25
|
-
|
|
26
|
-
### Branches
|
|
27
|
-
|
|
28
|
-
- **Main** — Contains the latest stable release and is the exact source that is running in production.
|
|
29
|
-
- **Develop** — Contains the latest staging release that is marked for deployment and is the exact source that is running on staging.
|
|
30
|
-
- **Feature branches** — Any feature should have its own feature branch. Once complete, the branch should be merged into the _develop_ branch and the feature branch should be deleted.
|
|
31
|
-
- **Bugfix branches** — When a bug is found, it should be fixed within a bugfix branch. Once complete the branch should be merged into the _develop_ branch and the feature branch should be deleted.
|
|
32
|
-
|
|
33
|
-
### Commit messages
|
|
34
|
-
|
|
35
|
-
Commit messages are bound to the following templates:
|
|
36
|
-
|
|
37
|
-
- `<type>: <message> `
|
|
38
|
-
- `<type>(<feature>): <message>`
|
|
39
|
-
- `<type>(<feature>): <message> [<issue-number>]`
|
|
40
|
-
|
|
41
|
-
#### Examples
|
|
42
|
-
|
|
43
|
-
- `feat(expandable): adds header slot to expandable.`
|
|
44
|
-
- `feat(expandable): adds header slot to expandable. [FLUX-123]`
|
|
45
|
-
- `chore: adds vue 3 build target.`
|
|
3
|
+
Contains all public types that are used in various `@flux-ui` packages.
|
package/package.json
CHANGED
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/types",
|
|
3
3
|
"description": "Contains all public types of Flux UI packages.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.41",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
8
|
-
"homepage": "https://flux.
|
|
8
|
+
"homepage": "https://flux-ui.dev",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/basmilius/flux.git",
|
|
12
|
-
"directory": "packages/
|
|
12
|
+
"directory": "packages/types"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"design system",
|
|
18
|
-
"vue",
|
|
19
|
-
"vue 3",
|
|
20
|
-
"ui",
|
|
21
|
-
"components",
|
|
22
|
-
"flux"
|
|
15
|
+
"flux",
|
|
16
|
+
"types"
|
|
23
17
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"prepublishOnly": "cp ../../README.md ."
|
|
26
|
-
},
|
|
27
18
|
"exports": {
|
|
28
19
|
".": "./src/index.ts"
|
|
29
20
|
},
|
|
@@ -32,16 +23,15 @@
|
|
|
32
23
|
"provenance": true
|
|
33
24
|
},
|
|
34
25
|
"files": [
|
|
35
|
-
"src"
|
|
36
|
-
"tsconfig.json"
|
|
26
|
+
"src"
|
|
37
27
|
],
|
|
38
28
|
"main": "./src/index.ts",
|
|
39
29
|
"module": "./src/index.ts",
|
|
40
30
|
"types": "./src/index.ts",
|
|
41
31
|
"typings": "./src/index.ts",
|
|
42
32
|
"sideEffects": false,
|
|
43
|
-
"dependencies": {
|
|
44
|
-
|
|
45
|
-
"
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@fortawesome/fontawesome-common-types": "^7.2.0",
|
|
35
|
+
"luxon": "^3.7.2"
|
|
46
36
|
}
|
|
47
37
|
}
|
package/src/common.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { FontAwesome } from '
|
|
2
|
-
import type { MaterialSymbol } from './material-symbols';
|
|
1
|
+
import type { IconName as FontAwesome } from '@fortawesome/fontawesome-common-types';
|
|
3
2
|
|
|
4
|
-
export type FluxIconName = FontAwesome
|
|
5
|
-
|
|
6
|
-
export type
|
|
3
|
+
export type FluxIconName = FontAwesome;
|
|
4
|
+
|
|
5
|
+
export type FluxAlignment =
|
|
6
|
+
| 'start'
|
|
7
|
+
| 'center'
|
|
8
|
+
| 'end';
|
|
7
9
|
|
|
8
10
|
export type FluxColor =
|
|
9
11
|
| 'gray'
|
package/src/components.ts
CHANGED
|
@@ -53,3 +53,35 @@ export type FluxSegmentedControlItemObject = {
|
|
|
53
53
|
readonly icon?: FluxIconName;
|
|
54
54
|
readonly label?: string;
|
|
55
55
|
};
|
|
56
|
+
|
|
57
|
+
export type FluxTreeViewOption = {
|
|
58
|
+
readonly id: string | number;
|
|
59
|
+
readonly label: string;
|
|
60
|
+
readonly icon?: FluxIconName;
|
|
61
|
+
readonly children?: FluxTreeViewOption[];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type FluxCommandSubAction = {
|
|
65
|
+
readonly label: string;
|
|
66
|
+
readonly icon?: FluxIconName;
|
|
67
|
+
readonly onActivate: () => void;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type FluxCommandSourceItem = {
|
|
71
|
+
readonly id: string | number;
|
|
72
|
+
readonly label: string;
|
|
73
|
+
readonly subLabel?: string;
|
|
74
|
+
readonly icon?: FluxIconName;
|
|
75
|
+
readonly command?: string;
|
|
76
|
+
readonly subActions?: FluxCommandSubAction[];
|
|
77
|
+
readonly onActivate: () => void;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type FluxCommandSource = {
|
|
81
|
+
readonly key: string;
|
|
82
|
+
readonly label: string;
|
|
83
|
+
readonly icon?: FluxIconName;
|
|
84
|
+
readonly tab?: boolean;
|
|
85
|
+
readonly items: FluxCommandSourceItem[];
|
|
86
|
+
readonly fetchSearch?: (query: string) => Promise<FluxCommandSourceItem[]>;
|
|
87
|
+
};
|
package/src/filter.ts
CHANGED
|
@@ -41,6 +41,7 @@ export type FluxFilterOptionHeader = {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export type FluxFilterOptionItem = {
|
|
44
|
+
readonly icon?: FluxIconName;
|
|
44
45
|
readonly label: string;
|
|
45
46
|
readonly value: FluxFilterValueSingle;
|
|
46
47
|
};
|
|
@@ -60,10 +61,54 @@ export type FluxFilterValue =
|
|
|
60
61
|
| FluxFilterValueSingle
|
|
61
62
|
| FluxFilterValueSingle[];
|
|
62
63
|
|
|
63
|
-
export type FluxFilterState =
|
|
64
|
-
|
|
64
|
+
export type FluxFilterState = Record<string, FluxFilterValue>;
|
|
65
|
+
|
|
66
|
+
export type FluxFilterSpec = {
|
|
67
|
+
readonly icon?: FluxIconName;
|
|
68
|
+
readonly label: string;
|
|
69
|
+
readonly name: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type FluxFilterDateSpec = FluxFilterSpec;
|
|
73
|
+
|
|
74
|
+
export type FluxFilterDateRangeSpec = FluxFilterSpec;
|
|
75
|
+
|
|
76
|
+
export type FluxFilterOptionSpec = FluxFilterSpec & {
|
|
77
|
+
readonly options: FluxFilterOptionRow[];
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type FluxFilterOptionAsyncSpec = FluxFilterSpec & {
|
|
81
|
+
fetchOptions(ids: FluxFilterValue[]): Promise<FluxFilterOptionRow[]>;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type FluxFilterOptionsSpec = FluxFilterSpec & {
|
|
85
|
+
readonly options: FluxFilterOptionRow[];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type FluxFilterOptionsAsyncSpec = FluxFilterSpec & {
|
|
89
|
+
fetchOptions(ids: FluxFilterValue[]): Promise<FluxFilterOptionRow[]>;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export type FluxFilterRangeSpec = FluxFilterSpec & {
|
|
93
|
+
formatter?(value: number): string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type FluxFilterSpecMap = {
|
|
97
|
+
date: FluxFilterDateSpec;
|
|
98
|
+
dateRange: FluxFilterDateRangeSpec;
|
|
99
|
+
option: FluxFilterOptionSpec;
|
|
100
|
+
optionAsync: FluxFilterOptionAsyncSpec;
|
|
101
|
+
options: FluxFilterOptionsSpec;
|
|
102
|
+
optionsAsync: FluxFilterOptionsAsyncSpec;
|
|
103
|
+
range: FluxFilterRangeSpec;
|
|
104
|
+
};
|
|
65
105
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
106
|
+
export type FluxFilterEntryMap = {
|
|
107
|
+
date: FluxFilterDateEntry;
|
|
108
|
+
dateRange: FluxFilterDateRangeEntry;
|
|
109
|
+
option: FluxFilterOptionEntry;
|
|
110
|
+
optionAsync: FluxFilterOptionEntry;
|
|
111
|
+
options: FluxFilterOptionsEntry;
|
|
112
|
+
optionsAsync: FluxFilterOptionsEntry;
|
|
113
|
+
range: FluxFilterRangeEntry;
|
|
69
114
|
};
|
package/src/form.ts
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import type { FluxIconName } from './common';
|
|
2
2
|
|
|
3
|
+
export type FluxFormInputBaseProps = {
|
|
4
|
+
readonly autoFocus?: boolean;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly error?: string | null;
|
|
7
|
+
readonly isCondensed?: boolean;
|
|
8
|
+
readonly isLoading?: boolean;
|
|
9
|
+
readonly isReadonly?: boolean;
|
|
10
|
+
readonly isSecondary?: boolean;
|
|
11
|
+
readonly name?: string;
|
|
12
|
+
readonly placeholder?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type FluxFormTreeViewSelectOption = {
|
|
16
|
+
readonly id: string | number;
|
|
17
|
+
readonly label: string;
|
|
18
|
+
readonly icon?: FluxIconName;
|
|
19
|
+
readonly selectable?: boolean;
|
|
20
|
+
readonly children?: FluxFormTreeViewSelectOption[];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type FluxFormTreeViewSelectValue = FluxFormTreeViewSelectValueSingle | FluxFormTreeViewSelectValueSingle[];
|
|
24
|
+
export type FluxFormTreeViewSelectValueSingle = string | number;
|
|
25
|
+
|
|
3
26
|
export type FluxFormSelectGroup = {
|
|
4
27
|
readonly icon?: FluxIconName;
|
|
5
28
|
readonly label: string;
|
|
29
|
+
readonly value?: never;
|
|
6
30
|
};
|
|
7
31
|
|
|
8
32
|
export type FluxFormSelectOption = {
|
|
@@ -10,6 +34,8 @@ export type FluxFormSelectOption = {
|
|
|
10
34
|
readonly command?: string;
|
|
11
35
|
readonly commandIcon?: FluxIconName;
|
|
12
36
|
readonly icon?: FluxIconName;
|
|
37
|
+
readonly imageAlt?: string;
|
|
38
|
+
readonly imageSrc?: string;
|
|
13
39
|
readonly label: string;
|
|
14
40
|
readonly selectable?: boolean;
|
|
15
41
|
readonly value: string | number | null;
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
FluxAlignment,
|
|
2
3
|
FluxAutoCompleteType,
|
|
3
4
|
FluxColor,
|
|
4
5
|
FluxDirection,
|
|
5
|
-
FluxFontAwesomeIconName,
|
|
6
6
|
FluxIconName,
|
|
7
7
|
FluxInputMask,
|
|
8
8
|
FluxInputType,
|
|
9
|
-
FluxMaterialIconName,
|
|
10
9
|
FluxMaybePromise,
|
|
11
10
|
FluxPressableType,
|
|
12
11
|
FluxSize,
|
|
@@ -18,35 +17,53 @@ export type {
|
|
|
18
17
|
FluxButtonProps,
|
|
19
18
|
FluxButtonSize,
|
|
20
19
|
FluxButtonSlots,
|
|
20
|
+
FluxCommandSource,
|
|
21
|
+
FluxCommandSourceItem,
|
|
22
|
+
FluxCommandSubAction,
|
|
21
23
|
FluxFocalPointObject,
|
|
22
24
|
FluxLegendObject,
|
|
23
25
|
FluxPercentageBarItemObject,
|
|
24
|
-
FluxSegmentedControlItemObject
|
|
26
|
+
FluxSegmentedControlItemObject,
|
|
27
|
+
FluxTreeViewOption
|
|
25
28
|
} from './components';
|
|
26
29
|
|
|
27
30
|
export type {
|
|
28
31
|
FluxFilterBase,
|
|
29
32
|
FluxFilterDateEntry,
|
|
30
33
|
FluxFilterDateRangeEntry,
|
|
34
|
+
FluxFilterDateRangeSpec,
|
|
35
|
+
FluxFilterDateSpec,
|
|
36
|
+
FluxFilterEntryMap,
|
|
31
37
|
FluxFilterItem,
|
|
38
|
+
FluxFilterOptionAsyncSpec,
|
|
32
39
|
FluxFilterOptionEntry,
|
|
33
40
|
FluxFilterOptionHeader,
|
|
34
41
|
FluxFilterOptionItem,
|
|
35
42
|
FluxFilterOptionRow,
|
|
43
|
+
FluxFilterOptionSpec,
|
|
44
|
+
FluxFilterOptionsAsyncSpec,
|
|
36
45
|
FluxFilterOptionsEntry,
|
|
46
|
+
FluxFilterOptionsSpec,
|
|
37
47
|
FluxFilterRangeEntry,
|
|
48
|
+
FluxFilterRangeSpec,
|
|
49
|
+
FluxFilterSpec,
|
|
50
|
+
FluxFilterSpecMap,
|
|
38
51
|
FluxFilterState,
|
|
39
52
|
FluxFilterValue,
|
|
40
53
|
FluxFilterValueSingle
|
|
41
54
|
} from './filter';
|
|
42
55
|
|
|
43
56
|
export type {
|
|
57
|
+
FluxFormInputBaseProps,
|
|
44
58
|
FluxFormSelectEntry,
|
|
45
59
|
FluxFormSelectGroup,
|
|
46
60
|
FluxFormSelectOption,
|
|
47
61
|
FluxFormSelectOptions,
|
|
48
62
|
FluxFormSelectValue,
|
|
49
|
-
FluxFormSelectValueSingle
|
|
63
|
+
FluxFormSelectValueSingle,
|
|
64
|
+
FluxFormTreeViewSelectOption,
|
|
65
|
+
FluxFormTreeViewSelectValue,
|
|
66
|
+
FluxFormTreeViewSelectValueSingle
|
|
50
67
|
} from './form';
|
|
51
68
|
|
|
52
69
|
export type {
|
|
@@ -56,3 +73,7 @@ export type {
|
|
|
56
73
|
FluxSnackbarObject,
|
|
57
74
|
FluxTooltipObject
|
|
58
75
|
} from './notify';
|
|
76
|
+
|
|
77
|
+
export type {
|
|
78
|
+
FluxStatisticsChange
|
|
79
|
+
} from './statistics';
|