@pglevy/sailwind 0.1.0 → 0.3.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 (99) hide show
  1. package/README.md +52 -173
  2. package/dist/components/ApplicationHeader/ApplicationHeader.d.ts +34 -0
  3. package/dist/components/ApplicationHeader/ApplicationHeader.d.ts.map +1 -0
  4. package/dist/components/ApplicationHeader/ApplicationHeader.js +236 -0
  5. package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts +18 -0
  6. package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts.map +1 -0
  7. package/dist/components/ApplicationHeader/index.d.ts +3 -0
  8. package/dist/components/ApplicationHeader/index.d.ts.map +1 -0
  9. package/dist/components/Button/Button.stories.d.ts +21 -0
  10. package/dist/components/Button/Button.stories.d.ts.map +1 -0
  11. package/dist/components/Button/ButtonArrayLayout.d.ts +0 -8
  12. package/dist/components/Button/ButtonArrayLayout.d.ts.map +1 -1
  13. package/dist/components/Button/ButtonWidget.d.ts +3 -10
  14. package/dist/components/Button/ButtonWidget.d.ts.map +1 -1
  15. package/dist/components/Button/ButtonWidget.js +81 -72
  16. package/dist/components/Card/Card.stories.d.ts +21 -0
  17. package/dist/components/Card/Card.stories.d.ts.map +1 -0
  18. package/dist/components/Card/CardLayout.d.ts +0 -9
  19. package/dist/components/Card/CardLayout.d.ts.map +1 -1
  20. package/dist/components/Checkbox/Checkbox.stories.d.ts +20 -0
  21. package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -0
  22. package/dist/components/Dialog/Dialog.stories.d.ts +18 -0
  23. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -0
  24. package/dist/components/Dropdown/Dropdown.stories.d.ts +22 -0
  25. package/dist/components/Dropdown/Dropdown.stories.d.ts.map +1 -0
  26. package/dist/components/Dropdown/DropdownField.d.ts +0 -27
  27. package/dist/components/Dropdown/DropdownField.d.ts.map +1 -1
  28. package/dist/components/Dropdown/MultipleDropdownField.d.ts +0 -25
  29. package/dist/components/Dropdown/MultipleDropdownField.d.ts.map +1 -1
  30. package/dist/components/Heading/Heading.stories.d.ts +23 -0
  31. package/dist/components/Heading/Heading.stories.d.ts.map +1 -0
  32. package/dist/components/Image/Image.stories.d.ts +21 -0
  33. package/dist/components/Image/Image.stories.d.ts.map +1 -0
  34. package/dist/components/Image/UserImage.d.ts +0 -14
  35. package/dist/components/Image/UserImage.d.ts.map +1 -1
  36. package/dist/components/MessageBanner/MessageBanner.stories.d.ts +35 -0
  37. package/dist/components/MessageBanner/MessageBanner.stories.d.ts.map +1 -0
  38. package/dist/components/Milestone/Milestone.stories.d.ts +20 -0
  39. package/dist/components/Milestone/Milestone.stories.d.ts.map +1 -0
  40. package/dist/components/Milestone/MilestoneField.d.ts +0 -8
  41. package/dist/components/Milestone/MilestoneField.d.ts.map +1 -1
  42. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +34 -0
  43. package/dist/components/ProgressBar/ProgressBar.stories.d.ts.map +1 -0
  44. package/dist/components/RadioButton/RadioButton.stories.d.ts +20 -0
  45. package/dist/components/RadioButton/RadioButton.stories.d.ts.map +1 -0
  46. package/dist/components/RichText/RichText.stories.d.ts +19 -0
  47. package/dist/components/RichText/RichText.stories.d.ts.map +1 -0
  48. package/dist/components/Slider/Slider.stories.d.ts +26 -0
  49. package/dist/components/Slider/Slider.stories.d.ts.map +1 -0
  50. package/dist/components/Stamp/Stamp.stories.d.ts +19 -0
  51. package/dist/components/Stamp/Stamp.stories.d.ts.map +1 -0
  52. package/dist/components/Switch/Switch.stories.d.ts +26 -0
  53. package/dist/components/Switch/Switch.stories.d.ts.map +1 -0
  54. package/dist/components/Tabs/Tabs.stories.d.ts +21 -0
  55. package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -0
  56. package/dist/components/Tag/Tag.stories.d.ts +23 -0
  57. package/dist/components/Tag/Tag.stories.d.ts.map +1 -0
  58. package/dist/components/Tag/TagField.d.ts +0 -8
  59. package/dist/components/Tag/TagField.d.ts.map +1 -1
  60. package/dist/components/TextField/TextField.d.ts +0 -10
  61. package/dist/components/TextField/TextField.d.ts.map +1 -1
  62. package/dist/components/TextField/TextField.stories.d.ts +46 -0
  63. package/dist/components/TextField/TextField.stories.d.ts.map +1 -0
  64. package/dist/components/Toggle/Toggle.stories.d.ts +24 -0
  65. package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -0
  66. package/dist/components/index.d.ts +1 -1
  67. package/dist/components/index.d.ts.map +1 -1
  68. package/dist/images/icon-app.svg +1 -0
  69. package/dist/images/icon-appian-header.png +0 -0
  70. package/dist/images/icon-expression-rule.svg +1 -0
  71. package/dist/images/icon-interface.svg +1 -0
  72. package/dist/images/icon-record-type.svg +1 -0
  73. package/dist/index.js +30 -30
  74. package/dist/stories/Welcome.stories.d.ts +11 -0
  75. package/dist/stories/Welcome.stories.d.ts.map +1 -0
  76. package/dist/stories/pages/ApplicationHeaderDemo.stories.d.ts +13 -0
  77. package/dist/stories/pages/ApplicationHeaderDemo.stories.d.ts.map +1 -0
  78. package/dist/stories/pages/ButtonTextFieldTest.stories.d.ts +13 -0
  79. package/dist/stories/pages/ButtonTextFieldTest.stories.d.ts.map +1 -0
  80. package/dist/stories/pages/ESGConferenceRegistration.stories.d.ts +13 -0
  81. package/dist/stories/pages/ESGConferenceRegistration.stories.d.ts.map +1 -0
  82. package/dist/stories/pages/InsuranceQuoteWizard.stories.d.ts +13 -0
  83. package/dist/stories/pages/InsuranceQuoteWizard.stories.d.ts.map +1 -0
  84. package/dist/stories/patterns/ApplicationStatus.stories.d.ts +12 -0
  85. package/dist/stories/patterns/ApplicationStatus.stories.d.ts.map +1 -0
  86. package/dist/stories/patterns/DocumentReview.stories.d.ts +12 -0
  87. package/dist/stories/patterns/DocumentReview.stories.d.ts.map +1 -0
  88. package/dist/stories/patterns/FormEntry.stories.d.ts +12 -0
  89. package/dist/stories/patterns/FormEntry.stories.d.ts.map +1 -0
  90. package/dist/stories/patterns/Publications.stories.d.ts +12 -0
  91. package/dist/stories/patterns/Publications.stories.d.ts.map +1 -0
  92. package/dist/stories/patterns/TaskDashboard.stories.d.ts +12 -0
  93. package/dist/stories/patterns/TaskDashboard.stories.d.ts.map +1 -0
  94. package/dist/stories/patterns/UserProfile.stories.d.ts +12 -0
  95. package/dist/stories/patterns/UserProfile.stories.d.ts.map +1 -0
  96. package/package.json +14 -4
  97. package/dist/components/TableOfContents.d.ts +0 -2
  98. package/dist/components/TableOfContents.d.ts.map +0 -1
  99. package/dist/components/TableOfContents.js +0 -142
