@salutejs/plasma-new-hope 0.264.0-canary.1757.13287195621.0 → 0.264.0-canary.1760.13286965233.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  3. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  4. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  5. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  6. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  7. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  8. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  9. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  10. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  11. package/cjs/components/Drawer/Drawer.css +5 -5
  12. package/cjs/components/Drawer/Drawer.js +5 -1
  13. package/cjs/components/Drawer/Drawer.js.map +1 -1
  14. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.css +5 -5
  15. package/cjs/components/Panel/Panel.css +2 -2
  16. package/cjs/components/Panel/Panel.js +7 -6
  17. package/cjs/components/Panel/Panel.js.map +1 -1
  18. package/cjs/components/Panel/Panel.styles.js +12 -2
  19. package/cjs/components/Panel/Panel.styles.js.map +1 -1
  20. package/cjs/components/Panel/Panel.styles_1g0gq8z.css +1 -0
  21. package/cjs/components/Panel/Panel.tokens.js +15 -0
  22. package/cjs/components/Panel/Panel.tokens.js.map +1 -1
  23. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.css +3 -3
  24. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +9 -9
  25. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  26. package/{es/components/Panel/ui/PanelHeader/PanelHeader.styles_8c7krd.css → cjs/components/Panel/ui/PanelHeader/PanelHeader.styles_16qje7n.css} +1 -1
  27. package/cjs/components/Panel/variations/_view/base.js +1 -1
  28. package/cjs/components/Panel/variations/_view/base.js.map +1 -1
  29. package/cjs/components/Panel/variations/_view/base_lwq4bq.css +1 -0
  30. package/cjs/index.css +5 -5
  31. package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  32. package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  33. package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  34. package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  35. package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  36. package/emotion/cjs/components/Drawer/Drawer.js +5 -1
  37. package/emotion/cjs/components/Panel/Panel.js +7 -6
  38. package/emotion/cjs/components/Panel/Panel.styles.js +4 -1
  39. package/emotion/cjs/components/Panel/Panel.tokens.js +6 -1
  40. package/emotion/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +4 -4
  41. package/emotion/cjs/components/Panel/variations/_view/base.js +1 -1
  42. package/emotion/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  43. package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
  44. package/emotion/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
  45. package/emotion/cjs/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
  46. package/emotion/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  47. package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
  48. package/emotion/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
  49. package/emotion/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
  50. package/emotion/cjs/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
  51. package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  52. package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  53. package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  54. package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  55. package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  56. package/emotion/es/components/Drawer/Drawer.js +5 -1
  57. package/emotion/es/components/Panel/Panel.js +8 -7
  58. package/emotion/es/components/Panel/Panel.styles.js +4 -1
  59. package/emotion/es/components/Panel/Panel.tokens.js +5 -0
  60. package/emotion/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +5 -5
  61. package/emotion/es/components/Panel/variations/_view/base.js +2 -2
  62. package/emotion/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  63. package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
  64. package/emotion/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
  65. package/emotion/es/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
  66. package/emotion/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  67. package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
  68. package/emotion/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
  69. package/emotion/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
  70. package/emotion/es/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
  71. package/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  72. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  73. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  74. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  75. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  76. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  77. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  78. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  79. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  80. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  81. package/es/components/Drawer/Drawer.css +5 -5
  82. package/es/components/Drawer/Drawer.js +5 -1
  83. package/es/components/Drawer/Drawer.js.map +1 -1
  84. package/es/components/Drawer/ui/DrawerContent/DrawerContent.css +5 -5
  85. package/es/components/Panel/Panel.css +2 -2
  86. package/es/components/Panel/Panel.js +9 -8
  87. package/es/components/Panel/Panel.js.map +1 -1
  88. package/es/components/Panel/Panel.styles.js +12 -2
  89. package/es/components/Panel/Panel.styles.js.map +1 -1
  90. package/es/components/Panel/Panel.styles_1g0gq8z.css +1 -0
  91. package/es/components/Panel/Panel.tokens.js +14 -1
  92. package/es/components/Panel/Panel.tokens.js.map +1 -1
  93. package/es/components/Panel/ui/PanelHeader/PanelHeader.css +3 -3
  94. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +9 -9
  95. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  96. package/{cjs/components/Panel/ui/PanelHeader/PanelHeader.styles_8c7krd.css → es/components/Panel/ui/PanelHeader/PanelHeader.styles_16qje7n.css} +1 -1
  97. package/es/components/Panel/variations/_view/base.js +1 -1
  98. package/es/components/Panel/variations/_view/base.js.map +1 -1
  99. package/es/components/Panel/variations/_view/base_lwq4bq.css +1 -0
  100. package/es/index.css +5 -5
  101. package/package.json +2 -2
  102. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  103. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  104. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  105. package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  106. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  107. package/styled-components/cjs/components/Drawer/Drawer.js +5 -1
  108. package/styled-components/cjs/components/Panel/Panel.js +7 -6
  109. package/styled-components/cjs/components/Panel/Panel.styles.js +4 -1
  110. package/styled-components/cjs/components/Panel/Panel.tokens.js +6 -1
  111. package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -1
  112. package/styled-components/cjs/components/Panel/variations/_view/base.js +1 -1
  113. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  114. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
  115. package/styled-components/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
  116. package/styled-components/cjs/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
  117. package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  118. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
  119. package/styled-components/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
  120. package/styled-components/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
  121. package/styled-components/cjs/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
  122. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  123. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  124. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  125. package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  126. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  127. package/styled-components/es/components/Drawer/Drawer.js +5 -1
  128. package/styled-components/es/components/Panel/Panel.js +8 -7
  129. package/styled-components/es/components/Panel/Panel.styles.js +4 -1
  130. package/styled-components/es/components/Panel/Panel.tokens.js +5 -0
  131. package/styled-components/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +2 -2
  132. package/styled-components/es/components/Panel/variations/_view/base.js +2 -2
  133. package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  134. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
  135. package/styled-components/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
  136. package/styled-components/es/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
  137. package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  138. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
  139. package/styled-components/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
  140. package/styled-components/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
  141. package/styled-components/es/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
  142. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
  143. package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
  144. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
  145. package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
  146. package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
  147. package/types/components/Drawer/Drawer.d.ts +4 -0
  148. package/types/components/Drawer/Drawer.d.ts.map +1 -1
  149. package/types/components/Drawer/Drawer.types.d.ts +8 -0
  150. package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
  151. package/types/components/Panel/Panel.d.ts.map +1 -1
  152. package/types/components/Panel/Panel.styles.d.ts +3 -1
  153. package/types/components/Panel/Panel.styles.d.ts.map +1 -1
  154. package/types/components/Panel/Panel.tokens.d.ts +5 -0
  155. package/types/components/Panel/Panel.tokens.d.ts.map +1 -1
  156. package/types/components/Panel/Panel.types.d.ts +8 -0
  157. package/types/components/Panel/Panel.types.d.ts.map +1 -1
  158. package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +4 -4
  159. package/types/examples/plasma_b2c/components/Drawer/Drawer.d.ts +2 -0
  160. package/types/examples/plasma_b2c/components/Drawer/Drawer.d.ts.map +1 -1
  161. package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +4 -4
  162. package/types/examples/plasma_web/components/Drawer/Drawer.d.ts +2 -0
  163. package/types/examples/plasma_web/components/Drawer/Drawer.d.ts.map +1 -1
  164. package/cjs/components/Panel/Panel.styles_2oh0yk.css +0 -1
  165. package/cjs/components/Panel/variations/_view/base_10gjs6e.css +0 -1
  166. package/es/components/Panel/Panel.styles_2oh0yk.css +0 -1
  167. package/es/components/Panel/variations/_view/base_10gjs6e.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useYears } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_YEAR_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n value,\n startYear,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredYear,\n onChangeYear,\n onHoverYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const minDate = min ? new Date(min.getFullYear(), 0, 1) : undefined;\n const maxDate = max ? new Date(max.getFullYear(), 11, 31) : undefined;\n\n const [years, selected] = useYears({\n date: currentDate,\n value,\n startYear,\n eventList,\n disabledList,\n min: minDate,\n max: maxDate,\n });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_YEAR_STEP : 0;\n\n const yearItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarYearFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarYearFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarYearFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarYearFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarYearFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarYearFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarYearSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarYearItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarYearItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarYearItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeYear = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeYear(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverYear?.(undefined);\n }\n },\n [getSelectedDate, onChangeYear, offset, value, onHoverYear],\n );\n\n const handleOnHoverYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverYear?.(selectedDate);\n },\n [getSelectedDate, onHoverYear, value],\n );\n\n const handleMouseOutGrid = () => onHoverYear?.(undefined);\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears\n role=\"grid\"\n aria-labelledby=\"id-grid-label\"\n onKeyDown={onKeyDown}\n onMouseLeave={handleMouseOutGrid}\n >\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(\n (\n {\n yearValue,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={yearItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={yearValue}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredYear)}\n inRange={getInRange(value, date, hoveredYear, inRange)}\n sideInRange={getSideInRange(value, date, hoveredYear, isSelected)}\n onClick={disabled ? undefined : handleOnChangeYear(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverYear}\n key={`StyledYear-${i}-${j}`}\n role=\"gridcell\"\n data-year={yearValue}\n data-month-index={date.monthIndex}\n data-day={date.day}\n aria-label={String(yearValue)}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {yearValue}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","value","startYear","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredYear","onChangeYear","onHoverYear","onSetSelected","onKeyDown","minDate","Date","getFullYear","undefined","maxDate","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_YEAR_STEP","yearItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarYearFontFamily","dateStructureFontSize","calendarYearFontSize","dateStructureFontWeight","calendarYearFontWeight","dateStructureFontLineHeight","calendarYearFontLineHeight","dateStructureFontLetterSpacing","calendarYearFontLetterSpacing","dateStructureFontStyle","calendarYearFontStyle","dateStructureSelectedFontWeight","calendarYearSelectedFontWeight","dateStructureWidth","calendarYearItemWidth","dateStructureHeight","calendarYearItemHeight","dateStructureBorderRadius","calendarYearItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeYear","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","handleOnHoverYear","isSelectedDone","Array","isArray","handleMouseOutGrid","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","onMouseLeave","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","String","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAiBlD;AAAA,EAAA,IAhBIC,WAAW,GA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AAW;AACvBC,QAAAA,SAAS,EAAEA,SAAU;AACrBxF,QAAAA,QAAQ,EAAEA,QAAS;AACnBmG,QAAAA,SAAS,EAAEC,SAAS,CAAC7G,IAAI,EAAEW,WAAW,CAAE;QACxCyF,OAAO,EAAEU,UAAU,CAAC7G,KAAK,EAAED,IAAI,EAAEW,WAAW,EAAEyF,OAAO,CAAE;QACvDW,WAAW,EAAEC,cAAc,CAAC/G,KAAK,EAAED,IAAI,EAAEW,WAAW,EAAEqF,UAAU,CAAE;QAClEiB,OAAO,EAAEZ,QAAQ,GAAGlF,SAAS,GAAGkD,kBAAkB,CAACC,CAAC,EAAEC,CAAC,CAAE;AACzD2C,QAAAA,WAAW,EAAEb,QAAQ,GAAGlF,SAAS,GAAGwD,iBAAkB;QACtDkB,GAAG,EAAA,aAAA,CAAA3D,MAAA,CAAgBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC5BkB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,WAAA,EAAWM,SAAU;QACrB,kBAAkB/F,EAAAA,IAAI,CAACgE,UAAW;QAClC,UAAUhE,EAAAA,IAAI,CAAC+D,GAAI;QACnB,YAAYoD,EAAAA,MAAM,CAACpB,SAAS,CAAE;AAC9BO,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
