@local-logic/design-system 0.7.43 → 0.7.44

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,qBA0CA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ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AgB,CAAC,KAAK,IAAI,CAAC;CAC3D,qBA8DA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ9D,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,IAAa,EACb,UAAU,EACV,SAAe,EACf,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,qBAgEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Root/SearchAndSelect/Options/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B,4BAgBA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Root/SearchAndSelect/Options/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B,4BAqBA"}
package/dist/index.es.js CHANGED
@@ -9854,6 +9854,7 @@ function Pd({
9854
9854
  placeholder: t,
9855
9855
  ...n === "text" ? { maxLength: o } : { max: o },
9856
9856
  disabled: h || r || p,
9857
+ "data-testid": `input-${e}`,
9857
9858
  "data-is-loading": h,
9858
9859
  "data-has-error": !!m.error && m.touched,
9859
9860
  "data-has-prefix-icon": !!i,
@@ -9869,6 +9870,7 @@ function Pd({
9869
9870
  /* @__PURE__ */ E(
9870
9871
  Ii,
9871
9872
  {
9873
+ "data-testid": `error-${e}`,
9872
9874
  name: e,
9873
9875
  component: "span",
9874
9876
  className: Ni
@@ -10334,7 +10336,8 @@ function MT({
10334
10336
  onChange: f,
10335
10337
  onFocus: h,
10336
10338
  "data-has-error": !!u.error && u.touched,
10337
- disabled: a || o || l
10339
+ disabled: a || o || l,
10340
+ "data-testid": `checkbox-${e}`
10338
10341
  }
10339
10342
  ),
10340
10343
  t && /* @__PURE__ */ E(Bt, { children: t }),
@@ -10343,6 +10346,7 @@ function MT({
10343
10346
  /* @__PURE__ */ E(
10344
10347
  Ii,
10345
10348
  {
10349
+ "data-testid": `error-${e}`,
10346
10350
  name: e,
10347
10351
  component: "span",
10348
10352
  className: Ni
@@ -10371,7 +10375,16 @@ function Ml({
10371
10375
  options: t,
10372
10376
  onSelect: n
10373
10377
  }) {
10374
- return e ? /* @__PURE__ */ E("div", { className: RT, children: /* @__PURE__ */ E("ul", { className: DT, children: t.map((r) => /* @__PURE__ */ E("li", { className: OT, onClick: () => n(r.value), children: r.label }, r.key)) }) }) : null;
10378
+ return e ? /* @__PURE__ */ E("div", { className: RT, children: /* @__PURE__ */ E("ul", { className: DT, children: t.map((r, o) => /* @__PURE__ */ E(
10379
+ "li",
10380
+ {
10381
+ className: OT,
10382
+ onClick: () => n(r.value),
10383
+ "data-testid": `search-select-option-${o}`,
10384
+ children: r.label
10385
+ },
10386
+ r.key
10387
+ )) }) }) : null;
10375
10388
  }
10376
10389
  const VT = "relative group/search-and-select min-w-0 w-full";
10377
10390
  function FT({
package/dist/index.umd.js CHANGED
@@ -118,7 +118,7 @@
118
118
 
119
119
  peer-focus:peer-data-[has-prefix-icon=true]:ml-7
120
120
  peer-focus:peer-data-[has-prefix-icon=true]:w-[calc(125%-24px)]
121
- `,Mw="h-4 w-4 absolute left-4 top-1/2 -translate-y-1/2",Dw="h-4 w-4 absolute right-4 top-1/2 -translate-y-1/2";function Ku({name:e,label:t,type:n="text",isDisabled:r,maxLength:o=255,prefixIcon:i,suffixIcon:s,className:a,fieldClassName:c,onChange:l,onFocus:u,onBlur:f}){const{isLoading:h}=nr(),{isSubmitting:p}=Mt(),[y,m]=Pn(e),g=T=>{typeof l<"u"&&l(T),y.onChange(T)},b=T=>{typeof u<"u"&&u(T)},x=T=>{typeof f<"u"&&f(T),y.onBlur(T)};return v.jsxs("div",{className:ct(Aw,a||""),children:[v.jsx(mo,{className:ct(Cw,c||""),type:n,id:e,name:e,placeholder:t,...n==="text"?{maxLength:o}:{max:o},disabled:h||r||p,"data-is-loading":h,"data-has-error":!!m.error&&m.touched,"data-has-prefix-icon":!!i,"data-1p-ignore":!0,onChange:g,onFocus:b,onBlur:x}),v.jsx(_i.label,{htmlFor:e,className:Pw,children:t}),typeof i<"u"&&v.jsx(i,{className:Mw}),typeof s<"u"&&v.jsx(s,{className:Dw}),v.jsx(yo,{name:e,component:"span",className:vo},`error-${e}`)]})}const Ow="flex flex-col relative w-full cursor-text",Vw=`
121
+ `,Mw="h-4 w-4 absolute left-4 top-1/2 -translate-y-1/2",Dw="h-4 w-4 absolute right-4 top-1/2 -translate-y-1/2";function Ku({name:e,label:t,type:n="text",isDisabled:r,maxLength:o=255,prefixIcon:i,suffixIcon:s,className:a,fieldClassName:c,onChange:l,onFocus:u,onBlur:f}){const{isLoading:h}=nr(),{isSubmitting:p}=Mt(),[y,m]=Pn(e),g=T=>{typeof l<"u"&&l(T),y.onChange(T)},b=T=>{typeof u<"u"&&u(T)},x=T=>{typeof f<"u"&&f(T),y.onBlur(T)};return v.jsxs("div",{className:ct(Aw,a||""),children:[v.jsx(mo,{className:ct(Cw,c||""),type:n,id:e,name:e,placeholder:t,...n==="text"?{maxLength:o}:{max:o},disabled:h||r||p,"data-testid":`input-${e}`,"data-is-loading":h,"data-has-error":!!m.error&&m.touched,"data-has-prefix-icon":!!i,"data-1p-ignore":!0,onChange:g,onFocus:b,onBlur:x}),v.jsx(_i.label,{htmlFor:e,className:Pw,children:t}),typeof i<"u"&&v.jsx(i,{className:Mw}),typeof s<"u"&&v.jsx(s,{className:Dw}),v.jsx(yo,{"data-testid":`error-${e}`,name:e,component:"span",className:vo},`error-${e}`)]})}const Ow="flex flex-col relative w-full cursor-text",Vw=`
122
122
  flex transition-all grow resize-none
123
123
  px-4 pt-6 pb-1.5 border border-solid rounded outline-none
124
124
  border-gray-200 bg-white text-black
@@ -194,7 +194,7 @@
194
194
  group-data-[is-disabled=true]/checkbox:text-neutral-300
195
195
 
196
196
  flex gap-2 cursor-pointer
197
- `,Qw="absolute w-4 h-4 ml-0.5 mt-0.5 hidden peer-checked:block fill-white";function Jw({name:e,label:t,className:n,fieldClassName:r,isDisabled:o,onChange:i,onFocus:s}){const{isLoading:a}=nr(),{isSubmitting:c}=Mt(),[l,u]=Pn(e),f=p=>{typeof i<"u"&&i(p),l.onChange(p)},h=p=>{typeof s<"u"&&s(p)};return v.jsxs("div",{className:ct(Yw,n||""),"data-is-disabled":o,children:[v.jsxs("label",{className:qw,children:[v.jsx(mo,{type:"checkbox",name:e,className:ct(Xw,r||""),onChange:f,onFocus:h,"data-has-error":!!u.error&&u.touched,disabled:a||o||c}),t&&v.jsx(v.Fragment,{children:t}),v.jsx(Xu,{className:Qw,size:20})]}),v.jsx(yo,{name:e,component:"span",className:vo},`error-${e}`)]})}const eT="relative",tT=`
197
+ `,Qw="absolute w-4 h-4 ml-0.5 mt-0.5 hidden peer-checked:block fill-white";function Jw({name:e,label:t,className:n,fieldClassName:r,isDisabled:o,onChange:i,onFocus:s}){const{isLoading:a}=nr(),{isSubmitting:c}=Mt(),[l,u]=Pn(e),f=p=>{typeof i<"u"&&i(p),l.onChange(p)},h=p=>{typeof s<"u"&&s(p)};return v.jsxs("div",{className:ct(Yw,n||""),"data-is-disabled":o,children:[v.jsxs("label",{className:qw,children:[v.jsx(mo,{type:"checkbox",name:e,className:ct(Xw,r||""),onChange:f,onFocus:h,"data-has-error":!!u.error&&u.touched,disabled:a||o||c,"data-testid":`checkbox-${e}`}),t&&v.jsx(v.Fragment,{children:t}),v.jsx(Xu,{className:Qw,size:20})]}),v.jsx(yo,{"data-testid":`error-${e}`,name:e,component:"span",className:vo},`error-${e}`)]})}const eT="relative",tT=`
198
198
  absolute left-0 right-0
199
199
  list-none px-0 py-1
200
200
  rounded-lg overflow-hidden
@@ -208,7 +208,7 @@
208
208
  `,nT=`
209
209
  py-2.5 px-4 cursor-pointer transition-all
210
210
  bg-white hover:bg-primary-10 hover:font-medium hover:text-black
211
- `;function td({isOpen:e,options:t,onSelect:n}){return e?v.jsx("div",{className:eT,children:v.jsx("ul",{className:tT,children:t.map(r=>v.jsx("li",{className:nT,onClick:()=>n(r.value),children:r.label},r.key))})}):null}const rT="relative group/search-and-select min-w-0 w-full";function oT({name:e,label:t,direction:n="topToBottom",options:r=[],selectedLabel:o,isLoading:i,isDisabled:s,clearOnSelect:a=!0,maxLength:c=255,prefixIcon:l,suffixIcon:u,className:f,onChange:h,onClear:p,onFocus:y,onBlur:m,onSelect:g}){const[b,x]=E.useState(!1),[,,T]=Pn(e),P=()=>{const C=r.length>0;b!==C&&x(C)};E.useEffect(()=>{P()},[r,P]),E.useEffect(()=>{T.setValue(o||"")},[o,T]);const w=C=>{P(),typeof y<"u"&&y(C)},M=C=>{setTimeout(()=>{x(!1),typeof o>"u"&&a&&T.setValue(""),typeof h<"u"&&h({target:{value:""}}),typeof m<"u"&&m(C)},250)},A=C=>{typeof g<"u"&&g(C),x(!1),a&&T.setValue("")};return v.jsxs("div",{className:rT,tabIndex:0,"data-direction":n,children:[v.jsx(td,{isOpen:b&&n==="bottomToTop",options:r,onSelect:A}),v.jsx(ed,{name:e,label:t,isLoading:i,isDisabled:s,maxLength:c,prefixIcon:l,suffixIcon:b?void 0:u,className:f,onChange:h,onClear:p,onBlur:M,onFocus:w}),v.jsx(td,{isOpen:b&&n==="topToBottom",options:r,onSelect:A})]})}function iT({isLoading:e=!1,enableReinitialize:t=!0,initialValues:n,validationSchema:r,validateOnMount:o=!1,isForcedDirty:i,onSubmit:s,className:a,children:c}){const[l,u]=E.useState(null),f=p=>{u(p)},h=(p,y)=>{typeof s<"u"?s(p).finally(()=>{y.setSubmitting(!1)}):y.setSubmitting(!1)};return v.jsx(Xa.Provider,{value:{isLoading:e,isForcedDirty:i,onNavigationEvent:f},children:v.jsx(O0,{enableReinitialize:t,initialValues:n,validationSchema:r,validateOnMount:o,onSubmit:h,children:p=>v.jsx("form",{onSubmit:p.handleSubmit,className:ct(z0,a),children:c})})})}const sT=Object.freeze(Object.defineProperty({__proto__:null,Button:Z0,Checkbox:Jw,Input:Ku,Root:iT,Search:ed,SearchAndSelect:oT,Textarea:Lw},Symbol.toStringTag,{value:"Module"})),nd=E.createContext({}),ji=()=>E.useContext(nd);function aT({activeFilter:e,children:t}){const[n,r]=E.useState(!1);return v.jsx(nd.Provider,{value:{activeFilter:e,isFiltersDialogOpen:n,setIsFiltersDialogOpen:r},children:t})}const cT=`
211
+ `;function td({isOpen:e,options:t,onSelect:n}){return e?v.jsx("div",{className:eT,children:v.jsx("ul",{className:tT,children:t.map((r,o)=>v.jsx("li",{className:nT,onClick:()=>n(r.value),"data-testid":`search-select-option-${o}`,children:r.label},r.key))})}):null}const rT="relative group/search-and-select min-w-0 w-full";function oT({name:e,label:t,direction:n="topToBottom",options:r=[],selectedLabel:o,isLoading:i,isDisabled:s,clearOnSelect:a=!0,maxLength:c=255,prefixIcon:l,suffixIcon:u,className:f,onChange:h,onClear:p,onFocus:y,onBlur:m,onSelect:g}){const[b,x]=E.useState(!1),[,,T]=Pn(e),P=()=>{const C=r.length>0;b!==C&&x(C)};E.useEffect(()=>{P()},[r,P]),E.useEffect(()=>{T.setValue(o||"")},[o,T]);const w=C=>{P(),typeof y<"u"&&y(C)},M=C=>{setTimeout(()=>{x(!1),typeof o>"u"&&a&&T.setValue(""),typeof h<"u"&&h({target:{value:""}}),typeof m<"u"&&m(C)},250)},A=C=>{typeof g<"u"&&g(C),x(!1),a&&T.setValue("")};return v.jsxs("div",{className:rT,tabIndex:0,"data-direction":n,children:[v.jsx(td,{isOpen:b&&n==="bottomToTop",options:r,onSelect:A}),v.jsx(ed,{name:e,label:t,isLoading:i,isDisabled:s,maxLength:c,prefixIcon:l,suffixIcon:b?void 0:u,className:f,onChange:h,onClear:p,onBlur:M,onFocus:w}),v.jsx(td,{isOpen:b&&n==="topToBottom",options:r,onSelect:A})]})}function iT({isLoading:e=!1,enableReinitialize:t=!0,initialValues:n,validationSchema:r,validateOnMount:o=!1,isForcedDirty:i,onSubmit:s,className:a,children:c}){const[l,u]=E.useState(null),f=p=>{u(p)},h=(p,y)=>{typeof s<"u"?s(p).finally(()=>{y.setSubmitting(!1)}):y.setSubmitting(!1)};return v.jsx(Xa.Provider,{value:{isLoading:e,isForcedDirty:i,onNavigationEvent:f},children:v.jsx(O0,{enableReinitialize:t,initialValues:n,validationSchema:r,validateOnMount:o,onSubmit:h,children:p=>v.jsx("form",{onSubmit:p.handleSubmit,className:ct(z0,a),children:c})})})}const sT=Object.freeze(Object.defineProperty({__proto__:null,Button:Z0,Checkbox:Jw,Input:Ku,Root:iT,Search:ed,SearchAndSelect:oT,Textarea:Lw},Symbol.toStringTag,{value:"Module"})),nd=E.createContext({}),ji=()=>E.useContext(nd);function aT({activeFilter:e,children:t}){const[n,r]=E.useState(!1);return v.jsx(nd.Provider,{value:{activeFilter:e,isFiltersDialogOpen:n,setIsFiltersDialogOpen:r},children:t})}const cT=`
212
212
  flex flex-col
213
213
  items-center justify-center
214
214
  rounded-full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local-logic/design-system",
3
- "version": "0.7.43",
3
+ "version": "0.7.44",
4
4
  "description": "This is a design system implementation allowing for the display of Local Logic components and themes.",
5
5
  "author": "Local Logic",
6
6
  "license": "ISC",