@tedi-design-system/react 19.1.0-rc.17 → 19.1.0-rc.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/index.es13.js +2 -2
- package/_virtual/index.es14.js +2 -2
- package/bundle-stats.html +1 -1
- package/component.manifest.json +54 -20
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/external/react-is/index.cjs.js +1 -1
- package/external/react-is/index.es.js +1 -1
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +1 -1
- package/src/tedi/components/form/search/index.d.ts +1 -0
- package/src/tedi/components/form/search/search.cjs.js +1 -1
- package/src/tedi/components/form/search/search.d.ts +92 -1
- package/src/tedi/components/form/search/search.es.js +265 -69
- package/src/tedi/components/form/search/search.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/search/search.module.scss.es.js +9 -1
- package/src/tedi/components/overlays/dropdown/dropdown.cjs.js +1 -1
- package/src/tedi/components/overlays/dropdown/dropdown.es.js +8 -6
- package/src/tedi/index.d.ts +1 -1
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +21 -0
- package/src/tedi/providers/label-provider/labels-map.es.js +22 -1
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +224 -224
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tedi-design-system/react",
|
|
3
|
-
"version": "19.1.0-rc.
|
|
3
|
+
"version": "19.1.0-rc.18",
|
|
4
4
|
"description": "TEDI Design System React component library — accessible, reusable UI components. Docs & live examples: https://storybook.tedi.ee/react/rc/",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './search';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),C=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),N=require("../../../../../external/classnames/index.cjs.js"),o=require("react"),Q=require("../../base/typography/text/text.cjs.js"),Je=require("../../buttons/button/button.cjs.js"),We=require("../../loaders/spinner/spinner.cjs.js"),H=require("../../misc/option-content/option-content.cjs.js"),Xe=require("../textfield/textfield.cjs.js"),s=require("./search.module.scss.cjs.js"),Ye=require("../../../providers/label-provider/use-labels.cjs.js"),Ze=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),D=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),$e=4,G=8,fe=["a[href]","area[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","iframe",'[tabindex]:not([tabindex="-1"])'].join(","),et=(l,m)=>m?m(l):typeof l.label=="string"?l.label:String(l.value),tt=(l,m)=>{const x=m.trim();if(!x)return l;const h=l.toLowerCase().indexOf(x.toLowerCase());return h===-1?l:r.jsxs(r.Fragment,{children:[l.slice(0,h),r.jsx(Q.Text,{element:"span",modifiers:"bold",children:l.slice(h,h+x.length)}),l.slice(h+x.length)]})},he=o.forwardRef((l,m)=>{var ue;const{id:x,placeholder:h,isClearable:pe=!0,searchIcon:L="search",onSearch:u,onChange:q,onClear:be,onFocus:F,button:a,ariaLabel:me,className:xe,input:R,value:J,defaultValue:ye,suggestions:S,onSuggestionSelect:P,loading:v=!1,minQueryLength:W=0,hideOnScroll:_e=!1,renderSuggestionContent:E,getSuggestionText:ve,noResultsText:ge,loadingText:je,resultsCountText:Ce,footer:O,...I}=l,{getLabel:y}=Ye.useLabels(),Ne=o.useId(),k=x??Ne,d=S!==void 0,i=o.useMemo(()=>Array.isArray(S)?S:[],[S]),X=J!==void 0,[Re,Y]=o.useState(ye??""),f=J??Re,[K,g]=o.useState(!1),[c,B]=o.useState(null),Z=o.useRef([]),M=o.useRef(null),j=o.useRef(null),T=o.useRef(!1);o.useImperativeHandle(m,()=>j.current,[]);const $=f.trim().length>=W,z=!v&&i.length>0,Se=o.useMemo(()=>i.reduce((e,t,n)=>t.disabled?[...e,n]:e,[]),[i]),{refs:_,floatingStyles:Ie,context:ee}=C.useFloating({open:d&&K,onOpenChange:g,placement:"bottom-start",whileElementsMounted:Ze.autoUpdate,middleware:[D.offset($e),D.flip({padding:G}),D.shift({padding:G}),D.size({padding:G,apply({rects:e,elements:t,availableHeight:n}){t.floating.style.width=`${e.reference.width}px`,t.floating.style.setProperty("--tedi-search-panel-available-height",`${n}px`)}})]}),Te=C.useDismiss(ee,{ancestorScroll:_e}),we=C.useListNavigation(ee,{listRef:Z,activeIndex:c,onNavigate:B,virtual:!0,loop:!0,disabledIndices:Se}),{getReferenceProps:Ae,getFloatingProps:De,getItemProps:Le}=C.useInteractions([Te,we]);o.useEffect(()=>{var e;_.setPositionReference(((e=j.current)==null?void 0:e.inner)??null)},[_,d]);const te=`${k}-listbox`,ne=e=>`${k}-option-${e}`,p=d&&K&&$&&(v||z||f.trim().length>0),re=()=>M.current?Array.from(M.current.querySelectorAll(fe)):[],se=(e=!0)=>{var t,n;T.current=e,(n=(t=j.current)==null?void 0:t.input)==null||n.focus()},w=()=>{g(!1),B(null)},ae=e=>{e.disabled||(X||Y(et(e,ve)),P==null||P(e),w())},qe=e=>{X||Y(e),q==null||q(e),d&&(T.current=!1,B(null),g(e.trim().length>=W))},Fe=e=>{if(F==null||F(e),!!d){if(T.current){T.current=!1;return}$&&g(!0)}},Pe=e=>{e.key==="Enter"&&(u==null||u(f))},Ee=!v&&c!==null&&!((ue=i[c])!=null&&ue.disabled)?i[c]:void 0,Oe=()=>{var b,A;const e=(b=j.current)==null?void 0:b.input;if(!e)return;const t=_.floating.current,n=Array.from(document.body.querySelectorAll(fe)).filter(U=>!(t!=null&&t.contains(U)));(A=n[n.indexOf(e)+1])==null||A.focus()},ke=e=>{if(e.key==="Enter"){if(p&&c!==null&&i[c]&&!i[c].disabled){e.preventDefault(),ae(i[c]);return}u==null||u(f),g(!1);return}if(e.key==="Tab"&&!e.shiftKey&&p&&O){const t=re();t.length&&(e.preventDefault(),t[0].focus())}},Ke=e=>{if(!d||!K)return;const t=e.relatedTarget,n=_.floating.current;t&&(e.currentTarget.contains(t)||n!=null&&n.contains(t))||w()},Be=e=>{if(e.key==="Escape"){e.preventDefault(),w(),se();return}if(e.key!=="Tab")return;const t=re(),n=t.indexOf(e.target);e.shiftKey&&n===0?(e.preventDefault(),se()):!e.shiftKey&&n===t.length-1&&(e.preventDefault(),w(),Oe())},le=typeof L=="string"?{name:L}:L,Me={color:"secondary",...le,className:N.default(le.className,I.disabled&&s.default["tedi-search__icon--disabled"])},oe=d?Ae({role:"combobox","aria-autocomplete":"list","aria-expanded":p,"aria-controls":p&&z?te:void 0,"aria-activedescendant":p&&Ee&&c!==null?ne(c):void 0,onKeyDown:ke}):{role:"searchbox"},ie={...R,...oe};if(d){const e=R==null?void 0:R.onKeyDown,t=oe.onKeyDown;ie.onKeyDown=n=>{e==null||e(n),t==null||t(n)}}const ze={...I,ref:j,id:k,value:f,onChange:qe,onClear:be,onFocus:Fe,inputClassName:N.default(s.default["tedi-search__input"],a&&s.default["tedi-search__input--has-button"],xe),placeholder:h,isClearable:pe,input:ie,...a?{}:{icon:Me},...d?{}:{onKeyDown:Pe}},Ue=e=>{var t;(t=a==null?void 0:a.onClick)==null||t.call(a,e),u==null||u(f)},Ve=me||y("search"),ce=je??y("search.loading"),de=ge??y("search.no-results"),He=Ce??(e=>y("search.results-count",e)),Ge=p?v?ce:i.length>0?He(i.length):de:"",Qe=()=>v?r.jsxs("div",{className:s.default["tedi-search__panel-status"],children:[r.jsx(We.Spinner,{size:16}),r.jsx(Q.Text,{color:"tertiary",children:ce})]}):z?r.jsx("ul",{id:te,role:"listbox",className:s.default["tedi-search__panel-list"],children:i.map((e,t)=>{const n=c===t&&!e.disabled,b=typeof(e.label??e.value)=="string"?String(e.label??e.value):void 0,A=typeof e.description=="string"?e.description:void 0,U=!E&&b?[b,A].filter(Boolean).join(", "):void 0;return r.jsx("li",{id:ne(t),role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,"aria-label":U,ref:V=>{Z.current[t]=V},className:N.default(s.default["tedi-search__option"],{[s.default["tedi-search__option--active"]]:n,[s.default["tedi-search__option--disabled"]]:e.disabled}),...Le({onClick:()=>ae(e),onMouseDown:V=>V.preventDefault()}),children:E?E(e,{active:n,query:f}):r.jsxs(H.OptionContent,{disabled:e.disabled,layout:e.description!==void 0?"vertical":"horizontal",children:[r.jsx(H.OptionContent.Label,{children:b?tt(b,f):e.label??e.value}),e.description!==void 0&&r.jsx(H.OptionContent.Meta,{children:e.description})]})},e.value)})}):r.jsx("div",{className:s.default["tedi-search__panel-status"],children:r.jsx(Q.Text,{color:"tertiary",children:de})});return r.jsxs("div",{ref:_.setReference,className:N.default(s.default["tedi-search__wrapper"],I.size==="small"&&s.default["tedi-search__wrapper--small"],I.size==="large"&&s.default["tedi-search__wrapper--large"]),role:"search","aria-label":Ve,onBlur:Ke,children:[r.jsx(Xe.TextField,{...ze}),a&&r.jsx(Je.Button,{...a,onClick:Ue,className:N.default(s.default["tedi-search__button"],!a.children&&s.default["tedi-search__button--icon-only"],a.className),"aria-label":a["aria-label"]??(a.children?void 0:y("search")),children:a.children??y("search")}),d&&r.jsx("span",{"aria-live":"polite",role:"status",className:s.default["tedi-search__announcement"],children:Ge}),p&&r.jsx(C.FloatingPortal,{children:r.jsxs("div",{ref:_.setFloating,style:Ie,className:s.default["tedi-search__panel"],...De(),children:[Qe(),O&&r.jsx("div",{ref:M,className:s.default["tedi-search__footer"],onKeyDown:Be,children:O})]})})]})});he.displayName="Search";const nt=he;exports.Search=nt;
|
|
@@ -2,9 +2,32 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { IconWithoutBackgroundProps } from '../../base/icon/icon';
|
|
3
3
|
import { ButtonProps } from '../../buttons/button/button';
|
|
4
4
|
import { TextFieldForwardRef, TextFieldProps } from '../textfield/textfield';
|
|
5
|
-
export interface
|
|
5
|
+
export interface SearchSuggestion {
|
|
6
|
+
/**
|
|
7
|
+
* Stable value returned to `onSuggestionSelect` and used as the React key. For
|
|
8
|
+
* richer payloads keep a lookup keyed by this value on the consumer side.
|
|
9
|
+
*/
|
|
10
|
+
value: string;
|
|
11
|
+
/**
|
|
12
|
+
* Visible label. Falls back to `value` when omitted.
|
|
13
|
+
*/
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Optional secondary line shown beneath the label (e.g. a code, category, or
|
|
17
|
+
* hint). Rendered as `OptionContent.Meta` in the default row layout; ignored
|
|
18
|
+
* when a custom `renderSuggestionContent` is supplied.
|
|
19
|
+
*/
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Renders the suggestion greyed out and skips it during keyboard navigation.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface SearchProps extends Omit<TextFieldProps, 'isTextArea' | 'icon' | 'onIconClick' | 'iconButtonProps' | 'isArrowsHidden' | 'onKeyPress' | 'startSlot' | 'endSlot' | 'inputClassName'> {
|
|
6
28
|
/**
|
|
7
29
|
* Callback triggered when the search is executed (Enter key pressed or button clicked).
|
|
30
|
+
* In autocomplete mode it fires on Enter only when no suggestion is active — a free-text submit.
|
|
8
31
|
*/
|
|
9
32
|
onSearch?: (value: string) => void;
|
|
10
33
|
/**
|
|
@@ -20,5 +43,73 @@ export interface SearchProps extends Omit<TextFieldProps, 'isTextArea' | 'icon'
|
|
|
20
43
|
* E.g., "Search products" or "Search site".
|
|
21
44
|
*/
|
|
22
45
|
ariaLabel?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Suggestions rendered in the popup. Providing this array (even empty) turns the
|
|
48
|
+
* field into an accessible combobox; leave it `undefined` for a plain search
|
|
49
|
+
* field. Filter / fetch these yourself in response to `onChange`; the component
|
|
50
|
+
* renders exactly what it is given.
|
|
51
|
+
*/
|
|
52
|
+
suggestions?: SearchSuggestion[];
|
|
53
|
+
/**
|
|
54
|
+
* Fired when a suggestion is chosen (Enter on the active suggestion, or click). In
|
|
55
|
+
* controlled mode update `value` from here to reflect the picked label.
|
|
56
|
+
*/
|
|
57
|
+
onSuggestionSelect?: (suggestion: SearchSuggestion) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Shows a loading row in the popup instead of suggestions — use while an async
|
|
60
|
+
* request is in flight.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
loading?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Minimum query length (after trimming) before the popup opens.
|
|
66
|
+
* @default 0
|
|
67
|
+
*/
|
|
68
|
+
minQueryLength?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Closes the suggestion popup when the page (or a scrollable ancestor) scrolls.
|
|
71
|
+
* Scrolling the suggestion list itself keeps the popup open.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
hideOnScroll?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Custom suggestion renderer. Receives the suggestion plus its active state and
|
|
77
|
+
* the current query (handy for match highlighting).
|
|
78
|
+
*/
|
|
79
|
+
renderSuggestionContent?: (suggestion: SearchSuggestion, state: {
|
|
80
|
+
active: boolean;
|
|
81
|
+
query: string;
|
|
82
|
+
}) => React.ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Derives the input text to show after a suggestion is picked (uncontrolled mode).
|
|
85
|
+
* Defaults to the suggestion's string label, falling back to its `value`.
|
|
86
|
+
*/
|
|
87
|
+
getSuggestionText?: (suggestion: SearchSuggestion) => string;
|
|
88
|
+
/**
|
|
89
|
+
* Text shown when there are no suggestions and it is not loading. Defaults to the
|
|
90
|
+
* localized `search.no-results` label.
|
|
91
|
+
*/
|
|
92
|
+
noResultsText?: React.ReactNode;
|
|
93
|
+
/**
|
|
94
|
+
* Text shown in the loading row. Defaults to the localized `search.loading` label.
|
|
95
|
+
*/
|
|
96
|
+
loadingText?: React.ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* Builds the politely announced live-region message stating how many suggestions
|
|
99
|
+
* are available. Defaults to the localized `search.results-count` label.
|
|
100
|
+
*/
|
|
101
|
+
resultsCountText?: (count: number) => string;
|
|
102
|
+
/**
|
|
103
|
+
* Extra content pinned below the suggestions — fallback actions or a hint, for
|
|
104
|
+
* example. It shows whenever the popup is open, including the no-results state.
|
|
105
|
+
* `Tab` from the field moves focus into the footer's controls.
|
|
106
|
+
*/
|
|
107
|
+
footer?: React.ReactNode;
|
|
108
|
+
/**
|
|
109
|
+
* Additional native attributes for the input element (e.g. `autoComplete`, `maxLength`).
|
|
110
|
+
* Narrowed to input attributes — a search field is always a single-line `<input>`.
|
|
111
|
+
*/
|
|
112
|
+
input?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
23
113
|
}
|
|
24
114
|
export declare const Search: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<TextFieldForwardRef>>;
|
|
115
|
+
export default Search;
|
|
@@ -1,74 +1,270 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
import { jsxs as C, jsx as s, Fragment as We } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as Xe, useDismiss as Ye, useListNavigation as Ze, useInteractions as et, FloatingPortal as tt } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import g from "../../../../../external/classnames/index.es.js";
|
|
4
|
+
import q, { forwardRef as rt, useMemo as pe, useState as H, useRef as T } from "react";
|
|
5
|
+
import { Text as Q } from "../../base/typography/text/text.es.js";
|
|
6
|
+
import { Button as nt } from "../../buttons/button/button.es.js";
|
|
7
|
+
import { Spinner as ot } from "../../loaders/spinner/spinner.es.js";
|
|
8
|
+
import { OptionContent as U } from "../../misc/option-content/option-content.es.js";
|
|
9
|
+
import { TextField as st } from "../textfield/textfield.es.js";
|
|
10
|
+
import n from "./search.module.scss.es.js";
|
|
11
|
+
import { useLabels as at } from "../../../providers/label-provider/use-labels.es.js";
|
|
12
|
+
import { autoUpdate as it } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
|
|
13
|
+
import { offset as lt, flip as ct, shift as dt, size as ut } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
|
|
14
|
+
const ft = 4, G = 8, he = [
|
|
15
|
+
"a[href]",
|
|
16
|
+
"area[href]",
|
|
17
|
+
"button:not([disabled])",
|
|
18
|
+
"input:not([disabled])",
|
|
19
|
+
"select:not([disabled])",
|
|
20
|
+
"textarea:not([disabled])",
|
|
21
|
+
"iframe",
|
|
22
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
23
|
+
].join(","), pt = (a, m) => m ? m(a) : typeof a.label == "string" ? a.label : String(a.value), ht = (a, m) => {
|
|
24
|
+
const b = m.trim();
|
|
25
|
+
if (!b) return a;
|
|
26
|
+
const f = a.toLowerCase().indexOf(b.toLowerCase());
|
|
27
|
+
return f === -1 ? a : /* @__PURE__ */ C(We, { children: [
|
|
28
|
+
a.slice(0, f),
|
|
29
|
+
/* @__PURE__ */ s(Q, { element: "span", modifiers: "bold", children: a.slice(f, f + b.length) }),
|
|
30
|
+
a.slice(f + b.length)
|
|
31
|
+
] });
|
|
32
|
+
}, me = rt((a, m) => {
|
|
33
|
+
var fe;
|
|
34
|
+
const {
|
|
35
|
+
id: b,
|
|
36
|
+
placeholder: f,
|
|
37
|
+
isClearable: be = !0,
|
|
38
|
+
searchIcon: F = "search",
|
|
39
|
+
onSearch: d,
|
|
40
|
+
onChange: S,
|
|
41
|
+
onClear: ye,
|
|
42
|
+
onFocus: E,
|
|
43
|
+
button: o,
|
|
44
|
+
ariaLabel: _e,
|
|
45
|
+
className: ve,
|
|
46
|
+
input: I,
|
|
47
|
+
value: J,
|
|
48
|
+
defaultValue: xe,
|
|
49
|
+
suggestions: w,
|
|
50
|
+
onSuggestionSelect: P,
|
|
51
|
+
loading: v = !1,
|
|
52
|
+
minQueryLength: W = 0,
|
|
53
|
+
hideOnScroll: Ne = !1,
|
|
54
|
+
renderSuggestionContent: k,
|
|
55
|
+
getSuggestionText: ge,
|
|
56
|
+
noResultsText: Ce,
|
|
57
|
+
loadingText: Ie,
|
|
58
|
+
resultsCountText: we,
|
|
59
|
+
footer: K,
|
|
60
|
+
...A
|
|
61
|
+
} = a, { getLabel: y } = at(), Ae = q.useId(), B = b ?? Ae, c = w !== void 0, i = pe(() => Array.isArray(w) ? w : [], [w]), X = J !== void 0, [De, Y] = H(xe ?? ""), u = J ?? De, [O, x] = H(!1), [l, M] = H(null), Z = T([]), z = T(null), N = T(null), D = T(!1);
|
|
62
|
+
q.useImperativeHandle(m, () => N.current, []);
|
|
63
|
+
const ee = u.trim().length >= W, V = !v && i.length > 0, Re = pe(
|
|
64
|
+
() => i.reduce((e, t, r) => t.disabled ? [...e, r] : e, []),
|
|
65
|
+
[i]
|
|
66
|
+
), { refs: _, floatingStyles: Le, context: te } = Xe({
|
|
67
|
+
open: c && O,
|
|
68
|
+
onOpenChange: x,
|
|
69
|
+
placement: "bottom-start",
|
|
70
|
+
whileElementsMounted: it,
|
|
71
|
+
middleware: [
|
|
72
|
+
lt(ft),
|
|
73
|
+
ct({ padding: G }),
|
|
74
|
+
dt({ padding: G }),
|
|
75
|
+
ut({
|
|
76
|
+
padding: G,
|
|
77
|
+
apply({ rects: e, elements: t, availableHeight: r }) {
|
|
78
|
+
t.floating.style.width = `${e.reference.width}px`, t.floating.style.setProperty("--tedi-search-panel-available-height", `${r}px`);
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}), Te = Ye(te, { ancestorScroll: Ne }), Fe = Ze(te, {
|
|
83
|
+
listRef: Z,
|
|
84
|
+
activeIndex: l,
|
|
85
|
+
onNavigate: M,
|
|
86
|
+
virtual: !0,
|
|
87
|
+
loop: !0,
|
|
88
|
+
disabledIndices: Re
|
|
89
|
+
}), { getReferenceProps: Se, getFloatingProps: Ee, getItemProps: Pe } = et([Te, Fe]);
|
|
90
|
+
q.useEffect(() => {
|
|
91
|
+
var e;
|
|
92
|
+
_.setPositionReference(((e = N.current) == null ? void 0 : e.inner) ?? null);
|
|
93
|
+
}, [_, c]);
|
|
94
|
+
const re = `${B}-listbox`, ne = (e) => `${B}-option-${e}`, p = c && O && ee && (v || V || u.trim().length > 0), oe = () => z.current ? Array.from(z.current.querySelectorAll(he)) : [], se = (e = !0) => {
|
|
95
|
+
var t, r;
|
|
96
|
+
D.current = e, (r = (t = N.current) == null ? void 0 : t.input) == null || r.focus();
|
|
97
|
+
}, R = () => {
|
|
98
|
+
x(!1), M(null);
|
|
99
|
+
}, ae = (e) => {
|
|
100
|
+
e.disabled || (X || Y(pt(e, ge)), P == null || P(e), R());
|
|
101
|
+
}, ke = (e) => {
|
|
102
|
+
X || Y(e), S == null || S(e), c && (D.current = !1, M(null), x(e.trim().length >= W));
|
|
103
|
+
}, Ke = (e) => {
|
|
104
|
+
if (E == null || E(e), !!c) {
|
|
105
|
+
if (D.current) {
|
|
106
|
+
D.current = !1;
|
|
107
|
+
return;
|
|
67
108
|
}
|
|
109
|
+
ee && x(!0);
|
|
110
|
+
}
|
|
111
|
+
}, Be = (e) => {
|
|
112
|
+
e.key === "Enter" && (d == null || d(u));
|
|
113
|
+
}, Oe = !v && l !== null && !((fe = i[l]) != null && fe.disabled) ? i[l] : void 0, Me = () => {
|
|
114
|
+
var h, L;
|
|
115
|
+
const e = (h = N.current) == null ? void 0 : h.input;
|
|
116
|
+
if (!e) return;
|
|
117
|
+
const t = _.floating.current, r = Array.from(document.body.querySelectorAll(he)).filter(
|
|
118
|
+
($) => !(t != null && t.contains($))
|
|
68
119
|
);
|
|
120
|
+
(L = r[r.indexOf(e) + 1]) == null || L.focus();
|
|
121
|
+
}, ze = (e) => {
|
|
122
|
+
if (e.key === "Enter") {
|
|
123
|
+
if (p && l !== null && i[l] && !i[l].disabled) {
|
|
124
|
+
e.preventDefault(), ae(i[l]);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
d == null || d(u), x(!1);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (e.key === "Tab" && !e.shiftKey && p && K) {
|
|
131
|
+
const t = oe();
|
|
132
|
+
t.length && (e.preventDefault(), t[0].focus());
|
|
133
|
+
}
|
|
134
|
+
}, Ve = (e) => {
|
|
135
|
+
if (!c || !O) return;
|
|
136
|
+
const t = e.relatedTarget, r = _.floating.current;
|
|
137
|
+
t && (e.currentTarget.contains(t) || r != null && r.contains(t)) || R();
|
|
138
|
+
}, $e = (e) => {
|
|
139
|
+
if (e.key === "Escape") {
|
|
140
|
+
e.preventDefault(), R(), se();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (e.key !== "Tab") return;
|
|
144
|
+
const t = oe(), r = t.indexOf(e.target);
|
|
145
|
+
e.shiftKey && r === 0 ? (e.preventDefault(), se()) : !e.shiftKey && r === t.length - 1 && (e.preventDefault(), R(), Me());
|
|
146
|
+
}, ie = typeof F == "string" ? { name: F } : F, je = {
|
|
147
|
+
color: "secondary",
|
|
148
|
+
...ie,
|
|
149
|
+
className: g(ie.className, A.disabled && n["tedi-search__icon--disabled"])
|
|
150
|
+
}, le = c ? Se({
|
|
151
|
+
role: "combobox",
|
|
152
|
+
"aria-autocomplete": "list",
|
|
153
|
+
"aria-expanded": p,
|
|
154
|
+
"aria-controls": p && V ? re : void 0,
|
|
155
|
+
"aria-activedescendant": p && Oe && l !== null ? ne(l) : void 0,
|
|
156
|
+
onKeyDown: ze
|
|
157
|
+
}) : { role: "searchbox" }, ce = { ...I, ...le };
|
|
158
|
+
if (c) {
|
|
159
|
+
const e = I == null ? void 0 : I.onKeyDown, t = le.onKeyDown;
|
|
160
|
+
ce.onKeyDown = (r) => {
|
|
161
|
+
e == null || e(r), t == null || t(r);
|
|
162
|
+
};
|
|
69
163
|
}
|
|
70
|
-
|
|
71
|
-
|
|
164
|
+
const qe = {
|
|
165
|
+
...A,
|
|
166
|
+
ref: N,
|
|
167
|
+
id: B,
|
|
168
|
+
value: u,
|
|
169
|
+
onChange: ke,
|
|
170
|
+
onClear: ye,
|
|
171
|
+
onFocus: Ke,
|
|
172
|
+
inputClassName: g(n["tedi-search__input"], o && n["tedi-search__input--has-button"], ve),
|
|
173
|
+
placeholder: f,
|
|
174
|
+
isClearable: be,
|
|
175
|
+
input: ce,
|
|
176
|
+
...o ? {} : { icon: je },
|
|
177
|
+
...c ? {} : { onKeyDown: Be }
|
|
178
|
+
}, He = (e) => {
|
|
179
|
+
var t;
|
|
180
|
+
(t = o == null ? void 0 : o.onClick) == null || t.call(o, e), d == null || d(u);
|
|
181
|
+
}, Ue = _e || y("search"), de = Ie ?? y("search.loading"), ue = Ce ?? y("search.no-results"), Ge = we ?? ((e) => y("search.results-count", e)), Qe = p ? v ? de : i.length > 0 ? Ge(i.length) : ue : "", Je = () => v ? /* @__PURE__ */ C("div", { className: n["tedi-search__panel-status"], children: [
|
|
182
|
+
/* @__PURE__ */ s(ot, { size: 16 }),
|
|
183
|
+
/* @__PURE__ */ s(Q, { color: "tertiary", children: de })
|
|
184
|
+
] }) : V ? /* @__PURE__ */ s("ul", { id: re, role: "listbox", className: n["tedi-search__panel-list"], children: i.map((e, t) => {
|
|
185
|
+
const r = l === t && !e.disabled, h = typeof (e.label ?? e.value) == "string" ? String(e.label ?? e.value) : void 0, L = typeof e.description == "string" ? e.description : void 0, $ = !k && h ? [h, L].filter(Boolean).join(", ") : void 0;
|
|
186
|
+
return /* @__PURE__ */ s(
|
|
187
|
+
"li",
|
|
188
|
+
{
|
|
189
|
+
id: ne(t),
|
|
190
|
+
role: "option",
|
|
191
|
+
"aria-selected": r,
|
|
192
|
+
"aria-disabled": e.disabled || void 0,
|
|
193
|
+
"aria-label": $,
|
|
194
|
+
ref: (j) => {
|
|
195
|
+
Z.current[t] = j;
|
|
196
|
+
},
|
|
197
|
+
className: g(n["tedi-search__option"], {
|
|
198
|
+
[n["tedi-search__option--active"]]: r,
|
|
199
|
+
[n["tedi-search__option--disabled"]]: e.disabled
|
|
200
|
+
}),
|
|
201
|
+
...Pe({
|
|
202
|
+
onClick: () => ae(e),
|
|
203
|
+
onMouseDown: (j) => j.preventDefault()
|
|
204
|
+
}),
|
|
205
|
+
children: k ? k(e, { active: r, query: u }) : /* @__PURE__ */ C(
|
|
206
|
+
U,
|
|
207
|
+
{
|
|
208
|
+
disabled: e.disabled,
|
|
209
|
+
layout: e.description !== void 0 ? "vertical" : "horizontal",
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ s(U.Label, { children: h ? ht(h, u) : e.label ?? e.value }),
|
|
212
|
+
e.description !== void 0 && /* @__PURE__ */ s(U.Meta, { children: e.description })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
},
|
|
217
|
+
e.value
|
|
218
|
+
);
|
|
219
|
+
}) }) : /* @__PURE__ */ s("div", { className: n["tedi-search__panel-status"], children: /* @__PURE__ */ s(Q, { color: "tertiary", children: ue }) });
|
|
220
|
+
return /* @__PURE__ */ C(
|
|
221
|
+
"div",
|
|
222
|
+
{
|
|
223
|
+
ref: _.setReference,
|
|
224
|
+
className: g(
|
|
225
|
+
n["tedi-search__wrapper"],
|
|
226
|
+
A.size === "small" && n["tedi-search__wrapper--small"],
|
|
227
|
+
A.size === "large" && n["tedi-search__wrapper--large"]
|
|
228
|
+
),
|
|
229
|
+
role: "search",
|
|
230
|
+
"aria-label": Ue,
|
|
231
|
+
onBlur: Ve,
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ s(st, { ...qe }),
|
|
234
|
+
o && /* @__PURE__ */ s(
|
|
235
|
+
nt,
|
|
236
|
+
{
|
|
237
|
+
...o,
|
|
238
|
+
onClick: He,
|
|
239
|
+
className: g(
|
|
240
|
+
n["tedi-search__button"],
|
|
241
|
+
!o.children && n["tedi-search__button--icon-only"],
|
|
242
|
+
o.className
|
|
243
|
+
),
|
|
244
|
+
"aria-label": o["aria-label"] ?? (o.children ? void 0 : y("search")),
|
|
245
|
+
children: o.children ?? y("search")
|
|
246
|
+
}
|
|
247
|
+
),
|
|
248
|
+
c && /* @__PURE__ */ s("span", { "aria-live": "polite", role: "status", className: n["tedi-search__announcement"], children: Qe }),
|
|
249
|
+
p && /* @__PURE__ */ s(tt, { children: /* @__PURE__ */ C(
|
|
250
|
+
"div",
|
|
251
|
+
{
|
|
252
|
+
ref: _.setFloating,
|
|
253
|
+
style: Le,
|
|
254
|
+
className: n["tedi-search__panel"],
|
|
255
|
+
...Ee(),
|
|
256
|
+
children: [
|
|
257
|
+
Je(),
|
|
258
|
+
K && /* @__PURE__ */ s("div", { ref: z, className: n["tedi-search__footer"], onKeyDown: $e, children: K })
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
) })
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
});
|
|
266
|
+
me.displayName = "Search";
|
|
267
|
+
const Rt = me;
|
|
72
268
|
export {
|
|
73
|
-
|
|
269
|
+
Rt as Search
|
|
74
270
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-search__wrapper":"tedi-search__wrapper-92d6f11f","tedi-search__input":"tedi-search__input-94d53b76","tedi-search__input--has-button":"tedi-search__input--has-button-d8e073e7","tedi-search__icon--disabled":"tedi-search__icon--disabled-2b492592","tedi-search__button":"tedi-search__button-cbb4df17","tedi-search__wrapper--small":"tedi-search__wrapper--small-7c104c6a","tedi-search__wrapper--large":"tedi-search__wrapper--large-b59e60d7","tedi-search__button--icon-only":"tedi-search__button--icon-only-cf897af5"};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-search__wrapper":"tedi-search__wrapper-92d6f11f","tedi-search__input":"tedi-search__input-94d53b76","tedi-search__input--has-button":"tedi-search__input--has-button-d8e073e7","tedi-search__icon--disabled":"tedi-search__icon--disabled-2b492592","tedi-search__button":"tedi-search__button-cbb4df17","tedi-search__wrapper--small":"tedi-search__wrapper--small-7c104c6a","tedi-search__wrapper--large":"tedi-search__wrapper--large-b59e60d7","tedi-search__button--icon-only":"tedi-search__button--icon-only-cf897af5","tedi-search__panel":"tedi-search__panel-7a3fa5f0","tedi-search__panel-list":"tedi-search__panel-list-78174923","tedi-search__option":"tedi-search__option-a57e9a32","tedi-search__option--active":"tedi-search__option--active-4831d2e9","tedi-search__option--disabled":"tedi-search__option--disabled-c0308fc9","tedi-search__panel-status":"tedi-search__panel-status-1f8248ab","tedi-search__footer":"tedi-search__footer-d45973c7","tedi-search__announcement":"tedi-search__announcement-fbcbe856"};exports.default=e;
|
|
@@ -6,7 +6,15 @@ const e = {
|
|
|
6
6
|
"tedi-search__button": "tedi-search__button-cbb4df17",
|
|
7
7
|
"tedi-search__wrapper--small": "tedi-search__wrapper--small-7c104c6a",
|
|
8
8
|
"tedi-search__wrapper--large": "tedi-search__wrapper--large-b59e60d7",
|
|
9
|
-
"tedi-search__button--icon-only": "tedi-search__button--icon-only-cf897af5"
|
|
9
|
+
"tedi-search__button--icon-only": "tedi-search__button--icon-only-cf897af5",
|
|
10
|
+
"tedi-search__panel": "tedi-search__panel-7a3fa5f0",
|
|
11
|
+
"tedi-search__panel-list": "tedi-search__panel-list-78174923",
|
|
12
|
+
"tedi-search__option": "tedi-search__option-a57e9a32",
|
|
13
|
+
"tedi-search__option--active": "tedi-search__option--active-4831d2e9",
|
|
14
|
+
"tedi-search__option--disabled": "tedi-search__option--disabled-c0308fc9",
|
|
15
|
+
"tedi-search__panel-status": "tedi-search__panel-status-1f8248ab",
|
|
16
|
+
"tedi-search__footer": "tedi-search__footer-d45973c7",
|
|
17
|
+
"tedi-search__announcement": "tedi-search__announcement-fbcbe856"
|
|
10
18
|
};
|
|
11
19
|
export {
|
|
12
20
|
e as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),e=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),A=require("../../../../../external/classnames/index.cjs.js"),t=require("react"),v=require("./dropdown.module.scss.cjs.js"),z=require("./dropdown-content/dropdown-content.cjs.js"),G=require("./dropdown-context.cjs.js"),J=require("./dropdown-helpers.cjs.js"),K=require("./dropdown-item/dropdown-item.cjs.js"),Q=require("./dropdown-separator/dropdown-separator.cjs.js"),V=require("./dropdown-trigger/dropdown-trigger.cjs.js"),X=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),Y=require("../../../providers/label-provider/use-labels.cjs.js"),Z=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),e=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),A=require("../../../../../external/classnames/index.cjs.js"),t=require("react"),v=require("./dropdown.module.scss.cjs.js"),z=require("./dropdown-content/dropdown-content.cjs.js"),G=require("./dropdown-context.cjs.js"),J=require("./dropdown-helpers.cjs.js"),K=require("./dropdown-item/dropdown-item.cjs.js"),Q=require("./dropdown-separator/dropdown-separator.cjs.js"),V=require("./dropdown-trigger/dropdown-trigger.cjs.js"),X=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),Y=require("../../../providers/label-provider/use-labels.cjs.js"),Z=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),x=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),ee=4,a=h=>{var O;const{getCurrentBreakpointProps:b}=X.useBreakpointProps(h.defaultServerBreakpoint),{children:F,modal:q=!1,divided:P=!1,width:R="auto",variant:p="default",open:f,defaultOpen:y=!1,onOpenChange:l,defaultActiveIndex:n,placement:g="bottom-start",maxHeight:c,className:j}=b(h),{getLabel:N}=Y.useLabels(),_=e.useFloatingNodeId(),D=t.useRef([]),[u,m]=t.useState(n??null),[w,k]=t.useState(null),[B,T]=t.useState(y),o=f??B;t.useEffect(()=>{o||m(n??null)},[o,n]);const I=t.useCallback(i=>{f===void 0&&T(i),l==null||l(i)},[f,l]),U=e.useFloating({nodeId:_,open:o,placement:g,onOpenChange:I,middleware:[x.offset(ee),x.flip(),x.shift()],whileElementsMounted:Z.autoUpdate}),{context:r,refs:s,x:H,y:L,strategy:M}=U,C=e.useInteractions([e.useClick(r),e.useRole(r,{role:"menu"}),e.useDismiss(r),e.useListNavigation(r,{listRef:D,activeIndex:u,onNavigate:m,loop:!0,selectedIndex:n??null,focusItemOnOpen:n!==null?!0:"auto"})]),W={open:o,setOpen:I,refs:s,listItemsRef:D,activeIndex:u,setActiveIndex:m,placement:g,content:w,setContent:k,divided:P,variant:p,...C},E=(O=s.reference.current)==null?void 0:O.getBoundingClientRect().width,$=t.useMemo(()=>{const i=s.reference.current;if(!i)return;const S=i.offsetParent;if(S)return S.getBoundingClientRect().width},[s.reference.current]);return d.jsxs(G.DropdownContext.Provider,{value:W,children:[F,d.jsx(e.FloatingPortal,{children:o&&d.jsx(e.FloatingFocusManager,{context:r,modal:q,visuallyHiddenDismiss:q?N("close"):!1,children:d.jsx("div",{...C.getFloatingProps({ref:s.setFloating,className:A.default(v.default["tedi-dropdown"],{[v.default[`tedi-dropdown--${p}`]]:p==="tree"},j),style:{position:M,left:H??0,top:L??0,width:J.resolveDropdownWidth(R,E,$)},role:"menu","aria-orientation":"vertical","aria-activedescendant":u!==null?`dropdown-item-${u}`:void 0}),"data-placement":g,"data-state":o?"open":"closed",children:c!==void 0?d.jsx("div",{className:v.default["tedi-dropdown__scroll"],role:"group",tabIndex:0,style:{maxHeight:typeof c=="number"?`${c}px`:c},children:w}):w})})})]})};a.Trigger=V.DropdownTrigger;a.Content=z.DropdownContent;a.Item=K.DropdownItem;a.Separator=Q.DropdownSeparator;exports.Dropdown=a;
|
|
@@ -32,7 +32,7 @@ const me = 4, c = (h) => {
|
|
|
32
32
|
e.useEffect(() => {
|
|
33
33
|
t || f(o ?? null);
|
|
34
34
|
}, [t, o]);
|
|
35
|
-
const
|
|
35
|
+
const I = e.useCallback(
|
|
36
36
|
(i) => {
|
|
37
37
|
p === void 0 && W(i), s == null || s(i);
|
|
38
38
|
},
|
|
@@ -41,10 +41,10 @@ const me = 4, c = (h) => {
|
|
|
41
41
|
nodeId: k,
|
|
42
42
|
open: t,
|
|
43
43
|
placement: u,
|
|
44
|
-
onOpenChange:
|
|
44
|
+
onOpenChange: I,
|
|
45
45
|
middleware: [le(me), de(), ce()],
|
|
46
46
|
whileElementsMounted: ae
|
|
47
|
-
}), { context: n, refs: r, x: H, y: L, strategy: M } = E,
|
|
47
|
+
}), { context: n, refs: r, x: H, y: L, strategy: M } = E, D = z([
|
|
48
48
|
G(n),
|
|
49
49
|
J(n, { role: "menu" }),
|
|
50
50
|
K(n),
|
|
@@ -58,7 +58,7 @@ const me = 4, c = (h) => {
|
|
|
58
58
|
})
|
|
59
59
|
]), T = {
|
|
60
60
|
open: t,
|
|
61
|
-
setOpen:
|
|
61
|
+
setOpen: I,
|
|
62
62
|
refs: r,
|
|
63
63
|
listItemsRef: x,
|
|
64
64
|
activeIndex: l,
|
|
@@ -68,7 +68,7 @@ const me = 4, c = (h) => {
|
|
|
68
68
|
setContent: B,
|
|
69
69
|
divided: R,
|
|
70
70
|
variant: m,
|
|
71
|
-
...
|
|
71
|
+
...D
|
|
72
72
|
}, $ = (O = r.reference.current) == null ? void 0 : O.getBoundingClientRect().width, j = e.useMemo(() => {
|
|
73
73
|
const i = r.reference.current;
|
|
74
74
|
if (!i) return;
|
|
@@ -87,7 +87,7 @@ const me = 4, c = (h) => {
|
|
|
87
87
|
children: /* @__PURE__ */ d(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
|
-
...
|
|
90
|
+
...D.getFloatingProps({
|
|
91
91
|
ref: r.setFloating,
|
|
92
92
|
className: Y(
|
|
93
93
|
v["tedi-dropdown"],
|
|
@@ -110,6 +110,8 @@ const me = 4, c = (h) => {
|
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
112
|
className: v["tedi-dropdown__scroll"],
|
|
113
|
+
role: "group",
|
|
114
|
+
tabIndex: 0,
|
|
113
115
|
style: { maxHeight: typeof a == "number" ? `${a}px` : a },
|
|
114
116
|
children: g
|
|
115
117
|
}
|
package/src/tedi/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export * from './components/form/textarea/textarea';
|
|
|
48
48
|
export * from './components/form/number-field/number-field';
|
|
49
49
|
export * from './components/form/toggle/toggle';
|
|
50
50
|
export * from './components/form/feedback-text/feedback-text';
|
|
51
|
-
export * from './components/form/search
|
|
51
|
+
export * from './components/form/search';
|
|
52
52
|
export * from './components/form/radio/radio';
|
|
53
53
|
export * from './components/form/choice-group';
|
|
54
54
|
export * from './components/form/file-upload/file-upload';
|