@wickermoney/ui-kit 0.0.0
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/LICENSE +202 -0
- package/dist/Alert.d.ts +9 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Alert.js +6 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Button.d.ts +16 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +14 -0
- package/dist/Button.js.map +1 -0
- package/dist/CategoryOptions.d.ts +47 -0
- package/dist/CategoryOptions.d.ts.map +1 -0
- package/dist/CategoryOptions.js +49 -0
- package/dist/CategoryOptions.js.map +1 -0
- package/dist/EmptyState.d.ts +13 -0
- package/dist/EmptyState.d.ts.map +1 -0
- package/dist/EmptyState.js +6 -0
- package/dist/EmptyState.js.map +1 -0
- package/dist/Feedback.d.ts +14 -0
- package/dist/Feedback.d.ts.map +1 -0
- package/dist/Feedback.js +11 -0
- package/dist/Feedback.js.map +1 -0
- package/dist/Field.d.ts +7 -0
- package/dist/Field.d.ts.map +1 -0
- package/dist/Field.js +8 -0
- package/dist/Field.js.map +1 -0
- package/dist/FieldCommon.d.ts +8 -0
- package/dist/FieldCommon.d.ts.map +1 -0
- package/dist/FieldCommon.js +2 -0
- package/dist/FieldCommon.js.map +1 -0
- package/dist/GroupableCategory.d.ts +13 -0
- package/dist/GroupableCategory.d.ts.map +1 -0
- package/dist/GroupableCategory.js +2 -0
- package/dist/GroupableCategory.js.map +1 -0
- package/dist/SelectField.d.ts +10 -0
- package/dist/SelectField.d.ts.map +1 -0
- package/dist/SelectField.js +8 -0
- package/dist/SelectField.js.map +1 -0
- package/dist/Spinner.d.ts +8 -0
- package/dist/Spinner.d.ts.map +1 -0
- package/dist/Spinner.js +6 -0
- package/dist/Spinner.js.map +1 -0
- package/dist/Stat.d.ts +12 -0
- package/dist/Stat.d.ts.map +1 -0
- package/dist/Stat.js +8 -0
- package/dist/Stat.js.map +1 -0
- package/dist/Surface.d.ts +13 -0
- package/dist/Surface.d.ts.map +1 -0
- package/dist/Surface.js +7 -0
- package/dist/Surface.js.map +1 -0
- package/dist/Table.d.ts +34 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +13 -0
- package/dist/Table.js.map +1 -0
- package/dist/components.css +69 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/orderByParent.d.ts +15 -0
- package/dist/orderByParent.d.ts.map +1 -0
- package/dist/orderByParent.js +27 -0
- package/dist/orderByParent.js.map +1 -0
- package/dist/tokens.css +75 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/dist/Alert.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link Alert}. */
|
|
3
|
+
export interface AlertProps {
|
|
4
|
+
/** The message to show. */
|
|
5
|
+
readonly children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** A message banner with `role="alert"`, used for errors and notices. */
|
|
8
|
+
export declare function Alert({ children }: AlertProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,+BAA+B;AAC/B,MAAM,WAAW,UAAU;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED,yEAAyE;AACzE,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,+BAE7C"}
|
package/dist/Alert.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** A message banner with `role="alert"`, used for errors and notices. */
|
|
3
|
+
export function Alert({ children }) {
|
|
4
|
+
return _jsx("div", { className: "wm-alert", role: "alert", children: children });
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":";AAQA,yEAAyE;AACzE,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAc;IAC5C,OAAO,cAAK,SAAS,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,YAAE,QAAQ,GAAO,CAAA;AAChE,CAAC"}
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link Button}: every native `<button>` attribute plus a visual variant. */
|
|
3
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** Visual emphasis. Defaults to `"default"`. */
|
|
5
|
+
readonly variant?: 'default' | 'primary' | 'danger';
|
|
6
|
+
/** The button label or content. */
|
|
7
|
+
readonly children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A button.
|
|
11
|
+
*
|
|
12
|
+
* `type` defaults to `"button"` rather than the browser's `"submit"`, which
|
|
13
|
+
* surprises people inside a form. Pass `type="submit"` to opt in.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Button({ variant, className, children, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5D,yFAAyF;AACzF,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,gDAAgD;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IACnD,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAmB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BASxF"}
|
package/dist/Button.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A button.
|
|
4
|
+
*
|
|
5
|
+
* `type` defaults to `"button"` rather than the browser's `"submit"`, which
|
|
6
|
+
* surprises people inside a form. Pass `type="submit"` to opt in.
|
|
7
|
+
*/
|
|
8
|
+
export function Button({ variant = 'default', className, children, ...rest }) {
|
|
9
|
+
const classes = ['wm-btn', variant !== 'default' ? `wm-btn--${variant}` : '', className ?? '']
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.join(' ');
|
|
12
|
+
return (_jsx("button", { type: "button", ...rest, className: classes, children: children }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":";AAUA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAe;IACvF,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,IAAI,EAAE,CAAC;SAC3F,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAA;IACZ,OAAO,CACL,iBAAQ,IAAI,EAAC,QAAQ,KAAK,IAAI,EAAE,SAAS,EAAE,OAAO,YAC/C,QAAQ,GACF,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { GroupableCategory } from './GroupableCategory.js';
|
|
2
|
+
/** Props for {@link CategoryOptions}. */
|
|
3
|
+
export interface CategoryOptionsProps {
|
|
4
|
+
/** Categories to list; parents are followed by their children. */
|
|
5
|
+
readonly categories: readonly GroupableCategory[];
|
|
6
|
+
/** Rendered first, for "no category" or "all categories". */
|
|
7
|
+
readonly placeholder?: {
|
|
8
|
+
readonly value: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Ids to leave out, for a picker that should not offer something already
|
|
13
|
+
* chosen elsewhere. Children of an excluded parent are still offered;
|
|
14
|
+
* exclusion is per id.
|
|
15
|
+
*/
|
|
16
|
+
readonly exclude?: ReadonlySet<string>;
|
|
17
|
+
/**
|
|
18
|
+
* `true` when choosing a parent means "this and everything under it".
|
|
19
|
+
*
|
|
20
|
+
* Changes only the parent's own option text, from `Food` to `All of Food`. A
|
|
21
|
+
* filter behaves that way whether or not this is set; the label exists so the
|
|
22
|
+
* picker never quietly means something different from what it says.
|
|
23
|
+
*/
|
|
24
|
+
readonly includesChildren?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Renders the `<option>`s of a category `<select>`, grouped under their parents.
|
|
28
|
+
*
|
|
29
|
+
* A flat list sorted by name interleaves the two levels, so "Groceries" lands
|
|
30
|
+
* between "Gifts" and "Housing" instead of under "Food". With dozens of
|
|
31
|
+
* categories that makes the dropdown unusable, since the only way to find a
|
|
32
|
+
* child is to already know its name.
|
|
33
|
+
*
|
|
34
|
+
* `<optgroup>` is used because it tells screen readers and native mobile pickers
|
|
35
|
+
* that the options belong to a heading, which a disabled option pretending to be
|
|
36
|
+
* one does not. A top-level category with no children is a plain selectable
|
|
37
|
+
* option, and a parent stays selectable inside its own group. A child whose
|
|
38
|
+
* parent is missing from the list (disabled, filtered or excluded) is shown
|
|
39
|
+
* under "Other" so it never silently vanishes.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <select>
|
|
43
|
+
* <CategoryOptions categories={cats} placeholder={{ value: '', label: 'None' }} />
|
|
44
|
+
* </select>
|
|
45
|
+
*/
|
|
46
|
+
export declare function CategoryOptions({ categories, placeholder, exclude, includesChildren, }: CategoryOptionsProps): import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=CategoryOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryOptions.d.ts","sourceRoot":"","sources":["../src/CategoryOptions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAA;IACjD,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzE;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACtC;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CACpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAwB,GAC3D,EAAE,oBAAoB,+BAqDtB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the `<option>`s of a category `<select>`, grouped under their parents.
|
|
5
|
+
*
|
|
6
|
+
* A flat list sorted by name interleaves the two levels, so "Groceries" lands
|
|
7
|
+
* between "Gifts" and "Housing" instead of under "Food". With dozens of
|
|
8
|
+
* categories that makes the dropdown unusable, since the only way to find a
|
|
9
|
+
* child is to already know its name.
|
|
10
|
+
*
|
|
11
|
+
* `<optgroup>` is used because it tells screen readers and native mobile pickers
|
|
12
|
+
* that the options belong to a heading, which a disabled option pretending to be
|
|
13
|
+
* one does not. A top-level category with no children is a plain selectable
|
|
14
|
+
* option, and a parent stays selectable inside its own group. A child whose
|
|
15
|
+
* parent is missing from the list (disabled, filtered or excluded) is shown
|
|
16
|
+
* under "Other" so it never silently vanishes.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <select>
|
|
20
|
+
* <CategoryOptions categories={cats} placeholder={{ value: '', label: 'None' }} />
|
|
21
|
+
* </select>
|
|
22
|
+
*/
|
|
23
|
+
export function CategoryOptions({ categories, placeholder, exclude, includesChildren = false, }) {
|
|
24
|
+
const groups = useMemo(() => {
|
|
25
|
+
const visible = exclude === undefined
|
|
26
|
+
? categories
|
|
27
|
+
: categories.filter((c) => !exclude.has(c.id));
|
|
28
|
+
const parents = visible.filter((c) => c.parent_id === null);
|
|
29
|
+
const byParent = new Map();
|
|
30
|
+
for (const c of visible) {
|
|
31
|
+
if (c.parent_id === null)
|
|
32
|
+
continue;
|
|
33
|
+
const list = byParent.get(c.parent_id) ?? [];
|
|
34
|
+
list.push(c);
|
|
35
|
+
byParent.set(c.parent_id, list);
|
|
36
|
+
}
|
|
37
|
+
const parentIds = new Set(parents.map((p) => p.id));
|
|
38
|
+
const orphans = visible.filter((c) => c.parent_id !== null && !parentIds.has(c.parent_id));
|
|
39
|
+
return { parents, byParent, orphans };
|
|
40
|
+
}, [categories, exclude]);
|
|
41
|
+
return (_jsxs(_Fragment, { children: [placeholder !== undefined ? (_jsx("option", { value: placeholder.value, children: placeholder.label })) : null, groups.parents.map((parent) => {
|
|
42
|
+
const children = groups.byParent.get(parent.id) ?? [];
|
|
43
|
+
if (children.length === 0) {
|
|
44
|
+
return _jsx("option", { value: parent.id, children: parent.name }, parent.id);
|
|
45
|
+
}
|
|
46
|
+
return (_jsxs("optgroup", { label: parent.name, children: [_jsx("option", { value: parent.id, children: includesChildren ? `All of ${parent.name}` : parent.name }), children.map((c) => (_jsx("option", { value: c.id, children: c.name }, c.id)))] }, parent.id));
|
|
47
|
+
}), groups.orphans.length > 0 ? (_jsx("optgroup", { label: "Other", children: groups.orphans.map((c) => (_jsx("option", { value: c.id, children: c.name }, c.id))) })) : null] }));
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=CategoryOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryOptions.js","sourceRoot":"","sources":["../src/CategoryOptions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAyB/B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GACrC;IACrB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,MAAM,OAAO,GAAG,OAAO,KAAK,SAAS;YACnC,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAEhD,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAA;QAC3D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+B,CAAA;QACvD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,CAAC,SAAS,KAAK,IAAI;gBAAE,SAAQ;YAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;YAC5C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACZ,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QACjC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACnD,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;QAE1F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;IACvC,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAA;IAEzB,OAAO,CACL,8BACG,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,CAC3B,iBAAQ,KAAK,EAAE,WAAW,CAAC,KAAK,YAAG,WAAW,CAAC,KAAK,GAAU,CAC/D,CAAC,CAAC,CAAC,IAAI,EAEP,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAA;gBACrD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC1B,OAAO,iBAAwB,KAAK,EAAE,MAAM,CAAC,EAAE,YAAG,MAAM,CAAC,IAAI,IAAzC,MAAM,CAAC,EAAE,CAA0C,CAAA;gBACzE,CAAC;gBACD,OAAO,CACL,oBAA0B,KAAK,EAAE,MAAM,CAAC,IAAI,aAC1C,iBAAQ,KAAK,EAAE,MAAM,CAAC,EAAE,YACrB,gBAAgB,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAClD,EACR,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACnB,iBAAmB,KAAK,EAAE,CAAC,CAAC,EAAE,YAAG,CAAC,CAAC,IAAI,IAA1B,CAAC,CAAC,EAAE,CAAgC,CAClD,CAAC,KANW,MAAM,CAAC,EAAE,CAOb,CACZ,CAAA;YACH,CAAC,CAAC,EAED,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B,mBAAU,KAAK,EAAC,OAAO,YACpB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACzB,iBAAmB,KAAK,EAAE,CAAC,CAAC,EAAE,YAAG,CAAC,CAAC,IAAI,IAA1B,CAAC,CAAC,EAAE,CAAgC,CAClD,CAAC,GACO,CACZ,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link EmptyState}. */
|
|
3
|
+
export interface EmptyStateProps {
|
|
4
|
+
/** Short heading saying what is empty. */
|
|
5
|
+
readonly title: string;
|
|
6
|
+
/** A sentence of guidance shown under the title. */
|
|
7
|
+
readonly hint?: string;
|
|
8
|
+
/** A call to action, such as a button, shown under the hint. */
|
|
9
|
+
readonly action?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/** A placeholder for a list or panel that has nothing to show yet. */
|
|
12
|
+
export declare function EmptyState({ title, hint, action }: EmptyStateProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,gEAAgE;IAChE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAC5B;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,+BAQlE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** A placeholder for a list or panel that has nothing to show yet. */
|
|
3
|
+
export function EmptyState({ title, hint, action }) {
|
|
4
|
+
return (_jsxs("div", { className: "wm-empty", children: [_jsx("div", { className: "wm-empty__title", children: title }), hint !== undefined ? _jsx("div", { children: hint }) : null, action !== undefined ? _jsx("div", { style: { marginTop: 12 }, children: action }) : null] }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":";AAYA,sEAAsE;AACtE,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAmB;IACjE,OAAO,CACL,eAAK,SAAS,EAAC,UAAU,aACvB,cAAK,SAAS,EAAC,iBAAiB,YAAE,KAAK,GAAO,EAC7C,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,wBAAM,IAAI,GAAO,CAAC,CAAC,CAAC,IAAI,EAC7C,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAG,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare function Spinner({ label }: {
|
|
3
|
+
readonly label?: string;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export interface EmptyStateProps {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly hint?: string;
|
|
8
|
+
readonly action?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function EmptyState({ title, hint, action }: EmptyStateProps): import("react").JSX.Element;
|
|
11
|
+
export declare function Alert({ children }: {
|
|
12
|
+
readonly children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=Feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feedback.d.ts","sourceRoot":"","sources":["../src/Feedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,wBAAgB,OAAO,CAAC,EAAE,KAAiB,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAEzE;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAC5B;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,+BAQlE;AAED,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAEnE"}
|
package/dist/Feedback.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function Spinner({ label = 'Loading' }) {
|
|
3
|
+
return _jsx("span", { className: "fio-spinner", role: "status", "aria-label": label });
|
|
4
|
+
}
|
|
5
|
+
export function EmptyState({ title, hint, action }) {
|
|
6
|
+
return (_jsxs("div", { className: "fio-empty", children: [_jsx("div", { className: "fio-empty__title", children: title }), hint !== undefined ? _jsx("div", { children: hint }) : null, action !== undefined ? _jsx("div", { style: { marginTop: 12 }, children: action }) : null] }));
|
|
7
|
+
}
|
|
8
|
+
export function Alert({ children }) {
|
|
9
|
+
return _jsx("div", { className: "fio-alert", role: "alert", children: children });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feedback.js","sourceRoot":"","sources":["../src/Feedback.tsx"],"names":[],"mappings":";AAEA,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,EAA+B;IACxE,OAAO,eAAM,SAAS,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,gBAAa,KAAK,GAAI,CAAA;AAC1E,CAAC;AAQD,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAmB;IACjE,OAAO,CACL,eAAK,SAAS,EAAC,WAAW,aACxB,cAAK,SAAS,EAAC,kBAAkB,YAAE,KAAK,GAAO,EAC9C,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,wBAAM,IAAI,GAAO,CAAC,CAAC,CAAC,IAAI,EAC7C,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAG,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAoC;IAClE,OAAO,cAAK,SAAS,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,YAAE,QAAQ,GAAO,CAAA;AACjE,CAAC"}
|
package/dist/Field.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from 'react';
|
|
2
|
+
import type { FieldCommon } from './FieldCommon.js';
|
|
3
|
+
/** Props for {@link Field}: the shared field props plus every native `<input>` attribute. */
|
|
4
|
+
export type FieldProps = FieldCommon & InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
/** A labelled text input. The label is always associated, never a bare placeholder. */
|
|
6
|
+
export declare function Field({ label, error, ...rest }: FieldProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../src/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,6FAA6F;AAC7F,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;AAE5E,uFAAuF;AACvF,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,+BAiB1D"}
|
package/dist/Field.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
/** A labelled text input. The label is always associated, never a bare placeholder. */
|
|
4
|
+
export function Field({ label, error, ...rest }) {
|
|
5
|
+
const id = useId();
|
|
6
|
+
return (_jsxs("div", { className: "wm-field", children: [_jsx("label", { className: "wm-field__label", htmlFor: id, children: label }), _jsx("input", { id: id, className: "wm-field__control", "aria-invalid": error !== undefined, "aria-describedby": error !== undefined ? `${id}-error` : undefined, ...rest }), error !== undefined ? (_jsx("span", { className: "wm-field__error", id: `${id}-error`, children: error })) : null] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../src/Field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAA4B,MAAM,OAAO,CAAA;AAMvD,uFAAuF;AACvF,MAAM,UAAU,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAc;IACzD,MAAM,EAAE,GAAG,KAAK,EAAE,CAAA;IAClB,OAAO,CACL,eAAK,SAAS,EAAC,UAAU,aACvB,gBAAO,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,EAAE,YAAG,KAAK,GAAS,EAC/D,gBACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAC,mBAAmB,kBACf,KAAK,KAAK,SAAS,sBACf,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,KAC7D,IAAI,GACR,EACD,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CACrB,eAAM,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,YAAG,KAAK,GAAQ,CACpE,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Props shared by every labelled form control. */
|
|
2
|
+
export interface FieldCommon {
|
|
3
|
+
/** Visible label, always associated with the control. */
|
|
4
|
+
readonly label: string;
|
|
5
|
+
/** Validation message shown under the control. Also marks the control invalid. */
|
|
6
|
+
readonly error?: string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=FieldCommon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCommon.d.ts","sourceRoot":"","sources":["../src/FieldCommon.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,kFAAkF;IAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldCommon.js","sourceRoot":"","sources":["../src/FieldCommon.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The least a component needs to know about a category in order to group it.
|
|
3
|
+
* Any wider row also fits.
|
|
4
|
+
*/
|
|
5
|
+
export interface GroupableCategory {
|
|
6
|
+
/** The category id. */
|
|
7
|
+
readonly id: string;
|
|
8
|
+
/** Display name. */
|
|
9
|
+
readonly name: string;
|
|
10
|
+
/** The parent's id, or `null` for a top-level category. */
|
|
11
|
+
readonly parent_id: string | null;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GroupableCategory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupableCategory.d.ts","sourceRoot":"","sources":["../src/GroupableCategory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupableCategory.js","sourceRoot":"","sources":["../src/GroupableCategory.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode, type SelectHTMLAttributes } from 'react';
|
|
2
|
+
import type { FieldCommon } from './FieldCommon.js';
|
|
3
|
+
/** Props for {@link SelectField}: the shared field props plus every native `<select>` attribute. */
|
|
4
|
+
export type SelectFieldProps = FieldCommon & SelectHTMLAttributes<HTMLSelectElement> & {
|
|
5
|
+
/** The `<option>` and `<optgroup>` elements to choose between. */
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/** A labelled `<select>`. The label is always associated with the control. */
|
|
9
|
+
export declare function SelectField({ label, error, children, ...rest }: SelectFieldProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=SelectField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../src/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,oGAAoG;AACpG,MAAM,MAAM,gBAAgB,GAAG,WAAW,GACxC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACxC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,CAAA;AAEH,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAWhF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
/** A labelled `<select>`. The label is always associated with the control. */
|
|
4
|
+
export function SelectField({ label, error, children, ...rest }) {
|
|
5
|
+
const id = useId();
|
|
6
|
+
return (_jsxs("div", { className: "wm-field", children: [_jsx("label", { className: "wm-field__label", htmlFor: id, children: label }), _jsx("select", { id: id, className: "wm-field__control", "aria-invalid": error !== undefined, ...rest, children: children }), error !== undefined ? _jsx("span", { className: "wm-field__error", children: error }) : null] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=SelectField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../src/SelectField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAA6C,MAAM,OAAO,CAAA;AAUxE,8EAA8E;AAC9E,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAoB;IAC/E,MAAM,EAAE,GAAG,KAAK,EAAE,CAAA;IAClB,OAAO,CACL,eAAK,SAAS,EAAC,UAAU,aACvB,gBAAO,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,EAAE,YAAG,KAAK,GAAS,EAC/D,iBAAQ,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,mBAAmB,kBAAe,KAAK,KAAK,SAAS,KAAM,IAAI,YACtF,QAAQ,GACF,EACR,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,iBAAiB,YAAE,KAAK,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC1E,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Props for {@link Spinner}. */
|
|
2
|
+
export interface SpinnerProps {
|
|
3
|
+
/** Accessible name announced by screen readers. Defaults to `"Loading"`. */
|
|
4
|
+
readonly label?: string;
|
|
5
|
+
}
|
|
6
|
+
/** An inline loading indicator with `role="status"`. */
|
|
7
|
+
export declare function Spinner({ label }: SpinnerProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,EAAE,KAAiB,EAAE,EAAE,YAAY,+BAE1D"}
|
package/dist/Spinner.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** An inline loading indicator with `role="status"`. */
|
|
3
|
+
export function Spinner({ label = 'Loading' }) {
|
|
4
|
+
return _jsx("span", { className: "wm-spinner", role: "status", "aria-label": label });
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":";AAMA,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,EAAgB;IACzD,OAAO,eAAM,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,gBAAa,KAAK,GAAI,CAAA;AACzE,CAAC"}
|
package/dist/Stat.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Props for {@link Stat}. */
|
|
2
|
+
export interface StatProps {
|
|
3
|
+
/** Caption shown with the figure. */
|
|
4
|
+
readonly label: string;
|
|
5
|
+
/** The figure, already formatted for display. */
|
|
6
|
+
readonly value: string;
|
|
7
|
+
/** Colours the value. `'auto'` derives it from a leading minus sign. Defaults to `'neutral'`. */
|
|
8
|
+
readonly tone?: 'neutral' | 'positive' | 'negative' | 'auto';
|
|
9
|
+
}
|
|
10
|
+
/** A labelled figure, such as a balance or a total. */
|
|
11
|
+
export declare function Stat({ label, value, tone }: StatProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=Stat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../src/Stat.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iGAAiG;IACjG,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAA;CAC7D;AAED,uDAAuD;AACvD,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAgB,EAAE,EAAE,SAAS,+BASjE"}
|
package/dist/Stat.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** A labelled figure, such as a balance or a total. */
|
|
3
|
+
export function Stat({ label, value, tone = 'neutral' }) {
|
|
4
|
+
const resolved = tone === 'auto' ? (value.trimStart().startsWith('-') ? 'negative' : 'positive') : tone;
|
|
5
|
+
const cls = resolved === 'positive' ? 'wm-pos' : resolved === 'negative' ? 'wm-neg' : undefined;
|
|
6
|
+
return (_jsxs("div", { children: [_jsx("div", { className: "wm-stat__label", children: label }), _jsx("div", { className: ['wm-stat__value', cls].filter(Boolean).join(' '), children: value })] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Stat.js.map
|
package/dist/Stat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stat.js","sourceRoot":"","sources":["../src/Stat.tsx"],"names":[],"mappings":";AAUA,uDAAuD;AACvD,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,EAAa;IAChE,MAAM,QAAQ,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACvG,MAAM,GAAG,GAAG,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAA;IAC/F,OAAO,CACL,0BACE,cAAK,SAAS,EAAC,gBAAgB,YAAE,KAAK,GAAO,EAC7C,cAAK,SAAS,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAG,KAAK,GAAO,IAC5E,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link Surface}. */
|
|
3
|
+
export interface SurfaceProps {
|
|
4
|
+
/** Heading shown at the top of the surface. */
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
/** Rendered opposite the title: actions, a filter, a total. */
|
|
7
|
+
readonly action?: ReactNode;
|
|
8
|
+
/** The surface content. */
|
|
9
|
+
readonly children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/** A titled panel. The container that widgets and pages sit inside. */
|
|
12
|
+
export declare function Surface({ title, action, children }: SurfaceProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAahE"}
|
package/dist/Surface.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** A titled panel. The container that widgets and pages sit inside. */
|
|
3
|
+
export function Surface({ title, action, children }) {
|
|
4
|
+
const hasHeader = title !== undefined || action !== undefined;
|
|
5
|
+
return (_jsxs("section", { className: "wm-surface", children: [hasHeader ? (_jsxs("div", { className: "wm-surface__header", children: [title === undefined ? _jsx("span", {}) : _jsx("h2", { className: "wm-surface__title", children: title }), action] })) : null, _jsx("div", { className: "wm-surface__body", children: children })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.js","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":";AAYA,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAgB;IAC/D,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAA;IAC7D,OAAO,CACL,mBAAS,SAAS,EAAC,YAAY,aAC5B,SAAS,CAAC,CAAC,CAAC,CACX,eAAK,SAAS,EAAC,oBAAoB,aAChC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAQ,CAAC,CAAC,CAAC,aAAI,SAAS,EAAC,mBAAmB,YAAE,KAAK,GAAM,EAC/E,MAAM,IACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAO,IAC1C,CACX,CAAA;AACH,CAAC"}
|
package/dist/Table.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Describes one column of a {@link Table}. */
|
|
3
|
+
export interface Column<T> {
|
|
4
|
+
/** Stable identifier for the column. */
|
|
5
|
+
readonly key: string;
|
|
6
|
+
/**
|
|
7
|
+
* Usually a string, but a node when the header is itself a control, such as a
|
|
8
|
+
* select-all checkbox above a column of row checkboxes.
|
|
9
|
+
*/
|
|
10
|
+
readonly header: ReactNode;
|
|
11
|
+
/** Right-aligns the column and uses tabular figures, for money and counts. */
|
|
12
|
+
readonly numeric?: boolean;
|
|
13
|
+
/** Renders the cell for one row. */
|
|
14
|
+
readonly render: (row: T) => ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** Props for {@link Table}. */
|
|
17
|
+
export interface TableProps<T> {
|
|
18
|
+
/** Column definitions, in display order. */
|
|
19
|
+
readonly columns: readonly Column<T>[];
|
|
20
|
+
/** The data rows to render. */
|
|
21
|
+
readonly rows: readonly T[];
|
|
22
|
+
/** Returns a stable, unique React key for a row. */
|
|
23
|
+
readonly rowKey: (row: T) => string;
|
|
24
|
+
/** Rendered instead of the table when `rows` is empty. */
|
|
25
|
+
readonly empty?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A data table.
|
|
29
|
+
*
|
|
30
|
+
* Wrapped in its own horizontal scroller so that a wide table does not force the
|
|
31
|
+
* whole page to scroll sideways on a narrow screen.
|
|
32
|
+
*/
|
|
33
|
+
export declare function Table<T>({ columns, rows, rowKey, empty }: TableProps<T>): import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,+CAA+C;AAC/C,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAA;CACvC;AAED,+BAA+B;AAC/B,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtC,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,+BA0BvE"}
|
package/dist/Table.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A data table.
|
|
4
|
+
*
|
|
5
|
+
* Wrapped in its own horizontal scroller so that a wide table does not force the
|
|
6
|
+
* whole page to scroll sideways on a narrow screen.
|
|
7
|
+
*/
|
|
8
|
+
export function Table({ columns, rows, rowKey, empty }) {
|
|
9
|
+
if (rows.length === 0 && empty !== undefined)
|
|
10
|
+
return _jsx(_Fragment, { children: empty });
|
|
11
|
+
return (_jsx("div", { className: "wm-table__scroll", children: _jsxs("table", { className: "wm-table", children: [_jsx("thead", { children: _jsx("tr", { children: columns.map((c) => (_jsx("th", { className: c.numeric === true ? 'wm-num' : undefined, children: c.header }, c.key))) }) }), _jsx("tbody", { children: rows.map((row) => (_jsx("tr", { children: columns.map((c) => (_jsx("td", { className: c.numeric === true ? 'wm-num' : undefined, children: c.render(row) }, c.key))) }, rowKey(row)))) })] }) }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":";AA6BA;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAiB;IACtE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,4BAAG,KAAK,GAAI,CAAA;IACjE,OAAO,CACL,cAAK,SAAS,EAAC,kBAAkB,YAC/B,iBAAO,SAAS,EAAC,UAAU,aACzB,0BACE,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,aAAgB,SAAS,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAAG,CAAC,CAAC,MAAM,IAAtE,CAAC,CAAC,GAAG,CAAuE,CACtF,CAAC,GACC,GACC,EACR,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,aAAgB,SAAS,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YACjE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IADP,CAAC,CAAC,GAAG,CAET,CACN,CAAC,IALK,MAAM,CAAC,GAAG,CAAC,CAMf,CACN,CAAC,GACI,IACF,GACJ,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.wm-surface {
|
|
2
|
+
background: var(--wm-surface);
|
|
3
|
+
border: 1px solid var(--wm-border);
|
|
4
|
+
border-radius: var(--wm-radius);
|
|
5
|
+
box-shadow: var(--wm-shadow);
|
|
6
|
+
padding: var(--wm-gap);
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
.wm-surface__header {
|
|
10
|
+
display: flex; align-items: baseline; justify-content: space-between;
|
|
11
|
+
gap: var(--wm-gap-sm); margin-bottom: var(--wm-gap-sm);
|
|
12
|
+
}
|
|
13
|
+
.wm-surface__title { margin: 0; font-size: 14px; font-weight: 600; }
|
|
14
|
+
.wm-surface__body { min-width: 0; }
|
|
15
|
+
|
|
16
|
+
.wm-btn {
|
|
17
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
18
|
+
font: inherit; font-weight: 500; cursor: pointer;
|
|
19
|
+
padding: 7px 14px; border-radius: var(--wm-radius-sm);
|
|
20
|
+
border: 1px solid var(--wm-border);
|
|
21
|
+
background: var(--wm-surface); color: var(--wm-text);
|
|
22
|
+
}
|
|
23
|
+
.wm-btn:hover:not(:disabled) { background: var(--wm-surface-alt); }
|
|
24
|
+
.wm-btn:disabled { opacity: .55; cursor: not-allowed; }
|
|
25
|
+
.wm-btn--primary {
|
|
26
|
+
background: var(--wm-accent); border-color: var(--wm-accent); color: var(--wm-accent-text);
|
|
27
|
+
}
|
|
28
|
+
.wm-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
|
|
29
|
+
.wm-btn--danger { color: var(--wm-negative); }
|
|
30
|
+
|
|
31
|
+
.wm-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--wm-gap-sm); }
|
|
32
|
+
.wm-field__label { font-size: 12px; font-weight: 600; color: var(--wm-text-muted); }
|
|
33
|
+
.wm-field__control {
|
|
34
|
+
font: inherit; padding: 7px 10px; border-radius: var(--wm-radius-sm);
|
|
35
|
+
border: 1px solid var(--wm-border);
|
|
36
|
+
background: var(--wm-surface); color: var(--wm-text);
|
|
37
|
+
}
|
|
38
|
+
.wm-field__control:focus-visible { outline: 2px solid var(--wm-accent); outline-offset: 1px; }
|
|
39
|
+
.wm-field__error { font-size: 12px; color: var(--wm-negative); }
|
|
40
|
+
|
|
41
|
+
.wm-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
|
|
42
|
+
.wm-table th, .wm-table td {
|
|
43
|
+
text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--wm-border);
|
|
44
|
+
}
|
|
45
|
+
.wm-table th { font-size: 12px; color: var(--wm-text-muted); font-weight: 600; }
|
|
46
|
+
.wm-table td.wm-num, .wm-table th.wm-num { text-align: right; font-family: var(--wm-mono); }
|
|
47
|
+
.wm-table__scroll { overflow-x: auto; }
|
|
48
|
+
|
|
49
|
+
.wm-stat__label { font-size: 12px; color: var(--wm-text-muted); }
|
|
50
|
+
.wm-stat__value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
51
|
+
.wm-pos { color: var(--wm-positive); }
|
|
52
|
+
.wm-neg { color: var(--wm-negative); }
|
|
53
|
+
|
|
54
|
+
.wm-empty { text-align: center; padding: 28px 16px; color: var(--wm-text-muted); }
|
|
55
|
+
.wm-empty__title { font-weight: 600; color: var(--wm-text); margin-bottom: 4px; }
|
|
56
|
+
|
|
57
|
+
.wm-spinner {
|
|
58
|
+
width: 16px; height: 16px; border-radius: 50%;
|
|
59
|
+
border: 2px solid var(--wm-border); border-top-color: var(--wm-accent);
|
|
60
|
+
animation: wm-spin .7s linear infinite; display: inline-block;
|
|
61
|
+
}
|
|
62
|
+
@keyframes wm-spin { to { transform: rotate(360deg); } }
|
|
63
|
+
@media (prefers-reduced-motion: reduce) { .wm-spinner { animation-duration: 2s; } }
|
|
64
|
+
|
|
65
|
+
.wm-alert {
|
|
66
|
+
border: 1px solid var(--wm-border); border-left: 3px solid var(--wm-negative);
|
|
67
|
+
background: var(--wm-surface-alt); border-radius: var(--wm-radius-sm);
|
|
68
|
+
padding: 10px 12px; font-size: 13px;
|
|
69
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import './tokens.css';
|
|
2
|
+
import './components.css';
|
|
3
|
+
export { Surface } from './Surface.js';
|
|
4
|
+
export type { SurfaceProps } from './Surface.js';
|
|
5
|
+
export { Button } from './Button.js';
|
|
6
|
+
export type { ButtonProps } from './Button.js';
|
|
7
|
+
export { Field } from './Field.js';
|
|
8
|
+
export type { FieldProps } from './Field.js';
|
|
9
|
+
export type { FieldCommon } from './FieldCommon.js';
|
|
10
|
+
export { SelectField } from './SelectField.js';
|
|
11
|
+
export type { SelectFieldProps } from './SelectField.js';
|
|
12
|
+
export { Table } from './Table.js';
|
|
13
|
+
export type { Column, TableProps } from './Table.js';
|
|
14
|
+
export { Stat } from './Stat.js';
|
|
15
|
+
export type { StatProps } from './Stat.js';
|
|
16
|
+
export { CategoryOptions } from './CategoryOptions.js';
|
|
17
|
+
export type { CategoryOptionsProps } from './CategoryOptions.js';
|
|
18
|
+
export type { GroupableCategory } from './GroupableCategory.js';
|
|
19
|
+
export { orderByParent } from './orderByParent.js';
|
|
20
|
+
export { Alert } from './Alert.js';
|
|
21
|
+
export type { AlertProps } from './Alert.js';
|
|
22
|
+
export { EmptyState } from './EmptyState.js';
|
|
23
|
+
export type { EmptyStateProps } from './EmptyState.js';
|
|
24
|
+
export { Spinner } from './Spinner.js';
|
|
25
|
+
export type { SpinnerProps } from './Spinner.js';
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './tokens.css';
|
|
2
|
+
import './components.css';
|
|
3
|
+
export { Surface } from './Surface.js';
|
|
4
|
+
export { Button } from './Button.js';
|
|
5
|
+
export { Field } from './Field.js';
|
|
6
|
+
export { SelectField } from './SelectField.js';
|
|
7
|
+
export { Table } from './Table.js';
|
|
8
|
+
export { Stat } from './Stat.js';
|
|
9
|
+
export { CategoryOptions } from './CategoryOptions.js';
|
|
10
|
+
export { orderByParent } from './orderByParent.js';
|
|
11
|
+
export { Alert } from './Alert.js';
|
|
12
|
+
export { EmptyState } from './EmptyState.js';
|
|
13
|
+
export { Spinner } from './Spinner.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GroupableCategory } from './GroupableCategory.js';
|
|
2
|
+
/**
|
|
3
|
+
* Orders categories for display as a list: each parent followed by its own
|
|
4
|
+
* children, then any children whose parent is not in the input.
|
|
5
|
+
*
|
|
6
|
+
* The API returns one flat sequence and the nesting is a display concern, so it
|
|
7
|
+
* is resolved once here rather than in each page. {@link CategoryOptions} uses
|
|
8
|
+
* the same grouping, so a list and a dropdown never disagree about where a
|
|
9
|
+
* category sits.
|
|
10
|
+
*
|
|
11
|
+
* @param categories - The categories to order, in any order.
|
|
12
|
+
* @returns A new array. Relative order within each level is preserved.
|
|
13
|
+
*/
|
|
14
|
+
export declare function orderByParent<T extends GroupableCategory>(categories: readonly T[]): T[];
|
|
15
|
+
//# sourceMappingURL=orderByParent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderByParent.d.ts","sourceRoot":"","sources":["../src/orderByParent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAYxF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orders categories for display as a list: each parent followed by its own
|
|
3
|
+
* children, then any children whose parent is not in the input.
|
|
4
|
+
*
|
|
5
|
+
* The API returns one flat sequence and the nesting is a display concern, so it
|
|
6
|
+
* is resolved once here rather than in each page. {@link CategoryOptions} uses
|
|
7
|
+
* the same grouping, so a list and a dropdown never disagree about where a
|
|
8
|
+
* category sits.
|
|
9
|
+
*
|
|
10
|
+
* @param categories - The categories to order, in any order.
|
|
11
|
+
* @returns A new array. Relative order within each level is preserved.
|
|
12
|
+
*/
|
|
13
|
+
export function orderByParent(categories) {
|
|
14
|
+
const parents = categories.filter((c) => c.parent_id === null);
|
|
15
|
+
const byParent = new Map();
|
|
16
|
+
for (const c of categories) {
|
|
17
|
+
if (c.parent_id === null)
|
|
18
|
+
continue;
|
|
19
|
+
const list = byParent.get(c.parent_id) ?? [];
|
|
20
|
+
list.push(c);
|
|
21
|
+
byParent.set(c.parent_id, list);
|
|
22
|
+
}
|
|
23
|
+
const parentIds = new Set(parents.map((p) => p.id));
|
|
24
|
+
const orphans = categories.filter((c) => c.parent_id !== null && !parentIds.has(c.parent_id));
|
|
25
|
+
return [...parents.flatMap((p) => [p, ...(byParent.get(p.id) ?? [])]), ...orphans];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=orderByParent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderByParent.js","sourceRoot":"","sources":["../src/orderByParent.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAA8B,UAAwB;IACjF,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAA;IAC9D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAe,CAAA;IACvC,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,SAAS,KAAK,IAAI;YAAE,SAAQ;QAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;QAC5C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACZ,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IAC7F,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAA;AACpF,CAAC"}
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Design tokens.
|
|
3
|
+
*
|
|
4
|
+
* Every colour is defined on bare :root first, then overridden for dark. A
|
|
5
|
+
* token defined only inside a media query has no value in the other theme,
|
|
6
|
+
* which is the usual cause of an unreadable dark mode.
|
|
7
|
+
*/
|
|
8
|
+
:root {
|
|
9
|
+
--wm-bg: #f7f8fa;
|
|
10
|
+
--wm-surface: #ffffff;
|
|
11
|
+
--wm-surface-alt: #f1f3f6;
|
|
12
|
+
--wm-border: #dfe3e9;
|
|
13
|
+
--wm-text: #16191d;
|
|
14
|
+
--wm-text-muted: #5b6472;
|
|
15
|
+
--wm-accent: #2f6feb;
|
|
16
|
+
--wm-accent-text: #ffffff;
|
|
17
|
+
--wm-positive: #1a7f52;
|
|
18
|
+
--wm-negative: #c0392b;
|
|
19
|
+
--wm-warning: #b7791f;
|
|
20
|
+
|
|
21
|
+
--wm-radius: 10px;
|
|
22
|
+
--wm-radius-sm: 6px;
|
|
23
|
+
--wm-gap: 16px;
|
|
24
|
+
--wm-gap-sm: 8px;
|
|
25
|
+
--wm-shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 4%);
|
|
26
|
+
--wm-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
27
|
+
--wm-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:root[data-theme="dark"],
|
|
31
|
+
:root:not([data-theme="light"]) {
|
|
32
|
+
color-scheme: light;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-color-scheme: dark) {
|
|
36
|
+
:root:not([data-theme="light"]) {
|
|
37
|
+
color-scheme: dark;
|
|
38
|
+
--wm-bg: #0f1216;
|
|
39
|
+
--wm-surface: #171b21;
|
|
40
|
+
--wm-surface-alt: #1e232b;
|
|
41
|
+
--wm-border: #2b323c;
|
|
42
|
+
--wm-text: #e8eaed;
|
|
43
|
+
--wm-text-muted: #9aa4b2;
|
|
44
|
+
--wm-accent: #5b8def;
|
|
45
|
+
--wm-positive: #3fbf87;
|
|
46
|
+
--wm-negative: #e5736a;
|
|
47
|
+
--wm-warning: #e0a84a;
|
|
48
|
+
--wm-shadow: 0 1px 2px rgb(0 0 0 / 40%);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:root[data-theme="dark"] {
|
|
53
|
+
color-scheme: dark;
|
|
54
|
+
--wm-bg: #0f1216;
|
|
55
|
+
--wm-surface: #171b21;
|
|
56
|
+
--wm-surface-alt: #1e232b;
|
|
57
|
+
--wm-border: #2b323c;
|
|
58
|
+
--wm-text: #e8eaed;
|
|
59
|
+
--wm-text-muted: #9aa4b2;
|
|
60
|
+
--wm-accent: #5b8def;
|
|
61
|
+
--wm-positive: #3fbf87;
|
|
62
|
+
--wm-negative: #e5736a;
|
|
63
|
+
--wm-warning: #e0a84a;
|
|
64
|
+
--wm-shadow: 0 1px 2px rgb(0 0 0 / 40%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
body {
|
|
68
|
+
margin: 0;
|
|
69
|
+
background: var(--wm-bg);
|
|
70
|
+
color: var(--wm-text);
|
|
71
|
+
font-family: var(--wm-font);
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
line-height: 1.5;
|
|
74
|
+
}
|
|
75
|
+
* { box-sizing: border-box; }
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wickermoney/ui-kit",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/wickermoney/wicker-money.git",
|
|
8
|
+
"directory": "packages/ui-kit"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/wickermoney/wicker-money#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/wickermoney/wicker-money/issues"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./styles.css": "./dist/tokens.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc -p tsconfig.json && node ./copy-css.mjs",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
30
|
+
"test": "vitest run"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^19.0.0",
|
|
34
|
+
"react-dom": "^19.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@testing-library/react": "^16.3.3",
|
|
38
|
+
"@types/react": "^19.3.0",
|
|
39
|
+
"jsdom": "26.1.0",
|
|
40
|
+
"react": "^19.3.0",
|
|
41
|
+
"react-dom": "^19.3.0",
|
|
42
|
+
"typescript": "^6.0.3",
|
|
43
|
+
"vitest": "^5.0.0"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|