@pglevy/sailwind 0.2.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.
- package/README.md +81 -170
- package/dist/components/ApplicationHeader/ApplicationHeader.d.ts +42 -0
- package/dist/components/ApplicationHeader/ApplicationHeader.d.ts.map +1 -0
- package/dist/components/ApplicationHeader/ApplicationHeader.js +251 -0
- package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts +19 -0
- package/dist/components/ApplicationHeader/ApplicationHeader.stories.d.ts.map +1 -0
- package/dist/components/ApplicationHeader/index.d.ts +3 -0
- package/dist/components/ApplicationHeader/index.d.ts.map +1 -0
- package/dist/components/Button/Button.stories.d.ts +21 -0
- package/dist/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/components/Button/ButtonArrayLayout.d.ts +0 -8
- package/dist/components/Button/ButtonArrayLayout.d.ts.map +1 -1
- package/dist/components/Button/ButtonWidget.d.ts +0 -7
- package/dist/components/Button/ButtonWidget.d.ts.map +1 -1
- package/dist/components/Card/Card.stories.d.ts +21 -0
- package/dist/components/Card/Card.stories.d.ts.map +1 -0
- package/dist/components/Card/CardLayout.d.ts +0 -9
- package/dist/components/Card/CardLayout.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +20 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +18 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts +22 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownField.d.ts +0 -27
- package/dist/components/Dropdown/DropdownField.d.ts.map +1 -1
- package/dist/components/Dropdown/MultipleDropdownField.d.ts +0 -25
- package/dist/components/Dropdown/MultipleDropdownField.d.ts.map +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +23 -0
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -0
- package/dist/components/Image/Image.stories.d.ts +21 -0
- package/dist/components/Image/Image.stories.d.ts.map +1 -0
- package/dist/components/Image/UserImage.d.ts +0 -14
- package/dist/components/Image/UserImage.d.ts.map +1 -1
- package/dist/components/MessageBanner/MessageBanner.stories.d.ts +35 -0
- package/dist/components/MessageBanner/MessageBanner.stories.d.ts.map +1 -0
- package/dist/components/Milestone/Milestone.stories.d.ts +20 -0
- package/dist/components/Milestone/Milestone.stories.d.ts.map +1 -0
- package/dist/components/Milestone/MilestoneField.d.ts +0 -8
- package/dist/components/Milestone/MilestoneField.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +34 -0
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts.map +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +20 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/dist/components/RichText/RichText.stories.d.ts +19 -0
- package/dist/components/RichText/RichText.stories.d.ts.map +1 -0
- package/dist/components/SideNavAdmin/SideNavAdmin.d.ts +23 -0
- package/dist/components/SideNavAdmin/SideNavAdmin.d.ts.map +1 -0
- package/dist/components/SideNavAdmin/SideNavAdmin.js +143 -0
- package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts +13 -0
- package/dist/components/SideNavAdmin/SideNavAdmin.stories.d.ts.map +1 -0
- package/dist/components/SideNavAdmin/index.d.ts +3 -0
- package/dist/components/SideNavAdmin/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.stories.d.ts +26 -0
- package/dist/components/Slider/Slider.stories.d.ts.map +1 -0
- package/dist/components/Stamp/Stamp.stories.d.ts +19 -0
- package/dist/components/Stamp/Stamp.stories.d.ts.map +1 -0
- package/dist/components/Switch/Switch.stories.d.ts +26 -0
- package/dist/components/Switch/Switch.stories.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +21 -0
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/components/Tag/Tag.stories.d.ts +23 -0
- package/dist/components/Tag/Tag.stories.d.ts.map +1 -0
- package/dist/components/Tag/TagField.d.ts +0 -8
- package/dist/components/Tag/TagField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.d.ts +0 -10
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.stories.d.ts +46 -0
- package/dist/components/TextField/TextField.stories.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +24 -0
- package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +26 -24
- package/dist/stories/Welcome.stories.d.ts +11 -0
- package/dist/stories/Welcome.stories.d.ts.map +1 -0
- package/dist/stories/pages/AdminConsoleDemo.stories.d.ts +13 -0
- package/dist/stories/pages/AdminConsoleDemo.stories.d.ts.map +1 -0
- package/dist/stories/pages/ApplicationHeaderDemo.stories.d.ts +13 -0
- package/dist/stories/pages/ApplicationHeaderDemo.stories.d.ts.map +1 -0
- package/dist/stories/pages/ButtonTextFieldTest.stories.d.ts +13 -0
- package/dist/stories/pages/ButtonTextFieldTest.stories.d.ts.map +1 -0
- package/dist/stories/pages/ESGConferenceRegistration.stories.d.ts +13 -0
- package/dist/stories/pages/ESGConferenceRegistration.stories.d.ts.map +1 -0
- package/dist/stories/pages/InsuranceQuoteWizard.stories.d.ts +13 -0
- package/dist/stories/pages/InsuranceQuoteWizard.stories.d.ts.map +1 -0
- package/dist/stories/patterns/ApplicationStatus.stories.d.ts +12 -0
- package/dist/stories/patterns/ApplicationStatus.stories.d.ts.map +1 -0
- package/dist/stories/patterns/DocumentReview.stories.d.ts +12 -0
- package/dist/stories/patterns/DocumentReview.stories.d.ts.map +1 -0
- package/dist/stories/patterns/FormEntry.stories.d.ts +12 -0
- package/dist/stories/patterns/FormEntry.stories.d.ts.map +1 -0
- package/dist/stories/patterns/Publications.stories.d.ts +12 -0
- package/dist/stories/patterns/Publications.stories.d.ts.map +1 -0
- package/dist/stories/patterns/TaskDashboard.stories.d.ts +12 -0
- package/dist/stories/patterns/TaskDashboard.stories.d.ts.map +1 -0
- package/dist/stories/patterns/UserProfile.stories.d.ts +12 -0
- package/dist/stories/patterns/UserProfile.stories.d.ts.map +1 -0
- package/package.json +13 -4
- package/public/images/icon-app.svg +1 -0
- package/public/images/icon-appian-header.png +0 -0
- package/public/images/icon-cog.svg +1 -0
- package/public/images/icon-expression-rule.svg +1 -0
- package/public/images/icon-interface.svg +1 -0
- package/public/images/icon-record-type.svg +1 -0
- package/dist/components/TableOfContents.d.ts +0 -2
- package/dist/components/TableOfContents.d.ts.map +0 -1
- package/dist/components/TableOfContents.js +0 -147
- package/dist/esg_world_logo_no_year.png +0 -0
- package/dist/uifaces-human-avatar.jpg +0 -0
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,219 +1,130 @@
|
|
|
1
1
|
# Sailwind
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React component library for prototyping Appian applications with SAIL-compatible syntax.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Sailwind
|
|
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
|
-
|
|
9
|
+
Built on Radix UI primitives, Tailwind CSS, and TypeScript.
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
### Installation
|
|
25
18
|
|
|
26
|
-
### Option 2: Clone Directly
|
|
27
19
|
```bash
|
|
28
|
-
|
|
29
|
-
cd sailwind
|
|
30
|
-
npm install
|
|
31
|
-
npm run dev
|
|
20
|
+
npm install @pglevy/sailwind
|
|
32
21
|
```
|
|
33
22
|
|
|
34
|
-
###
|
|
35
|
-
|
|
36
|
-
|
|
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:
|
|
23
|
+
### Setup
|
|
24
|
+
|
|
25
|
+
Import the CSS in your main entry file (e.g., `main.tsx` or `App.tsx`):
|
|
39
26
|
|
|
40
27
|
```tsx
|
|
41
|
-
|
|
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
|
-
}
|
|
28
|
+
import '@pglevy/sailwind/index.css'
|
|
62
29
|
```
|
|
63
30
|
|
|
64
|
-
|
|
65
|
-
5. **Translate to SAIL** when ready for production using the exact same parameter names
|
|
31
|
+
### Using Images
|
|
66
32
|
|
|
67
|
-
|
|
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
|
|
33
|
+
If your components need the included icons, reference them like this:
|
|
71
34
|
|
|
72
|
-
## Component Comparison
|
|
73
|
-
|
|
74
|
-
**React Prototype:**
|
|
75
35
|
```tsx
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
tags={[
|
|
79
|
-
{ text: "URGENT", backgroundColor: "#FED7DE", textColor: "#9F0019" }
|
|
80
|
-
]}
|
|
81
|
-
/>
|
|
82
|
-
```
|
|
36
|
+
import iconApp from '@pglevy/sailwind/images/icon-app.svg'
|
|
37
|
+
import iconInterface from '@pglevy/sailwind/images/icon-interface.svg'
|
|
83
38
|
|
|
84
|
-
|
|
85
|
-
```sail
|
|
86
|
-
a!tagField(
|
|
87
|
-
size: "STANDARD",
|
|
88
|
-
tags: {
|
|
89
|
-
a!tagItem(text: "URGENT", backgroundColor: "#FED7DE", textColor: "#9F0019")
|
|
90
|
-
}
|
|
91
|
-
)
|
|
39
|
+
<img src={iconApp} alt="App icon" />
|
|
92
40
|
```
|
|
93
41
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
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
|
|
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`
|
|
107
48
|
|
|
108
|
-
##
|
|
49
|
+
## For Contributors
|
|
109
50
|
|
|
110
|
-
|
|
51
|
+
### Setup
|
|
111
52
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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`
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/pglevy/sailwind.git
|
|
55
|
+
cd sailwind
|
|
56
|
+
npm install
|
|
57
|
+
```
|
|
142
58
|
|
|
143
|
-
|
|
144
|
-
```tsx
|
|
145
|
-
// Light backgrounds
|
|
146
|
-
<div className="bg-blue-100 text-blue-700">Tag</div>
|
|
59
|
+
### Development
|
|
147
60
|
|
|
148
|
-
|
|
149
|
-
<button className="bg-blue-500 hover:bg-blue-700">Submit</button>
|
|
61
|
+
Storybook is the primary development environment:
|
|
150
62
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<p className="text-gray-700">Body</p>
|
|
63
|
+
```bash
|
|
64
|
+
npm run storybook # Start Storybook at http://localhost:6006
|
|
154
65
|
```
|
|
155
66
|
|
|
156
|
-
|
|
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` |
|
|
67
|
+
Every component has a `.stories.tsx` file for documentation and interactive testing. When adding or modifying components, update the corresponding stories.
|
|
165
68
|
|
|
166
|
-
|
|
69
|
+
### Build
|
|
167
70
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
- `npm run preview` - Preview production build
|
|
71
|
+
```bash
|
|
72
|
+
npm run build:lib # Build the npm package (dist/)
|
|
73
|
+
npm run build-storybook # Build the Storybook site (storybook-static/)
|
|
74
|
+
npm run lint # Run ESLint
|
|
75
|
+
```
|
|
174
76
|
|
|
175
77
|
### Project Structure
|
|
176
78
|
|
|
177
79
|
```
|
|
178
|
-
|
|
179
|
-
├──
|
|
180
|
-
│
|
|
181
|
-
|
|
182
|
-
│ ├──
|
|
183
|
-
│ └──
|
|
184
|
-
├──
|
|
185
|
-
|
|
186
|
-
└── package.json
|
|
80
|
+
src/
|
|
81
|
+
├── components/ # SAIL components (Button, Card, Dropdown, etc.)
|
|
82
|
+
│ └── */ # Each component has its own directory with stories
|
|
83
|
+
├── stories/
|
|
84
|
+
│ ├── pages/ # Full page examples (realistic Appian interfaces)
|
|
85
|
+
│ └── patterns/ # Common UI patterns (forms, grids, data displays)
|
|
86
|
+
├── types/ # Shared TypeScript types (SAILSize, SAILAlign, etc.)
|
|
87
|
+
└── index.css # Tailwind v4 theme configuration
|
|
187
88
|
```
|
|
188
89
|
|
|
189
|
-
|
|
90
|
+
### Publishing to npm
|
|
190
91
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
92
|
+
```bash
|
|
93
|
+
npm run build:lib
|
|
94
|
+
npm publish --access public
|
|
95
|
+
```
|
|
194
96
|
|
|
195
|
-
|
|
97
|
+
See [PUBLISHING.md](PUBLISHING.md) for detailed release instructions.
|
|
196
98
|
|
|
197
|
-
|
|
198
|
-
- **Tailwind CSS** - https://tailwindcss.com/
|
|
199
|
-
- **Aurora Design System** - Color palette and branding
|
|
99
|
+
## Component Comparison
|
|
200
100
|
|
|
201
|
-
|
|
101
|
+
**React (Sailwind):**
|
|
102
|
+
```tsx
|
|
103
|
+
<TagField
|
|
104
|
+
size="STANDARD"
|
|
105
|
+
tags={[
|
|
106
|
+
{ text: "URGENT", backgroundColor: "#FED7DE", textColor: "#9F0019" }
|
|
107
|
+
]}
|
|
108
|
+
/>
|
|
109
|
+
```
|
|
202
110
|
|
|
203
|
-
|
|
111
|
+
**SAIL (Production):**
|
|
112
|
+
```sail
|
|
113
|
+
a!tagField(
|
|
114
|
+
size: "STANDARD",
|
|
115
|
+
tags: {
|
|
116
|
+
a!tagItem(text: "URGENT", backgroundColor: "#FED7DE", textColor: "#9F0019")
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
```
|
|
204
120
|
|
|
205
|
-
|
|
121
|
+
## Documentation
|
|
206
122
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
5. Use standard Tailwind classes internally
|
|
123
|
+
- **[Component Reference](https://pglevy.github.io/sailwind/)** — Live Storybook with all components
|
|
124
|
+
- **[TAILWIND-SAIL-MAPPING.md](TAILWIND-SAIL-MAPPING.md)** — Tailwind to SAIL style mappings
|
|
125
|
+
- **[CLAUDE.md](CLAUDE.md)** — Instructions for LLM-assisted development
|
|
126
|
+
- **[SAIL Docs](https://docs.appian.com/suite/help/25.3/)** — Official Appian SAIL reference
|
|
212
127
|
|
|
213
128
|
## License
|
|
214
129
|
|
|
215
|
-
|
|
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
|
|
130
|
+
MIT
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/** 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
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ApplicationHeader Component
|
|
37
|
+
* Displays the main application header with navigation, controls, and user info
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare const ApplicationHeader: React.FC<ApplicationHeaderProps>;
|
|
41
|
+
export {};
|
|
42
|
+
//# 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;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"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ButtonWidget as s } from "../Button/ButtonWidget.js";
|
|
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
|
+
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
|
+
}, z = ({
|
|
13
|
+
name: p = "Application",
|
|
14
|
+
userInitials: A = "U",
|
|
15
|
+
showDesignerControls: i = !1,
|
|
16
|
+
objectType: n = "app",
|
|
17
|
+
iconSrc: S,
|
|
18
|
+
previewEnabled: L = !1,
|
|
19
|
+
showStoriesView: l = !1,
|
|
20
|
+
onPreviewToggle: g,
|
|
21
|
+
onStoryToggle: m,
|
|
22
|
+
onBackClick: d,
|
|
23
|
+
appianLogoSrc: v = "images/icon-appian-header.png",
|
|
24
|
+
additionalButtons: N = []
|
|
25
|
+
}) => {
|
|
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(
|
|
30
|
+
s,
|
|
31
|
+
{
|
|
32
|
+
icon: "ChevronLeft",
|
|
33
|
+
style: "GHOST",
|
|
34
|
+
size: "SMALL",
|
|
35
|
+
onClick: d,
|
|
36
|
+
className: "aspect-square"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
"img",
|
|
42
|
+
{
|
|
43
|
+
src: u,
|
|
44
|
+
alt: n,
|
|
45
|
+
className: "h-8 w-8 mr-2"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e("span", { className: "text-gray-800 font-bold", children: p })
|
|
49
|
+
] }),
|
|
50
|
+
i && /* @__PURE__ */ a(c, { children: [
|
|
51
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-0 ml-4 bg-gray-50 p-1 rounded-sm", children: [
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
t,
|
|
54
|
+
{
|
|
55
|
+
icon: "square-dashed-mouse-pointer",
|
|
56
|
+
style: "GHOST",
|
|
57
|
+
size: "SMALL",
|
|
58
|
+
value: !l,
|
|
59
|
+
saveInto: l ? m : void 0,
|
|
60
|
+
marginBelow: "NONE"
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
t,
|
|
65
|
+
{
|
|
66
|
+
icon: "code",
|
|
67
|
+
style: "GHOST",
|
|
68
|
+
size: "SMALL",
|
|
69
|
+
value: !1,
|
|
70
|
+
marginBelow: "NONE"
|
|
71
|
+
}
|
|
72
|
+
)
|
|
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(
|
|
75
|
+
T,
|
|
76
|
+
{
|
|
77
|
+
label: "Preview",
|
|
78
|
+
labelPosition: "ADJACENT",
|
|
79
|
+
value: L,
|
|
80
|
+
saveInto: g,
|
|
81
|
+
marginBelow: "NONE"
|
|
82
|
+
}
|
|
83
|
+
) })
|
|
84
|
+
] })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-0 shrink-0", children: i && /* @__PURE__ */ a(c, { children: [
|
|
87
|
+
/* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-0", children: /* @__PURE__ */ e(
|
|
88
|
+
o,
|
|
89
|
+
{
|
|
90
|
+
buttons: [
|
|
91
|
+
{
|
|
92
|
+
icon: "palette",
|
|
93
|
+
style: "GHOST",
|
|
94
|
+
size: "SMALL",
|
|
95
|
+
color: "STANDARD",
|
|
96
|
+
className: "aspect-square"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
icon: "monitor",
|
|
100
|
+
style: "GHOST",
|
|
101
|
+
size: "SMALL",
|
|
102
|
+
color: "STANDARD",
|
|
103
|
+
className: "aspect-square"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
icon: "globe",
|
|
107
|
+
style: "GHOST",
|
|
108
|
+
size: "SMALL",
|
|
109
|
+
color: "STANDARD",
|
|
110
|
+
className: "aspect-square"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
marginBelow: "NONE"
|
|
114
|
+
}
|
|
115
|
+
) }),
|
|
116
|
+
/* @__PURE__ */ e("div", { className: "[&_button]:border-0", children: /* @__PURE__ */ e(
|
|
117
|
+
t,
|
|
118
|
+
{
|
|
119
|
+
icon: "book-open-text",
|
|
120
|
+
style: l ? "SOLID" : "GHOST",
|
|
121
|
+
size: "SMALL",
|
|
122
|
+
value: l,
|
|
123
|
+
saveInto: m,
|
|
124
|
+
marginBelow: "NONE",
|
|
125
|
+
color: l ? "ACCENT" : "STANDARD"
|
|
126
|
+
}
|
|
127
|
+
) })
|
|
128
|
+
] }) }),
|
|
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: [
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
s,
|
|
147
|
+
{
|
|
148
|
+
icon: "Lightbulb",
|
|
149
|
+
style: "GHOST",
|
|
150
|
+
size: "SMALL",
|
|
151
|
+
color: "STANDARD",
|
|
152
|
+
className: "aspect-square"
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ e(
|
|
156
|
+
s,
|
|
157
|
+
{
|
|
158
|
+
icon: "Undo",
|
|
159
|
+
style: "GHOST",
|
|
160
|
+
size: "SMALL",
|
|
161
|
+
color: "STANDARD",
|
|
162
|
+
className: "aspect-square"
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
/* @__PURE__ */ e(
|
|
166
|
+
s,
|
|
167
|
+
{
|
|
168
|
+
icon: "Redo",
|
|
169
|
+
style: "GHOST",
|
|
170
|
+
size: "SMALL",
|
|
171
|
+
color: "STANDARD",
|
|
172
|
+
className: "aspect-square mr-3"
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ e(
|
|
176
|
+
s,
|
|
177
|
+
{
|
|
178
|
+
icon: "PieChart",
|
|
179
|
+
style: "GHOST",
|
|
180
|
+
size: "SMALL",
|
|
181
|
+
color: "STANDARD",
|
|
182
|
+
className: "aspect-square mr-3"
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ e("div", { className: "[&>div]:gap-1 mr-3", children: /* @__PURE__ */ e(
|
|
186
|
+
o,
|
|
187
|
+
{
|
|
188
|
+
buttons: [
|
|
189
|
+
{
|
|
190
|
+
label: "TEST",
|
|
191
|
+
style: "OUTLINE",
|
|
192
|
+
size: "SMALL",
|
|
193
|
+
className: "border-1"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: "SAVE",
|
|
197
|
+
style: "SOLID",
|
|
198
|
+
color: "ACCENT",
|
|
199
|
+
size: "SMALL",
|
|
200
|
+
className: "border-1"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
marginBelow: "NONE"
|
|
204
|
+
}
|
|
205
|
+
) })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ e(
|
|
208
|
+
s,
|
|
209
|
+
{
|
|
210
|
+
icon: "Search",
|
|
211
|
+
style: "GHOST",
|
|
212
|
+
size: "SMALL",
|
|
213
|
+
color: "STANDARD",
|
|
214
|
+
className: "aspect-square"
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
/* @__PURE__ */ e(
|
|
218
|
+
s,
|
|
219
|
+
{
|
|
220
|
+
icon: "Settings",
|
|
221
|
+
style: "GHOST",
|
|
222
|
+
size: "SMALL",
|
|
223
|
+
color: "STANDARD",
|
|
224
|
+
className: "aspect-square"
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
/* @__PURE__ */ e(
|
|
228
|
+
s,
|
|
229
|
+
{
|
|
230
|
+
icon: "Grid3X3",
|
|
231
|
+
style: "GHOST",
|
|
232
|
+
size: "SMALL",
|
|
233
|
+
color: "STANDARD",
|
|
234
|
+
className: "aspect-square mr-3"
|
|
235
|
+
}
|
|
236
|
+
),
|
|
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 }) }),
|
|
238
|
+
/* @__PURE__ */ e(
|
|
239
|
+
"img",
|
|
240
|
+
{
|
|
241
|
+
src: v,
|
|
242
|
+
alt: "Appian",
|
|
243
|
+
className: "h-6 w-auto"
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
] })
|
|
247
|
+
] }) });
|
|
248
|
+
};
|
|
249
|
+
export {
|
|
250
|
+
z as ApplicationHeader
|
|
251
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
export declare const AdminConsole: Story;
|
|
19
|
+
//# 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;AAED,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAA"}
|
|
@@ -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
|