@peculiar/react-components 0.0.2-alpha.302 → 0.0.2-alpha.309

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 (162) hide show
  1. package/dist/cjs/Autocomplete/autocomplete.js +1 -3
  2. package/dist/cjs/Autocomplete/autocomplete.js.map +1 -1
  3. package/dist/cjs/Box/box.js +11 -5
  4. package/dist/cjs/Box/box.js.map +1 -1
  5. package/dist/cjs/Box/index.js.map +1 -1
  6. package/dist/cjs/Button/button.js +10 -2
  7. package/dist/cjs/Button/button.js.map +1 -1
  8. package/dist/cjs/Button/index.js.map +1 -1
  9. package/dist/cjs/ButtonBase/button_base.js +13 -8
  10. package/dist/cjs/ButtonBase/button_base.js.map +1 -1
  11. package/dist/cjs/ButtonBase/index.js.map +1 -1
  12. package/dist/cjs/Chip/chip.js +2 -3
  13. package/dist/cjs/Chip/chip.js.map +1 -1
  14. package/dist/cjs/Chip/index.js.map +1 -1
  15. package/dist/cjs/Dialog/dialog.js +1 -3
  16. package/dist/cjs/Dialog/dialog.js.map +1 -1
  17. package/dist/cjs/Fab/fab.js +9 -2
  18. package/dist/cjs/Fab/fab.js.map +1 -1
  19. package/dist/cjs/Fab/index.js.map +1 -1
  20. package/dist/cjs/IconButton/icon_button.js +10 -2
  21. package/dist/cjs/IconButton/icon_button.js.map +1 -1
  22. package/dist/cjs/IconButton/index.js.map +1 -1
  23. package/dist/cjs/Skeleton/index.js.map +1 -1
  24. package/dist/cjs/Skeleton/skeleton.js +5 -2
  25. package/dist/cjs/Skeleton/skeleton.js.map +1 -1
  26. package/dist/cjs/Tabs/index.js.map +1 -1
  27. package/dist/cjs/Tabs/tab.js +12 -4
  28. package/dist/cjs/Tabs/tab.js.map +1 -1
  29. package/dist/cjs/Tabs/tabs.js.map +1 -1
  30. package/dist/cjs/Typography/index.js.map +1 -1
  31. package/dist/cjs/Typography/typography.js +27 -14
  32. package/dist/cjs/Typography/typography.js.map +1 -1
  33. package/dist/cjs/index.js +1 -0
  34. package/dist/cjs/index.js.map +1 -1
  35. package/dist/esm/Autocomplete/autocomplete.js +1 -3
  36. package/dist/esm/Autocomplete/autocomplete.js.map +1 -1
  37. package/dist/esm/Box/box.js +11 -5
  38. package/dist/esm/Box/box.js.map +1 -1
  39. package/dist/esm/Box/index.js +1 -1
  40. package/dist/esm/Box/index.js.map +1 -1
  41. package/dist/esm/Button/button.js +10 -2
  42. package/dist/esm/Button/button.js.map +1 -1
  43. package/dist/esm/Button/index.js +1 -1
  44. package/dist/esm/Button/index.js.map +1 -1
  45. package/dist/esm/ButtonBase/button_base.js +13 -8
  46. package/dist/esm/ButtonBase/button_base.js.map +1 -1
  47. package/dist/esm/ButtonBase/index.js +1 -1
  48. package/dist/esm/ButtonBase/index.js.map +1 -1
  49. package/dist/esm/Chip/chip.js +2 -3
  50. package/dist/esm/Chip/chip.js.map +1 -1
  51. package/dist/esm/Chip/index.js +1 -1
  52. package/dist/esm/Chip/index.js.map +1 -1
  53. package/dist/esm/Dialog/dialog.js +1 -3
  54. package/dist/esm/Dialog/dialog.js.map +1 -1
  55. package/dist/esm/Fab/fab.js +9 -2
  56. package/dist/esm/Fab/fab.js.map +1 -1
  57. package/dist/esm/Fab/index.js +1 -1
  58. package/dist/esm/Fab/index.js.map +1 -1
  59. package/dist/esm/IconButton/icon_button.js +10 -2
  60. package/dist/esm/IconButton/icon_button.js.map +1 -1
  61. package/dist/esm/IconButton/index.js +1 -1
  62. package/dist/esm/IconButton/index.js.map +1 -1
  63. package/dist/esm/Skeleton/index.js +1 -1
  64. package/dist/esm/Skeleton/index.js.map +1 -1
  65. package/dist/esm/Skeleton/skeleton.js +5 -2
  66. package/dist/esm/Skeleton/skeleton.js.map +1 -1
  67. package/dist/esm/Tabs/index.js +1 -1
  68. package/dist/esm/Tabs/index.js.map +1 -1
  69. package/dist/esm/Tabs/tab.js +12 -4
  70. package/dist/esm/Tabs/tab.js.map +1 -1
  71. package/dist/esm/Tabs/tabs.js.map +1 -1
  72. package/dist/esm/Typography/index.js +1 -1
  73. package/dist/esm/Typography/index.js.map +1 -1
  74. package/dist/esm/Typography/typography.js +27 -14
  75. package/dist/esm/Typography/typography.js.map +1 -1
  76. package/dist/esm/index.js +1 -0
  77. package/dist/esm/index.js.map +1 -1
  78. package/dist/esnext/Autocomplete/autocomplete.js +1 -3
  79. package/dist/esnext/Autocomplete/autocomplete.js.map +1 -1
  80. package/dist/esnext/Box/box.js +11 -5
  81. package/dist/esnext/Box/box.js.map +1 -1
  82. package/dist/esnext/Box/index.js +1 -1
  83. package/dist/esnext/Box/index.js.map +1 -1
  84. package/dist/esnext/Button/button.js +10 -2
  85. package/dist/esnext/Button/button.js.map +1 -1
  86. package/dist/esnext/Button/index.js +1 -1
  87. package/dist/esnext/Button/index.js.map +1 -1
  88. package/dist/esnext/ButtonBase/button_base.js +13 -8
  89. package/dist/esnext/ButtonBase/button_base.js.map +1 -1
  90. package/dist/esnext/ButtonBase/index.js +1 -1
  91. package/dist/esnext/ButtonBase/index.js.map +1 -1
  92. package/dist/esnext/Chip/chip.js +2 -3
  93. package/dist/esnext/Chip/chip.js.map +1 -1
  94. package/dist/esnext/Chip/index.js +1 -1
  95. package/dist/esnext/Chip/index.js.map +1 -1
  96. package/dist/esnext/Dialog/dialog.js +1 -3
  97. package/dist/esnext/Dialog/dialog.js.map +1 -1
  98. package/dist/esnext/Fab/fab.js +9 -2
  99. package/dist/esnext/Fab/fab.js.map +1 -1
  100. package/dist/esnext/Fab/index.js +1 -1
  101. package/dist/esnext/Fab/index.js.map +1 -1
  102. package/dist/esnext/IconButton/icon_button.js +10 -2
  103. package/dist/esnext/IconButton/icon_button.js.map +1 -1
  104. package/dist/esnext/IconButton/index.js +1 -1
  105. package/dist/esnext/IconButton/index.js.map +1 -1
  106. package/dist/esnext/Skeleton/index.js +1 -1
  107. package/dist/esnext/Skeleton/index.js.map +1 -1
  108. package/dist/esnext/Skeleton/skeleton.js +5 -2
  109. package/dist/esnext/Skeleton/skeleton.js.map +1 -1
  110. package/dist/esnext/Tabs/index.js +1 -1
  111. package/dist/esnext/Tabs/index.js.map +1 -1
  112. package/dist/esnext/Tabs/tab.js +12 -4
  113. package/dist/esnext/Tabs/tab.js.map +1 -1
  114. package/dist/esnext/Tabs/tabs.js.map +1 -1
  115. package/dist/esnext/Typography/index.js +1 -1
  116. package/dist/esnext/Typography/index.js.map +1 -1
  117. package/dist/esnext/Typography/typography.js +27 -14
  118. package/dist/esnext/Typography/typography.js.map +1 -1
  119. package/dist/esnext/index.js +1 -0
  120. package/dist/esnext/index.js.map +1 -1
  121. package/dist/types/Box/box.d.ts +16 -12
  122. package/dist/types/Box/index.d.ts +1 -1
  123. package/dist/types/Button/button.d.ts +17 -3
  124. package/dist/types/Button/index.d.ts +1 -1
  125. package/dist/types/ButtonBase/button_base.d.ts +16 -7
  126. package/dist/types/ButtonBase/index.d.ts +1 -1
  127. package/dist/types/Chip/chip.d.ts +10 -12
  128. package/dist/types/Chip/index.d.ts +1 -1
  129. package/dist/types/Fab/fab.d.ts +17 -4
  130. package/dist/types/Fab/index.d.ts +1 -1
  131. package/dist/types/IconButton/icon_button.d.ts +18 -4
  132. package/dist/types/IconButton/index.d.ts +1 -1
  133. package/dist/types/Skeleton/index.d.ts +1 -1
  134. package/dist/types/Skeleton/skeleton.d.ts +13 -7
  135. package/dist/types/Tabs/index.d.ts +1 -1
  136. package/dist/types/Tabs/tab.d.ts +17 -13
  137. package/dist/types/Tabs/tabs.d.ts +2 -2
  138. package/dist/types/Typography/index.d.ts +1 -1
  139. package/dist/types/Typography/typography.d.ts +13 -12
  140. package/dist/types/index.d.ts +1 -0
  141. package/package.json +10 -10
  142. package/dist/cjs/system/forward_ref.js +0 -13
  143. package/dist/cjs/system/forward_ref.js.map +0 -1
  144. package/dist/cjs/system/index.js +0 -6
  145. package/dist/cjs/system/index.js.map +0 -1
  146. package/dist/cjs/system/system_types.js +0 -3
  147. package/dist/cjs/system/system_types.js.map +0 -1
  148. package/dist/esm/system/forward_ref.js +0 -9
  149. package/dist/esm/system/forward_ref.js.map +0 -1
  150. package/dist/esm/system/index.js +0 -2
  151. package/dist/esm/system/index.js.map +0 -1
  152. package/dist/esm/system/system_types.js +0 -2
  153. package/dist/esm/system/system_types.js.map +0 -1
  154. package/dist/esnext/system/forward_ref.js +0 -9
  155. package/dist/esnext/system/forward_ref.js.map +0 -1
  156. package/dist/esnext/system/index.js +0 -2
  157. package/dist/esnext/system/index.js.map +0 -1
  158. package/dist/esnext/system/system_types.js +0 -2
  159. package/dist/esnext/system/system_types.js.map +0 -1
  160. package/dist/types/system/forward_ref.d.ts +0 -9
  161. package/dist/types/system/index.d.ts +0 -1
  162. package/dist/types/system/system_types.d.ts +0 -24
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/Skeleton/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,GAAG,EACH,EAAE,EACF,SAAS,GAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AA4B7B;;GAEG;AACH,MAAM,aAAa,GAAG,SAAS,CAAA;;;;;;;;;;CAU9B,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,GAAG,CAAC;IAC3C,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,GAAG,aAAa,iCAAiC;IAC5D,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,IAAI;QAC9B,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;QACf,MAAM,EAAE,MAAM;QACd,eAAe,EAAE,OAAO;QACxB,SAAS,EAAE,gBAAgB;QAC3B,YAAY,EAAE,KAAK;QACnB,gBAAgB,EAAE;YAChB,OAAO,EAAE,UAAU;SACpB;KACF,CAAC;IACF,GAAG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AK,IAAI;QACjB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;CACH,CAAC,CAAC;AACH;;GAEG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAqB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1E,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,GAAG,IACF,GAAG,EAAE,GAAqB,EAC1B,SAAS,EAAE,EAAE,CAAC;YACZ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI;YACzB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS;SACzB,CAAC,KACE,KAAK,IAER,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAA0C,CAAC;AAE5C,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,QAAQ,CAAC,YAAY,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;CACrB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { Tabs } from './tabs';
2
- export { Tab } from './tab';
2
+ export { Tab, } from './tab';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,GAAG,GAGJ,MAAM,OAAO,CAAC"}
@@ -1,6 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { css, cx } from '../styles';
3
3
  import { Typography } from '../Typography';
