skillgrid 0.0.89 → 0.0.91-dev-68351-trigger-fixes.1793976

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 (48) hide show
  1. package/dist/assets/components/FileUpload/FileUpload.module-CL_LDrLs.css +1 -0
  2. package/dist/assets/components/Modal/Modal.module-x_YFLlra.css +1 -0
  3. package/dist/assets/components/Trigger/Trigger.module-Dc9gMp3_.css +1 -0
  4. package/dist/assets/icons/development/code-browser-outlined.svg.js +1 -1
  5. package/dist/assets/icons/development/code-close-outlined.svg.js +1 -1
  6. package/dist/assets/icons/development/code-outlined.svg.js +1 -1
  7. package/dist/assets/icons/development/cube-outlined.svg.js +1 -1
  8. package/dist/assets/icons/development/dataflow-outlined.svg.js +1 -1
  9. package/dist/assets/icons/development/terminal-square-outlined.svg.js +2 -2
  10. package/dist/assets/icons/general/award-outlined.svg.js +1 -1
  11. package/dist/assets/icons/general/compass-outlined.svg.js +1 -1
  12. package/dist/assets/icons/general/ellipsis-horizontal-outlined.svg.js +1 -1
  13. package/dist/assets/icons/general/ellipsis-vertical-outlined.svg.js +2 -2
  14. package/dist/assets/icons/general/eye-crossed-outlined.svg.js +2 -2
  15. package/dist/assets/icons/general/medal-outlined.svg.js +1 -1
  16. package/dist/assets/icons/general/megaphone-outlined.svg.js +1 -1
  17. package/dist/assets/icons/general/rating-outlined.svg.js +1 -1
  18. package/dist/assets/icons/general/send-ios-outlined.svg.js +1 -1
  19. package/dist/assets/icons/general/shop-outlined.svg.js +1 -1
  20. package/dist/assets/icons/general/teacher-outlined.svg.js +1 -1
  21. package/dist/assets/styles/{button.module-DjunAbRS.css → button.module-BG9KYkTN.css} +1 -1
  22. package/dist/components/Avatar/AvatarGroup/AvatarGroupRoot.js +5 -5
  23. package/dist/components/ConfigProvider/ConfigProvider.js +1 -1
  24. package/dist/components/FileUpload/FileUpload.js +1 -1
  25. package/dist/components/FileUpload/FileUpload.module.css.js +62 -62
  26. package/dist/components/InputBase/Input.js +6 -6
  27. package/dist/components/Modal/Modal.module.css.js +18 -18
  28. package/dist/components/Modal/Modal.type.d.ts +1 -1
  29. package/dist/components/Popover/lib/use-popover.js +1 -1
  30. package/dist/components/Tabs/ScrollWrapper.js +1 -1
  31. package/dist/components/Tabs/Tabs.js +1 -1
  32. package/dist/components/Trigger/Trigger.d.ts +1 -1
  33. package/dist/components/Trigger/Trigger.js +77 -73
  34. package/dist/components/Trigger/Trigger.module.css.js +23 -23
  35. package/dist/components/Trigger/Trigger.type.d.ts +6 -2
  36. package/dist/index.cjs.js +25 -3
  37. package/dist/index.css +1 -1
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.es.js +91 -89
  40. package/dist/styles/brand.module.css.js +24 -2
  41. package/dist/styles/brand.module.css2.js +4 -0
  42. package/dist/styles/button.module.css.js +1 -1
  43. package/dist/utils/generate-brand-primary-palette.d.ts +36 -0
  44. package/dist/utils/generate-brand-primary-palette.js +101 -0
  45. package/package.json +3 -2
  46. package/dist/assets/components/FileUpload/FileUpload.module-CldF1EqE.css +0 -1
  47. package/dist/assets/components/Modal/Modal.module-BXeSeTs2.css +0 -1
  48. package/dist/assets/components/Trigger/Trigger.module-BWzHgDVC.css +0 -1
