krl-alfred 2.23.13 → 2.23.15

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 (234) hide show
  1. package/dist/components/Accordion/Accordion.styled.d.ts +21 -7
  2. package/dist/components/Accordion/stories/Accordion.stories.d.ts +105 -28
  3. package/dist/components/Accordion/stories/Accordion.stories.js +73 -129
  4. package/dist/components/ActionButton/ActionButton.styled.d.ts +51 -17
  5. package/dist/components/ActionButton/stories/ActionButton.stories.d.ts +210 -18
  6. package/dist/components/ActionButton/stories/ActionButton.stories.js +87 -140
  7. package/dist/components/AddressCard/AddressCard.styled.d.ts +6 -2
  8. package/dist/components/AddressCard/stories/AddressCard.stories.d.ts +148 -26
  9. package/dist/components/AddressCard/stories/AddressCard.stories.js +96 -167
  10. package/dist/components/Agreement/Agreement.styled.d.ts +3 -1
  11. package/dist/components/Agreement/stories/Agreement.stories.d.ts +263 -1
  12. package/dist/components/Agreement/stories/Agreement.stories.js +89 -11
  13. package/dist/components/Alert/Alert.styled.d.ts +3 -1
  14. package/dist/components/Alert/stories/Alert.stories.d.ts +138 -8
  15. package/dist/components/Alert/stories/Alert.stories.js +68 -119
  16. package/dist/components/AutocompleteInput/AutocompleteInput.styled.d.ts +12 -4
  17. package/dist/components/AutocompleteInput/stories/AutocompleteInput.stories.d.ts +737 -2
  18. package/dist/components/AutocompleteInput/stories/AutocompleteInput.stories.js +161 -74
  19. package/dist/components/Badges/layouts/belt/belt.styled.d.ts +3 -1
  20. package/dist/components/Badges/layouts/dark/dark.styled.d.ts +3 -1
  21. package/dist/components/Badges/layouts/text/text.styled.d.ts +3 -1
  22. package/dist/components/Badges/stories/Badges.stories.d.ts +228 -10
  23. package/dist/components/Badges/stories/Badges.stories.js +113 -55
  24. package/dist/components/BannerCard/BannerCard.styled.d.ts +3 -1
  25. package/dist/components/BannerCard/stories/BannerCard.stories.d.ts +278 -5
  26. package/dist/components/BannerCard/stories/BannerCard.stories.js +82 -24
  27. package/dist/components/BlogCard/BlogCard.styled.d.ts +3 -1
  28. package/dist/components/BlogCard/stories/BlogCard.stories.d.ts +161 -9
  29. package/dist/components/BlogCard/stories/BlogCard.stories.js +84 -41
  30. package/dist/components/Breadcrumbs/Breadcrumbs.styled.d.ts +39 -13
  31. package/dist/components/Breadcrumbs/stories/Breadcrumbs.stories.d.ts +380 -10
  32. package/dist/components/Breadcrumbs/stories/Breadcrumbs.stories.js +170 -13
  33. package/dist/components/Button/Button.styled.d.ts +6 -2
  34. package/dist/components/Button/stories/Button.stories.d.ts +301 -49
  35. package/dist/components/Button/stories/Button.stories.js +105 -46
  36. package/dist/components/CampaignCard/CampaignCard.styled.d.ts +3 -1
  37. package/dist/components/CampaignCard/stories/CampaignCard.stories.d.ts +118 -3
  38. package/dist/components/CampaignCard/stories/CampaignCard.stories.js +55 -32
  39. package/dist/components/CategoryMenu/CategoryMenu.styled.d.ts +24 -8
  40. package/dist/components/CategoryMenu/stories/CategoryMenu.stories.d.ts +807 -29
  41. package/dist/components/CategoryMenu/stories/CategoryMenu.stories.js +198 -31
  42. package/dist/components/Checkbox/Checkbox.styled.d.ts +15 -5
  43. package/dist/components/Checkbox/stories/Checkbox.stories.d.ts +313 -7
  44. package/dist/components/Checkbox/stories/Checkbox.stories.js +69 -25
  45. package/dist/components/CheckboxGroup/CheckboxGroup.styled.d.ts +3 -1
  46. package/dist/components/CheckboxGroup/stories/CheckboxGroup.stories.d.ts +400 -2
  47. package/dist/components/CheckboxGroup/stories/CheckboxGroup.stories.js +129 -43
  48. package/dist/components/CircleProgress/CircleProgress.styled.d.ts +3 -1
  49. package/dist/components/CircleProgress/stories/CircleProgress.stories.d.ts +142 -3
  50. package/dist/components/CircleProgress/stories/CircleProgress.stories.js +133 -7
  51. package/dist/components/CircleProgressPro/CircleProgressPro.styled.d.ts +33 -11
  52. package/dist/components/CircleProgressPro/stories/CircleProgressPro.stories.d.ts +25 -2
  53. package/dist/components/CircleProgressPro/stories/CircleProgressPro.stories.js +50 -5
  54. package/dist/components/ColorPalette/ColorPalette.styled.d.ts +27 -9
  55. package/dist/components/CouponCode/CouponCode.styled.d.ts +9 -3
  56. package/dist/components/CouponCode/stories/CouponCode.stories.d.ts +311 -1
  57. package/dist/components/CouponCode/stories/CouponCode.stories.js +100 -18
  58. package/dist/components/DescriptionCard/DescriptionCard.styled.d.ts +117 -46
  59. package/dist/components/DescriptionCard/stories/DescriptionCard.stories.d.ts +788 -2
  60. package/dist/components/DescriptionCard/stories/DescriptionCard.stories.js +74 -3
  61. package/dist/components/Divider/Divider.styled.d.ts +6 -2
  62. package/dist/components/Divider/stories/Divider.stories.d.ts +85 -2
  63. package/dist/components/Divider/stories/Divider.stories.js +65 -12
  64. package/dist/components/Dropdown/Dropdown.styled.d.ts +6 -2
  65. package/dist/components/Dropdown/stories/Dropdown.stories.d.ts +395 -5
  66. package/dist/components/Dropdown/stories/Dropdown.stories.js +166 -36
  67. package/dist/components/DropdownButton/DropdownButton.styled.d.ts +9 -3
  68. package/dist/components/DropdownButton/stories/DropdownButton.stories.d.ts +177 -5
  69. package/dist/components/DropdownButton/stories/DropdownButton.stories.js +84 -36
  70. package/dist/components/Icon/Icon.styled.d.ts +9 -3
  71. package/dist/components/Icon/props.d.ts +2 -2
  72. package/dist/components/Icon/stories/Icons.stories.d.ts +134 -3
  73. package/dist/components/Icon/stories/Icons.stories.js +55 -17
  74. package/dist/components/InfoBox/InfoBox.styled.d.ts +24 -8
  75. package/dist/components/InfoBox/stories/InfoBox.stories.d.ts +25 -1
  76. package/dist/components/InfoBox/stories/InfoBox.stories.js +23 -13
  77. package/dist/components/InlineProgress/InlineProgress.styled.d.ts +3 -1
  78. package/dist/components/InlineProgress/stories/InlineProgress.stories.d.ts +69 -2
  79. package/dist/components/InlineProgress/stories/InlineProgress.stories.js +50 -7
  80. package/dist/components/Input/Input.styled.d.ts +27 -9
  81. package/dist/components/Input/stories/Input.stories.d.ts +62 -1
  82. package/dist/components/Input/stories/Input.stories.js +59 -40
  83. package/dist/components/InstallmentBox/InstallmentBox.styled.d.ts +3 -1
  84. package/dist/components/InstallmentBox/stories/InstallmentBox.stories.d.ts +41 -2
  85. package/dist/components/InstallmentBox/stories/InstallmentBox.stories.js +36 -13
  86. package/dist/components/InsuranceBox/InsuranceBox.styled.d.ts +21 -7
  87. package/dist/components/InsuranceBox/stories/InsuranceBox.stories.d.ts +53 -0
  88. package/dist/components/InsuranceBox/stories/InsuranceBox.stories.js +19 -1
  89. package/dist/components/ListGroup/ListGroup.styled.d.ts +15 -5
  90. package/dist/components/ListGroup/stories/ListGroup.stories.d.ts +21 -1
  91. package/dist/components/ListGroup/stories/ListGroup.stories.js +28 -1
  92. package/dist/components/Loader/Loader.styled.d.ts +6 -2
  93. package/dist/components/Loader/stories/Loader.stories.d.ts +22 -4
  94. package/dist/components/Loader/stories/Loader.stories.js +8 -1
  95. package/dist/components/Modal/Modal.styled.d.ts +7 -5
  96. package/dist/components/Modal/stories/Modal.stories.d.ts +98 -1
  97. package/dist/components/Modal/stories/Modal.stories.js +64 -38
  98. package/dist/components/OptionMenu/OptionMenu.styled.d.ts +15 -5
  99. package/dist/components/OptionMenu/stories/OptionMenu.stories.d.ts +126 -44
  100. package/dist/components/OptionMenu/stories/OptionMenu.stories.js +82 -11
  101. package/dist/components/OtpInput/OtpInput.styled.d.ts +12 -4
  102. package/dist/components/OtpInput/stories/OtpInput.stories.d.ts +29 -1
  103. package/dist/components/OtpInput/stories/OtpInput.stories.js +30 -19
  104. package/dist/components/Pagination/Pagination.styled.d.ts +3 -1
  105. package/dist/components/Pagination/stories/Pagination.stories.d.ts +95 -3
  106. package/dist/components/Pagination/stories/Pagination.stories.js +79 -18
  107. package/dist/components/PaymentCart/PaymentCart.styled.d.ts +36 -12
  108. package/dist/components/PaymentCart/stories/PaymentCart.stories.d.ts +180 -1
  109. package/dist/components/PaymentCart/stories/PaymentCart.stories.js +47 -14
  110. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.d.ts +1 -1
  111. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.js +2 -2
  112. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.styled.d.ts +57 -19
  113. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.styled.js +15 -13
  114. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.test.d.ts +1 -0
  115. package/dist/components/ProductCardCheckbox/ProductCardCheckbox.test.js +94 -0
  116. package/dist/components/ProductCardCheckbox/props.d.ts +2 -0
  117. package/dist/components/ProductCardCheckbox/props.js +1 -0
  118. package/dist/components/ProductCardCheckbox/stories/ProductCardCheckbox.stories.d.ts +190 -0
  119. package/dist/components/ProductCardCheckbox/stories/ProductCardCheckbox.stories.js +51 -14
  120. package/dist/components/ProductCardHorizontal/ProductCardHorizontal.styled.d.ts +3 -1
  121. package/dist/components/ProductCardHorizontal/stories/ProductCardHorizontal.stories.d.ts +57 -0
  122. package/dist/components/ProductCardHorizontal/stories/ProductCardHorizontal.stories.js +29 -9
  123. package/dist/components/ProductCardHorizontalMd/ProductCardHorizontalMd.styled.d.ts +60 -29
  124. package/dist/components/ProductCardHorizontalMd/stories/ProductCardHorizontalMd.stories.d.ts +106 -0
  125. package/dist/components/ProductCardHorizontalMd/stories/ProductCardHorizontalMd.stories.js +35 -10
  126. package/dist/components/ProductCardHorizontalSm/ProductCardHorizontalSm.styled.d.ts +33 -11
  127. package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.d.ts +192 -0
  128. package/dist/components/ProductCardHorizontalSm/stories/ProductCardHorizontalSm.stories.js +72 -40
  129. package/dist/components/ProductCardRadio/ProductCardRadio.styled.d.ts +43 -17
  130. package/dist/components/ProductCardRadio/stories/ProductCardRadio.stories.d.ts +275 -12
  131. package/dist/components/ProductCardRadio/stories/ProductCardRadio.stories.js +72 -105
  132. package/dist/components/ProductCardVertical/ProductCardVertical.styled.d.ts +63 -21
  133. package/dist/components/ProductCardVertical/stories/ProductCardVertical.stories.d.ts +139 -0
  134. package/dist/components/ProductCardVertical/stories/ProductCardVertical.stories.js +19 -1
  135. package/dist/components/QuantitySelector/QuantitySelector.styled.d.ts +15 -5
  136. package/dist/components/QuantitySelector/stories/QuantitySelector.stories.d.ts +114 -0
  137. package/dist/components/QuantitySelector/stories/QuantitySelector.stories.js +58 -12
  138. package/dist/components/RadioButton/layouts/basic/Basic.styled.d.ts +15 -5
  139. package/dist/components/RadioButton/layouts/boxed/Boxed.styled.d.ts +24 -8
  140. package/dist/components/RadioButton/layouts/boxed/Boxed.styled.js +1 -1
  141. package/dist/components/RadioButton/layouts/boxedMd/BoxedMd.styled.d.ts +12 -4
  142. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.styled.d.ts +12 -4
  143. package/dist/components/RadioButton/layouts/boxedSm/BoxedSm.styled.js +1 -1
  144. package/dist/components/RadioButton/layouts/boxedWithIcon/BoxedWithIcon.styled.d.ts +25 -12
  145. package/dist/components/RadioButton/layouts/color/Color.styled.d.ts +9 -3
  146. package/dist/components/RadioButton/layouts/horizontal/Horizontal.js +2 -2
  147. package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.d.ts +55 -18
  148. package/dist/components/RadioButton/layouts/horizontal/Horizontal.styled.js +1 -1
  149. package/dist/components/RadioButton/layouts/horizontal/Horizontal.test.d.ts +1 -0
  150. package/dist/components/RadioButton/layouts/horizontal/Horizontal.test.js +56 -0
  151. package/dist/components/RadioButton/props.d.ts +4 -0
  152. package/dist/components/RadioButton/props.js +3 -0
  153. package/dist/components/RadioButton/stories/RadioButton.stories.d.ts +14 -0
  154. package/dist/components/RadioButton/stories/RadioButton.stories.js +15 -1
  155. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  156. package/dist/components/RadioGroup/RadioGroup.styled.d.ts +21 -7
  157. package/dist/components/RadioGroup/RadioGroup.test.d.ts +1 -0
  158. package/dist/components/RadioGroup/RadioGroup.test.js +40 -0
  159. package/dist/components/RadioGroup/props.d.ts +4 -0
  160. package/dist/components/RadioScale/RadioScale.styled.d.ts +9 -3
  161. package/dist/components/RadioScale/stories/RadioScale.stories.d.ts +37 -0
  162. package/dist/components/RadioScale/stories/RadioScale.stories.js +16 -1
  163. package/dist/components/ReviewBlock/ReviewBlock.styled.d.ts +57 -19
  164. package/dist/components/ReviewBlock/stories/ReviewBlock.stories.d.ts +108 -0
  165. package/dist/components/ReviewBlock/stories/ReviewBlock.stories.js +23 -1
  166. package/dist/components/ReviewCard/ReviewCard.styled.d.ts +39 -13
  167. package/dist/components/ReviewCard/stories/ReviewCard.stories.d.ts +55 -0
  168. package/dist/components/ReviewCard/stories/ReviewCard.stories.js +19 -1
  169. package/dist/components/RichTextEditor/RichTextEditor.js +20 -12
  170. package/dist/components/RichTextEditor/RichTextEditor.styled.d.ts +36 -22
  171. package/dist/components/RichTextEditor/RichTextEditor.styled.js +1 -1
  172. package/dist/components/RichTextEditor/RichTextEditor.test.d.ts +1 -0
  173. package/dist/components/RichTextEditor/RichTextEditor.test.js +250 -0
  174. package/dist/components/RichTextEditor/props.d.ts +6 -0
  175. package/dist/components/RichTextEditor/props.js +3 -0
  176. package/dist/components/RichTextEditor/stories/RichTextEditor.stories.d.ts +74 -0
  177. package/dist/components/RichTextEditor/stories/RichTextEditor.stories.js +83 -1
  178. package/dist/components/RichTextEditor/utils/sanitize.d.ts +5 -3
  179. package/dist/components/RichTextEditor/utils/sanitize.js +38 -10
  180. package/dist/components/SearchBox/SearchBox.styled.d.ts +6 -2
  181. package/dist/components/SearchBox/stories/SearchBox.stories.d.ts +175 -0
  182. package/dist/components/SearchBox/stories/SearchBox.stories.js +53 -9
  183. package/dist/components/SelectBox/SelectBox.styled.d.ts +3 -1
  184. package/dist/components/SelectBox/stories/SelectBox.stories.d.ts +162 -2
  185. package/dist/components/SelectBox/stories/SelectBox.stories.js +24 -1
  186. package/dist/components/ShoppingCartProduct/ShoppingCartProduct.styled.d.ts +150 -56
  187. package/dist/components/ShoppingCartProduct/stories/ShoppingCartProduct.stories.d.ts +227 -0
  188. package/dist/components/ShoppingCartProduct/stories/ShoppingCartProduct.stories.js +31 -1
  189. package/dist/components/SkeletonLoader/SkeletonLoader.styled.d.ts +3 -1
  190. package/dist/components/SkeletonLoader/stories/SkeletonLoader.stories.d.ts +36 -2
  191. package/dist/components/SkeletonLoader/stories/SkeletonLoader.stories.js +41 -15
  192. package/dist/components/StepSlider/StepSlider.styled.d.ts +16 -8
  193. package/dist/components/StepSlider/stories/StepSlider.stories.d.ts +136 -6
  194. package/dist/components/StepSlider/stories/StepSlider.stories.js +86 -39
  195. package/dist/components/Stepper/Stepper.styled.d.ts +12 -4
  196. package/dist/components/Stepper/stories/Stepper.stories.d.ts +149 -3
  197. package/dist/components/Stepper/stories/Stepper.stories.js +92 -9
  198. package/dist/components/SuggestBox/SuggestBox.styled.d.ts +3 -1
  199. package/dist/components/SuggestBox/stories/SuggestBox.stories.d.ts +68 -2
  200. package/dist/components/SuggestBox/stories/SuggestBox.stories.js +48 -9
  201. package/dist/components/Table/Table.styled.d.ts +9 -3
  202. package/dist/components/Table/stories/Table.stories.d.ts +167 -2
  203. package/dist/components/Table/stories/Table.stories.js +72 -19
  204. package/dist/components/Tabs/Tabs.styled.d.ts +15 -5
  205. package/dist/components/Tabs/stories/Tabs.stories.d.ts +168 -12
  206. package/dist/components/Tabs/stories/Tabs.stories.js +118 -65
  207. package/dist/components/Tag/Tag.styled.d.ts +13 -8
  208. package/dist/components/Tag/stories/Tag.stories.d.ts +63 -5
  209. package/dist/components/Tag/stories/Tag.stories.js +41 -28
  210. package/dist/components/TagInput/TagInput.styled.d.ts +22 -11
  211. package/dist/components/TagInput/stories/TagInput.stories.d.ts +172 -4
  212. package/dist/components/TagInput/stories/TagInput.stories.js +80 -26
  213. package/dist/components/TextLink/TextLink.styled.d.ts +12 -4
  214. package/dist/components/TextLink/stories/TextLink.stories.d.ts +153 -7
  215. package/dist/components/TextLink/stories/TextLink.stories.js +61 -25
  216. package/dist/components/Textarea/Textarea.styled.d.ts +6 -2
  217. package/dist/components/Textarea/stories/Textarea.stories.d.ts +180 -6
  218. package/dist/components/Textarea/stories/Textarea.stories.js +59 -40
  219. package/dist/components/Toast/Toast.styled.d.ts +6 -2
  220. package/dist/components/Toast/stories/Toast.stories.d.ts +369 -5
  221. package/dist/components/Toast/stories/Toast.stories.js +77 -33
  222. package/dist/components/Tooltip/Tooltip.styled.d.ts +21 -7
  223. package/dist/components/Tooltip/stories/Tooltip.stories.d.ts +249 -19
  224. package/dist/components/Tooltip/stories/Tooltip.stories.js +72 -25
  225. package/dist/components/Typography/Typography.styled.d.ts +21 -7
  226. package/dist/components/Uploader/Uploader.styled.d.ts +49 -37
  227. package/dist/components/Uploader/stories/Uploader.stories.d.ts +219 -4
  228. package/dist/components/Uploader/stories/Uploader.stories.js +86 -46
  229. package/dist/components/VideoCard/VideoCard.styled.d.ts +18 -6
  230. package/dist/components/VideoCard/stories/VideoCard.stories.d.ts +50 -2
  231. package/dist/components/VideoCard/stories/VideoCard.stories.js +40 -10
  232. package/dist/setupTests.d.ts +1 -0
  233. package/dist/setupTests.js +3 -0
  234. package/package.json +9 -1
