@kommo-crm/crm-react-ui-kit 1.14.2 → 1.15.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.
Files changed (52) hide show
  1. package/dist/assets/DropdownList.css +1 -0
  2. package/dist/assets/Item2.css +1 -1
  3. package/dist/assets/Item3.css +1 -1
  4. package/dist/assets/Item4.css +1 -0
  5. package/dist/assets/List.css +1 -1
  6. package/dist/components/Accordion/components/Item/Item.js +1 -1
  7. package/dist/components/ContextMenu/components/Item/Item.js +1 -1
  8. package/dist/components/DropdownList/DropdownList.d.ts +4 -0
  9. package/dist/components/DropdownList/DropdownList.d.ts.map +1 -0
  10. package/dist/components/DropdownList/DropdownList.js +55 -0
  11. package/dist/components/DropdownList/DropdownList.props.d.ts +41 -0
  12. package/dist/components/DropdownList/DropdownList.props.d.ts.map +1 -0
  13. package/dist/components/DropdownList/DropdownList.props.js +1 -0
  14. package/dist/components/DropdownList/DropdownList.theme.d.ts +7 -0
  15. package/dist/components/DropdownList/DropdownList.theme.d.ts.map +1 -0
  16. package/dist/components/{List/List.theme.js → DropdownList/DropdownList.theme.js} +1 -1
  17. package/dist/components/DropdownList/index.d.ts +4 -0
  18. package/dist/components/DropdownList/index.d.ts.map +1 -0
  19. package/dist/components/DropdownList/index.js +6 -0
  20. package/dist/components/List/List.d.ts +3 -1
  21. package/dist/components/List/List.d.ts.map +1 -1
  22. package/dist/components/List/List.js +26 -46
  23. package/dist/components/List/List.props.d.ts +13 -35
  24. package/dist/components/List/List.props.d.ts.map +1 -1
  25. package/dist/components/List/components/Item/Item.d.ts +4 -0
  26. package/dist/components/List/components/Item/Item.d.ts.map +1 -0
  27. package/dist/components/List/components/Item/Item.js +13 -0
  28. package/dist/components/List/components/Item/Item.props.d.ts +10 -0
  29. package/dist/components/List/components/Item/Item.props.d.ts.map +1 -0
  30. package/dist/components/List/components/Item/Item.props.js +1 -0
  31. package/dist/components/List/components/Item/index.d.ts +3 -0
  32. package/dist/components/List/components/Item/index.d.ts.map +1 -0
  33. package/dist/components/List/components/Item/index.js +4 -0
  34. package/dist/components/List/index.d.ts +2 -2
  35. package/dist/components/List/index.d.ts.map +1 -1
  36. package/dist/components/List/index.js +2 -4
  37. package/dist/components/Select/components/List/List.d.ts +1 -1
  38. package/dist/components/Select/components/List/List.d.ts.map +1 -1
  39. package/dist/components/Select/components/List/List.js +15 -15
  40. package/dist/components/Select/components/List/List.props.d.ts +1 -1
  41. package/dist/components/Select/components/List/List.props.d.ts.map +1 -1
  42. package/dist/components/Select/index.d.ts +2 -2
  43. package/dist/components/Select/index.d.ts.map +1 -1
  44. package/dist/components/Select/index.js +2 -2
  45. package/dist/components/Text/Text.d.ts +1 -1
  46. package/dist/components/Text/Text.d.ts.map +1 -1
  47. package/dist/components/Text/Text.js +25 -24
  48. package/dist/components/Text/Text.props.d.ts +1 -0
  49. package/dist/components/Text/Text.props.d.ts.map +1 -1
  50. package/package.json +7 -2
  51. package/dist/components/List/List.theme.d.ts +0 -7
  52. package/dist/components/List/List.theme.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ ._list_133sa_1{display:none;z-index:"auto";-webkit-overflow-scrolling:touch;padding:0;margin:0;color:var(--crm-ui-kit-list-color)}._opened_133sa_11{position:absolute;top:var(--crm-ui-kit-list-top);left:var(--crm-ui-kit-list-left);overflow:auto;display:block;width:var(--crm-ui-kit-list-width);max-height:var(--crm-ui-kit-list-max-height);padding-right:var(--crm-ui-kit-list-padding-right);margin-right:var(--crm-ui-kit-list-margin-right);box-sizing:content-box;background-color:var(--crm-ui-kit-list-background-color);border-width:var(--crm-ui-kit-list-border-width);border-style:var(--crm-ui-kit-list-border-style);border-color:var(--crm-ui-kit-list-border-color);border-radius:var(--crm-ui-kit-list-border-radius);outline:var(--crm-ui-kit-list-outline);z-index:var(--crm-ui-kit-list-z-index)}
