@synerise/ds-dropdown 2.1.7 → 2.2.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.
- package/CHANGELOG.md +19 -0
- package/CLAUDE.md +4 -4
- package/dist/Dropdown.styles.js +1 -1
- package/dist/components/BackAction/BackAction.styles.js +3 -3
- package/dist/components/BottomAction/BottomAction.styles.js +2 -2
- package/dist/components/DropdownFooter/DropdownFooter.styles.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -4
- package/dist/components/DropdownOverlay/DropdownOverlay.styles.js +1 -1
- package/dist/components/TextTrigger/TextTrigger.js +4 -3
- package/dist/components/TextTrigger/TextTrigger.styles.js +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.2.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-dropdown@2.1.8...@synerise/ds-dropdown@2.2.0) (2026-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.1.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-dropdown@2.1.7...@synerise/ds-dropdown@2.1.8) (2026-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-dropdown
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.1.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-dropdown@2.1.6...@synerise/ds-dropdown@2.1.7) (2026-10-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-dropdown
|
package/CLAUDE.md
CHANGED
|
@@ -109,7 +109,7 @@ Text label with rotating chevron — intended as a dropdown trigger.
|
|
|
109
109
|
| `size` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | — | **Required.** Typography size level |
|
|
110
110
|
| `expanded` | `boolean` | `undefined` | Controls arrow rotation (open state) |
|
|
111
111
|
| `isDisabled` | `boolean` | `undefined` | Disables interactions |
|
|
112
|
-
| `inactiveColor` | `string` | `grey-800` | Color when not hovered/focused |
|
|
112
|
+
| `inactiveColor` | `string` | `grey-800` | Color when not hovered/focused. A custom-colour `family-shade` string (resolved through `resolveCustomColor` to `--ds-color-custom-*`) or an already-resolved `var(--ds-*)` / hex, passed through unchanged |
|
|
113
113
|
| `onClick` | `() => void` | `undefined` | Click handler |
|
|
114
114
|
| `onFocus` | `() => void` | `undefined` | Focus handler |
|
|
115
115
|
|
|
@@ -130,7 +130,7 @@ Back-navigation row rendered inside a dropdown overlay.
|
|
|
130
130
|
|
|
131
131
|
### `BottomAction`
|
|
132
132
|
|
|
133
|
-
Bottom call-to-action row (
|
|
133
|
+
Bottom call-to-action row (`--ds-color-background-base-subtle` background, 52px height).
|
|
134
134
|
|
|
135
135
|
| Prop | Type | Default | Description |
|
|
136
136
|
|------|------|---------|-------------|
|
|
@@ -197,8 +197,8 @@ A `skipDuplicates` ref prevents `onOpenChange` from firing twice when both the t
|
|
|
197
197
|
|
|
198
198
|
## Styling
|
|
199
199
|
|
|
200
|
-
- Overlay: `DropdownOverlay.styles.ts` —
|
|
201
|
-
- Footer:
|
|
200
|
+
- Overlay: `DropdownOverlay.styles.ts` — `--ds-dropdown-bg` background, `--ds-dropdown-shadow`, `3px` border-radius, dynamic width.
|
|
201
|
+
- Footer: `--ds-dropdown-footer-bg` background, `48px` height; split layout via `DropdownFooterLeft`/`DropdownFooterRight`.
|
|
202
202
|
- `Dropdown.Wrapper` clips `ListItemWrapper` to prevent overflow in narrow overlays.
|
|
203
203
|
- All colours and shadows come from `@synerise/ds-core` tokens.
|
|
204
204
|
|
package/dist/Dropdown.styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Wrapper as Wrapper$1 } from "@synerise/ds-list-item/dist/components/Tex
|
|
|
3
3
|
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "Dropdownstyles__Wrapper",
|
|
5
5
|
componentId: "sc-1onktq5-0"
|
|
6
|
-
})(["overflow:hidden;background:
|
|
6
|
+
})(["overflow:hidden;background:var(--ds-dropdown-bg);", "{min-width:0;}"], Wrapper$1);
|
|
7
7
|
export {
|
|
8
8
|
Wrapper
|
|
9
9
|
};
|
|
@@ -2,15 +2,15 @@ import styled from "styled-components";
|
|
|
2
2
|
const Label = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "BackActionstyles__Label",
|
|
4
4
|
componentId: "sc-1cwqmxm-0"
|
|
5
|
-
})(["font-weight:500;font-size:14px;transition:color 0.3s ease;color:
|
|
5
|
+
})(["font-weight:500;font-size:14px;transition:color 0.3s ease;color:var(--ds-color-text-base-subtle);"]);
|
|
6
6
|
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "BackActionstyles__IconWrapper",
|
|
8
8
|
componentId: "sc-1cwqmxm-1"
|
|
9
|
-
})(["margin-right:12px;color:
|
|
9
|
+
})(["margin-right:12px;color:var(--ds-color-text-base-subtle);transition:color 0.3s ease;"]);
|
|
10
10
|
const BackActionWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
11
11
|
displayName: "BackActionstyles__BackActionWrapper",
|
|
12
12
|
componentId: "sc-1cwqmxm-2"
|
|
13
|
-
})(["padding:0 8px;&:hover{", "{color:
|
|
13
|
+
})(["padding:0 8px;&:hover{", "{color:var(--ds-color-text-base-default);}", "{color:var(--ds-color-text-base-default);}}"], Label, IconWrapper);
|
|
14
14
|
const ContentWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
15
15
|
displayName: "BackActionstyles__ContentWrapper",
|
|
16
16
|
componentId: "sc-1cwqmxm-3"
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "BottomActionstyles__IconWrapper",
|
|
4
4
|
componentId: "sc-sbwluh-0"
|
|
5
|
-
})(["margin-right:4px;svg{fill:
|
|
5
|
+
})(["margin-right:4px;svg{fill:var(--ds-color-icon-base-default);}"]);
|
|
6
6
|
const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "BottomActionstyles__TextWrapper",
|
|
8
8
|
componentId: "sc-sbwluh-1"
|
|
@@ -10,7 +10,7 @@ const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
10
10
|
const BottomAction = /* @__PURE__ */ styled.div.withConfig({
|
|
11
11
|
displayName: "BottomActionstyles__BottomAction",
|
|
12
12
|
componentId: "sc-sbwluh-2"
|
|
13
|
-
})(["background-color:
|
|
13
|
+
})(["background-color:var(--ds-color-background-base-subtle);padding:0 16px;height:52px;display:flex;align-items:center;color:var(--ds-color-text-base-muted);font-weight:500;border-width:1px 0 0 0;border-color:var(--ds-color-border-base-subtle);border-style:solid;margin-top:8px;cursor:pointer;&:hover{color:var(--ds-color-text-brand-default);", "{svg{fill:var(--ds-color-icon-brand-default);}}}"], IconWrapper);
|
|
14
14
|
export {
|
|
15
15
|
BottomAction,
|
|
16
16
|
IconWrapper,
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const DropdownFooterWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "DropdownFooterstyles__DropdownFooterWrapper",
|
|
4
4
|
componentId: "sc-q7mkt3-0"
|
|
5
|
-
})(["background:
|
|
5
|
+
})(["background:var(--ds-dropdown-footer-bg);height:48px;padding:8px;display:flex;align-items:center;justify-content:", ";"], (props) => props.split ? "space-between" : "flex-end");
|
|
6
6
|
const DropdownFooterLeft = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "DropdownFooterstyles__DropdownFooterLeft",
|
|
8
8
|
componentId: "sc-q7mkt3-1"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import { useTheme } from "@synerise/ds-core";
|
|
4
3
|
import Icon, { SearchM } from "@synerise/ds-icon";
|
|
5
4
|
import SearchBar from "@synerise/ds-search-bar";
|
|
6
5
|
import { DEFAULT_MATCHING_FUNCTION, MAX_VISIBLE_ITEMS } from "../../Dropdown.const.js";
|
|
@@ -38,7 +37,6 @@ const DropdownMenu = ({
|
|
|
38
37
|
const [searchQuery, setSearchQuery] = useState("");
|
|
39
38
|
const [isOpen, setIsOpen] = useState(open);
|
|
40
39
|
const allTexts = useDefaultTexts(texts);
|
|
41
|
-
const theme = useTheme();
|
|
42
40
|
const toggleOpen = useCallback((openState) => {
|
|
43
41
|
onOpenChange?.(openState);
|
|
44
42
|
setIsOpen(openState);
|
|
@@ -68,11 +66,11 @@ const DropdownMenu = ({
|
|
|
68
66
|
}, [activeIndex]);
|
|
69
67
|
const overlay = useMemo(() => {
|
|
70
68
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
-
withSearch && /* @__PURE__ */ jsx(SearchBar, { placeholder: allTexts.searchPlaceholder, value: searchQuery, handleInputRef: handleSearchFocus, onSearchChange: handleSearchChange, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {})
|
|
69
|
+
withSearch && /* @__PURE__ */ jsx(SearchBar, { placeholder: allTexts.searchPlaceholder, value: searchQuery, handleInputRef: handleSearchFocus, onSearchChange: handleSearchChange, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}) }), onClearInput: () => setSearchQuery(""), clearTooltip: allTexts.searchClearTooltip }),
|
|
72
70
|
/* @__PURE__ */ jsx(DropdownMenuList, { maxVisibleItems, hideOnItemClick, dataSource: filteredItems, closeOverlay: () => toggleOpen(false), texts: allTexts, virtualised }),
|
|
73
71
|
footer && /* @__PURE__ */ jsx(DropdownFooter, { footer })
|
|
74
72
|
] });
|
|
75
|
-
}, [withSearch, allTexts, searchQuery, handleSearchFocus, handleSearchChange,
|
|
73
|
+
}, [withSearch, allTexts, searchQuery, handleSearchFocus, handleSearchChange, maxVisibleItems, hideOnItemClick, filteredItems, virtualised, footer, toggleOpen]);
|
|
76
74
|
return disabled || dataSource.length === 0 ? /* @__PURE__ */ jsx(Fragment, { children }) : /* @__PURE__ */ jsx(DropdownPopover, { getPopupContainer, overlayHTMLAttributes, overlayStyle, overlayClassName, trigger, open: isOpen, size, placement, asChild, onDismiss, overlay, handleOpenChange: toggleOpen, handleTriggerClick: () => {
|
|
77
75
|
toggleOpen(!isOpen);
|
|
78
76
|
}, activeIndex, setActiveIndex, popoverProps: {
|
|
@@ -3,7 +3,7 @@ import { Wrapper } from "@synerise/ds-list-item/dist/components/Text/Text.styles
|
|
|
3
3
|
const OverlayWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "DropdownOverlaystyles__OverlayWrapper",
|
|
5
5
|
componentId: "sc-hy0f4i-0"
|
|
6
|
-
})(["background:
|
|
6
|
+
})(["background:var(--ds-dropdown-bg);box-shadow:var(--ds-dropdown-shadow);border-radius:3px;", ";overflow:hidden;", "{min-width:0;}"], (props) => props.$width && `${props.widthProperty}: ${props.$width}px`, Wrapper);
|
|
7
7
|
export {
|
|
8
8
|
OverlayWrapper
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { useTheme } from "@synerise/ds-core";
|
|
4
3
|
import Icon, { AngleDownS } from "@synerise/ds-icon";
|
|
5
4
|
import { Title } from "@synerise/ds-typography";
|
|
5
|
+
import { resolveCustomColor } from "@synerise/ds-utils";
|
|
6
6
|
import { TextTrigger as TextTrigger$1, IconWrapper } from "./TextTrigger.styles.js";
|
|
7
7
|
const TextTrigger = forwardRef(({
|
|
8
8
|
value,
|
|
@@ -13,8 +13,9 @@ const TextTrigger = forwardRef(({
|
|
|
13
13
|
onFocus,
|
|
14
14
|
isDisabled = false
|
|
15
15
|
}, ref) => {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
return /* @__PURE__ */ jsxs(TextTrigger$1, { onFocus: isDisabled ? void 0 : onFocus, inactiveColor: resolveCustomColor(inactiveColor, "var(--ds-color-text-base-default)", {
|
|
17
|
+
passthroughResolved: true
|
|
18
|
+
}), tabIndex: 0, ref, onClick: isDisabled ? void 0 : onClick, isDisabled, children: [
|
|
18
19
|
/* @__PURE__ */ jsx(Title, { level: size, children: value }),
|
|
19
20
|
/* @__PURE__ */ jsx(IconWrapper, { expanded, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleDownS, {}) }) })
|
|
20
21
|
] });
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const TextTrigger = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "TextTriggerstyles__TextTrigger",
|
|
4
4
|
componentId: "sc-xuqby2-0"
|
|
5
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:", ";opacity:", ";.ds-title{margin:0;}.ds-title
|
|
5
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:", ";opacity:", ";.ds-title{margin:0;}.ds-title,.ds-icon{color:", ";}&&&:focus{.ds-title,.ds-icon{color:var(--ds-color-text-brand-defaulthover);}}&:hover{.ds-title,.ds-icon{color:var(--ds-color-text-brand-default);}}"], (props) => props.isDisabled ? "default" : "pointer", (props) => props.isDisabled ? "var(--ds-opacity-disabled)" : "1", (props) => props.inactiveColor);
|
|
6
6
|
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "TextTriggerstyles__IconWrapper",
|
|
8
8
|
componentId: "sc-xuqby2-1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-dropdown",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Dropdown UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@floating-ui/react": "^0.27.16",
|
|
46
|
-
"@synerise/ds-divider": "^2.0
|
|
47
|
-
"@synerise/ds-empty-states": "^2.0
|
|
48
|
-
"@synerise/ds-icon": "^2.
|
|
49
|
-
"@synerise/ds-list-item": "^2.
|
|
50
|
-
"@synerise/ds-popover": "^2.0
|
|
51
|
-
"@synerise/ds-scrollbar": "^2.0
|
|
52
|
-
"@synerise/ds-search-bar": "^2.0
|
|
53
|
-
"@synerise/ds-tooltip": "^2.0
|
|
54
|
-
"@synerise/ds-typography": "^2.0
|
|
55
|
-
"@synerise/ds-utils": "^2.
|
|
46
|
+
"@synerise/ds-divider": "^2.1.0",
|
|
47
|
+
"@synerise/ds-empty-states": "^2.1.0",
|
|
48
|
+
"@synerise/ds-icon": "^2.3.0",
|
|
49
|
+
"@synerise/ds-list-item": "^2.3.0",
|
|
50
|
+
"@synerise/ds-popover": "^2.2.0",
|
|
51
|
+
"@synerise/ds-scrollbar": "^2.1.0",
|
|
52
|
+
"@synerise/ds-search-bar": "^2.1.0",
|
|
53
|
+
"@synerise/ds-tooltip": "^2.1.0",
|
|
54
|
+
"@synerise/ds-typography": "^2.1.0",
|
|
55
|
+
"@synerise/ds-utils": "^2.3.0",
|
|
56
56
|
"classnames": "^2.5.1",
|
|
57
57
|
"react-window": "^1.8.11"
|
|
58
58
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react-intl": "^6.8.7",
|
|
66
66
|
"styled-components": "^5.3.3"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
|
|
69
69
|
}
|