@croquiscom/pds 0.3.0 → 0.5.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 (237) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -1
  3. package/dist/button/Button.stories.d.ts +2 -4
  4. package/dist/checkbox/Checkbox.d.ts +7 -0
  5. package/dist/checkbox/Checkbox.stories.d.ts +8 -0
  6. package/dist/checkbox/CheckboxGroup.d.ts +26 -0
  7. package/dist/checkbox/CheckboxGroup.stories.d.ts +9 -0
  8. package/dist/checkbox/index.d.ts +2 -0
  9. package/dist/divider/Divider.d.ts +0 -1
  10. package/dist/form/FormHelperText.d.ts +0 -1
  11. package/dist/form/FormHelperText.stories.d.ts +0 -1
  12. package/dist/global_style/GlobalStyle.d.ts +0 -1
  13. package/dist/icons/generated/Account24.d.ts +0 -1
  14. package/dist/icons/generated/Alert16.d.ts +0 -1
  15. package/dist/icons/generated/Alert20.d.ts +0 -1
  16. package/dist/icons/generated/Alert24.d.ts +0 -1
  17. package/dist/icons/generated/Alert50.d.ts +0 -1
  18. package/dist/icons/generated/AlertFill20.d.ts +0 -1
  19. package/dist/icons/generated/AlertTriangle18.d.ts +0 -1
  20. package/dist/icons/generated/ArrowBottom16.d.ts +0 -1
  21. package/dist/icons/generated/ArrowBottom18.d.ts +0 -1
  22. package/dist/icons/generated/ArrowDecrease10.d.ts +0 -1
  23. package/dist/icons/generated/ArrowIncrease10.d.ts +0 -1
  24. package/dist/icons/generated/ArrowLeft16.d.ts +0 -1
  25. package/dist/icons/generated/ArrowLeft18.d.ts +0 -1
  26. package/dist/icons/generated/ArrowLineDown20.d.ts +0 -1
  27. package/dist/icons/generated/ArrowLineLeft20.d.ts +0 -1
  28. package/dist/icons/generated/ArrowLineRight20.d.ts +0 -1
  29. package/dist/icons/generated/ArrowLineUp20.d.ts +0 -1
  30. package/dist/icons/generated/ArrowRight16.d.ts +0 -1
  31. package/dist/icons/generated/ArrowRight18.d.ts +0 -1
  32. package/dist/icons/generated/ArrowStick10.d.ts +0 -1
  33. package/dist/icons/generated/ArrowTop16.d.ts +0 -1
  34. package/dist/icons/generated/ArrowTop18.d.ts +0 -1
  35. package/dist/icons/generated/AutoCharge20.d.ts +0 -1
  36. package/dist/icons/generated/BarChart18.d.ts +0 -1
  37. package/dist/icons/generated/Beauty72.d.ts +0 -1
  38. package/dist/icons/generated/Below10.d.ts +0 -1
  39. package/dist/icons/generated/Below16.d.ts +0 -1
  40. package/dist/icons/generated/Best16.d.ts +0 -1
  41. package/dist/icons/generated/Bookmark18.d.ts +0 -1
  42. package/dist/icons/generated/Boost24.d.ts +0 -1
  43. package/dist/icons/generated/Brand72.d.ts +0 -1
  44. package/dist/icons/generated/Calendar16.d.ts +0 -1
  45. package/dist/icons/generated/Camera20.d.ts +0 -1
  46. package/dist/icons/generated/Cart18.d.ts +0 -1
  47. package/dist/icons/generated/Cart24.d.ts +0 -1
  48. package/dist/icons/generated/Charge20.d.ts +0 -1
  49. package/dist/icons/generated/ChargeCoupon20.d.ts +0 -1
  50. package/dist/icons/generated/Check14.d.ts +0 -1
  51. package/dist/icons/generated/Check24.d.ts +0 -1
  52. package/dist/icons/generated/CircleCard24.d.ts +0 -1
  53. package/dist/icons/generated/CircleCheckFill16.d.ts +0 -1
  54. package/dist/icons/generated/CircleCheckLine16.d.ts +0 -1
  55. package/dist/icons/generated/CirclePlus14.d.ts +0 -1
  56. package/dist/icons/generated/CircleWon18.d.ts +0 -1
  57. package/dist/icons/generated/CircleWon24.d.ts +0 -1
  58. package/dist/icons/generated/Click18.d.ts +0 -1
  59. package/dist/icons/generated/Clock16.d.ts +0 -1
  60. package/dist/icons/generated/CloseMedium24.d.ts +0 -1
  61. package/dist/icons/generated/CloseSmall16.d.ts +0 -1
  62. package/dist/icons/generated/Contract24.d.ts +0 -1
  63. package/dist/icons/generated/Copy14.d.ts +0 -1
  64. package/dist/icons/generated/Coupon18.d.ts +0 -1
  65. package/dist/icons/generated/Coupon24.d.ts +0 -1
  66. package/dist/icons/generated/Crop16.d.ts +0 -1
  67. package/dist/icons/generated/Cs24.d.ts +0 -1
  68. package/dist/icons/generated/Cvr18.d.ts +0 -1
  69. package/dist/icons/generated/Dashboard24.d.ts +0 -1
  70. package/dist/icons/generated/DeleteCircleFill20.d.ts +0 -1
  71. package/dist/icons/generated/Delivery24.d.ts +0 -1
  72. package/dist/icons/generated/Delivery72.d.ts +0 -1
  73. package/dist/icons/generated/Doc14.d.ts +0 -1
  74. package/dist/icons/generated/DocConfirm50.d.ts +0 -1
  75. package/dist/icons/generated/Done20.d.ts +0 -1
  76. package/dist/icons/generated/Edit16.d.ts +0 -1
  77. package/dist/icons/generated/Email18.d.ts +0 -1
  78. package/dist/icons/generated/EmptyNoti50.d.ts +0 -1
  79. package/dist/icons/generated/Error16.d.ts +0 -1
  80. package/dist/icons/generated/Excel16.d.ts +0 -1
  81. package/dist/icons/generated/Exchange24.d.ts +0 -1
  82. package/dist/icons/generated/Exhibition24.d.ts +0 -1
  83. package/dist/icons/generated/EyeOff16.d.ts +0 -1
  84. package/dist/icons/generated/EyeOn16.d.ts +0 -1
  85. package/dist/icons/generated/Fbk16.d.ts +0 -1
  86. package/dist/icons/generated/GlobalDelivery72.d.ts +0 -1
  87. package/dist/icons/generated/Grade18.d.ts +0 -1
  88. package/dist/icons/generated/Graph24.d.ts +0 -1
  89. package/dist/icons/generated/GraphBar16.d.ts +0 -1
  90. package/dist/icons/generated/GraphLine16.d.ts +0 -1
  91. package/dist/icons/generated/Heart18.d.ts +0 -1
  92. package/dist/icons/generated/Help14.d.ts +0 -1
  93. package/dist/icons/generated/Help16.d.ts +0 -1
  94. package/dist/icons/generated/Home16.d.ts +0 -1
  95. package/dist/icons/generated/IdeaFill24.d.ts +0 -1
  96. package/dist/icons/generated/IdeaLine24.d.ts +0 -1
  97. package/dist/icons/generated/IndentArrow14.d.ts +0 -1
  98. package/dist/icons/generated/Info14.d.ts +0 -1
  99. package/dist/icons/generated/Info16.d.ts +0 -1
  100. package/dist/icons/generated/Info24.d.ts +0 -1
  101. package/dist/icons/generated/Interest16.d.ts +0 -1
  102. package/dist/icons/generated/Life72.d.ts +0 -1
  103. package/dist/icons/generated/Link16.d.ts +0 -1
  104. package/dist/icons/generated/Loading24.d.ts +0 -1
  105. package/dist/icons/generated/LoadingDonuts30.d.ts +0 -1
  106. package/dist/icons/generated/LoadingDots30.d.ts +0 -1
  107. package/dist/icons/generated/Lock18.d.ts +0 -1
  108. package/dist/icons/generated/Marketing24.d.ts +0 -1
  109. package/dist/icons/generated/Megaphone14.d.ts +0 -1
  110. package/dist/icons/generated/MemoAttention20.d.ts +0 -1
  111. package/dist/icons/generated/MemoDefault20.d.ts +0 -1
  112. package/dist/icons/generated/Move10.d.ts +0 -1
  113. package/dist/icons/generated/New10.d.ts +0 -1
  114. package/dist/icons/generated/NotExposed16.d.ts +0 -1
  115. package/dist/icons/generated/Notice24.d.ts +0 -1
  116. package/dist/icons/generated/One18.d.ts +0 -1
  117. package/dist/icons/generated/Order24.d.ts +0 -1
  118. package/dist/icons/generated/OrderAmount18.d.ts +0 -1
  119. package/dist/icons/generated/Ordering16.d.ts +0 -1
  120. package/dist/icons/generated/Orders18.d.ts +0 -1
  121. package/dist/icons/generated/OutlinkOne14.d.ts +0 -1
  122. package/dist/icons/generated/OutlinkTwo14.d.ts +0 -1
  123. package/dist/icons/generated/PenaltyBad20.d.ts +0 -1
  124. package/dist/icons/generated/PenaltyGood20.d.ts +0 -1
  125. package/dist/icons/generated/PenaltyNotsobad20.d.ts +0 -1
  126. package/dist/icons/generated/Pin16.d.ts +0 -1
  127. package/dist/icons/generated/Pin24.d.ts +0 -1
  128. package/dist/icons/generated/Play20.d.ts +0 -1
  129. package/dist/icons/generated/Plus16.d.ts +0 -1
  130. package/dist/icons/generated/Plus20.d.ts +0 -1
  131. package/dist/icons/generated/Posty16.d.ts +0 -1
  132. package/dist/icons/generated/Powerup24.d.ts +0 -1
  133. package/dist/icons/generated/Product24.d.ts +0 -1
  134. package/dist/icons/generated/Promotion24.d.ts +0 -1
  135. package/dist/icons/generated/Question24.d.ts +0 -1
  136. package/dist/icons/generated/Ranking18.d.ts +0 -1
  137. package/dist/icons/generated/Refresh14.d.ts +0 -1
  138. package/dist/icons/generated/Refund24.d.ts +0 -1
  139. package/dist/icons/generated/Search14.d.ts +0 -1
  140. package/dist/icons/generated/SelectArrow16.d.ts +0 -1
  141. package/dist/icons/generated/Shop72.d.ts +0 -1
  142. package/dist/icons/generated/SluggishSales16.d.ts +0 -1
  143. package/dist/icons/generated/Spoid20.d.ts +0 -1
  144. package/dist/icons/generated/Star10.d.ts +0 -1
  145. package/dist/icons/generated/Status10.d.ts +0 -1
  146. package/dist/icons/generated/StatusNo16.d.ts +0 -1
  147. package/dist/icons/generated/StatusYes16.d.ts +0 -1
  148. package/dist/icons/generated/SteadySeller16.d.ts +0 -1
  149. package/dist/icons/generated/Store24.d.ts +0 -1
  150. package/dist/icons/generated/Store50.d.ts +0 -1
  151. package/dist/icons/generated/TableMove16.d.ts +0 -1
  152. package/dist/icons/generated/Thumbup14.d.ts +0 -1
  153. package/dist/icons/generated/Tip18.d.ts +0 -1
  154. package/dist/icons/generated/Trend18.d.ts +0 -1
  155. package/dist/icons/generated/TrendDecreasing18.d.ts +0 -1
  156. package/dist/icons/generated/TrendIncreasing18.d.ts +0 -1
  157. package/dist/icons/generated/Two18.d.ts +0 -1
  158. package/dist/icons/generated/Upload50.d.ts +0 -1
  159. package/dist/icons/generated/User18.d.ts +0 -1
  160. package/dist/icons/generated/Video16.d.ts +0 -1
  161. package/dist/icons/generated/Warning24.d.ts +0 -1
  162. package/dist/icons/generated/Won16.d.ts +0 -1
  163. package/dist/icons/generated/Zigzag16.d.ts +0 -1
  164. package/dist/icons/generated/ZigzagCan16.d.ts +0 -1
  165. package/dist/icons/generated/ZigzagEng16.d.ts +0 -1
  166. package/dist/icons/generated/ZigzagGlobal16.d.ts +0 -1
  167. package/dist/icons/generated/ZigzagJpn16.d.ts +0 -1
  168. package/dist/icons/generated/ZigzagKor16.d.ts +0 -1
  169. package/dist/icons/generated/ZigzagWeb16.d.ts +0 -1
  170. package/dist/icons/generated/Zoomin16.d.ts +0 -1
  171. package/dist/icons/generated/index.d.ts +0 -1
  172. package/dist/images/generated/KakaostyleBlk.d.ts +0 -1
  173. package/dist/images/generated/KakaostyleOri.d.ts +0 -1
  174. package/dist/images/generated/KakaostyleWh.d.ts +0 -1
  175. package/dist/images/generated/Npay.d.ts +0 -1
  176. package/dist/images/generated/PartnerCenterBlk.d.ts +0 -1
  177. package/dist/images/generated/PartnerCenterOri.d.ts +0 -1
  178. package/dist/images/generated/PartnerCenterWh.d.ts +0 -1
  179. package/dist/images/generated/PartnerLoungeBlk.d.ts +0 -1
  180. package/dist/images/generated/PartnerLoungeOri.d.ts +0 -1
  181. package/dist/images/generated/PartnerLoungeWh.d.ts +0 -1
  182. package/dist/images/generated/PostyOri.d.ts +0 -1
  183. package/dist/images/generated/PostyWh.d.ts +0 -1
  184. package/dist/images/generated/ZdeliveryOne.d.ts +0 -1
  185. package/dist/images/generated/ZdeliveryTwo.d.ts +0 -1
  186. package/dist/images/generated/ZexpressBasicGlobal.d.ts +0 -1
  187. package/dist/images/generated/ZexpressBasicKor.d.ts +0 -1
  188. package/dist/images/generated/ZexpressSimpleGlobal.d.ts +0 -1
  189. package/dist/images/generated/ZexpressSimpleKor.d.ts +0 -1
  190. package/dist/images/generated/ZexpressSymbolGlobal.d.ts +0 -1
  191. package/dist/images/generated/ZexpressSymbolKor.d.ts +0 -1
  192. package/dist/images/generated/ZexpressTextGlobal.d.ts +0 -1
  193. package/dist/images/generated/ZexpressTextKor.d.ts +0 -1
  194. package/dist/images/generated/ZigzagBiBasic.d.ts +0 -1
  195. package/dist/images/generated/ZigzagBiSymbol.d.ts +0 -1
  196. package/dist/images/generated/ZigzagSymbolCircle.d.ts +0 -1
  197. package/dist/images/generated/ZigzagSymbolRounded.d.ts +0 -1
  198. package/dist/images/generated/Zpay.d.ts +0 -1
  199. package/dist/images/generated/index.d.ts +0 -1
  200. package/dist/index.d.ts +2 -3
  201. package/dist/index.es.js +2 -2
  202. package/dist/index.es.js.map +1 -1
  203. package/dist/index.js +2 -2
  204. package/dist/index.js.map +1 -1
  205. package/dist/radio/Radio.d.ts +5 -0
  206. package/dist/radio/Radio.stories.d.ts +2 -4
  207. package/dist/radio/RadioGroup.d.ts +8 -1
  208. package/dist/radio/RadioGroup.stories.d.ts +5 -6
  209. package/dist/radio/styles.d.ts +12 -0
  210. package/dist/stack/HStack.d.ts +0 -1
  211. package/dist/stack/HStack.stories.d.ts +5 -7
  212. package/dist/stack/VStack.d.ts +0 -1
  213. package/dist/stack/VStack.stories.d.ts +5 -7
  214. package/dist/stack/types.d.ts +0 -1
  215. package/dist/stories/Box.d.ts +0 -1
  216. package/dist/switch/Switch.d.ts +21 -0
  217. package/dist/switch/Switch.stories.d.ts +5 -0
  218. package/dist/switch/index.d.ts +1 -0
  219. package/dist/switch/styles.d.ts +4 -0
  220. package/dist/text/BaseText.d.ts +0 -1
  221. package/dist/text/BaseText.stories.d.ts +2 -5
  222. package/dist/utils/shared.d.ts +3 -0
  223. package/package.json +1 -1
  224. package/dist/input/Input.d.ts +0 -9
  225. package/dist/input/Input.stories.d.ts +0 -12
  226. package/dist/input/InputAddon.d.ts +0 -10
  227. package/dist/input/NumericInput.d.ts +0 -20
  228. package/dist/input/NumericInput.stories.d.ts +0 -23
  229. package/dist/input/index.d.ts +0 -2
  230. package/dist/input/styles.d.ts +0 -16
  231. package/dist/textarea/Textarea.d.ts +0 -6
  232. package/dist/textarea/Textarea.stories.d.ts +0 -11
  233. package/dist/textarea/index.d.ts +0 -1
  234. package/dist/toggle-switch/ToggleSwitch.d.ts +0 -22
  235. package/dist/toggle-switch/ToggleSwitch.stories.d.ts +0 -8
  236. package/dist/toggle-switch/index.d.ts +0 -1
  237. package/dist/toggle-switch/styles.d.ts +0 -4
