@plitzi/sdk-elements 0.37.2 → 0.37.4
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/CHANGELOG.md +1180 -0
- package/dist/Component/ComponentProvider.mjs +10 -5
- package/dist/Element/JsxManager.mjs +1 -0
- package/dist/Element/PluginRemote.d.ts +3 -1
- package/dist/Element/PluginRemote.mjs +9 -9
- package/dist/Element/helpers/elementConstants.mjs +28 -0
- package/dist/Element/helpers/elementUtils.mjs +1 -1
- package/dist/Element/helpers/loadComponent.d.ts +6 -1
- package/dist/Element/helpers/loadComponent.mjs +7 -7
- package/dist/Element/helpers/pluginSelector.mjs +1 -0
- package/dist/Element/hooks/useElementDataSource.mjs +23 -16
- package/dist/Element/hooks/useElementInternal.mjs +60 -52
- package/dist/Element/hooks/useInternalClassName.mjs +19 -18
- package/dist/Element/hooks/useKeyTriggers.d.ts +18 -0
- package/dist/Element/hooks/useKeyTriggers.mjs +36 -0
- package/dist/Element/hooks/useRootElementInteractions.mjs +65 -56
- package/dist/Element/hooks/useRscData.mjs +20 -15
- package/dist/dataSource/GlobalSources.mjs +114 -80
- package/dist/dataSource/getSourcesByElementId.mjs +2 -2
- package/dist/elements/advanced/BlockJsx/BlockJsx.mjs +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +10 -3
- package/dist/elements/basic/Button/Button.mjs +5 -5
- package/dist/elements/basic/Button/Settings.d.ts +2 -1
- package/dist/elements/basic/Button/Settings.mjs +14 -7
- package/dist/elements/basic/Button/declaration.d.ts +8 -3
- package/dist/elements/basic/Button/declaration.mjs +14 -6
- package/dist/elements/basic/Button/index.d.ts +8 -3
- package/dist/elements/basic/Dropdown/Dropdown.mjs +48 -39
- package/dist/elements/basic/Dropdown/declaration.d.ts +3 -0
- package/dist/elements/basic/Dropdown/declaration.mjs +9 -3
- package/dist/elements/basic/Dropdown/index.d.ts +3 -0
- package/dist/elements/basic/Dropdown/useDropdown.d.ts +6 -1
- package/dist/elements/basic/Dropdown/useDropdown.mjs +58 -41
- package/dist/elements/basic/Dropdown/useDropdownTrigger.d.ts +26 -0
- package/dist/elements/basic/Dropdown/useDropdownTrigger.mjs +30 -0
- package/dist/elements/basic/Heading/declaration.d.ts +9 -6
- package/dist/elements/basic/Heading/declaration.mjs +17 -9
- package/dist/elements/basic/Heading/index.d.ts +9 -6
- package/dist/elements/basic/Link/Link.mjs +4 -1
- package/dist/elements/basic/Link/Settings.d.ts +2 -1
- package/dist/elements/basic/Link/Settings.mjs +31 -24
- package/dist/elements/basic/Link/declaration.d.ts +5 -1
- package/dist/elements/basic/Link/declaration.mjs +16 -3
- package/dist/elements/basic/Link/index.d.ts +5 -1
- package/dist/elements/basic/Markdown/declaration.d.ts +1 -1
- package/dist/elements/basic/Markdown/declaration.mjs +1 -1
- package/dist/elements/basic/Markdown/index.d.ts +1 -1
- package/dist/elements/basic/RichText/declaration.d.ts +3 -0
- package/dist/elements/basic/RichText/declaration.mjs +8 -3
- package/dist/elements/basic/RichText/index.d.ts +3 -0
- package/dist/elements/basic/Text/declaration.d.ts +1 -1
- package/dist/elements/basic/Text/declaration.mjs +1 -1
- package/dist/elements/basic/Text/index.d.ts +1 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +3 -0
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +3 -0
- package/dist/elements/basic/ThemeToggle/declaration.mjs +4 -3
- package/dist/elements/basic/ThemeToggle/index.d.ts +3 -0
- package/dist/elements/declarations/index.d.ts +217 -17
- package/dist/elements/declarations/index.mjs +24 -22
- package/dist/elements/form/Form/declaration.d.ts +3 -0
- package/dist/elements/form/Form/declaration.mjs +4 -3
- package/dist/elements/form/Form/index.d.ts +3 -0
- package/dist/elements/form/FormControl/FormControl.d.ts +18 -6
- package/dist/elements/form/FormControl/FormControl.mjs +135 -127
- package/dist/elements/form/FormControl/Settings.d.ts +3 -1
- package/dist/elements/form/FormControl/Settings.mjs +73 -57
- package/dist/elements/form/FormControl/components/Label.d.ts +3 -1
- package/dist/elements/form/FormControl/components/Label.mjs +20 -18
- package/dist/elements/form/FormControl/components/visuallyHidden.d.ts +6 -0
- package/dist/elements/form/FormControl/components/visuallyHidden.mjs +14 -0
- package/dist/elements/form/FormControl/declaration.d.ts +5 -0
- package/dist/elements/form/FormControl/declaration.mjs +46 -30
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +68 -61
- package/dist/elements/form/FormControl/index.d.ts +5 -0
- package/dist/elements/form/FormControl/inputs/Checkbox.d.ts +6 -1
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +5 -3
- package/dist/elements/form/FormControl/inputs/Input.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Input.mjs +44 -38
- package/dist/elements/form/FormControl/inputs/Select.d.ts +6 -1
- package/dist/elements/form/FormControl/inputs/Select.mjs +12 -10
- package/dist/elements/form/FormControl/inputs/Textarea.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Textarea.mjs +26 -21
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +7 -0
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.mjs +9 -0
- package/dist/elements/index.d.ts +3 -1
- package/dist/elements/index.mjs +16 -14
- package/dist/elements/internal/LayoutContainer/declaration.d.ts +3 -0
- package/dist/elements/internal/LayoutContainer/declaration.mjs +15 -3
- package/dist/elements/internal/LayoutContainer/index.d.ts +3 -0
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +8 -1
- package/dist/elements/media/FontAwesome/FontAwesome.mjs +12 -5
- package/dist/elements/media/FontAwesome/Settings.d.ts +2 -1
- package/dist/elements/media/FontAwesome/Settings.mjs +29 -22
- package/dist/elements/media/FontAwesome/declaration.d.ts +1 -0
- package/dist/elements/media/FontAwesome/index.d.ts +1 -0
- package/dist/elements/media/Image/Image.d.ts +13 -2
- package/dist/elements/media/Image/Image.mjs +25 -25
- package/dist/elements/media/Image/Settings.d.ts +3 -1
- package/dist/elements/media/Image/Settings.mjs +29 -15
- package/dist/elements/media/Image/declaration.d.ts +7 -1
- package/dist/elements/media/Image/declaration.mjs +16 -3
- package/dist/elements/media/Image/index.d.ts +7 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +145 -137
- package/dist/elements/provider/ApiContainer/declaration.d.ts +14 -1
- package/dist/elements/provider/ApiContainer/declaration.mjs +41 -4
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +16 -0
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +4 -0
- package/dist/elements/provider/ApiContainer/helpers/queryInput.d.ts +5 -0
- package/dist/elements/provider/ApiContainer/helpers/queryInput.mjs +12 -0
- package/dist/elements/provider/ApiContainer/index.d.ts +14 -1
- package/dist/elements/provider/Channel/Channel.d.ts +26 -0
- package/dist/elements/provider/Channel/Channel.mjs +92 -0
- package/dist/elements/provider/Channel/Settings.d.ts +9 -0
- package/dist/elements/provider/Channel/Settings.mjs +38 -0
- package/dist/elements/provider/Channel/declaration.d.ts +138 -0
- package/dist/elements/provider/Channel/declaration.mjs +125 -0
- package/dist/elements/provider/Channel/index.d.ts +137 -0
- package/dist/elements/provider/Channel/index.mjs +6 -0
- package/dist/elements/settings.mjs +25 -23
- package/dist/elements/structure/Container/Container.d.ts +16 -2
- package/dist/elements/structure/Container/Container.mjs +18 -9
- package/dist/elements/structure/Container/Settings.d.ts +4 -2
- package/dist/elements/structure/Container/Settings.mjs +110 -69
- package/dist/elements/structure/Container/declaration.d.ts +12 -1
- package/dist/elements/structure/Container/declaration.mjs +35 -3
- package/dist/elements/structure/Container/index.d.ts +6 -1
- package/dist/elements/structure/Container/index.mjs +3 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.mjs +123 -100
- package/dist/elements/structure/List/declaration.d.ts +4 -0
- package/dist/elements/structure/List/declaration.mjs +7 -3
- package/dist/elements/structure/List/index.d.ts +4 -0
- package/dist/elements/structure/ModalContainer/ModalContainer.mjs +92 -80
- package/dist/elements/structure/ModalContainer/metadataFromText.d.ts +1 -0
- package/dist/elements/structure/ModalContainer/metadataFromText.mjs +10 -0
- package/dist/elements/structure/ModalContainer/useModalDialog.d.ts +20 -0
- package/dist/elements/structure/ModalContainer/useModalDialog.mjs +31 -0
- package/dist/elements/structure/Pagination/Pagination.d.ts +6 -1
- package/dist/elements/structure/Pagination/Pagination.mjs +23 -21
- package/dist/elements/structure/Pagination/Settings.d.ts +2 -1
- package/dist/elements/structure/Pagination/Settings.mjs +16 -9
- package/dist/elements/structure/Pagination/declaration.d.ts +5 -0
- package/dist/elements/structure/Pagination/declaration.mjs +7 -3
- package/dist/elements/structure/Pagination/index.d.ts +5 -0
- package/dist/elements/structure/TabContainer/TabContainer.mjs +19 -17
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.mjs +8 -6
- package/dist/elements/structure/TabContainer/TabContainerContext.d.ts +2 -0
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.mjs +18 -14
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +5 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.mjs +48 -13
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +1 -1
- package/dist/index.d.ts +220 -16
- package/dist/index.mjs +20 -17
- package/dist/realtime/useChannel.d.ts +35 -0
- package/dist/realtime/useChannel.mjs +57 -0
- package/package.json +67 -11
- package/dist/elements/media/FontAwesome/FontAwesome.stories-paused.d.ts +0 -1
|
@@ -23,6 +23,7 @@ import { default as FontAwesomeDeclaration } from '../media/FontAwesome/declarat
|
|
|
23
23
|
import { default as ImageDeclaration } from '../media/Image/declaration';
|
|
24
24
|
import { default as VideoDeclaration } from '../media/Video/declaration';
|
|
25
25
|
import { default as ApiContainerDeclaration } from '../provider/ApiContainer/declaration';
|
|
26
|
+
import { default as ChannelDeclaration } from '../provider/Channel/declaration';
|
|
26
27
|
import { default as ContainerDeclaration } from '../structure/Container/declaration';
|
|
27
28
|
import { default as DialogContainerDeclaration } from '../structure/DialogContainer/declaration';
|
|
28
29
|
import { default as ListDeclaration } from '../structure/List/declaration';
|
|
@@ -36,6 +37,12 @@ import { default as TabContainerItemDeclaration } from '../structure/TabContaine
|
|
|
36
37
|
export declare const elementDeclarations: {
|
|
37
38
|
readonly ApiContainer: {
|
|
38
39
|
readonly type: "apiContainer";
|
|
40
|
+
readonly attributeValues: {
|
|
41
|
+
readonly subType: readonly string[];
|
|
42
|
+
readonly method: readonly string[];
|
|
43
|
+
readonly credentials: readonly string[];
|
|
44
|
+
readonly pagination: readonly string[];
|
|
45
|
+
};
|
|
39
46
|
readonly sourceType: "apiContainer";
|
|
40
47
|
readonly triggers: {
|
|
41
48
|
readonly onApiError: {
|
|
@@ -69,7 +76,14 @@ export declare const elementDeclarations: {
|
|
|
69
76
|
readonly title: "Perform Query";
|
|
70
77
|
readonly type: "callback";
|
|
71
78
|
readonly preview: {};
|
|
72
|
-
readonly params: {
|
|
79
|
+
readonly params: {
|
|
80
|
+
readonly input: {
|
|
81
|
+
readonly label: "Input (server providers)";
|
|
82
|
+
readonly type: "codemirror-json";
|
|
83
|
+
readonly defaultValue: "{}";
|
|
84
|
+
readonly description: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
73
87
|
};
|
|
74
88
|
readonly loadMore: {
|
|
75
89
|
readonly action: "loadMore";
|
|
@@ -279,6 +293,10 @@ export declare const elementDeclarations: {
|
|
|
279
293
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<import('../advanced/BlockJsx/declaration').BlockJsxAttributes>;
|
|
280
294
|
readonly Button: {
|
|
281
295
|
readonly type: "button";
|
|
296
|
+
readonly attributeValues: {
|
|
297
|
+
readonly subType: readonly string[];
|
|
298
|
+
readonly contentPlacement: readonly string[];
|
|
299
|
+
};
|
|
282
300
|
readonly content: {
|
|
283
301
|
readonly attributes: {
|
|
284
302
|
readonly contentPlacement: "after";
|
|
@@ -338,7 +356,7 @@ export declare const elementDeclarations: {
|
|
|
338
356
|
readonly 'padding-bottom': "6px";
|
|
339
357
|
readonly cursor: "pointer";
|
|
340
358
|
readonly 'font-size': "16px";
|
|
341
|
-
readonly 'line-height': "
|
|
359
|
+
readonly 'line-height': "1.5";
|
|
342
360
|
readonly 'border-top-left-radius': "4px";
|
|
343
361
|
readonly 'border-top-right-radius': "4px";
|
|
344
362
|
readonly 'border-bottom-left-radius': "4px";
|
|
@@ -359,7 +377,7 @@ export declare const elementDeclarations: {
|
|
|
359
377
|
readonly 'padding-bottom': "6px";
|
|
360
378
|
readonly cursor: "pointer";
|
|
361
379
|
readonly 'font-size': "16px";
|
|
362
|
-
readonly 'line-height': "
|
|
380
|
+
readonly 'line-height': "1.5";
|
|
363
381
|
readonly 'border-top-left-radius': "4px";
|
|
364
382
|
readonly 'border-top-right-radius': "4px";
|
|
365
383
|
readonly 'border-bottom-left-radius': "4px";
|
|
@@ -380,7 +398,7 @@ export declare const elementDeclarations: {
|
|
|
380
398
|
readonly 'padding-bottom': "6px";
|
|
381
399
|
readonly cursor: "pointer";
|
|
382
400
|
readonly 'font-size': "16px";
|
|
383
|
-
readonly 'line-height': "
|
|
401
|
+
readonly 'line-height': "1.5";
|
|
384
402
|
readonly 'border-top-left-radius': "4px";
|
|
385
403
|
readonly 'border-top-right-radius': "4px";
|
|
386
404
|
readonly 'border-bottom-left-radius': "4px";
|
|
@@ -394,6 +412,7 @@ export declare const elementDeclarations: {
|
|
|
394
412
|
readonly settings: {};
|
|
395
413
|
};
|
|
396
414
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
415
|
+
label?: string | undefined;
|
|
397
416
|
title?: string | undefined;
|
|
398
417
|
content?: string | undefined;
|
|
399
418
|
disabled?: boolean | undefined;
|
|
@@ -402,8 +421,144 @@ export declare const elementDeclarations: {
|
|
|
402
421
|
ariaExpanded?: boolean | undefined;
|
|
403
422
|
ariaPressed?: boolean | undefined;
|
|
404
423
|
}>>;
|
|
424
|
+
readonly Channel: {
|
|
425
|
+
readonly type: "channel";
|
|
426
|
+
readonly attributeValues: {
|
|
427
|
+
readonly subType: readonly string[];
|
|
428
|
+
};
|
|
429
|
+
readonly sourceType: "channel";
|
|
430
|
+
readonly triggers: {
|
|
431
|
+
readonly onMessage: {
|
|
432
|
+
readonly action: "onMessage";
|
|
433
|
+
readonly title: "On Message";
|
|
434
|
+
readonly type: "trigger";
|
|
435
|
+
readonly params: {};
|
|
436
|
+
readonly preview: {
|
|
437
|
+
readonly type: "";
|
|
438
|
+
readonly data: "";
|
|
439
|
+
readonly from: "";
|
|
440
|
+
readonly user: "";
|
|
441
|
+
readonly at: "";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
readonly onJoin: {
|
|
445
|
+
readonly action: "onJoin";
|
|
446
|
+
readonly title: "On Join";
|
|
447
|
+
readonly type: "trigger";
|
|
448
|
+
readonly params: {};
|
|
449
|
+
readonly preview: {
|
|
450
|
+
readonly from: "";
|
|
451
|
+
readonly user: "";
|
|
452
|
+
readonly state: {};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
readonly onLeave: {
|
|
456
|
+
readonly action: "onLeave";
|
|
457
|
+
readonly title: "On Leave";
|
|
458
|
+
readonly type: "trigger";
|
|
459
|
+
readonly params: {};
|
|
460
|
+
readonly preview: {
|
|
461
|
+
readonly from: "";
|
|
462
|
+
readonly user: "";
|
|
463
|
+
readonly state: {};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
readonly callbacks: {
|
|
468
|
+
readonly publish: {
|
|
469
|
+
readonly action: "publish";
|
|
470
|
+
readonly title: "Publish";
|
|
471
|
+
readonly type: "callback";
|
|
472
|
+
readonly preview: {};
|
|
473
|
+
readonly params: {
|
|
474
|
+
readonly type: {
|
|
475
|
+
readonly label: "Type";
|
|
476
|
+
readonly defaultValue: "";
|
|
477
|
+
readonly type: "text";
|
|
478
|
+
};
|
|
479
|
+
readonly data: {
|
|
480
|
+
readonly label: "Data (JSON or a template)";
|
|
481
|
+
readonly defaultValue: "";
|
|
482
|
+
readonly type: "text";
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
readonly setPresence: {
|
|
487
|
+
readonly action: "setPresence";
|
|
488
|
+
readonly title: "Set Presence";
|
|
489
|
+
readonly type: "callback";
|
|
490
|
+
readonly preview: {};
|
|
491
|
+
readonly params: {
|
|
492
|
+
readonly data: {
|
|
493
|
+
readonly label: "State (JSON or a template)";
|
|
494
|
+
readonly defaultValue: "";
|
|
495
|
+
readonly type: "text";
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
readonly content: {
|
|
501
|
+
readonly attributes: {
|
|
502
|
+
readonly topic: "";
|
|
503
|
+
readonly grant: "";
|
|
504
|
+
readonly keep: 20;
|
|
505
|
+
readonly subType: "";
|
|
506
|
+
};
|
|
507
|
+
readonly definition: {
|
|
508
|
+
readonly label: "Channel";
|
|
509
|
+
readonly type: "channel";
|
|
510
|
+
readonly description: string;
|
|
511
|
+
readonly items: readonly [];
|
|
512
|
+
readonly bindings: {};
|
|
513
|
+
readonly styleSelectors: {
|
|
514
|
+
readonly base: "";
|
|
515
|
+
};
|
|
516
|
+
readonly initialState: {
|
|
517
|
+
readonly visibility: true;
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
readonly builder: {
|
|
521
|
+
readonly canDelete: true;
|
|
522
|
+
readonly canSelect: true;
|
|
523
|
+
readonly canDragDrop: true;
|
|
524
|
+
readonly canMove: true;
|
|
525
|
+
readonly canTemplate: true;
|
|
526
|
+
readonly itemsAllowed: readonly [];
|
|
527
|
+
readonly itemsNotAllowed: readonly [];
|
|
528
|
+
};
|
|
529
|
+
readonly market: {
|
|
530
|
+
readonly category: "provider";
|
|
531
|
+
readonly owner: "Plitzi";
|
|
532
|
+
readonly verified: true;
|
|
533
|
+
readonly license: "MIT";
|
|
534
|
+
readonly website: "https://plitzi.com";
|
|
535
|
+
readonly backgroundColor: "#4422ee";
|
|
536
|
+
readonly icon: "fa-solid fa-tower-broadcast";
|
|
537
|
+
};
|
|
538
|
+
readonly defaultStyle: {
|
|
539
|
+
readonly name: "Channel";
|
|
540
|
+
readonly displayMode: "desktop";
|
|
541
|
+
readonly style: {
|
|
542
|
+
readonly base: {
|
|
543
|
+
readonly default: {};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
readonly subTypes: {};
|
|
547
|
+
};
|
|
548
|
+
readonly settings: {};
|
|
549
|
+
};
|
|
550
|
+
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
551
|
+
subType?: "" | "div" | "section" | "aside" | "main" | undefined;
|
|
552
|
+
topic?: string | undefined;
|
|
553
|
+
grant?: string | undefined;
|
|
554
|
+
presence?: unknown;
|
|
555
|
+
keep?: number | string | undefined;
|
|
556
|
+
}>>;
|
|
405
557
|
readonly Container: {
|
|
406
558
|
readonly type: "container";
|
|
559
|
+
readonly attributeValues: {
|
|
560
|
+
readonly subType: readonly string[];
|
|
561
|
+
};
|
|
407
562
|
readonly content: {
|
|
408
563
|
readonly attributes: {
|
|
409
564
|
readonly subType: "div";
|
|
@@ -452,7 +607,9 @@ export declare const elementDeclarations: {
|
|
|
452
607
|
readonly settings: {};
|
|
453
608
|
};
|
|
454
609
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
455
|
-
|
|
610
|
+
label?: string | undefined;
|
|
611
|
+
subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
612
|
+
decorative?: boolean | undefined;
|
|
456
613
|
}>>;
|
|
457
614
|
readonly Custom: {
|
|
458
615
|
readonly type: "custom";
|
|
@@ -739,6 +896,9 @@ export declare const elementDeclarations: {
|
|
|
739
896
|
}>>;
|
|
740
897
|
readonly Dropdown: {
|
|
741
898
|
readonly type: "dropdown";
|
|
899
|
+
readonly attributeValues: {
|
|
900
|
+
readonly popupPlacement: readonly string[];
|
|
901
|
+
};
|
|
742
902
|
readonly content: {
|
|
743
903
|
readonly attributes: {
|
|
744
904
|
readonly popupPlacement: "bottom";
|
|
@@ -935,11 +1095,15 @@ export declare const elementDeclarations: {
|
|
|
935
1095
|
};
|
|
936
1096
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
937
1097
|
size?: string | undefined;
|
|
1098
|
+
label?: string | undefined;
|
|
938
1099
|
icon?: string | undefined;
|
|
939
1100
|
iconAnimation?: string | undefined;
|
|
940
1101
|
}>>;
|
|
941
1102
|
readonly Form: {
|
|
942
1103
|
readonly type: "form";
|
|
1104
|
+
readonly attributeValues: {
|
|
1105
|
+
readonly method: readonly string[];
|
|
1106
|
+
};
|
|
943
1107
|
readonly sourceType: "apiContainer";
|
|
944
1108
|
readonly triggers: {
|
|
945
1109
|
readonly onSubmit: {
|
|
@@ -1058,6 +1222,9 @@ export declare const elementDeclarations: {
|
|
|
1058
1222
|
}>>;
|
|
1059
1223
|
readonly FormControl: {
|
|
1060
1224
|
readonly type: "formControl";
|
|
1225
|
+
readonly attributeValues: {
|
|
1226
|
+
readonly subType: readonly string[];
|
|
1227
|
+
};
|
|
1061
1228
|
readonly triggers: {
|
|
1062
1229
|
readonly onChange: {
|
|
1063
1230
|
readonly action: "onChange";
|
|
@@ -1075,9 +1242,11 @@ export declare const elementDeclarations: {
|
|
|
1075
1242
|
readonly subType: "text";
|
|
1076
1243
|
readonly name: "";
|
|
1077
1244
|
readonly label: "Label";
|
|
1245
|
+
readonly hideLabel: false;
|
|
1078
1246
|
readonly placeholder: "";
|
|
1079
1247
|
readonly defaultValue: "";
|
|
1080
1248
|
readonly autoComplete: true;
|
|
1249
|
+
readonly autoFocus: false;
|
|
1081
1250
|
readonly disabled: false;
|
|
1082
1251
|
readonly options: readonly [];
|
|
1083
1252
|
readonly required: true;
|
|
@@ -1564,6 +1733,9 @@ export declare const elementDeclarations: {
|
|
|
1564
1733
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<import('../form/FormControl/declaration').FormControlAttributes>;
|
|
1565
1734
|
readonly Heading: {
|
|
1566
1735
|
readonly type: "heading";
|
|
1736
|
+
readonly attributeValues: {
|
|
1737
|
+
readonly subType: readonly string[];
|
|
1738
|
+
};
|
|
1567
1739
|
readonly content: {
|
|
1568
1740
|
readonly attributes: {
|
|
1569
1741
|
readonly content: "Heading";
|
|
@@ -1618,7 +1790,7 @@ export declare const elementDeclarations: {
|
|
|
1618
1790
|
readonly 'margin-bottom': "25px";
|
|
1619
1791
|
readonly 'font-size': "38px";
|
|
1620
1792
|
readonly 'font-weight': 700;
|
|
1621
|
-
readonly 'line-height': "
|
|
1793
|
+
readonly 'line-height': "1.158";
|
|
1622
1794
|
};
|
|
1623
1795
|
};
|
|
1624
1796
|
};
|
|
@@ -1633,7 +1805,7 @@ export declare const elementDeclarations: {
|
|
|
1633
1805
|
readonly 'margin-bottom': "25px";
|
|
1634
1806
|
readonly 'font-size': "32px";
|
|
1635
1807
|
readonly 'font-weight': 700;
|
|
1636
|
-
readonly 'line-height': "
|
|
1808
|
+
readonly 'line-height': "1.125";
|
|
1637
1809
|
};
|
|
1638
1810
|
};
|
|
1639
1811
|
};
|
|
@@ -1648,7 +1820,7 @@ export declare const elementDeclarations: {
|
|
|
1648
1820
|
readonly 'margin-bottom': "25px";
|
|
1649
1821
|
readonly 'font-size': "24px";
|
|
1650
1822
|
readonly 'font-weight': 700;
|
|
1651
|
-
readonly 'line-height': "
|
|
1823
|
+
readonly 'line-height': "1.25";
|
|
1652
1824
|
};
|
|
1653
1825
|
};
|
|
1654
1826
|
};
|
|
@@ -1663,7 +1835,7 @@ export declare const elementDeclarations: {
|
|
|
1663
1835
|
readonly 'margin-bottom': "25px";
|
|
1664
1836
|
readonly 'font-size': "18px";
|
|
1665
1837
|
readonly 'font-weight': 700;
|
|
1666
|
-
readonly 'line-height': "
|
|
1838
|
+
readonly 'line-height': "1.333";
|
|
1667
1839
|
};
|
|
1668
1840
|
};
|
|
1669
1841
|
};
|
|
@@ -1678,7 +1850,7 @@ export declare const elementDeclarations: {
|
|
|
1678
1850
|
readonly 'margin-bottom': "25px";
|
|
1679
1851
|
readonly 'font-size': "14px";
|
|
1680
1852
|
readonly 'font-weight': 700;
|
|
1681
|
-
readonly 'line-height': "
|
|
1853
|
+
readonly 'line-height': "1.429";
|
|
1682
1854
|
};
|
|
1683
1855
|
};
|
|
1684
1856
|
};
|
|
@@ -1693,7 +1865,7 @@ export declare const elementDeclarations: {
|
|
|
1693
1865
|
readonly 'margin-bottom': "25px";
|
|
1694
1866
|
readonly 'font-size': "12px";
|
|
1695
1867
|
readonly 'font-weight': 700;
|
|
1696
|
-
readonly 'line-height': "
|
|
1868
|
+
readonly 'line-height': "1.5";
|
|
1697
1869
|
};
|
|
1698
1870
|
};
|
|
1699
1871
|
};
|
|
@@ -1708,10 +1880,15 @@ export declare const elementDeclarations: {
|
|
|
1708
1880
|
}>>;
|
|
1709
1881
|
readonly Image: {
|
|
1710
1882
|
readonly type: "image";
|
|
1883
|
+
readonly attributeValues: {
|
|
1884
|
+
readonly fetchPriority: readonly string[];
|
|
1885
|
+
readonly loadMode: readonly string[];
|
|
1886
|
+
};
|
|
1711
1887
|
readonly content: {
|
|
1712
1888
|
readonly attributes: {
|
|
1713
1889
|
readonly src: "https://cdn.plitzi.com/resources/img/placeholder-img.svg";
|
|
1714
1890
|
readonly alt: "";
|
|
1891
|
+
readonly decorative: false;
|
|
1715
1892
|
readonly fetchPriority: "auto";
|
|
1716
1893
|
readonly loadMode: "auto";
|
|
1717
1894
|
};
|
|
@@ -1764,10 +1941,14 @@ export declare const elementDeclarations: {
|
|
|
1764
1941
|
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
1765
1942
|
src?: string | undefined;
|
|
1766
1943
|
alt?: string | undefined;
|
|
1767
|
-
|
|
1944
|
+
decorative?: boolean | undefined;
|
|
1945
|
+
loadMode?: "auto" | "eager" | "lazy" | undefined;
|
|
1768
1946
|
}>>;
|
|
1769
1947
|
readonly LayoutContainer: {
|
|
1770
1948
|
readonly type: "layoutContainer";
|
|
1949
|
+
readonly attributeValues: {
|
|
1950
|
+
readonly subType: readonly string[];
|
|
1951
|
+
};
|
|
1771
1952
|
readonly content: {
|
|
1772
1953
|
readonly attributes: {
|
|
1773
1954
|
readonly subType: "div";
|
|
@@ -1822,6 +2003,10 @@ export declare const elementDeclarations: {
|
|
|
1822
2003
|
}>>;
|
|
1823
2004
|
readonly Link: {
|
|
1824
2005
|
readonly type: "link";
|
|
2006
|
+
readonly attributeValues: {
|
|
2007
|
+
readonly mode: readonly string[];
|
|
2008
|
+
readonly target: readonly string[];
|
|
2009
|
+
};
|
|
1825
2010
|
readonly content: {
|
|
1826
2011
|
readonly attributes: {
|
|
1827
2012
|
readonly href: "#";
|
|
@@ -1877,12 +2062,16 @@ export declare const elementDeclarations: {
|
|
|
1877
2062
|
};
|
|
1878
2063
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
1879
2064
|
mode?: "page" | "internal" | "external" | undefined;
|
|
2065
|
+
href?: string | undefined;
|
|
1880
2066
|
label?: string | undefined;
|
|
1881
2067
|
target?: "self" | "blank" | "parent" | "top" | undefined;
|
|
1882
|
-
href?: string | undefined;
|
|
1883
2068
|
}>>;
|
|
1884
2069
|
readonly List: {
|
|
1885
2070
|
readonly type: "list";
|
|
2071
|
+
readonly attributeValues: {
|
|
2072
|
+
readonly subType: readonly string[];
|
|
2073
|
+
readonly source: readonly string[];
|
|
2074
|
+
};
|
|
1886
2075
|
readonly sourceType: "list";
|
|
1887
2076
|
readonly content: {
|
|
1888
2077
|
readonly attributes: {
|
|
@@ -2102,7 +2291,7 @@ export declare const elementDeclarations: {
|
|
|
2102
2291
|
readonly base: {
|
|
2103
2292
|
readonly default: {
|
|
2104
2293
|
readonly 'font-size': "14px";
|
|
2105
|
-
readonly 'line-height': "
|
|
2294
|
+
readonly 'line-height': "1.714";
|
|
2106
2295
|
};
|
|
2107
2296
|
};
|
|
2108
2297
|
};
|
|
@@ -2368,6 +2557,7 @@ export declare const elementDeclarations: {
|
|
|
2368
2557
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
2369
2558
|
onLoad?: import('react').ReactEventHandler<"span"> | undefined;
|
|
2370
2559
|
onClick?: import('react').MouseEventHandler<"span"> | undefined;
|
|
2560
|
+
onPointerDown?: import('react').PointerEventHandler<"span"> | undefined;
|
|
2371
2561
|
onMouseEnter?: import('react').MouseEventHandler<"span"> | undefined;
|
|
2372
2562
|
onMouseLeave?: import('react').MouseEventHandler<"span"> | undefined;
|
|
2373
2563
|
onFocus?: import('react').FocusEventHandler<"span"> | undefined;
|
|
@@ -2556,7 +2746,6 @@ export declare const elementDeclarations: {
|
|
|
2556
2746
|
onTouchMoveCapture?: import('react').TouchEventHandler<"span"> | undefined;
|
|
2557
2747
|
onTouchStart?: import('react').TouchEventHandler<"span"> | undefined;
|
|
2558
2748
|
onTouchStartCapture?: import('react').TouchEventHandler<"span"> | undefined;
|
|
2559
|
-
onPointerDown?: import('react').PointerEventHandler<"span"> | undefined;
|
|
2560
2749
|
onPointerDownCapture?: import('react').PointerEventHandler<"span"> | undefined;
|
|
2561
2750
|
onPointerMove?: import('react').PointerEventHandler<"span"> | undefined;
|
|
2562
2751
|
onPointerMoveCapture?: import('react').PointerEventHandler<"span"> | undefined;
|
|
@@ -2776,6 +2965,10 @@ export declare const elementDeclarations: {
|
|
|
2776
2965
|
}>>;
|
|
2777
2966
|
readonly Pagination: {
|
|
2778
2967
|
readonly type: "pagination";
|
|
2968
|
+
readonly attributeValues: {
|
|
2969
|
+
readonly mode: readonly string[];
|
|
2970
|
+
readonly target: readonly string[];
|
|
2971
|
+
};
|
|
2779
2972
|
readonly triggers: {
|
|
2780
2973
|
readonly onPageChange: {
|
|
2781
2974
|
readonly action: "onPageChange";
|
|
@@ -2848,6 +3041,7 @@ export declare const elementDeclarations: {
|
|
|
2848
3041
|
};
|
|
2849
3042
|
} & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
|
|
2850
3043
|
mode?: "pages" | "loadMore" | undefined;
|
|
3044
|
+
label?: string | undefined;
|
|
2851
3045
|
target?: "url" | "interaction" | undefined;
|
|
2852
3046
|
pageParam?: string | undefined;
|
|
2853
3047
|
pageInfo?: import('../structure/Pagination/Pagination').PaginationPageInfo | undefined;
|
|
@@ -2966,6 +3160,9 @@ export declare const elementDeclarations: {
|
|
|
2966
3160
|
}>>;
|
|
2967
3161
|
readonly RichText: {
|
|
2968
3162
|
readonly type: "richText";
|
|
3163
|
+
readonly attributeValues: {
|
|
3164
|
+
readonly format: readonly string[];
|
|
3165
|
+
};
|
|
2969
3166
|
readonly content: {
|
|
2970
3167
|
readonly attributes: {
|
|
2971
3168
|
readonly content: "";
|
|
@@ -3260,7 +3457,7 @@ export declare const elementDeclarations: {
|
|
|
3260
3457
|
readonly base: {
|
|
3261
3458
|
readonly default: {
|
|
3262
3459
|
readonly 'font-size': "14px";
|
|
3263
|
-
readonly 'line-height': "
|
|
3460
|
+
readonly 'line-height': "1.714";
|
|
3264
3461
|
readonly display: "inline";
|
|
3265
3462
|
};
|
|
3266
3463
|
};
|
|
@@ -3273,6 +3470,9 @@ export declare const elementDeclarations: {
|
|
|
3273
3470
|
}>>;
|
|
3274
3471
|
readonly ThemeToggle: {
|
|
3275
3472
|
readonly type: "themeToggle";
|
|
3473
|
+
readonly attributeValues: {
|
|
3474
|
+
readonly subType: readonly string[];
|
|
3475
|
+
};
|
|
3276
3476
|
readonly triggers: {
|
|
3277
3477
|
readonly onThemeChange: {
|
|
3278
3478
|
readonly action: "onThemeChange";
|
|
@@ -3412,4 +3612,4 @@ export declare const elementDeclarations: {
|
|
|
3412
3612
|
}>>;
|
|
3413
3613
|
};
|
|
3414
3614
|
export type ElementDeclarationName = keyof typeof elementDeclarations;
|
|
3415
|
-
export { ApiContainerDeclaration, BlockHtmlDeclaration, BlockJsxDeclaration, ButtonDeclaration, ContainerDeclaration, CustomDeclaration, DialogContainerDeclaration, DropdownDeclaration, DropdownPopupDeclaration, FontAwesomeDeclaration, FormControlDeclaration, FormDeclaration, HeadingDeclaration, ImageDeclaration, LayoutContainerDeclaration, LinkDeclaration, ListDeclaration, ListItemDeclaration, LoadingDeclaration, MarkdownDeclaration, ModalContainerDeclaration, NodeHtmlDeclaration, NotFoundDeclaration, PageDeclaration, PaginationDeclaration, ParagraphDeclaration, ReferenceDeclaration, RichTextDeclaration, TabContainerBodyDeclaration, TabContainerDeclaration, TabContainerHeaderDeclaration, TabContainerItemDeclaration, TextDeclaration, ThemeToggleDeclaration, VideoDeclaration };
|
|
3615
|
+
export { ApiContainerDeclaration, BlockHtmlDeclaration, BlockJsxDeclaration, ButtonDeclaration, ChannelDeclaration, ContainerDeclaration, CustomDeclaration, DialogContainerDeclaration, DropdownDeclaration, DropdownPopupDeclaration, FontAwesomeDeclaration, FormControlDeclaration, FormDeclaration, HeadingDeclaration, ImageDeclaration, LayoutContainerDeclaration, LinkDeclaration, ListDeclaration, ListItemDeclaration, LoadingDeclaration, MarkdownDeclaration, ModalContainerDeclaration, NodeHtmlDeclaration, NotFoundDeclaration, PageDeclaration, PaginationDeclaration, ParagraphDeclaration, ReferenceDeclaration, RichTextDeclaration, TabContainerBodyDeclaration, TabContainerDeclaration, TabContainerHeaderDeclaration, TabContainerItemDeclaration, TextDeclaration, ThemeToggleDeclaration, VideoDeclaration };
|
|
@@ -23,25 +23,27 @@ import x from "../media/FontAwesome/declaration.mjs";
|
|
|
23
23
|
import S from "../media/Image/declaration.mjs";
|
|
24
24
|
import C from "../media/Video/declaration.mjs";
|
|
25
25
|
import w from "../provider/ApiContainer/declaration.mjs";
|
|
26
|
-
import T from "../
|
|
27
|
-
import E from "../structure/
|
|
28
|
-
import D from "../structure/
|
|
29
|
-
import O from "../structure/List/
|
|
30
|
-
import k from "../structure/
|
|
31
|
-
import A from "../structure/
|
|
32
|
-
import j from "../structure/
|
|
33
|
-
import M from "../structure/TabContainer/
|
|
34
|
-
import N from "../structure/TabContainer/
|
|
35
|
-
import P from "../structure/TabContainer/
|
|
26
|
+
import T from "../provider/Channel/declaration.mjs";
|
|
27
|
+
import E from "../structure/Container/declaration.mjs";
|
|
28
|
+
import D from "../structure/DialogContainer/declaration.mjs";
|
|
29
|
+
import O from "../structure/List/declaration.mjs";
|
|
30
|
+
import k from "../structure/List/ListItem/declaration.mjs";
|
|
31
|
+
import A from "../structure/ModalContainer/declaration.mjs";
|
|
32
|
+
import j from "../structure/Pagination/declaration.mjs";
|
|
33
|
+
import M from "../structure/TabContainer/declaration.mjs";
|
|
34
|
+
import N from "../structure/TabContainer/TabContainerBody/declaration.mjs";
|
|
35
|
+
import P from "../structure/TabContainer/TabContainerHeader/declaration.mjs";
|
|
36
|
+
import F from "../structure/TabContainer/TabContainerItem/declaration.mjs";
|
|
36
37
|
//#region src/elements/declarations/index.ts
|
|
37
|
-
var
|
|
38
|
+
var I = {
|
|
38
39
|
ApiContainer: w,
|
|
39
40
|
BlockHtml: e,
|
|
40
41
|
BlockJsx: t,
|
|
41
42
|
Button: a,
|
|
42
|
-
|
|
43
|
+
Channel: T,
|
|
44
|
+
Container: E,
|
|
43
45
|
Custom: n,
|
|
44
|
-
DialogContainer:
|
|
46
|
+
DialogContainer: D,
|
|
45
47
|
Dropdown: o,
|
|
46
48
|
DropdownPopup: s,
|
|
47
49
|
FontAwesome: x,
|
|
@@ -51,25 +53,25 @@ var F = {
|
|
|
51
53
|
Image: S,
|
|
52
54
|
LayoutContainer: _,
|
|
53
55
|
Link: l,
|
|
54
|
-
List:
|
|
55
|
-
ListItem:
|
|
56
|
+
List: O,
|
|
57
|
+
ListItem: k,
|
|
56
58
|
Loading: v,
|
|
57
59
|
Markdown: u,
|
|
58
|
-
ModalContainer:
|
|
60
|
+
ModalContainer: A,
|
|
59
61
|
NodeHtml: r,
|
|
60
62
|
NotFound: y,
|
|
61
63
|
Page: b,
|
|
62
|
-
Pagination:
|
|
64
|
+
Pagination: j,
|
|
63
65
|
Paragraph: d,
|
|
64
66
|
Reference: i,
|
|
65
67
|
RichText: f,
|
|
66
|
-
TabContainer:
|
|
67
|
-
TabContainerBody:
|
|
68
|
-
TabContainerHeader:
|
|
69
|
-
TabContainerItem:
|
|
68
|
+
TabContainer: M,
|
|
69
|
+
TabContainerBody: N,
|
|
70
|
+
TabContainerHeader: P,
|
|
71
|
+
TabContainerItem: F,
|
|
70
72
|
Text: p,
|
|
71
73
|
ThemeToggle: m,
|
|
72
74
|
Video: C
|
|
73
75
|
};
|
|
74
76
|
//#endregion
|
|
75
|
-
export { w as ApiContainerDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, a as ButtonDeclaration, T as ContainerDeclaration, n as CustomDeclaration,
|
|
77
|
+
export { w as ApiContainerDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, a as ButtonDeclaration, T as ChannelDeclaration, E as ContainerDeclaration, n as CustomDeclaration, D as DialogContainerDeclaration, o as DropdownDeclaration, s as DropdownPopupDeclaration, x as FontAwesomeDeclaration, g as FormControlDeclaration, h as FormDeclaration, c as HeadingDeclaration, S as ImageDeclaration, _ as LayoutContainerDeclaration, l as LinkDeclaration, O as ListDeclaration, k as ListItemDeclaration, v as LoadingDeclaration, u as MarkdownDeclaration, A as ModalContainerDeclaration, r as NodeHtmlDeclaration, y as NotFoundDeclaration, b as PageDeclaration, j as PaginationDeclaration, d as ParagraphDeclaration, i as ReferenceDeclaration, f as RichTextDeclaration, N as TabContainerBodyDeclaration, M as TabContainerDeclaration, P as TabContainerHeaderDeclaration, F as TabContainerItemDeclaration, p as TextDeclaration, m as ThemeToggleDeclaration, C as VideoDeclaration, I as elementDeclarations };
|
|
@@ -4,6 +4,9 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring/declare';
|
|
|
4
4
|
export type FormAttributes = AuthorableAttributes<FormProps>;
|
|
5
5
|
declare const declaration: {
|
|
6
6
|
readonly type: "form";
|
|
7
|
+
readonly attributeValues: {
|
|
8
|
+
readonly method: readonly string[];
|
|
9
|
+
};
|
|
7
10
|
readonly sourceType: "apiContainer";
|
|
8
11
|
readonly triggers: {
|
|
9
12
|
readonly onSubmit: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring/declare";
|
|
1
|
+
import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/authoring/declare";
|
|
2
2
|
//#region src/elements/form/Form/declaration.ts
|
|
3
|
-
var
|
|
3
|
+
var n = e()({
|
|
4
4
|
type: "form",
|
|
5
|
+
attributeValues: { method: t()(["get", "post"]) },
|
|
5
6
|
sourceType: "apiContainer",
|
|
6
7
|
triggers: { onSubmit: {
|
|
7
8
|
action: "onSubmit",
|
|
@@ -102,4 +103,4 @@ var t = e()({
|
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
//#endregion
|
|
105
|
-
export {
|
|
106
|
+
export { n as default };
|
|
@@ -2,11 +2,24 @@ import { ChangeEvent, RefObject } from 'react';
|
|
|
2
2
|
export type FormControlProps = {
|
|
3
3
|
ref: RefObject<HTMLElement>;
|
|
4
4
|
className: string;
|
|
5
|
-
subType: 'text' | 'number' | 'email' | 'password' | 'date' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden'
|
|
5
|
+
subType: 'text' | 'number' | 'email' | 'password' | 'date' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden'
|
|
6
|
+
/** The browser's own colour picker: its value is `#rrggbb`. */
|
|
7
|
+
| 'color';
|
|
6
8
|
name: string;
|
|
7
9
|
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* Keeps `label` out of sight while it still names the field — for a field whose design already says what it is for:
|
|
12
|
+
* a search box with a magnifier, a colour swatch. Without a label a screen reader or a browser agent finds an unnamed
|
|
13
|
+
* box; a placeholder names only a text field, and only until something is typed.
|
|
14
|
+
*/
|
|
15
|
+
hideLabel: boolean;
|
|
8
16
|
placeholder: string;
|
|
9
17
|
autoComplete: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Takes the focus as it appears — a search box opened by a shortcut is typed into at once. With the control's
|
|
20
|
+
* container shown only while wanted (`loadStrategy: 'visible'`), it appears each time it is opened.
|
|
21
|
+
*/
|
|
22
|
+
autoFocus: boolean;
|
|
10
23
|
disabled: boolean;
|
|
11
24
|
options: {
|
|
12
25
|
label: string;
|
|
@@ -36,16 +49,15 @@ export type FormControlProps = {
|
|
|
36
49
|
value: string;
|
|
37
50
|
error: string;
|
|
38
51
|
/**
|
|
39
|
-
* Supplied by `withFieldValue
|
|
52
|
+
* Supplied by `withFieldValue`, with or without a form around the control.
|
|
40
53
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* screen is exactly such a control: nothing to submit, and the change itself is the event.
|
|
54
|
+
* Inside a form the value is the form's; outside one it is the control's own, so a select that filters a screen
|
|
55
|
+
* works on its own — nothing to submit, and its `onChange` is the whole event. Validation only runs inside a form.
|
|
44
56
|
*/
|
|
45
57
|
handleChange?: (e: ChangeEvent<HTMLInputElement> | ChangeEvent<HTMLSelectElement> | ChangeEvent<HTMLTextAreaElement>) => void;
|
|
46
58
|
handleValidate?: () => void;
|
|
47
59
|
};
|
|
48
|
-
declare const FormControl: ({ ref, className, subType, name, label, placeholder, autoComplete, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element
|
|
60
|
+
declare const FormControl: ({ ref, className, subType, name, label, hideLabel, placeholder, autoComplete, autoFocus, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element;
|
|
49
61
|
declare const _default: {
|
|
50
62
|
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): import('react').JSX.Element;
|
|
51
63
|
displayName: string;
|