Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

795 satır
20 KiB

  1. [
  2. {
  3. "description": "Component for performing an action upon activation (e.g. when clicked).\n\nDepending on the declared props, this component can function as a hyperlink or as a button.",
  4. "displayName": "Button",
  5. "methods": [],
  6. "props": {
  7. "size": {
  8. "defaultValue": {
  9. "value": "medium"
  10. },
  11. "description": "Size of the component.",
  12. "name": "size",
  13. "required": false,
  14. "type": {
  15. "name": "enum",
  16. "raw": "Size",
  17. "value": [
  18. {
  19. "value": "\"small\""
  20. },
  21. {
  22. "value": "\"medium\""
  23. },
  24. {
  25. "value": "\"large\""
  26. }
  27. ]
  28. }
  29. },
  30. "variant": {
  31. "defaultValue": {
  32. "value": "outline"
  33. },
  34. "description": "Variant of the component.",
  35. "name": "variant",
  36. "required": false,
  37. "type": {
  38. "name": "enum",
  39. "raw": "Variant",
  40. "value": [
  41. {
  42. "value": "\"outline\""
  43. },
  44. {
  45. "value": "\"primary\""
  46. }
  47. ]
  48. }
  49. },
  50. "children": {
  51. "defaultValue": null,
  52. "description": "Text to identify the action associated upon activation of the component.",
  53. "name": "children",
  54. "required": false,
  55. "type": {
  56. "name": "any"
  57. }
  58. },
  59. "disabled": {
  60. "defaultValue": {
  61. "value": false
  62. },
  63. "description": "Can the component be activated?",
  64. "name": "disabled",
  65. "required": false,
  66. "type": {
  67. "name": "boolean"
  68. }
  69. },
  70. "element": {
  71. "defaultValue": {
  72. "value": "button"
  73. },
  74. "description": "The corresponding HTML element of the component.",
  75. "name": "element",
  76. "required": false,
  77. "type": {
  78. "name": "enum",
  79. "raw": "ButtonElement",
  80. "value": [
  81. {
  82. "value": "\"a\""
  83. },
  84. {
  85. "value": "\"button\""
  86. }
  87. ]
  88. }
  89. },
  90. "href": {
  91. "defaultValue": null,
  92. "description": "The URL of the page to navigate to, if `element` is set to `\"a\"`.",
  93. "name": "href",
  94. "required": false,
  95. "type": {
  96. "name": "string"
  97. }
  98. },
  99. "target": {
  100. "defaultValue": null,
  101. "description": "The target on where to display the page navigated to, if `element` is set to `\"a\"`.",
  102. "name": "target",
  103. "required": false,
  104. "type": {
  105. "name": "string"
  106. }
  107. },
  108. "rel": {
  109. "defaultValue": null,
  110. "description": "The relationship of the current page to the referred page in `href`, if `element` is set to `\"a\"`.",
  111. "name": "rel",
  112. "required": false,
  113. "type": {
  114. "name": "string"
  115. }
  116. },
  117. "type": {
  118. "defaultValue": {
  119. "value": "button"
  120. },
  121. "description": "The type of the button, if `element` is set to `\"button\"`.",
  122. "name": "type",
  123. "required": false,
  124. "type": {
  125. "name": "enum",
  126. "raw": "ButtonType",
  127. "value": [
  128. {
  129. "value": "\"button\""
  130. },
  131. {
  132. "value": "\"submit\""
  133. },
  134. {
  135. "value": "\"reset\""
  136. }
  137. ]
  138. }
  139. },
  140. "border": {
  141. "defaultValue": {
  142. "value": false
  143. },
  144. "description": "Does the button display a border?",
  145. "name": "border",
  146. "required": false,
  147. "type": {
  148. "name": "boolean"
  149. }
  150. },
  151. "onClick": {
  152. "defaultValue": null,
  153. "description": "Event handler triggered when the component is clicked.",
  154. "name": "onClick",
  155. "required": false,
  156. "type": {
  157. "name": "(...args: any[]) => any"
  158. }
  159. },
  160. "onFocus": {
  161. "defaultValue": null,
  162. "description": "Event handler triggered when the component receives focus.",
  163. "name": "onFocus",
  164. "required": false,
  165. "type": {
  166. "name": "(...args: any[]) => any"
  167. }
  168. },
  169. "onBlur": {
  170. "defaultValue": null,
  171. "description": "Event handler triggered when the component loses focus.",
  172. "name": "onBlur",
  173. "required": false,
  174. "type": {
  175. "name": "(...args: any[]) => any"
  176. }
  177. }
  178. }
  179. },
  180. {
  181. "description": "Component for values that have an on/off state.",
  182. "displayName": "Checkbox",
  183. "methods": [],
  184. "props": {
  185. "onFocus": {
  186. "defaultValue": null,
  187. "description": "Event handler triggered when the component receives focus.",
  188. "name": "onFocus",
  189. "required": false,
  190. "type": {
  191. "name": "(...args: any[]) => any"
  192. }
  193. },
  194. "onBlur": {
  195. "defaultValue": null,
  196. "description": "Event handler triggered when the component loses focus.",
  197. "name": "onBlur",
  198. "required": false,
  199. "type": {
  200. "name": "(...args: any[]) => any"
  201. }
  202. },
  203. "label": {
  204. "defaultValue": {
  205. "value": ""
  206. },
  207. "description": "Short textual description indicating the nature of the component's value.",
  208. "name": "label",
  209. "required": false,
  210. "type": {
  211. "name": "any"
  212. }
  213. },
  214. "name": {
  215. "defaultValue": null,
  216. "description": "Name of the form field associated with this component.",
  217. "name": "name",
  218. "required": false,
  219. "type": {
  220. "name": "string"
  221. }
  222. },
  223. "onChange": {
  224. "defaultValue": null,
  225. "description": "Event handler triggered when the component is toggled.",
  226. "name": "onChange",
  227. "required": false,
  228. "type": {
  229. "name": "(...args: any[]) => any"
  230. }
  231. },
  232. "value": {
  233. "defaultValue": null,
  234. "description": "Value of the component.",
  235. "name": "value",
  236. "required": false,
  237. "type": {
  238. "name": "any"
  239. }
  240. },
  241. "checked": {
  242. "defaultValue": null,
  243. "description": "Checked state of the component.",
  244. "name": "checked",
  245. "required": false,
  246. "type": {
  247. "name": "boolean"
  248. }
  249. }
  250. }
  251. },
  252. {
  253. "description": "Component for displaying graphics.",
  254. "displayName": "Icon",
  255. "methods": [],
  256. "props": {
  257. "size": {
  258. "defaultValue": {
  259. "value": "1.5rem"
  260. },
  261. "description": "Size of the icon. This controls both the width and the height.",
  262. "name": "size",
  263. "required": false,
  264. "type": {
  265. "name": "ReactText"
  266. }
  267. },
  268. "label": {
  269. "defaultValue": {
  270. "value": null
  271. },
  272. "description": "Description of what the component represents.",
  273. "name": "label",
  274. "required": false,
  275. "type": {
  276. "name": "string"
  277. }
  278. },
  279. "name": {
  280. "defaultValue": null,
  281. "description": "Name of the icon to display.",
  282. "name": "name",
  283. "required": false,
  284. "type": {
  285. "name": "string"
  286. }
  287. },
  288. "weight": {
  289. "defaultValue": {
  290. "value": "0.125rem"
  291. },
  292. "description": "Width of the icon's strokes.",
  293. "name": "weight",
  294. "required": false,
  295. "type": {
  296. "name": "ReactText"
  297. }
  298. }
  299. }
  300. },
  301. {
  302. "description": "Component for values which are to be selected from a few list of options.",
  303. "displayName": "RadioButton",
  304. "methods": [],
  305. "props": {
  306. "onFocus": {
  307. "defaultValue": null,
  308. "description": "Event handler triggered when the component receives focus.",
  309. "name": "onFocus",
  310. "required": false,
  311. "type": {
  312. "name": "(...args: any[]) => any"
  313. }
  314. },
  315. "onBlur": {
  316. "defaultValue": null,
  317. "description": "Event handler triggered when the component loses focus.",
  318. "name": "onBlur",
  319. "required": false,
  320. "type": {
  321. "name": "(...args: any[]) => any"
  322. }
  323. },
  324. "label": {
  325. "defaultValue": {
  326. "value": ""
  327. },
  328. "description": "Short textual description indicating the nature of the component's value.",
  329. "name": "label",
  330. "required": false,
  331. "type": {
  332. "name": "any"
  333. }
  334. },
  335. "name": {
  336. "defaultValue": null,
  337. "description": "Group where the component belongs.",
  338. "name": "name",
  339. "required": false,
  340. "type": {
  341. "name": "string"
  342. }
  343. },
  344. "onChange": {
  345. "defaultValue": null,
  346. "description": "Event handler triggered when the component is selected.",
  347. "name": "onChange",
  348. "required": false,
  349. "type": {
  350. "name": "(...args: any[]) => any"
  351. }
  352. },
  353. "value": {
  354. "defaultValue": null,
  355. "description": "Value of the component.",
  356. "name": "value",
  357. "required": false,
  358. "type": {
  359. "name": "any"
  360. }
  361. },
  362. "checked": {
  363. "defaultValue": null,
  364. "description": "Checked state of the component.",
  365. "name": "checked",
  366. "required": false,
  367. "type": {
  368. "name": "boolean"
  369. }
  370. }
  371. }
  372. },
  373. {
  374. "description": "Component for selecting values from a larger number of options.",
  375. "displayName": "Select",
  376. "methods": [],
  377. "props": {
  378. "size": {
  379. "defaultValue": {
  380. "value": "medium"
  381. },
  382. "description": "Size of the component.",
  383. "name": "size",
  384. "required": false,
  385. "type": {
  386. "name": "enum",
  387. "raw": "Size",
  388. "value": [
  389. {
  390. "value": "\"small\""
  391. },
  392. {
  393. "value": "\"medium\""
  394. },
  395. {
  396. "value": "\"large\""
  397. }
  398. ]
  399. }
  400. },
  401. "disabled": {
  402. "defaultValue": {
  403. "value": false
  404. },
  405. "description": "Is the component active?",
  406. "name": "disabled",
  407. "required": false,
  408. "type": {
  409. "name": "boolean"
  410. }
  411. },
  412. "border": {
  413. "defaultValue": {
  414. "value": false
  415. },
  416. "description": "Does the button display a border?",
  417. "name": "border",
  418. "required": false,
  419. "type": {
  420. "name": "boolean"
  421. }
  422. },
  423. "onFocus": {
  424. "defaultValue": null,
  425. "description": "Event handler triggered when the component receives focus.",
  426. "name": "onFocus",
  427. "required": false,
  428. "type": {
  429. "name": "(...args: any[]) => any"
  430. }
  431. },
  432. "onBlur": {
  433. "defaultValue": null,
  434. "description": "Event handler triggered when the component loses focus.",
  435. "name": "onBlur",
  436. "required": false,
  437. "type": {
  438. "name": "(...args: any[]) => any"
  439. }
  440. },
  441. "label": {
  442. "defaultValue": {
  443. "value": ""
  444. },
  445. "description": "Short textual description indicating the nature of the component's value.",
  446. "name": "label",
  447. "required": false,
  448. "type": {
  449. "name": "any"
  450. }
  451. },
  452. "name": {
  453. "defaultValue": null,
  454. "description": "Name of the form field associated with this component.",
  455. "name": "name",
  456. "required": false,
  457. "type": {
  458. "name": "string"
  459. }
  460. },
  461. "onChange": {
  462. "defaultValue": null,
  463. "description": "Event handler triggered when the component changes value.",
  464. "name": "onChange",
  465. "required": false,
  466. "type": {
  467. "name": "(...args: any[]) => any"
  468. }
  469. },
  470. "value": {
  471. "defaultValue": null,
  472. "description": "Value of the component.",
  473. "name": "value",
  474. "required": false,
  475. "type": {
  476. "name": "any"
  477. }
  478. },
  479. "hint": {
  480. "defaultValue": {
  481. "value": ""
  482. },
  483. "description": "Short textual description as guidelines for valid input values.",
  484. "name": "hint",
  485. "required": false,
  486. "type": {
  487. "name": "any"
  488. }
  489. },
  490. "multiple": {
  491. "defaultValue": {
  492. "value": false
  493. },
  494. "description": "Can multiple values be selected?",
  495. "name": "multiple",
  496. "required": false,
  497. "type": {
  498. "name": "boolean"
  499. }
  500. },
  501. "defaultValue": {
  502. "defaultValue": null,
  503. "description": "Default value of the component.",
  504. "name": "defaultValue",
  505. "required": false,
  506. "type": {
  507. "name": "any"
  508. }
  509. }
  510. }
  511. },
  512. {
  513. "description": "Component for inputting numeric values in a graphical manner.\n\nThe component is styled using client-side scripts. When the component is rendered server-side,\nthe component falls back into the original `<input type=\"range\">` element.",
  514. "displayName": "Slider",
  515. "methods": [],
  516. "props": {
  517. "disabled": {
  518. "defaultValue": {
  519. "value": false
  520. },
  521. "description": "Is the component active?",
  522. "name": "disabled",
  523. "required": false,
  524. "type": {
  525. "name": "boolean"
  526. }
  527. },
  528. "label": {
  529. "defaultValue": {
  530. "value": ""
  531. },
  532. "description": "Short textual description indicating the nature of the component's value.",
  533. "name": "label",
  534. "required": false,
  535. "type": {
  536. "name": "any"
  537. }
  538. },
  539. "onChange": {
  540. "defaultValue": null,
  541. "description": "Event handler triggered when the component changes value.",
  542. "name": "onChange",
  543. "required": false,
  544. "type": {
  545. "name": "(...args: any[]) => any"
  546. }
  547. },
  548. "value": {
  549. "defaultValue": null,
  550. "description": "Value of the component.",
  551. "name": "value",
  552. "required": false,
  553. "type": {
  554. "name": "any"
  555. }
  556. },
  557. "defaultValue": {
  558. "defaultValue": null,
  559. "description": "Default value of the component.",
  560. "name": "defaultValue",
  561. "required": false,
  562. "type": {
  563. "name": "any"
  564. }
  565. },
  566. "orientation": {
  567. "defaultValue": {
  568. "value": "horizontal"
  569. },
  570. "description": "The component orientation.",
  571. "name": "orientation",
  572. "required": false,
  573. "type": {
  574. "name": "enum",
  575. "raw": "Orientation",
  576. "value": [
  577. {
  578. "value": "\"vertical\""
  579. },
  580. {
  581. "value": "\"horizontal\""
  582. }
  583. ]
  584. }
  585. },
  586. "length": {
  587. "defaultValue": {
  588. "value": "16rem"
  589. },
  590. "description": "CSS size for the component length.",
  591. "name": "length",
  592. "required": false,
  593. "type": {
  594. "name": "ReactText"
  595. }
  596. },
  597. "fallback": {
  598. "defaultValue": {
  599. "value": false
  600. },
  601. "description": "Use the sSR-friendly rendering of the component.",
  602. "name": "fallback",
  603. "required": false,
  604. "type": {
  605. "name": "boolean"
  606. }
  607. }
  608. }
  609. },
  610. {
  611. "description": "Component for inputting textual values.\n\nThis component supports multiline input and adjusts its layout accordingly.",
  612. "displayName": "TextInput",
  613. "methods": [],
  614. "props": {
  615. "size": {
  616. "defaultValue": {
  617. "value": "medium"
  618. },
  619. "description": "Size of the component.",
  620. "name": "size",
  621. "required": false,
  622. "type": {
  623. "name": "enum",
  624. "raw": "Size",
  625. "value": [
  626. {
  627. "value": "\"small\""
  628. },
  629. {
  630. "value": "\"medium\""
  631. },
  632. {
  633. "value": "\"large\""
  634. }
  635. ]
  636. }
  637. },
  638. "disabled": {
  639. "defaultValue": {
  640. "value": false
  641. },
  642. "description": "Is the component active?",
  643. "name": "disabled",
  644. "required": false,
  645. "type": {
  646. "name": "boolean"
  647. }
  648. },
  649. "border": {
  650. "defaultValue": {
  651. "value": false
  652. },
  653. "description": "Does the button display a border?",
  654. "name": "border",
  655. "required": false,
  656. "type": {
  657. "name": "boolean"
  658. }
  659. },
  660. "onFocus": {
  661. "defaultValue": null,
  662. "description": "Event handler triggered when the component receives focus.",
  663. "name": "onFocus",
  664. "required": false,
  665. "type": {
  666. "name": "(...args: any[]) => any"
  667. }
  668. },
  669. "onBlur": {
  670. "defaultValue": null,
  671. "description": "Event handler triggered when the component loses focus.",
  672. "name": "onBlur",
  673. "required": false,
  674. "type": {
  675. "name": "(...args: any[]) => any"
  676. }
  677. },
  678. "label": {
  679. "defaultValue": {
  680. "value": ""
  681. },
  682. "description": "Short textual description indicating the nature of the component's value.",
  683. "name": "label",
  684. "required": false,
  685. "type": {
  686. "name": "any"
  687. }
  688. },
  689. "onChange": {
  690. "defaultValue": null,
  691. "description": "Event handler triggered when the component changes value.",
  692. "name": "onChange",
  693. "required": false,
  694. "type": {
  695. "name": "(...args: any[]) => any"
  696. }
  697. },
  698. "value": {
  699. "defaultValue": null,
  700. "description": "Value of the component.",
  701. "name": "value",
  702. "required": false,
  703. "type": {
  704. "name": "any"
  705. }
  706. },
  707. "hint": {
  708. "defaultValue": {
  709. "value": ""
  710. },
  711. "description": "Short textual description as guidelines for valid input values.",
  712. "name": "hint",
  713. "required": false,
  714. "type": {
  715. "name": "any"
  716. }
  717. },
  718. "defaultValue": {
  719. "defaultValue": null,
  720. "description": "Default value of the component.",
  721. "name": "defaultValue",
  722. "required": false,
  723. "type": {
  724. "name": "any"
  725. }
  726. },
  727. "indicator": {
  728. "defaultValue": {
  729. "value": null
  730. },
  731. "description": "Additional description, usually graphical, indicating the nature of the component's value.",
  732. "name": "indicator",
  733. "required": false,
  734. "type": {
  735. "name": "ReactNodeLike"
  736. }
  737. },
  738. "multiline": {
  739. "defaultValue": {
  740. "value": false
  741. },
  742. "description": "Should the component accept multiple lines of input?",
  743. "name": "multiline",
  744. "required": false,
  745. "type": {
  746. "name": "boolean"
  747. }
  748. },
  749. "autoResize": {
  750. "defaultValue": {
  751. "value": false
  752. },
  753. "description": "Should the component resize itself to show all its value?",
  754. "name": "autoResize",
  755. "required": false,
  756. "type": {
  757. "name": "boolean"
  758. }
  759. },
  760. "placeholder": {
  761. "defaultValue": {
  762. "value": ""
  763. },
  764. "description": "Placeholder of the component when there is no value.",
  765. "name": "placeholder",
  766. "required": false,
  767. "type": {
  768. "name": "string"
  769. }
  770. },
  771. "rows": {
  772. "defaultValue": {
  773. "value": 3
  774. },
  775. "description": "How many rows should the component display if it accepts multiline input?",
  776. "name": "rows",
  777. "required": false,
  778. "type": {
  779. "name": "number"
  780. }
  781. },
  782. "alternate": {
  783. "defaultValue": {
  784. "value": false
  785. },
  786. "description": "Should the component be displayed with an alternate appearance?",
  787. "name": "alternate",
  788. "required": false,
  789. "type": {
  790. "name": "boolean"
  791. }
  792. }
  793. }
  794. }
  795. ]