@pglevy/sailwind 0.4.0 → 0.5.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/dist/components/ReadOnlyGrid/GridColumn.d.ts +35 -0
- package/dist/components/ReadOnlyGrid/GridColumn.d.ts.map +1 -0
- package/dist/components/ReadOnlyGrid/GridColumn.js +5 -0
- package/dist/components/ReadOnlyGrid/ReadOnlyGrid.d.ts +52 -0
- package/dist/components/ReadOnlyGrid/ReadOnlyGrid.d.ts.map +1 -0
- package/dist/components/ReadOnlyGrid/ReadOnlyGrid.js +277 -0
- package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts +35 -0
- package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts.map +1 -0
- package/dist/components/ReadOnlyGrid/index.d.ts +5 -0
- package/dist/components/ReadOnlyGrid/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +40 -36
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/types/sail.d.ts +15 -0
- package/dist/types/sail.d.ts.map +1 -1
- package/package.json +10 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SAILAlign, SAILGridColumnWidth } from '../../types/sail';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the GridColumn component.
|
|
5
|
+
* GridColumn is a configuration-only component — it renders nothing.
|
|
6
|
+
* ReadOnlyGrid reads these props from its children to define column behavior.
|
|
7
|
+
*/
|
|
8
|
+
export interface GridColumnProps {
|
|
9
|
+
/** Text to display as the column header */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Field name used for sorting when this column header is clicked */
|
|
12
|
+
sortField?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Display value for each cell. Can be:
|
|
15
|
+
* - A string field name to look up on each row object
|
|
16
|
+
* - A function (row: any, index: number) => React.ReactNode
|
|
17
|
+
*/
|
|
18
|
+
value?: string | ((row: any, index: number) => React.ReactNode);
|
|
19
|
+
/** Alignment for header and cell content */
|
|
20
|
+
align?: SAILAlign;
|
|
21
|
+
/** Column width */
|
|
22
|
+
width?: SAILGridColumnWidth;
|
|
23
|
+
/** Background color for cells — hex color or semantic name */
|
|
24
|
+
backgroundColor?: string | ((row: any) => string);
|
|
25
|
+
/** Whether this column is visible. Defaults to true. */
|
|
26
|
+
showWhen?: boolean;
|
|
27
|
+
/** Additional text for screen readers */
|
|
28
|
+
accessibilityText?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* GridColumn is a declarative, configuration-only component.
|
|
32
|
+
* It renders nothing — ReadOnlyGrid reads its props to determine column behavior.
|
|
33
|
+
*/
|
|
34
|
+
export declare const GridColumn: React.FC<GridColumnProps>;
|
|
35
|
+
//# sourceMappingURL=GridColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridColumn.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/GridColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE,4CAA4C;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mBAAmB;IACnB,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,8DAA8D;IAC9D,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IAClD,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAc,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SAILLabelPosition, SAILMarginSize, SAILGridHeight, SortInfo } from '../../types/sail';
|
|
3
|
+
export interface ReadOnlyGridProps {
|
|
4
|
+
/** Text to display as the grid label */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Determines where the label appears */
|
|
7
|
+
labelPosition?: SAILLabelPosition;
|
|
8
|
+
/** Supplemental text about this grid */
|
|
9
|
+
instructions?: string;
|
|
10
|
+
/** Displays a help icon with tooltip text */
|
|
11
|
+
helpTooltip?: string;
|
|
12
|
+
/** Text to display when no data is available */
|
|
13
|
+
emptyGridMessage?: string;
|
|
14
|
+
/** The data array to display */
|
|
15
|
+
data?: Record<string, any>[];
|
|
16
|
+
/** GridColumn children defining the columns */
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
/** Maximum rows per page. Default: 10 */
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
/** Initial sort configurations */
|
|
21
|
+
initialSorts?: SortInfo[];
|
|
22
|
+
/** Whether rows are selectable */
|
|
23
|
+
selectable?: boolean;
|
|
24
|
+
/** Selection visual style */
|
|
25
|
+
selectionStyle?: "CHECKBOX" | "ROW_HIGHLIGHT";
|
|
26
|
+
/** Currently selected row identifiers */
|
|
27
|
+
selectionValue?: (string | number)[];
|
|
28
|
+
/** Callback when selection changes */
|
|
29
|
+
selectionSaveInto?: (selectedIds: (string | number)[]) => void;
|
|
30
|
+
/** Validation messages to display below the grid */
|
|
31
|
+
validations?: string[];
|
|
32
|
+
/** Whether the component is displayed */
|
|
33
|
+
showWhen?: boolean;
|
|
34
|
+
/** Cell spacing */
|
|
35
|
+
spacing?: "STANDARD" | "DENSE";
|
|
36
|
+
/** Grid height */
|
|
37
|
+
height?: SAILGridHeight;
|
|
38
|
+
/** Border style */
|
|
39
|
+
borderStyle?: "STANDARD" | "LIGHT";
|
|
40
|
+
/** Whether to shade alternate rows */
|
|
41
|
+
shadeAlternateRows?: boolean;
|
|
42
|
+
/** Index of column to use as row header for accessibility */
|
|
43
|
+
rowHeader?: number;
|
|
44
|
+
/** Additional text for screen readers */
|
|
45
|
+
accessibilityText?: string;
|
|
46
|
+
/** Space above component */
|
|
47
|
+
marginAbove?: SAILMarginSize;
|
|
48
|
+
/** Space below component */
|
|
49
|
+
marginBelow?: SAILMarginSize;
|
|
50
|
+
}
|
|
51
|
+
export declare const ReadOnlyGrid: React.FC<ReadOnlyGridProps>;
|
|
52
|
+
//# sourceMappingURL=ReadOnlyGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadOnlyGrid.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/ReadOnlyGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC1B,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC;IAC9C,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACrC,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC/B,kBAAkB;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,mBAAmB;IACnB,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACnC,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4BAA4B;IAC5B,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,4BAA4B;IAC5B,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAuGD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2WpD,CAAC"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { ChevronsLeft as Re, ChevronLeft as $e, ChevronRight as ve, ChevronsRight as Ee, MoveUp as Le, MoveDown as Se } from "lucide-react";
|
|
4
|
+
import { FieldWrapper as Ae } from "../shared/FieldWrapper.js";
|
|
5
|
+
import { GridColumn as Oe } from "./GridColumn.js";
|
|
6
|
+
function Te(n) {
|
|
7
|
+
const i = [];
|
|
8
|
+
return o.Children.forEach(n, (l) => {
|
|
9
|
+
o.isValidElement(l) && l.type === Oe && i.push(l.props);
|
|
10
|
+
}), i;
|
|
11
|
+
}
|
|
12
|
+
function Me(n, i, l) {
|
|
13
|
+
if (n == null)
|
|
14
|
+
return null;
|
|
15
|
+
if (typeof n == "string")
|
|
16
|
+
return i[n] ?? null;
|
|
17
|
+
if (typeof n == "function")
|
|
18
|
+
try {
|
|
19
|
+
return n(i, l);
|
|
20
|
+
} catch (S) {
|
|
21
|
+
return console.warn("GridColumn value accessor threw an error:", S), null;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function He(n, i) {
|
|
26
|
+
if (!n) return {};
|
|
27
|
+
const l = typeof n == "function" ? n(i) : n;
|
|
28
|
+
return !l || l === "NONE" ? {} : I[l] !== void 0 ? I[l] ? { className: I[l] } : {} : l.startsWith("#") ? { style: { backgroundColor: l } } : {};
|
|
29
|
+
}
|
|
30
|
+
const Ue = {
|
|
31
|
+
SHORT: "max-h-40",
|
|
32
|
+
SHORT_PLUS: "max-h-52",
|
|
33
|
+
MEDIUM: "max-h-64",
|
|
34
|
+
MEDIUM_PLUS: "max-h-80",
|
|
35
|
+
TALL: "max-h-96",
|
|
36
|
+
TALL_PLUS: "max-h-[28rem]",
|
|
37
|
+
EXTRA_TALL: "max-h-[36rem]",
|
|
38
|
+
AUTO: ""
|
|
39
|
+
}, se = {
|
|
40
|
+
AUTO: "",
|
|
41
|
+
ICON: "w-10",
|
|
42
|
+
ICON_PLUS: "w-14",
|
|
43
|
+
NARROW: "w-24",
|
|
44
|
+
NARROW_PLUS: "w-32",
|
|
45
|
+
MEDIUM: "w-40",
|
|
46
|
+
MEDIUM_PLUS: "w-48",
|
|
47
|
+
WIDE: "w-64",
|
|
48
|
+
"1X": "flex-1",
|
|
49
|
+
"2X": "flex-[2]",
|
|
50
|
+
"3X": "flex-[3]",
|
|
51
|
+
"4X": "flex-[4]",
|
|
52
|
+
"5X": "flex-[5]",
|
|
53
|
+
"6X": "flex-[6]",
|
|
54
|
+
"7X": "flex-[7]",
|
|
55
|
+
"8X": "flex-[8]",
|
|
56
|
+
"9X": "flex-[9]",
|
|
57
|
+
"10X": "flex-[10]"
|
|
58
|
+
}, ne = {
|
|
59
|
+
START: "text-left",
|
|
60
|
+
CENTER: "text-center",
|
|
61
|
+
END: "text-right"
|
|
62
|
+
}, I = {
|
|
63
|
+
NONE: "",
|
|
64
|
+
ACCENT: "bg-blue-50",
|
|
65
|
+
SUCCESS: "bg-green-50",
|
|
66
|
+
INFO: "bg-sky-50",
|
|
67
|
+
WARN: "bg-yellow-50",
|
|
68
|
+
ERROR: "bg-red-50"
|
|
69
|
+
}, We = ({
|
|
70
|
+
label: n,
|
|
71
|
+
labelPosition: i,
|
|
72
|
+
instructions: l,
|
|
73
|
+
helpTooltip: S,
|
|
74
|
+
emptyGridMessage: le = "No items available",
|
|
75
|
+
data: X,
|
|
76
|
+
children: ae,
|
|
77
|
+
pageSize: D = 10,
|
|
78
|
+
initialSorts: x,
|
|
79
|
+
selectable: d,
|
|
80
|
+
selectionStyle: m = "CHECKBOX",
|
|
81
|
+
selectionValue: g = [],
|
|
82
|
+
selectionSaveInto: b,
|
|
83
|
+
validations: A,
|
|
84
|
+
showWhen: oe = !0,
|
|
85
|
+
borderStyle: ie = "LIGHT",
|
|
86
|
+
shadeAlternateRows: de = !1,
|
|
87
|
+
spacing: ce = "STANDARD",
|
|
88
|
+
height: k = "AUTO",
|
|
89
|
+
accessibilityText: F,
|
|
90
|
+
marginAbove: ue,
|
|
91
|
+
marginBelow: he
|
|
92
|
+
}) => {
|
|
93
|
+
const ge = o.useId(), O = D > 0 ? D : 10, C = Array.isArray(X) ? X : [], [T, f] = o.useState(1), [p, W] = o.useState(null), [c, M] = o.useState(!0);
|
|
94
|
+
o.useEffect(() => {
|
|
95
|
+
x && x.length > 0 && (W(x[0].field), M(x[0].ascending));
|
|
96
|
+
}, []), o.useEffect(() => {
|
|
97
|
+
f(1);
|
|
98
|
+
}, [C.length]);
|
|
99
|
+
const pe = (e) => {
|
|
100
|
+
p === e ? M((r) => !r) : (W(e), M(!0)), f(1);
|
|
101
|
+
}, H = o.useMemo(
|
|
102
|
+
() => C.map((e, r) => ({ ...e, __originalIndex: r })),
|
|
103
|
+
[C]
|
|
104
|
+
), y = o.useMemo(() => p ? [...H].sort((e, r) => {
|
|
105
|
+
const s = e[p], a = r[p];
|
|
106
|
+
return s == null && a == null ? 0 : s == null ? c ? -1 : 1 : a == null ? c ? 1 : -1 : typeof s == "string" && typeof a == "string" ? c ? s.localeCompare(a) : a.localeCompare(s) : s < a ? c ? -1 : 1 : s > a ? c ? 1 : -1 : 0;
|
|
107
|
+
}) : H, [H, p, c]);
|
|
108
|
+
if (!oe)
|
|
109
|
+
return null;
|
|
110
|
+
const N = Te(ae).filter((e) => e.showWhen !== !1), w = ie === "STANDARD", fe = w ? "border border-gray-300" : "", me = w ? "border-b border-gray-300" : "border-b border-gray-200", be = w ? "border-b border-gray-300" : "border-b border-gray-200", u = w ? "border-r border-gray-300" : "", R = ce === "DENSE" ? "px-2 py-1" : "px-3 py-2", G = Ue[k] || "", z = k !== "AUTO" && G !== "", U = Math.ceil(y.length / O), $ = (T - 1) * O, B = Math.min($ + O, y.length), j = T > 1, K = T < U, q = y.slice($, B), J = (e) => e.id !== void 0 ? e.id : e.__originalIndex, Q = (e) => {
|
|
111
|
+
if (!b) return;
|
|
112
|
+
const s = g.includes(e) ? g.filter((a) => a !== e) : [...g, e];
|
|
113
|
+
b(s);
|
|
114
|
+
}, v = d ? q.map((e) => J(e)) : [], Y = d && v.length > 0 && v.every((e) => g.includes(e)), xe = () => {
|
|
115
|
+
if (b)
|
|
116
|
+
if (Y)
|
|
117
|
+
b(g.filter((e) => !v.includes(e)));
|
|
118
|
+
else {
|
|
119
|
+
const e = [...g];
|
|
120
|
+
v.forEach((r) => {
|
|
121
|
+
e.includes(r) || e.push(r);
|
|
122
|
+
}), b(e);
|
|
123
|
+
}
|
|
124
|
+
}, Ce = A && A.length > 0 ? /* @__PURE__ */ t("div", { children: A.map((e, r) => /* @__PURE__ */ t("p", { className: "text-red-600 text-sm mt-1", children: e }, r)) }) : void 0, Z = (e) => e.width && se[e.width] ? se[e.width] : "", V = (e) => e.align && ne[e.align] ? ne[e.align] : "text-left", ee = () => /* @__PURE__ */ h(
|
|
125
|
+
"table",
|
|
126
|
+
{
|
|
127
|
+
className: `w-full border-collapse ${fe}`,
|
|
128
|
+
"aria-label": F,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ t("thead", { className: z ? "sticky top-0 bg-white z-10" : void 0, children: /* @__PURE__ */ h("tr", { className: me, children: [
|
|
131
|
+
d && m === "CHECKBOX" && /* @__PURE__ */ t("th", { className: `${R} w-10${u ? ` ${u}` : ""}`, children: /* @__PURE__ */ t(
|
|
132
|
+
"input",
|
|
133
|
+
{
|
|
134
|
+
type: "checkbox",
|
|
135
|
+
checked: Y,
|
|
136
|
+
onChange: xe,
|
|
137
|
+
"aria-label": "Select all rows"
|
|
138
|
+
}
|
|
139
|
+
) }),
|
|
140
|
+
N.map((e, r) => {
|
|
141
|
+
const s = Z(e), a = V(e), E = !(r === N.length - 1) && u ? ` ${u}` : "";
|
|
142
|
+
return /* @__PURE__ */ t(
|
|
143
|
+
"th",
|
|
144
|
+
{
|
|
145
|
+
className: `${R} ${a} text-sm font-semibold text-base${s ? ` ${s}` : ""}${E}`,
|
|
146
|
+
"aria-sort": p === e.sortField ? c ? "ascending" : "descending" : void 0,
|
|
147
|
+
children: e.sortField ? /* @__PURE__ */ h(
|
|
148
|
+
"button",
|
|
149
|
+
{
|
|
150
|
+
type: "button",
|
|
151
|
+
onClick: () => pe(e.sortField),
|
|
152
|
+
className: "flex items-center gap-1 hover:text-gray-900 cursor-pointer",
|
|
153
|
+
children: [
|
|
154
|
+
e.label ?? "",
|
|
155
|
+
p === e.sortField && /* @__PURE__ */ t("span", { "aria-hidden": "true", children: c ? /* @__PURE__ */ t(Le, { size: 14 }) : /* @__PURE__ */ t(Se, { size: 14 }) })
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
) : e.label ?? ""
|
|
159
|
+
},
|
|
160
|
+
r
|
|
161
|
+
);
|
|
162
|
+
})
|
|
163
|
+
] }) }),
|
|
164
|
+
/* @__PURE__ */ t("tbody", { children: q.map((e, r) => {
|
|
165
|
+
const s = J(e), a = d && g.includes(s), _ = d && m === "ROW_HIGHLIGHT" && a, E = de && r % 2 === 0 && !_ ? "bg-gray-50" : "";
|
|
166
|
+
return /* @__PURE__ */ h(
|
|
167
|
+
"tr",
|
|
168
|
+
{
|
|
169
|
+
className: `${be}${d && m === "ROW_HIGHLIGHT" ? " cursor-pointer" : ""}${_ ? " bg-blue-50" : ""}${E ? ` ${E}` : ""}`,
|
|
170
|
+
onClick: d && m === "ROW_HIGHLIGHT" ? () => Q(s) : void 0,
|
|
171
|
+
children: [
|
|
172
|
+
d && m === "CHECKBOX" && /* @__PURE__ */ t("td", { className: `${R} w-10${u ? ` ${u}` : ""}`, children: /* @__PURE__ */ t(
|
|
173
|
+
"input",
|
|
174
|
+
{
|
|
175
|
+
type: "checkbox",
|
|
176
|
+
checked: a || !1,
|
|
177
|
+
onChange: () => Q(s),
|
|
178
|
+
"aria-label": `Select row ${r + 1}`
|
|
179
|
+
}
|
|
180
|
+
) }),
|
|
181
|
+
N.map((L, te) => {
|
|
182
|
+
const re = Z(L), ye = V(L), P = He(L.backgroundColor, e), Ne = !(te === N.length - 1) && u ? ` ${u}` : "";
|
|
183
|
+
return /* @__PURE__ */ t(
|
|
184
|
+
"td",
|
|
185
|
+
{
|
|
186
|
+
className: `${R} ${ye} text-sm text-gray-900${re ? ` ${re}` : ""}${P.className ? ` ${P.className}` : ""}${Ne}`,
|
|
187
|
+
style: P.style,
|
|
188
|
+
children: Me(L.value, e, $ + r)
|
|
189
|
+
},
|
|
190
|
+
te
|
|
191
|
+
);
|
|
192
|
+
})
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
r
|
|
196
|
+
);
|
|
197
|
+
}) })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
return /* @__PURE__ */ t(
|
|
202
|
+
Ae,
|
|
203
|
+
{
|
|
204
|
+
label: n,
|
|
205
|
+
labelPosition: i,
|
|
206
|
+
instructions: l,
|
|
207
|
+
helpTooltip: S,
|
|
208
|
+
accessibilityText: F,
|
|
209
|
+
inputId: ge,
|
|
210
|
+
marginAbove: ue,
|
|
211
|
+
marginBelow: he,
|
|
212
|
+
footer: Ce,
|
|
213
|
+
children: C.length === 0 ? /* @__PURE__ */ t("div", { className: "text-gray-500 py-4 text-center", children: le }) : /* @__PURE__ */ h(we, { children: [
|
|
214
|
+
z ? /* @__PURE__ */ t("div", { className: `${G} overflow-y-auto`, children: ee() }) : ee(),
|
|
215
|
+
U > 1 && /* @__PURE__ */ h("div", { className: "flex items-center justify-end gap-2 px-3 py-2 text-sm text-gray-700", children: [
|
|
216
|
+
/* @__PURE__ */ t(
|
|
217
|
+
"button",
|
|
218
|
+
{
|
|
219
|
+
onClick: () => f(1),
|
|
220
|
+
disabled: !j,
|
|
221
|
+
"aria-label": "First page",
|
|
222
|
+
title: "First page",
|
|
223
|
+
className: "px-1 py-1 disabled:text-gray-300 disabled:cursor-not-allowed text-blue-700 hover:text-blue-900 cursor-pointer",
|
|
224
|
+
children: /* @__PURE__ */ t(Re, { size: 18 })
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
/* @__PURE__ */ t(
|
|
228
|
+
"button",
|
|
229
|
+
{
|
|
230
|
+
onClick: () => f((e) => e - 1),
|
|
231
|
+
disabled: !j,
|
|
232
|
+
"aria-label": "Previous page",
|
|
233
|
+
title: "Previous page",
|
|
234
|
+
className: "px-1 py-1 disabled:text-gray-300 disabled:cursor-not-allowed text-blue-700 hover:text-blue-900 cursor-pointer",
|
|
235
|
+
children: /* @__PURE__ */ t($e, { size: 18 })
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
/* @__PURE__ */ h("span", { children: [
|
|
239
|
+
/* @__PURE__ */ h("span", { className: "font-bold", children: [
|
|
240
|
+
$ + 1,
|
|
241
|
+
" – ",
|
|
242
|
+
B
|
|
243
|
+
] }),
|
|
244
|
+
" ",
|
|
245
|
+
"of ",
|
|
246
|
+
y.length
|
|
247
|
+
] }),
|
|
248
|
+
/* @__PURE__ */ t(
|
|
249
|
+
"button",
|
|
250
|
+
{
|
|
251
|
+
onClick: () => f((e) => e + 1),
|
|
252
|
+
disabled: !K,
|
|
253
|
+
"aria-label": "Next page",
|
|
254
|
+
title: "Next page",
|
|
255
|
+
className: "px-1 py-1 disabled:text-gray-300 disabled:cursor-not-allowed text-blue-700 hover:text-blue-900 cursor-pointer",
|
|
256
|
+
children: /* @__PURE__ */ t(ve, { size: 18 })
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ t(
|
|
260
|
+
"button",
|
|
261
|
+
{
|
|
262
|
+
onClick: () => f(U),
|
|
263
|
+
disabled: !K,
|
|
264
|
+
"aria-label": "Last page",
|
|
265
|
+
title: "Last page",
|
|
266
|
+
className: "px-1 py-1 disabled:text-gray-300 disabled:cursor-not-allowed text-blue-700 hover:text-blue-900 cursor-pointer",
|
|
267
|
+
children: /* @__PURE__ */ t(Ee, { size: 18 })
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
] })
|
|
271
|
+
] })
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
export {
|
|
276
|
+
We as ReadOnlyGrid
|
|
277
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import('./ReadOnlyGrid').ReadOnlyGridProps>;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
/** 1. Default — Basic grid with employee data */
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
/** 2. EmptyState — Empty data with custom message */
|
|
16
|
+
export declare const EmptyState: Story;
|
|
17
|
+
/** 3. WithPaging — Full dataset with pageSize=5 showing paging controls */
|
|
18
|
+
export declare const WithPaging: Story;
|
|
19
|
+
/** 4. WithSorting — Sortable columns with initial sort on salary descending */
|
|
20
|
+
export declare const WithSorting: Story;
|
|
21
|
+
/** 5. WithCheckboxSelection — Selectable grid with checkbox style */
|
|
22
|
+
export declare const WithCheckboxSelection: Story;
|
|
23
|
+
/** 6. WithRowHighlightSelection — ROW_HIGHLIGHT selection style */
|
|
24
|
+
export declare const WithRowHighlightSelection: Story;
|
|
25
|
+
/** 7. StyledGrid — borderStyle, shadeAlternateRows, dense spacing */
|
|
26
|
+
export declare const StyledGrid: Story;
|
|
27
|
+
/** 8. FixedHeight — MEDIUM height to show scrolling behavior */
|
|
28
|
+
export declare const FixedHeight: Story;
|
|
29
|
+
/** 9. WithLabelAndValidations — label, instructions, validations, helpTooltip */
|
|
30
|
+
export declare const WithLabelAndValidations: Story;
|
|
31
|
+
/** 10. ColumnWidthsAndAlignment — Various column widths and alignments */
|
|
32
|
+
export declare const ColumnWidthsAndAlignment: Story;
|
|
33
|
+
/** 11. FunctionAccessor — Using function value accessors for computed columns */
|
|
34
|
+
export declare const FunctionAccessor: Story;
|
|
35
|
+
//# sourceMappingURL=ReadOnlyGrid.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadOnlyGrid.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/ReadOnlyGrid.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAmB3D,QAAA,MAAM,IAAI;;;;;;;CAK2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,iDAAiD;AACjD,eAAO,MAAM,OAAO,EAAE,KASrB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,KASxB,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,KAazB,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,EAAE,KAgBnC,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,EAAE,KAiBvC,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,EAAE,KAcrC,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,EAAE,KAStC,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,KAwB9B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReadOnlyGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAA;AAGxB,cAAc,OAAO,CAAA;AAGrB,cAAc,UAAU,CAAA;AAGxB,cAAc,QAAQ,CAAA;AAGtB,cAAc,WAAW,CAAA;AAGzB,cAAc,iBAAiB,CAAA;AAG/B,cAAc,aAAa,CAAA;AAG3B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,SAAS,CAAA;AAGvB,cAAc,aAAa,CAAA;AAG3B,cAAc,YAAY,CAAA;AAG1B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AAGvB,cAAc,UAAU,CAAA;AAGxB,cAAc,qBAAqB,CAAA;AAGnC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAA;AAGxB,cAAc,OAAO,CAAA;AAGrB,cAAc,UAAU,CAAA;AAGxB,cAAc,QAAQ,CAAA;AAGtB,cAAc,WAAW,CAAA;AAGzB,cAAc,iBAAiB,CAAA;AAG/B,cAAc,aAAa,CAAA;AAG3B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,SAAS,CAAA;AAGvB,cAAc,aAAa,CAAA;AAG3B,cAAc,YAAY,CAAA;AAG1B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AAGvB,cAAc,UAAU,CAAA;AAGxB,cAAc,qBAAqB,CAAA;AAGnC,cAAc,gBAAgB,CAAA;AAG9B,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
import { FieldLabel as
|
|
1
|
+
import { FieldLabel as e } from "./components/shared/FieldLabel.js";
|
|
2
2
|
import { FieldWrapper as p } from "./components/shared/FieldWrapper.js";
|
|
3
|
-
import { CollapsibleSection as
|
|
3
|
+
import { CollapsibleSection as i } from "./components/shared/CollapsibleSection.js";
|
|
4
4
|
import { TagField as l } from "./components/Tag/TagField.js";
|
|
5
|
-
import { TagItem as
|
|
5
|
+
import { TagItem as f } from "./components/Tag/TagItem.js";
|
|
6
6
|
import { ButtonWidget as F } from "./components/Button/ButtonWidget.js";
|
|
7
7
|
import { ButtonArrayLayout as g } from "./components/Button/ButtonArrayLayout.js";
|
|
8
|
-
import { CardLayout as
|
|
9
|
-
import { HeadingField as
|
|
10
|
-
import { MessageBanner as
|
|
11
|
-
import { MilestoneField as
|
|
12
|
-
import { ProgressBar as
|
|
13
|
-
import { RichTextDisplayField as
|
|
14
|
-
import { TextItem as
|
|
8
|
+
import { CardLayout as u } from "./components/Card/CardLayout.js";
|
|
9
|
+
import { HeadingField as c } from "./components/Heading/HeadingField.js";
|
|
10
|
+
import { MessageBanner as B } from "./components/MessageBanner/MessageBanner.js";
|
|
11
|
+
import { MilestoneField as b } from "./components/Milestone/MilestoneField.js";
|
|
12
|
+
import { ProgressBar as D } from "./components/ProgressBar/ProgressBar.js";
|
|
13
|
+
import { RichTextDisplayField as h } from "./components/RichText/RichTextDisplayField.js";
|
|
14
|
+
import { TextItem as A } from "./components/RichText/TextItem.js";
|
|
15
15
|
import { Icon as M } from "./components/RichText/Icon.js";
|
|
16
|
-
import { StampField as
|
|
17
|
-
import { TextField as
|
|
18
|
-
import { CheckboxField as
|
|
19
|
-
import { RadioButtonField as
|
|
20
|
-
import { DropdownField as
|
|
21
|
-
import { MultipleDropdownField as
|
|
22
|
-
import { SwitchField as
|
|
16
|
+
import { StampField as G } from "./components/Stamp/StampField.js";
|
|
17
|
+
import { TextField as W } from "./components/TextField/TextField.js";
|
|
18
|
+
import { CheckboxField as v } from "./components/Checkbox/CheckboxField.js";
|
|
19
|
+
import { RadioButtonField as O } from "./components/RadioButton/RadioButtonField.js";
|
|
20
|
+
import { DropdownField as j } from "./components/Dropdown/DropdownField.js";
|
|
21
|
+
import { MultipleDropdownField as z } from "./components/Dropdown/MultipleDropdownField.js";
|
|
22
|
+
import { SwitchField as J } from "./components/Switch/SwitchField.js";
|
|
23
23
|
import { ToggleField as Q } from "./components/Toggle/ToggleField.js";
|
|
24
24
|
import { SliderField as V } from "./components/Slider/SliderField.js";
|
|
25
25
|
import { TabsField as Y } from "./components/Tabs/TabsField.js";
|
|
26
26
|
import { ImageField as _ } from "./components/Image/ImageField.js";
|
|
27
27
|
import { DialogField as oo } from "./components/Dialog/DialogField.js";
|
|
28
|
-
import { ApplicationHeader as
|
|
28
|
+
import { ApplicationHeader as eo } from "./components/ApplicationHeader/ApplicationHeader.js";
|
|
29
29
|
import { SideNavAdmin as po } from "./components/SideNavAdmin/SideNavAdmin.js";
|
|
30
|
+
import { ReadOnlyGrid as io } from "./components/ReadOnlyGrid/ReadOnlyGrid.js";
|
|
31
|
+
import { GridColumn as lo } from "./components/ReadOnlyGrid/GridColumn.js";
|
|
30
32
|
export {
|
|
31
|
-
|
|
33
|
+
eo as ApplicationHeader,
|
|
32
34
|
g as ButtonArrayLayout,
|
|
33
35
|
F as ButtonWidget,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
u as CardLayout,
|
|
37
|
+
v as CheckboxField,
|
|
38
|
+
i as CollapsibleSection,
|
|
37
39
|
oo as DialogField,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
j as DropdownField,
|
|
41
|
+
e as FieldLabel,
|
|
40
42
|
p as FieldWrapper,
|
|
41
|
-
|
|
43
|
+
lo as GridColumn,
|
|
44
|
+
c as HeadingField,
|
|
42
45
|
M as Icon,
|
|
43
46
|
_ as ImageField,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
B as MessageBanner,
|
|
48
|
+
b as MilestoneField,
|
|
49
|
+
z as MultipleDropdownField,
|
|
50
|
+
D as ProgressBar,
|
|
51
|
+
O as RadioButtonField,
|
|
52
|
+
io as ReadOnlyGrid,
|
|
53
|
+
h as RichTextDisplayField,
|
|
50
54
|
po as SideNavAdmin,
|
|
51
55
|
V as SliderField,
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
G as StampField,
|
|
57
|
+
J as SwitchField,
|
|
54
58
|
Y as TabsField,
|
|
55
59
|
l as TagField,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
f as TagItem,
|
|
61
|
+
W as TextField,
|
|
62
|
+
A as TextItem,
|
|
59
63
|
Q as ToggleField
|
|
60
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA"}
|
package/dist/types/sail.d.ts
CHANGED
|
@@ -34,4 +34,19 @@ export type SAILLabelPosition = "ABOVE" | "ADJACENT" | "COLLAPSED" | "JUSTIFIED"
|
|
|
34
34
|
* Semantic color values matching SAIL's color constants
|
|
35
35
|
*/
|
|
36
36
|
export type SAILSemanticColor = "ACCENT" | "POSITIVE" | "NEGATIVE" | "SECONDARY" | "STANDARD";
|
|
37
|
+
/**
|
|
38
|
+
* Sort configuration for grid columns
|
|
39
|
+
*/
|
|
40
|
+
export interface SortInfo {
|
|
41
|
+
field: string;
|
|
42
|
+
ascending: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Grid height values matching SAIL's height parameter for grids
|
|
46
|
+
*/
|
|
47
|
+
export type SAILGridHeight = "SHORT" | "SHORT_PLUS" | "MEDIUM" | "MEDIUM_PLUS" | "TALL" | "TALL_PLUS" | "EXTRA_TALL" | "AUTO";
|
|
48
|
+
/**
|
|
49
|
+
* Grid column width values matching SAIL's width parameter for grid columns
|
|
50
|
+
*/
|
|
51
|
+
export type SAILGridColumnWidth = "AUTO" | "ICON" | "ICON_PLUS" | "NARROW" | "NARROW_PLUS" | "MEDIUM" | "MEDIUM_PLUS" | "WIDE" | "1X" | "2X" | "3X" | "4X" | "5X" | "6X" | "7X" | "8X" | "9X" | "10X";
|
|
37
52
|
//# sourceMappingURL=sail.d.ts.map
|
package/dist/types/sail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sail.d.ts","sourceRoot":"","sources":["../../src/types/sail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE3F;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE9F;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,aAAa,CAAA;AAEtF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAEhF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"sail.d.ts","sourceRoot":"","sources":["../../src/types/sail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE3F;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE9F;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,aAAa,CAAA;AAEtF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAEhF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAA;AAE7F;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,OAAO,GAAG,YAAY,GACtB,QAAQ,GAAG,aAAa,GACxB,MAAM,GAAG,WAAW,GACpB,YAAY,GAAG,MAAM,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GAAG,MAAM,GAAG,WAAW,GAC7B,QAAQ,GAAG,aAAa,GACxB,QAAQ,GAAG,aAAa,GACxB,MAAM,GACN,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAChC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pglevy/sailwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Appian SAIL components for React - Pre-release version under active development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"version:patch": "npm version patch",
|
|
54
54
|
"version:minor": "npm version minor",
|
|
55
55
|
"version:major": "npm version major",
|
|
56
|
-
"release": "npm run build:lib && npm publish --access public"
|
|
56
|
+
"release": "npm run build:lib && npm publish --access public",
|
|
57
|
+
"test": "vitest --run"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
60
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -76,6 +77,9 @@
|
|
|
76
77
|
"@storybook/addon-themes": "^10.2.8",
|
|
77
78
|
"@storybook/react-vite": "^10.2.8",
|
|
78
79
|
"@tailwindcss/postcss": "^4.1.14",
|
|
80
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
81
|
+
"@testing-library/react": "^16.3.2",
|
|
82
|
+
"@testing-library/user-event": "^14.6.1",
|
|
79
83
|
"@types/react": "^19.1.13",
|
|
80
84
|
"@types/react-dom": "^19.1.9",
|
|
81
85
|
"@vitejs/plugin-react": "^5.0.3",
|
|
@@ -83,7 +87,9 @@
|
|
|
83
87
|
"eslint": "^9.36.0",
|
|
84
88
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
85
89
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
90
|
+
"fast-check": "^4.5.3",
|
|
86
91
|
"globals": "^16.4.0",
|
|
92
|
+
"jsdom": "^28.1.0",
|
|
87
93
|
"playwright": "^1.56.1",
|
|
88
94
|
"postcss": "^8.5.6",
|
|
89
95
|
"react": "^19.1.1",
|
|
@@ -93,6 +99,7 @@
|
|
|
93
99
|
"typescript": "~5.8.3",
|
|
94
100
|
"typescript-eslint": "^8.44.0",
|
|
95
101
|
"vite": "^7.1.7",
|
|
96
|
-
"vite-plugin-dts": "^4.5.4"
|
|
102
|
+
"vite-plugin-dts": "^4.5.4",
|
|
103
|
+
"vitest": "^4.0.18"
|
|
97
104
|
}
|
|
98
105
|
}
|