@@ -1,21 +1,21 @@
1
- import '../../assets/components/FileUpload/FileUpload.module-CldF1EqE.css';const e = "_root_f98he_1", o = "_rootVertical_f98he_10", t = "_rootHorizontal_f98he_14", i = "_rootButton_f98he_18", n = "_dropzoneWrapper_f98he_23", r = "_uploader_f98he_27", _ = "_buttonTrigger_f98he_32", l = "_attachButton_f98he_37", a = "_dropzone_f98he_23", c = "_dropzoneVertical_f98he_60", f = "_dropzoneHorizontal_f98he_70", s = "_dropzoneMeasuredBorder_f98he_80", p = "_dropzoneBorder_f98he_84", d = "_dropzoneInteractive_f98he_102", h = "_dropzoneDragActive_f98he_116", v = "_dropzoneDisabled_f98he_122", z = "_dropzoneIcon_f98he_129", w = "_dropzoneIconTile_f98he_130", u = "_dropzoneTitle_f98he_139", B = "_dropzoneDescription_f98he_143", M = "_dropzoneContent_f98he_167", T = "_dropzoneContentHorizontal_f98he_177", g = "_dropzoneTitleHorizontal_f98he_189", I = "_dropzoneDescriptionHorizontal_f98he_199", m = "_triggerButton_f98he_203", D = "_previewCard_f98he_207", P = "_previewCardError_f98he_228", b = "_previewCardDisabled_f98he_238", C = "_previewMediaImage_f98he_243", H = "_previewMediaPlaceholder_f98he_244", A = "_previewOverlay_f98he_268", L = "_previewCardUploading_f98he_275", S = "_previewStatus_f98he_284", y = "_previewStatusError_f98he_303", E = "_previewStatusText_f98he_309", V = "_previewActions_f98he_316", x = "_previewReplaceButton_f98he_331", O = "_previewRemoveButton_f98he_332", R = "_previewActionButton_f98he_333", N = "_fileList_f98he_337", U = "_fileListHorizontal_f98he_344", W = "_fileTileList_f98he_348", j = "_fileTile_f98he_348", k = "_fileTileDisabled_f98he_370", q = "_fileName_f98he_375", F = "_fileMeta_f98he_379", G = "_filePreviewDocument_f98he_383", J = "_filePreviewImage_f98he_384", K = "_filePreviewPlaceholder_f98he_385", Q = "_fileTileBody_f98he_391", X = "_fileItem_f98he_400", Y = "_fileItemError_f98he_414", Z = "_fileItemDisabled_f98he_418", $ = "_fileMetaText_f98he_428", ee = "_filePreviewMedia_f98he_440", oe = "_fileMain_f98he_444", te = "_filePreview_f98he_383", ie = "_fileBody_f98he_495", ne = "_fileMetaInline_f98he_517", re = "_fileMetaLoader_f98he_531", _e = "_actions_f98he_535", le = "_inlineActions_f98he_536", ae = "_actionsVisible_f98he_549", ce = "_actionToggleOpen_f98he_554", fe = "_actionMenu_f98he_558", se = "_actionMenuButton_f98he_570", pe = "_actionMenuBottomSheet_f98he_577", de = "_actionIcon_f98he_582", he = {
1
+ import '../../assets/components/FileUpload/FileUpload.module-CL_LDrLs.css';const e = "_root_rsb4t_1", t = "_rootVertical_rsb4t_15", o = "_rootHorizontal_rsb4t_19", r = "_rootButton_rsb4t_23", i = "_dropzoneWrapper_rsb4t_28", n = "_uploader_rsb4t_32", _ = "_buttonTrigger_rsb4t_37", s = "_attachButton_rsb4t_42", l = "_dropzone_rsb4t_28", a = "_dropzoneVertical_rsb4t_65", c = "_dropzoneHorizontal_rsb4t_75", p = "_dropzoneMeasuredBorder_rsb4t_85", d = "_dropzoneBorder_rsb4t_89", b = "_dropzoneInteractive_rsb4t_107", v = "_dropzoneDragActive_rsb4t_121", z = "_dropzoneDisabled_rsb4t_127", f = "_dropzoneIcon_rsb4t_134", w = "_dropzoneIconTile_rsb4t_135", u = "_dropzoneTitle_rsb4t_144", B = "_dropzoneDescription_rsb4t_148", M = "_dropzoneContent_rsb4t_172", T = "_dropzoneContentHorizontal_rsb4t_182", g = "_dropzoneTitleHorizontal_rsb4t_194", I = "_dropzoneDescriptionHorizontal_rsb4t_204", m = "_triggerButton_rsb4t_208", D = "_previewCard_rsb4t_212", P = "_previewCardError_rsb4t_233", C = "_previewCardDisabled_rsb4t_243", H = "_previewMediaImage_rsb4t_248", h = "_previewMediaPlaceholder_rsb4t_249", A = "_previewOverlay_rsb4t_273", L = "_previewCardUploading_rsb4t_280", S = "_previewStatus_rsb4t_289", y = "_previewStatusError_rsb4t_308", E = "_previewStatusText_rsb4t_314", V = "_previewActions_rsb4t_321", x = "_previewReplaceButton_rsb4t_336", O = "_previewRemoveButton_rsb4t_337", R = "_previewActionButton_rsb4t_338", N = "_fileList_rsb4t_342", U = "_fileListHorizontal_rsb4t_349", W = "_fileTileList_rsb4t_353", j = "_fileTile_rsb4t_353", k = "_fileTileDisabled_rsb4t_375", q = "_fileName_rsb4t_380", F = "_fileMeta_rsb4t_384", G = "_filePreviewDocument_rsb4t_388", J = "_filePreviewImage_rsb4t_389", K = "_filePreviewPlaceholder_rsb4t_390", Q = "_fileTileBody_rsb4t_396", X = "_fileItem_rsb4t_405", Y = "_fileItemError_rsb4t_419", Z = "_fileItemDisabled_rsb4t_423", $ = "_fileMetaText_rsb4t_433", ee = "_filePreviewMedia_rsb4t_445", te = "_fileMain_rsb4t_449", oe = "_filePreview_rsb4t_388", re = "_fileBody_rsb4t_500", ie = "_fileMetaInline_rsb4t_522", ne = "_fileMetaLoader_rsb4t_536", _e = "_actions_rsb4t_540", se = "_inlineActions_rsb4t_541", le = "_actionsVisible_rsb4t_554", ae = "_actionToggleOpen_rsb4t_559", ce = "_actionMenu_rsb4t_563", pe = "_actionMenuButton_rsb4t_575", de = "_actionMenuBottomSheet_rsb4t_582", be = "_actionIcon_rsb4t_587", ve = {
2
2
  root: e,
3
- rootVertical: o,
4
- rootHorizontal: t,
5
- rootButton: i,
6
- dropzoneWrapper: n,
7
- uploader: r,
3
+ rootVertical: t,
4
+ rootHorizontal: o,
5
+ rootButton: r,
6
+ dropzoneWrapper: i,
7
+ uploader: n,
8
8
  buttonTrigger: _,
9
- attachButton: l,
10
- dropzone: a,
11
- dropzoneVertical: c,
12
- dropzoneHorizontal: f,
13
- dropzoneMeasuredBorder: s,
14
- dropzoneBorder: p,
15
- dropzoneInteractive: d,
16
- dropzoneDragActive: h,
17
- dropzoneDisabled: v,
18
- dropzoneIcon: z,
9
+ attachButton: s,
10
+ dropzone: l,
11
+ dropzoneVertical: a,
12
+ dropzoneHorizontal: c,
13
+ dropzoneMeasuredBorder: p,
14
+ dropzoneBorder: d,
15
+ dropzoneInteractive: b,
16
+ dropzoneDragActive: v,
17
+ dropzoneDisabled: z,
18
+ dropzoneIcon: f,
19
19
  dropzoneIconTile: w,
20
20
  dropzoneTitle: u,
21
21
  dropzoneDescription: B,
@@ -26,9 +26,9 @@ import '../../assets/components/FileUpload/FileUpload.module-CldF1EqE.css';const
26
26
  triggerButton: m,
27
27
  previewCard: D,
28
28
  previewCardError: P,
29
- previewCardDisabled: b,
30
- previewMediaImage: C,
31
- previewMediaPlaceholder: H,
29
+ previewCardDisabled: C,
30
+ previewMediaImage: H,
31
+ previewMediaPlaceholder: h,
32
32
  previewOverlay: A,
33
33
  previewCardUploading: L,
34
34
  previewStatus: S,
@@ -54,61 +54,61 @@ import '../../assets/components/FileUpload/FileUpload.module-CldF1EqE.css';const
54
54
  fileItemDisabled: Z,
55
55
  fileMetaText: $,
56
56
  filePreviewMedia: ee,
57
- fileMain: oe,
58
- filePreview: te,
59
- fileBody: ie,
60
- fileMetaInline: ne,
61
- fileMetaLoader: re,
57
+ fileMain: te,
58
+ filePreview: oe,
59
+ fileBody: re,
60
+ fileMetaInline: ie,
61
+ fileMetaLoader: ne,
62
62
  actions: _e,
63
- inlineActions: le,
64
- actionsVisible: ae,
65
- actionToggleOpen: ce,
66
- actionMenu: fe,
67
- actionMenuButton: se,
68
- actionMenuBottomSheet: pe,
69
- actionIcon: de
63
+ inlineActions: se,
64
+ actionsVisible: le,
65
+ actionToggleOpen: ae,
66
+ actionMenu: ce,
67
+ actionMenuButton: pe,
68
+ actionMenuBottomSheet: de,
69
+ actionIcon: be
70
70
  };
71
71
  export {
72
- de as actionIcon,
73
- fe as actionMenu,
74
- pe as actionMenuBottomSheet,
75
- se as actionMenuButton,
76
- ce as actionToggleOpen,
72
+ be as actionIcon,
73
+ ce as actionMenu,
74
+ de as actionMenuBottomSheet,
75
+ pe as actionMenuButton,
76
+ ae as actionToggleOpen,
77
77
  _e as actions,
78
- ae as actionsVisible,
79
- l as attachButton,
78
+ le as actionsVisible,
79
+ s as attachButton,
80
80
  _ as buttonTrigger,
81
- he as default,
82
- a as dropzone,
83
- p as dropzoneBorder,
81
+ ve as default,
82
+ l as dropzone,
83
+ d as dropzoneBorder,
84
84
  M as dropzoneContent,
85
85
  T as dropzoneContentHorizontal,
86
86
  B as dropzoneDescription,
87
87
  I as dropzoneDescriptionHorizontal,
88
- v as dropzoneDisabled,
89
- h as dropzoneDragActive,
90
- f as dropzoneHorizontal,
91
- z as dropzoneIcon,
88
+ z as dropzoneDisabled,
89
+ v as dropzoneDragActive,
90
+ c as dropzoneHorizontal,
91
+ f as dropzoneIcon,
92
92
  w as dropzoneIconTile,
93
- d as dropzoneInteractive,
94
- s as dropzoneMeasuredBorder,
93
+ b as dropzoneInteractive,
94
+ p as dropzoneMeasuredBorder,
95
95
  u as dropzoneTitle,
96
96
  g as dropzoneTitleHorizontal,
97
- c as dropzoneVertical,
98
- n as dropzoneWrapper,
99
- ie as fileBody,
97
+ a as dropzoneVertical,
98
+ i as dropzoneWrapper,
99
+ re as fileBody,
100
100
  X as fileItem,
101
101
  Z as fileItemDisabled,
102
102
  Y as fileItemError,
103
103
  N as fileList,
104
104
  U as fileListHorizontal,
105
- oe as fileMain,
105
+ te as fileMain,
106
106
  F as fileMeta,
107
- ne as fileMetaInline,
108
- re as fileMetaLoader,
107
+ ie as fileMetaInline,
108
+ ne as fileMetaLoader,
109
109
  $ as fileMetaText,
110
110
  q as fileName,
111
- te as filePreview,
111
+ oe as filePreview,
112
112
  G as filePreviewDocument,
113
113
  J as filePreviewImage,
114
114
  ee as filePreviewMedia,
@@ -117,15 +117,15 @@ export {
117
117
  Q as fileTileBody,
118
118
  k as fileTileDisabled,
119
119
  W as fileTileList,
120
- le as inlineActions,
120
+ se as inlineActions,
121
121
  R as previewActionButton,
122
122
  V as previewActions,
123
123
  D as previewCard,
124
- b as previewCardDisabled,
124
+ C as previewCardDisabled,
125
125
  P as previewCardError,
126
126
  L as previewCardUploading,
127
- C as previewMediaImage,
128
- H as previewMediaPlaceholder,
127
+ H as previewMediaImage,
128
+ h as previewMediaPlaceholder,
129
129
  A as previewOverlay,
130
130
  O as previewRemoveButton,
131
131
  x as previewReplaceButton,
@@ -133,9 +133,9 @@ export {
133
133
  y as previewStatusError,
134
134
  E as previewStatusText,
135
135
  e as root,
136
- i as rootButton,
137
- t as rootHorizontal,
138
- o as rootVertical,
136
+ r as rootButton,
137
+ o as rootHorizontal,
138
+ t as rootVertical,
139
139
  m as triggerButton,
140
- r as uploader
140
+ n as uploader
141
141
  };
@@ -2,9 +2,9 @@ import { jsx as r, jsxs as W } from "react/jsx-runtime";
2
2
  import { forwardRef as z, useImperativeHandle as P } from "react";
3
3
  import { clsx as f } from "clsx";
4
4
  import e from "./InputBase.module.css.js";
5
- import { useCompatId as Q } from "../../hooks/useCompatId.js";
6
- import { useInputSync as Y } from "./lib/useInputSync.js";
7
- import { useTextareaResize as Z } from "./lib/useTextareaResize.js";
5
+ import { useInputSync as Q } from "./lib/useInputSync.js";
6
+ import { useTextareaResize as Y } from "./lib/useTextareaResize.js";
7
+ import { useCompatId as Z } from "../../hooks/useCompatId.js";
8
8
  import { MAX_HINT_LENGTH as k } from "./lib/constants.js";
9
9
  import { useGripResize as U } from "./lib/useGripResize.js";
10
10
  import { GripIcon as E } from "./assets/GripIcon.js";
@@ -32,8 +32,8 @@ const K = z(
32
32
  resize: c,
33
33
  ...H
34
34
  }, R) => {
35
- const { textareaRef: w, inputRef: j, currentRef: d } = Y(a, t);
36
- if (Z(a, c, w), P(R, () => d.current, [d]), t === "textarea")
35
+ const { textareaRef: w, inputRef: j, currentRef: d } = Q(a, t);
36
+ if (Y(a, c, w), P(R, () => d.current, [d]), t === "textarea")
37
37
  return /* @__PURE__ */ r(
38
38
  "textarea",
39
39
  {
@@ -132,7 +132,7 @@ const K = z(
132
132
  showGrip: T = !1,
133
133
  ...L
134
134
  }, O) => {
135
- const X = Q("input-wrapper"), S = D || X, _ = y && s && (d || p), q = s && s.length > k ? s.substring(0, k) + "..." : s, B = f(
135
+ const X = Z("input-wrapper"), S = D || X, _ = y && s && (d || p), q = s && s.length > k ? s.substring(0, k) + "..." : s, B = f(
136
136
  e.wrapper,
137
137
  e[`size-${m}`],
138
138
  a && e.error,
@@ -1,29 +1,29 @@
1
- import '../../assets/components/Modal/Modal.module-BXeSeTs2.css';const t = "_container_1d51n_1", n = "_header_1d51n_21", o = "_withBorder_1d51n_56", e = "_drawerHeader_1d51n_60", c = "_title_1d51n_40", _ = "_subTitle_1d51n_76", s = "_leftActionsStack_1d51n_88", i = "_rightActionsStack_1d51n_96", a = "_closeButton_1d51n_111", r = "_content_1d51n_116", d = "_footer_1d51n_127", l = {
1
+ import '../../assets/components/Modal/Modal.module-x_YFLlra.css';const t = "_container_9kjql_1", o = "_header_9kjql_21", e = "_withBorder_9kjql_56", c = "_drawerHeader_9kjql_60", n = "_title_9kjql_40", _ = "_subTitle_9kjql_76", s = "_leftActionsStack_9kjql_88", i = "_rightActionsStack_9kjql_96", l = "_closeButton_9kjql_111", a = "_content_9kjql_116", r = "_footer_9kjql_127", k = {
2
2
  container: t,
3
- header: n,
4
- "title-actions-actions": "_title-actions-actions_1d51n_40",
5
- "actions-title-actions": "_actions-title-actions_1d51n_48",
6
- withBorder: o,
7
- drawerHeader: e,
8
- title: c,
3
+ header: o,
4
+ "title-actions-actions": "_title-actions-actions_9kjql_40",
5
+ "actions-title-actions": "_actions-title-actions_9kjql_48",
6
+ withBorder: e,
7
+ drawerHeader: c,
8
+ title: n,
9
9
  subTitle: _,
10
10
  leftActionsStack: s,
11
11
  rightActionsStack: i,
12
- closeButton: a,
13
- content: r,
14
- footer: d
12
+ closeButton: l,
13
+ content: a,
14
+ footer: r
15
15
  };
16
16
  export {
17
- a as closeButton,
17
+ l as closeButton,
18
18
  t as container,
19
- r as content,
20
- l as default,
21
- e as drawerHeader,
22
- d as footer,
23
- n as header,
19
+ a as content,
20
+ k as default,
21
+ c as drawerHeader,
22
+ r as footer,
23
+ o as header,
24
24
  s as leftActionsStack,
25
25
  i as rightActionsStack,
26
26
  _ as subTitle,
27
- c as title,
28
- o as withBorder
27
+ n as title,
28
+ e as withBorder
29
29
  };
@@ -18,7 +18,7 @@ export interface ModalProps extends Omit<DialogProps, 'style' | 'className'> {
18
18
  /** Содержимое футера (например, кнопки). */
19
19
  footer?: ReactNode;
20
20
  /** Ширина модального окна в px. */
21
- size?: 480 | 620 | 800;
21
+ size?: 480 | 620 | 800 | (number & {});
22
22
  /** Inline-стили для отдельных частей модального окна. */
23
23
  styles?: Partial<Record<ModalFields, HTMLProps<HTMLDivElement>['style']>>;
24
24
  /** CSS-классы для отдельных частей модального окна. */
@@ -1,7 +1,7 @@
1
1
  import { offset as G, flip as H, shift as V, inline as q, size as J, hide as K, useFloating as Q, autoUpdate as Z, useTransitionStyles as M, useClick as ee, useHover as te, useFocus as oe, useDismiss as ne, useRole as se, useInteractions as re } from "@floating-ui/react";
2
2
  import { useState as i, useMemo as v, useCallback as ce, useEffect as ae, useLayoutEffect as ie } from "react";
3
- import { useCompatId as S } from "../../../hooks/useCompatId.js";
4
3
  import { DEFAULT_FLOATING as le, hasMiddleware as fe } from "./utils.js";
4
+ import { useCompatId as S } from "../../../hooks/useCompatId.js";
5
5
  const r = 8, ue = (c) => {
6
6
  switch (c.split("-")[0]) {
7
7
  case "top":
@@ -1,8 +1,8 @@
1
1
  import { jsxs as N, jsx as r } from "react/jsx-runtime";
2
2
  import { useRef as W, useState as g, useEffect as w } from "react";
3
- import { useBackgroundColor as M } from "../../hooks/useBackgroundColor.js";
4
3
  import { clsx as a } from "clsx";
5
4
  import e from "./ScrollWrapper.module.css.js";
5
+ import { useBackgroundColor as M } from "../../hooks/useBackgroundColor.js";
6
6
  const B = "white", G = ({
7
7
  children: b,
8
8
  withControls: i = !0,
@@ -1,10 +1,10 @@
1
1
  import { jsx as l, jsxs as w } from "react/jsx-runtime";
2
2
  import F, { useState as U, createContext as V, useContext as M } from "react";
3
3
  import { ScrollWrapper as R } from "./ScrollWrapper.js";
4
- import { useIsMobile as j } from "../../hooks/useIsMobile.js";
5
4
  import { clsx as p } from "clsx";
6
5
  import f from "../../styles/typography.module.css.js";
7
6
  import a from "./Tabs.module.css.js";
7
+ import { useIsMobile as j } from "../../hooks/useIsMobile.js";
8
8
  import { Badge as k } from "../Badge/Badge.js";
9
9
  const G = "md", W = !1, Y = !1, Z = 8, z = "top-right-inside", P = V(null), h = () => {
10
10
  const t = M(P);
@@ -2,4 +2,4 @@ import { TriggerCommonProps } from './Trigger.type';
2
2
  /**
3
3
  Component Trigger
4
4
  */
5
- export declare const Trigger: ({ content, size, description, label, stretched, selectionStyle, clearable, error, prefixIcon, postfixTitle, disabled, open, onClear, classNames, styles, }: TriggerCommonProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Trigger: ({ content, size, description, label, stretched, selectionStyle, clearable, showClear, showChevron, error, prefixIcon, postfixTitle, disabled, open, onClear, classNames, styles, }: TriggerCommonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,134 +1,138 @@
1
- import { jsxs as y, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
2
  import { clsx as n } from "clsx";
3
- import { LabelState as W } from "./Trigger.type.js";
3
+ import { LabelState as H } from "./Trigger.type.js";
4
4
  import r from "./Trigger.module.css.js";
5
- import { getLabelState as K, getLabelTypographySize as M, truncateContent as Q, getContentTypographySize as H, getIconSize as E } from "./lib/utils.js";
6
- import { Typography as v } from "../Typography/Typography.js";
7
- import { XIcon as R } from "../InputBase/assets/XIcon.js";
8
- import { ChevronIcon as U } from "./assets/ChevronIcon.js";
9
- import { Helper as V } from "../Helper/Helper.js";
10
- const cr = ({
11
- content: d,
5
+ import { getLabelState as R, getLabelTypographySize as U, truncateContent as V, getContentTypographySize as E, getIconSize as X } from "./lib/utils.js";
6
+ import { Typography as y } from "../Typography/Typography.js";
7
+ import { XIcon as Y } from "../InputBase/assets/XIcon.js";
8
+ import { ChevronIcon as Z } from "./assets/ChevronIcon.js";
9
+ import { Helper as _ } from "../Helper/Helper.js";
10
+ const lr = ({
11
+ content: p,
12
12
  size: i = "XL",
13
- description: u,
14
- label: N,
15
- stretched: C = !1,
16
- selectionStyle: s = "selected",
17
- clearable: m = !1,
18
- error: f,
19
- prefixIcon: S,
20
- postfixTitle: L,
13
+ description: I,
14
+ label: v,
15
+ stretched: h = !1,
16
+ selectionStyle: x = "selected",
17
+ clearable: j = !1,
18
+ showClear: z,
19
+ showChevron: A,
20
+ error: d,
21
+ prefixIcon: b,
22
+ postfixTitle: N,
21
23
  disabled: o = !1,
22
- open: p,
23
- onClear: I,
24
+ open: S,
25
+ onClear: m,
24
26
  classNames: t = {},
25
27
  styles: e = {}
26
28
  }) => {
27
- const g = !!d, b = !!N, c = !!f, w = s === "applied", O = !!u && (!c || o) || c && !o, X = (c && !o ? f : u) || "", h = c && !o, T = K(i, g), l = b && T === W.FLOATING, j = T === W.HIDDEN, z = n(
29
+ const c = !!p, u = !!v, g = !!d, L = x === "applied", w = z ?? (c && (L || j)), D = A ?? !w, F = !!I && (!g || o) || g && !o, W = (g && !o ? d : I) || "", s = g && !o, T = R(i, c), l = u && T === H.FLOATING, k = T === H.HIDDEN, G = n(
28
30
  r["trigger-wrapper"],
29
- { [r["trigger-stretched"]]: C },
31
+ { [r["trigger-stretched"]]: h },
30
32
  t.wrapper
31
- ), A = n(
33
+ ), O = n(
32
34
  r["trigger-container"],
33
35
  r[`trigger-container-size-${i}`],
34
36
  {
35
- [r["trigger-stretched"]]: C,
36
- [r["trigger-container-applied"]]: w && g,
37
- [r["trigger-container-error"]]: c && !o,
38
- [r["trigger-container-open"]]: p,
37
+ [r["trigger-stretched"]]: h,
38
+ [r["trigger-container-applied"]]: L && c,
39
+ [r["trigger-container-error"]]: g && !o,
40
+ [r["trigger-container-open"]]: S,
39
41
  [r["trigger-container-floating"]]: l
40
42
  },
41
43
  t.triggerContainer
42
- ), D = n(
44
+ ), P = n(
43
45
  r["trigger-content-container"],
44
46
  {
45
47
  [r["trigger-content-container-floating"]]: l
46
48
  },
47
49
  t.triggerContent
48
- ), F = n(
50
+ ), $ = n(
49
51
  r["trigger-label"],
50
52
  {
51
53
  [r["trigger-label-floating"]]: l,
52
- [r["trigger-label-hidden"]]: j
54
+ [r["trigger-label-hidden"]]: k
53
55
  },
54
56
  t.label
55
- ), k = n(r["trigger-content"], t.content), G = n(r["trigger-postfix"], t.postfixTitle), P = n(r["trigger-chevron-icon"], t.chevronIcon), $ = n(
57
+ ), q = n(r["trigger-content"], t.content), B = n(r["trigger-postfix"], t.postfixTitle), J = n(r["trigger-chevron-icon"], t.chevronIcon), K = n(
56
58
  r["trigger-prefix-icon"],
57
59
  t.prefixIconContainer
58
- ), q = n(r["trigger-clear-icon"], t.clearIcon), B = (x) => {
59
- x == null || x.stopPropagation(), I == null || I();
60
- }, J = g && p && (s === "selected" && m || s === "applied") || g && !p && (w || s === "selected" && m);
61
- return /* @__PURE__ */ y("div", { className: z, style: e.wrapper, children: [
62
- /* @__PURE__ */ y(
60
+ ), M = n(r["trigger-clear-icon"], t.clearIcon), Q = (C) => {
61
+ C == null || C.stopPropagation(), m == null || m();
62
+ };
63
+ return /* @__PURE__ */ f("div", { className: G, style: e.wrapper, children: [
64
+ /* @__PURE__ */ f(
63
65
  "button",
64
66
  {
65
67
  "data-testid": "trigger",
66
- "aria-invalid": c,
68
+ "aria-invalid": g,
67
69
  "aria-haspopup": "listbox",
68
- "aria-expanded": p,
70
+ "aria-expanded": S,
69
71
  role: "combobox",
70
- className: A,
72
+ className: O,
71
73
  style: e.triggerContainer,
72
74
  disabled: o,
73
75
  type: "button",
74
76
  children: [
75
- S && i !== "XL" && /* @__PURE__ */ a("div", { className: $, style: e.prefixIconContainer, children: S }),
76
- /* @__PURE__ */ y("div", { className: D, style: e.triggerContent, children: [
77
- b && /* @__PURE__ */ a(
78
- v.Label,
77
+ b && i !== "XL" && /* @__PURE__ */ a("div", { className: K, style: e.prefixIconContainer, children: b }),
78
+ /* @__PURE__ */ f("div", { className: P, style: e.triggerContent, children: [
79
+ u && /* @__PURE__ */ a(
80
+ y.Label,
79
81
  {
80
82
  "data-testid": "trigger-label",
81
- className: F,
83
+ className: $,
82
84
  style: e.label,
83
- size: M(i, l),
85
+ size: U(i, l),
84
86
  as: "span",
85
87
  disabled: o,
86
88
  typographyStyle: l ? "secondary" : "tertiary",
87
- children: N
89
+ children: v
88
90
  }
89
91
  ),
90
- g && /* @__PURE__ */ a(
91
- v.Label,
92
+ c && /* @__PURE__ */ a(
93
+ y.Label,
92
94
  {
93
95
  "data-testid": "trigger-content-container",
94
- className: k,
96
+ className: q,
95
97
  style: e.content,
96
- size: H(i),
98
+ size: E(i),
97
99
  as: "span",
98
100
  disabled: o,
99
- children: C ? d : Q(d)
101
+ children: h ? p : V(p)
100
102
  }
101
103
  ),
102
- g && !!L && /* @__PURE__ */ a(
103
- v.Label,
104
+ c && !!N && /* @__PURE__ */ a(
105
+ y.Label,
104
106
  {
105
107
  "data-testid": "trigger-postfix",
106
- className: G,
108
+ className: B,
107
109
  style: e.postfixTitle,
108
- size: H(i),
110
+ size: E(i),
109
111
  disabled: o,
110
112
  typographyStyle: "secondary",
111
- children: L
113
+ fontWeight: "medium",
114
+ children: N
112
115
  }
113
116
  )
114
117
  ] }),
115
- J ? /* @__PURE__ */ a(
116
- R,
118
+ w && /* @__PURE__ */ a(
119
+ Y,
117
120
  {
118
- className: q,
121
+ className: M,
119
122
  "data-testid": "trigger-clear",
120
- size: E(i),
123
+ size: X(i),
121
124
  tabIndex: -1,
122
- onClick: B,
125
+ onClick: Q,
123
126
  style: { outline: "none", ...e.clearIcon },
124
- color: s === "selected" && m ? "var(--icon-tertiary)" : void 0
127
+ color: x === "selected" ? "var(--icon-tertiary)" : void 0
125
128
  }
126
- ) : /* @__PURE__ */ a(
127
- U,
129
+ ),
130
+ D && /* @__PURE__ */ a(
131
+ Z,
128
132
  {
129
133
  "data-testid": "trigger-chevron",
130
- size: E(i),
131
- className: P,
134
+ size: X(i),
135
+ className: J,
132
136
  color: "var(--icon-tertiary)",
133
137
  style: e.chevronIcon
134
138
  }
@@ -136,19 +140,19 @@ const cr = ({
136
140
  ]
137
141
  }
138
142
  ),
139
- O && /* @__PURE__ */ a(
140
- V,
143
+ F && /* @__PURE__ */ a(
144
+ _,
141
145
  {
142
- title: X,
143
- error: h ? f : void 0,
144
- className: h ? t.error : t.description,
145
- style: h ? e.error : e.description,
146
+ title: W,
147
+ error: s ? d : void 0,
148
+ className: s ? t.error : t.description,
149
+ style: s ? e.error : e.description,
146
150
  disabled: o,
147
- "data-testid": h ? "trigger-error" : "trigger-description"
151
+ "data-testid": s ? "trigger-error" : "trigger-description"
148
152
  }
149
153
  )
150
154
  ] });
151
155
  };
152
156
  export {
153
- cr as Trigger
157
+ lr as Trigger
154
158
  };
@@ -1,26 +1,26 @@
1
- import '../../assets/components/Trigger/Trigger.module-BWzHgDVC.css';const r = {
2
- "trigger-wrapper": "_trigger-wrapper_1vv90_77",
3
- "trigger-container": "_trigger-container_1vv90_83",
4
- "trigger-container-applied": "_trigger-container-applied_1vv90_106",
5
- "trigger-container-open": "_trigger-container-open_1vv90_111",
6
- "trigger-container-error": "_trigger-container-error_1vv90_122",
7
- "trigger-container-size-XS": "_trigger-container-size-XS_1vv90_134",
8
- "trigger-container-size-S": "_trigger-container-size-S_1vv90_144",
9
- "trigger-container-size-M": "_trigger-container-size-M_1vv90_150",
10
- "trigger-container-size-L": "_trigger-container-size-L_1vv90_156",
11
- "trigger-container-size-XL": "_trigger-container-size-XL_1vv90_164",
12
- "trigger-container-floating": "_trigger-container-floating_1vv90_170",
13
- "trigger-stretched": "_trigger-stretched_1vv90_175",
14
- "trigger-content-container": "_trigger-content-container_1vv90_179",
15
- "trigger-content-container-floating": "_trigger-content-container-floating_1vv90_189",
16
- "trigger-label": "_trigger-label_1vv90_194",
17
- "trigger-label-floating": "_trigger-label-floating_1vv90_201",
18
- "trigger-label-hidden": "_trigger-label-hidden_1vv90_213",
19
- "trigger-content": "_trigger-content_1vv90_179",
20
- "trigger-prefix-icon": "_trigger-prefix-icon_1vv90_227",
21
- "trigger-chevron-icon": "_trigger-chevron-icon_1vv90_232",
22
- "trigger-clear-icon": "_trigger-clear-icon_1vv90_248",
23
- "trigger-postfix": "_trigger-postfix_1vv90_264"
1
+ import '../../assets/components/Trigger/Trigger.module-Dc9gMp3_.css';const r = {
2
+ "trigger-wrapper": "_trigger-wrapper_zp1ok_74",
3
+ "trigger-container": "_trigger-container_zp1ok_80",
4
+ "trigger-container-applied": "_trigger-container-applied_zp1ok_103",
5
+ "trigger-container-open": "_trigger-container-open_zp1ok_108",
6
+ "trigger-container-error": "_trigger-container-error_zp1ok_119",
7
+ "trigger-container-size-XS": "_trigger-container-size-XS_zp1ok_131",
8
+ "trigger-container-size-S": "_trigger-container-size-S_zp1ok_141",
9
+ "trigger-container-size-M": "_trigger-container-size-M_zp1ok_147",
10
+ "trigger-container-size-L": "_trigger-container-size-L_zp1ok_153",
11
+ "trigger-container-size-XL": "_trigger-container-size-XL_zp1ok_161",
12
+ "trigger-container-floating": "_trigger-container-floating_zp1ok_167",
13
+ "trigger-stretched": "_trigger-stretched_zp1ok_172",
14
+ "trigger-content-container": "_trigger-content-container_zp1ok_176",
15
+ "trigger-content-container-floating": "_trigger-content-container-floating_zp1ok_185",
16
+ "trigger-label": "_trigger-label_zp1ok_190",
17
+ "trigger-label-floating": "_trigger-label-floating_zp1ok_197",
18
+ "trigger-label-hidden": "_trigger-label-hidden_zp1ok_209",
19
+ "trigger-content": "_trigger-content_zp1ok_176",
20
+ "trigger-prefix-icon": "_trigger-prefix-icon_zp1ok_223",
21
+ "trigger-chevron-icon": "_trigger-chevron-icon_zp1ok_228",
22
+ "trigger-clear-icon": "_trigger-clear-icon_zp1ok_244",
23
+ "trigger-postfix": "_trigger-postfix_zp1ok_260"
24
24
  };
25
25
  export {
26
26
  r as default
@@ -29,8 +29,12 @@ export type TriggerCommonProps = {
29
29
  stretched?: boolean;
30
30
  /** Стиль выделения: 'selected' - обычное состояние, 'applied' - применённое с возможностью очистки */
31
31
  selectionStyle?: 'selected' | 'applied';
32
- /** Показывать ли иконку очистки (XIcon) при selectionStyle = 'selected' */
32
+ /** Показывать иконку очистки при наличии контента и selectionStyle = 'selected' */
33
33
  clearable?: boolean;
34
+ /** Показывать ли иконку очистки. Если не задано, определяется по content, selectionStyle и clearable. */
35
+ showClear?: boolean;
36
+ /** Показывать ли шеврон. Если не задано, отображается при отсутствии иконки очистки. */
37
+ showChevron?: boolean;
34
38
  /** Иконка перед контентом */
35
39
  prefixIcon?: ReactNode;
36
40
  /** Текст после контента */
@@ -39,7 +43,7 @@ export type TriggerCommonProps = {
39
43
  error?: string;
40
44
  /** Дизейбл компонент */
41
45
  disabled?: boolean;
42
- /** Обработчик очистки поля (вызывается при клике на X-иконку в режиме 'applied') */
46
+ /** Обработчик очистки поля (вызывается при клике на иконку очистки) */
43
47
  onClear?: () => void;
44
48
  /**
45
49
  * Дополнительные классы для: