@adam-milo/ui 1.0.129 → 1.0.131
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.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +2 -2
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +1 -1
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +1 -1
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +1 -1
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +1 -1
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +1 -1
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +1 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +1 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +1 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +1 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +1 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +1 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +1 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +1 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +1 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +1 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +1 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +1 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +1 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +1 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +1 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +1 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +1 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +1 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +1 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -3
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +3 -6
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +6 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +2 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +2 -2
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +2 -2
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +2 -2
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +2 -2
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -4
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +4 -2
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +2 -4
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +4 -8
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +8 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +2 -4
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +4 -8
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +8 -8
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +8 -9
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +11 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -5
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +5 -2
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -10
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +2 -9
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +3 -2
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +3 -2
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +24 -2
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +10 -4
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +13 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +38 -3
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +10 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -2
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +9 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +2 -10
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -11
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +4 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +2 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +3 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +2 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +2 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +2 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +10 -9
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +11 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -2
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +1 -1
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +1 -1
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +9 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +1 -7
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +2 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +7 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +1 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +1 -1
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +1 -1
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/dist/src/components/data-display/check-filter/CheckFilter.component.d.ts +8 -0
- package/dist/src/components/data-display/check-filter/CheckFilter.component.d.ts.map +1 -0
- package/dist/src/components/data-display/check-filter/CheckFilter.styles.d.ts +6 -0
- package/dist/src/components/data-display/check-filter/CheckFilter.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/check-filter/CheckFilter.types.d.ts +68 -0
- package/dist/src/components/data-display/check-filter/CheckFilter.types.d.ts.map +1 -0
- package/dist/src/components/data-display/datatable/DataTable.component.d.ts.map +1 -1
- package/dist/src/components/data-display/datatable/DataTable.styles.d.ts +2 -0
- package/dist/src/components/data-display/datatable/DataTable.styles.d.ts.map +1 -1
- package/dist/src/components/data-display/datatable/DataTable.types.d.ts +50 -1
- package/dist/src/components/data-display/datatable/DataTable.types.d.ts.map +1 -1
- package/dist/src/components/data-display/date-filter/DateFilter.component.d.ts +9 -0
- package/dist/src/components/data-display/date-filter/DateFilter.component.d.ts.map +1 -0
- package/dist/src/components/data-display/date-filter/DateFilter.styles.d.ts +96 -0
- package/dist/src/components/data-display/date-filter/DateFilter.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/date-filter/DateFilter.types.d.ts +102 -0
- package/dist/src/components/data-display/date-filter/DateFilter.types.d.ts.map +1 -0
- package/dist/src/components/data-display/date-filter/dateUtils.d.ts +100 -0
- package/dist/src/components/data-display/date-filter/dateUtils.d.ts.map +1 -0
- package/dist/src/components/data-display/filter/Filter.component.d.ts +21 -0
- package/dist/src/components/data-display/filter/Filter.component.d.ts.map +1 -0
- package/dist/src/components/data-display/filter/Filter.styles.d.ts +27 -0
- package/dist/src/components/data-display/filter/Filter.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/filter/Filter.types.d.ts +141 -0
- package/dist/src/components/data-display/filter/Filter.types.d.ts.map +1 -0
- package/dist/src/components/data-display/filter-button/FilterButton.component.d.ts +5 -0
- package/dist/src/components/data-display/filter-button/FilterButton.component.d.ts.map +1 -0
- package/dist/src/components/data-display/filter-button/FilterButton.styles.d.ts +10 -0
- package/dist/src/components/data-display/filter-button/FilterButton.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/filter-button/FilterButton.types.d.ts +18 -0
- package/dist/src/components/data-display/filter-button/FilterButton.types.d.ts.map +1 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.component.d.ts +8 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.component.d.ts.map +1 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.styles.d.ts +14 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.types.d.ts +53 -0
- package/dist/src/components/data-display/numeric-filter/NumericFilter.types.d.ts.map +1 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.component.d.ts +8 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.component.d.ts.map +1 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.styles.d.ts +18 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.types.d.ts +44 -0
- package/dist/src/components/data-display/range-filter/RangeFilter.types.d.ts.map +1 -0
- package/dist/src/components/data-display/sort-button/SortButton.component.d.ts +5 -0
- package/dist/src/components/data-display/sort-button/SortButton.component.d.ts.map +1 -0
- package/dist/src/components/data-display/sort-button/SortButton.styles.d.ts +5 -0
- package/dist/src/components/data-display/sort-button/SortButton.styles.d.ts.map +1 -0
- package/dist/src/components/data-display/sort-button/SortButton.types.d.ts +27 -0
- package/dist/src/components/data-display/sort-button/SortButton.types.d.ts.map +1 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts.map +1 -1
- package/dist/src/components/forms/numeric-input/NumericInput.types.d.ts +14 -0
- package/dist/src/components/forms/numeric-input/NumericInput.types.d.ts.map +1 -1
- package/dist/src/components/forms/slider/Slider.component.d.ts +5 -0
- package/dist/src/components/forms/slider/Slider.component.d.ts.map +1 -0
- package/dist/src/components/forms/slider/Slider.styles.d.ts +21 -0
- package/dist/src/components/forms/slider/Slider.styles.d.ts.map +1 -0
- package/dist/src/components/forms/slider/Slider.types.d.ts +72 -0
- package/dist/src/components/forms/slider/Slider.types.d.ts.map +1 -0
- package/dist/src/components/overlays/popover/Popover.component.d.ts +27 -0
- package/dist/src/components/overlays/popover/Popover.component.d.ts.map +1 -0
- package/dist/src/components/overlays/popover/Popover.styles.d.ts +2 -0
- package/dist/src/components/overlays/popover/Popover.styles.d.ts.map +1 -0
- package/dist/src/components/overlays/popover/Popover.types.d.ts +18 -0
- package/dist/src/components/overlays/popover/Popover.types.d.ts.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -2
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),s=require("./index67.cjs"),i=require("@adam-milo/icons"),n=require("./index73.cjs"),a={settings:"CustomMenuSettingsIcon",user:"CustomMenuUserIcon"},r={settings:"Settings",user:"User menu"},o=t.forwardRef(({variant:t,selected:o=!1,initials:c,className:l,disabled:u,"aria-label":d,"data-testid":m,"data-cy":y,...b},S)=>{const p=y||`menu-icon-button-${t}`,x=m||`menu-icon-button-${t}`,g="user"===t&&Boolean(c),j=s.cn("group","menu-icon-button-border-mask",g&&"menu-icon-button-initials",n.baseStyles,o&&n.selectedStyles,l);return e.jsx("button",{ref:S,type:"button",disabled:u,className:j,"aria-label":d||r[t],"aria-pressed":o,"data-testid":x,"data-cy":p,...b,children:"user"===t&&c?e.jsx("span",{className:s.cn(n.initialsBaseStyles,!o&&n.initialsHoverStyles,o&&n.initialsSelectedStyles),"data-cy":`${p}-initials`,"data-testid":`${x}-initials`,children:c.slice(0,2).toUpperCase()}):e.jsx("span",{className:s.cn(n.iconBaseStyles,!o&&n.iconHoverStyles,o&&n.iconSelectedStyles),"data-cy":`${p}-icon`,"data-testid":`${x}-icon`,children:e.jsx(i.Icon,{name:a[t],size:"lg",color:"inherit",decorative:!0})})})});o.displayName="MenuIconButton",exports.MenuIconButton=o;
|
package/dist/index5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cn as a}from"./
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cn as a}from"./index67.js";import{Icon as i}from"@adam-milo/icons";import{selectedStyles as n,baseStyles as s,initialsSelectedStyles as o,initialsHoverStyles as r,initialsBaseStyles as c,iconSelectedStyles as d,iconHoverStyles as m,iconBaseStyles as l}from"./index73.js";const u={settings:"CustomMenuSettingsIcon",user:"CustomMenuUserIcon"},p={settings:"Settings",user:"User menu"},b=e(({variant:e,selected:b=!1,initials:f,className:g,disabled:y,"aria-label":$,"data-testid":N,"data-cy":h,...x},j)=>{const C=h||`menu-icon-button-${e}`,I=N||`menu-icon-button-${e}`,M="user"===e&&Boolean(f),U=a("group","menu-icon-button-border-mask",M&&"menu-icon-button-initials",s,b&&n,g);/* @__PURE__ */
|
|
2
2
|
return t("button",{ref:j,type:"button",disabled:y,className:U,"aria-label":$||p[e],"aria-pressed":b,"data-testid":I,"data-cy":C,...x,children:/* @__PURE__ */t("span","user"===e&&f?{className:a(c,!b&&r,b&&o),"data-cy":`${C}-initials`,"data-testid":`${I}-initials`,children:f.slice(0,2).toUpperCase()}:{className:a(l,!b&&m,b&&d),"data-cy":`${C}-icon`,"data-testid":`${I}-icon`,children:/* @__PURE__ */t(i,{name:u[e],size:"lg",color:"inherit",decorative:!0})})})});b.displayName="MenuIconButton";export{b as MenuIconButton};
|
package/dist/index50.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index10.cjs"),l=require("./index18.cjs"),n=require("./index47.cjs"),i=require("./index107.cjs"),r={min:null,max:null};function s({min:r,max:s,step:d,minPlaceholder:u,maxPlaceholder:m,cyPrefix:c}){const{draftValue:o,setDraftValue:x}=n.useFilter(),p=o?.min??null,y=o?.max??null,h=a.useCallback((e,a)=>{x({min:"min"===e?a:p,max:"max"===e?a:y})},[p,y,x]),j=a.useCallback(e=>{x({min:e[0]===r?null:e[0],max:e[1]===s?null:e[1]})},[x,r,s]),g=a.useCallback(e=>a=>{const t=function(e){if(""===e||"-"===e)return null;const a=parseInt(e,10);return Number.isNaN(a)?null:a}(a.currentTarget.value);var l,n,i;null!==t?h(e,(l=t,n=r,i=s,Math.max(n,Math.min(i,l)))):h(e,null)},[s,r,h]),f=p??r,b=y??s,$=f<=b?[f,b]:[b,f];return e.jsxs("div",{className:i.bodyStackStyles,children:[e.jsx(l.Slider,{mode:"range",value:$,onChange:j,min:r,max:s,step:d,showScaleLabels:!0,"aria-label":"Range filter slider","data-cy":`${c}-slider`,"data-testid":`${c}-slider`}),e.jsxs("div",{className:i.inputRowStyles,children:[e.jsx("div",{className:i.inputGroupStyles,children:e.jsx(t.NumericInput,{value:null===p?"":String(p),onChange:g("min"),min:r,max:s,step:d,integerOnly:!0,placeholder:u,"aria-label":"Minimum","data-cy":`${c}-min-input`,"data-testid":`${c}-min-input`})}),e.jsx("span",{className:i.separatorStyles,"aria-hidden":"true","data-cy":`${c}-separator`,"data-testid":`${c}-separator`,children:"–"}),e.jsx("div",{className:i.inputGroupStyles,children:e.jsx(t.NumericInput,{value:null===y?"":String(y),onChange:g("max"),min:r,max:s,step:d,integerOnly:!0,placeholder:m,"aria-label":"Maximum","data-cy":`${c}-max-input`,"data-testid":`${c}-max-input`})})]})]})}const d=e=>null!==e.min||null!==e.max,u=(e,a)=>e.min===a.min&&e.max===a.max,m=e=>null!==e.min&&null!==e.max&&e.min>e.max?{min:e.max,max:e.min}:e;function c({value:a,defaultValue:t,onApply:l,min:i=0,max:c=100,step:o=1,title:x,minPlaceholder:p="Min",maxPlaceholder:y="Max",open:h,defaultOpen:j,onOpenChange:g,disabled:f,hideReset:b=!1,"aria-label":$,"data-cy":v,"data-testid":F}){const S=v||"range-filter",N=F||"range-filter";return e.jsxs(n.Filter,{emptyValue:r,value:a,defaultValue:t,onApply:l,open:h,defaultOpen:j,onOpenChange:g,isActive:d,compareValues:u,normalizeValue:m,children:[e.jsx(n.FilterTrigger,{"aria-label":$||"Range filter",disabled:f,"data-cy":S,"data-testid":N}),e.jsxs(n.FilterContent,{"data-cy":`${S}-content`,"data-testid":`${N}-content`,children:[void 0!==x&&e.jsx(n.FilterTitle,{"data-cy":`${S}-title`,"data-testid":`${N}-title`,children:x}),e.jsx(n.FilterBody,{"data-cy":`${S}-body`,"data-testid":`${N}-body`,children:e.jsx(s,{min:i,max:c,step:o,minPlaceholder:p,maxPlaceholder:y,cyPrefix:S})}),e.jsxs(n.FilterFooter,{"data-cy":`${S}-footer`,"data-testid":`${N}-footer`,children:[!b&&e.jsx(n.FilterReset,{}),e.jsx(n.FilterApply,{})]})]})]})}c.displayName="RangeFilter",exports.RangeFilter=c;
|
package/dist/index50.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
return
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{useCallback as n}from"react";import{NumericInput as t}from"./index10.js";import{Slider as l}from"./index18.js";import{Filter as i,FilterTrigger as r,FilterContent as m,FilterTitle as d,FilterBody as o,FilterFooter as s,FilterReset as c,FilterApply as u,useFilter as p}from"./index47.js";import{bodyStackStyles as x,inputRowStyles as h,inputGroupStyles as f,separatorStyles as y}from"./index107.js";const g={min:null,max:null};function $({min:i,max:r,step:m,minPlaceholder:d,maxPlaceholder:o,cyPrefix:s}){const{draftValue:c,setDraftValue:u}=p(),g=c?.min??null,$=c?.max??null,v=n((a,e)=>{u({min:"min"===a?e:g,max:"max"===a?e:$})},[g,$,u]),b=n(a=>{u({min:a[0]===i?null:a[0],max:a[1]===r?null:a[1]})},[u,i,r]),N=n(a=>e=>{const n=function(a){if(""===a||"-"===a)return null;const e=parseInt(a,10);return Number.isNaN(e)?null:e}(e.currentTarget.value);var t,l,m;null!==n?v(a,(t=n,l=i,m=r,Math.max(l,Math.min(m,t)))):v(a,null)},[r,i,v]),P=g??i,V=$??r;/* @__PURE__ */
|
|
2
|
+
return a("div",{className:x,children:[
|
|
3
|
+
/* @__PURE__ */e(l,{mode:"range",value:P<=V?[P,V]:[V,P],onChange:b,min:i,max:r,step:m,showScaleLabels:!0,"aria-label":"Range filter slider","data-cy":`${s}-slider`,"data-testid":`${s}-slider`}),
|
|
4
|
+
/* @__PURE__ */a("div",{className:h,children:[
|
|
5
|
+
/* @__PURE__ */e("div",{className:f,children:/* @__PURE__ */e(t,{value:null===g?"":String(g),onChange:N("min"),min:i,max:r,step:m,integerOnly:!0,placeholder:d,"aria-label":"Minimum","data-cy":`${s}-min-input`,"data-testid":`${s}-min-input`})}),
|
|
6
|
+
/* @__PURE__ */e("span",{className:y,"aria-hidden":"true","data-cy":`${s}-separator`,"data-testid":`${s}-separator`,children:"–"}),
|
|
7
|
+
/* @__PURE__ */e("div",{className:f,children:/* @__PURE__ */e(t,{value:null===$?"":String($),onChange:N("max"),min:i,max:r,step:m,integerOnly:!0,placeholder:o,"aria-label":"Maximum","data-cy":`${s}-max-input`,"data-testid":`${s}-max-input`})})]})]})}const v=a=>null!==a.min||null!==a.max,b=(a,e)=>a.min===e.min&&a.max===e.max,N=a=>null!==a.min&&null!==a.max&&a.min>a.max?{min:a.max,max:a.min}:a;function P({value:n,defaultValue:t,onApply:l,min:p=0,max:x=100,step:h=1,title:f,minPlaceholder:y="Min",maxPlaceholder:P="Max",open:V,defaultOpen:M,onOpenChange:O,disabled:j,hideReset:C=!1,"aria-label":R,"data-cy":A,"data-testid":S}){const w=A||"range-filter",z=S||"range-filter";/* @__PURE__ */
|
|
8
|
+
return a(i,{emptyValue:g,value:n,defaultValue:t,onApply:l,open:V,defaultOpen:M,onOpenChange:O,isActive:v,compareValues:b,normalizeValue:N,children:[
|
|
9
|
+
/* @__PURE__ */e(r,{"aria-label":R||"Range filter",disabled:j,"data-cy":w,"data-testid":z}),
|
|
10
|
+
/* @__PURE__ */a(m,{"data-cy":`${w}-content`,"data-testid":`${z}-content`,children:[void 0!==f&&/* @__PURE__ */e(d,{"data-cy":`${w}-title`,"data-testid":`${z}-title`,children:f}),
|
|
11
|
+
/* @__PURE__ */e(o,{"data-cy":`${w}-body`,"data-testid":`${z}-body`,children:/* @__PURE__ */e($,{min:p,max:x,step:h,minPlaceholder:y,maxPlaceholder:P,cyPrefix:w})}),
|
|
12
|
+
/* @__PURE__ */a(s,{"data-cy":`${w}-footer`,"data-testid":`${z}-footer`,children:[!C&&/* @__PURE__ */e(c,{}),
|
|
13
|
+
/* @__PURE__ */e(u,{})]})]})]})}P.displayName="RangeFilter";export{P as RangeFilter};
|
package/dist/index51.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index58.cjs"),s=a.forwardRef(({logo:a,nav:s,right:r,logoCenterOnMobile:n=!1,className:m,"data-cy":i,"data-testid":d,...l},o)=>{const x=i??"simple-header",c=d??"simple-header";return e.jsxs("header",{ref:o,className:t.cn("flex flex-row items-center justify-between bg-transparent z-[100] border-0 border-none",n&&"max-sm:relative",m),style:{padding:"20px 16px"},"data-cy":x,"data-testid":c,...l,children:[e.jsx("div",{className:t.cn("flex items-center shrink-0 border-0 border-none",n&&["max-sm:absolute max-sm:inset-x-0 max-sm:top-0 max-sm:bottom-0","max-sm:flex max-sm:justify-center max-sm:items-center","max-sm:w-full max-sm:max-w-none","max-sm:[&>*]:shrink-0 max-sm:[&>*]:basis-auto"].join(" ")),"data-cy":`${x}-logo`,"data-testid":`${c}-logo`,children:a}),null!=s?e.jsx("nav",{className:"flex items-center max-sm:hidden","data-cy":`${x}-nav`,"data-testid":`${c}-nav`,children:s}):null,null!=r?e.jsx("div",{className:"flex items-center gap-2 shrink-0 border-0 border-none","data-cy":`${x}-right`,"data-testid":`${c}-right`,children:r}):null]})});s.displayName="SimpleHeader",exports.SimpleHeader=s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("@radix-ui/react-select"),r=require("@adam-milo/icons"),s=require("./index67.cjs"),n=require("./index47.cjs"),o=require("./index14.cjs"),l=require("./index108.cjs"),i=require("./index109.cjs");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const a in e)if("default"!==a){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}return t.default=e,Object.freeze(t)}const c=d(a),u={from:null,to:null},f=["today","last-week","last-month","last-year"],y={today:"Today",lastWeek:"Last week",lastMonth:"Last month",lastYear:"Last year"},m={from:"From:",to:"To:"},h={today:"today","last-week":"lastWeek","last-month":"lastMonth","last-year":"lastYear"};function p(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function g({direction:t}){return e.jsx(r.Icon,{name:"CustomChevronBackIcon",size:"md",color:"inherit",decorative:!0,className:"right"===t?"[transform:scaleX(-1)]":void 0})}function x(){return e.jsx(r.Icon,{name:"CustomChevronDownIcon",size:"md",color:"inherit",decorative:!0})}function S({value:t,display:a,options:r,onChange:s,ariaLabel:n,cyPrefix:l}){return e.jsxs(c.Root,{value:t,onValueChange:s,children:[e.jsxs(c.Trigger,{className:i.headerSelectStyles,"aria-label":n,"data-cy":l,"data-testid":l,children:[e.jsx(c.Value,{asChild:!0,children:e.jsx("span",{className:i.headerSelectValueStyles,children:a})}),e.jsx(c.Icon,{className:i.headerSelectIconStyles,children:e.jsx(x,{})})]}),e.jsx(o.SelectContent,{"data-cy":`${l}-content`,"data-testid":`${l}-content`,children:r.map(t=>e.jsx(o.SelectItem,{value:t.value,"data-cy":`${l}-option-${t.value}`,"data-testid":`${l}-option-${t.value}`,children:t.label},t.value))})]})}function b(e,t,a,r){const s=e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();if(a.from&&s(a.from))return l.startOfDay(a.from);if(a.to&&s(a.to))return l.startOfDay(a.to);if(s(r))return l.startOfDay(r);for(const n of e)for(const e of n)if(!e.outside)return l.startOfDay(e.date);return l.startOfMonth(t)}function v({monthDate:a,yearRange:r,selected:n,today:o,onSelectDate:d,onChangeMonth:c,onChangeYear:u,onShift:f,side:y,cyPrefix:m}){const h=t.useMemo(()=>l.buildMonthGrid(a),[a]),x=t.useMemo(()=>{const e=[];for(let t=0;t<h.length;t+=7)e.push(h.slice(t,t+7));return e},[h]),v=l.MONTHS_SHORT[a.getMonth()],j=String(a.getFullYear()),[$,D]=t.useState(()=>b(x,a,n,o)),M=t.useRef(`${a.getFullYear()}-${a.getMonth()}`);t.useEffect(()=>{const e=`${a.getFullYear()}-${a.getMonth()}`;e!==M.current&&(M.current=e,D(b(x,a,n,o)))},[a,x,n,o]);const C=t.useRef(new Map),w=t.useRef(!1);t.useEffect(()=>{if(!w.current)return;w.current=!1;const e=p($);C.current.get(e)?.focus()},[$]);const N=t.useCallback(e=>{const t=l.startOfDay(e);if(w.current=!0,t.getFullYear()!==a.getFullYear()||t.getMonth()!==a.getMonth()){f(-1===(t<a?-1:1)?"left":"right")}D(t)},[a,f]),k=t.useCallback(e=>{const t=e.key;if(!("ArrowLeft"===t||"ArrowRight"===t||"ArrowUp"===t||"ArrowDown"===t||"Home"===t||"End"===t||"PageUp"===t||"PageDown"===t))return;e.preventDefault();const a=$.getDay();switch(t){case"ArrowLeft":N(l.addDays($,-1));break;case"ArrowRight":N(l.addDays($,1));break;case"ArrowUp":N(l.addDays($,-7));break;case"ArrowDown":N(l.addDays($,7));break;case"Home":N(l.addDays($,-a));break;case"End":N(l.addDays($,6-a));break;case"PageUp":N(l.addMonths($,e.shiftKey?-12:-1));break;case"PageDown":N(l.addMonths($,e.shiftKey?12:1))}},[$,N]);return e.jsxs("div",{className:s.cn(i.calendarColumnStyles,"left"===y?i.calendarColumnLeftStyles:i.calendarColumnRightStyles),"data-cy":`${m}-calendar-${y}`,"data-testid":`${m}-calendar-${y}`,children:[e.jsxs("div",{className:i.calendarHeaderStyles,children:[e.jsx("button",{type:"button",onClick:()=>f("left"),className:i.chevronButtonStyles,"aria-label":`Previous month (${y})`,"data-cy":`${m}-prev-${y}`,"data-testid":`${m}-prev-${y}`,children:e.jsx(g,{direction:"left"})}),e.jsxs("div",{className:i.headerSelectsGroupStyles,children:[e.jsx(S,{value:String(a.getMonth()),display:v,options:l.MONTHS_LONG.map((e,t)=>({value:String(t),label:e})),onChange:e=>c(parseInt(e,10)),ariaLabel:`Month (${y})`,cyPrefix:`${m}-month-${y}`}),e.jsx(S,{value:j,display:j,options:r.map(e=>({value:String(e),label:String(e)})),onChange:e=>u(parseInt(e,10)),ariaLabel:`Year (${y})`,cyPrefix:`${m}-year-${y}`})]}),e.jsx("button",{type:"button",onClick:()=>f("right"),className:i.chevronButtonStyles,"aria-label":`Next month (${y})`,"data-cy":`${m}-next-${y}`,"data-testid":`${m}-next-${y}`,children:e.jsx(g,{direction:"right"})})]}),e.jsx("div",{className:i.weekdayRowStyles,"aria-hidden":"true",children:l.WEEKDAY_SHORT.map(t=>e.jsx("span",{className:i.weekdayCellStyles,children:t},t))}),e.jsx("div",{role:"grid","aria-label":`Calendar (${y})`,className:i.monthGridStyles,onKeyDown:k,tabIndex:-1,children:x.map((t,a)=>e.jsx("div",{role:"row",className:i.weekRowStyles,children:t.map(({date:t,outside:a})=>{const r=!a&&l.isSameDay(t,n.from),c=!a&&l.isSameDay(t,n.to),u=r||c,f=!a&&l.isInRange(t,n.from,n.to)&&!u,y=!a&&l.isSameDay(t,o),h=p(t),g=!a&&l.isSameDay(t,$);return e.jsx("div",{role:"gridcell","aria-selected":u||f,className:i.dayCellWrapperStyles,children:e.jsx("button",{type:"button",ref:e=>{e?C.current.set(h,e):C.current.delete(h)},disabled:a,"aria-disabled":a||void 0,"aria-current":y?"date":void 0,"aria-label":l.formatDateLong(t),onClick:a?void 0:()=>d(t),tabIndex:!a&&g?0:-1,className:s.cn(i.dayCellBaseStyles,a&&i.dayCellOutsideStyles,y&&!u&&i.dayCellTodayStyles,f&&i.dayCellInRangeStyles,u&&i.dayCellSelectedStyles),"data-cy":`${m}-day-${h}`,"data-testid":`${m}-day-${h}`,"data-outside":a||void 0,"data-selected":u||void 0,"data-in-range":f||void 0,"data-today":y||void 0,children:t.getDate()})},h)})},a))})]})}function j({label:a,value:r,formatValue:n,parseValue:o,onChange:d,ariaLabel:c,errorMessage:u,cyPrefix:f}){const[y,m]=t.useState(r?n(r):""),[h,p]=t.useState(!1),g=t.useRef(r),x=`${t.useId()}-error`;t.useEffect(()=>{l.isSameDay(r,g.current)||(g.current=r,m(r?n(r):""),p(!1))},[r,n]);const S=()=>{const e=y.trim();if(!e)return p(!1),d(null),void(g.current=null);const t=o(e);if(t){const e=l.startOfDay(t);m(n(e)),p(!1),d(e),g.current=e}else p(!0)};return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] flex-1 min-w-0",children:[e.jsx("span",{className:i.footerInputLabelStyles,"data-cy":`${f}-label`,"data-testid":`${f}-label`,children:a}),e.jsxs("div",{className:i.footerInputWrapperStyles,children:[e.jsx("input",{type:"text",inputMode:"numeric",value:y,onChange:e=>{m(e.currentTarget.value),h&&p(!1)},onBlur:S,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),S(),e.currentTarget.blur())},className:s.cn(i.footerInputStyles,h&&i.footerInputErrorStyles),"aria-label":c,"aria-invalid":h||void 0,"aria-describedby":h?x:void 0,"data-cy":f,"data-testid":f}),h&&e.jsx("span",{id:x,role:"alert",className:i.footerInputErrorMessageStyles,"data-cy":`${f}-error`,"data-testid":`${f}-error`,children:u})]})]})}function $({defaultViewMonth:a,today:r,presets:o,presetLabels:d,footerLabels:c,hidePresets:u,hideFooterInputs:f,hideReset:y,formatValue:m,parseValue:p,yearRangeSize:g,cyPrefix:x}){const{draftValue:S,setDraftValue:b,open:$}=n.useFilter(),[D,M]=t.useState(l.startOfMonth(a));t.useEffect(()=>{if(!$)return;const e=S.from??S.to??r;M(l.startOfMonth(e))},[$]);const C=t.useMemo(()=>l.addMonths(D,1),[D]),w=t.useMemo(()=>{const e=D.getFullYear(),t=[];for(let a=e-g;a<=e+g;a++)t.push(a);return t},[D,g]),N=t.useCallback(e=>{b(function(e,t){const a=l.startOfDay(t);return e.from&&e.from&&!e.to?l.compareDay(a,e.from)<0?{from:a,to:e.from}:{from:e.from,to:a}:{from:a,to:null}}(S,e))},[S,b]),k=t.useCallback(e=>{M(t=>l.addMonths(t,e))},[]),O=t.useCallback(e=>{M(new Date(D.getFullYear(),e,1))},[D]),R=t.useCallback(e=>{M(new Date(e,D.getMonth(),1))},[D]),F=t.useCallback(e=>{const t=new Date(C.getFullYear(),e,1);M(l.addMonths(t,-1))},[C]),I=t.useCallback(e=>{const t=new Date(e,C.getMonth(),1);M(l.addMonths(t,-1))},[C]),P=t.useCallback(e=>{const t=l.getPresetRange(e,r);b(t),M(l.startOfMonth(t.from))},[r,b]),V=t.useCallback(e=>{e&&S.to&&l.compareDay(e,S.to)>0?b({from:e,to:null}):b({from:e,to:S.to})},[S,b]),L=t.useCallback(e=>{e&&S.from&&l.compareDay(e,S.from)<0?b({from:e,to:S.from}):b({from:S.from,to:e})},[S,b]),Y=t.useMemo(()=>{for(const e of o){const t=l.getPresetRange(e,r);if(l.dateRangeEquals(t,S))return e}return null},[o,r,S]),A=null===S.from!=(null===S.to);return e.jsxs(e.Fragment,{children:[!u&&o.length>0&&e.jsx("div",{className:i.presetsRowStyles,"data-cy":`${x}-presets`,"data-testid":`${x}-presets`,children:o.map(t=>{const a=d[h[t]];if(null==a)return null;const r=Y===t;return e.jsx("button",{type:"button",onClick:()=>P(t),className:s.cn(i.presetButtonStyles,r&&i.presetButtonActiveStyles),"aria-pressed":r,"data-active":r||void 0,"data-cy":`${x}-preset-${t}`,"data-testid":`${x}-preset-${t}`,children:a},t)})}),e.jsxs("div",{className:i.calendarsRowStyles,children:[e.jsx(v,{monthDate:D,yearRange:w,selected:S,today:r,onSelectDate:N,onChangeMonth:O,onChangeYear:R,onShift:e=>k("left"===e?-1:1),side:"left",cyPrefix:x}),e.jsx("div",{className:i.calendarDividerStyles,"aria-hidden":"true"}),e.jsx(v,{monthDate:C,yearRange:w,selected:S,today:r,onSelectDate:N,onChangeMonth:F,onChangeYear:I,onShift:e=>k("left"===e?-1:1),side:"right",cyPrefix:x})]}),e.jsxs("div",{className:i.footerOverrideStyles,"data-cy":`${x}-footer`,"data-testid":`${x}-footer`,children:[!f&&e.jsxs("div",{className:i.footerInputsGroupStyles,children:[e.jsx(j,{label:c.from,value:S.from,formatValue:m,parseValue:p,onChange:V,ariaLabel:"From date",errorMessage:"Invalid date format",cyPrefix:`${x}-from`}),e.jsx(j,{label:c.to,value:S.to,formatValue:m,parseValue:p,onChange:L,ariaLabel:"To date",errorMessage:"Invalid date format",cyPrefix:`${x}-to`})]}),e.jsxs("div",{className:i.footerActionsStyles,children:[!y&&e.jsx(n.FilterReset,{}),e.jsx(n.FilterApply,{disabled:A})]})]})]})}function D({value:a,defaultValue:r,onApply:s,defaultViewMonth:o,today:d,title:c,presetLabels:h,presets:p=f,hidePresets:g=!1,footerLabels:x,hideFooterInputs:S=!1,formatValue:b=l.formatDateLong,parseValue:v=l.parseDateInput,open:j,defaultOpen:D,onOpenChange:M,disabled:C,hideReset:w=!1,yearRange:N=10,"aria-label":k,"data-cy":O,"data-testid":R}){const F=O||"date-filter",I=R||"date-filter",P=t.useMemo(()=>l.startOfDay(d??new Date),[d]),V=t.useMemo(()=>{if(o)return l.startOfMonth(o);const e=r?.from??r?.to??a?.from??a?.to??P;return l.startOfMonth(e)},[o,r,a,P]),L=t.useMemo(()=>({...y,...h??{}}),[h]),Y=t.useMemo(()=>({...m,...x??{}}),[x]);return e.jsxs(n.Filter,{emptyValue:u,value:a,defaultValue:r,onApply:s,open:j,defaultOpen:D,onOpenChange:M,isActive:e=>null!==e.from||null!==e.to,compareValues:l.dateRangeEquals,children:[e.jsx(n.FilterTrigger,{"aria-label":k||"Date filter",disabled:C,"data-cy":F,"data-testid":I}),e.jsxs(n.FilterContent,{className:i.contentStyles,"data-cy":`${F}-content`,"data-testid":`${I}-content`,children:[void 0!==c&&e.jsx(n.FilterTitle,{className:"px-[var(--spacing-3)] pt-[var(--spacing-3)]","data-cy":`${F}-title`,"data-testid":`${I}-title`,children:c}),e.jsx($,{defaultViewMonth:V,today:P,presets:p,presetLabels:L,footerLabels:Y,hidePresets:g,hideFooterInputs:S,hideReset:w,formatValue:b,parseValue:v,yearRangeSize:N,cyPrefix:F})]})]})}D.displayName="DateFilter";const M=D;exports.DateFilter=M;
|
package/dist/index51.js
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{
|
|
2
|
-
return
|
|
3
|
-
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{useMemo as r,useState as n,useEffect as o,useCallback as l,useRef as i,useId as s}from"react";import*as d from"@radix-ui/react-select";import{Icon as c}from"@adam-milo/icons";import{cn as u}from"./index67.js";import{Filter as f,FilterTrigger as m,FilterContent as h,FilterTitle as p,useFilter as g,FilterReset as y,FilterApply as v}from"./index47.js";import{SelectContent as $,SelectItem as b}from"./index14.js";import{startOfDay as N,startOfMonth as w,dateRangeEquals as x,parseDateInput as C,formatDateLong as D,addMonths as M,getPresetRange as V,compareDay as k,buildMonthGrid as P,MONTHS_SHORT as F,addDays as L,MONTHS_LONG as S,WEEKDAY_SHORT as Y,isSameDay as I,isInRange as R}from"./index108.js";import{contentStyles as A,presetsRowStyles as j,presetButtonActiveStyles as T,presetButtonStyles as z,calendarsRowStyles as K,calendarDividerStyles as O,footerOverrideStyles as U,footerInputsGroupStyles as E,footerActionsStyles as B,calendarHeaderStyles as H,chevronButtonStyles as W,headerSelectsGroupStyles as X,weekdayRowStyles as q,weekdayCellStyles as G,monthGridStyles as J,weekRowStyles as Q,dayCellWrapperStyles as Z,dayCellSelectedStyles as _,dayCellInRangeStyles as ee,dayCellTodayStyles as te,dayCellOutsideStyles as ae,dayCellBaseStyles as re,calendarColumnLeftStyles as ne,calendarColumnRightStyles as oe,calendarColumnStyles as le,footerInputLabelStyles as ie,footerInputWrapperStyles as se,footerInputErrorStyles as de,footerInputStyles as ce,footerInputErrorMessageStyles as ue,headerSelectStyles as fe,headerSelectValueStyles as me,headerSelectIconStyles as he}from"./index109.js";const pe={from:null,to:null},ge=["today","last-week","last-month","last-year"],ye={today:"Today",lastWeek:"Last week",lastMonth:"Last month",lastYear:"Last year"},ve={from:"From:",to:"To:"},$e={today:"today","last-week":"lastWeek","last-month":"lastMonth","last-year":"lastYear"};function be(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ne({direction:e}){/* @__PURE__ */
|
|
2
|
+
return t(c,{name:"CustomChevronBackIcon",size:"md",color:"inherit",decorative:!0,className:"right"===e?"[transform:scaleX(-1)]":void 0})}function we(){/* @__PURE__ */
|
|
3
|
+
return t(c,{name:"CustomChevronDownIcon",size:"md",color:"inherit",decorative:!0})}function xe({value:a,display:r,options:n,onChange:o,ariaLabel:l,cyPrefix:i}){/* @__PURE__ */
|
|
4
|
+
return e(d.Root,{value:a,onValueChange:o,children:[
|
|
5
|
+
/* @__PURE__ */e(d.Trigger,{className:fe,"aria-label":l,"data-cy":i,"data-testid":i,children:[
|
|
6
|
+
/* @__PURE__ */t(d.Value,{asChild:!0,children:/* @__PURE__ */t("span",{className:me,children:r})}),
|
|
7
|
+
/* @__PURE__ */t(d.Icon,{className:he,children:/* @__PURE__ */t(we,{})})]}),
|
|
8
|
+
/* @__PURE__ */t($,{"data-cy":`${i}-content`,"data-testid":`${i}-content`,children:n.map(e=>/* @__PURE__ */t(b,{value:e.value,"data-cy":`${i}-option-${e.value}`,"data-testid":`${i}-option-${e.value}`,children:e.label},e.value))})]})}function Ce(e,t,a,r){const n=e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();if(a.from&&n(a.from))return N(a.from);if(a.to&&n(a.to))return N(a.to);if(n(r))return N(r);for(const o of e)for(const e of o)if(!e.outside)return N(e.date);return w(t)}function De({monthDate:a,yearRange:s,selected:d,today:c,onSelectDate:f,onChangeMonth:m,onChangeYear:h,onShift:p,side:g,cyPrefix:y}){const v=r(()=>P(a),[a]),$=r(()=>{const e=[];for(let t=0;t<v.length;t+=7)e.push(v.slice(t,t+7));return e},[v]),b=F[a.getMonth()],w=String(a.getFullYear()),[x,C]=n(()=>Ce($,a,d,c)),V=i(`${a.getFullYear()}-${a.getMonth()}`);o(()=>{const e=`${a.getFullYear()}-${a.getMonth()}`;e!==V.current&&(V.current=e,C(Ce($,a,d,c)))},[a,$,d,c]);const k=i(/* @__PURE__ */new Map),A=i(!1);o(()=>{if(!A.current)return;A.current=!1;const e=be(x);k.current.get(e)?.focus()},[x]);const j=l(e=>{const t=N(e);if(A.current=!0,t.getFullYear()!==a.getFullYear()||t.getMonth()!==a.getMonth()){p(-1===(t<a?-1:1)?"left":"right")}C(t)},[a,p]),T=l(e=>{const t=e.key;if(!("ArrowLeft"===t||"ArrowRight"===t||"ArrowUp"===t||"ArrowDown"===t||"Home"===t||"End"===t||"PageUp"===t||"PageDown"===t))return;e.preventDefault();const a=x.getDay();switch(t){case"ArrowLeft":j(L(x,-1));break;case"ArrowRight":j(L(x,1));break;case"ArrowUp":j(L(x,-7));break;case"ArrowDown":j(L(x,7));break;case"Home":j(L(x,-a));break;case"End":j(L(x,6-a));break;case"PageUp":j(M(x,e.shiftKey?-12:-1));break;case"PageDown":j(M(x,e.shiftKey?12:1))}},[x,j]);/* @__PURE__ */
|
|
9
|
+
return e("div",{className:u(le,"left"===g?ne:oe),"data-cy":`${y}-calendar-${g}`,"data-testid":`${y}-calendar-${g}`,children:[
|
|
10
|
+
/* @__PURE__ */e("div",{className:H,children:[
|
|
11
|
+
/* @__PURE__ */t("button",{type:"button",onClick:()=>p("left"),className:W,"aria-label":`Previous month (${g})`,"data-cy":`${y}-prev-${g}`,"data-testid":`${y}-prev-${g}`,children:/* @__PURE__ */t(Ne,{direction:"left"})}),
|
|
12
|
+
/* @__PURE__ */e("div",{className:X,children:[
|
|
13
|
+
/* @__PURE__ */t(xe,{value:String(a.getMonth()),display:b,options:S.map((e,t)=>({value:String(t),label:e})),onChange:e=>m(parseInt(e,10)),ariaLabel:`Month (${g})`,cyPrefix:`${y}-month-${g}`}),
|
|
14
|
+
/* @__PURE__ */t(xe,{value:w,display:w,options:s.map(e=>({value:String(e),label:String(e)})),onChange:e=>h(parseInt(e,10)),ariaLabel:`Year (${g})`,cyPrefix:`${y}-year-${g}`})]}),
|
|
15
|
+
/* @__PURE__ */t("button",{type:"button",onClick:()=>p("right"),className:W,"aria-label":`Next month (${g})`,"data-cy":`${y}-next-${g}`,"data-testid":`${y}-next-${g}`,children:/* @__PURE__ */t(Ne,{direction:"right"})})]}),
|
|
16
|
+
/* @__PURE__ */t("div",{className:q,"aria-hidden":"true",children:Y.map(e=>/* @__PURE__ */t("span",{className:G,children:e},e))}),
|
|
17
|
+
/* @__PURE__ */t("div",{role:"grid","aria-label":`Calendar (${g})`,className:J,onKeyDown:T,tabIndex:-1,children:$.map((e,a)=>/* @__PURE__ */t("div",{role:"row",className:Q,children:e.map(({date:e,outside:a})=>{const r=!a&&I(e,d.from),n=!a&&I(e,d.to),o=r||n,l=!a&&R(e,d.from,d.to)&&!o,i=!a&&I(e,c),s=be(e),m=!a&&I(e,x);
|
|
18
|
+
/* @__PURE__ */
|
|
19
|
+
return t("div",{role:"gridcell","aria-selected":o||l,className:Z,children:/* @__PURE__ */t("button",{type:"button",ref:e=>{e?k.current.set(s,e):k.current.delete(s)},disabled:a,"aria-disabled":a||void 0,"aria-current":i?"date":void 0,"aria-label":D(e),onClick:a?void 0:()=>f(e),tabIndex:!a&&m?0:-1,className:u(re,a&&ae,i&&!o&&te,l&&ee,o&&_),"data-cy":`${y}-day-${s}`,"data-testid":`${y}-day-${s}`,"data-outside":a||void 0,"data-selected":o||void 0,"data-in-range":l||void 0,"data-today":i||void 0,children:e.getDate()})},s)})},a))})]})}function Me({label:a,value:r,formatValue:l,parseValue:d,onChange:c,ariaLabel:f,errorMessage:m,cyPrefix:h}){const[p,g]=n(r?l(r):""),[y,v]=n(!1),$=i(r),b=`${s()}-error`;o(()=>{I(r,$.current)||($.current=r,g(r?l(r):""),v(!1))},[r,l]);const w=()=>{const e=p.trim();if(!e)return v(!1),c(null),void($.current=null);const t=d(e);if(t){const e=N(t);g(l(e)),v(!1),c(e),$.current=e}else v(!0)};/* @__PURE__ */
|
|
20
|
+
return e("div",{className:"flex items-center gap-[var(--spacing-2)] flex-1 min-w-0",children:[
|
|
21
|
+
/* @__PURE__ */t("span",{className:ie,"data-cy":`${h}-label`,"data-testid":`${h}-label`,children:a}),
|
|
22
|
+
/* @__PURE__ */e("div",{className:se,children:[
|
|
23
|
+
/* @__PURE__ */t("input",{type:"text",inputMode:"numeric",value:p,onChange:e=>{g(e.currentTarget.value),y&&v(!1)},onBlur:w,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),w(),e.currentTarget.blur())},className:u(ce,y&&de),"aria-label":f,"aria-invalid":y||void 0,"aria-describedby":y?b:void 0,"data-cy":h,"data-testid":h}),y&&/* @__PURE__ */t("span",{id:b,role:"alert",className:ue,"data-cy":`${h}-error`,"data-testid":`${h}-error`,children:m})]})]})}function Ve({defaultViewMonth:i,today:s,presets:d,presetLabels:c,footerLabels:f,hidePresets:m,hideFooterInputs:h,hideReset:p,formatValue:$,parseValue:b,yearRangeSize:C,cyPrefix:D}){const{draftValue:P,setDraftValue:F,open:L}=g(),[S,Y]=n(w(i));o(()=>{if(!L)return;const e=P.from??P.to??s;Y(w(e))},[L]);const I=r(()=>M(S,1),[S]),R=r(()=>{const e=S.getFullYear(),t=[];for(let a=e-C;a<=e+C;a++)t.push(a);return t},[S,C]),A=l(e=>{F(function(e,t){const a=N(t);return e.from&&e.from&&!e.to?k(a,e.from)<0?{from:a,to:e.from}:{from:e.from,to:a}:{from:a,to:null}}(P,e))},[P,F]),H=l(e=>{Y(t=>M(t,e))},[]),W=l(e=>{Y(new Date(S.getFullYear(),e,1))},[S]),X=l(e=>{Y(new Date(e,S.getMonth(),1))},[S]),q=l(e=>{const t=new Date(I.getFullYear(),e,1);Y(M(t,-1))},[I]),G=l(e=>{const t=new Date(e,I.getMonth(),1);Y(M(t,-1))},[I]),J=l(e=>{const t=V(e,s);F(t),Y(w(t.from))},[s,F]),Q=l(e=>{e&&P.to&&k(e,P.to)>0?F({from:e,to:null}):F({from:e,to:P.to})},[P,F]),Z=l(e=>{e&&P.from&&k(e,P.from)<0?F({from:e,to:P.from}):F({from:P.from,to:e})},[P,F]),_=r(()=>{for(const e of d){const t=V(e,s);if(x(t,P))return e}return null},[d,s,P]),ee=null===P.from!=(null===P.to);/* @__PURE__ */
|
|
24
|
+
return e(a,{children:[!m&&d.length>0&&/* @__PURE__ */t("div",{className:j,"data-cy":`${D}-presets`,"data-testid":`${D}-presets`,children:d.map(e=>{const a=c[$e[e]];if(null==a)return null;const r=_===e;/* @__PURE__ */
|
|
25
|
+
return t("button",{type:"button",onClick:()=>J(e),className:u(z,r&&T),"aria-pressed":r,"data-active":r||void 0,"data-cy":`${D}-preset-${e}`,"data-testid":`${D}-preset-${e}`,children:a},e)})}),
|
|
26
|
+
/* @__PURE__ */e("div",{className:K,children:[
|
|
27
|
+
/* @__PURE__ */t(De,{monthDate:S,yearRange:R,selected:P,today:s,onSelectDate:A,onChangeMonth:W,onChangeYear:X,onShift:e=>H("left"===e?-1:1),side:"left",cyPrefix:D}),
|
|
28
|
+
/* @__PURE__ */t("div",{className:O,"aria-hidden":"true"}),
|
|
29
|
+
/* @__PURE__ */t(De,{monthDate:I,yearRange:R,selected:P,today:s,onSelectDate:A,onChangeMonth:q,onChangeYear:G,onShift:e=>H("left"===e?-1:1),side:"right",cyPrefix:D})]}),
|
|
30
|
+
/* @__PURE__ */e("div",{className:U,"data-cy":`${D}-footer`,"data-testid":`${D}-footer`,children:[!h&&/* @__PURE__ */e("div",{className:E,children:[
|
|
31
|
+
/* @__PURE__ */t(Me,{label:f.from,value:P.from,formatValue:$,parseValue:b,onChange:Q,ariaLabel:"From date",errorMessage:"Invalid date format",cyPrefix:`${D}-from`}),
|
|
32
|
+
/* @__PURE__ */t(Me,{label:f.to,value:P.to,formatValue:$,parseValue:b,onChange:Z,ariaLabel:"To date",errorMessage:"Invalid date format",cyPrefix:`${D}-to`})]}),
|
|
33
|
+
/* @__PURE__ */e("div",{className:B,children:[!p&&/* @__PURE__ */t(y,{}),
|
|
34
|
+
/* @__PURE__ */t(v,{disabled:ee})]})]})]})}function ke({value:a,defaultValue:n,onApply:o,defaultViewMonth:l,today:i,title:s,presetLabels:d,presets:c=ge,hidePresets:u=!1,footerLabels:g,hideFooterInputs:y=!1,formatValue:v=D,parseValue:$=C,open:b,defaultOpen:M,onOpenChange:V,disabled:k,hideReset:P=!1,yearRange:F=10,"aria-label":L,"data-cy":S,"data-testid":Y}){const I=S||"date-filter",R=Y||"date-filter",j=r(()=>N(i??/* @__PURE__ */new Date),[i]),T=r(()=>{if(l)return w(l);return w(n?.from??n?.to??a?.from??a?.to??j)},[l,n,a,j]),z=r(()=>({...ye,...d??{}}),[d]),K=r(()=>({...ve,...g??{}}),[g]);/* @__PURE__ */
|
|
35
|
+
return e(f,{emptyValue:pe,value:a,defaultValue:n,onApply:o,open:b,defaultOpen:M,onOpenChange:V,isActive:e=>null!==e.from||null!==e.to,compareValues:x,children:[
|
|
36
|
+
/* @__PURE__ */t(m,{"aria-label":L||"Date filter",disabled:k,"data-cy":I,"data-testid":R}),
|
|
37
|
+
/* @__PURE__ */e(h,{className:A,"data-cy":`${I}-content`,"data-testid":`${R}-content`,children:[void 0!==s&&/* @__PURE__ */t(p,{className:"px-[var(--spacing-3)] pt-[var(--spacing-3)]","data-cy":`${I}-title`,"data-testid":`${R}-title`,children:s}),
|
|
38
|
+
/* @__PURE__ */t(Ve,{defaultViewMonth:T,today:j,presets:c,presetLabels:z,footerLabels:K,hidePresets:u,hideFooterInputs:y,hideReset:P,formatValue:v,parseValue:$,yearRangeSize:F,cyPrefix:I})]})]})}ke.displayName="DateFilter";const Pe=ke;export{Pe as DateFilter};
|
package/dist/index52.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("@radix-ui/react-dialog"),o=require("./index67.cjs"),s=require("./index110.cjs"),i=require("@adam-milo/icons");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const a in e)if("default"!==a){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}return t.default=e,Object.freeze(t)}const l=r(a),d=l.Root,n=l.Trigger,c=l.Portal,y=l.Close,g=t.forwardRef(({className:t,"data-cy":a,"data-testid":r,...d},n)=>{const c=a||"dialog-close-button",y=r||"dialog-close-button";return e.jsx(l.Close,{ref:n,className:o.cn(s.closeButtonStyles,t),"data-cy":c,"data-testid":y,"aria-label":"Close dialog",...d,children:e.jsx(i.Icon,{name:"Cross2Icon",size:"sm",decorative:!0})})});g.displayName="DialogCloseButton";const p=({children:t,variant:a="default",className:i,"data-cy":r,"data-testid":l,...d})=>{const n=r||"dialog-icon",c=l||"dialog-icon";return e.jsx("div",{className:o.cn(s.iconRootStyles,s.iconVariantColor[a],i),"data-cy":n,"data-testid":c,"aria-hidden":"true",...d,children:t})};p.displayName="DialogIcon";const f=t.forwardRef(({className:t,variant:a="default","data-cy":i,"data-testid":r,...d},n)=>{const c=i||"dialog-overlay",y=r||"dialog-overlay";return e.jsx(l.Overlay,{ref:n,className:o.cn(s.overlayRootStyles,s.overlayBgStyles[a],t),"data-cy":c,"data-testid":y,...d})});f.displayName=l.Overlay.displayName;const u=t.forwardRef(({className:t,children:a,contentVariant:i="default",overlayVariant:r="default",fullWidthOnMobile:d=!1,topOffsetOnMobile:n=!1,contentPadding:y,disableOutsideClose:g=!1,style:p,"aria-describedby":u,"data-cy":m,"data-testid":x,...N},v)=>{const D=m||"dialog-content",b=x||"dialog-content",j=d||"verify"===i,S="verify"===i||d&&n,O=g?{onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}:{};return e.jsxs(c,{children:[!S&&e.jsx(f,{variant:r}),e.jsx("div",{className:o.cn(s.contentWrapperStyles,j&&s.contentWrapperVerifyMobileStyles,S&&s.contentWrapperTopOffsetMobileStyles),...S&&{"data-dialog-top-offset-mobile":""},children:e.jsx(l.Content,{ref:v,className:o.cn(s.contentStyles,"verify"===i&&s.contentVariantVerifyStyles,S&&s.contentTopOffsetMobileStyles,t),style:y||p?{...p,...y&&{padding:y}}:void 0,"aria-describedby":u??void 0,"data-cy":D,"data-testid":b,"data-content-variant":i,...O,...N,children:a})})]})});u.displayName=l.Content.displayName;const m=({centered:t=!1,className:a,"data-cy":i,"data-testid":r,...l})=>{const d=i||"dialog-header",n=r||"dialog-header";return e.jsx("div",{className:o.cn(s.headerStyles,t&&s.headerCenteredStyles,a),"data-cy":d,"data-testid":n,...l})};m.displayName="DialogHeader";const x=({className:t,"data-cy":a,"data-testid":i,...r})=>{const l=a||"dialog-footer",d=i||"dialog-footer";return e.jsx("div",{className:o.cn(s.footerStyles,t),"data-cy":l,"data-testid":d,...r})};x.displayName="DialogFooter";const N=t.forwardRef(({className:t,"data-cy":a,"data-testid":i,...r},d)=>{const n=a||"dialog-title",c=i||"dialog-title";return e.jsx(l.Title,{ref:d,className:o.cn(s.titleStyles,t),"data-cy":n,"data-testid":c,...r})});N.displayName=l.Title.displayName;const v=t.forwardRef(({className:t,"data-cy":a,"data-testid":i,...r},d)=>{const n=a||"dialog-description",c=i||"dialog-description";return e.jsx(l.Description,{ref:d,className:o.cn(s.descriptionStyles,t),"data-cy":n,"data-testid":c,...r})});v.displayName=l.Description.displayName,exports.Dialog=d,exports.DialogClose=y,exports.DialogCloseButton=g,exports.DialogContent=u,exports.DialogDescription=v,exports.DialogFooter=x,exports.DialogHeader=m,exports.DialogIcon=p,exports.DialogOverlay=f,exports.DialogPortal=c,exports.DialogTitle=N,exports.DialogTrigger=n;
|
package/dist/index52.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as
|
|
2
|
-
return
|
|
1
|
+
import{jsx as a,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import*as d from"@radix-ui/react-dialog";import{cn as i}from"./index67.js";import{closeButtonStyles as s,iconVariantColor as o,iconRootStyles as l,overlayBgStyles as r,overlayRootStyles as c,contentTopOffsetMobileStyles as n,contentVariantVerifyStyles as m,contentStyles as y,contentWrapperTopOffsetMobileStyles as N,contentWrapperVerifyMobileStyles as p,contentWrapperStyles as f,headerCenteredStyles as g,headerStyles as u,footerStyles as v,titleStyles as b,descriptionStyles as h}from"./index110.js";import{Icon as D}from"@adam-milo/icons";const C=d.Root,O=d.Trigger,x=d.Portal,j=d.Close,I=e(({className:t,"data-cy":e,"data-testid":o,...l},r)=>{const c=e||"dialog-close-button",n=o||"dialog-close-button";/* @__PURE__ */
|
|
2
|
+
return a(d.Close,{ref:r,className:i(s,t),"data-cy":c,"data-testid":n,"aria-label":"Close dialog",...l,children:/* @__PURE__ */a(D,{name:"Cross2Icon",size:"sm",decorative:!0})})});I.displayName="DialogCloseButton";const P=({children:t,variant:e="default",className:d,"data-cy":s,"data-testid":r,...c})=>{const n=s||"dialog-icon",m=r||"dialog-icon";/* @__PURE__ */
|
|
3
|
+
return a("div",{className:i(l,o[e],d),"data-cy":n,"data-testid":m,"aria-hidden":"true",...c,children:t})};P.displayName="DialogIcon";const T=e(({className:t,variant:e="default","data-cy":s,"data-testid":o,...l},n)=>{const m=s||"dialog-overlay",y=o||"dialog-overlay";/* @__PURE__ */
|
|
4
|
+
return a(d.Overlay,{ref:n,className:i(c,r[e],t),"data-cy":m,"data-testid":y,...l})});T.displayName=d.Overlay.displayName;const M=e(({className:e,children:s,contentVariant:o="default",overlayVariant:l="default",fullWidthOnMobile:r=!1,topOffsetOnMobile:c=!1,contentPadding:g,disableOutsideClose:u=!1,style:v,"aria-describedby":b,"data-cy":h,"data-testid":D,...C},O)=>{const j=h||"dialog-content",I=D||"dialog-content",P=r||"verify"===o,M="verify"===o||r&&c,V=u?{onPointerDownOutside:a=>a.preventDefault(),onInteractOutside:a=>a.preventDefault()}:{};/* @__PURE__ */
|
|
5
|
+
return t(x,{children:[!M&&/* @__PURE__ */a(T,{variant:l}),
|
|
6
|
+
/* @__PURE__ */a("div",{className:i(f,P&&p,M&&N),...M&&{"data-dialog-top-offset-mobile":""},children:/* @__PURE__ */a(d.Content,{ref:O,className:i(y,"verify"===o&&m,M&&n,e),style:g||v?{...v,...g&&{padding:g}}:void 0,"aria-describedby":b??void 0,"data-cy":j,"data-testid":I,"data-content-variant":o,...V,...C,children:s})})]})});M.displayName=d.Content.displayName;const V=({centered:t=!1,className:e,"data-cy":d,"data-testid":s,...o})=>{const l=d||"dialog-header",r=s||"dialog-header";/* @__PURE__ */
|
|
7
|
+
return a("div",{className:i(u,t&&g,e),"data-cy":l,"data-testid":r,...o})};V.displayName="DialogHeader";const w=({className:t,"data-cy":e,"data-testid":d,...s})=>{const o=e||"dialog-footer",l=d||"dialog-footer";/* @__PURE__ */
|
|
8
|
+
return a("div",{className:i(v,t),"data-cy":o,"data-testid":l,...s})};w.displayName="DialogFooter";const z=e(({className:t,"data-cy":e,"data-testid":s,...o},l)=>{const r=e||"dialog-title",c=s||"dialog-title";/* @__PURE__ */
|
|
9
|
+
return a(d.Title,{ref:l,className:i(b,t),"data-cy":r,"data-testid":c,...o})});z.displayName=d.Title.displayName;const B=e(({className:t,"data-cy":e,"data-testid":s,...o},l)=>{const r=e||"dialog-description",c=s||"dialog-description";/* @__PURE__ */
|
|
10
|
+
return a(d.Description,{ref:l,className:i(h,t),"data-cy":r,"data-testid":c,...o})});B.displayName=d.Description.displayName;export{C as Dialog,j as DialogClose,I as DialogCloseButton,M as DialogContent,B as DialogDescription,w as DialogFooter,V as DialogHeader,P as DialogIcon,T as DialogOverlay,x as DialogPortal,z as DialogTitle,O as DialogTrigger};
|
package/dist/index53.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("@radix-ui/react-popover"),o=require("./index67.cjs"),n=require("./index111.cjs");function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const a=s(r),i=a.Root,c=a.Trigger,l=a.Anchor,p=a.Portal,d=a.Close,f=t.forwardRef(({side:t="bottom",align:r="start",sideOffset:s=8,alignOffset:i=0,className:c,"data-testid":l,"data-cy":p,...d},f)=>e.jsx(a.Portal,{children:e.jsx(a.Content,{ref:f,side:t,align:r,sideOffset:s,alignOffset:i,className:o.cn(n.contentStyles,c),"data-testid":l||"popover-content","data-cy":p||"popover-content",...d})}));f.displayName="PopoverContent",exports.Popover=i,exports.PopoverAnchor=l,exports.PopoverClose=d,exports.PopoverContent=f,exports.PopoverPortal=p,exports.PopoverTrigger=c;
|
package/dist/index53.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cn as r}from"./
|
|
2
|
-
return t(d,{ref:h,className:N,"data-cy":j,"data-testid":y,...g,children:$})});o.displayName="Text";export{o as Text};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import*as o from"@radix-ui/react-popover";import{cn as r}from"./index67.js";import{contentStyles as a}from"./index111.js";const i=o.Root,s=o.Trigger,n=o.Anchor,d=o.Portal,m=o.Close,f=e(({side:e="bottom",align:i="start",sideOffset:s=8,alignOffset:n=0,className:d,"data-testid":m,"data-cy":f,...p},c)=>/* @__PURE__ */t(o.Portal,{children:/* @__PURE__ */t(o.Content,{ref:c,side:e,align:i,sideOffset:s,alignOffset:n,className:r(a,d),"data-testid":m||"popover-content","data-cy":f||"popover-content",...p})}));f.displayName="PopoverContent";export{i as Popover,n as PopoverAnchor,m as PopoverClose,f as PopoverContent,d as PopoverPortal,s as PopoverTrigger};
|
package/dist/index54.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("@radix-ui/react-dialog"),r=require("./index67.cjs"),s=require("./index112.cjs"),d=require("@adam-milo/icons");function o(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}return a.default=e,Object.freeze(a)}const c=o(t),n=a.forwardRef(({open:a,onOpenChange:t,side:d="right",width:o="28rem",padding:n,className:i,overlay:l=!0,closeOnOverlayClick:y=!0,closeOnEscape:w=!0,children:p,"data-cy":f,"data-testid":u},m)=>{const x=f||`drawer-${d}`,D=u||`drawer-${d}`;return e.jsx(c.Root,{open:a,onOpenChange:t,children:e.jsxs(c.Portal,{children:[l&&e.jsx(c.Overlay,{className:s.overlayStyles,"data-cy":`${x}-overlay`,"data-testid":`${D}-overlay`}),e.jsx(c.Content,{ref:m,className:r.cn(s.panelBaseStyles,s.panelSideStyles[d],i),style:{width:o,...n?{padding:n}:void 0},onEscapeKeyDown:w?void 0:e=>e.preventDefault(),onInteractOutside:y?void 0:e=>e.preventDefault(),"data-cy":x,"data-testid":D,"data-side":d,children:p})]})})});n.displayName="Drawer";const i=a.forwardRef(({className:a,"data-cy":t,"data-testid":o,...n},i)=>{const l=t||"drawer-close-button",y=o||"drawer-close-button";return e.jsx(c.Close,{ref:i,className:r.cn(s.closeButtonStyles,a),"data-cy":l,"data-testid":y,"aria-label":"Close drawer",...n,children:e.jsx(d.Icon,{name:"CustomCloseXIcon",size:"xs",decorative:!0})})});i.displayName="DrawerCloseButton";const l=a.forwardRef(({className:a,"data-cy":t,"data-testid":d,...o},c)=>{const n=t||"drawer-header",i=d||"drawer-header";return e.jsx("header",{ref:c,className:r.cn(s.headerStyles,a),"data-cy":n,"data-testid":i,...o})});l.displayName="DrawerHeader";const y=a.forwardRef(({className:a,"data-cy":t,"data-testid":d,...o},n)=>{const i=t||"drawer-title",l=d||"drawer-title";return e.jsx(c.Title,{ref:n,className:r.cn(s.titleStyles,a),"data-cy":i,"data-testid":l,...o})});y.displayName="DrawerTitle";const w=a.forwardRef(({className:a,"data-cy":t,"data-testid":d,...o},n)=>{const i=t||"drawer-description",l=d||"drawer-description";return e.jsx(c.Description,{ref:n,className:r.cn(s.descriptionStyles,a),"data-cy":i,"data-testid":l,...o})});w.displayName="DrawerDescription";const p=a.forwardRef(({className:a,"data-cy":t,"data-testid":d,...o},c)=>{const n=t||"drawer-body",i=d||"drawer-body";return e.jsx("div",{ref:c,role:"region","aria-label":"Drawer content",className:r.cn(s.bodyStyles,a),"data-cy":n,"data-testid":i,...o})});p.displayName="DrawerBody";const f=a.forwardRef(({className:a,"data-cy":t,"data-testid":d,...o},c)=>{const n=t||"drawer-footer",i=d||"drawer-footer";return e.jsx("footer",{ref:c,className:r.cn(s.footerStyles,a),"data-cy":n,"data-testid":i,...o})});f.displayName="DrawerFooter",exports.Drawer=n,exports.DrawerBody=p,exports.DrawerCloseButton=i,exports.DrawerDescription=w,exports.DrawerFooter=f,exports.DrawerHeader=l,exports.DrawerTitle=y;
|
package/dist/index54.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return r(
|
|
1
|
+
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as r from"@radix-ui/react-dialog";import{cn as d}from"./index67.js";import{overlayStyles as s,panelSideStyles as o,panelBaseStyles as i,closeButtonStyles as c,headerStyles as n,titleStyles as l,descriptionStyles as m,bodyStyles as y,footerStyles as p}from"./index112.js";import{Icon as w}from"@adam-milo/icons";const N=t(({open:t,onOpenChange:c,side:n="right",width:l="28rem",padding:m,className:y,overlay:p=!0,closeOnOverlayClick:w=!0,closeOnEscape:N=!0,children:f,"data-cy":u,"data-testid":h},D)=>{const v=u||`drawer-${n}`,C=h||`drawer-${n}`;/* @__PURE__ */
|
|
2
|
+
return a(r.Root,{open:t,onOpenChange:c,children:/* @__PURE__ */e(r.Portal,{children:[p&&/* @__PURE__ */a(r.Overlay,{className:s,"data-cy":`${v}-overlay`,"data-testid":`${C}-overlay`}),
|
|
3
|
+
/* @__PURE__ */a(r.Content,{ref:D,className:d(i,o[n],y),style:{width:l,...m?{padding:m}:void 0},onEscapeKeyDown:N?void 0:a=>a.preventDefault(),onInteractOutside:w?void 0:a=>a.preventDefault(),"data-cy":v,"data-testid":C,"data-side":n,children:f})]})})});N.displayName="Drawer";const f=t(({className:e,"data-cy":t,"data-testid":s,...o},i)=>{const n=t||"drawer-close-button",l=s||"drawer-close-button";/* @__PURE__ */
|
|
4
|
+
return a(r.Close,{ref:i,className:d(c,e),"data-cy":n,"data-testid":l,"aria-label":"Close drawer",...o,children:/* @__PURE__ */a(w,{name:"CustomCloseXIcon",size:"xs",decorative:!0})})});f.displayName="DrawerCloseButton";const u=t(({className:e,"data-cy":t,"data-testid":r,...s},o)=>{const i=t||"drawer-header",c=r||"drawer-header";/* @__PURE__ */
|
|
5
|
+
return a("header",{ref:o,className:d(n,e),"data-cy":i,"data-testid":c,...s})});u.displayName="DrawerHeader";const h=t(({className:e,"data-cy":t,"data-testid":s,...o},i)=>{const c=t||"drawer-title",n=s||"drawer-title";/* @__PURE__ */
|
|
6
|
+
return a(r.Title,{ref:i,className:d(l,e),"data-cy":c,"data-testid":n,...o})});h.displayName="DrawerTitle";const D=t(({className:e,"data-cy":t,"data-testid":s,...o},i)=>{const c=t||"drawer-description",n=s||"drawer-description";/* @__PURE__ */
|
|
7
|
+
return a(r.Description,{ref:i,className:d(m,e),"data-cy":c,"data-testid":n,...o})});D.displayName="DrawerDescription";const v=t(({className:e,"data-cy":t,"data-testid":r,...s},o)=>{const i=t||"drawer-body",c=r||"drawer-body";/* @__PURE__ */
|
|
8
|
+
return a("div",{ref:o,role:"region","aria-label":"Drawer content",className:d(y,e),"data-cy":i,"data-testid":c,...s})});v.displayName="DrawerBody";const C=t(({className:e,"data-cy":t,"data-testid":r,...s},o)=>{const i=t||"drawer-footer",c=r||"drawer-footer";/* @__PURE__ */
|
|
9
|
+
return a("footer",{ref:o,className:d(p,e),"data-cy":i,"data-testid":c,...s})});C.displayName="DrawerFooter";export{N as Drawer,v as DrawerBody,f as DrawerCloseButton,D as DrawerDescription,C as DrawerFooter,u as DrawerHeader,h as DrawerTitle};
|
package/dist/index55.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),i=require("./index67.cjs"),t=require("./index113.cjs"),n=require("./index70.cjs"),a=s.forwardRef(({direction:a,spacing:o,align:d,justify:l,wrap:g=!1,m:p,mt:r,mb:m,ms:v,me:c,mx:R,my:S,p:C,pt:h,pb:y,ps:u,pe:x,px:k,py:b,width:j,minWidth:f,maxWidth:w,height:B,minHeight:M,maxHeight:E,className:I,style:P,children:z,"data-cy":H,"data-testid":W,...q},O)=>{const N=n.getResponsiveBase(a)??"vertical",T=H||`stack-${N}`,$=W||`stack-${N}`,A=s.useMemo(()=>n.getResponsiveClasses(a,t.directionStyles),[a]),D=s.useMemo(()=>n.getResponsiveClasses(o,t.spacingStyles),[o]),F=s.useMemo(()=>n.getResponsiveClasses(d,t.alignStyles),[d]),G=s.useMemo(()=>n.getResponsiveClasses(l,t.justifyStyles),[l]),J=s.useMemo(()=>{const e=t.marginStyles;return[...n.getResponsiveClasses(p,e.m),...n.getResponsiveClasses(r,e.mt),...n.getResponsiveClasses(m,e.mb),...n.getResponsiveClasses(v,e.ms),...n.getResponsiveClasses(c,e.me),...n.getResponsiveClasses(R,e.ms),...n.getResponsiveClasses(R,e.me),...n.getResponsiveClasses(S,e.mt),...n.getResponsiveClasses(S,e.mb)]},[p,r,m,v,c,R,S]),K=s.useMemo(()=>{const e=t.paddingStyles;return[...n.getResponsiveClasses(C,e.p),...n.getResponsiveClasses(h,e.pt),...n.getResponsiveClasses(y,e.pb),...n.getResponsiveClasses(u,e.ps),...n.getResponsiveClasses(x,e.pe),...n.getResponsiveClasses(k,e.ps),...n.getResponsiveClasses(k,e.pe),...n.getResponsiveClasses(b,e.pt),...n.getResponsiveClasses(b,e.pb)]},[C,h,y,u,x,k,b]),L=s.useMemo(()=>{const e=t.widthPresetStyles,s=t.minWidthPresetStyles,i=t.maxWidthPresetStyles,a=t.heightPresetStyles,o=t.minHeightPresetStyles,d=t.maxHeightPresetStyles;return[...n.getResponsiveSizeClasses(j,e,"w-"),...n.getResponsiveSizeClasses(f,s,"min-w-"),...n.getResponsiveSizeClasses(w,i,"max-w-"),...n.getResponsiveSizeClasses(B,a,"h-"),...n.getResponsiveSizeClasses(M,o,"min-h-"),...n.getResponsiveSizeClasses(E,d,"max-h-")]},[j,f,w,B,M,E]),Q=s.useMemo(()=>{const e=e=>"string"==typeof e&&!t.isSpacingToken(e)&&!n.isResponsiveObject(e),s={};void 0!==p&&e(p)&&(s.margin=p),void 0!==r&&e(r)&&(s.marginBlockStart=r),void 0!==m&&e(m)&&(s.marginBlockEnd=m),void 0!==v&&e(v)&&(s.marginInlineStart=v),void 0!==c&&e(c)&&(s.marginInlineEnd=c),void 0!==R&&e(R)&&(s.marginInlineStart=R,s.marginInlineEnd=R),void 0!==S&&e(S)&&(s.marginBlockStart=S,s.marginBlockEnd=S),void 0!==C&&e(C)&&(s.padding=C),void 0!==h&&e(h)&&(s.paddingBlockStart=h),void 0!==y&&e(y)&&(s.paddingBlockEnd=y),void 0!==u&&e(u)&&(s.paddingInlineStart=u),void 0!==x&&e(x)&&(s.paddingInlineEnd=x),void 0!==k&&e(k)&&(s.paddingInlineStart=k,s.paddingInlineEnd=k),void 0!==b&&e(b)&&(s.paddingBlockStart=b,s.paddingBlockEnd=b);const i=e=>"string"==typeof e&&!t.isSizePreset(e)&&!n.isResponsiveObject(e);return void 0!==j&&i(j)&&(s.width=j),void 0!==f&&i(f)&&(s.minWidth=f),void 0!==w&&i(w)&&(s.maxWidth=w),void 0!==B&&i(B)&&(s.height=B),void 0!==M&&i(M)&&(s.minHeight=M),void 0!==E&&i(E)&&(s.maxHeight=E),Object.keys(s).length?s:void 0},[p,r,m,v,c,R,S,C,h,y,u,x,k,b,j,f,w,B,M,E]),U=a??o??d??l??g?"flex min-w-0":void 0;return e.jsx("div",{ref:O,className:i.cn(U,A,D,F,G,g&&"flex-wrap",J,K,L,I),style:Q?{...Q,...P}:P,"data-cy":T,"data-testid":$,...q,children:z})});a.displayName="Stack",exports.Stack=a;
|
package/dist/index55.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
return
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{forwardRef as t,useMemo as n}from"react";import{cn as d}from"./index67.js";import{isSpacingToken as a,isSizePreset as m,directionStyles as e,spacingStyles as o,alignStyles as r,justifyStyles as p,marginStyles as s,paddingStyles as c,widthPresetStyles as g,minWidthPresetStyles as l,maxWidthPresetStyles as v,heightPresetStyles as h,minHeightPresetStyles as x,maxHeightPresetStyles as k}from"./index113.js";import{getResponsiveBase as f,getResponsiveClasses as y,getResponsiveSizeClasses as S,isResponsiveObject as w}from"./index70.js";const B=t(({direction:t,spacing:B,align:E,justify:I,wrap:b=!1,m:u,mt:j,mb:H,ms:W,me:N,mx:$,my:O,p:q,pt:z,pb:A,ps:C,pe:D,px:F,py:G,width:J,minWidth:K,maxWidth:L,height:M,minHeight:P,maxHeight:Q,className:R,style:T,children:U,"data-cy":V,"data-testid":X,...Y},Z)=>{const _=f(t)??"vertical",ii=V||`stack-${_}`,ti=X||`stack-${_}`,ni=n(()=>y(t,e),[t]),di=n(()=>y(B,o),[B]),ai=n(()=>y(E,r),[E]),mi=n(()=>y(I,p),[I]),ei=n(()=>{const i=s;return[...y(u,i.m),...y(j,i.mt),...y(H,i.mb),...y(W,i.ms),...y(N,i.me),...y($,i.ms),...y($,i.me),...y(O,i.mt),...y(O,i.mb)]},[u,j,H,W,N,$,O]),oi=n(()=>{const i=c;return[...y(q,i.p),...y(z,i.pt),...y(A,i.pb),...y(C,i.ps),...y(D,i.pe),...y(F,i.ps),...y(F,i.pe),...y(G,i.pt),...y(G,i.pb)]},[q,z,A,C,D,F,G]),ri=n(()=>{const i=l,t=v,n=h,d=x,a=k;return[...S(J,g,"w-"),...S(K,i,"min-w-"),...S(L,t,"max-w-"),...S(M,n,"h-"),...S(P,d,"min-h-"),...S(Q,a,"max-h-")]},[J,K,L,M,P,Q]),pi=n(()=>{const i=i=>"string"==typeof i&&!a(i)&&!w(i),t={};void 0!==u&&i(u)&&(t.margin=u),void 0!==j&&i(j)&&(t.marginBlockStart=j),void 0!==H&&i(H)&&(t.marginBlockEnd=H),void 0!==W&&i(W)&&(t.marginInlineStart=W),void 0!==N&&i(N)&&(t.marginInlineEnd=N),void 0!==$&&i($)&&(t.marginInlineStart=$,t.marginInlineEnd=$),void 0!==O&&i(O)&&(t.marginBlockStart=O,t.marginBlockEnd=O),void 0!==q&&i(q)&&(t.padding=q),void 0!==z&&i(z)&&(t.paddingBlockStart=z),void 0!==A&&i(A)&&(t.paddingBlockEnd=A),void 0!==C&&i(C)&&(t.paddingInlineStart=C),void 0!==D&&i(D)&&(t.paddingInlineEnd=D),void 0!==F&&i(F)&&(t.paddingInlineStart=F,t.paddingInlineEnd=F),void 0!==G&&i(G)&&(t.paddingBlockStart=G,t.paddingBlockEnd=G);const n=i=>"string"==typeof i&&!m(i)&&!w(i);return void 0!==J&&n(J)&&(t.width=J),void 0!==K&&n(K)&&(t.minWidth=K),void 0!==L&&n(L)&&(t.maxWidth=L),void 0!==M&&n(M)&&(t.height=M),void 0!==P&&n(P)&&(t.minHeight=P),void 0!==Q&&n(Q)&&(t.maxHeight=Q),Object.keys(t).length?t:void 0},[u,j,H,W,N,$,O,q,z,A,C,D,F,G,J,K,L,M,P,Q]);/* @__PURE__ */
|
|
2
|
+
return i("div",{ref:Z,className:d(t??B??E??I??b?"flex min-w-0":void 0,ni,di,ai,mi,b&&"flex-wrap",ei,oi,ri,R),style:pi?{...pi,...T}:T,"data-cy":ii,"data-testid":ti,...Y,children:U})});B.displayName="Stack";export{B as Stack};
|
package/dist/index56.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),r=require("./index67.cjs"),t=require("./index114.cjs"),s=require("./index70.cjs"),i=a.forwardRef(({className:i,center:n=!0,maxWidth:d="lg",padding:c="md","data-cy":o,"data-testid":u,children:l,...m},x)=>{const p=o||"container",g=u||"container",j=a.useMemo(()=>s.getResponsiveClasses(d,t.maxWidthMap),[d]),f=a.useMemo(()=>s.getResponsiveClasses(c,t.paddingMap),[c]);return e.jsx("div",{ref:x,className:r.cn("w-full box-border",n&&"mx-auto",...j,...f,i),"data-cy":p,"data-testid":g,"data-center":n,...m,children:l})});i.displayName="Container",exports.Container=i;
|
package/dist/index56.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */e("svg",{className:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:/* @__PURE__ */r(o,b?{children:[
|
|
4
|
-
/* @__PURE__ */e("defs",{children:/* @__PURE__ */r("linearGradient",{id:x,x1:"17",y1:"3",x2:"3",y2:"17",gradientUnits:"userSpaceOnUse",children:[
|
|
5
|
-
/* @__PURE__ */e("stop",{offset:"0%",stopColor:"var(--color-button-orange-border)"}),
|
|
6
|
-
/* @__PURE__ */e("stop",{offset:"100%",stopColor:"var(--color-button-orange)",stopOpacity:"0.75"})]})}),
|
|
7
|
-
/* @__PURE__ */e("circle",{cx:"12",cy:"12",r:"10",stroke:"orange"===d?N:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"47 16"})]}:{children:[
|
|
8
|
-
/* @__PURE__ */e("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),
|
|
9
|
-
/* @__PURE__ */e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"40 60"})]})}),
|
|
10
|
-
/* @__PURE__ */e("span",{className:"sr-only",children:m})]})});d.displayName="Spinner";export{d as Spinner};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useMemo as a}from"react";import{cn as e}from"./index67.js";import{maxWidthMap as i,paddingMap as d}from"./index114.js";import{getResponsiveClasses as o}from"./index70.js";const n=r(({className:r,center:n=!0,maxWidth:m="lg",padding:c="md","data-cy":s,"data-testid":l,children:p,...x},f)=>{const j=s||"container",u=l||"container",h=a(()=>o(m,i),[m]),y=a(()=>o(c,d),[c]);/* @__PURE__ */
|
|
2
|
+
return t("div",{ref:f,className:e("w-full box-border",n&&"mx-auto",...h,...y,r),"data-cy":j,"data-testid":u,"data-center":n,...x,children:p})});n.displayName="Container";export{n as Container};
|
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("@radix-ui/react-separator"),i=require("./index67.cjs"),a=require("./index115.cjs"),o=require("./index70.cjs");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const s=n(r),c=t.forwardRef(({orientation:r="horizontal",decorative:n=!0,spacing:c="0",color:d,className:l,style:u,"data-cy":p,"data-testid":f,...g},y)=>{const b=p||`divider-${r}`,j=f||`divider-${r}`,v=t.useMemo(()=>{const e="horizontal"===r?a.spacingHorizontalMap:a.spacingVerticalMap;return o.getResponsiveClasses(c,e)},[c,r]);return e.jsx(s.Root,{ref:y,decorative:n,orientation:r,className:i.cn(a.baseStyles,a.orientationStyles[r],...v,l),style:{...d&&{backgroundColor:d},...u},"data-cy":b,"data-testid":j,...g})});c.displayName="Divider",exports.Divider=c;
|
package/dist/index57.js
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */e("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 124 130",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[
|
|
4
|
-
/* @__PURE__ */a("defs",{children:/* @__PURE__ */e("linearGradient",{id:f,x1:"0%",y1:"0%",x2:"100%",y2:"100%",gradientUnits:"userSpaceOnUse",children:[
|
|
5
|
-
/* @__PURE__ */a("stop",{offset:"0%",stopColor:"var(--color-lime)"}),
|
|
6
|
-
/* @__PURE__ */a("stop",{offset:"50%",stopColor:"var(--color-teal-bright)"}),
|
|
7
|
-
/* @__PURE__ */a("stop",{offset:"100%",stopColor:"var(--color-button-blue)"})]})}),
|
|
8
|
-
/* @__PURE__ */a("g",{className:"motion-reduce:animate-none animate-[pulse_2s_ease-in-out_infinite]",children:/* @__PURE__ */a("path",{d:"M33.787 0C34.644 7.815 37.572 15.321 42.293 21.789C47.014 28.257 53.367 33.466 60.698 36.94C53.367 40.414 47.014 45.623 42.293 52.091C37.572 58.559 34.644 66.065 33.787 73.88C32.93 66.065 30.002 58.559 25.281 52.091C20.56 45.623 14.207 40.414 6.876 36.94C14.207 33.466 20.56 28.257 25.281 21.789C30.002 15.321 32.93 7.815 33.787 0Z",fill:`url(#${f})`,className:"origin-center"})}),
|
|
9
|
-
/* @__PURE__ */a("g",{className:"motion-reduce:animate-none animate-[pulse_2s_ease-in-out_0.3s_infinite]",transform:"translate(80, 42)",children:/* @__PURE__ */a("path",{d:"M21.897 0C22.464 5.062 24.409 9.921 27.486 14.108C30.564 18.295 34.633 21.657 39.294 23.906C34.633 26.155 30.564 29.517 27.486 33.704C24.409 37.891 22.464 42.75 21.897 47.812C21.33 42.75 19.385 37.891 16.308 33.704C13.231 29.517 9.161 26.155 4.5 23.906C9.161 21.657 13.231 18.295 16.308 14.108C19.385 9.921 21.33 5.062 21.897 0Z",fill:`url(#${f})`,className:"origin-center"})}),
|
|
10
|
-
/* @__PURE__ */a("g",{className:"motion-reduce:animate-none animate-[pulse_2s_ease-in-out_0.6s_infinite]",transform:"translate(48, 101)",children:/* @__PURE__ */a("path",{d:"M14.234 0C14.602 3.289 15.842 6.445 17.827 9.166C19.812 11.887 22.473 14.078 25.558 15.534C22.473 16.99 19.812 19.181 17.827 21.902C15.842 24.623 14.602 27.779 14.234 31.068C13.866 27.779 12.626 24.623 10.641 21.902C8.656 19.181 5.995 16.99 2.91 15.534C5.995 14.078 8.656 11.887 10.641 9.166C12.626 6.445 13.866 3.289 14.234 0Z",fill:`url(#${f})`,className:"origin-center"})})]}),
|
|
11
|
-
/* @__PURE__ */a("span",{className:"sr-only",children:l})]})});l.displayName="AiLoader";export{l as AiLoader};
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as t,useMemo as o}from"react";import*as i from"@radix-ui/react-separator";import{cn as a}from"./index67.js";import{orientationStyles as e,baseStyles as d,spacingHorizontalMap as s,spacingVerticalMap as m}from"./index115.js";import{getResponsiveClasses as n}from"./index70.js";const c=t(({orientation:t="horizontal",decorative:c=!0,spacing:p="0",color:l,className:f,style:x,"data-cy":v,"data-testid":y,...j},u)=>{const N=v||`divider-${t}`,g=y||`divider-${t}`,h=o(()=>n(p,"horizontal"===t?s:m),[p,t]);/* @__PURE__ */
|
|
2
|
+
return r(i.Root,{ref:u,decorative:c,orientation:t,className:a(d,e[t],...h,f),style:{...l&&{backgroundColor:l},...x},"data-cy":N,"data-testid":g,...j})});c.displayName="Divider";export{c as Divider};
|
package/dist/index58.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index67.cjs"),s=require("@adam-milo/icons"),n=require("./index5.cjs"),l=require("./index116.cjs"),r=a.forwardRef(({children:a,logoCenterOnMobile:r=!1,logo:o,nav:i,onHamburgerClick:d,onLogoClick:c,logoAriaLabel:u="Go to home",showSettings:y=!0,showUserMenu:g=!0,userInitials:m,onSettingsClick:b,onUserMenuClick:h,activeMenu:p=null,scrollMode:x="auto",className:S,headerClassName:$,"data-testid":j,"data-cy":v,...C},k)=>{const N=v||"auth-layout",M=j||"auth-layout",W="contained"===x?l.rootContainedStyles:l.rootAutoStyles;return e.jsxs("div",{ref:k,className:t.cn(W,S),"data-testid":M,"data-cy":N,"data-scroll-mode":x,...C,children:[e.jsx("div",{className:t.cn(l.backgroundStyles),"data-testid":`${M}-background`,"data-cy":`${N}-background`,"aria-hidden":"true"}),e.jsxs("header",{className:t.cn(l.headerBaseStyles,(y||g||null!=i)&&l.headerDesktopLayoutAlwaysStyles,r&&!(y||g||null!=i)&&l.headerMobileLogoCenterStyles,null!=i&&l.headerWithNavStyles,$),"data-testid":`${M}-header`,"data-cy":`${N}-header`,children:[c?e.jsx("button",{type:"button",onClick:c,className:t.cn(l.logoWrapperBaseStyles,l.logoButtonStyles,r&&!(y||g||null!=i)&&l.logoWrapperMobileCenterStyles),"data-testid":`${M}-logo`,"data-cy":`${N}-logo`,"aria-label":u,children:o}):e.jsx("div",{className:t.cn(l.logoWrapperBaseStyles,r&&!(y||g||null!=i)&&l.logoWrapperMobileCenterStyles),"data-testid":`${M}-logo`,"data-cy":`${N}-logo`,children:o}),null!=i&&e.jsx("nav",{className:l.navWrapperStyles,"data-testid":`${M}-nav`,"data-cy":`${N}-nav`,children:i}),(y||g||null!=i)&&e.jsxs("nav",{className:t.cn(l.menuWrapperStyles),"aria-label":"Header menu","data-testid":`${M}-menu`,"data-cy":`${N}-menu`,children:[y&&e.jsx(n.MenuIconButton,{variant:"settings",selected:"settings"===p,onClick:b,"aria-label":"Settings","data-testid":`${M}-settings-btn`,"data-cy":`${N}-settings-btn`}),g&&e.jsx(n.MenuIconButton,{variant:"user",initials:m,selected:"user"===p,onClick:h,"aria-label":m?`User menu - ${m}`:"User menu","data-testid":`${M}-user-btn`,"data-cy":`${N}-user-btn`}),null!=i&&e.jsx("button",{type:"button",onClick:d,className:"hidden max-lg:flex items-center justify-center p-2 bg-transparent border-none cursor-pointer","aria-label":"Open menu","data-testid":`${M}-hamburger`,"data-cy":`${N}-hamburger`,children:e.jsx(s.Icon,{name:"CustomHamburgerIcon",size:"lg",color:"text",decorative:!0})})]})]}),a]})});r.displayName="AuthLayout",exports.AuthLayout=r;
|
package/dist/index58.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{forwardRef as t}from"react";import{cn as n}from"./index67.js";import{Icon as l}from"@adam-milo/icons";import{MenuIconButton as r}from"./index5.js";import{navWrapperStyles as i,backgroundStyles as s,logoWrapperMobileCenterStyles as o,logoButtonStyles as d,logoWrapperBaseStyles as c,menuWrapperStyles as u,headerWithNavStyles as m,headerMobileLogoCenterStyles as g,headerDesktopLayoutAlwaysStyles as b,headerBaseStyles as h,rootContainedStyles as $,rootAutoStyles as y}from"./index116.js";const p=t(({children:t,logoCenterOnMobile:p=!1,logo:v,nav:C,onHamburgerClick:N,onLogoClick:k,logoAriaLabel:f="Go to home",showSettings:x=!0,showUserMenu:j=!0,userInitials:M,onSettingsClick:U,onUserMenuClick:H,activeMenu:L=null,scrollMode:S="auto",className:w,headerClassName:A,"data-testid":I,"data-cy":O,...z},G)=>{const q=O||"auth-layout",B=I||"auth-layout";/* @__PURE__ */
|
|
2
|
+
return a("div",{ref:G,className:n("contained"===S?$:y,w),"data-testid":B,"data-cy":q,"data-scroll-mode":S,...z,children:[
|
|
3
|
+
/* @__PURE__ */e("div",{className:n(s),"data-testid":`${B}-background`,"data-cy":`${q}-background`,"aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */a("header",{className:n(h,(x||j||null!=C)&&b,p&&!(x||j||null!=C)&&g,null!=C&&m,A),"data-testid":`${B}-header`,"data-cy":`${q}-header`,children:[k?/* @__PURE__ */e("button",{type:"button",onClick:k,className:n(c,d,p&&!(x||j||null!=C)&&o),"data-testid":`${B}-logo`,"data-cy":`${q}-logo`,"aria-label":f,children:v}):/* @__PURE__ */e("div",{className:n(c,p&&!(x||j||null!=C)&&o),"data-testid":`${B}-logo`,"data-cy":`${q}-logo`,children:v}),null!=C&&/* @__PURE__ */e("nav",{className:i,"data-testid":`${B}-nav`,"data-cy":`${q}-nav`,children:C}),(x||j||null!=C)&&/* @__PURE__ */a("nav",{className:n(u),"aria-label":"Header menu","data-testid":`${B}-menu`,"data-cy":`${q}-menu`,children:[x&&/* @__PURE__ */e(r,{variant:"settings",selected:"settings"===L,onClick:U,"aria-label":"Settings","data-testid":`${B}-settings-btn`,"data-cy":`${q}-settings-btn`}),j&&/* @__PURE__ */e(r,{variant:"user",initials:M,selected:"user"===L,onClick:H,"aria-label":M?`User menu - ${M}`:"User menu","data-testid":`${B}-user-btn`,"data-cy":`${q}-user-btn`}),null!=C&&/* @__PURE__ */e("button",{type:"button",onClick:N,className:"hidden max-lg:flex items-center justify-center p-2 bg-transparent border-none cursor-pointer","aria-label":"Open menu","data-testid":`${B}-hamburger`,"data-cy":`${q}-hamburger`,children:/* @__PURE__ */e(l,{name:"CustomHamburgerIcon",size:"lg",color:"text",decorative:!0})})]})]}),t]})});p.displayName="AuthLayout";export{p as AuthLayout};
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),n=require("./index67.cjs"),a=require("./index117.cjs"),r=t.forwardRef(({children:t,className:r,"data-testid":i,"data-cy":s,...c},d)=>{const o=s||"main-content",l=i||"main-content";return e.jsx("main",{ref:d,className:n.cn(a.mainContentBaseStyles,r),"data-testid":l,"data-cy":o,...c,children:t})});r.displayName="MainContent",exports.MainContent=r;
|
package/dist/index59.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as a}from"react";import{cn as e}from"./index67.js";import{mainContentBaseStyles as n}from"./index117.js";const r=a(({children:a,className:r,"data-testid":i,"data-cy":m,...o},c)=>{const s=m||"main-content",d=i||"main-content";/* @__PURE__ */
|
|
2
|
+
return t("main",{ref:c,className:e(n,r),"data-testid":d,"data-cy":s,...o,children:a})});r.displayName="MainContent";export{r as MainContent};
|
package/dist/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("react"),t=require("email-validator"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("react"),t=require("email-validator"),i=require("./index74.cjs"),r=e.forwardRef(({validateEmail:r=!0,invalidEmailMessage:l="Not a valid email address",validate:d,"data-cy":s,"data-testid":u,...n},m)=>{const o=e.useCallback(a=>{if(a)return t.validate(a)?void 0:l},[l]),c=e.useCallback(a=>r?d?o(a)||d(a):o(a):d?.(a),[r,d,o]);return a.jsx(i.Input,{ref:m,type:"email",validate:c,"data-cy":s||"email-input","data-testid":u||"email-input",...n})});r.displayName="EmailInput",exports.EmailInput=r;
|
package/dist/index6.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{forwardRef as t,useCallback as i}from"react";import{validate as e}from"email-validator";import{Input as r}from"./
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{forwardRef as t,useCallback as i}from"react";import{validate as e}from"email-validator";import{Input as r}from"./index74.js";const m=t(({validateEmail:t=!0,invalidEmailMessage:m="Not a valid email address",validate:d,"data-cy":l,"data-testid":o,...s},n)=>{const p=i(a=>{if(a)return e(a)?void 0:m},[m]),v=i(a=>t?d?p(a)||d(a):p(a):d?.(a),[t,d,p]);/* @__PURE__ */
|
|
2
2
|
return a(r,{ref:n,type:"email",validate:v,"data-cy":l||"email-input","data-testid":o||"email-input",...s})});m.displayName="EmailInput";export{m as EmailInput};
|
package/dist/index60.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index67.cjs"),s=a.forwardRef(({logo:a,nav:s,right:r,logoCenterOnMobile:n=!1,className:m,"data-cy":i,"data-testid":d,...l},o)=>{const x=i??"simple-header",c=d??"simple-header";return e.jsxs("header",{ref:o,className:t.cn("flex flex-row items-center justify-between bg-transparent z-[100] border-0 border-none",n&&"max-sm:relative",m),style:{padding:"20px 16px"},"data-cy":x,"data-testid":c,...l,children:[e.jsx("div",{className:t.cn("flex items-center shrink-0 border-0 border-none",n&&["max-sm:absolute max-sm:inset-x-0 max-sm:top-0 max-sm:bottom-0","max-sm:flex max-sm:justify-center max-sm:items-center","max-sm:w-full max-sm:max-w-none","max-sm:[&>*]:shrink-0 max-sm:[&>*]:basis-auto"].join(" ")),"data-cy":`${x}-logo`,"data-testid":`${c}-logo`,children:a}),null!=s?e.jsx("nav",{className:"flex items-center max-sm:hidden","data-cy":`${x}-nav`,"data-testid":`${c}-nav`,children:s}):null,null!=r?e.jsx("div",{className:"flex items-center gap-2 shrink-0 border-0 border-none","data-cy":`${x}-right`,"data-testid":`${c}-right`,children:r}):null]})});s.displayName="SimpleHeader",exports.SimpleHeader=s;
|
package/dist/index60.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t}from"react";import{cn as s}from"./index67.js";const r=t(({logo:t,nav:r,right:m,logoCenterOnMobile:n=!1,className:i,"data-cy":d,"data-testid":l,...o},x)=>{const c=d??"simple-header",h=l??"simple-header";/* @__PURE__ */
|
|
2
|
+
return e("header",{ref:x,className:s("flex flex-row items-center justify-between bg-transparent z-[100] border-0 border-none",n&&"max-sm:relative",i),style:{padding:"20px 16px"},"data-cy":c,"data-testid":h,...o,children:[
|
|
3
|
+
/* @__PURE__ */a("div",{className:s("flex items-center shrink-0 border-0 border-none",n&&["max-sm:absolute max-sm:inset-x-0 max-sm:top-0 max-sm:bottom-0","max-sm:flex max-sm:justify-center max-sm:items-center","max-sm:w-full max-sm:max-w-none","max-sm:[&>*]:shrink-0 max-sm:[&>*]:basis-auto"].join(" ")),"data-cy":`${c}-logo`,"data-testid":`${h}-logo`,children:t}),null!=r?/* @__PURE__ */a("nav",{className:"flex items-center max-sm:hidden","data-cy":`${c}-nav`,"data-testid":`${h}-nav`,children:r}):null,null!=m?/* @__PURE__ */a("div",{className:"flex items-center gap-2 shrink-0 border-0 border-none","data-cy":`${c}-right`,"data-testid":`${h}-right`,children:m}):null]})});r.displayName="SimpleHeader";export{r as SimpleHeader};
|
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),t=require("./index67.cjs"),r=require("./index118.cjs"),a=require("./index70.cjs"),i=s.forwardRef(({columns:i=3,rows:o,gap:n="4",rowGap:c,columnGap:d,align:u="stretch",justify:p="stretch",autoFitMinWidth:l="15rem",className:g,children:m,style:M,"data-cy":y,"data-testid":f,...j},v)=>{const R=a.getResponsiveBase(i)??3,x=y??`grid-${R}col`,G=f??`grid-${R}col`,h=s.useMemo(()=>a.getResponsiveClasses(i,r.gridColumnsMap),[i]),q=s.useMemo(()=>{if(c??d){const e="object"==typeof n?a.getResponsiveBase(n)??"4":n,s=c??e,t=d??e;return[`${r.columnGapMap[t]} ${r.rowGapMap[s]}`]}return a.getResponsiveClasses(n,r.gapMap)},[n,c,d]),w=s.useMemo(()=>a.getResponsiveClasses(u,r.alignMap),[u]),C=s.useMemo(()=>a.getResponsiveClasses(p,r.justifyMap),[p]),$={...M,..."auto"===R&&{"--grid-auto-fit-min":l}};return e.jsx("div",{ref:v,className:t.cn("grid",h,q,w,C,o&&r.gridRowsMap[o],g),style:$,"data-cy":x,"data-testid":G,...j,children:m})});i.displayName="Grid",exports.Grid=i;
|
package/dist/index61.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useMemo as i}from"react";import{cn as e}from"./index67.js";import{columnGapMap as o,rowGapMap as a,gridColumnsMap as s,gapMap as d,alignMap as c,justifyMap as m,gridRowsMap as n}from"./index118.js";import{getResponsiveBase as l,getResponsiveClasses as p}from"./index70.js";const f=r(({columns:r=3,rows:f,gap:u="4",rowGap:y,columnGap:g,align:j="stretch",justify:h="stretch",autoFitMinWidth:x="15rem",className:$,children:G,style:N,"data-cy":w,"data-testid":b,...v},F)=>{const M=l(r)??3,W=w??`grid-${M}col`,k=b??`grid-${M}col`,q=i(()=>p(r,s),[r]),z=i(()=>{if(y??g){const t="object"==typeof u?l(u)??"4":u,r=y??t;return[`${o[g??t]} ${a[r]}`]}return p(u,d)},[u,y,g]),A=i(()=>p(j,c),[j]),B=i(()=>p(h,m),[h]),C={...N,..."auto"===M&&{"--grid-auto-fit-min":x}};/* @__PURE__ */
|
|
2
|
+
return t("div",{ref:F,className:e("grid",q,z,A,B,f&&n[f],$),style:C,"data-cy":W,"data-testid":k,...v,children:G})});f.displayName="Grid";export{f as Grid};
|
package/dist/index62.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("./index67.cjs"),a=require("./index119.cjs"),s=t.forwardRef(({size:t="md",weight:s="regular",as:i="p",color:c="text",align:l="start",truncate:d=!1,className:n="","data-cy":o,"data-testid":u,children:x,...y},g)=>{const S=o||`text-${t}-${s}`,m=u||`text-${t}-${s}`,j=r.cn(a.rootStyles,a.sizeStyles[t],a.weightStyles[s],a.colorStyles[c],a.alignStyles[l],d&&"truncate",n);return e.jsx(i,{ref:g,className:j,"data-cy":S,"data-testid":m,...y,children:x})});s.displayName="Text",exports.Text=s;
|
package/dist/index62.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cn as r}from"./index67.js";import{alignStyles as a,colorStyles as i,weightStyles as s,sizeStyles as c,rootStyles as m}from"./index119.js";const o=e(({size:e="md",weight:o="regular",as:d="p",color:n="text",align:l="start",truncate:x=!1,className:p="","data-cy":f,"data-testid":u,children:$,...g},h)=>{const j=f||`text-${e}-${o}`,y=u||`text-${e}-${o}`,N=r(m,c[e],s[o],i[n],a[l],x&&"truncate",p);/* @__PURE__ */
|
|
2
|
+
return t(d,{ref:h,className:N,"data-cy":j,"data-testid":y,...g,children:$})});o.displayName="Text";export{o as Text};
|