@pglevy/sailwind 0.3.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.
Files changed (42) hide show
  1. package/README.md +32 -0
  2. package/dist/components/ApplicationHeader/ApplicationHeader.d.ts +8 -0
  3. package/dist/components/ApplicationHeader/ApplicationHeader.d.ts.map +1 -1
  4. package/dist/components/ApplicationHeader/ApplicationHeader.js +55 -40
  5. package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts +1 -0
  6. package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts.map +1 -1
  7. package/dist/components/ReadOnlyGrid/GridColumn.d.ts +35 -0
  8. package/dist/components/ReadOnlyGrid/GridColumn.d.ts.map +1 -0
  9. package/dist/components/ReadOnlyGrid/GridColumn.js +5 -0
  10. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.d.ts +52 -0
  11. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.d.ts.map +1 -0
  12. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.js +277 -0
  13. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts +35 -0
  14. package/dist/components/ReadOnlyGrid/ReadOnlyGrid.stories.d.ts.map +1 -0
  15. package/dist/components/ReadOnlyGrid/index.d.ts +5 -0
  16. package/dist/components/ReadOnlyGrid/index.d.ts.map +1 -0
  17. package/dist/components/SideNavAdmin/SideNavAdmin.d.ts +23 -0
  18. package/dist/components/SideNavAdmin/SideNavAdmin.d.ts.map +1 -0
  19. package/dist/components/SideNavAdmin/SideNavAdmin.js +143 -0
  20. package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts +13 -0
  21. package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts.map +1 -0
  22. package/dist/components/SideNavAdmin/index.d.ts +3 -0
  23. package/dist/components/SideNavAdmin/index.d.ts.map +1 -0
  24. package/dist/components/index.d.ts +2 -0
  25. package/dist/components/index.d.ts.map +1 -1
  26. package/dist/index.js +44 -38
  27. package/dist/stories/pages/AdminConsoleDemo.stories.d.ts +13 -0
  28. package/dist/stories/pages/AdminConsoleDemo.stories.d.ts.map +1 -0
  29. package/dist/test/setup.d.ts +1 -0
  30. package/dist/test/setup.d.ts.map +1 -0
  31. package/dist/types/sail.d.ts +15 -0
  32. package/dist/types/sail.d.ts.map +1 -1
  33. package/package.json +13 -3
  34. package/public/images/icon-cog.svg +1 -0
  35. package/dist/esg_world_logo_no_year.png +0 -0
  36. package/dist/uifaces-human-avatar.jpg +0 -0
  37. package/dist/vite.svg +0 -1
  38. /package/{dist → public}/images/icon-app.svg +0 -0
  39. /package/{dist → public}/images/icon-appian-header.png +0 -0
  40. /package/{dist → public}/images/icon-expression-rule.svg +0 -0
  41. /package/{dist → public}/images/icon-interface.svg +0 -0
  42. /package/{dist → public}/images/icon-record-type.svg +0 -0
