@alto-avios/alto-ui 5.1.2 → 5.2.0

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.
Files changed (140) hide show
  1. package/dist/CalendarDate-uEuHKGse.js +2 -0
  2. package/dist/CalendarDate-uEuHKGse.js.map +1 -0
  3. package/dist/{DateField-oLDKE7Lh.js → DateField-rBq9QuR6.js} +4 -4
  4. package/dist/DateField-rBq9QuR6.js.map +1 -0
  5. package/dist/DatePicker.module-DlLCFGCM.js +2 -0
  6. package/dist/DatePicker.module-DlLCFGCM.js.map +1 -0
  7. package/dist/assets/Accordion.css +1 -1
  8. package/dist/assets/AviosCurrency.css +1 -1
  9. package/dist/assets/AviosCurrencyBadge.css +1 -1
  10. package/dist/assets/AviosCurrencySymbol.css +1 -1
  11. package/dist/assets/Badge.css +1 -1
  12. package/dist/assets/Button.css +1 -1
  13. package/dist/assets/CalloutBanner.css +1 -1
  14. package/dist/assets/Checkbox.css +1 -1
  15. package/dist/assets/ClearFieldButton.css +1 -1
  16. package/dist/assets/Dialog.css +1 -1
  17. package/dist/assets/ErrorSummary.css +1 -1
  18. package/dist/assets/Link.css +1 -1
  19. package/dist/assets/Radio.css +1 -1
  20. package/dist/assets/SelectCard.css +1 -1
  21. package/dist/assets/Tag.css +1 -1
  22. package/dist/components/Accordion/Accordion.js +12 -12
  23. package/dist/components/Accordion/Accordion.js.map +1 -1
  24. package/dist/components/AviosBadge/AviosBadge.js.map +1 -1
  25. package/dist/components/AviosCurrency/AviosCurrency.js +4 -4
  26. package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -1
  27. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js +2 -2
  28. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js.map +1 -1
  29. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +6 -6
  30. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js.map +1 -1
  31. package/dist/components/Badge/Badge.js +2 -2
  32. package/dist/components/Badge/Badge.js.map +1 -1
  33. package/dist/components/Box/Box.js +2 -2
  34. package/dist/components/Button/Button.d.ts +12 -83
  35. package/dist/components/Button/Button.js +3 -3
  36. package/dist/components/Button/Button.js.map +1 -1
  37. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  38. package/dist/components/Calendar/Calendar.js +1 -1
  39. package/dist/components/CalendarRange/CalendarRange.js +1 -1
  40. package/dist/components/CalendarRange/CalendarRange.js.map +1 -1
  41. package/dist/components/CalloutBanner/CalloutBanner.js +9 -9
  42. package/dist/components/CardSection/CardSection.js +1 -1
  43. package/dist/components/Carousel/Carousel.js +4 -4
  44. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  45. package/dist/components/Checkbox/Checkbox.js +5 -5
  46. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  47. package/dist/components/ClearFieldButton/ClearFieldButton.js +2 -1
  48. package/dist/components/ClearFieldButton/ClearFieldButton.js.map +1 -1
  49. package/dist/components/CreditCardNumberField/CreditCardNumberField.js +1 -1
  50. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +1 -1
  51. package/dist/components/Currency/Currency.js +1 -1
  52. package/dist/components/DateField/DateField.d.ts +5 -1
  53. package/dist/components/DateField/DateField.js +1 -1
  54. package/dist/components/DateField/index.js +1 -1
  55. package/dist/components/DatePicker/DatePicker.js +3 -3
  56. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  57. package/dist/components/DateRangePicker/DateRangePicker.js +3 -3
  58. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  59. package/dist/components/Dialog/Dialog.js +5 -5
  60. package/dist/components/ErrorSummary/ErrorSummary.js +2 -2
  61. package/dist/components/Eyebrow/Eyebrow.js +1 -1
  62. package/dist/components/Form/Form.js +1 -1
  63. package/dist/components/Grid/Grid.d.ts +3 -3
  64. package/dist/components/Grid/Grid.js.map +1 -1
  65. package/dist/components/Heading/Heading.js +2 -2
  66. package/dist/components/Icon/Icon.js +1 -1
  67. package/dist/components/IconBackdrop/IconBackdrop.js +1 -1
  68. package/dist/components/IconButton/IconButton.js +1 -1
  69. package/dist/components/IconButton/IconButton.js.map +1 -1
  70. package/dist/components/Image/Image.js +1 -1
  71. package/dist/components/Label/Label.js +1 -1
  72. package/dist/components/Link/Link.d.ts +7 -2
  73. package/dist/components/Link/Link.js +3 -3
  74. package/dist/components/Link/Link.js.map +1 -1
  75. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
  76. package/dist/components/Menu/Menu.d.ts +8 -36
  77. package/dist/components/Menu/Menu.js +1 -1
  78. package/dist/components/Menu/Menu.js.map +1 -1
  79. package/dist/components/NumberField/NumberField.js +2 -2
  80. package/dist/components/NumberField/NumberField.js.map +1 -1
  81. package/dist/components/Paragraph/Paragraph.js +1 -1
  82. package/dist/components/PasswordField/PasswordField.js +1 -1
  83. package/dist/components/PhoneNumberField/PhoneNumberField.js +1 -1
  84. package/dist/components/Radio/Radio.js +1 -1
  85. package/dist/components/Section/Section.js +1 -1
  86. package/dist/components/SelectCard/SelectCard.js +5 -5
  87. package/dist/components/Spacer/Spacer.js +1 -1
  88. package/dist/components/SubHeading/SubHeading.js +1 -1
  89. package/dist/components/Tabs/TabList.js +1 -1
  90. package/dist/components/Tabs/Tabs.js +1 -1
  91. package/dist/components/Tag/Tag.js +2 -2
  92. package/dist/components/ToggleButton/ToggleButton.js +1 -1
  93. package/dist/components/ToggleIconButton/ToggleIconButton.js +1 -1
  94. package/dist/components/_base/Calendar/Calendar.js +1 -1
  95. package/dist/components/_base/Input/Input.js +1 -1
  96. package/dist/components/index.js +1 -1
  97. package/dist/{flex-D0sfBoFP.js → flex-BJOhaXnU.js} +2 -2
  98. package/dist/{flex-D0sfBoFP.js.map → flex-BJOhaXnU.js.map} +1 -1
  99. package/dist/index-CCUt_dAN.js +2 -0
  100. package/dist/{index-DiYWUa65.js.map → index-CCUt_dAN.js.map} +1 -1
  101. package/dist/index.js +1 -1
  102. package/dist/{input-DoPyN5PO.js → input-Ct1NB1lu.js} +2 -2
  103. package/dist/{input-DoPyN5PO.js.map → input-Ct1NB1lu.js.map} +1 -1
  104. package/dist/{padding-BPweMQaC.js → padding-nClUzhWp.js} +2 -2
  105. package/dist/{padding-BPweMQaC.js.map → padding-nClUzhWp.js.map} +1 -1
  106. package/dist/react-number-format.es-kdABQClE.js +2 -0
  107. package/dist/react-number-format.es-kdABQClE.js.map +1 -0
  108. package/dist/useCalendarState-BKam8aTi.js +2 -0
  109. package/dist/useCalendarState-BKam8aTi.js.map +1 -0
  110. package/dist/useControlledState-CLJIwghQ.js +2 -0
  111. package/dist/useControlledState-CLJIwghQ.js.map +1 -0
  112. package/dist/useGlobalListeners-CGYK0FZ8.js +2 -0
  113. package/dist/useGlobalListeners-CGYK0FZ8.js.map +1 -0
  114. package/dist/utils/backgroundColor/backgroundColor.js +1 -1
  115. package/dist/utils/border/border.js +1 -1
  116. package/dist/utils/date/date.js +1 -1
  117. package/dist/utils/flex/flex.js +1 -1
  118. package/dist/utils/focus/focusStyles.js +1 -1
  119. package/dist/utils/foregroundColour/foregroundColor.js +1 -1
  120. package/dist/utils/forms/field.js +1 -1
  121. package/dist/utils/forms/input/input.js +1 -1
  122. package/dist/utils/padding/padding.js +1 -1
  123. package/dist/utils/position/position.js +1 -1
  124. package/dist/utils/stories/DraggableContainer.js +2 -2
  125. package/dist/utils/stories/DraggableContainer.js.map +1 -1
  126. package/package.json +10 -5
  127. package/dist/CalendarDate-B7n_TjYa.js +0 -2
  128. package/dist/CalendarDate-B7n_TjYa.js.map +0 -1
  129. package/dist/DateField-oLDKE7Lh.js.map +0 -1
  130. package/dist/DatePicker.module-CGXPuf59.js +0 -2
  131. package/dist/DatePicker.module-CGXPuf59.js.map +0 -1
  132. package/dist/index-DiYWUa65.js +0 -2
  133. package/dist/react-number-format.es-7RDg5nwN.js +0 -2
  134. package/dist/react-number-format.es-7RDg5nwN.js.map +0 -1
  135. package/dist/useCalendarState-C9LlCwg-.js +0 -2
  136. package/dist/useCalendarState-C9LlCwg-.js.map +0 -1
  137. package/dist/useControlledState-DCczKDCM.js +0 -2
  138. package/dist/useControlledState-DCczKDCM.js.map +0 -1
  139. package/dist/useFormValidationState-CqKt4CQY.js +0 -2
  140. package/dist/useFormValidationState-CqKt4CQY.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useState as t,useMemo as r,useRef as l}from"react";import{useDateRangePicker as n}from"@react-aria/datepicker";import{DateField as i}from"react-aria-components";import{CalendarRange as o}from"../CalendarRange/CalendarRange.js";import{Popover as d}from"../Popover/Popover.js";import{IconButton as s}from"../IconButton/IconButton.js";import{d as u,D as m}from"../../DateField-oLDKE7Lh.js";import{DatePickerContext as c}from"../DatePicker/DatePickerContext.js";import{Paragraph as v}from"../Paragraph/Paragraph.js";import{parseDateValue as p}from"../../utils/date/date.js";import{$ as f,a as h,f as g,c as y,d as C,e as P}from"../../DatePicker.module-CGXPuf59.js";import{Field as V}from"../_base/Field/Field.js";import{b as D,h as b}from"../../CalendarDate-B7n_TjYa.js";import{f as T}from"../../useCalendarState-C9LlCwg-.js";import{$ as Z}from"../../useFormValidationState-CqKt4CQY.js";import{$ as I}from"../../useControlledState-DCczKDCM.js";function j(e){return null!=(null==e?void 0:e.start)&&null!=e.end}const F=F=>{const S={...F,defaultValue:(()=>{if(F?.defaultValue&&F.defaultValue?.start&&F.defaultValue?.end)return{start:p(F.defaultValue.start),end:p(F.defaultValue.end)}})(),value:(()=>{if(F?.value&&F.value?.start&&F.value?.end)return{start:p(F.value.start),end:p(F.value.end)}})(),onChange:e=>{if(!F.onChange||!e?.start||!e?.end)return;const a={start:e.start.toDate("UTC").toISOString(),end:e.end.toDate("UTC").toISOString()};return F.onChange(a)},minValue:p(F?.minValue),maxValue:p(F?.maxValue),isDateUnavailable:e=>!!F?.isDateUnavailable&&F.isDateUnavailable(e.toDate("UTC").toISOString())},R=function(e){var a,l;let n=f(e),[i,o]=I(e.value,e.defaultValue||null,e.onChange),[d]=t(i),[s,u]=t(()=>i||{start:null,end:null});null==i&&s.start&&s.end&&(s={start:null,end:null},u(s));let m=i||s,c=e=>{m=e||{start:null,end:null},u(m),j(m)?o(m):o(null)},v=(null==m?void 0:m.start)||(null==m?void 0:m.end)||e.placeholderValue||null,[p,P]=h(v,e.granularity),V="hour"===p||"minute"===p||"second"===p;var F;let S=null===(F=e.shouldCloseOnSelect)||void 0===F||F,[R,k]=t(null),[x,O]=t(null);m&&j(m)&&(R=m,"hour"in m.start&&(x=m));let N=(e,a)=>{c({start:"timeZone"in a.start?a.start.set(D(e.start)):b(e.start,a.start),end:"timeZone"in a.end?a.end.set(D(e.end)):b(e.end,a.end)}),k(null),O(null),H.commitValidation()},U=a=>{let t="function"==typeof S?S():S;V?j(a)&&(t||(null==x?void 0:x.start)&&(null==x?void 0:x.end))?N(a,{start:(null==x?void 0:x.start)||C(e.placeholderValue),end:(null==x?void 0:x.end)||C(e.placeholderValue)}):k(a):j(a)?(c(a),H.commitValidation()):k(a),t&&n.setOpen(!1)},_=e=>{j(R)&&j(e)?N(R,e):O(e)},w="gregory"===(null==m||null===(a=m.start)||void 0===a?void 0:a.calendar.identifier)&&"BC"===m.start.era||"gregory"===(null==m||null===(l=m.end)||void 0===l?void 0:l.calendar.identifier)&&"BC"===m.end.era,B=r(()=>({granularity:p,timeZone:P,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[p,e.hourCycle,e.shouldForceLeadingZeros,P,e.hideTimeZone,w]),{minValue:L,maxValue:$,isDateUnavailable:E}=e,q=r(()=>g(m,L,$,E,B),[m,L,$,E,B]),H=Z({...e,value:i,name:r(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:q}),M=H.displayValidation.isInvalid,W=e.validationState||(M?"invalid":null);var z;return{...H,value:m,defaultValue:null!==(z=e.defaultValue)&&void 0!==z?z:d,setValue:c,dateRange:R,timeRange:x,granularity:p,hasTime:V,setDate(e,a){var t,r;U("start"===e?{start:a,end:null!==(t=null==R?void 0:R.end)&&void 0!==t?t:null}:{start:null!==(r=null==R?void 0:R.start)&&void 0!==r?r:null,end:a})},setTime(e,a){var t,r;_("start"===e?{start:a,end:null!==(t=null==x?void 0:x.end)&&void 0!==t?t:null}:{start:null!==(r=null==x?void 0:x.start)&&void 0!==r?r:null,end:a})},setDateTime(e,a){var t,r;c("start"===e?{start:a,end:null!==(t=null==m?void 0:m.end)&&void 0!==t?t:null}:{start:null!==(r=null==m?void 0:m.start)&&void 0!==r?r:null,end:a})},setDateRange:U,setTimeRange:_,...n,setOpen(a){a||(null==m?void 0:m.start)&&(null==m?void 0:m.end)||!j(R)||!V||N(R,{start:(null==x?void 0:x.start)||C(e.placeholderValue),end:(null==x?void 0:x.end)||C(e.placeholderValue)}),n.setOpen(a)},validationState:W,isInvalid:M,formatValue(a,t){if(!m||!m.start||!m.end)return null;let r,l="timeZone"in m.start?m.start.timeZone:void 0,n=e.granularity||(m.start&&"minute"in m.start?"minute":"day"),i="timeZone"in m.end?m.end.timeZone:void 0,o=e.granularity||(m.end&&"minute"in m.end?"minute":"day"),d=y(t,{granularity:n,timeZone:l,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===m.start.calendar.identifier&&"BC"===m.start.era||"gregory"===m.end.calendar.identifier&&"BC"===m.end.era}),s=m.start.toDate(l||"UTC"),u=m.end.toDate(i||"UTC"),c=new T(a,d);if(l===i&&n===o&&0!==m.start.compare(m.end)){try{let e=c.formatRangeToParts(s,u),a=-1;for(let l=0;l<e.length;l++){let t=e[l];if("shared"===t.source&&"literal"===t.type)a=l;else if("endRange"===t.source)break}let t="",r="";for(let l=0;l<e.length;l++)l<a?t+=e[l].value:l>a&&(r+=e[l].value);return{start:t,end:r}}catch{}r=c}else{let l=y(t,{granularity:o,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});r=new T(a,l)}return{start:c.format(s),end:r.format(u)}},getDateFormatter(e,a){let t={...B,...a},r=y({},t);return new T(e,r)}}}(S),k=l(null),x=n(S,R,k),O={granularity:"day",hideTimeZone:!0},N={...F.startDateFieldProps,...x.startFieldProps,...O},U={...F.endDateFieldProps,...x.endFieldProps,...O},{"aria-labelledby":_,...w}=x.groupProps,B={...x.buttonProps,isInvalid:R.isInvalid,styleVariant:R.isInvalid?"critical":R.isOpen?"accent":"neutral",onClick:()=>R.isOpen?R.close():R.open()},L={...F.calendarProps,...x.calendarProps};/* @__PURE__ */
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useState as t,useMemo as r,useRef as n}from"react";import{useDateRangePicker as l}from"@react-aria/datepicker";import{DateField as i}from"react-aria-components";import{CalendarRange as s}from"../CalendarRange/CalendarRange.js";import{Popover as o}from"../Popover/Popover.js";import{IconButton as d}from"../IconButton/IconButton.js";import{d as u,D as m}from"../../DateField-rBq9QuR6.js";import{DatePickerContext as c}from"../DatePicker/DatePickerContext.js";import{Paragraph as p}from"../Paragraph/Paragraph.js";import{parseDateValue as f}from"../../utils/date/date.js";import{$ as h,a as g,f as v,c as y,d as C,e as P}from"../../DatePicker.module-DlLCFGCM.js";import{Field as V}from"../_base/Field/Field.js";import{$ as D,a as b}from"../../useControlledState-CLJIwghQ.js";import{b as T,h as Z}from"../../CalendarDate-uEuHKGse.js";import{g as I}from"../../useCalendarState-BKam8aTi.js";function j(e){return null!=e?.start&&null!=e.end}const F=F=>{const R={...F,defaultValue:(()=>{if(F?.defaultValue&&F.defaultValue?.start&&F.defaultValue?.end)return{start:f(F.defaultValue.start),end:f(F.defaultValue.end)}})(),value:(()=>{if(F?.value&&F.value?.start&&F.value?.end)return{start:f(F.value.start),end:f(F.value.end)}})(),onChange:e=>{if(!F.onChange||!e?.start||!e?.end)return;const a={start:e.start.toDate("UTC").toISOString(),end:e.end.toDate("UTC").toISOString()};return F.onChange(a)},minValue:f(F?.minValue),maxValue:f(F?.maxValue),isDateUnavailable:e=>!!F?.isDateUnavailable&&F.isDateUnavailable(e.toDate("UTC").toISOString())},S=function(e){let a=h(e),[n,l]=D(e.value,e.defaultValue||null,e.onChange),[i]=t(n),[s,o]=t(()=>n||{start:null,end:null});null==n&&s.start&&s.end&&(s={start:null,end:null},o(s));let d=n||s,u=e=>{d=e||{start:null,end:null},o(d),j(d)?l(d):l(null)},m=d?.start||d?.end||e.placeholderValue||null,[c,p]=g(m,e.granularity),f="hour"===c||"minute"===c||"second"===c,P=e.shouldCloseOnSelect??!0,[V,F]=t(null),[R,S]=t(null);d&&j(d)&&(V=d,"hour"in d.start&&(R=d));let k=(e,a)=>{u({start:"timeZone"in a.start?a.start.set(T(e.start)):Z(e.start,a.start),end:"timeZone"in a.end?a.end.set(T(e.end)):Z(e.end,a.end)}),F(null),S(null),$.commitValidation()},x=t=>{let r="function"==typeof P?P():P;f?j(t)&&(r||R?.start&&R?.end)?k(t,{start:R?.start||C(e.placeholderValue),end:R?.end||C(e.placeholderValue)}):F(t):j(t)?(u(t),$.commitValidation()):F(t),r&&a.setOpen(!1)},O=e=>{j(V)&&j(e)?k(V,e):S(e)},N="gregory"===d?.start?.calendar.identifier&&"BC"===d.start.era||"gregory"===d?.end?.calendar.identifier&&"BC"===d.end.era,U=r(()=>({granularity:c,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:N}),[c,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,N]),{minValue:_,maxValue:w,isDateUnavailable:B}=e,L=r(()=>v(d,_,w,B,U),[d,_,w,B,U]),$=b({...e,value:n,name:r(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:L}),E=$.displayValidation.isInvalid,q=e.validationState||(E?"invalid":null);return{...$,value:d,defaultValue:e.defaultValue??i,setValue:u,dateRange:V,timeRange:R,granularity:c,hasTime:f,setDate(e,a){x("start"===e?{start:a,end:V?.end??null}:{start:V?.start??null,end:a})},setTime(e,a){O("start"===e?{start:a,end:R?.end??null}:{start:R?.start??null,end:a})},setDateTime(e,a){u("start"===e?{start:a,end:d?.end??null}:{start:d?.start??null,end:a})},setDateRange:x,setTimeRange:O,...a,setOpen(t){t||d?.start&&d?.end||!j(V)||!f||k(V,{start:R?.start||C(e.placeholderValue),end:R?.end||C(e.placeholderValue)}),a.setOpen(t)},validationState:q,isInvalid:E,formatValue(a,t){if(!d||!d.start||!d.end)return null;let r,n="timeZone"in d.start?d.start.timeZone:void 0,l=e.granularity||(d.start&&"minute"in d.start?"minute":"day"),i="timeZone"in d.end?d.end.timeZone:void 0,s=e.granularity||(d.end&&"minute"in d.end?"minute":"day"),o=y(t,{granularity:l,timeZone:n,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===d.start.calendar.identifier&&"BC"===d.start.era||"gregory"===d.end.calendar.identifier&&"BC"===d.end.era}),u=d.start.toDate(n||"UTC"),m=d.end.toDate(i||"UTC"),c=new I(a,o);if(n===i&&l===s&&0!==d.start.compare(d.end)){try{let e=c.formatRangeToParts(u,m),a=-1;for(let n=0;n<e.length;n++){let t=e[n];if("shared"===t.source&&"literal"===t.type)a=n;else if("endRange"===t.source)break}let t="",r="";for(let n=0;n<e.length;n++)n<a?t+=e[n].value:n>a&&(r+=e[n].value);return{start:t,end:r}}catch{}r=c}else{let n=y(t,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});r=new I(a,n)}return{start:c.format(u),end:r.format(m)}},getDateFormatter(e,a){let t={...U,...a},r=y({},t);return new I(e,r)}}}(R),k=n(null),x=l(R,S,k),O={granularity:"day",hideTimeZone:!0},N={...F.startDateFieldProps,...x.startFieldProps,...O},U={...F.endDateFieldProps,...x.endFieldProps,...O},{"aria-labelledby":_,...w}=x.groupProps,B={...x.buttonProps,isInvalid:S.isInvalid,styleVariant:S.isInvalid?"critical":S.isOpen?"accent":"neutral",onClick:()=>S.isOpen?S.close():S.open()},L={...F.calendarProps,...x.calendarProps};/* @__PURE__ */
2
2
  return e("div",{className:P.datePicker,ref:k,children:/* @__PURE__ */e(V,{className:P.datePicker__field,as:i,label:F.label,description:F.description,errorMessage:F.errorMessage,isDisabled:F.isDisabled,isRequired:F.isRequired,isInvalid:x.isInvalid,columns:F.columns,maxWidthByChars:F.maxWidthByChars,errorPlacement:F.errorPlacement,optionalTranslation:F.optionalTranslation,errorId:F.errorId,errorPrefix:F.errorPrefix,visuallyHiddenLabel:F.visuallyHiddenLabel,children:/* @__PURE__ */a(c.Provider,{value:{isInDateRangePicker:!0},children:[
3
3
  /* @__PURE__ */a("div",{...w,className:`${u.dateInput__wrapper} ${u["dateInput__wrapper--has-background"]}`,children:[
4
4
  /* @__PURE__ */e(m,{...N}),
5
- /* @__PURE__ */e(v,{foregroundColor:F.isDisabled?"disabledPrimary":"secondary",children:"–"}),
6
- /* @__PURE__ */e(m,{...U,children:/* @__PURE__ */e(m.EndSlot,{children:/* @__PURE__ */e(s,{...B,size:"sm",emphasis:"tertiary",iconProps:{iconName:"calendar-days",iconPrefix:"fas"}})})})]}),R.isOpen&&/* @__PURE__ */e(d,{state:R,triggerRef:k,placement:"bottom start",hasArrow:!1,shouldFlip:!0,children:/* @__PURE__ */e("div",{role:"dialog",className:P.datePicker__dialog,...x.dialogProps,children:/* @__PURE__ */e(o,{...L})})})]})})})};export{F as DateRangePicker,F as default};
5
+ /* @__PURE__ */e(p,{foregroundColor:F.isDisabled?"disabledPrimary":"secondary",children:"–"}),
6
+ /* @__PURE__ */e(m,{...U,children:/* @__PURE__ */e(m.EndSlot,{children:/* @__PURE__ */e(d,{...B,size:"sm",emphasis:"tertiary",iconProps:{iconName:"calendar-days",iconPrefix:"fas"}})})})]}),S.isOpen&&/* @__PURE__ */e(o,{state:S,triggerRef:k,placement:"bottom start",hasArrow:!1,shouldFlip:!0,children:/* @__PURE__ */e("div",{role:"dialog",className:P.datePicker__dialog,...x.dialogProps,children:/* @__PURE__ */e(s,{...L})})})]})})})};export{F as DateRangePicker,F as default};
7
7
  //# sourceMappingURL=DateRangePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.js","sources":["../../../node_modules/@react-stately/datepicker/dist/useDateRangePickerState.mjs","../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import {getFormatOptions as $35a22f14a1f04b11$export$7e319ea407e63bc0, getPlaceholderTime as $35a22f14a1f04b11$export$c5221a78ef73c5e9, getRangeValidationResult as $35a22f14a1f04b11$export$80ff8fc0ae339c13, useDefaultProps as $35a22f14a1f04b11$export$2440da353cedad43} from \"./utils.mjs\";\nimport {toCalendarDate as $hac8C$toCalendarDate, toCalendarDateTime as $hac8C$toCalendarDateTime, DateFormatter as $hac8C$DateFormatter} from \"@internationalized/date\";\nimport {useFormValidationState as $hac8C$useFormValidationState} from \"@react-stately/form\";\nimport {useOverlayTriggerState as $hac8C$useOverlayTriggerState} from \"@react-stately/overlays\";\nimport {useControlledState as $hac8C$useControlledState} from \"@react-stately/utils\";\nimport {useState as $hac8C$useState, useMemo as $hac8C$useMemo} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $93c38a5e28be6249$export$e50a61c1de9f574(props) {\n var _value_start, _value_end;\n let overlayState = (0, $hac8C$useOverlayTriggerState)(props);\n let [controlledValue, setControlledValue] = (0, $hac8C$useControlledState)(props.value, props.defaultValue || null, props.onChange);\n let [initialValue] = (0, $hac8C$useState)(controlledValue);\n let [placeholderValue, setPlaceholderValue] = (0, $hac8C$useState)(()=>controlledValue || {\n start: null,\n end: null\n });\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {\n start: null,\n end: null\n };\n setPlaceholderValue(placeholderValue);\n }\n let value = controlledValue || placeholderValue;\n let setValue = (newValue)=>{\n value = newValue || {\n start: null,\n end: null\n };\n setPlaceholderValue(value);\n if ($93c38a5e28be6249$var$isCompleteRange(value)) setControlledValue(value);\n else setControlledValue(null);\n };\n let v = (value === null || value === void 0 ? void 0 : value.start) || (value === null || value === void 0 ? void 0 : value.end) || props.placeholderValue || null;\n let [granularity, defaultTimeZone] = (0, $35a22f14a1f04b11$export$2440da353cedad43)(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n var _props_shouldCloseOnSelect;\n let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;\n let [dateRange, setSelectedDateRange] = (0, $hac8C$useState)(null);\n let [timeRange, setSelectedTimeRange] = (0, $hac8C$useState)(null);\n if (value && $93c38a5e28be6249$var$isCompleteRange(value)) {\n dateRange = value;\n if ('hour' in value.start) timeRange = value;\n }\n let commitValue = (dateRange, timeRange)=>{\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set((0, $hac8C$toCalendarDate)(dateRange.start)) : (0, $hac8C$toCalendarDateTime)(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set((0, $hac8C$toCalendarDate)(dateRange.end)) : (0, $hac8C$toCalendarDateTime)(dateRange.end, timeRange.end)\n });\n setSelectedDateRange(null);\n setSelectedTimeRange(null);\n validation.commitValidation();\n };\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range)=>{\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n // Set a placeholder time if the popover is closing so we don't leave the field in an incomplete state.\n if ($93c38a5e28be6249$var$isCompleteRange(range) && (shouldClose || (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) && (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end))) commitValue(range, {\n start: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) || (0, $35a22f14a1f04b11$export$c5221a78ef73c5e9)(props.placeholderValue),\n end: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) || (0, $35a22f14a1f04b11$export$c5221a78ef73c5e9)(props.placeholderValue)\n });\n else setSelectedDateRange(range);\n } else if ($93c38a5e28be6249$var$isCompleteRange(range)) {\n setValue(range);\n validation.commitValidation();\n } else setSelectedDateRange(range);\n if (shouldClose) overlayState.setOpen(false);\n };\n let setTimeRange = (range)=>{\n if ($93c38a5e28be6249$var$isCompleteRange(dateRange) && $93c38a5e28be6249$var$isCompleteRange(range)) commitValue(dateRange, range);\n else setSelectedTimeRange(range);\n };\n let showEra = (value === null || value === void 0 ? void 0 : (_value_start = value.start) === null || _value_start === void 0 ? void 0 : _value_start.calendar.identifier) === 'gregory' && value.start.era === 'BC' || (value === null || value === void 0 ? void 0 : (_value_end = value.end) === null || _value_end === void 0 ? void 0 : _value_end.calendar.identifier) === 'gregory' && value.end.era === 'BC';\n let formatOpts = (0, $hac8C$useMemo)(()=>({\n granularity: granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n shouldForceLeadingZeros: props.shouldForceLeadingZeros,\n showEra: showEra\n }), [\n granularity,\n props.hourCycle,\n props.shouldForceLeadingZeros,\n defaultTimeZone,\n props.hideTimeZone,\n showEra\n ]);\n let { minValue: minValue, maxValue: maxValue, isDateUnavailable: isDateUnavailable } = props;\n let builtinValidation = (0, $hac8C$useMemo)(()=>(0, $35a22f14a1f04b11$export$80ff8fc0ae339c13)(value, minValue, maxValue, isDateUnavailable, formatOpts), [\n value,\n minValue,\n maxValue,\n isDateUnavailable,\n formatOpts\n ]);\n let validation = (0, $hac8C$useFormValidationState)({\n ...props,\n value: controlledValue,\n name: (0, $hac8C$useMemo)(()=>[\n props.startName,\n props.endName\n ].filter((n)=>n != null), [\n props.startName,\n props.endName\n ]),\n builtinValidation: builtinValidation\n });\n let isValueInvalid = validation.displayValidation.isInvalid;\n let validationState = props.validationState || (isValueInvalid ? 'invalid' : null);\n var _props_defaultValue;\n return {\n ...validation,\n value: value,\n defaultValue: (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : initialValue,\n setValue: setValue,\n dateRange: dateRange,\n timeRange: timeRange,\n granularity: granularity,\n hasTime: hasTime,\n setDate (part, date) {\n var _dateRange_end, _dateRange_start;\n if (part === 'start') setDateRange({\n start: date,\n end: (_dateRange_end = dateRange === null || dateRange === void 0 ? void 0 : dateRange.end) !== null && _dateRange_end !== void 0 ? _dateRange_end : null\n });\n else setDateRange({\n start: (_dateRange_start = dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) !== null && _dateRange_start !== void 0 ? _dateRange_start : null,\n end: date\n });\n },\n setTime (part, time) {\n var _timeRange_end, _timeRange_start;\n if (part === 'start') setTimeRange({\n start: time,\n end: (_timeRange_end = timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) !== null && _timeRange_end !== void 0 ? _timeRange_end : null\n });\n else setTimeRange({\n start: (_timeRange_start = timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) !== null && _timeRange_start !== void 0 ? _timeRange_start : null,\n end: time\n });\n },\n setDateTime (part, dateTime) {\n var _value_end, _value_start;\n if (part === 'start') setValue({\n start: dateTime,\n end: (_value_end = value === null || value === void 0 ? void 0 : value.end) !== null && _value_end !== void 0 ? _value_end : null\n });\n else setValue({\n start: (_value_start = value === null || value === void 0 ? void 0 : value.start) !== null && _value_start !== void 0 ? _value_start : null,\n end: dateTime\n });\n },\n setDateRange: setDateRange,\n setTimeRange: setTimeRange,\n ...overlayState,\n setOpen (isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !((value === null || value === void 0 ? void 0 : value.start) && (value === null || value === void 0 ? void 0 : value.end)) && $93c38a5e28be6249$var$isCompleteRange(dateRange) && hasTime) commitValue(dateRange, {\n start: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) || (0, $35a22f14a1f04b11$export$c5221a78ef73c5e9)(props.placeholderValue),\n end: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) || (0, $35a22f14a1f04b11$export$c5221a78ef73c5e9)(props.placeholderValue)\n });\n overlayState.setOpen(isOpen);\n },\n validationState: validationState,\n isInvalid: isValueInvalid,\n formatValue (locale, fieldOptions) {\n if (!value || !value.start || !value.end) return null;\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n let startOptions = (0, $35a22f14a1f04b11$export$7e319ea407e63bc0)(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.start.calendar.identifier === 'gregory' && value.start.era === 'BC' || value.end.calendar.identifier === 'gregory' && value.end.era === 'BC'\n });\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n let startFormatter = new (0, $hac8C$DateFormatter)(locale, startOptions);\n let endFormatter;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for(let i = 0; i < parts.length; i++){\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') separatorIndex = i;\n else if (part.source === 'endRange') break;\n }\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for(let i = 0; i < parts.length; i++){\n if (i < separatorIndex) start += parts[i].value;\n else if (i > separatorIndex) end += parts[i].value;\n }\n return {\n start: start,\n end: end\n };\n } catch {\n // ignore\n }\n endFormatter = startFormatter;\n } else {\n let endOptions = (0, $35a22f14a1f04b11$export$7e319ea407e63bc0)(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n endFormatter = new (0, $hac8C$DateFormatter)(locale, endOptions);\n }\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n },\n getDateFormatter (locale, formatOptions) {\n let newOptions = {\n ...formatOpts,\n ...formatOptions\n };\n let newFormatOptions = (0, $35a22f14a1f04b11$export$7e319ea407e63bc0)({}, newOptions);\n return new (0, $hac8C$DateFormatter)(locale, newFormatOptions);\n }\n };\n}\nfunction $93c38a5e28be6249$var$isCompleteRange(value) {\n return (value === null || value === void 0 ? void 0 : value.start) != null && value.end != null;\n}\n\n\nexport {$93c38a5e28be6249$export$e50a61c1de9f574 as useDateRangePickerState};\n//# sourceMappingURL=useDateRangePickerState.module.js.map\n","import { useRef } from 'react';\nimport { useDateRangePickerState } from 'react-stately';\nimport {\n DateValue,\n useDateRangePicker,\n type AriaDateRangePickerProps,\n} from '@react-aria/datepicker';\nimport { DateField as AriaDateField } from 'react-aria-components';\nimport { type RangeValue } from 'react-aria';\nimport CalendarRange, { CalendarRangeProps } from '../CalendarRange';\nimport Popover from '../Popover';\nimport IconButton, { type IconButtonProps } from '../IconButton';\nimport DateField, { type DateFieldProps } from '../DateField';\nimport { DatePickerContext } from '../DatePicker/DatePickerContext';\nimport Paragraph from '../Paragraph';\nimport { parseDateValue } from '../../utils/date/date';\n\nimport datePickerStyles from '../DatePicker/DatePicker.module.css';\nimport dateFieldStyles from '../DateField/DateField.module.css';\nimport { Field, FieldProps } from '../_base/Field';\n\ntype WithoutSharedProps<T> = Omit<T, keyof DateRangePickerProps>;\n/**\n * Keys from AriaDatePickerProps that are incompatible with our DatePickerProps\n * They only use 'DateValue' when we need to use 'string | DateValue'\n */\ntype DateValueKeys =\n | 'defaultValue'\n | 'value'\n | 'onChange'\n | 'minValue'\n | 'maxValue'\n | 'isDateUnavailable';\n\nexport interface DateRangePickerProps\n extends Omit<AriaDateRangePickerProps<DateValue>, DateValueKeys>,\n FieldProps {\n /**\n * Label for the date field\n */\n label?: DateFieldProps['label'];\n /**\n * Description for the date field shown below the label\n */\n description?: DateFieldProps['description'];\n /**\n * The default value of the date field.\n */\n defaultValue?: RangeValue<string | DateValue>;\n /**\n * The controlled value of the date field.\n */\n value?: RangeValue<string | DateValue>;\n /**\n * Function called when the date field value changes\n */\n onChange?: CalendarRangeProps['onChange'];\n /**\n * The minimum value of the date field.\n */\n minValue?: string | DateValue;\n /**\n * The maximum value of the date field.\n */\n maxValue?: string | DateValue;\n /**\n * Callback function to mark cells as unavailable. Unavailable cells will have `aria-disabled=\"true\"`\n */\n isDateUnavailable?: DateFieldProps['isDateUnavailable'];\n /**\n * Whether the date picker is disabled\n */\n isDisabled?: boolean;\n /**\n * Whether the date picker is invalid\n */\n isInvalid?: boolean;\n /**\n * Whether the date field is required\n */\n isRequired?: boolean;\n /**\n * Message shown when the field is invalid\n */\n errorMessage?: DateFieldProps['errorMessage'];\n /**\n * Props passed to the start date field component\n */\n startDateFieldProps?: WithoutSharedProps<Omit<DateFieldProps, 'children'>>;\n /**\n * Props passed to the start date field component\n */\n endDateFieldProps?: WithoutSharedProps<Omit<DateFieldProps, 'children'>>;\n /**\n * Props passed to the calendar component\n */\n calendarProps?: WithoutSharedProps<CalendarRangeProps>;\n}\n\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Change string props to DateValue for internal manipulation\n const parsedProps = {\n ...props,\n // date value\n defaultValue: (() => {\n if (!props?.defaultValue) return undefined;\n if (!props.defaultValue?.start || !props.defaultValue?.end)\n return undefined;\n return {\n start: parseDateValue(props.defaultValue.start),\n end: parseDateValue(props.defaultValue.end),\n };\n })(),\n value: (() => {\n if (!props?.value) return undefined;\n if (!props.value?.start || !props.value?.end) return undefined;\n return {\n start: parseDateValue(props.value.start),\n end: parseDateValue(props.value.end),\n };\n })(),\n onChange: (rangeValue: RangeValue<DateValue>) => {\n if (!props.onChange || !rangeValue?.start || !rangeValue?.end) return;\n const range = {\n start: rangeValue.start.toDate('UTC').toISOString(),\n end: rangeValue.end.toDate('UTC').toISOString(),\n } as RangeValue<string>;\n return props.onChange(range);\n },\n // config\n minValue: parseDateValue(props?.minValue),\n maxValue: parseDateValue(props?.maxValue),\n isDateUnavailable: (dateValue: DateValue) =>\n props?.isDateUnavailable\n ? props.isDateUnavailable(dateValue.toDate('UTC').toISOString())\n : false,\n } as unknown as AriaDateRangePickerProps<DateValue>;\n\n const state = useDateRangePickerState(parsedProps);\n const positioningRef = useRef(null);\n\n const dateRangePickerProps = useDateRangePicker(\n parsedProps,\n state,\n positioningRef,\n );\n\n // Field props\n const sharedDateFieldProps = {\n granularity: 'day',\n hideTimeZone: true,\n };\n\n const startDateFieldProps = {\n ...props.startDateFieldProps,\n ...dateRangePickerProps.startFieldProps,\n ...sharedDateFieldProps,\n } as DateFieldProps;\n\n const endDateFieldProps = {\n ...props.endDateFieldProps,\n ...dateRangePickerProps.endFieldProps,\n ...sharedDateFieldProps,\n } as DateFieldProps;\n\n // Date field group props - remove 'aria-labelledby' as we're not using the default label props\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { 'aria-labelledby': _, ...dateFieldGroupProps } =\n dateRangePickerProps.groupProps;\n\n // Button props\n const iconButtonProps = {\n ...dateRangePickerProps.buttonProps,\n isInvalid: state.isInvalid,\n styleVariant: (() => {\n if (state.isInvalid) return 'critical';\n return state.isOpen ? 'accent' : 'neutral';\n })(),\n onClick: () => (state.isOpen ? state.close() : state.open()),\n } as IconButtonProps;\n\n // Calendar range props\n const calendarComponentProps = {\n ...props.calendarProps,\n ...dateRangePickerProps.calendarProps,\n } as CalendarRangeProps;\n\n return (\n <div className={datePickerStyles.datePicker} ref={positioningRef}>\n <Field\n className={datePickerStyles['datePicker__field']}\n as={AriaDateField}\n label={props.label}\n description={props.description}\n errorMessage={props.errorMessage}\n isDisabled={props.isDisabled}\n isRequired={props.isRequired}\n isInvalid={dateRangePickerProps.isInvalid}\n // Pass field props to main field component\n columns={props.columns}\n maxWidthByChars={props.maxWidthByChars}\n errorPlacement={props.errorPlacement}\n optionalTranslation={props.optionalTranslation}\n errorId={props.errorId}\n errorPrefix={props.errorPrefix}\n visuallyHiddenLabel={props.visuallyHiddenLabel}\n >\n <DatePickerContext.Provider value={{ isInDateRangePicker: true }}>\n <div\n {...dateFieldGroupProps}\n className={`${dateFieldStyles['dateInput__wrapper']} ${dateFieldStyles['dateInput__wrapper--has-background']}`}\n >\n <DateField {...startDateFieldProps}></DateField>\n <Paragraph\n foregroundColor={\n props.isDisabled ? 'disabledPrimary' : 'secondary'\n }\n >\n &#8211;\n </Paragraph>\n <DateField {...endDateFieldProps}>\n <DateField.EndSlot>\n <IconButton\n {...iconButtonProps}\n size=\"sm\"\n emphasis=\"tertiary\"\n iconProps={{ iconName: 'calendar-days', iconPrefix: 'fas' }}\n />\n </DateField.EndSlot>\n </DateField>\n </div>\n {state.isOpen && (\n <Popover\n state={state}\n triggerRef={positioningRef}\n placement=\"bottom start\"\n hasArrow={false}\n shouldFlip\n >\n <div\n role=\"dialog\"\n className={datePickerStyles['datePicker__dialog']}\n {...dateRangePickerProps.dialogProps}\n >\n <CalendarRange {...calendarComponentProps} />\n </div>\n </Popover>\n )}\n </DatePickerContext.Provider>\n </Field>\n </div>\n );\n};\n\nexport default DateRangePicker;\n"],"names":["$93c38a5e28be6249$var$isCompleteRange","value","start","end","DateRangePicker","props","parsedProps","defaultValue","parseDateValue","onChange","rangeValue","range","toDate","toISOString","minValue","maxValue","isDateUnavailable","dateValue","state","_value_start","_value_end","overlayState","$hac8C$useOverlayTriggerState","controlledValue","setControlledValue","$hac8C$useControlledState","initialValue","$hac8C$useState","placeholderValue","setPlaceholderValue","setValue","newValue","v","granularity","defaultTimeZone","$35a22f14a1f04b11$export$2440da353cedad43","hasTime","_props_shouldCloseOnSelect","shouldCloseOnSelect","dateRange","setSelectedDateRange","timeRange","setSelectedTimeRange","commitValue","set","$hac8C$toCalendarDate","$hac8C$toCalendarDateTime","validation","commitValidation","setDateRange","shouldClose","$35a22f14a1f04b11$export$c5221a78ef73c5e9","setOpen","setTimeRange","showEra","calendar","identifier","era","formatOpts","$hac8C$useMemo","timeZone","hideTimeZone","hourCycle","shouldForceLeadingZeros","builtinValidation","$35a22f14a1f04b11$export$80ff8fc0ae339c13","$hac8C$useFormValidationState","name","startName","endName","filter","n","isValueInvalid","displayValidation","isInvalid","validationState","_props_defaultValue","setDate","part","date","_dateRange_end","_dateRange_start","setTime","time","_timeRange_end","_timeRange_start","setDateTime","dateTime","isOpen","formatValue","locale","fieldOptions","endFormatter","startTimeZone","startGranularity","endTimeZone","endGranularity","startOptions","$35a22f14a1f04b11$export$7e319ea407e63bc0","startDate","endDate","startFormatter","$hac8C$DateFormatter","compare","parts","formatRangeToParts","separatorIndex","i","length","source","type","endOptions","format","getDateFormatter","formatOptions","newOptions","newFormatOptions","useDateRangePickerState","positioningRef","useRef","dateRangePickerProps","useDateRangePicker","sharedDateFieldProps","startDateFieldProps","startFieldProps","endDateFieldProps","endFieldProps","_","dateFieldGroupProps","groupProps","iconButtonProps","buttonProps","styleVariant","onClick","close","open","calendarComponentProps","calendarProps","className","datePickerStyles","datePicker","ref","children","jsx","Field","as","AriaDateField","label","description","errorMessage","isDisabled","isRequired","columns","maxWidthByChars","errorPlacement","optionalTranslation","errorId","errorPrefix","visuallyHiddenLabel","jsxs","DatePickerContext","Provider","isInDateRangePicker","dateFieldStyles","DateField","Paragraph","foregroundColor","EndSlot","IconButton","size","emphasis","iconProps","iconName","iconPrefix","Popover","triggerRef","placement","hasArrow","shouldFlip","role","dialogProps","CalendarRange"],"mappings":"q+BAgQA,SAASA,EAAsCC,GAC3C,OAAsE,OAA9DA,eAA8CA,EAAMC,QAA+B,MAAbD,EAAME,GACxF,CC/JO,MAAMC,EAAmBC,IAE9B,MAAMC,EAAc,IACfD,EAEHE,mBACE,GAAKF,GAAOE,cACPF,EAAME,cAAcL,OAAUG,EAAME,cAAcJ,IAEvD,MAAO,CACLD,MAAOM,EAAeH,EAAME,aAAaL,OACzCC,IAAKK,EAAeH,EAAME,aAAaJ,KAE3C,KACAF,YACE,GAAKI,GAAOJ,OACPI,EAAMJ,OAAOC,OAAUG,EAAMJ,OAAOE,IACzC,MAAO,CACLD,MAAOM,EAAeH,EAAMJ,MAAMC,OAClCC,IAAKK,EAAeH,EAAMJ,MAAME,KAEpC,KACAM,SAAWC,IACT,IAAKL,EAAMI,WAAaC,GAAYR,QAAUQ,GAAYP,IAAK,OAC/D,MAAMQ,EAAQ,CACZT,MAAOQ,EAAWR,MAAMU,OAAO,OAAOC,cACtCV,IAAKO,EAAWP,IAAIS,OAAO,OAAOC,eAEpC,OAAOR,EAAMI,SAASE,IAGxBG,SAAUN,EAAeH,GAAOS,UAChCC,SAAUP,EAAeH,GAAOU,UAChCC,kBAAoBC,KAClBZ,GAAOW,mBACHX,EAAMW,kBAAkBC,EAAUL,OAAO,OAAOC,gBAIlDK,EDnHR,SAAkDb,GAC9C,IAAIc,EAAcC,EAClB,IAAIC,EAAmBC,EAA+BjB,IACjDkB,EAAiBC,GAA0BC,EAA2BpB,EAAMJ,MAAOI,EAAME,cAAgB,KAAMF,EAAMI,WACrHiB,GAAoBC,EAAiBJ,IACrCK,EAAkBC,GAA2BF,EAAiB,IAAIJ,GAAmB,CAClFrB,MAAO,KACPC,IAAK,OAGU,MAAnBoB,GAA2BK,EAAiB1B,OAAS0B,EAAiBzB,M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ClBC,WAAYlJ,EAAMkJ,WAClB7E,UAAW8C,EAAqB9C,UAEhC8E,QAASnJ,EAAMmJ,QACfC,gBAAiBpJ,EAAMoJ,gBACvBC,eAAgBrJ,EAAMqJ,eACtBC,oBAAqBtJ,EAAMsJ,oBAC3BC,QAASvJ,EAAMuJ,QACfC,YAAaxJ,EAAMwJ,YACnBC,oBAAqBzJ,EAAMyJ,oBAE3BhB,wBAAAiB,EAACC,EAAkBC,SAAlB,CAA2BhK,MAAO,CAAEiK,qBAAqB,GACxDpB,SAAA;eAAAiB,EAAC,MAAA,IACK/B,EACJU,UAAW,GAAGyB,EAAoC,sBAAKA,EAAgB,wCAEvErB,SAAA;eAAAC,EAACqB,EAAA,IAAczC;eACfoB,EAACsB,EAAA,CACCC,gBACEjK,EAAMiJ,WAAa,kBAAoB,YAE1CR,SAAA;iBAGAsB,EAAA,IAAcvC,EACbiB,wBAAAC,EAACqB,EAAUG,QAAV,CACCzB,wBAAAC,EAACyB,EAAA,IACKtC,EACJuC,KAAK,KACLC,SAAS,WACTC,UAAW,CAAEC,SAAU,gBAAiBC,WAAY,gBAK3D3J,EAAMsE,uBACLuD,EAAC+B,EAAA,CACC5J,QACA6J,WAAYzD,EACZ0D,UAAU,eACVC,UAAU,EACVC,YAAU,EAEVpC,wBAAAC,EAAC,MAAA,CACCoC,KAAK,SACLzC,UAAWC,EAAqC,sBAC5CnB,EAAqB4D,YAEzBtC,wBAAAC,EAACsC,EAAA,IAAkB7C","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"DateRangePicker.js","sources":["../../../node_modules/react-stately/node_modules/react-stately/dist/private/datepicker/useDateRangePickerState.mjs","../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import {getFormatOptions as $8b141f2f71e88f85$export$7e319ea407e63bc0, getPlaceholderTime as $8b141f2f71e88f85$export$c5221a78ef73c5e9, getRangeValidationResult as $8b141f2f71e88f85$export$80ff8fc0ae339c13, useDefaultProps as $8b141f2f71e88f85$export$2440da353cedad43} from \"./utils.mjs\";\nimport {useFormValidationState as $fd2148440a13ec26$export$fc1a364ae1f3ff10} from \"../form/useFormValidationState.mjs\";\nimport {useOverlayTriggerState as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6} from \"../overlays/useOverlayTriggerState.mjs\";\nimport {useControlledState as $3e6197669829fe11$export$40bfa8c7b0832715} from \"../utils/useControlledState.mjs\";\nimport {toCalendarDate as $ah9vd$toCalendarDate, toCalendarDateTime as $ah9vd$toCalendarDateTime, DateFormatter as $ah9vd$DateFormatter} from \"@internationalized/date\";\nimport {useState as $ah9vd$useState, useMemo as $ah9vd$useMemo} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $6de3e3f1a7663217$export$e50a61c1de9f574(props) {\n let overlayState = (0, $f11fb0bcf1b2687a$export$61c6a8c84e605fb6)(props);\n let [controlledValue, setControlledValue] = (0, $3e6197669829fe11$export$40bfa8c7b0832715)(props.value, props.defaultValue || null, props.onChange);\n let [initialValue] = (0, $ah9vd$useState)(controlledValue);\n let [placeholderValue, setPlaceholderValue] = (0, $ah9vd$useState)(()=>controlledValue || {\n start: null,\n end: null\n });\n // Reset the placeholder if the value prop is set to null.\n if (controlledValue == null && placeholderValue.start && placeholderValue.end) {\n placeholderValue = {\n start: null,\n end: null\n };\n setPlaceholderValue(placeholderValue);\n }\n let value = controlledValue || placeholderValue;\n let setValue = (newValue)=>{\n value = newValue || {\n start: null,\n end: null\n };\n setPlaceholderValue(value);\n if ($6de3e3f1a7663217$var$isCompleteRange(value)) setControlledValue(value);\n else setControlledValue(null);\n };\n let v = value?.start || value?.end || props.placeholderValue || null;\n let [granularity, defaultTimeZone] = (0, $8b141f2f71e88f85$export$2440da353cedad43)(v, props.granularity);\n let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';\n let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;\n let [dateRange, setSelectedDateRange] = (0, $ah9vd$useState)(null);\n let [timeRange, setSelectedTimeRange] = (0, $ah9vd$useState)(null);\n if (value && $6de3e3f1a7663217$var$isCompleteRange(value)) {\n dateRange = value;\n if ('hour' in value.start) timeRange = value;\n }\n let commitValue = (dateRange, timeRange)=>{\n setValue({\n start: 'timeZone' in timeRange.start ? timeRange.start.set((0, $ah9vd$toCalendarDate)(dateRange.start)) : (0, $ah9vd$toCalendarDateTime)(dateRange.start, timeRange.start),\n end: 'timeZone' in timeRange.end ? timeRange.end.set((0, $ah9vd$toCalendarDate)(dateRange.end)) : (0, $ah9vd$toCalendarDateTime)(dateRange.end, timeRange.end)\n });\n setSelectedDateRange(null);\n setSelectedTimeRange(null);\n validation.commitValidation();\n };\n // Intercept setValue to make sure the Time section is not changed by date selection in Calendar\n let setDateRange = (range)=>{\n let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;\n if (hasTime) {\n // Set a placeholder time if the popover is closing so we don't leave the field in an incomplete state.\n if ($6de3e3f1a7663217$var$isCompleteRange(range) && (shouldClose || timeRange?.start && timeRange?.end)) commitValue(range, {\n start: timeRange?.start || (0, $8b141f2f71e88f85$export$c5221a78ef73c5e9)(props.placeholderValue),\n end: timeRange?.end || (0, $8b141f2f71e88f85$export$c5221a78ef73c5e9)(props.placeholderValue)\n });\n else setSelectedDateRange(range);\n } else if ($6de3e3f1a7663217$var$isCompleteRange(range)) {\n setValue(range);\n validation.commitValidation();\n } else setSelectedDateRange(range);\n if (shouldClose) overlayState.setOpen(false);\n };\n let setTimeRange = (range)=>{\n if ($6de3e3f1a7663217$var$isCompleteRange(dateRange) && $6de3e3f1a7663217$var$isCompleteRange(range)) commitValue(dateRange, range);\n else setSelectedTimeRange(range);\n };\n let showEra = value?.start?.calendar.identifier === 'gregory' && value.start.era === 'BC' || value?.end?.calendar.identifier === 'gregory' && value.end.era === 'BC';\n let formatOpts = (0, $ah9vd$useMemo)(()=>({\n granularity: granularity,\n timeZone: defaultTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n shouldForceLeadingZeros: props.shouldForceLeadingZeros,\n showEra: showEra\n }), [\n granularity,\n props.hourCycle,\n props.shouldForceLeadingZeros,\n defaultTimeZone,\n props.hideTimeZone,\n showEra\n ]);\n let { minValue: minValue, maxValue: maxValue, isDateUnavailable: isDateUnavailable } = props;\n let builtinValidation = (0, $ah9vd$useMemo)(()=>(0, $8b141f2f71e88f85$export$80ff8fc0ae339c13)(value, minValue, maxValue, isDateUnavailable, formatOpts), [\n value,\n minValue,\n maxValue,\n isDateUnavailable,\n formatOpts\n ]);\n let validation = (0, $fd2148440a13ec26$export$fc1a364ae1f3ff10)({\n ...props,\n value: controlledValue,\n name: (0, $ah9vd$useMemo)(()=>[\n props.startName,\n props.endName\n ].filter((n)=>n != null), [\n props.startName,\n props.endName\n ]),\n builtinValidation: builtinValidation\n });\n let isValueInvalid = validation.displayValidation.isInvalid;\n let validationState = props.validationState || (isValueInvalid ? 'invalid' : null);\n return {\n ...validation,\n value: value,\n defaultValue: props.defaultValue ?? initialValue,\n setValue: setValue,\n dateRange: dateRange,\n timeRange: timeRange,\n granularity: granularity,\n hasTime: hasTime,\n setDate (part, date) {\n if (part === 'start') setDateRange({\n start: date,\n end: dateRange?.end ?? null\n });\n else setDateRange({\n start: dateRange?.start ?? null,\n end: date\n });\n },\n setTime (part, time) {\n if (part === 'start') setTimeRange({\n start: time,\n end: timeRange?.end ?? null\n });\n else setTimeRange({\n start: timeRange?.start ?? null,\n end: time\n });\n },\n setDateTime (part, dateTime) {\n if (part === 'start') setValue({\n start: dateTime,\n end: value?.end ?? null\n });\n else setValue({\n start: value?.start ?? null,\n end: dateTime\n });\n },\n setDateRange: setDateRange,\n setTimeRange: setTimeRange,\n ...overlayState,\n setOpen (isOpen) {\n // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.\n // If only the time range was set and not the date range, don't commit. The state will be preserved until\n // the user opens the popover again.\n if (!isOpen && !(value?.start && value?.end) && $6de3e3f1a7663217$var$isCompleteRange(dateRange) && hasTime) commitValue(dateRange, {\n start: timeRange?.start || (0, $8b141f2f71e88f85$export$c5221a78ef73c5e9)(props.placeholderValue),\n end: timeRange?.end || (0, $8b141f2f71e88f85$export$c5221a78ef73c5e9)(props.placeholderValue)\n });\n overlayState.setOpen(isOpen);\n },\n validationState: validationState,\n isInvalid: isValueInvalid,\n formatValue (locale, fieldOptions) {\n if (!value || !value.start || !value.end) return null;\n let startTimeZone = 'timeZone' in value.start ? value.start.timeZone : undefined;\n let startGranularity = props.granularity || (value.start && 'minute' in value.start ? 'minute' : 'day');\n let endTimeZone = 'timeZone' in value.end ? value.end.timeZone : undefined;\n let endGranularity = props.granularity || (value.end && 'minute' in value.end ? 'minute' : 'day');\n let startOptions = (0, $8b141f2f71e88f85$export$7e319ea407e63bc0)(fieldOptions, {\n granularity: startGranularity,\n timeZone: startTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle,\n showEra: value.start.calendar.identifier === 'gregory' && value.start.era === 'BC' || value.end.calendar.identifier === 'gregory' && value.end.era === 'BC'\n });\n let startDate = value.start.toDate(startTimeZone || 'UTC');\n let endDate = value.end.toDate(endTimeZone || 'UTC');\n let startFormatter = new (0, $ah9vd$DateFormatter)(locale, startOptions);\n let endFormatter;\n if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {\n // Use formatRange, as it results in shorter output when some of the fields\n // are shared between the start and end dates (e.g. the same month).\n // Formatting will fail if the end date is before the start date. Fall back below when that happens.\n try {\n let parts = startFormatter.formatRangeToParts(startDate, endDate);\n // Find the separator between the start and end date. This is determined\n // by finding the last shared literal before the end range.\n let separatorIndex = -1;\n for(let i = 0; i < parts.length; i++){\n let part = parts[i];\n if (part.source === 'shared' && part.type === 'literal') separatorIndex = i;\n else if (part.source === 'endRange') break;\n }\n // Now we can combine the parts into start and end strings.\n let start = '';\n let end = '';\n for(let i = 0; i < parts.length; i++){\n if (i < separatorIndex) start += parts[i].value;\n else if (i > separatorIndex) end += parts[i].value;\n }\n return {\n start: start,\n end: end\n };\n } catch {\n // ignore\n }\n endFormatter = startFormatter;\n } else {\n let endOptions = (0, $8b141f2f71e88f85$export$7e319ea407e63bc0)(fieldOptions, {\n granularity: endGranularity,\n timeZone: endTimeZone,\n hideTimeZone: props.hideTimeZone,\n hourCycle: props.hourCycle\n });\n endFormatter = new (0, $ah9vd$DateFormatter)(locale, endOptions);\n }\n return {\n start: startFormatter.format(startDate),\n end: endFormatter.format(endDate)\n };\n },\n getDateFormatter (locale, formatOptions) {\n let newOptions = {\n ...formatOpts,\n ...formatOptions\n };\n let newFormatOptions = (0, $8b141f2f71e88f85$export$7e319ea407e63bc0)({}, newOptions);\n return new (0, $ah9vd$DateFormatter)(locale, newFormatOptions);\n }\n };\n}\nfunction $6de3e3f1a7663217$var$isCompleteRange(value) {\n return value?.start != null && value.end != null;\n}\n\n\nexport {$6de3e3f1a7663217$export$e50a61c1de9f574 as useDateRangePickerState};\n//# sourceMappingURL=useDateRangePickerState.mjs.map\n","import { useRef } from 'react';\nimport { useDateRangePickerState } from 'react-stately';\nimport {\n DateValue,\n useDateRangePicker,\n type AriaDateRangePickerProps,\n} from '@react-aria/datepicker';\nimport { DateField as AriaDateField } from 'react-aria-components';\nimport { type RangeValue } from 'react-aria';\nimport CalendarRange, { CalendarRangeProps } from '../CalendarRange';\nimport Popover from '../Popover';\nimport IconButton, { type IconButtonProps } from '../IconButton';\nimport DateField, { type DateFieldProps } from '../DateField';\nimport { DatePickerContext } from '../DatePicker/DatePickerContext';\nimport Paragraph from '../Paragraph';\nimport { parseDateValue } from '../../utils/date/date';\n\nimport datePickerStyles from '../DatePicker/DatePicker.module.css';\nimport dateFieldStyles from '../DateField/DateField.module.css';\nimport { Field, FieldProps } from '../_base/Field';\n\ntype WithoutSharedProps<T> = Omit<T, keyof DateRangePickerProps>;\n/**\n * Keys from AriaDatePickerProps that are incompatible with our DatePickerProps\n * They only use 'DateValue' when we need to use 'string | DateValue'\n */\ntype DateValueKeys =\n | 'defaultValue'\n | 'value'\n | 'onChange'\n | 'minValue'\n | 'maxValue'\n | 'isDateUnavailable';\n\nexport interface DateRangePickerProps\n extends Omit<AriaDateRangePickerProps<DateValue>, DateValueKeys>,\n FieldProps {\n /**\n * Label for the date field\n */\n label?: DateFieldProps['label'];\n /**\n * Description for the date field shown below the label\n */\n description?: DateFieldProps['description'];\n /**\n * The default value of the date field.\n */\n defaultValue?: RangeValue<string | DateValue>;\n /**\n * The controlled value of the date field.\n */\n value?: RangeValue<string | DateValue>;\n /**\n * Function called when the date field value changes\n */\n onChange?: CalendarRangeProps['onChange'];\n /**\n * The minimum value of the date field.\n */\n minValue?: string | DateValue;\n /**\n * The maximum value of the date field.\n */\n maxValue?: string | DateValue;\n /**\n * Callback function to mark cells as unavailable. Unavailable cells will have `aria-disabled=\"true\"`\n */\n isDateUnavailable?: DateFieldProps['isDateUnavailable'];\n /**\n * Whether the date picker is disabled\n */\n isDisabled?: boolean;\n /**\n * Whether the date picker is invalid\n */\n isInvalid?: boolean;\n /**\n * Whether the date field is required\n */\n isRequired?: boolean;\n /**\n * Message shown when the field is invalid\n */\n errorMessage?: DateFieldProps['errorMessage'];\n /**\n * Props passed to the start date field component\n */\n startDateFieldProps?: WithoutSharedProps<Omit<DateFieldProps, 'children'>>;\n /**\n * Props passed to the start date field component\n */\n endDateFieldProps?: WithoutSharedProps<Omit<DateFieldProps, 'children'>>;\n /**\n * Props passed to the calendar component\n */\n calendarProps?: WithoutSharedProps<CalendarRangeProps>;\n}\n\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Change string props to DateValue for internal manipulation\n const parsedProps = {\n ...props,\n // date value\n defaultValue: (() => {\n if (!props?.defaultValue) return undefined;\n if (!props.defaultValue?.start || !props.defaultValue?.end)\n return undefined;\n return {\n start: parseDateValue(props.defaultValue.start),\n end: parseDateValue(props.defaultValue.end),\n };\n })(),\n value: (() => {\n if (!props?.value) return undefined;\n if (!props.value?.start || !props.value?.end) return undefined;\n return {\n start: parseDateValue(props.value.start),\n end: parseDateValue(props.value.end),\n };\n })(),\n onChange: (rangeValue: RangeValue<DateValue>) => {\n if (!props.onChange || !rangeValue?.start || !rangeValue?.end) return;\n const range = {\n start: rangeValue.start.toDate('UTC').toISOString(),\n end: rangeValue.end.toDate('UTC').toISOString(),\n } as RangeValue<string>;\n return props.onChange(range);\n },\n // config\n minValue: parseDateValue(props?.minValue),\n maxValue: parseDateValue(props?.maxValue),\n isDateUnavailable: (dateValue: DateValue) =>\n props?.isDateUnavailable\n ? props.isDateUnavailable(dateValue.toDate('UTC').toISOString())\n : false,\n } as unknown as AriaDateRangePickerProps<DateValue>;\n\n const state = useDateRangePickerState(parsedProps);\n const positioningRef = useRef(null);\n\n const dateRangePickerProps = useDateRangePicker(\n parsedProps,\n state,\n positioningRef,\n );\n\n // Field props\n const sharedDateFieldProps = {\n granularity: 'day',\n hideTimeZone: true,\n };\n\n const startDateFieldProps = {\n ...props.startDateFieldProps,\n ...dateRangePickerProps.startFieldProps,\n ...sharedDateFieldProps,\n } as DateFieldProps;\n\n const endDateFieldProps = {\n ...props.endDateFieldProps,\n ...dateRangePickerProps.endFieldProps,\n ...sharedDateFieldProps,\n } as DateFieldProps;\n\n // Date field group props - remove 'aria-labelledby' as we're not using the default label props\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { 'aria-labelledby': _, ...dateFieldGroupProps } =\n dateRangePickerProps.groupProps;\n\n // Button props\n const iconButtonProps = {\n ...dateRangePickerProps.buttonProps,\n isInvalid: state.isInvalid,\n styleVariant: (() => {\n if (state.isInvalid) return 'critical';\n return state.isOpen ? 'accent' : 'neutral';\n })(),\n onClick: () => (state.isOpen ? state.close() : state.open()),\n } as IconButtonProps;\n\n // Calendar range props\n const calendarComponentProps = {\n ...props.calendarProps,\n ...dateRangePickerProps.calendarProps,\n } as CalendarRangeProps;\n\n return (\n <div className={datePickerStyles.datePicker} ref={positioningRef}>\n <Field\n className={datePickerStyles['datePicker__field']}\n as={AriaDateField}\n label={props.label}\n description={props.description}\n errorMessage={props.errorMessage}\n isDisabled={props.isDisabled}\n isRequired={props.isRequired}\n isInvalid={dateRangePickerProps.isInvalid}\n // Pass field props to main field component\n columns={props.columns}\n maxWidthByChars={props.maxWidthByChars}\n errorPlacement={props.errorPlacement}\n optionalTranslation={props.optionalTranslation}\n errorId={props.errorId}\n errorPrefix={props.errorPrefix}\n visuallyHiddenLabel={props.visuallyHiddenLabel}\n >\n <DatePickerContext.Provider value={{ isInDateRangePicker: true }}>\n <div\n {...dateFieldGroupProps}\n className={`${dateFieldStyles['dateInput__wrapper']} ${dateFieldStyles['dateInput__wrapper--has-background']}`}\n >\n <DateField {...startDateFieldProps}></DateField>\n <Paragraph\n foregroundColor={\n props.isDisabled ? 'disabledPrimary' : 'secondary'\n }\n >\n &#8211;\n </Paragraph>\n <DateField {...endDateFieldProps}>\n <DateField.EndSlot>\n <IconButton\n {...iconButtonProps}\n size=\"sm\"\n emphasis=\"tertiary\"\n iconProps={{ iconName: 'calendar-days', iconPrefix: 'fas' }}\n />\n </DateField.EndSlot>\n </DateField>\n </div>\n {state.isOpen && (\n <Popover\n state={state}\n triggerRef={positioningRef}\n placement=\"bottom start\"\n hasArrow={false}\n shouldFlip\n >\n <div\n role=\"dialog\"\n className={datePickerStyles['datePicker__dialog']}\n {...dateRangePickerProps.dialogProps}\n >\n <CalendarRange {...calendarComponentProps} />\n </div>\n </Popover>\n )}\n </DatePickerContext.Provider>\n </Field>\n </div>\n );\n};\n\nexport default DateRangePicker;\n"],"names":["$6de3e3f1a7663217$var$isCompleteRange","value","start","end","DateRangePicker","props","parsedProps","defaultValue","parseDateValue","onChange","rangeValue","range","toDate","toISOString","minValue","maxValue","isDateUnavailable","dateValue","state","overlayState","$f11fb0bcf1b2687a$export$61c6a8c84e605fb6","controlledValue","setControlledValue","$3e6197669829fe11$export$40bfa8c7b0832715","initialValue","$ah9vd$useState","placeholderValue","setPlaceholderValue","setValue","newValue","v","granularity","defaultTimeZone","$8b141f2f71e88f85$export$2440da353cedad43","hasTime","shouldCloseOnSelect","dateRange","setSelectedDateRange","timeRange","setSelectedTimeRange","commitValue","set","$ah9vd$toCalendarDate","$ah9vd$toCalendarDateTime","validation","commitValidation","setDateRange","shouldClose","$8b141f2f71e88f85$export$c5221a78ef73c5e9","setOpen","setTimeRange","showEra","calendar","identifier","era","formatOpts","$ah9vd$useMemo","timeZone","hideTimeZone","hourCycle","shouldForceLeadingZeros","builtinValidation","$8b141f2f71e88f85$export$80ff8fc0ae339c13","$fd2148440a13ec26$export$fc1a364ae1f3ff10","name","startName","endName","filter","n","isValueInvalid","displayValidation","isInvalid","validationState","setDate","part","date","setTime","time","setDateTime","dateTime","isOpen","formatValue","locale","fieldOptions","endFormatter","startTimeZone","startGranularity","endTimeZone","endGranularity","startOptions","$8b141f2f71e88f85$export$7e319ea407e63bc0","startDate","endDate","startFormatter","$ah9vd$DateFormatter","compare","parts","formatRangeToParts","separatorIndex","i","length","source","type","endOptions","format","getDateFormatter","formatOptions","newOptions","newFormatOptions","useDateRangePickerState","positioningRef","useRef","dateRangePickerProps","useDateRangePicker","sharedDateFieldProps","startDateFieldProps","startFieldProps","endDateFieldProps","endFieldProps","_","dateFieldGroupProps","groupProps","iconButtonProps","buttonProps","styleVariant","onClick","close","open","calendarComponentProps","calendarProps","className","datePickerStyles","datePicker","ref","children","jsx","Field","as","AriaDateField","label","description","errorMessage","isDisabled","isRequired","columns","maxWidthByChars","errorPlacement","optionalTranslation","errorId","errorPrefix","visuallyHiddenLabel","jsxs","DatePickerContext","Provider","isInDateRangePicker","dateFieldStyles","DateField","Paragraph","foregroundColor","EndSlot","IconButton","size","emphasis","iconProps","iconName","iconPrefix","Popover","triggerRef","placement","hasArrow","shouldFlip","role","dialogProps","CalendarRange"],"mappings":"+6BA0PA,SAASA,EAAsCC,GAC3C,OAAuB,MAAhBA,GAAOC,OAA8B,MAAbD,EAAME,GACzC,CCzJO,MAAMC,EAAmBC,IAE9B,MAAMC,EAAc,IACfD,EAEHE,mBACE,GAAKF,GAAOE,cACPF,EAAME,cAAcL,OAAUG,EAAME,cAAcJ,IAEvD,MAAO,CACLD,MAAOM,EAAeH,EAAME,aAAaL,OACzCC,IAAKK,EAAeH,EAAME,aAAaJ,KAE3C,KACAF,YACE,GAAKI,GAAOJ,OACPI,EAAMJ,OAAOC,OAAUG,EAAMJ,OAAOE,IACzC,MAAO,CACLD,MAAOM,EAAeH,EAAMJ,MAAMC,OAClCC,IAAKK,EAAeH,EAAMJ,MAAME,KAEpC,KACAM,SAAWC,IACT,IAAKL,EAAMI,WAAaC,GAAYR,QAAUQ,GAAYP,IAAK,OAC/D,MAAMQ,EAAQ,CACZT,MAAOQ,EAAWR,MAAMU,OAAO,OAAOC,cACtCV,IAAKO,EAAWP,IAAIS,OAAO,OAAOC,eAEpC,OAAOR,EAAMI,SAASE,IAGxBG,SAAUN,EAAeH,GAAOS,UAChCC,SAAUP,EAAeH,GAAOU,UAChCC,kBAAoBC,KAClBZ,GAAOW,mBACHX,EAAMW,kBAAkBC,EAAUL,OAAO,OAAOC,gBAIlDK,EDnHR,SAAkDb,GAC9C,IAAIc,EAAmBC,EAA2Cf,IAC7DgB,EAAiBC,GAA0BC,EAA2ClB,EAAMJ,MAAOI,EAAME,cAAgB,KAAMF,EAAMI,WACrIe,GAAoBC,EAAiBJ,IACrCK,EAAkBC,GAA2BF,EAAiB,IAAIJ,GAAmB,CAClFnB,MAAO,KACPC,IAAK,OAGU,MAAnBkB,GAA2BK,EAAiBxB,OAASwB,EAAiBvB,MACtEuB,EAAmB,CAC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QACAqJ,WAAYzD,EACZ0D,UAAU,eACVC,UAAU,EACVC,YAAU,EAEVpC,wBAAAC,EAAC,MAAA,CACCoC,KAAK,SACLzC,UAAWC,EAAqC,sBAC5CnB,EAAqB4D,YAEzBtC,wBAAAC,EAACsC,EAAA,IAAkB7C","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import i,{useRef as o}from"react";import{useDialog as n}from"@react-aria/dialog";import{OverlayContainer as l,UNSAFE_PortalProvider as r,useOverlay as d,usePreventScroll as t,useModal as s}from"@react-aria/overlays";import{FocusScope as c}from"@react-aria/focus";import{IconButton as m}from"../IconButton/IconButton.js";import '../../assets/Dialog.css';const g={dialogWrapper:"_dialogWrapper_1n625_1",overlay:"_overlay_1n625_10",absolute:"_absolute_1n625_16",dialog:"_dialog_1n625_1",noPadding:"_noPadding_1n625_35",dialogContent:"_dialogContent_1n625_64",dialogHeading:"_dialogHeading_1n625_71",dialogContentInner:"_dialogContentInner_1n625_75",noHeader:"_noHeader_1n625_81",closeButton:"_closeButton_1n625_85",dialogSmall:"_dialogSmall_1n625_111",dialogMedium:"_dialogMedium_1n625_115",dialogLarge:"_dialogLarge_1n625_119"},_=({id:a,children:i})=>/* @__PURE__ */e("div",{className:g.dialogHeading,id:a,children:i}),p=({children:a})=>/* @__PURE__ */e("div",{className:g.dialogContentInner,children:a});function u(l){const{onClose:r,size:p="dialogMedium",modal:u=!1,hasDismissButton:h=!0,dismissButtonLabel:y="Close dialog",role:C="dialog",id:b,removePadding:f=!1,zIndex:v,portalContainer:N,children:P}=l,H=o(null),{dialogProps:B}=n({...l,role:C},H),{overlayProps:I,underlayProps:x}=d({isOpen:!0,onClose:r,isDismissable:!0,...l},H);N||t();const{modalProps:z}=s(),j=i.Children.toArray(P).find(e=>i.isValidElement(e)&&e.type===_),D=i.Children.toArray(P).filter(e=>!i.isValidElement(e)||e.type!==_),L=Boolean(j),$=l["aria-labelledby"]||`${b}-header`,M=l["aria-describedby"]||`${b}-content`,S=[g.dialog,g[p],...f?[g.noPadding]:[]].join(" "),V=void 0!==v?{zIndex:v}:{},W=[g.dialogWrapper,...u?[g.modal]:[],...N?[g.absolute]:[]].join(" "),A=[g.overlay,...N?[g.absolute]:[]].join(" ");/* @__PURE__ */