@@ -1 +1 @@
1
- ._item_18s81_1{position:relative;display:flex;align-items:center;padding:10px 16px;color:var(--crm-ui-kit-palette-text-primary);background-color:var(--crm-ui-kit-palette-background-primary);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;text-decoration:none}._item_18s81_1[data-highlighted]{background-color:var(--crm-ui-kit-palette-background-default)}._item_18s81_1._danger_18s81_17{color:var(--crm-ui-kit-color-error)}._item_18s81_1._nonSelectable_18s81_21{cursor:auto;-webkit-user-select:text;user-select:text}._item_18s81_1._disabled_18s81_26{color:var(--crm-ui-kit-palette-text-secondary-light);cursor:auto}
1
+ ._item_h1do7_1{margin:0;padding:0}
@@ -1 +1 @@
1
- ._wrapper_1l5nn_1{margin-bottom:var(--crm-ui-kit-accordion-item-margin-bottom);background-color:var(--crm-ui-kit-accordion-item-background-color);border:1px solid var(--crm-ui-kit-accordion-item-border-color);border-radius:var(--crm-ui-kit-accordion-item-border-radius);box-shadow:var(--crm-ui-kit-accordion-item-box-shadow)}._wrapper_1l5nn_1:last-child{margin-bottom:0}._header_1l5nn_13{display:flex;align-items:center;justify-content:space-between;padding:var(--crm-ui-kit-accordion-item-padding)}._header_left_1l5nn_20{overflow:hidden;display:flex;align-items:center;width:100%}._before_title_1l5nn_27{display:flex;align-items:center;justify-content:center;margin-right:12px}._chevron_container_1l5nn_34{transform:rotate(-90deg);display:flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:auto}._chevron_icon_1l5nn_44{color:var(--crm-ui-kit-accordion-item-chevron-icon-color)}._content_1l5nn_48{padding:var(--crm-ui-kit-accordion-item-padding);padding-top:0;word-break:break-word}._active_1l5nn_54 ._content_1l5nn_48{display:block}._active_1l5nn_54 ._chevron_container_1l5nn_34{transform:rotate(0)}._content_1l5nn_48{display:none}
1
+ ._item_18s81_1{position:relative;display:flex;align-items:center;padding:10px 16px;color:var(--crm-ui-kit-palette-text-primary);background-color:var(--crm-ui-kit-palette-background-primary);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;text-decoration:none}._item_18s81_1[data-highlighted]{background-color:var(--crm-ui-kit-palette-background-default)}._item_18s81_1._danger_18s81_17{color:var(--crm-ui-kit-color-error)}._item_18s81_1._nonSelectable_18s81_21{cursor:auto;-webkit-user-select:text;user-select:text}._item_18s81_1._disabled_18s81_26{color:var(--crm-ui-kit-palette-text-secondary-light);cursor:auto}
@@ -0,0 +1 @@
1
+ ._wrapper_1l5nn_1{margin-bottom:var(--crm-ui-kit-accordion-item-margin-bottom);background-color:var(--crm-ui-kit-accordion-item-background-color);border:1px solid var(--crm-ui-kit-accordion-item-border-color);border-radius:var(--crm-ui-kit-accordion-item-border-radius);box-shadow:var(--crm-ui-kit-accordion-item-box-shadow)}._wrapper_1l5nn_1:last-child{margin-bottom:0}._header_1l5nn_13{display:flex;align-items:center;justify-content:space-between;padding:var(--crm-ui-kit-accordion-item-padding)}._header_left_1l5nn_20{overflow:hidden;display:flex;align-items:center;width:100%}._before_title_1l5nn_27{display:flex;align-items:center;justify-content:center;margin-right:12px}._chevron_container_1l5nn_34{transform:rotate(-90deg);display:flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:auto}._chevron_icon_1l5nn_44{color:var(--crm-ui-kit-accordion-item-chevron-icon-color)}._content_1l5nn_48{padding:var(--crm-ui-kit-accordion-item-padding);padding-top:0;word-break:break-word}._active_1l5nn_54 ._content_1l5nn_48{display:block}._active_1l5nn_54 ._chevron_container_1l5nn_34{transform:rotate(0)}._content_1l5nn_48{display:none}
@@ -1 +1 @@
1
- ._list_133sa_1{display:none;z-index:"auto";-webkit-overflow-scrolling:touch;padding:0;margin:0;color:var(--crm-ui-kit-list-color)}._opened_133sa_11{position:absolute;top:var(--crm-ui-kit-list-top);left:var(--crm-ui-kit-list-left);overflow:auto;display:block;width:var(--crm-ui-kit-list-width);max-height:var(--crm-ui-kit-list-max-height);padding-right:var(--crm-ui-kit-list-padding-right);margin-right:var(--crm-ui-kit-list-margin-right);box-sizing:content-box;background-color:var(--crm-ui-kit-list-background-color);border-width:var(--crm-ui-kit-list-border-width);border-style:var(--crm-ui-kit-list-border-style);border-color:var(--crm-ui-kit-list-border-color);border-radius:var(--crm-ui-kit-list-border-radius);outline:var(--crm-ui-kit-list-outline);z-index:var(--crm-ui-kit-list-z-index)}
1
+ ._list_1394u_1{margin:0;padding-inline-start:24px;font-family:var(--crm-ui-kit-text-font),Arial,sans-serif;color:var(--crm-ui-kit-text-color)}._bulleted_1394u_9,._bulleted_1394u_9 ._bulleted_1394u_9{list-style-type:disc}._numbered_1394u_14{list-style-type:decimal}._numbered_1394u_14 ._numbered_1394u_14{list-style-type:lower-alpha}._numbered_1394u_14 ._numbered_1394u_14 ._numbered_1394u_14{list-style-type:lower-roman}._list_1394u_1>li+li,._list_1394u_1>li>._list_1394u_1{margin-top:8px}
@@ -6,7 +6,7 @@ import { useThemeClassName as C } from "../../../../hooks/useThemeClassName/useT
6
6
  import { Text as A } from "../../../Text/Text.js";
