@flux-ui/types 3.0.0-next.35 → 3.0.0-next.39

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,11 +1,11 @@
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.35",
4
+ "version": "3.0.0-next.39",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
8
- "homepage": "https://flux.bas.dev",
8
+ "homepage": "https://flux-ui.dev",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/basmilius/flux.git",
@@ -23,17 +23,15 @@
23
23
  "provenance": true
24
24
  },
25
25
  "files": [
26
- "src",
27
- "tsconfig.json"
26
+ "src"
28
27
  ],
29
28
  "main": "./src/index.ts",
30
29
  "module": "./src/index.ts",
31
30
  "types": "./src/index.ts",
32
31
  "typings": "./src/index.ts",
33
32
  "sideEffects": false,
34
- "dependencies": {},
35
- "devDependencies": {
33
+ "dependencies": {
36
34
  "@fortawesome/fontawesome-common-types": "^7.2.0",
37
- "@types/luxon": "^3.7.1"
35
+ "luxon": "^3.7.2"
38
36
  }
39
37
  }
package/src/filter.ts CHANGED
@@ -62,3 +62,53 @@ export type FluxFilterValue =
62
62
  | FluxFilterValueSingle[];
63
63
 
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
+ };
105
+
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;
114
+ };
package/src/form.ts CHANGED
@@ -1,5 +1,17 @@
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
+
3
15
  export type FluxFormTreeViewSelectOption = {
4
16
  readonly id: string | number;
5
17
  readonly label: string;
package/src/index.ts CHANGED
@@ -31,19 +31,30 @@ export type {
31
31
  FluxFilterBase,
32
32
  FluxFilterDateEntry,
33
33
  FluxFilterDateRangeEntry,
34
+ FluxFilterDateRangeSpec,
35
+ FluxFilterDateSpec,
36
+ FluxFilterEntryMap,
34
37
  FluxFilterItem,
38
+ FluxFilterOptionAsyncSpec,
35
39
  FluxFilterOptionEntry,
36
40
  FluxFilterOptionHeader,
37
41
  FluxFilterOptionItem,
38
42
  FluxFilterOptionRow,
43
+ FluxFilterOptionSpec,
44
+ FluxFilterOptionsAsyncSpec,
39
45
  FluxFilterOptionsEntry,
46
+ FluxFilterOptionsSpec,
40
47
  FluxFilterRangeEntry,
48
+ FluxFilterRangeSpec,
49
+ FluxFilterSpec,
50
+ FluxFilterSpecMap,
41
51
  FluxFilterState,
42
52
  FluxFilterValue,
43
53
  FluxFilterValueSingle
44
54
  } from './filter';
45
55
 
46
56
  export type {
57
+ FluxFormInputBaseProps,
47
58
  FluxFormSelectEntry,
48
59
  FluxFormSelectGroup,
49
60
  FluxFormSelectOption,
package/tsconfig.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "useDefineForClassFields": true,
5
- "module": "esnext",
6
- "moduleResolution": "bundler",
7
- "strict": true,
8
- "jsx": "preserve",
9
- "resolveJsonModule": true,
10
- "isolatedModules": true,
11
- "esModuleInterop": true,
12
- "lib": [
13
- "esnext",
14
- "dom"
15
- ],
16
- "skipLibCheck": true,
17
- "allowSyntheticDefaultImports": true,
18
- "declaration": true,
19
- "declarationMap": true,
20
- "emitDeclarationOnly": true,
21
- "outDir": "dist",
22
- "baseUrl": ".",
23
- "rootDir": "./src",
24
- "paths": {
25
- "$flux/*": ["src/*"]
26
- }
27
- },
28
- "include": [
29
- "./src/**/*.ts",
30
- "./src/**/*.vue"
31
- ],
32
- "exclude": [
33
- "dist",
34
- "node_modules"
35
- ],
36
- "references": [
37
- {
38
- "path": "./tsconfig.node.json"
39
- }
40
- ],
41
- "vueCompilerOptions": {
42
- "target": 3.5,
43
- "strictTemplates": false
44
- }
45
- }