Design system.
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.
 
 
 

1651 satır
56 KiB

  1. import { NextPage } from 'next';
  2. import * as Choice from '@tesseract-design/web-choice-react';
  3. import * as MultiChoice from '@tesseract-design/web-multichoice-react';
  4. import { DefaultLayout } from '@/components/DefaultLayout';
  5. import {ReactNode} from 'react';
  6. type Props = {
  7. options: ReactNode,
  8. }
  9. const OptionPage: NextPage<Props> = ({
  10. options = (
  11. <>
  12. <optgroup label="Fruits">
  13. <option value="mango">Mango</option>
  14. <option value="strawberry">Strawberry</option>
  15. <option value="avocado">Avocado</option>
  16. <option value="grapes">Grapes</option>
  17. </optgroup>
  18. <optgroup label="Non-fruits">
  19. <option value="chocolate">Chocolate</option>
  20. <option value="milk">Milk</option>
  21. <option value="coffee">Coffee</option>
  22. </optgroup>
  23. </>
  24. )
  25. }) => {
  26. return (
  27. <DefaultLayout
  28. title="Option"
  29. >
  30. <main className="mt-8 mb-16 md:mt-16 md:mb-32">
  31. <section>
  32. <div className="container mx-auto px-4">
  33. <h1>
  34. DropdownSelect
  35. </h1>
  36. <div>
  37. <section>
  38. <h2>
  39. Default
  40. </h2>
  41. <div>
  42. <div className="grid md:grid-cols-2 gap-4 my-4">
  43. <div>
  44. <Choice.DropdownSelect
  45. size="small"
  46. label="Select"
  47. hint="Type anything here&hellip;"
  48. block
  49. >
  50. {options}
  51. </Choice.DropdownSelect>
  52. </div>
  53. <div>
  54. <Choice.DropdownSelect
  55. border
  56. size="small"
  57. label="Select"
  58. hint="Type anything here&hellip;"
  59. block
  60. >
  61. {options}
  62. </Choice.DropdownSelect>
  63. </div>
  64. <div>
  65. <Choice.DropdownSelect
  66. label="Select"
  67. hint="Type anything here&hellip;"
  68. block
  69. >
  70. {options}
  71. </Choice.DropdownSelect>
  72. </div>
  73. <div>
  74. <Choice.DropdownSelect
  75. border
  76. label="Select"
  77. hint="Type anything here&hellip;"
  78. block
  79. >
  80. {options}
  81. </Choice.DropdownSelect>
  82. </div>
  83. <div>
  84. <Choice.DropdownSelect
  85. size="large"
  86. label="Select"
  87. hint="Type anything here&hellip;"
  88. block
  89. >
  90. {options}
  91. </Choice.DropdownSelect>
  92. </div>
  93. <div>
  94. <Choice.DropdownSelect
  95. border
  96. size="large"
  97. label="Select"
  98. hint="Type anything here&hellip;"
  99. block
  100. >
  101. {options}
  102. </Choice.DropdownSelect>
  103. </div>
  104. <div>
  105. <Choice.DropdownSelect
  106. label="Select"
  107. hint="Type anything here&hellip;"
  108. block
  109. disabled
  110. >
  111. {options}
  112. </Choice.DropdownSelect>
  113. </div>
  114. <div>
  115. <Choice.DropdownSelect
  116. border
  117. label="Select"
  118. hint="Type anything here&hellip;"
  119. block
  120. disabled
  121. >
  122. {options}
  123. </Choice.DropdownSelect>
  124. </div>
  125. </div>
  126. <form>
  127. <fieldset
  128. disabled
  129. className="contents"
  130. >
  131. <legend className="sr-only">Disabled Test</legend>
  132. <div className="grid grid-cols-6 gap-4 my-4">
  133. <div className="col-span-2">
  134. <Choice.DropdownSelect
  135. label="First Name"
  136. block
  137. border
  138. />
  139. </div>
  140. <div className="col-span-2">
  141. <Choice.DropdownSelect
  142. label="Middle Name"
  143. block
  144. border
  145. />
  146. </div>
  147. <div className="col-span-2">
  148. <Choice.DropdownSelect
  149. label="Last Name"
  150. block
  151. border
  152. />
  153. </div>
  154. <div className="col-span-3">
  155. <Choice.DropdownSelect
  156. label="Username"
  157. block
  158. border
  159. />
  160. </div>
  161. <div className="col-span-3">
  162. <Choice.DropdownSelect
  163. label="Title"
  164. block
  165. border
  166. />
  167. </div>
  168. </div>
  169. </fieldset>
  170. </form>
  171. <form>
  172. <div>
  173. Hi, my name is
  174. {' '}
  175. <Choice.DropdownSelect
  176. border
  177. label="Name"
  178. size="small"
  179. />
  180. {' '}
  181. but you can call me
  182. {' '}
  183. <Choice.DropdownSelect
  184. border
  185. label="Nickname"
  186. size="small"
  187. />
  188. .
  189. </div>
  190. </form>
  191. </div>
  192. </section>
  193. <section>
  194. <h2>Alternate</h2>
  195. <div>
  196. <div className="grid md:grid-cols-2 gap-4">
  197. <div>
  198. <Choice.DropdownSelect
  199. variant="alternate"
  200. size="small"
  201. label="Select"
  202. hint="Type anything here&hellip;"
  203. block
  204. >
  205. {options}
  206. </Choice.DropdownSelect>
  207. </div>
  208. <div>
  209. <Choice.DropdownSelect
  210. border
  211. variant="alternate"
  212. size="small"
  213. label="Select"
  214. hint="Type anything here&hellip;"
  215. block
  216. >
  217. {options}
  218. </Choice.DropdownSelect>
  219. </div>
  220. <div>
  221. <Choice.DropdownSelect
  222. variant="alternate"
  223. label="Select"
  224. hint="Type anything here&hellip;"
  225. block
  226. >
  227. {options}
  228. </Choice.DropdownSelect>
  229. </div>
  230. <div>
  231. <Choice.DropdownSelect
  232. border
  233. variant="alternate"
  234. label="Select"
  235. hint="Type anything here&hellip;"
  236. block
  237. >
  238. {options}
  239. </Choice.DropdownSelect>
  240. </div>
  241. <div>
  242. <Choice.DropdownSelect
  243. variant="alternate"
  244. size="large"
  245. label="Select"
  246. hint="Type anything here&hellip;"
  247. block
  248. >
  249. {options}
  250. </Choice.DropdownSelect>
  251. </div>
  252. <div>
  253. <Choice.DropdownSelect
  254. border
  255. block
  256. variant="alternate"
  257. size="large"
  258. label="Select"
  259. hint="Type anything here&hellip;"
  260. >
  261. {options}
  262. </Choice.DropdownSelect>
  263. </div>
  264. <div>
  265. <Choice.DropdownSelect
  266. variant="alternate"
  267. label="Select"
  268. hint="Type anything here&hellip;"
  269. block
  270. disabled
  271. >
  272. {options}
  273. </Choice.DropdownSelect>
  274. </div>
  275. <div>
  276. <Choice.DropdownSelect
  277. variant="alternate"
  278. border
  279. label="Select"
  280. hint="Type anything here&hellip;"
  281. block
  282. disabled
  283. >
  284. {options}
  285. </Choice.DropdownSelect>
  286. </div>
  287. </div>
  288. </div>
  289. </section>
  290. </div>
  291. </div>
  292. </section>
  293. <section>
  294. <div className="container mx-auto px-4">
  295. <h1>
  296. MenuSelect
  297. </h1>
  298. <div>
  299. <section>
  300. <h2>
  301. Default
  302. </h2>
  303. <div>
  304. <div className="grid md:grid-cols-2 gap-4">
  305. <div>
  306. <Choice.MenuSelect
  307. size="small"
  308. label="MultilineTextInput"
  309. hint="Type anything here&hellip;"
  310. indicator="A"
  311. block
  312. >
  313. {options}
  314. </Choice.MenuSelect>
  315. </div>
  316. <div>
  317. <Choice.MenuSelect
  318. border
  319. size="small"
  320. label="MultilineTextInput"
  321. hint="Type anything here&hellip;"
  322. indicator="A"
  323. block
  324. >
  325. {options}
  326. </Choice.MenuSelect>
  327. </div>
  328. <div>
  329. <Choice.MenuSelect
  330. label="MultilineTextInput"
  331. hint="Type anything here&hellip;"
  332. indicator="A"
  333. block
  334. >
  335. {options}
  336. </Choice.MenuSelect>
  337. </div>
  338. <div>
  339. <Choice.MenuSelect
  340. border
  341. label="MultilineTextInput"
  342. hint="Type anything here&hellip;"
  343. indicator="A"
  344. block
  345. >
  346. {options}
  347. </Choice.MenuSelect>
  348. </div>
  349. <div>
  350. <Choice.MenuSelect
  351. size="large"
  352. label="MultilineTextInput"
  353. hint="Type anything here&hellip;"
  354. indicator="A"
  355. block
  356. >
  357. {options}
  358. </Choice.MenuSelect>
  359. </div>
  360. <div>
  361. <Choice.MenuSelect
  362. border
  363. size="large"
  364. label="MultilineTextInput"
  365. hint="Type anything here&hellip;"
  366. indicator="A"
  367. block
  368. >
  369. {options}
  370. </Choice.MenuSelect>
  371. </div>
  372. <div>
  373. <Choice.MenuSelect
  374. label="MultilineTextInput"
  375. hint="Type anything here&hellip;"
  376. indicator="A"
  377. block
  378. disabled
  379. >
  380. {options}
  381. </Choice.MenuSelect>
  382. </div>
  383. <div>
  384. <Choice.MenuSelect
  385. border
  386. label="MultilineTextInput"
  387. hint="Type anything here&hellip;"
  388. indicator="A"
  389. block
  390. disabled
  391. >
  392. {options}
  393. </Choice.MenuSelect>
  394. </div>
  395. </div>
  396. </div>
  397. </section>
  398. <section>
  399. <h2>Alternate</h2>
  400. <div>
  401. <div className="grid md:grid-cols-2 gap-4">
  402. <div>
  403. <Choice.MenuSelect
  404. variant="alternate"
  405. size="small"
  406. label="MultilineTextInput"
  407. hint="Type anything here&hellip;"
  408. indicator="A"
  409. block
  410. >
  411. {options}
  412. </Choice.MenuSelect>
  413. </div>
  414. <div>
  415. <Choice.MenuSelect
  416. border
  417. variant="alternate"
  418. size="small"
  419. label="MultilineTextInput"
  420. hint="Type anything here&hellip;"
  421. indicator="A"
  422. block
  423. >
  424. {options}
  425. </Choice.MenuSelect>
  426. </div>
  427. <div>
  428. <Choice.MenuSelect
  429. variant="alternate"
  430. label="MultilineTextInput"
  431. hint="Type anything here&hellip;"
  432. indicator="A"
  433. block
  434. >
  435. {options}
  436. </Choice.MenuSelect>
  437. </div>
  438. <div>
  439. <Choice.MenuSelect
  440. border
  441. variant="alternate"
  442. label="MultilineTextInput"
  443. hint="Type anything here&hellip;"
  444. indicator="A"
  445. block
  446. >
  447. {options}
  448. </Choice.MenuSelect>
  449. </div>
  450. <div>
  451. <Choice.MenuSelect
  452. variant="alternate"
  453. size="large"
  454. label="MultilineTextInput"
  455. hint="Type anything here&hellip;"
  456. indicator="A"
  457. block
  458. >
  459. {options}
  460. </Choice.MenuSelect>
  461. </div>
  462. <div>
  463. <Choice.MenuSelect
  464. border
  465. block
  466. variant="alternate"
  467. size="large"
  468. label="MultilineTextInput"
  469. hint="Type anything here&hellip;"
  470. indicator="A"
  471. >
  472. {options}
  473. </Choice.MenuSelect>
  474. </div>
  475. <div>
  476. <Choice.MenuSelect
  477. variant="alternate"
  478. label="MultilineTextInput"
  479. hint="Type anything here&hellip;"
  480. indicator="A"
  481. block
  482. disabled
  483. >
  484. {options}
  485. </Choice.MenuSelect>
  486. </div>
  487. <div>
  488. <Choice.MenuSelect
  489. variant="alternate"
  490. border
  491. label="MultilineTextInput"
  492. hint="Type anything here&hellip;"
  493. indicator="A"
  494. block
  495. disabled
  496. >
  497. {options}
  498. </Choice.MenuSelect>
  499. </div>
  500. </div>
  501. </div>
  502. </section>
  503. <section>
  504. <h2>
  505. Multiple
  506. </h2>
  507. <div>
  508. <div className="grid md:grid-cols-2 gap-4">
  509. <div>
  510. <MultiChoice.MenuMultiSelect
  511. size="small"
  512. label="MultilineTextInput"
  513. hint="Type anything here&hellip;"
  514. indicator="A"
  515. block
  516. >
  517. {options}
  518. </MultiChoice.MenuMultiSelect>
  519. </div>
  520. <div>
  521. <MultiChoice.MenuMultiSelect
  522. border
  523. size="small"
  524. label="MultilineTextInput"
  525. hint="Type anything here&hellip;"
  526. indicator="A"
  527. block
  528. >
  529. {options}
  530. </MultiChoice.MenuMultiSelect>
  531. </div>
  532. <div>
  533. <MultiChoice.MenuMultiSelect
  534. label="MultilineTextInput"
  535. hint="Type anything here&hellip;"
  536. indicator="A"
  537. block
  538. >
  539. {options}
  540. </MultiChoice.MenuMultiSelect>
  541. </div>
  542. <div>
  543. <MultiChoice.MenuMultiSelect
  544. border
  545. label="MultilineTextInput"
  546. hint="Type anything here&hellip;"
  547. indicator="A"
  548. block
  549. >
  550. {options}
  551. </MultiChoice.MenuMultiSelect>
  552. </div>
  553. <div>
  554. <MultiChoice.MenuMultiSelect
  555. size="large"
  556. label="MultilineTextInput"
  557. hint="Type anything here&hellip;"
  558. indicator="A"
  559. block
  560. >
  561. {options}
  562. </MultiChoice.MenuMultiSelect>
  563. </div>
  564. <div>
  565. <MultiChoice.MenuMultiSelect
  566. border
  567. size="large"
  568. label="MultilineTextInput"
  569. hint="Type anything here&hellip;"
  570. indicator="A"
  571. block
  572. >
  573. {options}
  574. </MultiChoice.MenuMultiSelect>
  575. </div>
  576. <div>
  577. <MultiChoice.MenuMultiSelect
  578. label="MultilineTextInput"
  579. hint="Type anything here&hellip;"
  580. indicator="A"
  581. block
  582. disabled
  583. >
  584. {options}
  585. </MultiChoice.MenuMultiSelect>
  586. </div>
  587. <div>
  588. <MultiChoice.MenuMultiSelect
  589. border
  590. label="MultilineTextInput"
  591. hint="Type anything here&hellip;"
  592. indicator="A"
  593. block
  594. disabled
  595. >
  596. {options}
  597. </MultiChoice.MenuMultiSelect>
  598. </div>
  599. </div>
  600. </div>
  601. </section>
  602. </div>
  603. </div>
  604. </section>
  605. <section>
  606. <div className="container mx-auto px-4">
  607. <h1>
  608. RadioButton
  609. </h1>
  610. <div>
  611. <section>
  612. <h2>Variants</h2>
  613. <div>
  614. <div className="grid md:grid-cols-2 gap-4 my-4">
  615. <div>
  616. <Choice.RadioButton
  617. block
  618. variant="bare"
  619. name="RadioButton"
  620. >
  621. Button
  622. </Choice.RadioButton>
  623. </div>
  624. <div>
  625. <Choice.RadioButton
  626. variant="filled"
  627. block
  628. name="RadioButton"
  629. >
  630. Button
  631. </Choice.RadioButton>
  632. </div>
  633. <div>
  634. <Choice.RadioButton
  635. variant="outline"
  636. block
  637. name="RadioButton"
  638. >
  639. Button
  640. </Choice.RadioButton>
  641. </div>
  642. <div>
  643. <Choice.RadioButton
  644. variant="filled"
  645. block
  646. name="RadioButton"
  647. >
  648. Button
  649. </Choice.RadioButton>
  650. </div>
  651. <div>
  652. <Choice.RadioButton
  653. block
  654. disabled
  655. name="RadioButton"
  656. variant="bare"
  657. >
  658. Button
  659. </Choice.RadioButton>
  660. </div>
  661. <div>
  662. <Choice.RadioButton
  663. variant="filled"
  664. block
  665. disabled
  666. name="RadioButton"
  667. >
  668. Button
  669. </Choice.RadioButton>
  670. </div>
  671. <div>
  672. <Choice.RadioButton
  673. variant="outline"
  674. block
  675. disabled
  676. name="RadioButton"
  677. >
  678. Button
  679. </Choice.RadioButton>
  680. </div>
  681. <div>
  682. <Choice.RadioButton
  683. variant="filled"
  684. block
  685. disabled
  686. name="RadioButton"
  687. >
  688. Button
  689. </Choice.RadioButton>
  690. </div>
  691. </div>
  692. </div>
  693. </section>
  694. <section>
  695. <h2>Sizes</h2>
  696. <div>
  697. <div className="grid md:grid-cols-2 gap-4 my-4">
  698. <div>
  699. <Choice.RadioButton
  700. block
  701. variant="outline"
  702. size="small"
  703. name="RadioButton"
  704. >
  705. Button
  706. </Choice.RadioButton>
  707. </div>
  708. <div>
  709. <Choice.RadioButton
  710. block
  711. variant="filled"
  712. size="small"
  713. name="RadioButton"
  714. >
  715. Button
  716. </Choice.RadioButton>
  717. </div>
  718. <div>
  719. <Choice.RadioButton
  720. block
  721. variant="outline"
  722. size="medium"
  723. name="RadioButton"
  724. >
  725. Button
  726. </Choice.RadioButton>
  727. </div>
  728. <div>
  729. <Choice.RadioButton
  730. block
  731. variant="filled"
  732. size="medium"
  733. name="RadioButton"
  734. >
  735. Button
  736. </Choice.RadioButton>
  737. </div>
  738. <div>
  739. <Choice.RadioButton
  740. block
  741. variant="outline"
  742. size="large"
  743. name="RadioButton"
  744. >
  745. Button
  746. </Choice.RadioButton>
  747. </div>
  748. <div>
  749. <Choice.RadioButton
  750. block
  751. variant="filled"
  752. size="large"
  753. name="RadioButton"
  754. >
  755. Button
  756. </Choice.RadioButton>
  757. </div>
  758. </div>
  759. </div>
  760. </section>
  761. <section>
  762. <h2>Compact</h2>
  763. <div>
  764. <div className="grid md:grid-cols-2 gap-4 my-4">
  765. <div>
  766. <Choice.RadioButton
  767. block
  768. compact
  769. variant="outline"
  770. name="RadioButton"
  771. >
  772. Button
  773. </Choice.RadioButton>
  774. </div>
  775. <div>
  776. <Choice.RadioButton
  777. block
  778. compact
  779. variant="filled"
  780. name="RadioButton"
  781. >
  782. Button
  783. </Choice.RadioButton>
  784. </div>
  785. <div>
  786. <Choice.RadioButton
  787. block
  788. compact
  789. variant="outline"
  790. name="RadioButton"
  791. subtext={
  792. <>
  793. Subtext
  794. </>
  795. }
  796. >
  797. Button
  798. </Choice.RadioButton>
  799. </div>
  800. <div>
  801. <Choice.RadioButton
  802. block
  803. compact
  804. variant="filled"
  805. name="RadioButton"
  806. subtext={
  807. <>
  808. Subtext
  809. </>
  810. }
  811. >
  812. Button
  813. </Choice.RadioButton>
  814. </div>
  815. <div>
  816. <Choice.RadioButton
  817. block
  818. compact
  819. variant="outline"
  820. size="small"
  821. name="RadioButton"
  822. subtext={
  823. <>
  824. Subtext
  825. </>
  826. }
  827. >
  828. Button
  829. </Choice.RadioButton>
  830. </div>
  831. <div>
  832. <Choice.RadioButton
  833. block
  834. compact
  835. variant="filled"
  836. size="small"
  837. name="RadioButton"
  838. subtext={
  839. <>
  840. Subtext
  841. </>
  842. }
  843. >
  844. Button
  845. </Choice.RadioButton>
  846. </div>
  847. </div>
  848. </div>
  849. </section>
  850. </div>
  851. </div>
  852. </section>
  853. <section>
  854. <div className="container mx-auto px-4">
  855. <h1>
  856. RadioTickBox
  857. </h1>
  858. <div>
  859. <div className="grid gap-4 my-4">
  860. <div>
  861. <Choice.RadioTickBox
  862. block
  863. subtext="Subtext"
  864. name="RadioButton"
  865. >
  866. RadioButton
  867. </Choice.RadioTickBox>
  868. </div>
  869. </div>
  870. <div className="grid gap-4 my-4">
  871. <div>
  872. <Choice.RadioTickBox
  873. block
  874. subtext={
  875. <>
  876. <div>
  877. This is a very long text that may span a couple of lines.
  878. </div>
  879. <div>
  880. The subtext should not be included with the click area of the component.
  881. </div>
  882. </>
  883. }
  884. name="RadioButton"
  885. >
  886. RadioButton
  887. </Choice.RadioTickBox>
  888. </div>
  889. </div>
  890. </div>
  891. </div>
  892. </section>
  893. <section>
  894. <div className="container mx-auto px-4">
  895. <h1>
  896. ToggleButton
  897. </h1>
  898. <div>
  899. <section>
  900. <h2>Variants</h2>
  901. <div>
  902. <div className="grid md:grid-cols-2 gap-4 my-4">
  903. <div>
  904. <MultiChoice.ToggleButton
  905. variant="bare"
  906. block
  907. >
  908. Button
  909. </MultiChoice.ToggleButton>
  910. </div>
  911. <div>
  912. <MultiChoice.ToggleButton
  913. variant="filled"
  914. block
  915. >
  916. Button
  917. </MultiChoice.ToggleButton>
  918. </div>
  919. <div>
  920. <MultiChoice.ToggleButton
  921. variant="outline"
  922. block
  923. >
  924. Button
  925. </MultiChoice.ToggleButton>
  926. </div>
  927. <div>
  928. <MultiChoice.ToggleButton
  929. variant="filled"
  930. block
  931. >
  932. Button
  933. </MultiChoice.ToggleButton>
  934. </div>
  935. <div>
  936. <MultiChoice.ToggleButton
  937. variant="bare"
  938. block
  939. disabled
  940. >
  941. Button
  942. </MultiChoice.ToggleButton>
  943. </div>
  944. <div>
  945. <MultiChoice.ToggleButton
  946. variant="filled"
  947. block
  948. disabled
  949. >
  950. Button
  951. </MultiChoice.ToggleButton>
  952. </div>
  953. <div>
  954. <MultiChoice.ToggleButton
  955. variant="outline"
  956. block
  957. disabled
  958. >
  959. Button
  960. </MultiChoice.ToggleButton>
  961. </div>
  962. <div>
  963. <MultiChoice.ToggleButton
  964. variant="filled"
  965. block
  966. disabled
  967. >
  968. Button
  969. </MultiChoice.ToggleButton>
  970. </div>
  971. <div>
  972. <MultiChoice.ToggleButton
  973. variant="outline"
  974. block
  975. indeterminate
  976. >
  977. Button
  978. </MultiChoice.ToggleButton>
  979. </div>
  980. <div>
  981. <MultiChoice.ToggleButton
  982. variant="filled"
  983. block
  984. indeterminate
  985. >
  986. Button
  987. </MultiChoice.ToggleButton>
  988. </div>
  989. </div>
  990. </div>
  991. </section>
  992. <section>
  993. <h2>Sizes</h2>
  994. <div>
  995. <div className="grid md:grid-cols-2 gap-4 my-4">
  996. <div>
  997. <MultiChoice.ToggleButton
  998. block
  999. variant="outline"
  1000. size="small"
  1001. >
  1002. Button
  1003. </MultiChoice.ToggleButton>
  1004. </div>
  1005. <div>
  1006. <MultiChoice.ToggleButton
  1007. block
  1008. variant="filled"
  1009. size="small"
  1010. >
  1011. Button
  1012. </MultiChoice.ToggleButton>
  1013. </div>
  1014. <div>
  1015. <MultiChoice.ToggleButton
  1016. block
  1017. variant="outline"
  1018. size="medium"
  1019. >
  1020. Button
  1021. </MultiChoice.ToggleButton>
  1022. </div>
  1023. <div>
  1024. <MultiChoice.ToggleButton
  1025. block
  1026. variant="filled"
  1027. size="medium"
  1028. >
  1029. Button
  1030. </MultiChoice.ToggleButton>
  1031. </div>
  1032. <div>
  1033. <MultiChoice.ToggleButton
  1034. block
  1035. variant="outline"
  1036. size="large"
  1037. >
  1038. Button
  1039. </MultiChoice.ToggleButton>
  1040. </div>
  1041. <div>
  1042. <MultiChoice.ToggleButton
  1043. block
  1044. variant="filled"
  1045. size="large"
  1046. >
  1047. Button
  1048. </MultiChoice.ToggleButton>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </section>
  1053. <section>
  1054. <h2>Compact</h2>
  1055. <div>
  1056. <div className="grid md:grid-cols-2 gap-4 my-4">
  1057. <div>
  1058. <MultiChoice.ToggleButton
  1059. block
  1060. compact
  1061. variant="outline"
  1062. >
  1063. Button
  1064. </MultiChoice.ToggleButton>
  1065. </div>
  1066. <div>
  1067. <MultiChoice.ToggleButton
  1068. block
  1069. compact
  1070. variant="filled"
  1071. >
  1072. Button
  1073. </MultiChoice.ToggleButton>
  1074. </div>
  1075. <div>
  1076. <MultiChoice.ToggleButton
  1077. block
  1078. compact
  1079. variant="outline"
  1080. subtext={
  1081. <>
  1082. Subtext
  1083. </>
  1084. }
  1085. >
  1086. Button
  1087. </MultiChoice.ToggleButton>
  1088. </div>
  1089. <div>
  1090. <MultiChoice.ToggleButton
  1091. block
  1092. compact
  1093. variant="filled"
  1094. subtext={
  1095. <>
  1096. Subtext
  1097. </>
  1098. }
  1099. >
  1100. Button
  1101. </MultiChoice.ToggleButton>
  1102. </div>
  1103. <div>
  1104. <MultiChoice.ToggleButton
  1105. block
  1106. compact
  1107. variant="outline"
  1108. size="small"
  1109. subtext={
  1110. <>
  1111. Subtext
  1112. </>
  1113. }
  1114. >
  1115. Button
  1116. </MultiChoice.ToggleButton>
  1117. </div>
  1118. <div>
  1119. <MultiChoice.ToggleButton
  1120. block
  1121. compact
  1122. variant="filled"
  1123. size="small"
  1124. subtext={
  1125. <>
  1126. Subtext
  1127. </>
  1128. }
  1129. >
  1130. Button
  1131. </MultiChoice.ToggleButton>
  1132. </div>
  1133. </div>
  1134. </div>
  1135. </section>
  1136. </div>
  1137. </div>
  1138. </section>
  1139. <section>
  1140. <div className="container mx-auto px-4">
  1141. <h1>
  1142. ToggleSwitch
  1143. </h1>
  1144. <div>
  1145. <section>
  1146. <h2>Default</h2>
  1147. <div>
  1148. <div className="grid md:grid-cols-2 gap-4 my-4">
  1149. <div>
  1150. <MultiChoice.ToggleSwitch
  1151. block
  1152. subtext="Subtext"
  1153. checkedLabel="Checkbox"
  1154. />
  1155. </div>
  1156. <div>
  1157. <MultiChoice.ToggleSwitch
  1158. block
  1159. subtext="Subtext"
  1160. checkedLabel="Checkbox"
  1161. />
  1162. </div>
  1163. </div>
  1164. </div>
  1165. </section>
  1166. <section>
  1167. <h2>With Unchecked Label</h2>
  1168. <div>
  1169. <div className="grid md:grid-cols-2 gap-4 my-4">
  1170. <div>
  1171. <MultiChoice.ToggleSwitch
  1172. block
  1173. subtext="Subtext"
  1174. checkedLabel="On"
  1175. uncheckedLabel="Off"
  1176. />
  1177. </div>
  1178. <div>
  1179. <MultiChoice.ToggleSwitch
  1180. block
  1181. subtext="Subtext"
  1182. indeterminate
  1183. checkedLabel="On"
  1184. uncheckedLabel="Off"
  1185. />
  1186. </div>
  1187. </div>
  1188. </div>
  1189. </section>
  1190. </div>
  1191. </div>
  1192. </section>
  1193. <section>
  1194. <div className="container mx-auto px-4">
  1195. <h1>
  1196. ToggleTickBox
  1197. </h1>
  1198. <div>
  1199. <section>
  1200. <h2>Default</h2>
  1201. <div>
  1202. <div className="grid md:grid-cols-2 gap-4 my-4">
  1203. <div>
  1204. <MultiChoice.ToggleTickBox
  1205. block
  1206. subtext="Subtext"
  1207. >
  1208. Checkbox
  1209. </MultiChoice.ToggleTickBox>
  1210. </div>
  1211. <div>
  1212. <MultiChoice.ToggleTickBox
  1213. block
  1214. indeterminate
  1215. subtext="Subtext"
  1216. >
  1217. Checkbox
  1218. </MultiChoice.ToggleTickBox>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. </section>
  1223. </div>
  1224. </div>
  1225. </section>
  1226. <section>
  1227. <div className="container mx-auto px-4">
  1228. <h1>
  1229. ComboBox
  1230. </h1>
  1231. <div>
  1232. <section>
  1233. <h2>
  1234. Default
  1235. </h2>
  1236. <div>
  1237. <div className="grid md:grid-cols-2 gap-4">
  1238. <div>
  1239. <Choice.ComboBox
  1240. size="small"
  1241. label="MultilineTextInput"
  1242. hint="Type anything here&hellip;"
  1243. indicator="A"
  1244. block
  1245. >
  1246. {options}
  1247. </Choice.ComboBox>
  1248. </div>
  1249. <div>
  1250. <Choice.ComboBox
  1251. border
  1252. size="small"
  1253. label="MultilineTextInput"
  1254. hint="Type anything here&hellip;"
  1255. indicator="A"
  1256. block
  1257. >
  1258. {options}
  1259. </Choice.ComboBox>
  1260. </div>
  1261. <div>
  1262. <Choice.ComboBox
  1263. label="MultilineTextInput"
  1264. hint="Type anything here&hellip;"
  1265. indicator="A"
  1266. block
  1267. >
  1268. {options}
  1269. </Choice.ComboBox>
  1270. </div>
  1271. <div>
  1272. <Choice.ComboBox
  1273. border
  1274. label="MultilineTextInput"
  1275. hint="Type anything here&hellip;"
  1276. indicator="A"
  1277. block
  1278. >
  1279. {options}
  1280. </Choice.ComboBox>
  1281. </div>
  1282. <div>
  1283. <Choice.ComboBox
  1284. size="large"
  1285. label="MultilineTextInput"
  1286. hint="Type anything here&hellip;"
  1287. indicator="A"
  1288. block
  1289. >
  1290. {options}
  1291. </Choice.ComboBox>
  1292. </div>
  1293. <div>
  1294. <Choice.ComboBox
  1295. border
  1296. size="large"
  1297. label="MultilineTextInput"
  1298. hint="Type anything here&hellip;"
  1299. indicator="A"
  1300. block
  1301. >
  1302. {options}
  1303. </Choice.ComboBox>
  1304. </div>
  1305. <div>
  1306. <Choice.ComboBox
  1307. label="MultilineTextInput"
  1308. hint="Type anything here&hellip;"
  1309. indicator="A"
  1310. block
  1311. disabled
  1312. >
  1313. {options}
  1314. </Choice.ComboBox>
  1315. </div>
  1316. <div>
  1317. <Choice.ComboBox
  1318. border
  1319. label="MultilineTextInput"
  1320. hint="Type anything here&hellip;"
  1321. indicator="A"
  1322. block
  1323. disabled
  1324. >
  1325. {options}
  1326. </Choice.ComboBox>
  1327. </div>
  1328. </div>
  1329. </div>
  1330. </section>
  1331. <section>
  1332. <h2>Alternate</h2>
  1333. <div>
  1334. <div className="grid md:grid-cols-2 gap-4">
  1335. <div>
  1336. <Choice.ComboBox
  1337. variant="alternate"
  1338. size="small"
  1339. label="MultilineTextInput"
  1340. hint="Type anything here&hellip;"
  1341. indicator="A"
  1342. block
  1343. >
  1344. {options}
  1345. </Choice.ComboBox>
  1346. </div>
  1347. <div>
  1348. <Choice.ComboBox
  1349. border
  1350. variant="alternate"
  1351. size="small"
  1352. label="MultilineTextInput"
  1353. hint="Type anything here&hellip;"
  1354. indicator="A"
  1355. block
  1356. >
  1357. {options}
  1358. </Choice.ComboBox>
  1359. </div>
  1360. <div>
  1361. <Choice.ComboBox
  1362. variant="alternate"
  1363. label="MultilineTextInput"
  1364. hint="Type anything here&hellip;"
  1365. indicator="A"
  1366. block
  1367. >
  1368. {options}
  1369. </Choice.ComboBox>
  1370. </div>
  1371. <div>
  1372. <Choice.ComboBox
  1373. border
  1374. variant="alternate"
  1375. label="MultilineTextInput"
  1376. hint="Type anything here&hellip;"
  1377. indicator="A"
  1378. block
  1379. >
  1380. {options}
  1381. </Choice.ComboBox>
  1382. </div>
  1383. <div>
  1384. <Choice.ComboBox
  1385. variant="alternate"
  1386. size="large"
  1387. label="MultilineTextInput"
  1388. hint="Type anything here&hellip;"
  1389. indicator="A"
  1390. block
  1391. >
  1392. {options}
  1393. </Choice.ComboBox>
  1394. </div>
  1395. <div>
  1396. <Choice.ComboBox
  1397. border
  1398. block
  1399. variant="alternate"
  1400. size="large"
  1401. label="MultilineTextInput"
  1402. hint="Type anything here&hellip;"
  1403. indicator="A"
  1404. >
  1405. {options}
  1406. </Choice.ComboBox>
  1407. </div>
  1408. <div>
  1409. <Choice.ComboBox
  1410. variant="alternate"
  1411. label="MultilineTextInput"
  1412. hint="Type anything here&hellip;"
  1413. indicator="A"
  1414. block
  1415. disabled
  1416. >
  1417. {options}
  1418. </Choice.ComboBox>
  1419. </div>
  1420. <div>
  1421. <Choice.ComboBox
  1422. variant="alternate"
  1423. border
  1424. label="MultilineTextInput"
  1425. hint="Type anything here&hellip;"
  1426. indicator="A"
  1427. block
  1428. disabled
  1429. >
  1430. {options}
  1431. </Choice.ComboBox>
  1432. </div>
  1433. </div>
  1434. </div>
  1435. </section>
  1436. </div>
  1437. </div>
  1438. </section>
  1439. <section>
  1440. <div className="container mx-auto px-4">
  1441. <h1>
  1442. TagInput
  1443. </h1>
  1444. <div>
  1445. <section>
  1446. <h2>
  1447. Default
  1448. </h2>
  1449. <div>
  1450. <div className="grid md:grid-cols-2 gap-4">
  1451. <div>
  1452. <MultiChoice.TagInput
  1453. size="small"
  1454. label="MultilineTextInput"
  1455. hint="Type anything here&hellip;"
  1456. indicator="A"
  1457. block
  1458. enhanced
  1459. />
  1460. </div>
  1461. <div>
  1462. <MultiChoice.TagInput
  1463. border
  1464. size="small"
  1465. label="MultilineTextInput"
  1466. hint="Type anything here&hellip;"
  1467. indicator="A"
  1468. block
  1469. enhanced
  1470. />
  1471. </div>
  1472. <div>
  1473. <MultiChoice.TagInput
  1474. label="MultilineTextInput"
  1475. hint="Type anything here&hellip;"
  1476. indicator="A"
  1477. block
  1478. enhanced
  1479. />
  1480. </div>
  1481. <div>
  1482. <MultiChoice.TagInput
  1483. border
  1484. label="MultilineTextInput"
  1485. hint="Type anything here&hellip;"
  1486. indicator="A"
  1487. block
  1488. enhanced
  1489. />
  1490. </div>
  1491. <div>
  1492. <MultiChoice.TagInput
  1493. size="large"
  1494. label="MultilineTextInput"
  1495. hint="Type anything here&hellip;"
  1496. indicator="A"
  1497. block
  1498. enhanced
  1499. />
  1500. </div>
  1501. <div>
  1502. <MultiChoice.TagInput
  1503. border
  1504. size="large"
  1505. label="change"
  1506. hint="Type anything here&hellip;"
  1507. indicator="A"
  1508. block
  1509. enhanced
  1510. separator={['\n', ',']}
  1511. onBlur={(e) => {
  1512. console.log(e.currentTarget);
  1513. }}
  1514. onChange={(e) => {
  1515. console.log(e.currentTarget.value);
  1516. }}
  1517. />
  1518. </div>
  1519. <div>
  1520. <MultiChoice.TagInput
  1521. label="MultilineTextInput"
  1522. hint="Type anything here&hellip;"
  1523. indicator="A"
  1524. block
  1525. disabled
  1526. enhanced
  1527. />
  1528. </div>
  1529. <div>
  1530. <MultiChoice.TagInput
  1531. border
  1532. label="MultilineTextInput"
  1533. hint="Type anything here&hellip;"
  1534. indicator="A"
  1535. block
  1536. disabled
  1537. enhanced
  1538. />
  1539. </div>
  1540. </div>
  1541. </div>
  1542. </section>
  1543. <section>
  1544. <h2>Alternate</h2>
  1545. <div>
  1546. <div className="grid md:grid-cols-2 gap-4">
  1547. <div>
  1548. <MultiChoice.TagInput
  1549. variant="alternate"
  1550. size="small"
  1551. label="MultilineTextInput"
  1552. hint="Type anything here&hellip;"
  1553. indicator="A"
  1554. block
  1555. enhanced
  1556. />
  1557. </div>
  1558. <div>
  1559. <MultiChoice.TagInput
  1560. border
  1561. variant="alternate"
  1562. size="small"
  1563. label="MultilineTextInput"
  1564. hint="Type anything here&hellip;"
  1565. indicator="A"
  1566. block
  1567. enhanced
  1568. />
  1569. </div>
  1570. <div>
  1571. <MultiChoice.TagInput
  1572. variant="alternate"
  1573. label="MultilineTextInput"
  1574. hint="Type anything here&hellip;"
  1575. indicator="A"
  1576. block
  1577. enhanced
  1578. />
  1579. </div>
  1580. <div>
  1581. <MultiChoice.TagInput
  1582. border
  1583. variant="alternate"
  1584. label="MultilineTextInput"
  1585. hint="Type anything here&hellip;"
  1586. indicator="A"
  1587. block
  1588. enhanced
  1589. />
  1590. </div>
  1591. <div>
  1592. <MultiChoice.TagInput
  1593. variant="alternate"
  1594. size="large"
  1595. label="MultilineTextInput"
  1596. hint="Type anything here&hellip;"
  1597. indicator="A"
  1598. block
  1599. enhanced
  1600. />
  1601. </div>
  1602. <div>
  1603. <MultiChoice.TagInput
  1604. border
  1605. block
  1606. variant="alternate"
  1607. size="large"
  1608. label="MultilineTextInput"
  1609. hint="Type anything here&hellip;"
  1610. indicator="A"
  1611. enhanced
  1612. />
  1613. </div>
  1614. <div>
  1615. <MultiChoice.TagInput
  1616. variant="alternate"
  1617. label="MultilineTextInput"
  1618. hint="Type anything here&hellip;"
  1619. indicator="A"
  1620. block
  1621. disabled
  1622. enhanced
  1623. />
  1624. </div>
  1625. <div>
  1626. <MultiChoice.TagInput
  1627. variant="alternate"
  1628. border
  1629. label="MultilineTextInput"
  1630. hint="Type anything here&hellip;"
  1631. indicator="A"
  1632. block
  1633. disabled
  1634. enhanced
  1635. />
  1636. </div>
  1637. </div>
  1638. </div>
  1639. </section>
  1640. </div>
  1641. </div>
  1642. </section>
  1643. </main>
  1644. </DefaultLayout>
  1645. );
  1646. };
  1647. export default OptionPage;