7
7
  import { TextPrimaryTheme as g } from "../../../Text/Text.themes.js";
8
8
  import { useAccordionContext as b } from "../../Accordion.context.js";
9
- import '../../../../assets/Item3.css';const y = (r) => /* @__PURE__ */ s.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 7, fill: "none", ...r }, /* @__PURE__ */ s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M.176.78a.574.574 0 0 1 .857 0L4.96 5.058 8.967.692a.573.573 0 0 1 .857 0 .705.705 0 0 1 0 .933L5.485 6.351a.603.603 0 0 1-.14.114.573.573 0 0 1-.83-.026L.175 1.713a.706.706 0 0 1 0-.933Z", clipRule: "evenodd" })), E = "_wrapper_1l5nn_1", L = "_header_1l5nn_13", R = "_header_left_1l5nn_20", T = "_before_title_1l5nn_27", I = "_chevron_container_1l5nn_34", j = "_chevron_icon_1l5nn_44", k = "_content_1l5nn_48", D = "_active_1l5nn_54", e = {
9
+ import '../../../../assets/Item4.css';const y = (r) => /* @__PURE__ */ s.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 7, fill: "none", ...r }, /* @__PURE__ */ s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M.176.78a.574.574 0 0 1 .857 0L4.96 5.058 8.967.692a.573.573 0 0 1 .857 0 .705.705 0 0 1 0 .933L5.485 6.351a.603.603 0 0 1-.14.114.573.573 0 0 1-.83-.026L.175 1.713a.706.706 0 0 1 0-.933Z", clipRule: "evenodd" })), E = "_wrapper_1l5nn_1", L = "_header_1l5nn_13", R = "_header_left_1l5nn_20", T = "_before_title_1l5nn_27", I = "_chevron_container_1l5nn_34", j = "_chevron_icon_1l5nn_44", k = "_content_1l5nn_48", D = "_active_1l5nn_54", e = {
10
10
  wrapper: E,
11
11
  header: L,
12
12
  header_left: R,
@@ -11,7 +11,7 @@ import { useItemInnerFocus as te } from "../../hooks/useItemInnerFocus/useItemIn
11
11
  import { useContextMenuItemFocus as se } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
12
12
  import { useContextMenuRootContext as re } from "../../ContextMenu.context.js";
13
13
  import { NonSelectableItem as le } from "./components/NonSelectableItem/NonSelectableItem.js";
