@adam-milo/ui 1.0.128 → 1.0.130
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 -1
- package/dist/index108.js +1 -1
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -3
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -2
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -1
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +1 -5
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +1 -3
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +1 -1
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +1 -1
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +1 -4
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +1 -2
- 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 +9 -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 -10
- 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/core/menu-icon-button/MenuIconButton.styles.d.ts +1 -1
- package/dist/src/components/core/menu-icon-button/MenuIconButton.styles.d.ts.map +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/chip-group/ChipGroup.component.d.ts.map +1 -1
- package/dist/src/components/data-display/chip-group/ChipGroup.utils.d.ts +21 -0
- package/dist/src/components/data-display/chip-group/ChipGroup.utils.d.ts.map +1 -0
- package/dist/src/components/data-display/chip-group/useChipOverflow.d.ts +18 -0
- package/dist/src/components/data-display/chip-group/useChipOverflow.d.ts.map +1 -0
- 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 +19 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/useMergedRef.d.ts +8 -4
- package/dist/src/lib/useMergedRef.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -2
- package/dist/index127.cjs +0 -1
- package/dist/index127.js +0 -1
- package/dist/index128.cjs +0 -1
- package/dist/index128.js +0 -1
- package/dist/index129.cjs +0 -1
- package/dist/index129.js +0 -1
- package/dist/index130.cjs +0 -1
- package/dist/index130.js +0 -1
- package/dist/index131.cjs +0 -1
- package/dist/index131.js +0 -1
package/dist/index96.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const x
|
|
1
|
+
const r="w-full overflow-x-auto [-webkit-overflow-scrolling:touch] [scrollbar-width:thin] [scrollbar-color:var(--color-border)_var(--color-bg-secondary)]",e="card-border-break bg-[var(--color-overlay-white-43)]",t="rounded-2xl",o="rounded-t-2xl card-border-break--flat-bottom",a="w-full border-collapse text-14 leading-normal text-[var(--color-text)]",l="border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",n="!bg-transparent border-b border-[color-mix(in_srgb,var(--color-teal)_25%,transparent)]",s="px-4 py-3 text-start font-semibold text-[var(--color-system-text)] max-sm:px-2 max-sm:py-2 max-sm:text-12",i="px-0 py-2.5 whitespace-nowrap text-[1.1875rem] font-bold text-[var(--color-slate)] first:ps-6 last:pe-6 h-[4.25rem]",b="border-b border-[var(--color-border)]",c="border-0 even:bg-transparent hover:bg-white h-[4.5rem]",x="hover:bg-[var(--color-bg)]",m="even:bg-[var(--color-bg)]",d="px-4 py-3 text-[var(--color-text)] max-sm:px-2 max-sm:py-2 max-sm:text-12",p="px-0 py-2.5 text-18 font-normal text-[var(--color-text)] first:ps-6 last:pe-6 h-[4.5rem]",f="flex flex-col items-center justify-center gap-4 py-16 px-6 max-sm:py-10",g="w-[11.875rem] h-[11.875rem] text-[var(--color-system-text)]",v="text-16 leading-24 font-normal text-[var(--color-system-text)] text-center max-w-[20rem]",h="flex items-center justify-between p-6 max-sm:p-4",_="py-4 text-center",w=["h-3 rounded-4","bg-[linear-gradient(90deg,color-mix(in_srgb,var(--color-border)_40%,transparent)_0%,color-mix(in_srgb,var(--color-grey-skeleton)_40%,transparent)_100%)]","relative overflow-hidden","after:absolute after:inset-0","after:bg-[linear-gradient(90deg,transparent_0%,color-mix(in_srgb,var(--color-white)_40%,transparent)_50%,transparent_100%)]","after:animate-[shimmer_1.5s_ease-in-out_infinite]","after:[background-size:200%_100%]"].join(" "),u="overflow-y-auto datatable-scrollbar",y=["sticky top-0 z-[5] !border-b-0","[&>tr>th]:transition-[background-color] [&>tr>th]:duration-500 [&>tr>th]:ease-in-out","after:absolute after:left-0 after:right-0 after:bottom-0 after:h-px after:bg-[color-mix(in_srgb,var(--color-teal)_25%,transparent)]"].join(" "),j=["[&>tr>th]:!bg-white","[&>tr>th:first-child]:rounded-tl-16","[&>tr>th:last-child]:rounded-tr-16"].join(" "),k="w-[4.75rem] min-w-[4.75rem] max-w-[4.75rem] ps-6 pe-[0.75rem] py-0 max-sm:pe-2 max-sm:ps-2",z="flex items-center justify-center w-[2.5rem] h-[2.5rem] cursor-pointer",q="cursor-pointer focus:bg-[var(--color-bg)]",A="focus:bg-white",B=["fixed bottom-8 left-1/2 -translate-x-1/2 z-50","flex items-center justify-between","w-[46.875rem] max-w-[calc(100%-2rem)]","py-4 ps-8 pe-4","bg-white rounded-2xl","border border-solid border-[color-mix(in_srgb,var(--color-teal)_15%,transparent)]","shadow-[0_4px_24px_0_color-mix(in_srgb,var(--color-black)_8%,transparent)]"].join(" ");export{k as checkboxCellStyles,z as checkboxLabelStyles,g as emptyStateIconStyles,v as emptyStateTextStyles,f as emptyStateWrapperStyles,B as footerBarStyles,h as headerBarStyles,_ as loadingRowStyles,u as scrollContainerStyles,w as skeletonCellStyles,j as stickyTheadScrolledStyles,y as stickyTheadStyles,a as tableBaseStyles,p as tdBorderBreakStyles,d as tdStyles,i as thBorderBreakStyles,s as thStyles,n as theadBorderBreakStyles,l as theadStyles,c as trBorderBreakStyles,A as trClickableBorderBreakFocusStyles,q as trClickableStyles,x as trHoverableStyles,m as trStripedEvenStyles,b as trStripedStyles,o as wrapperBorderBreakFlatBottomStyles,t as wrapperBorderBreakRoundedStyles,e as wrapperBorderBreakStyles,r as wrapperStyles};
|
package/dist/index97.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.chipBaseStyles="inline-flex items-center justify-center py-1 px-3 md:px-3.5 rounded border border-solid text-14 leading-none font-normal transition-all duration-200 cursor-default select-none whitespace-nowrap",exports.chipVariantMap={primary:{base:"bg-[color-mix(in_srgb,var(--color-clickable)_10%,transparent)] border-[color-mix(in_srgb,var(--color-clickable)_30%,transparent)] text-[var(--color-clickable)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-clickable)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-clickable)_40%,transparent)]",selected:"bg-[var(--color-clickable)] border-[var(--color-clickable)] text-[var(--color-card)]"},secondary:{base:"bg-[color-mix(in_srgb,var(--color-toggle)_10%,transparent)] border-[color-mix(in_srgb,var(--color-toggle)_30%,transparent)] text-[var(--color-toggle)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-toggle)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-toggle)_40%,transparent)]",selected:"bg-[var(--color-toggle)] border-[var(--color-toggle)] text-[var(--color-card)]"},tertiary:{base:"bg-[color-mix(in_srgb,var(--color-popup)_10%,transparent)] border-[color-mix(in_srgb,var(--color-popup)_30%,transparent)] text-[var(--color-popup)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-popup)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-popup)_40%,transparent)]",selected:"bg-[var(--color-popup)] border-[var(--color-popup)] text-[var(--color-card)]"},quaternary:{base:"bg-[color-mix(in_srgb,var(--color-secondary)_10%,transparent)] border-[color-mix(in_srgb,var(--color-secondary)_30%,transparent)] text-[var(--color-secondary)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-secondary)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-secondary)_40%,transparent)]",selected:"bg-[var(--color-secondary)] border-[var(--color-secondary)] text-[var(--color-card)]"}};
|
package/dist/index97.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r={primary:{base:"bg-[color-mix(in_srgb,var(--color-clickable)_10%,transparent)] border-[color-mix(in_srgb,var(--color-clickable)_30%,transparent)] text-[var(--color-clickable)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-clickable)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-clickable)_40%,transparent)]",selected:"bg-[var(--color-clickable)] border-[var(--color-clickable)] text-[var(--color-card)]"},secondary:{base:"bg-[color-mix(in_srgb,var(--color-toggle)_10%,transparent)] border-[color-mix(in_srgb,var(--color-toggle)_30%,transparent)] text-[var(--color-toggle)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-toggle)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-toggle)_40%,transparent)]",selected:"bg-[var(--color-toggle)] border-[var(--color-toggle)] text-[var(--color-card)]"},tertiary:{base:"bg-[color-mix(in_srgb,var(--color-popup)_10%,transparent)] border-[color-mix(in_srgb,var(--color-popup)_30%,transparent)] text-[var(--color-popup)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-popup)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-popup)_40%,transparent)]",selected:"bg-[var(--color-popup)] border-[var(--color-popup)] text-[var(--color-card)]"},quaternary:{base:"bg-[color-mix(in_srgb,var(--color-secondary)_10%,transparent)] border-[color-mix(in_srgb,var(--color-secondary)_30%,transparent)] text-[var(--color-secondary)]",hover:"hover:bg-[color-mix(in_srgb,var(--color-secondary)_15%,transparent)] hover:border-[color-mix(in_srgb,var(--color-secondary)_40%,transparent)]",selected:"bg-[var(--color-secondary)] border-[var(--color-secondary)] text-[var(--color-card)]"}},o="inline-flex items-center justify-center py-1 px-3 md:px-3.5 rounded border border-solid text-14 leading-none font-normal transition-all duration-200 cursor-default select-none whitespace-nowrap";export{o as chipBaseStyles,r as chipVariantMap};
|
package/dist/index98.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"),t=require("./index126.cjs");exports.useChipOverflow=(r,n,u,c,s)=>{const[o,l]=e.useState(r.length),i=e.useCallback(()=>{if(void 0!==s)return void l(Math.min(s,r.length));const e=n.current;if(!e)return;const o=e.clientWidth,i=parseFloat(getComputedStyle(document.documentElement).fontSize)||16,a=window.getComputedStyle(e),f=a.gap,h=parseFloat(a.fontSize)||16,d=t.parseGapValue(f,i,h),m=3.75*i;for(let t=0;t<r.length;t++){const e=r[t],n=u.current[t];n&&c.current.set(e.value,n.offsetWidth)}const g=t.calculateFittingChips(r,c.current,o,d,m);l(g)},[r,s,n,u,c]),a=((t,r)=>{const n=e.useRef(null);return e.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),e.useCallback((...e)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(...e),r)},[t,r])})(i,100);e.useEffect(()=>{u.current.length>r.length&&(u.current=u.current.slice(0,r.length));const e=new Set(r.map(e=>e.value));if(c.current.forEach((t,r)=>{e.has(r)||c.current.delete(r)}),void 0===s){r.some(e=>!c.current.has(e.value))?l(r.length):setTimeout(i,0)}},[r,s,i,u,c]),e.useEffect(()=>{const e=n.current;if(!e)return;const t=new ResizeObserver(()=>{a()});return t.observe(e),setTimeout(i,0),()=>{t.disconnect()}},[i,a,n]);const f=r.slice(0,o),h=r.slice(o);return{visibleCount:o,visibleItems:f,hiddenItems:h,hasOverflow:h.length>0}};
|
package/dist/index98.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{useState as e,useCallback as t,useEffect as r,useRef as n}from"react";import{parseGapValue as o,calculateFittingChips as c}from"./index126.js";const u=(u,s,i,l,m)=>{const[a,h]=e(u.length),d=t(()=>{if(void 0!==m)return void h(Math.min(m,u.length));const e=s.current;if(!e)return;const t=e.clientWidth,r=parseFloat(getComputedStyle(document.documentElement).fontSize)||16,n=window.getComputedStyle(e),a=n.gap,d=parseFloat(n.fontSize)||16,f=o(a,r,d),g=3.75*r;for(let o=0;o<u.length;o++){const e=u[o],t=i.current[o];t&&l.current.set(e.value,t.offsetWidth)}const v=c(u,l.current,t,f,g);h(v)},[u,m,s,i,l]),f=((e,o)=>{const c=n(null);return r(()=>()=>{c.current&&clearTimeout(c.current)},[]),t((...t)=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>e(...t),o)},[e,o])})(d,100);r(()=>{i.current.length>u.length&&(i.current=i.current.slice(0,u.length));const e=new Set(u.map(e=>e.value));if(l.current.forEach((t,r)=>{e.has(r)||l.current.delete(r)}),void 0===m){u.some(e=>!l.current.has(e.value))?h(u.length):setTimeout(d,0)}},[u,m,d,i,l]),r(()=>{const e=s.current;if(!e)return;const t=new ResizeObserver(()=>{f()});return t.observe(e),setTimeout(d,0),()=>{t.disconnect()}},[d,f,s]);const g=u.slice(0,a),v=u.slice(a);return{visibleCount:a,visibleItems:g,hiddenItems:v,hasOverflow:v.length>0}};export{u as useChipOverflow};
|
package/dist/index99.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.containerStyles="chip-group__container flex flex-nowrap gap-2 md:gap-2.5 lg:gap-2 items-center",exports.itemButtonStyles="relative inline-flex items-center gap-1 cursor-pointer outline-none transition-all duration-200 rounded focus-visible:outline-2 focus-visible:outline-[var(--color-clickable)] focus-visible:outline-offset-0.5 focus-visible:rounded active:scale-[0.98] aria-[disabled=true]:cursor-not-allowed [&_.cursor-pointer]:cursor-pointer [&_[aria-disabled=true]]:cursor-not-allowed",exports.itemWrapperStyles="inline-flex shrink-0",exports.overflowButtonStyles="relative inline-flex shrink-0 cursor-pointer",exports.overflowChipClassMap={primary:"!bg-[color-mix(in_srgb,var(--color-clickable)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-clickable)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-clickable)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-clickable)_60%,transparent)]",secondary:"!bg-[color-mix(in_srgb,var(--color-toggle)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-toggle)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-toggle)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-toggle)_60%,transparent)]",tertiary:"!bg-[color-mix(in_srgb,var(--color-popup)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-popup)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-popup)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-popup)_60%,transparent)]",quaternary:"!bg-[color-mix(in_srgb,var(--color-secondary)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-secondary)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-secondary)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-secondary)_60%,transparent)]"},exports.removeButtonStyles="absolute end-1 top-1/2 -translate-y-1/2 flex items-center justify-center w-4 h-4 p-0 border-none bg-transparent cursor-pointer rounded-full transition-colors hover:bg-[color-mix(in_srgb,currentColor_20%,transparent)] focus-visible:outline-2 focus-visible:outline-[var(--color-clickable)] focus-visible:outline-offset-1 text-current",exports.rootStyles="block w-full relative overflow-visible",exports.tooltipItemStyles="whitespace-pre-wrap break-words min-w-full w-min";
|
package/dist/index99.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r={primary:"!bg-[color-mix(in_srgb,var(--color-clickable)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-clickable)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-clickable)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-clickable)_60%,transparent)]",secondary:"!bg-[color-mix(in_srgb,var(--color-toggle)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-toggle)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-toggle)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-toggle)_60%,transparent)]",tertiary:"!bg-[color-mix(in_srgb,var(--color-popup)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-popup)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-popup)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-popup)_60%,transparent)]",quaternary:"!bg-[color-mix(in_srgb,var(--color-secondary)_20%,transparent)] !border-[color-mix(in_srgb,var(--color-secondary)_50%,transparent)] hover:!bg-[color-mix(in_srgb,var(--color-secondary)_25%,transparent)] hover:!border-[color-mix(in_srgb,var(--color-secondary)_60%,transparent)]"},o="block w-full relative overflow-visible",e="chip-group__container flex flex-nowrap gap-2 md:gap-2.5 lg:gap-2 items-center",n="inline-flex shrink-0",i="relative inline-flex items-center gap-1 cursor-pointer outline-none transition-all duration-200 rounded focus-visible:outline-2 focus-visible:outline-[var(--color-clickable)] focus-visible:outline-offset-0.5 focus-visible:rounded active:scale-[0.98] aria-[disabled=true]:cursor-not-allowed [&_.cursor-pointer]:cursor-pointer [&_[aria-disabled=true]]:cursor-not-allowed",l="absolute end-1 top-1/2 -translate-y-1/2 flex items-center justify-center w-4 h-4 p-0 border-none bg-transparent cursor-pointer rounded-full transition-colors hover:bg-[color-mix(in_srgb,currentColor_20%,transparent)] focus-visible:outline-2 focus-visible:outline-[var(--color-clickable)] focus-visible:outline-offset-1 text-current",a="relative inline-flex shrink-0 cursor-pointer",t="whitespace-pre-wrap break-words min-w-full w-min";export{e as containerStyles,i as itemButtonStyles,n as itemWrapperStyles,a as overflowButtonStyles,r as overflowChipClassMap,l as removeButtonStyles,o as rootStyles,t as tooltipItemStyles};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Border via .menu-icon-button-border-mask::before (hidden in two 45° segments).
|
|
2
2
|
* Color overlay (::after) + per-state shadows live in effects.css and key off
|
|
3
3
|
* [aria-pressed] and the optional .menu-icon-button-initials class. */
|
|
4
|
-
/**
|
|
4
|
+
/** 3.125rem on every breakpoint. Radius via --menu-icon-button-radius for mask. */
|
|
5
5
|
export declare const baseStyles: string;
|
|
6
6
|
/** Selected styling is driven entirely by [aria-pressed='true'] in effects.css. */
|
|
7
7
|
export declare const selectedStyles = "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuIconButton.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/menu-icon-button/MenuIconButton.styles.ts"],"names":[],"mappings":"AAAA;;mFAEmF;AACnF,
|
|
1
|
+
{"version":3,"file":"MenuIconButton.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/menu-icon-button/MenuIconButton.styles.ts"],"names":[],"mappings":"AAAA;;mFAEmF;AACnF,mFAAmF;AACnF,eAAO,MAAM,UAAU,QAYZ,CAAC;AAEZ,mFAAmF;AACnF,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,kDAAkD;AAClD,eAAO,MAAM,cAAc,QAOhB,CAAC;AAEZ,eAAO,MAAM,eAAe,8DAA8D,CAAC;AAC3F,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,QAKpB,CAAC;AAEZ,eAAO,MAAM,mBAAmB,8DAA8D,CAAC;AAC/F,eAAO,MAAM,sBAAsB,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CheckFilterProps } from './CheckFilter.types';
|
|
2
|
+
|
|
3
|
+
export type { CheckFilterProps, CheckFilterOption, CheckFilterMultiProps, CheckFilterSingleProps, CheckFilterCommonProps, } from './CheckFilter.types';
|
|
4
|
+
export declare function CheckFilter<V extends string = string>(props: CheckFilterProps<V>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace CheckFilter {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=CheckFilter.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckFilter.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/check-filter/CheckFilter.component.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAGV,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAS7B,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAkU7B,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAKhF;yBALe,WAAW"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const emptyStateStyles: string;
|
|
2
|
+
export declare const listStyles: string;
|
|
3
|
+
export declare const optionRowStyles: string;
|
|
4
|
+
export declare const optionRowDisabledStyles: string;
|
|
5
|
+
export declare const optionLabelStyles: string;
|
|
6
|
+
//# sourceMappingURL=CheckFilter.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckFilter.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/check-filter/CheckFilter.styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAGlB,CAAC;AAQZ,eAAO,MAAM,UAAU,QAAqD,CAAC;AAO7E,eAAO,MAAM,eAAe,QAajB,CAAC;AAEZ,eAAO,MAAM,uBAAuB,QAIzB,CAAC;AAEZ,eAAO,MAAM,iBAAiB,QAOnB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckFilterOption<V extends string = string> {
|
|
4
|
+
/** Unique value sent to `onApply` and used for selection state. */
|
|
5
|
+
value: V;
|
|
6
|
+
/**
|
|
7
|
+
* Visible label for the checkbox/radio. Strings only — for richer labels
|
|
8
|
+
* drop down to the `Filter` compound shell.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/** Optional per-option disable. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props shared by both `mode` variants of `CheckFilter`.
|
|
16
|
+
*
|
|
17
|
+
* Note: the `value` / `defaultValue` / `onApply` triple lives on the
|
|
18
|
+
* variant interfaces because their TypeScript shape differs by mode.
|
|
19
|
+
*/
|
|
20
|
+
export interface CheckFilterCommonProps<V extends string = string> {
|
|
21
|
+
/** Options to render in the list. */
|
|
22
|
+
options: ReadonlyArray<CheckFilterOption<V>>;
|
|
23
|
+
/**
|
|
24
|
+
* Render a search input above the list that filters options by label
|
|
25
|
+
* (case-insensitive substring match). Local-state only — does not change
|
|
26
|
+
* the filter's draft / committed value.
|
|
27
|
+
*/
|
|
28
|
+
searchable?: boolean;
|
|
29
|
+
/** Placeholder text for the search input (when `searchable`). */
|
|
30
|
+
searchPlaceholder?: string;
|
|
31
|
+
/** Optional title shown above the list (and search input). */
|
|
32
|
+
title?: ReactNode;
|
|
33
|
+
/** Accessible label for the trigger button. */
|
|
34
|
+
'aria-label'?: string;
|
|
35
|
+
/** Controlled popover open state. */
|
|
36
|
+
open?: boolean;
|
|
37
|
+
defaultOpen?: boolean;
|
|
38
|
+
onOpenChange?: (open: boolean) => void;
|
|
39
|
+
/** Disable the trigger entirely. */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/** Suppress the Reset button (only Apply is shown). */
|
|
42
|
+
hideReset?: boolean;
|
|
43
|
+
'data-testid'?: string;
|
|
44
|
+
'data-cy'?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Multi-select variant: value is an array, empty = `[]`. */
|
|
47
|
+
export interface CheckFilterMultiProps<V extends string = string> extends CheckFilterCommonProps<V> {
|
|
48
|
+
/** Default ('multi' may be omitted). */
|
|
49
|
+
mode?: 'multi';
|
|
50
|
+
/** Controlled committed selection. */
|
|
51
|
+
value?: ReadonlyArray<V>;
|
|
52
|
+
/** Initial committed selection (uncontrolled). */
|
|
53
|
+
defaultValue?: ReadonlyArray<V>;
|
|
54
|
+
/** Fires on Apply with the committed selection. */
|
|
55
|
+
onApply?: (value: V[]) => void;
|
|
56
|
+
}
|
|
57
|
+
/** Single-select variant: value is a single option (or `null`). */
|
|
58
|
+
export interface CheckFilterSingleProps<V extends string = string> extends CheckFilterCommonProps<V> {
|
|
59
|
+
mode: 'single';
|
|
60
|
+
/** Controlled committed selection. */
|
|
61
|
+
value?: V | null;
|
|
62
|
+
/** Initial committed selection (uncontrolled). */
|
|
63
|
+
defaultValue?: V | null;
|
|
64
|
+
/** Fires on Apply with the committed selection. */
|
|
65
|
+
onApply?: (value: V | null) => void;
|
|
66
|
+
}
|
|
67
|
+
export type CheckFilterProps<V extends string = string> = CheckFilterMultiProps<V> | CheckFilterSingleProps<V>;
|
|
68
|
+
//# sourceMappingURL=CheckFilter.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckFilter.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/check-filter/CheckFilter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC1D,mEAAmE;IACnE,KAAK,EAAE,CAAC,CAAC;IACT;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC/D,qCAAqC;IACrC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,MAAM,GAAG,MAAM,CACzB,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACzB,kDAAkD;IAClD,YAAY,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAChC,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CAChC;AAED,mEAAmE;AACnE,MAAM,WAAW,sBAAsB,CACrC,CAAC,SAAS,MAAM,GAAG,MAAM,CACzB,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACjB,kDAAkD;IAClD,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAClD,qBAAqB,CAAC,CAAC,CAAC,GACxB,sBAAsB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipGroup.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/chip-group/ChipGroup.component.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChipGroup.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/chip-group/ChipGroup.component.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAavE,eAAO,MAAM,SAAS,2GAkXrB,CAAC;AAIF,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChipGroupItem } from './ChipGroup.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Parse a CSS gap string (e.g. "8px", "0.5rem") into pixels.
|
|
5
|
+
* @param gapString - The computed `gap` value from getComputedStyle
|
|
6
|
+
* @param rootFontSize - Root font size in px (for rem)
|
|
7
|
+
* @param containerFontSize - Container font size in px (for em)
|
|
8
|
+
* @returns Gap in pixels (defaults to 0.5rem-equivalent when unparseable)
|
|
9
|
+
*/
|
|
10
|
+
export declare const parseGapValue: (gapString: string, rootFontSize: number, containerFontSize: number) => number;
|
|
11
|
+
/**
|
|
12
|
+
* Calculate how many chips can fit in the container width
|
|
13
|
+
* @param items - Array of chip items
|
|
14
|
+
* @param chipWidths - Map of chip values to their measured widths
|
|
15
|
+
* @param containerWidth - Available container width in pixels
|
|
16
|
+
* @param gap - Gap between chips in pixels
|
|
17
|
+
* @param overflowChipWidth - Width of the overflow "+N" chip in pixels
|
|
18
|
+
* @returns Number of chips that can fit (minimum 1)
|
|
19
|
+
*/
|
|
20
|
+
export declare const calculateFittingChips: (items: ChipGroupItem[], chipWidths: Map<string, number>, containerWidth: number, gap: number, overflowChipWidth: number) => number;
|
|
21
|
+
//# sourceMappingURL=ChipGroup.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChipGroup.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/chip-group/ChipGroup.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,mBAAmB,MAAM,KACxB,MAmBF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,aAAa,EAAE,EACtB,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,gBAAgB,MAAM,EACtB,KAAK,MAAM,EACX,mBAAmB,MAAM,KACxB,MA8BF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChipGroupItem } from './ChipGroup.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook to manage chip overflow calculation and state
|
|
5
|
+
* @param items - Array of chip items
|
|
6
|
+
* @param containerRef - Ref to the container element
|
|
7
|
+
* @param chipRefs - Ref to array of chip elements
|
|
8
|
+
* @param chipWidths - Ref to map of chip widths
|
|
9
|
+
* @param maxVisible - Optional fixed maximum visible chips
|
|
10
|
+
* @returns Object containing visibleCount, visibleItems, hiddenItems, and hasOverflow
|
|
11
|
+
*/
|
|
12
|
+
export declare const useChipOverflow: (items: ChipGroupItem[], containerRef: React.RefObject<HTMLDivElement | null>, chipRefs: React.MutableRefObject<(HTMLDivElement | null)[]>, chipWidths: React.MutableRefObject<Map<string, number>>, maxVisible?: number) => {
|
|
13
|
+
visibleCount: number;
|
|
14
|
+
visibleItems: ChipGroupItem[];
|
|
15
|
+
hiddenItems: ChipGroupItem[];
|
|
16
|
+
hasOverflow: boolean;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useChipOverflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChipOverflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/chip-group/useChipOverflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA+BvD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,aAAa,EAAE,EACtB,cAAc,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EACpD,UAAU,KAAK,CAAC,gBAAgB,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,EAC3D,YAAY,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACvD,aAAa,MAAM;;;;;CA8FpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateFilterProps } from './DateFilter.types';
|
|
2
|
+
|
|
3
|
+
export type { DateFilterProps, DateFilterValue } from './DateFilter.types';
|
|
4
|
+
declare function DateFilterInner({ value, defaultValue, onApply, defaultViewMonth, today: todayProp, title, presetLabels: presetLabelsProp, presets, hidePresets, footerLabels: footerLabelsProp, hideFooterInputs, formatValue, parseValue, open, defaultOpen, onOpenChange, disabled, hideReset, yearRange, 'aria-label': ariaLabel, 'data-cy': dataCy, 'data-testid': dataTestId, }: DateFilterProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace DateFilterInner {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DateFilter: typeof DateFilterInner;
|
|
9
|
+
//# sourceMappingURL=DateFilter.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateFilter.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/date-filter/DateFilter.component.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAGV,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAuD5B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA20B3E,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,KAAK,EAAE,SAAS,EAChB,KAAK,EACL,YAAY,EAAE,gBAAgB,EAC9B,OAAyB,EACzB,WAAmB,EACnB,YAAY,EAAE,gBAAgB,EAC9B,gBAAwB,EACxB,WAA4B,EAC5B,UAA2B,EAC3B,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAiB,EACjB,SAA8B,EAC9B,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,UAAU,GAC1B,EAAE,eAAe,2CAyEjB;kBAhGQ,eAAe;;;AAoGxB,eAAO,MAAM,UAAU,wBAAkB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `DateFilter` styles — composed from the same design tokens as the rest of
|
|
3
|
+
* the filter family. The popover is wider than the default filter min
|
|
4
|
+
* (`--size-2xs`) because two months sit side-by-side, so we override the
|
|
5
|
+
* `FilterContent` width to `--size-lg`. Everything else (typography,
|
|
6
|
+
* border-radius, spacing) comes straight from `var(--…)` tokens.
|
|
7
|
+
*
|
|
8
|
+
* Figma reference: `1 — SaaS / 45054:20258`.
|
|
9
|
+
*
|
|
10
|
+
* The cell sizes (40 × 40 day cells, 32 px month/year selectors, 40 px
|
|
11
|
+
* chevron buttons) come from the Figma frame. We express them via the
|
|
12
|
+
* `--spacing-*` token scale (`--spacing-10` = 2.5 rem = 40 px) rather than
|
|
13
|
+
* raw px to stay consistent with the rest of the system — the only literal
|
|
14
|
+
* px values left are 1-px borders.
|
|
15
|
+
*/
|
|
16
|
+
/** Popover content override — wider than the default to fit two months. */
|
|
17
|
+
export declare const contentStyles: string;
|
|
18
|
+
export declare const presetsRowStyles: string;
|
|
19
|
+
export declare const presetButtonStyles: string;
|
|
20
|
+
/**
|
|
21
|
+
* Active preset chip. The text color uses `--color-button-blue-pressed`
|
|
22
|
+
* (a darker brand-blue variant) so it clears WCAG AA contrast against the
|
|
23
|
+
* 8 %-tint background — the regular `--color-button-blue` fails 4.5 : 1
|
|
24
|
+
* here (~2.9 : 1).
|
|
25
|
+
*/
|
|
26
|
+
export declare const presetButtonActiveStyles: string;
|
|
27
|
+
export declare const calendarsRowStyles: string;
|
|
28
|
+
export declare const calendarColumnStyles: string;
|
|
29
|
+
export declare const calendarColumnLeftStyles: string;
|
|
30
|
+
export declare const calendarColumnRightStyles: string;
|
|
31
|
+
/** Vertical divider between the two month columns. */
|
|
32
|
+
export declare const calendarDividerStyles: string;
|
|
33
|
+
export declare const calendarHeaderStyles: string;
|
|
34
|
+
export declare const chevronButtonStyles: string;
|
|
35
|
+
export declare const headerSelectsGroupStyles: string;
|
|
36
|
+
/**
|
|
37
|
+
* Month / year picker buttons — Figma shows them as compact "search-bar"
|
|
38
|
+
* style boxes (1-px border, 8-px radius, white background). Use the
|
|
39
|
+
* design system's existing input chrome so focus rings, hover, and
|
|
40
|
+
* disabled states stay consistent with `Input`.
|
|
41
|
+
*/
|
|
42
|
+
export declare const headerSelectStyles: string;
|
|
43
|
+
export declare const headerSelectValueStyles: string;
|
|
44
|
+
export declare const headerSelectIconStyles: string;
|
|
45
|
+
export declare const weekdayRowStyles: string;
|
|
46
|
+
export declare const weekdayCellStyles: string;
|
|
47
|
+
export declare const monthGridStyles: string;
|
|
48
|
+
export declare const weekRowStyles: string;
|
|
49
|
+
/**
|
|
50
|
+
* `gridcell` wrapper around each day button. Per WAI-ARIA, the cell role
|
|
51
|
+
* belongs to a non-button container; placing `role="gridcell"` directly on
|
|
52
|
+
* the `<button>` overrides its native role and AT announces "gridcell"
|
|
53
|
+
* instead of "button". Wrapping keeps both semantics intact.
|
|
54
|
+
*/
|
|
55
|
+
export declare const dayCellWrapperStyles: string;
|
|
56
|
+
/**
|
|
57
|
+
* Footer parse-error message. Screen-reader-only — the input itself flips
|
|
58
|
+
* `aria-invalid`, so the error text is announced via `aria-describedby`
|
|
59
|
+
* but never duplicated visually (the input's red border is the visual cue).
|
|
60
|
+
*/
|
|
61
|
+
export declare const footerInputErrorMessageStyles: string;
|
|
62
|
+
/**
|
|
63
|
+
* A single day cell. Variants live in `dayCellVariants` below — the
|
|
64
|
+
* component composes them by combining the relevant flags (selected,
|
|
65
|
+
* in-range, today, outside, disabled).
|
|
66
|
+
*/
|
|
67
|
+
export declare const dayCellBaseStyles: string;
|
|
68
|
+
/**
|
|
69
|
+
* Dates from the previous / next month — light grey AND unclickable. The
|
|
70
|
+
* component sets `disabled` on the underlying `<button>`, so we override
|
|
71
|
+
* the default hover (which would otherwise still light up the cell) and
|
|
72
|
+
* the focus ring so these cells feel inert.
|
|
73
|
+
*/
|
|
74
|
+
export declare const dayCellOutsideStyles: string;
|
|
75
|
+
/** Mid-range cells (between `from` and `to`, exclusive). */
|
|
76
|
+
export declare const dayCellInRangeStyles: string;
|
|
77
|
+
/**
|
|
78
|
+
* Range endpoints (`from` or `to`). Uses `--color-button-blue-pressed`
|
|
79
|
+
* (darker brand-blue) so white glyphs at the 20 px / 400-weight day-cell
|
|
80
|
+
* size clear WCAG AA — the regular `--color-button-blue` only reaches
|
|
81
|
+
* ~3.2 : 1 against white, below the 4.5 : 1 threshold for normal text.
|
|
82
|
+
*/
|
|
83
|
+
export declare const dayCellSelectedStyles: string;
|
|
84
|
+
/**
|
|
85
|
+
* "Today" emphasis when not selected — a subtle ring so users can locate
|
|
86
|
+
* today without it visually competing with the active range.
|
|
87
|
+
*/
|
|
88
|
+
export declare const dayCellTodayStyles: string;
|
|
89
|
+
export declare const footerOverrideStyles: string;
|
|
90
|
+
export declare const footerInputsGroupStyles: string;
|
|
91
|
+
export declare const footerInputLabelStyles: string;
|
|
92
|
+
export declare const footerInputWrapperStyles: string;
|
|
93
|
+
export declare const footerInputStyles: string;
|
|
94
|
+
export declare const footerInputErrorStyles: string;
|
|
95
|
+
export declare const footerActionsStyles: string;
|
|
96
|
+
//# sourceMappingURL=DateFilter.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateFilter.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/date-filter/DateFilter.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,aAAa,QAOf,CAAC;AAMZ,eAAO,MAAM,gBAAgB,QAIlB,CAAC;AAEZ,eAAO,MAAM,kBAAkB,QAYpB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,QAI1B,CAAC;AAMZ,eAAO,MAAM,kBAAkB,QAGpB,CAAC;AAEZ,eAAO,MAAM,oBAAoB,QAKtB,CAAC;AAEZ,eAAO,MAAM,wBAAwB,QAAsC,CAAC;AAC5E,eAAO,MAAM,yBAAyB,QAAsC,CAAC;AAE7E,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,QAGvB,CAAC;AAMZ,eAAO,MAAM,oBAAoB,QAGtB,CAAC;AAEZ,eAAO,MAAM,mBAAmB,QAWrB,CAAC;AAEZ,eAAO,MAAM,wBAAwB,QAG1B,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,QAcpB,CAAC;AAEZ,eAAO,MAAM,uBAAuB,QAAyB,CAAC;AAE9D,eAAO,MAAM,sBAAsB,QAKxB,CAAC;AAMZ,eAAO,MAAM,gBAAgB,QAGlB,CAAC;AAEZ,eAAO,MAAM,iBAAiB,QAGnB,CAAC;AAEZ,eAAO,MAAM,eAAe,QAA4D,CAAC;AAEzF,eAAO,MAAM,aAAa,QAAyD,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAwD,CAAC;AAE1F;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,QAI/B,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAWnB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAItB,CAAC;AAEZ,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,QAItB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAGvB,CAAC;AAEZ;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAkE,CAAC;AAQlG,eAAO,MAAM,oBAAoB,QAOtB,CAAC;AAEZ,eAAO,MAAM,uBAAuB,QAGzB,CAAC;AAEZ,eAAO,MAAM,sBAAsB,QAGxB,CAAC;AAEZ,eAAO,MAAM,wBAAwB,QAA+B,CAAC;AAErE,eAAO,MAAM,iBAAiB,QAanB,CAAC;AAEZ,eAAO,MAAM,sBAAsB,QAIxB,CAAC;AAEZ,eAAO,MAAM,mBAAmB,QAAkE,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DateRangePreset } from './dateUtils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Value shape used by `DateFilter`. Each bound may be `null` independently
|
|
6
|
+
* — `{ from: Date, to: null }` is a valid mid-selection state, but only
|
|
7
|
+
* fully-bounded ranges should be committed via `onApply` (the calendar
|
|
8
|
+
* UI enforces this by requiring two clicks).
|
|
9
|
+
*
|
|
10
|
+
* Both `null` ↔ "no filter applied".
|
|
11
|
+
*/
|
|
12
|
+
export interface DateFilterValue {
|
|
13
|
+
from: Date | null;
|
|
14
|
+
to: Date | null;
|
|
15
|
+
}
|
|
16
|
+
/** Labels for the four header shortcut buttons (i18n hook). */
|
|
17
|
+
export interface DateFilterPresetLabels {
|
|
18
|
+
today: ReactNode;
|
|
19
|
+
lastWeek: ReactNode;
|
|
20
|
+
lastMonth: ReactNode;
|
|
21
|
+
lastYear: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/** Labels for the footer From/To fields (i18n hook). */
|
|
24
|
+
export interface DateFilterFooterLabels {
|
|
25
|
+
from: ReactNode;
|
|
26
|
+
to: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export type { DateRangePreset } from './dateUtils';
|
|
29
|
+
export interface DateFilterProps {
|
|
30
|
+
/** Controlled committed value. */
|
|
31
|
+
value?: DateFilterValue;
|
|
32
|
+
/** Initial committed value (uncontrolled). */
|
|
33
|
+
defaultValue?: DateFilterValue;
|
|
34
|
+
/** Fires on Apply. */
|
|
35
|
+
onApply?: (value: DateFilterValue) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Initial month shown on the LEFT calendar (the RIGHT is always
|
|
38
|
+
* `leftMonth + 1`). Defaults to `today` (or `from`/`to` if set). The
|
|
39
|
+
* `Date`'s day-of-month is ignored — only year + month matter.
|
|
40
|
+
*/
|
|
41
|
+
defaultViewMonth?: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Override "today" for deterministic rendering (tests, Storybook, SSR).
|
|
44
|
+
* Defaults to `new Date()`. The shortcut presets and the highlighted
|
|
45
|
+
* "today" cell both honor this.
|
|
46
|
+
*/
|
|
47
|
+
today?: Date;
|
|
48
|
+
/** Optional title shown above the calendar grid. */
|
|
49
|
+
title?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Override the four shortcut button labels — handy for translation.
|
|
52
|
+
* Pass `null` to hide a specific preset entirely.
|
|
53
|
+
*/
|
|
54
|
+
presetLabels?: Partial<DateFilterPresetLabels>;
|
|
55
|
+
/**
|
|
56
|
+
* Hide the shortcut button row entirely. Defaults to `false` (shown).
|
|
57
|
+
*/
|
|
58
|
+
hidePresets?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Set of presets to include (in order). Defaults to all four. Pass an
|
|
61
|
+
* empty array to render an empty shortcut row, or `[]` + `hidePresets`
|
|
62
|
+
* to skip the row.
|
|
63
|
+
*/
|
|
64
|
+
presets?: DateRangePreset[];
|
|
65
|
+
/** Footer From/To label overrides. */
|
|
66
|
+
footerLabels?: Partial<DateFilterFooterLabels>;
|
|
67
|
+
/**
|
|
68
|
+
* Hide the editable From/To inputs in the footer. Defaults to `false`.
|
|
69
|
+
* When hidden, only the Reset + Apply buttons remain in the footer.
|
|
70
|
+
*/
|
|
71
|
+
hideFooterInputs?: boolean;
|
|
72
|
+
/** Format function for the From/To input display string. Defaults to "1 June 2026". */
|
|
73
|
+
formatValue?: (date: Date) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Parse the user's typed string back into a `Date`. Should return
|
|
76
|
+
* `null` for unparseable text. Defaults to a lenient parser that
|
|
77
|
+
* accepts `"1 June 2026"`, `"1 Jun 2026"`, `"1/6/2026"`, and
|
|
78
|
+
* `"2026-06-01"`.
|
|
79
|
+
*/
|
|
80
|
+
parseValue?: (input: string) => Date | null;
|
|
81
|
+
/** Accessible label for the trigger button. */
|
|
82
|
+
'aria-label'?: string;
|
|
83
|
+
/** Controlled popover open state. */
|
|
84
|
+
open?: boolean;
|
|
85
|
+
defaultOpen?: boolean;
|
|
86
|
+
onOpenChange?: (open: boolean) => void;
|
|
87
|
+
/** Disable the trigger entirely. */
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
/** Suppress the Reset button. Defaults to `false`. */
|
|
90
|
+
hideReset?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Half-window (in years) around the currently viewed year that the
|
|
93
|
+
* month/year dropdowns expose for quick navigation. The dropdown lists
|
|
94
|
+
* `[viewYear - yearRange, viewYear + yearRange]` inclusive — e.g. the
|
|
95
|
+
* default `10` gives a 21-year window, which is tight for birthdays.
|
|
96
|
+
* Bump it for date-of-birth pickers (e.g. `100`).
|
|
97
|
+
*/
|
|
98
|
+
yearRange?: number;
|
|
99
|
+
'data-cy'?: string;
|
|
100
|
+
'data-testid'?: string;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=DateFilter.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateFilter.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/date-filter/DateFilter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC;CACjB;AAED,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wDAAwD;AACxD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,EAAE,SAAS,CAAC;CACf;AAED,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,sBAAsB;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAE3C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IAEb,oDAAoD;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE/C;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B,sCAAsC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE/C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,uFAAuF;IACvF,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAErC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IAE5C,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date utilities for the `DateFilter`.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is *local-time* arithmetic — the filter is a UI for picking
|
|
5
|
+
* calendar days (no time-of-day), so we normalize to midnight and never call
|
|
6
|
+
* `toISOString()` or other UTC-coerced APIs. Two `Date` objects represent
|
|
7
|
+
* the same calendar day iff `.getFullYear() / .getMonth() / .getDate()`
|
|
8
|
+
* match.
|
|
9
|
+
*
|
|
10
|
+
* The functions are kept side-effect free and return *new* `Date` instances —
|
|
11
|
+
* never mutate the input.
|
|
12
|
+
*/
|
|
13
|
+
/** Sunday-based weekday short names — matches the Figma reference order. */
|
|
14
|
+
export declare const WEEKDAY_SHORT: readonly ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
15
|
+
export declare const MONTHS_SHORT: readonly string[];
|
|
16
|
+
export declare const MONTHS_LONG: readonly string[];
|
|
17
|
+
/** Strip the time component, returning midnight of the same local day. */
|
|
18
|
+
export declare function startOfDay(date: Date): Date;
|
|
19
|
+
/** First day of the month containing `date` (00:00 local). */
|
|
20
|
+
export declare function startOfMonth(date: Date): Date;
|
|
21
|
+
/** Last day of the month containing `date` (00:00 local). */
|
|
22
|
+
export declare function endOfMonth(date: Date): Date;
|
|
23
|
+
/**
|
|
24
|
+
* Add `n` months while preserving the day-of-month, clamping to the last
|
|
25
|
+
* day of the target month when the source day doesn't exist there (e.g.
|
|
26
|
+
* Jan 31 + 1 month → Feb 28/29 rather than spilling into March).
|
|
27
|
+
*/
|
|
28
|
+
export declare function addMonths(date: Date, n: number): Date;
|
|
29
|
+
/**
|
|
30
|
+
* Add `n` years, preserving month + day-of-month. Feb 29 in a leap year
|
|
31
|
+
* clamps to Feb 28 when the target year isn't a leap year.
|
|
32
|
+
*/
|
|
33
|
+
export declare function addYears(date: Date, n: number): Date;
|
|
34
|
+
/** Add `n` days, preserving the time-of-day (typically 00:00 from `startOfDay`). */
|
|
35
|
+
export declare function addDays(date: Date, n: number): Date;
|
|
36
|
+
/** Same calendar day in local time. */
|
|
37
|
+
export declare function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
38
|
+
/** Same calendar month + year in local time. */
|
|
39
|
+
export declare function isSameMonth(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
40
|
+
/** -1 if `a` is earlier, 1 if later, 0 if same day. */
|
|
41
|
+
export declare function compareDay(a: Date, b: Date): number;
|
|
42
|
+
/** Inclusive `from <= date <= to`. Either bound may be `null`. */
|
|
43
|
+
export declare function isInRange(date: Date, from: Date | null, to: Date | null): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Build the Sunday-aligned 7-col grid of `Date` cells for the month
|
|
46
|
+
* containing `viewMonth`. Each cell is a real `Date`; cells that fall
|
|
47
|
+
* outside the focused month are tagged so the renderer can grey them
|
|
48
|
+
* out *and* make them unclickable.
|
|
49
|
+
*
|
|
50
|
+
* Row count is the **minimum** needed to cover every in-month day. A
|
|
51
|
+
* Sunday-starting February (28 days) needs 4 rows, most months need 5,
|
|
52
|
+
* and only the worst case (a 31-day month that begins on Saturday) needs
|
|
53
|
+
* 6. We intentionally do NOT pad to a fixed 6 rows — the design (and
|
|
54
|
+
* Figma reference) crops trailing all-next-month rows.
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildMonthGrid(viewMonth: Date): {
|
|
57
|
+
date: Date;
|
|
58
|
+
outside: boolean;
|
|
59
|
+
}[];
|
|
60
|
+
/**
|
|
61
|
+
* Format a `Date` as `"1 June 2026"`. This is the literal format shown in
|
|
62
|
+
* the Figma footer; using `toLocaleDateString` here would silently change
|
|
63
|
+
* the wording when the host's locale differs.
|
|
64
|
+
*/
|
|
65
|
+
export declare function formatDateLong(date: Date): string;
|
|
66
|
+
/**
|
|
67
|
+
* Parse the inverse of `formatDateLong`. Accepts a few user-friendly
|
|
68
|
+
* variants — `"1 June 2026"`, `"1 Jun 2026"`, `"1/6/2026"`,
|
|
69
|
+
* `"2026-06-01"` — and returns `null` if it can't make sense of the input.
|
|
70
|
+
*
|
|
71
|
+
* Returning `null` (rather than throwing) keeps callers' onChange paths
|
|
72
|
+
* simple: keep the existing draft and ignore unparseable text.
|
|
73
|
+
*/
|
|
74
|
+
export declare function parseDateInput(input: string): Date | null;
|
|
75
|
+
/**
|
|
76
|
+
* Value-equality for two `DateFilterValue`s. Plain JSON comparison would
|
|
77
|
+
* stringify `Date` objects via `toISOString`, which is *almost* right, but
|
|
78
|
+
* we want `null === null` to be `true` without serializing — and we want
|
|
79
|
+
* to defend against accidental TZ drift, so we explicitly compare local
|
|
80
|
+
* calendar days.
|
|
81
|
+
*/
|
|
82
|
+
export declare function dateRangeEquals(a: {
|
|
83
|
+
from: Date | null;
|
|
84
|
+
to: Date | null;
|
|
85
|
+
}, b: {
|
|
86
|
+
from: Date | null;
|
|
87
|
+
to: Date | null;
|
|
88
|
+
}): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Range presets used by the header shortcut buttons. Each preset returns
|
|
91
|
+
* a `[from, to]` pair anchored on `today` (defaults to *now*). The product
|
|
92
|
+
* convention is "last N days inclusive" — e.g. "Last Week" = the last 7
|
|
93
|
+
* days, where today is the 7th — so the trigger pill reads as "X – today".
|
|
94
|
+
*/
|
|
95
|
+
export type DateRangePreset = 'today' | 'last-week' | 'last-month' | 'last-year';
|
|
96
|
+
export declare function getPresetRange(preset: DateRangePreset, today?: Date): {
|
|
97
|
+
from: Date;
|
|
98
|
+
to: Date;
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=dateUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/date-filter/dateUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgCH,4EAA4E;AAC5E,eAAO,MAAM,aAAa,qDAAsD,CAAC;AAEjF,eAAO,MAAM,YAAY,mBAAkC,CAAC;AAC5D,eAAO,MAAM,WAAW,mBAAiC,CAAC;AAE1D,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE3C;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE7C;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAMrD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAKpD;AAED,oFAAoF;AACpF,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAInD;AAED,uCAAuC;AACvC,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOzF;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG3F;AAED,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAInD;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAIjF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,IAAI,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,EAAE,CAelF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CA+CzD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,CAAC,EAAE;IAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,EAAE,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,EACzC,CAAC,EAAE;IAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,EAAE,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,GACxC,OAAO,CAOT;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;AAEjF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,eAAe,EACvB,KAAK,GAAE,IAAiB,GACvB;IACD,IAAI,EAAE,IAAI,CAAC;IACX,EAAE,EAAE,IAAI,CAAC;CACV,CAgBA"}
|