@storepass/components 0.6.1 → 0.8.1

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.
Files changed (178) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +21 -14
  3. package/dist/components/Accordion/index.js +1 -1
  4. package/dist/components/AlertDialog/index.js +1 -1
  5. package/dist/components/Avatar/index.js +1 -1
  6. package/dist/components/Badge/index.js +1 -1
  7. package/dist/components/Breadcrumbs/index.js +1 -1
  8. package/dist/components/Button/index.js +1 -1
  9. package/dist/components/ButtonGroup/index.js +1 -1
  10. package/dist/components/Card/index.js +1 -1
  11. package/dist/components/Carousel/index.js +1 -1
  12. package/dist/components/Checkbox/index.js +1 -1
  13. package/dist/components/Collapsible/index.js +1 -1
  14. package/dist/components/Combobox/index.js +1 -1
  15. package/dist/components/Command/index.js +1 -1
  16. package/dist/components/DataGrid/DataGrid.d.ts +92 -0
  17. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -0
  18. package/dist/components/DataGrid/cells.d.ts +26 -0
  19. package/dist/components/DataGrid/cells.d.ts.map +1 -0
  20. package/dist/components/DataGrid/columns.d.ts +273 -0
  21. package/dist/components/DataGrid/columns.d.ts.map +1 -0
  22. package/dist/components/DataGrid/fixtures.d.ts +29 -0
  23. package/dist/components/DataGrid/fixtures.d.ts.map +1 -0
  24. package/dist/components/DataGrid/index.d.ts +12 -0
  25. package/dist/components/DataGrid/index.d.ts.map +1 -0
  26. package/dist/components/DataGrid/index.js +1 -0
  27. package/dist/components/DataGrid/parts.d.ts +127 -0
  28. package/dist/components/DataGrid/parts.d.ts.map +1 -0
  29. package/dist/components/DataGrid/query.d.ts +320 -0
  30. package/dist/components/DataGrid/query.d.ts.map +1 -0
  31. package/dist/components/DataGrid/server.d.ts +52 -0
  32. package/dist/components/DataGrid/server.d.ts.map +1 -0
  33. package/dist/components/DatePicker/DatePicker.d.ts +10 -2
  34. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  35. package/dist/components/DatePicker/dateLogic.d.ts +10 -0
  36. package/dist/components/DatePicker/dateLogic.d.ts.map +1 -0
  37. package/dist/components/DatePicker/index.js +1 -1
  38. package/dist/components/Dialog/index.js +1 -1
  39. package/dist/components/Drawer/index.js +1 -1
  40. package/dist/components/DropdownMenu/index.js +1 -1
  41. package/dist/components/FeaturedIcon/FeaturedIcon.d.ts +2 -2
  42. package/dist/components/FeaturedIcon/index.js +1 -1
  43. package/dist/components/Field/index.js +1 -1
  44. package/dist/components/FileUpload/index.js +1 -1
  45. package/dist/components/Footer/index.js +1 -1
  46. package/dist/components/Form/index.js +1 -1
  47. package/dist/components/Gloss/Gloss.d.ts +6 -0
  48. package/dist/components/Gloss/Gloss.d.ts.map +1 -0
  49. package/dist/components/Gloss/datetime.d.ts +24 -0
  50. package/dist/components/Gloss/datetime.d.ts.map +1 -0
  51. package/dist/components/Gloss/disclosure.d.ts +35 -0
  52. package/dist/components/Gloss/disclosure.d.ts.map +1 -0
  53. package/dist/components/Gloss/index.d.ts +2 -0
  54. package/dist/components/Gloss/index.d.ts.map +1 -0
  55. package/dist/components/Gloss/index.js +1 -0
  56. package/dist/components/Gloss/money.d.ts +33 -0
  57. package/dist/components/Gloss/money.d.ts.map +1 -0
  58. package/dist/components/Gloss/read.d.ts +25 -0
  59. package/dist/components/Gloss/read.d.ts.map +1 -0
  60. package/dist/components/Icon/index.js +1 -1
  61. package/dist/components/ImperativeDialog/index.js +1 -1
  62. package/dist/components/InlineAlert/index.js +1 -1
  63. package/dist/components/Input/index.js +1 -1
  64. package/dist/components/InputGroup/InputGroup.d.ts +1 -1
  65. package/dist/components/InputGroup/index.js +1 -1
  66. package/dist/components/Item/index.js +1 -1
  67. package/dist/components/Kbd/index.js +1 -1
  68. package/dist/components/Label/index.js +1 -1
  69. package/dist/components/LoadingIndicator/index.js +1 -1
  70. package/dist/components/MoneyAmount/index.js +1 -1
  71. package/dist/components/Navbar/index.js +1 -1
  72. package/dist/components/NumberField/index.js +1 -1
  73. package/dist/components/PageHeading/index.js +1 -1
  74. package/dist/components/PageLayout/index.js +1 -1
  75. package/dist/components/Pagination/index.js +1 -1
  76. package/dist/components/Panel/index.js +1 -1
  77. package/dist/components/PinInput/index.js +1 -1
  78. package/dist/components/Progress/index.js +1 -1
  79. package/dist/components/RadioGroup/index.js +1 -1
  80. package/dist/components/Rating/index.js +1 -1
  81. package/dist/components/Select/index.js +1 -1
  82. package/dist/components/Settings/index.js +1 -1
  83. package/dist/components/Sidebar/index.js +1 -1
  84. package/dist/components/Slider/index.js +1 -1
  85. package/dist/components/Table/index.js +1 -1
  86. package/dist/components/Tabs/Tabs.d.ts +8 -0
  87. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  88. package/dist/components/Tabs/index.d.ts +2 -2
  89. package/dist/components/Tabs/index.d.ts.map +1 -1
  90. package/dist/components/Tabs/index.js +1 -1
  91. package/dist/components/Tags/index.js +1 -1
  92. package/dist/components/Text/index.js +1 -1
  93. package/dist/components/Textarea/index.js +1 -1
  94. package/dist/components/Toast/index.js +1 -1
  95. package/dist/components/Toggle/index.js +1 -1
  96. package/dist/components/Tooltip/index.js +1 -1
  97. package/dist/components/VideoDialog/index.js +1 -1
  98. package/dist/components/index.d.ts +3 -1
  99. package/dist/components/index.d.ts.map +1 -1
  100. package/dist/index-0k26fpsr.js +2 -0
  101. package/dist/index-0x3exa89.js +1 -0
  102. package/dist/index-12m8pd4x.js +1 -0
  103. package/dist/index-1n7ke68v.js +1 -0
  104. package/dist/index-207wxbj2.js +1 -0
  105. package/dist/index-2cbcq1ak.js +1 -0
  106. package/dist/index-39gyjttt.js +2 -0
  107. package/dist/index-3nj3vfyf.js +1 -0
  108. package/dist/index-3qz0mz4s.js +1 -0
  109. package/dist/index-3xevqp5j.js +1 -0
  110. package/dist/index-3y89rrea.js +1 -0
  111. package/dist/index-3yf2yecs.js +1 -0
  112. package/dist/index-4p3htnp4.js +1 -0
  113. package/dist/index-5k17f917.js +0 -0
  114. package/dist/index-626k16zr.js +0 -0
  115. package/dist/index-6bayqdg2.js +0 -0
  116. package/dist/index-6hjt8vvj.js +2 -0
  117. package/dist/index-6wj27sgg.js +1 -0
  118. package/dist/index-77e650nh.js +0 -0
  119. package/dist/index-79863hrw.js +1 -0
  120. package/dist/index-7nb0kh49.js +1 -0
  121. package/dist/index-80vgqvbb.js +1 -0
  122. package/dist/index-8bvab16j.js +1 -0
  123. package/dist/index-8e82vsma.js +1 -0
  124. package/dist/index-99dvdfty.js +122 -0
  125. package/dist/index-9w3q13x9.js +1 -0
  126. package/dist/index-a5xdyq4r.js +1 -0
  127. package/dist/index-awgxtt2c.js +2 -0
  128. package/dist/index-aym8f7kk.js +1 -0
  129. package/dist/index-bfj32kdy.js +1 -0
  130. package/dist/index-czhrx6qc.js +1 -0
  131. package/dist/index-dha7m2cb.js +2 -0
  132. package/dist/index-dyqfzdwm.js +1 -0
  133. package/dist/index-dzrvgand.js +1 -0
  134. package/dist/index-e3jk5qws.js +1 -0
  135. package/dist/index-e57a5m40.js +1 -0
  136. package/dist/index-f7d8em7k.js +1 -0
  137. package/dist/index-fse0pbfb.js +1 -0
  138. package/dist/index-gerw8wbs.js +1 -0
  139. package/dist/index-h0evkh77.js +2 -0
  140. package/dist/index-h0t7cb54.js +2 -0
  141. package/dist/index-heb6hak3.js +2 -0
  142. package/dist/index-hjxh9rqy.js +1 -0
  143. package/dist/index-jbzvn81j.js +1 -0
  144. package/dist/index-jk047paq.js +1 -0
  145. package/dist/index-m532p9sh.js +0 -0
  146. package/dist/index-mq3xffc2.js +0 -0
  147. package/dist/index-mtn2afhs.js +1 -0
  148. package/dist/index-n11bq2ez.js +1 -0
  149. package/dist/index-n7fq9hv6.js +1 -0
  150. package/dist/index-nbp2rcyj.js +1 -0
  151. package/dist/index-qkjr9w4c.js +1 -0
  152. package/dist/index-s3543vem.js +0 -0
  153. package/dist/index-s3888qb0.js +1 -0
  154. package/dist/index-s4wzrj6b.js +1 -0
  155. package/dist/index-s7qkq2f8.js +1 -0
  156. package/dist/index-s7ttw4jf.js +1 -0
  157. package/dist/index-sxaagzqf.js +1 -0
  158. package/dist/index-warqb7rs.js +2 -0
  159. package/dist/index-whmj1gae.js +1 -0
  160. package/dist/index-wv5wqvwb.js +1 -0
  161. package/dist/index-xqphyc4g.js +1 -0
  162. package/dist/index-yeehx7kc.js +2 -0
  163. package/dist/index-yzm4k2ye.js +1 -0
  164. package/dist/index-zke98cz9.js +1 -0
  165. package/dist/index-zxjkp0aj.js +1 -0
  166. package/dist/index.d.ts +1 -1
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +1 -1
  169. package/dist/lib/utils.js +1 -2
  170. package/package.json +7 -1
  171. package/dist/index-2nc1awt9.js +0 -2
  172. package/dist/index-9scn04dv.js +0 -2
  173. package/dist/index-aq782dhn.js +0 -2
  174. package/dist/index-dsdw1626.js +0 -2
  175. package/dist/index-mmas6ncx.js +0 -2
  176. package/dist/index-mq6f0tgx.js +0 -2
  177. package/dist/index-nr793zrn.js +0 -2
  178. package/dist/index-tnergzh9.js +0 -2