14
- import '../../../../assets/Item2.css';const ae = "_item_18s81_1", ie = "_danger_18s81_17", ue = "_nonSelectable_18s81_21", de = "_disabled_18s81_26", n = {
14
+ import '../../../../assets/Item3.css';const ae = "_item_18s81_1", ie = "_danger_18s81_17", ue = "_nonSelectable_18s81_21", de = "_disabled_18s81_26", n = {
15
15
  item: ae,
16
16
  danger: ie,
17
17
  nonSelectable: ue,
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownListProps } from './DropdownList.props';
3
+ export declare const DropdownList: React.ForwardRefExoticComponent<DropdownListProps & React.RefAttributes<HTMLUListElement>>;
4
+ //# sourceMappingURL=DropdownList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownList.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/DropdownList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAOzD,eAAO,MAAM,YAAY,4FA+CvB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _ } from "react/jsx-runtime";
2
+ import N, { forwardRef as g } from "react";
3
+ import { c as u } from "../../index-L8X2o7IH.mjs";
4
+ import { c as x } from "../../index-DBS3EIVR.mjs";
5
+ import { useThemeClassName as C } from "../../hooks/useThemeClassName/useThemeClassName.js";
6
+ import { CustomScrollClassName as w } from "../../stylesheets/utils/BaseClasses/BaseClasses.js";
7
+ import { noop as o } from "../../utils/noop/noop.js";
8
+ import '../../assets/DropdownList.css';const y = "_list_133sa_1", L = "_opened_133sa_11", n = {
9
+ list: y,
10
+ opened: L
11
+ }, v = g((r, s) => {
12
+ const {
13
+ className: a = "",
14
+ theme: m,
15
+ children: t,
16
+ isOpened: e,
17
+ hoveredIndex: i = 0,
18
+ onSelect: l = o,
19
+ onToggle: d = o,
20
+ onHoveredIndexChange: p = o,
21
+ ...c
22
+ } = r, f = C(m), { onKeyDown: h } = x({
23
+ itemsLength: N.Children.toArray(t).length,
24
+ onSelect: l,
25
+ onToggle: d,
26
+ isOpened: e,
27
+ listRef: s,
28
+ hoveredIndex: i,
29
+ onHoveredIndexChange: p
30
+ });
31
+ return e && /* @__PURE__ */ _(
32
+ "ul",
33
+ {
34
+ onKeyDown: h,
35
+ ref: s,
36
+ tabIndex: 0,
37
+ className: u(
38
+ w,
39
+ n.list,
40
+ f,
41
+ {
42
+ [n.opened]: e
43
+ },
44
+ a
45
+ ),
46
+ role: "list",
47
+ ...c,
48
+ children: t
49
+ }
50
+ );
51
+ });
52
+ v.displayName = "DropdownList";
53
+ export {
54
+ v as DropdownList
55
+ };
@@ -0,0 +1,41 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { DropdownListThemeType } from './DropdownList.theme';
3
+ export interface DropdownListProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onSelect'> {
4
+ /**
5
+ * Object with CSS theme properties.
6
+ */
7
+ theme: DropdownListThemeType;
8
+ /**
9
+ * Child elements that will be displayed inside the component.
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * Custom CSS class for component.
14
+ */
15
+ className?: string;
16
+ /**
17
+ * Custom CSS class for a list item.
18
+ */
19
+ itemClassName?: string;
20
+ /**
21
+ * Flag indicates whether the component is in the open state.
22
+ */
23
+ isOpened?: boolean;
24
+ /**
25
+ * A callback that works on selecting a list item.
26
+ */
27
+ onSelect?: (index: number) => void;
28
+ /**
29
+ * A callback that works on opening/closing a component.
30
+ */
31
+ onToggle?: (toggle: boolean) => void;
32
+ /**
33
+ * A callback that works on changing the active element in the list.
34
+ */
35
+ onHoveredIndexChange?: (index: number) => void;
36
+ /**
37
+ * Index of the hovered element.
38
+ */
39
+ hoveredIndex?: number;
40
+ }
41
+ //# sourceMappingURL=DropdownList.props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownList.props.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/DropdownList.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC1D;;OAEG;IACH,KAAK,EAAE,qBAAqB,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,7 @@
1
+ type DropdownListThemeKey = '--crm-ui-kit-list-top' | '--crm-ui-kit-list-max-height' | '--crm-ui-kit-list-width' | '--crm-ui-kit-list-border-radius' | '--crm-ui-kit-list-border-color' | '--crm-ui-kit-list-background-color' | '--crm-ui-kit-list-left' | '--crm-ui-kit-list-padding-right' | '--crm-ui-kit-list-margin-right' | '--crm-ui-kit-list-border-width' | '--crm-ui-kit-list-outline' | '--crm-ui-kit-list-z-index' | '--crm-ui-kit-list-border-style' | '--crm-ui-kit-list-color';
2
+ export type DropdownListThemeType = {
3
+ [K in DropdownListThemeKey]: string;
4
+ };
5
+ export declare const DropdownListTheme: DropdownListThemeType;
6
+ export {};
7
+ //# sourceMappingURL=DropdownList.theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownList.theme.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/DropdownList.theme.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GACrB,uBAAuB,GACvB,8BAA8B,GAC9B,yBAAyB,GACzB,iCAAiC,GACjC,gCAAgC,GAChC,oCAAoC,GACpC,wBAAwB,GACxB,iCAAiC,GACjC,gCAAgC,GAChC,gCAAgC,GAChC,2BAA2B,GAC3B,2BAA2B,GAC3B,gCAAgC,GAChC,yBAAyB,CAAC;AAE9B,MAAM,MAAM,qBAAqB,GAAG;KACjC,CAAC,IAAI,oBAAoB,GAAG,MAAM;CACpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,qBAgB/B,CAAC"}
@@ -15,5 +15,5 @@ const i = {
15
15
  "--crm-ui-kit-list-color": "var(--crm-ui-kit-palette-text-primary)"
16
16
  };
17
17
  export {
18
- i as ListTheme
18
+ i as DropdownListTheme
19
19
  };
@@ -0,0 +1,4 @@
1
+ export { DropdownList } from './DropdownList';
2
+ export { type DropdownListProps } from './DropdownList.props';
3
+ export { DropdownListTheme, type DropdownListThemeType, } from './DropdownList.theme';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DropdownList as e } from "./DropdownList.js";
2
+ import { DropdownListTheme as t } from "./DropdownList.theme.js";
3
+ export {
4
+ e as DropdownList,
5
+ t as DropdownListTheme
6
+ };
@@ -1,4 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { ListProps } from './List.props';
3
- export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLUListElement>>;
3
+ export declare const List: React.ForwardRefExoticComponent<Omit<ListProps, "ref"> & React.RefAttributes<HTMLElement>> & {
4
+ Item: React.ForwardRefExoticComponent<Omit<import('./components/Item').ItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
5
+ };
4
6
  //# sourceMappingURL=List.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,eAAO,MAAM,IAAI,oFA+Cf,CAAC"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAY,MAAM,cAAc,CAAC;AAkCnD,eAAO,MAAM,IAAI;;CAAoC,CAAC"}