@@ -1,9 +1,14 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
+ import { RadioItemType } from './RadioGroup';
2
3
  export interface RadioProps extends Exclude<InputHTMLAttributes<HTMLInputElement>, 'type'> {
3
4
  /**
4
5
  * @default false
5
6
  */
6
7
  fill?: boolean;
7
8
  className?: string;
9
+ /**
10
+ * @default default
11
+ */
12
+ radioItemType?: RadioItemType;
8
13
  }
9
14
  export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: React.ForwardRefExoticComponent<import("./Radio").RadioProps & React.RefAttributes<HTMLInputElement>>;
5
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Radio").RadioProps & React.RefAttributes<HTMLInputElement>>>;
6
4
  export default _default;
7
5
  export declare const Base: any;
8
6
  export declare const Checked: any;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- declare type AlignType = 'horizontal' | 'vertical';
2
+ export declare type AlignType = 'horizontal' | 'vertical';
3
+ export declare type RadioItemType = 'default' | 'box';
3
4
  interface RadioItem<RadioValue> {
4
5
  label: React.ReactNode;
5
6
  value: RadioValue;
@@ -11,9 +12,15 @@ export interface RadioGroupProps<RadioValue> {
11
12
  value?: RadioValue;
12
13
  name?: string;
13
14
  items: RadioItem<RadioValue>[];
15
+ /**
16
+ * @default 24
17
+ * radioItmType - 'box': spacing 속성 미적용
18
+ */
14
19
  spacing?: number;
15
20
  disabled?: boolean;
16
21
  align?: AlignType;
22
+ radioItemType?: RadioItemType;
23
+ keyExtractor?: (item: RadioItem<RadioValue>, index: number) => string | number;
17
24
  onChange?: (value: RadioValue) => void;
18
25
  }
19
26
  export interface RadioGroupInstance<RadioValue> {
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: <RadioValue>(props: import("./RadioGroup").RadioGroupProps<RadioValue> & {
5
- ref?: React.Ref<import("./RadioGroup").RadioGroupInstance<RadioValue>>;
6
- }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
7
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<(<RadioValue>(props: import("./RadioGroup").RadioGroupProps<RadioValue> & {
4
+ ref?: React.Ref<import("./RadioGroup").RadioGroupInstance<RadioValue>>;
5
+ }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>)>;
8
6
  export default _default;
9
7
  export declare const Base: any;
10
8
  export declare const Spacing: any;
11
9
  export declare const Disabled: any;
12
10
  export declare const VerticalAlign: any;
13
11
  export declare const Controlled: () => JSX.Element;
12
+ export declare const BoxRadio: () => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { RadioItemType, AlignType } from './RadioGroup';
2
+ export declare const getRadioGroupStyleByProps: ({ radio_item_type, align, spacing, }: {
3
+ radio_item_type?: RadioItemType;
4
+ align?: AlignType;
5
+ spacing?: Number;
6
+ }) => import("@emotion/utils").SerializedStyles;
7
+ export declare const getRadioStyleByProps: ({ radio_item_type, fill, disabled, checked, }: {
8
+ radio_item_type?: RadioItemType;
9
+ fill?: boolean;
10
+ disabled?: boolean;
11
+ checked?: boolean;
12
+ }) => import("@emotion/utils").SerializedStyles;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StackProps } from './types';
3
2
  declare type VerticalAlignment = 'stretch' | 'top' | 'bottom' | 'center';
4
3
  export interface HStackProps extends StackProps {
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: import("@emotion/styled").StyledComponent<{
5
- theme?: import("@emotion/react").Theme;
6
- as?: React.ElementType<any>;
7
- } & import("./HStack").HStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme;
5
+ as?: React.ElementType<any>;
6
+ } & import("./HStack").HStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>>;
9
7
  export default _default;
10
8
  export declare const Base: any;
11
9
  export declare const Spacing: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StackProps } from './types';
3
2
  declare type HorizontalAlignment = 'stretch' | 'leading' | 'trailing' | 'center';
4
3
  export interface VStackProps extends StackProps {
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: import("@emotion/styled").StyledComponent<{
5
- theme?: import("@emotion/react").Theme;
6
- as?: React.ElementType<any>;
7
- } & import("./VStack").VStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme;
5
+ as?: React.ElementType<any>;
6
+ } & import("./VStack").VStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>>;
9
7
  export default _default;
10
8
  export declare const Base: any;
11
9
  export declare const Spacing: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SizeProps, SpaceProps } from '../styles';
3
2
  import { CSSValueWithLength } from '../styles/buildCSSWithLength';
4
3
  export declare type StackAlignment = 'stretch' | 'flex-start' | 'center' | 'flex-end';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Box: import("@emotion/styled").StyledComponent<{
3
2
  theme?: import("@emotion/react").Theme;
4
3
  as?: import("react").ElementType<any>;
@@ -0,0 +1,21 @@
1
+ import React, { ButtonHTMLAttributes } from 'react';
2
+ export declare type SwitchSize = 'small' | 'large';
3
+ export interface SwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ /**
5
+ * @default true
6
+ */
7
+ isOn?: boolean;
8
+ /**
9
+ * @default small
10
+ */
11
+ size?: SwitchSize;
12
+ /**
13
+ * @default ON
14
+ */
15
+ onText?: string;
16
+ /**
17
+ * @default OFF
18
+ */
19
+ offText?: string;
20
+ }
21
+ export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Switch").SwitchProps & React.RefAttributes<HTMLButtonElement>>>;
4
+ export default _default;
5
+ export declare const Base: any;
@@ -0,0 +1 @@
1
+ export * from './Switch';
@@ -0,0 +1,4 @@
1
+ import { SwitchSize } from './Switch';
2
+ export declare const switch_base_css: import("@emotion/utils").SerializedStyles;
3
+ export declare const getStylesByActive: (isOn: boolean) => import("@emotion/utils").SerializedStyles;
4
+ export declare const getStyleByProps: (size: SwitchSize, isOn: boolean) => import("@emotion/utils").SerializedStyles;
@@ -1,4 +1,3 @@
1
- /// <reference types="@emotion/react/types/css-prop" />
2
1
  import React from 'react';
3
2
  import { Typography } from '../foundation';
4
3
  declare type Alignment = 'center' | 'leading' | 'trailing';
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
- import { BaseTextProps } from './BaseText';
3
- declare const _default: {
4
- title: string;
5
- component: React.FC<BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)>;
6
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./BaseText").BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)>>;
7
4
  export default _default;
8
5
  export declare const Base: any;
9
6
  export declare const Alignment: any;
@@ -0,0 +1,3 @@
1
+ export declare function getKeyFromItem<Item extends {
2
+ value: unknown;
3
+ }>(item: Item, index: number): string | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croquiscom/pds",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Design system for Zigzag's Partner Center",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.es.js",
@@ -1,9 +0,0 @@
1
- import React, { InputHTMLAttributes } from 'react';
2
- import { CSSValueWithLength } from '../styles/buildCSSWithLength';
3
- export declare type InputAlignment = 'left' | 'center' | 'right';
4
- export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5
- alignment?: InputAlignment;
6
- error?: boolean;
7
- width?: CSSValueWithLength;
8
- }
9
- export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from './Input';
3
- declare const _default: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
6
- };
7
- export default _default;
8
- export declare const Base: any;
9
- export declare const Error: any;
10
- export declare const Disabled: any;
11
- export declare const EnteredDisabled: any;
12
- export declare const RightAlignment: any;
@@ -1,10 +0,0 @@
1
- import React, { AllHTMLAttributes } from 'react';
2
- export interface InputProps extends AllHTMLAttributes<HTMLDivElement> {
3
- disabled?: boolean;
4
- error?: boolean;
5
- /**
6
- * @default left
7
- */
8
- position: 'left' | 'right';
9
- }
10
- export declare const InputAddon: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,20 +0,0 @@
1
- import React, { ChangeEvent, InputHTMLAttributes } from 'react';
2
- import { CSSValueWithLength } from '../styles/buildCSSWithLength';
3
- import { InputAlignment } from './Input';
4
- export interface NumericInputBaseType {
5
- value?: number | string | null;
6
- defaultValue?: number | string;
7
- alignment?: InputAlignment;
8
- error?: boolean;
9
- prefix?: string;
10
- suffix?: string;
11
- /**
12
- * @default true
13
- */
14
- allowNegative?: boolean;
15
- decimalScale?: number;
16
- width?: CSSValueWithLength;
17
- onChange?: (value: number, event: ChangeEvent<HTMLInputElement>) => void;
18
- }
19
- export declare type NumericInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'width'> & NumericInputBaseType;
20
- export declare const NumericInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { NumericInputProps } from './NumericInput';
3
- declare const _default: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & import("./NumericInput").NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
6
- };
7
- export default _default;
8
- export declare const Base: any;
9
- export declare const Addon: any;
10
- export declare const Error: any;
11
- export declare const Disabled: any;
12
- export declare const WhetherNegativeNumbersAreAllowed: any;
13
- export declare const DecimalScale: any;
14
- export declare const EnteredDisabled: any;
15
- export declare const RightAlignment: any;
16
- export declare const SetValueWithName: {
17
- (args: NumericInputProps): JSX.Element;
18
- args: {
19
- prefix: string;
20
- suffix: string;
21
- placeholder: string;
22
- };
23
- };
@@ -1,2 +0,0 @@
1
- export * from './Input';
2
- export * from './NumericInput';
@@ -1,16 +0,0 @@
1
- export declare const input_base_css: import("@emotion/utils").SerializedStyles;
2
- export declare const input_default_style: {
3
- backgroundColor: string;
4
- border: string;
5
- color: string;
6
- };
7
- export declare const input_error_style: {
8
- border: string;
9
- '&:focus': {
10
- border: string;
11
- };
12
- };
13
- export declare const input_disabled_style: {
14
- backgroundColor: string;
15
- color: string;
16
- };
@@ -1,6 +0,0 @@
1
- import React, { TextareaHTMLAttributes } from 'react';
2
- import { SizeProps } from '../styles';
3
- export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, SizeProps {
4
- error?: boolean;
5
- }
6
- export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { TextareaProps } from './Textarea';
3
- declare const _default: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
6
- };
7
- export default _default;
8
- export declare const Base: any;
9
- export declare const Error: any;
10
- export declare const Disabled: any;
11
- export declare const EnteredDisabled: any;
@@ -1 +0,0 @@
1
- export * from './Textarea';
@@ -1,22 +0,0 @@
1
- import React, { ButtonHTMLAttributes } from 'react';
2
- export declare type ToggleSwitchSize = 'small' | 'large';
3
- export interface ToggleSwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
- /**
5
- * @default true
6
- */
7
- isOn?: boolean;
8
- /**
9
- * @default small
10
- */
11
- size?: ToggleSwitchSize;
12
- /**
13
- * @default ON
14
- */
15
- onText?: string;
16
- /**
17
- * @default OFF
18
- */
19
- offText?: string;
20
- }
21
- export declare const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLButtonElement>>;
22
- export default ToggleSwitch;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { ToggleSwitchProps } from './ToggleSwitch';
3
- declare const _default: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLButtonElement>>;
6
- };
7
- export default _default;
8
- export declare const Base: any;
@@ -1 +0,0 @@
1
- export * from './ToggleSwitch';
@@ -1,4 +0,0 @@
1
- import { ToggleSwitchSize } from './ToggleSwitch';
2
- export declare const toggle_switch_base_css: import("@emotion/utils").SerializedStyles;
3
- export declare const getStylesByActive: (isOn: boolean) => import("@emotion/utils").SerializedStyles;
4
- export declare const getStyleByProps: (size: ToggleSwitchSize, isOn: boolean) => import("@emotion/utils").SerializedStyles;