@@ -0,0 +1,320 @@
1
+ import type { ColumnsOf, GridSchema } from "./columns";
2
+ export type { ColumnsOf, GridSchema } from "./columns";
3
+ export type Density = "compact" | "default" | "comfortable";
4
+ /**
5
+ * Block padding per density. Single-line rows land at 32 / 40 / 52px; the
6
+ * two-line entity cell collapses to one line in compact.
7
+ */
8
+ export declare const DENSITY_ROW_PY: Record<Density, string>;
9
+ export declare const PAGE_SIZE_DEFAULT = 10;
10
+ export declare const PAGE_SIZE_MAX = 100;
11
+ /** 16px checkbox with 16px of padding on each side, so the control is not flush with the next cell. */
12
+ export declare const SELECT_COLUMN_WIDTH = 48;
13
+ export declare const ACTIONS_COLUMN_WIDTH = 44;
14
+ /** Bounds for user-resized columns, in px. */
15
+ export declare const COLUMN_MIN_WIDTH = 64;
16
+ export declare const COLUMN_MAX_WIDTH = 800;
17
+ export type SortDir = "asc" | "desc";
18
+ export type ColumnId<S extends ColumnsOf> = S["columns"][number]["id"];
19
+ export type SortableId<S extends ColumnsOf> = Exclude<S["columns"][number], {
20
+ sortable: false;
21
+ }>["id"];
22
+ export type HideableId<S extends ColumnsOf> = Exclude<S["columns"][number], {
23
+ hideable: false;
24
+ }>["id"];
25
+ export type FacetValue<S extends ColumnsOf> = Extract<S["columns"][number], {
26
+ facet: true;
27
+ }> extends infer Column ? Column extends {
28
+ options: readonly (infer Option)[];
29
+ } ? Option : never : never;
30
+ type StringOp = "contains" | "equals" | "startsWith";
31
+ type EnumOpSingle = "is" | "isNot";
32
+ type NumberOpSingle = "eq" | "gt" | "gte" | "lt" | "lte";
33
+ type StringFilter<Id extends string> = {
34
+ id: string;
35
+ column: Id;
36
+ op: StringOp;
37
+ value: string;
38
+ };
39
+ type EnumFilter<Id extends string, Option extends string> = {
40
+ id: string;
41
+ column: Id;
42
+ op: EnumOpSingle;
43
+ value: Option;
44
+ } | {
45
+ id: string;
46
+ column: Id;
47
+ op: "isAny";
48
+ value: readonly Option[];
49
+ };
50
+ type NumberFilter<Id extends string> = {
51
+ id: string;
52
+ column: Id;
53
+ op: NumberOpSingle;
54
+ value: number;
55
+ } | {
56
+ id: string;
57
+ column: Id;
58
+ op: "between";
59
+ value: readonly [number, number];
60
+ };
61
+ type TagsFilter<Id extends string> = {
62
+ id: string;
63
+ column: Id;
64
+ op: "has";
65
+ value: string;
66
+ } | {
67
+ id: string;
68
+ column: Id;
69
+ op: "hasAny" | "hasAll";
70
+ value: readonly string[];
71
+ };
72
+ type FilterFor<C> = C extends {
73
+ filterable: false;
74
+ } ? never : C extends {
75
+ kind: "enum";
76
+ id: infer Id extends string;
77
+ options: readonly (infer Option extends string)[];
78
+ } ? EnumFilter<Id, Option> : C extends {
79
+ kind: "number" | "money";
80
+ id: infer Id extends string;
81
+ } ? NumberFilter<Id> : C extends {
82
+ kind: "tags";
83
+ id: infer Id extends string;
84
+ } ? TagsFilter<Id> : C extends {
85
+ kind: "text" | "entity" | "avatar" | "link";
86
+ id: infer Id extends string;
87
+ } ? StringFilter<Id> : never;
88
+ export type FilterOf<S extends ColumnsOf> = FilterFor<S["columns"][number]>;
89
+ export type SortOf<S extends ColumnsOf> = {
90
+ column: SortableId<S>;
91
+ dir: SortDir;
92
+ };
93
+ /** `rows` names ids. `query` is every current match minus `except`. */
94
+ export type Selection = {
95
+ kind: "rows";
96
+ ids: readonly string[];
97
+ } | {
98
+ kind: "query";
99
+ except: readonly string[];
100
+ };
101
+ export type GridQuery<S extends ColumnsOf = ColumnsOf> = {
102
+ v: 1;
103
+ facet: FacetValue<S> | null;
104
+ /** Free-text quick filter across every text-bearing column. */
105
+ search: string;
106
+ filters: readonly FilterOf<S>[];
107
+ sorts: readonly SortOf<S>[];
108
+ hidden: readonly ColumnId<S>[];
109
+ order: readonly ColumnId<S>[];
110
+ /** User-resized widths in px; columns not listed use their schema width or auto. */
111
+ widths: Readonly<Partial<Record<ColumnId<S>, number>>>;
112
+ selection: Selection;
113
+ page: number;
114
+ pageSize: number;
115
+ inspect: string | null;
116
+ };
117
+ export type GridAction<S extends ColumnsOf> = {
118
+ type: "facet";
119
+ value: FacetValue<S> | null;
120
+ } | {
121
+ type: "search";
122
+ value: string;
123
+ } | {
124
+ type: "addFilter";
125
+ filter: FilterOf<S>;
126
+ } | {
127
+ type: "replaceFilter";
128
+ filter: FilterOf<S>;
129
+ } | {
130
+ type: "removeFilter";
131
+ id: string;
132
+ } | {
133
+ type: "clearFilters";
134
+ } | {
135
+ type: "clearConstraints";
136
+ } | {
137
+ type: "addSort";
138
+ column: SortableId<S>;
139
+ dir: SortDir;
140
+ } | {
141
+ type: "setSortDir";
142
+ column: SortableId<S>;
143
+ dir: SortDir;
144
+ } | {
145
+ type: "removeSort";
146
+ column: SortableId<S>;
147
+ } | {
148
+ type: "moveSort";
149
+ column: SortableId<S>;
150
+ to: number;
151
+ } | {
152
+ type: "clearSorts";
153
+ } | {
154
+ type: "primarySort";
155
+ column: SortableId<S>;
156
+ dir: SortDir;
157
+ } | {
158
+ type: "hideColumn";
159
+ column: HideableId<S>;
160
+ } | {
161
+ type: "showColumn";
162
+ column: ColumnId<S>;
163
+ } | {
164
+ type: "moveColumn";
165
+ column: ColumnId<S>;
166
+ dir: "left" | "right";
167
+ }
168
+ /** Drop a column at a visible index. Pinned columns neither move nor get crossed. */
169
+ | {
170
+ type: "placeColumn";
171
+ column: ColumnId<S>;
172
+ to: number;
173
+ } | {
174
+ type: "resizeColumn";
175
+ column: ColumnId<S>;
176
+ width: number;
177
+ } | {
178
+ type: "resetColumnWidth";
179
+ column: ColumnId<S>;
180
+ } | {
181
+ type: "toggleRow";
182
+ id: string;
183
+ } | {
184
+ type: "togglePage";
185
+ ids: readonly string[];
186
+ } | {
187
+ type: "selectMatching";
188
+ } | {
189
+ type: "clearSelection";
190
+ } | {
191
+ type: "page";
192
+ page: number;
193
+ } | {
194
+ type: "pageSize";
195
+ pageSize: number;
196
+ } | {
197
+ type: "inspect";
198
+ id: string | null;
199
+ };
200
+ export type GridQueryWire = {
201
+ v?: unknown;
202
+ facet?: unknown;
203
+ search?: unknown;
204
+ filters?: unknown;
205
+ sorts?: unknown;
206
+ hidden?: unknown;
207
+ order?: unknown;
208
+ widths?: unknown;
209
+ selection?: unknown;
210
+ page?: unknown;
211
+ pageSize?: unknown;
212
+ inspect?: unknown;
213
+ };
214
+ export type ParseDrop = {
215
+ path: string;
216
+ reason: "bad-json" | "bad-version" | "unknown-column" | "bad-operator" | "bad-value" | "duplicate" | "bad-selection";
217
+ };
218
+ export type ParseGridQueryResult<S extends ColumnsOf> = {
219
+ query: GridQuery<S>;
220
+ dropped: readonly ParseDrop[];
221
+ };
222
+ export type AggregateValue = {
223
+ kind: "count";
224
+ value: number;
225
+ } | {
226
+ kind: "sum";
227
+ value: number;
228
+ } | {
229
+ kind: "money";
230
+ value: number;
231
+ currency: string;
232
+ decimalPlaces: number;
233
+ };
234
+ export type ColumnLayout<S extends ColumnsOf> = {
235
+ id: ColumnId<S>;
236
+ stickyLeft: number | undefined;
237
+ stickyEdge: boolean;
238
+ /** Effective width: the user's resize, else the schema width, else auto. */
239
+ width: number | undefined;
240
+ sort: {
241
+ dir: SortDir;
242
+ rank: number;
243
+ } | null;
244
+ canMoveLeft: boolean;
245
+ canMoveRight: boolean;
246
+ canHide: boolean;
247
+ };
248
+ export type ResolvedSelection = {
249
+ count: number;
250
+ /**
251
+ * Selected ids the grid can name. With a server `result` and a `query`
252
+ * selection that is only the current page; send the request and
253
+ * `selection.except` to act on every match.
254
+ */
255
+ ids: readonly string[];
256
+ allMatching: boolean;
257
+ pageChecked: boolean | "indeterminate";
258
+ };
259
+ export type GridModel<TRow, S extends ColumnsOf> = {
260
+ pageRows: readonly TRow[];
261
+ total: number;
262
+ range: {
263
+ from: number;
264
+ to: number;
265
+ };
266
+ /** Effective page after the slice is clamped. Does not write the document. */
267
+ page: number;
268
+ pageCount: number;
269
+ /** `count` is null when a server result leaves facet counts out. */
270
+ facets: readonly {
271
+ value: string | null;
272
+ label: string;
273
+ count: number | null;
274
+ }[];
275
+ columns: readonly ColumnLayout<S>[];
276
+ aggregates: Partial<Record<ColumnId<S>, AggregateValue>>;
277
+ selection: ResolvedSelection;
278
+ /** Lookup of `inspect` in the full row array, not the page. */
279
+ inspected: TRow | null;
280
+ };
281
+ export type FilterDraft = {
282
+ columnId: string | null;
283
+ op: string | null;
284
+ raw: string;
285
+ rawTo: string;
286
+ values: readonly string[];
287
+ lockedColumn: boolean;
288
+ };
289
+ export type StoredColumn = {
290
+ id: string;
291
+ kind: string;
292
+ header: string;
293
+ hideable: boolean;
294
+ sortable: boolean;
295
+ filterable: boolean;
296
+ sticky?: "left";
297
+ width?: number;
298
+ aggregate?: "sum" | "count";
299
+ currency?: string;
300
+ decimalPlaces?: number;
301
+ facet?: boolean;
302
+ options?: readonly string[];
303
+ labels?: Readonly<Record<string, string>>;
304
+ };
305
+ export declare function clampPage(page: number): number;
306
+ export declare function clampPageSize(pageSize: number): number;
307
+ export declare function storedColumns(schema: ColumnsOf): readonly StoredColumn[];
308
+ export declare function emptyGridQuery<S extends ColumnsOf>(schema: S): GridQuery<S>;
309
+ export declare function parseGridQuery<S extends ColumnsOf>(schema: S, source: string | URLSearchParams | GridQueryWire | null | undefined): ParseGridQueryResult<S>;
310
+ export declare function serializeGridQuery<S extends ColumnsOf>(schema: S, query: GridQuery<S>): string;
311
+ export declare function transitionGridQuery<S extends ColumnsOf>(schema: S, query: GridQuery<S>, action: GridAction<S>): GridQuery<S>;
312
+ export declare function draftToFilter<S extends ColumnsOf>(schema: S, draft: FilterDraft, id: string): FilterOf<S> | null;
313
+ export declare function filterLabel<S extends ColumnsOf>(schema: S, filter: FilterOf<S>): string;
314
+ export declare function filterOperators(kind: string): readonly {
315
+ value: string;
316
+ label: string;
317
+ }[];
318
+ export declare function layoutColumns<S extends ColumnsOf>(columns: readonly StoredColumn[], query: GridQuery<S>): readonly ColumnLayout<S>[];
319
+ export declare function applyGridQuery<TRow, S extends GridSchema<TRow>>(schema: S, rows: readonly TRow[], query: GridQuery<S>): GridModel<TRow, S>;
320
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/query.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAa,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAIlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,uGAAuG;AACvG,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,8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C,GACjB,MAAM,CAoCR;AAED,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,GACV,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAoC7C;AAiND,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,EAChD,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GACjB,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAmC5B;AA+KD,wBAAgB,cAAc,CAAC,IAAI,EAAE,CAAC,SAAS,UAAU,CAAC,IAAI,CAAC,EAC9D,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,SAAS,IAAI,EAAE,EACrB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GACjB,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAoCpB"}
@@ -0,0 +1,52 @@
1
+ import type { ColumnsOf } from "./columns";
2
+ import { type AggregateValue, type ColumnId, type FacetValue, type FilterOf, type GridModel, type GridQuery, type SortOf } from "./query";
3
+ type OmitId<F> = F extends unknown ? Omit<F, "id"> : never;
4
+ /** A filter as a server applies it. The chip `id` is UI state and stays behind. */
5
+ export type GridRequestFilter<S extends ColumnsOf = ColumnsOf> = OmitId<FilterOf<S>>;
6
+ /**
7
+ * The part of a grid query that decides which rows come back: plain JSON for
8
+ * a request body or a TanStack Query key. Column layout, selection, and the
9
+ * open drawer are view state and are not part of it.
10
+ *
11
+ * TanStack Query hashes keys, so pass the request as is; elsewhere compare
12
+ * requests by value, since `toGridRequest` returns a new object each call.
13
+ *
14
+ * Every condition is ANDed. `search` is trimmed; the client grid matches each
15
+ * whitespace-separated term somewhere in the row's text. Money filter values
16
+ * are minor units. `page` is 1-based, so skip `(page - 1) * pageSize`.
17
+ */
18
+ export type GridRequest<S extends ColumnsOf = ColumnsOf> = {
19
+ facet: FacetValue<S> | null;
20
+ search: string;
21
+ filters: readonly GridRequestFilter<S>[];
22
+ sorts: readonly SortOf<S>[];
23
+ page: number;
24
+ pageSize: number;
25
+ };
26
+ /** One page of rows that a server filtered, sorted, and sliced for a request. */
27
+ export type GridResult<TRow, S extends ColumnsOf = ColumnsOf> = {
28
+ /** The requested page, in order. */
29
+ rows: readonly TRow[];
30
+ /** Rows matching the request across every page. */
31
+ total: number;
32
+ /**
33
+ * Matches per facet option under every constraint except the facet itself.
34
+ * "All" shows `total` while no tab is selected and the sum of these counts
35
+ * while one is, so the options should cover every value the server returns.
36
+ * Leave it out and the tabs show no counts.
37
+ */
38
+ facetCounts?: Readonly<Partial<Record<FacetValue<S>, number>>>;
39
+ /** Footer totals across every match, keyed by column. */
40
+ aggregates?: Readonly<Partial<Record<ColumnId<S>, AggregateValue>>>;
41
+ };
42
+ type RequestFields<S extends ColumnsOf> = Pick<GridQuery<S>, "facet" | "search" | "filters" | "sorts" | "page" | "pageSize">;
43
+ export declare function toGridRequest<S extends ColumnsOf>(query: RequestFields<S>): GridRequest<S>;
44
+ /**
45
+ * The server-side counterpart of `applyGridQuery`: the grid model for a page
46
+ * the server already filtered, sorted, and sliced.
47
+ */
48
+ export declare function resolveGridResult<TRow, S extends ColumnsOf>(schema: S & {
49
+ getRowId: (row: TRow) => string;
50
+ }, result: GridResult<TRow, S>, query: GridQuery<S>): GridModel<TRow, S>;
51
+ export {};
52
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGb,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EAId,KAAK,MAAM,EAEX,MAAM,SAAS,CAAC;AAEjB,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO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AAgB,aAAa,CAAC,CAAC,SAAS,SAAS,EAChD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,WAAW,CAAC,CAAC,CAAC,CAWhB;AA2BD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,CAAC,SAAS,SAAS,EAC1D,MAAM,EAAE,CAAC,GAAG;IAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAA;CAAE,EAC/C,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,EAC3B,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GACjB,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAuDpB"}
@@ -15,19 +15,27 @@ export interface DatePickerProps {
15
15
  onValueChange?: (date: Date | null) => void;
16
16
  placeholder?: string;
17
17
  disabled?: boolean;
18
+ /** Display only; editing always uses YYYY-MM-DD (signed six-digit years beyond 9999). */
18
19
  format?: (date: Date) => string;
20
+ /** Accessible name for the text input. */
21
+ "aria-label"?: string;
19
22
  min?: Date;
20
23
  max?: Date;
21
24
  size?: DatePickerSize;
22
25
  className?: string;
23
26
  }
