@salutejs/plasma-new-hope 0.78.0-canary.1195.8913931601.0 → 0.78.0-canary.1195.8924860991.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Button/Button.styles.js +1 -0
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Drawer/Drawer.js +1 -0
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/IconButton/IconButton.css +11 -12
- package/cjs/components/IconButton/IconButton.js +18 -52
- package/cjs/components/IconButton/IconButton.js.map +1 -1
- package/cjs/components/IconButton/IconButton.styles.js +6 -15
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
- package/cjs/components/IconButton/IconButton.styles_1hknr37.css +1 -0
- package/cjs/components/IconButton/IconButton.tokens.js +0 -4
- package/cjs/components/IconButton/IconButton.tokens.js.map +1 -1
- package/cjs/index.css +1 -2
- package/cjs/index.js +0 -1
- package/cjs/index.js.map +1 -1
- package/es/components/Button/Button.styles.js +1 -0
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Drawer/Drawer.js +1 -0
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/IconButton/IconButton.css +11 -12
- package/es/components/IconButton/IconButton.js +19 -53
- package/es/components/IconButton/IconButton.js.map +1 -1
- package/es/components/IconButton/IconButton.styles.js +7 -15
- package/es/components/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/IconButton/IconButton.styles_1hknr37.css +1 -0
- package/es/components/IconButton/IconButton.tokens.js +1 -4
- package/es/components/IconButton/IconButton.tokens.js.map +1 -1
- package/es/index.css +1 -2
- package/es/index.js +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Button/Button.styles.js +10 -2
- package/styled-components/cjs/components/IconButton/IconButton.js +18 -57
- package/styled-components/cjs/components/IconButton/IconButton.styles.js +5 -12
- package/styled-components/cjs/components/IconButton/IconButton.tokens.js +1 -4
- package/styled-components/cjs/components/IconButton/index.js +0 -6
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +5 -1
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +5 -1
- package/styled-components/es/components/Button/Button.styles.js +10 -2
- package/styled-components/es/components/IconButton/IconButton.js +19 -55
- package/styled-components/es/components/IconButton/IconButton.styles.js +5 -10
- package/styled-components/es/components/IconButton/IconButton.tokens.js +0 -3
- package/styled-components/es/components/IconButton/index.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +5 -1
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +5 -1
- package/types/components/Button/Button.styles.d.ts +1 -0
- package/types/components/Button/Button.styles.d.ts.map +1 -1
- package/types/components/IconButton/IconButton.d.ts +10 -5
- package/types/components/IconButton/IconButton.d.ts.map +1 -1
- package/types/components/IconButton/IconButton.styles.d.ts +1 -2
- package/types/components/IconButton/IconButton.styles.d.ts.map +1 -1
- package/types/components/IconButton/IconButton.tokens.d.ts +0 -3
- package/types/components/IconButton/IconButton.tokens.d.ts.map +1 -1
- package/types/components/IconButton/index.d.ts +1 -2
- package/types/components/IconButton/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +1 -1
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -1
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +1 -1
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -1
- package/cjs/components/IconButton/IconButton.styles_12iyaye.css +0 -2
- package/cjs/components/IconButton/variations/_disabled/base.js +0 -9
- package/cjs/components/IconButton/variations/_disabled/base.js.map +0 -1
- package/cjs/components/IconButton/variations/_disabled/base_x642ct.css +0 -1
- package/cjs/components/IconButton/variations/_focused/base.js +0 -9
- package/cjs/components/IconButton/variations/_focused/base.js.map +0 -1
- package/cjs/components/IconButton/variations/_focused/base_x642ct.css +0 -1
- package/cjs/components/IconButton/variations/_size/base.js +0 -9
- package/cjs/components/IconButton/variations/_size/base.js.map +0 -1
- package/cjs/components/IconButton/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/IconButton/variations/_view/base.js +0 -9
- package/cjs/components/IconButton/variations/_view/base.js.map +0 -1
- package/cjs/components/IconButton/variations/_view/base_x642ct.css +0 -1
- package/es/components/IconButton/IconButton.styles_12iyaye.css +0 -2
- package/es/components/IconButton/variations/_disabled/base.js +0 -5
- package/es/components/IconButton/variations/_disabled/base.js.map +0 -1
- package/es/components/IconButton/variations/_disabled/base_x642ct.css +0 -1
- package/es/components/IconButton/variations/_focused/base.js +0 -5
- package/es/components/IconButton/variations/_focused/base.js.map +0 -1
- package/es/components/IconButton/variations/_focused/base_x642ct.css +0 -1
- package/es/components/IconButton/variations/_size/base.js +0 -5
- package/es/components/IconButton/variations/_size/base.js.map +0 -1
- package/es/components/IconButton/variations/_size/base_x642ct.css +0 -1
- package/es/components/IconButton/variations/_view/base.js +0 -5
- package/es/components/IconButton/variations/_view/base.js.map +0 -1
- package/es/components/IconButton/variations/_view/base_x642ct.css +0 -1
- package/styled-components/cjs/components/IconButton/IconButton.types.js +0 -5
- package/styled-components/cjs/components/IconButton/variations/_disabled/base.js +0 -8
- package/styled-components/cjs/components/IconButton/variations/_disabled/tokens.json +0 -1
- package/styled-components/cjs/components/IconButton/variations/_focused/base.js +0 -8
- package/styled-components/cjs/components/IconButton/variations/_focused/tokens.json +0 -1
- package/styled-components/cjs/components/IconButton/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/IconButton/variations/_size/tokens.json +0 -1
- package/styled-components/cjs/components/IconButton/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/IconButton/variations/_view/tokens.json +0 -1
- package/styled-components/es/components/IconButton/IconButton.types.js +0 -1
- package/styled-components/es/components/IconButton/variations/_disabled/base.js +0 -2
- package/styled-components/es/components/IconButton/variations/_disabled/tokens.json +0 -1
- package/styled-components/es/components/IconButton/variations/_focused/base.js +0 -2
- package/styled-components/es/components/IconButton/variations/_focused/tokens.json +0 -1
- package/styled-components/es/components/IconButton/variations/_size/base.js +0 -2
- package/styled-components/es/components/IconButton/variations/_size/tokens.json +0 -1
- package/styled-components/es/components/IconButton/variations/_view/base.js +0 -2
- package/styled-components/es/components/IconButton/variations/_view/tokens.json +0 -1
- package/types/components/IconButton/IconButton.types.d.ts +0 -13
- package/types/components/IconButton/IconButton.types.d.ts.map +0 -1
- package/types/components/IconButton/variations/_disabled/base.d.ts +0 -2
- package/types/components/IconButton/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/IconButton/variations/_focused/base.d.ts +0 -2
- package/types/components/IconButton/variations/_focused/base.d.ts.map +0 -1
- package/types/components/IconButton/variations/_size/base.d.ts +0 -2
- package/types/components/IconButton/variations/_size/base.d.ts.map +0 -1
- package/types/components/IconButton/variations/_view/base.d.ts +0 -2
- package/types/components/IconButton/variations/_view/base.d.ts.map +0 -1
@@ -4,6 +4,7 @@ import './Button.styles_uqvh6u.css';
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
6
|
var react = require('@linaria/react');
|
7
|
+
require('focus-visible');
|
7
8
|
require('@linaria/core');
|
8
9
|
var common = require('../../engines/common.js');
|
9
10
|
var Spinner$1 = require('../Spinner/Spinner.js');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// TODO: PLASMA-2164\n// WHY do we need applyEllipsis ??\n// Если внутри кнопки тескт и на нее решили повесить square пропс\nexport const ButtonText = styled.span`\n :not(:last-child) {\n margin-right: 0.375rem;\n }\n\n :not(:first-child) {\n margin-left: 0.375rem;\n }\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n width: 100%;\n align-items: inherit;\n justify-content: inherit;\n height: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","base","ButtonText","styled","name","class","propsAsIs","_exp4","_ref","isLoading","LoadWrap","vars","Loader","_exp5","StyledSpinner"],"mappings":"
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis, addFocus } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// TODO: PLASMA-2164\n// WHY do we need applyEllipsis ??\n// Если внутри кнопки тескт и на нее решили повесить square пропс\nexport const ButtonText = styled.span`\n :not(:last-child) {\n margin-right: 0.375rem;\n }\n\n :not(:first-child) {\n margin-left: 0.375rem;\n }\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n width: 100%;\n align-items: inherit;\n justify-content: inherit;\n height: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n\n// INFO: Для возможности переиспользования стилей в других компонентах\nexport const baseContent = `\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n\n :hover {\n color: var(${tokens.buttonColorHover}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorHover}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleHover});\n }\n\n :active {\n color: var(${tokens.buttonColorActive}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorActive}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleActive});\n }\n\n height: var(${tokens.buttonHeight});\n width: var(${tokens.buttonWidth});\n\n /* TODO: #714 move these calc's to plasma-mapping | ds-generator and add Math.round() */\n padding: 0 var(${tokens.buttonPadding}, calc(var(${tokens.buttonHeight}) * 1.618 / 4));\n\n font-family: var(${tokens.buttonFontFamily});\n font-size: var(${tokens.buttonFontSize});\n font-style: var(${tokens.buttonFontStyle});\n font-weight: var(${tokens.buttonFontWeight});\n letter-spacing: var(${tokens.buttonLetterSpacing});\n line-height: var(${tokens.buttonLineHeight});\n\n /* TODO: #710 make it token API ? */\n --plasma_private-btn-outline-size: var(--plasma-button-outline-size, 0.0625rem);\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: 'var(--plasma_private-btn-outline-size)',\n outlineRadius: 'calc(0.125rem + var(--plasma_private-btn-br))',\n outlineColor: `var(${tokens.buttonFocusColor})`,\n })}\n\n &[disabled] {\n opacity: var(${tokens.buttonDisabledOpacity});\n cursor: not-allowed;\n\n :hover,\n :active {\n scale: none;\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n }\n }\n\n &.${classes.fixedStretching} {\n width: var(${tokens.buttonWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n &.${classes.autoStretching} {\n width: auto;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","base","ButtonText","styled","name","class","propsAsIs","_exp4","_ref","isLoading","LoadWrap","vars","Loader","_exp5","St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,CAAA;AAAAT,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAGlC;;;;;;;;"}
|
@@ -15,6 +15,7 @@ require('@linaria/react');
|
|
15
15
|
var index = require('../Popup/utils/index.js');
|
16
16
|
var Overlay = require('../Overlay/Overlay.js');
|
17
17
|
var Panel$1 = require('../Panel/Panel.js');
|
18
|
+
require('focus-visible');
|
18
19
|
var Drawer_tokens = require('./Drawer.tokens.js');
|
19
20
|
var base = require('./variations/_view/base.js');
|
20
21
|
var base$1 = require('./variations/_size/base.js');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { getSizeValueFromProp } from '../../utils';\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 } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\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 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 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 { drawerInfo } = useDrawer({\n id: innerId,\n isOpen,\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 isOpen={isOpen}\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 <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\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":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","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","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","withAnimation","overlay","Overlay","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,kBAAW,CAACC,mBAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,gBAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CACN,UAAAC,IAAA,EA2BIC,QAAQ,EACP;AAAA,IAAA,IA1BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,SA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AAAuB,OAC1C,CACC,CAAA;AAEb,KAAA,EACG5B,IAAI,CAER8B,eAAAA,KAAA,CAAAC,aAAA,CAAC/D,IAAI,EAAA;AACDS,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,IAAI,EAAEA,IAAK;AACXgE,MAAAA,KAAK,EAAE;AAAE/D,QAAAA,KAAK,EAAEsC,UAAU;AAAErC,QAAAA,MAAM,EAAEuC,WAAAA;OAAc;AAClD5B,MAAAA,YAAY,EAAEA,YAAAA;AAAa,KAAA,eAE3BuC,KAAA,CAAAC,aAAA,CAAClE,KAAK,EAAA;AAACc,MAAAA,KAAK,EAAEsC,UAAW;AAACrC,MAAAA,MAAM,EAAEuC,WAAY;AAACnC,MAAAA,SAAS,EAAEA,SAAAA;KACrDR,EAAAA,QACE,CACL,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMmE,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/E,UAAU;AAClBgF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvE,IAAAA,IAAI,EAAE;AACFwE,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDxE,IAAAA,IAAI,EAAE;AACFuE,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD5D,IAAAA,YAAY,EAAE;AACV0D,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5E,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTa,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 { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { getSizeValueFromProp } from '../../utils';\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 } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\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 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 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 { drawerInfo } = useDrawer({\n id: innerId,\n isOpen,\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 isOpen={isOpen}\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 <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\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":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","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","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","withAnimation","overlay","Overlay","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,kBAAW,CAACC,mBAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,gBAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CACN,UAAAC,IAAA,EA2BIC,QAAQ,EACP;AAAA,IAAA,IA1BGC,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,eAAe,GAAAZ,IAAA,CAAfY,eAAe;MACfC,aAAa,GAAAb,IAAA,CAAba,aAAa;MACbC,SAAS,GAAAd,IAAA,CAATc,SAAS;MACTC,OAAO,GAAAf,IAAA,CAAPe,OAAO;MACPC,cAAc,GAAAhB,IAAA,CAAdgB,cAAc;MACdC,YAAY,GAAAjB,IAAA,CAAZiB,YAAY;MACZC,MAAM,GAAA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;AAEE,IAAMmE,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/E,UAAU;AAClBgF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvE,IAAAA,IAAI,EAAE;AACFwE,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDxE,IAAAA,IAAI,EAAE;AACFuE,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD5D,IAAAA,YAAY,EAAE;AACV0D,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5E,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTa,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;;"}
|
@@ -1,13 +1,3 @@
|
|
1
|
-
.base_x95x4p_b1ty39ru__349bf40b{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_x95x4p_b1ty39ru__349bf40b:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_x95x4p_b1ty39ru__349bf40b:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
2
|
-
|
3
|
-
.base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
|
4
|
-
|
5
|
-
.base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
|
6
|
-
|
7
|
-
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
8
|
-
|
9
|
-
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
10
|
-
|
11
1
|
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
12
2
|
|
13
3
|
.base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
|
@@ -21,5 +11,14 @@
|
|
21
11
|
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
22
12
|
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
23
13
|
|
24
|
-
.
|
25
|
-
|
14
|
+
.base_x95x4p_b1ty39ru__349bf40b{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_x95x4p_b1ty39ru__349bf40b:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_x95x4p_b1ty39ru__349bf40b:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
15
|
+
|
16
|
+
.base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
|
17
|
+
|
18
|
+
.base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
|
19
|
+
|
20
|
+
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
21
|
+
|
22
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
23
|
+
|
24
|
+
.IconButton_styles_1hknr37_b1ua728l__f14249fc{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);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_1hknr37_b1ua728l__f14249fc{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonSquare__f14249fc{width:var(--plasma-button-height);padding:0;}.IconButton_styles_1hknr37_b1ua728l__f14249fc:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:focus{outline:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_focusVisible__f14249fc:focus::before,.IconButton_styles_1hknr37_b1ua728l__f14249fc[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:hover,.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFixed__f14249fc{width:var(--plasma-button-width);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFilled__f14249fc{width:100%;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingAuto__f14249fc{width:auto;}
|
@@ -2,60 +2,19 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
5
|
+
var Button = require('../Button/Button.js');
|
6
|
+
var base = require('../Button/variations/_view/base.js');
|
7
|
+
var base$1 = require('../Button/variations/_size/base.js');
|
8
|
+
var base$2 = require('../Button/variations/_disabled/base.js');
|
9
|
+
var base$3 = require('../Button/variations/_focused/base.js');
|
10
|
+
var base$4 = require('../Button/variations/_blurred/base.js');
|
11
|
+
var base$5 = require('../Button/variations/_stretching/base.js');
|
8
12
|
var IconButton_styles = require('./IconButton.styles.js');
|
9
|
-
var IconButton_tokens = require('./IconButton.tokens.js');
|
10
|
-
var base = require('./variations/_view/base.js');
|
11
|
-
var base$1 = require('./variations/_size/base.js');
|
12
|
-
var base$2 = require('./variations/_disabled/base.js');
|
13
|
-
var base$3 = require('./variations/_focused/base.js');
|
14
13
|
|
15
|
-
var
|
16
|
-
var iconButtonRoot = function iconButtonRoot(Root) {
|
17
|
-
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
18
|
-
var children = props.children,
|
19
|
-
view = props.view,
|
20
|
-
size = props.size,
|
21
|
-
icon = props.icon,
|
22
|
-
isLoading = props.isLoading,
|
23
|
-
loader = props.loader,
|
24
|
-
pin = props.pin,
|
25
|
-
disabled = props.disabled,
|
26
|
-
focused = props.focused,
|
27
|
-
outlined = props.outlined,
|
28
|
-
className = props.className,
|
29
|
-
style = props.style,
|
30
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
31
|
-
return /*#__PURE__*/React.createElement(Root, {
|
32
|
-
view: view,
|
33
|
-
size: size,
|
34
|
-
focused: focused,
|
35
|
-
disabled: disabled,
|
36
|
-
className: IconButton_tokens.classes.iconButtonItem
|
37
|
-
}, /*#__PURE__*/React.createElement(IconButton_styles.IconButtonStyled, _rollupPluginBabelHelpers.extends({
|
38
|
-
view: view,
|
39
|
-
size: size,
|
40
|
-
loader: loader,
|
41
|
-
isLoading: isLoading,
|
42
|
-
pin: pin,
|
43
|
-
disabled: disabled,
|
44
|
-
focused: focused,
|
45
|
-
outlined: outlined,
|
46
|
-
ref: ref,
|
47
|
-
square: true // Временное решение
|
48
|
-
,
|
49
|
-
stretching: "fixed" // Не работает не понятное почему
|
50
|
-
,
|
51
|
-
className: index.cx(className),
|
52
|
-
style: style
|
53
|
-
}, rest), icon || children));
|
54
|
-
});
|
55
|
-
};
|
14
|
+
var iconButtonRoot = Button.buttonRoot;
|
56
15
|
var iconButtonConfig = {
|
57
|
-
name: '
|
58
|
-
tag: '
|
16
|
+
name: 'IconButton',
|
17
|
+
tag: 'button',
|
59
18
|
layout: iconButtonRoot,
|
60
19
|
base: IconButton_styles.base,
|
61
20
|
variations: {
|
@@ -71,11 +30,18 @@ var iconButtonConfig = {
|
|
71
30
|
},
|
72
31
|
focused: {
|
73
32
|
css: base$3.base
|
33
|
+
},
|
34
|
+
blurred: {
|
35
|
+
css: base$4.base
|
36
|
+
},
|
37
|
+
stretching: {
|
38
|
+
css: base$5.base
|
74
39
|
}
|
75
40
|
},
|
76
41
|
defaults: {
|
77
42
|
view: 'secondary',
|
78
|
-
size: 'm'
|
43
|
+
size: 'm',
|
44
|
+
stretching: 'fixed'
|
79
45
|
}
|
80
46
|
};
|
81
47
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { buttonRoot } from '../Button';\nimport { base as viewCSS } from '../Button/variations/_view/base';\nimport { base as sizeCSS } from '../Button/variations/_size/base';\nimport { base as disabledCSS } from '../Button/variations/_disabled/base';\nimport { base as focusedCSS } from '../Button/variations/_focused/base';\nimport { base as blurredCSS } from '../Button/variations/_blurred/base';\nimport { base as stretchingCSS } from '../Button/variations/_stretching/base';\n\nimport { base } from './IconButton.styles';\n\nexport const iconButtonRoot = buttonRoot;\n\nexport const iconButtonConfig = {\n name: 'IconButton',\n tag: 'button',\n layout: iconButtonRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n blurred: {\n css: blurredCSS,\n },\n stretching: {\n css: stretchingCSS,\n },\n },\n defaults: {\n view: 'secondary',\n size: 'm',\n stretching: 'fixed',\n },\n};\n"],"names":["iconButtonRoot","buttonRoot","iconButtonConfig","name","tag","layout","base","variations","view","css","viewCSS","size","sizeCSS","disabled","disabledCSS","attrs","focused","focusedCSS","blurred","blurredCSS","stretching","stretchingCSS","defaults"],"mappings":";;;;;;;;;;;;;AAUO,IAAMA,cAAc,GAAGC,kBAAU;AAEjC,IAAMC,gBAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,YAAY;AAClBC,EAAAA,GAAG,EAAE,QAAQ;AACbC,EAAAA,MAAM,EAAEL,cAAc;AACtBM,EAAAA,IAAI,EAAJA,sBAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDC,IAAAA,IAAI,EAAE;AACFF,MAAAA,GAAG,EAAEG,WAAAA;KACR;AACDC,IAAAA,QAAQ,EAAE;AACNJ,MAAAA,GAAG,EAAEK,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDC,IAAAA,OAAO,EAAE;AACLP,MAAAA,GAAG,EAAEQ,WAAAA;KACR;AACDC,IAAAA,OAAO,EAAE;AACLT,MAAAA,GAAG,EAAEU,WAAAA;KACR;AACDC,IAAAA,UAAU,EAAE;AACRX,MAAAA,GAAG,EAAEY,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNd,IAAAA,IAAI,EAAE,WAAW;AACjBG,IAAAA,IAAI,EAAE,GAAG;AACTS,IAAAA,UAAU,EAAE,OAAA;AAChB,GAAA;AACJ;;;;;"}
|
@@ -1,25 +1,16 @@
|
|
1
|
-
import './IconButton.
|
1
|
+
import './IconButton.styles_1hknr37.css';
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
5
5
|
|
6
|
-
|
6
|
+
require('react');
|
7
|
+
require('../../utils/react.js');
|
8
|
+
require('@linaria/react');
|
9
|
+
require('focus-visible');
|
7
10
|
require('@linaria/core');
|
8
|
-
|
9
|
-
var Button$1 = require('../Button/Button.js');
|
11
|
+
require('@salutejs/plasma-core');
|
10
12
|
|
11
|
-
var mergedConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
|
12
|
-
var Button = /*#__PURE__*/common.component(mergedConfig);
|
13
13
|
var base = "b1ua728l";
|
14
|
-
var _exp2 = function _exp2() {
|
15
|
-
return Button;
|
16
|
-
};
|
17
|
-
var IconButtonStyled = /*#__PURE__*/react.styled(_exp2())({
|
18
|
-
name: "IconButtonStyled",
|
19
|
-
"class": "i5roq7j",
|
20
|
-
propsAsIs: true
|
21
|
-
});
|
22
14
|
|
23
|
-
exports.IconButtonStyled = IconButtonStyled;
|
24
15
|
exports.base = base;
|
25
16
|
//# sourceMappingURL=IconButton.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconButton.styles.js","sources":["../../../src/components/IconButton/IconButton.styles.ts"],"sourcesContent":["import {
|
1
|
+
{"version":3,"file":"IconButton.styles.js","sources":["../../../src/components/IconButton/IconButton.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { buttonTokens } from '../Button';\nimport { baseContent as buttonBase } from '../Button/Button.styles';\n\nimport { tokens } from './IconButton.tokens';\n\nexport const mappingOverride = `\n ${buttonTokens.buttonPadding}: 0;\n\n ${buttonTokens.buttonColor}: var(${tokens.iconButtonColor});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n\n ${buttonTokens.buttonColorHover}: var(${tokens.iconButtonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n\n ${buttonTokens.buttonColorActive}: var(${tokens.iconButtonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n\n\n ${buttonTokens.buttonFontFamily}: var(${tokens.iconButtonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.iconButtonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.iconButtonFontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.iconButtonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.iconButtonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.iconButtonLineHeight});\n\n ${buttonTokens.buttonWidth}: var(${tokens.iconButtonWidth});\n ${buttonTokens.buttonHeight}: var(${tokens.iconButtonHeight});\n ${buttonTokens.buttonRadius}: var(${tokens.iconButtonRadius});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${tokens.iconButtonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${tokens.iconButtonFocusColor});\n\n ${buttonTokens.buttonSpinnerSize}: var(${tokens.iconButtonSpinnerSize});\n ${buttonTokens.buttonSpinnerColor}: var(${tokens.iconButtonSpinnerColor});\n`;\n\nexport const base = css`\n ${buttonBase};\n ${mappingOverride};\n`;\n"],"names":["base"],"mappings":";;;;;;;;;;;AAsCO,IAAMA,IAAI,GAGhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1ua728l{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);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.b1ua728l{-webkit-text-decoration:none;text-decoration:none;}.b1ua728l.b1ua728l.button-square{width:var(--plasma-button-height);padding:0;}.b1ua728l:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.b1ua728l:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.b1ua728l:focus{outline:none;}.b1ua728l::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1ua728l.focus-visible:focus::before,.b1ua728l[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.b1ua728l[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.b1ua728l[disabled]:hover,.b1ua728l[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.b1ua728l.button-stretching-fixed{width:var(--plasma-button-width);}.b1ua728l.button-stretching-filled{width:100%;}.b1ua728l.button-stretching-auto{width:auto;}
|
@@ -2,9 +2,6 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var classes = {
|
6
|
-
iconButtonItem: 'icon-button-item'
|
7
|
-
};
|
8
5
|
var tokens = {
|
9
6
|
iconButtonColor: '--plasma-icon-button-color',
|
10
7
|
iconButtonBackgroundColor: '--plasma-icon-button-background-color',
|
@@ -31,6 +28,5 @@ var tokens = {
|
|
31
28
|
iconButtonSpinnerSize: '--plasma-icon-button-spinner-size'
|
32
29
|
};
|
33
30
|
|
34
|
-
exports.classes = classes;
|
35
31
|
exports.tokens = tokens;
|
36
32
|
//# sourceMappingURL=IconButton.tokens.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconButton.tokens.js","sources":["../../../src/components/IconButton/IconButton.tokens.ts"],"sourcesContent":["export const
|
1
|
+
{"version":3,"file":"IconButton.tokens.js","sources":["../../../src/components/IconButton/IconButton.tokens.ts"],"sourcesContent":["export const tokens = {\n iconButtonColor: '--plasma-icon-button-color',\n iconButtonBackgroundColor: '--plasma-icon-button-background-color',\n iconButtonColorHover: '--plasma-icon-button-color-hover',\n iconButtonBackgroundColorHover: '--plasma-icon-button-background-color-hover',\n iconButtonColorActive: '--plasma-icon-button-color-active',\n iconButtonBackgroundColorActive: '--plasma-icon-button-background-color-active',\n\n iconButtonScaleHover: '--plasma-icon-button-scale-hover',\n iconButtonScaleActive: '---plasma-icon-button-scale-active',\n iconButtonHeight: '--plasma-icon-button-height',\n iconButtonWidth: '--plasma-icon-button-width',\n iconButtonPadding: '--plasma-icon-button-padding',\n iconButtonRadius: '--plasma-icon-button-radius',\n iconButtonRadiusCircle: '--plasma-icon-button-radius-circle',\n\n iconButtonFontFamily: '--plasma-icon-button-font-family',\n iconButtonFontSize: '--plasma-icon-button-font-size',\n iconButtonFontStyle: '--plasma-icon-button-font-style',\n iconButtonFontWeight: '--plasma-icon-button-font-weight',\n iconButtonLetterSpacing: '--plasma-icon-button-letter-spacing',\n iconButtonLineHeight: '--plasma-icon-button-line-height',\n\n iconButtonDisabledOpacity: '--plasma-icon-button-disabled-opacity',\n iconButtonFocusColor: '--plasma-icon-button-focus-color',\n\n iconButtonSpinnerColor: '--plasma-icon-button-spinner-color',\n iconButtonSpinnerSize: '--plasma-icon-button-spinner-size',\n};\n"],"names":["tokens","iconButtonColor","iconButtonBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonScaleHover","iconButtonScaleActive","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonRadiusCircle","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","iconButtonDisabledOpacity","iconButtonFocusColor","iconButtonSpinnerColor","iconButtonSpinnerSize"],"mappings":";;;;AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,eAAe,EAAE,4BAA4B;AAC7CC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,8BAA8B,EAAE,6CAA6C;AAC7EC,EAAAA,qBAAqB,EAAE,mCAAmC;AAC1DC,EAAAA,+BAA+B,EAAE,8CAA8C;AAE/EC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,qBAAqB,EAAE,oCAAoC;AAC3DC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,eAAe,EAAE,4BAA4B;AAC7CC,EAAAA,iBAAiB,EAAE,8BAA8B;AACjDC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,sBAAsB,EAAE,oCAAoC;AAE5DC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,kBAAkB,EAAE,gCAAgC;AACpDC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,uBAAuB,EAAE,qCAAqC;AAC9DC,EAAAA,oBAAoB,EAAE,kCAAkC;AAExDC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,oBAAoB,EAAE,kCAAkC;AAExDC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,qBAAqB,EAAE,mCAAA;AAC3B;;;;"}
|
package/cjs/index.css
CHANGED
@@ -14,8 +14,7 @@
|
|
14
14
|
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
15
15
|
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
16
16
|
|
17
|
-
.
|
18
|
-
.IconButton_styles_12iyaye_i5roq7j__f373d2de{--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}
|
17
|
+
.IconButton_styles_1hknr37_b1ua728l__f14249fc{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);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_1hknr37_b1ua728l__f14249fc{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonSquare__f14249fc{width:var(--plasma-button-height);padding:0;}.IconButton_styles_1hknr37_b1ua728l__f14249fc:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:focus{outline:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_focusVisible__f14249fc:focus::before,.IconButton_styles_1hknr37_b1ua728l__f14249fc[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:hover,.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFixed__f14249fc{width:var(--plasma-button-width);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFilled__f14249fc{width:100%;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingAuto__f14249fc{width:auto;}
|
19
18
|
|
20
19
|
.base_6k3uip_b7jdqtc__e6616a37.base_6k3uip_buttonGroupOverrideStyles__e6616a37 .base_6k3uip_buttonItem__e6616a37{--plasma-button-color:var(--plasma-button-group-item-color);--plasma-button-background-color:var(--plasma-button-group-item-background-color);--plasma-button-color-hover:var(--plasma-button-group-item-color-hover);--plasma-button-background-color-hover:var(--plasma-button-group-item-background-color-hover);--plasma-button-color-active:var(--plasma-button-group-item-color-active);--plasma-button-background-color-active:var(--plasma-button-group-item-background-color-active);}
|
21
20
|
|
package/cjs/index.js
CHANGED
@@ -256,7 +256,6 @@ exports.buttonClasses = Button_tokens.classes;
|
|
256
256
|
exports.buttonTokens = Button_tokens.tokens;
|
257
257
|
exports.iconButtonConfig = IconButton.iconButtonConfig;
|
258
258
|
exports.iconButtonRoot = IconButton.iconButtonRoot;
|
259
|
-
exports.iconButtonClasses = IconButton_tokens.classes;
|
260
259
|
exports.iconButtonTokens = IconButton_tokens.tokens;
|
261
260
|
exports.buttonGroupConfig = ButtonGroup.buttonGroupConfig;
|
262
261
|
exports.buttonGroupRoot = ButtonGroup.buttonGroupRoot;
|
package/cjs/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// TODO: PLASMA-2164\n// WHY do we need applyEllipsis ??\n// Если внутри кнопки тескт и на нее решили повесить square пропс\nexport const ButtonText = styled.span`\n :not(:last-child) {\n margin-right: 0.375rem;\n }\n\n :not(:first-child) {\n margin-left: 0.375rem;\n }\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n width: 100%;\n align-items: inherit;\n justify-content: inherit;\n height: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","base","ButtonText","styled","name","class","propsAsIs","_exp4","_ref","isLoading","LoadWrap","vars","Loader","_exp5","StyledSpinner"],"mappings":"
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis, addFocus } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// TODO: PLASMA-2164\n// WHY do we need applyEllipsis ??\n// Если внутри кнопки тескт и на нее решили повесить square пропс\nexport const ButtonText = styled.span`\n :not(:last-child) {\n margin-right: 0.375rem;\n }\n\n :not(:first-child) {\n margin-left: 0.375rem;\n }\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n width: 100%;\n align-items: inherit;\n justify-content: inherit;\n height: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n\n// INFO: Для возможности переиспользования стилей в других компонентах\nexport const baseContent = `\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE: \n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n\n :hover {\n color: var(${tokens.buttonColorHover}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorHover}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleHover});\n }\n\n :active {\n color: var(${tokens.buttonColorActive}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorActive}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleActive});\n }\n\n height: var(${tokens.buttonHeight});\n width: var(${tokens.buttonWidth});\n\n /* TODO: #714 move these calc's to plasma-mapping | ds-generator and add Math.round() */\n padding: 0 var(${tokens.buttonPadding}, calc(var(${tokens.buttonHeight}) * 1.618 / 4));\n\n font-family: var(${tokens.buttonFontFamily});\n font-size: var(${tokens.buttonFontSize});\n font-style: var(${tokens.buttonFontStyle});\n font-weight: var(${tokens.buttonFontWeight});\n letter-spacing: var(${tokens.buttonLetterSpacing});\n line-height: var(${tokens.buttonLineHeight});\n\n /* TODO: #710 make it token API ? */\n --plasma_private-btn-outline-size: var(--plasma-button-outline-size, 0.0625rem);\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: 'var(--plasma_private-btn-outline-size)',\n outlineRadius: 'calc(0.125rem + var(--plasma_private-btn-br))',\n outlineColor: `var(${tokens.buttonFocusColor})`,\n })}\n\n &[disabled] {\n opacity: var(${tokens.buttonDisabledOpacity});\n cursor: not-allowed;\n\n :hover,\n :active {\n scale: none;\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n }\n }\n\n &.${classes.fixedStretching} {\n width: var(${tokens.buttonWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n &.${classes.autoStretching} {\n width: auto;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","base","ButtonText","styled","name","class","propsAsIs","_exp4","_ref","isLoading","LoadWrap","vars","Loader","_exp5","StyledSpinner"],"mappings":";;;;;;AASA;AACA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,aAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAAGC,SAAS,CAACJ,YAAY,CAAC,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 import '@linaria/react';
|
|
11
11
|
import { DEFAULT_Z_INDEX } from '../Popup/utils/index.js';
|
12
12
|
import { Overlay } from '../Overlay/Overlay.js';
|
13
13
|
import { panelConfig } from '../Panel/Panel.js';
|
14
|
+
import 'focus-visible';
|
14
15
|
import { classes, tokens } from './Drawer.tokens.js';
|
15
16
|
import { base } from './variations/_view/base.js';
|
16
17
|
import { base as base$1 } from './variations/_size/base.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { getSizeValueFromProp } from '../../utils';\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 } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\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 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 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 { drawerInfo } = useDrawer({\n id: innerId,\n isOpen,\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 isOpen={isOpen}\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 <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\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":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","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","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","withAnimation","overlay","Overlay","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,WAAW,CAACC,WAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,SAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CACN,UAAAC,IAAA,EA2BIC,QAAQ,EACP;AAAA,IAAA,IA1BGC,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,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EAAEA,IAAK;AACXgE,MAAAA,KAAK,EAAE;AAAE/D,QAAAA,KAAK,EAAEsC,UAAU;AAAErC,QAAAA,MAAM,EAAEuC,WAAAA;OAAc;AAClD5B,MAAAA,YAAY,EAAEA,YAAAA;AAAa,KAAA,eAE3BuC,KAAA,CAAAC,aAAA,CAAClE,KAAK,EAAA;AAACc,MAAAA,KAAK,EAAEsC,UAAW;AAACrC,MAAAA,MAAM,EAAEuC,WAAY;AAACnC,MAAAA,SAAS,EAAEA,SAAAA;KACrDR,EAAAA,QACE,CACL,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMmE,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/E,UAAU;AAClBgF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvE,IAAAA,IAAI,EAAE;AACFwE,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDxE,IAAAA,IAAI,EAAE;AACFuE,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD5D,IAAAA,YAAY,EAAE;AACV0D,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5E,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTa,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 { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { getSizeValueFromProp } from '../../utils';\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 } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\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 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 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 { drawerInfo } = useDrawer({\n id: innerId,\n isOpen,\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 isOpen={isOpen}\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 <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\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":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","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","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","withAnimation","overlay","Overlay","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,WAAW,CAACC,WAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,SAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CACN,UAAAC,IAAA,EA2BIC,QAAQ,EACP;AAAA,IAAA,IA1BGC,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,eAAe,GAAAZ,IAAA,CAAfY,eAAe;MACfC,aAAa,GAAAb,IAAA,CAAba,aAAa;MACbC,SAAS,GAAAd,IAAA,CAATc,SAAS;MACTC,OAAO,GAAAf,IAAA,CAAPe,OAAO;MACPC,cAAc,GAAAhB,IAAA,CAAdgB,cAAc;MACdC,YAAY,GAAAjB,IAAA,CAAZiB,YAAY;MACZC,MAAM,GAAAlB,IAAA,CAANkB,MAAM;MACNC,KAAK,GAAAnB,IAAA,CAALmB,KAAK;MAAAC,iBAAA,GAAApB,IAAA,CACLqB,YAAY;AAAZA,MAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM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AE;AACRvE,IAAAA,IAAI,EAAE;AACFwE,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDxE,IAAAA,IAAI,EAAE;AACFuE,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD5D,IAAAA,YAAY,EAAE;AACV0D,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5E,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTa,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
|
@@ -1,13 +1,3 @@
|
|
1
|
-
.base_x95x4p_b1ty39ru__349bf40b{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_x95x4p_b1ty39ru__349bf40b:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_x95x4p_b1ty39ru__349bf40b:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
2
|
-
|
3
|
-
.base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
|
4
|
-
|
5
|
-
.base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
|
6
|
-
|
7
|
-
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
8
|
-
|
9
|
-
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
10
|
-
|
11
1
|
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
12
2
|
|
13
3
|
.base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
|
@@ -21,5 +11,14 @@
|
|
21
11
|
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
22
12
|
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
23
13
|
|
24
|
-
.
|
25
|
-
|
14
|
+
.base_x95x4p_b1ty39ru__349bf40b{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_x95x4p_b1ty39ru__349bf40b:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_x95x4p_b1ty39ru__349bf40b:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
15
|
+
|
16
|
+
.base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
|
17
|
+
|
18
|
+
.base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
|
19
|
+
|
20
|
+
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
21
|
+
|
22
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
23
|
+
|
24
|
+
.IconButton_styles_1hknr37_b1ua728l__f14249fc{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);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_1hknr37_b1ua728l__f14249fc{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonSquare__f14249fc{width:var(--plasma-button-height);padding:0;}.IconButton_styles_1hknr37_b1ua728l__f14249fc:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:focus{outline:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_focusVisible__f14249fc:focus::before,.IconButton_styles_1hknr37_b1ua728l__f14249fc[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:hover,.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFixed__f14249fc{width:var(--plasma-button-width);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFilled__f14249fc{width:100%;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingAuto__f14249fc{width:auto;}
|