@webstudio-is/sdk-components-react-radix 0.87.0 → 0.88.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.
Files changed (182) hide show
  1. package/lib/__generated__/accordion.props.js +0 -5
  2. package/lib/__generated__/button.props.js +0 -21
  3. package/lib/__generated__/checkbox.props.js +850 -0
  4. package/lib/__generated__/collapsible.props.js +0 -2
  5. package/lib/__generated__/dialog.props.js +0 -11
  6. package/lib/__generated__/label.props.js +0 -1
  7. package/lib/__generated__/navigation-menu.props.js +2104 -0
  8. package/lib/__generated__/popover.props.js +0 -3
  9. package/lib/__generated__/radio-group.props.js +1282 -0
  10. package/lib/__generated__/select.props.js +2962 -0
  11. package/lib/__generated__/sheet.props.js +0 -11
  12. package/lib/__generated__/switch.props.js +850 -0
  13. package/lib/__generated__/tabs.props.js +428 -5
  14. package/lib/__generated__/tooltip.props.js +0 -2
  15. package/lib/accordion.js +11 -4
  16. package/lib/accordion.ws.js +87 -72
  17. package/lib/checkbox.js +13 -0
  18. package/lib/checkbox.ws.js +151 -0
  19. package/lib/cjs/__generated__/accordion.props.js +0 -5
  20. package/lib/cjs/__generated__/button.props.js +0 -21
  21. package/lib/cjs/__generated__/checkbox.props.js +870 -0
  22. package/lib/cjs/__generated__/collapsible.props.js +0 -2
  23. package/lib/cjs/__generated__/dialog.props.js +0 -11
  24. package/lib/cjs/__generated__/label.props.js +0 -1
  25. package/lib/cjs/__generated__/navigation-menu.props.js +2124 -0
  26. package/lib/cjs/__generated__/popover.props.js +0 -3
  27. package/lib/cjs/__generated__/radio-group.props.js +1302 -0
  28. package/lib/cjs/__generated__/select.props.js +2982 -0
  29. package/lib/cjs/__generated__/sheet.props.js +0 -11
  30. package/lib/cjs/__generated__/switch.props.js +870 -0
  31. package/lib/cjs/__generated__/tabs.props.js +428 -5
  32. package/lib/cjs/__generated__/tooltip.props.js +0 -2
  33. package/lib/cjs/accordion.js +11 -4
  34. package/lib/cjs/accordion.ws.js +85 -71
  35. package/lib/cjs/{textarea.js → checkbox.js} +9 -6
  36. package/lib/cjs/checkbox.ws.js +172 -0
  37. package/lib/cjs/collapsible.ws.js +4 -1
  38. package/lib/cjs/components.js +27 -14
  39. package/lib/cjs/dialog.ws.js +17 -17
  40. package/lib/cjs/hooks.js +5 -1
  41. package/lib/cjs/label.ws.js +1 -1
  42. package/lib/cjs/metas.js +29 -14
  43. package/lib/cjs/navigation-menu.js +107 -0
  44. package/lib/cjs/navigation-menu.ws.js +513 -0
  45. package/lib/cjs/popover.ws.js +12 -9
  46. package/lib/cjs/props.js +27 -14
  47. package/lib/cjs/{button.js → radio-group.js} +10 -8
  48. package/lib/cjs/radio-group.ws.js +188 -0
  49. package/lib/cjs/select.js +81 -0
  50. package/lib/cjs/select.ws.js +349 -0
  51. package/lib/cjs/sheet.ws.js +87 -176
  52. package/lib/cjs/{input.js → switch.js} +8 -9
  53. package/lib/cjs/switch.ws.js +171 -0
  54. package/lib/cjs/tabs.js +2 -3
  55. package/lib/cjs/tabs.ws.js +13 -18
  56. package/lib/cjs/theme/styles.js +100 -0
  57. package/lib/cjs/theme/tailwind-classes.js +125 -16
  58. package/lib/cjs/theme/tailwind-colors.js +1 -0
  59. package/lib/cjs/tooltip.ws.js +11 -8
  60. package/lib/collapsible.ws.js +4 -1
  61. package/lib/components.js +44 -22
  62. package/lib/dialog.ws.js +17 -17
  63. package/lib/hooks.js +5 -1
  64. package/lib/label.ws.js +1 -1
  65. package/lib/metas.js +58 -24
  66. package/lib/navigation-menu.js +85 -0
  67. package/lib/navigation-menu.ws.js +500 -0
  68. package/lib/popover.ws.js +12 -9
  69. package/lib/props.js +56 -24
  70. package/lib/radio-group.js +11 -0
  71. package/lib/radio-group.ws.js +170 -0
  72. package/lib/select.js +73 -0
  73. package/lib/select.ws.js +337 -0
  74. package/lib/sheet.ws.js +88 -194
  75. package/lib/switch.js +7 -0
  76. package/lib/switch.ws.js +143 -0
  77. package/lib/tabs.js +3 -5
  78. package/lib/tabs.ws.js +14 -19
  79. package/lib/theme/styles.js +70 -0
  80. package/lib/theme/tailwind-classes.js +125 -16
  81. package/lib/theme/tailwind-colors.js +1 -0
  82. package/lib/tooltip.ws.js +11 -8
  83. package/lib/types/__generated__/checkbox.props.d.ts +3 -0
  84. package/lib/types/__generated__/navigation-menu.props.d.ts +8 -0
  85. package/lib/types/__generated__/radio-group.props.d.ts +4 -0
  86. package/lib/types/__generated__/select.props.d.ts +9 -0
  87. package/lib/types/__generated__/switch.props.d.ts +3 -0
  88. package/lib/types/checkbox.d.ts +6 -0
  89. package/lib/types/checkbox.stories.d.ts +11 -0
  90. package/lib/types/checkbox.ws.d.ts +5 -0
  91. package/lib/types/components.d.ts +5 -4
  92. package/lib/types/metas.d.ts +6 -4
  93. package/lib/types/navigation-menu.d.ts +15 -0
  94. package/lib/types/navigation-menu.ws.d.ts +15 -0
  95. package/lib/types/props.d.ts +5 -4
  96. package/lib/types/radio-group.d.ts +5 -0
  97. package/lib/types/radio-group.stories.d.ts +9 -0
  98. package/lib/types/radio-group.ws.d.ts +7 -0
  99. package/lib/types/select.d.ts +12 -0
  100. package/lib/types/select.ws.d.ts +17 -0
  101. package/lib/types/sheet.ws.d.ts +2 -15
  102. package/lib/types/switch.d.ts +4 -0
  103. package/lib/types/switch.stories.d.ts +9 -0
  104. package/lib/types/switch.ws.d.ts +5 -0
  105. package/lib/types/tabs.d.ts +3 -12
  106. package/lib/types/theme/radix-common-types.d.ts +3 -2
  107. package/lib/types/theme/styles.d.ts +215 -0
  108. package/lib/types/theme/tailwind-classes.d.ts +16 -6
  109. package/lib/types/theme/tailwind-colors.d.ts +1 -0
  110. package/lib/types/theme/tailwind-theme.d.ts +1 -1
  111. package/package.json +12 -7
  112. package/src/__generated__/accordion.props.ts +0 -5
  113. package/src/__generated__/button.props.ts +0 -21
  114. package/src/__generated__/checkbox.props.ts +948 -0
  115. package/src/__generated__/collapsible.props.ts +0 -2
  116. package/src/__generated__/dialog.props.ts +0 -11
  117. package/src/__generated__/label.props.ts +0 -1
  118. package/src/__generated__/navigation-menu.props.ts +2349 -0
  119. package/src/__generated__/popover.props.ts +0 -3
  120. package/src/__generated__/radio-group.props.ts +1429 -0
  121. package/src/__generated__/select.props.ts +3304 -0
  122. package/src/__generated__/sheet.props.ts +0 -11
  123. package/src/__generated__/switch.props.ts +948 -0
  124. package/src/__generated__/tabs.props.ts +477 -4
  125. package/src/__generated__/tooltip.props.ts +0 -2
  126. package/src/accordion.tsx +14 -7
  127. package/src/accordion.ws.ts +85 -70
  128. package/src/{textarea.stories.ts → checkbox.stories.ts} +6 -11
  129. package/src/checkbox.tsx +22 -0
  130. package/src/checkbox.ws.ts +151 -0
  131. package/src/collapsible.ws.ts +4 -1
  132. package/src/components.ts +25 -12
  133. package/src/dialog.ws.tsx +15 -16
  134. package/src/hooks.ts +4 -0
  135. package/src/label.ws.ts +1 -1
  136. package/src/metas.ts +36 -12
  137. package/src/navigation-menu.stories.tsx +21 -0
  138. package/src/navigation-menu.tsx +130 -0
  139. package/src/navigation-menu.ws.ts +523 -0
  140. package/src/popover.ws.tsx +12 -9
  141. package/src/props.ts +35 -12
  142. package/src/{input.stories.ts → radio-group.stories.ts} +6 -15
  143. package/src/radio-group.tsx +17 -0
  144. package/src/radio-group.ws.ts +174 -0
  145. package/src/select.stories.tsx +21 -0
  146. package/src/select.tsx +107 -0
  147. package/src/select.ws.ts +347 -0
  148. package/src/sheet.ws.tsx +89 -209
  149. package/src/{button.stories.ts → switch.stories.ts} +6 -19
  150. package/src/switch.tsx +10 -0
  151. package/src/switch.ws.ts +143 -0
  152. package/src/tabs.tsx +4 -17
  153. package/src/tabs.ws.ts +17 -19
  154. package/src/theme/radix-common-types.ts +3 -2
  155. package/src/theme/styles.ts +80 -0
  156. package/src/theme/tailwind-classes.ts +150 -14
  157. package/src/theme/tailwind-colors.ts +1 -0
  158. package/src/tooltip.ws.tsx +11 -8
  159. package/lib/button.js +0 -8
  160. package/lib/button.ws.js +0 -133
  161. package/lib/cjs/button.ws.js +0 -160
  162. package/lib/cjs/input.ws.js +0 -103
  163. package/lib/cjs/textarea.ws.js +0 -98
  164. package/lib/input.js +0 -8
  165. package/lib/input.ws.js +0 -75
  166. package/lib/textarea.js +0 -8
  167. package/lib/textarea.ws.js +0 -70
  168. package/lib/types/button.d.ts +0 -7
  169. package/lib/types/button.stories.d.ts +0 -20
  170. package/lib/types/button.ws.d.ts +0 -7
  171. package/lib/types/input.d.ts +0 -2
  172. package/lib/types/input.stories.d.ts +0 -20
  173. package/lib/types/input.ws.d.ts +0 -3
  174. package/lib/types/textarea.d.ts +0 -2
  175. package/lib/types/textarea.stories.d.ts +0 -14
  176. package/lib/types/textarea.ws.d.ts +0 -3
  177. package/src/button.tsx +0 -25
  178. package/src/button.ws.ts +0 -155
  179. package/src/input.tsx +0 -12
  180. package/src/input.ws.ts +0 -78
  181. package/src/textarea.tsx +0 -12
  182. package/src/textarea.ws.ts +0 -74