@@ -1,55 +1,35 @@
1
- import { jsx as _ } from "react/jsx-runtime";
2
- import N, { forwardRef as g } from "react";
3
- import { c as u } from "../../index-L8X2o7IH.mjs";
4
- import { c as x } from "../../index-DBS3EIVR.mjs";
5
- import { useThemeClassName as C } from "../../hooks/useThemeClassName/useThemeClassName.js";
6
- import { CustomScrollClassName as y } from "../../stylesheets/utils/BaseClasses/BaseClasses.js";
7
- import { noop as o } from "../../utils/noop/noop.js";
8
- import '../../assets/List.css';const L = "_list_133sa_1", v = "_opened_133sa_11", n = {
9
- list: L,
10
- opened: v
11
- }, I = g((r, s) => {
12
- const {
13
- className: a = "",
14
- theme: m,
15
- children: t,
16
- isOpened: e,
17
- hoveredIndex: i = 0,
18
- onSelect: l = o,
19
- onToggle: c = o,
20
- onHoveredIndexChange: d = o,
21
- ...p
22
- } = r, f = C(m), { onKeyDown: h } = x({
23
- itemsLength: N.Children.toArray(t).length,
24
- onSelect: l,
25
- onToggle: c,
26
- isOpened: e,
27
- listRef: s,
28
- hoveredIndex: i,
29
- onHoveredIndexChange: d
30
- });
31
- return e && /* @__PURE__ */ _(
32
- "ul",
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ import { c as i } from "../../index-L8X2o7IH.mjs";
4
+ import { Item as b } from "./components/Item/Item.js";
5
+ import '../../assets/List.css';const a = "_list_1394u_1", _ = "_bulleted_1394u_9", p = "_numbered_1394u_14", t = {
6
+ list: a,
7
+ bulleted: _,
8
+ numbered: p
9
+ }, f = {
10
+ bulleted: "ul",
11
+ numbered: "ol"
12
+ }, s = d((l, r) => {
13
+ const { type: e, className: o = "", children: m, ...n } = l, u = f[e];
14
+ return /* @__PURE__ */ c(
15
+ u,
33
16
  {
34
- onKeyDown: h,
35
- ref: s,
36
- tabIndex: 0,
37
- className: u(
38
- y,
39
- n.list,
40
- f,
17
+ ref: r,
18
+ className: i(
19
+ t.list,
41
20
  {
42
- [n.opened]: e
21
+ [t.bulleted]: e === "bulleted",
22
+ [t.numbered]: e === "numbered"
43
23
  },
44
- a
24
+ o
45
25
  ),
46
- role: "list",
47
- ...p,
48
- children: t
26
+ ...n,
27
+ children: m
49
28
  }
50
29
  );
51
30
  });
52
- I.displayName = "List";
31
+ s.displayName = "List";
32
+ const j = Object.assign(s, { Item: b });
53
33
  export {
54
- I as List
34
+ j as List
55
35
  };
@@ -1,41 +1,19 @@
1
- import { HTMLAttributes } from 'react';
2
- import { ListThemeType } from './List.theme';
3
- export interface ListProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onSelect'> {
1
+ import { default as React } from 'react';
2
+ type ListAttributes = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3
+ export type ListType = 'bulleted' | 'numbered';
4
+ export interface ListProps extends Omit<ListAttributes, 'type'> {
4
5
  /**
5
- * Object with CSS theme properties.
6
+ * The list type.
7
+ *
8
+ * - `bulleted` - unordered list, used when item order does not matter.
9
+ * - `numbered` - ordered list, used when item order is meaningful.
10
+ *
6
11
  */
7
- theme: ListThemeType;
12
+ type: ListType;
8
13
  /**
9
- * Child elements that will be displayed inside the component.
14
+ * Items content. Use `List.Item` or another nested `List`.
10
15
  */
11
- children: React.ReactNode;
12
- /**
13
- * Custom CSS class for component.
14
- */
15
- className?: string;
16
- /**
17
- * Custom CSS class for a list item.
18
- */
19
- itemClassName?: string;
20
- /**
21
- * Flag indicates whether the component is in the open state.
22
- */
23
- isOpened?: boolean;
24
- /**
25
- * A callback that works on selecting a list item.
26
- */
27
- onSelect?: (index: number) => void;
28
- /**
29
- * A callback that works on opening/closing a component.
30
- */
31
- onToggle?: (toggle: boolean) => void;
32
- /**
33
- * A callback that works on changing the active element in the list.
34
- */
35
- onHoveredIndexChange?: (index: number) => void;
36
- /**
37
- * Index of the hovered element.
38
- */
39
- hoveredIndex?: number;
16
+ children?: React.ReactNode;
40
17
  }
18
+ export {};
41
19
  //# sourceMappingURL=List.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.props.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC1D;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"List.props.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAC3C,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC7D;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ItemProps } from './Item.props';
3
+ export declare const Item: React.ForwardRefExoticComponent<Omit<ItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
4
+ //# sourceMappingURL=Item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,eAAO,MAAM,IAAI,8FAQf,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { c } from "../../../../index-L8X2o7IH.mjs";
4
+ import '../../../../assets/Item2.css';const a = "_item_h1do7_1", n = {
5
+ item: a
6
+ }, f = "List.Item", l = i((t, m) => {
7
+ const { className: s = "", children: e, ...o } = t;
8
+ return /* @__PURE__ */ r("li", { ref: m, className: c(n.item, s), ...o, children: e });
9
+ });
10
+ l.displayName = f;
11
+ export {
12
+ l as Item
13
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ type LiAttributes = React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
3
+ export interface ItemProps extends LiAttributes {
4
+ /**
5
+ * Item content. Can be plain text or a nested `List`.
6
+ */
7
+ children?: React.ReactNode;
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=Item.props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/Item/Item.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,YAAY,GAAG,KAAK,CAAC,iBAAiB,CACzC,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EACrC,aAAa,CACd,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ export { Item } from './Item';
2
+ export { type ItemProps } from './Item.props';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/Item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Item as o } from "./Item.js";
2
+ export {
3
+ o as Item
4
+ };
@@ -1,4 +1,4 @@
1
1
  export { List } from './List';
2
- export { type ListProps } from './List.props';
3
- export { ListTheme, type ListThemeType } from './List.theme';
2
+ export { type ListProps, type ListType } from './List.props';
3
+ export { type ItemProps } from './components/Item';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,6 +1,4 @@
1
- import { List as r } from "./List.js";
2
- import { ListTheme as m } from "./List.theme.js";
1
+ import { List as t } from "./List.js";
3
2
  export {
4
- r as List,
5
- m as ListTheme
3
+ t as List
6
4
  };
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ListPortalProps } from './List.props';
3
- export declare const List: React.ForwardRefExoticComponent<import('../../../List').ListProps & ListPortalProps & React.RefAttributes<HTMLUListElement>>;
3
+ export declare const List: React.ForwardRefExoticComponent<import('../../../DropdownList').DropdownListProps & ListPortalProps & React.RefAttributes<HTMLUListElement>>;
4
4
  //# sourceMappingURL=List.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,eAAe,EAAa,MAAM,cAAc,CAAC;AAgB1D,eAAO,MAAM,IAAI,oIAsFf,CAAC"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,eAAe,EAAa,MAAM,cAAc,CAAC;AAgB1D,eAAO,MAAM,IAAI,oJAsFf,CAAC"}
@@ -2,22 +2,22 @@ import { jsx as c } from "react/jsx-runtime";
2
2
  import u, { forwardRef as k, useMemo as A, useRef as E, useCallback as m, useEffect as H } from "react";
3
3
  import { u as N } from "../../../../index-DBS3EIVR.mjs";
4
4
  import { Portal as P } from "../../../Portal/Portal.js";
5
- import { List as _ } from "../../../List/List.js";
6
- import { mergeRefs as y } from "../../../../lib/utils.js";
7
- import { noop as T } from "../../../../utils/noop/noop.js";
8
- import { useSelectContext as b } from "../../Select.context.js";
9
- const h = "Select.List", j = (r) => {
10
- const { container: n, children: o } = r;
11
- return n ? /* @__PURE__ */ c(P, { container: n, children: o }) : o;
12
- }, w = k((r, n) => {
13
- const { container: o, children: s, theme: C, className: g } = r, {
5
+ import { DropdownList as _ } from "../../../DropdownList/DropdownList.js";
6
+ import { mergeRefs as w } from "../../../../lib/utils.js";
7
+ import { noop as y } from "../../../../utils/noop/noop.js";
8
+ import { useSelectContext as D } from "../../Select.context.js";
9
+ const h = "Select.List", T = (r) => {
10
+ const { container: o, children: n } = r;
11
+ return o ? /* @__PURE__ */ c(P, { container: o, children: n }) : n;
12
+ }, b = k((r, o) => {
13
+ const { container: n, children: s, theme: C, className: g } = r, {
14
14
  isOpened: t,
15
15
  onOpen: i,
16
16
  onHoveredIndexChange: v,
17
- onChange: d = T,
17
+ onChange: d = y,
18
18
  hoveredIndex: x,
19
19
  value: f
20
- } = b(h), { items: p, itemsMap: I } = A(() => {
20
+ } = D(h), { items: p, itemsMap: I } = A(() => {
21
21
  const e = {};
22
22
  return { items: u.Children.toArray(s).map(
23
23
  (l, M) => u.isValidElement(l) ? (e[l.props.item.value] = M, { ...l.props.item }) : {}
@@ -45,11 +45,11 @@ const h = "Select.List", j = (r) => {
45
45
  return H(() => {
46
46
  var e;
47
47
  t && ((e = a.current) == null || e.focus());
48
- }, [t]), /* @__PURE__ */ c(j, { container: o, children: /* @__PURE__ */ c(
48
+ }, [t]), /* @__PURE__ */ c(T, { container: n, children: /* @__PURE__ */ c(
49
49
  _,
50
50
  {
51
51
  className: g,
52
- ref: y(a, n),
52
+ ref: w(a, o),
53
53
  isOpened: t,
54
54
  theme: C,
55
55
  onHoveredIndexChange: O,
@@ -60,7 +60,7 @@ const h = "Select.List", j = (r) => {
60
60
  }
61
61
  ) });
62
62
  });
63
- w.displayName = h;
63
+ b.displayName = h;
64
64
  export {
65
- w as List
65
+ b as List
66
66
  };
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { ListProps as BaseListProps } from '../../../List';
2
+ import { DropdownListProps as BaseListProps } from '../../../DropdownList';
3
3
  export type ListPortalProps = {
4
4
  /**
5
5
  * Select List.
@@ -1 +1 @@
1
- {"version":3,"file":"List.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"List.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/List/List.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,eAAe,CAAC"}
@@ -1,10 +1,10 @@
1
1
  export { Select } from './Select';
2
2
  export { type SelectProps } from './Select.props';
3
- export { type SelectItem } from './Select.types';
3
+ export { type SelectItem, type StringSelectItem, type ReactElementSelectItem, } from './Select.types';
4
4
  export { SelectRootTheme, type SelectRootThemeType } from './Select.theme';
5
5
  export { SelectItemTheme, type SelectItemThemeType } from './components/Item';
6
6
  export { SelectArrowTheme, type SelectArrowThemeType, } from './components/Arrow';
7
7
  export { SelectIconTheme, type SelectIconThemeType } from './components/Icon';
8
- export { ListTheme as SelectListTheme, type ListThemeType as SelectListThemeType, } from '../List';
8
+ export { DropdownListTheme as SelectListTheme, type DropdownListThemeType as SelectListThemeType, } from '../DropdownList';
9
9
  export { SelectButtonLightTheme, SelectButtonDarkTheme, type SelectButtonThemeType, } from '../SelectButton';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,KAAK,aAAa,IAAI,mBAAmB,GAC1C,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EACL,iBAAiB,IAAI,eAAe,EACpC,KAAK,qBAAqB,IAAI,mBAAmB,GAClD,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC"}
@@ -4,8 +4,8 @@ import "./components/Item/Item.js";
4
4
  import { SelectItemTheme as S } from "./components/Item/Item.theme.js";
5
5
  import { SelectArrowTheme as f } from "./components/Arrow/Arrow.theme.js";
6
6
  import { SelectIconTheme as i } from "./components/Icon/Icon.theme.js";
7
- import "../List/List.js";
8
- import { ListTheme as s } from "../List/List.theme.js";
7
+ import "../DropdownList/DropdownList.js";
8
+ import { DropdownListTheme as s } from "../DropdownList/DropdownList.theme.js";
9
9
  import "../SelectButton/SelectButton.js";
10
10
  import { SelectButtonDarkTheme as a, SelectButtonLightTheme as u } from "../SelectButton/SelectButton.theme.js";
11
11
  export {
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { TextProps } from './Text.props';
3
- export declare const Text: React.ForwardRefExoticComponent<Omit<TextProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
3
+ export declare const Text: React.ForwardRefExoticComponent<Omit<TextProps, "ref"> & React.RefAttributes<HTMLElement>>;
4
4
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAc9C,eAAO,MAAM,IAAI,gGA2Cf,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAc9C,eAAO,MAAM,IAAI,4FA4Cf,CAAC"}
@@ -1,59 +1,60 @@
1
- import { jsx as x } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { c as h } from "../../index-L8X2o7IH.mjs";
4
- import { useThemeClassName as g } from "../../hooks/useThemeClassName/useThemeClassName.js";
5
- import '../../assets/Text.css';const w = "_text_1thgf_1", d = "_ellipsis_1thgf_7", N = "_line_clamp_1thgf_13", C = "_s_1thgf_23", y = "_m_1thgf_28", T = "_ms_1thgf_33", k = "_l_1thgf_13", u = "_xl_1thgf_43", s = {
6
- text: w,
7
- ellipsis: d,
8
- line_clamp: N,
9
- s: C,
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ import { c as g } from "../../index-L8X2o7IH.mjs";
4
+ import { useThemeClassName as w } from "../../hooks/useThemeClassName/useThemeClassName.js";
5
+ import '../../assets/Text.css';const d = "_text_1thgf_1", N = "_ellipsis_1thgf_7", C = "_line_clamp_1thgf_13", T = "_s_1thgf_23", y = "_m_1thgf_28", k = "_ms_1thgf_33", u = "_l_1thgf_13", z = "_xl_1thgf_43", s = {
6
+ text: d,
7
+ ellipsis: N,
8
+ line_clamp: C,
9
+ s: T,
10
10
  m: y,
11
- ms: T,
12
- l: k,
13
- xl: u
14
- }, z = {
11
+ ms: k,
12
+ l: u,
13
+ xl: z
14
+ }, E = {
15
15
  s: s.s,
16
16
  m: s.m,
17
17
  ms: s.ms,
18
18
  l: s.l,
19
19
  xl: s.xl
20
- }, E = f((m, c) => {
20
+ }, L = h((m, c) => {
21
21
  const {
22
+ as: a = "span",
22
23
  children: n,
23
24
  className: o = "",
24
25
  isEllipsis: i = !1,
25
26
  maxRows: e = 1,
26
27
  theme: _,
27
- style: a = {},
28
+ style: r = {},
28
29
  size: t,
29
- ...r
30
- } = m, p = g(_), l = e > 1;
30
+ ...p
31
+ } = m, x = w(_), l = e > 1;
31
32
  switch (t) {
32
33
  case "s":
33
34
  case "m":
34
35
  case "ms":
35
36
  case "l":
36
37
  case "xl":
37
- return /* @__PURE__ */ x(
38
- "span",
38
+ return /* @__PURE__ */ f(
39
+ a,
39
40
  {
40
41
  ref: c,
41
42
  style: {
42
43
  ...l && { WebkitLineClamp: e },
43
- ...a
44
+ ...r
44
45
  },
45
- className: h(s.text, z[t], p, o, {
46
+ className: g(s.text, E[t], x, o, {
46
47
  [s.ellipsis]: i,
47
48
  [s.line_clamp]: l
48
49
  }),
49
- ...r,
50
+ ...p,
50
51
  children: n
51
52
  }
52
53
  );
53
54
  }
54
55
  throw new Error("Unknown size was presented");
55
56
  });
56
- E.displayName = "Text";
57
+ L.displayName = "Text";
57
58
  export {
58
- E as Text
59
+ L as Text
59
60
  };
@@ -3,6 +3,7 @@ import { TextTheme } from './Text.themes';
3
3
  type SpanAttributes = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
4
4
  export type TextSizes = 's' | 'm' | 'ms' | 'l' | 'xl';
5
5
  export interface TextProps extends SpanAttributes {
6
+ as?: React.ElementType;
6
7
  /**
7
8
  * Text size.
8
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Text.props.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,KAAK,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAC3C,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EACrC,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;AAEtD,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C;;;;;;;;OAQG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB"}
1
+ {"version":3,"file":"Text.props.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,KAAK,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAC3C,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EACrC,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;AAEtD,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB;;;;;;;;OAQG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kommo-crm/crm-react-ui-kit",
3
3
  "description": "Ready-to-use React components which implements Kommo design",
4
- "version": "1.14.2",
4
+ "version": "1.15.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "engines": {
@@ -15,6 +15,7 @@
15
15
  "./Switcher": "./dist/components/Switcher/index.js",
16
16
  "./Spinner": "./dist/components/Spinner/index.js",
17
17
  "./Link": "./dist/components/Link/index.js",
18
+ "./List": "./dist/components/List/index.js",
18
19
  "./TextArea": "./dist/components/TextArea/index.js",
19
20
  "./Text": "./dist/components/Text/index.js",
20
21
  "./Input": "./dist/components/Input/index.js",
@@ -52,6 +53,7 @@
52
53
  "./assets/FilterTabs.css": "./dist/assets/FilterTabs.css",
53
54
  "./assets/Button.css": "./dist/assets/Button.css",
54
55
  "./assets/CounterBadge.css": "./dist/assets/CounterBadge.css",
56
+ "./assets/List.css": "./dist/assets/List.css",
55
57
  "./assets/Badge.css": "./dist/assets/Badge.css",
56
58
  "./assets/Separator.css": "./dist/assets/Separator.css",
57
59
  "./assets/theme.css": "./dist/assets/theme.css",
@@ -68,6 +70,9 @@
68
70
  "Link": [
69
71
  "./dist/components/Link/index.d.ts"
70
72
  ],
73
+ "List": [
74
+ "./dist/components/List/index.d.ts"
75
+ ],
71
76
  "TextArea": [
72
77
  "./dist/components/TextArea/index.d.ts"
73
78
  ],
@@ -238,4 +243,4 @@
238
243
  "react-dom": "^18.0"
239
244
  },
240
245
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
241
- }
246
+ }
@@ -1,7 +0,0 @@
1
- type ListThemeKey = '--crm-ui-kit-list-top' | '--crm-ui-kit-list-max-height' | '--crm-ui-kit-list-width' | '--crm-ui-kit-list-border-radius' | '--crm-ui-kit-list-border-color' | '--crm-ui-kit-list-background-color' | '--crm-ui-kit-list-left' | '--crm-ui-kit-list-padding-right' | '--crm-ui-kit-list-margin-right' | '--crm-ui-kit-list-border-width' | '--crm-ui-kit-list-outline' | '--crm-ui-kit-list-z-index' | '--crm-ui-kit-list-border-style' | '--crm-ui-kit-list-color';
2
- export type ListThemeType = {
3
- [K in ListThemeKey]: string;
4
- };
5
- export declare const ListTheme: ListThemeType;
6
- export {};
7
- //# sourceMappingURL=List.theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"List.theme.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.theme.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GACb,uBAAuB,GACvB,8BAA8B,GAC9B,yBAAyB,GACzB,iCAAiC,GACjC,gCAAgC,GAChC,oCAAoC,GACpC,wBAAwB,GACxB,iCAAiC,GACjC,gCAAgC,GAChC,gCAAgC,GAChC,2BAA2B,GAC3B,2BAA2B,GAC3B,gCAAgC,GAChC,yBAAyB,CAAC;AAE9B,MAAM,MAAM,aAAa,GAAG;KACzB,CAAC,IAAI,YAAY,GAAG,MAAM;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,aAgBvB,CAAC"}