@dcs-tech/ui 0.7.0 → 0.8.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/README.md +16 -0
- package/dist/{ChartImageMenu-C6MwKKjc.js → ChartImageMenu-AsfvmdTH.js} +60 -55
- package/dist/{ChartView-nS4f4EU_.js → ChartView-CW3m4Z_1.js} +1 -1
- package/dist/{SummaryChart-CVg6i2mx.js → SummaryChart-CxRjK_HU.js} +2 -2
- package/dist/{SummaryImage-OHJHjCqe.js → SummaryImage-DeYs2Jgj.js} +2 -2
- package/dist/{SummarySeeAll-BYrvXSJ6.js → SummarySeeAll-CrmROhBv.js} +5 -5
- package/dist/{columnValue-K98ElfJc.js → columnValue-DwUqueZ6.js} +1 -1
- package/dist/{exportContext-CJaIv8R-.js → exportContext-BKFnNQ0q.js} +1 -1
- package/dist/{exportEngine-S8JHzYbS.js → exportEngine-CZ22cX7a.js} +1 -1
- package/dist/{geometry-ChwYB45B.js → geometry-yZmKN662.js} +11 -2
- package/dist/index.js +6758 -6426
- package/dist/scrollArea-Dd2dNMV4.js +236 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-pNvzaEHp.js → summaryChartData-CARqGRUl.js} +1 -1
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/components/DataTable/layout/useFillHeight.d.ts +1 -0
- package/dist/types/components/DataTable/rows/RowActions.d.ts +5 -2
- package/dist/types/components/DataTable/types.d.ts +1 -0
- package/dist/types/components/Dialog/dialogOpen.d.ts +7 -0
- package/dist/types/components/Dialog/index.d.ts +1 -0
- package/dist/types/components/Fields/Field.d.ts +1 -1
- package/dist/types/components/Fields/hooks/useFieldBlur.d.ts +1 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +11 -1
- package/dist/types/components/Scroll/ScrollStrip.d.ts +4 -2
- package/dist/types/components/Sidebar/Sidebar.d.ts +12 -3
- package/dist/types/components/Sidebar/index.d.ts +1 -1
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +9 -0
- package/dist/types/core/logic/index.d.ts +1 -0
- package/dist/types/core/logic/popover.logic.d.ts +2 -0
- package/dist/types/core/logic/standardSchema.logic.d.ts +9 -0
- package/dist/types/core/types/fields.types.d.ts +2 -0
- package/dist/types/core/types/index.d.ts +1 -0
- package/dist/types/core/types/standardSchema.types.d.ts +30 -0
- package/dist/types/core/types/suggest.types.d.ts +1 -0
- package/dist/types/core/types/tooltip.types.d.ts +2 -0
- package/dist/types/index.d.ts +5 -2
- package/package.json +5 -2
- package/dist/scrollArea-DAlVT5U7.js +0 -214
package/README.md
CHANGED
|
@@ -96,6 +96,22 @@ If a worker cannot start, the engine builds the same file on the main thread ins
|
|
|
96
96
|
`fileEngine={{ workers: 'off' }}` always uses the main thread. Large PDF fonts (a script font)
|
|
97
97
|
belong on the engine, so they reach each worker once: `fileEngine={{ pdfFonts: { fonts, vfs } }}`.
|
|
98
98
|
|
|
99
|
+
## Form validation
|
|
100
|
+
|
|
101
|
+
`Form` validates with any [Standard Schema](https://standardschema.dev) library — Zod 3.24+,
|
|
102
|
+
Valibot 1+, ArkType 2+, Yup 1.7+ — with no adapter:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
import { z } from 'zod'
|
|
106
|
+
|
|
107
|
+
<Form fields={fields} defaultData={data} validation={{ schema: z.object({ name: z.string().min(1, 'Required') }), validateOnBlur: true }} />
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Errors are keyed by each issue's path (`address.city`). Leaving a field checks only that field; a
|
|
111
|
+
failed submit shows every error and focuses the first. For other schemas (e.g. Yup before 1.7),
|
|
112
|
+
pass `validate: (schema, data) => ({ valid, errors })` as before. The form's words (Submit, Reset,
|
|
113
|
+
its error toasts) come from `UIProvider labels.form`.
|
|
114
|
+
|
|
99
115
|
## Theming
|
|
100
116
|
|
|
101
117
|
Every colour, size and spacing value is a CSS custom property. Override them on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, C as t, Cn as n, Dn as r, E as i, En as a, F as o, J as s, L as c, N as l, Nn as u, O as d, P as f, Q as p, R as m, S as h, T as g, Tn as _, Y as v, _ as y, b, c as x, d as S, et as C, ft as w, g as T, h as ee, i as te, j as ne, kn as re, l as ie, r as ae, rt as oe, st as E, ut as se, w as ce, y as le } from "./geometry-
|
|
2
|
+
import { A as e, C as t, Cn as n, Dn as r, E as i, En as a, F as o, J as s, L as c, N as l, Nn as u, O as d, P as f, Q as p, R as m, S as h, T as g, Tn as _, Y as v, _ as y, b, c as x, d as S, et as C, ft as w, g as T, h as ee, i as te, j as ne, kn as re, l as ie, r as ae, rt as oe, st as E, ut as se, w as ce, y as le } from "./geometry-yZmKN662.js";
|
|
3
3
|
import { a as ue, l as de, n as fe, o as pe, u as me } from "./fileActions-COf5Q4Eg.js";
|
|
4
4
|
import { t as he } from "./runFileTask--4YjQH7Y.js";
|
|
5
5
|
import ge, { cloneElement as _e, createContext as ve, forwardRef as ye, useCallback as D, useContext as be, useEffect as O, useId as xe, useLayoutEffect as Se, useMemo as Ce, useRef as k, useState as A, useSyncExternalStore as we } from "react";
|
|
@@ -98,15 +98,19 @@ function Be(...e) {
|
|
|
98
98
|
}, []);
|
|
99
99
|
}
|
|
100
100
|
var I = {
|
|
101
|
-
tooltip: "
|
|
102
|
-
open: "
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
tooltip: "_tooltip_2q3ib_14",
|
|
102
|
+
open: "_open_2q3ib_42",
|
|
103
|
+
tone_info: "_tone_info_2q3ib_53",
|
|
104
|
+
tone_success: "_tone_success_2q3ib_54",
|
|
105
|
+
tone_warning: "_tone_warning_2q3ib_55",
|
|
106
|
+
tone_danger: "_tone_danger_2q3ib_56",
|
|
107
|
+
placement_top: "_placement_top_2q3ib_88",
|
|
108
|
+
placement_bottom: "_placement_bottom_2q3ib_89",
|
|
109
|
+
placement_left: "_placement_left_2q3ib_90",
|
|
110
|
+
placement_right: "_placement_right_2q3ib_91",
|
|
111
|
+
measured: "_measured_2q3ib_97",
|
|
112
|
+
helpIcon: "_helpIcon_2q3ib_105",
|
|
113
|
+
disabledAnchor: "_disabledAnchor_2q3ib_138"
|
|
110
114
|
}, Ve = 500, He = 100, L = 8, Ue = 16, We = 300, Ge = 0, Ke = () => Date.now() - Ge < We, R = () => typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --probe"), qe = () => typeof HTMLElement < "u" && Object.prototype.hasOwnProperty.call(HTMLElement.prototype, "popover");
|
|
111
115
|
function Je(e) {
|
|
112
116
|
let t = r(e), n = `tooltip-${xe().replace(/:/g, "")}`, [i, o] = A(!1), [s, c] = A(t?.placement || "top"), [l, u] = A(!1), d = k(null), f = k(null), p = k(void 0), m = k(void 0), h = k(null), g = k("pointer"), _ = t?.placement || "top", v = t?.anchorTo || "auto", y = t?.delay ?? Ve, b = t?.closeDelay ?? He, x = D(() => {
|
|
@@ -187,6 +191,7 @@ function Je(e) {
|
|
|
187
191
|
className: [
|
|
188
192
|
I.tooltip,
|
|
189
193
|
I[`placement_${s}`],
|
|
194
|
+
t.tone && t.tone !== "default" ? I[`tone_${t.tone}`] : "",
|
|
190
195
|
i ? I.open : "",
|
|
191
196
|
l ? I.measured : "",
|
|
192
197
|
t.className || ""
|
|
@@ -298,51 +303,51 @@ function tt() {
|
|
|
298
303
|
return be(et);
|
|
299
304
|
}
|
|
300
305
|
var z = {
|
|
301
|
-
root: "
|
|
302
|
-
size_xxs: "
|
|
303
|
-
size_xs: "
|
|
304
|
-
size_small: "
|
|
305
|
-
size_medium: "
|
|
306
|
-
size_large: "
|
|
307
|
-
size_xl: "
|
|
308
|
-
iconOnly: "
|
|
309
|
-
shape_rectangle: "
|
|
310
|
-
shape_rounded: "
|
|
311
|
-
shape_pill: "
|
|
312
|
-
shape_circle: "
|
|
313
|
-
shape_square: "
|
|
314
|
-
color_primary: "
|
|
315
|
-
color_secondary: "
|
|
316
|
-
color_success: "
|
|
317
|
-
color_error: "
|
|
318
|
-
color_warning: "
|
|
319
|
-
color_info: "
|
|
320
|
-
color_neutral: "
|
|
321
|
-
variant_filled: "
|
|
322
|
-
disabled: "
|
|
323
|
-
disableElevation: "
|
|
324
|
-
variant_outlined: "
|
|
325
|
-
variant_text: "
|
|
326
|
-
variant_elevated: "
|
|
327
|
-
variant_tonal: "
|
|
328
|
-
loading: "
|
|
329
|
-
fullWidth: "
|
|
330
|
-
disableTextTransform: "
|
|
331
|
-
showFocusRing: "
|
|
332
|
-
content: "
|
|
333
|
-
loading_overlay: "
|
|
334
|
-
loading_center: "
|
|
335
|
-
icon: "
|
|
336
|
-
loadingWrapper: "
|
|
337
|
-
loading_start: "
|
|
338
|
-
loading_end: "
|
|
339
|
-
spinner: "
|
|
340
|
-
spin: "
|
|
341
|
-
srOnly: "
|
|
342
|
-
group: "
|
|
343
|
-
orientation_horizontal: "
|
|
344
|
-
orientation_vertical: "
|
|
345
|
-
groupFullWidth: "
|
|
306
|
+
root: "_root_1mlby_6",
|
|
307
|
+
size_xxs: "_size_xxs_1mlby_45",
|
|
308
|
+
size_xs: "_size_xs_1mlby_52",
|
|
309
|
+
size_small: "_size_small_1mlby_59",
|
|
310
|
+
size_medium: "_size_medium_1mlby_66",
|
|
311
|
+
size_large: "_size_large_1mlby_73",
|
|
312
|
+
size_xl: "_size_xl_1mlby_80",
|
|
313
|
+
iconOnly: "_iconOnly_1mlby_89",
|
|
314
|
+
shape_rectangle: "_shape_rectangle_1mlby_98",
|
|
315
|
+
shape_rounded: "_shape_rounded_1mlby_102",
|
|
316
|
+
shape_pill: "_shape_pill_1mlby_106",
|
|
317
|
+
shape_circle: "_shape_circle_1mlby_110",
|
|
318
|
+
shape_square: "_shape_square_1mlby_122",
|
|
319
|
+
color_primary: "_color_primary_1mlby_140",
|
|
320
|
+
color_secondary: "_color_secondary_1mlby_150",
|
|
321
|
+
color_success: "_color_success_1mlby_160",
|
|
322
|
+
color_error: "_color_error_1mlby_170",
|
|
323
|
+
color_warning: "_color_warning_1mlby_180",
|
|
324
|
+
color_info: "_color_info_1mlby_190",
|
|
325
|
+
color_neutral: "_color_neutral_1mlby_200",
|
|
326
|
+
variant_filled: "_variant_filled_1mlby_211",
|
|
327
|
+
disabled: "_disabled_1mlby_217",
|
|
328
|
+
disableElevation: "_disableElevation_1mlby_225",
|
|
329
|
+
variant_outlined: "_variant_outlined_1mlby_235",
|
|
330
|
+
variant_text: "_variant_text_1mlby_254",
|
|
331
|
+
variant_elevated: "_variant_elevated_1mlby_270",
|
|
332
|
+
variant_tonal: "_variant_tonal_1mlby_288",
|
|
333
|
+
loading: "_loading_1mlby_312",
|
|
334
|
+
fullWidth: "_fullWidth_1mlby_316",
|
|
335
|
+
disableTextTransform: "_disableTextTransform_1mlby_320",
|
|
336
|
+
showFocusRing: "_showFocusRing_1mlby_331",
|
|
337
|
+
content: "_content_1mlby_338",
|
|
338
|
+
loading_overlay: "_loading_overlay_1mlby_346",
|
|
339
|
+
loading_center: "_loading_center_1mlby_347",
|
|
340
|
+
icon: "_icon_1mlby_89",
|
|
341
|
+
loadingWrapper: "_loadingWrapper_1mlby_365",
|
|
342
|
+
loading_start: "_loading_start_1mlby_377",
|
|
343
|
+
loading_end: "_loading_end_1mlby_378",
|
|
344
|
+
spinner: "_spinner_1mlby_383",
|
|
345
|
+
spin: "_spin_1mlby_383",
|
|
346
|
+
srOnly: "_srOnly_1mlby_394",
|
|
347
|
+
group: "_group_1mlby_414",
|
|
348
|
+
orientation_horizontal: "_orientation_horizontal_1mlby_419",
|
|
349
|
+
orientation_vertical: "_orientation_vertical_1mlby_423",
|
|
350
|
+
groupFullWidth: "_groupFullWidth_1mlby_427"
|
|
346
351
|
}, nt = () => {
|
|
347
352
|
let e = u();
|
|
348
353
|
return /* @__PURE__ */ j("span", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, C as t, Cn as n, D as r, E as i, En as a, F as o, G as s, J as c, K as l, L as u, M as d, N as f, O as p, R as m, S as h, T as g, Tn as _, W as v, X as y, Y as b, Z as x, _ as S, b as C, c as w, ct as T, d as E, f as D, ft as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, o as I, ot as L, p as R, q as z, r as B, s as V, t as H, u as ee, v as U, vt as te, w as ne, y as re, z as ie } from "./geometry-
|
|
2
|
+
import { A as e, C as t, Cn as n, D as r, E as i, En as a, F as o, G as s, J as c, K as l, L as u, M as d, N as f, O as p, R as m, S as h, T as g, Tn as _, W as v, X as y, Y as b, Z as x, _ as S, b as C, c as w, ct as T, d as E, f as D, ft as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, o as I, ot as L, p as R, q as z, r as B, s as V, t as H, u as ee, v as U, vt as te, w as ne, y as re, z as ie } from "./geometry-yZmKN662.js";
|
|
3
3
|
import { useCallback as W, useEffect as ae, useLayoutEffect as G, useMemo as oe, useRef as K, useState as q } from "react";
|
|
4
4
|
import { Fragment as se, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal as ce } from "react-dom";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartView-
|
|
3
|
-
import { n as t } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartView-CW3m4Z_1.js";
|
|
3
|
+
import { n as t } from "./summaryChartData-CARqGRUl.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
// src/components/DataTable/summary/SummaryChart.tsx
|
|
6
6
|
var r = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartImageMenu-
|
|
3
|
-
import { n as t } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartImageMenu-AsfvmdTH.js";
|
|
3
|
+
import { n as t } from "./summaryChartData-CARqGRUl.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
// src/components/DataTable/summary/SummaryImage.tsx
|
|
6
6
|
function r({ item: r, report: i, context: a, branding: o, format: s, locale: c, labels: l }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartImageMenu-
|
|
3
|
-
import { t } from "./ChartView-
|
|
4
|
-
import { J as n, Tt as r, U as i, ot as a } from "./geometry-
|
|
5
|
-
import { n as o, o as s, s as c } from "./scrollArea-
|
|
6
|
-
import { r as l, t as u } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartImageMenu-AsfvmdTH.js";
|
|
3
|
+
import { t } from "./ChartView-CW3m4Z_1.js";
|
|
4
|
+
import { J as n, Tt as r, U as i, ot as a } from "./geometry-yZmKN662.js";
|
|
5
|
+
import { n as o, o as s, s as c } from "./scrollArea-Dd2dNMV4.js";
|
|
6
|
+
import { r as l, t as u } from "./summaryChartData-CARqGRUl.js";
|
|
7
7
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
// src/components/DataTable/summary/SummarySeeAll.tsx
|
|
9
9
|
function m({ item: m, all: h, onClose: g, onSelect: _, image: v, labels: y }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, d as t, r as n, s as r } from "./columnValue-
|
|
2
|
+
import { a as e, d as t, r as n, s as r } from "./columnValue-DwUqueZ6.js";
|
|
3
3
|
import { r as i, t as a } from "./labels-CnqqTrne.js";
|
|
4
4
|
// src/core/logic/exportSafety.logic.ts
|
|
5
5
|
var o = /^[=+\-@\t\r]/, s = (e) => o.test(e) ? `'${e}` : e, c = (e) => e === "xlsx" || e === "json" || e === "xml" ? "typed" : "text";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "./runFileTask--4YjQH7Y.js";
|
|
3
3
|
import { a as t, c as n, f as r, i, l as a, n as o, o as s, s as c } from "./fileActions-COf5Q4Eg.js";
|
|
4
|
-
import { a as l, c as u, i as d, n as f, o as p, r as m, s as h } from "./exportContext-
|
|
4
|
+
import { a as l, c as u, i as d, n as f, o as p, r as m, s as h } from "./exportContext-BKFnNQ0q.js";
|
|
5
5
|
// src/components/DataTable/export/exportEngine.ts
|
|
6
6
|
var g = (e) => JSON.stringify(e).replace(/</g, "\\u003c");
|
|
7
7
|
function _(e = "", t = {}, n) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as e, S as t, a as n, c as r, n as i, p as a, w as o } from "./columnValue-
|
|
2
|
+
import { C as e, S as t, a as n, c as r, n as i, p as a, w as o } from "./columnValue-DwUqueZ6.js";
|
|
3
3
|
import { createContext as s, useContext as c, useMemo as l } from "react";
|
|
4
4
|
import { Fragment as ee, jsx as u, jsxs as te } from "react/jsx-runtime";
|
|
5
5
|
// src/components/UIProvider/UILabelsContext.tsx
|
|
@@ -12,6 +12,12 @@ var ne = {
|
|
|
12
12
|
close: "Close"
|
|
13
13
|
},
|
|
14
14
|
toast: { dismiss: "Dismiss" },
|
|
15
|
+
form: {
|
|
16
|
+
submit: "Submit",
|
|
17
|
+
reset: "Reset",
|
|
18
|
+
fixErrors: "Please fix the validation errors before submitting",
|
|
19
|
+
submitFailed: "An error occurred while submitting the form"
|
|
20
|
+
},
|
|
15
21
|
input: {
|
|
16
22
|
clear: "Clear",
|
|
17
23
|
showPassword: "Show password",
|
|
@@ -75,7 +81,10 @@ var ne = {
|
|
|
75
81
|
},
|
|
76
82
|
sidebar: {
|
|
77
83
|
name: "Main",
|
|
78
|
-
closeNavigation: "Close navigation"
|
|
84
|
+
closeNavigation: "Close navigation",
|
|
85
|
+
collapse: "Collapse sidebar",
|
|
86
|
+
expand: "Expand sidebar",
|
|
87
|
+
showChildren: (e) => e ? `Show ${e} pages` : "Show pages"
|
|
79
88
|
},
|
|
80
89
|
breadcrumbs: {
|
|
81
90
|
name: "Breadcrumb",
|