@pega/cosmos-react-demos 3.0.0-dev.1.0 → 3.0.0-dev.2.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 (207) hide show
  1. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  2. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
  3. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  4. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  5. package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
  6. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  7. package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
  8. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  9. package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
  10. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  11. package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
  12. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  13. package/jsx/core/Avatar/Avatar.stories.jsx +27 -2
  14. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  15. package/jsx/core/Badges/Status.stories.d.ts +5 -0
  16. package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
  17. package/jsx/core/Badges/Status.stories.jsx +25 -1
  18. package/jsx/core/Badges/Status.stories.jsx.map +1 -1
  19. package/jsx/core/Banner/Banner.stories.d.ts +5 -1
  20. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  21. package/jsx/core/Banner/Banner.stories.jsx +22 -1
  22. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  23. package/jsx/core/Button/Button.stories.d.ts +8 -0
  24. package/jsx/core/Button/Button.stories.d.ts.map +1 -1
  25. package/jsx/core/Button/Button.stories.jsx +30 -1
  26. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  27. package/jsx/core/Card/Card.stories.d.ts +5 -0
  28. package/jsx/core/Card/Card.stories.d.ts.map +1 -1
  29. package/jsx/core/Card/Card.stories.jsx +30 -1
  30. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  31. package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
  32. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  33. package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
  34. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  35. package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
  36. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  37. package/jsx/core/Configuration/Configuration.stories.jsx +93 -2
  38. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  39. package/jsx/core/Form/Form.stories.d.ts +10 -0
  40. package/jsx/core/Form/Form.stories.d.ts.map +1 -1
  41. package/jsx/core/Form/Form.stories.jsx +42 -2
  42. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  43. package/jsx/core/Input/Input.stories.d.ts +9 -0
  44. package/jsx/core/Input/Input.stories.d.ts.map +1 -1
  45. package/jsx/core/Input/Input.stories.jsx +40 -1
  46. package/jsx/core/Input/Input.stories.jsx.map +1 -1
  47. package/jsx/core/Label/Label.stories.d.ts +4 -0
  48. package/jsx/core/Label/Label.stories.d.ts.map +1 -1
  49. package/jsx/core/Label/Label.stories.jsx +18 -1
  50. package/jsx/core/Label/Label.stories.jsx.map +1 -1
  51. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  52. package/jsx/core/Number/Number.stories.jsx +0 -3
  53. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  54. package/jsx/core/Progress/Progress.stories.d.ts +4 -0
  55. package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
  56. package/jsx/core/Progress/Progress.stories.jsx +22 -1
  57. package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
  58. package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
  59. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  60. package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
  61. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  62. package/jsx/core/Rating/Rating.stories.d.ts +4 -0
  63. package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
  64. package/jsx/core/Rating/Rating.stories.jsx +18 -1
  65. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  66. package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
  67. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  68. package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
  69. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
  70. package/jsx/core/Select/Select.stories.d.ts +8 -0
  71. package/jsx/core/Select/Select.stories.d.ts.map +1 -1
  72. package/jsx/core/Select/Select.stories.jsx +35 -1
  73. package/jsx/core/Select/Select.stories.jsx.map +1 -1
  74. package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
  75. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  76. package/jsx/core/Sentiment/Sentiment.stories.jsx +32 -1
  77. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  78. package/jsx/core/Switch/Switch.stories.d.ts +7 -0
  79. package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
  80. package/jsx/core/Switch/Switch.stories.jsx +34 -1
  81. package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
  82. package/jsx/core/Table/Table.stories.d.ts +25 -0
  83. package/jsx/core/Table/Table.stories.d.ts.map +1 -1
  84. package/jsx/core/Table/Table.stories.jsx +120 -1
  85. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  86. package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
  87. package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
  88. package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
  89. package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
  90. package/jsx/core/Text/Text.stories.d.ts +19 -0
  91. package/jsx/core/Text/Text.stories.d.ts.map +1 -1
  92. package/jsx/core/Text/Text.stories.jsx +112 -1
  93. package/jsx/core/Text/Text.stories.jsx.map +1 -1
  94. package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
  95. package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
  96. package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
  97. package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
  98. package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
  99. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  100. package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
  101. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  102. package/jsx/work/Details/Details.stories.jsx +3 -3
  103. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  104. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  105. package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
  106. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  107. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  108. package/lib/build/Workbench/Workbench.stories.js +15 -17
  109. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  110. package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
  111. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  112. package/lib/core/AppShell/AppShell.stories.js +23 -1
  113. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  114. package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
  115. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  116. package/lib/core/Avatar/Avatar.stories.js +25 -2
  117. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  118. package/lib/core/Badges/Status.stories.d.ts +5 -0
  119. package/lib/core/Badges/Status.stories.d.ts.map +1 -1
  120. package/lib/core/Badges/Status.stories.js +23 -1
  121. package/lib/core/Badges/Status.stories.js.map +1 -1
  122. package/lib/core/Banner/Banner.stories.d.ts +5 -1
  123. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  124. package/lib/core/Banner/Banner.stories.js +18 -1
  125. package/lib/core/Banner/Banner.stories.js.map +1 -1
  126. package/lib/core/Button/Button.stories.d.ts +8 -0
  127. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  128. package/lib/core/Button/Button.stories.js +28 -1
  129. package/lib/core/Button/Button.stories.js.map +1 -1
  130. package/lib/core/Card/Card.stories.d.ts +5 -0
  131. package/lib/core/Card/Card.stories.d.ts.map +1 -1
  132. package/lib/core/Card/Card.stories.js +19 -1
  133. package/lib/core/Card/Card.stories.js.map +1 -1
  134. package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
  135. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  136. package/lib/core/Checkbox/Checkbox.stories.js +52 -1
  137. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  138. package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
  139. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  140. package/lib/core/Configuration/Configuration.stories.js +61 -2
  141. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  142. package/lib/core/Form/Form.stories.d.ts +10 -0
  143. package/lib/core/Form/Form.stories.d.ts.map +1 -1
  144. package/lib/core/Form/Form.stories.js +40 -2
  145. package/lib/core/Form/Form.stories.js.map +1 -1
  146. package/lib/core/Input/Input.stories.d.ts +9 -0
  147. package/lib/core/Input/Input.stories.d.ts.map +1 -1
  148. package/lib/core/Input/Input.stories.js +38 -1
  149. package/lib/core/Input/Input.stories.js.map +1 -1
  150. package/lib/core/Label/Label.stories.d.ts +4 -0
  151. package/lib/core/Label/Label.stories.d.ts.map +1 -1
  152. package/lib/core/Label/Label.stories.js +16 -1
  153. package/lib/core/Label/Label.stories.js.map +1 -1
  154. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  155. package/lib/core/Number/Number.stories.js +0 -3
  156. package/lib/core/Number/Number.stories.js.map +1 -1
  157. package/lib/core/Progress/Progress.stories.d.ts +4 -0
  158. package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
  159. package/lib/core/Progress/Progress.stories.js +18 -1
  160. package/lib/core/Progress/Progress.stories.js.map +1 -1
  161. package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
  162. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  163. package/lib/core/RadioButton/RadioButton.stories.js +51 -1
  164. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  165. package/lib/core/Rating/Rating.stories.d.ts +4 -0
  166. package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
  167. package/lib/core/Rating/Rating.stories.js +16 -1
  168. package/lib/core/Rating/Rating.stories.js.map +1 -1
  169. package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
  170. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  171. package/lib/core/SearchInput/SearchInput.stories.js +16 -1
  172. package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
  173. package/lib/core/Select/Select.stories.d.ts +8 -0
  174. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  175. package/lib/core/Select/Select.stories.js +28 -1
  176. package/lib/core/Select/Select.stories.js.map +1 -1
  177. package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
  178. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  179. package/lib/core/Sentiment/Sentiment.stories.js +29 -2
  180. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  181. package/lib/core/Switch/Switch.stories.d.ts +7 -0
  182. package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
  183. package/lib/core/Switch/Switch.stories.js +32 -1
  184. package/lib/core/Switch/Switch.stories.js.map +1 -1
  185. package/lib/core/Table/Table.stories.d.ts +25 -0
  186. package/lib/core/Table/Table.stories.d.ts.map +1 -1
  187. package/lib/core/Table/Table.stories.js +113 -1
  188. package/lib/core/Table/Table.stories.js.map +1 -1
  189. package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
  190. package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
  191. package/lib/core/Tabs/Tabs.stories.js +30 -1
  192. package/lib/core/Tabs/Tabs.stories.js.map +1 -1
  193. package/lib/core/Text/Text.stories.d.ts +19 -0
  194. package/lib/core/Text/Text.stories.d.ts.map +1 -1
  195. package/lib/core/Text/Text.stories.js +102 -2
  196. package/lib/core/Text/Text.stories.js.map +1 -1
  197. package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
  198. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
  199. package/lib/core/TextArea/TextArea.stories.js +20 -1
  200. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  201. package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
  202. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  203. package/lib/core/Tooltip/Tooltip.stories.js +20 -1
  204. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  205. package/lib/work/Details/Details.stories.js +3 -3
  206. package/lib/work/Details/Details.stories.js.map +1 -1
  207. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.stories.jsx","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAmB,MAAM,yBAAyB,CAAC;AAEvE,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAClF,OAAO,CACL,CAAC,WAAW,CACV,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAC/E,OAAO,CACL,CAAC,WAAW,CACV,OAAO,CAAC,MAAM,CACd,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { RadioButton, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/RadioButton',\n component: RadioButton,\n args: {\n status: undefined,\n label: 'Choose me',\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultRadioButton: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RadioButtonCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"RadioButton.stories.jsx","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAmB,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI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OAAO,EAAE,EAAE;IACtD,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAClD,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACpC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, RadioButton, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/RadioButton',\n component: RadioButton,\n args: {\n status: undefined,\n label: 'Choose me',\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultRadioButton: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RadioButtonCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\ninterface ConfigurableRadioButtonProps extends RadioCheckProps {\n size?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n labelColor?: string;\n labelFontWeight?: string;\n checkedBackgroundColor?: string;\n checkedBorderColor?: string;\n}\n\nexport const ConfigurableRadioButton: Story<ConfigurableRadioButtonProps> = (\n args: ConfigurableRadioButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'radio-button': {\n 'border-radius': args.borderRadius\n },\n 'radio-check': {\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'background-color': args.backgroundColor,\n label: {\n color: args.labelColor,\n 'font-weight': args.labelFontWeight\n },\n size: args.size,\n ':checked': {\n 'background-color': args.checkedBackgroundColor,\n 'border-color': args.checkedBorderColor\n }\n }\n }\n }}\n >\n <RadioButton label='Configurable Radio Button' />\n </Configuration>\n );\n};\n\nConfigurableRadioButton.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '50%',\n labelColor: '#000000',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableRadioButton.argTypes = {\n size: { control: { type: 'text' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } },\n labelColor: { control: { type: 'color' } },\n labelFontWeight: { control: { type: 'text' } },\n checkedBackgroundColor: { control: { type: 'color' } },\n checkedBorderColor: { control: { type: 'color' } },\n status: { table: { disable: true } },\n label: { table: { disable: true } },\n required: { table: { disable: true } },\n disabled: { table: { disable: true } },\n readOnly: { table: { disable: true } }\n};\n"]}