@@ -1,26 +1,336 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
4
  component: (props: any) => React.JSX.Element;
5
5
  tags: string[];
6
6
  argTypes: {
7
+ title: {
8
+ control: string;
9
+ };
10
+ buttonText: {
11
+ control: string;
12
+ };
13
+ placeholder: {
14
+ control: string;
15
+ };
16
+ value: {
17
+ control: string;
18
+ };
19
+ expanded: {
20
+ control: string;
21
+ };
22
+ buttonDisabled: {
23
+ control: string;
24
+ };
25
+ isButtonLoading: {
26
+ control: string;
27
+ };
28
+ isInputDisabled: {
29
+ control: string;
30
+ };
31
+ hasError: {
32
+ control: string;
33
+ };
34
+ errorMessage: {
35
+ control: string;
36
+ };
37
+ autoFocus: {
38
+ control: string;
39
+ };
40
+ buttonWidth: {
41
+ control: string;
42
+ };
7
43
  buttonVariant: {
8
44
  control: string;
9
45
  options: string[];
10
46
  };
47
+ onChange: {
48
+ action: string;
49
+ };
50
+ onExpanded: {
51
+ action: string;
52
+ };
11
53
  };
12
54
  };
13
55
  export default _default;
14
56
  export declare const Default: {
15
57
  args: {
58
+ title: string;
59
+ buttonText: string;
60
+ placeholder: string;
61
+ value: string;
62
+ expanded: boolean;
63
+ buttonDisabled: boolean;
64
+ isButtonLoading: boolean;
65
+ isInputDisabled: boolean;
66
+ autoFocus: boolean;
67
+ hasError: boolean;
68
+ errorMessage: string;
69
+ buttonVariant: string;
70
+ buttonWidth: string;
71
+ name: string;
72
+ onChange: (e: any) => void;
73
+ onExpanded: (props: any) => void;
74
+ };
75
+ };
76
+ export declare const Expanded: {
77
+ args: {
78
+ expanded: boolean;
79
+ title: string;
80
+ buttonText: string;
81
+ placeholder: string;
82
+ value: string;
83
+ buttonDisabled: boolean;
84
+ isButtonLoading: boolean;
85
+ isInputDisabled: boolean;
86
+ autoFocus: boolean;
87
+ hasError: boolean;
88
+ errorMessage: string;
89
+ buttonVariant: string;
90
+ buttonWidth: string;
91
+ name: string;
92
+ onChange: (e: any) => void;
93
+ onExpanded: (props: any) => void;
94
+ };
95
+ };
96
+ export declare const Collapsed: {
97
+ args: {
98
+ expanded: boolean;
99
+ title: string;
100
+ buttonText: string;
101
+ placeholder: string;
102
+ value: string;
103
+ buttonDisabled: boolean;
104
+ isButtonLoading: boolean;
105
+ isInputDisabled: boolean;
106
+ autoFocus: boolean;
107
+ hasError: boolean;
108
+ errorMessage: string;
109
+ buttonVariant: string;
110
+ buttonWidth: string;
111
+ name: string;
112
+ onChange: (e: any) => void;
113
+ onExpanded: (props: any) => void;
114
+ };
115
+ };
116
+ export declare const WithValue: {
117
+ args: {
118
+ expanded: boolean;
119
+ value: string;
120
+ title: string;
121
+ buttonText: string;
122
+ placeholder: string;
123
+ buttonDisabled: boolean;
124
+ isButtonLoading: boolean;
125
+ isInputDisabled: boolean;
126
+ autoFocus: boolean;
127
+ hasError: boolean;
128
+ errorMessage: string;
129
+ buttonVariant: string;
130
+ buttonWidth: string;
131
+ name: string;
132
+ onChange: (e: any) => void;
133
+ onExpanded: (props: any) => void;
134
+ };
135
+ };
136
+ export declare const WithError: {
137
+ args: {
138
+ expanded: boolean;
139
+ value: string;
140
+ hasError: boolean;
141
+ errorMessage: string;
142
+ title: string;
143
+ buttonText: string;
144
+ placeholder: string;
145
+ buttonDisabled: boolean;
146
+ isButtonLoading: boolean;
147
+ isInputDisabled: boolean;
148
+ autoFocus: boolean;
149
+ buttonVariant: string;
150
+ buttonWidth: string;
151
+ name: string;
152
+ onChange: (e: any) => void;
153
+ onExpanded: (props: any) => void;
154
+ };
155
+ };
156
+ export declare const ButtonLoading: {
157
+ args: {
158
+ expanded: boolean;
159
+ value: string;
160
+ isButtonLoading: boolean;
161
+ title: string;
162
+ buttonText: string;
163
+ placeholder: string;
164
+ buttonDisabled: boolean;
165
+ isInputDisabled: boolean;
166
+ autoFocus: boolean;
167
+ hasError: boolean;
168
+ errorMessage: string;
169
+ buttonVariant: string;
170
+ buttonWidth: string;
171
+ name: string;
172
+ onChange: (e: any) => void;
173
+ onExpanded: (props: any) => void;
174
+ };
175
+ };
176
+ export declare const ButtonDisabled: {
177
+ args: {
178
+ expanded: boolean;
179
+ value: string;
180
+ buttonDisabled: boolean;
181
+ title: string;
182
+ buttonText: string;
183
+ placeholder: string;
184
+ isButtonLoading: boolean;
185
+ isInputDisabled: boolean;
186
+ autoFocus: boolean;
187
+ hasError: boolean;
188
+ errorMessage: string;
189
+ buttonVariant: string;
190
+ buttonWidth: string;
191
+ name: string;
16
192
  onChange: (e: any) => void;
17
193
  onExpanded: (props: any) => void;
194
+ };
195
+ };
196
+ export declare const InputDisabled: {
197
+ args: {
198
+ expanded: boolean;
199
+ value: string;
200
+ isInputDisabled: boolean;
201
+ buttonText: string;
18
202
  buttonDisabled: boolean;
203
+ title: string;
204
+ placeholder: string;
205
+ isButtonLoading: boolean;
19
206
  autoFocus: boolean;
20
207
  hasError: boolean;
21
208
  errorMessage: string;
209
+ buttonVariant: string;
210
+ buttonWidth: string;
211
+ name: string;
212
+ onChange: (e: any) => void;
213
+ onExpanded: (props: any) => void;
214
+ };
215
+ };
216
+ export declare const ButtonSecondary: {
217
+ args: {
218
+ expanded: boolean;
219
+ buttonVariant: string;
220
+ buttonText: string;
221
+ title: string;
222
+ placeholder: string;
22
223
  value: string;
224
+ buttonDisabled: boolean;
225
+ isButtonLoading: boolean;
226
+ isInputDisabled: boolean;
227
+ autoFocus: boolean;
228
+ hasError: boolean;
229
+ errorMessage: string;
230
+ buttonWidth: string;
231
+ name: string;
232
+ onChange: (e: any) => void;
233
+ onExpanded: (props: any) => void;
234
+ };
235
+ };
236
+ export declare const ButtonGhost: {
237
+ args: {
238
+ expanded: boolean;
239
+ buttonVariant: string;
240
+ title: string;
23
241
  buttonText: string;
24
242
  placeholder: string;
243
+ value: string;
244
+ buttonDisabled: boolean;
245
+ isButtonLoading: boolean;
246
+ isInputDisabled: boolean;
247
+ autoFocus: boolean;
248
+ hasError: boolean;
249
+ errorMessage: string;
250
+ buttonWidth: string;
251
+ name: string;
252
+ onChange: (e: any) => void;
253
+ onExpanded: (props: any) => void;
254
+ };
255
+ };
256
+ export declare const CustomPlaceholder: {
257
+ args: {
258
+ expanded: boolean;
259
+ title: string;
260
+ placeholder: string;
261
+ buttonText: string;
262
+ value: string;
263
+ buttonDisabled: boolean;
264
+ isButtonLoading: boolean;
265
+ isInputDisabled: boolean;
266
+ autoFocus: boolean;
267
+ hasError: boolean;
268
+ errorMessage: string;
269
+ buttonVariant: string;
270
+ buttonWidth: string;
271
+ name: string;
272
+ onChange: (e: any) => void;
273
+ onExpanded: (props: any) => void;
274
+ };
275
+ };
276
+ export declare const WideButton: {
277
+ args: {
278
+ expanded: boolean;
279
+ buttonWidth: string;
280
+ buttonText: string;
281
+ title: string;
282
+ placeholder: string;
283
+ value: string;
284
+ buttonDisabled: boolean;
285
+ isButtonLoading: boolean;
286
+ isInputDisabled: boolean;
287
+ autoFocus: boolean;
288
+ hasError: boolean;
289
+ errorMessage: string;
290
+ buttonVariant: string;
291
+ name: string;
292
+ onChange: (e: any) => void;
293
+ onExpanded: (props: any) => void;
294
+ };
295
+ };
296
+ export declare const Complete: {
297
+ args: {
298
+ expanded: boolean;
299
+ title: string;
300
+ value: string;
301
+ hasError: boolean;
302
+ errorMessage: string;
303
+ buttonVariant: string;
304
+ buttonWidth: string;
305
+ buttonText: string;
306
+ placeholder: string;
307
+ buttonDisabled: boolean;
308
+ isButtonLoading: boolean;
309
+ isInputDisabled: boolean;
310
+ autoFocus: boolean;
311
+ name: string;
312
+ onChange: (e: any) => void;
313
+ onExpanded: (props: any) => void;
314
+ };
315
+ };
316
+ export declare const Interactive: {
317
+ render: (args: any) => React.JSX.Element;
318
+ args: {
319
+ expanded: boolean;
320
+ title: string;
321
+ buttonText: string;
322
+ placeholder: string;
323
+ value: string;
324
+ buttonDisabled: boolean;
325
+ isButtonLoading: boolean;
326
+ isInputDisabled: boolean;
327
+ autoFocus: boolean;
328
+ hasError: boolean;
329
+ errorMessage: string;
330
+ buttonVariant: string;
331
+ buttonWidth: string;
332
+ name: string;
333
+ onChange: (e: any) => void;
334
+ onExpanded: (props: any) => void;
25
335
  };
26
336
  };