4
+ /**
5
+ *
6
+ */
7
+ /**
8
+ * Styles.
9
+ */
4
10
  const stylesBase = () => css({
5
11
  label: 'Tab',
6
12
  fontFamily: 'inherit',
@@ -36,11 +42,14 @@ const stylesBase = () => css({
36
42
  },
37
43
  },
38
44
  });
45
+ /**
46
+ *
47
+ */
39
48
  export const Tab = React.forwardRef((props, ref) => {
40
- const { children, className, disabled, id,
49
+ const { children, className, disabled, id, color = 'black', component, onChange,
41
50
  // @ts-ignore
42
- selected, color = 'black', component: componentProp, onChange, ...other } = props;
43
- const Component = componentProp || 'button';
51
+ selected, ...other } = props;
52
+ const Component = component || 'button';
44
53
  const textColor = React.useMemo(() => {
45
54
  if (disabled) {
46
55
  return 'gray-7';
@@ -70,7 +79,6 @@ export const Tab = React.forwardRef((props, ref) => {
70
79
  Tab.displayName = 'Tab';
71
80
  Tab.defaultProps = {
72
81
  disabled: false,
73
- component: 'button',
74
82
  color: 'black',
75
83
  };
76
84
  //# sourceMappingURL=tab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab.js","sourceRoot":"","sources":["../../../src/Tabs/tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,EAAE,EAAa,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAoC3C,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC;IAC3B,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,YAAY;IACvB,MAAM,EAAE,CAAC;IACT,YAAY,EAAE,uBAAuB;IACrC,SAAS,EAAE,wBAAwB;IACnC,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,yBAAyB;IAClC,eAAe,EAAE,aAAa;IAC9B,UAAU,EAAE,yDAAyD;IACrE,OAAO,EAA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,CAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7E,MAAM,EACJ,QAAQ,EAAE,YAAY,EACtB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CACjC,YAAY,EACZ,CAAC,KAA+C,EAAE,EAAE;QAClD,IAAI,CAAC,KAAK,CAAC,cAAc,CAAa,KAAK,CAAC,EAAE;YAC5C,OAAO,IAAI,CAAC;SACb;QAED,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE;YACpC,OAAO,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YAEzF,OAAO,IAAI,CAAC;SACb;QAED,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,UAAU,KAAK,KAAK,CAAC;QAEtC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/B,aAAa;YACb,QAAQ;YACR,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,CACF,CAAC;IAEF,OAAO,CACL,gCACM,KAAK,EACT,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,EAAE,CAAC;YACZ,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI;YACpB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS;SACzB,CAAC,IAED,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export { Typography } from './typography';
1
+ export { Typography, } from './typography';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwC,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,GAGX,MAAM,cAAc,CAAC"}
@@ -1,5 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { css, cx, } from '../styles';
3
+ /**
4
+ *
5
+ */
6
+ /**
7
+ * Styles.
8
+ */
3
9
  const stylesBase = () => css({
4
10
  label: 'Typography',
5
11
  margin: 0,
@@ -21,21 +27,28 @@ const stylesNoWrap = () => css({
21
27
  whiteSpace: 'nowrap',
22
28
  textOverflow: 'ellipsis',
23
29
  });
30
+ /**
31
+ *
32
+ */
33
+ const variantMapping = {
34
+ h1: 'h1',
35
+ h2: 'h2',
36
+ h3: 'h3',
37
+ h4: 'h4',
38
+ h5: 'h5',
39
+ s1: 'h6',
40
+ s2: 'h6',
41
+ b1: 'p',
42
+ b2: 'p',
43
+ b3: 'p',
44
+ btn1: 'span',
45
+ btn2: 'span',
46
+ c1: 'p',
47
+ c2: 'p',
48
+ };
24
49
  export const Typography = React.forwardRef((props, ref) => {
25
- const { variant, className, color, noWrap, component: componentProp, ...other } = props;
26
- const getTagFromVariantProp = () => {
27
- if (/h/.test(variant)) {
28
- return variant;
29
- }
30
- if (/s/.test(variant)) {
31
- return 'h6';
32
- }
33
- if (/btn/.test(variant)) {
34
- return 'span';
35
- }
36
- return 'p';
37
- };
38
- const Component = componentProp || getTagFromVariantProp();
50
+ const { variant, className, color, noWrap, component, ...other } = props;
51
+ const Component = component || variantMapping[variant] || 'p';
39
52
  return (React.createElement(Component, { ...other, ref: ref, className: cx({
40
53
  [stylesBase()]: true,
41
54
  [stylesVariant(variant)]: !!variant,
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/Typography/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,GAAG,EACH,EAAE,GAGH,MAAM,WAAW,CAAC;AAkCnB,MAAM,UAAU,GAAG,GAAG,EAAE,C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E,CAAC,CAAC,OAAO;YACnC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK;YAC7B,CAAC,YAAY,EAAE,CAAC,EAAE,MAAM;YACxB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS;SACzB,CAAC,GACF,CACH,CAAC;AACJ,CAAC,CAA4C,CAAC;AAE9C,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,UAAU,CAAC,YAAY,GAAG;IACxB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,OAAO;CACf,CAAC"}
@@ -32,4 +32,5 @@ export * from './Tooltip';
32
32
  export * from './Typography';
33
33
  export * from './styles';
34
34
  export * from './hooks';
35
+ export * from './OverridableComponent';
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
@@ -1,25 +1,29 @@
1
1
  import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3
  import { ColorType } from '../styles';
3
- declare type BaseProps = {
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface BoxOwnProps {
4
8
  /**
5
9
  * The content of the component.
6
10
  */
7
11
  children?: React.ReactNode;
8
- /**
9
- * The className of the component.
10
- */
11
- className?: string;
12
- /**
13
- * The component used for the root node.
14
- */
15
- component?: React.ElementType;
16
12
  background?: ColorType;
17
13
  borderColor?: ColorType;
18
14
  borderWidth?: number;
19
15
  borderStyle?: ('solid' | 'dashed');
20
16
  borderPosition?: ('horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left');
21
17
  borderRadius?: number;
22
- 'data-testid'?: string;
18
+ }
19
+ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div'> {
20
+ props: P & BoxOwnProps;
21
+ defaultComponent: D;
22
+ }
23
+ export declare type BoxProps<D extends React.ElementType = BoxTypeMap['defaultComponent']> = OverrideProps<BoxTypeMap<{}, D>, D> & {
24
+ component?: D;
23
25
  };
24
- export declare const Box: React.ForwardRefExoticComponent<BaseProps & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
25
- export {};
26
+ /**
27
+ *
28
+ */
29
+ export declare const Box: OverridableComponent<BoxTypeMap<{}, "div">>;
@@ -1 +1 @@
1
- export { Box } from './box';
1
+ export { Box, BoxOwnProps, BoxProps, } from './box';
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import { ButtonBaseProps } from '../ButtonBase';
3
- export declare type ButtonProps = ButtonBaseProps & {
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
+ import { ButtonBaseOwnProps } from '../ButtonBase';
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface ButtonOwnProps extends ButtonBaseOwnProps {
4
8
  circled?: boolean;
5
9
  /**
6
10
  * Element placed before the children.
@@ -14,5 +18,15 @@ export declare type ButtonProps = ButtonBaseProps & {
14
18
  * Specify if the button doesn't have padding.
15
19
  */
16
20
  withoutPadding?: boolean;
21
+ }
22
+ export interface ButtonTypeMap<P = {}, D extends React.ElementType = 'button'> {
23
+ props: P & ButtonOwnProps;
24
+ defaultComponent: D;
25
+ }
26
+ export declare type ButtonProps<D extends React.ElementType = ButtonTypeMap['defaultComponent']> = OverrideProps<ButtonTypeMap<{}, D>, D> & {
27
+ component?: D;
17
28
  };
18
- export declare const Button: import("../system/system_types").ComponentWithAs<"button", ButtonProps>;
29
+ /**
30
+ *
31
+ */
32
+ export declare const Button: OverridableComponent<ButtonTypeMap<{}, "button">>;
@@ -1 +1 @@
1
- export { Button, ButtonProps } from './button';
1
+ export { Button, ButtonOwnProps, ButtonProps, } from './button';
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3
  import { TypographyType } from '../styles';
3
- export declare type ButtonBaseProps = {
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface ButtonBaseOwnProps {
4
8
  /**
5
9
  * The content of the component.
6
10
  */
@@ -25,10 +29,15 @@ export declare type ButtonBaseProps = {
25
29
  * The size of the button.
26
30
  */
27
31
  size?: ('small' | 'medium' | 'large');
28
- /**
29
- * The className of the component.
30
- */
31
- className?: string;
32
- 'data-testid'?: string;
32
+ }
33
+ export interface ButtonBaseTypeMap<P = {}, D extends React.ElementType = 'button'> {
34
+ props: P & ButtonBaseOwnProps;
35
+ defaultComponent: D;
36
+ }
37
+ export declare type ButtonBaseProps<D extends React.ElementType = ButtonBaseTypeMap['defaultComponent']> = OverrideProps<ButtonBaseTypeMap<{}, D>, D> & {
38
+ component?: D;
33
39
  };
34
- export declare const ButtonBase: import("../system/system_types").ComponentWithAs<"button", ButtonBaseProps>;
40
+ /**
41
+ *
42
+ */
43
+ export declare const ButtonBase: OverridableComponent<ButtonBaseTypeMap<{}, "button">>;
@@ -1 +1 @@
1
- export { ButtonBase, ButtonBaseProps } from './button_base';
1
+ export { ButtonBase, ButtonBaseOwnProps, ButtonBaseProps, } from './button_base';
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3
  /**
3
4
  * Types.
4
5
  */
5
- declare type BaseProps = {
6
+ export interface ChipOwnProps {
6
7
  /**
7
8
  * The content of the component.
8
9
  */
@@ -23,18 +24,10 @@ declare type BaseProps = {
23
24
  * The color of the component.
24
25
  */
25
26
  color?: ('secondary' | 'wrong' | 'default');
26
- /**
27
- * The className of the component.
28
- */
29
- className?: string;
30
27
  /**
31
28
  * Element placed before the children.
32
29
  */
33
30
  startContent?: React.ReactElement;
34
- /**
35
- * The component used for the root node.
36
- */
37
- component?: React.ElementType;
38
31
  /**
39
32
  * Callback function fired when the delete icon is clicked. If set, the delete icon will be shown.
40
33
  */
@@ -43,10 +36,15 @@ declare type BaseProps = {
43
36
  * Callback function fired when the component is clicked. If set, the component will be clickable.
44
37
  */
45
38
  onClick?: React.MouseEventHandler<HTMLElement>;
46
- 'data-testid'?: string;
39
+ }
40
+ export interface ChipTypeMap<P = {}, D extends React.ElementType = 'div'> {
41
+ props: P & ChipOwnProps;
42
+ defaultComponent: D;
43
+ }
44
+ export declare type ChipProps<D extends React.ElementType = ChipTypeMap['defaultComponent']> = OverrideProps<ChipTypeMap<{}, D>, D> & {
45
+ component?: D;
47
46
  };
48
47
  /**
49
48
  *
50
49
  */
51
- export declare const Chip: React.ForwardRefExoticComponent<BaseProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
52
- export {};
50
+ export declare const Chip: OverridableComponent<ChipTypeMap<{}, "div">>;
@@ -1 +1 @@
1
- export { Chip } from './chip';
1
+ export { Chip, ChipOwnProps, ChipProps, } from './chip';
@@ -1,10 +1,23 @@
1
1
  import * as React from 'react';
2
- import { ButtonBaseProps } from '../ButtonBase';
3
- declare type BaseProps = {
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
+ import { ButtonBaseOwnProps } from '../ButtonBase';
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface FabOwnProps extends Omit<ButtonBaseOwnProps, 'size' | 'variant'> {
4
8
  /**
5
9
  * The variant to use.
6
10
  */
7
11
  variant?: ('contained' | 'outlined');
12
+ }
13
+ export interface FabTypeMap<P = {}, D extends React.ElementType = 'button'> {
14
+ props: P & FabOwnProps;
15
+ defaultComponent: D;
16
+ }
17
+ export declare type FabProps<D extends React.ElementType = FabTypeMap['defaultComponent']> = OverrideProps<FabTypeMap<{}, D>, D> & {
18
+ component?: D;
8
19
  };
9
- export declare const Fab: React.ForwardRefExoticComponent<BaseProps & Omit<ButtonBaseProps, "size" | "variant"> & React.RefAttributes<HTMLButtonElement>>;
10
- export {};
20
+ /**
21
+ *
22
+ */
23
+ export declare const Fab: OverridableComponent<FabTypeMap<{}, "button">>;
@@ -1 +1 @@
1
- export { Fab } from './fab';
1
+ export { Fab, FabOwnProps, FabProps, } from './fab';
@@ -1,9 +1,23 @@
1
- import { ButtonProps } from '../Button';
2
- declare type IconButtonProps = Omit<ButtonProps, 'variant' | 'withoutPadding' | 'startIcon' | 'endIcon'> & {
1
+ import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
+ import { ButtonOwnProps } from '../Button';
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface IconButtonOwnProps extends Omit<ButtonOwnProps, 'variant' | 'withoutPadding' | 'startIcon' | 'endIcon'> {
3
8
  /**
4
9
  * The text that applied to `aria-label` attribute and Tooltip content.
5
10
  */
6
11
  title?: string;
12
+ }
13
+ export interface IconButtonTypeMap<P = {}, D extends React.ElementType = 'button'> {
14
+ props: P & IconButtonOwnProps;
15
+ defaultComponent: D;
16
+ }
17
+ export declare type IconButtonProps<D extends React.ElementType = IconButtonTypeMap['defaultComponent']> = OverrideProps<IconButtonTypeMap<{}, D>, D> & {
18
+ component?: D;
7
19
  };
8
- export declare const IconButton: import("../system/system_types").ComponentWithAs<"button", IconButtonProps>;
9
- export {};
20
+ /**
21
+ *
22
+ */
23
+ export declare const IconButton: OverridableComponent<IconButtonTypeMap<{}, "button">>;
@@ -1 +1 @@
1
- export { IconButton } from './icon_button';
1
+ export { IconButton, IconButtonOwnProps, IconButtonProps, } from './icon_button';
@@ -1 +1 @@
1
- export { Skeleton } from './skeleton';
1
+ export { Skeleton, SkeletonOwnProps, SkeletonProps, } from './skeleton';
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3
  import { ColorType } from '../styles';
3
- declare type BaseProps = {
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface SkeletonOwnProps {
4
8
  /**
5
9
  * Optional children to infer width and height from.
6
10
  */
@@ -17,14 +21,16 @@ declare type BaseProps = {
17
21
  * The type of content that will be rendered.
18
22
  */
19
23
  variant?: ('text' | 'rect' | 'circle');
20
- /**
21
- * The className of the component.
22
- */
23
- className?: string;
24
24
  background?: ColorType;
25
+ }
26
+ export interface SkeletonTypeMap<P = {}, D extends React.ElementType = 'span'> {
27
+ props: P & SkeletonOwnProps;
28
+ defaultComponent: D;
29
+ }
30
+ export declare type SkeletonProps<D extends React.ElementType = SkeletonTypeMap['defaultComponent']> = OverrideProps<SkeletonTypeMap<{}, D>, D> & {
31
+ component?: D;
25
32
  };
26
33
  /**
27
34
  *
28
35
  */
29
- export declare const Skeleton: React.ForwardRefExoticComponent<BaseProps & Omit<React.HTMLAttributes<HTMLSpanElement>, "height" | "width" | "children"> & React.RefAttributes<HTMLSpanElement>>;
30
- export {};
36
+ export declare const Skeleton: OverridableComponent<SkeletonTypeMap<{}, "span">>;
@@ -1,2 +1,2 @@
1
1
  export { Tabs } from './tabs';
2
- export { Tab } from './tab';
2
+ export { Tab, TabOwnProps, TabProps, } from './tab';
@@ -1,5 +1,9 @@
1
1
  import * as React from 'react';
2
- declare type BaseProps = {
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
+ /**
4
+ * Types.
5
+ */
6
+ export interface TabOwnProps {
3
7
  /**
4
8
  * The content of the component.
5
9
  */
@@ -8,10 +12,6 @@ declare type BaseProps = {
8
12
  * Unique identifier used to control which tab is selected.
9
13
  */
10
14
  id: string;
11
- /**
12
- * The className of the component.
13
- */
14
- className?: string;
15
15
  /**
16
16
  * If `true`, the tab will be disabled.
17
17
  */
@@ -20,16 +20,20 @@ declare type BaseProps = {
20
20
  * The color of the component.
21
21
  */
22
22
  color?: ('black' | 'white');
23
- /**
24
- * The component used for the root node.
25
- */
26
- component?: React.ElementType;
27
23
  /**
28
24
  * Callback fired when the value changes.
29
25
  */
30
26
  onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, value: string) => void;
31
- 'data-testid'?: string;
27
+ onClick?: never;
28
+ }
29
+ export interface TabTypeMap<P = {}, D extends React.ElementType = 'button'> {
30
+ props: P & TabOwnProps;
31
+ defaultComponent: D;
32
+ }
33
+ export declare type TabProps<D extends React.ElementType = TabTypeMap['defaultComponent']> = OverrideProps<TabTypeMap<{}, D>, D> & {
34
+ component?: D;
32
35
  };
33
- export declare type TabBaseProps = BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onChange'>;
34
- export declare const Tab: React.ForwardRefExoticComponent<BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "onClick"> & React.RefAttributes<HTMLButtonElement>>;
35
- export {};
36
+ /**
37
+ *
38
+ */
39
+ export declare const Tab: OverridableComponent<TabTypeMap<{}, "button">>;
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import { Tab, TabBaseProps } from './tab';
2
+ import { Tab, TabProps } from './tab';
3
3
  declare type BaseProps = {
4
4
  /**
5
5
  * The content of the component.
6
6
  */
7
- children: React.ReactElement<TabBaseProps, typeof Tab>[];
7
+ children: React.ReactElement<TabProps, typeof Tab>[];
8
8
  /**
9
9
  * The value of the currently selected `Tab`.
10
10
  */
@@ -1 +1 @@
1
- export { Typography, TypographyBaseProps, TypographyProps } from './typography';
1
+ export { Typography, TypographyOwnProps, TypographyProps, } from './typography';
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3
  import { ColorType, TypographyType } from '../styles';
3
- export declare type TypographyBaseProps = {
4
+ /**
5
+ * Types.
6
+ */
7
+ export interface TypographyOwnProps {
4
8
  /**
5
9
  * The content of the component.
6
10
  */
@@ -13,21 +17,18 @@ export declare type TypographyBaseProps = {
13
17
  * The color of the component.
14
18
  */
15
19
  color?: ColorType | 'inherit';
16
- /**
17
- * The className of the component.
18
- */
19
- className?: string;
20
20
  /**
21
21
  * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
22
22
  * Note that text overflow can only happen with block or inline-block level elements
23
23
  * (the element needs to have a width in order to overflow).
24
24
  */
25
25
  noWrap?: boolean;
26
- /**
27
- * The component used for the root node.
28
- */
29
- component?: React.ElementType;
30
- 'data-testid'?: string;
26
+ }
27
+ export interface TypographyTypeMap<P = {}, D extends React.ElementType = 'p'> {
28
+ props: P & TypographyOwnProps;
29
+ defaultComponent: D;
30
+ }
31
+ export declare type TypographyProps<D extends React.ElementType = TypographyTypeMap['defaultComponent']> = OverrideProps<TypographyTypeMap<{}, D>, D> & {
32
+ component?: D;
31
33
  };
32
- export declare type TypographyProps = TypographyBaseProps & React.HTMLAttributes<HTMLElement>;
33
- export declare const Typography: React.ForwardRefExoticComponent<TypographyBaseProps & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
34
+ export declare const Typography: OverridableComponent<TypographyTypeMap<{}, "p">>;
@@ -32,3 +32,4 @@ export * from './Tooltip';
32
32
  export * from './Typography';
33
33
  export * from './styles';
34
34
  export * from './hooks';
35
+ export * from './OverridableComponent';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peculiar/react-components",
3
3
  "private": false,
4
- "version": "0.0.2-alpha.302+411eec8",
4
+ "version": "0.0.2-alpha.309+0c1c87c",
5
5
  "author": "PeculiarVentures Team",
6
6
  "description": "A simple and customizable component library to build faster, beautiful, and more accessible React applications.",
7
7
  "keywords": [
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@emotion/core": "^10.1.1",
44
44
  "@emotion/css": "^11.7.1",
45
- "@peculiar/color": "^0.0.2-alpha.302+411eec8",
45
+ "@peculiar/color": "^0.0.2-alpha.309+0c1c87c",
46
46
  "@popperjs/core": "^2.11.5",
47
47
  "@types/flat": "^5.0.2",
48
48
  "@types/react-transition-group": "^4.4.4",
@@ -55,13 +55,13 @@
55
55
  "react-transition-group": "^4.4.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@storybook/addon-a11y": "^6.5.10",
59
- "@storybook/addon-actions": "^6.5.10",
60
- "@storybook/addon-controls": "^6.5.10",
61
- "@storybook/addon-docs": "^6.5.10",
62
- "@storybook/addon-viewport": "^6.5.10",
63
- "@storybook/react": "^6.5.10",
64
- "@storybook/theming": "^6.5.10",
58
+ "@storybook/addon-a11y": "^6.5.14",
59
+ "@storybook/addon-actions": "^6.5.14",
60
+ "@storybook/addon-controls": "^6.5.14",
61
+ "@storybook/addon-docs": "^6.5.14",
62
+ "@storybook/addon-viewport": "^6.5.14",
63
+ "@storybook/react": "^6.5.14",
64
+ "@storybook/theming": "^6.5.14",
65
65
  "@testing-library/jest-dom": "^5.16.4",
66
66
  "@testing-library/react": "^11.2.7",
67
67
  "@testing-library/user-event": "^13.5.0",
@@ -85,5 +85,5 @@
85
85
  "node": ">=12.x"
86
86
  },
87
87
  "license": "MIT",
88
- "gitHead": "411eec8215296c9e285f6ad8963c1f71930e513c"
88
+ "gitHead": "0c1c87cde94c6f2b6590c4679309c8a19c269487"
89
89
  }