@pglevy/sailwind 0.3.0 → 0.4.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 (28) 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/SideNavAdmin/SideNavAdmin.d.ts +23 -0
  8. package/dist/components/SideNavAdmin/SideNavAdmin.d.ts.map +1 -0
  9. package/dist/components/SideNavAdmin/SideNavAdmin.js +143 -0
  10. package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts +13 -0
  11. package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts.map +1 -0
  12. package/dist/components/SideNavAdmin/index.d.ts +3 -0
  13. package/dist/components/SideNavAdmin/index.d.ts.map +1 -0
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/index.d.ts.map +1 -1
  16. package/dist/index.js +22 -20
  17. package/dist/stories/pages/AdminConsoleDemo.stories.d.ts +13 -0
  18. package/dist/stories/pages/AdminConsoleDemo.stories.d.ts.map +1 -0
  19. package/package.json +4 -1
  20. package/public/images/icon-cog.svg +1 -0
  21. package/dist/esg_world_logo_no_year.png +0 -0
  22. package/dist/uifaces-human-avatar.jpg +0 -0
  23. package/dist/vite.svg +0 -1
  24. /package/{dist → public}/images/icon-app.svg +0 -0
  25. /package/{dist → public}/images/icon-appian-header.png +0 -0
  26. /package/{dist → public}/images/icon-expression-rule.svg +0 -0
  27. /package/{dist → public}/images/icon-interface.svg +0 -0
  28. /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,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,5 @@ export * from './Tabs';
19
19
  export * from './Image';
20
20
  export * from './Dialog';
21
21
  export * from './ApplicationHeader';
22
+ export * from './SideNavAdmin';
22
23
  //# 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"}
package/dist/index.js CHANGED
@@ -7,52 +7,54 @@ import { ButtonWidget as F } from "./components/Button/ButtonWidget.js";
7
7
  import { ButtonArrayLayout as g } from "./components/Button/ButtonArrayLayout.js";
8
8
  import { CardLayout as T } from "./components/Card/CardLayout.js";
9
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";
10
+ import { MessageBanner as S } from "./components/MessageBanner/MessageBanner.js";
11
+ import { MilestoneField as y } from "./components/Milestone/MilestoneField.js";
12
+ import { ProgressBar as I } from "./components/ProgressBar/ProgressBar.js";
13
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";
14
+ import { TextItem as C } from "./components/RichText/TextItem.js";
15
+ import { Icon as M } from "./components/RichText/Icon.js";
16
16
  import { StampField as R } from "./components/Stamp/StampField.js";
17
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";
18
+ import { CheckboxField as N } from "./components/Checkbox/CheckboxField.js";
19
+ import { RadioButtonField as j } from "./components/RadioButton/RadioButtonField.js";
20
+ import { DropdownField as z } from "./components/Dropdown/DropdownField.js";
21
+ import { MultipleDropdownField as G } from "./components/Dropdown/MultipleDropdownField.js";
22
+ import { SwitchField as K } 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
28
  import { ApplicationHeader as ro } from "./components/ApplicationHeader/ApplicationHeader.js";
29
+ import { SideNavAdmin as po } from "./components/SideNavAdmin/SideNavAdmin.js";
29
30
  export {
30
31
  ro as ApplicationHeader,
31
32
  g as ButtonArrayLayout,
32
33
  F as ButtonWidget,
33
34
  T as CardLayout,
34
- j as CheckboxField,
35
+ N as CheckboxField,
35
36
  m as CollapsibleSection,
36
37
  oo as DialogField,
37
- E as DropdownField,
38
+ z as DropdownField,
38
39
  r as FieldLabel,
39
40
  p as FieldWrapper,
40
41
  u as HeadingField,
41
- A as Icon,
42
+ M as Icon,
42
43
  _ as ImageField,
43
- b as MessageBanner,
44
- D as MilestoneField,
45
- J as MultipleDropdownField,
46
- S as ProgressBar,
47
- v as RadioButtonField,
44
+ S as MessageBanner,
45
+ y as MilestoneField,
46
+ G as MultipleDropdownField,
47
+ I as ProgressBar,
48
+ j as RadioButtonField,
48
49
  w as RichTextDisplayField,
50
+ po as SideNavAdmin,
49
51
  V as SliderField,
50
52
  R as StampField,
51
- N as SwitchField,
53
+ K as SwitchField,
52
54
  Y as TabsField,
53
55
  l as TagField,
54
56
  d as TagItem,
55
57
  k as TextField,
56
- L as TextItem,
58
+ C as TextItem,
57
59
  Q as ToggleField
58
60
  };
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pglevy/sailwind",
3
- "version": "0.3.0",
3
+ "version": "0.4.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
  ],
@@ -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