@@ -14,29 +14,111 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Default = void 0;
17
+ exports.Interactive = exports.Complete = exports.WideButton = exports.CustomPlaceholder = exports.ButtonGhost = exports.ButtonSecondary = exports.InputDisabled = exports.ButtonDisabled = exports.ButtonLoading = exports.WithError = exports.WithValue = exports.Collapsed = exports.Expanded = exports.Default = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
+ var react_1 = __importDefault(require("react"));
19
20
  var CouponCode_1 = __importDefault(require("../CouponCode"));
20
21
  var props_1 = require("../../Button/props");
22
+ var baseArgs = {
23
+ title: "İndirim kodu",
24
+ buttonText: "Uygula",
25
+ placeholder: "İndirim kodunu gir",
26
+ value: "",
27
+ expanded: false,
28
+ buttonDisabled: false,
29
+ isButtonLoading: false,
30
+ isInputDisabled: false,
31
+ autoFocus: false,
32
+ hasError: false,
33
+ errorMessage: "",
34
+ buttonVariant: "primary",
35
+ buttonWidth: "96px",
36
+ name: "couponCode",
37
+ onChange: function (e) { return console.log("onChange event", e); },
38
+ onExpanded: function (props) { return console.log("expanded", props); },
39
+ };
21
40
  exports.default = {
22
- title: 'components/Coupon Code',
23
- component: function (props) { return (0, jsx_runtime_1.jsx)("div", __assign({ style: { width: "343px" } }, { children: (0, jsx_runtime_1.jsx)(CouponCode_1.default, __assign({}, props)) })); },
24
- tags: ['autodocs'],
41
+ title: "Components/Coupon Code",
42
+ component: function (props) { return ((0, jsx_runtime_1.jsx)("div", __assign({ style: { width: 343, minHeight: props.expanded ? 140 : 64 } }, { children: (0, jsx_runtime_1.jsx)(CouponCode_1.default, __assign({}, props)) }))); },
43
+ tags: ["autodocs"],
25
44
  argTypes: {
26
- buttonVariant: { control: 'select', options: props_1.variants },
27
- }
45
+ title: { control: "text" },
46
+ buttonText: { control: "text" },
47
+ placeholder: { control: "text" },
48
+ value: { control: "text" },
49
+ expanded: { control: "boolean" },
50
+ buttonDisabled: { control: "boolean" },
51
+ isButtonLoading: { control: "boolean" },
52
+ isInputDisabled: { control: "boolean" },
53
+ hasError: { control: "boolean" },
54
+ errorMessage: { control: "text" },
55
+ autoFocus: { control: "boolean" },
56
+ buttonWidth: { control: "text" },
57
+ buttonVariant: { control: "select", options: props_1.variants },
58
+ onChange: { action: "changed" },
59
+ onExpanded: { action: "expanded" },
60
+ },
28
61
  };