package/README.md CHANGED
@@ -14,6 +14,38 @@ Use the **[sailwind-starter](https://github.com/pglevy/sailwind-starter)** templ
14
14
 
15
15
  Browse the **[Component Reference](https://pglevy.github.io/sailwind/)** to see what's available.
16
16
 
17
+ ### Installation
18
+
19
+ ```bash
20
+ npm install @pglevy/sailwind
21
+ ```
22
+
23
+ ### Setup
24
+
25
+ Import the CSS in your main entry file (e.g., `main.tsx` or `App.tsx`):
26
+
27
+ ```tsx
28
+ import '@pglevy/sailwind/index.css'
29
+ ```
30
+
31
+ ### Using Images
32
+
33
+ If your components need the included icons, reference them like this:
34
+
35
+ ```tsx
36
+ import iconApp from '@pglevy/sailwind/images/icon-app.svg'
37
+ import iconInterface from '@pglevy/sailwind/images/icon-interface.svg'
38
+
39
+ <img src={iconApp} alt="App icon" />
40
+ ```
41
+
42
+ Available images:
43
+ - `icon-app.svg`
44
+ - `icon-appian-header.png`
45
+ - `icon-expression-rule.svg`
46
+ - `icon-interface.svg`
47
+ - `icon-record-type.svg`
48
+
17
49
  ## For Contributors
18
50
 
19
51
  ### Setup
@@ -23,6 +23,14 @@ export interface ApplicationHeaderProps {
23
23
  onBackClick?: () => void;
24
24
  /** Path to Appian logo image */
25
25
  appianLogoSrc?: string;
26
+ /** Additional buttons to display before the right-side controls */
27
+ additionalButtons?: Array<{
28
+ label: string;
29
+ style?: "SOLID" | "OUTLINE" | "GHOST" | "LINK";
30
+ size?: "SMALL" | "STANDARD" | "MEDIUM" | "LARGE";
31
+ color?: string;
32
+ onClick?: () => void;
33
+ }>;
26
34
  }
27
35
  /**
28
36
  * ApplicationHeader Component
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ApplicationHeader/ApplicationHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAAA;AASzE,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,qCAAqC;IACrC,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkN9D,CAAA"}
1
+ {"version":3,"file":"ApplicationHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ApplicationHeader/ApplicationHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAAA;AASzE,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,qCAAqC;IACrC,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;QAC9C,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;QAChD,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACrB,CAAC,CAAA;CACH;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmO9D,CAAA"}
@@ -1,37 +1,38 @@
1
- import { jsx as e, jsxs as a, Fragment as r } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as a, Fragment as c } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { ButtonWidget as s } from "../Button/ButtonWidget.js";
4
- import { ButtonArrayLayout as m } from "../Button/ButtonArrayLayout.js";
5
- import { SwitchField as u } from "../Switch/SwitchField.js";
6
- import { ToggleField as c } from "../Toggle/ToggleField.js";
7
- const v = {
4
+ import { ButtonArrayLayout as o } from "../Button/ButtonArrayLayout.js";
5
+ import { SwitchField as T } from "../Switch/SwitchField.js";
6
+ import { ToggleField as t } from "../Toggle/ToggleField.js";
7
+ const y = {
8
8
  app: "images/icon-app.svg",
9
9
  interface: "images/icon-interface.svg",
10
10
  "record-type": "images/icon-record-type.svg",
11
11
  "expression-rule": "images/icon-expression-rule.svg"
12
- }, h = ({
13
- name: d = "Application",
14
- userInitials: N = "U",
12
+ }, z = ({
13
+ name: p = "Application",
14
+ userInitials: A = "U",
15
15
  showDesignerControls: i = !1,
16
- objectType: t = "app",
17
- iconSrc: p,
18
- previewEnabled: A = !1,
16
+ objectType: n = "app",
17
+ iconSrc: S,
18
+ previewEnabled: L = !1,
19
19
  showStoriesView: l = !1,
20
- onPreviewToggle: S,
21
- onStoryToggle: o,
22
- onBackClick: n,
23
- appianLogoSrc: L = "images/icon-appian-header.png"
20
+ onPreviewToggle: g,
21
+ onStoryToggle: m,
22
+ onBackClick: d,
23
+ appianLogoSrc: v = "images/icon-appian-header.png",
24
+ additionalButtons: N = []
24
25
  }) => {
25
- const g = p || v[t];
26
- return /* @__PURE__ */ e("div", { className: "application-header-gradient border-b border-gray-200", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-6 pt-4 pb-3", children: [
27
- /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
28
- i && n && /* @__PURE__ */ e(
26
+ const u = S || y[n];
27
+ return /* @__PURE__ */ e("div", { className: "application-header-gradient border-b border-gray-200", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-6 pt-4 pb-3 min-w-0 overflow-x-auto", children: [
28
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3 shrink-0", children: [
29
+ i && d && /* @__PURE__ */ e(
29
30
  s,
30
31
  {
31
32
  icon: "ChevronLeft",
32
33
  style: "GHOST",
33
34
  size: "SMALL",
34
- onClick: n,
35
+ onClick: d,
35
36
  className: "aspect-square"
36
37
  }
37
38
  ),
@@ -39,28 +40,28 @@ const v = {
39
40
  /* @__PURE__ */ e(
40
41
  "img",
41
42
  {
42
- src: g,
43
- alt: t,
43
+ src: u,
44
+ alt: n,
44
45
  className: "h-8 w-8 mr-2"
45
46
  }
46
47
  ),
47
- /* @__PURE__ */ e("span", { className: "text-gray-800 font-bold", children: d })
48
+ /* @__PURE__ */ e("span", { className: "text-gray-800 font-bold", children: p })
48
49
  ] }),
49
- i && /* @__PURE__ */ a(r, { children: [
50
+ i && /* @__PURE__ */ a(c, { children: [
50
51
  /* @__PURE__ */ a("div", { className: "flex items-center gap-0 ml-4 bg-gray-50 p-1 rounded-sm", children: [
51
52
  /* @__PURE__ */ e(
52
- c,
53
+ t,
53
54
  {
54
55
  icon: "square-dashed-mouse-pointer",
55
56
  style: "GHOST",
56
57
  size: "SMALL",
57
58
  value: !l,
58
- saveInto: l ? o : void 0,
59
+ saveInto: l ? m : void 0,
59
60
  marginBelow: "NONE"
60
61
  }
61
62
  ),
62
63
  /* @__PURE__ */ e(
63
- c,
64
+ t,
64
65
  {
65
66
  icon: "code",
66
67
  style: "GHOST",
@@ -71,20 +72,20 @@ const v = {
71
72
  )
72
73
  ] }),
73
74
  /* @__PURE__ */ e("div", { className: "mt-1 [&>div>div]:flex-row-reverse [&>div>div]:gap-2 [&_label]:mb-1 scale-75", children: /* @__PURE__ */ e(
74
- u,
75
+ T,
75
76
  {
76
77
  label: "Preview",
77
78
  labelPosition: "ADJACENT",
78
- value: A,
79
- saveInto: S,
79
+ value: L,
80
+ saveInto: g,
80
81
  marginBelow: "NONE"
81
82
  }
82
83
  ) })
83
84
  ] })
84
85
  ] }),
85
- /* @__PURE__ */ e("div", { className: "flex items-center gap-0", children: i && /* @__PURE__ */ a(r, { children: [
86
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-0 shrink-0", children: i && /* @__PURE__ */ a(c, { children: [
86
87
  /* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-0", children: /* @__PURE__ */ e(
87
- m,
88
+ o,
88
89
  {
89
90
  buttons: [
90
91
  {
@@ -113,20 +114,34 @@ const v = {
113
114
  }
114
115
  ) }),
115
116
  /* @__PURE__ */ e("div", { className: "[&_button]:border-0", children: /* @__PURE__ */ e(
116
- c,
117
+ t,
117
118
  {
118
119
  icon: "book-open-text",
119
120
  style: l ? "SOLID" : "GHOST",
120
121
  size: "SMALL",
121
122
  value: l,
122
- saveInto: o,
123
+ saveInto: m,
123
124
  marginBelow: "NONE",
124
125
  color: l ? "ACCENT" : "STANDARD"
125
126
  }
126
127
  ) })
127
128
  ] }) }),
128
- /* @__PURE__ */ a("div", { className: "flex items-center gap-0", children: [
129
- i && /* @__PURE__ */ a(r, { children: [
129
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-0 shrink-0", children: [
130
+ N.length > 0 && /* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-3", children: /* @__PURE__ */ e(
131
+ o,
132
+ {
133
+ buttons: N.map((r) => ({
134
+ label: r.label,
135
+ style: r.style || "OUTLINE",
136
+ size: r.size || "SMALL",
137
+ color: r.color || "STANDARD",
138
+ onClick: r.onClick,
139
+ className: "border-1"
140
+ })),
141
+ marginBelow: "NONE"
142
+ }
143
+ ) }),
144
+ i && /* @__PURE__ */ a(c, { children: [
130
145
  /* @__PURE__ */ e(
131
146
  s,
132
147
  {
@@ -168,7 +183,7 @@ const v = {
168
183
  }
169
184
  ),
170
185
  /* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-3", children: /* @__PURE__ */ e(
171
- m,
186
+ o,
172
187
  {
173
188
  buttons: [
174
189
  {
@@ -219,11 +234,11 @@ const v = {
219
234
  className: "aspect-square mr-3"
220
235
  }
221
236
  ),
222
- /* @__PURE__ */ e("div", { className: "w-8 h-8 border border-gray-300 rounded-full flex items-center justify-center mr-3", children: /* @__PURE__ */ e("span", { className: "text-gray-700 text-sm font-medium", children: N }) }),
237
+ /* @__PURE__ */ e("div", { className: "w-8 h-8 border border-gray-300 rounded-full flex items-center justify-center mr-3", children: /* @__PURE__ */ e("span", { className: "text-gray-700 text-sm font-medium", children: A }) }),
223
238
  /* @__PURE__ */ e(
224
239
  "img",
225
240
  {
226
- src: L,
241
+ src: v,
227
242
  alt: "Appian",
228
243
  className: "h-6 w-auto"
229
244
  }
@@ -232,5 +247,5 @@ const v = {
232
247
  ] }) });
233
248
  };
234
249
  export {
235
- h as ApplicationHeader
250
+ z as ApplicationHeader
236
251
  };
@@ -15,4 +15,5 @@ export declare const RecordType: Story;
15
15
  export declare const ExpressionRule: Story;
16
16
  export declare const PreviewEnabled: Story;
17
17
  export declare const StoriesViewActive: Story;
18
+ export declare const AdminConsole: Story;
18
19
  //# sourceMappingURL=ApplicationHeader.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ApplicationHeader/ApplicationHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;CAKgC,CAAA;AAE1C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAY5B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAA"}
1
+ {"version":3,"file":"ApplicationHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ApplicationHeader/ApplicationHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;CAKgC,CAAA;AAE1C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAY5B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAA"}
@@ -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,5 @@
1
+ import "react";
2
+ const l = () => null;
3
+ export {
4
+ l as GridColumn
5
+ };
@@ -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,5 @@
1
+ export { ReadOnlyGrid } from './ReadOnlyGrid';
2
+ export type { ReadOnlyGridProps } from './ReadOnlyGrid';
3
+ export { GridColumn } from './GridColumn';
4
+ export type { GridColumnProps } from './GridColumn';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ export interface NavItem {
3
+ label: string;
4
+ link?: () => void;
5
+ }
6
+ export interface NavSection {
7
+ heading: string;
8
+ items: NavItem[];
9
+ }
10
+ export interface SideNavAdminProps {
11
+ /** Navigation sections with headings and items */
12
+ sections?: NavSection[];
13
+ /** Label of the currently active/selected item */
14
+ activeItem?: string;
15
+ /** Callback when a nav item is clicked */
16
+ onItemClick?: (label: string) => void;
17
+ }
18
+ /**
19
+ * SideNavAdmin Component
20
+ * Admin console side navigation with grouped sections and active item indicator
21
+ */
22
+ export declare const SideNavAdmin: React.FC<SideNavAdminProps>;
23
+ //# sourceMappingURL=SideNavAdmin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavAdmin.d.ts","sourceRoot":"","sources":["../../../src/components/SideNavAdmin/SideNavAdmin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;IACvB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAyED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsEpD,CAAA"}
@@ -0,0 +1,143 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import "react";
3
+ import { RichTextDisplayField as t } from "../RichText/RichTextDisplayField.js";
4
+ import { TextItem as i } from "../RichText/TextItem.js";
5
+ import { Icon as c } from "../RichText/Icon.js";
6
+ const m = [
7
+ {
8
+ heading: "SYSTEM",
9
+ items: [
10
+ { label: "Branding" },
11
+ { label: "Data Retention" },
12
+ { label: "File Upload" },
13
+ { label: "Internationalization" },
14
+ { label: "Mobile" },
15
+ { label: "Permissions" },
16
+ { label: "Plug-ins" },
17
+ { label: "Portals" },
18
+ { label: "Typefaces" },
19
+ { label: "User Start Pages" }
20
+ ]
21
+ },
22
+ {
23
+ heading: "AUTHENTICATION",
24
+ items: [
25
+ { label: "Appian" },
26
+ { label: "LDAP" },
27
+ { label: "Maintenance Window" },
28
+ { label: "Sign-In Page" },
29
+ { label: "Single Sign-On" },
30
+ { label: "Users" },
31
+ { label: "Web API Authentication" }
32
+ ]
33
+ },
34
+ {
35
+ heading: "DEVOPS",
36
+ items: [
37
+ { label: "Deployment" },
38
+ { label: "Health Check" },
39
+ { label: "Infrastructure" }
40
+ ]
41
+ },
42
+ {
43
+ heading: "INTEGRATION",
44
+ items: [
45
+ { label: "AI Services" },
46
+ { label: "Certificates" },
47
+ { label: "Data Sources" },
48
+ { label: "Email" },
49
+ { label: "Embedded Interfaces" },
50
+ { label: "HTTP Proxy" },
51
+ { label: "Legacy Web Services" },
52
+ { label: "Logging" },
53
+ { label: "Microsoft Office" },
54
+ { label: "Third-Party Credentials" },
55
+ { label: "WalkMe" }
56
+ ]
57
+ },
58
+ {
59
+ heading: "MONITORING",
60
+ items: [
61
+ { label: "Current User Activity" },
62
+ { label: "Document Reports" },
63
+ { label: "Import History" },
64
+ { label: "Rule Performance" }
65
+ ]
66
+ },
67
+ {
68
+ heading: "ENGINEERING",
69
+ items: [
70
+ { label: "Data Calls by Request" },
71
+ { label: "Development Configurations" },
72
+ { label: "Feature Toggles" }
73
+ ]
74
+ }
75
+ ], p = ({
76
+ sections: r = m,
77
+ activeItem: s = "Branding",
78
+ onItemClick: n
79
+ }) => /* @__PURE__ */ e("nav", { className: "py-4 px-4 w-64", "aria-label": "Admin navigation", children: r.map((a) => /* @__PURE__ */ o("div", { className: "mb-4", children: [
80
+ /* @__PURE__ */ e(
81
+ t,
82
+ {
83
+ marginBelow: "EVEN_LESS",
84
+ value: [
85
+ /* @__PURE__ */ e(
86
+ i,
87
+ {
88
+ text: a.heading,
89
+ size: "SMALL",
90
+ color: "SECONDARY"
91
+ },
92
+ "heading"
93
+ )
94
+ ]
95
+ }
96
+ ),
97
+ /* @__PURE__ */ e("ul", { className: "list-none p-0 m-0 pl-3", children: a.items.map((l) => {
98
+ const b = l.label === s;
99
+ return /* @__PURE__ */ e("li", { className: "mb-1", children: /* @__PURE__ */ e(
100
+ t,
101
+ {
102
+ marginBelow: "EVEN_LESS",
103
+ value: b ? [
104
+ /* @__PURE__ */ e(
105
+ i,
106
+ {
107
+ text: l.label,
108
+ style: "STRONG",
109
+ color: "STANDARD",
110
+ size: "SMALL"
111
+ },
112
+ "label"
113
+ ),
114
+ /* @__PURE__ */ e("span", { children: "  " }, "spacer"),
115
+ /* @__PURE__ */ e(
116
+ c,
117
+ {
118
+ icon: "chevron-right",
119
+ size: "SMALL",
120
+ color: "STANDARD"
121
+ },
122
+ "caret"
123
+ )
124
+ ] : [
125
+ /* @__PURE__ */ e(
126
+ i,
127
+ {
128
+ text: l.label,
129
+ color: "ACCENT",
130
+ size: "SMALL",
131
+ link: l.link || (n ? () => n(l.label) : void 0),
132
+ linkStyle: "STANDALONE"
133
+ },
134
+ "label"
135
+ )
136
+ ]
137
+ }
138
+ ) }, l.label);
139
+ }) })
140
+ ] }, a.heading)) });
141
+ export {
142
+ p as SideNavAdmin
143
+ };
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('./SideNavAdmin').SideNavAdminProps>;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
13
+ //# sourceMappingURL=SideNavAdmin.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavAdmin.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SideNavAdmin/SideNavAdmin.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;CAK2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { SideNavAdmin } from './SideNavAdmin';
2
+ export type { SideNavAdminProps, NavSection, NavItem } from './SideNavAdmin';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SideNavAdmin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
@@ -19,4 +19,6 @@ export * from './Tabs';
19
19
  export * from './Image';
20
20
  export * from './Dialog';
21
21
  export * from './ApplicationHeader';
22
+ export * from './SideNavAdmin';
23
+ export * from './ReadOnlyGrid';
22
24
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
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,58 +1,64 @@
1
- import { FieldLabel as r } from "./components/shared/FieldLabel.js";
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 m } from "./components/shared/CollapsibleSection.js";
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 d } from "./components/Tag/TagItem.js";
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 T } from "./components/Card/CardLayout.js";
9
- import { HeadingField as u } from "./components/Heading/HeadingField.js";
10
- import { MessageBanner as b } from "./components/MessageBanner/MessageBanner.js";
11
- import { MilestoneField as D } from "./components/Milestone/MilestoneField.js";
12
- import { ProgressBar as S } from "./components/ProgressBar/ProgressBar.js";
13
- import { RichTextDisplayField as w } from "./components/RichText/RichTextDisplayField.js";
14
- import { TextItem as L } from "./components/RichText/TextItem.js";
15
- import { Icon as A } from "./components/RichText/Icon.js";
16
- import { StampField as R } from "./components/Stamp/StampField.js";
17
- import { TextField as k } from "./components/TextField/TextField.js";
18
- import { CheckboxField as j } from "./components/Checkbox/CheckboxField.js";
19
- import { RadioButtonField as v } from "./components/RadioButton/RadioButtonField.js";
20
- import { DropdownField as E } from "./components/Dropdown/DropdownField.js";
21
- import { MultipleDropdownField as J } from "./components/Dropdown/MultipleDropdownField.js";
22
- import { SwitchField as N } from "./components/Switch/SwitchField.js";
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
+ import { Icon as M } from "./components/RichText/Icon.js";
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 ro } from "./components/ApplicationHeader/ApplicationHeader.js";
28
+ import { ApplicationHeader as eo } from "./components/ApplicationHeader/ApplicationHeader.js";
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";
29
32
  export {
30
- ro as ApplicationHeader,
33
+ eo as ApplicationHeader,
31
34
  g as ButtonArrayLayout,
32
35
  F as ButtonWidget,
33
- T as CardLayout,
34
- j as CheckboxField,
35
- m as CollapsibleSection,
36
+ u as CardLayout,
37
+ v as CheckboxField,
38
+ i as CollapsibleSection,
36
39
  oo as DialogField,
37
- E as DropdownField,
38
- r as FieldLabel,
40
+ j as DropdownField,
41
+ e as FieldLabel,
39
42
  p as FieldWrapper,
40
- u as HeadingField,
41
- A as Icon,
43
+ lo as GridColumn,
44
+ c as HeadingField,
45
+ M as Icon,
42
46
  _ as ImageField,
43
- b as MessageBanner,
44
- D as MilestoneField,
45
- J as MultipleDropdownField,
46
- S as ProgressBar,
47
- v as RadioButtonField,
48
- w as RichTextDisplayField,
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,
54
+ po as SideNavAdmin,
49
55
  V as SliderField,
50
- R as StampField,
51
- N as SwitchField,
56
+ G as StampField,
57
+ J as SwitchField,
52
58
  Y as TabsField,
53
59
  l as TagField,
54
- d as TagItem,
55
- k as TextField,
56
- L as TextItem,
60
+ f as TagItem,
61
+ W as TextField,
62
+ A as TextItem,
57
63
  Q as ToggleField
58
64
  };
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { default as AdminConsoleDemo } from '../../pages/AdminConsoleDemo';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof AdminConsoleDemo;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
13
+ //# sourceMappingURL=AdminConsoleDemo.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminConsoleDemo.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/pages/AdminConsoleDemo.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,gBAAgB,MAAM,8BAA8B,CAAA;AAE3D,QAAA,MAAM,IAAI;;;;;;CAI+B,CAAA;AAEzC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAA"}
@@ -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"}
@@ -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
@@ -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.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",
@@ -10,10 +10,13 @@
10
10
  "import": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts"
12
12
  },
13
+ "./index.css": "./dist/index.css",
14
+ "./images/*": "./public/images/*",
13
15
  "./package.json": "./package.json"
14
16
  },
15
17
  "files": [
16
18
  "dist",
19
+ "public/images",
17
20
  "README.md",
18
21
  "LICENSE"
19
22
  ],
@@ -50,7 +53,8 @@
50
53
  "version:patch": "npm version patch",
51
54
  "version:minor": "npm version minor",
52
55
  "version:major": "npm version major",
53
- "release": "npm run build:lib && npm publish --access public"
56
+ "release": "npm run build:lib && npm publish --access public",
57
+ "test": "vitest --run"
54
58
  },
55
59
  "peerDependencies": {
56
60
  "react": "^18.0.0 || ^19.0.0",
@@ -73,6 +77,9 @@
73
77
  "@storybook/addon-themes": "^10.2.8",
74
78
  "@storybook/react-vite": "^10.2.8",
75
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",
76
83
  "@types/react": "^19.1.13",
77
84
  "@types/react-dom": "^19.1.9",
78
85
  "@vitejs/plugin-react": "^5.0.3",
@@ -80,7 +87,9 @@
80
87
  "eslint": "^9.36.0",
81
88
  "eslint-plugin-react-hooks": "^5.2.0",
82
89
  "eslint-plugin-react-refresh": "^0.4.20",
90
+ "fast-check": "^4.5.3",
83
91
  "globals": "^16.4.0",
92
+ "jsdom": "^28.1.0",
84
93
  "playwright": "^1.56.1",
85
94
  "postcss": "^8.5.6",
86
95
  "react": "^19.1.1",
@@ -90,6 +99,7 @@
90
99
  "typescript": "~5.8.3",
91
100
  "typescript-eslint": "^8.44.0",
92
101
  "vite": "^7.1.7",
93
- "vite-plugin-dts": "^4.5.4"
102
+ "vite-plugin-dts": "^4.5.4",
103
+ "vitest": "^4.0.18"
94
104
  }
95
105
  }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="144" height="144" viewBox="0 0 144 144"><defs><style>.a{fill:#2322f0;}.b{fill:#fff;}</style></defs><rect class="a" width="144" height="144"/><path class="b" d="M79.74,121.74H63.34a3.73,3.73,0,0,1-3.73-3.52L59,106.78a35.07,35.07,0,0,1-3.32-1.45l-8.18,7.44a3.76,3.76,0,0,1-5.17-.13L30.71,101a3.74,3.74,0,0,1-.14-5.12l7.6-8.55c-.48-1.07-.92-2.17-1.31-3.32l-11-.56a3.74,3.74,0,0,1-3.55-3.73V63.34a3.73,3.73,0,0,1,3.52-3.73L37.23,59c.42-1.1.89-2.18,1.42-3.24l-7.43-8.22a3.73,3.73,0,0,1,.13-5.15L43,30.72a3.75,3.75,0,0,1,5.14-.15l8.57,7.64c1.06-.47,2.15-.91,3.29-1.29l.55-11.11a3.74,3.74,0,0,1,3.74-3.55h16.4a3.75,3.75,0,0,1,3.74,3.52l.65,11.51a34.29,34.29,0,0,1,3.23,1.41l8.21-7.47a3.76,3.76,0,0,1,5.17.12L113.28,43a3.75,3.75,0,0,1,.15,5.14l-7.65,8.59q.72,1.61,1.29,3.27l11.12.56a3.74,3.74,0,0,1,3.55,3.73v16.4a3.75,3.75,0,0,1-3.52,3.74l-11.51.65a34.29,34.29,0,0,1-1.41,3.23l7.47,8.22a3.74,3.74,0,0,1-.12,5.16L101,113.28a3.74,3.74,0,0,1-5.13.15l-8.56-7.61A35,35,0,0,1,84,107.13l-.56,11.06A3.74,3.74,0,0,1,79.74,121.74Zm-12.87-7.48h9.31l.51-10.14a3.76,3.76,0,0,1,2.79-3.43,29.84,29.84,0,0,0,6.66-2.61,3.87,3.87,0,0,1,4.31.5l7.78,6.91,6.61-6.6L98,91.35a3.74,3.74,0,0,1-.44-4.44,27.15,27.15,0,0,0,2.83-6.49,3.76,3.76,0,0,1,3.39-2.69l10.51-.61v-9.3l-10.2-.51a3.76,3.76,0,0,1-3.43-2.79A29.84,29.84,0,0,0,98,57.86a3.74,3.74,0,0,1,.5-4.26l7-7.83-6.6-6.61L91.35,46a3.74,3.74,0,0,1-4.44.45,26.81,26.81,0,0,0-6.49-2.83,3.76,3.76,0,0,1-2.69-3.39l-.61-10.51H67.81l-.5,10.19a3.77,3.77,0,0,1-2.79,3.44A28.79,28.79,0,0,0,57.89,46a3.75,3.75,0,0,1-4.29-.48l-7.83-7-6.62,6.6L46,52.67a3.74,3.74,0,0,1,.43,4.43,27.51,27.51,0,0,0-2.84,6.47,3.73,3.73,0,0,1-3.38,2.69l-10.45.61v9.31l10.14.51a3.76,3.76,0,0,1,3.43,2.79A28.7,28.7,0,0,0,45.9,86.1a3.81,3.81,0,0,1,.47,1.81,3.88,3.88,0,0,1-.95,2.54L38.5,98.23l6.56,6.6L52.59,98a3.77,3.77,0,0,1,4.5-.41,25.49,25.49,0,0,0,6.46,2.86,3.72,3.72,0,0,1,2.71,3.38ZM118,80.66h0ZM72,90A18,18,0,1,1,89.94,72,17.95,17.95,0,0,1,72,90Zm0-28.41A10.46,10.46,0,1,0,82.46,72,10.47,10.47,0,0,0,72,61.54Z"/></svg>
Binary file
Binary file
package/dist/vite.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
File without changes
File without changes
File without changes
File without changes