@synerise/ds-cascader 1.1.25 → 1.1.27

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 (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/Cascader.d.ts +2 -2
  4. package/dist/Cascader.js +85 -143
  5. package/dist/Cascader.styles.d.ts +6 -6
  6. package/dist/Cascader.styles.js +19 -17
  7. package/dist/Cascader.types.d.ts +1 -1
  8. package/dist/Cascader.types.js +1 -1
  9. package/dist/Elements/BackAction/BackAction.d.ts +2 -2
  10. package/dist/Elements/BackAction/BackAction.js +18 -16
  11. package/dist/Elements/BackAction/BackAction.styles.d.ts +4 -4
  12. package/dist/Elements/BackAction/BackAction.styles.js +15 -17
  13. package/dist/Elements/BackAction/BackAction.types.d.ts +1 -1
  14. package/dist/Elements/BackAction/BackAction.types.js +1 -1
  15. package/dist/Elements/BottomAction/BottomAction.d.ts +2 -2
  16. package/dist/Elements/BottomAction/BottomAction.js +14 -13
  17. package/dist/Elements/BottomAction/BottomAction.styles.d.ts +3 -3
  18. package/dist/Elements/BottomAction/BottomAction.styles.js +11 -14
  19. package/dist/Elements/BottomAction/BottomAction.types.d.ts +1 -1
  20. package/dist/Elements/BottomAction/BottomAction.types.js +1 -1
  21. package/dist/Elements/Breadcrumb/Breadcrumb.d.ts +2 -2
  22. package/dist/Elements/Breadcrumb/Breadcrumb.js +47 -73
  23. package/dist/Elements/Breadcrumb/Breadcrumb.styles.d.ts +13 -13
  24. package/dist/Elements/Breadcrumb/Breadcrumb.styles.js +36 -46
  25. package/dist/Elements/Breadcrumb/Breadcrumb.types.d.ts +2 -2
  26. package/dist/Elements/Breadcrumb/Breadcrumb.types.js +1 -1
  27. package/dist/Elements/Breadcrumb/utils.d.ts +1 -1
  28. package/dist/Elements/Breadcrumb/utils.js +15 -9
  29. package/dist/Elements/BreadcrumbsList/BreadcrumbsList.d.ts +4 -4
  30. package/dist/Elements/BreadcrumbsList/BreadcrumbsList.js +28 -35
  31. package/dist/Elements/BreadcrumbsList/BreadcrumbsList.types.d.ts +2 -2
  32. package/dist/Elements/BreadcrumbsList/BreadcrumbsList.types.js +1 -1
  33. package/dist/Elements/CategoriesList/CategoriesList.d.ts +2 -2
  34. package/dist/Elements/CategoriesList/CategoriesList.js +26 -49
  35. package/dist/Elements/CategoriesList/CategoriesList.types.d.ts +2 -2
  36. package/dist/Elements/CategoriesList/CategoriesList.types.js +1 -1
  37. package/dist/Elements/Navigation/Navigation.d.ts +2 -2
  38. package/dist/Elements/Navigation/Navigation.js +32 -40
  39. package/dist/Elements/Navigation/Navigation.types.d.ts +1 -1
  40. package/dist/Elements/Navigation/Navigation.types.js +1 -1
  41. package/dist/index.js +6 -2
  42. package/dist/modules.d.js +1 -1
  43. package/dist/modules.d.ts +0 -0
  44. package/dist/utils.d.ts +1 -1
  45. package/dist/utils.js +37 -43
  46. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+ ## [1.1.27](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cascader@1.1.26...@synerise/ds-cascader@1.1.27) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-cascader
9
+
10
+ ## [1.1.26](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cascader@1.1.25...@synerise/ds-cascader@1.1.26) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-cascader
13
+
6
14
  ## [1.1.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cascader@1.1.24...@synerise/ds-cascader@1.1.25) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-cascader
package/README.md CHANGED
@@ -54,7 +54,7 @@ const rootCategory = {
54
54
  | Property | Description | Type | Default |
55
55
  | ---------------------- | --------------------------------------------------------------- | ------------------------------------------- | ------- |
56
56
  | categorySuffix | Suffix element displayed when hovering on category | string / React.ReactNode | - |
57
- | maxHeight | Max height of the content in pixels (In order to enable scroll) | number /string | - |
57
+ | maxHeight | Max height of the content in pixels (In order to enable scroll) | number | - |
58
58
  | contentStyles | Additional styles applied to the content | React.CSSProperties | - |
59
59
  | onCategorySelect | Callback executed when category is selected | (item: Category, selected: boolean) => void | - |
60
60
  | rootCategory | Root (default) category displayed in dropdown | Category | - |
@@ -67,5 +67,5 @@ const rootCategory = {
67
67
  | Property | Description | Type | Default |
68
68
  | -------- | ------------------------------------------------------------------------------- | --------------- | ------- |
69
69
  | id | Unique id of category | React.ReactText | - |
70
- | name | Name of the category | number | - |
70
+ | name | Name of the category | string | - |
71
71
  | path | Path of the category. Each element of an array represents one level of nesting. | string[] | - |
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CascaderProps } from './Cascader.types';
1
+ import { default as React } from 'react';
2
+ import { CascaderProps } from './Cascader.types';
3
3
  export declare const Cascader: ({ rootCategory, searchClearTooltip, searchInputPlaceholder, onCategorySelect, categorySuffix, maxHeight, contentStyles, selectedCategoriesIds, }: CascaderProps) => React.JSX.Element;
4
4
  export default Cascader;
package/dist/Cascader.js CHANGED
@@ -1,89 +1,75 @@
1
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { theme } from '@synerise/ds-core';
3
- import Icon, { SearchM } from '@synerise/ds-icon';
4
- import SearchBar from '@synerise/ds-search-bar';
5
- import { useResize } from '@synerise/ds-utils';
6
- import * as S from './Cascader.styles';
7
- import BreadcrumbsList from './Elements/BreadcrumbsList/BreadcrumbsList';
8
- import CategoriesList from './Elements/CategoriesList/CategoriesList';
9
- import Navigation from './Elements/Navigation/Navigation';
10
- import { filterPaths, getAllPaths, hasNestedCategories, searchCategoryWithId } from './utils';
11
- var VERTICAL_PADDING_OFFSET = 8;
12
- var BREADCRUMB_ITEM_HEIGHT = 50;
13
- var CATEGORY_ITEM_HEIGHT = 32;
14
- export var Cascader = function Cascader(_ref) {
15
- var _categoriesContainer$;
16
- var rootCategory = _ref.rootCategory,
17
- searchClearTooltip = _ref.searchClearTooltip,
18
- searchInputPlaceholder = _ref.searchInputPlaceholder,
19
- onCategorySelect = _ref.onCategorySelect,
20
- categorySuffix = _ref.categorySuffix,
21
- maxHeight = _ref.maxHeight,
22
- contentStyles = _ref.contentStyles,
23
- selectedCategoriesIds = _ref.selectedCategoriesIds;
24
- var _useState = useState(''),
25
- searchQuery = _useState[0],
26
- setSearchQuery = _useState[1];
27
- var _useState2 = useState(rootCategory),
28
- activeCategory = _useState2[0],
29
- setActiveCategory = _useState2[1];
30
- var _useState3 = useState([]),
31
- paths = _useState3[0],
32
- setPaths = _useState3[1];
33
- var _useState4 = useState([]),
34
- filteredPaths = _useState4[0],
35
- setFilteredPaths = _useState4[1];
36
- var _useState5 = useState([]),
37
- enteredCategories = _useState5[0],
38
- setEnteredCategories = _useState5[1];
39
- var _useState6 = useState(0),
40
- scrollTop = _useState6[0],
41
- setScrollTop = _useState6[1];
42
- var _useState7 = useState(selectedCategoriesIds || []),
43
- selectedIds = _useState7[0],
44
- setSelectedIds = _useState7[1];
45
- var searchResultsContainer = useRef();
46
- var categoriesContainer = useRef();
47
- var _useResize = useResize(searchResultsContainer),
48
- height = _useResize.height;
49
- var previousCategory = enteredCategories[enteredCategories.length - 2];
50
- var isSearching = !!paths && searchQuery.length > 0;
51
- var categoriesMaxHeight = maxHeight ? Math.floor((maxHeight - Number(categoriesContainer == null || (_categoriesContainer$ = categoriesContainer.current) == null ? void 0 : _categoriesContainer$.offsetTop)) / CATEGORY_ITEM_HEIGHT) * CATEGORY_ITEM_HEIGHT + VERTICAL_PADDING_OFFSET : undefined;
52
- var calculateVisibleRows = useMemo(function () {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useRef, useMemo, useEffect, useCallback } from "react";
3
+ import { theme } from "@synerise/ds-core";
4
+ import Icon, { SearchM } from "@synerise/ds-icon";
5
+ import SearchBar from "@synerise/ds-search-bar";
6
+ import { useResize } from "@synerise/ds-utils";
7
+ import { Wrapper, InputWrapper, SearchResults, CascaderScrollbar } from "./Cascader.styles.js";
8
+ import { BreadcrumbsList } from "./Elements/BreadcrumbsList/BreadcrumbsList.js";
9
+ import { CategoriesList } from "./Elements/CategoriesList/CategoriesList.js";
10
+ import { Navigation } from "./Elements/Navigation/Navigation.js";
11
+ import { getAllPaths, searchCategoryWithId, filterPaths, hasNestedCategories } from "./utils.js";
12
+ const VERTICAL_PADDING_OFFSET = 8;
13
+ const BREADCRUMB_ITEM_HEIGHT = 50;
14
+ const CATEGORY_ITEM_HEIGHT = 32;
15
+ const Cascader = ({
16
+ rootCategory,
17
+ searchClearTooltip,
18
+ searchInputPlaceholder,
19
+ onCategorySelect,
20
+ categorySuffix,
21
+ maxHeight,
22
+ contentStyles,
23
+ selectedCategoriesIds
24
+ }) => {
25
+ const [searchQuery, setSearchQuery] = useState("");
26
+ const [activeCategory, setActiveCategory] = useState(rootCategory);
27
+ const [paths, setPaths] = useState([]);
28
+ const [filteredPaths, setFilteredPaths] = useState([]);
29
+ const [enteredCategories, setEnteredCategories] = useState([]);
30
+ const [scrollTop, setScrollTop] = useState(0);
31
+ const [selectedIds, setSelectedIds] = useState(selectedCategoriesIds || []);
32
+ const searchResultsContainer = useRef();
33
+ const categoriesContainer = useRef();
34
+ const {
35
+ height
36
+ } = useResize(searchResultsContainer);
37
+ const previousCategory = enteredCategories[enteredCategories.length - 2];
38
+ const isSearching = !!paths && searchQuery.length > 0;
39
+ const categoriesMaxHeight = maxHeight ? Math.floor((maxHeight - Number(categoriesContainer?.current?.offsetTop)) / CATEGORY_ITEM_HEIGHT) * CATEGORY_ITEM_HEIGHT + VERTICAL_PADDING_OFFSET : void 0;
40
+ const calculateVisibleRows = useMemo(() => {
53
41
  return Math.floor((height - VERTICAL_PADDING_OFFSET) / BREADCRUMB_ITEM_HEIGHT);
54
42
  }, [height]);
55
- useEffect(function () {
56
- var allPaths = getAllPaths(rootCategory, []);
43
+ useEffect(() => {
44
+ const allPaths = getAllPaths(rootCategory, []);
57
45
  setPaths(allPaths);
58
46
  if (activeCategory.id === rootCategory.id || !activeCategory.id) {
59
47
  setActiveCategory(rootCategory);
60
48
  }
61
49
  }, [rootCategory, activeCategory.id]);
62
- useEffect(function () {
50
+ useEffect(() => {
63
51
  setSelectedIds(selectedCategoriesIds);
64
52
  }, [selectedCategoriesIds]);
65
- var onItemSelect = function onItemSelect(item) {
66
- var newSelectedList;
67
- var itemAlreadySelected = selectedIds.indexOf(item.id) !== -1;
53
+ const onItemSelect = (item) => {
54
+ let newSelectedList;
55
+ const itemAlreadySelected = selectedIds.indexOf(item.id) !== -1;
68
56
  if (!itemAlreadySelected) {
69
- newSelectedList = [].concat(selectedIds, [item.id]);
57
+ newSelectedList = [...selectedIds, item.id];
70
58
  onCategorySelect && onCategorySelect(item, true);
71
59
  } else {
72
- newSelectedList = selectedIds.filter(function (id) {
73
- return id !== item.id;
74
- });
60
+ newSelectedList = selectedIds.filter((id) => id !== item.id);
75
61
  onCategorySelect && onCategorySelect(item, false);
76
62
  }
77
- setSelectedIds([].concat(newSelectedList));
63
+ setSelectedIds([...newSelectedList]);
78
64
  };
79
- var onCategoryClick = function onCategoryClick(category) {
80
- var entered = {
65
+ const onCategoryClick = (category) => {
66
+ const entered = {
81
67
  id: category.id,
82
68
  name: category.name,
83
69
  path: category.path
84
70
  };
85
- var updatedEnteredCategories = [].concat(enteredCategories, [entered]);
86
- var hasMoreCategories = hasNestedCategories(category);
71
+ const updatedEnteredCategories = [...enteredCategories, entered];
72
+ const hasMoreCategories = hasNestedCategories(category);
87
73
  if (hasMoreCategories) {
88
74
  setActiveCategory(category);
89
75
  setEnteredCategories(updatedEnteredCategories);
@@ -91,16 +77,14 @@ export var Cascader = function Cascader(_ref) {
91
77
  onItemSelect(category);
92
78
  }
93
79
  };
94
- var onPathClick = useCallback(function (pathName) {
95
- var chosenCategory = enteredCategories.find(function (enteredCategory) {
96
- return enteredCategory.name === pathName;
97
- });
98
- var updatedEnteredCategories;
80
+ const onPathClick = useCallback((pathName) => {
81
+ const chosenCategory = enteredCategories.find((enteredCategory) => enteredCategory.name === pathName);
82
+ let updatedEnteredCategories;
99
83
  if (chosenCategory) {
100
84
  updatedEnteredCategories = enteredCategories.slice(0, enteredCategories.indexOf(chosenCategory) + 1);
101
85
  }
102
- if (chosenCategory != null && chosenCategory.id) {
103
- var nextActiveCategory = searchCategoryWithId(rootCategory, chosenCategory.id);
86
+ if (chosenCategory?.id) {
87
+ const nextActiveCategory = searchCategoryWithId(rootCategory, chosenCategory.id);
104
88
  if (nextActiveCategory) {
105
89
  setActiveCategory(nextActiveCategory);
106
90
  }
@@ -109,86 +93,44 @@ export var Cascader = function Cascader(_ref) {
109
93
  }
110
94
  setEnteredCategories(updatedEnteredCategories || []);
111
95
  }, [rootCategory, enteredCategories]);
112
- var onHomeIconClick = useCallback(function () {
96
+ const onHomeIconClick = useCallback(() => {
113
97
  setActiveCategory(rootCategory);
114
98
  setEnteredCategories([]);
115
99
  }, [rootCategory]);
116
- var filterPathsBySearchQuery = useCallback(function (value) {
100
+ const filterPathsBySearchQuery = useCallback((value) => {
117
101
  if (paths) {
118
- var filtered = filterPaths(paths, value.toLowerCase());
102
+ const filtered = filterPaths(paths, value.toLowerCase());
119
103
  setFilteredPaths(filtered);
120
104
  } else {
121
105
  setFilteredPaths([]);
122
106
  }
123
107
  }, [paths]);
124
- var handleBreadCrumbClick = function handleBreadCrumbClick(breadcrumb) {
125
- var selectedCategory = searchCategoryWithId(rootCategory, breadcrumb == null ? void 0 : breadcrumb.id);
108
+ const handleBreadCrumbClick = (breadcrumb) => {
109
+ const selectedCategory = searchCategoryWithId(rootCategory, breadcrumb?.id);
126
110
  selectedCategory ? onItemSelect(selectedCategory) : onItemSelect(breadcrumb);
127
111
  };
128
- var backActionVisible = useMemo(function () {
129
- return !searchQuery && !!previousCategory && !!previousCategory.name && enteredCategories.length > 1;
130
- }, [enteredCategories.length, previousCategory, searchQuery]);
131
- return /*#__PURE__*/React.createElement(S.Wrapper, {
132
- className: "ds-cascader"
133
- }, /*#__PURE__*/React.createElement(S.InputWrapper, null, /*#__PURE__*/React.createElement(SearchBar, {
134
- onSearchChange: function onSearchChange(value) {
112
+ const backActionVisible = useMemo(() => !searchQuery && !!previousCategory && !!previousCategory.name && enteredCategories.length > 1, [enteredCategories.length, previousCategory, searchQuery]);
113
+ return /* @__PURE__ */ jsxs(Wrapper, { className: "ds-cascader", children: [
114
+ /* @__PURE__ */ jsx(InputWrapper, { children: /* @__PURE__ */ jsx(SearchBar, { onSearchChange: (value) => {
135
115
  setSearchQuery(value);
136
116
  filterPathsBySearchQuery(value);
137
- },
138
- placeholder: searchInputPlaceholder || '',
139
- value: searchQuery,
140
- iconLeft: /*#__PURE__*/React.createElement(Icon, {
141
- component: /*#__PURE__*/React.createElement(SearchM, null),
142
- color: theme.palette['grey-600']
143
- }),
144
- onClearInput: function onClearInput() {
145
- return setSearchQuery('');
146
- },
147
- clearTooltip: searchClearTooltip
148
- })), /*#__PURE__*/React.createElement(S.SearchResults, {
149
- visible: !isSearching || filteredPaths && (filteredPaths == null ? void 0 : filteredPaths.length) > 0,
150
- ref: searchResultsContainer,
151
- style: contentStyles
152
- }, isSearching && filteredPaths && /*#__PURE__*/React.createElement(S.CascaderScrollbar, {
153
- maxHeight: maxHeight,
154
- searching: isSearching,
155
- absolute: isSearching,
156
- onScroll: function onScroll(_ref2) {
157
- var currentTarget = _ref2.currentTarget;
158
- setScrollTop(currentTarget.scrollTop);
159
- }
160
- }, /*#__PURE__*/React.createElement(BreadcrumbsList, {
161
- width: "calc(100% - 8px)",
162
- visibleRows: calculateVisibleRows,
163
- rowHeight: BREADCRUMB_ITEM_HEIGHT,
164
- paths: filteredPaths,
165
- highlight: searchQuery,
166
- onBreadCrumbClick: handleBreadCrumbClick,
167
- scrollTop: scrollTop,
168
- selectedIds: selectedIds
169
- })), /*#__PURE__*/React.createElement(Navigation, {
170
- backActionVisible: backActionVisible,
171
- breadcrumbVisible: !searchQuery && !!activeCategory.path,
172
- onPathClick: onPathClick,
173
- onHomeIconClick: onHomeIconClick,
174
- previousCategory: previousCategory,
175
- activeCategory: activeCategory
176
- }), !searchQuery && /*#__PURE__*/React.createElement("div", {
177
- ref: categoriesContainer
178
- }, /*#__PURE__*/React.createElement(S.CascaderScrollbar, {
179
- maxHeight: categoriesMaxHeight,
180
- searching: isSearching,
181
- absolute: isSearching,
182
- onScroll: function onScroll(_ref3) {
183
- var currentTarget = _ref3.currentTarget;
184
- setScrollTop(currentTarget.scrollTop);
185
- }
186
- }, /*#__PURE__*/React.createElement(CategoriesList, {
187
- rootCategory: activeCategory,
188
- onCategoryClick: onCategoryClick,
189
- suffixel: categorySuffix,
190
- onSuffixelClick: onItemSelect,
191
- selectedIds: selectedIds
192
- })))));
117
+ }, placeholder: searchInputPlaceholder || "", value: searchQuery, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}), color: theme.palette["grey-600"] }), onClearInput: () => setSearchQuery(""), clearTooltip: searchClearTooltip }) }),
118
+ /* @__PURE__ */ jsxs(SearchResults, { visible: !isSearching || filteredPaths && filteredPaths?.length > 0, ref: searchResultsContainer, style: contentStyles, children: [
119
+ isSearching && filteredPaths && /* @__PURE__ */ jsx(CascaderScrollbar, { maxHeight, searching: isSearching, absolute: isSearching, onScroll: ({
120
+ currentTarget
121
+ }) => {
122
+ setScrollTop(currentTarget.scrollTop);
123
+ }, children: /* @__PURE__ */ jsx(BreadcrumbsList, { width: "calc(100% - 8px)", visibleRows: calculateVisibleRows, rowHeight: BREADCRUMB_ITEM_HEIGHT, paths: filteredPaths, highlight: searchQuery, onBreadCrumbClick: handleBreadCrumbClick, scrollTop, selectedIds }) }),
124
+ /* @__PURE__ */ jsx(Navigation, { backActionVisible, breadcrumbVisible: !searchQuery && !!activeCategory.path, onPathClick, onHomeIconClick, previousCategory, activeCategory }),
125
+ !searchQuery && /* @__PURE__ */ jsx("div", { ref: categoriesContainer, children: /* @__PURE__ */ jsx(CascaderScrollbar, { maxHeight: categoriesMaxHeight, searching: isSearching, absolute: isSearching, onScroll: ({
126
+ currentTarget
127
+ }) => {
128
+ setScrollTop(currentTarget.scrollTop);
129
+ }, children: /* @__PURE__ */ jsx(CategoriesList, { rootCategory: activeCategory, onCategoryClick, suffixel: categorySuffix, onSuffixelClick: onItemSelect, selectedIds }) }) })
130
+ ] })
131
+ ] });
132
+ };
133
+ export {
134
+ Cascader,
135
+ Cascader as default
193
136
  };
194
- export default Cascader;
@@ -1,10 +1,10 @@
1
- export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const SearchResults: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const InputWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const SearchResults: import('styled-components').StyledComponent<"div", any, {
3
3
  visible?: boolean;
4
4
  }, never>;
5
- export declare const CascaderScrollbar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<(import("@synerise/ds-scrollbar").ScrollbarProps | import("@synerise/ds-scrollbar").VirtualScrollbarProps) & import("react").RefAttributes<HTMLElement>>, any, {
5
+ export declare const CascaderScrollbar: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<(import('@synerise/ds-scrollbar').ScrollbarProps | import('@synerise/ds-scrollbar').VirtualScrollbarProps) & import('react').RefAttributes<HTMLElement>>, any, {
6
6
  searching?: boolean;
7
7
  }, never>;
8
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
- export declare const BreadcrumbPrefix: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const DividerContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
9
+ export declare const BreadcrumbPrefix: import('styled-components').StyledComponent<"div", any, {}, never>;
10
+ export declare const DividerContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,32 +1,34 @@
1
- import styled from 'styled-components';
2
- import Scrollbar from '@synerise/ds-scrollbar';
3
- export var InputWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import Scrollbar from "@synerise/ds-scrollbar";
3
+ const InputWrapper = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "Cascaderstyles__InputWrapper",
5
5
  componentId: "sc-endrj4-0"
6
6
  })(["box-shadow:0 16px 32px 0 rgba(35,41,54,0.05);"]);
7
- export var SearchResults = styled.div.withConfig({
7
+ const SearchResults = /* @__PURE__ */ styled.div.withConfig({
8
8
  displayName: "Cascaderstyles__SearchResults",
9
9
  componentId: "sc-endrj4-1"
10
- })(["display:", ";width:100%;background:", ";border-radius:0 0 3px 3px;padding:8px 0 8px 8px;box-shadow:0 16px 32px 0 rgba(35,41,54,0.05);z-index:10;"], function (props) {
11
- return !props.visible ? 'none' : 'block';
12
- }, function (props) {
13
- return props.theme.palette.white;
14
- });
15
- export var CascaderScrollbar = styled(Scrollbar).withConfig({
10
+ })(["display:", ";width:100%;background:", ";border-radius:0 0 3px 3px;padding:8px 0 8px 8px;box-shadow:0 16px 32px 0 rgba(35,41,54,0.05);z-index:10;"], (props) => !props.visible ? "none" : "block", (props) => props.theme.palette.white);
11
+ const CascaderScrollbar = /* @__PURE__ */ styled(Scrollbar).withConfig({
16
12
  displayName: "Cascaderstyles__CascaderScrollbar",
17
13
  componentId: "sc-endrj4-2"
18
- })(["padding-right:", ";"], function (props) {
19
- return props.searching ? "0" : '8px';
20
- });
21
- export var Wrapper = styled.div.withConfig({
14
+ })(["padding-right:", ";"], (props) => props.searching ? `0` : "8px");
15
+ const Wrapper = /* @__PURE__ */ styled.div.withConfig({
22
16
  displayName: "Cascaderstyles__Wrapper",
23
17
  componentId: "sc-endrj4-3"
24
18
  })(["&&{.ant-menu-inline,.-inline{border-right:none;}}"]);
25
- export var BreadcrumbPrefix = styled.div.withConfig({
19
+ const BreadcrumbPrefix = /* @__PURE__ */ styled.div.withConfig({
26
20
  displayName: "Cascaderstyles__BreadcrumbPrefix",
27
21
  componentId: "sc-endrj4-4"
28
22
  })([""]);
29
- export var DividerContainer = styled.div.withConfig({
23
+ const DividerContainer = /* @__PURE__ */ styled.div.withConfig({
30
24
  displayName: "Cascaderstyles__DividerContainer",
31
25
  componentId: "sc-endrj4-5"
32
- })(["padding:8px;"]);
26
+ })(["padding:8px;"]);
27
+ export {
28
+ BreadcrumbPrefix,
29
+ CascaderScrollbar,
30
+ DividerContainer,
31
+ InputWrapper,
32
+ SearchResults,
33
+ Wrapper
34
+ };
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ReactNode, ReactText } from 'react';
1
+ import { CSSProperties, ReactNode, ReactText } from 'react';
2
2
  export type Texts = 'searchPlaceholder';
3
3
  export type Category = {
4
4
  id: ReactText;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type BackActionProps } from './BackAction.types';
1
+ import { default as React } from 'react';
2
+ import { BackActionProps } from './BackAction.types';
3
3
  export declare const BackAction: ({ label, onClick }: BackActionProps) => React.JSX.Element;
4
4
  export default BackAction;
@@ -1,17 +1,19 @@
1
- import React from 'react';
2
- import Divider from '@synerise/ds-divider';
3
- import Icon, { ArrowLeftM } from '@synerise/ds-icon';
4
- import { DividerContainer } from '../../Cascader.styles';
5
- import * as S from './BackAction.styles';
6
- export var BackAction = function BackAction(_ref) {
7
- var label = _ref.label,
8
- onClick = _ref.onClick;
9
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.BackActionWrapper, null, /*#__PURE__*/React.createElement(S.ContentWrapper, {
10
- onClick: onClick
11
- }, /*#__PURE__*/React.createElement(S.IconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
12
- component: /*#__PURE__*/React.createElement(ArrowLeftM, null)
13
- })), /*#__PURE__*/React.createElement(S.Label, null, label))), /*#__PURE__*/React.createElement(DividerContainer, null, /*#__PURE__*/React.createElement(Divider, {
14
- dashed: true
15
- })));
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import Divider from "@synerise/ds-divider";
3
+ import Icon, { ArrowLeftM } from "@synerise/ds-icon";
4
+ import { DividerContainer } from "../../Cascader.styles.js";
5
+ import { BackActionWrapper, ContentWrapper, IconWrapper, Label } from "./BackAction.styles.js";
6
+ const BackAction = ({
7
+ label,
8
+ onClick
9
+ }) => /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ /* @__PURE__ */ jsx(BackActionWrapper, { children: /* @__PURE__ */ jsxs(ContentWrapper, { onClick, children: [
11
+ /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(ArrowLeftM, {}) }) }),
12
+ /* @__PURE__ */ jsx(Label, { children: label })
13
+ ] }) }),
14
+ /* @__PURE__ */ jsx(DividerContainer, { children: /* @__PURE__ */ jsx(Divider, { dashed: true }) })
15
+ ] });
16
+ export {
17
+ BackAction,
18
+ BackAction as default
16
19
  };
17
- export default BackAction;
@@ -1,4 +1,4 @@
1
- export declare const Label: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const BackActionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const ContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const Label: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const BackActionWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const ContentWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,25 +1,23 @@
1
- import styled from 'styled-components';
2
- export var Label = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const Label = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "BackActionstyles__Label",
4
4
  componentId: "sc-mg8442-0"
5
- })(["font-weight:500;font-size:14px;transition:color 0.3s ease;color:", ";"], function (props) {
6
- return props.theme.palette['grey-700'];
7
- });
8
- export var IconWrapper = styled.div.withConfig({
5
+ })(["font-weight:500;font-size:14px;transition:color 0.3s ease;color:", ";"], (props) => props.theme.palette["grey-700"]);
6
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
9
7
  displayName: "BackActionstyles__IconWrapper",
10
8
  componentId: "sc-mg8442-1"
11
- })(["margin-right:12px;svg{transition:fill 0.3s ease;fill:", ";}"], function (props) {
12
- return props.theme.palette['grey-700'];
13
- });
14
- export var BackActionWrapper = styled.div.withConfig({
9
+ })(["margin-right:12px;svg{transition:fill 0.3s ease;fill:", ";}"], (props) => props.theme.palette["grey-700"]);
10
+ const BackActionWrapper = /* @__PURE__ */ styled.div.withConfig({
15
11
  displayName: "BackActionstyles__BackActionWrapper",
16
12
  componentId: "sc-mg8442-2"
17
- })(["padding:0 8px;&:hover{", "{color:", ";}", "{color:", ";}}"], Label, function (props) {
18
- return props.theme.palette['blue-600'];
19
- }, IconWrapper, function (props) {
20
- return props.theme.palette['blue-600'];
21
- });
22
- export var ContentWrapper = styled.div.withConfig({
13
+ })(["padding:0 8px;&:hover{", "{color:", ";}", "{color:", ";}}"], Label, (props) => props.theme.palette["blue-600"], IconWrapper, (props) => props.theme.palette["blue-600"]);
14
+ const ContentWrapper = /* @__PURE__ */ styled.div.withConfig({
23
15
  displayName: "BackActionstyles__ContentWrapper",
24
16
  componentId: "sc-mg8442-3"
25
- })(["padding:8px 0;display:flex;align-items:center;cursor:pointer;"]);
17
+ })(["padding:8px 0;display:flex;align-items:center;cursor:pointer;"]);
18
+ export {
19
+ BackActionWrapper,
20
+ ContentWrapper,
21
+ IconWrapper,
22
+ Label
23
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type BackActionProps = {
3
3
  label: ReactNode;
4
4
  onClick: () => void;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type BottomActionProps } from './BottomAction.types';
1
+ import { default as React } from 'react';
2
+ import { BottomActionProps } from './BottomAction.types';
3
3
  export declare const BottomAction: ({ onClickAction, children, icon, }: BottomActionProps) => React.JSX.Element;
4
4
  export default BottomAction;
@@ -1,14 +1,15 @@
1
- import React from 'react';
2
- import Icon from '@synerise/ds-icon';
3
- import * as S from './BottomAction.styles';
4
- export var BottomAction = function BottomAction(_ref) {
5
- var onClickAction = _ref.onClickAction,
6
- children = _ref.children,
7
- icon = _ref.icon;
8
- return /*#__PURE__*/React.createElement(S.BottomAction, {
9
- onClick: onClickAction
10
- }, icon && /*#__PURE__*/React.createElement(S.IconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
11
- component: icon
12
- })), /*#__PURE__*/React.createElement(S.TextWrapper, null, children));
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import Icon from "@synerise/ds-icon";
3
+ import { BottomAction as BottomAction$1, IconWrapper, TextWrapper } from "./BottomAction.styles.js";
4
+ const BottomAction = ({
5
+ onClickAction,
6
+ children,
7
+ icon
8
+ }) => /* @__PURE__ */ jsxs(BottomAction$1, { onClick: onClickAction, children: [
9
+ icon && /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(Icon, { component: icon }) }),
10
+ /* @__PURE__ */ jsx(TextWrapper, { children })
11
+ ] });
12
+ export {
13
+ BottomAction,
14
+ BottomAction as default
13
15
  };
14
- export default BottomAction;
@@ -1,3 +1,3 @@
1
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const TextWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const BottomAction: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const TextWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const BottomAction: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,21 +1,18 @@
1
- import styled from 'styled-components';
2
- export var IconWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "BottomActionstyles__IconWrapper",
4
4
  componentId: "sc-rp021x-0"
5
- })(["margin-right:4px;svg{fill:", ";}"], function (props) {
6
- return props.theme.palette['grey-600'];
7
- });
8
- export var TextWrapper = styled.div.withConfig({
5
+ })(["margin-right:4px;svg{fill:", ";}"], (props) => props.theme.palette["grey-600"]);
6
+ const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
9
7
  displayName: "BottomActionstyles__TextWrapper",