2
- return a("div",{className:W,style:V,children:[u&&/* @__PURE__ */e("div",{className:A,...x,onClick:r,"aria-hidden":"true"}),
3
- /* @__PURE__ */e(c,{contain:!0,restoreFocus:!0,autoFocus:!1,children:/* @__PURE__ */a("div",{...I,...B,...z,ref:H,className:S,"data-size":p,id:b,role:C,"aria-labelledby":$,"aria-describedby":M,children:[
4
- /* @__PURE__ */a("div",{className:`${g.dialogContent} ${L?"":g.noHeader}`,children:[L&&/* @__PURE__ */e("div",{className:g.dialogHeader,id:$,children:j}),
5
- /* @__PURE__ */e("div",{id:M,children:D})]}),h&&/* @__PURE__ */e("div",{className:g.closeButton,children:/* @__PURE__ */e(m,{onPress:r,styleVariant:"white",emphasis:"primary",size:"sm",iconProps:{iconName:"close",iconPrefix:"far",iconSize:"1x"},tooltipLabel:y,"aria-label":y})})]})})]})}function h(a){const{isOpen:i,children:o,portalContainer:n}=a;if(!i)return null;const d=/* @__PURE__ */e(l,{children:/* @__PURE__ */e(u,{...a,children:o})});return n?/* @__PURE__ */e(r,{getContainer:()=>n,children:d}):d}_.displayName="Dialog.Header",p.displayName="Dialog.Content",h.Header=_,h.Content=p,h.displayName="Dialog";export{h as Dialog,h as default};
1
+ import{jsx as o,jsxs as e}from"react/jsx-runtime";import a,{useRef as i}from"react";import{useDialog as l}from"@react-aria/dialog";import{OverlayContainer as n,UNSAFE_PortalProvider as r,useOverlay as d,usePreventScroll as s,useModal as t}from"@react-aria/overlays";import{FocusScope as c}from"@react-aria/focus";import{IconButton as m}from"../IconButton/IconButton.js";import '../../assets/Dialog.css';const u={dialogWrapper:"_dialogWrapper_1sou5_1",overlay:"_overlay_1sou5_10",absolute:"_absolute_1sou5_16",dialog:"_dialog_1sou5_1",noPadding:"_noPadding_1sou5_35",dialogContent:"_dialogContent_1sou5_64",dialogHeading:"_dialogHeading_1sou5_71",dialogContentInner:"_dialogContentInner_1sou5_75",noHeader:"_noHeader_1sou5_81",closeButton:"_closeButton_1sou5_85",dialogSmall:"_dialogSmall_1sou5_102",dialogMedium:"_dialogMedium_1sou5_106",dialogLarge:"_dialogLarge_1sou5_110"},g=({id:e,children:a})=>/* @__PURE__ */o("div",{className:u.dialogHeading,id:e,children:a}),_=({children:e})=>/* @__PURE__ */o("div",{className:u.dialogContentInner,children:e});function p(n){const{onClose:r,size:_="dialogMedium",modal:p=!1,hasDismissButton:h=!0,dismissButtonLabel:y="Close dialog",role:C="dialog",id:b,removePadding:f=!1,zIndex:v,portalContainer:N,children:P}=n,H=i(null),{dialogProps:B}=l({...n,role:C},H),{overlayProps:I,underlayProps:x}=d({isOpen:!0,onClose:r,isDismissable:!0,...n},H);N||s();const{modalProps:z}=t(),j=a.Children.toArray(P).find(o=>a.isValidElement(o)&&o.type===g),D=a.Children.toArray(P).filter(o=>!a.isValidElement(o)||o.type!==g),L=Boolean(j),$=n["aria-labelledby"]||`${b}-header`,M=n["aria-describedby"]||`${b}-content`,S=[u.dialog,u[_],...f?[u.noPadding]:[]].join(" "),V=void 0!==v?{zIndex:v}:{},W=[u.dialogWrapper,...p?[u.modal]:[],...N?[u.absolute]:[]].join(" "),A=[u.overlay,...N?[u.absolute]:[]].join(" ");/* @__PURE__ */
2
+ return e("div",{className:W,style:V,children:[p&&/* @__PURE__ */o("div",{className:A,...x,onClick:r,"aria-hidden":"true"}),
3
+ /* @__PURE__ */o(c,{contain:!0,restoreFocus:!0,autoFocus:!1,children:/* @__PURE__ */e("div",{...I,...B,...z,ref:H,className:S,"data-size":_,id:b,role:C,"aria-labelledby":$,"aria-describedby":M,children:[
4
+ /* @__PURE__ */e("div",{className:`${u.dialogContent} ${L?"":u.noHeader}`,children:[L&&/* @__PURE__ */o("div",{className:u.dialogHeader,id:$,children:j}),
5
+ /* @__PURE__ */o("div",{id:M,children:D})]}),h&&/* @__PURE__ */o("div",{className:u.closeButton,children:/* @__PURE__ */o(m,{onPress:r,styleVariant:"white",emphasis:"primary",size:"sm",iconProps:{iconName:"close",iconPrefix:"far",iconSize:"1x"},tooltipLabel:y,"aria-label":y})})]})})]})}function h(e){const{isOpen:a,children:i,portalContainer:l}=e;if(!a)return null;const d=/* @__PURE__ */o(n,{children:/* @__PURE__ */o(p,{...e,children:i})});return l?/* @__PURE__ */o(r,{getContainer:()=>l,children:d}):d}g.displayName="Dialog.Header",_.displayName="Dialog.Content",h.Header=g,h.Content=_,h.displayName="Dialog";export{h as Dialog,h as default};
6
6
  //# sourceMappingURL=Dialog.js.map