package/README.md CHANGED
@@ -1,77 +1,72 @@
1
1
  # Sailwind
2
2
 
3
- **React component library for rapid prototyping of Appian applications with SAIL-compatible syntax.**
3
+ React component library for prototyping Appian applications with SAIL-compatible syntax.
4
4
 
5
5
  ## Overview
6
6
 
7
- Sailwind enables UX designers to rapidly prototype Appian applications using React and LLMs (like Claude) before committing to SAIL development. Components look like Appian, use exact SAIL parameter names, and translate directly to production code.
7
+ Sailwind provides React components that mirror Appian SAIL parameter names and conventions. Components use exact SAIL syntax (`size="STANDARD"`, `color="ACCENT"`) so prototype code translates almost directly to production SAIL.
8
8
 
9
- ## Key Features
9
+ Built on Radix UI primitives, Tailwind CSS, and TypeScript.
10
10
 
11
- - **SAIL-Exact Parameters** - Use UPPERCASE values matching SAIL: `size="STANDARD"` not `size="standard"`
12
- - **Backwards Compatible** - React code translates almost directly to SAIL
13
- - **LLM-Friendly** - Clear patterns for AI-assisted development
14
- - **Accessible** - All components meet WCAG 2.1 AA standards
15
- - **Production-Ready Foundation** - Built on Radix UI primitives + Tailwind CSS
11
+ ## For Prototypers
16
12
 
