lupine.api 1.1.57 → 1.1.59
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 +3 -3
- package/admin/admin-about.tsx +12 -16
- package/admin/admin-config.tsx +47 -44
- package/admin/admin-css.tsx +3 -3
- package/admin/admin-db.tsx +75 -75
- package/admin/admin-frame-helper.tsx +364 -364
- package/admin/admin-frame.tsx +164 -164
- package/admin/admin-index.tsx +65 -65
- package/admin/admin-login.tsx +111 -111
- package/admin/admin-menu-edit.tsx +637 -637
- package/admin/admin-menu-list.tsx +87 -87
- package/admin/admin-page-edit.tsx +564 -564
- package/admin/admin-page-list.tsx +83 -83
- package/admin/admin-performance.tsx +28 -28
- package/admin/admin-release.tsx +427 -404
- package/admin/admin-resources.tsx +382 -382
- package/admin/admin-shell.tsx +89 -89
- package/admin/admin-table-data.tsx +146 -146
- package/admin/admin-table-list.tsx +230 -230
- package/admin/admin-test-animations.tsx +395 -395
- package/admin/admin-test-component.tsx +823 -808
- package/admin/admin-test-edit.tsx +319 -319
- package/admin/admin-test-themes.tsx +56 -56
- package/admin/admin-tokens.tsx +338 -338
- package/admin/design/admin-design.tsx +174 -174
- package/admin/design/block-grid.tsx +36 -36
- package/admin/design/block-grid1.tsx +21 -21
- package/admin/design/block-paragraph.tsx +19 -19
- package/admin/design/block-title.tsx +19 -19
- package/admin/design/design-block-box.tsx +140 -140
- package/admin/design/drag-data.tsx +24 -24
- package/admin/index.ts +9 -9
- package/admin/package.json +15 -15
- package/admin/tsconfig.json +127 -127
- package/dev/copy-folder.js +32 -32
- package/dev/cp-index-html.js +69 -69
- package/dev/file-utils.js +12 -12
- package/dev/index.js +18 -19
- package/dev/package.json +12 -12
- package/dev/plugin-ifelse.js +168 -168
- package/dev/plugin-ifelse.test.js +37 -37
- package/dev/run-cmd.js +14 -14
- package/dev/send-request.js +12 -12
- package/package.json +55 -55
- package/src/admin-api/admin-api-helper.ts +210 -205
- package/src/admin-api/admin-api.ts +65 -65
- package/src/admin-api/admin-auth.ts +152 -146
- package/src/admin-api/admin-config.ts +94 -84
- package/src/admin-api/admin-csv.ts +94 -94
- package/src/admin-api/admin-db.ts +269 -269
- package/src/admin-api/admin-menu.ts +135 -135
- package/src/admin-api/admin-page.ts +135 -135
- package/src/admin-api/admin-performance.ts +128 -128
- package/src/admin-api/admin-release.ts +703 -700
- package/src/admin-api/admin-resources.ts +318 -318
- package/src/admin-api/admin-token-helper.ts +82 -79
- package/src/admin-api/admin-tokens.ts +90 -90
- package/src/admin-api/index.ts +2 -2
- package/src/admin-api/web-config-api.ts +19 -19
- package/src/api/api-cache.ts +103 -103
- package/src/api/api-helper.ts +44 -44
- package/src/api/api-module.ts +67 -60
- package/src/api/api-router.ts +177 -177
- package/src/api/api-shared-storage.ts +64 -64
- package/src/api/async-storage.ts +5 -5
- package/src/api/debug-service.ts +56 -56
- package/src/api/encode-html.ts +27 -27
- package/src/api/handle-status.ts +75 -75
- package/src/api/index.ts +15 -16
- package/src/api/mini-web-socket.ts +270 -270
- package/src/api/server-content-type.ts +82 -82
- package/src/api/server-render.ts +235 -215
- package/src/api/shell-service.ts +74 -74
- package/src/api/simple-storage.ts +80 -80
- package/src/api/static-server.ts +128 -125
- package/src/api/to-client-delivery.ts +26 -26
- package/src/app/app-cache.ts +55 -55
- package/src/app/app-helper.ts +62 -62
- package/src/app/app-message.ts +109 -109
- package/src/app/app-shared-storage.ts +363 -363
- package/src/app/app-start.ts +136 -136
- package/src/app/cleanup-exit.ts +16 -16
- package/src/app/host-to-path.ts +38 -38
- package/src/app/index.ts +11 -11
- package/src/app/process-dev-requests.ts +130 -130
- package/src/app/web-listener.ts +294 -294
- package/src/app/web-processor.ts +47 -42
- package/src/app/web-server.ts +100 -100
- package/src/common-js/web-env.js +104 -104
- package/src/index.ts +7 -7
- package/src/lang/api-lang-en.ts +26 -26
- package/src/lang/api-lang-zh-cn.ts +27 -27
- package/src/lang/index.ts +2 -2
- package/src/lang/lang-helper.ts +76 -76
- package/src/lang/lang-props.ts +6 -6
- package/src/lib/db/db-helper.ts +23 -23
- package/src/lib/db/db-mysql.ts +249 -250
- package/src/lib/db/db-sqlite.ts +101 -101
- package/src/lib/db/db.spec.ts +28 -28
- package/src/lib/db/db.ts +325 -325
- package/src/lib/db/index.ts +5 -5
- package/src/lib/index.ts +3 -3
- package/src/lib/logger.spec.ts +214 -214
- package/src/lib/logger.ts +281 -281
- package/src/lib/runtime-require.ts +37 -37
- package/src/lib/utils/cookie-util.ts +34 -34
- package/src/lib/utils/crypto.ts +58 -58
- package/src/lib/utils/date-utils.ts +317 -317
- package/src/lib/utils/deep-merge.ts +37 -37
- package/src/lib/utils/delay.ts +12 -12
- package/src/lib/utils/file-setting.ts +55 -55
- package/src/lib/utils/format-bytes.ts +11 -11
- package/src/lib/utils/fs-utils.ts +158 -158
- package/src/lib/utils/get-env.ts +27 -27
- package/src/lib/utils/index.ts +12 -12
- package/src/lib/utils/is-type.ts +48 -48
- package/src/lib/utils/load-env.ts +14 -14
- package/src/lib/utils/pad.ts +6 -6
- package/src/models/api-base.ts +5 -5
- package/src/models/api-module-props.ts +10 -11
- package/src/models/api-router-props.ts +26 -26
- package/src/models/app-cache-props.ts +33 -33
- package/src/models/app-data-props.ts +10 -10
- package/src/models/app-helper-props.ts +6 -6
- package/src/models/app-shared-storage-props.ts +38 -38
- package/src/models/app-start-props.ts +18 -18
- package/src/models/async-storage-props.ts +13 -13
- package/src/models/db-config.ts +30 -30
- package/src/models/host-to-path-props.ts +12 -12
- package/src/models/index.ts +16 -16
- package/src/models/json-object.ts +8 -8
- package/src/models/locals-props.ts +36 -36
- package/src/models/logger-props.ts +84 -84
- package/src/models/simple-storage-props.ts +13 -14
- package/src/models/to-client-delivery-props.ts +6 -6
- package/tsconfig.json +115 -115
- package/dev/plugin-gen-versions.js +0 -20
|
@@ -1,808 +1,823 @@
|
|
|
1
|
-
import {
|
|
2
|
-
RefProps,
|
|
3
|
-
FloatWindow,
|
|
4
|
-
NotificationMessage,
|
|
5
|
-
notificationColorFromValue,
|
|
6
|
-
PopupMenuWithButton,
|
|
7
|
-
PopupMenuWithLabel,
|
|
8
|
-
ToggleSwitch,
|
|
9
|
-
ToggleSwitchSize,
|
|
10
|
-
ModalWindow,
|
|
11
|
-
MessageBox,
|
|
12
|
-
MessageBoxButtonProps,
|
|
13
|
-
NotificationColor,
|
|
14
|
-
SelectWithTitle,
|
|
15
|
-
InputWithTitle,
|
|
16
|
-
Button,
|
|
17
|
-
ButtonSize,
|
|
18
|
-
ButtonHookProps,
|
|
19
|
-
ActionSheetMessage,
|
|
20
|
-
ActionSheetSelect,
|
|
21
|
-
} from 'lupine.components';
|
|
22
|
-
|
|
23
|
-
const TestWindows = () => {
|
|
24
|
-
const doModal = (closeWhenClickOutside: boolean) => {
|
|
25
|
-
ModalWindow.show({
|
|
26
|
-
title: 'Save Menu',
|
|
27
|
-
buttons: ['Ok', 'Cancel'],
|
|
28
|
-
closeWhenClickOutside,
|
|
29
|
-
contentMinWidth: '50%',
|
|
30
|
-
handleClicked: (index: number, close: () => void) => {
|
|
31
|
-
close();
|
|
32
|
-
},
|
|
33
|
-
children: <div>test Modal</div>,
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const list: string[] = ['Success', 'Info', 'Warning', 'Alert', '', 'Permanent'];
|
|
38
|
-
const handleSelected = (value: string) => {
|
|
39
|
-
const level = notificationColorFromValue(value);
|
|
40
|
-
const permanent = value === 'Permanent';
|
|
41
|
-
NotificationMessage.sendMessage('Selected: ' + value, level, permanent);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div>
|
|
46
|
-
<div class='row-box mb-s'>
|
|
47
|
-
<button class='button-base mr-m mb-s' onClick={() => doModal(true)}>
|
|
48
|
-
Modal (close click outside)
|
|
49
|
-
</button>
|
|
50
|
-
<button class='button-base mr-m mb-s' onClick={() => doModal(false)}>
|
|
51
|
-
Test Modal
|
|
52
|
-
</button>
|
|
53
|
-
<button
|
|
54
|
-
class='button-base mr-m mb-s'
|
|
55
|
-
onClick={() =>
|
|
56
|
-
FloatWindow.show({
|
|
57
|
-
title: 'Title',
|
|
58
|
-
buttons: ['OK'],
|
|
59
|
-
handleClicked: (index: number, close) => {
|
|
60
|
-
close();
|
|
61
|
-
},
|
|
62
|
-
children: <div>This is float window (modal).</div>,
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
>
|
|
66
|
-
Float Window
|
|
67
|
-
</button>
|
|
68
|
-
<button
|
|
69
|
-
class='button-base mr-m mb-s'
|
|
70
|
-
onClick={() =>
|
|
71
|
-
FloatWindow.show({
|
|
72
|
-
title: 'Title',
|
|
73
|
-
buttons: ['OK'],
|
|
74
|
-
handleClicked: (index: number, close) => {
|
|
75
|
-
close();
|
|
76
|
-
},
|
|
77
|
-
children: <div>This is float window (no modal).</div>,
|
|
78
|
-
noModal: true,
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
>
|
|
82
|
-
Float Window (no modal)
|
|
83
|
-
</button>
|
|
84
|
-
<button
|
|
85
|
-
class='button-base mr-m mb-s'
|
|
86
|
-
onClick={() =>
|
|
87
|
-
MessageBox.show({
|
|
88
|
-
title: 'Title',
|
|
89
|
-
buttonType: MessageBoxButtonProps.YesNo,
|
|
90
|
-
contentMinWidth: '200px',
|
|
91
|
-
handleClicked: (index: number, close) => {
|
|
92
|
-
close();
|
|
93
|
-
},
|
|
94
|
-
children: <div>YesNo dialog.</div>,
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
>
|
|
98
|
-
MessageBox
|
|
99
|
-
</button>
|
|
100
|
-
|
|
101
|
-
<button
|
|
102
|
-
class='button-base mr-m mb-s'
|
|
103
|
-
onClick={() => {
|
|
104
|
-
const options = [
|
|
105
|
-
{ option: 'Option 1', value: '1' },
|
|
106
|
-
{ option: 'Option 2', value: '2', selected: true },
|
|
107
|
-
{ option: 'Option 3', value: '3' },
|
|
108
|
-
];
|
|
109
|
-
const content = SelectWithTitle('Select an option', options, (option: string) => {
|
|
110
|
-
NotificationMessage.sendMessage('You selected: ' + option, NotificationColor.Success);
|
|
111
|
-
});
|
|
112
|
-
MessageBox.show({
|
|
113
|
-
title: 'Title',
|
|
114
|
-
buttonType: MessageBoxButtonProps.OkCancel,
|
|
115
|
-
contentMinWidth: '300px',
|
|
116
|
-
handleClicked: (index: number, close) => {
|
|
117
|
-
close();
|
|
118
|
-
},
|
|
119
|
-
children: content,
|
|
120
|
-
});
|
|
121
|
-
}}
|
|
122
|
-
>
|
|
123
|
-
Select an option (Select)
|
|
124
|
-
</button>
|
|
125
|
-
|
|
126
|
-
<button
|
|
127
|
-
class='button-base mr-m mb-s'
|
|
128
|
-
onClick={() => {
|
|
129
|
-
const options = [
|
|
130
|
-
{ option: 'Option 1', value: '1' },
|
|
131
|
-
{ option: 'Option 2', value: '2' },
|
|
132
|
-
{ option: 'Option 3', value: '3', selected: true },
|
|
133
|
-
];
|
|
134
|
-
const content = SelectWithTitle(
|
|
135
|
-
'Select an option',
|
|
136
|
-
options,
|
|
137
|
-
(option: string) => {
|
|
138
|
-
NotificationMessage.sendMessage('You selected: ' + option, NotificationColor.Success);
|
|
139
|
-
},
|
|
140
|
-
3
|
|
141
|
-
);
|
|
142
|
-
MessageBox.show({
|
|
143
|
-
title: 'Title',
|
|
144
|
-
buttonType: MessageBoxButtonProps.OkCancel,
|
|
145
|
-
contentMinWidth: '300px',
|
|
146
|
-
handleClicked: (index: number, close) => {
|
|
147
|
-
close();
|
|
148
|
-
},
|
|
149
|
-
children: content,
|
|
150
|
-
});
|
|
151
|
-
}}
|
|
152
|
-
>
|
|
153
|
-
Select an option (List)
|
|
154
|
-
</button>
|
|
155
|
-
|
|
156
|
-
<button
|
|
157
|
-
class='button-base mr-m mb-s'
|
|
158
|
-
onClick={() => {
|
|
159
|
-
const content = InputWithTitle('Enter a value', 'default value', (value: string) => {
|
|
160
|
-
NotificationMessage.sendMessage('You entered: ' + value, NotificationColor.Success);
|
|
161
|
-
});
|
|
162
|
-
MessageBox.show({
|
|
163
|
-
title: 'Title',
|
|
164
|
-
buttonType: MessageBoxButtonProps.OkCancel,
|
|
165
|
-
contentMinWidth: '300px',
|
|
166
|
-
handleClicked: (index: number, close) => {
|
|
167
|
-
close();
|
|
168
|
-
},
|
|
169
|
-
children: content,
|
|
170
|
-
});
|
|
171
|
-
}}
|
|
172
|
-
>
|
|
173
|
-
Input a value
|
|
174
|
-
</button>
|
|
175
|
-
|
|
176
|
-
<button
|
|
177
|
-
class='button-base mr-m mb-s'
|
|
178
|
-
onClick={() => {
|
|
179
|
-
ActionSheetSelect.show({
|
|
180
|
-
title: 'Title',
|
|
181
|
-
options: ['Option 1', 'Option 2', 'Option 3'],
|
|
182
|
-
handleClicked: (index: number, close) => {
|
|
183
|
-
NotificationMessage.sendMessage('You selected: ' + index, NotificationColor.Success);
|
|
184
|
-
close();
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
}}
|
|
188
|
-
>
|
|
189
|
-
ActionSheet Option
|
|
190
|
-
</button>
|
|
191
|
-
|
|
192
|
-
<button
|
|
193
|
-
class='button-base mr-m mb-s'
|
|
194
|
-
onClick={() => {
|
|
195
|
-
ActionSheetMessage.show({
|
|
196
|
-
title: 'Title',
|
|
197
|
-
message:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
<div class='row-box mb-s'>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
<div class='success-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<div class='info-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
<div class='warning-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<div class='error-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
<div class='
|
|
290
|
-
<div class='page-
|
|
291
|
-
<div class='
|
|
292
|
-
<div class='h3
|
|
293
|
-
<div class='
|
|
294
|
-
<div class='h4
|
|
295
|
-
<div class='
|
|
296
|
-
<div class='
|
|
297
|
-
<div class='page-paragraph
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
<
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
<
|
|
304
|
-
<
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
<
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<
|
|
311
|
-
<div class='h3
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
<div class='h4
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
<
|
|
322
|
-
<div class='h6
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
const
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
<div class='row-box mb-s'>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
<div class='row-box mb-s'>
|
|
386
|
-
|
|
387
|
-
<Button
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
<
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
</div>
|
|
415
|
-
<div class='row-box mb-s'>
|
|
416
|
-
<div class='pr-m'>Input Label:</div>
|
|
417
|
-
<input type='text' class='input-base input-
|
|
418
|
-
<input type='text' class='input-base input-
|
|
419
|
-
</div>
|
|
420
|
-
<div class='row-box mb-s'>
|
|
421
|
-
<div class='pr-m'>Input Label:</div>
|
|
422
|
-
<input type='text' class='input-base input-
|
|
423
|
-
<input type='text' class='input-base input-
|
|
424
|
-
</div>
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
<
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
<
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
<div class='row-box mb-s
|
|
455
|
-
|
|
456
|
-
<
|
|
457
|
-
|
|
458
|
-
<
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
<
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
<label class='input-label label-ss
|
|
473
|
-
<input class='input-base input-ss' type='radio' name='itemtype-
|
|
474
|
-
|
|
475
|
-
</label>
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
<label class='input-label label-s
|
|
496
|
-
<input class='input-base input-s' type='radio' name='itemtype-
|
|
497
|
-
|
|
498
|
-
</label>
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
<label class='input-label
|
|
519
|
-
<input class='input-base' type='radio' name='
|
|
520
|
-
|
|
521
|
-
</label>
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
<label class='input-label label-l
|
|
542
|
-
<input class='input-base input-l' type='radio' name='itemtype-
|
|
543
|
-
|
|
544
|
-
</label>
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
<label class='input-label label-ll
|
|
565
|
-
<input class='input-base input-ll' type='radio' name='itemtype-
|
|
566
|
-
|
|
567
|
-
</label>
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
<label class='input-label label-ss
|
|
589
|
-
<input class='input-base input-ss' type='checkbox'
|
|
590
|
-
|
|
591
|
-
</label>
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
<label class='input-label label-s
|
|
612
|
-
<input class='input-base input-s' type='checkbox'
|
|
613
|
-
|
|
614
|
-
</label>
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
<label class='input-label
|
|
635
|
-
<input class='input-base' type='checkbox'
|
|
636
|
-
|
|
637
|
-
</label>
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
<label class='input-label label-l
|
|
658
|
-
<input class='input-base input-l' type='checkbox'
|
|
659
|
-
|
|
660
|
-
</label>
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
<label class='input-label label-ll
|
|
681
|
-
<input class='input-base input-ll' type='checkbox'
|
|
682
|
-
|
|
683
|
-
</label>
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
</div>
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
<option
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
<
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
<
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
<
|
|
756
|
-
</div>
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
/>
|
|
766
|
-
<ToggleSwitch
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
<ToggleSwitch
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
1
|
+
import {
|
|
2
|
+
RefProps,
|
|
3
|
+
FloatWindow,
|
|
4
|
+
NotificationMessage,
|
|
5
|
+
notificationColorFromValue,
|
|
6
|
+
PopupMenuWithButton,
|
|
7
|
+
PopupMenuWithLabel,
|
|
8
|
+
ToggleSwitch,
|
|
9
|
+
ToggleSwitchSize,
|
|
10
|
+
ModalWindow,
|
|
11
|
+
MessageBox,
|
|
12
|
+
MessageBoxButtonProps,
|
|
13
|
+
NotificationColor,
|
|
14
|
+
SelectWithTitle,
|
|
15
|
+
InputWithTitle,
|
|
16
|
+
Button,
|
|
17
|
+
ButtonSize,
|
|
18
|
+
ButtonHookProps,
|
|
19
|
+
ActionSheetMessage,
|
|
20
|
+
ActionSheetSelect,
|
|
21
|
+
} from 'lupine.components';
|
|
22
|
+
|
|
23
|
+
const TestWindows = () => {
|
|
24
|
+
const doModal = (closeWhenClickOutside: boolean) => {
|
|
25
|
+
ModalWindow.show({
|
|
26
|
+
title: 'Save Menu',
|
|
27
|
+
buttons: ['Ok', 'Cancel'],
|
|
28
|
+
closeWhenClickOutside,
|
|
29
|
+
contentMinWidth: '50%',
|
|
30
|
+
handleClicked: (index: number, close: () => void) => {
|
|
31
|
+
close();
|
|
32
|
+
},
|
|
33
|
+
children: <div>test Modal</div>,
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const list: string[] = ['Success', 'Info', 'Warning', 'Alert', '', 'Permanent'];
|
|
38
|
+
const handleSelected = (value: string) => {
|
|
39
|
+
const level = notificationColorFromValue(value);
|
|
40
|
+
const permanent = value === 'Permanent';
|
|
41
|
+
NotificationMessage.sendMessage('Selected: ' + value, level, permanent);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
<div class='row-box mb-s'>
|
|
47
|
+
<button class='button-base mr-m mb-s' onClick={() => doModal(true)}>
|
|
48
|
+
Modal (close click outside)
|
|
49
|
+
</button>
|
|
50
|
+
<button class='button-base mr-m mb-s' onClick={() => doModal(false)}>
|
|
51
|
+
Test Modal
|
|
52
|
+
</button>
|
|
53
|
+
<button
|
|
54
|
+
class='button-base mr-m mb-s'
|
|
55
|
+
onClick={() =>
|
|
56
|
+
FloatWindow.show({
|
|
57
|
+
title: 'Title',
|
|
58
|
+
buttons: ['OK'],
|
|
59
|
+
handleClicked: (index: number, close) => {
|
|
60
|
+
close();
|
|
61
|
+
},
|
|
62
|
+
children: <div>This is float window (modal).</div>,
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
>
|
|
66
|
+
Float Window
|
|
67
|
+
</button>
|
|
68
|
+
<button
|
|
69
|
+
class='button-base mr-m mb-s'
|
|
70
|
+
onClick={() =>
|
|
71
|
+
FloatWindow.show({
|
|
72
|
+
title: 'Title',
|
|
73
|
+
buttons: ['OK'],
|
|
74
|
+
handleClicked: (index: number, close) => {
|
|
75
|
+
close();
|
|
76
|
+
},
|
|
77
|
+
children: <div>This is float window (no modal).</div>,
|
|
78
|
+
noModal: true,
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
>
|
|
82
|
+
Float Window (no modal)
|
|
83
|
+
</button>
|
|
84
|
+
<button
|
|
85
|
+
class='button-base mr-m mb-s'
|
|
86
|
+
onClick={() =>
|
|
87
|
+
MessageBox.show({
|
|
88
|
+
title: 'Title',
|
|
89
|
+
buttonType: MessageBoxButtonProps.YesNo,
|
|
90
|
+
contentMinWidth: '200px',
|
|
91
|
+
handleClicked: (index: number, close) => {
|
|
92
|
+
close();
|
|
93
|
+
},
|
|
94
|
+
children: <div>YesNo dialog.</div>,
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
>
|
|
98
|
+
MessageBox
|
|
99
|
+
</button>
|
|
100
|
+
|
|
101
|
+
<button
|
|
102
|
+
class='button-base mr-m mb-s'
|
|
103
|
+
onClick={() => {
|
|
104
|
+
const options = [
|
|
105
|
+
{ option: 'Option 1', value: '1' },
|
|
106
|
+
{ option: 'Option 2', value: '2', selected: true },
|
|
107
|
+
{ option: 'Option 3', value: '3' },
|
|
108
|
+
];
|
|
109
|
+
const content = SelectWithTitle('Select an option', options, (option: string) => {
|
|
110
|
+
NotificationMessage.sendMessage('You selected: ' + option, NotificationColor.Success);
|
|
111
|
+
});
|
|
112
|
+
MessageBox.show({
|
|
113
|
+
title: 'Title',
|
|
114
|
+
buttonType: MessageBoxButtonProps.OkCancel,
|
|
115
|
+
contentMinWidth: '300px',
|
|
116
|
+
handleClicked: (index: number, close) => {
|
|
117
|
+
close();
|
|
118
|
+
},
|
|
119
|
+
children: content,
|
|
120
|
+
});
|
|
121
|
+
}}
|
|
122
|
+
>
|
|
123
|
+
Select an option (Select)
|
|
124
|
+
</button>
|
|
125
|
+
|
|
126
|
+
<button
|
|
127
|
+
class='button-base mr-m mb-s'
|
|
128
|
+
onClick={() => {
|
|
129
|
+
const options = [
|
|
130
|
+
{ option: 'Option 1', value: '1' },
|
|
131
|
+
{ option: 'Option 2', value: '2' },
|
|
132
|
+
{ option: 'Option 3', value: '3', selected: true },
|
|
133
|
+
];
|
|
134
|
+
const content = SelectWithTitle(
|
|
135
|
+
'Select an option',
|
|
136
|
+
options,
|
|
137
|
+
(option: string) => {
|
|
138
|
+
NotificationMessage.sendMessage('You selected: ' + option, NotificationColor.Success);
|
|
139
|
+
},
|
|
140
|
+
3
|
|
141
|
+
);
|
|
142
|
+
MessageBox.show({
|
|
143
|
+
title: 'Title',
|
|
144
|
+
buttonType: MessageBoxButtonProps.OkCancel,
|
|
145
|
+
contentMinWidth: '300px',
|
|
146
|
+
handleClicked: (index: number, close) => {
|
|
147
|
+
close();
|
|
148
|
+
},
|
|
149
|
+
children: content,
|
|
150
|
+
});
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
Select an option (List)
|
|
154
|
+
</button>
|
|
155
|
+
|
|
156
|
+
<button
|
|
157
|
+
class='button-base mr-m mb-s'
|
|
158
|
+
onClick={() => {
|
|
159
|
+
const content = InputWithTitle('Enter a value', 'default value', (value: string) => {
|
|
160
|
+
NotificationMessage.sendMessage('You entered: ' + value, NotificationColor.Success);
|
|
161
|
+
});
|
|
162
|
+
MessageBox.show({
|
|
163
|
+
title: 'Title',
|
|
164
|
+
buttonType: MessageBoxButtonProps.OkCancel,
|
|
165
|
+
contentMinWidth: '300px',
|
|
166
|
+
handleClicked: (index: number, close) => {
|
|
167
|
+
close();
|
|
168
|
+
},
|
|
169
|
+
children: content,
|
|
170
|
+
});
|
|
171
|
+
}}
|
|
172
|
+
>
|
|
173
|
+
Input a value
|
|
174
|
+
</button>
|
|
175
|
+
|
|
176
|
+
<button
|
|
177
|
+
class='button-base mr-m mb-s'
|
|
178
|
+
onClick={() => {
|
|
179
|
+
ActionSheetSelect.show({
|
|
180
|
+
title: 'Title',
|
|
181
|
+
options: ['Option 1', 'Option 2', 'Option 3'],
|
|
182
|
+
handleClicked: (index: number, close) => {
|
|
183
|
+
NotificationMessage.sendMessage('You selected: ' + index, NotificationColor.Success);
|
|
184
|
+
close();
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
ActionSheet Option
|
|
190
|
+
</button>
|
|
191
|
+
|
|
192
|
+
<button
|
|
193
|
+
class='button-base mr-m mb-s'
|
|
194
|
+
onClick={() => {
|
|
195
|
+
ActionSheetMessage.show({
|
|
196
|
+
title: 'Title',
|
|
197
|
+
message:
|
|
198
|
+
'This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message. This is a long Message.',
|
|
199
|
+
});
|
|
200
|
+
}}
|
|
201
|
+
>
|
|
202
|
+
ActionSheet Message
|
|
203
|
+
</button>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<br />
|
|
207
|
+
<div class='row-box mb-s h3 bold'>PopupMenu</div>
|
|
208
|
+
<div class='row-box mb-s'>
|
|
209
|
+
<PopupMenuWithButton
|
|
210
|
+
label='Test PopupMenu'
|
|
211
|
+
list={list}
|
|
212
|
+
defaultValue={''}
|
|
213
|
+
noUpdateLabel={true}
|
|
214
|
+
handleSelected={handleSelected}
|
|
215
|
+
></PopupMenuWithButton>
|
|
216
|
+
<PopupMenuWithLabel
|
|
217
|
+
label='Test PopupMenu'
|
|
218
|
+
list={list}
|
|
219
|
+
defaultValue={''}
|
|
220
|
+
noUpdateLabel={true}
|
|
221
|
+
handleSelected={handleSelected}
|
|
222
|
+
></PopupMenuWithLabel>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
);
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const TestColors = () => {
|
|
229
|
+
return (
|
|
230
|
+
<div class='w-100p mb-s'>
|
|
231
|
+
<div class='row-box'>
|
|
232
|
+
<div class='success-text mb-s w-50p'>Success color</div>
|
|
233
|
+
<div class='success-bg mb-s w-50p'>Success background color</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div class='row-box'>
|
|
237
|
+
<div class='info-text mb-s w-50p'>Information color</div>
|
|
238
|
+
<div class='info-bg mb-s w-50p'>Information background color</div>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div class='row-box'>
|
|
242
|
+
<div class='warning-text mb-s w-50p'>Warning color</div>
|
|
243
|
+
<div class='warning-bg mb-s w-50p'>Warning background color</div>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<div class='row-box'>
|
|
247
|
+
<div class='error-text mb-s w-50p'>Alert color</div>
|
|
248
|
+
<div class='error-bg mb-s w-50p'>Alert background color</div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class='row-box'>
|
|
251
|
+
<button
|
|
252
|
+
class='button-base mr-m'
|
|
253
|
+
onClick={() => NotificationMessage.sendMessage('Test Message.', NotificationColor.Success)}
|
|
254
|
+
>
|
|
255
|
+
Success
|
|
256
|
+
</button>
|
|
257
|
+
<button
|
|
258
|
+
class='button-base mr-m'
|
|
259
|
+
onClick={() => NotificationMessage.sendMessage('Test Message.', NotificationColor.Info)}
|
|
260
|
+
>
|
|
261
|
+
Info
|
|
262
|
+
</button>
|
|
263
|
+
<button
|
|
264
|
+
class='button-base mr-m'
|
|
265
|
+
onClick={() => NotificationMessage.sendMessage('Test Message.', NotificationColor.Warning)}
|
|
266
|
+
>
|
|
267
|
+
Warning
|
|
268
|
+
</button>
|
|
269
|
+
<button
|
|
270
|
+
class='button-base mr-m'
|
|
271
|
+
onClick={() => NotificationMessage.sendMessage('Test Message.', NotificationColor.Error)}
|
|
272
|
+
>
|
|
273
|
+
Error
|
|
274
|
+
</button>
|
|
275
|
+
<button
|
|
276
|
+
class='button-base mr-m'
|
|
277
|
+
onClick={() => NotificationMessage.sendMessage('Test Message.', NotificationColor.Error, true)}
|
|
278
|
+
>
|
|
279
|
+
Permanent
|
|
280
|
+
</button>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const TestTextFontSize = () => {
|
|
287
|
+
return (
|
|
288
|
+
<div>
|
|
289
|
+
<div class='row-box mb-s h3 bold'>Class Text Sizes with bold</div>
|
|
290
|
+
<div class='page-title bold mb-s'>page-title=h2, This is the page title</div>
|
|
291
|
+
<div class='page-subtitle bold mb-s'>page-subtitle=h3-5, Subtitle</div>
|
|
292
|
+
<div class='h3 bold mb-s'>h3 bold, Paragraph title</div>
|
|
293
|
+
<div class='h3-5 bold mb-s'>h3-5 bold, Paragraph title</div>
|
|
294
|
+
<div class='h4 bold mb-s'>h4 bold, Paragraph title</div>
|
|
295
|
+
<div class='h4-5 bold mb-s'>h4-5 bold, Paragraph title</div>
|
|
296
|
+
<div class='h5 bold mb-s'>h5 bold, Paragraph title</div>
|
|
297
|
+
<div class='page-paragraph mb-s'>page-paragraph=h4, Paragraph</div>
|
|
298
|
+
<div class='page-paragraph-s mb-s'>page-paragraph-s=h5, Smaller paragraph</div>
|
|
299
|
+
|
|
300
|
+
<br />
|
|
301
|
+
<div class='row-box mb-s h3 bold'>Tag Text Sizes</div>
|
|
302
|
+
|
|
303
|
+
<div class='h1-l mb-s'>class h1-l, sample text</div>
|
|
304
|
+
<h1 class='mb-s'>tag h1, sample text</h1>
|
|
305
|
+
<div class='h1 mb-s'>class h1, sample text</div>
|
|
306
|
+
|
|
307
|
+
<h2 class='mb-s'>tag h2, sample text</h2>
|
|
308
|
+
<div class='h2 mb-s'>class h2, sample text</div>
|
|
309
|
+
|
|
310
|
+
<h3 class='mb-s'>tag h3, sample text</h3>
|
|
311
|
+
<div class='h3 mb-s'>class h3, sample text</div>
|
|
312
|
+
<div class='h3-5 mb-s'>class h3-5, sample text</div>
|
|
313
|
+
|
|
314
|
+
<h4 class='mb-s'>tag h4, sample text</h4>
|
|
315
|
+
<div class='h4 mb-s'>class h4, sample text</div>
|
|
316
|
+
<div class='h4-5 mb-s'>class h4-5, sample text</div>
|
|
317
|
+
|
|
318
|
+
<h5 class='mb-s'>tag h5, sample text</h5>
|
|
319
|
+
<div class='h5 mb-s'>class h5, sample text</div>
|
|
320
|
+
|
|
321
|
+
<h6 class='mb-s'>tag h6, sample text</h6>
|
|
322
|
+
<div class='h6 mb-s'>class h6, sample text</div>
|
|
323
|
+
<div class='h6-s mb-s'>class h6-s, sample text</div>
|
|
324
|
+
</div>
|
|
325
|
+
);
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
const TestButtons = () => {
|
|
329
|
+
const doModal = (closeWhenClickOutside: boolean) => {
|
|
330
|
+
ModalWindow.show({
|
|
331
|
+
title: 'Save Menu',
|
|
332
|
+
buttons: ['Ok', 'Cancel'],
|
|
333
|
+
closeWhenClickOutside,
|
|
334
|
+
contentMinWidth: '50%',
|
|
335
|
+
handleClicked: (index: number, close: () => void) => {
|
|
336
|
+
close();
|
|
337
|
+
},
|
|
338
|
+
children: <div>test Modal</div>,
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
const list: string[] = ['Success', 'Info', 'Warning', 'Alert', '', 'Permanent'];
|
|
343
|
+
const handleSelected = (value: string) => {
|
|
344
|
+
const level = notificationColorFromValue(value);
|
|
345
|
+
const permanent = value === 'Permanent';
|
|
346
|
+
NotificationMessage.sendMessage('Selected: ' + value, level, permanent);
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
// Basic HTML Buttons
|
|
350
|
+
const basicButton1: RefProps = {};
|
|
351
|
+
const basicButton2: RefProps = {};
|
|
352
|
+
const onBasicButtonClick = () => {
|
|
353
|
+
basicButton1.current.disabled = !basicButton1.current.disabled;
|
|
354
|
+
basicButton2.current.disabled = !basicButton2.current.disabled;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
// Lupine Button
|
|
358
|
+
const buttonHook1: ButtonHookProps = {};
|
|
359
|
+
const buttonHook2: ButtonHookProps = {};
|
|
360
|
+
const onButtonClick = () => {
|
|
361
|
+
buttonHook1.setEnabled?.(!buttonHook1.getEnabled?.());
|
|
362
|
+
buttonHook2.setEnabled?.(!buttonHook2.getEnabled?.());
|
|
363
|
+
};
|
|
364
|
+
return (
|
|
365
|
+
<div>
|
|
366
|
+
<div class='row-box mb-s h3 bold'>Basic HTML Buttons</div>
|
|
367
|
+
<div class='row-box mb-s'>
|
|
368
|
+
<button class='button-base button-ss mr-m' disabled={true} onClick={onBasicButtonClick} ref={basicButton1}>
|
|
369
|
+
Button
|
|
370
|
+
</button>
|
|
371
|
+
<button class='button-base button-s mr-m' disabled={true} onClick={onBasicButtonClick} ref={basicButton2}>
|
|
372
|
+
Button
|
|
373
|
+
</button>
|
|
374
|
+
<button class='button-base button-m mr-m' onClick={onBasicButtonClick}>
|
|
375
|
+
Button
|
|
376
|
+
</button>
|
|
377
|
+
<button class='button-base button-l mr-m' onClick={onBasicButtonClick}>
|
|
378
|
+
Button
|
|
379
|
+
</button>
|
|
380
|
+
<button class='button-base button-ll mr-m' onClick={onBasicButtonClick}>
|
|
381
|
+
Button
|
|
382
|
+
</button>
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<div class='row-box mb-s h3 bold'>Lupine Buttons</div>
|
|
386
|
+
<div class='row-box mb-s'>
|
|
387
|
+
<Button
|
|
388
|
+
text='Test 1'
|
|
389
|
+
size={ButtonSize.SmallLarge}
|
|
390
|
+
disabled={true}
|
|
391
|
+
class='mr-m'
|
|
392
|
+
onClick={onButtonClick}
|
|
393
|
+
hook={buttonHook1}
|
|
394
|
+
/>
|
|
395
|
+
<Button
|
|
396
|
+
text='Test 2'
|
|
397
|
+
size={ButtonSize.Small}
|
|
398
|
+
disabled={true}
|
|
399
|
+
class='mr-m'
|
|
400
|
+
hook={buttonHook2}
|
|
401
|
+
onClick={onButtonClick}
|
|
402
|
+
/>
|
|
403
|
+
<Button text='Click Me' size={ButtonSize.Medium} class='mr-m' css={{ color: 'red' }} onClick={onButtonClick} />
|
|
404
|
+
<Button text='Button' size={ButtonSize.Large} class='mr-m' onClick={onButtonClick} />
|
|
405
|
+
<Button text='Button' size={ButtonSize.LargeLarge} class='mr-m' onClick={onButtonClick} />
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
);
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
const TestInputs = () => {
|
|
412
|
+
return (
|
|
413
|
+
<div>
|
|
414
|
+
<div class='row-box mb-s h3 bold'>Basic Inputs</div>
|
|
415
|
+
<div class='row-box mb-s'>
|
|
416
|
+
<div class='pr-m'>Input Label:</div>
|
|
417
|
+
<input type='text' class='input-base input-ss' placeholder='Placeholder' />
|
|
418
|
+
<input type='text' class='input-base input-ss' value='Text value' />
|
|
419
|
+
</div>
|
|
420
|
+
<div class='row-box mb-s'>
|
|
421
|
+
<div class='pr-m'>Input Label:</div>
|
|
422
|
+
<input type='text' class='input-base input-s' placeholder='Placeholder' />
|
|
423
|
+
<input type='text' class='input-base input-s' value='Text value' />
|
|
424
|
+
</div>
|
|
425
|
+
<div class='row-box mb-s'>
|
|
426
|
+
<div class='pr-m'>Input Label:</div>
|
|
427
|
+
<input type='text' class='input-base' placeholder='Placeholder' />
|
|
428
|
+
<input type='text' class='input-base' value='Text value' />
|
|
429
|
+
</div>
|
|
430
|
+
<div class='row-box mb-s'>
|
|
431
|
+
<div class='pr-m'>Input Label:</div>
|
|
432
|
+
<input type='text' class='input-base input-l' placeholder='Placeholder' />
|
|
433
|
+
<input type='text' class='input-base input-l' value='Text value' />
|
|
434
|
+
</div>
|
|
435
|
+
<div class='row-box mb-s'>
|
|
436
|
+
<div class='pr-m'>Input Label:</div>
|
|
437
|
+
<input type='text' class='input-base input-ll' placeholder='Placeholder' />
|
|
438
|
+
<input type='text' class='input-base input-ll' value='Text value' />
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
<div class='row-box mb-s h3 bold'>Readonly / Disabled</div>
|
|
442
|
+
<div class='row-box mb-s'>
|
|
443
|
+
<div class='pr-m'>Readonly:</div>
|
|
444
|
+
<input type='text' class='input-base' placeholder='Placeholder' readonly={true} />
|
|
445
|
+
<input type='text' class='input-base' value='Text value' readonly={true} />
|
|
446
|
+
</div>
|
|
447
|
+
<div class='row-box mb-s'>
|
|
448
|
+
<div class='pr-m'>Disabled:</div>
|
|
449
|
+
<input type='text' class='input-base' placeholder='Placeholder' disabled={true} />
|
|
450
|
+
<input type='text' class='input-base' value='Text value' disabled={true} />
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
<div class='row-box mb-s h3 bold'>Select</div>
|
|
454
|
+
<div class='row-box mb-s'>
|
|
455
|
+
<div class='pr-m'>Select:</div>
|
|
456
|
+
<select id='menutarget' class='input-base' size={1}>
|
|
457
|
+
<option value='0'>Parent Window</option>
|
|
458
|
+
<option value='1'>New Window</option>
|
|
459
|
+
</select>
|
|
460
|
+
</div>
|
|
461
|
+
<div class='row-box mb-s'>
|
|
462
|
+
<div class='pr-m'>Disabled:</div>
|
|
463
|
+
<select id='menutarget' class='input-base' size={1} disabled={true}>
|
|
464
|
+
<option value='0'>Parent Window</option>
|
|
465
|
+
<option value='1'>New Window</option>
|
|
466
|
+
</select>
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
<div class='row-box mb-s h3 bold'>Radio</div>
|
|
470
|
+
<div class='row-box mb-s'>
|
|
471
|
+
<div class='pr-m'>Radio box:</div>
|
|
472
|
+
<label class='input-label label-ss pr-m'>
|
|
473
|
+
<input class='input-base input-ss' type='radio' name='itemtype-ss' />
|
|
474
|
+
Text
|
|
475
|
+
</label>
|
|
476
|
+
|
|
477
|
+
<label class='input-label label-ss pr-m'>
|
|
478
|
+
<input class='input-base input-ss' type='radio' name='itemtype-ss' checked />
|
|
479
|
+
Checked
|
|
480
|
+
</label>
|
|
481
|
+
|
|
482
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
483
|
+
<label class='input-label label-ss disabled pr-m'>
|
|
484
|
+
<input class='input-base input-ss' type='radio' name='itemtype-ss_rc' disabled={true} />
|
|
485
|
+
Disabled
|
|
486
|
+
</label>
|
|
487
|
+
<label class='input-label label-ss disabled pr-m'>
|
|
488
|
+
<input class='input-base input-ss' type='radio' name='itemtype-ss_rc' checked disabled={true} />
|
|
489
|
+
Disabled checked
|
|
490
|
+
</label>
|
|
491
|
+
</div>
|
|
492
|
+
|
|
493
|
+
<div class='row-box mb-s'>
|
|
494
|
+
<div class='pr-m'>Radio box:</div>
|
|
495
|
+
<label class='input-label label-s pr-m'>
|
|
496
|
+
<input class='input-base input-s' type='radio' name='itemtype-s' />
|
|
497
|
+
Text
|
|
498
|
+
</label>
|
|
499
|
+
|
|
500
|
+
<label class='input-label label-s pr-m'>
|
|
501
|
+
<input class='input-base input-s' type='radio' name='itemtype-s' checked />
|
|
502
|
+
Checked
|
|
503
|
+
</label>
|
|
504
|
+
|
|
505
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
506
|
+
<label class='input-label label-s disabled pr-m'>
|
|
507
|
+
<input class='input-base input-s' type='radio' name='itemtype-s_rc' disabled={true} />
|
|
508
|
+
Disabled
|
|
509
|
+
</label>
|
|
510
|
+
<label class='input-label label-s disabled pr-m'>
|
|
511
|
+
<input class='input-base input-s' type='radio' name='itemtype-s_rc' checked disabled={true} />
|
|
512
|
+
Disabled checked
|
|
513
|
+
</label>
|
|
514
|
+
</div>
|
|
515
|
+
|
|
516
|
+
<div class='row-box mb-s'>
|
|
517
|
+
<div class='pr-m'>Radio box:</div>
|
|
518
|
+
<label class='input-label pr-m'>
|
|
519
|
+
<input class='input-base' type='radio' name='itemtype' />
|
|
520
|
+
Text
|
|
521
|
+
</label>
|
|
522
|
+
|
|
523
|
+
<label class='input-label pr-m'>
|
|
524
|
+
<input class='input-base' type='radio' name='itemtype' checked />
|
|
525
|
+
Checked
|
|
526
|
+
</label>
|
|
527
|
+
|
|
528
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
529
|
+
<label class='input-label disabled pr-m'>
|
|
530
|
+
<input class='input-base' type='radio' name='itemtype_rc' disabled={true} />
|
|
531
|
+
Disabled
|
|
532
|
+
</label>
|
|
533
|
+
<label class='input-label disabled pr-m'>
|
|
534
|
+
<input class='input-base' type='radio' name='itemtype_rc' checked disabled={true} />
|
|
535
|
+
Disabled checked
|
|
536
|
+
</label>
|
|
537
|
+
</div>
|
|
538
|
+
|
|
539
|
+
<div class='row-box mb-s'>
|
|
540
|
+
<div class='pr-m'>Radio box:</div>
|
|
541
|
+
<label class='input-label label-l pr-m'>
|
|
542
|
+
<input class='input-base input-l' type='radio' name='itemtype-l' />
|
|
543
|
+
Text
|
|
544
|
+
</label>
|
|
545
|
+
|
|
546
|
+
<label class='input-label label-l pr-m'>
|
|
547
|
+
<input class='input-base input-l' type='radio' name='itemtype-l' checked />
|
|
548
|
+
Checked
|
|
549
|
+
</label>
|
|
550
|
+
|
|
551
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
552
|
+
<label class='input-label label-l disabled pr-m'>
|
|
553
|
+
<input class='input-base input-l' type='radio' name='itemtype-l_rc' disabled={true} />
|
|
554
|
+
Disabled
|
|
555
|
+
</label>
|
|
556
|
+
<label class='input-label label-l disabled pr-m'>
|
|
557
|
+
<input class='input-base input-l' type='radio' name='itemtype-l_rc' checked disabled={true} />
|
|
558
|
+
Disabled checked
|
|
559
|
+
</label>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
<div class='row-box mb-s'>
|
|
563
|
+
<div class='pr-m'>Radio box:</div>
|
|
564
|
+
<label class='input-label label-ll pr-m'>
|
|
565
|
+
<input class='input-base input-ll' type='radio' name='itemtype-ll' />
|
|
566
|
+
Text
|
|
567
|
+
</label>
|
|
568
|
+
|
|
569
|
+
<label class='input-label label-ll pr-m'>
|
|
570
|
+
<input class='input-base input-ll' type='radio' name='itemtype-ll' checked />
|
|
571
|
+
Checked
|
|
572
|
+
</label>
|
|
573
|
+
|
|
574
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
575
|
+
<label class='input-label label-ll disabled pr-m'>
|
|
576
|
+
<input class='input-base input-ll' type='radio' name='itemtype-ll_rc' disabled={true} />
|
|
577
|
+
Disabled
|
|
578
|
+
</label>
|
|
579
|
+
<label class='input-label label-ll disabled pr-m'>
|
|
580
|
+
<input class='input-base input-ll' type='radio' name='itemtype-ll_rc' checked disabled={true} />
|
|
581
|
+
Disabled checked
|
|
582
|
+
</label>
|
|
583
|
+
</div>
|
|
584
|
+
|
|
585
|
+
<div class='row-box mb-s h3 bold'>Checkbox</div>
|
|
586
|
+
<div class='row-box mb-s'>
|
|
587
|
+
<div class='pr-m'>Checkbox:</div>
|
|
588
|
+
<label class='input-label label-ss pr-m'>
|
|
589
|
+
<input class='input-base input-ss' type='checkbox' />
|
|
590
|
+
Text
|
|
591
|
+
</label>
|
|
592
|
+
|
|
593
|
+
<label class='input-label label-ss pr-m'>
|
|
594
|
+
<input class='input-base input-ss' type='checkbox' checked />
|
|
595
|
+
Checked
|
|
596
|
+
</label>
|
|
597
|
+
|
|
598
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
599
|
+
<label class='input-label label-ss disabled pr-m'>
|
|
600
|
+
<input class='input-base input-ss' type='checkbox' disabled={true} />
|
|
601
|
+
Disabled
|
|
602
|
+
</label>
|
|
603
|
+
<label class='input-label label-ss disabled pr-m'>
|
|
604
|
+
<input class='input-base input-ss' type='checkbox' checked disabled={true} />
|
|
605
|
+
Disabled checked
|
|
606
|
+
</label>
|
|
607
|
+
</div>
|
|
608
|
+
|
|
609
|
+
<div class='row-box mb-s'>
|
|
610
|
+
<div class='pr-m'>Checkbox:</div>
|
|
611
|
+
<label class='input-label label-s pr-m'>
|
|
612
|
+
<input class='input-base input-s' type='checkbox' />
|
|
613
|
+
Text
|
|
614
|
+
</label>
|
|
615
|
+
|
|
616
|
+
<label class='input-label label-s pr-m'>
|
|
617
|
+
<input class='input-base input-s' type='checkbox' checked />
|
|
618
|
+
Checked
|
|
619
|
+
</label>
|
|
620
|
+
|
|
621
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
622
|
+
<label class='input-label label-s disabled pr-m'>
|
|
623
|
+
<input class='input-base input-s' type='checkbox' disabled={true} />
|
|
624
|
+
Disabled
|
|
625
|
+
</label>
|
|
626
|
+
<label class='input-label label-s disabled pr-m'>
|
|
627
|
+
<input class='input-base input-s' type='checkbox' checked disabled={true} />
|
|
628
|
+
Disabled checked
|
|
629
|
+
</label>
|
|
630
|
+
</div>
|
|
631
|
+
|
|
632
|
+
<div class='row-box mb-s'>
|
|
633
|
+
<div class='pr-m'>Checkbox:</div>
|
|
634
|
+
<label class='input-label pr-m'>
|
|
635
|
+
<input class='input-base' type='checkbox' />
|
|
636
|
+
Text
|
|
637
|
+
</label>
|
|
638
|
+
|
|
639
|
+
<label class='input-label pr-m'>
|
|
640
|
+
<input class='input-base' type='checkbox' checked />
|
|
641
|
+
Checked
|
|
642
|
+
</label>
|
|
643
|
+
|
|
644
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
645
|
+
<label class='input-label disabled pr-m'>
|
|
646
|
+
<input class='input-base' type='checkbox' disabled={true} />
|
|
647
|
+
Disabled
|
|
648
|
+
</label>
|
|
649
|
+
<label class='input-label disabled pr-m'>
|
|
650
|
+
<input class='input-base' type='checkbox' checked disabled={true} />
|
|
651
|
+
Disabled checked
|
|
652
|
+
</label>
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
<div class='row-box mb-s'>
|
|
656
|
+
<div class='pr-m'>Checkbox:</div>
|
|
657
|
+
<label class='input-label label-l pr-m'>
|
|
658
|
+
<input class='input-base input-l' type='checkbox' />
|
|
659
|
+
Text
|
|
660
|
+
</label>
|
|
661
|
+
|
|
662
|
+
<label class='input-label label-l pr-m'>
|
|
663
|
+
<input class='input-base input-l' type='checkbox' checked />
|
|
664
|
+
Checked
|
|
665
|
+
</label>
|
|
666
|
+
|
|
667
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
668
|
+
<label class='input-label label-l disabled pr-m'>
|
|
669
|
+
<input class='input-base input-l' type='checkbox' disabled={true} />
|
|
670
|
+
Disabled
|
|
671
|
+
</label>
|
|
672
|
+
<label class='input-label label-l disabled pr-m'>
|
|
673
|
+
<input class='input-base input-l' type='checkbox' checked disabled={true} />
|
|
674
|
+
Disabled checked
|
|
675
|
+
</label>
|
|
676
|
+
</div>
|
|
677
|
+
|
|
678
|
+
<div class='row-box mb-s'>
|
|
679
|
+
<div class='pr-m'>Checkbox:</div>
|
|
680
|
+
<label class='input-label label-ll pr-m'>
|
|
681
|
+
<input class='input-base input-ll' type='checkbox' />
|
|
682
|
+
Text
|
|
683
|
+
</label>
|
|
684
|
+
|
|
685
|
+
<label class='input-label label-ll pr-m'>
|
|
686
|
+
<input class='input-base input-ll' type='checkbox' checked />
|
|
687
|
+
Checked
|
|
688
|
+
</label>
|
|
689
|
+
|
|
690
|
+
{/* checkbox and radio don't have readonly attribute */}
|
|
691
|
+
<label class='input-label label-ll disabled pr-m'>
|
|
692
|
+
<input class='input-base input-ll' type='checkbox' disabled={true} />
|
|
693
|
+
Disabled
|
|
694
|
+
</label>
|
|
695
|
+
<label class='input-label label-ll disabled pr-m'>
|
|
696
|
+
<input class='input-base input-ll' type='checkbox' checked disabled={true} />
|
|
697
|
+
Disabled checked
|
|
698
|
+
</label>
|
|
699
|
+
</div>
|
|
700
|
+
|
|
701
|
+
<div class='row-box mb-s h3 bold'>Input field</div>
|
|
702
|
+
<div class='row-box mb-s'>
|
|
703
|
+
<div class='input-field w-100p'>
|
|
704
|
+
<input class='input-base w-100p f-subject' type='text' required placeholder=' ' />
|
|
705
|
+
<span>Subject *</span>
|
|
706
|
+
</div>
|
|
707
|
+
<div class='input-field w-100p'>
|
|
708
|
+
<textarea class='input-base w-100p msg-area f-message' required placeholder=' '></textarea>
|
|
709
|
+
<span>Message *</span>
|
|
710
|
+
</div>
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
<div class='row-box mb-s h3 bold'>List</div>
|
|
714
|
+
<div class='row-box mb-s'>
|
|
715
|
+
<div class='row-box flex-1 mr-m'>
|
|
716
|
+
<div class='list-box'>
|
|
717
|
+
<select class='input-base w-100p h-100p list' id='menulist' size={8}>
|
|
718
|
+
<option value='0 0 0 0 index.php?st_p1=&st_p2=&st_m1=home Web No Coding Home'>Home</option>
|
|
719
|
+
<option>Help</option>
|
|
720
|
+
<option disabled={true}>Beginners</option>
|
|
721
|
+
<option>----for Beginners</option>
|
|
722
|
+
<option>----Template</option>
|
|
723
|
+
</select>
|
|
724
|
+
</div>
|
|
725
|
+
</div>
|
|
726
|
+
<div class='row-box flex-1'>
|
|
727
|
+
<div class='list-box'>
|
|
728
|
+
<select class='input-base w-100p h-100p list' id='menulist' size={8} disabled={true}>
|
|
729
|
+
<option value='0 0 0 0 index.php?st_p1=&st_p2=&st_m1=home Web No Coding Home'>Disabled</option>
|
|
730
|
+
<option>Help</option>
|
|
731
|
+
<option>Beginners</option>
|
|
732
|
+
<option>----for Beginners</option>
|
|
733
|
+
<option>----Template</option>
|
|
734
|
+
</select>
|
|
735
|
+
</div>
|
|
736
|
+
</div>
|
|
737
|
+
</div>
|
|
738
|
+
</div>
|
|
739
|
+
);
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
export const TestComponentPage = () => {
|
|
743
|
+
return (
|
|
744
|
+
<div>
|
|
745
|
+
<div class='row-box mb-s'>
|
|
746
|
+
<TestWindows />
|
|
747
|
+
</div>
|
|
748
|
+
<div class='row-box mb-s'>
|
|
749
|
+
<TestColors />
|
|
750
|
+
</div>
|
|
751
|
+
<div class='row-box mb-s'>
|
|
752
|
+
<TestTextFontSize />
|
|
753
|
+
</div>
|
|
754
|
+
<div class='row-box mb-s'>
|
|
755
|
+
<TestButtons />
|
|
756
|
+
</div>
|
|
757
|
+
<div class='row-box mb-s'>
|
|
758
|
+
<TestInputs />
|
|
759
|
+
</div>
|
|
760
|
+
|
|
761
|
+
<div class='row-box mb-s h3 bold'>Toggle Switch</div>
|
|
762
|
+
<div class='row-box mb-s'>
|
|
763
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.SmallSmall} />
|
|
764
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.SmallSmall} />
|
|
765
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Small} />
|
|
766
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Small} />
|
|
767
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Medium} />
|
|
768
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Medium} />
|
|
769
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Large} />
|
|
770
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Large} />
|
|
771
|
+
</div>
|
|
772
|
+
|
|
773
|
+
<div class='row-box mb-s h3 bold'>Toggle Switch with text</div>
|
|
774
|
+
<div class='row-box mb-s'>
|
|
775
|
+
<ToggleSwitch
|
|
776
|
+
checked={true}
|
|
777
|
+
size={ToggleSwitchSize.SmallSmall}
|
|
778
|
+
text={{ on: 'On', off: 'Off' }}
|
|
779
|
+
textWidth='50px'
|
|
780
|
+
/>
|
|
781
|
+
<ToggleSwitch
|
|
782
|
+
checked={false}
|
|
783
|
+
size={ToggleSwitchSize.SmallSmall}
|
|
784
|
+
text={{ on: 'Enable', off: 'Disable' }}
|
|
785
|
+
textWidth='50px'
|
|
786
|
+
/>
|
|
787
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Small} text={{ on: 'On', off: 'Off' }} textWidth='50px' />
|
|
788
|
+
<ToggleSwitch
|
|
789
|
+
checked={false}
|
|
790
|
+
size={ToggleSwitchSize.Small}
|
|
791
|
+
text={{ on: 'Enable', off: 'Disable' }}
|
|
792
|
+
textWidth='50px'
|
|
793
|
+
/>
|
|
794
|
+
<ToggleSwitch
|
|
795
|
+
checked={true}
|
|
796
|
+
size={ToggleSwitchSize.Medium}
|
|
797
|
+
text={{ on: 'Set', off: 'Not Set' }}
|
|
798
|
+
textWidth='60px'
|
|
799
|
+
/>
|
|
800
|
+
<ToggleSwitch
|
|
801
|
+
checked={false}
|
|
802
|
+
size={ToggleSwitchSize.Medium}
|
|
803
|
+
text={{ on: 'Show', off: 'Hide' }}
|
|
804
|
+
textWidth='60px'
|
|
805
|
+
/>
|
|
806
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Large} text={{ on: 'Yes', off: 'No' }} />
|
|
807
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Large} text={{ on: 'Up', off: 'Down' }} />
|
|
808
|
+
</div>
|
|
809
|
+
|
|
810
|
+
<div class='row-box mb-s h3 bold'>Toggle Switch Disabled</div>
|
|
811
|
+
<div class='row-box mb-s'>
|
|
812
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.SmallSmall} disabled={true} />
|
|
813
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.SmallSmall} disabled={true} />
|
|
814
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Small} disabled={true} />
|
|
815
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Small} disabled={true} />
|
|
816
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Medium} disabled={true} />
|
|
817
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Medium} disabled={true} />
|
|
818
|
+
<ToggleSwitch checked={true} size={ToggleSwitchSize.Large} disabled={true} />
|
|
819
|
+
<ToggleSwitch checked={false} size={ToggleSwitchSize.Large} disabled={true} />
|
|
820
|
+
</div>
|
|
821
|
+
</div>
|
|
822
|
+
);
|
|
823
|
+
};
|