@magicx-eng/ai-autocomplete-react 0.4.0 → 0.4.1
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/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
10
10
|
.AIAutocomplete-module_inputWrapper_FLq1b {
|
|
11
11
|
padding: 12px 10px;
|
|
12
12
|
border: 1px solid var(--aia-border, #b0b0b0);
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: 20px;
|
|
14
14
|
background: var(--aia-surface, #ffffff);
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
display: flex;
|
|
@@ -173,7 +173,7 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
173
173
|
--aia-surface: #ffffff;
|
|
174
174
|
--aia-border: #b0b0b0;
|
|
175
175
|
--aia-dropdown-border: #e5e7eb;
|
|
176
|
-
--aia-dropdown-shadow: 0 8px 12px rgba(0, 0, 0, 0.
|
|
176
|
+
--aia-dropdown-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
|
|
177
177
|
--aia-pill-bg: #bdbdbd;
|
|
178
178
|
--aia-pill-color: #333539;
|
|
179
179
|
--aia-pill-font-size: 14px;
|
|
@@ -208,12 +208,12 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
208
208
|
--aia-surface: #000000;
|
|
209
209
|
--aia-border: #505050;
|
|
210
210
|
--aia-dropdown-border: #484848;
|
|
211
|
-
--aia-dropdown-shadow: 0 8px 12px rgba(0, 0, 0, 0.
|
|
211
|
+
--aia-dropdown-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
|
|
212
212
|
--aia-pill-bg: #bdbdbd;
|
|
213
213
|
--aia-pill-color: #b0b0b0;
|
|
214
214
|
--aia-pill-font-size: 14px;
|
|
215
215
|
|
|
216
|
-
--aia-option-bg:
|
|
216
|
+
--aia-option-bg: #323232;
|
|
217
217
|
--aia-option-color: #b0b0b0;
|
|
218
218
|
--aia-option-color-selected: #ffffff;
|
|
219
219
|
--aia-option-font-size: 14px;
|
|
@@ -287,7 +287,7 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
287
287
|
display: flex;
|
|
288
288
|
flex-direction: column;
|
|
289
289
|
box-sizing: border-box;
|
|
290
|
-
padding:
|
|
290
|
+
padding: 10px 8px;
|
|
291
291
|
overflow: hidden;
|
|
292
292
|
container-type: inline-size;
|
|
293
293
|
z-index: 10;
|
|
@@ -298,8 +298,8 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
298
298
|
frosted-glass look with data-aia-surface="glass". */
|
|
299
299
|
background: var(--aia-surface, #ffffff);
|
|
300
300
|
border: 1px solid var(--aia-dropdown-border, #e5e7eb);
|
|
301
|
-
border-radius:
|
|
302
|
-
box-shadow: var(--aia-dropdown-shadow, 0 8px 12px rgba(0, 0, 0, 0.
|
|
301
|
+
border-radius: 18px;
|
|
302
|
+
box-shadow: var(--aia-dropdown-shadow, 0 8px 12px rgba(0, 0, 0, 0.1));
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
.AIAutocompleteDropdown-module_dropdown_yz2KC[data-aia-surface="glass"] {
|
|
@@ -324,10 +324,9 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
324
324
|
pointer-events: auto;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
/* The dropdown owns
|
|
328
|
-
(
|
|
327
|
+
/* The dropdown container owns the 10px/8px edge padding and the 8px section
|
|
328
|
+
gaps (matching Figma); the pill row adds none \u2014 just horizontal scroll + fade. */
|
|
329
329
|
.AIAutocompleteDropdown-module_pillBar_pwTXe {
|
|
330
|
-
padding: 7px 8px;
|
|
331
330
|
overflow-x: auto;
|
|
332
331
|
overflow-y: hidden;
|
|
333
332
|
scrollbar-width: none;
|
|
@@ -415,18 +414,19 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
415
414
|
justify-content: space-around;
|
|
416
415
|
}
|
|
417
416
|
}
|
|
418
|
-
`,document.head.appendChild(e)}import{jsx as Me}from"react/jsx-runtime";function le({gap:e,align:c="center",justify:i="start",noWrap:u=!1,inline:r=!1,className:n,children:s,...l}){let g=e?{"--aia-cluster-gap":e}:void 0,b={className:n?`aia-cluster ${n}`:"aia-cluster","data-align":c,"data-justify":i,"data-nowrap":u||void 0,"data-inline":r||void 0,style:g,...l};return r?Me("span",{...b,children:s}):Me("div",{...b,children:s})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own
|
|
419
|
-
|
|
420
|
-
dropdown's
|
|
417
|
+
`,document.head.appendChild(e)}import{jsx as Me}from"react/jsx-runtime";function le({gap:e,align:c="center",justify:i="start",noWrap:u=!1,inline:r=!1,className:n,children:s,...l}){let g=e?{"--aia-cluster-gap":e}:void 0,b={className:n?`aia-cluster ${n}`:"aia-cluster","data-align":c,"data-justify":i,"data-nowrap":u||void 0,"data-inline":r||void 0,style:g,...l};return r?Me("span",{...b,children:s}):Me("div",{...b,children:s})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own 8px horizontal inset (no vertical padding \u2014 the 8px
|
|
418
|
+
section gap above and its own 8px gap provide the vertical rhythm), so the
|
|
419
|
+
divider spans the full footer width yet still stays clear of the dropdown's
|
|
420
|
+
rounded edges. */
|
|
421
421
|
.DropdownFooter-module_footer_qQQ7x {
|
|
422
422
|
display: flex;
|
|
423
423
|
flex-direction: column;
|
|
424
424
|
gap: 8px;
|
|
425
|
-
padding:
|
|
425
|
+
padding: 0 8px;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
.DropdownFooter-module_divider_FlX4C {
|
|
429
|
-
border-top:
|
|
429
|
+
border-top: 1px solid var(--aia-footer-divider, rgba(176, 176, 176, 0.4));
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
.DropdownFooter-module_hintGroup_ZzbPf {
|
|
@@ -969,7 +969,7 @@ import{forwardRef as Tt,useCallback as Le,useEffect as at,useImperativeHandle as
|
|
|
969
969
|
}
|
|
970
970
|
/* data-align="stretch" is the flex default \u2014 no rule needed. */
|
|
971
971
|
}
|
|
972
|
-
`,document.head.appendChild(e)}import{jsx as _t}from"react/jsx-runtime";function Qe({space:e,align:c="stretch",className:i,children:u,...r}){let n=e?{"--aia-stack-space":e}:void 0;return _t("div",{className:i?`aia-stack ${i}`:"aia-stack","data-align":c,style:n,...r,children:u})}import{jsx as oe,jsxs as St}from"react/jsx-runtime";var kt=[159,119,164];function Ce({suggestions:e,activeIndex:c,onSelect:i,onHighlight:u,isOpen:r,id:n,className:s,pills:l,onPillClick:g,showPills:b=!0,activeSelected:D=!1,isLoading:k=!1,hasTabbedToHighlight:I=!1,isInputEmpty:S=!1,optionsPosition:x="below"}){let R=e[0]?.options??[],z=!!(l&&l.length>0&&g),F=r&&(R.length>0||b&&z||k),t={suggestions:e,activeIndex:c,pills:l,showPills:b,activeSelected:D,isLoading:k,hasTabbedToHighlight:I,isInputEmpty:S},w=It(t);F&&(w.current=t);let m=F?t:w.current,T=m.suggestions[0]?.options??[],G=m.activeIndex>=0&&!!T[m.activeIndex]?.is_tappable,H=!!(m.pills&&m.pills.length>0&&g),C=m.showPills&&H,j=m.showPills&&!H&&m.isLoading,L=C||j,V=T.length>0,q=m.isLoading&&!V;return oe("div",{id:n,role:"listbox","data-aia-dropdown":"","data-options-position":x,"data-aia-loading":m.isLoading?"":void 0,className:`${ne.dropdown} ${F?ne.visible:""} ${s??""}`,onMouseDown:B=>B.preventDefault(),children:St(Qe,{space:"
|
|
972
|
+
`,document.head.appendChild(e)}import{jsx as _t}from"react/jsx-runtime";function Qe({space:e,align:c="stretch",className:i,children:u,...r}){let n=e?{"--aia-stack-space":e}:void 0;return _t("div",{className:i?`aia-stack ${i}`:"aia-stack","data-align":c,style:n,...r,children:u})}import{jsx as oe,jsxs as St}from"react/jsx-runtime";var kt=[159,119,164];function Ce({suggestions:e,activeIndex:c,onSelect:i,onHighlight:u,isOpen:r,id:n,className:s,pills:l,onPillClick:g,showPills:b=!0,activeSelected:D=!1,isLoading:k=!1,hasTabbedToHighlight:I=!1,isInputEmpty:S=!1,optionsPosition:x="below"}){let R=e[0]?.options??[],z=!!(l&&l.length>0&&g),F=r&&(R.length>0||b&&z||k),t={suggestions:e,activeIndex:c,pills:l,showPills:b,activeSelected:D,isLoading:k,hasTabbedToHighlight:I,isInputEmpty:S},w=It(t);F&&(w.current=t);let m=F?t:w.current,T=m.suggestions[0]?.options??[],G=m.activeIndex>=0&&!!T[m.activeIndex]?.is_tappable,H=!!(m.pills&&m.pills.length>0&&g),C=m.showPills&&H,j=m.showPills&&!H&&m.isLoading,L=C||j,V=T.length>0,q=m.isLoading&&!V;return oe("div",{id:n,role:"listbox","data-aia-dropdown":"","data-options-position":x,"data-aia-loading":m.isLoading?"":void 0,className:`${ne.dropdown} ${F?ne.visible:""} ${s??""}`,onMouseDown:B=>B.preventDefault(),children:St(Qe,{space:"8px",children:[L&&oe(le,{noWrap:!0,className:ne.pillBar,"data-aia-pillbar":"",children:oe(ve,{pills:m.pills??[],activePillIndex:0,activeSelected:m.activeSelected,onSelectPill:g??(()=>{}),rounded:!0,loading:m.isLoading})}),V&&oe(Ue,{options:T,activeIndex:m.activeIndex,onSelect:i,onHighlight:u,listboxId:n,loading:m.isLoading}),q&&oe("div",{className:ne.skeletonBars,"data-aia-skeleton-bars":"",children:kt.map(B=>oe("span",{className:ne.skeletonBar,style:{width:B}},`bar-${B}`))}),oe(Ne,{hasTabbedToHighlight:m.hasTabbedToHighlight,isOptionHighlighted:G,isInputEmpty:m.isInputEmpty})]})})}import{buildQuery as zt,ModeController as Ft,setCursorOffset as Ht}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-fdee06e6")){let e=document.createElement("style");e.id="ac-style-fdee06e6",e.textContent=`.SubmitButton-module_submitButton_otz7H {
|
|
973
973
|
flex-shrink: 0;
|
|
974
974
|
width: 32px;
|
|
975
975
|
height: 32px;
|