@@ -1,5 +1,5 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{CalloutBanner as n}from"../CalloutBanner/CalloutBanner.js";import i,{useState as o}from"react";import s from"../Link/Link.js";import{Box as t}from"../Box/Box.js";import '../../assets/ErrorSummary.css';const l={"errorSummary-list":"_errorSummary-list_1xa84_1"},m=({title:m,description:a,children:c,...d})=>{const[u,h]=o(!1);if(!c||Array.isArray(c)&&0===c.length)return null;const p=u?c:Array.isArray(c)?c.slice(0,4):[c],y=Array.isArray(c)&&c.length>4;/* @__PURE__ */
2
- return r(n,{title:m,description:a,...d,children:/* @__PURE__ */e(t,{flexDirection:"column",children:[
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{CalloutBanner as n}from"../CalloutBanner/CalloutBanner.js";import i,{useState as o}from"react";import s from"../Link/Link.js";import{Box as t}from"../Box/Box.js";import '../../assets/ErrorSummary.css';const l={"errorSummary-list":"_errorSummary-list_arcqc_1"},m=({title:m,description:c,children:a,...d})=>{const[u,h]=o(!1);if(!a||Array.isArray(a)&&0===a.length)return null;const p=u?a:Array.isArray(a)?a.slice(0,4):[a],y=Array.isArray(a)&&a.length>4;/* @__PURE__ */
2
+ return r(n,{title:m,description:c,...d,children:/* @__PURE__ */e(t,{flexDirection:"column",children:[
3
3
  /* @__PURE__ */r("ul",{className:l["errorSummary-list"],"data-testid":"list",children:i.Children.map(p,(e,n)=>{const o=i.isValidElement(e)?i.cloneElement(e,{iconEndProps:!1}):e;/* @__PURE__ */
4
4
  return r("li",{className:l["errorSummary-item"],children:o},`error-${n}`)})}),y&&!u&&/* @__PURE__ */r(s,{onPress:()=>h(!0),underline:!0,size:"sm",iconEndProps:{iconName:"chevron-down"},children:"Show more"}),u&&y&&/* @__PURE__ */r(s,{onPress:()=>h(!1),underline:!0,size:"sm",iconEndProps:{iconName:"chevron-up"},children:"Show less"})]})})};export{m as ErrorSummary,m as default};
5
5
  //# sourceMappingURL=ErrorSummary.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as i}from"react/jsx-runtime";import{c as a}from"../../index-DiYWUa65.js";import '../../assets/Eyebrow.css';const t=a("_eyebrow_ie5k8_1",{variants:{styleVariant:{inspiration:"_inspiration_ie5k8_14",collect:"_collect_ie5k8_19",spend:"_spend_ie5k8_24",activate:"_activate_ie5k8_29"}},defaultVariants:{styleVariant:"inspiration"}}),e=({children:a,as:e="span",styleVariant:n="inspiration",...s})=>/* @__PURE__ */i(e,{className:`${t({styleVariant:n})} ''}`,...s,children:a});export{e as Eyebrow,e as default};
1
+ import{jsx as i}from"react/jsx-runtime";import{c as a}from"../../index-CCUt_dAN.js";import '../../assets/Eyebrow.css';const t=a("_eyebrow_ie5k8_1",{variants:{styleVariant:{inspiration:"_inspiration_ie5k8_14",collect:"_collect_ie5k8_19",spend:"_spend_ie5k8_24",activate:"_activate_ie5k8_29"}},defaultVariants:{styleVariant:"inspiration"}}),e=({children:a,as:e="span",styleVariant:n="inspiration",...s})=>/* @__PURE__ */i(e,{className:`${t({styleVariant:n})} ''}`,...s,children:a});export{e as Eyebrow,e as default};
2
2
  //# sourceMappingURL=Eyebrow.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as a}from"react/jsx-runtime";import{Form as t}from"react-aria-components";import{c as r}from"../../index-DiYWUa65.js";import '../../assets/Form.css';const m=r("_form_z7r30_1",{variants:{maxWidth:{default:"_form--default_z7r30_12",fullWidth:"_form--fullWidth_z7r30_8"},defaultVariants:{maxWidth:"default"}}}),i=({children:r,maxWidth:i="default",...d})=>/* @__PURE__ */a(t,{className:m({maxWidth:i}),...d,children:r});export{i as Form,i as default};
1
+ import{jsx as a}from"react/jsx-runtime";import{Form as t}from"react-aria-components";import{c as r}from"../../index-CCUt_dAN.js";import '../../assets/Form.css';const m=r("_form_z7r30_1",{variants:{maxWidth:{default:"_form--default_z7r30_12",fullWidth:"_form--fullWidth_z7r30_8"},defaultVariants:{maxWidth:"default"}}}),i=({children:r,maxWidth:i="default",...d})=>/* @__PURE__ */a(t,{className:m({maxWidth:i}),...d,children:r});export{i as Form,i as default};
2
2
  //# sourceMappingURL=Form.js.map
@@ -95,12 +95,12 @@ export interface GridBaseProps extends React.HTMLAttributes<HTMLDivElement> {
95
95
  */
96
96
  rows?: number;
97
97
  /**
98
- * Defines the columns of the grid using CSS grid-template-columns syntax
98
+ * **[Responsive]** Defines the columns of the grid using CSS grid-template-columns syntax
99
99
  * e.g. "1fr 1fr 1fr" or "200px 1fr 200px"
100
100
  */
101
101
  templateColumns?: string;
102
102
  /**
103
- * Defines the rows of the grid using CSS grid-template-rows syntax
103
+ * **[Responsive]** Defines the rows of the grid using CSS grid-template-rows syntax
104
104
  * e.g. "auto auto" or "100px 1fr"
105
105
  */
106
106
  templateRows?: string;
@@ -129,7 +129,7 @@ export interface GridBaseProps extends React.HTMLAttributes<HTMLDivElement> {
129
129
  */
130
130
  style?: React.CSSProperties;
131
131
  }
132
- type ResponsivePropKeys = 'columns' | 'rows' | 'gap' | 'rowGap' | 'columnGap' | 'alignContent';
132
+ type ResponsivePropKeys = 'columns' | 'rows' | 'gap' | 'rowGap' | 'columnGap' | 'alignContent' | 'templateColumns' | 'templateRows';
133
133
  export type GridProps = WithResponsiveProps<GridBaseProps, ResponsivePropKeys>;
134
134
  export declare const Grid: {
135
135
  ({ id, isInline, alignContent, justifyContent, autoColumns, autoFlow, columns, rows, templateColumns, templateRows, gap, rowGap, columnGap, children, style, ...rest }: GridProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport styles from './Grid.module.css';\nimport { SpaceToken, getSpaceValue } from '../../utils/spaceToken/spaceToken';\nimport { responsiveToCssVars } from '../../utils/breakpoint/responsiveToCssVars';\nimport { WithResponsiveProps } from '../../utils/breakpoint/responsiveSSR';\n\ntype AutoFlowValue = 'row' | 'column' | 'dense' | 'row dense' | 'column dense';\ntype AlignContentValue =\n | 'start'\n | 'end'\n | 'center'\n | 'stretch'\n | 'space-around'\n | 'space-between'\n | 'space-evenly';\n\ntype JustifyContentValue =\n | 'start'\n | 'end'\n | 'center'\n | 'stretch'\n | 'space-around'\n | 'space-between'\n | 'space-evenly';\n\n// Define valid HTML elements for polymorphic prop\ntype ValidElements = 'div' | 'span';\n\n// Helper type for polymorphic components\nexport type PolymorphicProps<E extends ValidElements> = {\n as?: E;\n} & Omit<React.ComponentPropsWithRef<E>, 'as'>;\n\n// GridCell Types and Component\nexport interface GridCellBaseProps {\n /**\n * Number of columns/rows this cell should span\n * Can be a single number for column span or an object for both\n */\n span?: number | { column?: number; row?: number };\n /**\n * Named grid area for placing the cell\n */\n area?: string;\n /**\n * Column number where the cell will be placed\n */\n column?: string | number;\n /**\n * Starting column for the cell\n */\n columnStart?: number;\n /**\n * Ending column for spanning multiple columns\n */\n columnEnd?: number;\n /**\n * Row number where the cell will be placed\n */\n row?: string | number;\n /**\n * Starting row for the cell\n */\n rowStart?: number;\n /**\n * Ending row for spanning multiple rows\n */\n rowEnd?: number;\n /**\n * The content of the grid cell\n */\n children: React.ReactNode;\n /**\n * @internal\n * Additional CSS properties to apply to the grid cell\n */\n style?: React.CSSProperties;\n}\n\nexport type GridCellProps<E extends ValidElements = 'div'> = GridCellBaseProps &\n PolymorphicProps<E>;\n\nexport const GridCell = <E extends ValidElements = 'div'>({\n as,\n span,\n area,\n column,\n columnStart,\n columnEnd,\n row,\n rowStart,\n rowEnd,\n children,\n style,\n ...rest\n}: GridCellProps<E>) => {\n // Determine the HTML element to render\n const Component = (as || 'div') as React.ElementType;\n\n // Handle the span prop logic\n const getSpanStyles = () => {\n if (!span) return {};\n\n if (typeof span === 'number') {\n return { gridColumn: `span ${span}` };\n }\n\n return {\n ...(span.column && { gridColumn: `span ${span.column}` }),\n ...(span.row && { gridRow: `span ${span.row}` }),\n };\n };\n\n const gridCellStyle: React.CSSProperties = {\n // Grid area takes precedence over individual positioning\n ...(area && { gridArea: area }),\n\n // If no area is specified, use individual positioning props\n ...(!area && {\n ...(column && { gridColumn: column }),\n ...(columnStart && { gridColumnStart: columnStart }),\n ...(columnEnd && { gridColumnEnd: columnEnd }),\n ...(row && { gridRow: row }),\n ...(rowStart && { gridRowStart: rowStart }),\n ...(rowEnd && { gridRowEnd: rowEnd }),\n }),\n\n // Apply span styles\n ...getSpanStyles(),\n\n // Apply any custom styles\n ...style,\n };\n\n return (\n <Component className={styles.gridCell} style={gridCellStyle} {...rest}>\n {children}\n </Component>\n );\n};\n\n// Grid Types and Component\nexport interface GridBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Optional unique identifier for the grid\n */\n id?: string;\n /**\n * Sets the display to inline-grid if true, and grid if false\n * @default false\n */\n isInline?: boolean;\n /**\n * **[Responsive]** Controls the vertical alignment of the content within the grid\n */\n alignContent?: AlignContentValue;\n /**\n * **[Responsive]** Controls the horizontal alignment of the content within the grid\n */\n justifyContent?: JustifyContentValue;\n /**\n * Determines how columns are automatically created in the grid\n * e.g., \"minmax(100px, 1fr)\" or \"200px\"\n */\n autoColumns?: string;\n /**\n * Sets the flow direction and behavior of the grid's auto-placement\n */\n autoFlow?: AutoFlowValue;\n /**\n * **[Responsive]** Number of columns to create (generates equal-width columns)\n * Takes precedence over templateColumns if both are provided\n */\n columns?: number;\n /**\n * **[Responsive]** Number of rows to create (generates equal-height rows)\n * Takes precedence over templateRows if both are provided\n */\n rows?: number;\n /**\n * Defines the columns of the grid using CSS grid-template-columns syntax\n * e.g. \"1fr 1fr 1fr\" or \"200px 1fr 200px\"\n */\n templateColumns?: string;\n /**\n * Defines the rows of the grid using CSS grid-template-rows syntax\n * e.g. \"auto auto\" or \"100px 1fr\"\n */\n templateRows?: string;\n /**\n * **[Responsive]** Controls the overall space between grid cells\n * @default 'default'\n */\n gap?: SpaceToken;\n /**\n * **[Responsive]** Controls the vertical space between rows\n * @default 'default'\n */\n rowGap?: SpaceToken;\n /**\n * **[Responsive]** Controls the horizontal space between columns\n * @default 'default'\n */\n columnGap?: SpaceToken;\n /**\n * The content of the grid\n */\n children?: React.ReactNode;\n /**\n * @internal\n * Additional CSS properties to apply to the grid\n */\n style?: React.CSSProperties;\n}\n\ntype ResponsivePropKeys =\n | 'columns'\n | 'rows'\n | 'gap'\n | 'rowGap'\n | 'columnGap'\n | 'alignContent';\n\nexport type GridProps = WithResponsiveProps<GridBaseProps, ResponsivePropKeys>;\n\nexport const Grid = ({\n id,\n isInline = false,\n alignContent,\n justifyContent,\n autoColumns,\n autoFlow,\n columns,\n rows,\n templateColumns,\n templateRows,\n gap,\n rowGap,\n columnGap,\n children,\n style,\n ...rest\n}: GridProps) => {\n /**\n * Responsive Props\n */\n // columns take precedence over templateColumns\n const templateColumnsVars =\n columns != null\n ? responsiveToCssVars(columns, {\n varPrefix: '--grid-template-columns',\n normalise: (val) => `repeat(${val}, 1fr)`,\n })\n : templateColumns\n ? responsiveToCssVars(templateColumns, {\n varPrefix: '--grid-template-columns',\n normalise: (val) => val,\n })\n : {};\n\n const templateRowsVars =\n rows != null\n ? responsiveToCssVars(rows, {\n varPrefix: '--grid-template-rows',\n normalise: (val) => `repeat(${val}, 1fr)`,\n })\n : templateRows\n ? responsiveToCssVars(templateRows, {\n varPrefix: '--grid-template-rows',\n normalise: (val) => val,\n })\n : {};\n\n // Preserve \"default\" behaviour: if no gap/rowGap/columnGap, use 'default' at base\n const resolvedGap: typeof gap =\n gap ?? (rowGap == null && columnGap == null ? 'default' : undefined);\n\n const gapVars = responsiveToCssVars(resolvedGap ?? null, {\n varPrefix: '--grid-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n const rowGapVars = responsiveToCssVars(rowGap ?? null, {\n varPrefix: '--grid-row-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n const columnGapVars = responsiveToCssVars(columnGap ?? null, {\n varPrefix: '--grid-column-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n // Responsive alignContent via CSS vars\n\n const alignContentVars = responsiveToCssVars(alignContent ?? null, {\n varPrefix: '--grid-align-content',\n normalise: (val) => val,\n });\n\n const gridStyle: React.CSSProperties = {\n display: isInline ? 'inline-grid' : 'grid',\n gridAutoColumns: autoColumns,\n gridAutoFlow: autoFlow,\n justifyContent: justifyContent,\n ...templateColumnsVars,\n ...templateRowsVars,\n ...gapVars,\n ...rowGapVars,\n ...columnGapVars,\n ...alignContentVars,\n ...style,\n };\n\n return (\n <div id={id} className={styles.grid} style={gridStyle} {...rest}>\n {children}\n </div>\n );\n};\n\nconst isValidElement = (value: unknown): value is ValidElements => {\n const validElements: ValidElements[] = ['div', 'span'];\n return (\n typeof value === 'string' && validElements.includes(value as ValidElements)\n );\n};\n\nGrid.Cell = GridCell;\n\nexport { isValidElement };\nexport default Grid;\n"],"names":["GridCell","as","span","area","column","columnStart","columnEnd","row","rowStart","rowEnd","children","style","rest","Component","gridCellStyle","gridArea","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","jsx","className","styles","gridCell","Grid","id","isInline","alignContent","justifyContent","autoColumns","autoFlow","columns","rows","templateColumns","templateRows","gap","rowGap","columnGap","gridStyle","display","gridAutoColumns","gridAutoFlow","responsiveToCssVars","varPrefix","normalise","val","token","getSpaceValue","grid","isValidElement","value","includes","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,EAAcD,QAGnBJ,EAAoBN,GAAU,KAAM,CACrDO,UAAW,iBACXC,UAAYE,GAAUC,EAAcD,QAGhBJ,EAAoBL,GAAa,KAAM,CAC3DM,UAAW,oBACXC,UAAYE,GAAUC,EAAcD,QAKbJ,EAAoBf,GAAgB,KAAM,CACjEgB,UAAW,uBACXC,UAAYC,GAAQA,OAcjBpC;AAGL,OACEW,EAAC,MAAA,CAAIK,KAAQJ,UAAWC,EAAO0B,KAAMvC,MAAO6B,KAAe5B,EACxDF,cAKDyC,EAAkBC,GAGH,iBAAVA,GAF8B,CAAC,MAAO,QAEFC,SAASD,GAIxD1B,EAAK4B,KAAOtD"}
1
+ {"version":3,"file":"Grid.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport styles from './Grid.module.css';\nimport { SpaceToken, getSpaceValue } from '../../utils/spaceToken/spaceToken';\nimport { responsiveToCssVars } from '../../utils/breakpoint/responsiveToCssVars';\nimport { WithResponsiveProps } from '../../utils/breakpoint/responsiveSSR';\n\ntype AutoFlowValue = 'row' | 'column' | 'dense' | 'row dense' | 'column dense';\ntype AlignContentValue =\n | 'start'\n | 'end'\n | 'center'\n | 'stretch'\n | 'space-around'\n | 'space-between'\n | 'space-evenly';\n\ntype JustifyContentValue =\n | 'start'\n | 'end'\n | 'center'\n | 'stretch'\n | 'space-around'\n | 'space-between'\n | 'space-evenly';\n\n// Define valid HTML elements for polymorphic prop\ntype ValidElements = 'div' | 'span';\n\n// Helper type for polymorphic components\nexport type PolymorphicProps<E extends ValidElements> = {\n as?: E;\n} & Omit<React.ComponentPropsWithRef<E>, 'as'>;\n\n// GridCell Types and Component\nexport interface GridCellBaseProps {\n /**\n * Number of columns/rows this cell should span\n * Can be a single number for column span or an object for both\n */\n span?: number | { column?: number; row?: number };\n /**\n * Named grid area for placing the cell\n */\n area?: string;\n /**\n * Column number where the cell will be placed\n */\n column?: string | number;\n /**\n * Starting column for the cell\n */\n columnStart?: number;\n /**\n * Ending column for spanning multiple columns\n */\n columnEnd?: number;\n /**\n * Row number where the cell will be placed\n */\n row?: string | number;\n /**\n * Starting row for the cell\n */\n rowStart?: number;\n /**\n * Ending row for spanning multiple rows\n */\n rowEnd?: number;\n /**\n * The content of the grid cell\n */\n children: React.ReactNode;\n /**\n * @internal\n * Additional CSS properties to apply to the grid cell\n */\n style?: React.CSSProperties;\n}\n\nexport type GridCellProps<E extends ValidElements = 'div'> = GridCellBaseProps &\n PolymorphicProps<E>;\n\nexport const GridCell = <E extends ValidElements = 'div'>({\n as,\n span,\n area,\n column,\n columnStart,\n columnEnd,\n row,\n rowStart,\n rowEnd,\n children,\n style,\n ...rest\n}: GridCellProps<E>) => {\n // Determine the HTML element to render\n const Component = (as || 'div') as React.ElementType;\n\n // Handle the span prop logic\n const getSpanStyles = () => {\n if (!span) return {};\n\n if (typeof span === 'number') {\n return { gridColumn: `span ${span}` };\n }\n\n return {\n ...(span.column && { gridColumn: `span ${span.column}` }),\n ...(span.row && { gridRow: `span ${span.row}` }),\n };\n };\n\n const gridCellStyle: React.CSSProperties = {\n // Grid area takes precedence over individual positioning\n ...(area && { gridArea: area }),\n\n // If no area is specified, use individual positioning props\n ...(!area && {\n ...(column && { gridColumn: column }),\n ...(columnStart && { gridColumnStart: columnStart }),\n ...(columnEnd && { gridColumnEnd: columnEnd }),\n ...(row && { gridRow: row }),\n ...(rowStart && { gridRowStart: rowStart }),\n ...(rowEnd && { gridRowEnd: rowEnd }),\n }),\n\n // Apply span styles\n ...getSpanStyles(),\n\n // Apply any custom styles\n ...style,\n };\n\n return (\n <Component className={styles.gridCell} style={gridCellStyle} {...rest}>\n {children}\n </Component>\n );\n};\n\n// Grid Types and Component\nexport interface GridBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Optional unique identifier for the grid\n */\n id?: string;\n /**\n * Sets the display to inline-grid if true, and grid if false\n * @default false\n */\n isInline?: boolean;\n /**\n * **[Responsive]** Controls the vertical alignment of the content within the grid\n */\n alignContent?: AlignContentValue;\n /**\n * **[Responsive]** Controls the horizontal alignment of the content within the grid\n */\n justifyContent?: JustifyContentValue;\n /**\n * Determines how columns are automatically created in the grid\n * e.g., \"minmax(100px, 1fr)\" or \"200px\"\n */\n autoColumns?: string;\n /**\n * Sets the flow direction and behavior of the grid's auto-placement\n */\n autoFlow?: AutoFlowValue;\n /**\n * **[Responsive]** Number of columns to create (generates equal-width columns)\n * Takes precedence over templateColumns if both are provided\n */\n columns?: number;\n /**\n * **[Responsive]** Number of rows to create (generates equal-height rows)\n * Takes precedence over templateRows if both are provided\n */\n rows?: number;\n /**\n * **[Responsive]** Defines the columns of the grid using CSS grid-template-columns syntax\n * e.g. \"1fr 1fr 1fr\" or \"200px 1fr 200px\"\n */\n templateColumns?: string;\n /**\n * **[Responsive]** Defines the rows of the grid using CSS grid-template-rows syntax\n * e.g. \"auto auto\" or \"100px 1fr\"\n */\n templateRows?: string;\n /**\n * **[Responsive]** Controls the overall space between grid cells\n * @default 'default'\n */\n gap?: SpaceToken;\n /**\n * **[Responsive]** Controls the vertical space between rows\n * @default 'default'\n */\n rowGap?: SpaceToken;\n /**\n * **[Responsive]** Controls the horizontal space between columns\n * @default 'default'\n */\n columnGap?: SpaceToken;\n /**\n * The content of the grid\n */\n children?: React.ReactNode;\n /**\n * @internal\n * Additional CSS properties to apply to the grid\n */\n style?: React.CSSProperties;\n}\n\ntype ResponsivePropKeys =\n | 'columns'\n | 'rows'\n | 'gap'\n | 'rowGap'\n | 'columnGap'\n | 'alignContent'\n | 'templateColumns'\n | 'templateRows';\n\nexport type GridProps = WithResponsiveProps<GridBaseProps, ResponsivePropKeys>;\n\nexport const Grid = ({\n id,\n isInline = false,\n alignContent,\n justifyContent,\n autoColumns,\n autoFlow,\n columns,\n rows,\n templateColumns,\n templateRows,\n gap,\n rowGap,\n columnGap,\n children,\n style,\n ...rest\n}: GridProps) => {\n /**\n * Responsive Props\n */\n // columns take precedence over templateColumns\n const templateColumnsVars =\n columns != null\n ? responsiveToCssVars(columns, {\n varPrefix: '--grid-template-columns',\n normalise: (val) => `repeat(${val}, 1fr)`,\n })\n : templateColumns\n ? responsiveToCssVars(templateColumns, {\n varPrefix: '--grid-template-columns',\n normalise: (val) => val,\n })\n : {};\n\n const templateRowsVars =\n rows != null\n ? responsiveToCssVars(rows, {\n varPrefix: '--grid-template-rows',\n normalise: (val) => `repeat(${val}, 1fr)`,\n })\n : templateRows\n ? responsiveToCssVars(templateRows, {\n varPrefix: '--grid-template-rows',\n normalise: (val) => val,\n })\n : {};\n\n // Preserve \"default\" behaviour: if no gap/rowGap/columnGap, use 'default' at base\n const resolvedGap: typeof gap =\n gap ?? (rowGap == null && columnGap == null ? 'default' : undefined);\n\n const gapVars = responsiveToCssVars(resolvedGap ?? null, {\n varPrefix: '--grid-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n const rowGapVars = responsiveToCssVars(rowGap ?? null, {\n varPrefix: '--grid-row-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n const columnGapVars = responsiveToCssVars(columnGap ?? null, {\n varPrefix: '--grid-column-gap',\n normalise: (token) => getSpaceValue(token as SpaceToken),\n });\n\n // Responsive alignContent via CSS vars\n\n const alignContentVars = responsiveToCssVars(alignContent ?? null, {\n varPrefix: '--grid-align-content',\n normalise: (val) => val,\n });\n\n const gridStyle: React.CSSProperties = {\n display: isInline ? 'inline-grid' : 'grid',\n gridAutoColumns: autoColumns,\n gridAutoFlow: autoFlow,\n justifyContent: justifyContent,\n ...templateColumnsVars,\n ...templateRowsVars,\n ...gapVars,\n ...rowGapVars,\n ...columnGapVars,\n ...alignContentVars,\n ...style,\n };\n\n return (\n <div id={id} className={styles.grid} style={gridStyle} {...rest}>\n {children}\n </div>\n );\n};\n\nconst isValidElement = (value: unknown): value is ValidElements => {\n const validElements: ValidElements[] = ['div', 'span'];\n return (\n typeof value === 'string' && validElements.includes(value as ValidElements)\n );\n};\n\nGrid.Cell = GridCell;\n\nexport { isValidElement };\nexport default Grid;\n"],"names":["GridCell","as","span","area","column","columnStart","columnEnd","row","rowStart","rowEnd","children","style","rest","Component","gridCellStyle","gridArea","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","jsx","className","styles","gridCell","Grid","id","isInline","alignContent","justifyContent","autoColumns","autoFlow","columns","rows","templateColumns","templateRows","gap","rowGap","columnGap","gridStyle","display","gridAutoColumns","gridAutoFlow","responsiveToCssVars","varPrefix","normalise","val","token","getSpaceValue","grid","isValidElement","value","includes","Cell"],"mappings":"gOAkFaA,EAAW,EACtBC,KACAC,OACAC,OACAC,SACAC,cACAC,YACAC,MACAC,WACAC,SACAC,WACAC,WACGC,MAGH,MAAMC,EAAaZ,GAAM,MAgBnBa,EAAqC,IAErCX,GAAQ,CAAEY,SAAUZ,OAGnBA,GAAQ,IACPC,GAAU,CAAEY,WAAYZ,MACxBC,GAAe,CAAEY,gBAAiBZ,MAClCC,GAAa,CAAEY,cAAeZ,MAC9BC,GAAO,CAAEY,QAASZ,MAClBC,GAAY,CAAEY,aAAcZ,MAC5BC,GAAU,CAAEY,WAAYZ,OAvBzBP,EAEe,iBAATA,EACF,CAAEc,WAAY,QAAQd,KAGxB,IACDA,EAAKE,QAAU,CAAEY,WAAY,QAAQd,EAAKE,aAC1CF,EAAKK,KAAO,CAAEY,QAAS,QAAQjB,EAAKK,QARxB,CAAA,KA8BfI;AAGL,OACEW,EAACT,GAAUU,UAAWC,EAAOC,SAAUd,MAAOG,KAAmBF,EAC9DF,cA2FMgB,EAAO,EAClBC,KACAC,YAAW,EACXC,eACAC,iBACAC,cACAC,WACAC,UACAC,OACAC,kBACAC,eACAC,MACAC,SACAC,YACA7B,WACAC,WACGC,MAMH,MAoDM4B,EAAiC,CACrCC,QAASb,EAAW,cAAgB,OACpCc,gBAAiBX,EACjBY,aAAcX,EACdF,oBAvDW,MAAXG,EACIW,EAAoBX,EAAS,CAC3BY,UAAW,0BACXC,UAAYC,GAAQ,UAAUA,YAEhCZ,EACES,EAAoBT,EAAiB,CACnCU,UAAW,0BACXC,UAAYC,GAAQA,IAEtB,CAAA,KAGE,MAARb,EACIU,EAAoBV,EAAM,CACxBW,UAAW,uBACXC,UAAYC,GAAQ,UAAUA,YAEhCX,EACEQ,EAAoBR,EAAc,CAChCS,UAAW,uBACXC,UAAYC,GAAQA,IAEtB,CAAA,KAMQH,EAFdP,IAAkB,MAAVC,GAA+B,MAAbC,EAAoB,eAAY,IAET,KAAM,CACvDM,UAAW,aACXC,UAAYE,GAAUC,EAAcD,QAGnBJ,EAAoBN,GAAU,KAAM,CACrDO,UAAW,iBACXC,UAAYE,GAAUC,EAAcD,QAGhBJ,EAAoBL,GAAa,KAAM,CAC3DM,UAAW,oBACXC,UAAYE,GAAUC,EAAcD,QAKbJ,EAAoBf,GAAgB,KAAM,CACjEgB,UAAW,uBACXC,UAAYC,GAAQA,OAcjBpC;AAGL,OACEW,EAAC,MAAA,CAAIK,KAAQJ,UAAWC,EAAO0B,KAAMvC,MAAO6B,KAAe5B,EACxDF,cAKDyC,EAAkBC,GAGH,iBAAVA,GAF8B,CAAC,MAAO,QAEFC,SAASD,GAIxD1B,EAAK4B,KAAOtD"}
@@ -1,3 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import{c as s}from"../../index-DiYWUa65.js";import{foregroundColorVariants as _}from"../../utils/foregroundColour/foregroundColor.js";import '../../assets/truncate.css';import '../../assets/Heading.css';/* empty css */import{getBaseValue as l,generateResponsiveClasses as t}from"../../utils/breakpoint/responsiveSSR.js";const i={heading:"_heading_eo0p3_1","size--xxs":"_size--xxs_eo0p3_48","size--xs":"_size--xs_eo0p3_51","size--sm":"_size--sm_eo0p3_54","size--md":"_size--md_eo0p3_57","size--lg":"_size--lg_eo0p3_60","size--xl":"_size--xl_eo0p3_63","align--start":"_align--start_eo0p3_80","align--center":"_align--center_eo0p3_83","align--end":"_align--end_eo0p3_86","truncate--true":"_truncate--true_eo0p3_106","truncate--false":"_truncate--false_eo0p3_110","sm:size--xxs":"_sm:size--xxs_eo0p3_1","sm:size--xs":"_sm:size--xs_eo0p3_1","sm:size--sm":"_sm:size--sm_eo0p3_1","sm:size--md":"_sm:size--md_eo0p3_1","sm:size--lg":"_sm:size--lg_eo0p3_1","sm:size--xl":"_sm:size--xl_eo0p3_1","sm:align--start":"_sm:align--start_eo0p3_1","sm:align--center":"_sm:align--center_eo0p3_1","sm:align--end":"_sm:align--end_eo0p3_1","sm:truncate--true":"_sm:truncate--true_eo0p3_1","sm:truncate--false":"_sm:truncate--false_eo0p3_1","md:size--xxs":"_md:size--xxs_eo0p3_1","md:size--xs":"_md:size--xs_eo0p3_1","md:size--sm":"_md:size--sm_eo0p3_1","md:size--md":"_md:size--md_eo0p3_1","md:size--lg":"_md:size--lg_eo0p3_1","md:size--xl":"_md:size--xl_eo0p3_1","md:align--start":"_md:align--start_eo0p3_1","md:align--center":"_md:align--center_eo0p3_1","md:align--end":"_md:align--end_eo0p3_1","md:truncate--true":"_md:truncate--true_eo0p3_1","md:truncate--false":"_md:truncate--false_eo0p3_1","lg:size--xxs":"_lg:size--xxs_eo0p3_1","lg:size--xs":"_lg:size--xs_eo0p3_1","lg:size--sm":"_lg:size--sm_eo0p3_1","lg:size--md":"_lg:size--md_eo0p3_1","lg:size--lg":"_lg:size--lg_eo0p3_1","lg:size--xl":"_lg:size--xl_eo0p3_1","lg:align--start":"_lg:align--start_eo0p3_1","lg:align--center":"_lg:align--center_eo0p3_1","lg:align--end":"_lg:align--end_eo0p3_1","lg:truncate--true":"_lg:truncate--true_eo0p3_1","lg:truncate--false":"_lg:truncate--false_eo0p3_1","xl:size--xxs":"_xl:size--xxs_eo0p3_1","xl:size--xs":"_xl:size--xs_eo0p3_1","xl:size--sm":"_xl:size--sm_eo0p3_1","xl:size--md":"_xl:size--md_eo0p3_1","xl:size--lg":"_xl:size--lg_eo0p3_1","xl:size--xl":"_xl:size--xl_eo0p3_1","xl:align--start":"_xl:align--start_eo0p3_1","xl:align--center":"_xl:align--center_eo0p3_1","xl:align--end":"_xl:align--end_eo0p3_1","xl:truncate--true":"_xl:truncate--true_eo0p3_1","xl:truncate--false":"_xl:truncate--false_eo0p3_1","xxl:size--xxs":"_xxl:size--xxs_eo0p3_1","xxl:size--xs":"_xxl:size--xs_eo0p3_1","xxl:size--sm":"_xxl:size--sm_eo0p3_1","xxl:size--md":"_xxl:size--md_eo0p3_1","xxl:size--lg":"_xxl:size--lg_eo0p3_1","xxl:size--xl":"_xxl:size--xl_eo0p3_1","xxl:align--start":"_xxl:align--start_eo0p3_1","xxl:align--center":"_xxl:align--center_eo0p3_1","xxl:align--end":"_xxl:align--end_eo0p3_1","xxl:truncate--true":"_xxl:truncate--true_eo0p3_1","xxl:truncate--false":"_xxl:truncate--false_eo0p3_1"},x=t(i),n=s(i.heading,{variants:{size:{xxs:i["size--xxs"],xs:i["size--xs"],sm:i["size--sm"],md:i["size--md"],lg:i["size--lg"],xl:i["size--xl"]},textAlign:{start:i["align--start"],center:i["align--center"],end:i["align--end"]},truncate:{true:i["truncate--true"],false:i["truncate--false"]}},defaultVariants:{size:"md",textAlign:"start"}}),a={h1:"xl",h2:"lg",h3:"md",h4:"sm",h5:"xs",h6:"xxs",span:"md",legend:"sm"},r=({children:s,as:t="h1",size:i,foregroundColor:r="accentSecondary",textAlign:o="start",truncate:g=!1,...m})=>{const z=a[t]??"md",p=i??z,d=l(p,z),c=l(o,"start"),u=l(g,!1),f=x(p,"size"),h=x(o,"align"),j=x(g,"truncate");/* @__PURE__ */
2
- return e(t,{className:[n({size:d,textAlign:c,truncate:u}),_({foregroundColor:r}),...f,...h,...j].filter(Boolean).join(" "),...m,children:s})};export{a as DEFAULT_HEADING_SIZE_MAP,r as Heading,r as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{c as s}from"../../index-CCUt_dAN.js";import{foregroundColorVariants as _}from"../../utils/foregroundColour/foregroundColor.js";import '../../assets/truncate.css';import '../../assets/Heading.css';/* empty css */import{getBaseValue as l,generateResponsiveClasses as t}from"../../utils/breakpoint/responsiveSSR.js";const i={heading:"_heading_eo0p3_1","size--xxs":"_size--xxs_eo0p3_48","size--xs":"_size--xs_eo0p3_51","size--sm":"_size--sm_eo0p3_54","size--md":"_size--md_eo0p3_57","size--lg":"_size--lg_eo0p3_60","size--xl":"_size--xl_eo0p3_63","align--start":"_align--start_eo0p3_80","align--center":"_align--center_eo0p3_83","align--end":"_align--end_eo0p3_86","truncate--true":"_truncate--true_eo0p3_106","truncate--false":"_truncate--false_eo0p3_110","sm:size--xxs":"_sm:size--xxs_eo0p3_1","sm:size--xs":"_sm:size--xs_eo0p3_1","sm:size--sm":"_sm:size--sm_eo0p3_1","sm:size--md":"_sm:size--md_eo0p3_1","sm:size--lg":"_sm:size--lg_eo0p3_1","sm:size--xl":"_sm:size--xl_eo0p3_1","sm:align--start":"_sm:align--start_eo0p3_1","sm:align--center":"_sm:align--center_eo0p3_1","sm:align--end":"_sm:align--end_eo0p3_1","sm:truncate--true":"_sm:truncate--true_eo0p3_1","sm:truncate--false":"_sm:truncate--false_eo0p3_1","md:size--xxs":"_md:size--xxs_eo0p3_1","md:size--xs":"_md:size--xs_eo0p3_1","md:size--sm":"_md:size--sm_eo0p3_1","md:size--md":"_md:size--md_eo0p3_1","md:size--lg":"_md:size--lg_eo0p3_1","md:size--xl":"_md:size--xl_eo0p3_1","md:align--start":"_md:align--start_eo0p3_1","md:align--center":"_md:align--center_eo0p3_1","md:align--end":"_md:align--end_eo0p3_1","md:truncate--true":"_md:truncate--true_eo0p3_1","md:truncate--false":"_md:truncate--false_eo0p3_1","lg:size--xxs":"_lg:size--xxs_eo0p3_1","lg:size--xs":"_lg:size--xs_eo0p3_1","lg:size--sm":"_lg:size--sm_eo0p3_1","lg:size--md":"_lg:size--md_eo0p3_1","lg:size--lg":"_lg:size--lg_eo0p3_1","lg:size--xl":"_lg:size--xl_eo0p3_1","lg:align--start":"_lg:align--start_eo0p3_1","lg:align--center":"_lg:align--center_eo0p3_1","lg:align--end":"_lg:align--end_eo0p3_1","lg:truncate--true":"_lg:truncate--true_eo0p3_1","lg:truncate--false":"_lg:truncate--false_eo0p3_1","xl:size--xxs":"_xl:size--xxs_eo0p3_1","xl:size--xs":"_xl:size--xs_eo0p3_1","xl:size--sm":"_xl:size--sm_eo0p3_1","xl:size--md":"_xl:size--md_eo0p3_1","xl:size--lg":"_xl:size--lg_eo0p3_1","xl:size--xl":"_xl:size--xl_eo0p3_1","xl:align--start":"_xl:align--start_eo0p3_1","xl:align--center":"_xl:align--center_eo0p3_1","xl:align--end":"_xl:align--end_eo0p3_1","xl:truncate--true":"_xl:truncate--true_eo0p3_1","xl:truncate--false":"_xl:truncate--false_eo0p3_1","xxl:size--xxs":"_xxl:size--xxs_eo0p3_1","xxl:size--xs":"_xxl:size--xs_eo0p3_1","xxl:size--sm":"_xxl:size--sm_eo0p3_1","xxl:size--md":"_xxl:size--md_eo0p3_1","xxl:size--lg":"_xxl:size--lg_eo0p3_1","xxl:size--xl":"_xxl:size--xl_eo0p3_1","xxl:align--start":"_xxl:align--start_eo0p3_1","xxl:align--center":"_xxl:align--center_eo0p3_1","xxl:align--end":"_xxl:align--end_eo0p3_1","xxl:truncate--true":"_xxl:truncate--true_eo0p3_1","xxl:truncate--false":"_xxl:truncate--false_eo0p3_1"},x=t(i),n=s(i.heading,{variants:{size:{xxs:i["size--xxs"],xs:i["size--xs"],sm:i["size--sm"],md:i["size--md"],lg:i["size--lg"],xl:i["size--xl"]},textAlign:{start:i["align--start"],center:i["align--center"],end:i["align--end"]},truncate:{true:i["truncate--true"],false:i["truncate--false"]}},defaultVariants:{size:"md",textAlign:"start"}}),a={h1:"xl",h2:"lg",h3:"md",h4:"sm",h5:"xs",h6:"xxs",span:"md",legend:"sm"},r=({children:s,as:t="h1",size:i,foregroundColor:r="accentSecondary",textAlign:o="start",truncate:g=!1,...m})=>{const z=a[t]??"md",p=i??z,d=l(p,z),u=l(o,"start"),c=l(g,!1),f=x(p,"size"),h=x(o,"align"),j=x(g,"truncate");/* @__PURE__ */
2
+ return e(t,{className:[n({size:d,textAlign:u,truncate:c}),_({foregroundColor:r}),...f,...h,...j].filter(Boolean).join(" "),...m,children:s})};export{a as DEFAULT_HEADING_SIZE_MAP,r as Heading,r as default};
3
3
  //# sourceMappingURL=Heading.js.map
@@ -1,3 +1,3 @@
1
- import{jsx as i}from"react/jsx-runtime";import{c as n}from"../../index-DiYWUa65.js";import{useState as e,useEffect as o}from"react";import{foregroundColorVariants as a}from"../../utils/foregroundColour/foregroundColor.js";import{backgroundColorVariants as _}from"../../utils/backgroundColor/backgroundColor.js";import '../../assets/Icon.css';const c="_iconSize0_5x_1henv_9",d="_iconSize0_75x_1henv_13",r="_iconSize1x_1henv_17",s="_iconSize1_25x_1henv_21",p="_iconSize1_5x_1henv_25",x="_iconSize2x_1henv_29",l="_iconSize2_5x_1henv_33",h="_iconSize3x_1henv_37",z="_iconSize4x_1henv_41",S="_iconSize5x_1henv_45",g="_iconSize6x_1henv_49",v="_iconSize7x_1henv_53",w="_iconSize8x_1henv_57",t="_iconSize9x_1henv_61",f="_iconSize10x_1henv_65",m="_icon-wrapper--0_75--none_1henv_90",u="_icon-wrapper--0_75--fixedwidth_1henv_95",y="_icon-wrapper--0_75--square_1henv_100",q="_icon-wrapper--0_75--roomy_1henv_105",W="_icon-wrapper--1--none_1henv_111",$="_icon-wrapper--1--fixedwidth_1henv_116",b="_icon-wrapper--1--square_1henv_121",C="_icon-wrapper--1--roomy_1henv_126",N="_icon-wrapper--1_25--none_1henv_132",j="_icon-wrapper--1_25--fixedwidth_1henv_137",k="_icon-wrapper--1_25--square_1henv_142",D="_icon-wrapper--1_25--roomy_1henv_147",P="_icon-wrapper--2--none_1henv_174",V="_icon-wrapper--2--fixedwidth_1henv_179",B="_icon-wrapper--2--square_1henv_184",E="_icon-wrapper--2--roomy_1henv_189",A="_icon-wrapper--3--none_1henv_216",F="_icon-wrapper--3--fixedwidth_1henv_221",I="_icon-wrapper--3--square_1henv_226",O="_icon-wrapper--3--roomy_1henv_231",G="_icon-wrapper--size-0_75x_1henv_389",H="_icon-wrapper--size-1x_1henv_394",J="_icon-wrapper--size-1_25x_1henv_399",K="_icon-wrapper--size-2x_1henv_409",L="_icon-wrapper--size-3x_1henv_419",M="_icon_1henv_1",Q="_fixedWidth_1henv_460",R="_square_1henv_464",T="_roomy_1henv_468",U=n("_icon-wrapper_1henv_1",{variants:{iconSize:{"0.5x":"_icon-wrapper--size-0_5x_1henv_384","0.75x":G,"1x":H,"1.25x":J,"1.5x":"_icon-wrapper--size-1_5x_1henv_404","2x":K,"2.5x":"_icon-wrapper--size-2_5x_1henv_414","3x":L,"4x":"_icon-wrapper--size-4x_1henv_424","5x":"_icon-wrapper--size-5x_1henv_429","6x":"_icon-wrapper--size-6x_1henv_434","7x":"_icon-wrapper--size-7x_1henv_439","8x":"_icon-wrapper--size-8x_1henv_444","9x":"_icon-wrapper--size-9x_1henv_449","10x":"_icon-wrapper--size-10x_1henv_454",default:H,lg:J,sm:H,xs:H,"2xs":G,xl:K,"2xl":L},padding:{none:"",fixedWidth:"",square:"",roomy:""}},compoundVariants:[{iconSize:"0.5x",padding:"none",class:"_icon-wrapper--0_5--none_1henv_70"},{iconSize:"0.5x",padding:"fixedWidth",class:"_icon-wrapper--0_5--fixedwidth_1henv_75"},{iconSize:"0.5x",padding:"square",class:"_icon-wrapper--0_5--square_1henv_80"},{iconSize:"0.5x",padding:"roomy",class:"_icon-wrapper--0_5--roomy_1henv_85"},{iconSize:"0.75x",padding:"none",class:m},{iconSize:"0.75x",padding:"fixedWidth",class:u},{iconSize:"0.75x",padding:"square",class:y},{iconSize:"0.75x",padding:"roomy",class:q},{iconSize:"1x",padding:"none",class:W},{iconSize:"1x",padding:"fixedWidth",class:$},{iconSize:"1x",padding:"square",class:b},{iconSize:"1x",padding:"roomy",class:C},{iconSize:"1.25x",padding:"none",class:N},{iconSize:"1.25x",padding:"fixedWidth",class:j},{iconSize:"1.25x",padding:"square",class:k},{iconSize:"1.25x",padding:"roomy",class:D},{iconSize:"1.5x",padding:"none",class:"_icon-wrapper--1_5--none_1henv_153"},{iconSize:"1.5x",padding:"fixedWidth",class:"_icon-wrapper--1_5--fixedwidth_1henv_158"},{iconSize:"1.5x",padding:"square",class:"_icon-wrapper--1_5--square_1henv_163"},{iconSize:"1.5x",padding:"roomy",class:"_icon-wrapper--1_5--roomy_1henv_168"},{iconSize:"2x",padding:"none",class:P},{iconSize:"2x",padding:"fixedWidth",class:V},{iconSize:"2x",padding:"square",class:B},{iconSize:"2x",padding:"roomy",class:E},{iconSize:"2.5x",padding:"none",class:"_icon-wrapper--2_5--none_1henv_195"},{iconSize:"2.5x",padding:"fixedWidth",class:"_icon-wrapper--2_5--fixedwidth_1henv_200"},{iconSize:"2.5x",padding:"square",class:"_icon-wrapper--2_5--square_1henv_205"},{iconSize:"2.5x",padding:"roomy",class:"_icon-wrapper--2_5--roomy_1henv_210"},{iconSize:"3x",padding:"none",class:A},{iconSize:"3x",padding:"fixedWidth",class:F},{iconSize:"3x",padding:"square",class:I},{iconSize:"3x",padding:"roomy",class:O},{iconSize:"4x",padding:"none",class:"_icon-wrapper--4--none_1henv_237"},{iconSize:"4x",padding:"fixedWidth",class:"_icon-wrapper--4--fixedwidth_1henv_242"},{iconSize:"4x",padding:"square",class:"_icon-wrapper--4--square_1henv_247"},{iconSize:"4x",padding:"roomy",class:"_icon-wrapper--4--roomy_1henv_252"},{iconSize:"5x",padding:"none",class:"_icon-wrapper--5--none_1henv_258"},{iconSize:"5x",padding:"fixedWidth",class:"_icon-wrapper--5--fixedwidth_1henv_263"},{iconSize:"5x",padding:"square",class:"_icon-wrapper--5--square_1henv_268"},{iconSize:"5x",padding:"roomy",class:"_icon-wrapper--5--roomy_1henv_273"},{iconSize:"6x",padding:"none",class:"_icon-wrapper--6--none_1henv_279"},{iconSize:"6x",padding:"fixedWidth",class:"_icon-wrapper--6--fixedwidth_1henv_284"},{iconSize:"6x",padding:"square",class:"_icon-wrapper--6--square_1henv_289"},{iconSize:"6x",padding:"roomy",class:"_icon-wrapper--6--roomy_1henv_294"},{iconSize:"7x",padding:"none",class:"_icon-wrapper--7--none_1henv_300"},{iconSize:"7x",padding:"fixedWidth",class:"_icon-wrapper--7--fixedwidth_1henv_305"},{iconSize:"7x",padding:"square",class:"_icon-wrapper--7--square_1henv_310"},{iconSize:"7x",padding:"roomy",class:"_icon-wrapper--7--roomy_1henv_315"},{iconSize:"8x",padding:"none",class:"_icon-wrapper--8--none_1henv_321"},{iconSize:"8x",padding:"fixedWidth",class:"_icon-wrapper--8--fixedwidth_1henv_326"},{iconSize:"8x",padding:"square",class:"_icon-wrapper--8--square_1henv_331"},{iconSize:"8x",padding:"roomy",class:"_icon-wrapper--8--roomy_1henv_336"},{iconSize:"9x",padding:"none",class:"_icon-wrapper--9--none_1henv_342"},{iconSize:"9x",padding:"fixedWidth",class:"_icon-wrapper--9--fixedwidth_1henv_347"},{iconSize:"9x",padding:"square",class:"_icon-wrapper--9--square_1henv_352"},{iconSize:"9x",padding:"roomy",class:"_icon-wrapper--9--roomy_1henv_357"},{iconSize:"10x",padding:"none",class:"_icon-wrapper--10--none_1henv_363"},{iconSize:"10x",padding:"fixedWidth",class:"_icon-wrapper--10--fixedwidth_1henv_368"},{iconSize:"10x",padding:"square",class:"_icon-wrapper--10--square_1henv_373"},{iconSize:"10x",padding:"roomy",class:"_icon-wrapper--10--roomy_1henv_378"},{iconSize:"default",padding:"none",class:W},{iconSize:"default",padding:"fixedWidth",class:$},{iconSize:"default",padding:"square",class:b},{iconSize:"default",padding:"roomy",class:C},{iconSize:"lg",padding:"none",class:N},{iconSize:"lg",padding:"fixedWidth",class:j},{iconSize:"lg",padding:"square",class:k},{iconSize:"lg",padding:"roomy",class:D},{iconSize:"sm",padding:"none",class:W},{iconSize:"sm",padding:"fixedWidth",class:$},{iconSize:"sm",padding:"square",class:b},{iconSize:"sm",padding:"roomy",class:C},{iconSize:"xs",padding:"none",class:W},{iconSize:"xs",padding:"fixedWidth",class:$},{iconSize:"xs",padding:"square",class:b},{iconSize:"xs",padding:"roomy",class:C},{iconSize:"2xs",padding:"none",class:m},{iconSize:"2xs",padding:"fixedWidth",class:u},{iconSize:"2xs",padding:"square",class:y},{iconSize:"2xs",padding:"roomy",class:q},{iconSize:"xl",padding:"none",class:P},{iconSize:"xl",padding:"fixedWidth",class:V},{iconSize:"xl",padding:"square",class:B},{iconSize:"xl",padding:"roomy",class:E},{iconSize:"2xl",padding:"none",class:A},{iconSize:"2xl",padding:"fixedWidth",class:F},{iconSize:"2xl",padding:"square",class:I},{iconSize:"2xl",padding:"roomy",class:O}]}),X=n(M,{variants:{padding:{none:"",fixedWidth:Q,square:R,roomy:T},iconSize:{"0.5x":c,"0.75x":d,"1x":r,"1.25x":s,"1.5x":p,"2x":x,"2.5x":l,"3x":h,"4x":z,"5x":S,"6x":g,"7x":v,"8x":w,"9x":t,"10x":f,default:r,lg:s,sm:r,xs:r,"2xs":d,xl:x,"2xl":h}}}),Y=({iconName:n,iconPrefix:c="far",iconSize:d="1x",iconPack:r,color:s,padding:p="none",flip:x,fixedWidth:l=!0,listItem:h,border:z,rotation:S,pull:g,isDecorative:v,spin:w,className:t,privateBgColorVariant:f,...m})=>{"development"===process.env.NODE_ENV&&v&&console.warn("`isDecorative` prop is deprecated and will be removed in future versions due to FontAwesome v7 accessibility changes. Please use `aria-label` instead.");const[u,y]=e(0);o(()=>{y(i=>i+1)},[n,c,d,r,s,p,x,l,h,z,S,g,w,f]);const q=[c,`fa-${n}`,["2x","3x","4x","5x","6x","7x","8x","9x","10x"].includes(d||"")?`fa-${d}`:"",r?`fa-${r}`:"",x?`fa-flip-${x}`:"",l?"fa-fw":"",h?"fa-li":"",z?"fa-border":"",S?`fa-rotate-${S}`:"",g?`fa-pull-${g}`:"",w?"fa-spin":""].filter(Boolean).join(" "),W=m["data-testid"];/* @__PURE__ */
1
+ import{jsx as i}from"react/jsx-runtime";import{c as n}from"../../index-CCUt_dAN.js";import{useState as e,useEffect as o}from"react";import{foregroundColorVariants as a}from"../../utils/foregroundColour/foregroundColor.js";import{backgroundColorVariants as _}from"../../utils/backgroundColor/backgroundColor.js";import '../../assets/Icon.css';const c="_iconSize0_5x_1henv_9",d="_iconSize0_75x_1henv_13",r="_iconSize1x_1henv_17",s="_iconSize1_25x_1henv_21",p="_iconSize1_5x_1henv_25",x="_iconSize2x_1henv_29",l="_iconSize2_5x_1henv_33",h="_iconSize3x_1henv_37",z="_iconSize4x_1henv_41",S="_iconSize5x_1henv_45",g="_iconSize6x_1henv_49",v="_iconSize7x_1henv_53",w="_iconSize8x_1henv_57",t="_iconSize9x_1henv_61",f="_iconSize10x_1henv_65",m="_icon-wrapper--0_75--none_1henv_90",u="_icon-wrapper--0_75--fixedwidth_1henv_95",y="_icon-wrapper--0_75--square_1henv_100",q="_icon-wrapper--0_75--roomy_1henv_105",W="_icon-wrapper--1--none_1henv_111",$="_icon-wrapper--1--fixedwidth_1henv_116",b="_icon-wrapper--1--square_1henv_121",C="_icon-wrapper--1--roomy_1henv_126",N="_icon-wrapper--1_25--none_1henv_132",j="_icon-wrapper--1_25--fixedwidth_1henv_137",k="_icon-wrapper--1_25--square_1henv_142",D="_icon-wrapper--1_25--roomy_1henv_147",P="_icon-wrapper--2--none_1henv_174",V="_icon-wrapper--2--fixedwidth_1henv_179",B="_icon-wrapper--2--square_1henv_184",E="_icon-wrapper--2--roomy_1henv_189",A="_icon-wrapper--3--none_1henv_216",F="_icon-wrapper--3--fixedwidth_1henv_221",I="_icon-wrapper--3--square_1henv_226",O="_icon-wrapper--3--roomy_1henv_231",G="_icon-wrapper--size-0_75x_1henv_389",H="_icon-wrapper--size-1x_1henv_394",J="_icon-wrapper--size-1_25x_1henv_399",K="_icon-wrapper--size-2x_1henv_409",L="_icon-wrapper--size-3x_1henv_419",M="_icon_1henv_1",Q="_fixedWidth_1henv_460",R="_square_1henv_464",T="_roomy_1henv_468",U=n("_icon-wrapper_1henv_1",{variants:{iconSize:{"0.5x":"_icon-wrapper--size-0_5x_1henv_384","0.75x":G,"1x":H,"1.25x":J,"1.5x":"_icon-wrapper--size-1_5x_1henv_404","2x":K,"2.5x":"_icon-wrapper--size-2_5x_1henv_414","3x":L,"4x":"_icon-wrapper--size-4x_1henv_424","5x":"_icon-wrapper--size-5x_1henv_429","6x":"_icon-wrapper--size-6x_1henv_434","7x":"_icon-wrapper--size-7x_1henv_439","8x":"_icon-wrapper--size-8x_1henv_444","9x":"_icon-wrapper--size-9x_1henv_449","10x":"_icon-wrapper--size-10x_1henv_454",default:H,lg:J,sm:H,xs:H,"2xs":G,xl:K,"2xl":L},padding:{none:"",fixedWidth:"",square:"",roomy:""}},compoundVariants:[{iconSize:"0.5x",padding:"none",class:"_icon-wrapper--0_5--none_1henv_70"},{iconSize:"0.5x",padding:"fixedWidth",class:"_icon-wrapper--0_5--fixedwidth_1henv_75"},{iconSize:"0.5x",padding:"square",class:"_icon-wrapper--0_5--square_1henv_80"},{iconSize:"0.5x",padding:"roomy",class:"_icon-wrapper--0_5--roomy_1henv_85"},{iconSize:"0.75x",padding:"none",class:m},{iconSize:"0.75x",padding:"fixedWidth",class:u},{iconSize:"0.75x",padding:"square",class:y},{iconSize:"0.75x",padding:"roomy",class:q},{iconSize:"1x",padding:"none",class:W},{iconSize:"1x",padding:"fixedWidth",class:$},{iconSize:"1x",padding:"square",class:b},{iconSize:"1x",padding:"roomy",class:C},{iconSize:"1.25x",padding:"none",class:N},{iconSize:"1.25x",padding:"fixedWidth",class:j},{iconSize:"1.25x",padding:"square",class:k},{iconSize:"1.25x",padding:"roomy",class:D},{iconSize:"1.5x",padding:"none",class:"_icon-wrapper--1_5--none_1henv_153"},{iconSize:"1.5x",padding:"fixedWidth",class:"_icon-wrapper--1_5--fixedwidth_1henv_158"},{iconSize:"1.5x",padding:"square",class:"_icon-wrapper--1_5--square_1henv_163"},{iconSize:"1.5x",padding:"roomy",class:"_icon-wrapper--1_5--roomy_1henv_168"},{iconSize:"2x",padding:"none",class:P},{iconSize:"2x",padding:"fixedWidth",class:V},{iconSize:"2x",padding:"square",class:B},{iconSize:"2x",padding:"roomy",class:E},{iconSize:"2.5x",padding:"none",class:"_icon-wrapper--2_5--none_1henv_195"},{iconSize:"2.5x",padding:"fixedWidth",class:"_icon-wrapper--2_5--fixedwidth_1henv_200"},{iconSize:"2.5x",padding:"square",class:"_icon-wrapper--2_5--square_1henv_205"},{iconSize:"2.5x",padding:"roomy",class:"_icon-wrapper--2_5--roomy_1henv_210"},{iconSize:"3x",padding:"none",class:A},{iconSize:"3x",padding:"fixedWidth",class:F},{iconSize:"3x",padding:"square",class:I},{iconSize:"3x",padding:"roomy",class:O},{iconSize:"4x",padding:"none",class:"_icon-wrapper--4--none_1henv_237"},{iconSize:"4x",padding:"fixedWidth",class:"_icon-wrapper--4--fixedwidth_1henv_242"},{iconSize:"4x",padding:"square",class:"_icon-wrapper--4--square_1henv_247"},{iconSize:"4x",padding:"roomy",class:"_icon-wrapper--4--roomy_1henv_252"},{iconSize:"5x",padding:"none",class:"_icon-wrapper--5--none_1henv_258"},{iconSize:"5x",padding:"fixedWidth",class:"_icon-wrapper--5--fixedwidth_1henv_263"},{iconSize:"5x",padding:"square",class:"_icon-wrapper--5--square_1henv_268"},{iconSize:"5x",padding:"roomy",class:"_icon-wrapper--5--roomy_1henv_273"},{iconSize:"6x",padding:"none",class:"_icon-wrapper--6--none_1henv_279"},{iconSize:"6x",padding:"fixedWidth",class:"_icon-wrapper--6--fixedwidth_1henv_284"},{iconSize:"6x",padding:"square",class:"_icon-wrapper--6--square_1henv_289"},{iconSize:"6x",padding:"roomy",class:"_icon-wrapper--6--roomy_1henv_294"},{iconSize:"7x",padding:"none",class:"_icon-wrapper--7--none_1henv_300"},{iconSize:"7x",padding:"fixedWidth",class:"_icon-wrapper--7--fixedwidth_1henv_305"},{iconSize:"7x",padding:"square",class:"_icon-wrapper--7--square_1henv_310"},{iconSize:"7x",padding:"roomy",class:"_icon-wrapper--7--roomy_1henv_315"},{iconSize:"8x",padding:"none",class:"_icon-wrapper--8--none_1henv_321"},{iconSize:"8x",padding:"fixedWidth",class:"_icon-wrapper--8--fixedwidth_1henv_326"},{iconSize:"8x",padding:"square",class:"_icon-wrapper--8--square_1henv_331"},{iconSize:"8x",padding:"roomy",class:"_icon-wrapper--8--roomy_1henv_336"},{iconSize:"9x",padding:"none",class:"_icon-wrapper--9--none_1henv_342"},{iconSize:"9x",padding:"fixedWidth",class:"_icon-wrapper--9--fixedwidth_1henv_347"},{iconSize:"9x",padding:"square",class:"_icon-wrapper--9--square_1henv_352"},{iconSize:"9x",padding:"roomy",class:"_icon-wrapper--9--roomy_1henv_357"},{iconSize:"10x",padding:"none",class:"_icon-wrapper--10--none_1henv_363"},{iconSize:"10x",padding:"fixedWidth",class:"_icon-wrapper--10--fixedwidth_1henv_368"},{iconSize:"10x",padding:"square",class:"_icon-wrapper--10--square_1henv_373"},{iconSize:"10x",padding:"roomy",class:"_icon-wrapper--10--roomy_1henv_378"},{iconSize:"default",padding:"none",class:W},{iconSize:"default",padding:"fixedWidth",class:$},{iconSize:"default",padding:"square",class:b},{iconSize:"default",padding:"roomy",class:C},{iconSize:"lg",padding:"none",class:N},{iconSize:"lg",padding:"fixedWidth",class:j},{iconSize:"lg",padding:"square",class:k},{iconSize:"lg",padding:"roomy",class:D},{iconSize:"sm",padding:"none",class:W},{iconSize:"sm",padding:"fixedWidth",class:$},{iconSize:"sm",padding:"square",class:b},{iconSize:"sm",padding:"roomy",class:C},{iconSize:"xs",padding:"none",class:W},{iconSize:"xs",padding:"fixedWidth",class:$},{iconSize:"xs",padding:"square",class:b},{iconSize:"xs",padding:"roomy",class:C},{iconSize:"2xs",padding:"none",class:m},{iconSize:"2xs",padding:"fixedWidth",class:u},{iconSize:"2xs",padding:"square",class:y},{iconSize:"2xs",padding:"roomy",class:q},{iconSize:"xl",padding:"none",class:P},{iconSize:"xl",padding:"fixedWidth",class:V},{iconSize:"xl",padding:"square",class:B},{iconSize:"xl",padding:"roomy",class:E},{iconSize:"2xl",padding:"none",class:A},{iconSize:"2xl",padding:"fixedWidth",class:F},{iconSize:"2xl",padding:"square",class:I},{iconSize:"2xl",padding:"roomy",class:O}]}),X=n(M,{variants:{padding:{none:"",fixedWidth:Q,square:R,roomy:T},iconSize:{"0.5x":c,"0.75x":d,"1x":r,"1.25x":s,"1.5x":p,"2x":x,"2.5x":l,"3x":h,"4x":z,"5x":S,"6x":g,"7x":v,"8x":w,"9x":t,"10x":f,default:r,lg:s,sm:r,xs:r,"2xs":d,xl:x,"2xl":h}}}),Y=({iconName:n,iconPrefix:c="far",iconSize:d="1x",iconPack:r,color:s,padding:p="none",flip:x,fixedWidth:l=!0,listItem:h,border:z,rotation:S,pull:g,isDecorative:v,spin:w,className:t,privateBgColorVariant:f,...m})=>{"development"===process.env.NODE_ENV&&v&&console.warn("`isDecorative` prop is deprecated and will be removed in future versions due to FontAwesome v7 accessibility changes. Please use `aria-label` instead.");const[u,y]=e(0);o(()=>{y(i=>i+1)},[n,c,d,r,s,p,x,l,h,z,S,g,w,f]);const q=[c,`fa-${n}`,["2x","3x","4x","5x","6x","7x","8x","9x","10x"].includes(d||"")?`fa-${d}`:"",r?`fa-${r}`:"",x?`fa-flip-${x}`:"",l?"fa-fw":"",h?"fa-li":"",z?"fa-border":"",S?`fa-rotate-${S}`:"",g?`fa-pull-${g}`:"",w?"fa-spin":""].filter(Boolean).join(" "),W=m["data-testid"];/* @__PURE__ */
2
2
  return i("span",{className:`icon-wrapper ${U({iconSize:d,padding:p})} ${t||""}`,"data-testid":W?`${W}-wrapper`:void 0,children:/* @__PURE__ */i("i",{className:`${q} ${X({padding:p,iconSize:d})} ${a({foregroundColor:s})} ${_({backgroundColor:f??"transparent"})}`,"data-testid":W||void 0,...m})},u)};export{Y as Icon,Y as default};
3
3
  //# sourceMappingURL=Icon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as c}from"react/jsx-runtime";import{c as o}from"../../index-DiYWUa65.js";import{Icon as a}from"../Icon/Icon.js";import '../../assets/IconBackdrop.css';const r=o("_iconBackdrop_1e7m2_1",{variants:{backdropShape:{circle:"_circle_1e7m2_11",squircle:"_squircle_1e7m2_7"}}}),e=({backdropShape:o="squircle",backdropColor:e="accentSubtle",iconSize:i="2x",iconProps:n={}})=>/* @__PURE__ */c("span",{className:`${r({backdropShape:o})}`,"data-testid":"icon-backdrop",children:/* @__PURE__ */c(a,{padding:"roomy",iconName:n.iconName??"plane-up",...n,iconSize:i,privateBgColorVariant:e})});export{e as IconBackdrop,e as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{c as a}from"../../index-CCUt_dAN.js";import{Icon as c}from"../Icon/Icon.js";import '../../assets/IconBackdrop.css';const r=a("_iconBackdrop_1e7m2_1",{variants:{backdropShape:{circle:"_circle_1e7m2_11",squircle:"_squircle_1e7m2_7"}}}),e=({backdropShape:a="squircle",backdropColor:e="accentSubtle",iconSize:i="2x",iconProps:n={}})=>/* @__PURE__ */o("span",{className:`${r({backdropShape:a})}`,"data-testid":"icon-backdrop",children:/* @__PURE__ */o(c,{padding:"roomy",iconName:n.iconName??"plane-up",...n,iconSize:i,privateBgColorVariant:e})});export{e as IconBackdrop,e as default};
2
2
  //# sourceMappingURL=IconBackdrop.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import{forwardRef as t}from"react";import{Button as i}from"../Button/Button.js";import{Icon as r}from"../Icon/Icon.js";import{useObjectRef as n}from"@react-aria/utils";import{Tooltip as e}from"../Tooltip/Tooltip.js";const c=t(function({iconProps:t={iconName:"circle"},tooltipLabel:c,tooltipPlacement:m="top",...l},a){const p=n(a),{size:s}=l,f={...t,iconSize:"lg"===s?"1.25x":t?.iconSize},u=/* @__PURE__ */o(i,{ref:p,...l,iconButton:!0,children:/* @__PURE__ */o(r,{...f,"data-testid":"icon-button-icon"})});return c?/* @__PURE__ */o(e,{label:c,placement:m,children:u}):u});export{c as IconButton,c as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{forwardRef as t}from"react";import{Button as i}from"../Button/Button.js";import{Icon as r}from"../Icon/Icon.js";import{useObjectRef as e}from"@react-aria/utils";import{Tooltip as n}from"../Tooltip/Tooltip.js";import{getBaseValue as c}from"../../utils/breakpoint/responsiveSSR.js";const m=t(function({iconProps:t={iconName:"circle"},tooltipLabel:m,tooltipPlacement:p="top",...l},a){const s=e(a),{size:f}=l,u=c(f,"md"),d={...t,iconSize:"lg"===u?"1.25x":t?.iconSize},j=/* @__PURE__ */o(i,{ref:s,...l,iconButton:!0,children:/* @__PURE__ */o(r,{...d,"data-testid":"icon-button-icon"})});return m?/* @__PURE__ */o(n,{label:m,placement:p,children:j}):j});export{m as IconButton,m as default};
2
2
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef, ForwardedRef, ElementType } from 'react';\n\nimport { Button, ButtonProps } from '../Button/Button';\nimport { Icon, IconProps } from '../Icon/Icon';\nimport { FormProps } from '../../utils/forms/formProps';\nimport { useObjectRef } from '@react-aria/utils';\nimport { Tooltip } from '../Tooltip/Tooltip';\n\nexport interface IconButtonProps<T extends ElementType = 'button'>\n extends Omit<ButtonProps<T>, 'children' | 'iconStartProps' | 'iconEndProps'>,\n FormProps {\n /**\n * What icon from fontAwesome to use with all options\n */\n iconProps?: IconProps;\n /**\n * Tooltip text to display on hover and focus\n */\n tooltipLabel?: string;\n /**\n * Tooltip placement relative to the button\n */\n tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';\n}\n\nexport const IconButton = forwardRef(function IconButton<\n T extends ElementType = 'button',\n>(\n {\n iconProps = {\n iconName: 'circle',\n },\n tooltipLabel,\n tooltipPlacement = 'top',\n ...props\n }: IconButtonProps<T>,\n // Not using <T> here as typescript cannot narrow it properly from consuming component\n // see - https://www.tsteele.dev/posts/react-polymorphic-forwardref for potential\n // solutions if proper typing is required.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n forwardedRef?: ForwardedRef<any>,\n) {\n const ref = useObjectRef(forwardedRef);\n\n const { size } = props;\n\n const finalIconProps = {\n ...iconProps,\n iconSize: size === 'lg' ? '1.25x' : iconProps?.iconSize,\n };\n\n const iconButtonComponent = (\n <Button ref={ref} {...props} iconButton={true}>\n <Icon {...finalIconProps} data-testid=\"icon-button-icon\" />\n </Button>\n );\n\n if (tooltipLabel) {\n return (\n <Tooltip label={tooltipLabel} placement={tooltipPlacement}>\n {iconButtonComponent}\n </Tooltip>\n );\n }\n\n return iconButtonComponent;\n});\n\nexport default IconButton;\n"],"names":["IconButton","forwardRef","iconProps","iconName","tooltipLabel","tooltipPlacement","props","forwardedRef","ref","useObjectRef","size","finalIconProps","iconSize","iconButtonComponent","jsx","Button","iconButton","children","Icon","Tooltip","label","placement"],"mappings":"gQAyBO,MAAMA,EAAaC,EAAW,UAGnCC,UACEA,EAAY,CACVC,SAAU,UAAAC,aAEZA,EAAAC,iBACAA,EAAmB,SAChBC,GAMLC,GAEA,MAAMC,EAAMC,EAAaF,IAEnBG,KAAEA,GAASJ,EAEXK,EAAiB,IAClBT,EACHU,SAAmB,OAATF,EAAgB,QAAUR,GAAWU,UAG3CC,iBACJC,EAACC,EAAA,CAAOP,SAAcF,EAAOU,YAAY,EACvCC,wBAAAH,EAACI,EAAA,IAASP,EAAgB,cAAY,uBAI1C,OAAIP,mBAECe,EAAA,CAAQC,MAAOhB,EAAciB,UAAWhB,EACtCY,SAAAJ,IAKAA,CACT"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef, ForwardedRef, ElementType } from 'react';\n\nimport { Button, ButtonProps } from '../Button/Button';\nimport { Icon, IconProps } from '../Icon/Icon';\nimport { FormProps } from '../../utils/forms/formProps';\nimport { useObjectRef } from '@react-aria/utils';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { getBaseValue } from '../../utils/breakpoint/responsiveSSR';\n\nexport interface IconButtonProps<T extends ElementType = 'button'>\n extends Omit<ButtonProps<T>, 'children' | 'iconStartProps' | 'iconEndProps'>,\n FormProps {\n /**\n * What icon from fontAwesome to use with all options\n */\n iconProps?: IconProps;\n /**\n * Tooltip text to display on hover and focus\n */\n tooltipLabel?: string;\n /**\n * Tooltip placement relative to the button\n */\n tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';\n}\n\nexport const IconButton = forwardRef(function IconButton<\n T extends ElementType = 'button',\n>(\n {\n iconProps = {\n iconName: 'circle',\n },\n tooltipLabel,\n tooltipPlacement = 'top',\n ...props\n }: IconButtonProps<T>,\n // Not using <T> here as typescript cannot narrow it properly from consuming component\n // see - https://www.tsteele.dev/posts/react-polymorphic-forwardref for potential\n // solutions if proper typing is required.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n forwardedRef?: ForwardedRef<any>,\n) {\n const ref = useObjectRef(forwardedRef);\n\n const { size } = props;\n const baseSize = getBaseValue(size, 'md');\n\n const finalIconProps = {\n ...iconProps,\n iconSize: baseSize === 'lg' ? '1.25x' : iconProps?.iconSize,\n };\n\n const iconButtonComponent = (\n <Button ref={ref} {...props} iconButton={true}>\n <Icon {...finalIconProps} data-testid=\"icon-button-icon\" />\n </Button>\n );\n\n if (tooltipLabel) {\n return (\n <Tooltip label={tooltipLabel} placement={tooltipPlacement}>\n {iconButtonComponent}\n </Tooltip>\n );\n }\n\n return iconButtonComponent;\n});\n\nexport default IconButton;\n"],"names":["IconButton","forwardRef","iconProps","iconName","tooltipLabel","tooltipPlacement","props","forwardedRef","ref","useObjectRef","size","baseSize","getBaseValue","finalIconProps","iconSize","iconButtonComponent","jsx","Button","iconButton","children","Icon","Tooltip","label","placement"],"mappings":"uUA0BO,MAAMA,EAAaC,EAAW,UAGnCC,UACEA,EAAY,CACVC,SAAU,UAAAC,aAEZA,EAAAC,iBACAA,EAAmB,SAChBC,GAMLC,GAEA,MAAMC,EAAMC,EAAaF,IAEnBG,KAAEA,GAASJ,EACXK,EAAWC,EAAaF,EAAM,MAE9BG,EAAiB,IAClBX,EACHY,SAAuB,OAAbH,EAAoB,QAAUT,GAAWY,UAG/CC,iBACJC,EAACC,EAAA,CAAOT,SAAcF,EAAOY,YAAY,EACvCC,wBAAAH,EAACI,EAAA,IAASP,EAAgB,cAAY,uBAI1C,OAAIT,mBAECiB,EAAA,CAAQC,MAAOlB,EAAcmB,UAAWlB,EACtCc,SAAAJ,IAKAA,CACT"}
@@ -1,3 +1,3 @@
1
- import{jsx as o}from"react/jsx-runtime";import r,{useState as e,useRef as n,useEffect as a,useMemo as t}from"react";import{c}from"../../index-DiYWUa65.js";import{borderVariants as l}from"../../utils/border/border.js";import{backgroundColorVariants as d}from"../../utils/backgroundColor/backgroundColor.js";import '../../assets/Image.css';const i="_scaleDown_1dojz_26",s=c("_image_1dojz_1",{variants:{fit:{contain:"_contain_1dojz_14",cover:"_cover_1dojz_18",fill:"_fill_1dojz_10",none:"_none_1dojz_22",scaleDown:i,"scale-down":i}}}),u=r.forwardRef(({src:c,fallbackSrc:i,onError:u,onLoad:f,asChild:m,children:p,borderRadius:_,backgroundColor:b,fit:j,aspectRatio:C,...g},h)=>{const{ref:k,loaded:y,handleLoad:z}=(o=>{const[t,c]=e(!1),l=n(null),d=r.useCallback(r=>{"function"==typeof o&&o(r),c(!0)},[o]);return a(()=>{l.current&&l.current.complete&&c(!0)},[]),{ref:l,loaded:t,handleLoad:d}})(f),w=((o,r)=>t(()=>e=>{"function"==typeof r?r(e):r&&"current"in r&&(r.current=e),o.current=e},[o,r]))(k,h),[R,E]=e(!c);m&&!p&&console.error("Image component: Children required when asChild is true");const L=r.useCallback(o=>{i&&E(!0),"function"==typeof u&&u(o)},[i,u]),v={src:R?i:c,className:`\n ${l({borderRadius:_})}\n ${d({backgroundColor:b})}\n ${s({fit:j})}`,onError:L,onLoad:z,ref:w,"data-loaded":y,style:{aspectRatio:C},...g};if(m&&r.isValidElement(p)){const o="object"==typeof p.props&&null!==p.props?p.props:{};return r.cloneElement(p,{...v,...o})}/* @__PURE__ */
1
+ import{jsx as o}from"react/jsx-runtime";import r,{useState as e,useRef as n,useEffect as a,useMemo as t}from"react";import{c}from"../../index-CCUt_dAN.js";import{borderVariants as l}from"../../utils/border/border.js";import{backgroundColorVariants as d}from"../../utils/backgroundColor/backgroundColor.js";import '../../assets/Image.css';const i="_scaleDown_1dojz_26",s=c("_image_1dojz_1",{variants:{fit:{contain:"_contain_1dojz_14",cover:"_cover_1dojz_18",fill:"_fill_1dojz_10",none:"_none_1dojz_22",scaleDown:i,"scale-down":i}}}),u=r.forwardRef(({src:c,fallbackSrc:i,onError:u,onLoad:f,asChild:m,children:p,borderRadius:_,backgroundColor:b,fit:j,aspectRatio:C,...g},h)=>{const{ref:k,loaded:y,handleLoad:z}=(o=>{const[t,c]=e(!1),l=n(null),d=r.useCallback(r=>{"function"==typeof o&&o(r),c(!0)},[o]);return a(()=>{l.current&&l.current.complete&&c(!0)},[]),{ref:l,loaded:t,handleLoad:d}})(f),w=((o,r)=>t(()=>e=>{"function"==typeof r?r(e):r&&"current"in r&&(r.current=e),o.current=e},[o,r]))(k,h),[R,E]=e(!c);m&&!p&&console.error("Image component: Children required when asChild is true");const L=r.useCallback(o=>{i&&E(!0),"function"==typeof u&&u(o)},[i,u]),v={src:R?i:c,className:`\n ${l({borderRadius:_})}\n ${d({backgroundColor:b})}\n ${s({fit:j})}`,onError:L,onLoad:z,ref:w,"data-loaded":y,style:{aspectRatio:C},...g};if(m&&r.isValidElement(p)){const o="object"==typeof p.props&&null!==p.props?p.props:{};return r.cloneElement(p,{...v,...o})}/* @__PURE__ */
2
2
  return o("img",{...v})});u.displayName="Image";export{u as Image,u as default};
3
3
  //# sourceMappingURL=Image.js.map
@@ -1,3 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import s from"react";import{c as _}from"../../index-DiYWUa65.js";import{foregroundColorVariants as t}from"../../utils/foregroundColour/foregroundColor.js";import '../../assets/truncate.css';import '../../assets/Label.css';/* empty css */import{getBaseValue as l,generateResponsiveClasses as i}from"../../utils/breakpoint/responsiveSSR.js";const x={label:"_label_1fo68_1","size--xxs":"_size--xxs_1fo68_36","size--xs":"_size--xs_1fo68_39","size--sm":"_size--sm_1fo68_42","size--md":"_size--md_1fo68_45","size--lg":"_size--lg_1fo68_48","truncate--true":"_truncate--true_1fo68_68","truncate--false":"_truncate--false_1fo68_72","sm:size--xxs":"_sm:size--xxs_1fo68_1","sm:size--xs":"_sm:size--xs_1fo68_1","sm:size--sm":"_sm:size--sm_1fo68_1","sm:size--md":"_sm:size--md_1fo68_1","sm:size--lg":"_sm:size--lg_1fo68_1","sm:truncate--true":"_sm:truncate--true_1fo68_1","sm:truncate--false":"_sm:truncate--false_1fo68_1","md:size--xxs":"_md:size--xxs_1fo68_1","md:size--xs":"_md:size--xs_1fo68_1","md:size--sm":"_md:size--sm_1fo68_1","md:size--md":"_md:size--md_1fo68_1","md:size--lg":"_md:size--lg_1fo68_1","md:truncate--true":"_md:truncate--true_1fo68_1","md:truncate--false":"_md:truncate--false_1fo68_1","lg:size--xxs":"_lg:size--xxs_1fo68_1","lg:size--xs":"_lg:size--xs_1fo68_1","lg:size--sm":"_lg:size--sm_1fo68_1","lg:size--md":"_lg:size--md_1fo68_1","lg:size--lg":"_lg:size--lg_1fo68_1","lg:truncate--true":"_lg:truncate--true_1fo68_1","lg:truncate--false":"_lg:truncate--false_1fo68_1","xl:size--xxs":"_xl:size--xxs_1fo68_1","xl:size--xs":"_xl:size--xs_1fo68_1","xl:size--sm":"_xl:size--sm_1fo68_1","xl:size--md":"_xl:size--md_1fo68_1","xl:size--lg":"_xl:size--lg_1fo68_1","xl:truncate--true":"_xl:truncate--true_1fo68_1","xl:truncate--false":"_xl:truncate--false_1fo68_1","xxl:size--xxs":"_xxl:size--xxs_1fo68_1","xxl:size--xs":"_xxl:size--xs_1fo68_1","xxl:size--sm":"_xxl:size--sm_1fo68_1","xxl:size--md":"_xxl:size--md_1fo68_1","xxl:size--lg":"_xxl:size--lg_1fo68_1","xxl:truncate--true":"_xxl:truncate--true_1fo68_1","xxl:truncate--false":"_xxl:truncate--false_1fo68_1"},o=i(x),r=_(x.label,{variants:{size:{"2xs":x["size--xxs"],xxs:x["size--xxs"],xs:x["size--xs"],sm:x["size--sm"],md:x["size--md"],lg:x["size--lg"]},truncate:{true:x["truncate--true"],false:x["truncate--false"]}},defaultVariants:{size:"md"}}),a=({children:_,as:i="span",size:x,foregroundColor:a,truncate:f=!1,...z})=>{s.useEffect(()=>{if("production"!==process.env.NODE_ENV)if("2xs"===x)console.warn("Label: The size value '2xs' is deprecated. Please use 'xxs' instead.");else if("object"==typeof x&&null!==x){Object.values(x).some(e=>"2xs"===e)&&console.warn("Label: The size value '2xs' is deprecated. Please use 'xxs' instead.")}},[x]);const m=l(x,"md"),u=l(f,!1),n=o(x,"size"),c=o(f,"truncate"),d=[r({size:m,truncate:u}),t({foregroundColor:a}),...n,...c].filter(Boolean).join(" ");/* @__PURE__ */
1
+ import{jsx as e}from"react/jsx-runtime";import s from"react";import{c as _}from"../../index-CCUt_dAN.js";import{foregroundColorVariants as t}from"../../utils/foregroundColour/foregroundColor.js";import '../../assets/truncate.css';import '../../assets/Label.css';/* empty css */import{getBaseValue as l,generateResponsiveClasses as i}from"../../utils/breakpoint/responsiveSSR.js";const x={label:"_label_1fo68_1","size--xxs":"_size--xxs_1fo68_36","size--xs":"_size--xs_1fo68_39","size--sm":"_size--sm_1fo68_42","size--md":"_size--md_1fo68_45","size--lg":"_size--lg_1fo68_48","truncate--true":"_truncate--true_1fo68_68","truncate--false":"_truncate--false_1fo68_72","sm:size--xxs":"_sm:size--xxs_1fo68_1","sm:size--xs":"_sm:size--xs_1fo68_1","sm:size--sm":"_sm:size--sm_1fo68_1","sm:size--md":"_sm:size--md_1fo68_1","sm:size--lg":"_sm:size--lg_1fo68_1","sm:truncate--true":"_sm:truncate--true_1fo68_1","sm:truncate--false":"_sm:truncate--false_1fo68_1","md:size--xxs":"_md:size--xxs_1fo68_1","md:size--xs":"_md:size--xs_1fo68_1","md:size--sm":"_md:size--sm_1fo68_1","md:size--md":"_md:size--md_1fo68_1","md:size--lg":"_md:size--lg_1fo68_1","md:truncate--true":"_md:truncate--true_1fo68_1","md:truncate--false":"_md:truncate--false_1fo68_1","lg:size--xxs":"_lg:size--xxs_1fo68_1","lg:size--xs":"_lg:size--xs_1fo68_1","lg:size--sm":"_lg:size--sm_1fo68_1","lg:size--md":"_lg:size--md_1fo68_1","lg:size--lg":"_lg:size--lg_1fo68_1","lg:truncate--true":"_lg:truncate--true_1fo68_1","lg:truncate--false":"_lg:truncate--false_1fo68_1","xl:size--xxs":"_xl:size--xxs_1fo68_1","xl:size--xs":"_xl:size--xs_1fo68_1","xl:size--sm":"_xl:size--sm_1fo68_1","xl:size--md":"_xl:size--md_1fo68_1","xl:size--lg":"_xl:size--lg_1fo68_1","xl:truncate--true":"_xl:truncate--true_1fo68_1","xl:truncate--false":"_xl:truncate--false_1fo68_1","xxl:size--xxs":"_xxl:size--xxs_1fo68_1","xxl:size--xs":"_xxl:size--xs_1fo68_1","xxl:size--sm":"_xxl:size--sm_1fo68_1","xxl:size--md":"_xxl:size--md_1fo68_1","xxl:size--lg":"_xxl:size--lg_1fo68_1","xxl:truncate--true":"_xxl:truncate--true_1fo68_1","xxl:truncate--false":"_xxl:truncate--false_1fo68_1"},o=i(x),r=_(x.label,{variants:{size:{"2xs":x["size--xxs"],xxs:x["size--xxs"],xs:x["size--xs"],sm:x["size--sm"],md:x["size--md"],lg:x["size--lg"]},truncate:{true:x["truncate--true"],false:x["truncate--false"]}},defaultVariants:{size:"md"}}),a=({children:_,as:i="span",size:x,foregroundColor:a,truncate:f=!1,...z})=>{s.useEffect(()=>{if("production"!==process.env.NODE_ENV)if("2xs"===x)console.warn("Label: The size value '2xs' is deprecated. Please use 'xxs' instead.");else if("object"==typeof x&&null!==x){Object.values(x).some(e=>"2xs"===e)&&console.warn("Label: The size value '2xs' is deprecated. Please use 'xxs' instead.")}},[x]);const m=l(x,"md"),u=l(f,!1),n=o(x,"size"),c=o(f,"truncate"),d=[r({size:m,truncate:u}),t({foregroundColor:a}),...n,...c].filter(Boolean).join(" ");/* @__PURE__ */
2
2
  return e(i,{className:d,...z,children:_})};export{a as Label,a as default};
3
3
  //# sourceMappingURL=Label.js.map
@@ -1,7 +1,8 @@
1
1
  import { LinkProps as AriaLinkProps } from 'react-aria-components';
2
2
  import { IconProps } from '../Icon/Icon';
3
3
  import { ForegroundVariants } from '../../utils/foregroundColour/foregroundColor';
4
- export interface LinkProps extends AriaLinkProps {
4
+ import { WithResponsiveProps } from '../../utils/breakpoint/responsiveSSR';
5
+ export interface LinkBaseProps extends AriaLinkProps {
5
6
  /**
6
7
  * The children of the component. A function may be provided to alter the children based on component state.
7
8
  */
@@ -59,5 +60,9 @@ export interface LinkProps extends AriaLinkProps {
59
60
  */
60
61
  focusStyle?: 'default' | 'white';
61
62
  }
62
- declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
63
+ type ResponsivePropKeys = 'size';
64
+ export type LinkProps = WithResponsiveProps<LinkBaseProps, ResponsivePropKeys>;
65
+ declare const Link: import('react').ForwardRefExoticComponent<Omit<LinkBaseProps, "size"> & {
66
+ size?: import('../../utils/breakpoint/responsiveSSR').ResponsiveValue<NonNullable<"lg" | "sm" | "xs" | "md" | undefined>> | undefined;
67
+ } & import('react').RefAttributes<HTMLAnchorElement>>;
63
68
  export default Link;