@chotot/clad-ui 1.2.5 → 1.3.1

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 (224) hide show
  1. package/README.md +3 -3
  2. package/components/Announcer/Announcer.d.ts +9 -4
  3. package/components/Announcer/Announcer.stories.d.ts +142 -0
  4. package/components/Announcer/{Announcer.stories.js → Announcer.stories.tsx} +36 -31
  5. package/components/Announcer/Announcer.styles.d.ts +24 -12
  6. package/components/Announcer/{Announcer.styles.js → Announcer.styles.ts} +43 -18
  7. package/components/Announcer/Announcer.tsx +62 -47
  8. package/components/Badge/Badge.d.ts +4 -2
  9. package/components/Badge/Badge.stories.d.ts +61 -0
  10. package/components/Badge/{Badge.stories.js → Badge.stories.tsx} +5 -5
  11. package/components/Badge/Badge.styles.d.ts +20 -5
  12. package/components/Badge/{Badge.styles.js → Badge.styles.ts} +14 -1
  13. package/components/Badge/Badge.tsx +8 -4
  14. package/components/Box/Box.d.ts +3 -3
  15. package/components/Box/Box.stories.d.ts +240 -0
  16. package/components/Box/{Box.stories.js → Box.stories.tsx} +2 -2
  17. package/components/Box/Box.styles.d.ts +19 -4
  18. package/components/Box/{Box.styles.js → Box.styles.ts} +17 -4
  19. package/components/Box/Box.tsx +4 -4
  20. package/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  21. package/components/Breadcrumbs/Breadcrumbs.stories.d.ts +52 -0
  22. package/components/Breadcrumbs/{Breadcrumbs.stories.js → Breadcrumbs.stories.tsx} +17 -15
  23. package/components/Breadcrumbs/Breadcrumbs.styles.d.ts +5 -4
  24. package/components/Breadcrumbs/Breadcrumbs.tsx +2 -2
  25. package/components/Button/Button.d.ts +21 -6
  26. package/components/Button/Button.stories.d.ts +103 -0
  27. package/components/Button/{Button.stories.js → Button.stories.tsx} +5 -1
  28. package/components/Button/Button.styles.d.ts +1 -1
  29. package/components/Button/{Button.styles.js → Button.styles.ts} +100 -6
  30. package/components/Button/Button.tsx +51 -18
  31. package/components/Button/ButtonLink.d.ts +4 -4
  32. package/components/Button/ButtonLink.stories.d.ts +30 -0
  33. package/components/Button/ButtonLink.styles.d.ts +1 -1
  34. package/components/Button/ButtonLink.tsx +5 -5
  35. package/components/Button/IconButton.d.ts +3 -29
  36. package/components/Button/IconButton.stories.d.ts +60 -0
  37. package/components/Button/{IconButton.stories.js → IconButton.stories.tsx} +27 -0
  38. package/components/Button/IconButton.tsx +2 -42
  39. package/components/Checkbox/Checkbox.d.ts +3 -3
  40. package/components/Checkbox/Checkbox.stories.d.ts +88 -0
  41. package/components/Checkbox/Checkbox.styles.d.ts +2 -2
  42. package/components/Checkbox/Checkbox.tsx +3 -6
  43. package/components/Chip/Chip.d.ts +5 -4
  44. package/components/Chip/Chip.stories.d.ts +153 -0
  45. package/components/Chip/{Chip.stories.js → Chip.stories.tsx} +4 -5
  46. package/components/Chip/Chip.styles.d.ts +11 -8
  47. package/components/Chip/{Chip.styles.js → Chip.styles.ts} +4 -4
  48. package/components/Chip/Chip.tsx +19 -12
  49. package/components/CurrencyInput/CurrencyInput.d.ts +3 -56
  50. package/components/CurrencyInput/CurrencyInput.stories.d.ts +104 -0
  51. package/components/CurrencyInput/{CurrencyInput.stories.js → CurrencyInput.stories.tsx} +2 -2
  52. package/components/CurrencyInput/CurrencyInput.styles.d.ts +16 -10
  53. package/components/CurrencyInput/{CurrencyInput.styles.js → CurrencyInput.styles.ts} +23 -9
  54. package/components/CurrencyInput/CurrencyInput.tsx +7 -61
  55. package/components/Dropdown/Dropdown.d.ts +22 -7
  56. package/components/Dropdown/Dropdown.stories.d.ts +148 -0
  57. package/components/Dropdown/{Dropdown.stories.js → Dropdown.stories.tsx} +115 -1
  58. package/components/Dropdown/Dropdown.styles.d.ts +10 -0
  59. package/components/Dropdown/Dropdown.styles.ts +42 -0
  60. package/components/Dropdown/Dropdown.tsx +120 -24
  61. package/components/Grid/Col.d.ts +2 -2
  62. package/components/Grid/Col.tsx +6 -3
  63. package/components/Grid/Grid.styles.d.ts +25 -5
  64. package/components/Grid/{Grid.styles.js → Grid.styles.ts} +16 -3
  65. package/components/Grid/aGrid.stories.d.ts +127 -0
  66. package/components/Grid/bCol.stories.d.ts +74 -0
  67. package/components/Input/Input.d.ts +14 -10
  68. package/components/Input/Input.stories.d.ts +226 -0
  69. package/components/Input/{Input.stories.js → Input.stories.tsx} +20 -16
  70. package/components/Input/Input.styles.d.ts +22 -11
  71. package/components/Input/{Input.styles.js → Input.styles.ts} +29 -7
  72. package/components/Input/Input.tsx +22 -20
  73. package/components/Popover/Popover.d.ts +44 -0
  74. package/components/Popover/Popover.stories.d.ts +53 -0
  75. package/components/Popover/Popover.stories.tsx +133 -0
  76. package/components/Popover/Popover.tsx +121 -0
  77. package/components/RadioButton/RadioButton.d.ts +5 -6
  78. package/components/RadioButton/RadioButton.stories.d.ts +94 -0
  79. package/components/RadioButton/RadioButton.styles.d.ts +7 -3
  80. package/components/RadioButton/{RadioButton.styles.js → RadioButton.styles.ts} +1 -1
  81. package/components/RadioButton/RadioButton.tsx +5 -11
  82. package/components/RowItem/RowItem.d.ts +27 -9
  83. package/components/RowItem/RowItem.stories.d.ts +131 -0
  84. package/components/RowItem/RowItem.stories.tsx +710 -0
  85. package/components/RowItem/RowItem.styles.d.ts +31 -10
  86. package/components/RowItem/{RowItem.styles.js → RowItem.styles.ts} +41 -13
  87. package/components/RowItem/RowItem.tsx +106 -42
  88. package/components/ShapeIcon/ShapeIcon.d.ts +23 -16
  89. package/components/ShapeIcon/ShapeIcon.stories.d.ts +91 -0
  90. package/components/ShapeIcon/{ShapeIcon.stories.js → ShapeIcon.stories.tsx} +21 -8
  91. package/components/ShapeIcon/ShapeIcon.styles.d.ts +8 -3
  92. package/components/ShapeIcon/{ShapeIcon.styles.js → ShapeIcon.styles.ts} +6 -3
  93. package/components/ShapeIcon/ShapeIcon.tsx +25 -21
  94. package/components/Slider/Slider.d.ts +9 -7
  95. package/components/Slider/Slider.stories.d.ts +81 -0
  96. package/components/Slider/{Slider.stories.js → Slider.stories.tsx} +7 -7
  97. package/components/Slider/Slider.styles.d.ts +15 -11
  98. package/components/Slider/{Slider.styles.js → Slider.styles.ts} +1 -1
  99. package/components/Slider/Slider.tsx +21 -16
  100. package/components/Snack/Snack.d.ts +4 -5
  101. package/components/Snack/Snack.stories.d.ts +87 -0
  102. package/components/Snack/Snack.styles.d.ts +9 -8
  103. package/components/Snack/{Snack.styles.js → Snack.styles.ts} +4 -4
  104. package/components/Snack/Snack.tsx +14 -11
  105. package/components/Tabs/Tab.d.ts +6 -6
  106. package/components/Tabs/Tab.tsx +6 -7
  107. package/components/Tabs/Tabs.d.ts +7 -4
  108. package/components/Tabs/Tabs.stories.d.ts +64 -0
  109. package/components/Tabs/{Tabs.stories.js → Tabs.stories.tsx} +2 -2
  110. package/components/Tabs/Tabs.styles.d.ts +30 -12
  111. package/components/Tabs/{Tabs.styles.js → Tabs.styles.ts} +4 -4
  112. package/components/Tabs/Tabs.tsx +11 -7
  113. package/components/TextArea/TextArea.d.ts +24 -11
  114. package/components/TextArea/TextArea.stories.d.ts +151 -0
  115. package/components/TextArea/{TextArea.stories.js → TextArea.stories.tsx} +5 -96
  116. package/components/TextArea/TextArea.styles.d.ts +18 -16
  117. package/components/TextArea/{TextArea.styles.js → TextArea.styles.ts} +39 -19
  118. package/components/TextArea/TextArea.tsx +85 -31
  119. package/components/TextLabel/TextLabel.d.ts +35 -0
  120. package/components/TextLabel/TextLabel.stories.d.ts +40 -0
  121. package/components/TextLabel/TextLabel.stories.tsx +177 -0
  122. package/components/TextLabel/TextLabel.styles.d.ts +9 -0
  123. package/components/TextLabel/TextLabel.styles.ts +24 -0
  124. package/components/TextLabel/TextLabel.tsx +112 -0
  125. package/components/ToggleSwitch/ToggleSwitch.d.ts +2 -2
  126. package/components/ToggleSwitch/ToggleSwitch.stories.d.ts +38 -0
  127. package/components/ToggleSwitch/ToggleSwitch.styles.d.ts +21 -14
  128. package/components/ToggleSwitch/{ToggleSwitch.styles.js → ToggleSwitch.styles.ts} +8 -12
  129. package/components/ToggleSwitch/ToggleSwitch.tsx +12 -6
  130. package/components/Tooltip/Tooltip.d.ts +9 -3
  131. package/components/Tooltip/Tooltip.spec.js +5 -3
  132. package/components/Tooltip/Tooltip.styles.d.ts +7 -8
  133. package/components/Tooltip/Tooltip.tsx +10 -3
  134. package/components/index.d.ts +2 -0
  135. package/components/index.ts +2 -0
  136. package/icons/PrivateSellerAvatar.d.ts +3 -0
  137. package/icons/PrivateSellerAvatar.js +3 -0
  138. package/icons/Sda.d.ts +5 -2
  139. package/icons/Sda.js +7 -7
  140. package/icons/VerifiedShop.d.ts +3 -0
  141. package/icons/VerifiedShop.js +3 -0
  142. package/package.json +6 -6
  143. package/patterns/Drawer/Drawer.d.ts +13 -13
  144. package/patterns/Drawer/Drawer.stories.d.ts +90 -0
  145. package/patterns/Drawer/{Drawer.stories.js → Drawer.stories.tsx} +25 -0
  146. package/patterns/Drawer/Drawer.styles.d.ts +30 -26
  147. package/patterns/Drawer/{Drawer.styles.js → Drawer.styles.ts} +2 -5
  148. package/patterns/Drawer/Drawer.tsx +20 -41
  149. package/patterns/EmptyState/EmptyState.d.ts +5 -4
  150. package/patterns/EmptyState/EmptyState.stories.d.ts +40 -0
  151. package/patterns/EmptyState/EmptyState.styles.d.ts +10 -10
  152. package/patterns/EmptyState/{EmptyState.styles.js → EmptyState.styles.ts} +5 -4
  153. package/patterns/EmptyState/EmptyState.tsx +14 -12
  154. package/patterns/InputGroup/InputGroup.d.ts +4 -0
  155. package/patterns/InputGroup/InputGroup.styles.d.ts +5 -4
  156. package/patterns/InputGroup/InputGroup.tsx +11 -5
  157. package/patterns/LegacyDialog/DialogMainIcon.d.ts +1 -0
  158. package/patterns/LegacyDialog/DialogMainIcon.js +51 -0
  159. package/patterns/LegacyDialog/LegacyDialog.d.ts +3 -3
  160. package/patterns/LegacyDialog/LegacyDialog.styles.d.ts +8 -10
  161. package/patterns/LegacyDialog/LegacyDialog.styles.js +1 -46
  162. package/patterns/LegacyDialog/LegacyDialog.tsx +5 -11
  163. package/patterns/LegacyPopup/LegacyPopup.d.ts +4 -4
  164. package/patterns/LegacyPopup/LegacyPopup.styles.d.ts +18 -13
  165. package/patterns/LegacyPopup/{LegacyPopup.styles.js → LegacyPopup.styles.ts} +3 -1
  166. package/patterns/LegacyPopup/LegacyPopup.tsx +4 -6
  167. package/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts +20 -17
  168. package/patterns/MultiSearchDropdown/MultiSearchDropdown.stories.d.ts +125 -0
  169. package/patterns/MultiSearchDropdown/{MultiSearchDropdown.stories.js → MultiSearchDropdown.stories.tsx} +31 -30
  170. package/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts +22 -21
  171. package/patterns/MultiSearchDropdown/{MultiSearchDropdown.styles.js → MultiSearchDropdown.styles.ts} +1 -7
  172. package/patterns/MultiSearchDropdown/MultiSearchDropdown.tsx +33 -32
  173. package/patterns/Popup/Popup.d.ts +8 -7
  174. package/patterns/Popup/Popup.stories.d.ts +102 -0
  175. package/patterns/Popup/Popup.styles.d.ts +41 -30
  176. package/patterns/Popup/{Popup.styles.js → Popup.styles.ts} +26 -33
  177. package/patterns/Popup/Popup.tsx +14 -33
  178. package/patterns/SearchInput/SearchInput.d.ts +38 -21
  179. package/patterns/SearchInput/SearchInput.stories.d.ts +186 -0
  180. package/patterns/SearchInput/{SearchInput.stories.js → SearchInput.stories.tsx} +78 -45
  181. package/patterns/SearchInput/SearchInput.styles.d.ts +6 -5
  182. package/patterns/SearchInput/{SearchInput.styles.js → SearchInput.styles.ts} +7 -4
  183. package/patterns/SearchInput/SearchInput.tsx +53 -34
  184. package/patterns/TagCloud/TagCloud.d.ts +19 -6
  185. package/patterns/TagCloud/TagCloud.stories.d.ts +159 -0
  186. package/patterns/TagCloud/{TagCloud.stories.js → TagCloud.stories.tsx} +59 -14
  187. package/patterns/TagCloud/TagCloud.styles.d.ts +12 -8
  188. package/patterns/TagCloud/{TagCloud.styles.js → TagCloud.styles.ts} +6 -7
  189. package/patterns/TagCloud/TagCloud.tsx +24 -8
  190. package/patterns/TagCloud/TagCloudMultiActive.d.ts +6 -4
  191. package/patterns/TagCloud/TagCloudMultiActive.tsx +5 -5
  192. package/patterns/TagCloud/TagCloudSingleActive.d.ts +5 -2
  193. package/patterns/TagCloud/TagCloudSingleActive.tsx +18 -5
  194. package/patterns/patterns-index.spec.js +1 -1
  195. package/storybook/GuideImage.d.ts +2 -2
  196. package/storybook/Swatch.d.ts +2 -2
  197. package/theme/__snapshots__/chotot.spec.js.snap +2 -2
  198. package/theme/chotot-color1.d.ts +7 -14
  199. package/theme/chotot.d.ts +32 -32
  200. package/theme/chotot.js +4 -4
  201. package/theme/ct-job.d.ts +6 -14
  202. package/theme/ct-pty.d.ts +6 -8
  203. package/theme/mudah.d.ts +14 -13
  204. package/types.d.ts +0 -9
  205. package/utils/_simulateChangeEvent.d.ts +18 -3
  206. package/utils/_simulateChangeEvent.js +13 -6
  207. package/utils/_simulateChangeEvent.spec.js +1 -1
  208. package/utils/cx.d.ts +8 -4
  209. package/utils/cx.js +8 -4
  210. package/utils/sx.d.ts +12 -4192
  211. package/components/RowItem/RowItem.stories.js +0 -560
  212. /package/components/Breadcrumbs/{Breadcrumbs.styles.js → Breadcrumbs.styles.ts} +0 -0
  213. /package/components/Button/{ButtonLink.stories.js → ButtonLink.stories.tsx} +0 -0
  214. /package/components/Button/{ButtonLink.styles.js → ButtonLink.styles.ts} +0 -0
  215. /package/components/Checkbox/{Checkbox.stories.js → Checkbox.stories.tsx} +0 -0
  216. /package/components/Checkbox/{Checkbox.styles.js → Checkbox.styles.ts} +0 -0
  217. /package/components/Grid/{aGrid.stories.js → aGrid.stories.tsx} +0 -0
  218. /package/components/Grid/{bCol.stories.js → bCol.stories.tsx} +0 -0
  219. /package/components/RadioButton/{RadioButton.stories.js → RadioButton.stories.tsx} +0 -0
  220. /package/components/Snack/{Snack.stories.js → Snack.stories.tsx} +0 -0
  221. /package/components/ToggleSwitch/{ToggleSwitch.stories.js → ToggleSwitch.stories.tsx} +0 -0
  222. /package/patterns/EmptyState/{EmptyState.stories.js → EmptyState.stories.tsx} +0 -0
  223. /package/patterns/InputGroup/{InputGroup.styles.js → InputGroup.styles.ts} +0 -0
  224. /package/patterns/Popup/{Popup.stories.js → Popup.stories.tsx} +0 -0
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ declare const badgeStory: {
3
+ title: string;
4
+ component: React.FC<import("./Badge").BadgeProps>;
5
+ tags: string[];
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ args: {
14
+ children: string;
15
+ label: string;
16
+ };
17
+ };
18
+ export default badgeStory;
19
+ export declare const Overview: {
20
+ render: (args: any) => JSX.Element;
21
+ };
22
+ export declare const SizeVariants: {
23
+ render: () => JSX.Element;
24
+ parameters: {
25
+ docs: {
26
+ description: {
27
+ story: string;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ export declare const ColorVariants: {
33
+ render: () => JSX.Element;
34
+ parameters: {
35
+ docs: {
36
+ description: {
37
+ story: string;
38
+ };
39
+ };
40
+ };
41
+ };
42
+ export declare const PositionVariants: {
43
+ render: () => JSX.Element;
44
+ parameters: {
45
+ docs: {
46
+ description: {
47
+ story: string;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ export declare const BorderRadiusVariants: {
53
+ render: () => JSX.Element;
54
+ parameters: {
55
+ docs: {
56
+ description: {
57
+ story: string;
58
+ };
59
+ };
60
+ };
61
+ };
@@ -67,7 +67,7 @@ export const SizeVariants = {
67
67
  Without size input :
68
68
  <div style={{ marginTop: '24px' }}>
69
69
  <Badge label="default sm">
70
- <Button color="secondary"> No size input</Button>
70
+ <Button color="tertiary"> No size input</Button>
71
71
  </Badge>
72
72
  </div>
73
73
  </Col>
@@ -75,7 +75,7 @@ export const SizeVariants = {
75
75
  Small size:
76
76
  <div style={{ marginTop: '24px' }}>
77
77
  <Badge size="sm" label="9">
78
- <Button color="secondary"> sm Input</Button>
78
+ <Button color="tertiary"> sm Input</Button>
79
79
  </Badge>
80
80
  </div>
81
81
  </Col>
@@ -83,7 +83,7 @@ export const SizeVariants = {
83
83
  Medium size:
84
84
  <div style={{ marginTop: '24px' }}>
85
85
  <Badge size="md" label="999">
86
- <Button color="secondary"> md Input</Button>
86
+ <Button color="tertiary"> md Input</Button>
87
87
  </Badge>
88
88
  </div>
89
89
  </Col>
@@ -106,7 +106,7 @@ export const ColorVariants = {
106
106
  Without color input :
107
107
  <div style={{ marginTop: '24px' }}>
108
108
  <Badge label="default primary color">
109
- <Button color="secondary"> No color input</Button>
109
+ <Button color="primary"> No color input</Button>
110
110
  </Badge>
111
111
  </div>
112
112
  </Col>
@@ -114,7 +114,7 @@ export const ColorVariants = {
114
114
  With color input:
115
115
  <div style={{ marginTop: '24px' }}>
116
116
  <Badge backgroundColor="critical" label="critical">
117
- <Button color="secondary"> With color input </Button>
117
+ <Button color="primary"> With color input </Button>
118
118
  </Badge>
119
119
  </div>
120
120
  </Col>
@@ -1,9 +1,24 @@
1
- export const badgeSizeSmallClass: import("@linaria/core").LinariaClassName;
2
- export const badgeSizeMediumClass: import("@linaria/core").LinariaClassName;
3
- export const StyledBadgeWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
4
- as?: import("react").ElementType<any> | undefined;
1
+ export declare const badgeSizeSmallClass: import("@linaria/core").LinariaClassName;
2
+ export declare const badgeSizeMediumClass: import("@linaria/core").LinariaClassName;
3
+ export declare const StyledBadgeWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
4
+ as?: import("react").ElementType;
5
5
  }>;
6
6
  /**
7
7
  * @type {any}
8
8
  */
9
- export const StyledBadge: any;
9
+ export declare const StyledBadge: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
10
+ zIndex: number;
11
+ backgroundColor: string;
12
+ badgePosition: {
13
+ top: string;
14
+ left: string;
15
+ right: string;
16
+ transform: string;
17
+ };
18
+ badgeSizing: {
19
+ borderRadius: string;
20
+ className: string;
21
+ };
22
+ } & {
23
+ as?: import("react").ElementType;
24
+ }>;
@@ -28,7 +28,20 @@ export const StyledBadgeWrapper = styled.div`
28
28
  /**
29
29
  * @type {any}
30
30
  */
31
- export const StyledBadge = styled.div`
31
+ export const StyledBadge = styled.div<{
32
+ zIndex: number;
33
+ backgroundColor: string;
34
+ badgePosition: {
35
+ top: string;
36
+ left: string;
37
+ right: string;
38
+ transform: string;
39
+ };
40
+ badgeSizing: {
41
+ borderRadius: string;
42
+ className: string;
43
+ };
44
+ }>`
32
45
  text-decoration: inherit;
33
46
  position: absolute;
34
47
  display: block;
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  const { radii } = theme;
11
11
 
12
- export type BadgeProps = {
12
+ export interface BadgeProps {
13
13
  /**
14
14
  * Size of Badge
15
15
  */
@@ -46,13 +46,14 @@ export type BadgeProps = {
46
46
  * z-index
47
47
  */
48
48
  zIndex?: number;
49
- };
49
+ }
50
50
 
51
51
  /**
52
+ * Badge Component for menus and notifications
53
+ *
52
54
  * `✅ Stable`
53
55
  */
54
56
 
55
-
56
57
  const Badge: React.FC<BadgeProps> = ({
57
58
  size = 'sm',
58
59
  children = 'Default Badge Children',
@@ -108,7 +109,10 @@ const Badge: React.FC<BadgeProps> = ({
108
109
  borderRadius: _borderRadius ? radii[_borderRadius] : radii.sm,
109
110
  };
110
111
  default:
111
- return {};
112
+ return {
113
+ className: '',
114
+ borderRadius: '',
115
+ };
112
116
  }
113
117
  })(size, borderRadius);
114
118
 
@@ -5,11 +5,11 @@ declare const getSizes: (value: string[] | string, defaultValue: string) => any[
5
5
  declare const getBorderWidth: (value: string[] | string, defaultValue: string) => string[];
6
6
  declare const getRadiis: (value: string[] | string, defaultValue: string) => any[];
7
7
  declare const getShadows: (value: string[] | string, defaultValue: string) => any[];
8
- export type BoxProps = {
8
+ export interface BoxProps {
9
9
  /**
10
10
  * Element or component to be rendered as
11
11
  */
12
- as?: string;
12
+ as?: React.ElementType;
13
13
  /**
14
14
  * Box className
15
15
  */
@@ -90,7 +90,7 @@ export type BoxProps = {
90
90
  * Additional inline style object
91
91
  */
92
92
  style?: React.CSSProperties;
93
- };
93
+ }
94
94
  /**
95
95
  * Clad-UI-s theme-aware replacement for \<div \/\> HTML element
96
96
  *
@@ -0,0 +1,240 @@
1
+ import React from 'react';
2
+ declare const boxStories: {
3
+ title: string;
4
+ component: React.FC<import("./Box").BoxProps>;
5
+ tags: string[];
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ argTypes: {
14
+ borderColor: {
15
+ options: string[];
16
+ };
17
+ borderWidth: {
18
+ options: string[];
19
+ control: {
20
+ type: string;
21
+ };
22
+ };
23
+ color: {
24
+ options: string[];
25
+ control: {
26
+ type: string;
27
+ };
28
+ };
29
+ backgroundColor: {
30
+ options: string[];
31
+ control: {
32
+ type: string;
33
+ };
34
+ };
35
+ padding: {
36
+ options: string[];
37
+ control: {
38
+ type: string;
39
+ };
40
+ };
41
+ paddingx: {
42
+ options: string[];
43
+ control: {
44
+ type: string;
45
+ };
46
+ };
47
+ paddingy: {
48
+ options: string[];
49
+ control: {
50
+ type: string;
51
+ };
52
+ };
53
+ alignItems: {};
54
+ width: {
55
+ options: string[];
56
+ control: {
57
+ type: string;
58
+ };
59
+ };
60
+ maxWidth: {
61
+ options: string[];
62
+ control: {
63
+ type: string;
64
+ };
65
+ };
66
+ height: {
67
+ options: string[];
68
+ control: {
69
+ type: string;
70
+ };
71
+ };
72
+ borderRadius: {
73
+ options: string[];
74
+ control: {
75
+ type: string;
76
+ };
77
+ };
78
+ boxShadow: {
79
+ options: string[];
80
+ control: {
81
+ type: string;
82
+ };
83
+ };
84
+ justifyContent: {};
85
+ textAlign: {};
86
+ style: {
87
+ control: null;
88
+ };
89
+ as: {
90
+ control: null;
91
+ };
92
+ className: {
93
+ control: null;
94
+ };
95
+ backgroundImage: {
96
+ control: null;
97
+ };
98
+ dangerousHtml: {
99
+ control: null;
100
+ };
101
+ };
102
+ args: {
103
+ borderColor: string;
104
+ borderWidth: string;
105
+ color: string;
106
+ backgroundColor: string;
107
+ children: string;
108
+ padding: string;
109
+ paddingx: string;
110
+ paddingy: string;
111
+ alignItems: string;
112
+ width: string;
113
+ maxWidth: string;
114
+ height: string;
115
+ borderRadius: string;
116
+ };
117
+ };
118
+ export default boxStories;
119
+ export declare const Overview: {};
120
+ export declare const WithBackgroundColor: {
121
+ render: () => JSX.Element;
122
+ name: string;
123
+ parameters: {
124
+ docs: {
125
+ description: {
126
+ story: string;
127
+ };
128
+ };
129
+ };
130
+ };
131
+ export declare const WithPadding: {
132
+ render: () => JSX.Element;
133
+ name: string;
134
+ parameters: {
135
+ docs: {
136
+ description: {
137
+ story: string;
138
+ };
139
+ };
140
+ };
141
+ };
142
+ export declare const WithWidth: {
143
+ render: () => JSX.Element;
144
+ name: string;
145
+ parameters: {
146
+ docs: {
147
+ description: {
148
+ story: string;
149
+ };
150
+ };
151
+ };
152
+ };
153
+ export declare const WithHeight: {
154
+ render: () => JSX.Element;
155
+ name: string;
156
+ parameters: {
157
+ docs: {
158
+ description: {
159
+ story: string;
160
+ };
161
+ };
162
+ };
163
+ };
164
+ export declare const WithBorder: {
165
+ render: () => JSX.Element;
166
+ name: string;
167
+ parameters: {
168
+ docs: {
169
+ description: {
170
+ story: string;
171
+ };
172
+ };
173
+ };
174
+ };
175
+ export declare const WithBorderRadius: {
176
+ render: () => JSX.Element;
177
+ name: string;
178
+ parameters: {
179
+ docs: {
180
+ description: {
181
+ story: string;
182
+ };
183
+ };
184
+ };
185
+ };
186
+ export declare const WithShadows: {
187
+ render: () => JSX.Element;
188
+ name: string;
189
+ parameters: {
190
+ docs: {
191
+ description: {
192
+ story: string;
193
+ };
194
+ };
195
+ };
196
+ };
197
+ export declare const WithTextAlign: {
198
+ render: () => JSX.Element;
199
+ name: string;
200
+ parameters: {
201
+ docs: {
202
+ description: {
203
+ story: string;
204
+ };
205
+ };
206
+ };
207
+ };
208
+ export declare const WithAlignItems: {
209
+ render: () => JSX.Element;
210
+ name: string;
211
+ parameters: {
212
+ docs: {
213
+ description: {
214
+ story: string;
215
+ };
216
+ };
217
+ };
218
+ };
219
+ export declare const WithJustifyContent: {
220
+ render: () => JSX.Element;
221
+ name: string;
222
+ parameters: {
223
+ docs: {
224
+ description: {
225
+ story: string;
226
+ };
227
+ };
228
+ };
229
+ };
230
+ export declare const HtmlContentExample: {
231
+ render: () => JSX.Element;
232
+ name: string;
233
+ parameters: {
234
+ docs: {
235
+ description: {
236
+ story: string;
237
+ };
238
+ };
239
+ };
240
+ };
@@ -539,8 +539,8 @@ export const HtmlContentExample = {
539
539
  return (
540
540
  <Box
541
541
  padding="sm"
542
- backgroundColor="teal4"
543
- color="darkblue2"
542
+ backgroundColor="infoBG"
543
+ color="info"
544
544
  borderRadius="sm"
545
545
  dangerousHtml={html}
546
546
  />
@@ -1,5 +1,20 @@
1
+ declare const StyledBox: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
2
+ boxColor: string;
3
+ textAlign: string;
4
+ backgroundColor: string;
5
+ paddingy: string[];
6
+ paddingx: string[];
7
+ boxWidth: string[];
8
+ maxWidth: string[];
9
+ boxHeight: string[];
10
+ borderWidth: string[];
11
+ borderColor: string;
12
+ backgroundImage: string;
13
+ borderRadius: string[];
14
+ boxShadow: string[];
15
+ justifyContent: string;
16
+ alignItems: string;
17
+ } & {
18
+ as?: import("react").ElementType;
19
+ }>;
1
20
  export default StyledBox;
2
- /**
3
- * @type {React.FC<any>}
4
- */
5
- declare const StyledBox: React.FC<any>;
@@ -3,10 +3,23 @@ import theme from '@clad-ui/theme';
3
3
 
4
4
  const { breakpoints, mediaQueries, borderStyles } = theme;
5
5
 
6
- /**
7
- * @type {React.FC<any>}
8
- */
9
- const StyledBox = styled.div`
6
+ const StyledBox = styled.div<{
7
+ boxColor: string;
8
+ textAlign: string;
9
+ backgroundColor: string;
10
+ paddingy: string[];
11
+ paddingx: string[];
12
+ boxWidth: string[];
13
+ maxWidth: string[];
14
+ boxHeight: string[];
15
+ borderWidth: string[];
16
+ borderColor: string;
17
+ backgroundImage: string;
18
+ borderRadius: string[];
19
+ boxShadow: string[];
20
+ justifyContent: string;
21
+ alignItems: string;
22
+ }>`
10
23
  color: ${({ boxColor }) => boxColor};
11
24
  text-align: ${({ textAlign }) => textAlign};
12
25
  background-color: ${({ backgroundColor }) => backgroundColor};
@@ -21,11 +21,11 @@ const getRadiis = (value: string[] | string, defaultValue: string) =>
21
21
  const getShadows = (value: string[] | string, defaultValue: string) =>
22
22
  getBreakpointsValues(value, defaultValue).map((v) => shadows[v] || shadows.none);
23
23
 
24
- export type BoxProps = {
24
+ export interface BoxProps {
25
25
  /**
26
26
  * Element or component to be rendered as
27
27
  */
28
- as?: string;
28
+ as?: React.ElementType;
29
29
  /**
30
30
  * Box className
31
31
  */
@@ -127,7 +127,7 @@ export type BoxProps = {
127
127
  * Additional inline style object
128
128
  */
129
129
  style?: React.CSSProperties;
130
- };
130
+ }
131
131
 
132
132
  /**
133
133
  * Clad-UI-s theme-aware replacement for \<div \/\> HTML element
@@ -138,7 +138,7 @@ export type BoxProps = {
138
138
  const Box: React.FC<BoxProps> = ({
139
139
  as = 'div',
140
140
  className = '',
141
- style = null,
141
+ style = undefined,
142
142
  borderColor = null,
143
143
  alignItems = 'initial',
144
144
  justifyContent = 'initial',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type BreadcrumbsProps = {
2
+ export interface BreadcrumbsProps {
3
3
  /**
4
4
  * Breadcrumbs className
5
5
  */
@@ -12,6 +12,6 @@ export type BreadcrumbsProps = {
12
12
  * Whether this Breadcrumbs is show or not
13
13
  */
14
14
  isShow?: boolean;
15
- };
15
+ }
16
16
  declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
17
17
  export default Breadcrumbs;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ declare const breadcrumbsStories: {
3
+ title: string;
4
+ component: React.FC<import("./Breadcrumbs").BreadcrumbsProps>;
5
+ tags: string[];
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ argTypes: {
14
+ isShow: {};
15
+ children: {
16
+ control: null;
17
+ };
18
+ className: {
19
+ control: null;
20
+ };
21
+ };
22
+ };
23
+ export default breadcrumbsStories;
24
+ export declare const Overview: {
25
+ render: (args: any) => JSX.Element;
26
+ };
27
+ export declare const ChildrenWithWrapper: {
28
+ render: () => JSX.Element;
29
+ name: string;
30
+ parameters: {
31
+ docs: {
32
+ description: {
33
+ story: string;
34
+ };
35
+ };
36
+ };
37
+ };
38
+ export declare const WithIsShow: {
39
+ render: () => JSX.Element;
40
+ name: string;
41
+ };
42
+ export declare const LongBreadcrumbsExample: {
43
+ render: () => JSX.Element;
44
+ name: string;
45
+ parameters: {
46
+ docs: {
47
+ description: {
48
+ story: string;
49
+ };
50
+ };
51
+ };
52
+ };
@@ -86,21 +86,23 @@ export const Overview = {
86
86
  /**
87
87
  * Mimic `next/link` component
88
88
  */
89
- const Link = React.forwardRef(({ href, children }, ref) => {
90
- const handleClick = (event) => {
91
- // stop default hyperlink redirection
92
- event.preventDefault();
93
-
94
- // eslint-disable-next-line no-alert
95
- alert(`Simulated Next.js Link click to ${href}`);
96
- };
97
-
98
- return React.cloneElement(children, {
99
- href,
100
- ref,
101
- onClick: handleClick,
102
- });
103
- });
89
+ const Link = React.forwardRef<HTMLElement, { href: string; children: React.ReactElement<any> }>(
90
+ ({ href, children }, ref) => {
91
+ const handleClick = (event) => {
92
+ // stop default hyperlink redirection
93
+ event.preventDefault();
94
+
95
+ // eslint-disable-next-line no-alert
96
+ alert(`Simulated Next.js Link click to ${href}`);
97
+ };
98
+
99
+ return React.cloneElement(children, {
100
+ href,
101
+ ref,
102
+ onClick: handleClick,
103
+ });
104
+ }
105
+ );
104
106
 
105
107
  export const ChildrenWithWrapper = {
106
108
  render: () => (
@@ -1,6 +1,7 @@
1
- export const StyledBreadcrumbs: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & Record<never, unknown> & {
2
- as?: import("react").ElementType<any> | undefined;
1
+ declare const StyledBreadcrumbs: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & Record<never, unknown> & {
2
+ as?: import("react").ElementType;
3
3
  }>;
4
- export const Placeholder: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
5
- as?: import("react").ElementType<any> | undefined;
4
+ declare const Placeholder: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
5
+ as?: import("react").ElementType;
6
6
  }>;
7
+ export { StyledBreadcrumbs, Placeholder };