reshaped 3.2.3 → 3.2.5

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 (34) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/bundle.css +1 -1
  3. package/dist/bundle.js +11 -11
  4. package/dist/components/Actionable/Actionable.js +5 -1
  5. package/dist/components/Actionable/Actionable.types.d.ts +1 -0
  6. package/dist/components/Button/Button.js +2 -2
  7. package/dist/components/Button/Button.types.d.ts +1 -1
  8. package/dist/components/Carousel/Carousel.module.css +1 -1
  9. package/dist/components/DropdownMenu/DropdownMenu.js +1 -0
  10. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
  11. package/dist/components/Link/Link.d.ts +1 -1
  12. package/dist/components/Link/Link.js +2 -2
  13. package/dist/components/Link/Link.types.d.ts +1 -1
  14. package/dist/components/Link/tests/Link.stories.d.ts +1 -1
  15. package/dist/components/MenuItem/MenuItem.js +2 -2
  16. package/dist/components/MenuItem/MenuItem.types.d.ts +1 -1
  17. package/dist/components/Modal/Modal.module.css +1 -1
  18. package/dist/components/Popover/Popover.types.d.ts +1 -1
  19. package/dist/components/TextField/TextField.js +2 -2
  20. package/dist/components/TextField/TextField.module.css +1 -1
  21. package/dist/components/TextField/TextField.types.d.ts +1 -0
  22. package/dist/components/TextField/tests/TextField.stories.d.ts +1 -0
  23. package/dist/components/TextField/tests/TextField.stories.js +16 -0
  24. package/dist/components/Tooltip/Tooltip.js +2 -2
  25. package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
  26. package/dist/components/_private/Flyout/Flyout.types.d.ts +6 -1
  27. package/dist/components/_private/Flyout/FlyoutControlled.js +2 -1
  28. package/dist/components/_private/Flyout/tests/Flyout.stories.d.ts +4 -4
  29. package/dist/components/_private/Flyout/tests/Flyout.stories.js +26 -19
  30. package/dist/components/_private/Flyout/useFlyout.d.ts +1 -0
  31. package/dist/components/_private/Flyout/useFlyout.js +7 -4
  32. package/dist/components/_private/Flyout/utilities/calculatePosition.js +7 -7
  33. package/dist/styles/justify/justify.module.css +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@ const centerBySize = (originSize, targetSize) => {
16
16
  * Calculate styles for the current position
17
17
  */
18
18
  const calculatePosition = (args) => {
19
- const { triggerBounds, flyoutBounds, scopeOffset, position: passedPosition, rtl, width, contentGap = 0, } = args;
19
+ const { triggerBounds, flyoutBounds, scopeOffset, position: passedPosition, rtl, width, contentGap = 0, contentShift = 0, } = args;
20
20
  const isFullWidth = width === "full" || width === "100%";
21
21
  let left = 0;
22
22
  let top = 0;
@@ -33,7 +33,7 @@ const calculatePosition = (args) => {
33
33
  switch (position) {
34
34
  case "bottom":
35
35
  case "top":
36
- left = centerBySize(triggerBounds.width, flyoutWidth) + triggerBounds.left;
36
+ left = centerBySize(triggerBounds.width, flyoutWidth) + triggerBounds.left + contentShift;
37
37
  break;
38
38
  case "start":
39
39
  case "start-top":
@@ -47,11 +47,11 @@ const calculatePosition = (args) => {
47
47
  break;
48
48
  case "top-start":
49
49
  case "bottom-start":
50
- left = triggerBounds.left;
50
+ left = triggerBounds.left + contentShift + contentShift;
51
51
  break;
52
52
  case "top-end":
53
53
  case "bottom-end":
54
- left = triggerBounds.right - flyoutWidth;
54
+ left = triggerBounds.right - flyoutWidth + contentShift;
55
55
  break;
56
56
  default:
57
57
  break;
@@ -69,15 +69,15 @@ const calculatePosition = (args) => {
69
69
  break;
70
70
  case "start":
71
71
  case "end":
72
- top = centerBySize(triggerBounds.height, flyoutHeight) + triggerBounds.top;
72
+ top = centerBySize(triggerBounds.height, flyoutHeight) + triggerBounds.top + contentShift;
73
73
  break;
74
74
  case "start-top":
75
75
  case "end-top":
76
- top = triggerBounds.top;
76
+ top = triggerBounds.top + contentShift;
77
77
  break;
78
78
  case "start-bottom":
79
79
  case "end-bottom":
80
- top = triggerBounds.bottom - flyoutHeight;
80
+ top = triggerBounds.bottom - flyoutHeight + contentShift;
81
81
  break;
82
82
  default:
83
83
  break;
@@ -1 +1 @@
1
- .--justify-start{justify-content:flex-start}.--justify-end{justify-content:flex-end}.--justify-center{justify-content:center}.--justify-space-between{justify-content:space-between}@media (--rs-viewport-m ){.--justify-start--m{justify-content:flex-start}.--justify-end--m{justify-content:flex-end}.--justify-center--m{justify-content:center}.--justify-space-between--m{justify-content:space-between}}@media (--rs-viewport-l ){.--justify-start--l{justify-content:flex-start}.--justify-end--l{justify-content:flex-end}.--justify-center--l{justify-content:center}.--justify-space-between--l{justify-content:space-between}}@media (--rs-viewport-xl ){.--justify-start--xl{justify-content:flex-start}.--justify-end--xl{justify-content:flex-end}.--justify-center--xl{justify-content:center}.--justify-space-between--xl{justify-content:space-between}}
1
+ .--justify-start{justify-content:flex-start!important}.--justify-end{justify-content:flex-end!important}.--justify-center{justify-content:center!important}.--justify-space-between{justify-content:space-between!important}@media (--rs-viewport-m ){.--justify-start--m{justify-content:flex-start!important}.--justify-end--m{justify-content:flex-end!important}.--justify-center--m{justify-content:center!important}.--justify-space-between--m{justify-content:space-between!important}}@media (--rs-viewport-l ){.--justify-start--l{justify-content:flex-start!important}.--justify-end--l{justify-content:flex-end!important}.--justify-center--l{justify-content:center!important}.--justify-space-between--l{justify-content:space-between!important}}@media (--rs-viewport-xl ){.--justify-start--xl{justify-content:flex-start!important}.--justify-end--xl{justify-content:flex-end!important}.--justify-center--xl{justify-content:center!important}.--justify-space-between--xl{justify-content:space-between!important}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reshaped",
3
3
  "description": "Professionally crafted design system in React & Figma for building products of any scale and complexity",
4
- "version": "3.2.3",
4
+ "version": "3.2.5",
5
5
  "license": "MIT",
6
6
  "email": "hello@reshaped.so",
7
7
  "homepage": "https://reshaped.so",