@webstudio-is/sdk-components-react-remix 0.143.0 → 0.144.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/components.js CHANGED
@@ -40,7 +40,7 @@ var Link = wrapLinkComponent(BaseLink);
40
40
  import { RichTextLink as BaseLink2 } from "@webstudio-is/sdk-components-react";
41
41
  var RichTextLink = wrapLinkComponent(BaseLink2);
42
42
 
43
- // src/form.tsx
43
+ // src/server-form.tsx
44
44
  import {
45
45
  forwardRef as forwardRef3,
46
46
  useRef,
@@ -61,7 +61,7 @@ var useOnFetchEnd = (fetcher, handler) => {
61
61
  prevFetcher.current = fetcher;
62
62
  }, [fetcher]);
63
63
  };
64
- var Form = forwardRef3(
64
+ var ServerForm = forwardRef3(
65
65
  ({ children, action, method, state = "initial", onStateChange, ...rest }, ref) => {
66
66
  const fetcher = useFetcher();
67
67
  const instanceId = getInstanceIdFromComponentProps(rest);
@@ -75,10 +75,20 @@ var Form = forwardRef3(
75
75
  ] });
76
76
  }
77
77
  );
78
- Form.displayName = "Form";
78
+ ServerForm.displayName = "Form";
79
+
80
+ // src/remix-form.tsx
81
+ import { forwardRef as forwardRef4 } from "react";
82
+ import { Form } from "@remix-run/react";
83
+ import { jsx as jsx4 } from "react/jsx-runtime";
84
+ var RemixForm = forwardRef4((props, ref) => {
85
+ return /* @__PURE__ */ jsx4(Form, { ...props, ref });
86
+ });
87
+ RemixForm.displayName = "Form";
79
88
  export {
80
89
  Body,
81
- Form,
90
+ ServerForm as Form,
82
91
  Link,
92
+ RemixForm,
83
93
  RichTextLink
84
94
  };
