@chayns-components/core 5.0.0-beta.821 → 5.0.0-beta.823
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/list/list-item/ListItem.js +5 -0
- package/lib/cjs/components/list/list-item/ListItem.js.map +1 -1
- package/lib/cjs/components/list/list-item/ListItem.styles.js +13 -4
- package/lib/cjs/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/cjs/components/slider/Slider.js +9 -4
- package/lib/cjs/components/slider/Slider.js.map +1 -1
- package/lib/cjs/components/slider/Slider.styles.js +3 -3
- package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
- package/lib/esm/components/list/list-item/ListItem.js +5 -0
- package/lib/esm/components/list/list-item/ListItem.js.map +1 -1
- package/lib/esm/components/list/list-item/ListItem.styles.js +23 -11
- package/lib/esm/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/esm/components/slider/Slider.js +9 -4
- package/lib/esm/components/slider/Slider.js.map +1 -1
- package/lib/esm/components/slider/Slider.styles.js +3 -3
- package/lib/esm/components/slider/Slider.styles.js.map +1 -1
- package/lib/types/components/accordion/Accordion.styles.d.ts +3 -2
- package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +3 -2
- package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +30 -21
- package/lib/types/components/amount-control/AmountControl.styles.d.ts +3 -2
- package/lib/types/components/button/Button.styles.d.ts +9 -6
- package/lib/types/components/combobox/ComboBox.styles.d.ts +3 -2
- package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +3 -2
- package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +3 -2
- package/lib/types/components/file-input/FileInput.styles.d.ts +3 -2
- package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +3 -2
- package/lib/types/components/input/Input.styles.d.ts +9 -6
- package/lib/types/components/list/list-item/ListItem.styles.d.ts +4 -2
- package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +3 -2
- package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +12 -8
- package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +3 -2
- package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +3 -2
- package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +3 -2
- package/lib/types/components/radio-button/RadioButton.styles.d.ts +3 -2
- package/lib/types/components/search-box/SearchBox.styles.d.ts +3 -2
- package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +3 -2
- package/lib/types/components/search-input/SearchInput.styles.d.ts +6 -4
- package/lib/types/components/slider/Slider.styles.d.ts +6 -6
- package/lib/types/components/slider-button/SliderButton.styles.d.ts +3 -2
- package/lib/types/components/truncation/Truncation.styles.d.ts +3 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["setRefreshScrollEnabled","React","useCallback","useEffect","useMemo","useRef","useState","useTheme","useElementSize","calculateGradientOffset","calculatePopupPosition","fillSlider","getThumbMaxWidth","StyledSlider","StyledSliderInput","StyledSliderThumb","StyledSliderThumbLabel","Slider","_ref","maxValue","minValue","value","onSelect","onChange","interval","thumbLabelFormatter","shouldShowThumbLabel","steps","fromValue","setFromValue","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","sliderWrapperSize","theme","maxNumber","handleMouseUp","from","Number","current","to","undefined","handleControlFromSlider","event","target","toSlider","fromSlider","String","handleControlToSlider","handleInputChange","newValue","fromSliderThumbPosition","max","min","containerWidth","offsetWidth","toSliderThumbPosition","toSliderThumbContentPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","handleTouchEnd","createElement","ref","animate","height","initial","exit","$thumbWidth","$isInterval","type","step","onTouchStart","onTouchEnd","onMouseUp","$max","$min","$value","$position","$isBigSlider","$width","displayName"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, { ChangeEvent, FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/useElementSize';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport {\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The range that can be selected with two thumbs..\n */\n interval?: SliderInterval;\n /**\n * The maximum value of the slider.\n */\n maxValue: number;\n /**\n * The minimum value of the slider.\n */\n minValue: number;\n /**\n * Function that will be executed when the value is selected.\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Function that will be executed when the value is changed.\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Whether the current value should be displayed inside the slider thumb.\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The steps of the slider.\n */\n steps?: number;\n /**\n * A function to format the thumb label.\n */\n thumbLabelFormatter?: (value: number) => string;\n /**\n * the Value that the slider should have.\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n maxValue,\n minValue,\n value,\n onSelect,\n onChange,\n interval,\n thumbLabelFormatter,\n shouldShowThumbLabel = false,\n steps = 1,\n}) => {\n const [fromValue, setFromValue] = useState(0);\n const [toValue, setToValue] = useState(maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n\n const theme = useTheme();\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (typeof value !== 'number') {\n return;\n }\n\n if (value >= minValue && value <= maxValue) {\n setFromValue(value);\n }\n }, [maxValue, minValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n setFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n setToValue(fromValue);\n }\n }, [fromValue, toValue]);\n\n const handleMouseUp = useCallback(() => {\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setFromValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from > to) {\n fromSliderRef.current.value = String(to);\n } else {\n fromSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n void setRefreshScrollEnabled(false);\n\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setToValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from <= to) {\n toSliderRef.current.value = String(to);\n } else {\n toSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n setFromValue(interval.minValue);\n setToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: interval can´t be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n void setRefreshScrollEnabled(false);\n\n const newValue = Number(event.target.value);\n\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n setFromValue(newValue);\n\n if (onChange) {\n onChange(newValue);\n }\n },\n [handleControlFromSlider, interval, onChange],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (fromSliderRef.current && fromSliderThumbRef.current && sliderWrapperSize) {\n return calculateGradientOffset({\n max: maxValue,\n min: minValue,\n value: fromValue,\n thumbWidth: 40,\n containerWidth: fromSliderRef.current.offsetWidth,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderWrapperSize]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (toSliderRef.current && toSliderThumbRef.current && sliderWrapperSize) {\n return calculateGradientOffset({\n max: maxValue,\n min: minValue,\n value: toValue,\n thumbWidth: 40,\n containerWidth: toSliderRef.current.offsetWidth,\n });\n }\n return 0;\n }, [toValue, minValue, maxValue, sliderWrapperSize]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, onSelect, shouldShowThumbLabel]);\n\n return useMemo(\n () => (\n <StyledSlider ref={sliderWrapperRef}>\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={handleMouseUp}\n $max={maxValue}\n $min={minValue}\n $value={fromValue}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n $max={maxValue}\n $min={minValue}\n $value={toValue}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n />\n )}\n </StyledSlider>\n ),\n [\n isBigSlider,\n interval,\n fromValue,\n steps,\n maxValue,\n minValue,\n handleTouchStart,\n handleTouchEnd,\n handleInputChange,\n handleMouseUp,\n fromSliderThumbPosition,\n shouldShowThumbLabel,\n thumbWidth,\n fromSliderThumbContentPosition,\n thumbLabelFormatter,\n toSliderThumbPosition,\n toSliderThumbContentPosition,\n toValue,\n handleControlToSlider,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,YAAY;AACpD,OAAOC,KAAK,IAAqBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACjG,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SACIC,uBAAuB,EACvBC,sBAAsB,EACtBC,UAAU,EACVC,gBAAgB,QACb,oBAAoB;AAC3B,SACIC,YAAY,EACZC,iBAAiB,EACjBC,iBAAiB,EACjBC,sBAAsB,QACnB,iBAAiB;AA8CxB,MAAMC,MAAu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BAAmB,EACnByC,qBAAqB,EACrBC,4BAA4B,EAC5BrC,OAAO,EACP4B,qBAAqB,CAE7B,CAAC;AACL,CAAC;AAEDzC,MAAM,CAAC2E,WAAW,GAAG,QAAQ;AAE7B,eAAe3E,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["setRefreshScrollEnabled","React","useCallback","useEffect","useMemo","useRef","useState","useTheme","useElementSize","calculateGradientOffset","calculatePopupPosition","fillSlider","getThumbMaxWidth","StyledSlider","StyledSliderInput","StyledSliderThumb","StyledSliderThumbLabel","Slider","_ref","maxValue","minValue","value","onSelect","onChange","interval","thumbLabelFormatter","shouldShowThumbLabel","steps","fromValue","setFromValue","toValue","setToValue","thumbWidth","setThumbWidth","isBigSlider","setIsBigSlider","fromSliderRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","fromSliderThumbContentRef","toSliderThumbContentRef","sliderWrapperRef","sliderWrapperSize","theme","maxNumber","handleMouseUp","from","Number","current","to","undefined","handleControlFromSlider","event","target","toSlider","fromSlider","String","handleControlToSlider","handleInputChange","newValue","fromSliderThumbPosition","max","min","containerWidth","offsetWidth","toSliderThumbPosition","toSliderThumbContentPosition","sliderValue","popupWidth","fromSliderThumbContentPosition","handleTouchStart","handleTouchEnd","createElement","ref","animate","height","initial","exit","$thumbWidth","$isInterval","type","step","onTouchStart","onTouchEnd","onMouseUp","$max","$min","$value","$position","$isBigSlider","$width","displayName"],"sources":["../../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { setRefreshScrollEnabled } from 'chayns-api';\nimport React, { ChangeEvent, FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\nimport { useElementSize } from '../../hooks/useElementSize';\nimport {\n calculateGradientOffset,\n calculatePopupPosition,\n fillSlider,\n getThumbMaxWidth,\n} from '../../utils/slider';\nimport {\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLabel,\n} from './Slider.styles';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The range that can be selected with two thumbs..\n */\n interval?: SliderInterval;\n /**\n * The maximum value of the slider.\n */\n maxValue: number;\n /**\n * The minimum value of the slider.\n */\n minValue: number;\n /**\n * Function that will be executed when the value is selected.\n */\n onSelect?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Function that will be executed when the value is changed.\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Whether the current value should be displayed inside the slider thumb.\n */\n shouldShowThumbLabel?: boolean;\n /**\n * The steps of the slider.\n */\n steps?: number;\n /**\n * A function to format the thumb label.\n */\n thumbLabelFormatter?: (value: number) => string;\n /**\n * the Value that the slider should have.\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n maxValue,\n minValue,\n value,\n onSelect,\n onChange,\n interval,\n thumbLabelFormatter,\n shouldShowThumbLabel = false,\n steps = 1,\n}) => {\n const [fromValue, setFromValue] = useState(0);\n const [toValue, setToValue] = useState(maxValue);\n const [thumbWidth, setThumbWidth] = useState(20);\n const [isBigSlider, setIsBigSlider] = useState(false);\n\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n const fromSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const toSliderThumbContentRef = useRef<HTMLDivElement>(null);\n const sliderWrapperRef = useRef<HTMLDivElement>(null);\n\n const sliderWrapperSize = useElementSize(sliderWrapperRef);\n\n const theme = useTheme();\n\n useEffect(() => {\n if (shouldShowThumbLabel) {\n setThumbWidth(getThumbMaxWidth({ maxNumber: maxValue, thumbLabelFormatter }));\n }\n }, [maxValue, shouldShowThumbLabel, thumbLabelFormatter]);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (typeof value !== 'number') {\n return;\n }\n\n if (value >= minValue && value <= maxValue) {\n setFromValue(value);\n }\n }, [maxValue, minValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n setFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n setToValue(fromValue);\n }\n }, [fromValue, toValue]);\n\n const handleMouseUp = useCallback(() => {\n void setRefreshScrollEnabled(true);\n\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n }, [interval, onSelect]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setFromValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from > to) {\n fromSliderRef.current.value = String(to);\n } else {\n fromSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n void setRefreshScrollEnabled(false);\n\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setToValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from <= to) {\n toSliderRef.current.value = String(to);\n } else {\n toSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n setFromValue(interval.minValue);\n setToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: interval can´t be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n void setRefreshScrollEnabled(false);\n\n let newValue = Number(event.target.value);\n\n if (newValue > maxValue) {\n newValue = maxValue;\n } else if (newValue < minValue) {\n newValue = minValue;\n }\n\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n setFromValue(newValue);\n\n if (onChange) {\n onChange(newValue);\n }\n },\n [handleControlFromSlider, interval, maxValue, minValue, onChange],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (fromSliderRef.current && fromSliderThumbRef.current && sliderWrapperSize) {\n return calculateGradientOffset({\n max: maxValue,\n min: minValue,\n value: fromValue,\n thumbWidth: 40,\n containerWidth: fromSliderRef.current.offsetWidth,\n });\n }\n\n return 0;\n }, [fromValue, maxValue, minValue, sliderWrapperSize]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (toSliderRef.current && toSliderThumbRef.current && sliderWrapperSize) {\n return calculateGradientOffset({\n max: maxValue,\n min: minValue,\n value: toValue,\n thumbWidth: 40,\n containerWidth: toSliderRef.current.offsetWidth,\n });\n }\n return 0;\n }, [toValue, minValue, maxValue, sliderWrapperSize]);\n\n const toSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: toValue,\n popupWidth: thumbWidth,\n }),\n [maxValue, minValue, thumbWidth, toValue],\n );\n\n const fromSliderThumbContentPosition = useMemo(\n () =>\n calculatePopupPosition({\n min: minValue,\n max: maxValue,\n sliderValue: fromValue,\n popupWidth: thumbWidth,\n }),\n [fromValue, maxValue, minValue, thumbWidth],\n );\n\n const handleTouchStart = useCallback(() => {\n if (shouldShowThumbLabel) {\n setIsBigSlider(true);\n }\n }, [shouldShowThumbLabel]);\n\n const handleTouchEnd = useCallback(() => {\n const from = Number(fromSliderRef.current?.value);\n const to = Number(toSliderRef.current?.value);\n\n if (typeof onSelect === 'function') {\n onSelect(\n interval ? undefined : from,\n interval ? { maxValue: to, minValue: from } : undefined,\n );\n }\n\n if (shouldShowThumbLabel) {\n setIsBigSlider(false);\n }\n }, [interval, onSelect, shouldShowThumbLabel]);\n\n return useMemo(\n () => (\n <StyledSlider ref={sliderWrapperRef}>\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n ref={fromSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={steps}\n max={maxValue % steps === 0 ? maxValue : maxValue + steps - (maxValue % steps)}\n min={minValue % steps === 0 ? minValue : minValue - (minValue % steps)}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleInputChange}\n onMouseUp={handleMouseUp}\n $max={maxValue}\n $min={minValue}\n $value={fromValue}\n />\n <StyledSliderThumb\n ref={fromSliderThumbRef}\n $position={fromSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={fromSliderThumbContentPosition}\n ref={fromSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb\n ref={toSliderThumbRef}\n $position={toSliderThumbPosition}\n $isBigSlider={isBigSlider}\n >\n {shouldShowThumbLabel && (\n <StyledSliderThumbLabel\n $width={thumbWidth}\n $isBigSlider={isBigSlider}\n $position={toSliderThumbContentPosition}\n ref={toSliderThumbContentRef}\n >\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLabel>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n animate={{ height: isBigSlider ? 30 : 10 }}\n initial={{ height: 10 }}\n exit={{ height: 10 }}\n $thumbWidth={40}\n $max={maxValue}\n $min={minValue}\n $value={toValue}\n ref={toSliderRef}\n $isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onChange={handleControlToSlider}\n onMouseUp={handleMouseUp}\n />\n )}\n </StyledSlider>\n ),\n [\n isBigSlider,\n interval,\n fromValue,\n steps,\n maxValue,\n minValue,\n handleTouchStart,\n handleTouchEnd,\n handleInputChange,\n handleMouseUp,\n fromSliderThumbPosition,\n shouldShowThumbLabel,\n thumbWidth,\n fromSliderThumbContentPosition,\n thumbLabelFormatter,\n toSliderThumbPosition,\n toSliderThumbContentPosition,\n toValue,\n handleControlToSlider,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,YAAY;AACpD,OAAOC,KAAK,IAAqBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACjG,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SACIC,uBAAuB,EACvBC,sBAAsB,EACtBC,UAAU,EACVC,gBAAgB,QACb,oBAAoB;AAC3B,SACIC,YAAY,EACZC,iBAAiB,EACjBC,iBAAiB,EACjBC,sBAAsB,QACnB,iBAAiB;AA8CxB,MAAMC,MAAuB,GAAGC,IAAA,IAU1B;EAAA,IAV2B;IAC7BC,QAAQ;IACRC,QAAQ;IACRC,KAAK;IACLC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,mBAAmB;IACnBC,oBAAoB,GAAG,KAAK;IAC5BC,KAAK,GAAG;EACZ,CAAC,GAAAT,IAAA;EACG,MAAM,CAACU,SAAS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K,EACLR,QAAQ,EACRC,QAAQ,EACRmD,gBAAgB,EAChBC,cAAc,EACdb,iBAAiB,EACjBb,aAAa,EACbe,uBAAuB,EACvBnC,oBAAoB,EACpBM,UAAU,EACVsC,8BAA8B,EAC9B7C,mBAAmB,EACnByC,qBAAqB,EACrBC,4BAA4B,EAC5BrC,OAAO,EACP4B,qBAAqB,CAE7B,CAAC;AACL,CAAC;AAEDzC,MAAM,CAAC2E,WAAW,GAAG,QAAQ;AAE7B,eAAe3E,MAAM","ignoreList":[]}
|
|
@@ -107,7 +107,7 @@ export const StyledSliderThumbLabel = styled.span.attrs(_ref3 => {
|
|
|
107
107
|
return {
|
|
108
108
|
style: {
|
|
109
109
|
minWidth: `${$width}px`,
|
|
110
|
-
top: `-${$isBigSlider ?
|
|
110
|
+
top: `-${$isBigSlider ? 56 : 48}px`,
|
|
111
111
|
left: `${$position}px`
|
|
112
112
|
}
|
|
113
113
|
};
|
|
@@ -125,7 +125,7 @@ export const StyledSliderThumbLabel = styled.span.attrs(_ref3 => {
|
|
|
125
125
|
display: flex;
|
|
126
126
|
align-items: center;
|
|
127
127
|
justify-content: center;
|
|
128
|
-
padding:
|
|
128
|
+
padding: 16px;
|
|
129
129
|
white-space: nowrap;
|
|
130
130
|
|
|
131
131
|
transition: top 0.2s ease 0s;
|
|
@@ -134,7 +134,7 @@ export const StyledSliderThumbLabel = styled.span.attrs(_ref3 => {
|
|
|
134
134
|
background-color: inherit;
|
|
135
135
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
136
136
|
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
|
137
|
-
box-shadow:
|
|
137
|
+
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.4);
|
|
138
138
|
content: '';
|
|
139
139
|
height: 14px;
|
|
140
140
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","StyledSliderInput","input","attrs","_ref","$isInterval","$value","$thumbWidth","$min","$max","theme","style","pointerEvents","width","background","undefined","StyledSliderThumb","_ref2","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","_ref3","$width","minWidth","top","_ref4"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { Theme, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledSlider = styled.div`\n width: 100%;\n height: 30px;\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n touch-action: none;\n user-select: none;\n`;\n\ntype StyledSliderInputProps = WithTheme<{\n $min: number;\n $max: number;\n $value: number;\n $isInterval: boolean;\n $thumbWidth: number;\n}>;\n\nexport const StyledSliderInput = styled(motion.input).attrs<StyledSliderInputProps>(\n ({ $isInterval, $value, $thumbWidth, $min, $max, theme }) => ({\n style: {\n pointerEvents: $isInterval ? 'none' : 'all',\n width: `calc(100% - ${$thumbWidth}px)`,\n background: !$isInterval\n ? `linear-gradient(\n to right,\n ${(theme as Theme)['409'] ?? ''} 0%,\n ${(theme as Theme)['409'] ?? ''}\n ${(($value - $min) / ($max - $min)) * 100}%,\n ${(theme as Theme)['403'] ?? ''}\n ${(($value - $min) / ($max - $min)) * 100}%,\n ${(theme as Theme)['403'] ?? ''}\n )`\n : undefined,\n },\n }),\n)`\n position: absolute;\n border-radius: 100px;\n -webkit-appearance: none;\n\n outline: none;\n cursor: pointer !important;\n z-index: 2;\n appearance: none;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n\n // slider thumb for firefox\n\n &::-moz-range-thumb {\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n`;\n\ntype StyledSliderThumbProps = WithTheme<{\n $position: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumb = styled.div.attrs<StyledSliderThumbProps>(\n ({ $position, $isBigSlider }) => ({\n style: {\n left: `${$position}px`,\n height: `${$isBigSlider ? 0 : 20}px`,\n },\n }),\n)`\n width: 20px;\n height: 20px;\n cursor: pointer;\n border-radius: 100px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n pointer-events: none;\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n white-space: nowrap;\n top: 5px;\n\n transition: top 0.2s ease 0s;\n`;\n\ntype StyledSliderThumbLabelProps = WithTheme<{\n $position: number;\n $width: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumbLabel = styled.span.attrs<StyledSliderThumbLabelProps>(\n ({ $position, $isBigSlider, $width }) => ({\n style: {\n minWidth: `${$width}px`,\n top: `-${$isBigSlider ?
|
|
1
|
+
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","StyledSliderInput","input","attrs","_ref","$isInterval","$value","$thumbWidth","$min","$max","theme","style","pointerEvents","width","background","undefined","StyledSliderThumb","_ref2","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","_ref3","$width","minWidth","top","_ref4"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { Theme, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledSlider = styled.div`\n width: 100%;\n height: 30px;\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n touch-action: none;\n user-select: none;\n`;\n\ntype StyledSliderInputProps = WithTheme<{\n $min: number;\n $max: number;\n $value: number;\n $isInterval: boolean;\n $thumbWidth: number;\n}>;\n\nexport const StyledSliderInput = styled(motion.input).attrs<StyledSliderInputProps>(\n ({ $isInterval, $value, $thumbWidth, $min, $max, theme }) => ({\n style: {\n pointerEvents: $isInterval ? 'none' : 'all',\n width: `calc(100% - ${$thumbWidth}px)`,\n background: !$isInterval\n ? `linear-gradient(\n to right,\n ${(theme as Theme)['409'] ?? ''} 0%,\n ${(theme as Theme)['409'] ?? ''}\n ${(($value - $min) / ($max - $min)) * 100}%,\n ${(theme as Theme)['403'] ?? ''}\n ${(($value - $min) / ($max - $min)) * 100}%,\n ${(theme as Theme)['403'] ?? ''}\n )`\n : undefined,\n },\n }),\n)`\n position: absolute;\n border-radius: 100px;\n -webkit-appearance: none;\n\n outline: none;\n cursor: pointer !important;\n z-index: 2;\n appearance: none;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n\n // slider thumb for firefox\n\n &::-moz-range-thumb {\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n`;\n\ntype StyledSliderThumbProps = WithTheme<{\n $position: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumb = styled.div.attrs<StyledSliderThumbProps>(\n ({ $position, $isBigSlider }) => ({\n style: {\n left: `${$position}px`,\n height: `${$isBigSlider ? 0 : 20}px`,\n },\n }),\n)`\n width: 20px;\n height: 20px;\n cursor: pointer;\n border-radius: 100px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n pointer-events: none;\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n white-space: nowrap;\n top: 5px;\n\n transition: top 0.2s ease 0s;\n`;\n\ntype StyledSliderThumbLabelProps = WithTheme<{\n $position: number;\n $width: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumbLabel = styled.span.attrs<StyledSliderThumbLabelProps>(\n ({ $position, $isBigSlider, $width }) => ({\n style: {\n minWidth: `${$width}px`,\n top: `-${$isBigSlider ? 56 : 48}px`,\n left: `${$position}px`,\n },\n }),\n)`\n pointer-events: none;\n color: #222;\n\n height: 20px;\n cursor: pointer;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n white-space: nowrap;\n\n transition: top 0.2s ease 0s;\n\n &::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.4);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n left: ${({ $position }) => $position * -1}px;\n transform: rotate(225deg);\n bottom: -7px;\n }\n\n &::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n border-radius: 3px;\n top: 0;\n z-index: -1;\n }\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AAGtC,OAAO,MAAMC,YAAY,GAAGD,MAAM,CAACE,GAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAUD,OAAO,MAAMC,iBAAiB,GAAGH,MAAM,CAACD,MAAM,CAACK,KAAK,CAAC,CAACC,KAAK,CACvDC,IAAA;EAAA,IAAC;IAAEC,WAAW;IAAEC,MAAM;IAAEC,WAAW;IAAEC,IAAI;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAAN,IAAA;EAAA,OAAM;IAC1DO,KAAK,EAAE;MACHC,aAAa,EAAEP,WAAW,GAAG,MAAM,GAAG,KAAK;MAC3CQ,KAAK,EAAE,eAAeN,WAAW,KAAK;MACtCO,UAAU,EAAE,CAACT,WAAW,GAClB;AAClB;AACA,cAAeK,KAAK,CAAW,KAAK,CAAC,IAAI,EAAE;AAC3C,cAAeA,KAAK,CAAW,KAAK,CAAC,IAAI,EAAE;AAC3C,cAAe,CAACJ,MAAM,GAAGE,IAAI,KAAKC,I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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgBU,KAAA;EAAA,IAAC;IAAEV;EAAU,CAAC,GAAAU,KAAA;EAAA,OAAKV,SAAS,GAAG,CAAC,CAAC;AAAA;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -18,11 +18,13 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
|
|
|
18
18
|
suppressContentEditableWarning?: boolean | undefined;
|
|
19
19
|
suppressHydrationWarning?: boolean | undefined;
|
|
20
20
|
accessKey?: string | undefined;
|
|
21
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
21
22
|
autoFocus?: boolean | undefined;
|
|
22
23
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
23
24
|
contextMenu?: string | undefined;
|
|
24
25
|
dir?: string | undefined;
|
|
25
26
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
27
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
26
28
|
hidden?: boolean | undefined;
|
|
27
29
|
id?: string | undefined;
|
|
28
30
|
lang?: string | undefined;
|
|
@@ -42,7 +44,6 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
|
|
|
42
44
|
rev?: string | undefined;
|
|
43
45
|
typeof?: string | undefined;
|
|
44
46
|
vocab?: string | undefined;
|
|
45
|
-
autoCapitalize?: string | undefined;
|
|
46
47
|
autoCorrect?: string | undefined;
|
|
47
48
|
autoSave?: string | undefined;
|
|
48
49
|
itemProp?: string | undefined;
|
|
@@ -52,7 +53,7 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
|
|
|
52
53
|
itemRef?: string | undefined;
|
|
53
54
|
results?: number | undefined;
|
|
54
55
|
security?: string | undefined;
|
|
55
|
-
unselectable?: "
|
|
56
|
+
unselectable?: "off" | "on" | undefined;
|
|
56
57
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
57
58
|
is?: string | undefined;
|
|
58
59
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -15,11 +15,13 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
|
|
|
15
15
|
suppressContentEditableWarning?: boolean | undefined;
|
|
16
16
|
suppressHydrationWarning?: boolean | undefined;
|
|
17
17
|
accessKey?: string | undefined;
|
|
18
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
18
19
|
autoFocus?: boolean | undefined;
|
|
19
20
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
20
21
|
contextMenu?: string | undefined;
|
|
21
22
|
dir?: string | undefined;
|
|
22
23
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
24
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
23
25
|
hidden?: boolean | undefined;
|
|
24
26
|
id?: string | undefined;
|
|
25
27
|
lang?: string | undefined;
|
|
@@ -39,7 +41,6 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
|
|
|
39
41
|
rev?: string | undefined;
|
|
40
42
|
typeof?: string | undefined;
|
|
41
43
|
vocab?: string | undefined;
|
|
42
|
-
autoCapitalize?: string | undefined;
|
|
43
44
|
autoCorrect?: string | undefined;
|
|
44
45
|
autoSave?: string | undefined;
|
|
45
46
|
itemProp?: string | undefined;
|
|
@@ -49,7 +50,7 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
|
|
|
49
50
|
itemRef?: string | undefined;
|
|
50
51
|
results?: number | undefined;
|
|
51
52
|
security?: string | undefined;
|
|
52
|
-
unselectable?: "
|
|
53
|
+
unselectable?: "off" | "on" | undefined;
|
|
53
54
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
54
55
|
is?: string | undefined;
|
|
55
56
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -11,11 +11,13 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
|
|
|
11
11
|
suppressContentEditableWarning?: boolean | undefined;
|
|
12
12
|
suppressHydrationWarning?: boolean | undefined;
|
|
13
13
|
accessKey?: string | undefined;
|
|
14
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
14
15
|
autoFocus?: boolean | undefined;
|
|
15
16
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
16
17
|
contextMenu?: string | undefined;
|
|
17
18
|
dir?: string | undefined;
|
|
18
19
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
20
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
19
21
|
hidden?: boolean | undefined;
|
|
20
22
|
id?: string | undefined;
|
|
21
23
|
lang?: string | undefined;
|
|
@@ -35,7 +37,6 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
|
|
|
35
37
|
rev?: string | undefined;
|
|
36
38
|
typeof?: string | undefined;
|
|
37
39
|
vocab?: string | undefined;
|
|
38
|
-
autoCapitalize?: string | undefined;
|
|
39
40
|
autoCorrect?: string | undefined;
|
|
40
41
|
autoSave?: string | undefined;
|
|
41
42
|
itemProp?: string | undefined;
|
|
@@ -45,7 +46,7 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
|
|
|
45
46
|
itemRef?: string | undefined;
|
|
46
47
|
results?: number | undefined;
|
|
47
48
|
security?: string | undefined;
|
|
48
|
-
unselectable?: "
|
|
49
|
+
unselectable?: "off" | "on" | undefined;
|
|
49
50
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
50
51
|
is?: string | undefined;
|
|
51
52
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -276,11 +277,13 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
|
|
|
276
277
|
suppressContentEditableWarning?: boolean | undefined;
|
|
277
278
|
suppressHydrationWarning?: boolean | undefined;
|
|
278
279
|
accessKey?: string | undefined;
|
|
280
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
279
281
|
autoFocus?: boolean | undefined;
|
|
280
282
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
281
283
|
contextMenu?: string | undefined;
|
|
282
284
|
dir?: string | undefined;
|
|
283
285
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
286
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
284
287
|
hidden?: boolean | undefined;
|
|
285
288
|
id?: string | undefined;
|
|
286
289
|
lang?: string | undefined;
|
|
@@ -300,7 +303,6 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
|
|
|
300
303
|
rev?: string | undefined;
|
|
301
304
|
typeof?: string | undefined;
|
|
302
305
|
vocab?: string | undefined;
|
|
303
|
-
autoCapitalize?: string | undefined;
|
|
304
306
|
autoCorrect?: string | undefined;
|
|
305
307
|
autoSave?: string | undefined;
|
|
306
308
|
itemProp?: string | undefined;
|
|
@@ -310,7 +312,7 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
|
|
|
310
312
|
itemRef?: string | undefined;
|
|
311
313
|
results?: number | undefined;
|
|
312
314
|
security?: string | undefined;
|
|
313
|
-
unselectable?: "
|
|
315
|
+
unselectable?: "off" | "on" | undefined;
|
|
314
316
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
315
317
|
is?: string | undefined;
|
|
316
318
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -545,11 +547,13 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
|
|
|
545
547
|
suppressContentEditableWarning?: boolean | undefined;
|
|
546
548
|
suppressHydrationWarning?: boolean | undefined;
|
|
547
549
|
accessKey?: string | undefined;
|
|
550
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
548
551
|
autoFocus?: boolean | undefined;
|
|
549
552
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
550
553
|
contextMenu?: string | undefined;
|
|
551
554
|
dir?: string | undefined;
|
|
552
555
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
556
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
553
557
|
hidden?: boolean | undefined;
|
|
554
558
|
id?: string | undefined;
|
|
555
559
|
lang?: string | undefined;
|
|
@@ -569,7 +573,6 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
|
|
|
569
573
|
rev?: string | undefined;
|
|
570
574
|
typeof?: string | undefined;
|
|
571
575
|
vocab?: string | undefined;
|
|
572
|
-
autoCapitalize?: string | undefined;
|
|
573
576
|
autoCorrect?: string | undefined;
|
|
574
577
|
autoSave?: string | undefined;
|
|
575
578
|
itemProp?: string | undefined;
|
|
@@ -579,7 +582,7 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
|
|
|
579
582
|
itemRef?: string | undefined;
|
|
580
583
|
results?: number | undefined;
|
|
581
584
|
security?: string | undefined;
|
|
582
|
-
unselectable?: "
|
|
585
|
+
unselectable?: "off" | "on" | undefined;
|
|
583
586
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
584
587
|
is?: string | undefined;
|
|
585
588
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -810,11 +813,13 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
|
|
|
810
813
|
suppressContentEditableWarning?: boolean | undefined;
|
|
811
814
|
suppressHydrationWarning?: boolean | undefined;
|
|
812
815
|
accessKey?: string | undefined;
|
|
816
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
813
817
|
autoFocus?: boolean | undefined;
|
|
814
818
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
815
819
|
contextMenu?: string | undefined;
|
|
816
820
|
dir?: string | undefined;
|
|
817
821
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
822
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
818
823
|
hidden?: boolean | undefined;
|
|
819
824
|
id?: string | undefined;
|
|
820
825
|
lang?: string | undefined;
|
|
@@ -834,7 +839,6 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
|
|
|
834
839
|
rev?: string | undefined;
|
|
835
840
|
typeof?: string | undefined;
|
|
836
841
|
vocab?: string | undefined;
|
|
837
|
-
autoCapitalize?: string | undefined;
|
|
838
842
|
autoCorrect?: string | undefined;
|
|
839
843
|
autoSave?: string | undefined;
|
|
840
844
|
itemProp?: string | undefined;
|
|
@@ -844,7 +848,7 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
|
|
|
844
848
|
itemRef?: string | undefined;
|
|
845
849
|
results?: number | undefined;
|
|
846
850
|
security?: string | undefined;
|
|
847
|
-
unselectable?: "
|
|
851
|
+
unselectable?: "off" | "on" | undefined;
|
|
848
852
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
849
853
|
is?: string | undefined;
|
|
850
854
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -1081,11 +1085,13 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
|
|
|
1081
1085
|
suppressContentEditableWarning?: boolean | undefined;
|
|
1082
1086
|
suppressHydrationWarning?: boolean | undefined;
|
|
1083
1087
|
accessKey?: string | undefined;
|
|
1088
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1084
1089
|
autoFocus?: boolean | undefined;
|
|
1085
1090
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
1086
1091
|
contextMenu?: string | undefined;
|
|
1087
1092
|
dir?: string | undefined;
|
|
1088
1093
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
1094
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
1089
1095
|
hidden?: boolean | undefined;
|
|
1090
1096
|
id?: string | undefined;
|
|
1091
1097
|
lang?: string | undefined;
|
|
@@ -1105,7 +1111,6 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
|
|
|
1105
1111
|
rev?: string | undefined;
|
|
1106
1112
|
typeof?: string | undefined;
|
|
1107
1113
|
vocab?: string | undefined;
|
|
1108
|
-
autoCapitalize?: string | undefined;
|
|
1109
1114
|
autoCorrect?: string | undefined;
|
|
1110
1115
|
autoSave?: string | undefined;
|
|
1111
1116
|
itemProp?: string | undefined;
|
|
@@ -1115,7 +1120,7 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
|
|
|
1115
1120
|
itemRef?: string | undefined;
|
|
1116
1121
|
results?: number | undefined;
|
|
1117
1122
|
security?: string | undefined;
|
|
1118
|
-
unselectable?: "
|
|
1123
|
+
unselectable?: "off" | "on" | undefined;
|
|
1119
1124
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
1120
1125
|
is?: string | undefined;
|
|
1121
1126
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -1344,11 +1349,13 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
|
|
|
1344
1349
|
suppressContentEditableWarning?: boolean | undefined;
|
|
1345
1350
|
suppressHydrationWarning?: boolean | undefined;
|
|
1346
1351
|
accessKey?: string | undefined;
|
|
1352
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1347
1353
|
autoFocus?: boolean | undefined;
|
|
1348
1354
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
1349
1355
|
contextMenu?: string | undefined;
|
|
1350
1356
|
dir?: string | undefined;
|
|
1351
1357
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
1358
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
1352
1359
|
hidden?: boolean | undefined;
|
|
1353
1360
|
id?: string | undefined;
|
|
1354
1361
|
lang?: string | undefined;
|
|
@@ -1368,7 +1375,6 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
|
|
|
1368
1375
|
rev?: string | undefined;
|
|
1369
1376
|
typeof?: string | undefined;
|
|
1370
1377
|
vocab?: string | undefined;
|
|
1371
|
-
autoCapitalize?: string | undefined;
|
|
1372
1378
|
autoCorrect?: string | undefined;
|
|
1373
1379
|
autoSave?: string | undefined;
|
|
1374
1380
|
itemProp?: string | undefined;
|
|
@@ -1378,7 +1384,7 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
|
|
|
1378
1384
|
itemRef?: string | undefined;
|
|
1379
1385
|
results?: number | undefined;
|
|
1380
1386
|
security?: string | undefined;
|
|
1381
|
-
unselectable?: "
|
|
1387
|
+
unselectable?: "off" | "on" | undefined;
|
|
1382
1388
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
1383
1389
|
is?: string | undefined;
|
|
1384
1390
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -1610,11 +1616,13 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
|
|
|
1610
1616
|
suppressContentEditableWarning?: boolean | undefined;
|
|
1611
1617
|
suppressHydrationWarning?: boolean | undefined;
|
|
1612
1618
|
accessKey?: string | undefined;
|
|
1619
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1613
1620
|
autoFocus?: boolean | undefined;
|
|
1614
1621
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
1615
1622
|
contextMenu?: string | undefined;
|
|
1616
1623
|
dir?: string | undefined;
|
|
1617
1624
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
1625
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
1618
1626
|
hidden?: boolean | undefined;
|
|
1619
1627
|
id?: string | undefined;
|
|
1620
1628
|
lang?: string | undefined;
|
|
@@ -1634,7 +1642,6 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
|
|
|
1634
1642
|
rev?: string | undefined;
|
|
1635
1643
|
typeof?: string | undefined;
|
|
1636
1644
|
vocab?: string | undefined;
|
|
1637
|
-
autoCapitalize?: string | undefined;
|
|
1638
1645
|
autoCorrect?: string | undefined;
|
|
1639
1646
|
autoSave?: string | undefined;
|
|
1640
1647
|
itemProp?: string | undefined;
|
|
@@ -1644,7 +1651,7 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
|
|
|
1644
1651
|
itemRef?: string | undefined;
|
|
1645
1652
|
results?: number | undefined;
|
|
1646
1653
|
security?: string | undefined;
|
|
1647
|
-
unselectable?: "
|
|
1654
|
+
unselectable?: "off" | "on" | undefined;
|
|
1648
1655
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
1649
1656
|
is?: string | undefined;
|
|
1650
1657
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -1875,11 +1882,13 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
|
|
|
1875
1882
|
suppressContentEditableWarning?: boolean | undefined;
|
|
1876
1883
|
suppressHydrationWarning?: boolean | undefined;
|
|
1877
1884
|
accessKey?: string | undefined;
|
|
1885
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1878
1886
|
autoFocus?: boolean | undefined;
|
|
1879
1887
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
1880
1888
|
contextMenu?: string | undefined;
|
|
1881
1889
|
dir?: string | undefined;
|
|
1882
1890
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
1891
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
1883
1892
|
hidden?: boolean | undefined;
|
|
1884
1893
|
id?: string | undefined;
|
|
1885
1894
|
lang?: string | undefined;
|
|
@@ -1899,7 +1908,6 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
|
|
|
1899
1908
|
rev?: string | undefined;
|
|
1900
1909
|
typeof?: string | undefined;
|
|
1901
1910
|
vocab?: string | undefined;
|
|
1902
|
-
autoCapitalize?: string | undefined;
|
|
1903
1911
|
autoCorrect?: string | undefined;
|
|
1904
1912
|
autoSave?: string | undefined;
|
|
1905
1913
|
itemProp?: string | undefined;
|
|
@@ -1909,7 +1917,7 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
|
|
|
1909
1917
|
itemRef?: string | undefined;
|
|
1910
1918
|
results?: number | undefined;
|
|
1911
1919
|
security?: string | undefined;
|
|
1912
|
-
unselectable?: "
|
|
1920
|
+
unselectable?: "off" | "on" | undefined;
|
|
1913
1921
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
1914
1922
|
is?: string | undefined;
|
|
1915
1923
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -2148,11 +2156,13 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
|
|
|
2148
2156
|
suppressContentEditableWarning?: boolean | undefined;
|
|
2149
2157
|
suppressHydrationWarning?: boolean | undefined;
|
|
2150
2158
|
accessKey?: string | undefined;
|
|
2159
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2151
2160
|
autoFocus?: boolean | undefined;
|
|
2152
2161
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
2153
2162
|
contextMenu?: string | undefined;
|
|
2154
2163
|
dir?: string | undefined;
|
|
2155
2164
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
2165
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
2156
2166
|
hidden?: boolean | undefined;
|
|
2157
2167
|
id?: string | undefined;
|
|
2158
2168
|
lang?: string | undefined;
|
|
@@ -2172,7 +2182,6 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
|
|
|
2172
2182
|
rev?: string | undefined;
|
|
2173
2183
|
typeof?: string | undefined;
|
|
2174
2184
|
vocab?: string | undefined;
|
|
2175
|
-
autoCapitalize?: string | undefined;
|
|
2176
2185
|
autoCorrect?: string | undefined;
|
|
2177
2186
|
autoSave?: string | undefined;
|
|
2178
2187
|
itemProp?: string | undefined;
|
|
@@ -2182,7 +2191,7 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
|
|
|
2182
2191
|
itemRef?: string | undefined;
|
|
2183
2192
|
results?: number | undefined;
|
|
2184
2193
|
security?: string | undefined;
|
|
2185
|
-
unselectable?: "
|
|
2194
|
+
unselectable?: "off" | "on" | undefined;
|
|
2186
2195
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
2187
2196
|
is?: string | undefined;
|
|
2188
2197
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -2407,7 +2416,6 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
|
|
|
2407
2416
|
autoComplete?: import("react").HTMLInputAutoCompleteAttribute | undefined;
|
|
2408
2417
|
capture?: boolean | "user" | "environment" | undefined;
|
|
2409
2418
|
checked?: boolean | undefined;
|
|
2410
|
-
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
2411
2419
|
formAction?: string | undefined;
|
|
2412
2420
|
formEncType?: string | undefined;
|
|
2413
2421
|
formMethod?: string | undefined;
|
|
@@ -2437,11 +2445,13 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
|
|
|
2437
2445
|
suppressContentEditableWarning?: boolean | undefined;
|
|
2438
2446
|
suppressHydrationWarning?: boolean | undefined;
|
|
2439
2447
|
accessKey?: string | undefined;
|
|
2448
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2440
2449
|
autoFocus?: boolean | undefined;
|
|
2441
2450
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
2442
2451
|
contextMenu?: string | undefined;
|
|
2443
2452
|
dir?: string | undefined;
|
|
2444
2453
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
2454
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
2445
2455
|
hidden?: boolean | undefined;
|
|
2446
2456
|
id?: string | undefined;
|
|
2447
2457
|
lang?: string | undefined;
|
|
@@ -2461,7 +2471,6 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
|
|
|
2461
2471
|
rev?: string | undefined;
|
|
2462
2472
|
typeof?: string | undefined;
|
|
2463
2473
|
vocab?: string | undefined;
|
|
2464
|
-
autoCapitalize?: string | undefined;
|
|
2465
2474
|
autoCorrect?: string | undefined;
|
|
2466
2475
|
autoSave?: string | undefined;
|
|
2467
2476
|
itemProp?: string | undefined;
|
|
@@ -2471,7 +2480,7 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
|
|
|
2471
2480
|
itemRef?: string | undefined;
|
|
2472
2481
|
results?: number | undefined;
|
|
2473
2482
|
security?: string | undefined;
|
|
2474
|
-
unselectable?: "
|
|
2483
|
+
unselectable?: "off" | "on" | undefined;
|
|
2475
2484
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
2476
2485
|
is?: string | undefined;
|
|
2477
2486
|
"aria-activedescendant"?: string | undefined;
|
|
@@ -33,11 +33,13 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
|
|
|
33
33
|
suppressContentEditableWarning?: boolean | undefined;
|
|
34
34
|
suppressHydrationWarning?: boolean | undefined;
|
|
35
35
|
accessKey?: string | undefined;
|
|
36
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
36
37
|
autoFocus?: boolean | undefined;
|
|
37
38
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
38
39
|
contextMenu?: string | undefined;
|
|
39
40
|
dir?: string | undefined;
|
|
40
41
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
42
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
|
|
41
43
|
hidden?: boolean | undefined;
|
|
42
44
|
id?: string | undefined;
|
|
43
45
|
lang?: string | undefined;
|
|
@@ -57,7 +59,6 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
|
|
|
57
59
|
rev?: string | undefined;
|
|
58
60
|
typeof?: string | undefined;
|
|
59
61
|
vocab?: string | undefined;
|
|
60
|
-
autoCapitalize?: string | undefined;
|
|
61
62
|
autoCorrect?: string | undefined;
|
|
62
63
|
autoSave?: string | undefined;
|
|
63
64
|
itemProp?: string | undefined;
|
|
@@ -67,7 +68,7 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
|
|
|
67
68
|
itemRef?: string | undefined;
|
|
68
69
|
results?: number | undefined;
|
|
69
70
|
security?: string | undefined;
|
|
70
|
-
unselectable?: "
|
|
71
|
+
unselectable?: "off" | "on" | undefined;
|
|
71
72
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
72
73
|
is?: string | undefined;
|
|
73
74
|
"aria-activedescendant"?: string | undefined;
|