@synerise/ds-dropdown 1.3.0 → 1.3.2
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 +8 -0
- package/README.md +17 -10
- package/dist/Dropdown.const.d.ts +4 -4
- package/dist/Dropdown.const.js +31 -21
- package/dist/Dropdown.d.ts +3 -3
- package/dist/Dropdown.js +64 -81
- package/dist/Dropdown.styles.d.ts +1 -1
- package/dist/Dropdown.styles.js +7 -6
- package/dist/Dropdown.types.d.ts +4 -4
- package/dist/Dropdown.types.js +1 -1
- package/dist/components/BackAction/BackAction.d.ts +2 -2
- package/dist/components/BackAction/BackAction.js +20 -25
- package/dist/components/BackAction/BackAction.styles.d.ts +4 -4
- package/dist/components/BackAction/BackAction.styles.js +15 -17
- package/dist/components/BackAction/BackAction.types.d.ts +2 -2
- package/dist/components/BackAction/BackAction.types.js +1 -1
- package/dist/components/BottomAction/BottomAction.d.ts +2 -2
- package/dist/components/BottomAction/BottomAction.js +15 -17
- package/dist/components/BottomAction/BottomAction.styles.d.ts +3 -3
- package/dist/components/BottomAction/BottomAction.styles.js +11 -18
- package/dist/components/BottomAction/BottomAction.types.d.ts +2 -2
- package/dist/components/BottomAction/BottomAction.types.js +1 -1
- package/dist/components/DropdownFooter/DropdownFooter.d.ts +2 -2
- package/dist/components/DropdownFooter/DropdownFooter.js +15 -10
- package/dist/components/DropdownFooter/DropdownFooter.styles.d.ts +3 -3
- package/dist/components/DropdownFooter/DropdownFooter.styles.js +11 -10
- package/dist/components/DropdownFooter/DropdownFooter.types.d.ts +1 -1
- package/dist/components/DropdownFooter/DropdownFooter.types.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -3
- package/dist/components/DropdownMenu/DropdownMenu.js +71 -118
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +3 -3
- package/dist/components/DropdownMenu/DropdownMenu.types.js +1 -1
- package/dist/components/DropdownMenuList/DropdownMenuList.d.ts +3 -3
- package/dist/components/DropdownMenuList/DropdownMenuList.js +62 -76
- package/dist/components/DropdownMenuList/DropdownMenuList.styles.d.ts +5 -5
- package/dist/components/DropdownMenuList/DropdownMenuList.styles.js +16 -9
- package/dist/components/DropdownMenuList/DropdownMenuList.types.d.ts +2 -2
- package/dist/components/DropdownMenuList/DropdownMenuList.types.js +1 -1
- package/dist/components/DropdownOverlay/DropdownOverlay.d.ts +2 -2
- package/dist/components/DropdownOverlay/DropdownOverlay.js +45 -53
- package/dist/components/DropdownOverlay/DropdownOverlay.styles.d.ts +1 -1
- package/dist/components/DropdownOverlay/DropdownOverlay.styles.js +7 -10
- package/dist/components/DropdownOverlay/DropdownOverlay.types.d.ts +2 -2
- package/dist/components/DropdownOverlay/DropdownOverlay.types.js +1 -1
- package/dist/components/DropdownPopover/DropdownPopover.d.ts +2 -2
- package/dist/components/DropdownPopover/DropdownPopover.js +44 -74
- package/dist/components/DropdownPopover/DropdownPopover.types.d.ts +1 -1
- package/dist/components/DropdownPopover/DropdownPopover.types.js +1 -1
- package/dist/components/TextTrigger/TextTrigger.d.ts +2 -2
- package/dist/components/TextTrigger/TextTrigger.js +24 -31
- package/dist/components/TextTrigger/TextTrigger.styles.d.ts +3 -3
- package/dist/components/TextTrigger/TextTrigger.styles.js +9 -23
- package/dist/components/TextTrigger/TextTrigger.types.d.ts +1 -1
- package/dist/components/TextTrigger/TextTrigger.types.js +1 -1
- package/dist/hooks/useDefaultTexts.d.ts +1 -1
- package/dist/hooks/useDefaultTexts.js +18 -20
- package/dist/hooks/useDropdownVisibility.js +19 -21
- package/dist/index.js +15 -6
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/getDropdownWidth.d.ts +1 -1
- package/dist/utils/getDropdownWidth.js +12 -9
- package/dist/utils/getTransitionConfig.d.ts +1 -1
- package/dist/utils/getTransitionConfig.js +11 -7
- package/dist/utils/index.js +8 -3
- package/dist/utils/isSplitFooter.d.ts +1 -1
- package/dist/utils/isSplitFooter.js +6 -3
- package/package.json +16 -16
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const getTransitionConfig = ({
|
|
2
|
+
placement
|
|
3
|
+
}) => {
|
|
4
|
+
const isTop = placement.indexOf("top");
|
|
4
5
|
return {
|
|
5
6
|
open: {
|
|
6
|
-
transform:
|
|
7
|
+
transform: "scaleY(1)"
|
|
7
8
|
},
|
|
8
9
|
initial: {
|
|
9
|
-
transform:
|
|
10
|
+
transform: "scaleY(0)"
|
|
10
11
|
},
|
|
11
12
|
common: {
|
|
12
|
-
transformOrigin: isTop ?
|
|
13
|
+
transformOrigin: isTop ? "top" : "bottom"
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
|
-
};
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
getTransitionConfig
|
|
19
|
+
};
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { getTransitionConfig } from "./getTransitionConfig.js";
|
|
2
|
+
import { isSplitFooter } from "./isSplitFooter.js";
|
|
3
|
+
import { getDropdownWidth } from "./getDropdownWidth.js";
|
|
4
|
+
export {
|
|
5
|
+
getDropdownWidth,
|
|
6
|
+
getTransitionConfig,
|
|
7
|
+
isSplitFooter
|
|
8
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DropdownFooterProps, DropdownFooterSplit } from '../components/DropdownFooter/DropdownFooter.types';
|
|
2
2
|
export declare const isSplitFooter: (footer: DropdownFooterProps["footer"]) => footer is DropdownFooterSplit;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
return !!(footer && typeof footer ===
|
|
3
|
-
};
|
|
1
|
+
const isSplitFooter = (footer) => {
|
|
2
|
+
return !!(footer && typeof footer === "object" && ("left" in footer || "right" in footer));
|
|
3
|
+
};
|
|
4
|
+
export {
|
|
5
|
+
isSplitFooter
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-dropdown",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Dropdown UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
26
|
-
"test": "vitest",
|
|
27
|
-
"test:watch": "
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
28
|
"types": "tsc --noEmit",
|
|
29
29
|
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
30
|
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.27.16",
|
|
39
|
-
"@synerise/ds-divider": "^1.3.
|
|
40
|
-
"@synerise/ds-empty-states": "^1.0.
|
|
41
|
-
"@synerise/ds-icon": "^1.
|
|
42
|
-
"@synerise/ds-list-item": "^1.4.
|
|
43
|
-
"@synerise/ds-popover": "^1.5.
|
|
44
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
45
|
-
"@synerise/ds-search-bar": "^1.4.
|
|
46
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
47
|
-
"@synerise/ds-typography": "^1.1.
|
|
48
|
-
"@synerise/ds-utils": "^1.
|
|
39
|
+
"@synerise/ds-divider": "^1.3.2",
|
|
40
|
+
"@synerise/ds-empty-states": "^1.0.36",
|
|
41
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
42
|
+
"@synerise/ds-list-item": "^1.4.10",
|
|
43
|
+
"@synerise/ds-popover": "^1.5.3",
|
|
44
|
+
"@synerise/ds-scrollbar": "^1.2.17",
|
|
45
|
+
"@synerise/ds-search-bar": "^1.4.20",
|
|
46
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
47
|
+
"@synerise/ds-typography": "^1.1.13",
|
|
48
|
+
"@synerise/ds-utils": "^1.7.1",
|
|
49
49
|
"classnames": "^2.5.1",
|
|
50
50
|
"react-window": "^1.8.11"
|
|
51
51
|
},
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-intl": "^6.8.7",
|
|
59
59
|
"styled-components": "^5.3.3"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
62
62
|
}
|