24
27
  /**
25
- * A single-date picker built from a native-Date calendar grid inside a popover.
28
+ * A single-date picker with direct month/year navigation and editable local dates.
29
+ *
30
+ * Text edits use YYYY-MM-DD (signed six-digit years outside 0000–9999),
31
+ * independently of the display-only format callback. Enter or blur commits;
32
+ * invalid drafts stay visible, Escape restores the value, and empty edits clear.
33
+ * Opening recenters on the selected day (or today), clamped to min/max.
26
34
  *
27
35
  * Size follows the shared control-size contract (h-8 / h-9 / h-10,
28
36
  * text-sm/font-medium) so the trigger aligns with Button, Input, and Select
29
37
  * in a row. The calendar uses the leading-icon edge inset.
30
38
  */
31
- export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, format, min, max, size, className, }: DatePickerProps): import("react").JSX.Element;
39
+ export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, format, min, max, size, className, "aria-label": ariaLabel, }: DatePickerProps): import("react").JSX.Element;
32
40
  export { datePickerDayVariants, datePickerPopupVariants, datePickerTriggerVariants, };
33
41
  //# sourceMappingURL=DatePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,QAAA,MAAM,yBAAyB;;8EAmB9B,CAAC;AAEF,QAAA,MAAM,uBAAuB,oFAU3B,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;8EA8B1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,YAAY,CACxC,OAAO,yBAAyB,CAChC,CAAC,MAAM,CAAC,CAAC;AAEV,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAChC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAoBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAA2B,EAC3B,QAAQ,EACR,MAAsB,EACtB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,SAAS,GACT,EAAE,eAAe,+BAkKjB;AAED,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,yBAA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0,0 +1,10 @@