10
8
  componentId: "sc-rp021x-1"
11
9
  })(["line-height:12px;"]);
12
- export var BottomAction = styled.div.withConfig({
10
+ const BottomAction = /* @__PURE__ */ styled.div.withConfig({
13
11
  displayName: "BottomActionstyles__BottomAction",
14
12
  componentId: "sc-rp021x-2"
15
- })(["background-color:", ";padding:0 16px;height:52px;display:flex;align-items:center;color:", ";font-weight:500;border-width:1px 0 0 0;border-color:", ";border-style:solid;margin-top:8px;cursor:pointer;"], function (props) {
16
- return props.theme.palette['grey-050'];
17
- }, function (props) {
18
- return props.theme.palette['grey-600'];
19
- }, function (props) {
20
- return props.theme.palette['grey-100'];
21
- });
13
+ })(["background-color:", ";padding:0 16px;height:52px;display:flex;align-items:center;color:", ";font-weight:500;border-width:1px 0 0 0;border-color:", ";border-style:solid;margin-top:8px;cursor:pointer;"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-100"]);
14
+ export {
15
+ BottomAction,
16
+ IconWrapper,
17
+ TextWrapper
18
+ };
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  export type BottomActionProps = {
3
3
  onClickAction: () => void;
4
4
  icon?: ReactElement;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type BreadcrumbProps } from './Breadcrumb.types';
1
+ import { default as React } from 'react';
2
+ import { BreadcrumbProps } from './Breadcrumb.types';
3
3
  export declare const Breadcrumb: ({ path, disabled, highlight, description, onPathClick, compact, startWithArrow, gradientOverlap, highlightActivePath, className, prefixel, isNavigation, ...rest }: BreadcrumbProps) => React.JSX.Element;
4
4
  export default Breadcrumb;