@@ -6,4 +6,8 @@ interface RatingStoryProps extends RatingProps {
6
6
  ariaLabel?: string;
7
7
  }
8
8
  export declare const RatingDemo: Story<RatingStoryProps>;
9
+ interface ConfigurableRatingProps {
10
+ color?: string;
11
+ }
12
+ export declare const ConfigurableRating: Story<ConfigurableRatingProps>;
9
13
  //# sourceMappingURL=Rating.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAU9C,CAAC"}
1
+ {"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAyB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE7E,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAU9C,CAAC;AAgBF,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAqB7D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Rating } from '@pega/cosmos-react-core';
1
+ import { Configuration, Rating } from '@pega/cosmos-react-core';
2
2
  export default {
3
3
  title: 'Core/Rating',
4
4
  component: Rating
@@ -18,4 +18,21 @@ RatingDemo.argTypes = {
18
18
  metaInfo: { control: { type: 'text' } },
19
19
  ariaLabel: { control: { type: 'text' } }
20
20
  };
21
+ export const ConfigurableRating = (args) => {
22
+ return (<Configuration theme={{
23
+ components: {
24
+ rating: {
25
+ color: args.color
26
+ }
27
+ }
28
+ }}>
29
+ <Rating maxRating={5} value={3.6} metaInfo='52 reviews' aria-label='3.6 out of 5 stars based on 52 reviews'/>
30
+ </Configuration>);
31
+ };
32
+ ConfigurableRating.args = {
33
+ color: '#000000'
34
+ };
35
+ ConfigurableRating.argTypes = {
36
+ color: { control: { type: 'color' } }
37
+ };
21
38
  //# sourceMappingURL=Rating.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.stories.jsx","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,CAAC,MAAM,CACL,IAAI,IAAI,CAAC,CACT,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAC1B,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,wCAAwC;CACpD,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACzC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"Rating.stories.jsx","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE7E,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,CAAC,MAAM,CACL,IAAI,IAAI,CAAC,CACT,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAC1B,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,wCAAwC;CACpD,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACzC,CAAC;AAMF,MAAM,CAAC,MAAM,kBAAkB,GAAmC,CAChE,IAA6B,EAC7B,EAAE;IACF,OAAO,CACL,CAAC,aAAa,CACZ,KAAK,CAAC,CAAC;YACL,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,IAAI,CAAC,KAAK;iBAClB;aACF;SACF,CAAC,CAEF;MAAA,CAAC,MAAM,CACL,SAAS,CAAC,CAAC,CAAC,CAAC,CACb,KAAK,CAAC,CAAC,GAAG,CAAC,CACX,QAAQ,CAAC,YAAY,CACrB,UAAU,CAAC,wCAAwC,EAEvD;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n\ninterface ConfigurableRatingProps {\n color?: string;\n}\n\nexport const ConfigurableRating: Story<ConfigurableRatingProps> = (\n args: ConfigurableRatingProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n rating: {\n color: args.color\n }\n }\n }}\n >\n <Rating\n maxRating={5}\n value={3.6}\n metaInfo='52 reviews'\n aria-label='3.6 out of 5 stars based on 52 reviews'\n />\n </Configuration>\n );\n};\n\nConfigurableRating.args = {\n color: '#000000'\n};\n\nConfigurableRating.argTypes = {\n color: { control: { type: 'color' } }\n};\n"]}
@@ -3,4 +3,8 @@ import { SearchInputProps } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const SearchInputDemo: Story<SearchInputProps>;
6
+ interface ConfigurableSearchInputProps {
7
+ borderRadius?: number;
8
+ }
9
+ export declare const ConfigurableSearchInput: Story<ConfigurableSearchInputProps>;
6
10
  //# sourceMappingURL=SearchInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAe,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAEnD,CAAC"}
1
+ {"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAEvF,wBAGU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAEnD,CAAC;AAUF,UAAU,4BAA4B;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CAgBvE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { SearchInput } from '@pega/cosmos-react-core';
1
+ import { Configuration, SearchInput } from '@pega/cosmos-react-core';
2
2
  export default {
3
3
  title: 'Core/SearchInput',
4
4
  component: SearchInput
@@ -12,4 +12,21 @@ SearchInputDemo.args = {
12
12
  SearchInputDemo.argTypes = {
13
13
  placeholder: { control: { type: 'text' } }
14
14
  };
15
+ export const ConfigurableSearchInput = (args) => {
16
+ return (<Configuration theme={{
17
+ components: {
18
+ 'search-input': {
19
+ 'border-radius': args.borderRadius
20
+ }
21
+ }
22
+ }}>
23
+ <SearchInput />
24
+ </Configuration>);
25
+ };
26
+ ConfigurableSearchInput.args = {
27
+ borderRadius: 9999
28
+ };
29
+ ConfigurableSearchInput.argTypes = {
30
+ borderRadius: { control: { type: 'number' } }
31
+ };
15
32
  //# sourceMappingURL=SearchInput.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.stories.jsx","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,IAAsB,EAAE,EAAE;IACjF,OAAO,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAG,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { SearchInput, SearchInputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SearchInput',\n component: SearchInput\n} as Meta;\n\nexport const SearchInputDemo: Story<SearchInputProps> = (args: SearchInputProps) => {\n return <SearchInput {...args} placeholder={args.placeholder} />;\n};\n\nSearchInputDemo.args = {\n placeholder: 'Search…'\n};\n\nSearchInputDemo.argTypes = {\n placeholder: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"SearchInput.stories.jsx","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAEvF,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,IAAsB,EAAE,EAAE;IACjF,OAAO,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAG,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC3C,CAAC;AAMF,MAAM,CAAC,MAAM,uBAAuB,GAAwC,CAC1E,IAAkC,EAClC,EAAE;IACF,OAAO,CACL,CAAC,aAAa,CACZ,KAAK,CAAC,CAAC;YACL,UAAU,EAAE;gBACV,cAAc,EAAE;oBACd,eAAe,EAAE,IAAI,CAAC,YAAY;iBACnC;aACF;SACF,CAAC,CAEF;MAAA,CAAC,WAAW,CAAC,AAAD,EACd;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,IAAI,GAAG;IAC7B,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,uBAAuB,CAAC,QAAQ,GAAG;IACjC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, SearchInput, SearchInputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SearchInput',\n component: SearchInput\n} as Meta;\n\nexport const SearchInputDemo: Story<SearchInputProps> = (args: SearchInputProps) => {\n return <SearchInput {...args} placeholder={args.placeholder} />;\n};\n\nSearchInputDemo.args = {\n placeholder: 'Search…'\n};\n\nSearchInputDemo.argTypes = {\n placeholder: { control: { type: 'text' } }\n};\n\ninterface ConfigurableSearchInputProps {\n borderRadius?: number;\n}\n\nexport const ConfigurableSearchInput: Story<ConfigurableSearchInputProps> = (\n args: ConfigurableSearchInputProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'search-input': {\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <SearchInput />\n </Configuration>\n );\n};\n\nConfigurableSearchInput.args = {\n borderRadius: 9999\n};\n\nConfigurableSearchInput.argTypes = {\n borderRadius: { control: { type: 'number' } }\n};\n"]}
@@ -6,4 +6,12 @@ interface SelectStoryProps extends SelectProps {
6
6
  showAction: boolean;
7
7
  }
8
8
  export declare const SelectDemo: Story<SelectStoryProps>;
9
+ interface ConfigurableSelectProps {
10
+ height?: string;
11
+ padding?: string;
12
+ borderColor?: string;
13
+ borderWidth?: string;
14
+ borderRadius?: string;
15
+ }
16
+ export declare const ConfigurableSelect: Story<ConfigurableSelectProps>;
9
17
  //# sourceMappingURL=Select.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAU,MAAM,yBAAyB,CAAC;;AAEtE,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CA6B9C,CAAC"}
1
+ {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAyB,MAAM,yBAAyB,CAAC;;AAErF,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CA6B9C,CAAC;AAwBF,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Select, Option } from '@pega/cosmos-react-core';
1
+ import { Select, Option, Configuration } from '@pega/cosmos-react-core';
2
2
  export default {
3
3
  title: 'Core/Select',
4
4
  component: Select
@@ -39,4 +39,38 @@ SelectDemo.argTypes = {
39
39
  disabled: { control: { type: 'boolean' } },
40
40
  readOnly: { control: { type: 'boolean' } }
41
41
  };
42
+ export const ConfigurableSelect = (args) => {
43
+ return (<Configuration theme={{
44
+ components: {
45
+ select: {
46
+ height: args.height,
47
+ padding: args.padding,
48
+ 'border-color': args.borderColor,
49
+ 'border-width': args.borderWidth,
50
+ 'border-radius': args.borderRadius
51
+ }
52
+ }
53
+ }}>
54
+ <Select label='Select input' info='Choose a value'>
55
+ <Option>Choose an option…</Option>
56
+ <Option>Option 1</Option>
57
+ <Option>Option 2</Option>
58
+ <Option>Option 3</Option>
59
+ </Select>
60
+ </Configuration>);
61
+ };
62
+ ConfigurableSelect.args = {
63
+ height: '2rem',
64
+ padding: '0.5rem',
65
+ borderColor: '#939393',
66
+ borderWidth: '0.0625rem',
67
+ borderRadius: '0.5'
68
+ };
69
+ ConfigurableSelect.argTypes = {
70
+ height: { control: { type: 'text' } },
71
+ padding: { control: { type: 'text' } },
72
+ borderColor: { control: { type: 'color' } },
73
+ borderWidth: { control: { type: 'text' } },
74
+ borderRadius: { control: { type: 'text' } }
75
+ };
42
76
  //# sourceMappingURL=Select.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.jsx","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,aAAa,CAChB,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAChB,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,QAAQ,CAAC,CAAC,IA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E,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
1
+ {"version":3,"file":"Select.stories.jsx","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,aAAa,EAAE,MA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ACxB;QAAA,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CACxB;QAAA,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAC1B;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option, Configuration } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableSelectProps {\n height?: string;\n padding?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n}\n\nexport const ConfigurableSelect: Story<ConfigurableSelectProps> = (\n args: ConfigurableSelectProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n select: {\n height: args.height,\n padding: args.padding,\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <Select label='Select input' info='Choose a value'>\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n </Configuration>\n );\n};\n\nConfigurableSelect.args = {\n height: '2rem',\n padding: '0.5rem',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5'\n};\n\nConfigurableSelect.argTypes = {\n height: { control: { type: 'text' } },\n padding: { control: { type: 'text' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } }\n};\n"]}
@@ -11,4 +11,10 @@ interface SentimentStoryProps extends SentimentProps {
11
11
  negativeIcon: string;
12
12
  }
13
13
  export declare const SentimentDemo: Story<SentimentStoryProps>;
14
+ interface ConfigurableSentimentProps {
15
+ positiveColor?: string;
16
+ negativeColor?: string;
17
+ neutralColor?: string;
18
+ }
19
+ export declare const ConfigurableSentiment: Story<ConfigurableSentimentProps>;
14
20
  //# sourceMappingURL=Sentiment.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAoB,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAE3E,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC"}
1
+ {"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAmC,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAE1F,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC;AAwBF,UAAU,0BAA0B;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,0BAA0B,CA0BnE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { icons, Sentiment } from '@pega/cosmos-react-core';
1
+ import { Configuration, icons, Sentiment } from '@pega/cosmos-react-core';
2
2
  export default {
3
3
  title: 'Core/Sentiment',
4
4
  component: Sentiment
@@ -36,4 +36,35 @@ SentimentDemo.argTypes = {
36
36
  negativeLabel: { control: { type: 'text' } },
37
37
  negativeIcon: { options: icons, control: { type: 'select', icons: true } }
38
38
  };
39
+ export const ConfigurableSentiment = (args) => {
40
+ return (<Configuration theme={{
41
+ components: {
42
+ sentiment: {
43
+ positive: {
44
+ color: args.positiveColor
45
+ },
46
+ negative: {
47
+ color: args.negativeColor
48
+ },
49
+ neutral: {
50
+ color: args.neutralColor
51
+ }
52
+ }
53
+ }
54
+ }}>
55
+ <Sentiment variant='positive'/>
56
+ <Sentiment variant='negative'/>
57
+ <Sentiment variant='neutral'/>
58
+ </Configuration>);
59
+ };
60
+ ConfigurableSentiment.args = {
61
+ positiveColor: '#20aa50',
62
+ negativeColor: '#d91c29',
63
+ neutralColor: '#000000'
64
+ };
65
+ ConfigurableSentiment.argTypes = {
66
+ positiveColor: { control: { type: 'color' } },
67
+ negativeColor: { control: { type: 'color' } },
68
+ neutralColor: { control: { type: 'color' } }
69
+ };
39
70
  //# sourceMappingURL=Sentiment.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.stories.jsx","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE3E,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC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,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACzE,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;CAC3E,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n"]}
1
+ {"version":3,"file":"Sentiment.stories.jsx","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,CAAC,YAAY;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,aAAa;QAC5B,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,QAAQ,EAAE,IAAI,CAAC,aAAa;KAC7B,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,KAAK;IAClB,aAAa,EAAE,MAAM;IACrB,YAAY,EAAE,kBAAkB;IAChC,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,kBAAkB;IAC/B,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,gBAAgB;CAC/B,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAA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E,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,IAAI,GAAG;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,qBAAqB,CAAC,QAAQ,GAAG;IAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: Story<ConfigurableSentimentProps> = (\n args: ConfigurableSentimentProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n sentiment: {\n positive: {\n color: args.positiveColor\n },\n negative: {\n color: args.negativeColor\n },\n neutral: {\n color: args.neutralColor\n }\n }\n }\n }}\n >\n <Sentiment variant='positive' />\n <Sentiment variant='negative' />\n <Sentiment variant='neutral' />\n </Configuration>\n );\n};\n\nConfigurableSentiment.args = {\n positiveColor: '#20aa50',\n negativeColor: '#d91c29',\n neutralColor: '#000000'\n};\n\nConfigurableSentiment.argTypes = {\n positiveColor: { control: { type: 'color' } },\n negativeColor: { control: { type: 'color' } },\n neutralColor: { control: { type: 'color' } }\n};\n"]}
@@ -4,4 +4,11 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const SwitchDemo: Story<SwitchProps>;
6
6
  export declare const SwitchInCard: Story<SwitchProps>;
7
+ interface ConfigurableSwitchProps extends SwitchProps {
8
+ height?: string;
9
+ width?: string;
10
+ onColor?: string;
11
+ offColor?: string;
12
+ }
13
+ export declare const ConfigurableSwitch: Story<ConfigurableSwitchProps>;
7
14
  //# sourceMappingURL=Switch.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAgB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAIpE,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC"}
1
+ {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA+B,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAInF,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC;AAEF,UAAU,uBAAwB,SAAQ,WAAW;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { Card, Switch } from '@pega/cosmos-react-core';
2
+ import { Card, Configuration, Switch } from '@pega/cosmos-react-core';
3
3
  import { StyledCard } from './Switch.styles';
4
4
  export default {
5
5
  title: 'Core/Switch',
@@ -23,4 +23,37 @@ export const SwitchInCard = (args) => {
23
23
  <Switch id='switch' on={on} onChange={() => setOn(curr => !curr)} label={args.label} disabled={args.disabled}/>
24
24
  </Card>);
25
25
  };
26
+ export const ConfigurableSwitch = (args) => {
27
+ const [on, setOn] = useState(false);
28
+ return (<Configuration theme={{
29
+ components: {
30
+ switch: {
31
+ height: args.height,
32
+ width: args.width,
33
+ on: {
34
+ color: args.onColor
35
+ },
36
+ off: {
37
+ color: args.offColor
38
+ }
39
+ }
40
+ }
41
+ }}>
42
+ <Switch on={on} onChange={() => setOn(curr => !curr)} label='Toggle on/off'/>
43
+ </Configuration>);
44
+ };
45
+ ConfigurableSwitch.args = {
46
+ height: '1.5rem',
47
+ width: '3rem',
48
+ onColor: '#076bc9',
49
+ offColor: '#939393'
50
+ };
51
+ ConfigurableSwitch.argTypes = {
52
+ height: { control: { type: 'text' } },
53
+ width: { control: { type: 'text' } },
54
+ onColor: { control: { type: 'color' } },
55
+ offColor: { control: { type: 'color' } },
56
+ label: { table: { disable: true } },
57
+ disabled: { table: { disable: true } }
58
+ };
26
59
  //# sourceMappingURL=Switch.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.stories.jsx","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,QAAQ,CACX,EAAE,CAAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACpE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACnB;MAAA,CAAC,MAAM,CACL,EAAE,CAAC,QAAQ,CACX,EAAE,CAAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAE5B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n"]}
1
+ {"version":3,"file":"Switch.stories.jsx","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,QAAQ,CACX,EAAE,CAAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACpE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ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AAE,SAAS;IAClB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACvC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACxC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Configuration, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n\ninterface ConfigurableSwitchProps extends SwitchProps {\n height?: string;\n width?: string;\n onColor?: string;\n offColor?: string;\n}\n\nexport const ConfigurableSwitch: Story<ConfigurableSwitchProps> = (\n args: ConfigurableSwitchProps\n) => {\n const [on, setOn] = useState(false);\n\n return (\n <Configuration\n theme={{\n components: {\n switch: {\n height: args.height,\n width: args.width,\n on: {\n color: args.onColor\n },\n off: {\n color: args.offColor\n }\n }\n }\n }}\n >\n <Switch on={on} onChange={() => setOn(curr => !curr)} label='Toggle on/off' />\n </Configuration>\n );\n};\n\nConfigurableSwitch.args = {\n height: '1.5rem',\n width: '3rem',\n onColor: '#076bc9',\n offColor: '#939393'\n};\n\nConfigurableSwitch.argTypes = {\n height: { control: { type: 'text' } },\n width: { control: { type: 'text' } },\n onColor: { control: { type: 'color' } },\n offColor: { control: { type: 'color' } },\n label: { table: { disable: true } },\n disabled: { table: { disable: true } }\n};\n"]}
@@ -11,4 +11,29 @@ interface TableStoryProps {
11
11
  }
12
12
  export declare const TableDemo: Story<TableStoryProps>;
13
13
  export declare const StyledTableDemo: Story<TableStoryProps>;
14
+ interface ConfigurableTableProps extends TableStoryProps {
15
+ headerFontSize?: string;
16
+ headerFontWeight?: string;
17
+ headerForegroundColor?: string;
18
+ headerBackgroundColor?: string;
19
+ headerVerticalSpacing?: number;
20
+ headerHorizontalSpacing?: number;
21
+ headerBorderWidth?: string;
22
+ headerBorderColor?: string;
23
+ bodyForegroundColor?: string;
24
+ bodyBackgroundColor?: string;
25
+ bodyVerticalSpacing?: number;
26
+ bodyHorizontalSpacing?: number;
27
+ bodyBorderWidth?: string;
28
+ bodyBorderColor?: string;
29
+ borderHorizontalInner?: boolean;
30
+ borderHorizontalOuter?: boolean;
31
+ borderVerticalInner?: boolean;
32
+ borderVerticalOuter?: boolean;
33
+ spacingHorizontalInner?: boolean;
34
+ spacingHorizontalOuter?: boolean;
35
+ spacingVerticalInner?: boolean;
36
+ spacingVerticalOuter?: boolean;
37
+ }
38
+ export declare const ConfigurableTable: Story<ConfigurableTableProps>;
14
39
  //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAKjF,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CAmB5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAuClD,CAAC"}
1
+ {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAiB,MAAM,yBAAyB,CAAC;;AAKhG,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CAmB5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAuClD,CAAC;AAEF,UAAU,sBAAuB,SAAQ,eAAe;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,sBAAsB,CAuE3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Status, Table } from '@pega/cosmos-react-core';
1
+ import { Status, Table, Configuration } from '@pega/cosmos-react-core';
2
2
  import { tableData } from './Table.mocks';
3
3
  import { StyledBalance } from './Table.styles';
4
4
  export default {
@@ -55,4 +55,123 @@ export const StyledTableDemo = (args) => {
55
55
  ];
56
56
  return (<Table title={args.title} hoverHighlight={args.hoverHighlight} loading={args.loading} loadingMessage={args.loadingMessage} data={args.emptyTable ? [] : tableData} columns={columns}/>);
57
57
  };
58
+ export const ConfigurableTable = (args) => {
59
+ const columns = [
60
+ { renderer: data => <b>{data.name}</b>, label: 'Name' },
61
+ { renderer: 'dob', label: 'Date of Birth' },
62
+ { renderer: 'address', label: 'Address' },
63
+ {
64
+ renderer: data => {
65
+ return (<>
66
+ {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}
67
+ {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}
68
+ </>);
69
+ },
70
+ label: 'Email'
71
+ },
72
+ {
73
+ renderer: data => {
74
+ return (<StyledBalance negativeBalance={data.balance.startsWith('-')}>
75
+ {data.balance}
76
+ </StyledBalance>);
77
+ },
78
+ label: 'Account Balance',
79
+ align: 'right'
80
+ }
81
+ ];
82
+ return (<Configuration theme={{
83
+ components: {
84
+ table: {
85
+ header: {
86
+ 'font-size': args.headerFontSize,
87
+ 'font-weight': args.headerFontWeight,
88
+ 'foreground-color': args.headerForegroundColor,
89
+ 'background-color': args.headerBackgroundColor,
90
+ 'vertical-spacing': args.headerVerticalSpacing,
91
+ 'horizontal-spacing': args.headerHorizontalSpacing,
92
+ 'border-width': args.headerBorderWidth,
93
+ 'border-color': args.headerBorderColor
94
+ },
95
+ body: {
96
+ 'foreground-color': args.bodyForegroundColor,
97
+ 'background-color': args.bodyBackgroundColor,
98
+ 'vertical-spacing': args.bodyVerticalSpacing,
99
+ 'horizontal-spacing': args.bodyHorizontalSpacing,
100
+ 'border-width': args.bodyBorderWidth,
101
+ 'border-color': args.bodyBorderColor
102
+ },
103
+ border: {
104
+ 'horizontal-inner': args.borderHorizontalInner,
105
+ 'horizontal-outer': args.borderHorizontalOuter,
106
+ 'vertical-inner': args.borderVerticalInner,
107
+ 'vertical-outer': args.borderVerticalOuter
108
+ },
109
+ spacing: {
110
+ 'horizontal-inner': args.spacingHorizontalInner,
111
+ 'horizontal-outer': args.spacingHorizontalOuter,
112
+ 'vertical-inner': args.spacingVerticalInner,
113
+ 'vertical-outer': args.spacingVerticalOuter
114
+ }
115
+ }
116
+ }
117
+ }}>
118
+ <Table title='Accounts' data={tableData} columns={columns}/>
119
+ </Configuration>);
120
+ };
121
+ ConfigurableTable.args = {
122
+ headerFontSize: 's',
123
+ headerFontWeight: '600',
124
+ headerForegroundColor: '#000000',
125
+ headerBackgroundColor: '#f5f5f5',
126
+ headerVerticalSpacing: 1,
127
+ headerHorizontalSpacing: 2,
128
+ headerBorderWidth: '0.0625rem',
129
+ headerBorderColor: '#cfcfcf',
130
+ bodyForegroundColor: '#000000',
131
+ bodyBackgroundColor: '#ffffff',
132
+ bodyVerticalSpacing: 1,
133
+ bodyHorizontalSpacing: 1,
134
+ bodyBorderWidth: '0.0625rem',
135
+ bodyBorderColor: '#cfcfcf',
136
+ borderHorizontalInner: true,
137
+ borderHorizontalOuter: true,
138
+ borderVerticalInner: true,
139
+ borderVerticalOuter: true,
140
+ spacingHorizontalInner: true,
141
+ spacingHorizontalOuter: true,
142
+ spacingVerticalInner: true,
143
+ spacingVerticalOuter: true
144
+ };
145
+ ConfigurableTable.argTypes = {
146
+ headerFontSize: {
147
+ options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],
148
+ control: { type: 'select' }
149
+ },
150
+ headerFontWeight: { control: { type: 'text' } },
151
+ headerForegroundColor: { control: { type: 'color' } },
152
+ headerBackgroundColor: { control: { type: 'color' } },
153
+ headerVerticalSpacing: { control: { type: 'number' } },
154
+ headerHorizontalSpacing: { control: { type: 'number' } },
155
+ headerBorderWidth: { control: { type: 'text' } },
156
+ headerBorderColor: { control: { type: 'color' } },
157
+ bodyForegroundColor: { control: { type: 'color' } },
158
+ bodyBackgroundColor: { control: { type: 'color' } },
159
+ bodyVerticalSpacing: { control: { type: 'number' } },
160
+ bodyHorizontalSpacing: { control: { type: 'number' } },
161
+ bodyBorderWidth: { control: { type: 'text' } },
162
+ bodyBorderColor: { control: { type: 'color' } },
163
+ borderHorizontalInner: { control: { type: 'boolean' } },
164
+ borderHorizontalOuter: { control: { type: 'boolean' } },
165
+ borderVerticalInner: { control: { type: 'boolean' } },
166
+ borderVerticalOuter: { control: { type: 'boolean' } },
167
+ spacingHorizontalInner: { control: { type: 'boolean' } },
168
+ spacingHorizontalOuter: { control: { type: 'boolean' } },
169
+ spacingVerticalInner: { control: { type: 'boolean' } },
170
+ spacingVerticalOuter: { control: { type: 'boolean' } },
171
+ title: { table: { disable: true } },
172
+ hoverHighlight: { table: { disable: true } },
173
+ loading: { table: { disable: true } },
174
+ loadingMessage: { table: { disable: true } },
175
+ emptyTable: { table: { disable: true } }
176
+ };
58
177
  //# sourceMappingURL=Table.stories.jsx.map