29
62
  exports.Default = {
30
- args: {
31
- onChange: function (e) { return console.log("onChange event", e); },
32
- onExpanded: function (props) { return console.log("expanded", props); },
33
- buttonDisabled: false,
34
- autoFocus: false,
35
- hasError: false,
36
- errorMessage: "",
37
- //value : "COUPONCODE",
38
- value: "",
39
- buttonText: "Uygula",
40
- placeholder: "İndirim kodunu gir",
41
- },
63
+ args: __assign({}, baseArgs),
64
+ };
65
+ exports.Expanded = {
66
+ args: __assign(__assign({}, baseArgs), { expanded: true }),
67
+ };
68
+ exports.Collapsed = {
69
+ args: __assign(__assign({}, baseArgs), { expanded: false }),
70
+ };
71
+ exports.WithValue = {
72
+ args: __assign(__assign({}, baseArgs), { expanded: true, value: "UZAT10" }),
73
+ };
74
+ exports.WithError = {
75
+ args: __assign(__assign({}, baseArgs), { expanded: true, value: "YANLIS", hasError: true, errorMessage: "Geçersiz indirim kodu" }),
76
+ };
77
+ exports.ButtonLoading = {
78
+ args: __assign(__assign({}, baseArgs), { expanded: true, value: "UZAT10", isButtonLoading: true }),
79
+ };
80
+ exports.ButtonDisabled = {
81
+ args: __assign(__assign({}, baseArgs), { expanded: true, value: "", buttonDisabled: true }),
82
+ };
83
+ exports.InputDisabled = {
84
+ args: __assign(__assign({}, baseArgs), { expanded: true, value: "UZAT10", isInputDisabled: true, buttonText: "Uygulandı", buttonDisabled: true }),
85
+ };
86
+ exports.ButtonSecondary = {
87
+ args: __assign(__assign({}, baseArgs), { expanded: true, buttonVariant: "secondary", buttonText: "Kontrol et" }),
88
+ };
89
+ exports.ButtonGhost = {
90
+ args: __assign(__assign({}, baseArgs), { expanded: true, buttonVariant: "ghost" }),
91
+ };
92
+ exports.CustomPlaceholder = {
93
+ args: __assign(__assign({}, baseArgs), { expanded: true, title: "Kampanya kodu", placeholder: "Örn. KIRALA20", buttonText: "Ekle" }),
94
+ };
95
+ exports.WideButton = {
96
+ args: __assign(__assign({}, baseArgs), { expanded: true, buttonWidth: "140px", buttonText: "Kodu uygula" }),
97
+ };
98
+ exports.Complete = {
99
+ args: __assign(__assign({}, baseArgs), { expanded: true, title: "İndirim / hediye kodu", value: "KIRALA20", hasError: true, errorMessage: "Bu kod bu siparişte kullanılamaz", buttonVariant: "primary", buttonWidth: "120px" }),
100
+ };
101
+ var InteractiveStory = function (args) {
102
+ var _a = react_1.default.useState(false), expanded = _a[0], setExpanded = _a[1];
103
+ var _b = react_1.default.useState(""), value = _b[0], setValue = _b[1];
104
+ var _c = react_1.default.useState(false), hasError = _c[0], setHasError = _c[1];
105
+ var _d = react_1.default.useState(false), loading = _d[0], setLoading = _d[1];
106
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { width: 343, minHeight: 140 } }, { children: [(0, jsx_runtime_1.jsx)(CouponCode_1.default, __assign({}, args, { expanded: expanded, value: value, hasError: hasError, errorMessage: hasError ? "Geçersiz indirim kodu" : "", isButtonLoading: loading, buttonDisabled: !value || loading, onExpanded: function (_a) {
107
+ var isExpanded = _a.isExpanded;
108
+ return setExpanded(isExpanded);
109
+ }, onChange: function (e) {
110
+ var _a, _b;
111
+ setValue((_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
112
+ setHasError(false);
113
+ } })), (0, jsx_runtime_1.jsx)("button", __assign({ type: "button", style: { marginTop: 12 }, onClick: function () {
114
+ setLoading(true);
115
+ setTimeout(function () {
116
+ setLoading(false);
117
+ setHasError(value.toUpperCase() !== "UZAT10");
118
+ }, 600);
119
+ } }, { children: "Uygulamay\u0131 sim\u00FCle et" }))] })));
120
+ };
121
+ exports.Interactive = {
122
+ render: function (args) { return (0, jsx_runtime_1.jsx)(InteractiveStory, __assign({}, args)); },
123
+ args: __assign(__assign({}, baseArgs), { expanded: false }),
42
124
  };