@adamosuiteservices/ui 2.12.0 → 2.12.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/{combobox-CYOGlfQe.js → combobox-BvjehNR7.js} +3 -3
- package/dist/{combobox-BhDOduAb.cjs → combobox-CDXlen0X.cjs} +1 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/input-otp.d.ts +0 -11
|
@@ -512,15 +512,15 @@ function St({
|
|
|
512
512
|
text: N() ?? null,
|
|
513
513
|
value: y
|
|
514
514
|
}) : /* @__PURE__ */ p.jsx("span", { children: N() }), J = () => d ? /* @__PURE__ */ p.jsxs("span", { className: "adm:flex adm:items-center adm:gap-2", children: [
|
|
515
|
-
r && /* @__PURE__ */ p.jsx(ee, { symbol: r, className: "adm:
|
|
515
|
+
r && /* @__PURE__ */ p.jsx(ee, { symbol: r, className: "adm:opacity-50" }),
|
|
516
516
|
q(),
|
|
517
517
|
k() && g === "left" && O()
|
|
518
518
|
] }) : /* @__PURE__ */ p.jsxs("span", { className: "adm:flex adm:items-center adm:gap-2", children: [
|
|
519
|
-
r && /* @__PURE__ */ p.jsx(ee, { symbol: r, className: "adm:
|
|
519
|
+
r && /* @__PURE__ */ p.jsx(ee, { symbol: r, className: "adm:opacity-50" }),
|
|
520
520
|
k() ? O() : q()
|
|
521
521
|
] }), X = () => u?.triggerIcon ? u.triggerIcon({
|
|
522
522
|
open: S
|
|
523
|
-
}) : /* @__PURE__ */ p.jsx(ee, { symbol: "expand_more", className: "adm:
|
|
523
|
+
}) : /* @__PURE__ */ p.jsx(ee, { symbol: "expand_more", className: "adm:opacity-50" }), P = () => d && k() && g === "right" ? /* @__PURE__ */ p.jsxs("span", { className: "adm:flex adm:items-center adm:gap-2", children: [
|
|
524
524
|
O(),
|
|
525
525
|
X()
|
|
526
526
|
] }) : /* @__PURE__ */ p.jsx("span", { className: "adm:flex adm:items-center adm:gap-2", children: X() }), V = () => u?.trigger ? u.trigger({
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
`,e),...n})}function it({searchable:e,multiple:n,icon:r,value:p,onValueChange:o,labels:d,options:m,classNames:c,selectedFeedback:g="checkbox",alwaysShowPlaceholder:i=!1,valuePosition:v="right",renders:s}){const I=ue.useRef(null),[R,C]=ue.useState(!1),[G,M]=ue.useState(n?[]:""),y=p!==void 0?p:G,A={...{placeholder:"Select options...",searchPlaceholder:"Search options...",noItemsFound:"No options found.",multipleSelected:f=>`${f} options selected`},...d},V=f=>{o?o(f):M(f)},N=()=>n&&Array.isArray(y)?y.length===0?null:y.length===1?m.find(f=>f.value===y[0])?.label:A.multipleSelected?.(y.length)||`${y.length} options selected`:!n&&typeof y=="string"&&y?m.find(f=>f.value===y)?.label:null,j=()=>n&&Array.isArray(y)?y.length>0:typeof y=="string"&&y!=="",k=f=>n&&Array.isArray(y)?y.includes(f):y===f,U=f=>{if(n){const P=Array.isArray(y)?y:[],t=P.includes(f)?P.filter(u=>u!==f):[...P,f];V(t)}else V(f===y?"":f),C(!1)},H=f=>{const P=k(f),t=m.find(u=>u.value===f);return s?.selectedFeedback?s.selectedFeedback({option:t,isSelected:P,type:g}):g==="check"?x.jsxRuntimeExports.jsx("span",{className:q.cn(`
|
|
38
38
|
adm:absolute adm:right-2 adm:flex adm:size-3.5 adm:items-center
|
|
39
39
|
adm:justify-center
|
|
40
|
-
`,c?.check),children:P&&x.jsxRuntimeExports.jsx(ee.Icon,{symbol:"check",className:"adm:text-lg"})}):x.jsxRuntimeExports.jsx(Ae.Checkbox,{checked:P,className:c?.checkbox})},K=()=>s?.placeholder?s.placeholder({text:A.placeholder||"",hasValue:j()}):x.jsxRuntimeExports.jsx("span",{className:"adm:opacity-70",children:A.placeholder}),O=()=>s?.displayValue?s.displayValue({text:N()??null,value:y}):x.jsxRuntimeExports.jsx("span",{children:N()}),J=()=>i?x.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[r&&x.jsxRuntimeExports.jsx(ee.Icon,{symbol:r,className:"adm:
|
|
40
|
+
`,c?.check),children:P&&x.jsxRuntimeExports.jsx(ee.Icon,{symbol:"check",className:"adm:text-lg"})}):x.jsxRuntimeExports.jsx(Ae.Checkbox,{checked:P,className:c?.checkbox})},K=()=>s?.placeholder?s.placeholder({text:A.placeholder||"",hasValue:j()}):x.jsxRuntimeExports.jsx("span",{className:"adm:opacity-70",children:A.placeholder}),O=()=>s?.displayValue?s.displayValue({text:N()??null,value:y}):x.jsxRuntimeExports.jsx("span",{children:N()}),J=()=>i?x.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[r&&x.jsxRuntimeExports.jsx(ee.Icon,{symbol:r,className:"adm:opacity-50"}),K(),j()&&v==="left"&&O()]}):x.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[r&&x.jsxRuntimeExports.jsx(ee.Icon,{symbol:r,className:"adm:opacity-50"}),j()?O():K()]}),X=()=>s?.triggerIcon?s.triggerIcon({open:R}):x.jsxRuntimeExports.jsx(ee.Icon,{symbol:"expand_more",className:"adm:opacity-50"}),$=()=>i&&j()&&v==="right"?x.jsxRuntimeExports.jsxs("span",{className:"adm:flex adm:items-center adm:gap-2",children:[O(),X()]}):x.jsxRuntimeExports.jsx("span",{className:"adm:flex adm:items-center adm:gap-2",children:X()}),F=()=>s?.trigger?s.trigger({open:R,value:y,displayText:N()||"",placeholder:A.placeholder||"",hasValue:j(),icon:r}):x.jsxRuntimeExports.jsxs(Ce.Button,{ref:I,variant:"outline",role:"combobox","aria-expanded":R,className:q.cn("adm:justify-between adm:rounded-md adm:font-normal",c?.trigger),children:[J(),$()]}),Y=()=>e?s?.searchInput?s.searchInput({placeholder:A.searchPlaceholder||""}):x.jsxRuntimeExports.jsx(rt,{placeholder:A.searchPlaceholder,className:c?.input}):null,Q=()=>s?.empty?s.empty({text:A.noItemsFound||""}):x.jsxRuntimeExports.jsx(x.jsxRuntimeExports.Fragment,{children:A.noItemsFound}),ae=f=>s?.optionLabel?s.optionLabel({option:f}):x.jsxRuntimeExports.jsx(x.jsxRuntimeExports.Fragment,{children:f.label}),le=f=>s?.option?x.jsxRuntimeExports.jsx("div",{children:s.option({option:f,isSelected:k(f.value),selectedFeedback:g})},f.value):x.jsxRuntimeExports.jsxs(ot,{value:f.value,onSelect:U,disabled:f.disabled,className:q.cn(c?.item,g==="check"&&"adm:pr-10"),children:[g==="checkbox"&&H(f.value),ae(f),g==="check"&&H(f.value)]},f.value);return x.jsxRuntimeExports.jsxs(de.Popover,{open:R,onOpenChange:C,children:[x.jsxRuntimeExports.jsx(de.PopoverTrigger,{asChild:!0,children:F()}),x.jsxRuntimeExports.jsx(de.PopoverContent,{align:"start",className:q.cn("adm:p-0",c?.popover),style:{minWidth:I.current?.offsetWidth},children:x.jsxRuntimeExports.jsxs(tt,{className:c?.command,children:[Y(),x.jsxRuntimeExports.jsxs(nt,{className:c?.list,children:[x.jsxRuntimeExports.jsx(at,{className:c?.empty,children:Q()}),x.jsxRuntimeExports.jsx(lt,{className:c?.group,children:m.map(f=>le(f))})]})]})})]})}exports.Combobox=it;
|
package/dist/combobox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./combobox-CDXlen0X.cjs");exports.Combobox=o.Combobox;
|
package/dist/combobox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),x=require("./button-CmLeuaI0.cjs"),m=require("./calendar-DUvRetFW.cjs"),R=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),x=require("./button-CmLeuaI0.cjs"),m=require("./calendar-DUvRetFW.cjs"),R=require("./combobox-CDXlen0X.cjs"),v=require("./input-Bz5k4w94.cjs"),i=require("./popover-cGp_rNLg.cjs"),u=require("react");function d(n,o,l){return m.addDays(n,-o,l)}function g({dateRange:n,onDateRangeChange:o,labels:l,combobox:y,calendar:j}){const[f,b]=u.useState(void 0),[h,r]=u.useState(!1),[c,p]=u.useState(n),a={...{last30Days:"Last 30 days",last7Days:"Last 7 days",last90Days:"Last 90 days",custom:"Custom",placeholder:"Date",cancel:"Cancel",apply:"Apply"},...l},D=s=>{const t=m.startOfDay(new Date);switch(s){case"7_days":return{from:d(t,7),to:t};case"30_days":return{from:d(t,30),to:t};case"90_days":return{from:d(t,90),to:t};default:return{from:void 0,to:void 0}}};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(R.Combobox,{alwaysShowPlaceholder:!0,selectedFeedback:"check",icon:"calendar_today",options:[{label:a.last7Days,value:"7_days"},{label:a.last30Days,value:"30_days"},{label:a.last90Days,value:"90_days"},{label:a.custom,value:"custom"}],value:f,onValueChange:s=>{if(typeof s=="string")if(s==="custom")r(!0);else{const t=D(s);o(t),p(void 0)}b(s)},labels:{placeholder:a.placeholder},...y}),e.jsxRuntimeExports.jsxs(i.Popover,{open:h,onOpenChange:r,children:[e.jsxRuntimeExports.jsx(i.PopoverAnchor,{asChild:!0,children:e.jsxRuntimeExports.jsx(v.Input,{className:"adm:sr-only adm:w-0"})}),e.jsxRuntimeExports.jsxs(i.PopoverContent,{align:"start",children:[e.jsxRuntimeExports.jsx(m.Calendar,{required:!0,mode:"range",selected:c,onSelect:p,captionLayout:"dropdown",classNames:{root:"adm:p-0!"},...j}),e.jsxRuntimeExports.jsxs("div",{className:"adm:mt-2 adm:flex adm:justify-end adm:gap-2",children:[e.jsxRuntimeExports.jsx(x.Button,{variant:"link",onClick:()=>{r(!1)},children:a.cancel}),e.jsxRuntimeExports.jsx(x.Button,{variant:"link",onClick:()=>{c&&o(c),r(!1)},children:a.apply})]})]})]})]})}exports.DatePickerSelector=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { B as u } from "./button-CMWUcYpz.js";
|
|
3
3
|
import { b, C as j, s as v } from "./calendar-yJWQTCer.js";
|
|
4
|
-
import { C } from "./combobox-
|
|
4
|
+
import { C } from "./combobox-BvjehNR7.js";
|
|
5
5
|
import { I as g } from "./input-BCiOr4Fy.js";
|
|
6
6
|
import { P as k, c as P, b as w } from "./popover-DcQ18EVl.js";
|
|
7
7
|
import { useState as d } from "react";
|