@rippling/rippling-sdk 0.2.0-alpha.35 → 0.2.0-alpha.36
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/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/examples/.keep +4 -0
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +651 -0
- package/examples/manifest/dental-practice-management/manifest.json +1870 -0
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +757 -0
- package/examples/manifest/gym-membership-management/manifest.json +1975 -0
- package/examples/sdui/sdui-crud-todo/rippling-function.ts +367 -0
- package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +282 -0
- package/examples/sdui/sdui-showcase/rippling-function.ts +381 -0
- package/examples/sdui/sdui-showcase/sdui-showcase.ts +351 -0
- package/examples/sdui/sdui-tab-multi-view/rippling-function.ts +1061 -0
- package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +924 -0
- package/examples/sdui/vote/rippling-function.ts +330 -0
- package/examples/sdui/vote/vote.ts +298 -0
- package/package.json +11 -1
- package/resources/company-legal-entity-workers.d.mts +79 -0
- package/resources/company-legal-entity-workers.d.mts.map +1 -0
- package/resources/company-legal-entity-workers.d.ts +79 -0
- package/resources/company-legal-entity-workers.d.ts.map +1 -0
- package/resources/company-legal-entity-workers.js +30 -0
- package/resources/company-legal-entity-workers.js.map +1 -0
- package/resources/company-legal-entity-workers.mjs +26 -0
- package/resources/company-legal-entity-workers.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +20 -0
- package/src/resources/company-legal-entity-workers.ts +115 -0
- package/src/resources/index.ts +7 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extra SDUI primitives not emphasized in crud / tabs / vote demos. Mock state only.
|
|
3
|
+
*
|
|
4
|
+
* Run:
|
|
5
|
+
* npx ts-node --transpile-only -r tsconfig-paths/register examples/sdui/sdui-showcase/sdui-showcase.ts
|
|
6
|
+
*/
|
|
7
|
+
import SDUI from '../../../src/lib/sdui';
|
|
8
|
+
|
|
9
|
+
const CAROUSEL_SLIDES = [
|
|
10
|
+
{ heading: 'One', img: 'https://picsum.photos/seed/ex1/880/360', alt: '' },
|
|
11
|
+
{ heading: 'Two', img: 'https://picsum.photos/seed/ex2/880/360', alt: '' },
|
|
12
|
+
{ heading: 'Three', img: 'https://picsum.photos/seed/ex3/880/360', alt: '' },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const TREE_ROWS = [
|
|
16
|
+
{ label: 'A', value: 'a' },
|
|
17
|
+
{ label: 'B', value: 'b', parent: 'a' },
|
|
18
|
+
{ label: 'C', value: 'c', parent: 'a' },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const DRAG_ROWS = [
|
|
22
|
+
{ id: '1', label: 'First' },
|
|
23
|
+
{ id: '2', label: 'Second' },
|
|
24
|
+
{ id: '3', label: 'Third' },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
function renderSpec(_functionId: string) {
|
|
28
|
+
const s = SDUI.createState({
|
|
29
|
+
eventDate: '2026-06-01',
|
|
30
|
+
phoneVal: '+15555550123',
|
|
31
|
+
budget: 500,
|
|
32
|
+
consent: false,
|
|
33
|
+
alertsOn: true,
|
|
34
|
+
drawerOpen: false,
|
|
35
|
+
toastOpen: false,
|
|
36
|
+
treeValue: '',
|
|
37
|
+
menuPick: 'a',
|
|
38
|
+
breadcrumbActive: 'here',
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const page = SDUI.components.Layout({
|
|
42
|
+
width: '100%',
|
|
43
|
+
maxWidth: '800px',
|
|
44
|
+
margin: { left: 'auto', right: 'auto' },
|
|
45
|
+
padding: { top: 32, bottom: 48, left: 24, right: 24 },
|
|
46
|
+
children: [
|
|
47
|
+
SDUI.components.VStack({
|
|
48
|
+
gap: 'space500',
|
|
49
|
+
align: 'stretch',
|
|
50
|
+
children: [
|
|
51
|
+
SDUI.components.VStack({
|
|
52
|
+
gap: 'space150',
|
|
53
|
+
align: 'flex-start',
|
|
54
|
+
children: [
|
|
55
|
+
SDUI.components.Heading({
|
|
56
|
+
level: '1',
|
|
57
|
+
text: 'Extra components',
|
|
58
|
+
}),
|
|
59
|
+
SDUI.components.Text({
|
|
60
|
+
typestyle: 'bodyMd',
|
|
61
|
+
color: 'secondary',
|
|
62
|
+
text: 'Date, phone, currency, checkbox, switch, file drop, breadcrumbs, dropdown, menu list, pagination, drawer, carousel, video, tree, stepper, draggable list, loaders, snackbar.',
|
|
63
|
+
}),
|
|
64
|
+
],
|
|
65
|
+
}),
|
|
66
|
+
|
|
67
|
+
SDUI.components.Card({
|
|
68
|
+
title: 'Fields',
|
|
69
|
+
padding: '24',
|
|
70
|
+
children: [
|
|
71
|
+
SDUI.components.VStack({
|
|
72
|
+
gap: 'space350',
|
|
73
|
+
align: 'stretch',
|
|
74
|
+
children: [
|
|
75
|
+
SDUI.components.Date({
|
|
76
|
+
name: 'd',
|
|
77
|
+
label: 'Date',
|
|
78
|
+
value: s.eventDate.$bind,
|
|
79
|
+
format: 'yyyy-MM-dd',
|
|
80
|
+
}),
|
|
81
|
+
SDUI.components.Phone({
|
|
82
|
+
name: 'p',
|
|
83
|
+
label: 'Phone',
|
|
84
|
+
value: s.phoneVal.$bind,
|
|
85
|
+
}),
|
|
86
|
+
SDUI.components.Currency({
|
|
87
|
+
name: 'c',
|
|
88
|
+
label: 'Amount',
|
|
89
|
+
value: s.budget.$bind,
|
|
90
|
+
prefix: '$',
|
|
91
|
+
}),
|
|
92
|
+
SDUI.components.HStack({
|
|
93
|
+
gap: 'space400',
|
|
94
|
+
wrap: false,
|
|
95
|
+
align: 'stretch',
|
|
96
|
+
children: [
|
|
97
|
+
SDUI.components.Layout({
|
|
98
|
+
flex: '1 1 0',
|
|
99
|
+
minWidth: '0',
|
|
100
|
+
minHeight: 48,
|
|
101
|
+
direction: 'column',
|
|
102
|
+
justify: 'center',
|
|
103
|
+
children: [
|
|
104
|
+
SDUI.components.Checkbox({
|
|
105
|
+
name: 'ok',
|
|
106
|
+
label: 'Opt in',
|
|
107
|
+
value: s.consent.$bind,
|
|
108
|
+
}),
|
|
109
|
+
],
|
|
110
|
+
}),
|
|
111
|
+
SDUI.components.Layout({
|
|
112
|
+
flex: '1 1 0',
|
|
113
|
+
minWidth: '0',
|
|
114
|
+
minHeight: 48,
|
|
115
|
+
direction: 'column',
|
|
116
|
+
justify: 'center',
|
|
117
|
+
children: [
|
|
118
|
+
SDUI.components.Switch({
|
|
119
|
+
name: 'sw',
|
|
120
|
+
label: 'Alerts',
|
|
121
|
+
value: s.alertsOn.$bind,
|
|
122
|
+
compact: true,
|
|
123
|
+
}),
|
|
124
|
+
],
|
|
125
|
+
}),
|
|
126
|
+
],
|
|
127
|
+
}),
|
|
128
|
+
SDUI.components.FileDrop({
|
|
129
|
+
name: 'f',
|
|
130
|
+
label: 'Files',
|
|
131
|
+
value: [],
|
|
132
|
+
placeholder: 'Drop files',
|
|
133
|
+
multiple: true,
|
|
134
|
+
}),
|
|
135
|
+
],
|
|
136
|
+
}),
|
|
137
|
+
],
|
|
138
|
+
}),
|
|
139
|
+
|
|
140
|
+
SDUI.components.Card({
|
|
141
|
+
title: 'Navigation',
|
|
142
|
+
padding: '24',
|
|
143
|
+
children: [
|
|
144
|
+
SDUI.components.VStack({
|
|
145
|
+
gap: 'space400',
|
|
146
|
+
align: 'stretch',
|
|
147
|
+
children: [
|
|
148
|
+
SDUI.components.Breadcrumb({
|
|
149
|
+
items: [
|
|
150
|
+
{ title: 'Start', value: 'start', href: '#' },
|
|
151
|
+
{ title: 'Here', value: 'here', href: '#' },
|
|
152
|
+
],
|
|
153
|
+
active: s.breadcrumbActive.$bind,
|
|
154
|
+
}),
|
|
155
|
+
SDUI.components.HStack({
|
|
156
|
+
gap: 'space300',
|
|
157
|
+
wrap: true,
|
|
158
|
+
align: 'center',
|
|
159
|
+
children: [
|
|
160
|
+
SDUI.components.Dropdown({
|
|
161
|
+
triggerLabel: 'Choose',
|
|
162
|
+
list: [
|
|
163
|
+
{ label: 'Alpha', value: 'a' },
|
|
164
|
+
{ label: 'Beta', value: 'b' },
|
|
165
|
+
],
|
|
166
|
+
value: s.menuPick.$bind,
|
|
167
|
+
width: 200,
|
|
168
|
+
}),
|
|
169
|
+
SDUI.components.Button({
|
|
170
|
+
label: 'Drawer',
|
|
171
|
+
appearance: 'OUTLINE',
|
|
172
|
+
size: 'S',
|
|
173
|
+
onPress: SDUI.actions.set(s.drawerOpen, true),
|
|
174
|
+
}),
|
|
175
|
+
SDUI.components.Button({
|
|
176
|
+
label: 'Toast',
|
|
177
|
+
appearance: 'GHOST',
|
|
178
|
+
size: 'S',
|
|
179
|
+
onPress: SDUI.actions.set(s.toastOpen, true),
|
|
180
|
+
}),
|
|
181
|
+
],
|
|
182
|
+
}),
|
|
183
|
+
SDUI.components.MenuList({
|
|
184
|
+
list: [
|
|
185
|
+
{ label: 'One', value: '1' },
|
|
186
|
+
{ label: 'Two', value: '2' },
|
|
187
|
+
],
|
|
188
|
+
width: '100%',
|
|
189
|
+
maxHeight: 160,
|
|
190
|
+
}),
|
|
191
|
+
SDUI.components.Layout({
|
|
192
|
+
width: '100%',
|
|
193
|
+
padding: { top: 8 },
|
|
194
|
+
children: [
|
|
195
|
+
SDUI.components.Paginate({
|
|
196
|
+
pageCount: 5,
|
|
197
|
+
initialPage: 2,
|
|
198
|
+
alignment: 'CENTER',
|
|
199
|
+
}),
|
|
200
|
+
],
|
|
201
|
+
}),
|
|
202
|
+
],
|
|
203
|
+
}),
|
|
204
|
+
],
|
|
205
|
+
}),
|
|
206
|
+
|
|
207
|
+
SDUI.components.Card({
|
|
208
|
+
title: 'Media',
|
|
209
|
+
padding: '24',
|
|
210
|
+
children: [
|
|
211
|
+
SDUI.components.VStack({
|
|
212
|
+
gap: 'space400',
|
|
213
|
+
align: 'stretch',
|
|
214
|
+
children: [
|
|
215
|
+
SDUI.components.Carousel({ slides: CAROUSEL_SLIDES }),
|
|
216
|
+
SDUI.components.Video({
|
|
217
|
+
src: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4',
|
|
218
|
+
width: '100%',
|
|
219
|
+
loading: 'lazy',
|
|
220
|
+
name: 'v',
|
|
221
|
+
}),
|
|
222
|
+
],
|
|
223
|
+
}),
|
|
224
|
+
],
|
|
225
|
+
}),
|
|
226
|
+
|
|
227
|
+
SDUI.components.Card({
|
|
228
|
+
title: 'Lists',
|
|
229
|
+
padding: '24',
|
|
230
|
+
children: [
|
|
231
|
+
SDUI.components.VStack({
|
|
232
|
+
gap: 'space450',
|
|
233
|
+
align: 'stretch',
|
|
234
|
+
children: [
|
|
235
|
+
SDUI.components.Tree({
|
|
236
|
+
name: 't',
|
|
237
|
+
label: 'Tree',
|
|
238
|
+
list: TREE_ROWS,
|
|
239
|
+
value: s.treeValue.$bind,
|
|
240
|
+
maxHeight: 180,
|
|
241
|
+
}),
|
|
242
|
+
SDUI.components.Stepper({
|
|
243
|
+
steps: [
|
|
244
|
+
{ title: 'Done', status: 'COMPLETE' },
|
|
245
|
+
{ title: 'Active', status: 'TODO' },
|
|
246
|
+
{ title: 'Next', status: 'TODO' },
|
|
247
|
+
],
|
|
248
|
+
activeStepIndex: 1,
|
|
249
|
+
}),
|
|
250
|
+
SDUI.components.DraggableList({
|
|
251
|
+
list: DRAG_ROWS,
|
|
252
|
+
labelKey: 'label',
|
|
253
|
+
groupName: 'g',
|
|
254
|
+
width: '100%',
|
|
255
|
+
showDragIcon: true,
|
|
256
|
+
}),
|
|
257
|
+
],
|
|
258
|
+
}),
|
|
259
|
+
],
|
|
260
|
+
}),
|
|
261
|
+
|
|
262
|
+
SDUI.components.Card({
|
|
263
|
+
title: 'Loading',
|
|
264
|
+
padding: '24',
|
|
265
|
+
children: [
|
|
266
|
+
SDUI.components.VStack({
|
|
267
|
+
gap: 'space400',
|
|
268
|
+
align: 'stretch',
|
|
269
|
+
children: [
|
|
270
|
+
SDUI.components.HStack({
|
|
271
|
+
gap: 'space300',
|
|
272
|
+
align: 'center',
|
|
273
|
+
children: [
|
|
274
|
+
SDUI.components.Spinner({
|
|
275
|
+
size: 'M',
|
|
276
|
+
appearance: 'PRIMARY',
|
|
277
|
+
alignment: 'LEFT',
|
|
278
|
+
}),
|
|
279
|
+
SDUI.components.Text({
|
|
280
|
+
typestyle: 'bodySm',
|
|
281
|
+
color: 'secondary',
|
|
282
|
+
text: 'Working…',
|
|
283
|
+
}),
|
|
284
|
+
],
|
|
285
|
+
}),
|
|
286
|
+
SDUI.components.Skeleton({
|
|
287
|
+
variant: 'TEXT',
|
|
288
|
+
lines: 2,
|
|
289
|
+
width: '100%',
|
|
290
|
+
}),
|
|
291
|
+
SDUI.components.HStack({
|
|
292
|
+
gap: 'space300',
|
|
293
|
+
align: 'center',
|
|
294
|
+
children: [
|
|
295
|
+
SDUI.components.Skeleton({ variant: 'CIRCLE', size: 40 }),
|
|
296
|
+
SDUI.components.Skeleton({ variant: 'BOX', width: 160, height: 48, borderRadius: 6 }),
|
|
297
|
+
],
|
|
298
|
+
}),
|
|
299
|
+
SDUI.components.ContentLoader({ width: '100%', height: 40, speed: 1 }),
|
|
300
|
+
SDUI.components.SnackBar({
|
|
301
|
+
text: 'Done.',
|
|
302
|
+
appearance: 'SUCCESS',
|
|
303
|
+
canDismiss: true,
|
|
304
|
+
isVisible: s.toastOpen.$bind,
|
|
305
|
+
onDismiss: SDUI.actions.set(s.toastOpen, false),
|
|
306
|
+
}),
|
|
307
|
+
],
|
|
308
|
+
}),
|
|
309
|
+
],
|
|
310
|
+
}),
|
|
311
|
+
],
|
|
312
|
+
}),
|
|
313
|
+
],
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
const root = SDUI.components.VStack({
|
|
317
|
+
gap: 'space0',
|
|
318
|
+
align: 'stretch',
|
|
319
|
+
children: [
|
|
320
|
+
page,
|
|
321
|
+
SDUI.components.Drawer({
|
|
322
|
+
isVisible: s.drawerOpen.$bind,
|
|
323
|
+
title: 'Drawer',
|
|
324
|
+
width: 360,
|
|
325
|
+
theme: 'GRAY',
|
|
326
|
+
onClose: SDUI.actions.set(s.drawerOpen, false),
|
|
327
|
+
children: [
|
|
328
|
+
SDUI.components.VStack({
|
|
329
|
+
gap: 'space300',
|
|
330
|
+
children: [
|
|
331
|
+
SDUI.components.Text({
|
|
332
|
+
text: 'Side content.',
|
|
333
|
+
typestyle: 'bodyMd',
|
|
334
|
+
}),
|
|
335
|
+
SDUI.components.Button({
|
|
336
|
+
label: 'Close',
|
|
337
|
+
appearance: 'PRIMARY',
|
|
338
|
+
size: 'S',
|
|
339
|
+
onPress: SDUI.actions.set(s.drawerOpen, false),
|
|
340
|
+
}),
|
|
341
|
+
],
|
|
342
|
+
}),
|
|
343
|
+
],
|
|
344
|
+
}),
|
|
345
|
+
],
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
return SDUI.render(s, root);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
console.log(JSON.stringify(renderSpec('demo-fn'), null, 2));
|