package/lib/metas.js CHANGED
@@ -592,13 +592,14 @@ var propsMeta = {
592
592
  // src/rich-text-link.ws.ts
593
593
  import { RichTextLink } from "@webstudio-is/sdk-components-react/metas";
594
594
 
595
- // src/form.ws.ts
595
+ // src/server-form.ws.ts
596
596
  import { Form as baseMeta } from "@webstudio-is/sdk-components-react/metas";
597
597
  import {
598
598
  showAttribute
599
599
  } from "@webstudio-is/react-sdk";
600
600
  var meta = {
601
601
  ...baseMeta,
602
+ label: "Form",
602
603
  states: [
603
604
  { selector: "[data-state=error]", label: "Error" },
604
605
  { selector: "[data-state=success]", label: "Success" }
@@ -698,9 +699,31 @@ var meta = {
698
699
  }
699
700
  ]
700
701
  };
702
+
703
+ // src/remix-form.ws.ts
704
+ import {
705
+ defaultStates
706
+ } from "@webstudio-is/react-sdk";
707
+ import { form } from "@webstudio-is/react-sdk/css-normalize";
708
+ import { FormIcon } from "@webstudio-is/icons/svg";
709
+ var presetStyle = {
710
+ form
711
+ };
712
+ var meta2 = {
713
+ category: "forms",
714
+ type: "container",
715
+ invalidAncestors: ["Form", "Button", "Link"],
716
+ label: "Form",
717
+ description: "Form control.",
718
+ icon: FormIcon,
719
+ states: defaultStates,
720
+ presetStyle,
721
+ order: 0
722
+ };
701
723
  export {
702
724
  Body,
703
725
  meta as Form,
704
726
  Link,
727
+ meta2 as RemixForm,
705
728
  RichTextLink
706
729
  };
package/lib/props.js CHANGED
@@ -593,13 +593,13 @@ var propsMeta = {
593
593
  import { RichTextLink } from "@webstudio-is/sdk-components-react/metas";
594
594
  var propsMeta2 = propsMeta;
595
595
 
596
- // src/form.ws.ts
596
+ // src/server-form.ws.ts
597
597
  import { Form as baseMeta } from "@webstudio-is/sdk-components-react/metas";
598
598
  import {
599
599
  showAttribute
600
600
  } from "@webstudio-is/react-sdk";
601
601
 
602
- // src/__generated__/form.props.ts
602
+ // src/__generated__/server-form.props.ts
603
603
  var props2 = {
604
604
  about: { required: false, control: "text", type: "string" },
605
605
  acceptCharset: {
@@ -1169,9 +1169,10 @@ var props2 = {
1169
1169
  vocab: { required: false, control: "text", type: "string" }
1170
1170
  };
1171
1171
 
1172
- // src/form.ws.ts
1172
+ // src/server-form.ws.ts
1173
1173
  var meta = {
1174
1174
  ...baseMeta,
1175
+ label: "Form",
1175
1176
  states: [
1176
1177
  { selector: "[data-state=error]", label: "Error" },
1177
1178
  { selector: "[data-state=success]", label: "Success" }
@@ -1275,9 +1276,586 @@ var propsMeta3 = {
1275
1276
  props: props2,
1276
1277
  initialProps: ["id", "className", "state", "action"]
1277
1278
  };
1279
+
1280
+ // src/remix-form.ws.ts
1281
+ import {
1282
+ defaultStates
1283
+ } from "@webstudio-is/react-sdk";
1284
+ import { form } from "@webstudio-is/react-sdk/css-normalize";
1285
+ import { FormIcon } from "@webstudio-is/icons/svg";
1286
+
1287
+ // src/__generated__/remix-form.props.ts
1288
+ var props3 = {
1289
+ about: { required: false, control: "text", type: "string" },
1290
+ acceptCharset: {
1291
+ required: false,
1292
+ control: "text",
1293
+ type: "string",
1294
+ description: "List of supported charsets."
1295
+ },
1296
+ accessKey: {
1297
+ required: false,
1298
+ control: "text",
1299
+ type: "string",
1300
+ description: "Keyboard shortcut to activate or add focus to the element."
1301
+ },
1302
+ action: {
1303
+ required: false,
1304
+ control: "text",
1305
+ type: "string",
1306
+ description: "The URI of a program that processes the information submitted via the form."
1307
+ },
1308
+ "aria-activedescendant": {
1309
+ description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
1310
+ required: false,
1311
+ control: "text",
1312
+ type: "string"
1313
+ },
1314
+ "aria-atomic": {
1315
+ description: "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
1316
+ required: false,
1317
+ control: "boolean",
1318
+ type: "boolean"
1319
+ },
1320
+ "aria-autocomplete": {
1321
+ description: "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
1322
+ required: false,
1323
+ control: "select",
1324
+ type: "string",
1325
+ options: ["list", "none", "inline", "both"]
1326
+ },
1327
+ "aria-braillelabel": {
1328
+ description: "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
1329
+ required: false,
1330
+ control: "text",
1331
+ type: "string"
1332
+ },
1333
+ "aria-brailleroledescription": {
1334
+ description: "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
1335
+ required: false,
1336
+ control: "text",
1337
+ type: "string"
1338
+ },
1339
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
1340
+ "aria-checked": {
1341
+ description: 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
1342
+ required: false,
1343
+ control: "text",
1344
+ type: "string"
1345
+ },
1346
+ "aria-colcount": {
1347
+ description: "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
1348
+ required: false,
1349
+ control: "number",
1350
+ type: "number"
1351
+ },
1352
+ "aria-colindex": {
1353
+ description: "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
1354
+ required: false,
1355
+ control: "number",
1356
+ type: "number"
1357
+ },
1358
+ "aria-colindextext": {
1359
+ description: "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
1360
+ required: false,
1361
+ control: "text",
1362
+ type: "string"
1363
+ },
1364
+ "aria-colspan": {
1365
+ description: "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
1366
+ required: false,
1367
+ control: "number",
1368
+ type: "number"
1369
+ },
1370
+ "aria-controls": {
1371
+ description: "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
1372
+ required: false,
1373
+ control: "text",
1374
+ type: "string"
1375
+ },
1376
+ "aria-current": {
1377
+ description: "Indicates the element that represents the current item within a container or set of related elements.",
1378
+ required: false,
1379
+ control: "text",
1380
+ type: "string"
1381
+ },
1382
+ "aria-describedby": {
1383
+ description: "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
1384
+ required: false,
1385
+ control: "text",
1386
+ type: "string"
1387
+ },
1388
+ "aria-description": {
1389
+ description: "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
1390
+ required: false,
1391
+ control: "text",
1392
+ type: "string"
1393
+ },
1394
+ "aria-details": {
1395
+ description: "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
1396
+ required: false,
1397
+ control: "text",
1398
+ type: "string"
1399
+ },
1400
+ "aria-disabled": {
1401
+ description: "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
1402
+ required: false,
1403
+ control: "boolean",
1404
+ type: "boolean"
1405
+ },
1406
+ "aria-dropeffect": {
1407
+ description: "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
1408
+ required: false,
1409
+ control: "select",
1410
+ type: "string",
1411
+ options: ["link", "none", "copy", "execute", "move", "popup"]
1412
+ },
1413
+ "aria-errormessage": {
1414
+ description: "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
1415
+ required: false,
1416
+ control: "text",
1417
+ type: "string"
1418
+ },
1419
+ "aria-expanded": {
1420
+ description: "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
1421
+ required: false,
1422
+ control: "boolean",
1423
+ type: "boolean"
1424
+ },
1425
+ "aria-flowto": {
1426
+ description: "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
1427
+ required: false,
1428
+ control: "text",
1429
+ type: "string"
1430
+ },
1431
+ "aria-grabbed": {
1432
+ description: `Indicates an element's "grabbed" state in a drag-and-drop operation.
1433
+ @deprecated in ARIA 1.1`,
1434
+ required: false,
1435
+ control: "boolean",
1436
+ type: "boolean"
1437
+ },
1438
+ "aria-haspopup": {
1439
+ description: "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
1440
+ required: false,
1441
+ control: "text",
1442
+ type: "string"
1443
+ },
1444
+ "aria-hidden": {
1445
+ description: "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
1446
+ required: false,
1447
+ control: "boolean",
1448
+ type: "boolean"
1449
+ },
1450
+ "aria-invalid": {
1451
+ description: "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
1452
+ required: false,
1453
+ control: "text",
1454
+ type: "string"
1455
+ },
1456
+ "aria-keyshortcuts": {
1457
+ description: "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
1458
+ required: false,
1459
+ control: "text",
1460
+ type: "string"
1461
+ },
1462
+ "aria-label": {
1463
+ description: "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.",
1464
+ required: false,
1465
+ control: "text",
1466
+ type: "string"
1467
+ },
1468
+ "aria-labelledby": {
1469
+ description: "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
1470
+ required: false,
1471
+ control: "text",
1472
+ type: "string"
1473
+ },
1474
+ "aria-level": {
1475
+ description: "Defines the hierarchical level of an element within a structure.",
1476
+ required: false,
1477
+ control: "number",
1478
+ type: "number"
1479
+ },
1480
+ "aria-live": {
1481
+ description: "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
1482
+ required: false,
1483
+ control: "radio",
1484
+ type: "string",
1485
+ options: ["off", "assertive", "polite"]
1486
+ },
1487
+ "aria-modal": {
1488
+ description: "Indicates whether an element is modal when displayed.",
1489
+ required: false,
1490
+ control: "boolean",
1491
+ type: "boolean"
1492
+ },
1493
+ "aria-multiline": {
1494
+ description: "Indicates whether a text box accepts multiple lines of input or only a single line.",
1495
+ required: false,
1496
+ control: "boolean",
1497
+ type: "boolean"
1498
+ },
1499
+ "aria-multiselectable": {
1500
+ description: "Indicates that the user may select more than one item from the current selectable descendants.",
1501
+ required: false,
1502
+ control: "boolean",
1503
+ type: "boolean"
1504
+ },
1505
+ "aria-orientation": {
1506
+ description: "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
1507
+ required: false,
1508
+ control: "radio",
1509
+ type: "string",
1510
+ options: ["horizontal", "vertical"]
1511
+ },
1512
+ "aria-owns": {
1513
+ description: "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
1514
+ required: false,
1515
+ control: "text",
1516
+ type: "string"
1517
+ },
1518
+ "aria-placeholder": {
1519
+ description: "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
1520
+ required: false,
1521
+ control: "text",
1522
+ type: "string"
1523
+ },
1524
+ "aria-posinset": {
1525
+ description: "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
1526
+ required: false,
1527
+ control: "number",
1528
+ type: "number"
1529
+ },
1530
+ "aria-pressed": {
1531
+ description: 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
1532
+ required: false,
1533
+ control: "text",
1534
+ type: "string"
1535
+ },
1536
+ "aria-readonly": {
1537
+ description: "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
1538
+ required: false,
1539
+ control: "boolean",
1540
+ type: "boolean"
1541
+ },
1542
+ "aria-relevant": {
1543
+ description: "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
1544
+ required: false,
1545
+ control: "select",
1546
+ type: "string",
1547
+ options: [
1548
+ "text",
1549
+ "additions",
1550
+ "additions removals",
1551
+ "additions text",
1552
+ "all",
1553
+ "removals",
1554
+ "removals additions",
1555
+ "removals text",
1556
+ "text additions",
1557
+ "text removals"
1558
+ ]
1559
+ },
1560
+ "aria-required": {
1561
+ description: "Indicates that user input is required on the element before a form may be submitted.",
1562
+ required: false,
1563
+ control: "boolean",
1564
+ type: "boolean"
1565
+ },
1566
+ "aria-roledescription": {
1567
+ description: "Defines a human-readable, author-localized description for the role of an element.",
1568
+ required: false,
1569
+ control: "text",
1570
+ type: "string"
1571
+ },
1572
+ "aria-rowcount": {
1573
+ description: "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
1574
+ required: false,
1575
+ control: "number",
1576
+ type: "number"
1577
+ },
1578
+ "aria-rowindex": {
1579
+ description: "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
1580
+ required: false,
1581
+ control: "number",
1582
+ type: "number"
1583
+ },
1584
+ "aria-rowindextext": {
1585
+ description: "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
1586
+ required: false,
1587
+ control: "text",
1588
+ type: "string"
1589
+ },
1590
+ "aria-rowspan": {
1591
+ description: "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
1592
+ required: false,
1593
+ control: "number",
1594
+ type: "number"
1595
+ },
1596
+ "aria-selected": {
1597
+ description: 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
1598
+ required: false,
1599
+ control: "boolean",
1600
+ type: "boolean"
1601
+ },
1602
+ "aria-setsize": {
1603
+ description: "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
1604
+ required: false,
1605
+ control: "number",
1606
+ type: "number"
1607
+ },
1608
+ "aria-sort": {
1609
+ description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
1610
+ required: false,
1611
+ control: "select",
1612
+ type: "string",
1613
+ options: ["none", "ascending", "descending", "other"]
1614
+ },
1615
+ "aria-valuemax": {
1616
+ description: "Defines the maximum allowed value for a range widget.",
1617
+ required: false,
1618
+ control: "number",
1619
+ type: "number"
1620
+ },
1621
+ "aria-valuemin": {
1622
+ description: "Defines the minimum allowed value for a range widget.",
1623
+ required: false,
1624
+ control: "number",
1625
+ type: "number"
1626
+ },
1627
+ "aria-valuenow": {
1628
+ description: "Defines the current value for a range widget.\n@see aria-valuetext.",
1629
+ required: false,
1630
+ control: "number",
1631
+ type: "number"
1632
+ },
1633
+ "aria-valuetext": {
1634
+ description: "Defines the human readable text alternative of aria-valuenow for a range widget.",
1635
+ required: false,
1636
+ control: "text",
1637
+ type: "string"
1638
+ },
1639
+ autoCapitalize: {
1640
+ required: false,
1641
+ control: "text",
1642
+ type: "string",
1643
+ description: "Sets whether input is automatically capitalized when entered by user."
1644
+ },
1645
+ autoComplete: {
1646
+ required: false,
1647
+ control: "text",
1648
+ type: "string",
1649
+ description: "Indicates whether controls in this form can by default have their valuesautomatically completed by the browser."
1650
+ },
1651
+ autoCorrect: { required: false, control: "text", type: "string" },
1652
+ autoFocus: {
1653
+ required: false,
1654
+ control: "boolean",
1655
+ type: "boolean",
1656
+ description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
1657
+ },
1658
+ autoSave: { required: false, control: "text", type: "string" },
1659
+ className: { required: false, control: "text", type: "string" },
1660
+ color: {
1661
+ required: false,
1662
+ control: "color",
1663
+ type: "string",
1664
+ description: "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."
1665
+ },
1666
+ content: {
1667
+ required: false,
1668
+ control: "text",
1669
+ type: "string",
1670
+ description: "A value associated with http-equiv orname depending on the context."
1671
+ },
1672
+ contextMenu: {
1673
+ required: false,
1674
+ control: "text",
1675
+ type: "string",
1676
+ description: "Defines the ID of a menu element which willserve as the element's context menu."
1677
+ },
1678
+ datatype: { required: false, control: "text", type: "string" },
1679
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
1680
+ dir: {
1681
+ required: false,
1682
+ control: "text",
1683
+ type: "string",
1684
+ description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
1685
+ },
1686
+ draggable: {
1687
+ required: false,
1688
+ control: "boolean",
1689
+ type: "boolean",
1690
+ description: "Defines whether the element can be dragged."
1691
+ },
1692
+ encType: {
1693
+ description: "`<form encType>` - enhancing beyond the normal string type and limiting\nto the built-in browser supported values",
1694
+ required: false,
1695
+ control: "radio",
1696
+ type: "string",
1697
+ options: [
1698
+ "application/x-www-form-urlencoded",
1699
+ "multipart/form-data",
1700
+ "text/plain"
1701
+ ]
1702
+ },
1703
+ hidden: {
1704
+ required: false,
1705
+ control: "boolean",
1706
+ type: "boolean",
1707
+ description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
1708
+ },
1709
+ id: {
1710
+ required: false,
1711
+ control: "text",
1712
+ type: "string",
1713
+ description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
1714
+ },
1715
+ inputMode: {
1716
+ description: "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",
1717
+ required: false,
1718
+ control: "select",
1719
+ type: "string",
1720
+ options: [
1721
+ "search",
1722
+ "text",
1723
+ "none",
1724
+ "tel",
1725
+ "url",
1726
+ "email",
1727
+ "numeric",
1728
+ "decimal"
1729
+ ]
1730
+ },
1731
+ is: {
1732
+ description: "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
1733
+ required: false,
1734
+ control: "text",
1735
+ type: "string"
1736
+ },
1737
+ itemID: { required: false, control: "text", type: "string" },
1738
+ itemProp: { required: false, control: "text", type: "string" },
1739
+ itemRef: { required: false, control: "text", type: "string" },
1740
+ itemScope: { required: false, control: "boolean", type: "boolean" },
1741
+ itemType: { required: false, control: "text", type: "string" },
1742
+ lang: {
1743
+ required: false,
1744
+ control: "text",
1745
+ type: "string",
1746
+ description: "Defines the language used in the element."
1747
+ },
1748
+ method: {
1749
+ required: false,
1750
+ control: "select",
1751
+ type: "string",
1752
+ options: ["get", "post", "put", "patch", "delete"],
1753
+ description: "Defines which HTTP method to use when submitting the form. Can be GET (default) or POST."
1754
+ },
1755
+ name: {
1756
+ required: false,
1757
+ control: "text",
1758
+ type: "string",
1759
+ description: "This name is important when submitting form data to the server, as it identifies the data associated with the input. When multiple inputs share the same name attribute, they are treated as part of the same group (e.g., radio buttons or checkboxes)."
1760
+ },
1761
+ nonce: { required: false, control: "text", type: "string" },
1762
+ noValidate: {
1763
+ required: false,
1764
+ control: "boolean",
1765
+ type: "boolean",
1766
+ description: "This attribute indicates that the form shouldn't be validated when submitted."
1767
+ },
1768
+ placeholder: {
1769
+ required: false,
1770
+ control: "text",
1771
+ type: "string",
1772
+ description: "Provides a hint to the user of what can be entered in the field."
1773
+ },
1774
+ prefix: { required: false, control: "text", type: "string" },
1775
+ property: { required: false, control: "text", type: "string" },
1776
+ radioGroup: { required: false, control: "text", type: "string" },
1777
+ rel: {
1778
+ required: false,
1779
+ control: "text",
1780
+ type: "string",
1781
+ description: "Specifies the relationship of the target object to the link object."
1782
+ },
1783
+ resource: { required: false, control: "text", type: "string" },
1784
+ results: { required: false, control: "number", type: "number" },
1785
+ rev: { required: false, control: "text", type: "string" },
1786
+ role: {
1787
+ required: false,
1788
+ control: "text",
1789
+ type: "string",
1790
+ description: "Defines an explicit role for an element for use by assistive technologies."
1791
+ },
1792
+ security: { required: false, control: "text", type: "string" },
1793
+ slot: {
1794
+ required: false,
1795
+ control: "text",
1796
+ type: "string",
1797
+ description: "Assigns a slot in a shadow DOM shadow tree to an element."
1798
+ },
1799
+ spellCheck: {
1800
+ required: false,
1801
+ control: "boolean",
1802
+ type: "boolean",
1803
+ description: "Indicates whether spell checking is allowed for the element."
1804
+ },
1805
+ suppressContentEditableWarning: {
1806
+ required: false,
1807
+ control: "boolean",
1808
+ type: "boolean"
1809
+ },
1810
+ suppressHydrationWarning: {
1811
+ required: false,
1812
+ control: "boolean",
1813
+ type: "boolean"
1814
+ },
1815
+ tabIndex: {
1816
+ required: false,
1817
+ control: "number",
1818
+ type: "number",
1819
+ description: "Overrides the browser's default tab order and follows the one specified instead."
1820
+ },
1821
+ target: {
1822
+ required: false,
1823
+ control: "text",
1824
+ type: "string",
1825
+ description: "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)"
1826
+ },
1827
+ title: {
1828
+ required: false,
1829
+ control: "text",
1830
+ type: "string",
1831
+ description: "Text to be displayed in a tooltip when hovering over the element."
1832
+ },
1833
+ translate: {
1834
+ required: false,
1835
+ control: "radio",
1836
+ type: "string",
1837
+ options: ["yes", "no"],
1838
+ description: "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."
1839
+ },
1840
+ typeof: { required: false, control: "text", type: "string" },
1841
+ unselectable: {
1842
+ required: false,
1843
+ control: "radio",
1844
+ type: "string",
1845
+ options: ["on", "off"]
1846
+ },
1847
+ vocab: { required: false, control: "text", type: "string" }
1848
+ };
1849
+
1850
+ // src/remix-form.ws.ts
1851
+ var propsMeta4 = {
1852
+ props: props3,
1853
+ initialProps: ["id", "className"]
1854
+ };
1278
1855
  export {
1279
1856
  Body2 as Body,
1280
1857
  propsMeta3 as Form,
1281
1858
  propsMeta as Link,
1859
+ propsMeta4 as RemixForm,
1282
1860
  propsMeta2 as RichTextLink
1283
1861
  };
@@ -0,0 +1,2 @@
1
+ import type { PropMeta } from "@webstudio-is/react-sdk";
2
+ export declare const props: Record<string, PropMeta>;
@@ -1,4 +1,5 @@
1
1
  export { Body } from "./body";
2
2
  export { Link } from "./link";
3
3
  export { RichTextLink } from "./rich-text-link";
4
- export { Form } from "./form";
4
+ export { ServerForm as Form } from "./server-form";
5
+ export { RemixForm } from "./remix-form";
@@ -3,7 +3,7 @@ export declare const Link: import("react").ForwardRefExoticComponent<Omit<Omit<O
3
3
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
4
4
  }, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref">, "target"> & {
5
5
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
6
- prefetch?: "none" | "viewport" | "intent" | "render" | undefined;
6
+ prefetch?: "none" | "intent" | "render" | "viewport" | undefined;
7
7
  reloadDocument?: boolean | undefined;
8
8
  replace?: boolean | undefined;
9
9
  preventScrollReset?: boolean | undefined;
@@ -1,4 +1,5 @@
1
1
  export { meta as Body } from "./body.ws";
2
2
  export { meta as Link } from "./link.ws";
3
3
  export { meta as RichTextLink } from "./rich-text-link.ws";
4
- export { meta as Form } from "./form.ws";
4
+ export { meta as Form } from "./server-form.ws";
5
+ export { meta as RemixForm } from "./remix-form.ws";
@@ -1,4 +1,5 @@
1
1
  export { propsMeta as Body } from "./body.ws";
2
2
  export { propsMeta as Link } from "./link.ws";
3
3
  export { propsMeta as RichTextLink } from "./rich-text-link.ws";
4
- export { propsMeta as Form } from "./form.ws";
4
+ export { propsMeta as Form } from "./server-form.ws";
5
+ export { propsMeta as RemixForm } from "./remix-form.ws";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { type FormProps } from "@remix-run/react";
3
+ export declare const defaultTag = "form";
4
+ export declare const RemixForm: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & Pick<FormProps, "encType"> & {
5
+ method?: "get" | "post" | "put" | "delete" | "patch" | undefined;
6
+ }, "ref"> & import("react").RefAttributes<HTMLFormElement>>;
@@ -3,7 +3,7 @@ export declare const RichTextLink: import("react").ForwardRefExoticComponent<Omi
3
3
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
4
4
  }, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref">, "target"> & {
5
5
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
6
- prefetch?: "none" | "viewport" | "intent" | "render" | undefined;
6
+ prefetch?: "none" | "intent" | "render" | "viewport" | undefined;
7
7
  reloadDocument?: boolean | undefined;
8
8
  replace?: boolean | undefined;
9
9
  preventScrollReset?: boolean | undefined;
@@ -2,7 +2,7 @@
2
2
  import { type FormProps } from "@remix-run/react";
3
3
  export declare const defaultTag = "form";
4
4
  type State = "initial" | "success" | "error";
5
- export declare const Form: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
5
+ export declare const ServerForm: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
6
6
  /** 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. */
7
7
  state?: State | undefined;
8
8
  encType?: FormProps["encType"];
@@ -0,0 +1,3 @@
1
+ import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
2
+ export declare const meta: WsComponentMeta;
3
+ export declare const propsMeta: WsComponentPropsMeta;
@@ -4,7 +4,7 @@ export declare const wrapLinkComponent: (BaseLink: typeof Link) => import("react
4
4
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
5
5
  }, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref">, "target"> & {
6
6
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
7
- prefetch?: "none" | "viewport" | "intent" | "render" | undefined;
7
+ prefetch?: "none" | "intent" | "render" | "viewport" | undefined;
8
8
  reloadDocument?: boolean | undefined;
9
9
  replace?: boolean | undefined;
10
10
  preventScrollReset?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react-remix",
3
- "version": "0.143.0",
3
+ "version": "0.144.0",
4
4
  "description": "Webstudio components for Remix",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -38,19 +38,19 @@
38
38
  "react-dom": "^18.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@webstudio-is/form-handlers": "0.143.0",
42
- "@webstudio-is/icons": "0.143.0",
43
- "@webstudio-is/sdk-components-react": "0.143.0",
44
- "@webstudio-is/react-sdk": "0.143.0"
41
+ "@webstudio-is/icons": "0.144.0",
42
+ "@webstudio-is/react-sdk": "0.144.0",
43
+ "@webstudio-is/form-handlers": "0.144.0",
44
+ "@webstudio-is/sdk-components-react": "0.144.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@remix-run/react": "^1.19.2",
47
+ "@remix-run/react": "^2.8.1",
48
48
  "@types/react": "^18.2.21",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "react": "^18.2.0",
51
51
  "react-dom": "^18.2.0",
52
52
  "typescript": "5.2.2",
53
- "@webstudio-is/generate-arg-types": "0.143.0",
53
+ "@webstudio-is/generate-arg-types": "0.144.0",
54
54
  "@webstudio-is/tsconfig": "1.0.7"
55
55
  },
56
56
  "scripts": {
File without changes