@@ -399,7 +399,6 @@ export const propsTabs: Record<string, PropMeta> = {
399
399
  content: { required: false, control: "text", type: "string" },
400
400
  contextMenu: { required: false, control: "text", type: "string" },
401
401
  datatype: { required: false, control: "text", type: "string" },
402
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
403
402
  dir: {
404
403
  description: "The direction of navigation between toolbar items.",
405
404
  required: false,
@@ -876,7 +875,6 @@ export const propsTabsList: Record<string, PropMeta> = {
876
875
  control: "text",
877
876
  type: "string",
878
877
  },
879
- asChild: { required: false, control: "boolean", type: "boolean" },
880
878
  autoCapitalize: { required: false, control: "text", type: "string" },
881
879
  autoCorrect: { required: false, control: "text", type: "string" },
882
880
  autoFocus: { required: false, control: "boolean", type: "boolean" },
@@ -886,7 +884,6 @@ export const propsTabsList: Record<string, PropMeta> = {
886
884
  content: { required: false, control: "text", type: "string" },
887
885
  contextMenu: { required: false, control: "text", type: "string" },
888
886
  datatype: { required: false, control: "text", type: "string" },
889
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
890
887
  dir: { required: false, control: "text", type: "string" },
891
888
  draggable: { required: false, control: "boolean", type: "boolean" },
892
889
  hidden: { required: false, control: "boolean", type: "boolean" },
@@ -963,7 +960,484 @@ export const propsTabsList: Record<string, PropMeta> = {
963
960
  vocab: { required: false, control: "text", type: "string" },
964
961
  };
965
962
  export const propsTabsTrigger: Record<string, PropMeta> = {
963
+ about: { required: false, control: "text", type: "string" },
964
+ accessKey: { required: false, control: "text", type: "string" },
965
+ "aria-activedescendant": {
966
+ description:
967
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
968
+ required: false,
969
+ control: "text",
970
+ type: "string",
971
+ },
972
+ "aria-atomic": {
973
+ description:
974
+ "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.",
975
+ required: false,
976
+ control: "boolean",
977
+ type: "boolean",
978
+ },
979
+ "aria-autocomplete": {
980
+ description:
981
+ "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.",
982
+ required: false,
983
+ control: "select",
984
+ type: "string",
985
+ options: ["list", "none", "inline", "both"],
986
+ },
987
+ "aria-braillelabel": {
988
+ description:
989
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
990
+ required: false,
991
+ control: "text",
992
+ type: "string",
993
+ },
994
+ "aria-brailleroledescription": {
995
+ description:
996
+ "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.",
997
+ required: false,
998
+ control: "text",
999
+ type: "string",
1000
+ },
1001
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
1002
+ "aria-checked": {
1003
+ description:
1004
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
1005
+ required: false,
1006
+ control: "text",
1007
+ type: "string",
1008
+ },
1009
+ "aria-colcount": {
1010
+ description:
1011
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
1012
+ required: false,
1013
+ control: "number",
1014
+ type: "number",
1015
+ },
1016
+ "aria-colindex": {
1017
+ description:
1018
+ "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.",
1019
+ required: false,
1020
+ control: "number",
1021
+ type: "number",
1022
+ },
1023
+ "aria-colindextext": {
1024
+ description:
1025
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
1026
+ required: false,
1027
+ control: "text",
1028
+ type: "string",
1029
+ },
1030
+ "aria-colspan": {
1031
+ description:
1032
+ "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.",
1033
+ required: false,
1034
+ control: "number",
1035
+ type: "number",
1036
+ },
1037
+ "aria-controls": {
1038
+ description:
1039
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
1040
+ required: false,
1041
+ control: "text",
1042
+ type: "string",
1043
+ },
1044
+ "aria-current": {
1045
+ description:
1046
+ "Indicates the element that represents the current item within a container or set of related elements.",
1047
+ required: false,
1048
+ control: "text",
1049
+ type: "string",
1050
+ },
1051
+ "aria-describedby": {
1052
+ description:
1053
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
1054
+ required: false,
1055
+ control: "text",
1056
+ type: "string",
1057
+ },
1058
+ "aria-description": {
1059
+ description:
1060
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
1061
+ required: false,
1062
+ control: "text",
1063
+ type: "string",
1064
+ },
1065
+ "aria-details": {
1066
+ description:
1067
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
1068
+ required: false,
1069
+ control: "text",
1070
+ type: "string",
1071
+ },
1072
+ "aria-disabled": {
1073
+ description:
1074
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
1075
+ required: false,
1076
+ control: "boolean",
1077
+ type: "boolean",
1078
+ },
1079
+ "aria-dropeffect": {
1080
+ description:
1081
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
1082
+ required: false,
1083
+ control: "select",
1084
+ type: "string",
1085
+ options: ["link", "none", "copy", "execute", "move", "popup"],
1086
+ },
1087
+ "aria-errormessage": {
1088
+ description:
1089
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
1090
+ required: false,
1091
+ control: "text",
1092
+ type: "string",
1093
+ },
1094
+ "aria-expanded": {
1095
+ description:
1096
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
1097
+ required: false,
1098
+ control: "boolean",
1099
+ type: "boolean",
1100
+ },
1101
+ "aria-flowto": {
1102
+ description:
1103
+ "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.",
1104
+ required: false,
1105
+ control: "text",
1106
+ type: "string",
1107
+ },
1108
+ "aria-grabbed": {
1109
+ description:
1110
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
1111
+ required: false,
1112
+ control: "boolean",
1113
+ type: "boolean",
1114
+ },
1115
+ "aria-haspopup": {
1116
+ description:
1117
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
1118
+ required: false,
1119
+ control: "text",
1120
+ type: "string",
1121
+ },
1122
+ "aria-hidden": {
1123
+ description:
1124
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
1125
+ required: false,
1126
+ control: "boolean",
1127
+ type: "boolean",
1128
+ },
1129
+ "aria-invalid": {
1130
+ description:
1131
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
1132
+ required: false,
1133
+ control: "text",
1134
+ type: "string",
1135
+ },
1136
+ "aria-keyshortcuts": {
1137
+ description:
1138
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
1139
+ required: false,
1140
+ control: "text",
1141
+ type: "string",
1142
+ },
1143
+ "aria-label": {
1144
+ description:
1145
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
1146
+ required: false,
1147
+ control: "text",
1148
+ type: "string",
1149
+ },
1150
+ "aria-labelledby": {
1151
+ description:
1152
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
1153
+ required: false,
1154
+ control: "text",
1155
+ type: "string",
1156
+ },
1157
+ "aria-level": {
1158
+ description:
1159
+ "Defines the hierarchical level of an element within a structure.",
1160
+ required: false,
1161
+ control: "number",
1162
+ type: "number",
1163
+ },
1164
+ "aria-live": {
1165
+ description:
1166
+ "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.",
1167
+ required: false,
1168
+ control: "radio",
1169
+ type: "string",
1170
+ options: ["off", "assertive", "polite"],
1171
+ },
1172
+ "aria-modal": {
1173
+ description: "Indicates whether an element is modal when displayed.",
1174
+ required: false,
1175
+ control: "boolean",
1176
+ type: "boolean",
1177
+ },
1178
+ "aria-multiline": {
1179
+ description:
1180
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
1181
+ required: false,
1182
+ control: "boolean",
1183
+ type: "boolean",
1184
+ },
1185
+ "aria-multiselectable": {
1186
+ description:
1187
+ "Indicates that the user may select more than one item from the current selectable descendants.",
1188
+ required: false,
1189
+ control: "boolean",
1190
+ type: "boolean",
1191
+ },
1192
+ "aria-orientation": {
1193
+ description:
1194
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
1195
+ required: false,
1196
+ control: "radio",
1197
+ type: "string",
1198
+ options: ["horizontal", "vertical"],
1199
+ },
1200
+ "aria-owns": {
1201
+ description:
1202
+ "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.",
1203
+ required: false,
1204
+ control: "text",
1205
+ type: "string",
1206
+ },
1207
+ "aria-placeholder": {
1208
+ description:
1209
+ "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.",
1210
+ required: false,
1211
+ control: "text",
1212
+ type: "string",
1213
+ },
1214
+ "aria-posinset": {
1215
+ description:
1216
+ "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.",
1217
+ required: false,
1218
+ control: "number",
1219
+ type: "number",
1220
+ },
1221
+ "aria-pressed": {
1222
+ description:
1223
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
1224
+ required: false,
1225
+ control: "text",
1226
+ type: "string",
1227
+ },
1228
+ "aria-readonly": {
1229
+ description:
1230
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
1231
+ required: false,
1232
+ control: "boolean",
1233
+ type: "boolean",
1234
+ },
1235
+ "aria-relevant": {
1236
+ description:
1237
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
1238
+ required: false,
1239
+ control: "select",
1240
+ type: "string",
1241
+ options: [
1242
+ "text",
1243
+ "additions",
1244
+ "additions removals",
1245
+ "additions text",
1246
+ "all",
1247
+ "removals",
1248
+ "removals additions",
1249
+ "removals text",
1250
+ "text additions",
1251
+ "text removals",
1252
+ ],
1253
+ },
1254
+ "aria-required": {
1255
+ description:
1256
+ "Indicates that user input is required on the element before a form may be submitted.",
1257
+ required: false,
1258
+ control: "boolean",
1259
+ type: "boolean",
1260
+ },
1261
+ "aria-roledescription": {
1262
+ description:
1263
+ "Defines a human-readable, author-localized description for the role of an element.",
1264
+ required: false,
1265
+ control: "text",
1266
+ type: "string",
1267
+ },
1268
+ "aria-rowcount": {
1269
+ description:
1270
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
1271
+ required: false,
1272
+ control: "number",
1273
+ type: "number",
1274
+ },
1275
+ "aria-rowindex": {
1276
+ description:
1277
+ "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.",
1278
+ required: false,
1279
+ control: "number",
1280
+ type: "number",
1281
+ },
1282
+ "aria-rowindextext": {
1283
+ description:
1284
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
1285
+ required: false,
1286
+ control: "text",
1287
+ type: "string",
1288
+ },
1289
+ "aria-rowspan": {
1290
+ description:
1291
+ "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.",
1292
+ required: false,
1293
+ control: "number",
1294
+ type: "number",
1295
+ },
1296
+ "aria-selected": {
1297
+ description:
1298
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
1299
+ required: false,
1300
+ control: "boolean",
1301
+ type: "boolean",
1302
+ },
1303
+ "aria-setsize": {
1304
+ description:
1305
+ "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.",
1306
+ required: false,
1307
+ control: "number",
1308
+ type: "number",
1309
+ },
1310
+ "aria-sort": {
1311
+ description:
1312
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
1313
+ required: false,
1314
+ control: "select",
1315
+ type: "string",
1316
+ options: ["none", "ascending", "descending", "other"],
1317
+ },
1318
+ "aria-valuemax": {
1319
+ description: "Defines the maximum allowed value for a range widget.",
1320
+ required: false,
1321
+ control: "number",
1322
+ type: "number",
1323
+ },
1324
+ "aria-valuemin": {
1325
+ description: "Defines the minimum allowed value for a range widget.",
1326
+ required: false,
1327
+ control: "number",
1328
+ type: "number",
1329
+ },
1330
+ "aria-valuenow": {
1331
+ description:
1332
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
1333
+ required: false,
1334
+ control: "number",
1335
+ type: "number",
1336
+ },
1337
+ "aria-valuetext": {
1338
+ description:
1339
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
1340
+ required: false,
1341
+ control: "text",
1342
+ type: "string",
1343
+ },
1344
+ autoCapitalize: { required: false, control: "text", type: "string" },
1345
+ autoCorrect: { required: false, control: "text", type: "string" },
1346
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
1347
+ autoSave: { required: false, control: "text", type: "string" },
1348
+ className: { required: false, control: "text", type: "string" },
1349
+ color: { required: false, control: "color", type: "string" },
1350
+ content: { required: false, control: "text", type: "string" },
1351
+ contextMenu: { required: false, control: "text", type: "string" },
1352
+ datatype: { required: false, control: "text", type: "string" },
1353
+ dir: { required: false, control: "text", type: "string" },
1354
+ disabled: { required: false, control: "boolean", type: "boolean" },
1355
+ draggable: { required: false, control: "boolean", type: "boolean" },
1356
+ form: { required: false, control: "text", type: "string" },
1357
+ formAction: { required: false, control: "text", type: "string" },
1358
+ formEncType: { required: false, control: "text", type: "string" },
1359
+ formMethod: { required: false, control: "text", type: "string" },
1360
+ formNoValidate: { required: false, control: "boolean", type: "boolean" },
1361
+ formTarget: { required: false, control: "text", type: "string" },
1362
+ hidden: { required: false, control: "boolean", type: "boolean" },
1363
+ id: { required: false, control: "text", type: "string" },
1364
+ inputMode: {
1365
+ description:
1366
+ "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",
1367
+ required: false,
1368
+ control: "select",
1369
+ type: "string",
1370
+ options: [
1371
+ "search",
1372
+ "text",
1373
+ "none",
1374
+ "tel",
1375
+ "url",
1376
+ "email",
1377
+ "numeric",
1378
+ "decimal",
1379
+ ],
1380
+ },
1381
+ is: {
1382
+ description:
1383
+ "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",
1384
+ required: false,
1385
+ control: "text",
1386
+ type: "string",
1387
+ },
1388
+ itemID: { required: false, control: "text", type: "string" },
1389
+ itemProp: { required: false, control: "text", type: "string" },
1390
+ itemRef: { required: false, control: "text", type: "string" },
1391
+ itemScope: { required: false, control: "boolean", type: "boolean" },
1392
+ itemType: { required: false, control: "text", type: "string" },
1393
+ lang: { required: false, control: "text", type: "string" },
1394
+ name: { required: false, control: "text", type: "string" },
1395
+ nonce: { required: false, control: "text", type: "string" },
1396
+ placeholder: { required: false, control: "text", type: "string" },
1397
+ prefix: { required: false, control: "text", type: "string" },
1398
+ property: { required: false, control: "text", type: "string" },
1399
+ radioGroup: { required: false, control: "text", type: "string" },
1400
+ rel: { required: false, control: "text", type: "string" },
1401
+ resource: { required: false, control: "text", type: "string" },
1402
+ results: { required: false, control: "number", type: "number" },
1403
+ rev: { required: false, control: "text", type: "string" },
1404
+ role: { required: false, control: "text", type: "string" },
1405
+ security: { required: false, control: "text", type: "string" },
1406
+ slot: { required: false, control: "text", type: "string" },
1407
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
1408
+ suppressContentEditableWarning: {
1409
+ required: false,
1410
+ control: "boolean",
1411
+ type: "boolean",
1412
+ },
1413
+ suppressHydrationWarning: {
1414
+ required: false,
1415
+ control: "boolean",
1416
+ type: "boolean",
1417
+ },
1418
+ tabIndex: { required: false, control: "number", type: "number" },
1419
+ title: { required: false, control: "text", type: "string" },
1420
+ translate: {
1421
+ required: false,
1422
+ control: "radio",
1423
+ type: "string",
1424
+ options: ["yes", "no"],
1425
+ },
1426
+ type: {
1427
+ required: false,
1428
+ control: "radio",
1429
+ type: "string",
1430
+ options: ["button", "submit", "reset"],
1431
+ },
1432
+ typeof: { required: false, control: "text", type: "string" },
1433
+ unselectable: {
1434
+ required: false,
1435
+ control: "radio",
1436
+ type: "string",
1437
+ options: ["on", "off"],
1438
+ },
966
1439
  value: { required: true, control: "text", type: "string" },
1440
+ vocab: { required: false, control: "text", type: "string" },
967
1441
  };
968
1442
  export const propsTabsContent: Record<string, PropMeta> = {
969
1443
  about: { required: false, control: "text", type: "string" },
@@ -1356,7 +1830,6 @@ export const propsTabsContent: Record<string, PropMeta> = {
1356
1830
  content: { required: false, control: "text", type: "string" },
1357
1831
  contextMenu: { required: false, control: "text", type: "string" },
1358
1832
  datatype: { required: false, control: "text", type: "string" },
1359
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
1360
1833
  dir: { required: false, control: "text", type: "string" },
1361
1834
  draggable: { required: false, control: "boolean", type: "boolean" },
1362
1835
  hidden: { required: false, control: "boolean", type: "boolean" },
@@ -407,7 +407,6 @@ export const propsTooltipContent: Record<string, PropMeta> = {
407
407
  type: "string",
408
408
  },
409
409
  arrowPadding: { required: false, control: "number", type: "number" },
410
- asChild: { required: false, control: "boolean", type: "boolean" },
411
410
  autoCapitalize: { required: false, control: "text", type: "string" },
412
411
  autoCorrect: { required: false, control: "text", type: "string" },
413
412
  autoFocus: { required: false, control: "boolean", type: "boolean" },
@@ -418,7 +417,6 @@ export const propsTooltipContent: Record<string, PropMeta> = {
418
417
  content: { required: false, control: "text", type: "string" },
419
418
  contextMenu: { required: false, control: "text", type: "string" },
420
419
  datatype: { required: false, control: "text", type: "string" },
421
- defaultChecked: { required: false, control: "boolean", type: "boolean" },
422
420
  dir: { required: false, control: "text", type: "string" },
423
421
  draggable: { required: false, control: "boolean", type: "boolean" },
424
422
  hidden: { required: false, control: "boolean", type: "boolean" },
package/src/accordion.tsx CHANGED
@@ -57,23 +57,30 @@ export const AccordionContent: ForwardRefExoticComponent<
57
57
 
58
58
  const namespace = "@webstudio-is/sdk-components-react-radix";
59
59
 
60
- // For each AccordionItem component within the selection,
60
+ // For each AccordionContent component within the selection,
61
61
  // we identify its closest parent Accordion component
62
62
  // and update its open prop bound to variable.
63
63
  export const hooksAccordion: Hook = {
64
64
  onNavigatorSelect: (context, event) => {
65
65
  for (const instance of event.instancePath) {
66
- if (instance.component === `${namespace}:AccordionItem`) {
66
+ if (instance.component === `${namespace}:AccordionContent`) {
67
67
  const accordion = getClosestInstance(
68
68
  event.instancePath,
69
69
  instance,
70
70
  `${namespace}:Accordion`
71
71
  );
72
- const itemValue =
73
- context.getPropValue(instance.id, "value") ??
74
- context.indexesWithinAncestors.get(instance.id)?.toString();
75
- if (accordion && itemValue) {
76
- context.setPropVariable(accordion.id, "value", itemValue);
72
+ const item = getClosestInstance(
73
+ event.instancePath,
74
+ instance,
75
+ `${namespace}:AccordionItem`
76
+ );
77
+ if (accordion && item) {
78
+ const itemValue =
79
+ context.getPropValue(item.id, "value") ??
80
+ context.indexesWithinAncestors.get(item.id)?.toString();
81
+ if (itemValue) {
82
+ context.setPropVariable(accordion.id, "value", itemValue);
83
+ }
77
84
  }
78
85
  }
79
86
  }