@cuemath/leap 3.2.21-as1 → 3.2.21-as222

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.
@@ -1,110 +1,120 @@
1
- import { jsxs as k, jsx as t } from "react/jsx-runtime";
2
- import { useMemo as W, useRef as T, useCallback as d } from "react";
3
- import X from "../../../../assets/line-icons/icons/cross.js";
4
- import H from "../../hooks/use-context-menu-click-handler.js";
5
- import q from "../base-input/base-input.js";
6
- import { Input as G } from "../text-input/text-input-styled.js";
7
- import { Container as J, OptionsContainer as K, OptionsWrapper as N, StyledChevronDownIcon as P, StyledDownIcon as Q } from "./base-select-input-styled.js";
8
- import U from "./select-option/select-option.js";
9
- import Y from "./select-section/select-section.js";
10
- const ae = (y) => {
1
+ import { jsxs as V, jsx as t } from "react/jsx-runtime";
2
+ import { useMemo as G, useRef as A, useCallback as d } from "react";
3
+ import J from "../../../../assets/line-icons/icons/cross.js";
4
+ import K from "../../hooks/use-context-menu-click-handler.js";
5
+ import N from "../base-input/base-input.js";
6
+ import { Input as P } from "../text-input/text-input-styled.js";
7
+ import { Container as Q, OptionsContainer as U, OptionsWrapper as Y, StyledChevronDownIcon as Z, StyledDownIcon as _ } from "./base-select-input-styled.js";
8
+ import ee from "./select-option/select-option.js";
9
+ import ne from "./select-section/select-section.js";
10
+ const he = (E) => {
11
11
  const {
12
- label: C,
12
+ label: g,
13
13
  value: r,
14
14
  options: u,
15
15
  searchable: n = !1,
16
- searchText: g,
17
- onCloseWithoutSelection: V,
18
- onSearchTextChange: o,
19
- onChange: b,
16
+ searchText: b,
17
+ onCloseWithoutSelection: L,
18
+ onSearchTextChange: i,
19
+ onChange: v,
20
20
  renderAs: h,
21
- width: A,
22
- widthX: E,
21
+ width: R,
22
+ widthX: j,
23
23
  disabled: p,
24
- willShowMessage: R,
25
- mandatory: j,
26
- size: v = "regular",
24
+ willShowMessage: z,
25
+ mandatory: B,
26
+ size: w = "regular",
27
27
  shape: m,
28
28
  theme: f = "light",
29
- isTransparent: w = !1,
30
- renderOptionsAs: $ = "list",
31
- errorMessage: z
32
- } = y, i = $ === "section-list" && u, s = $ === "list" && u, I = W(() => {
33
- var e, c;
34
- if (n) return g;
35
- if (i)
36
- return (e = i.flatMap((l) => l.data).find(({ id: l }) => l === r)) == null ? void 0 : e.label;
37
- if (s) return (c = s.find((l) => l.id === r)) == null ? void 0 : c.label;
38
- }, [n, g, i, s, r]), S = T(null), x = T(null), { menuVisible: a, onMenuClick: B, hideMenu: M } = H(
39
- S,
29
+ isTransparent: S = !1,
30
+ renderOptionsAs: I = "list",
31
+ errorMessage: D,
32
+ getSectionInputLabel: C
33
+ } = E, s = I === "section-list" && u, l = I === "list" && u, $ = G(() => {
34
+ var e;
35
+ if (n) return b;
36
+ if (s) {
37
+ let o, a;
38
+ for (const T of s) {
39
+ const y = T.data.find(({ id: q }) => q === r);
40
+ if (y) {
41
+ o = T, a = y;
42
+ break;
43
+ }
44
+ }
45
+ return o && C ? C(o, a) : (a == null ? void 0 : a.label) || "";
46
+ }
47
+ if (l) return (e = l.find((o) => o.id === r)) == null ? void 0 : e.label;
48
+ }, [n, b, s, l, C, r]), k = A(null), x = A(null), { menuVisible: c, onMenuClick: F, hideMenu: M } = K(
49
+ k,
40
50
  void 0,
41
51
  !n,
42
- V,
52
+ L,
43
53
  p
44
- ), D = d(
54
+ ), W = d(
45
55
  (e) => {
46
- n && o && o(e.target.value);
56
+ n && i && i(e.target.value);
47
57
  },
48
- [o, n]
58
+ [i, n]
49
59
  ), O = d(
50
- (e, c) => {
51
- M(), b(e, c);
60
+ (e, o) => {
61
+ M(), v(e, o);
52
62
  },
53
- [M, b]
54
- ), F = d((e) => {
63
+ [M, v]
64
+ ), X = d((e) => {
55
65
  e.target.select(), setTimeout(() => {
56
66
  e.target.scrollIntoView({
57
67
  behavior: "smooth"
58
68
  });
59
69
  }, 300);
60
- }, []), L = d(() => {
70
+ }, []), H = d(() => {
61
71
  var e;
62
- o && (o(""), (e = x.current) == null || e.focus());
63
- }, [o]);
64
- return /* @__PURE__ */ k(J, { ref: S, $width: A, $widthX: E, onClick: B, children: [
72
+ i && (i(""), (e = x.current) == null || e.focus());
73
+ }, [i]);
74
+ return /* @__PURE__ */ V(Q, { ref: k, $width: R, $widthX: j, onClick: F, children: [
65
75
  /* @__PURE__ */ t(
66
- q,
76
+ N,
67
77
  {
68
78
  renderAs: h,
69
- label: C,
79
+ label: g,
70
80
  stickyLabel: !0,
71
81
  disabled: p,
72
- willShowMessage: R,
73
- size: v,
74
- mandatory: j,
82
+ willShowMessage: z,
83
+ size: w,
84
+ mandatory: B,
75
85
  shape: m,
76
- isTransparent: w,
86
+ isTransparent: S,
77
87
  inputElement: /* @__PURE__ */ t(
78
- G,
88
+ P,
79
89
  {
80
90
  ref: x,
81
91
  $renderAs: h,
82
- $size: v,
83
- placeholder: I ? "" : C,
92
+ $size: w,
93
+ placeholder: $ ? "" : g,
84
94
  disabled: p,
85
95
  readOnly: !n,
86
- value: I ?? "",
87
- onFocus: n ? F : void 0,
88
- onChange: n ? D : void 0,
89
- $isTransparent: w
96
+ value: $ ?? "",
97
+ onFocus: n ? X : void 0,
98
+ onChange: n ? W : void 0,
99
+ $isTransparent: S
90
100
  }
91
101
  ),
92
- siblingElement: n && a ? /* @__PURE__ */ t(X, { onClick: L }) : m === "curved" || m === "borderLess" ? /* @__PURE__ */ t(P, { $menuVisible: a, pointerEvents: "none" }) : /* @__PURE__ */ t(Q, { $menuVisible: a, pointerEvents: "none" }),
93
- errorMessage: z
102
+ siblingElement: n && c ? /* @__PURE__ */ t(J, { onClick: H }) : m === "curved" || m === "borderLess" ? /* @__PURE__ */ t(Z, { $menuVisible: c, pointerEvents: "none" }) : /* @__PURE__ */ t(_, { $menuVisible: c, pointerEvents: "none" }),
103
+ errorMessage: D
94
104
  }
95
105
  ),
96
- u.length > 0 && /* @__PURE__ */ t(K, { $visible: a, children: /* @__PURE__ */ k(N, { $renderAs: h, $theme: f, children: [
97
- i && /* @__PURE__ */ t(
98
- Y,
106
+ u.length > 0 && /* @__PURE__ */ t(U, { $visible: c, children: /* @__PURE__ */ V(Y, { $renderAs: h, $theme: f, children: [
107
+ s && /* @__PURE__ */ t(
108
+ ne,
99
109
  {
100
- sectionOptions: i,
110
+ sectionOptions: s,
101
111
  theme: f,
102
112
  value: r,
103
113
  onChange: O
104
114
  }
105
115
  ),
106
- s && s.map((e) => /* @__PURE__ */ t(
107
- U,
116
+ l && l.map((e) => /* @__PURE__ */ t(
117
+ ee,
108
118
  {
109
119
  option: e,
110
120
  selected: e.id === r,
@@ -117,6 +127,6 @@ const ae = (y) => {
117
127
  ] });
118
128
  };
119
129
  export {
120
- ae as default
130
+ he as default
121
131
  };
122
132
  //# sourceMappingURL=base-select-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n return sectionOptions.flatMap(section => section.data).find(({ id }) => id === value)\n ?.label as string;\n }\n\n if (selectOptions) return selectOptions.find(option => option.id === value)?.label;\n }, [searchable, searchText, sectionOptions, selectOptions, value]);\n\n const containerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const inputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(\n containerRef,\n undefined,\n !searchable,\n onCloseWithoutSelection,\n disabled,\n );\n\n const handleTextChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (searchable && onSearchTextChange) {\n onSearchTextChange(e.target.value);\n }\n },\n [onSearchTextChange, searchable],\n );\n\n const handleChange = useCallback<IBaseSelectInputProps<IDType>['onChange']>(\n (id, option) => {\n hideMenu();\n onChange(id, option);\n },\n [hideMenu, onChange],\n );\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n setTimeout(() => {\n e.target.scrollIntoView({\n behavior: 'smooth',\n });\n }, 300);\n }, []);\n\n const handleClear = useCallback(() => {\n if (onSearchTextChange) {\n onSearchTextChange('');\n inputRef.current?.focus();\n }\n }, [onSearchTextChange]);\n\n const downIcon =\n shape === 'curved' || shape === 'borderLess' ? (\n <Styled.StyledChevronDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n ) : (\n <Styled.StyledDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n );\n\n return (\n <Styled.Container ref={containerRef} $width={width} $widthX={widthX} onClick={onMenuClick}>\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={true}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={size}\n mandatory={mandatory}\n shape={shape}\n isTransparent={isTransparent}\n inputElement={\n <Input\n ref={inputRef}\n $renderAs={renderAs}\n $size={size}\n placeholder={inputValue ? '' : label}\n disabled={disabled}\n readOnly={!searchable}\n value={inputValue ?? ''}\n onFocus={searchable ? handleFocus : undefined}\n onChange={searchable ? handleTextChange : undefined}\n $isTransparent={isTransparent}\n />\n }\n siblingElement={searchable && menuVisible ? <CrossIcon onClick={handleClear} /> : downIcon}\n errorMessage={errorMessage}\n />\n\n {options.length > 0 && (\n <Styled.OptionsContainer $visible={menuVisible}>\n <Styled.OptionsWrapper $renderAs={renderAs} $theme={theme}>\n {sectionOptions && (\n <SelectSection<IDType>\n sectionOptions={sectionOptions}\n theme={theme}\n value={value}\n onChange={handleChange}\n />\n )}\n\n {selectOptions &&\n selectOptions.map(option => (\n <SelectOption<IDType>\n key={option.id}\n option={option}\n selected={option.id === value}\n onChange={handleChange}\n theme={theme}\n />\n ))}\n </Styled.OptionsWrapper>\n </Styled.OptionsContainer>\n )}\n </Styled.Container>\n );\n};\n\nexport default BaseSelectInput;\n"],"names":["BaseSelectInput","props","label","value","options","searchable","searchText","onCloseWithoutSelection","onSearchTextChange","onChange","renderAs","width","widthX","disabled","willShowMessage","mandatory","size","shape","theme","isTransparent","renderOptionsAs","errorMessage","sectionOptions","selectOptions","inputValue","useMemo","_a","section","id","_b","option","containerRef","useRef","inputRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleTextChange","useCallback","handleChange","handleFocus","handleClear","jsxs","Styled.Container","jsx","BaseInput","Input","CrossIcon","Styled.StyledChevronDownIcon","Styled.StyledDownIcon","Styled.OptionsContainer","Styled.OptionsWrapper","SelectSection","SelectOption"],"mappings":";;;;;;;;;AAcM,MAAAA,KAAkB,CACtBC,MACiB;AACX,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA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AAwB,UAAUjB,GACjC,UAAA,gBAAAS,EAACS,GAAA,EAAsB,WAAW1C,GAAU,QAAQQ,GACjD,UAAA;AAAA,MACCI,KAAA,gBAAAuB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,gBAAA/B;AAAA,UACA,OAAAJ;AAAA,UACA,OAAAf;AAAA,UACA,UAAUqC;AAAA,QAAA;AAAA,MACZ;AAAA,MAGDjB,KACCA,EAAc,IAAI,CAChBO,MAAA,gBAAAe;AAAA,QAACS;AAAA,QAAA;AAAA,UAEC,QAAAxB;AAAA,UACA,UAAUA,EAAO,OAAO3B;AAAA,UACxB,UAAUqC;AAAA,UACV,OAAAtB;AAAA,QAAA;AAAA,QAJKY,EAAO;AAAA,MAAA,CAMf;AAAA,IAAA,EAAA,CACL,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n getSectionInputLabel,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n let foundSection, foundOption;\n\n for (const section of sectionOptions) {\n const option = section.data.find(({ id }) => id === value);\n\n if (option) {\n foundSection = section;\n foundOption = option;\n\n break;\n }\n }\n\n if (foundSection && getSectionInputLabel)\n return getSectionInputLabel(foundSection, foundOption);\n\n return foundOption?.label || '';\n }\n\n if (selectOptions) return selectOptions.find(option => option.id === value)?.label;\n }, [searchable, searchText, sectionOptions, selectOptions, getSectionInputLabel, value]);\n\n const containerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const inputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(\n containerRef,\n undefined,\n !searchable,\n onCloseWithoutSelection,\n disabled,\n );\n\n const handleTextChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (searchable && onSearchTextChange) {\n onSearchTextChange(e.target.value);\n }\n },\n [onSearchTextChange, searchable],\n );\n\n const handleChange = useCallback<IBaseSelectInputProps<IDType>['onChange']>(\n (id, option) => {\n hideMenu();\n onChange(id, option);\n },\n [hideMenu, onChange],\n );\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n setTimeout(() => {\n e.target.scrollIntoView({\n behavior: 'smooth',\n });\n }, 300);\n }, []);\n\n const handleClear = useCallback(() => {\n if (onSearchTextChange) {\n onSearchTextChange('');\n inputRef.current?.focus();\n }\n }, [onSearchTextChange]);\n\n const downIcon =\n shape === 'curved' || shape === 'borderLess' ? (\n <Styled.StyledChevronDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n ) : (\n <Styled.StyledDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n );\n\n return (\n <Styled.Container ref={containerRef} $width={width} $widthX={widthX} onClick={onMenuClick}>\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={true}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={size}\n mandatory={mandatory}\n shape={shape}\n isTransparent={isTransparent}\n inputElement={\n <Input\n ref={inputRef}\n $renderAs={renderAs}\n $size={size}\n placeholder={inputValue ? '' : label}\n disabled={disabled}\n readOnly={!searchable}\n value={inputValue ?? ''}\n onFocus={searchable ? handleFocus : undefined}\n onChange={searchable ? handleTextChange : undefined}\n $isTransparent={isTransparent}\n />\n }\n siblingElement={searchable && menuVisible ? <CrossIcon onClick={handleClear} /> : downIcon}\n errorMessage={errorMessage}\n />\n\n {options.length > 0 && (\n <Styled.OptionsContainer $visible={menuVisible}>\n <Styled.OptionsWrapper $renderAs={renderAs} $theme={theme}>\n {sectionOptions && (\n <SelectSection<IDType>\n sectionOptions={sectionOptions}\n theme={theme}\n value={value}\n onChange={handleChange}\n />\n )}\n\n {selectOptions &&\n selectOptions.map(option => (\n <SelectOption<IDType>\n key={option.id}\n option={option}\n selected={option.id === value}\n onChange={handleChange}\n theme={theme}\n />\n ))}\n </Styled.OptionsWrapper>\n </Styled.OptionsContainer>\n )}\n </Styled.Container>\n );\n};\n\nexport default BaseSelectInput;\n"],"names":["BaseSelectInput","props","label","value","options","searchable","searchText","onCloseWithoutSelection","onSearchTextChange","onChange","renderAs","width","widthX","disabled","willShowMessage","mandatory","size","shape","theme","isTransparent","renderOptionsAs","errorMessage","getSectionInputLabel","sectionOptions","selectOptions","inputValue","useMemo","foundSection","foundOption","section","option","id","_a","containerRef","useRef","inputRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleTextChange","useCallback","handleChange","handleFocus","handleClear","jsxs","Styled.Container","jsx","BaseInput","Input","CrossIcon","Styled.StyledChevronDownIcon","Styled.StyledDownIcon","Styled.OptionsContainer","Styled.OptionsWrapper","SelectSection","SelectOption"],"mappings":";;;;;;;;;AAc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IAAasC,IAAc;AAAA,YACpC,UAAUtC,IAAamC,IAAmB;AAAA,YAC1C,gBAAgBrB;AAAA,UAAA;AAAA,QAClB;AAAA,QAEF,gBAAgBd,KAAc+B,sBAAec,GAAU,EAAA,SAASN,EAAa,CAAA,IAhCjF3B,MAAU,YAAYA,MAAU,eAC7B,gBAAA8B,EAAAI,GAAA,EAA6B,cAAcf,GAAa,eAAc,OAAO,CAAA,IAE7E,gBAAAW,EAAAK,GAAA,EAAsB,cAAchB,GAAa,eAAc,OAAO,CAAA;AAAA,QA8BrE,cAAAf;AAAA,MAAA;AAAA,IACF;AAAA,IAECjB,EAAQ,SAAS,KACf,gBAAA2C,EAAAM,GAAA,EAAwB,UAAUjB,GACjC,UAAA,gBAAAS,EAACS,GAAA,EAAsB,WAAW5C,GAAU,QAAQQ,GACjD,UAAA;AAAA,MACCK,KAAA,gBAAAwB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,gBAAAhC;AAAA,UACA,OAAAL;AAAA,UACA,OAAAf;AAAA,UACA,UAAUuC;AAAA,QAAA;AAAA,MACZ;AAAA,MAGDlB,KACCA,EAAc,IAAI,CAChBM,MAAA,gBAAAiB;AAAA,QAACS;AAAA,QAAA;AAAA,UAEC,QAAA1B;AAAA,UACA,UAAUA,EAAO,OAAO3B;AAAA,UACxB,UAAUuC;AAAA,UACV,OAAAxB;AAAA,QAAA;AAAA,QAJKY,EAAO;AAAA,MAAA,CAMf;AAAA,IAAA,EAAA,CACL,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
package/dist/index.d.ts CHANGED
@@ -187,36 +187,6 @@ export declare const CalendarIcon: React.FC<React.SVGProps<SVGSVGElement>>;
187
187
 
188
188
  export declare const Callout: React.FC<ICalloutProps>;
189
189
 
190
- export declare const Carousel: React_2.FC<CarouselProps>;
191
-
192
- declare interface CarouselProps {
193
- children: React_2.ReactNode[] | React_2.ReactNode;
194
- initialPosition?: number;
195
- infinite?: boolean;
196
- slideDuration?: number;
197
- dotColor?: string;
198
- changeColor?: (position: number) => void;
199
- slideAlign?: string | null;
200
- inactiveDotColor?: string;
201
- activeIndicatorSize?: string;
202
- flexCenterIndicators?: boolean;
203
- isTestimonial?: boolean;
204
- setColor?: (position: number) => void;
205
- setPosition?: (position: number) => void;
206
- carouselSlotPadding?: string;
207
- wrapperMargin?: string;
208
- hideIndicators?: boolean;
209
- autoScroll?: boolean;
210
- nodeRef?: {
211
- current?: {
212
- next?: () => void;
213
- prev?: () => void;
214
- position?: number;
215
- };
216
- } | null;
217
- onChange?: () => void;
218
- }
219
-
220
190
  export declare const CascadingSelectInput: React_2.FC<ICascadingSelectInputProps>;
221
191
 
222
192
  export declare const Chapter: FC<IChapterProps>;
@@ -868,6 +838,7 @@ declare interface IBaseSelectInputProps<IDType extends string | number> extends
868
838
  controlled?: boolean;
869
839
  size?: TInputSizes;
870
840
  theme?: 'light' | 'dark';
841
+ getSectionInputLabel?: (section: ISectionOption<ISelectOption<IDType>>, option: ISelectOption<IDType> | undefined) => string;
871
842
  }
872
843
 
873
844
  declare interface IBaseWebGameProps {
@@ -4708,28 +4679,6 @@ export declare enum NODE_TYPES {
4708
4679
  'PUZZLE_CARD' = "PUZZLE_CARD"
4709
4680
  }
4710
4681
 
4711
- declare const Notification_2: React.FC<NotificationProps>;
4712
- export { Notification_2 as Notification }
4713
-
4714
- declare interface NotificationProps {
4715
- avatarUrl?: string | null;
4716
- Component?: React.ComponentType<Record<string, unknown>> | null;
4717
- componentProps?: Record<string, unknown>;
4718
- duration?: number | null;
4719
- gap?: number;
4720
- gutter?: number;
4721
- hideNotification?: () => void;
4722
- horizontalDist?: number;
4723
- notificationTheme?: NotificationTheme;
4724
- position?: Position;
4725
- showCloseIcon?: boolean;
4726
- text?: string | null;
4727
- verticalDist?: number;
4728
- visible?: boolean;
4729
- }
4730
-
4731
- declare type NotificationTheme = 'white' | 'black';
4732
-
4733
4682
  export declare const Nudge: React_2.NamedExoticComponent<INudgeProps>;
4734
4683
 
4735
4684
  export declare const NumRangeInput: React.FC<NumRangeInputProps>;
@@ -4814,8 +4763,6 @@ export declare const PlusIcon: React.FC<React.SVGProps<SVGSVGElement>>;
4814
4763
 
4815
4764
  export declare const PointerIcon: React.FC<React.SVGProps<SVGSVGElement>>;
4816
4765
 
4817
- declare type Position = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right';
4818
-
4819
4766
  export declare const PostGameStats: NamedExoticComponent<IPostGameStatsProps & RefAttributes<IPostGameStatsRef>>;
4820
4767
 
4821
4768
  export declare const PracticeIcon: React.FC<React.SVGProps<SVGSVGElement>>;