1
+ /** Construct local dates without the Date constructor's 1900 offset for years 0–99. */
2
+ export declare function localDate(year: number, month: number, day?: number): Date;
3
+ export declare function startOfDay(date: Date): Date;
4
+ /** Four-digit years, or signed six-digit expanded years, matching ISO calendar notation. */
5
+ export declare function formatDateEntry(date: Date): string;
6
+ export declare function parseDateEntry(text: string): Date | null;
7
+ export declare function isDateInBounds(date: Date, min?: Date, max?: Date): boolean;
8
+ export declare function monthIntersectsBounds(month: Date, min?: Date, max?: Date): boolean;
9
+ export declare function boundedMonth(date: Date, min?: Date, max?: Date): Date;
10
+ //# sourceMappingURL=dateLogic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateLogic.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/dateLogic.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,QAK7D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,QAEpC;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,UAOzC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAYxD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,WAMhE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,WASxE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,QAQ9D"}
@@ -1 +1 @@
1
- import{Pd as N}from"../../index-2nc1awt9.js";import"../Icon/index.js";import{xe as Z}from"../../index-aq782dhn.js";import{ye as G}from"../../lib/utils.js";import{Popover as $}from"@base-ui/react/popover";import{faCalendar as i,faChevronLeft as r,faChevronRight as o}from"@fortawesome/pro-solid-svg-icons";import{cva as F}from"class-variance-authority";import{useMemo as P,useState as A}from"react";import{jsx as B,jsxs as Y}from"react/jsx-runtime";var g=F(["flex w-full items-center justify-between gap-2 rounded-lg border border-input bg-background whitespace-nowrap shadow-xs","text-foreground","transition-[color,box-shadow] outline-none select-none cursor-default","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","data-[popup-open]:border-ring data-[popup-open]:ring-ring/50 data-[popup-open]:ring-[3px]","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","[&_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:N},defaultVariants:{size:"md"}}),D=F(["bg-background text-foreground","relative z-50 rounded-xl border border-input p-3 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0","data-[ending-style]:opacity-0","data-[side=bottom]:data-[starting-style]:scale-95 data-[side=top]:data-[starting-style]:scale-95","data-[side=bottom]:data-[ending-style]:scale-95 data-[side=top]:data-[ending-style]:scale-95"]),p=F(["flex size-9 items-center justify-center rounded-md text-sm","transition-colors outline-none cursor-default","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-30"],{variants:{selected:{true:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",false:""},today:{true:"font-semibold ring-1 ring-ring",false:""},outside:{true:"text-muted-foreground/50",false:""}},compoundVariants:[{selected:!0,today:!0,className:"ring-0"}],defaultVariants:{selected:!1,today:!1,outside:!1}}),l=["Su","Mo","Tu","We","Th","Fr","Sa"];function W(H){return new Date(H.getFullYear(),H.getMonth(),H.getDate())}function T(H,U){return H.getFullYear()===U.getFullYear()&&H.getMonth()===U.getMonth()&&H.getDate()===U.getDate()}function n(H){return H.toLocaleDateString()}function d({value:H,defaultValue:U,onValueChange:C,placeholder:I="Pick a date",disabled:O,format:S=n,min:R,max:k,size:V,className:M}){let _=H!==void 0,[f,j]=A(U??null),Q=_?H:f,[m,w]=A(!1),[X,E]=A(()=>{let q=Q??new Date;return new Date(q.getFullYear(),q.getMonth(),1)}),h=P(()=>W(new Date),[]),b=P(()=>{let q=new Date(X.getFullYear(),X.getMonth(),1),J=new Date(q);return J.setDate(J.getDate()-J.getDay()),Array.from({length:42},(K,z)=>{let L=new Date(J);return L.setDate(J.getDate()+z),L})},[X]),v=X.toLocaleDateString(void 0,{month:"long",year:"numeric"}),x=()=>{E((q)=>new Date(q.getFullYear(),q.getMonth()-1,1))},u=()=>{E((q)=>new Date(q.getFullYear(),q.getMonth()+1,1))},y=(q)=>{if(R&&q<W(R))return!0;if(k&&q>W(k))return!0;return!1},c=(q)=>{let J=W(q);if(!_)j(J);C?.(J),w(!1)};return Y($.Root,{open:m,onOpenChange:w,children:[B($.Trigger,{"data-slot":"date-picker-trigger",disabled:O,className:G(g({size:V}),M),children:Y("span",{"data-slot":"date-picker-value",className:G("flex items-center gap-2",!Q&&"text-muted-foreground"),children:[B(Z,{icon:i}),Q?S(Q):I]})}),B($.Portal,{children:B($.Positioner,{"data-slot":"date-picker-positioner",className:"z-50 outline-none",sideOffset:6,children:Y($.Popup,{"data-slot":"date-picker-content",className:G(D()),children:[Y("div",{"data-slot":"date-picker-header",className:"flex items-center justify-between px-1 pb-2",children:[B("button",{type:"button","data-slot":"date-picker-prev",onClick:x,className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none cursor-default hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/50 focus-visible:ring-[3px] [&_svg]:size-4",children:B(Z,{icon:r})}),B("span",{"data-slot":"date-picker-label",className:"text-sm font-semibold text-foreground",children:v}),B("button",{type:"button","data-slot":"date-picker-next",onClick:u,className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none cursor-default hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/50 focus-visible:ring-[3px] [&_svg]:size-4",children:B(Z,{icon:o})})]}),B("div",{"data-slot":"date-picker-weekdays",className:"grid grid-cols-7",children:l.map((q)=>B("span",{"data-slot":"date-picker-weekday",className:"flex size-9 items-center justify-center text-xs text-muted-foreground",children:q},q))}),B("div",{"data-slot":"date-picker-grid",className:"grid grid-cols-7",children:b.map((q)=>{let J=q.getMonth()!==X.getMonth(),K=Q?T(q,Q):!1,z=T(q,h);return B("button",{type:"button","data-slot":"date-picker-day",disabled:y(q),onClick:()=>c(q),className:G(p({selected:K,today:z&&!K,outside:J&&!K})),children:q.getDate()},q.toISOString())})})]})})})]})}export{g as datePickerTriggerVariants,D as datePickerPopupVariants,p as datePickerDayVariants,d as DatePicker};export{g as _b,D as $b,p as ac,d as bc};
1
+ import{Ct,wt,Nt,aa}from"../../index-s4wzrj6b.js";import"../../index-yzm4k2ye.js";import"../../index-3yf2yecs.js";import"../../index-s3543vem.js";import"../../index-yeehx7kc.js";import"../../index-6hjt8vvj.js";export{aa as DatePicker,Nt as datePickerDayVariants,wt as datePickerPopupVariants,Ct as datePickerTriggerVariants};
@@ -1 +1 @@
1
- import{ye as k}from"../../lib/utils.js";import{Dialog as q}from"@base-ui/react/dialog";import{cva as A}from"class-variance-authority";import{jsx as f}from"react/jsx-runtime";var E=A(["fixed inset-0 z-50 bg-black/50 backdrop-blur-sm","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0","transition-opacity duration-150"]),F=A(["fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full rounded-xl border border-border bg-background p-6 shadow-xl","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0","transition-all duration-150","focus:outline-none"],{variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg rounded-2xl",xl:"max-w-xl rounded-2xl",full:"max-w-[calc(100vw-3rem)] rounded-2xl"}},defaultVariants:{size:"md"}}),G=A("text-lg font-semibold text-foreground"),H=A("mt-2 text-sm text-muted-foreground"),I=A("mt-6 flex justify-end gap-3");function J({children:O,...P}){return f(q.Root,{...P,children:O})}function K({className:O,children:P,asChild:T,...w}){return f(q.Trigger,{className:k(O),render:T?P:void 0,...w,children:T?void 0:P})}function L({children:O,...P}){return f(q.Portal,{...P,children:O})}function M({className:O,...P}){return f(q.Backdrop,{className:k(E(),O),...P})}function Q({size:O,className:P,children:T,...w}){return f(q.Popup,{"data-slot":"dialog-popup",className:k(F({size:O}),P),...w,children:T})}function R({className:O,children:P,...T}){return f(q.Title,{"data-slot":"dialog-title",className:k(G(),O),...T,children:P})}function S({className:O,children:P,...T}){return f(q.Description,{"data-slot":"dialog-description",className:k(H(),O),...T,children:P})}function U({className:O,children:P,asChild:T,...w}){return f(q.Close,{className:k(O),render:T?P:void 0,...w,children:T?void 0:P})}function W({className:O,children:P,...T}){return f("div",{"data-slot":"dialog-actions",className:k(I(),O),...T,children:P})}var X={Root:J,Trigger:K,Portal:L,Backdrop:M,Popup:Q,Title:R,Description:S,Close:U,Actions:W};export{G as dialogTitleVariants,F as dialogPopupVariants,E as dialogOverlayVariants,H as dialogDescriptionVariants,I as dialogActionsVariants,X as Dialog};export{X as ce};
1
+ import{mn,gn,fn,bn,xn,v}from"../../index-e3jk5qws.js";import"../../index-6hjt8vvj.js";export{v as Dialog,xn as dialogActionsVariants,bn as dialogDescriptionVariants,mn as dialogOverlayVariants,gn as dialogPopupVariants,fn as dialogTitleVariants};
@@ -1 +1 @@
1
- import{ed as W}from"../../index-9scn04dv.js";import"../../index-2nc1awt9.js";import"../Icon/index.js";import{xe as U}from"../../index-aq782dhn.js";import{ye as K}from"../../lib/utils.js";import{Drawer as J}from"@base-ui/react/drawer";import{faXmark as Z}from"@fortawesome/pro-solid-svg-icons";import{cva as _}from"class-variance-authority";import{createContext as Y,useContext as L}from"react";import{jsx as E}from"react/jsx-runtime";var M=Y("bottom"),O=Y("default");function $({side:q="bottom",size:A="default",...G}){return E(M.Provider,{value:q,children:E(O.Provider,{value:q==="bottom"?A:"default",children:E(J.Root,{swipeDirection:q==="bottom"?"down":q,...G})})})}var f=_(["relative flex min-h-0 w-full flex-col border border-hairline bg-background text-foreground shadow-xl outline-none","transition-transform duration-[calc(420ms*var(--drawer-swipe-strength,1))] ease-[cubic-bezier(0.32,0.72,0,1)]","data-[swiping]:transition-none motion-reduce:transition-none"],{variants:{side:{bottom:"rounded-t-2xl border-b-0 [transform:translateY(calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y,0px)))] data-[starting-style]:[transform:translateY(100%)] data-[ending-style]:[transform:translateY(100%)]",right:"h-full max-w-md rounded-l-2xl border-r-0 [transform:translateX(var(--drawer-swipe-movement-x,0px))] data-[starting-style]:[transform:translateX(100%)] data-[ending-style]:[transform:translateX(100%)]",left:"h-full max-w-md rounded-r-2xl border-l-0 [transform:translateX(var(--drawer-swipe-movement-x,0px))] data-[starting-style]:[transform:translateX(-100%)] data-[ending-style]:[transform:translateX(-100%)]"},size:{default:"",full:""}},compoundVariants:[{side:"bottom",size:"default",className:"max-h-[calc(100dvh-env(safe-area-inset-top)-1rem-var(--drawer-keyboard-inset,0px))] max-w-lg"},{side:"bottom",size:"full",className:"h-[calc(100dvh-env(safe-area-inset-top)-0.875rem-var(--drawer-keyboard-inset,0px))] rounded-t-3xl before:pointer-events-none before:absolute before:inset-x-4 before:-top-2.5 before:h-3 before:rounded-t-2xl before:bg-background/30 before:content-['']"}],defaultVariants:{side:"bottom",size:"default"}});function g({className:q,...A}){let G=L(O);return E(J.Backdrop,{"data-slot":"drawer-backdrop",className:K("fixed inset-0 z-50 opacity-[calc(1-var(--drawer-swipe-progress,0))] transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 data-[swiping]:transition-none motion-reduce:transition-none",G==="full"?"bg-black":"bg-overlay/35",q),...A})}function F({className:q,...A}){let G=L(M);return E(J.Viewport,{"data-slot":"drawer-viewport",className:K("fixed inset-0 z-50 flex [bottom:var(--drawer-keyboard-inset,0px)]",G==="bottom"?"items-end justify-center":G==="right"?"justify-end":"justify-start",q),...A})}function P({className:q,...A}){let G=L(M),Q=L(O);return E(J.Popup,{"data-slot":"drawer-popup","data-side":G,"data-size":Q,className:K(f({side:G,size:Q}),q),...A})}function R({className:q,...A}){if(L(M)!=="bottom")return null;return E("div",{...A,"aria-hidden":"true","data-slot":"drawer-handle",className:K("flex h-7 shrink-0 items-center justify-center",q),children:E("span",{className:"h-1 w-9 rounded-full bg-foreground/20"})})}function T({className:q,...A}){return E("div",{"data-slot":"drawer-header",className:K("relative shrink-0 px-6 pb-4 pt-6 [[data-side=bottom]_&]:pt-2",q),...A})}function X({className:q,...A}){return E(J.Title,{"data-slot":"drawer-title",className:K("pr-12 text-lg font-semibold text-foreground",q),...A})}function b({className:q,...A}){return E(J.Description,{"data-slot":"drawer-description",className:K("mt-2 text-sm leading-normal text-muted-foreground",q),...A})}function k({className:q,...A}){return E(J.Content,{"data-slot":"drawer-body",className:K("min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 pb-6","[background-image:linear-gradient(var(--color-background)_30%,transparent),linear-gradient(transparent,var(--color-background)_70%),linear-gradient(var(--color-ink-pressed),transparent),linear-gradient(transparent,var(--color-ink-pressed))] [background-size:100%_32px,100%_32px,100%_10px,100%_10px] [background-position:top,bottom,top,bottom] [background-repeat:no-repeat] [background-attachment:local,local,scroll,scroll]",q),...A})}function y({className:q,...A}){return E("div",{"data-slot":"drawer-footer",className:K("flex shrink-0 flex-col gap-3 border-t border-hairline px-6 pt-4 pb-[max(1.5rem,env(safe-area-inset-bottom))]",q),...A})}function H({className:q,children:A,...G}){return E(J.Close,{"aria-label":"Close drawer","data-slot":"drawer-close",className:K(W({variant:"ghost",size:"icon-xl"}),"absolute right-4 top-4 text-tertiary [[data-side=bottom]_&]:top-0",q),...G,children:A??E(U,{icon:Z})})}var C={Root:$,Trigger:J.Trigger,Portal:J.Portal,Backdrop:g,Viewport:F,Popup:P,Handle:R,Header:T,Title:X,Description:b,Body:k,Footer:y,Close:J.Close,CloseButton:H,VirtualKeyboardProvider:J.VirtualKeyboardProvider};export{f as drawerPopupVariants,C as Drawer};export{f as cc,C as dc};
1
+ import"../../index-6hjt8vvj.js";import"../../index-39gyjttt.js";import"../../index-yeehx7kc.js";import"../../index-s3543vem.js";import{rn,g}from"../../index-dha7m2cb.js";export{g as Drawer,rn as drawerPopupVariants};
@@ -1 +1 @@
1
- import"../Icon/index.js";import{xe as J}from"../../index-aq782dhn.js";import{ye as z}from"../../lib/utils.js";import{Menu as y}from"@base-ui/react/menu";import{faChevronRight as _}from"@fortawesome/pro-solid-svg-icons";import{cva as E}from"class-variance-authority";import{jsx as q,jsxs as B}from"react/jsx-runtime";var K=E(["bg-background text-foreground","z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border p-1.5 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0 data-[starting-style]:scale-95","data-[ending-style]:opacity-0 data-[ending-style]:scale-95"]),Q=E(["relative flex w-full cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium outline-hidden select-none","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground"]),U=E(["px-2 py-1.5 text-xs font-medium text-muted-foreground"]),W=E(["-mx-1.5 my-1 h-px bg-border"]),X=E(["ml-auto text-xs tracking-widest text-muted-foreground"]),Y=E(["relative flex w-full cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium outline-hidden select-none","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"]),Z=E(["bg-background text-foreground","z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border p-1.5 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0 data-[starting-style]:scale-95","data-[ending-style]:opacity-0 data-[ending-style]:scale-95"]);function $({children:D,...P}){return q(y.Root,{...P,children:D})}function L({className:D,children:P,asChild:k,...A}){return q(y.Trigger,{"data-slot":"dropdown-menu-trigger",className:z(D),render:k?P:void 0,...A,children:k?void 0:P})}function R({children:D,...P}){return q(y.Portal,{...P,children:D})}function T({className:D,children:P,side:k="bottom",align:A="start",sideOffset:F=4,alignOffset:G,...H}){return q(y.Portal,{children:q(y.Positioner,{className:"outline-none z-50",side:k,sideOffset:F,align:A,alignOffset:G,children:q(y.Popup,{"data-slot":"dropdown-menu-content",className:z(K(),D),...H,children:P})})})}function I({className:D,children:P,disabled:k,...A}){return q(y.Item,{"data-slot":"dropdown-menu-item",className:z(Q(),D),disabled:k,...A,children:P})}function S({className:D,children:P,...k}){return q("fieldset",{"data-slot":"dropdown-menu-group",className:z("border-0 p-0 m-0",D),...k,children:P})}function b({className:D,children:P,...k}){return q("div",{"data-slot":"dropdown-menu-label",className:z(U(),D),...k,children:P})}function w({className:D,...P}){return q(y.Separator,{"data-slot":"dropdown-menu-separator",className:z(W(),D),...P})}function C({className:D,children:P,...k}){return q("span",{"data-slot":"dropdown-menu-shortcut",className:z(X(),D),...k,children:P})}function V({children:D,...P}){return q(y.SubmenuRoot,{...P,children:D})}function O({className:D,children:P,...k}){return B(y.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger",className:z(Y(),D),...k,children:[P,q(J,{icon:_,className:"ml-auto size-4"})]})}function v({className:D,children:P,side:k,align:A,sideOffset:F=2,alignOffset:G=-4,...H}){return q(y.Portal,{children:q(y.Positioner,{className:"outline-none z-50",side:k,align:A,sideOffset:F,alignOffset:G,children:q(y.Popup,{"data-slot":"dropdown-menu-sub-content",className:z(Z(),D),...H,children:P})})})}var g={Root:$,Trigger:L,Portal:R,Content:T,Item:I,Group:S,Label:b,Separator:w,Shortcut:C,Sub:V,SubTrigger:O,SubContent:v};export{Y as dropdownMenuSubTriggerVariants,Z as dropdownMenuSubContentVariants,X as dropdownMenuShortcutVariants,W as dropdownMenuSeparatorVariants,U as dropdownMenuLabelVariants,Q as dropdownMenuItemVariants,K as dropdownMenuContentVariants,g as DropdownMenu};export{K as ec,Q as fc,U as gc,W as hc,X as ic,Y as jc,Z as kc,g as lc};
1
+ import{Rt,St,Tt,kt,It,Dt,Vt,r}from"../../index-jbzvn81j.js";import"../../index-s3543vem.js";import"../../index-yeehx7kc.js";import"../../index-6hjt8vvj.js";export{r as DropdownMenu,Rt as dropdownMenuContentVariants,St as dropdownMenuItemVariants,Tt as dropdownMenuLabelVariants,kt as dropdownMenuSeparatorVariants,It as dropdownMenuShortcutVariants,Vt as dropdownMenuSubContentVariants,Dt as dropdownMenuSubTriggerVariants};
@@ -2,8 +2,8 @@ import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  import type * as React from "react";
4
4
  declare const featuredIconVariants: (props?: ({
5
- color?: "info" | "warning" | "success" | "error" | "brand" | "gray" | null | undefined;
6
- variant?: "ghost" | "light" | "modern" | "solid" | null | undefined;
5
+ color?: "info" | "warning" | "success" | "error" | "gray" | "brand" | null | undefined;
6
+ variant?: "ghost" | "solid" | "light" | "modern" | null | undefined;
7
7
  size?: "sm" | "md" | "lg" | "xl" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export interface FeaturedIconProps extends Omit<React.ComponentProps<"div">, "color">, VariantProps<typeof featuredIconVariants> {
@@ -1 +1 @@
1
- import{xe as q}from"../../index-aq782dhn.js";import{ye as P}from"../../lib/utils.js";import{cva as K}from"class-variance-authority";import{jsx as F}from"react/jsx-runtime";var B=K("inline-flex items-center justify-center shrink-0 [&_[data-slot=icon]]:shrink-0",{variants:{color:{brand:"",gray:"",success:"",warning:"",error:"",info:""},variant:{light:"",modern:"bg-background border border-input shadow-xs",solid:"",ghost:""},size:{sm:"size-8 rounded-lg [&_[data-slot=icon]]:text-sm",md:"size-10 rounded-lg [&_[data-slot=icon]]:text-base",lg:"size-12 rounded-xl [&_[data-slot=icon]]:text-lg",xl:"size-14 rounded-xl [&_[data-slot=icon]]:text-xl"}},compoundVariants:[{color:"brand",variant:"light",className:"bg-utility-brand-50 text-utility-brand-600"},{color:"gray",variant:"light",className:"bg-utility-gray-100 text-utility-gray-600"},{color:"success",variant:"light",className:"bg-utility-success-50 text-utility-success-600"},{color:"warning",variant:"light",className:"bg-utility-warning-50 text-utility-warning-600"},{color:"error",variant:"light",className:"bg-utility-error-50 text-utility-error-600"},{color:"info",variant:"light",className:"bg-utility-blue-50 text-utility-blue-600"},{color:"brand",variant:"modern",className:"text-utility-brand-600"},{color:"gray",variant:"modern",className:"text-utility-gray-600"},{color:"success",variant:"modern",className:"text-utility-success-600"},{color:"warning",variant:"modern",className:"text-utility-warning-600"},{color:"error",variant:"modern",className:"text-utility-error-600"},{color:"info",variant:"modern",className:"text-utility-blue-600"},{color:"brand",variant:"solid",className:"bg-primary text-primary-foreground"},{color:"gray",variant:"solid",className:"bg-utility-gray-600 text-white"},{color:"success",variant:"solid",className:"bg-success text-white"},{color:"warning",variant:"solid",className:"bg-warning text-warning-foreground"},{color:"error",variant:"solid",className:"bg-destructive text-white"},{color:"info",variant:"solid",className:"bg-info text-white"},{color:"brand",variant:"ghost",className:"text-utility-brand-600"},{color:"gray",variant:"ghost",className:"text-utility-gray-600"},{color:"success",variant:"ghost",className:"text-utility-success-600"},{color:"warning",variant:"ghost",className:"text-utility-warning-600"},{color:"error",variant:"ghost",className:"text-utility-error-600"},{color:"info",variant:"ghost",className:"text-utility-blue-600"}],defaultVariants:{color:"brand",variant:"light",size:"md"}});function L({color:C,variant:D,size:E,icon:G,className:H,...J}){return F("div",{"data-slot":"featured-icon",className:P(B({color:C,variant:D,size:E}),H),...J,children:F(q,{icon:G})})}export{B as featuredIconVariants,L as FeaturedIcon};export{B as Ec,L as Fc};
1
+ import{Et,P}from"../../index-4p3htnp4.js";import"../../index-yeehx7kc.js";import"../../index-6hjt8vvj.js";export{P as FeaturedIcon,Et as featuredIconVariants};
@@ -1 +1 @@
1
- import{ye as G}from"../../lib/utils.js";import{Field as A}from"@base-ui/react/field";import{cva as R}from"class-variance-authority";import{createContext as W,useContext as X,useMemo as Y}from"react";import{jsx as D,jsxs as q}from"react/jsx-runtime";var K=W(!1);function Z(){return X(K)}function O({children:P}){return D(K.Provider,{value:!0,children:P})}var Q=R("group/field flex w-full gap-3 border-0 p-0 m-0 data-[invalid]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function _({className:P,orientation:L="vertical",children:S,...z}){return D(A.Root,{"data-slot":"field","data-orientation":L,className:G(Q({orientation:L}),P),render:D("fieldset",{}),...z,children:D(O,{children:S})})}function $({className:P,...L}){return D("fieldset",{"data-slot":"field-set",className:G("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",P),...L})}function g({className:P,variant:L="legend",...S}){return D("legend",{"data-slot":"field-legend","data-variant":L,className:G("mb-3 font-medium text-foreground","data-[variant=legend]:text-base","data-[variant=label]:text-sm",P),...S})}function M({className:P,...L}){return D("div",{"data-slot":"field-group",className:G("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",P),...L})}function T({className:P,...L}){return D("div",{"data-slot":"field-content",className:G("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",P),...L})}function U({className:P,...L}){return D(A.Label,{"data-slot":"field-label",className:G("flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none","group/field-label peer/field-label w-fit leading-snug group-data-[disabled]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary",P),...L})}function V({className:P,...L}){return D("div",{"data-slot":"field-label",className:G("flex w-fit items-center gap-2 text-sm leading-snug font-medium text-foreground group-data-[disabled]/field:opacity-50",P),...L})}function E({className:P,...L}){return D(A.Description,{"data-slot":"field-description",className:G("text-muted-foreground text-[13px] leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",P),...L})}function F({children:P,className:L,...S}){return q("div",{"data-slot":"field-separator","data-content":!!P,className:G("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",L),...S,children:[D("div",{className:"absolute inset-0 top-1/2 h-px bg-border"}),P&&D("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:P})]})}function I({className:P,children:L,errors:S,...z}){let J=Y(()=>{if(L)return L;if(!S?.length)return null;let H=[...new Map(S.map((k)=>[k?.message,k])).values()];if(H?.length===1)return H[0]?.message;return D("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:H.map((k)=>k?.message&&D("li",{children:k.message},k.message))})},[L,S]);if(!J&&!z.match)return null;return D(A.Error,{"data-slot":"field-error",className:G("text-destructive text-sm font-normal",P),...z,children:J})}export{Z as useInFieldContainer,Q as fieldVariants,V as FieldTitle,$ as FieldSet,F as FieldSeparator,g as FieldLegend,U as FieldLabel,M as FieldGroup,I as FieldError,E as FieldDescription,T as FieldContent,O as FieldContainerProvider,_ as Field};export{Z as mc,O as nc,Q as oc,_ as pc,$ as qc,g as rc,M as sc,T as tc,U as uc,V as vc,E as wc,F as xc,I as yc};
1
+ import{d,V,Ft,na,ia,sa,la,da,K,ca,j,pa,X}from"../../index-3yf2yecs.js";import"../../index-6hjt8vvj.js";export{na as Field,V as FieldContainerProvider,da as FieldContent,j as FieldDescription,X as FieldError,la as FieldGroup,K as FieldLabel,sa as FieldLegend,pa as FieldSeparator,ia as FieldSet,ca as FieldTitle,Ft as fieldVariants,d as useInFieldContainer};
@@ -1 +1 @@
1
- import{Dc as k}from"../Progress/index.js";import{Fc as S}from"../FeaturedIcon/index.js";import"../Button/index.js";import{fd as I}from"../../index-9scn04dv.js";import"../../index-2nc1awt9.js";import"../Icon/index.js";import{xe as V}from"../../index-aq782dhn.js";import{ye as L}from"../../lib/utils.js";import{faCloudArrowUp as r,faFile as n,faXmark as t}from"@fortawesome/pro-solid-svg-icons";import{cva as d}from"class-variance-authority";import{useCallback as H,useRef as a,useState as w}from"react";import{jsx as G,jsxs as Y,Fragment as s}from"react/jsx-runtime";var h=d("flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed border-input bg-background p-6 text-center transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 hover:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[dragging]:border-primary data-[dragging]:bg-utility-brand-50",{variants:{},defaultVariants:{}});function i(Q){if(Q<1000)return`${Q} B`;let _=["KB","MB","GB","TB"],J=Q/1000,M=0;while(J>=1000&&M<_.length-1)J/=1000,M+=1;return`${J<10?J.toFixed(1):Math.round(J).toString()} ${_[M]}`}function l({value:Q,defaultValue:_,onFilesChange:J,multiple:M,accept:P,maxSize:K,disabled:q,progress:R,label:v,hint:y,className:F,...C}){let O=Q!==void 0,[m,p]=w(_??[]),[j,$]=w(!1),[A,f]=w([]),z=a(null),T=O?Q:m,E=H((U)=>{if(!O)p(U);J?.(U)},[O,J]),X=H((U)=>{let Z=Array.from(U),W=[],D=[];for(let N of Z){if(K!==void 0&&N.size>K){D.push(N.name);continue}W.push(N)}if(f(D),W.length===0)return;E(M?[...T,...W]:W.slice(0,1))},[T,K,M,E]),g=H((U)=>{E(T.filter((Z,W)=>W!==U))},[T,E]),B=H(()=>{if(q)return;z.current?.click()},[q]),x=H((U)=>{if(U.key==="Enter"||U.key===" ")U.preventDefault(),B()},[B]),o=H((U)=>{if(q)return;U.preventDefault(),$(!0)},[q]),b=H((U)=>{if(q)return;U.preventDefault(),$(!0)},[q]),c=H((U)=>{if(U.preventDefault(),U.currentTarget.contains(U.relatedTarget))return;$(!1)},[]),u=H((U)=>{if(U.preventDefault(),$(!1),q)return;if(U.dataTransfer.files.length>0)X(U.dataTransfer.files)},[X,q]);return Y("div",{"data-slot":"file-upload-root",className:L("flex flex-col gap-3"),children:[Y("div",{"data-slot":"file-upload",role:"button",tabIndex:q?-1:0,"aria-disabled":q||void 0,"data-disabled":q?"":void 0,"data-dragging":j?"":void 0,className:L(h(),F),onClick:B,onKeyDown:x,onDragEnter:b,onDragOver:o,onDragLeave:c,onDrop:u,...C,children:[G("input",{ref:z,"data-slot":"file-upload-input",type:"file",className:"sr-only",accept:P,multiple:M,disabled:q,onChange:(U)=>{if(U.target.files&&U.target.files.length>0)X(U.target.files);U.target.value=""}}),G(S,{icon:r,color:"brand",variant:"light"}),G("div",{"data-slot":"file-upload-text",className:"text-sm text-foreground",children:v??Y(s,{children:[G("span",{className:"font-semibold text-primary",children:"Click to upload"})," ","or drag and drop"]})}),y&&G("div",{"data-slot":"file-upload-hint",className:"text-sm text-muted-foreground",children:y})]}),A.length>0&&G("div",{"data-slot":"file-upload-error",className:"text-sm text-destructive",children:A.length===1?`${A[0]} is too large.`:`${A.length} files are too large.`}),T.length>0&&G("ul",{"data-slot":"file-upload-list",className:"flex flex-col gap-2",children:T.map((U,Z)=>Y("li",{"data-slot":"file-upload-item",className:"flex items-center gap-3 rounded-lg border border-input bg-background p-3",children:[G(V,{icon:n,"data-slot":"file-upload-item-icon",className:"size-5 shrink-0 text-muted-foreground"}),Y("div",{"data-slot":"file-upload-item-info",className:"flex min-w-0 flex-1 flex-col gap-1",children:[Y("div",{className:"flex items-baseline justify-between gap-2",children:[G("span",{className:"truncate text-sm font-medium text-foreground",children:U.name}),G("span",{className:"shrink-0 text-sm text-muted-foreground tabular-nums",children:i(U.size)})]}),R?.[U.name]!==void 0&&G(k,{size:"sm",value:R[U.name]??null})]}),G(I,{type:"button",variant:"ghost",size:"icon-sm",disabled:q,"aria-label":`Remove ${U.name}`,onClick:()=>g(Z),children:G(V,{icon:t})})]},`${U.name}-${U.size}-${Z}`))})]})}export{h as fileUploadVariants,l as FileUpload};export{h as zc,l as Ac};
1
+ import{Ot,ua}from"../../index-80vgqvbb.js";import"../../index-207wxbj2.js";import"../../index-4p3htnp4.js";import"../../index-626k16zr.js";import"../../index-39gyjttt.js";import"../../index-s3543vem.js";import"../../index-yeehx7kc.js";import"../../index-6hjt8vvj.js";export{ua as FileUpload,Ot as fileUploadVariants};
@@ -1 +1 @@
1
- import{ye as F}from"../../lib/utils.js";import{jsx as P}from"react/jsx-runtime";function f({className:o,...t}){return P("footer",{"data-slot":"footer",className:F("select-none",o),...t})}function w({className:o,...t}){return P("div",{"data-slot":"footer-row",className:F("flex flex-wrap items-center justify-between gap-2",o),...t})}function M({className:o,...t}){return P("div",{"data-slot":"footer-meta",className:F("flex flex-wrap items-center gap-3 text-xs text-quaternary",o),...t})}function v({className:o,"aria-label":t="Footer",...r}){return P("nav",{"data-slot":"footer-nav","aria-label":t,className:F("flex flex-wrap gap-4",o),...r})}function y({className:o,...t}){return P("a",{"data-slot":"footer-link",className:F("text-xs text-quaternary transition-colors hover:text-tertiary",o),...t})}export{w as FooterRow,v as FooterNav,M as FooterMeta,y as FooterLink,f as Footer};export{f as Gc,w as Hc,M as Ic,v as Jc,y as Kc};
1
+ import{Vr,Fr,Or,Mr,Lr}from"../../index-xqphyc4g.js";import"../../index-6hjt8vvj.js";export{Vr as Footer,Lr as FooterLink,Or as FooterMeta,Mr as FooterNav,Fr as FooterRow};
@@ -1 +1 @@
1
- import{nc as Z,uc as _,wc as $,yc as k}from"../Field/index.js";import{ye as z}from"../../lib/utils.js";import{Form as V}from"@base-ui/react/form";import{jsx as D}from"react/jsx-runtime";function C({className:R,...P}){return D(V,{"data-slot":"form",className:z("flex w-full flex-col gap-6 has-[>[data-slot=form-section]]:gap-10",R),...P})}import{Field as X}from"@base-ui/react/field";import{jsx as A,jsxs as G,Fragment as Y}from"react/jsx-runtime";function E({name:R,label:P,description:S,error:J,required:K,orientation:L="vertical",className:T,children:Q,...U}){let M=P&&G(_,{children:[P,K&&A("span",{className:"text-destructive",children:" *"})]}),O=S&&A($,{children:S}),W=J?A(k,{match:!0,className:"text-sm text-destructive",children:J}):A(X.Error,{"data-slot":"field-error",className:"text-sm text-destructive"});return A(X.Root,{name:R,"data-slot":"form-field",className:z("group/field flex w-full flex-col gap-1.5",T),...U,children:A(Z,{children:L==="horizontal"?G(Y,{children:[G("div",{className:"flex items-start gap-3",children:[Q,(M||O)&&G("div",{className:"flex flex-1 flex-col gap-1 leading-snug",children:[M,O]})]}),W]}):G(Y,{children:[M,Q,O,W]})})})}import{cva as F}from"class-variance-authority";import{jsx as H,jsxs as I}from"react/jsx-runtime";function q({title:R,description:P,className:S,children:J,...K}){return I("section",{"data-slot":"form-section",className:z("flex flex-col gap-8","[[data-slot=form-section]+&]:border-t [[data-slot=form-section]+&]:border-border [[data-slot=form-section]+&]:pt-10",S),...K,children:[I("div",{className:"flex flex-col gap-1",children:[H("h3",{className:"text-base font-semibold text-foreground",children:R}),P&&H("p",{className:"max-w-2xl text-sm text-muted-foreground",children:P})]}),H("div",{className:"flex flex-col gap-6",children:J})]})}var w={2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4"};function B({columns:R=2,className:P,...S}){return H("div",{"data-slot":"form-row",className:z("grid grid-cols-1 gap-6",w[R],P),...S})}var y=F("flex items-center gap-3",{variants:{justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between"}},defaultVariants:{justify:"end"}});function g({justify:R,className:P,...S}){return H("div",{"data-slot":"form-actions",className:z(y({justify:R}),"[[data-slot=form-section]+&]:border-t [[data-slot=form-section]+&]:border-border [[data-slot=form-section]+&]:pt-6",P),...S})}export{q as FormSection,B as FormRow,E as FormField,g as FormActions,C as Form};export{C as ub,E as vb,q as wb,B as xb,g as yb};
1
+ import{Er,Ar,Br,zr,Gr}from"../../index-6wj27sgg.js";import"../../index-3yf2yecs.js";import"../../index-6hjt8vvj.js";export{Er as Form,Gr as FormActions,Ar as FormField,zr as FormRow,Br as FormSection};
@@ -0,0 +1,6 @@
1
+ import { type ReactElement } from "react";
2
+ import { type GlossProps } from "./read";
3
+ /** A short reading of a datetime or an amount, with the exact value on hover or focus. */
4
+ export declare function Gloss(props: GlossProps): ReactElement;
5
+ export type { GlossProps };
6
+ //# sourceMappingURL=Gloss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gloss.d.ts","sourceRoot":"","sources":["../../../src/components/Gloss/Gloss.tsx"],"names":[],"mappings":"AAKA,OAAO,EACN,KAAK,YAAY,EAMjB,MAAM,OAAO,CAAC;AAYf,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,QAAQ,CAAC;AAiL7D,0FAA0F;AAC1F,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,CAgDrD;AAED,YAAY,EAAE,UAAU,EAAE,CAAC"}