@webstudio-is/sdk-components-react-remix 0.87.1 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,12 @@ import type { PropMeta } from "@webstudio-is/generate-arg-types";
2
2
 
3
3
  export const props: Record<string, PropMeta> = {
4
4
  about: { required: false, control: "text", type: "string" },
5
- accessKey: { required: false, control: "text", type: "string" },
5
+ accessKey: {
6
+ required: false,
7
+ control: "text",
8
+ type: "string",
9
+ description: "Keyboard shortcut to activate or add focus to the element.",
10
+ },
6
11
  "aria-activedescendant": {
7
12
  description:
8
13
  "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
@@ -183,7 +188,7 @@ export const props: Record<string, PropMeta> = {
183
188
  },
184
189
  "aria-label": {
185
190
  description:
186
- "Defines a string value that labels the current element.\n@see aria-labelledby.",
191
+ "Provides the accessible name that describes an interactive element if no other accessible name exists, for example in a button that contains an image with no text.",
187
192
  required: false,
188
193
  control: "text",
189
194
  type: "string",
@@ -382,22 +387,85 @@ export const props: Record<string, PropMeta> = {
382
387
  control: "text",
383
388
  type: "string",
384
389
  },
385
- autoCapitalize: { required: false, control: "text", type: "string" },
390
+ autoCapitalize: {
391
+ required: false,
392
+ control: "text",
393
+ type: "string",
394
+ description:
395
+ "Sets whether input is automatically capitalized when entered by user.",
396
+ },
386
397
  autoCorrect: { required: false, control: "text", type: "string" },
387
- autoFocus: { required: false, control: "boolean", type: "boolean" },
398
+ autoFocus: {
399
+ required: false,
400
+ control: "boolean",
401
+ type: "boolean",
402
+ description:
403
+ "Indicates that an element should be focused on page load, or when its parent dialog is displayed.",
404
+ },
388
405
  autoSave: { required: false, control: "text", type: "string" },
389
406
  className: { required: false, control: "text", type: "string" },
390
- color: { required: false, control: "color", type: "string" },
391
- content: { required: false, control: "text", type: "string" },
392
- contextMenu: { required: false, control: "text", type: "string" },
407
+ color: {
408
+ required: false,
409
+ control: "color",
410
+ type: "string",
411
+ description:
412
+ "This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. Note: This is a legacy attribute. Please use the CSS color property instead.",
413
+ },
414
+ content: {
415
+ required: false,
416
+ control: "text",
417
+ type: "string",
418
+ description:
419
+ "A value associated with http-equiv orname depending on the context.",
420
+ },
421
+ contextMenu: {
422
+ required: false,
423
+ control: "text",
424
+ type: "string",
425
+ description:
426
+ "Defines the ID of a menu element which willserve as the element's context menu.",
427
+ },
393
428
  datatype: { required: false, control: "text", type: "string" },
394
429
  defaultChecked: { required: false, control: "boolean", type: "boolean" },
395
- dir: { required: false, control: "text", type: "string" },
396
- draggable: { required: false, control: "boolean", type: "boolean" },
397
- hidden: { required: false, control: "boolean", type: "boolean" },
398
- href: { required: false, control: "text", type: "string" },
399
- hrefLang: { required: false, control: "text", type: "string" },
400
- id: { required: false, control: "text", type: "string" },
430
+ dir: {
431
+ required: false,
432
+ control: "text",
433
+ type: "string",
434
+ description:
435
+ "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)",
436
+ },
437
+ draggable: {
438
+ required: false,
439
+ control: "boolean",
440
+ type: "boolean",
441
+ description: "Defines whether the element can be dragged.",
442
+ },
443
+ hidden: {
444
+ required: false,
445
+ control: "boolean",
446
+ type: "boolean",
447
+ description:
448
+ "Prevents rendering of given element, while keeping child elements, e.g. script elements, active.",
449
+ },
450
+ href: {
451
+ required: false,
452
+ control: "text",
453
+ type: "string",
454
+ description: "The URL of a linked resource.",
455
+ },
456
+ hrefLang: {
457
+ required: false,
458
+ control: "text",
459
+ type: "string",
460
+ description: "Specifies the language of the linked resource.",
461
+ },
462
+ id: {
463
+ required: false,
464
+ control: "text",
465
+ type: "string",
466
+ description:
467
+ "Often used with CSS to style a specific element. The value of this attribute must be unique.",
468
+ },
401
469
  inputMode: {
402
470
  description:
403
471
  "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
@@ -427,11 +495,34 @@ export const props: Record<string, PropMeta> = {
427
495
  itemRef: { required: false, control: "text", type: "string" },
428
496
  itemScope: { required: false, control: "boolean", type: "boolean" },
429
497
  itemType: { required: false, control: "text", type: "string" },
430
- lang: { required: false, control: "text", type: "string" },
431
- media: { required: false, control: "text", type: "string" },
498
+ lang: {
499
+ required: false,
500
+ control: "text",
501
+ type: "string",
502
+ description: "Defines the language used in the element.",
503
+ },
504
+ media: {
505
+ required: false,
506
+ control: "text",
507
+ type: "string",
508
+ description:
509
+ "Specifies a hint of the media for which the linked resource was designed.",
510
+ },
432
511
  nonce: { required: false, control: "text", type: "string" },
433
- ping: { required: false, control: "text", type: "string" },
434
- placeholder: { required: false, control: "text", type: "string" },
512
+ ping: {
513
+ required: false,
514
+ control: "text",
515
+ type: "string",
516
+ description:
517
+ "The ping attribute specifies a space-separated list of URLs to be notified if a user follows the hyperlink.",
518
+ },
519
+ placeholder: {
520
+ required: false,
521
+ control: "text",
522
+ type: "string",
523
+ description:
524
+ "Provides a hint to the user of what can be entered in the field.",
525
+ },
435
526
  prefetch: {
436
527
  required: false,
437
528
  control: "select",
@@ -457,17 +548,40 @@ export const props: Record<string, PropMeta> = {
457
548
  "strict-origin-when-cross-origin",
458
549
  "unsafe-url",
459
550
  ],
551
+ description: "Specifies which referrer is sent when fetching the resource.",
552
+ },
553
+ rel: {
554
+ required: false,
555
+ control: "text",
556
+ type: "string",
557
+ description:
558
+ "Specifies the relationship of the target object to the link object.",
460
559
  },
461
- rel: { required: false, control: "text", type: "string" },
462
560
  reloadDocument: { required: false, control: "boolean", type: "boolean" },
463
561
  replace: { required: false, control: "boolean", type: "boolean" },
464
562
  resource: { required: false, control: "text", type: "string" },
465
563
  results: { required: false, control: "number", type: "number" },
466
564
  rev: { required: false, control: "text", type: "string" },
467
- role: { required: false, control: "text", type: "string" },
565
+ role: {
566
+ required: false,
567
+ control: "text",
568
+ type: "string",
569
+ description:
570
+ "Defines an explicit role for an element for use by assistive technologies.",
571
+ },
468
572
  security: { required: false, control: "text", type: "string" },
469
- slot: { required: false, control: "text", type: "string" },
470
- spellCheck: { required: false, control: "boolean", type: "boolean" },
573
+ slot: {
574
+ required: false,
575
+ control: "text",
576
+ type: "string",
577
+ description: "Assigns a slot in a shadow DOM shadow tree to an element.",
578
+ },
579
+ spellCheck: {
580
+ required: false,
581
+ control: "boolean",
582
+ type: "boolean",
583
+ description: "Indicates whether spell checking is allowed for the element.",
584
+ },
471
585
  suppressContentEditableWarning: {
472
586
  required: false,
473
587
  control: "boolean",
@@ -478,21 +592,42 @@ export const props: Record<string, PropMeta> = {
478
592
  control: "boolean",
479
593
  type: "boolean",
480
594
  },
481
- tabIndex: { required: false, control: "number", type: "number" },
595
+ tabIndex: {
596
+ required: false,
597
+ control: "number",
598
+ type: "number",
599
+ description:
600
+ "Overrides the browser's default tab order and follows the one specified instead.",
601
+ },
482
602
  target: {
483
603
  required: false,
484
604
  control: "select",
485
605
  type: "string",
486
606
  options: ["_self", "_blank", "_parent", "_top"],
607
+ description:
608
+ "Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)",
609
+ },
610
+ title: {
611
+ required: false,
612
+ control: "text",
613
+ type: "string",
614
+ description:
615
+ "Text to be displayed in a tooltip when hovering over the element.",
487
616
  },
488
- title: { required: false, control: "text", type: "string" },
489
617
  translate: {
490
618
  required: false,
491
619
  control: "radio",
492
620
  type: "string",
493
621
  options: ["yes", "no"],
622
+ description:
623
+ "Specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged.",
624
+ },
625
+ type: {
626
+ required: false,
627
+ control: "text",
628
+ type: "string",
629
+ description: "Defines the type of the element.",
494
630
  },
495
- type: { required: false, control: "text", type: "string" },
496
631
  typeof: { required: false, control: "text", type: "string" },
497
632
  unselectable: {
498
633
  required: false,
package/src/form.tsx CHANGED
@@ -40,6 +40,7 @@ type State = "initial" | "success" | "error";
40
40
  export const Form = forwardRef<
41
41
  ElementRef<typeof defaultTag>,
42
42
  ComponentProps<typeof defaultTag> & {
43
+ /** Use this property to reveal the Success and Error states on the canvas so they can be styled. The Initial state is displayed when the page first opens. The Success and Error states are displayed depending on whether the Form submits successfully or unsuccessfully. */
43
44
  state?: State;
44
45
  encType?: FormProps["encType"];
45
46
  }
package/src/form.ws.tsx CHANGED
@@ -21,6 +21,7 @@ export const meta: WsComponentMeta = {
21
21
  type: "container",
22
22
  invalidAncestors: ["Form"],
23
23
  label: "Form",
24
+ description: "Collect information from your users using validation rules.",
24
25
  icon: FormIcon,
25
26
  presetStyle,
26
27
  order: 0,