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.
- package/CHANGELOG.md +9 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +11 -11
- package/dist/components/Actionable/Actionable.js +5 -1
- package/dist/components/Actionable/Actionable.types.d.ts +1 -0
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.types.d.ts +1 -1
- package/dist/components/Carousel/Carousel.module.css +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.types.d.ts +1 -1
- package/dist/components/Link/tests/Link.stories.d.ts +1 -1
- package/dist/components/MenuItem/MenuItem.js +2 -2
- package/dist/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/components/Modal/Modal.module.css +1 -1
- package/dist/components/Popover/Popover.types.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.module.css +1 -1
- package/dist/components/TextField/TextField.types.d.ts +1 -0
- package/dist/components/TextField/tests/TextField.stories.d.ts +1 -0
- package/dist/components/TextField/tests/TextField.stories.js +16 -0
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/components/_private/Flyout/Flyout.types.d.ts +6 -1
- package/dist/components/_private/Flyout/FlyoutControlled.js +2 -1
- package/dist/components/_private/Flyout/tests/Flyout.stories.d.ts +4 -4
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +26 -19
- package/dist/components/_private/Flyout/useFlyout.d.ts +1 -0
- package/dist/components/_private/Flyout/useFlyout.js +7 -4
- package/dist/components/_private/Flyout/utilities/calculatePosition.js +7 -7
- package/dist/styles/justify/justify.module.css +1 -1
- 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.
|
4
|
+
"version": "3.2.5",
|
5
5
|
"license": "MIT",
|
6
6
|
"email": "hello@reshaped.so",
|
7
7
|
"homepage": "https://reshaped.so",
|