@salutejs/plasma-new-hope 0.264.0-canary.1757.13287195621.0 → 0.264.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Drawer/Drawer.css +5 -5
- package/cjs/components/Drawer/Drawer.js +5 -1
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.css +5 -5
- package/cjs/components/Panel/Panel.css +2 -2
- package/cjs/components/Panel/Panel.js +7 -6
- package/cjs/components/Panel/Panel.js.map +1 -1
- package/cjs/components/Panel/Panel.styles.js +12 -2
- package/cjs/components/Panel/Panel.styles.js.map +1 -1
- package/cjs/components/Panel/Panel.styles_1g0gq8z.css +1 -0
- package/cjs/components/Panel/Panel.tokens.js +15 -0
- package/cjs/components/Panel/Panel.tokens.js.map +1 -1
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.css +3 -3
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +9 -9
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/{es/components/Panel/ui/PanelHeader/PanelHeader.styles_8c7krd.css → cjs/components/Panel/ui/PanelHeader/PanelHeader.styles_16qje7n.css} +1 -1
- package/cjs/components/Panel/variations/_view/base.js +1 -1
- package/cjs/components/Panel/variations/_view/base.js.map +1 -1
- package/cjs/components/Panel/variations/_view/base_lwq4bq.css +1 -0
- package/cjs/index.css +5 -5
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/emotion/cjs/components/Drawer/Drawer.js +5 -1
- package/emotion/cjs/components/Panel/Panel.js +7 -6
- package/emotion/cjs/components/Panel/Panel.styles.js +4 -1
- package/emotion/cjs/components/Panel/Panel.tokens.js +6 -1
- package/emotion/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +4 -4
- package/emotion/cjs/components/Panel/variations/_view/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
- package/emotion/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
- package/emotion/cjs/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
- package/emotion/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
- package/emotion/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
- package/emotion/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/emotion/es/components/Drawer/Drawer.js +5 -1
- package/emotion/es/components/Panel/Panel.js +8 -7
- package/emotion/es/components/Panel/Panel.styles.js +4 -1
- package/emotion/es/components/Panel/Panel.tokens.js +5 -0
- package/emotion/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +5 -5
- package/emotion/es/components/Panel/variations/_view/base.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
- package/emotion/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
- package/emotion/es/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
- package/emotion/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
- package/emotion/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
- package/emotion/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
- package/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Drawer/Drawer.css +5 -5
- package/es/components/Drawer/Drawer.js +5 -1
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.css +5 -5
- package/es/components/Panel/Panel.css +2 -2
- package/es/components/Panel/Panel.js +9 -8
- package/es/components/Panel/Panel.js.map +1 -1
- package/es/components/Panel/Panel.styles.js +12 -2
- package/es/components/Panel/Panel.styles.js.map +1 -1
- package/es/components/Panel/Panel.styles_1g0gq8z.css +1 -0
- package/es/components/Panel/Panel.tokens.js +14 -1
- package/es/components/Panel/Panel.tokens.js.map +1 -1
- package/es/components/Panel/ui/PanelHeader/PanelHeader.css +3 -3
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +9 -9
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/{cjs/components/Panel/ui/PanelHeader/PanelHeader.styles_8c7krd.css → es/components/Panel/ui/PanelHeader/PanelHeader.styles_16qje7n.css} +1 -1
- package/es/components/Panel/variations/_view/base.js +1 -1
- package/es/components/Panel/variations/_view/base.js.map +1 -1
- package/es/components/Panel/variations/_view/base_lwq4bq.css +1 -0
- package/es/index.css +5 -5
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/styled-components/cjs/components/Drawer/Drawer.js +5 -1
- package/styled-components/cjs/components/Panel/Panel.js +7 -6
- package/styled-components/cjs/components/Panel/Panel.styles.js +4 -1
- package/styled-components/cjs/components/Panel/Panel.tokens.js +6 -1
- package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -1
- package/styled-components/cjs/components/Panel/variations/_view/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
- package/styled-components/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
- package/styled-components/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
- package/styled-components/es/components/Drawer/Drawer.js +5 -1
- package/styled-components/es/components/Panel/Panel.js +8 -7
- package/styled-components/es/components/Panel/Panel.styles.js +4 -1
- package/styled-components/es/components/Panel/Panel.tokens.js +5 -0
- package/styled-components/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +2 -2
- package/styled-components/es/components/Panel/variations/_view/base.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +0 -12
- package/styled-components/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +11 -1
- package/styled-components/es/examples/plasma_b2c/components/Panel/Panel.stories.tsx +10 -0
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -13
- package/styled-components/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +11 -1
- package/styled-components/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Panel/Panel.stories.tsx +10 -0
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
- package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +4 -0
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +8 -0
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Panel/Panel.d.ts.map +1 -1
- package/types/components/Panel/Panel.styles.d.ts +3 -1
- package/types/components/Panel/Panel.styles.d.ts.map +1 -1
- package/types/components/Panel/Panel.tokens.d.ts +5 -0
- package/types/components/Panel/Panel.tokens.d.ts.map +1 -1
- package/types/components/Panel/Panel.types.d.ts +8 -0
- package/types/components/Panel/Panel.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +4 -4
- package/types/examples/plasma_b2c/components/Drawer/Drawer.d.ts +2 -0
- package/types/examples/plasma_b2c/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +4 -4
- package/types/examples/plasma_web/components/Drawer/Drawer.d.ts +2 -0
- package/types/examples/plasma_web/components/Drawer/Drawer.d.ts.map +1 -1
- package/cjs/components/Panel/Panel.styles_2oh0yk.css +0 -1
- package/cjs/components/Panel/variations/_view/base_10gjs6e.css +0 -1
- package/es/components/Panel/Panel.styles_2oh0yk.css +0 -1
- 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,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,QA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GlF,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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AW,EAAEC,kCAAc,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
|
-
.
|
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
|
-
.
|
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
|
-
.
|
55
|
-
.
|
56
|
-
.
|
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
|
|
@@ -23,7 +23,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
23
|
|
24
24
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
25
25
|
|
26
|
-
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"];
|
26
|
+
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"];
|
27
27
|
|
28
28
|
// issue #823
|
29
29
|
|
@@ -43,6 +43,8 @@ var drawerRoot = function drawerRoot(Root) {
|
|
43
43
|
initialFocusRef = _ref.initialFocusRef,
|
44
44
|
focusAfterRef = _ref.focusAfterRef,
|
45
45
|
className = _ref.className,
|
46
|
+
customBackgroundColor = _ref.customBackgroundColor,
|
47
|
+
customContentBackgroundColor = _ref.customContentBackgroundColor,
|
46
48
|
onClose = _ref.onClose,
|
47
49
|
onOverlayClick = _ref.onOverlayClick,
|
48
50
|
onEscKeyDown = _ref.onEscKeyDown,
|
@@ -126,6 +128,8 @@ var drawerRoot = function drawerRoot(Root) {
|
|
126
128
|
}, /*#__PURE__*/React__default.default.createElement(Drawer_styles.StyledPanel, {
|
127
129
|
width: innerWidth,
|
128
130
|
height: innerHeight,
|
131
|
+
customBackgroundColor: customBackgroundColor,
|
132
|
+
customContentBackgroundColor: customContentBackgroundColor,
|
129
133
|
className: className
|
130
134
|
}, children)));
|
131
135
|
});
|
@@ -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,gBAAU,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,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,IAAA,CAANU,MAAM;MACNC,MAAM,GAAAX,IAAA,CAANW,MAAM;MACNC,MAAM,GAAAZ,IAAA,CAANY,MAAM;MACNC,eAAe,GAAAb,IAAA,CAAfa,eAAe;MACfC,aAAa,GAAAd,IAAA,CAAbc,aAAa;MACbC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,OAAO,GAAAhB,IAAA,CAAPgB,OAAO;MACPC,cAAc,GAAAjB,IAAA,CAAdiB,cAAc;MACdC,YAAY,GAAAlB,IAAA,CAAZkB,YAAY;MACZC,MAAM,GAAAnB,IAAA,CAANmB,MAAM;MACNC,KAAK,GAAApB,IAAA,CAALoB,KAAK;MAAAC,iBAAA,GAAArB,IAAA,CACLsB,YAAY;AAAZA,MAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,iBAAA;MAAA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,SAAS,EAAEA,SAAAA;KAC3DT,EAAAA,QACQ,CACX,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM0E,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEtF,UAAU;AAClBuF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR9E,IAAAA,IAAI,EAAE;AACF+E,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD/E,IAAAA,IAAI,EAAE;AACF8E,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDlE,IAAAA,YAAY,EAAE;AACVgE,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,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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,SAAS,EAAEA,SAAAA;KAEVT,EAAAA,QACQ,CACX,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM4E,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExF,UAAU;AAClByF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRhF,IAAAA,IAAI,EAAE;AACFiF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDjF,IAAAA,IAAI,EAAE;AACFgF,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDlE,IAAAA,YAAY,EAAE;AACVgE,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTgB,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;;"}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
.
|
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
|
-
.
|
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
|
-
.
|
42
|
-
.
|
43
|
-
.
|
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
|
-
.
|
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
|
-
.
|
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;}
|
@@ -16,7 +16,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
18
18
|
|
19
|
-
var _excluded = ["children", "view", "size", "width", "height", "className", "style"];
|
19
|
+
var _excluded = ["children", "view", "size", "width", "height", "customBackgroundColor", "customContentBackgroundColor", "className", "style"];
|
20
20
|
var panelRoot = function panelRoot(Root) {
|
21
21
|
return /*#__PURE__*/React.forwardRef(function (_ref, outerRef) {
|
22
22
|
var children = _ref.children,
|
@@ -24,6 +24,8 @@ var panelRoot = function panelRoot(Root) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
width = _ref.width,
|
26
26
|
height = _ref.height,
|
27
|
+
customBackgroundColor = _ref.customBackgroundColor,
|
28
|
+
customContentBackgroundColor = _ref.customContentBackgroundColor,
|
27
29
|
className = _ref.className,
|
28
30
|
style = _ref.style,
|
29
31
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
@@ -34,11 +36,10 @@ var panelRoot = function panelRoot(Root) {
|
|
34
36
|
view: view,
|
35
37
|
size: size,
|
36
38
|
className: index.cx(Panel_tokens.classes.root, className),
|
37
|
-
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}, rest), /*#__PURE__*/React__default.default.createElement(Panel_styles.StyledWrapper, null, children));
|
39
|
+
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, Panel_tokens.privateTokens.width, innerWidth), Panel_tokens.privateTokens.height, innerHeight), Panel_tokens.privateTokens.backgroundColor, customBackgroundColor))
|
40
|
+
}, rest), /*#__PURE__*/React__default.default.createElement(Panel_styles.StyledWrapper, {
|
41
|
+
customContentBackgroundColor: customContentBackgroundColor
|
42
|
+
}, children));
|
42
43
|
});
|
43
44
|
};
|
44
45
|
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 ({
|
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,gBAAU,CACN,UAAAC,IAAA,EAaIC,QAAQ,EACP;AAAA,IAAA,IAZGC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MACRC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;MACJC,KAAK,GAAAL,IAAA,CAALK,KAAK;MACLC,MAAM,GAAAN,IAAA,CAANM,MAAM;MACNC,qBAAqB,GAAAP,IAAA,CAArBO,qBAAqB;MACrBC,4BAA4B,GAAAR,IAAA,CAA5BQ,4BAA4B;MAC5BC,SAAS,GAAAT,IAAA,CAATS,SAAS;MACTC,KAAK,GAAAV,IAAA,CAALU,KAAK;AACFC,MAAAA,IAA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I,EAAE;AACF+B,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDC,IAAAA,YAAY,EAAE;AACVH,MAAAA,GAAG,EAAEI,WAAAA;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,14 +1,24 @@
|
|
1
|
-
require('./Panel.
|
1
|
+
require('./Panel.styles_1g0gq8z.css');
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
+
var Panel_tokens = require('./Panel.tokens.js');
|
7
8
|
|
9
|
+
var _exp = function _exp() {
|
10
|
+
return function (_ref) {
|
11
|
+
var customContentBackgroundColor = _ref.customContentBackgroundColor;
|
12
|
+
return customContentBackgroundColor || "var(".concat(Panel_tokens.tokens.contentBackgroundColor, ")");
|
13
|
+
};
|
14
|
+
};
|
8
15
|
var StyledWrapper = /*#__PURE__*/react.styled('div')({
|
9
16
|
name: "StyledWrapper",
|
10
17
|
"class": "siaxu13",
|
11
|
-
propsAsIs: false
|
18
|
+
propsAsIs: false,
|
19
|
+
vars: {
|
20
|
+
"siaxu13-0": [/*#__PURE__*/_exp()]
|
21
|
+
}
|
12
22
|
});
|
13
23
|
|
14
24
|
exports.StyledWrapper = 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
|
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,mBAAM,CAACC,sBAAuB,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAFxE,IAAMC,aAAa,gBAAGC,YAAM,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;}
|
@@ -10,6 +10,21 @@ var classes = {
|
|
10
10
|
hasHeader: 'panel-has-header',
|
11
11
|
isRightClose: 'panel-right-close-button'
|
12
12
|
};
|
13
|
+
var privateTokens = {
|
14
|
+
width: '--plasma_private-panel-width',
|
15
|
+
height: '--plasma_private-panel-height',
|
16
|
+
backgroundColor: '--plasma_private-panel-custom-background-color'
|
17
|
+
};
|
18
|
+
var tokens = {
|
19
|
+
background: '--plasma-panel-background',
|
20
|
+
shadow: '--plasma-panel-shadow',
|
21
|
+
contentBackgroundColor: '--plasma-panel-content-background-color',
|
22
|
+
padding: '--plasma-panel-padding',
|
23
|
+
borderRadius: '--plasma-panel-border-radius',
|
24
|
+
closeColor: '--plasma-panel-close-color'
|
25
|
+
};
|
13
26
|
|
14
27
|
exports.classes = classes;
|
28
|
+
exports.privateTokens = privateTokens;
|
29
|
+
exports.tokens = tokens;
|
15
30
|
//# 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
|
-
.
|
30
|
-
.
|
31
|
-
.
|
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
|
-
require('./PanelHeader.
|
1
|
+
require('./PanelHeader.styles_16qje7n.css');
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@@ -10,19 +10,19 @@ var Button$1 = require('../../../Button/Button.js');
|
|
10
10
|
|
11
11
|
var mergedButtonConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
|
12
12
|
var Button = /*#__PURE__*/common.component(mergedButtonConfig);
|
13
|
-
var
|
13
|
+
var _exp3 = function _exp3() {
|
14
14
|
return function (_ref) {
|
15
15
|
var placement = _ref.placement;
|
16
16
|
return placement === PanelHeader_types.placements.left ? -1 : 0;
|
17
17
|
};
|
18
18
|
};
|
19
|
-
var
|
19
|
+
var _exp4 = function _exp4() {
|
20
20
|
return function (_ref2) {
|
21
21
|
var placement = _ref2.placement;
|
22
22
|
return !placement || placement === PanelHeader_types.placements.right ? '0.5rem' : '';
|
23
23
|
};
|
24
24
|
};
|
25
|
-
var
|
25
|
+
var _exp5 = function _exp5() {
|
26
26
|
return function (_ref3) {
|
27
27
|
var placement = _ref3.placement;
|
28
28
|
return placement === PanelHeader_types.placements.left ? '0.5rem' : '';
|
@@ -33,9 +33,9 @@ var ButtonWrapper = /*#__PURE__*/react.styled('div')({
|
|
33
33
|
"class": "b5xb1jq",
|
34
34
|
propsAsIs: false,
|
35
35
|
vars: {
|
36
|
-
"b5xb1jq-0": [/*#__PURE__*/
|
37
|
-
"b5xb1jq-1": [/*#__PURE__*/
|
38
|
-
"b5xb1jq-2": [/*#__PURE__*/
|
36
|
+
"b5xb1jq-0": [/*#__PURE__*/_exp3()],
|
37
|
+
"b5xb1jq-1": [/*#__PURE__*/_exp4()],
|
38
|
+
"b5xb1jq-2": [/*#__PURE__*/_exp5()]
|
39
39
|
}
|
40
40
|
});
|
41
41
|
var StyledHeader = /*#__PURE__*/react.styled('div')({
|
@@ -43,10 +43,10 @@ var StyledHeader = /*#__PURE__*/react.styled('div')({
|
|
43
43
|
"class": "s1hqmxl1",
|
44
44
|
propsAsIs: false
|
45
45
|
});
|
46
|
-
var
|
46
|
+
var _exp6 = function _exp6() {
|
47
47
|
return Button;
|
48
48
|
};
|
49
|
-
var CloseIconWrapper = /*#__PURE__*/react.styled(
|
49
|
+
var CloseIconWrapper = /*#__PURE__*/react.styled(_exp6())({
|
50
50
|
name: "CloseIconWrapper",
|
51
51
|
"class": "c7hx8go",
|
52
52
|
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","
|
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,kBAAW,CAACC,qBAAY,CAAC,CAAA;AAC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CACtF,EAAA;AAEM,IAAMQ,YAAY,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;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,YAAM,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 +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/cjs/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
|
-
.
|
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
|
-
.
|
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
|
-
.
|
387
|
-
.
|
388
|
-
.
|
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
|
|
@@ -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
|
-
|
36
|
-
|
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],
|
@@ -33,8 +33,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
33
33
|
var calendarDoubleRoot = exports.calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
34
34
|
return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
|
35
35
|
var externalValue = _ref.value,
|
36
|
-
|
37
|
-
|
36
|
+
min = _ref.min,
|
37
|
+
max = _ref.max,
|
38
38
|
includeEdgeDates = _ref.includeEdgeDates,
|
39
39
|
_ref$type = _ref.type,
|
40
40
|
type = _ref$type === void 0 ? 'Days' : _ref$type,
|
@@ -73,8 +73,6 @@ var calendarDoubleRoot = exports.calendarDoubleRoot = function calendarDoubleRoo
|
|
73
73
|
_useState8 = _slicedToArray(_useState7, 2),
|
74
74
|
outOfRangeKey = _useState8[0],
|
75
75
|
setOutOfRangeKey = _useState8[1];
|
76
|
-
var min = minDate && new Date(minDate);
|
77
|
-
var max = maxDate && new Date(maxDate);
|
78
76
|
var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value, min, type, true)),
|
79
77
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
80
78
|
state = _useReducer2[0],
|