@salutejs/plasma-new-hope 0.175.3-canary.1512.11555735717.0 → 0.176.0-canary.1452.11568379583.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/cjs/components/Popover/Popover.js +1 -2
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Slider/Slider.css +15 -13
- package/cjs/components/Slider/Slider.js +11 -2
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/Slider.tokens.js +23 -17
- package/cjs/components/Slider/Slider.tokens.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +8 -8
- package/cjs/components/Slider/components/Double/Double.js +58 -23
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +98 -0
- package/cjs/components/Slider/components/Single/Single.css +14 -14
- package/cjs/components/Slider/components/Single/Single.js +64 -33
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +5 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
- package/cjs/components/Slider/ui/Handler/Handler.js +49 -88
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +17 -7
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +2 -0
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +122 -0
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +1 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +1 -0
- package/cjs/components/Slider/utils/index.js +28 -10
- package/cjs/components/Slider/utils/index.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base.js +1 -1
- package/cjs/components/Slider/variations/_view/base.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +1 -0
- package/cjs/index.css +15 -13
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -6
- package/emotion/cjs/components/Popover/Popover.js +1 -2
- package/emotion/cjs/components/Slider/Slider.js +10 -2
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +26 -0
- package/emotion/cjs/components/Slider/Slider.tokens.js +23 -17
- package/emotion/cjs/components/Slider/components/Double/Double.js +54 -19
- package/emotion/cjs/components/Slider/components/Single/Single.js +64 -33
- package/emotion/cjs/components/Slider/components/Single/Single.styles.js +18 -9
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
- package/emotion/cjs/components/Slider/ui/Handler/Handler.js +52 -88
- package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +9 -15
- package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +121 -0
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/cjs/components/Slider/utils/index.js +28 -10
- package/emotion/cjs/components/Slider/variations/_view/base.js +2 -1
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
- package/emotion/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/emotion/es/components/Popover/Popover.js +1 -2
- package/emotion/es/components/Slider/Slider.js +11 -2
- package/emotion/es/components/Slider/Slider.template-doc.mdx +26 -0
- package/emotion/es/components/Slider/Slider.tokens.js +23 -17
- package/emotion/es/components/Slider/components/Double/Double.js +54 -19
- package/emotion/es/components/Slider/components/Single/Single.js +65 -34
- package/emotion/es/components/Slider/components/Single/Single.styles.js +17 -8
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
- package/emotion/es/components/Slider/ui/Handler/Handler.js +51 -86
- package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +10 -16
- package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +115 -0
- package/emotion/es/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/es/components/Slider/utils/index.js +28 -10
- package/emotion/es/components/Slider/variations/_view/base.js +2 -1
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
- package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
- package/es/components/Popover/Popover.js +1 -2
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Slider/Slider.css +15 -13
- package/es/components/Slider/Slider.js +11 -2
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/Slider.tokens.js +23 -17
- package/es/components/Slider/Slider.tokens.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +8 -8
- package/es/components/Slider/components/Double/Double.js +54 -19
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +98 -0
- package/es/components/Slider/components/Single/Single.css +14 -14
- package/es/components/Slider/components/Single/Single.js +65 -34
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles.js +4 -4
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +5 -0
- package/es/components/Slider/ui/Handler/Handler.css +3 -3
- package/es/components/Slider/ui/Handler/Handler.js +48 -87
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +17 -7
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +2 -0
- package/es/components/Slider/ui/Handler/computeKeyPressData.js +118 -0
- package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +1 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +1 -0
- package/es/components/Slider/utils/index.js +28 -10
- package/es/components/Slider/utils/index.js.map +1 -1
- package/es/components/Slider/variations/_view/base.js +1 -1
- package/es/components/Slider/variations/_view/base.js.map +1 -1
- package/es/components/Slider/variations/_view/base_1s3f6q8.css +1 -0
- package/es/index.css +15 -13
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +4 -6
- package/styled-components/cjs/components/Popover/Popover.js +1 -2
- package/styled-components/cjs/components/Slider/Slider.js +10 -2
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +26 -0
- package/styled-components/cjs/components/Slider/Slider.tokens.js +23 -17
- package/styled-components/cjs/components/Slider/components/Double/Double.js +54 -19
- package/styled-components/cjs/components/Slider/components/Single/Single.js +64 -33
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +52 -88
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -4
- package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +121 -0
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/cjs/components/Slider/utils/index.js +28 -10
- package/styled-components/cjs/components/Slider/variations/_view/base.js +2 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
- package/styled-components/es/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -4
- package/styled-components/es/components/Popover/Popover.js +1 -2
- package/styled-components/es/components/Slider/Slider.js +11 -2
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +26 -0
- package/styled-components/es/components/Slider/Slider.tokens.js +23 -17
- package/styled-components/es/components/Slider/components/Double/Double.js +54 -19
- package/styled-components/es/components/Slider/components/Single/Single.js +65 -34
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +51 -86
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +8 -5
- package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +115 -0
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +3 -2
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/es/components/Slider/utils/index.js +28 -10
- package/styled-components/es/components/Slider/variations/_view/base.js +2 -1
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
- package/types/components/Dropdown/ui/DropdownDivider/DropdownDivider.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownFooter/DropdownFooter.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownGroup/DropdownGroup.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownHeader/DropdownHeader.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Slider/Slider.d.ts.map +1 -1
- package/types/components/Slider/Slider.tokens.d.ts +22 -16
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +1 -0
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +79 -7
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +6 -0
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +6 -2
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +5 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +12 -0
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +1 -0
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +1 -0
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
- package/types/components/Slider/utils/index.d.ts +26 -8
- package/types/components/Slider/utils/index.d.ts.map +1 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +80 -2
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +80 -2
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +0 -5
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +0 -5
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(handleCenterPosRelative: number, stepSize: number, min: number, max: number) {\n const newValue = Math.round(handleCenterPosRelative / stepSize) + min;\n\n return Math.min(Math.max(newValue, min), max);\n}\n\n/**\n * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.\n * Значение используется для правильного расчета ограничения движения слайдера.\n * @param ref\n * @param {'left' | 'right'} side\n * @return Array<number>\n */\nexport function getOffsets(\n ref: ((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null> | null,\n side?: 'left' | 'right',\n isVertical?: boolean,\n): number[] {\n if (!ref || !('current' in ref) || !ref.current || !side) {\n return [0, 0];\n }\n\n const size = isVertical ? ref.current.clientHeight : ref.current.clientWidth;\n\n if (side === 'left') {\n return [0, size];\n }\n\n if (side === 'right') {\n return [size, 0];\n }\n\n return [0, 0];\n}\n\nexport const sizeData = {\n s: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n m: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n l: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n};\n"],"names":["getSliderThumbValue","handleCenterPosRelative","stepSize","min","max","newValue","Math","round","getOffsets","ref","side","isVertical","current","size","clientHeight","clientWidth","sizeData","s","small","indent","fontSizeMultiplier","large","m","l"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mBAAmBA,CAACC,uBAA+B,EAAEC,QAAgB,EAAEC,GAAW,EAAEC,GAAW,EAAE;EAC7G,IAAMC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACN,uBAAuB,GAAGC,QAAQ,CAAC,GAAGC,GAAG,CAAA;AAErE,EAAA,OAAOG,IAAI,CAACH,GAAG,CAACG,IAAI,CAACF,GAAG,CAACC,QAAQ,EAAEF,GAAG,CAAC,EAAEC,GAAG,CAAC,CAAA;AACjD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CACtBC,GAAiG,EACjGC,IAAuB,EACvBC,UAAoB,EACZ;AACR,EAAA,IAAI,CAACF,GAAG,IAAI,EAAE,SAAS,IAAIA,GAAG,CAAC,IAAI,CAACA,GAAG,CAACG,OAAO,IAAI,CAACF,IAAI,EAAE;AACtD,IAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,GAAA;AAEA,EAAA,IAAMG,IAAI,GAAGF,UAAU,GAAGF,GAAG,CAACG,OAAO,CAACE,YAAY,GAAGL,GAAG,CAACG,OAAO,CAACG,WAAW,CAAA;EAE5E,IAAIL,IAAI,KAAK,MAAM,EAAE;AACjB,IAAA,OAAO,CAAC,CAAC,EAAEG,IAAI,CAAC,CAAA;AACpB,GAAA;EAEA,IAAIH,IAAI,KAAK,OAAO,EAAE;AAClB,IAAA,OAAO,CAACG,IAAI,EAAE,CAAC,CAAC,CAAA;AACpB,GAAA;AAEA,EAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,CAAA;AAEO,IAAMG,QAAQ,GAAG;AACpBC,EAAAA,CAAC,EAAE;AACCC,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;GACH;AACDE,EAAAA,CAAC,EAAE;AACCJ,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;GACH;AACDG,EAAAA,CAAC,EAAE;AACCL,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;AACJ,GAAA;AACJ;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_view/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_view/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes } from '../../Slider.tokens';\n\nexport const base = css`\n &.${classes.verticalOrientation} {\n height: 100%;\n display: inline-flex;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAKhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1c93yiw.slider-vertical-orientation{height:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
package/es/index.css
CHANGED
@@ -657,18 +657,20 @@
|
|
657
657
|
|
658
658
|
.Sheet_styles_o73i75_sqp1ccu__24445093{width:100%;z-index:1;padding-bottom:1rem;position:var(--sqp1ccu-0);bottom:var(--sqp1ccu-1);background-color:var(--sqp1ccu-2);}
|
659
659
|
|
660
|
-
.
|
661
|
-
.SliderBase_styles_9s4eb3_rnaoqfb__d6fac54b{height:100%;}
|
662
|
-
.SliderBase_styles_9s4eb3_r1bro5xo__d6fac54b{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
|
663
|
-
.SliderBase_styles_9s4eb3_fdg7yhg__d6fac54b{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
|
664
|
-
.SliderBase_styles_9s4eb3_i17ya4q3__d6fac54b{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
|
660
|
+
.base_1s3f6q8_b1c93yiw__8f5ba4a1.base_1s3f6q8_sliderVerticalOrientation__8f5ba4a1{height:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
665
661
|
|
666
|
-
.
|
662
|
+
.SliderBase_styles_1qt1224_r33crq1__8fd7c64a{position:relative;top:50%;height:var(--plasma-slider-rail-thickness);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
|
663
|
+
.SliderBase_styles_1qt1224_snaoqfb__8fd7c64a{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:var(--plasma-slider-size);}.SliderBase_styles_1qt1224_snaoqfb__8fd7c64a.SliderBase_styles_1qt1224_sliderVerticalOrientation__8fd7c64a{width:var(--plasma-slider-size);height:auto;}.SliderBase_styles_1qt1224_snaoqfb__8fd7c64a.SliderBase_styles_1qt1224_sliderVerticalOrientation__8fd7c64a .SliderBase_styles_1qt1224_r33crq1__8fd7c64a{top:0;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:var(--plasma-slider-rail-thickness);height:100%;}
|
664
|
+
.SliderBase_styles_1qt1224_r1bro5xo__8fd7c64a{height:100%;}
|
665
|
+
.SliderBase_styles_1qt1224_fdg7yhg__8fd7c64a{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
|
666
|
+
.SliderBase_styles_1qt1224_i17ya4q3__8fd7c64a{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
|
667
667
|
|
668
|
-
.
|
669
|
-
.
|
670
|
-
.
|
671
|
-
.
|
668
|
+
.Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
|
669
|
+
.Single_styles_1h7n2s2_ly2gexi__5fe9b6cf{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
670
|
+
.Single_styles_1h7n2s2_lozb535__5fe9b6cf{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
|
671
|
+
.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-value-font-family);font-size:var(--plasma-slider-value-font-size);font-style:var(--plasma-slider-value-font-style);font-weight:var(--plasma-slider-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-value-letter-spacing);letter-spacing:var(--plasma-slider-value-letter-spacing);line-height:var(--plasma-slider-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderHideMinValue__5fe9b6cf,.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderHideMaxValue__5fe9b6cf{opacity:0;}.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderActiveRangeValue__5fe9b6cf{color:var(--plasma-slider-label-color);}
|
672
|
+
.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{position:absolute;bottom:calc(var(--plasma-slider-rail-thickness) * -1.5 - var(--plasma-slider-range-value-bottom-offset));left:0;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{left:unset;right:0;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{margin-right:var(--plasma-slider-range-value-horizontal-margin);}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{margin-right:0;margin-left:var(--plasma-slider-range-value-horizontal-margin);}
|
673
|
+
.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementOuter__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-right:var(--plasma-slider-label-wrapper-margin-right);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelContentReversed__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelContentReversed__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{width:var(--plasma-slider-size);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-right:0;margin-bottom:var(--plasma-slider-label-wrapper-vertical-margin);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-top:var(--plasma-slider-label-wrapper-vertical-margin);margin-right:0;margin-bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{position:static;bottom:0;left:0;margin-bottom:var(--plasma-slider-range-value-vertical-margin);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{left:0;right:0;bottom:0;margin-top:var(--plasma-slider-range-value-vertical-margin);margin-bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf,.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{margin-right:0;margin-bottom:0;position:absolute;top:0;right:calc( var(--plasma-slider-rail-thickness) / 2 + var(--plasma-slider-size) / 2 + var(--plasma-slider-range-value-horizontal-offset) );}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf,.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{margin-right:0;margin-left:0;top:auto;bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{left:calc(var(--plasma-slider-size) + var(--plasma-slider-rail-thickness));}
|
672
674
|
|
673
675
|
.Double_styles_1jhda4u_lcs82cd__5dc981f4{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}
|
674
676
|
|
@@ -678,10 +680,10 @@
|
|
678
680
|
.Double_styles_1jhda4u_d3kvcjo__5dc981f4{opacity:var(--plasma-slider-disabled-opacity);}
|
679
681
|
|
680
682
|
|
681
|
-
.
|
682
|
-
.
|
683
|
+
.Handler_styles_irtcgm_s1tnrnip__e8f853c5{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-value-font-family);font-size:var(--plasma-slider-value-font-size);font-style:var(--plasma-slider-value-font-style);font-weight:var(--plasma-slider-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-value-letter-spacing);letter-spacing:var(--plasma-slider-value-letter-spacing);line-height:var(--plasma-slider-value-line-height);}
|
684
|
+
.Handler_styles_irtcgm_h12uu2lj__e8f853c5{cursor:pointer;position:absolute;z-index:1;top:0;left:0;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;--thumb-size:var(--h12uu2lj-0);}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderVerticalOrientation__e8f853c5{right:0;bottom:auto;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderVerticalOrientation__e8f853c5 .Handler_styles_irtcgm_s1tnrnip__e8f853c5{margin:0;top:0;bottom:0;right:0;left:calc(var(--plasma-slider-size) - (var(--plasma-slider-size) - var(--thumb-size)) / 2 + 0.25rem);-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderValuePlacementLeft__e8f853c5 .Handler_styles_irtcgm_s1tnrnip__e8f853c5{left:auto;right:calc(var(--plasma-slider-size) - (var(--plasma-slider-size) - var(--thumb-size)) / 2 + 0.3125rem);-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
|
683
685
|
|
684
|
-
.
|
686
|
+
.Thumb_styles_uyn20e_tqbdf8b__de0962c7{width:var(--thumb-size);height:var(--thumb-size);min-width:var(--thumb-size);min-height:var(--thumb-size);position:relative;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.0625rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:after{background:var(--plasma-slider-thumb-border-color);margin:-0.0625rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):hover:after,.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_uyn20e_tqbdf8b__de0962c7[disabled]{cursor:not-allowed;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:focus{outline:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7.Thumb_styles_uyn20e_focusVisible__de0962c7:focus::before,.Thumb_styles_uyn20e_tqbdf8b__de0962c7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
|
685
687
|
|
686
688
|
.StepItem_styles_sp9rcd_snf9dn9__20446152{--plasma-spinner-size:var(--snf9dn9-0);--plasma-spinner-color:var(--plasma-step-item-active-indicator-color);}
|
687
689
|
.StepItem_styles_sp9rcd_sv5tpso__20446152{padding-top:var(--plasma-step-item-title-padding-top);padding-right:var(--plasma-step-item-content-side-padding);font-family:var(--plasma-step-item-title-font-family);font-size:var(--plasma-step-item-title-font-size);font-style:var(--plasma-step-item-title-font-style);font-weight:var(--plasma-step-item-title-font-weight);-webkit-letter-spacing:var(--plasma-step-item-title-letter-spacing);-moz-letter-spacing:var(--plasma-step-item-title-letter-spacing);-ms-letter-spacing:var(--plasma-step-item-title-letter-spacing);letter-spacing:var(--plasma-step-item-title-letter-spacing);line-height:var(--plasma-step-item-title-line-height);word-break:break-word;}
|
package/es/utils/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { canUseDOM } from './canUseDOM';\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\nexport { mergeRefs, setRefList } from './setRefList';\nexport { isEmpty } from './isEmpty';\nexport * as constants from './constants';\nexport * from './getPopoverPlacement';\nexport { noop } from './noop';\n\nexport const cx = (...classes: (string | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":"AAaaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { canUseDOM } from './canUseDOM';\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\nexport { mergeRefs, setRefList } from './setRefList';\nexport { isEmpty } from './isEmpty';\nexport * as constants from './constants';\nexport * from './getPopoverPlacement';\nexport { noop } from './noop';\n\nexport const cx = (...classes: (string | boolean | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":"AAaaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAAuCF,OAAO,CAACG,MAAM,CAAC,UAACC,SAAS,EAAA;AAAA,IAAA,OAAKA,SAAS,CAAA;AAAA,GAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAAA,EAAA;IAEzGC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,CAAuB,EAA8D;EACjH,IAAIC,GAAG,GAAG,EAAE,CAAA;EACZ,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACJ,CAAC,CAACR,MAAM,EAAAD,SAAA,CAAAC,MAAA,IAAA,CAAA,GAAA,CAAA,GAAAD,SAAA,CAAAC,MAAA,GAAA,CAAa,CAAC,EAAE,EAAEU,CAAC,EAAE;IAAA,IAAAG,IAAA,EAAAC,IAAA,CAAA;AACtDL,IAAAA,GAAG,IAAAI,CAAAA,IAAA,GAAIL,CAAC,CAACE,CAAC,CAAC,MAAA,IAAA,IAAAG,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAI,EAAE,CAAA;IACjBJ,GAAG,IAAA,CAAAK,IAAA,GAASJ,CAAC,YAAAX,SAAA,CAAAC,MAAA,IAADU,CAAC,OAAAK,SAAA,GAAAhB,SAAA,CAADW,CAAC,mBAAAI,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAK,EAAE,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOL,GAAG,CAAA;AACd;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.176.0-canary.1452.11568379583.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -128,5 +128,5 @@
|
|
128
128
|
"sideEffects": [
|
129
129
|
"*.css"
|
130
130
|
],
|
131
|
-
"gitHead": "
|
131
|
+
"gitHead": "29403fb38b7a28e4ac7e2fded414512d4b979644"
|
132
132
|
}
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.dropdownDividerRoot = exports.dropdownDividerConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
11
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
12
12
|
var _DropdownDivider = /*#__PURE__*/require("./DropdownDivider.styles");
|
@@ -26,7 +26,7 @@ var dropdownDividerRoot = exports.dropdownDividerRoot = function dropdownDivider
|
|
26
26
|
view = _ref.view,
|
27
27
|
size = _ref.size,
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
29
|
-
var uniqId = (0,
|
29
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
30
30
|
var innerId = id || uniqId;
|
31
31
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
32
32
|
id: innerId,
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.dropdownFooterRoot = exports.dropdownFooterConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
11
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
12
12
|
var _DropdownFooter = /*#__PURE__*/require("./DropdownFooter.styles");
|
@@ -27,7 +27,7 @@ var dropdownFooterRoot = exports.dropdownFooterRoot = function dropdownFooterRoo
|
|
27
27
|
view = _ref.view,
|
28
28
|
size = _ref.size,
|
29
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
30
|
-
var uniqId = (0,
|
30
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
31
31
|
var innerId = id || uniqId;
|
32
32
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
33
33
|
id: innerId,
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.dropdownGroupRoot = exports.dropdownGroupConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
11
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
12
12
|
var _DropdownGroup = /*#__PURE__*/require("./DropdownGroup.styles");
|
@@ -30,7 +30,7 @@ var dropdownGroupRoot = exports.dropdownGroupRoot = function dropdownGroupRoot(R
|
|
30
30
|
view = _ref.view,
|
31
31
|
size = _ref.size,
|
32
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
33
|
-
var uniqId = (0,
|
33
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
34
34
|
var innerId = id || uniqId;
|
35
35
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
36
36
|
id: innerId,
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.dropdownHeaderRoot = exports.dropdownHeaderConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
11
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
12
12
|
var _DropdownHeader = /*#__PURE__*/require("./DropdownHeader.styles");
|
@@ -27,7 +27,7 @@ var dropdownHeaderRoot = exports.dropdownHeaderRoot = function dropdownHeaderRoo
|
|
27
27
|
size = _ref.size,
|
28
28
|
children = _ref.children,
|
29
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
30
|
-
var uniqId = (0,
|
30
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
31
31
|
var innerId = id || uniqId;
|
32
32
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
33
33
|
id: innerId,
|
@@ -7,12 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.dropdownOldRoot = exports.dropdownOldConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
9
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
-
var _hooks = /*#__PURE__*/require("../../../../hooks");
|
11
|
-
var _utils = /*#__PURE__*/require("../../../../utils");
|
12
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
13
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
14
12
|
var _Dropdown = /*#__PURE__*/require("./Dropdown.styles");
|
15
|
-
var
|
13
|
+
var _utils = /*#__PURE__*/require("./utils");
|
16
14
|
var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "opened", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
17
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
18
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -53,12 +51,12 @@ var dropdownOldRoot = exports.dropdownOldRoot = function dropdownOldRoot(Root) {
|
|
53
51
|
closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
|
54
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
55
53
|
var innerIsOpen = Boolean(isOpen || opened);
|
56
|
-
var uniqId = (0,
|
54
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
57
55
|
var innerId = id || uniqId;
|
58
56
|
var rootRef = (0, _react.useRef)(null);
|
59
57
|
var dropdownRef = (0, _react.useRef)(null);
|
60
58
|
var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
|
61
|
-
var trapRef = (0,
|
59
|
+
var trapRef = (0, _plasmaCore.useFocusTrap)(innerIsOpen && isFocusTrapped);
|
62
60
|
var dropdownForkRef = (0, _plasmaCore.useForkRef)(dropdownRef, trapRef);
|
63
61
|
return /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledPopover, {
|
64
62
|
role: role,
|
@@ -73,7 +71,7 @@ var dropdownOldRoot = exports.dropdownOldRoot = function dropdownOldRoot(Root) {
|
|
73
71
|
offset: offset,
|
74
72
|
preventOverflow: preventOverflow,
|
75
73
|
hasArrow: hasArrow,
|
76
|
-
placement: (0,
|
74
|
+
placement: (0, _utils.getPlacements)(placement),
|
77
75
|
trigger: trigger,
|
78
76
|
closeOnOverlayClick: closeOnOverlayClick,
|
79
77
|
closeOnEsc: closeOnEsc,
|
@@ -8,7 +8,6 @@ exports.popoverRoot = exports.popoverConfig = exports.POPOVER_PORTAL_ID = export
|
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
9
|
var _reactPopper = /*#__PURE__*/require("react-popper");
|
10
10
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
11
|
-
var _hooks = /*#__PURE__*/require("../../hooks");
|
12
11
|
var _utils = /*#__PURE__*/require("../../utils");
|
13
12
|
var _Portal = /*#__PURE__*/require("../Portal");
|
14
13
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
@@ -73,7 +72,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
73
72
|
var popoverRef = (0, _react.useRef)(null);
|
74
73
|
var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
|
75
74
|
var portalRef = (0, _react.useRef)(null);
|
76
|
-
var trapRef = (0,
|
75
|
+
var trapRef = (0, _plasmaCore.useFocusTrap)(innerIsOpen && isFocusTrapped);
|
77
76
|
var popoverForkRef = (0, _plasmaCore.useForkRef)(popoverRef, trapRef);
|
78
77
|
var _useState = (0, _react.useState)(null),
|
79
78
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.sliderRoot = exports.sliderConfig = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
8
|
+
var _utils = /*#__PURE__*/require("../../utils");
|
8
9
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
9
10
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
10
11
|
var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
|
11
12
|
var _components = /*#__PURE__*/require("./components");
|
13
|
+
var _Slider = /*#__PURE__*/require("./Slider.tokens");
|
12
14
|
var _excluded = ["type"];
|
13
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -29,9 +31,15 @@ var sliderRoot = exports.sliderRoot = function sliderRoot(Root) {
|
|
29
31
|
var _ref$type = _ref.type,
|
30
32
|
type = _ref$type === void 0 ? 'single' : _ref$type,
|
31
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
32
|
-
|
34
|
+
if (isSingleValueProps(props, type)) {
|
35
|
+
return /*#__PURE__*/_react["default"].createElement(Root, _extends({}, props, {
|
36
|
+
className: (0, _utils.cx)(props.orientation === 'vertical' && _Slider.classes.verticalOrientation, props.className),
|
37
|
+
ref: ref
|
38
|
+
}), /*#__PURE__*/_react["default"].createElement(_components.SingleSlider, props));
|
39
|
+
}
|
40
|
+
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
33
41
|
ref: ref
|
34
|
-
}
|
42
|
+
}, props), isDoubleValueProps(props, type) && /*#__PURE__*/_react["default"].createElement(_components.DoubleUncontrolled, props));
|
35
43
|
});
|
36
44
|
};
|
37
45
|
var sliderConfig = exports.sliderConfig = {
|
@@ -76,3 +76,29 @@ export function App() {
|
|
76
76
|
);
|
77
77
|
}
|
78
78
|
```
|
79
|
+
|
80
|
+
# Вертикальное отображение
|
81
|
+
|
82
|
+
```tsx live
|
83
|
+
import React from 'react';
|
84
|
+
import { Slider } from '@salutejs/{{ package }}';
|
85
|
+
import { IconMic } from '@salutejs/plasma-icons';
|
86
|
+
|
87
|
+
export function App() {
|
88
|
+
return (
|
89
|
+
<section style={{ height: '300px' }}>
|
90
|
+
<Slider
|
91
|
+
onChangeCommitted={() => {}}
|
92
|
+
min={0}
|
93
|
+
max={100}
|
94
|
+
value={30}
|
95
|
+
label="Громкость"
|
96
|
+
labelContent={<IconMic size="s" />}
|
97
|
+
orientation="vertical"
|
98
|
+
sliderAlign="center"
|
99
|
+
size="m"
|
100
|
+
/>
|
101
|
+
</section>
|
102
|
+
);
|
103
|
+
}
|
104
|
+
```
|
@@ -7,6 +7,12 @@ exports.tokens = exports.classes = void 0;
|
|
7
7
|
var classes = exports.classes = {
|
8
8
|
labelPlacementOuter: 'slider-label-placement-outer',
|
9
9
|
labelPlacementInner: 'slider-label-placement-inner',
|
10
|
+
labelPlacementBottom: 'slider-label-placement-bottom',
|
11
|
+
labelAlignLeft: 'slider-label-align-left',
|
12
|
+
labelAlignCenter: 'slider-label-align-center',
|
13
|
+
labelAlignRight: 'slider-label-align-right',
|
14
|
+
labelAlignNone: 'slider-label-align-none',
|
15
|
+
labelContentReversed: 'slider-label-content-reversed',
|
10
16
|
rangeValuesPlacementOuter: 'slider-range-values-placement-outer',
|
11
17
|
rangeValuesPlacementInner: 'slider-range-values-placement-inner',
|
12
18
|
maxRangeValue: 'slider-max-range-value',
|
@@ -15,13 +21,17 @@ var classes = exports.classes = {
|
|
15
21
|
textFieldActive: 'slider-text-field-active',
|
16
22
|
firstTextField: 'slider-first-text-field',
|
17
23
|
secondTextField: 'slider-second-text-field',
|
18
|
-
activeRangeValue: 'slider-active-range-value'
|
24
|
+
activeRangeValue: 'slider-active-range-value',
|
25
|
+
verticalOrientation: 'slider-vertical-orientation',
|
26
|
+
valuePlacementLeft: 'slider-value-placement-left',
|
27
|
+
reversed: 'slider-reversed'
|
19
28
|
};
|
20
29
|
var tokens = exports.tokens = {
|
21
|
-
|
30
|
+
size: '--plasma-slider-size',
|
22
31
|
labelWrapperGap: '--plasma-slider-label-wrapper-gap',
|
23
32
|
labelWrapperMarginBottom: '--plasma-slider-label-wrapper-margin-bottom',
|
24
33
|
labelWrapperMarginRight: '--plasma-slider-label-wrapper-margin-right',
|
34
|
+
labelWrapperVerticalMargin: '--plasma-slider-label-wrapper-vertical-margin',
|
25
35
|
labelColor: '--plasma-slider-label-color',
|
26
36
|
labelFontFamily: '--plasma-slider-label-font-family',
|
27
37
|
labelFontSize: '--plasma-slider-label-font-size',
|
@@ -29,31 +39,27 @@ var tokens = exports.tokens = {
|
|
29
39
|
labelFontWeight: '--plasma-slider-label-font-weight',
|
30
40
|
labelLetterSpacing: '--plasma-slider-label-letter-spacing',
|
31
41
|
labelLineHeight: '--plasma-slider-label-line-height',
|
32
|
-
rangeMinValueMargin: '--plasma-slider-range-min-value-margin',
|
33
|
-
rangeMaxValueMargin: '--plasma-slider-range-max-value-margin',
|
34
42
|
rangeValueBottomOffset: '--plasma-slider-range-value-bottom-offset',
|
43
|
+
rangeValueHorizontalMargin: '--plasma-slider-range-value-horizontal-margin',
|
44
|
+
rangeValueHorizontalOffset: '--plasma-slider-range-value-horizontal-offset',
|
45
|
+
rangeValueVerticalMargin: '--plasma-slider-range-value-vertical-margin',
|
35
46
|
rangeValueColor: '--plasma-slider-range-value-color',
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
valueFontFamily: '--plasma-slider-value-font-family',
|
48
|
+
valueFontSize: '--plasma-slider-value-font-size',
|
49
|
+
valueFontStyle: '--plasma-slider-value-font-style',
|
50
|
+
valueFontWeight: '--plasma-slider-value-font-weight',
|
51
|
+
valueLetterSpacing: '--plasma-slider-value-letter-spacing',
|
52
|
+
valueLineHeight: '--plasma-slider-value-line-height',
|
42
53
|
doubleWrapperGap: '--plasma-slider-double-wrapper-gap',
|
43
54
|
thumbSize: '--plasma-slider-thumb-size',
|
55
|
+
thumbSizeLarge: '--plasma-slider-thumb-size-large',
|
44
56
|
thumbBorder: '--plasma-slider-thumb-border',
|
45
57
|
thumbBorderColor: '--plasma-slider-thumb-border-color',
|
46
58
|
thumbBackgroundColor: '--plasma-slider-thumb-background-color',
|
47
59
|
thumbFocusBorderColor: '--plasma-slider-thumb-focus-border-color',
|
48
60
|
currentValueTopOffset: '--plasma-slider-current-value-top-offset',
|
49
|
-
currentValueFontFamily: '--plasma-slider-current-value-font-family',
|
50
|
-
currentValueFontSize: '--plasma-slider-current-value-font-size',
|
51
|
-
currentValueFontStyle: '--plasma-slider-current-value-font-style',
|
52
|
-
currentValueFontWeight: '--plasma-slider-current-value-font-weight',
|
53
|
-
currentValueLetterSpacing: '--plasma-slider-current-value-letter-spacing',
|
54
|
-
currentValueLineHeight: '--plasma-slider-current-value-line-height',
|
55
61
|
railBackgroundColor: '--plasma-slider-rail-background-color',
|
56
|
-
|
62
|
+
railThickness: '--plasma-slider-rail-thickness',
|
57
63
|
railBorderRadius: '--plasma-slider-rail-border-radius',
|
58
64
|
railIndent: '--plasma-slider-rail-indent',
|
59
65
|
fillColor: '--plasma-slider-fill-color',
|
@@ -13,7 +13,7 @@ var _utils2 = /*#__PURE__*/require("../../utils");
|
|
13
13
|
var _Slider = /*#__PURE__*/require("../../Slider.tokens");
|
14
14
|
var _SliderBase2 = /*#__PURE__*/require("../SliderBase/SliderBase.styles");
|
15
15
|
var _Double = /*#__PURE__*/require("./Double.styles");
|
16
|
-
var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize", "name"];
|
16
|
+
var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "pointerSize", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize", "name"];
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
19
19
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -46,6 +46,8 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
46
46
|
labelContentLeft = _ref.labelContentLeft,
|
47
47
|
_ref$size = _ref.size,
|
48
48
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
49
|
+
_ref$pointerSize = _ref.pointerSize,
|
50
|
+
pointerSize = _ref$pointerSize === void 0 ? 'small' : _ref$pointerSize,
|
49
51
|
onChangeCommitted = _ref.onChangeCommitted,
|
50
52
|
onChangeTextField = _ref.onChangeTextField,
|
51
53
|
onBlurTextField = _ref.onBlurTextField,
|
@@ -72,20 +74,30 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
72
74
|
setState = _useState2[1];
|
73
75
|
var _useState3 = (0, _react.useState)(false),
|
74
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
75
|
-
|
76
|
-
|
77
|
+
firstInputHovered = _useState4[0],
|
78
|
+
setFirstInputHovered = _useState4[1];
|
77
79
|
var _useState5 = (0, _react.useState)(false),
|
78
80
|
_useState6 = _slicedToArray(_useState5, 2),
|
79
|
-
|
80
|
-
|
81
|
-
var _useState7 = (0, _react.useState)(
|
81
|
+
firstInputFocused = _useState6[0],
|
82
|
+
setFirstInputFocused = _useState6[1];
|
83
|
+
var _useState7 = (0, _react.useState)(false),
|
82
84
|
_useState8 = _slicedToArray(_useState7, 2),
|
83
|
-
|
84
|
-
|
85
|
-
var _useState9 = (0, _react.useState)(
|
85
|
+
secondInputHovered = _useState8[0],
|
86
|
+
setSecondInputHovered = _useState8[1];
|
87
|
+
var _useState9 = (0, _react.useState)(false),
|
86
88
|
_useState10 = _slicedToArray(_useState9, 2),
|
87
|
-
|
88
|
-
|
89
|
+
secondInputFocused = _useState10[0],
|
90
|
+
setSecondInputFocused = _useState10[1];
|
91
|
+
var firstInputActive = firstInputHovered || firstInputFocused;
|
92
|
+
var secondInputActive = secondInputHovered || secondInputFocused;
|
93
|
+
var _useState11 = (0, _react.useState)(value[0]),
|
94
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
95
|
+
firstValue = _useState12[0],
|
96
|
+
setFirstValue = _useState12[1];
|
97
|
+
var _useState13 = (0, _react.useState)(value[1]),
|
98
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
99
|
+
secondValue = _useState14[0],
|
100
|
+
setSecondValue = _useState14[1];
|
89
101
|
var firstHandleRef = (0, _react.useRef)(null);
|
90
102
|
var secondHandleRef = (0, _react.useRef)(null);
|
91
103
|
var firstHandleValue = (0, _react.useRef)(value[0]);
|
@@ -110,6 +122,16 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
110
122
|
});
|
111
123
|
});
|
112
124
|
}, [value, stepSize, min, max, setFirstValue, setSecondValue]);
|
125
|
+
(0, _react.useEffect)(function () {
|
126
|
+
var onMouseUp = function onMouseUp() {
|
127
|
+
setFirstInputFocused(false);
|
128
|
+
setSecondInputFocused(false);
|
129
|
+
};
|
130
|
+
window.addEventListener('mouseup', onMouseUp);
|
131
|
+
return function () {
|
132
|
+
window.removeEventListener('mouseup', onMouseUp);
|
133
|
+
};
|
134
|
+
}, []);
|
113
135
|
var setStepSize = (0, _react.useCallback)(function (newStepSize) {
|
114
136
|
setState(function (prevState) {
|
115
137
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
@@ -251,16 +273,20 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
251
273
|
ariaLabelLeft = _ref3[0],
|
252
274
|
ariaLabelRight = _ref3[1];
|
253
275
|
var currentFirstSliderValue = Math.max(state.firstValue, min);
|
276
|
+
var settings = _utils2.sizeData[size][pointerSize === 'large' ? 'large' : 'small'];
|
254
277
|
return /*#__PURE__*/_react["default"].createElement(_Double.DoubleWrapper, null, hasLabelContent && /*#__PURE__*/_react["default"].createElement(_Double.LabelWrapper, null, labelContentLeft && /*#__PURE__*/_react["default"].createElement(_Double.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/_react["default"].createElement(_Double.Label, null, label)), /*#__PURE__*/_react["default"].createElement(_Double.SliderWrapper, null, /*#__PURE__*/_react["default"].createElement(_SliderBase.SliderBase, _extends({
|
255
278
|
min: min,
|
256
279
|
max: max,
|
280
|
+
size: size,
|
257
281
|
disabled: disabled,
|
258
282
|
setStepSize: setStepSize,
|
259
283
|
railFillWidth: state.railFillWidth,
|
260
|
-
settings:
|
261
|
-
railFillXPosition: state.railFillXPosition
|
284
|
+
settings: settings,
|
285
|
+
railFillXPosition: state.railFillXPosition,
|
286
|
+
orientation: "horizontal"
|
262
287
|
}, rest), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
|
263
288
|
ref: firstHandleRef,
|
289
|
+
size: pointerSize,
|
264
290
|
stepSize: state.stepSize,
|
265
291
|
multipleStepSize: multipleStepSize,
|
266
292
|
onChangeCommitted: onFirstHandleChangeCommitted,
|
@@ -270,18 +296,23 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
270
296
|
disabled: disabled,
|
271
297
|
bounds: [min, state.secondValue],
|
272
298
|
side: "left",
|
273
|
-
|
299
|
+
orientation: "horizontal",
|
300
|
+
position: state.xFirstHandle,
|
274
301
|
zIndex: state.firstHandleZIndex,
|
275
302
|
value: currentFirstSliderValue,
|
276
303
|
ariaLabel: ariaLabelLeft,
|
304
|
+
onMouseDown: function onMouseDown() {
|
305
|
+
return setFirstInputFocused(true);
|
306
|
+
},
|
277
307
|
onMouseEnter: function onMouseEnter() {
|
278
|
-
return
|
308
|
+
return setFirstInputHovered(true);
|
279
309
|
},
|
280
310
|
onMouseLeave: function onMouseLeave() {
|
281
|
-
return
|
311
|
+
return setFirstInputHovered(false);
|
282
312
|
}
|
283
313
|
}), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
|
284
314
|
ref: secondHandleRef,
|
315
|
+
size: pointerSize,
|
285
316
|
stepSize: state.stepSize,
|
286
317
|
multipleStepSize: multipleStepSize,
|
287
318
|
onChangeCommitted: onSecondHandleChangeCommitted,
|
@@ -292,15 +323,19 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
|
292
323
|
disabled: disabled,
|
293
324
|
bounds: [state.firstValue, max],
|
294
325
|
side: "right",
|
295
|
-
|
326
|
+
orientation: "horizontal",
|
327
|
+
position: state.xSecondHandle,
|
296
328
|
zIndex: state.secondHandleZIndex,
|
297
329
|
value: Math.max(state.secondValue, min),
|
298
330
|
ariaLabel: ariaLabelRight,
|
331
|
+
onMouseDown: function onMouseDown() {
|
332
|
+
return setSecondInputFocused(true);
|
333
|
+
},
|
299
334
|
onMouseEnter: function onMouseEnter() {
|
300
|
-
return
|
335
|
+
return setSecondInputHovered(true);
|
301
336
|
},
|
302
337
|
onMouseLeave: function onMouseLeave() {
|
303
|
-
return
|
338
|
+
return setSecondInputHovered(false);
|
304
339
|
}
|
305
340
|
})), /*#__PURE__*/_react["default"].createElement(_Double.InputsWrapper, null, /*#__PURE__*/_react["default"].createElement(_Double.StyledInput, {
|
306
341
|
className: (0, _utils.cx)(_Slider.classes.firstTextField, firstInputActiveClass),
|