17
- ## Quickstart
13
+ Use the **[sailwind-starter](https://github.com/pglevy/sailwind-starter)** template to start building prototypes. It comes pre-configured with Sailwind and is ready for LLM-assisted development (Kiro, Cursor, Claude Code, etc.).
18
14
 
19
- ### Option 1: Use This Template (Recommended)
20
- 1. Click **"Use this template"** button above
21
- 2. Clone your new repository
22
- 3. Install dependencies: `npm install`
23
- 4. Start development server: `npm run dev`
24
- 5. Open `http://localhost:5173` to see the component library and examples
15
+ Browse the **[Component Reference](https://pglevy.github.io/sailwind/)** to see what's available.
16
+
17
+ ## For Contributors
18
+
19
+ ### Setup
25
20
 
26
- ### Option 2: Clone Directly
27
21
  ```bash
28
22
  git clone https://github.com/pglevy/sailwind.git
29
23
  cd sailwind
30
24
  npm install
31
- npm run dev
32
25
  ```
33
26
 
34
- ### Creating Your First Prototype
35
- 1. **Browse examples** at `/#/examples/taskdashboard` to see what's possible
36
- 2. **Explore components** at `/#/components` to understand available building blocks
37
- 3. **Create new pages** by adding `.tsx` files to `src/pages/` - they'll automatically become routes
38
- 4. **Import components** using exact SAIL parameter names:
27
+ ### Development
28
+
29
+ Storybook is the primary development environment:
30
+
31
+ ```bash
32
+ npm run storybook # Start Storybook at http://localhost:6006
33
+ ```
34
+
35
+ Every component has a `.stories.tsx` file for documentation and interactive testing. When adding or modifying components, update the corresponding stories.
36
+
37
+ ### Build
38
+
39
+ ```bash
40
+ npm run build:lib # Build the npm package (dist/)
41
+ npm run build-storybook # Build the Storybook site (storybook-static/)
42
+ npm run lint # Run ESLint
43
+ ```
44
+
45
+ ### Project Structure
39
46
 
40
- ```tsx
41
- // src/pages/my-prototype.tsx
42
- import { CardLayout, HeadingField, TagField, ButtonArrayLayout } from '../components'
43
-
44
- export default function MyPrototype() {
45
- return (
46
- <CardLayout padding="STANDARD">
47
- <HeadingField text="My Prototype" size="LARGE" />
48
- <TagField
49
- tags={[{ text: "DRAFT", backgroundColor: "ACCENT" }]}
50
- size="STANDARD"
51
- />
52
- <ButtonArrayLayout
53
- buttons={[
54
- { label: "Save", style: "SOLID", color: "ACCENT" },
55
- { label: "Cancel", style: "OUTLINE", color: "SECONDARY" }
56
- ]}
57
- align="END"
58
- />
59
- </CardLayout>
60
- )
61
- }
62
47
  ```
48
+ src/
49
+ ├── components/ # SAIL components (Button, Card, Dropdown, etc.)
50
+ │ └── */ # Each component has its own directory with stories
51
+ ├── stories/
52
+ │ ├── pages/ # Full page examples (realistic Appian interfaces)
53
+ │ └── patterns/ # Common UI patterns (forms, grids, data displays)
54
+ ├── types/ # Shared TypeScript types (SAILSize, SAILAlign, etc.)
55
+ └── index.css # Tailwind v4 theme configuration
56
+ ```
57
+
58
+ ### Publishing to npm
63
59
 
64
- 4. **Navigate to** `/#/my-prototype` to see your page
65
- 5. **Translate to SAIL** when ready for production using the exact same parameter names
60
+ ```bash
61
+ npm run build:lib
62
+ npm publish --access public
63
+ ```
66
64
 
67
- ### Next Steps
68
- - Check out `src/pages/examples/` for complete interface examples
69
- - Read the component documentation below for detailed usage
70
- - Use the table of contents on the home page to navigate between examples
65
+ See [PUBLISHING.md](PUBLISHING.md) for detailed release instructions.
71
66
 
72
67
  ## Component Comparison
73
68
 
74
- **React Prototype:**
69
+ **React (Sailwind):**
75
70
  ```tsx
76
71
  <TagField
77
72
  size="STANDARD"
@@ -81,7 +76,7 @@ export default function MyPrototype() {
81
76
  />
82
77
  ```
83
78
 
84
- **SAIL Production:**
79
+ **SAIL (Production):**
85
80
  ```sail
86
81
  a!tagField(
87
82
  size: "STANDARD",
@@ -91,129 +86,13 @@ a!tagField(
91
86
  )
92
87
  ```
93
88
 
94
- ## Architecture
95
-
96
- ### Foundation Stack
97
- - **Base:** Radix UI (unstyled, accessible primitives)
98
- - **Styling:** Tailwind CSS with Aurora color palette
99
- - **Language:** TypeScript (enforces SAIL conventions)
100
-
101
- ### Two-Layer Approach
102
-
103
- Sailwind uses a clear separation:
104
-
105
- 1. **Layer 1: SAIL API** - Component props use SAIL parameter names (UPPERCASE values)
106
- 2. **Layer 2: Implementation** - Standard Tailwind classes for styling
107
-
108
- ## Icon Library
109
-
110
- Sailwind uses **Lucide React** for icons with simplified names that map to SAIL:
111
-
112
- | React Icon | SAIL Icon | Lucide Component |
113
- |------------|-----------|------------------|
114
- | "info" | "info-circle" | Info |
115
- | "success" | "check-circle" | CheckCircle |
116
- | "warning" | "exclamation-triangle" | AlertTriangle |
117
- | "error" | "exclamation-circle" | AlertCircle |
118
-
119
- ## Styling Approach
120
-
121
- Sailwind uses **standard Tailwind classes** internally while maintaining SAIL-exact component APIs:
122
-
123
- ### Text Sizes
124
- - **SMALL** → `text-xs` (12px)
125
- - **STANDARD** → `text-base` (16px)
126
- - **MEDIUM** → `text-lg` (18px)
127
- - **LARGE** → `text-2xl` (24px)
128
-
129
- ### Spacing
130
- - **NONE** → `p-0` / `m-0` (0)
131
- - **EVEN_LESS** → `p-1` / `m-1` (4px)
132
- - **LESS** → `p-2` / `m-2` (8px)
133
- - **STANDARD** → `p-4` / `m-4` (16px)
134
- - **MORE** → `p-6` / `m-6` (24px)
135
- - **EVEN_MORE** → `p-8` / `m-8` (32px)
136
-
137
- ### Aurora Color Palette
138
-
139
- All colors use consistent Tailwind steps: **50, 100, 200, 500, 700, 900**
140
-
141
- **Available colors:** `red`, `orange`, `yellow`, `green`, `teal`, `sky`, `blue`, `purple`, `pink`, `gray`
142
-
143
- **Usage:**
144
- ```tsx
145
- // Light backgrounds
146
- <div className="bg-blue-100 text-blue-700">Tag</div>
147
-
148
- // Primary actions
149
- <button className="bg-blue-500 hover:bg-blue-700">Submit</button>
150
-
151
- // Text hierarchy
152
- <h1 className="text-gray-900">Heading</h1>
153
- <p className="text-gray-700">Body</p>
154
- ```
155
-
156
- ### Semantic Colors
157
-
158
- | Semantic | Usage | Tailwind |
159
- |----------|-------|----------|
160
- | ACCENT | Primary actions | `blue-500` |
161
- | POSITIVE | Success states | `green-700` |
162
- | NEGATIVE | Error states | `red-700` |
163
- | SECONDARY | Secondary actions | `gray-700` |
164
- | STANDARD | Default text | `gray-900` |
165
-
166
- ## Development
167
-
168
- ### Available Scripts
169
-
170
- - `npm run dev` - Start development server with HMR
171
- - `npm run build` - Build for production
172
- - `npm run lint` - Run ESLint
173
- - `npm run preview` - Preview production build
174
-
175
- ### Project Structure
176
-
177
- ```
178
- sailwind/
179
- ├── src/
180
- │ ├── components/ # SAIL components (Button, Tag, Card, etc.)
181
- │ ├── types/ # Shared TypeScript types (SAILSize, SAILAlign, etc.)
182
- │ ├── index.css # Tailwind v4 theme configuration
183
- │ └── App.tsx # Demo/playground
184
- ├── TAILWIND-SAIL-MAPPING.md # Complete styling reference
185
- ├── CLAUDE.md # LLM instructions
186
- └── package.json
187
- ```
188
-
189
89
  ## Documentation
190
90
 
191
- - **[TAILWIND-SAIL-MAPPING.md](TAILWIND-SAIL-MAPPING.md)** - Complete reference for Tailwind to SAIL mappings
192
- - **[CLAUDE.md](CLAUDE.md)** - Instructions for LLM-assisted development
193
- - **[SAIL Official Docs](https://docs.appian.com/suite/help/25.3/)** - Appian SAIL reference
194
-
195
- ## Related Resources
196
-
197
- - **Radix UI** - https://www.radix-ui.com/
198
- - **Tailwind CSS** - https://tailwindcss.com/
199
- - **Aurora Design System** - Color palette and branding
200
-
201
- ## Contributing
202
-
203
- This is a proof-of-concept for rapid Appian prototyping. Contributions welcome!
204
-
205
- ### Guidelines
206
-
207
- 1. Use exact SAIL parameter names (UPPERCASE values)
208
- 2. Follow Item + Field component pattern
209
- 3. Include SAIL translation examples in documentation
210
- 4. Ensure WCAG 2.1 AA accessibility compliance
211
- 5. Use standard Tailwind classes internally
91
+ - **[Component Reference](https://pglevy.github.io/sailwind/)** Live Storybook with all components
92
+ - **[TAILWIND-SAIL-MAPPING.md](TAILWIND-SAIL-MAPPING.md)** Tailwind to SAIL style mappings
93
+ - **[CLAUDE.md](CLAUDE.md)** Instructions for LLM-assisted development
94
+ - **[SAIL Docs](https://docs.appian.com/suite/help/25.3/)** — Official Appian SAIL reference
212
95
 
213
96
  ## License
214
97
 
215
- TBD
216
-
217
- ---
218
-
219
- **Status:** Active development - 20 components implemented (15 SAIL + 5 "New SAIL") including form inputs, selections, toggles, sliders, tabs, dialogs, and display components
98
+ MIT
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ type ObjectType = 'app' | 'interface' | 'record-type' | 'expression-rule';
3
+ export interface ApplicationHeaderProps {
4
+ /** Name of the application or object */
5
+ name?: string;
6
+ /** User initials to display in avatar */
7
+ userInitials?: string;
8
+ /** Show interface designer controls */
9
+ showDesignerControls?: boolean;
10
+ /** Type of object being displayed */
11
+ objectType?: ObjectType;
12
+ /** Path to custom icon image */
13
+ iconSrc?: string;
14
+ /** Preview mode enabled */
15
+ previewEnabled?: boolean;
16
+ /** Stories view enabled */
17
+ showStoriesView?: boolean;
18
+ /** Callback when preview toggle changes */
19
+ onPreviewToggle?: (enabled: boolean) => void;
20
+ /** Callback when stories toggle changes */
21
+ onStoryToggle?: () => void;
22
+ /** Callback when back button clicked */
23
+ onBackClick?: () => void;
24
+ /** Path to Appian logo image */
25
+ appianLogoSrc?: string;
26
+ }
27
+ /**
28
+ * ApplicationHeader Component
29
+ * Displays the main application header with navigation, controls, and user info
30
+ *
31
+ */
32
+ export declare const ApplicationHeader: React.FC<ApplicationHeaderProps>;
33
+ export {};
34
+ //# sourceMappingURL=ApplicationHeader.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,236 @@
1
+ import { jsx as e, jsxs as a, Fragment as r } from "react/jsx-runtime";
2
+ import "react";
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 = {
8
+ app: "images/icon-app.svg",
9
+ interface: "images/icon-interface.svg",
10
+ "record-type": "images/icon-record-type.svg",
11
+ "expression-rule": "images/icon-expression-rule.svg"
12
+ }, h = ({
13
+ name: d = "Application",
14
+ userInitials: N = "U",
15
+ showDesignerControls: i = !1,
16
+ objectType: t = "app",
17
+ iconSrc: p,
18
+ previewEnabled: A = !1,
19
+ showStoriesView: l = !1,
20
+ onPreviewToggle: S,
21
+ onStoryToggle: o,
22
+ onBackClick: n,
23
+ appianLogoSrc: L = "images/icon-appian-header.png"
24
+ }) => {
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(
29
+ s,
30
+ {
31
+ icon: "ChevronLeft",
32
+ style: "GHOST",
33
+ size: "SMALL",
34
+ onClick: n,
35
+ className: "aspect-square"
36
+ }
37
+ ),
38
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
39
+ /* @__PURE__ */ e(
40
+ "img",
41
+ {
42
+ src: g,
43
+ alt: t,
44
+ className: "h-8 w-8 mr-2"
45
+ }
46
+ ),
47
+ /* @__PURE__ */ e("span", { className: "text-gray-800 font-bold", children: d })
48
+ ] }),
49
+ i && /* @__PURE__ */ a(r, { children: [
50
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-0 ml-4 bg-gray-50 p-1 rounded-sm", children: [
51
+ /* @__PURE__ */ e(
52
+ c,
53
+ {
54
+ icon: "square-dashed-mouse-pointer",
55
+ style: "GHOST",
56
+ size: "SMALL",
57
+ value: !l,
58
+ saveInto: l ? o : void 0,
59
+ marginBelow: "NONE"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ c,
64
+ {
65
+ icon: "code",
66
+ style: "GHOST",
67
+ size: "SMALL",
68
+ value: !1,
69
+ marginBelow: "NONE"
70
+ }
71
+ )
72
+ ] }),
73
+ /* @__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
+ {
76
+ label: "Preview",
77
+ labelPosition: "ADJACENT",
78
+ value: A,
79
+ saveInto: S,
80
+ marginBelow: "NONE"
81
+ }
82
+ ) })
83
+ ] })
84
+ ] }),
85
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-0", children: i && /* @__PURE__ */ a(r, { children: [
86
+ /* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-0", children: /* @__PURE__ */ e(
87
+ m,
88
+ {
89
+ buttons: [
90
+ {
91
+ icon: "palette",
92
+ style: "GHOST",
93
+ size: "SMALL",
94
+ color: "STANDARD",
95
+ className: "aspect-square"
96
+ },
97
+ {
98
+ icon: "monitor",
99
+ style: "GHOST",
100
+ size: "SMALL",
101
+ color: "STANDARD",
102
+ className: "aspect-square"
103
+ },
104
+ {
105
+ icon: "globe",
106
+ style: "GHOST",
107
+ size: "SMALL",
108
+ color: "STANDARD",
109
+ className: "aspect-square"
110
+ }
111
+ ],
112
+ marginBelow: "NONE"
113
+ }
114
+ ) }),
115
+ /* @__PURE__ */ e("div", { className: "[&_button]:border-0", children: /* @__PURE__ */ e(
116
+ c,
117
+ {
118
+ icon: "book-open-text",
119
+ style: l ? "SOLID" : "GHOST",
120
+ size: "SMALL",
121
+ value: l,
122
+ saveInto: o,
123
+ marginBelow: "NONE",
124
+ color: l ? "ACCENT" : "STANDARD"
125
+ }
126
+ ) })
127
+ ] }) }),
128
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-0", children: [
129
+ i && /* @__PURE__ */ a(r, { children: [
130
+ /* @__PURE__ */ e(
131
+ s,
132
+ {
133
+ icon: "Lightbulb",
134
+ style: "GHOST",
135
+ size: "SMALL",
136
+ color: "STANDARD",
137
+ className: "aspect-square"
138
+ }
139
+ ),
140
+ /* @__PURE__ */ e(
141
+ s,
142
+ {
143
+ icon: "Undo",
144
+ style: "GHOST",
145
+ size: "SMALL",
146
+ color: "STANDARD",
147
+ className: "aspect-square"
148
+ }
149
+ ),
150
+ /* @__PURE__ */ e(
151
+ s,
152
+ {
153
+ icon: "Redo",
154
+ style: "GHOST",
155
+ size: "SMALL",
156
+ color: "STANDARD",
157
+ className: "aspect-square mr-3"
158
+ }
159
+ ),
160
+ /* @__PURE__ */ e(
161
+ s,
162
+ {
163
+ icon: "PieChart",
164
+ style: "GHOST",
165
+ size: "SMALL",
166
+ color: "STANDARD",
167
+ className: "aspect-square mr-3"
168
+ }
169
+ ),
170
+ /* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-3", children: /* @__PURE__ */ e(
171
+ m,
172
+ {
173
+ buttons: [
174
+ {
175
+ label: "TEST",
176
+ style: "OUTLINE",
177
+ size: "SMALL",
178
+ className: "border-1"
179
+ },
180
+ {
181
+ label: "SAVE",
182
+ style: "SOLID",
183
+ color: "ACCENT",
184
+ size: "SMALL",
185
+ className: "border-1"
186
+ }
187
+ ],
188
+ marginBelow: "NONE"
189
+ }
190
+ ) })
191
+ ] }),
192
+ /* @__PURE__ */ e(
193
+ s,
194
+ {
195
+ icon: "Search",
196
+ style: "GHOST",
197
+ size: "SMALL",
198
+ color: "STANDARD",
199
+ className: "aspect-square"
200
+ }
201
+ ),
202
+ /* @__PURE__ */ e(
203
+ s,
204
+ {
205
+ icon: "Settings",
206
+ style: "GHOST",
207
+ size: "SMALL",
208
+ color: "STANDARD",
209
+ className: "aspect-square"
210
+ }
211
+ ),
212
+ /* @__PURE__ */ e(
213
+ s,
214
+ {
215
+ icon: "Grid3X3",
216
+ style: "GHOST",
217
+ size: "SMALL",
218
+ color: "STANDARD",
219
+ className: "aspect-square mr-3"
220
+ }
221
+ ),
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 }) }),
223
+ /* @__PURE__ */ e(
224
+ "img",
225
+ {
226
+ src: L,
227
+ alt: "Appian",
228
+ className: "h-6 w-auto"
229
+ }
230
+ )
231
+ ] })
232
+ ] }) });
233
+ };
234
+ export {
235
+ h as ApplicationHeader
236
+ };
@@ -0,0 +1,18 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('./ApplicationHeader').ApplicationHeaderProps>;
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
+ export declare const WithDesignerControls: Story;
14
+ export declare const RecordType: Story;
15
+ export declare const ExpressionRule: Story;
16
+ export declare const PreviewEnabled: Story;
17
+ export declare const StoriesViewActive: Story;
18
+ //# sourceMappingURL=ApplicationHeader.stories.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,3 @@
1
+ export { ApplicationHeader } from './ApplicationHeader';
2
+ export type { ApplicationHeaderProps } from './ApplicationHeader';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ApplicationHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('./ButtonWidget').ButtonWidgetProps>;
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
+ export declare const SemanticColorsSolid: Story;
14
+ export declare const SemanticColorsOutline: Story;
15
+ export declare const ButtonStyles: Story;
16
+ export declare const ButtonSizes: Story;
17
+ export declare const HexColorsSolid: Story;
18
+ export declare const HexColorsOutline: Story;
19
+ export declare const WithActions: Story;
20
+ export declare const LinkStyle: Story;
21
+ //# sourceMappingURL=Button.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,QAAA,MAAM,IAAI;;;;;;;CAK2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAYjC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAYnC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAWzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAU9B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAA"}
@@ -24,14 +24,6 @@ export interface ButtonArrayLayoutProps {
24
24
  * In SAIL, a!buttonWidget must be used within a!buttonArrayLayout.
25
25
  * This component wraps buttons and provides layout/alignment.
26
26
  *
27
- * @example
28
- * <ButtonArrayLayout
29
- * align="END"
30
- * buttons={[
31
- * { label: "Cancel", style: "OUTLINE", color: "SECONDARY" },
32
- * { label: "Submit", style: "SOLID", color: "ACCENT", submit: true }
33
- * ]}
34
- * />
35
27
  */
36
28
  export declare const ButtonArrayLayout: React.FC<ButtonArrayLayoutProps>;
37
29
  //# sourceMappingURL=ButtonArrayLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonArrayLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Button/ButtonArrayLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA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,CA6C9D,CAAA"}
@@ -1,7 +1,6 @@
1
- import { SAILSize } from '../../types/sail';
1
+ import { SAILSize, SAILSemanticColor } from '../../types/sail';
2
2
  import * as React from 'react';
3
3
  type ButtonStyle = "SOLID" | "OUTLINE" | "GHOST" | "LINK";
4
- type ButtonColor = "ACCENT" | "NEGATIVE" | "SECONDARY";
5
4
  type ButtonWidth = "MINIMIZE" | "FILL";
6
5
  type IconPosition = "START" | "END";
7
6
  /**
@@ -14,7 +13,8 @@ export interface ButtonWidgetProps {
14
13
  /** Determines the button's appearance */
15
14
  style?: ButtonStyle;
16
15
  /** Determines button color (hex or semantic) */
17
- color?: ButtonColor | string;
16
+ /** Enhancement to SAIL */
17
+ color?: SAILSemanticColor | string;
18
18
  /** Determines size of the button */
19
19
  size?: SAILSize;
20
20
  /** Determines button width */
@@ -62,13 +62,6 @@ export interface ButtonWidgetProps {
62
62
  *
63
63
  * Note: In SAIL, a!buttonWidget must be used within a!buttonArrayLayout.
64
64
  * For standalone use in React, wrap with ButtonArrayLayout component.
65
- *
66
- * @example
67
- * <ButtonArrayLayout
68
- * buttons={[
69
- * { label: "Submit", style: "SOLID", color: "ACCENT" }
70
- * ]}
71
- * />
72
65
  */
73
66
  export declare const ButtonWidget: React.FC<ButtonWidgetProps>;
74
67
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonWidget.d.ts","sourceRoot":"","sources":["../../../src/components/Button/ButtonWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGhD,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AACzD,KAAK,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAA;AACtD,KAAK,WAAW,GAAG,UAAU,GAAG,MAAM,CAAA;AACtC,KAAK,YAAY,GAAG,OAAO,GAAG,KAAK,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