1
+ {"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useYears } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_YEAR_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n value,\n startYear,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredYear,\n onChangeYear,\n onHoverYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears({ date: currentDate, value, startYear, eventList, disabledList, min, max });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_YEAR_STEP : 0;\n\n const yearItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarYearFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarYearFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarYearFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarYearFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarYearFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarYearFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarYearSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarYearItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarYearItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarYearItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeYear = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeYear(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverYear?.(undefined);\n }\n },\n [getSelectedDate, onChangeYear, offset, value, onHoverYear],\n );\n\n const handleOnHoverYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverYear?.(selectedDate);\n },\n [getSelectedDate, onHoverYear, value],\n );\n\n const handleMouseOutGrid = () => onHoverYear?.(undefined);\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears\n role=\"grid\"\n aria-labelledby=\"id-grid-label\"\n onKeyDown={onKeyDown}\n onMouseLeave={handleMouseOutGrid}\n >\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(\n (\n {\n yearValue,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={yearItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={yearValue}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredYear)}\n inRange={getInRange(value, date, hoveredYear, inRange)}\n sideInRange={getSideInRange(value, date, hoveredYear, isSelected)}\n onClick={disabled ? undefined : handleOnChangeYear(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverYear}\n key={`StyledYear-${i}-${j}`}\n role=\"gridcell\"\n data-year={yearValue}\n data-month-index={date.monthIndex}\n data-day={date.day}\n aria-label={String(yearValue)}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {yearValue}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","value","startYear","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredYear","onChangeYear","onHoverYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_YEAR_STEP","yearItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarYearFontFamily","dateStructureFontSize","calendarYearFontSize","dateStructureFontWeight","calendarYearFontWeight","dateStructureFontLineHeight","calendarYearFontLineHeight","dateStructureFontLetterSpacing","calendarYearFontLetterSpacing","dateStructureFontStyle","calendarYearFontStyle","dateStructureSelectedFontWeight","calendarYearSelectedFontWeight","dateStructureWidth","calendarYearItemWidth","dateStructureHeight","calendarYearItemHeight","dateStructureBorderRadius","calendarYearItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeYear","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverYear","isSelectedDone","Array","isArray","handleMouseOutGrid","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","onMouseLeave","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","String","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAiBlD;AAAA,EAAA,IAhBIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,GAAG,GAAAR,IAAA,CAAHQ,GAAG;IACHC,GAAG,GAAAT,IAAA,CAAHS,GAAG;IACHC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;IACRC,WAAW,GAAAb,IAAA,CAAXa,WAAW;IACXC,YAAY,GAAAd,IAAA,CAAZc,YAAY;IACZC,WAAW,GAAAf,IAAA,CAAXe,WAAW;IACXC,aAAa,GAAAhB,IAAA,CAAbgB,aAAa;IACbC,SAAS,GAAAjB,IAAA,CAATiB,SAAS,CAAA;EAET,IAAAC,SAAA,GAA0BC,QAAQ,CAAC;AAAEjB,MAAAA,IAAI,EAAED,WAAW;AAAEE,MAAAA,KAAK,EAALA,KAAK;AAAEC,MAAAA,SAAS,EAATA,SAAS;AAAEE,MAAAA,SAAS,EAATA,SAAS;AAAEC,MAAAA,YAAY,EAAZA,YAAY;AAAEC,MAAAA,GAAG,EAAHA,GAAG;AAAEC,MAAAA,GAAG,EAAHA,GAAAA;AAAI,KAAC,CAAC;IAAAW,UAAA,G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,CAAC4F,kBACJ;AACDH,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,SAAS,EAAEA,SAAU;AACrBpF,QAAAA,QAAQ,EAAEA,QAAS;AACnB+F,QAAAA,SAAS,EAAEC,SAAS,CAACzG,IAAI,EAAEW,WAAW,CAAE;QACxCqF,OAAO,EAAEU,UAAU,CAACzG,KAAK,EAAED,IAAI,EAAEW,WAAW,EAAEqF,OAAO,CAAE;QACvDW,WAAW,EAAEC,cAAc,CAAC3G,KAAK,EAAED,IAAI,EAAEW,WAAW,EAAEiF,UAAU,CAAE;QAClEiB,OAAO,EAAEZ,QAAQ,GAAG3B,SAAS,GAAGN,kBAAkB,CAACC,CAAC,EAAEC,CAAC,CAAE;AACzD4C,QAAAA,WAAW,EAAEb,QAAQ,GAAG3B,SAAS,GAAGC,iBAAkB;QACtDkB,GAAG,EAAA,aAAA,CAAA5D,MAAA,CAAgBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC5BmB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,WAAA,EAAWM,SAAU;QACrB,kBAAkB3F,EAAAA,IAAI,CAAC2D,UAAW;QAClC,UAAU3D,EAAAA,IAAI,CAAC0D,GAAI;QACnB,YAAYqD,EAAAA,MAAM,CAACpB,SAAS,CAAE;AAC9BO,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
@@ -11,13 +11,13 @@
11
11
 
12
12
  .base_ydejlv_b175yas1__99ab42b5{--plasma-panel-border-radius:var(--plasma-drawer-border-radius);}
13
13
 
14
- .base_10gjs6e_b11yryf5__c70de98c{background:var(--plasma-panel-background);box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
14
+ .base_lwq4bq_b11yryf5__4e4b1db2{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
15
15
 
16
16
  .base_t42kp6_b68f6vo__04aa8af1{padding:var(--plasma-panel-padding);height:var(--plasma_private-panel-height);width:var(--plasma_private-panel-width);}
17
17
 
18
18
  .base_2yf5jv_b1xkcksz__e72487ad{border-radius:var(--plasma-panel-border-radius);}
19
19
 
20
- .Panel_styles_2oh0yk_siaxu13__4b38fa73{background:var(--plasma-panel-content-background-color);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
20
+ .Panel_styles_1g0gq8z_siaxu13__180beaa7{background:var(--siaxu13-0);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
21
21
 
22
22
  .base_1wckm5d_b1mvcfe5__595610ae{overflow-y:scroll;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-right:20px;box-sizing:border-box;}.base_1wckm5d_b1mvcfe5__595610ae::-webkit-scrollbar{display:none;}
23
23
 
@@ -51,9 +51,9 @@
51
51
  .Button_styles_8cvmld_s1rjh7ra__4694a0fa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);margin:var(--s1rjh7ra-0);}
52
52
  .Button_styles_8cvmld_b9ga1dj__4694a0fa{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_8cvmld_b9ga1dj__4694a0fa{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_buttonSquare__4694a0fa{width:var(--plasma-button-height);padding:0;}
53
53
 
54
- .PanelHeader_styles_8c7krd_b5xb1jq__8864a0a4{background:var(--plasma-panel-background);-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
55
- .PanelHeader_styles_8c7krd_s1hqmxl1__8864a0a4{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
56
- .PanelHeader_styles_8c7krd_c7hx8go__8864a0a4{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
54
+ .PanelHeader_styles_16qje7n_b5xb1jq__a3864628{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
55
+ .PanelHeader_styles_16qje7n_s1hqmxl1__a3864628{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
56
+ .PanelHeader_styles_16qje7n_c7hx8go__a3864628{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
57
57
 
58
58
  .base_fbxbaa_b37w9ja__9aed17a1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1{position:absolute;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1 .base_fbxbaa_b5xb1jq__9aed17a1{background:transparent;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1.base_fbxbaa_panelRightCloseButton__9aed17a1{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
59
59
 
@@ -15,7 +15,7 @@ import { useDrawer } from './hooks/useDrawer.js';
15
15
  import { Overlay } from '../Overlay/Overlay.js';
16
16
  import { getSizeValueFromProp } from '../../utils/getSizeValueFromProp.js';
17
17
 
18
- var _excluded = ["id", "zIndex", "popupInfo", "withBlur", "children", "view", "size", "width", "height", "isOpen", "opened", "initialFocusRef", "focusAfterRef", "className", "onClose", "onOverlayClick", "onEscKeyDown", "offset", "frame", "borderRadius", "placement", "closeOnEsc", "closeOnOverlayClick", "asModal"];
18
+ var _excluded = ["id", "zIndex", "popupInfo", "withBlur", "children", "view", "size", "width", "height", "isOpen", "opened", "initialFocusRef", "focusAfterRef", "className", "customBackgroundColor", "customContentBackgroundColor", "onClose", "onOverlayClick", "onEscKeyDown", "offset", "frame", "borderRadius", "placement", "closeOnEsc", "closeOnOverlayClick", "asModal"];
19
19
 
20
20
  // issue #823
21
21
 
@@ -35,6 +35,8 @@ var drawerRoot = function drawerRoot(Root) {
35
35
  initialFocusRef = _ref.initialFocusRef,
36
36
  focusAfterRef = _ref.focusAfterRef,
37
37
  className = _ref.className,
38
+ customBackgroundColor = _ref.customBackgroundColor,
39
+ customContentBackgroundColor = _ref.customContentBackgroundColor,
38
40
  onClose = _ref.onClose,
39
41
  onOverlayClick = _ref.onOverlayClick,
40
42
  onEscKeyDown = _ref.onEscKeyDown,
@@ -118,6 +120,8 @@ var drawerRoot = function drawerRoot(Root) {
118
120
  }, /*#__PURE__*/React.createElement(StyledPanel, {
119
121
  width: innerWidth,
120
122
  height: innerHeight,
123
+ customBackgroundColor: customBackgroundColor,
124
+ customContentBackgroundColor: customContentBackgroundColor,
121
125
  className: className
122
126
  }, children)));
123
127
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { cx, getSizeValueFromProp } from '../../utils';\nimport { useFocusTrap } from '../../hooks';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup, StyledPanel } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <StyledPanel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </StyledPanel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","StyledPanel","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA;;IAEaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CACN,UAAAC,IAAA,EA4BIC,QAAQ,EACP;AAAA,IAAA,IA3BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,SAAS,GAAAJ,IAAA,CAATI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C,EAAAA,QAAQ,EAAE;AACNnF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTc,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { cx, getSizeValueFromProp } from '../../utils';\nimport { useFocusTrap } from '../../hooks';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup, StyledPanel } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n customBackgroundColor,\n customContentBackgroundColor,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <StyledPanel\n width={innerWidth}\n height={innerHeight}\n customBackgroundColor={customBackgroundColor}\n customContentBackgroundColor={customContentBackgroundColor}\n className={className}\n >\n {children}\n </StyledPanel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","customBackgroundColor","customContentBackgroundColor","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","StyledPanel","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA;;IAEaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CACN,UAAAC,IAAA,EA8BIC,QAAQ,EACP;AAAA,IAAA,IA7BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,SAAS,GAAAJ,IAAA,CAATI,SAAS;MACTC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MACRC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,MAAM,GAAAV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EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTgB,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
@@ -1,10 +1,10 @@
1
- .base_10gjs6e_b11yryf5__c70de98c{background:var(--plasma-panel-background);box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
1
+ .base_lwq4bq_b11yryf5__4e4b1db2{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
2
2
 
3
3
  .base_t42kp6_b68f6vo__04aa8af1{padding:var(--plasma-panel-padding);height:var(--plasma_private-panel-height);width:var(--plasma_private-panel-width);}
4
4
 
5
5
  .base_2yf5jv_b1xkcksz__e72487ad{border-radius:var(--plasma-panel-border-radius);}
6
6
 
7
- .Panel_styles_2oh0yk_siaxu13__4b38fa73{background:var(--plasma-panel-content-background-color);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
7
+ .Panel_styles_1g0gq8z_siaxu13__180beaa7{background:var(--siaxu13-0);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
8
8
 
9
9
  .base_1wckm5d_b1mvcfe5__595610ae{overflow-y:scroll;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-right:20px;box-sizing:border-box;}.base_1wckm5d_b1mvcfe5__595610ae::-webkit-scrollbar{display:none;}
10
10
 
@@ -38,8 +38,8 @@
38
38
  .Button_styles_8cvmld_s1rjh7ra__4694a0fa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);margin:var(--s1rjh7ra-0);}
39
39
  .Button_styles_8cvmld_b9ga1dj__4694a0fa{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_8cvmld_b9ga1dj__4694a0fa{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_buttonSquare__4694a0fa{width:var(--plasma-button-height);padding:0;}
40
40
 
41
- .PanelHeader_styles_8c7krd_b5xb1jq__8864a0a4{background:var(--plasma-panel-background);-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
42
- .PanelHeader_styles_8c7krd_s1hqmxl1__8864a0a4{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
43
- .PanelHeader_styles_8c7krd_c7hx8go__8864a0a4{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
41
+ .PanelHeader_styles_16qje7n_b5xb1jq__a3864628{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
42
+ .PanelHeader_styles_16qje7n_s1hqmxl1__a3864628{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
43
+ .PanelHeader_styles_16qje7n_c7hx8go__a3864628{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
44
44
 
45
45
  .base_fbxbaa_b37w9ja__9aed17a1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1{position:absolute;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1 .base_fbxbaa_b5xb1jq__9aed17a1{background:transparent;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1.base_fbxbaa_panelRightCloseButton__9aed17a1{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
@@ -1,7 +1,7 @@
1
- .base_10gjs6e_b11yryf5__c70de98c{background:var(--plasma-panel-background);box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
1
+ .base_lwq4bq_b11yryf5__4e4b1db2{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
2
2
 
3
3
  .base_t42kp6_b68f6vo__04aa8af1{padding:var(--plasma-panel-padding);height:var(--plasma_private-panel-height);width:var(--plasma_private-panel-width);}
4
4
 
5
5
  .base_2yf5jv_b1xkcksz__e72487ad{border-radius:var(--plasma-panel-border-radius);}
6
6
 
7
- .Panel_styles_2oh0yk_siaxu13__4b38fa73{background:var(--plasma-panel-content-background-color);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
7
+ .Panel_styles_1g0gq8z_siaxu13__180beaa7{background:var(--siaxu13-0);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
@@ -1,14 +1,14 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { cx } from '../../utils/index.js';
4
4
  import { base } from './variations/_view/base.js';
5
5
  import { base as base$1 } from './variations/_size/base.js';
6
6
  import { base as base$2 } from './variations/_borderRadius/base.js';
7
- import { classes } from './Panel.tokens.js';
7
+ import { classes, privateTokens } from './Panel.tokens.js';
8
8
  import { StyledWrapper } from './Panel.styles.js';
9
9
  import { getSizeValueFromProp } from '../../utils/getSizeValueFromProp.js';
10
10
 
11
- var _excluded = ["children", "view", "size", "width", "height", "className", "style"];
11
+ var _excluded = ["children", "view", "size", "width", "height", "customBackgroundColor", "customContentBackgroundColor", "className", "style"];
12
12
  var panelRoot = function panelRoot(Root) {
13
13
  return /*#__PURE__*/forwardRef(function (_ref, outerRef) {
14
14
  var children = _ref.children,
@@ -16,6 +16,8 @@ var panelRoot = function panelRoot(Root) {
16
16
  size = _ref.size,
17
17
  width = _ref.width,
18
18
  height = _ref.height,
19
+ customBackgroundColor = _ref.customBackgroundColor,
20
+ customContentBackgroundColor = _ref.customContentBackgroundColor,
19
21
  className = _ref.className,
20
22
  style = _ref.style,
21
23
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -26,11 +28,10 @@ var panelRoot = function panelRoot(Root) {
26
28
  view: view,
27
29
  size: size,
28
30
  className: cx(classes.root, className),
29
- style: _objectSpread2(_objectSpread2({}, style), {}, {
30
- '--plasma_private-panel-width': innerWidth,
31
- '--plasma_private-panel-height': innerHeight
32
- })
33
- }, rest), /*#__PURE__*/React.createElement(StyledWrapper, null, children));
31
+ style: _objectSpread2(_objectSpread2({}, style), {}, _defineProperty(_defineProperty(_defineProperty({}, privateTokens.width, innerWidth), privateTokens.height, innerHeight), privateTokens.backgroundColor, customBackgroundColor))
32
+ }, rest), /*#__PURE__*/React.createElement(StyledWrapper, {
33
+ customContentBackgroundColor: customContentBackgroundColor
34
+ }, children));
34
35
  });
35
36
  };
36
37
  var panelConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sources":["../../../src/components/Panel/Panel.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx, getSizeValueFromProp } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport type { PanelProps } from './Panel.types';\nimport { classes } from './Panel.tokens';\nimport { StyledWrapper } from './Panel.styles';\n\nexport const panelRoot = (Root: RootProps<HTMLDivElement, PanelProps>) =>\n forwardRef<HTMLDivElement, PanelProps>(\n ({ children, view, size, width, height, className, style, ...rest }, outerRef) => {\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n return (\n <Root\n ref={outerRef}\n view={view}\n size={size}\n className={cx(classes.root, className)}\n style={\n {\n ...style,\n '--plasma_private-panel-width': innerWidth,\n '--plasma_private-panel-height': innerHeight,\n } as CSSProperties\n }\n {...rest}\n >\n <StyledWrapper>{children}</StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const panelConfig = {\n name: 'Panel',\n tag: 'div',\n layout: panelRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["panelRoot","Root","forwardRef","_ref","outerRef","children","view","size","width","height","className","style","rest","_objectWithoutProperties","_excluded","innerWidth","getSizeValueFromProp","innerHeight","React","createElement","_extends","ref","cx","classes","root","_objectSpread","StyledWrapper","panelConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadius","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;IAaaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CACN,UAAAC,IAAA,EAAqEC,QAAQ,EAAK;AAAA,IAAA,IAA/EC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MAAEC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;MAAEC,KAAK,GAAAL,IAAA,CAALK,KAAK;MAAEC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAEC,SAAS,GAAAP,IAAA,CAATO,SAAS;MAAEC,KAAK,GAAAR,IAAA,CAALQ,KAAK;AAAKC,MAAAA,IAAI,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;IAC7D,IAAMC,UAAU,GAAGP,KAAK,GAAGQ,oBAAoB,CAACR,KAAK,CAAC,GAAG,MAAM,CAAA;IAC/D,IAAMS,WAAW,GAAGR,MAAM,GAAGO,oBAAoB,CAACP,MAAM,CAAC,GAAG,MAAM,CAAA;AAElE,IAAA,oBACIS,KAAA,CAAAC,aAAA,CAAClB,IAAI,EAAAmB,QAAA,CAAA;AACDC,MAAAA,GAAG,EAAEjB,QAAS;AACdE,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,IAAI,EAAEA,IAAK;MACXG,SAAS,EAAEY,EAAE,CAACC,OAAO,CAACC,IAAI,EAAEd,SAAS,CAAE;AACvCC,MAAAA,KAAK,EAAAc,cAAA,CAAAA,cAAA,KAEMd,KAAK,CAAA,EAAA,EAAA,EAAA;AACR,QAAA,8BAA8B,EAAEI,UAAU;AAC1C,QAAA,+BAA+B,EAAEE,WAAAA;AAAW,OAAA,CAAA;KAGhDL,EAAAA,IAAI,CAERM,eAAAA,KAAA,CAAAC,aAAA,CAACO,aAAa,EAAA,IAAA,EAAErB,QAAwB,CACtC,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMsB,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE9B,SAAS;AACjB+B,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR1B,IAAAA,IAAI,EAAE;AACF2B,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD3B,IAAAA,IAAI,EAAE;AACF0B,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDC,IAAAA,YAAY,EAAE;AACVH,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNhC,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACT6B,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Panel.js","sources":["../../../src/components/Panel/Panel.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx, getSizeValueFromProp } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport type { PanelProps } from './Panel.types';\nimport { classes, privateTokens } from './Panel.tokens';\nimport { StyledWrapper } from './Panel.styles';\n\nexport const panelRoot = (Root: RootProps<HTMLDivElement, PanelProps>) =>\n forwardRef<HTMLDivElement, PanelProps>(\n (\n {\n children,\n view,\n size,\n width,\n height,\n customBackgroundColor,\n customContentBackgroundColor,\n className,\n style,\n ...rest\n },\n outerRef,\n ) => {\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n return (\n <Root\n ref={outerRef}\n view={view}\n size={size}\n className={cx(classes.root, className)}\n style={\n {\n ...style,\n [privateTokens.width]: innerWidth,\n [privateTokens.height]: innerHeight,\n [privateTokens.backgroundColor]: customBackgroundColor,\n } as CSSProperties\n }\n {...rest}\n >\n <StyledWrapper customContentBackgroundColor={customContentBackgroundColor}>\n {children}\n </StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const panelConfig = {\n name: 'Panel',\n tag: 'div',\n layout: panelRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["panelRoot","Root","forwardRef","_ref","outerRef","children","view","size","width","height","customBackgroundColor","customContentBackgroundColor","className","style","rest","_objectWithoutProperties","_excluded","innerWidth","getSizeValueFromProp","innerHeight","React","createElement","_extends","ref","cx","classes","root","_objectSpread","_defineProperty","privateTokens","backgroundColor","StyledWrapper","panelConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadius","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;IAaaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CACN,UAAAC,IAAA,EAaIC,QAAQ,EACP;AAAA,IAAA,IAZGC,QAAQ,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4BAAAA;KACxCN,EAAAA,QACU,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM2B,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnC,SAAS;AACjBoC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR/B,IAAAA,IAAI,EAAE;AACFgC,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDhC,IAAAA,IAAI,EAAE;AACF+B,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDC,IAAAA,YAAY,EAAE;AACVH,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrC,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTkC,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
@@ -1,10 +1,20 @@
1
- import './Panel.styles_2oh0yk.css';
1
+ import './Panel.styles_1g0gq8z.css';
2
2
  import { styled } from '@linaria/react';
3
+ import { tokens } from './Panel.tokens.js';
3
4
 
5
+ var _exp = function _exp() {
6
+ return function (_ref) {
7
+ var customContentBackgroundColor = _ref.customContentBackgroundColor;
8
+ return customContentBackgroundColor || "var(".concat(tokens.contentBackgroundColor, ")");
9
+ };
10
+ };
4
11
  var StyledWrapper = /*#__PURE__*/styled('div')({
5
12
  name: "StyledWrapper",
6
13
  "class": "siaxu13",
7
- propsAsIs: false
14
+ propsAsIs: false,
15
+ vars: {
16
+ "siaxu13-0": [/*#__PURE__*/_exp()]
17
+ }
8
18
  });
9
19
 
10
20
  export { StyledWrapper };
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.styles.js","sources":["../../../src/components/Panel/Panel.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from './Panel.tokens';\n\nexport const StyledWrapper = styled.div`\n background: var(${tokens.contentBackgroundColor});\n height: 100%;\n width: 100%;\n display: inline-flex;\n flex-direction: column;\n position: relative;\n`;\n"],"names":["StyledWrapper","styled","name","class","propsAsIs"],"mappings":";;AAIO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOlC;;;;"}
1
+ {"version":3,"file":"Panel.styles.js","sources":["../../../src/components/Panel/Panel.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from './Panel.tokens';\n\nexport const StyledWrapper = styled.div<{ customContentBackgroundColor?: string }>`\n background: ${({ customContentBackgroundColor }) =>\n customContentBackgroundColor || `var(${tokens.contentBackgroundColor})`};\n height: 100%;\n width: 100%;\n display: inline-flex;\n flex-direction: column;\n position: relative;\n`;\n"],"names":["_exp","_ref","customContentBackgroundColor","concat","tokens","contentBackgroundColor","StyledWrapper","styled","name","class","propsAsIs","vars"],"mappings":";;;AAEwC,IAAAA,IAAA,GADtBA,SACsBA,IAAAA,GAAA;AAAA,EAAA,OAGtB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,4BAAAA,GAAAA,IAAAA,CAAAA,4BAAAA,CAAAA;AAAAA,IAAAA,OACbA,4BAA4B,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,MAAM,CAACC,sBAAuB,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAFxE,IAAMC,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cACjBX,IAC6D,EAAA,CAAA;AAAA,GAAA;AAAA,CAM9E;;;;"}
@@ -0,0 +1 @@
1
+ .siaxu13{background:var(--siaxu13-0);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
@@ -6,6 +6,19 @@ var classes = {
6
6
  hasHeader: 'panel-has-header',
7
7
  isRightClose: 'panel-right-close-button'
8
8
  };
9
+ var privateTokens = {
10
+ width: '--plasma_private-panel-width',
11
+ height: '--plasma_private-panel-height',
12
+ backgroundColor: '--plasma_private-panel-custom-background-color'
13
+ };
14
+ var tokens = {
15
+ background: '--plasma-panel-background',
16
+ shadow: '--plasma-panel-shadow',
17
+ contentBackgroundColor: '--plasma-panel-content-background-color',
18
+ padding: '--plasma-panel-padding',
19
+ borderRadius: '--plasma-panel-border-radius',
20
+ closeColor: '--plasma-panel-close-color'
21
+ };
9
22
 
10
- export { classes };
23
+ export { classes, privateTokens, tokens };
11
24
  //# sourceMappingURL=Panel.tokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.tokens.js","sources":["../../../src/components/Panel/Panel.tokens.ts"],"sourcesContent":["export const classes = {\n root: 'panel-root',\n content: 'panel-content',\n header: 'panel-header',\n footer: 'panel-footer',\n hasHeader: 'panel-has-header',\n isRightClose: 'panel-right-close-button',\n};\n\nexport const tokens = {\n background: '--plasma-panel-background',\n shadow: '--plasma-panel-shadow',\n contentBackgroundColor: '--plasma-panel-content-background-color',\n padding: '--plasma-panel-padding',\n borderRadius: '--plasma-panel-border-radius',\n closeColor: '--plasma-panel-close-color',\n};\n"],"names":["classes","root","content","header","footer","hasHeader","isRightClose"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,IAAI,EAAE,YAAY;AAClBC,EAAAA,OAAO,EAAE,eAAe;AACxBC,EAAAA,MAAM,EAAE,cAAc;AACtBC,EAAAA,MAAM,EAAE,cAAc;AACtBC,EAAAA,SAAS,EAAE,kBAAkB;AAC7BC,EAAAA,YAAY,EAAE,0BAAA;AAClB;;;;"}
1
+ {"version":3,"file":"Panel.tokens.js","sources":["../../../src/components/Panel/Panel.tokens.ts"],"sourcesContent":["export const classes = {\n root: 'panel-root',\n content: 'panel-content',\n header: 'panel-header',\n footer: 'panel-footer',\n hasHeader: 'panel-has-header',\n isRightClose: 'panel-right-close-button',\n};\n\nexport const privateTokens = {\n width: '--plasma_private-panel-width',\n height: '--plasma_private-panel-height',\n backgroundColor: '--plasma_private-panel-custom-background-color',\n};\n\nexport const tokens = {\n background: '--plasma-panel-background',\n shadow: '--plasma-panel-shadow',\n contentBackgroundColor: '--plasma-panel-content-background-color',\n padding: '--plasma-panel-padding',\n borderRadius: '--plasma-panel-border-radius',\n closeColor: '--plasma-panel-close-color',\n};\n"],"names":["classes","root","content","header","footer","hasHeader","isRightClose","privateTokens","width","height","backgroundColor","tokens","background","shadow","contentBackgroundColor","padding","borderRadius","closeColor"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,IAAI,EAAE,YAAY;AAClBC,EAAAA,OAAO,EAAE,eAAe;AACxBC,EAAAA,MAAM,EAAE,cAAc;AACtBC,EAAAA,MAAM,EAAE,cAAc;AACtBC,EAAAA,SAAS,EAAE,kBAAkB;AAC7BC,EAAAA,YAAY,EAAE,0BAAA;AAClB,EAAC;AAEM,IAAMC,aAAa,GAAG;AACzBC,EAAAA,KAAK,EAAE,8BAA8B;AACrCC,EAAAA,MAAM,EAAE,+BAA+B;AACvCC,EAAAA,eAAe,EAAE,gDAAA;AACrB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,sBAAsB,EAAE,yCAAyC;AACjEC,EAAAA,OAAO,EAAE,wBAAwB;AACjCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,UAAU,EAAE,4BAAA;AAChB;;;;"}
@@ -26,8 +26,8 @@
26
26
  .Button_styles_8cvmld_s1rjh7ra__4694a0fa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);margin:var(--s1rjh7ra-0);}
27
27
  .Button_styles_8cvmld_b9ga1dj__4694a0fa{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_8cvmld_b9ga1dj__4694a0fa{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_b9ga1dj__4694a0fa.Button_styles_8cvmld_buttonSquare__4694a0fa{width:var(--plasma-button-height);padding:0;}
28
28
 
29
- .PanelHeader_styles_8c7krd_b5xb1jq__8864a0a4{background:var(--plasma-panel-background);-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
30
- .PanelHeader_styles_8c7krd_s1hqmxl1__8864a0a4{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
31
- .PanelHeader_styles_8c7krd_c7hx8go__8864a0a4{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
29
+ .PanelHeader_styles_16qje7n_b5xb1jq__a3864628{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
30
+ .PanelHeader_styles_16qje7n_s1hqmxl1__a3864628{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
31
+ .PanelHeader_styles_16qje7n_c7hx8go__a3864628{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
32
32
 
33
33
  .base_fbxbaa_b37w9ja__9aed17a1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1{position:absolute;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1 .base_fbxbaa_b5xb1jq__9aed17a1{background:transparent;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1.base_fbxbaa_panelRightCloseButton__9aed17a1{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
@@ -1,4 +1,4 @@
1
- import './PanelHeader.styles_8c7krd.css';
1
+ import './PanelHeader.styles_16qje7n.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import { placements } from './PanelHeader.types.js';
4
4
  import { component, mergeConfig } from '../../../../engines/common.js';
@@ -6,19 +6,19 @@ import { buttonConfig } from '../../../Button/Button.js';
6
6
 
7
7
  var mergedButtonConfig = /*#__PURE__*/mergeConfig(buttonConfig);
8
8
  var Button = /*#__PURE__*/component(mergedButtonConfig);
9
- var _exp2 = function _exp2() {
9
+ var _exp3 = function _exp3() {
10
10
  return function (_ref) {
11
11
  var placement = _ref.placement;
12
12
  return placement === placements.left ? -1 : 0;
13
13
  };
14
14
  };
15
- var _exp3 = function _exp3() {
15
+ var _exp4 = function _exp4() {
16
16
  return function (_ref2) {
17
17
  var placement = _ref2.placement;
18
18
  return !placement || placement === placements.right ? '0.5rem' : '';
19
19
  };
20
20
  };
21
- var _exp4 = function _exp4() {
21
+ var _exp5 = function _exp5() {
22
22
  return function (_ref3) {
23
23
  var placement = _ref3.placement;
24
24
  return placement === placements.left ? '0.5rem' : '';
@@ -29,9 +29,9 @@ var ButtonWrapper = /*#__PURE__*/styled('div')({
29
29
  "class": "b5xb1jq",
30
30
  propsAsIs: false,
31
31
  vars: {
32
- "b5xb1jq-0": [/*#__PURE__*/_exp2()],
33
- "b5xb1jq-1": [/*#__PURE__*/_exp3()],
34
- "b5xb1jq-2": [/*#__PURE__*/_exp4()]
32
+ "b5xb1jq-0": [/*#__PURE__*/_exp3()],
33
+ "b5xb1jq-1": [/*#__PURE__*/_exp4()],
34
+ "b5xb1jq-2": [/*#__PURE__*/_exp5()]
35
35
  }
36
36
  });
37
37
  var StyledHeader = /*#__PURE__*/styled('div')({
@@ -39,10 +39,10 @@ var StyledHeader = /*#__PURE__*/styled('div')({
39
39
  "class": "s1hqmxl1",
40
40
  propsAsIs: false
41
41
  });
42
- var _exp5 = function _exp5() {
42
+ var _exp6 = function _exp6() {
43
43
  return Button;
44
44
  };
45
- var CloseIconWrapper = /*#__PURE__*/styled(_exp5())({
45
+ var CloseIconWrapper = /*#__PURE__*/styled(_exp6())({
46
46
  name: "CloseIconWrapper",
47
47
  "class": "c7hx8go",
48
48
  propsAsIs: true
@@ -1 +1 @@
1
- {"version":3,"file":"PanelHeader.styles.js","sources":["../../../../../src/components/Panel/ui/PanelHeader/PanelHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { mergeConfig, component } from '../../../../engines';\nimport { buttonConfig } from '../../../Button';\nimport { tokens as buttonTokens } from '../../../Button/Button.tokens';\nimport { tokens } from '../../Panel.tokens';\n\nimport { ClosePlacementType, placements } from './PanelHeader.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const ButtonWrapper = styled.div<{ placement?: ClosePlacementType }>`\n background: var(${tokens.background});\n\n order: ${({ placement }) => (placement === placements.left ? -1 : 0)};\n padding-left: ${({ placement }) => (!placement || placement === placements.right ? '0.5rem' : '')};\n padding-right: ${({ placement }) => (placement === placements.left ? '0.5rem' : '')};\n`;\n\nexport const StyledHeader = styled.div`\n height: fit-content;\n flex-grow: 1;\n`;\n\nexport const CloseIconWrapper = styled(Button)`\n position: relative;\n width: 1.5rem;\n min-height: 1.5rem;\n ${buttonTokens.buttonColor}: var(${tokens.closeColor});\n ${buttonTokens.buttonColorHover}: var(${tokens.closeColor});\n ${buttonTokens.buttonColorActive}: var(${tokens.closeColor});\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp2","_ref","placement","placements","left","_exp3","_ref2","right","_exp4","_ref3","ButtonWrapper","styled","name","class","propsAsIs","vars","StyledHeader","_exp5","CloseIconWrapper"],"mappings":";;;;;AASA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,KAAA,GAT3BA,SAS2BA,KAAAA,GAAA;AAAA,EAAA,OAKhC,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,IAAAA,CAAAA,SAAAA,CAAAA;IAAAA,OAAiBA,SAAS,KAAKC,UAAU,CAACC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAE,CAAA;AAAA,GAAA,CAAA;AAAA,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GP,MAAM,CAAAM,KAAA,EAAA,CAAA,CAAA;AAAAL,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAOrC;;;;"}
1
+ {"version":3,"file":"PanelHeader.styles.js","sources":["../../../../../src/components/Panel/ui/PanelHeader/PanelHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { mergeConfig, component } from '../../../../engines';\nimport { buttonConfig } from '../../../Button';\nimport { tokens as buttonTokens } from '../../../Button/Button.tokens';\nimport { privateTokens, tokens } from '../../Panel.tokens';\n\nimport { ClosePlacementType, placements } from './PanelHeader.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const ButtonWrapper = styled.div<{ placement?: ClosePlacementType }>`\n background: var(${privateTokens.backgroundColor}, var(${tokens.background}));\n\n order: ${({ placement }) => (placement === placements.left ? -1 : 0)};\n padding-left: ${({ placement }) => (!placement || placement === placements.right ? '0.5rem' : '')};\n padding-right: ${({ placement }) => (placement === placements.left ? '0.5rem' : '')};\n`;\n\nexport const StyledHeader = styled.div`\n height: fit-content;\n flex-grow: 1;\n`;\n\nexport const CloseIconWrapper = styled(Button)`\n position: relative;\n width: 1.5rem;\n min-height: 1.5rem;\n ${buttonTokens.buttonColor}: var(${tokens.closeColor});\n ${buttonTokens.buttonColorHover}: var(${tokens.closeColor});\n ${buttonTokens.buttonColorActive}: var(${tokens.closeColor});\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp3","_ref","placement","placements","left","_exp4","_ref2","right","_exp5","_ref3","ButtonWrapper","styled","name","class","propsAsIs","vars","StyledHeader","_exp6","CloseIconWrapper"],"mappings":";;;;;AASA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAA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AA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGjC,EAAA;AAAC,IAAAG,KAAA,GAtBgBA,SAsBhBA,KAAAA,GAAA;AAAA,EAAA,OAEqCnB,MAAM,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMoB,gBAAgB,gBAAGP,MAAM,CAAAM,KAAA,EAAA,CAAA,CAAA;AAAAL,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAOrC;;;;"}
@@ -1,3 +1,3 @@
1
- .b5xb1jq{background:var(--plasma-panel-background);-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
1
+ .b5xb1jq{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
2
2
  .s1hqmxl1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
3
3
  .c7hx8go{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
@@ -1,4 +1,4 @@
1
- import './base_10gjs6e.css';
1
+ import './base_lwq4bq.css';
2
2
  var base = "b11yryf5";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Panel/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Panel.tokens';\n\nexport const base = css`\n background: var(${tokens.background});\n box-shadow: var(${tokens.shadow});\n box-sizing: border-box;\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAIhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Panel/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { privateTokens, tokens } from '../../Panel.tokens';\n\nexport const base = css`\n background: var(${privateTokens.backgroundColor}, var(${tokens.background}));\n box-shadow: var(${tokens.shadow});\n box-sizing: border-box;\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAIhB;;;;"}
@@ -0,0 +1 @@
1
+ .b11yryf5{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
package/es/index.css CHANGED
@@ -371,21 +371,21 @@
371
371
 
372
372
  .base_ydejlv_b175yas1__99ab42b5{--plasma-panel-border-radius:var(--plasma-drawer-border-radius);}
373
373
 
374
- .base_10gjs6e_b11yryf5__c70de98c{background:var(--plasma-panel-background);box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
374
+ .base_lwq4bq_b11yryf5__4e4b1db2{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));box-shadow:var(--plasma-panel-shadow);box-sizing:border-box;}
375
375
 
376
376
  .base_t42kp6_b68f6vo__04aa8af1{padding:var(--plasma-panel-padding);height:var(--plasma_private-panel-height);width:var(--plasma_private-panel-width);}
377
377
 
378
378
  .base_2yf5jv_b1xkcksz__e72487ad{border-radius:var(--plasma-panel-border-radius);}
379
379
 
380
- .Panel_styles_2oh0yk_siaxu13__4b38fa73{background:var(--plasma-panel-content-background-color);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
380
+ .Panel_styles_1g0gq8z_siaxu13__180beaa7{background:var(--siaxu13-0);height:100%;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;}
381
381
 
382
382
  .base_1wckm5d_b1mvcfe5__595610ae{overflow-y:scroll;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-right:20px;box-sizing:border-box;}.base_1wckm5d_b1mvcfe5__595610ae::-webkit-scrollbar{display:none;}
383
383
 
384
384
  .base_hmbg05_b1orvu2x__ac0d2781{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}
385
385
 
386
- .PanelHeader_styles_8c7krd_b5xb1jq__8864a0a4{background:var(--plasma-panel-background);-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
387
- .PanelHeader_styles_8c7krd_s1hqmxl1__8864a0a4{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
388
- .PanelHeader_styles_8c7krd_c7hx8go__8864a0a4{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
386
+ .PanelHeader_styles_16qje7n_b5xb1jq__a3864628{background:var(--plasma_private-panel-custom-background-color,var(--plasma-panel-background));-webkit-order:var(--b5xb1jq-0);-ms-flex-order:var(--b5xb1jq-0);order:var(--b5xb1jq-0);padding-left:var(--b5xb1jq-1);padding-right:var(--b5xb1jq-2);}
387
+ .PanelHeader_styles_16qje7n_s1hqmxl1__a3864628{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
388
+ .PanelHeader_styles_16qje7n_c7hx8go__a3864628{position:relative;width:1.5rem;min-height:1.5rem;--plasma-button-color:var(--plasma-panel-close-color);--plasma-button-color-hover:var(--plasma-panel-close-color);--plasma-button-color-active:var(--plasma-panel-close-color);}
389
389
 
390
390
  .base_fbxbaa_b37w9ja__9aed17a1{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1{position:absolute;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1 .base_fbxbaa_b5xb1jq__9aed17a1{background:transparent;}.base_fbxbaa_b37w9ja__9aed17a1.base_fbxbaa_panelHasHeader__9aed17a1.base_fbxbaa_panelRightCloseButton__9aed17a1{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
391
391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.264.0-canary.1757.13287195621.0",
3
+ "version": "0.264.0-canary.1760.13286965233.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -132,5 +132,5 @@
132
132
  "sideEffects": [
133
133
  "*.css"
134
134
  ],
135
- "gitHead": "a842fc808029dab718942bdff7cb73a5c049e3dc"
135
+ "gitHead": "8497e0237e9c2252af00f22e6c30f88e4156d4df"
136
136
  }
@@ -32,8 +32,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
32
32
  var calendarBaseRoot = exports.calendarBaseRoot = function calendarBaseRoot(Root) {
33
33
  return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
34
34
  var externalValue = _ref.value,
35
- minDate = _ref.min,
36
- maxDate = _ref.max,
35
+ min = _ref.min,
36
+ max = _ref.max,
37
37
  includeEdgeDates = _ref.includeEdgeDates,
38
38
  _ref$type = _ref.type,
39
39
  type = _ref$type === void 0 ? 'Days' : _ref$type,
@@ -72,8 +72,6 @@ var calendarBaseRoot = exports.calendarBaseRoot = function calendarBaseRoot(Root
72
72
  _useState8 = _slicedToArray(_useState7, 2),
73
73
  outOfRangeKey = _useState8[0],
74
74
  setOutOfRangeKey = _useState8[1];
75
- var min = minDate && new Date(minDate);
76
- var max = maxDate && new Date(maxDate);
77
75
  var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value, min, type)),
78
76
  _useReducer2 = _slicedToArray(_useReducer, 2),
79
77
  state = _useReducer2[0],