@salutejs/plasma-new-hope 0.175.3-canary.1512.11555735717.0 → 0.176.0-canary.1511.11555353496.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/NumberInput/NumberInput.css +52 -0
- package/cjs/components/NumberInput/NumberInput.js +183 -0
- package/cjs/components/NumberInput/NumberInput.js.map +1 -0
- package/cjs/components/NumberInput/NumberInput.styles.js +9 -0
- package/cjs/components/NumberInput/NumberInput.styles.js.map +1 -0
- package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
- package/cjs/components/NumberInput/NumberInput.tokens.js +91 -0
- package/cjs/components/NumberInput/NumberInput.tokens.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +19 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +22 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.css +15 -0
- package/cjs/components/NumberInput/ui/Input/Input.js +197 -0
- package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles.js +96 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
- package/cjs/components/NumberInput/utils/index.js +8 -0
- package/cjs/components/NumberInput/utils/index.js.map +1 -0
- package/cjs/components/NumberInput/variations/_background-type/base.js +9 -0
- package/cjs/components/NumberInput/variations/_background-type/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
- package/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/cjs/components/NumberInput/variations/_disabled/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
- package/cjs/components/NumberInput/variations/_segmentation/base.js +9 -0
- package/cjs/components/NumberInput/variations/_segmentation/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_segmentation/base_1mg9wqg.css +1 -0
- package/cjs/components/NumberInput/variations/_shape/base.js +9 -0
- package/cjs/components/NumberInput/variations/_shape/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
- package/cjs/components/NumberInput/variations/_size/base.js +9 -0
- package/cjs/components/NumberInput/variations/_size/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
- package/cjs/components/NumberInput/variations/_view/base.js +9 -0
- package/cjs/components/NumberInput/variations/_view/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_view/base_3gefjm.css +1 -0
- package/cjs/components/Popover/Popover.js +1 -2
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/index.css +23 -0
- package/cjs/index.js +6 -0
- package/cjs/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/NumberInput/NumberInput.js +193 -0
- package/emotion/cjs/components/NumberInput/NumberInput.styles.js +17 -0
- package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +88 -0
- package/emotion/cjs/components/NumberInput/NumberInput.types.js +5 -0
- package/emotion/cjs/components/NumberInput/index.js +31 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +16 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.js +205 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +81 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
- package/emotion/cjs/components/NumberInput/ui/index.js +19 -0
- package/emotion/cjs/components/NumberInput/utils/index.js +7 -0
- package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
- package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
- package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/emotion/cjs/components/NumberInput/variations/_shape/base.js +11 -0
- package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/emotion/cjs/components/NumberInput/variations/_size/base.js +13 -0
- package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
- package/emotion/cjs/components/NumberInput/variations/_view/base.js +13 -0
- package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
- package/emotion/cjs/components/Popover/Popover.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/cjs/index.js +11 -0
- 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/NumberInput/NumberInput.js +185 -0
- package/emotion/es/components/NumberInput/NumberInput.styles.js +11 -0
- package/emotion/es/components/NumberInput/NumberInput.tokens.js +82 -0
- package/emotion/es/components/NumberInput/NumberInput.types.js +1 -0
- package/emotion/es/components/NumberInput/index.js +2 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +9 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.js +196 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +74 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.types.js +1 -0
- package/emotion/es/components/NumberInput/ui/index.js +2 -0
- package/emotion/es/components/NumberInput/utils/index.js +1 -0
- package/emotion/es/components/NumberInput/variations/_background-type/base.js +4 -0
- package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/emotion/es/components/NumberInput/variations/_disabled/base.js +3 -0
- package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/emotion/es/components/NumberInput/variations/_segmentation/base.js +6 -0
- package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/emotion/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/emotion/es/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/emotion/es/components/NumberInput/variations/_size/base.js +7 -0
- package/emotion/es/components/NumberInput/variations/_size/tokens.json +22 -0
- package/emotion/es/components/NumberInput/variations/_view/base.js +7 -0
- package/emotion/es/components/NumberInput/variations/_view/tokens.json +14 -0
- package/emotion/es/components/Popover/Popover.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/es/index.js +2 -1
- 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/NumberInput/NumberInput.css +52 -0
- package/es/components/NumberInput/NumberInput.js +178 -0
- package/es/components/NumberInput/NumberInput.js.map +1 -0
- package/es/components/NumberInput/NumberInput.styles.js +5 -0
- package/es/components/NumberInput/NumberInput.styles.js.map +1 -0
- package/es/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
- package/es/components/NumberInput/NumberInput.tokens.js +85 -0
- package/es/components/NumberInput/NumberInput.tokens.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js +15 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +18 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
- package/es/components/NumberInput/ui/Input/Input.css +15 -0
- package/es/components/NumberInput/ui/Input/Input.js +193 -0
- package/es/components/NumberInput/ui/Input/Input.js.map +1 -0
- package/es/components/NumberInput/ui/Input/Input.styles.js +85 -0
- package/es/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
- package/es/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
- package/es/components/NumberInput/utils/index.js +4 -0
- package/es/components/NumberInput/utils/index.js.map +1 -0
- package/es/components/NumberInput/variations/_background-type/base.js +5 -0
- package/es/components/NumberInput/variations/_background-type/base.js.map +1 -0
- package/es/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
- package/es/components/NumberInput/variations/_disabled/base.js +5 -0
- package/es/components/NumberInput/variations/_disabled/base.js.map +1 -0
- package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
- package/es/components/NumberInput/variations/_segmentation/base.js +5 -0
- package/es/components/NumberInput/variations/_segmentation/base.js.map +1 -0
- package/es/components/NumberInput/variations/_segmentation/base_1mg9wqg.css +1 -0
- package/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/es/components/NumberInput/variations/_shape/base.js.map +1 -0
- package/es/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
- package/es/components/NumberInput/variations/_size/base.js +5 -0
- package/es/components/NumberInput/variations/_size/base.js.map +1 -0
- package/es/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
- package/es/components/NumberInput/variations/_view/base.js +5 -0
- package/es/components/NumberInput/variations/_view/base.js.map +1 -0
- package/es/components/NumberInput/variations/_view/base_3gefjm.css +1 -0
- package/es/components/Popover/Popover.js +1 -2
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/index.css +23 -0
- package/es/index.js +2 -0
- package/es/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/NumberInput/NumberInput.js +193 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.styles.js +8 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +88 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/index.js +31 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +15 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +205 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +48 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/ui/index.js +19 -0
- package/styled-components/cjs/components/NumberInput/utils/index.js +7 -0
- package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
- package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +11 -0
- package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/styled-components/cjs/components/NumberInput/variations/_size/base.js +13 -0
- package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
- package/styled-components/cjs/components/NumberInput/variations/_view/base.js +13 -0
- package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
- package/styled-components/cjs/components/Popover/Popover.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/cjs/index.js +11 -0
- 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/NumberInput/NumberInput.js +185 -0
- package/styled-components/es/components/NumberInput/NumberInput.styles.js +2 -0
- package/styled-components/es/components/NumberInput/NumberInput.tokens.js +82 -0
- package/styled-components/es/components/NumberInput/NumberInput.types.js +1 -0
- package/styled-components/es/components/NumberInput/index.js +2 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +8 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.js +196 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +41 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +1 -0
- package/styled-components/es/components/NumberInput/ui/index.js +2 -0
- package/styled-components/es/components/NumberInput/utils/index.js +1 -0
- package/styled-components/es/components/NumberInput/variations/_background-type/base.js +4 -0
- package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/styled-components/es/components/NumberInput/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +6 -0
- package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/styled-components/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/styled-components/es/components/NumberInput/variations/_size/base.js +7 -0
- package/styled-components/es/components/NumberInput/variations/_size/tokens.json +22 -0
- package/styled-components/es/components/NumberInput/variations/_view/base.js +7 -0
- package/styled-components/es/components/NumberInput/variations/_view/tokens.json +14 -0
- package/styled-components/es/components/Popover/Popover.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/es/index.js +2 -1
- 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/NumberInput/NumberInput.d.ts +38 -0
- package/types/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.styles.d.ts +2 -0
- package/types/components/NumberInput/NumberInput.styles.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.tokens.d.ts +77 -0
- package/types/components/NumberInput/NumberInput.tokens.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.types.d.ts +112 -0
- package/types/components/NumberInput/NumberInput.types.d.ts.map +1 -0
- package/types/components/NumberInput/index.d.ts +3 -0
- package/types/components/NumberInput/index.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +4 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +45 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +7 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.d.ts +16 -0
- package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts +30 -0
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.types.d.ts +16 -0
- package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +1 -0
- package/types/components/NumberInput/ui/index.d.ts +3 -0
- package/types/components/NumberInput/ui/index.d.ts.map +1 -0
- package/types/components/NumberInput/utils/index.d.ts +2 -0
- package/types/components/NumberInput/utils/index.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_background-type/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_background-type/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_disabled/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_segmentation/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_shape/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_shape/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_size/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_size/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_view/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_view/base.d.ts.map +1 -0
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +39 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +82 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +39 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +82 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../../src/components/NumberInput/ui/Input/Input.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { KeyboardEvent, ChangeEvent, FocusEvent } from 'react';\nimport { useForkRef } from '@salutejs/plasma-core';\n\nimport { classes } from '../../NumberInput.tokens';\nimport { cx, isNumber } from '../../../../utils';\nimport { useDidMountEffect } from '../../../../hooks';\nimport { numberPettern } from '../../utils';\nimport { keyCodes } from '../../../../utils/constants';\n\nimport type { InputProps } from './Input.types';\nimport {\n AdditionalText,\n Input,\n InputWrapper,\n DynamicInput,\n InputWidthHelper,\n TextWrapper,\n StyledSpinner,\n Loader,\n} from './Input.styles';\n\nexport const NumberInput = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n value,\n min,\n max,\n isLoading,\n loader,\n disabled,\n segmentation,\n textBefore,\n textAfter,\n isManualInput,\n setInnerValue,\n onChange,\n onBlur,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const [dynamicWidth, setDynamicWidth] = useState(value ? `${String(value).length}ch` : '1ch');\n const [lastValidValue, setLastValidValue] = useState(Number(value));\n const [errorClass, setErrorClass] = useState<string | undefined>(undefined);\n const [errorValue, setErrorValue] = useState<number>();\n const [isEditing, setIsEditing] = useState(false);\n\n const inputHelperRef = useRef<HTMLSpanElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const textWrapperRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n\n const solidViewClass = segmentation === 'solid' ? classes.solidView : undefined;\n const manualInputClass = isManualInput ? classes.manualInput : undefined;\n\n const getInputWidth = (firstRender = true) => {\n if (!firstRender && inputHelperRef.current?.clientWidth) {\n return `${inputHelperRef.current?.clientWidth}px`;\n }\n\n if (value) {\n return `${String(value).length}ch`;\n }\n\n return '1ch';\n };\n\n const setValues = (event: ChangeEvent<HTMLInputElement> | null, newValue: number) => {\n setLastValidValue(newValue);\n setInnerValue(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n };\n\n const handleManualInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (!isManualInput || disabled) {\n return;\n }\n\n const { value: newValue } = event.target;\n\n if (!newValue) {\n setInnerValue('');\n\n if (onChange) {\n onChange(event, '');\n }\n return;\n }\n\n const cleanValue = newValue.replace(/[^-.\\d]/g, '');\n if (cleanValue.endsWith('.')) {\n setInnerValue(cleanValue);\n\n if (onChange) {\n onChange(event, cleanValue);\n }\n return;\n }\n\n const isValid = numberPettern.test(cleanValue);\n\n if (!isValid) {\n setValues(event, lastValidValue);\n return;\n }\n\n const resValue = Number(cleanValue);\n if (max && resValue > max) {\n setErrorClass(classes.errorAnimation);\n setErrorValue(max);\n return;\n }\n\n if (min && resValue < min) {\n setErrorClass(classes.errorAnimation);\n setErrorValue(min);\n return;\n }\n\n if (\n textWrapperRef?.current &&\n wrapperRef?.current &&\n textWrapperRef?.current?.clientWidth > wrapperRef?.current?.clientWidth\n ) {\n wrapperRef.current.scrollLeft =\n textWrapperRef.current.offsetWidth - textWrapperRef.current.offsetLeft || 0;\n }\n\n setValues(event, resValue);\n };\n\n const handleClickInputWrapper = () => {\n if (!isManualInput || !inputRef.current) {\n return;\n }\n\n if (!isEditing) {\n inputRef.current.select();\n }\n\n setIsEditing(true);\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setIsEditing(false);\n\n if (!value || !isNumber(value)) {\n setValues(null, lastValidValue);\n } else if (String(value).endsWith('.')) {\n setValues(null, Number(value));\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (!isManualInput || disabled) {\n return;\n }\n\n if (event.keyCode === keyCodes.Enter) {\n event.preventDefault();\n\n if (!value || !isNumber(value)) {\n setValues(null, lastValidValue);\n } else if (String(value).endsWith('.')) {\n setValues(null, Number(value));\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n }\n };\n\n const handleEndErrorAnimation = (correctValue: number) => {\n setErrorClass(undefined);\n setValues(null, correctValue);\n };\n\n useEffect(() => {\n setDynamicWidth(getInputWidth());\n }, []);\n\n useDidMountEffect(() => {\n setDynamicWidth(getInputWidth(false));\n }, [value]);\n\n return (\n <InputWrapper\n ref={wrapperRef}\n className={cx(solidViewClass, errorClass, manualInputClass)}\n isManualInput={Boolean(isManualInput)}\n onClick={handleClickInputWrapper}\n >\n <TextWrapper ref={textWrapperRef}>\n {textBefore && <AdditionalText className={classes.textBefore}>{textBefore}</AdditionalText>}\n {isLoading ? (\n <Loader>{loader || <StyledSpinner />}</Loader>\n ) : (\n <DynamicInput>\n <Input\n ref={inputForkRef}\n dynamicWidth={dynamicWidth}\n value={value}\n isManualInput={Boolean(isManualInput)}\n tabIndex={disabled || !isManualInput ? -1 : 0}\n onChange={handleManualInputChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n onAnimationEnd={() => handleEndErrorAnimation(Number(errorValue))}\n {...rest}\n />\n <InputWidthHelper ref={inputHelperRef}>{value}</InputWidthHelper>\n </DynamicInput>\n )}\n {textAfter && <AdditionalText className={classes.textAfter}>{textAfter}</AdditionalText>}\n </TextWrapper>\n </InputWrapper>\n );\n },\n);\n"],"names":["NumberInput","forwardRef","_ref","ref","value","min","max","isLoading","loader","disabled","segmentation","textBefore","textAfter","isManualInput","setInnerValue","onChange","onBlur","onKeyDown","rest","_objectWithoutProperties","_excluded","_useState","useState","concat","String","length","_useState2","_slicedToArray","dynamicWidth","setDynamicWidth","_useState3","Number","_useState4","lastValidValue","setLastValidValue","_useState5","undefined","_useState6","errorClass","setErrorClass","_useState7","_useState8","errorValue","setErrorValue","_useState9","_useState10","isEditing","setIsEditing","inputHelperRef","useRef","wrapperRef","textWrapperRef","inputRef","inputForkRef","useForkRef","solidViewClass","classes","solidView","manualInputClass","manualInput","getInputWidth","_inputHelperRef$curre","firstRender","arguments","current","clientWidth","_inputHelperRef$curre2","setValues","event","newValue","handleManualInputChange","_textWrapperRef$curre","_wrapperRef$current","target","cleanValue","replace","endsWith","isValid","numberPettern","test","resValue","errorAnimation","scrollLeft","offsetWidth","offsetLeft","handleClickInputWrapper","select","handleBlur","isNumber","handleKeyDown","keyCode","keyCodes","Enter","preventDefault","handleEndErrorAnimation","correctValue","useEffect","useDidMountEffect","React","createElement","InputWrapper","className","cx","Boolean","onClick","TextWrapper","AdditionalText","Loader","_StyledSpinner","StyledSpinner","DynamicInput","Input","_extends","tabIndex","onAnimationEnd","InputWidthHelper"],"mappings":";;;;;;;;;;;;;AAsBO,IAAMA,WAAW,gBAAGC,UAAU,CACjC,UAAAC,IAAA,EAkBIC,GAAG,EACF;AAAA,EAAA,IAjBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,GAAG,GAAAH,IAAA,CAAHG,GAAG;IACHC,GAAG,GAAAJ,IAAA,CAAHI,GAAG;IACHC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,YAAY,GAAAR,IAAA,CAAZQ,YAAY;IACZC,UAAU,GAAAT,IAAA,CAAVS,UAAU;IACVC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,aAAa,GAAAX,IAAA,CAAbW,aAAa;IACbC,aAAa,GAAAZ,IAAA,CAAbY,aAAa;IACbC,QAAQ,GAAAb,IAAA,CAARa,QAAQ;IACRC,MAAM,GAAAd,IAAA,CAANc,MAAM;IACNC,SAAS,GAAAf,IAAA,CAATe,SAAS;AACNC,IAAAA,IAAI,GAAAC,wBAAA,CAAAjB,IAAA,EAAAkB,SAAA,CAAA,CAAA;AAIX,EAAA,IAAAC,SAAA,GAAwCC,QAAQ,CAAClB,KAAK,MAAAmB,MAAA,CAAMC,MAAM,CAACpB,KAAK,CAAC,CAACqB,MAAM,EAAA,IAAA,CAAA,GAAO,KAAK,CAAC;IAAAC,UAAA,GAAAC,cA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AA,EAAEA,UAA2B,CAAC,EAC1FJ,SAAS,gBACN2F,KAAA,CAAAC,aAAA,CAACQ,MAAM,QAAEnG,MAAM,IAAAoG,cAAA,KAAAA,cAAA,gBAAIV,KAAA,CAAAC,aAAA,CAACU,aAAa,EAAE,IAAA,CAAC,CAAS,CAAC,gBAE9CX,KAAA,CAAAC,aAAA,CAACW,YAAY,qBACTZ,KAAA,CAAAC,aAAA,CAACY,KAAK,EAAAC,QAAA,CAAA;AACF7G,IAAAA,GAAG,EAAEkD,YAAa;AAClBzB,IAAAA,YAAY,EAAEA,YAAa;AAC3BxB,IAAAA,KAAK,EAAEA,KAAM;AACbS,IAAAA,aAAa,EAAE0F,OAAO,CAAC1F,aAAa,CAAE;IACtCoG,QAAQ,EAAExG,QAAQ,IAAI,CAACI,aAAa,GAAG,CAAC,CAAC,GAAG,CAAE;AAC9CE,IAAAA,QAAQ,EAAEuD,uBAAwB;AAClCtD,IAAAA,MAAM,EAAEuE,UAAW;AACnBtE,IAAAA,SAAS,EAAEwE,aAAc;IACzByB,cAAc,EAAE,SAAAA,cAAA,GAAA;AAAA,MAAA,OAAMpB,uBAAuB,CAAC/D,MAAM,CAACW,UAAU,CAAC,CAAC,CAAA;AAAA,KAAA;GAC7DxB,EAAAA,IAAI,CACX,CAAC,eACFgF,KAAA,CAAAC,aAAA,CAACgB,gBAAgB,EAAA;AAAChH,IAAAA,GAAG,EAAE6C,cAAAA;GAAiB5C,EAAAA,KAAwB,CACtD,CACjB,EACAQ,SAAS,iBAAIsF,KAAA,CAAAC,aAAA,CAACO,cAAc,EAAA;IAACL,SAAS,EAAE7C,OAAO,CAAC5C,SAAAA;GAAYA,EAAAA,SAA0B,CAC9E,CACH,CAAC,CAAA;AAEvB,CACJ;;;;"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import './Input.styles_fhgb95.css';
|
2
|
+
import { styled } from '@linaria/react';
|
3
|
+
import { component, mergeConfig } from '../../../../engines/common.js';
|
4
|
+
import { spinnerConfig } from '../../../Spinner/Spinner.js';
|
5
|
+
|
6
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(spinnerConfig);
|
7
|
+
var Spinner = /*#__PURE__*/component(mergedConfig);
|
8
|
+
var _exp = function _exp() {
|
9
|
+
return function (_ref) {
|
10
|
+
var isManualInput = _ref.isManualInput;
|
11
|
+
return isManualInput ? 'text' : 'default';
|
12
|
+
};
|
13
|
+
};
|
14
|
+
var InputWrapper = /*#__PURE__*/styled('div')({
|
15
|
+
name: "InputWrapper",
|
16
|
+
"class": "i1s8bsh6",
|
17
|
+
propsAsIs: false,
|
18
|
+
vars: {
|
19
|
+
"i1s8bsh6-0": [/*#__PURE__*/_exp()]
|
20
|
+
}
|
21
|
+
});
|
22
|
+
var TextWrapper = /*#__PURE__*/styled('div')({
|
23
|
+
name: "TextWrapper",
|
24
|
+
"class": "t6wb9c",
|
25
|
+
propsAsIs: false
|
26
|
+
});
|
27
|
+
var AdditionalText = /*#__PURE__*/styled('span')({
|
28
|
+
name: "AdditionalText",
|
29
|
+
"class": "az36kha",
|
30
|
+
propsAsIs: false
|
31
|
+
});
|
32
|
+
var Loader = /*#__PURE__*/styled('div')({
|
33
|
+
name: "Loader",
|
34
|
+
"class": "l1u6icqf",
|
35
|
+
propsAsIs: false
|
36
|
+
});
|
37
|
+
var _exp2 = function _exp2() {
|
38
|
+
return Spinner;
|
39
|
+
};
|
40
|
+
var StyledSpinner = /*#__PURE__*/styled(_exp2())({
|
41
|
+
name: "StyledSpinner",
|
42
|
+
"class": "s1ft73sv",
|
43
|
+
propsAsIs: true
|
44
|
+
});
|
45
|
+
var DynamicInput = /*#__PURE__*/styled('div')({
|
46
|
+
name: "DynamicInput",
|
47
|
+
"class": "d1n4jo6t",
|
48
|
+
propsAsIs: false
|
49
|
+
});
|
50
|
+
var _exp3 = function _exp3() {
|
51
|
+
return function (_ref2) {
|
52
|
+
var dynamicWidth = _ref2.dynamicWidth;
|
53
|
+
return dynamicWidth;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
var _exp4 = function _exp4() {
|
57
|
+
return function (_ref3) {
|
58
|
+
var isManualInput = _ref3.isManualInput;
|
59
|
+
return isManualInput ? 'text' : 'default';
|
60
|
+
};
|
61
|
+
};
|
62
|
+
var _exp5 = function _exp5() {
|
63
|
+
return function (_ref4) {
|
64
|
+
var isManualInput = _ref4.isManualInput;
|
65
|
+
return isManualInput ? 'initial' : 'none';
|
66
|
+
};
|
67
|
+
};
|
68
|
+
var Input = /*#__PURE__*/styled('input')({
|
69
|
+
name: "Input",
|
70
|
+
"class": "i1tgbhg7",
|
71
|
+
propsAsIs: false,
|
72
|
+
vars: {
|
73
|
+
"i1tgbhg7-0": [/*#__PURE__*/_exp3()],
|
74
|
+
"i1tgbhg7-1": [/*#__PURE__*/_exp4()],
|
75
|
+
"i1tgbhg7-2": [/*#__PURE__*/_exp5()]
|
76
|
+
}
|
77
|
+
});
|
78
|
+
var InputWidthHelper = /*#__PURE__*/styled('span')({
|
79
|
+
name: "InputWidthHelper",
|
80
|
+
"class": "i1il5xze",
|
81
|
+
propsAsIs: false
|
82
|
+
});
|
83
|
+
|
84
|
+
export { AdditionalText, DynamicInput, Input, InputWidthHelper, InputWrapper, Loader, StyledSpinner, TextWrapper };
|
85
|
+
//# sourceMappingURL=Input.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sources":["../../../../../src/components/NumberInput/ui/Input/Input.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { spinnerConfig } from '../../../Spinner';\n\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const InputWrapper = styled.div<{ isManualInput: boolean }>`\n overflow-x: auto;\n overflow-y: hidden;\n flex: 1;\n cursor: ${({ isManualInput }) => (isManualInput ? 'text' : 'default')};\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n scrollbar-width: none;\n\n overscroll-behavior: contain;\n`;\n\nexport const TextWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n margin: 0 auto;\n box-sizing: border-box;\n`;\n\nexport const AdditionalText = styled.span``;\n\nexport const Loader = styled.div``;\n\nexport const StyledSpinner = styled(Spinner)``;\n\nexport const DynamicInput = styled.div`\n position: relative;\n`;\n\nexport const Input = styled.input<{ dynamicWidth: string; isManualInput: boolean }>`\n box-sizing: border-box;\n appearance: none;\n border: 0;\n padding: 0;\n background-color: transparent;\n outline: none;\n width: ${({ dynamicWidth }) => dynamicWidth};\n box-sizing: border-box;\n cursor: ${({ isManualInput }) => (isManualInput ? 'text' : 'default')};\n pointer-events: ${({ isManualInput }) => (isManualInput ? 'initial' : 'none')};\n transition: width 0.1s;\n`;\n\nexport const InputWidthHelper = styled.span`\n position: absolute;\n z-index: -999;\n visibility: hidden;\n top: 0;\n left: 0;\n opacity: 0;\n height: 0;\n white-space: pre;\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","_exp","_ref","isManualInput","InputWrapper","styled","name","class","propsAsIs","vars","TextWrapper","AdditionalText","Loader","_exp2","StyledSpinner","DynamicInput","_exp3","_ref2","dynamicWidth","_exp4","_ref3","_exp5","_ref4","Input","InputWidthHelper"],"mappings":";;;;AAKA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,aAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GALtBA,SAKsBA,IAAAA,GAAA;AAAA,EAAA,OAM1B,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,aAAAA,GAAAA,IAAAA,CAAAA,aAAAA,CAAAA;AAAAA,IAAAA,OAAqBA,aAAa,GAAG,MAAM,GAAG,SAAU,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAJlE,IAAMC,YAAY,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA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
1
|
+
.i1s8bsh6{overflow-x:auto;overflow-y:hidden;-webkit-flex:1;-ms-flex:1;flex:1;cursor:var(--i1s8bsh6-0);-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.i1s8bsh6::-webkit-scrollbar{display:none;}
|
2
|
+
.t6wb9c{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;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;box-sizing:border-box;}
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
.d1n4jo6t{position:relative;}
|
7
|
+
.i1tgbhg7{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:var(--i1tgbhg7-0);box-sizing:border-box;cursor:var(--i1tgbhg7-1);pointer-events:var(--i1tgbhg7-2);-webkit-transition:width 0.1s;transition:width 0.1s;}
|
8
|
+
.i1il5xze{position:absolute;z-index:-999;visibility:hidden;top:0;left:0;opacity:0;height:0;white-space:pre;}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/NumberInput/utils/index.ts"],"sourcesContent":["export const numberPettern = /^(-)?\\d+(\\.\\d+)?$/;\n"],"names":["numberPettern"],"mappings":"AAAO,IAAMA,aAAa,GAAG;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_background-type/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../NumberInput.tokens';\nimport { InputWrapper } from '../../ui/Input/Input.styles';\n\nexport const base = css`\n ${InputWrapper} {\n background-color: var(${tokens.backgroundColor});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderColor});\n\n &.${classes.manualInput}:hover {\n background-color: var(${tokens.backgroundColorHover});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderColorHover});\n }\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAUhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b15uqx38 .i1s8bsh6{background-color:var(--plasma-number-input_background-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color);}.b15uqx38 .i1s8bsh6.manual-input-number-input:hover{background-color:var(--plasma-number-input_background-color-hover);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-hover);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../NumberInput.tokens';\n\nexport const base = css`\n &&.${classes.disabled} {\n pointer-events: none;\n opacity: var(${tokens.disabledOpacity});\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAMhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bmqk5v5.bmqk5v5.number-input-disabled{pointer-events:none;opacity:var(--plasma-number-input_disabled-opacity);cursor:not-allowed;}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_segmentation/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, privateTokens, tokens } from '../../NumberInput.tokens';\nimport { StyledIconButton } from '../../ui/ActionButton/ActionButton.styles';\nimport { AdditionalText, Input, InputWrapper, StyledSpinner } from '../../ui/Input/Input.styles';\nimport { spinnerTokens } from '../../../Spinner';\n\nexport const base = css`\n ${InputWrapper} {\n border-radius: var(${tokens.inputWrapperBorderRadius});\n }\n\n ${StyledIconButton} {\n ${privateTokens.segmentationBorderRadius}: var(${tokens.iconButtonRadius});\n\n &.${classes.segmentedView}, &.${classes.solidView} {\n ${privateTokens.segmentationBorderRadius}: var(${tokens.iconButtonSegmentationRadius}, var(${tokens.iconButtonRadius}));\n }\n\n &.${classes.actionButtonDecrement} {\n border-radius: var(${tokens.iconButtonRadius}) var(${privateTokens.segmentationBorderRadius}) var(${privateTokens.segmentationBorderRadius}) var(${tokens.iconButtonRadius});\n }\n\n &.${classes.actionButtonIncrement} {\n border-radius: var(${privateTokens.segmentationBorderRadius}) var(${tokens.iconButtonRadius}) var(${tokens.iconButtonRadius}) var(${privateTokens.segmentationBorderRadius});\n }\n }\n\n &.${classes.segmentedView} {\n ${InputWrapper} {\n border-radius: var(${tokens.iconButtonSegmentationRadius});\n }\n }\n\n &.${classes.solidView} {\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n width: calc(100% - var(${tokens.iconButtonWidth}) * 2);\n height: 100%;\n background: var(${tokens.backgroundColorSolid});\n }\n\n ${InputWrapper} {\n position: relative;\n color: var(${tokens.colorSolid});\n \n &:not(${classes.errorAnimation}).${classes.manualInput}:focus-within {\n background-color: var(${tokens.backgroundColorSolidFocus});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderColorSolidFocus});\n }\n }\n\n &.${classes.clearView} {\n ${StyledIconButton} {\n &.${classes.actionButtonDecrementDisabled}, &.${classes.actionButtonIncrementDisabled} {\n :hover,\n :active {\n background-color: transparent;\n }\n }\n\n &.${classes.actionButtonDecrementDisabled}, &.${classes.actionButtonIncrementDisabled} {\n opacity: 1;\n\n svg {\n opacity: var(${tokens.actionButtonDisabledOpacity});\n }\n\n :hover,\n :active {\n svg {\n opacity: var(${tokens.actionButtonDisabledOpacity});\n }\n }\n }\n }\n }\n\n ${StyledSpinner} {\n ${spinnerTokens.color}: var(${tokens.loaderSpinnerColorSolid});\n }\n \n ${Input} {\n caret-color: var(${tokens.caretColorSolid}, var(${tokens.caretColor}));\n\n &:not(.${classes.errorAnimation}){\n color: var(${tokens.colorSolid});\n }\n }\n \n ${AdditionalText} {\n color: var(${tokens.additionalTextColorSolid});\n }\n }\n`;\n"],"names":["base"],"mappings":"AAOO,IAAMA,IAAI,GA6FhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bpps6rw .i1s8bsh6{border-radius:var(--plasma-number-input_input-wrapper_border-radius);}.bpps6rw .sj0ab1b{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_radius);}.bpps6rw .sj0ab1b.segmented-view,.bpps6rw .sj0ab1b.solid-view{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_segmentation_radius,var(--plasma-number-input_icon-button_radius));}.bpps6rw .sj0ab1b.action-button-decrement{border-radius:var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius) var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius);}.bpps6rw .sj0ab1b.action-button-increment{border-radius:var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius) var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius);}.bpps6rw.segmented-view .i1s8bsh6{border-radius:var(--plasma-number-input_icon-button_segmentation_radius);}.bpps6rw.solid-view{position:relative;}.bpps6rw.solid-view:before{content:'';position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:calc(100% - var(--plasma-number-input_icon-button_width) * 2);height:100%;background:var(--plasma-number-input_background-color-solid);}.bpps6rw.solid-view .i1s8bsh6{position:relative;color:var(--plasma-number-input_color-solid);}.bpps6rw.solid-view .i1s8bsh6:not(error-animation).manual-input-number-input:focus-within{background-color:var(--plasma-number-input_background-color-solid-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-solid-focus);}.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled:hover,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled:hover,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled:active,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled:active{background-color:transparent;}.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled{opacity:1;}.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled svg,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled:hover svg,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled:hover svg,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-decrement-disabled:active svg,.bpps6rw.solid-view.clear-view .sj0ab1b.action-button-increment-disabled:active svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.bpps6rw.solid-view .s1ft73sv{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color-solid);}.bpps6rw.solid-view .i1tgbhg7{caret-color:var(--plasma-number-input_caret_color-solid,var(--plasma-number-input_caret_color));}.bpps6rw.solid-view .i1tgbhg7:not(.error-animation){color:var(--plasma-number-input_color-solid);}.bpps6rw.solid-view .az36kha{color:var(--plasma-number-input_additional-text_color-solid);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_shape/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../NumberInput.tokens';\nimport { iconButtonTokens } from '../../../IconButton';\nimport { StyledIconButton } from '../../ui/ActionButton/ActionButton.styles';\n\nexport const base = css`\n ${StyledIconButton} {\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n }\n`;\n"],"names":["base"],"mappings":"AAMO,IAAMA,IAAI,GAIhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1l31q8y .sj0ab1b{--plasma-icon-button-radius:var(--plasma-number-input_icon-button_radius);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, privateTokens, tokens } from '../../NumberInput.tokens';\nimport { iconButtonTokens } from '../../../IconButton';\nimport { StyledIconButton } from '../../ui/ActionButton/ActionButton.styles';\nimport {\n AdditionalText,\n DynamicInput,\n Input,\n InputWrapper,\n StyledSpinner,\n TextWrapper,\n} from '../../ui/Input/Input.styles';\nimport { spinnerTokens } from '../../../Spinner';\n\nexport const base = css`\n width: var(${privateTokens.inputWidth});\n min-width: var(${tokens.rootMinWidth});\n\n ${StyledIconButton} {\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonFontFamily}: var(${tokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${tokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${tokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${tokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${tokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${tokens.iconButtonLineHeight});\n }\n\n ${InputWrapper} {\n margin: var(${tokens.inputWrapperMargin});\n }\n\n ${TextWrapper} {\n height: var(${tokens.textWrapperHeight});\n padding: var(${tokens.textWrapperPadding});\n }\n\n ${DynamicInput}, ${Input}, ${AdditionalText} {\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.letterSpacing});\n line-height: var(${tokens.lineHeight});\n }\n\n ${AdditionalText} {\n &.${classes.textBefore} {\n margin-right: var(${tokens.textBeforeMarginRight});\n }\n\n &.${classes.textAfter} {\n margin-left: var(${tokens.textAfterMarginLeft});\n }\n }\n\n ${StyledSpinner} {\n ${spinnerTokens.size}: var(${tokens.loaderSpinnerSize});\n }\n`;\n"],"names":["base"],"mappings":"AAeO,IAAMA,IAAI,GA+ChB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b13wjeky{width:var(--plasma_private-number-input_width);min-width:var(--plasma-number-input_min-width);}.b13wjeky .sj0ab1b{--plasma-icon-button-height:var(--plasma-number-input_icon-button_height);--plasma-icon-button-width:var(--plasma-number-input_icon-button_width);--plasma-icon-button-padding:var(--plasma-number-input_icon-button_padding);--plasma-icon-button-font-family:var(--plasma-number-input_icon-button_font-family);--plasma-icon-button-font-size:var(--plasma-number-input_icon-button_font-size);--plasma-icon-button-font-style:var(--plasma-number-input_icon-button_font-style);--plasma-icon-button-font-weight:var(--plasma-number-input_icon-button_font-weight);--plasma-icon-button-letter-spacing:var(--plasma-number-input_icon-button_letter-spacing);--plasma-icon-button-line-height:var(--plasma-number-input_icon-button_line-height);}.b13wjeky .i1s8bsh6{margin:var(--plasma-number-input_input-wrapper_margin);}.b13wjeky .t6wb9c{height:var(--plasma-number-input_text-wrapper_height);padding:var(--plasma-number-input_text-wrapper_padding);}.b13wjeky .d1n4jo6t,.b13wjeky .i1tgbhg7,.b13wjeky .az36kha{font-family:var(--plasma-number-input_font-family);font-size:var(--plasma-number-input_font-size);font-style:var(--plasma-number-input_font-style);font-weight:var(--plasma-number-input_font-weight);-webkit-letter-spacing:var(--plasma-number-input_letter-spacing);-moz-letter-spacing:var(--plasma-number-input_letter-spacing);-ms-letter-spacing:var(--plasma-number-input_letter-spacing);letter-spacing:var(--plasma-number-input_letter-spacing);line-height:var(--plasma-number-input_line-height);}.b13wjeky .az36kha.text-before{margin-right:var(--plasma-number-input_text-before_margin-right);}.b13wjeky .az36kha.text-after{margin-left:var(--plasma-number-input_text-after_margin-left);}.b13wjeky .s1ft73sv{--plasma-spinner-size:var(--plasma-number-input_loader-spinner_size);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/NumberInput/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../NumberInput.tokens';\nimport { iconButtonTokens } from '../../../IconButton';\nimport { StyledIconButton } from '../../ui/ActionButton/ActionButton.styles';\nimport { AdditionalText, Input, InputWrapper, StyledSpinner } from '../../ui/Input/Input.styles';\nimport { spinnerTokens } from '../../../Spinner';\n\nexport const base = css`\n ${StyledIconButton} {\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n\n &.${classes.actionButtonDecrementDisabled}, &.${classes.actionButtonIncrementDisabled} {\n opacity: var(${tokens.actionButtonDisabledOpacity});\n cursor: not-allowed;\n\n :hover,\n :active {\n scale: none;\n\n color: var(${tokens.iconButtonColor});\n background-color: var(${tokens.iconButtonBackgroundColor});\n }\n }\n }\n\n && ${InputWrapper}{\n &.${classes.manualInput}:focus-within {\n background-color: var(${tokens.backgroundColorFocus});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderColorFocus});\n }\n\n &.${classes.manualInput}.${classes.errorAnimation} {\n background-color: var(${tokens.backgroundErrorColor});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderErrorColor});\n\n animation: shakingError 0.5s forwards;\n\n ${Input} {\n color: var(${tokens.errorColor});\n animation: fadeError 0.5s forwards;\n }\n\n &:focus-within {\n background-color: var(${tokens.backgroundErrorColor});\n box-shadow: inset 0 0 0 var(${tokens.inputWrapperBorderWidth}) var(${tokens.borderErrorColor});\n }\n }\n\n @keyframes shakingError {\n 12.5% {\n transform: translateX(0.188rem);\n }\n 25% {\n transform: translateX(-0.188rem);\n }\n 37.5% {\n transform: translateX(0.188rem);\n }\n 50% {\n transform: translateX(-0.188rem);\n }\n 62.5% {\n transform: translateX(0.188rem);\n }\n 75% {\n transform: translateX(-0.188rem);\n }\n 87.5% {\n transform: translateX(0.188rem);\n }\n 100% {\n transform: translateX(-0.188rem);\n }\n }\n\n @keyframes fadeError {\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n }\n\n ${StyledSpinner} {\n ${spinnerTokens.color}: var(${tokens.loaderSpinnerColor});\n }\n\n ${Input} {\n color: var(${tokens.color});\n caret-color: var(${tokens.caretColor});\n }\n\n ${AdditionalText} {\n color: var(${tokens.additionalTextColor});\n }\n`;\n"],"names":["base"],"mappings":"AAQO,IAAMA,IAAI,GA+FhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bhi37xj .sj0ab1b{--plasma-icon-button-color:var(--plasma-number-input_icon-button_color);--plasma-icon-button-background-color:var(--plasma-number-input_icon-button_background-color);--plasma-icon-button-color-hover:var(--plasma-number-input_icon-button_color-hover);--plasma-icon-button-background-color-hover:var(--plasma-number-input_icon-button_background-color-hover);--plasma-icon-button-color-active:var(--plasma-number-input_icon-button_color-active);--plasma-icon-button-background-color-active:var(--plasma-number-input_icon-button_background-color-active);}.bhi37xj .sj0ab1b.action-button-decrement-disabled,.bhi37xj .sj0ab1b.action-button-increment-disabled{opacity:var(--plasma-number-input_action-button_disabled-opacity);cursor:not-allowed;}.bhi37xj .sj0ab1b.action-button-decrement-disabled:hover,.bhi37xj .sj0ab1b.action-button-increment-disabled:hover,.bhi37xj .sj0ab1b.action-button-decrement-disabled:active,.bhi37xj .sj0ab1b.action-button-increment-disabled:active{scale:none;color:var(--plasma-number-input_icon-button_color);background-color:var(--plasma-number-input_icon-button_background-color);}.bhi37xj.bhi37xj .i1s8bsh6.manual-input-number-input:focus-within{background-color:var(--plasma-number-input_background-color-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-focus);}.bhi37xj.bhi37xj .i1s8bsh6.manual-input-number-input.error-animation{background-color:var(--plasma-number-input_background_error-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border_error-color);-webkit-animation:shakingError-bhi37xj 0.5s forwards;animation:shakingError-bhi37xj 0.5s forwards;}.bhi37xj.bhi37xj .i1s8bsh6.manual-input-number-input.error-animation .i1tgbhg7{color:var(--plasma-number-input_error-color);-webkit-animation:fadeError-bhi37xj 0.5s forwards;animation:fadeError-bhi37xj 0.5s forwards;}.bhi37xj.bhi37xj .i1s8bsh6.manual-input-number-input.error-animation:focus-within{background-color:var(--plasma-number-input_background_error-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border_error-color);}@-webkit-keyframes shakingError-bhi37xj{12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@keyframes shakingError-bhi37xj{12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@-webkit-keyframes fadeError-bhi37xj{50%{opacity:1;}100%{opacity:0;}}@keyframes fadeError-bhi37xj{50%{opacity:1;}100%{opacity:0;}}.bhi37xj .s1ft73sv{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color);}.bhi37xj .i1tgbhg7{color:var(--plasma-number-input_color);caret-color:var(--plasma-number-input_caret_color);}.bhi37xj .az36kha{color:var(--plasma-number-input_additional-text_color);}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { forwardRef, useRef, useState, useCallback, useEffect } from 'react';
|
3
3
|
import { usePopper } from 'react-popper';
|
4
|
-
import { useForkRef } from '@salutejs/plasma-core';
|
4
|
+
import { useForkRef, useFocusTrap } from '@salutejs/plasma-core';
|
5
5
|
import { cx } from '../../utils/index.js';
|
6
6
|
import { base } from './variations/_view/base.js';
|
7
7
|
import { StyledWrapper, StyledRoot, StyledPopover, StyledArrow } from './Popover.styles.js';
|
8
8
|
import { classes } from './Popover.tokens.js';
|
9
|
-
import { useFocusTrap } from '../../hooks/useFocusTrap.js';
|
10
9
|
import { Portal } from '../Portal/Portal.js';
|
11
10
|
|
12
11
|
var _excluded = ["target", "children", "isOpen", "opened", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport { usePopper } from 'react-popper';\nimport { useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { useFocusTrap } from '../../hooks';\nimport { cx } from '../../utils';\nimport { Portal } from '../Portal';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n opened,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n closeOnOverlayClick,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: innerIsOpen ? 'visible' : 'hidden',\n opacity: innerIsOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (innerIsOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, innerIsOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (innerIsOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n const popoverRootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget && !popoverRootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, innerIsOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!innerIsOpen, event);\n }\n }\n },\n [trigger, innerIsOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [innerIsOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, innerIsOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!innerIsOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [innerIsOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children && portalRef.current && (\n <Portal container={portalRef.current}>\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: innerIsOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>\n </Portal>\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","_placement$","target","children","isOpen","opened","_ref$trigger","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","closeOnOverlayClick","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","_popoverRef$current","targetIsRoot","rootHasTarget","contains","popoverRootHasTarget","onClick","_popoverRef$current2","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","Portal","container","_extends","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;AAeO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,UAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IAAAC,WAAA,CAAA;AAAA,IAAA,IArBGC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,MAAM,GAAAL,IAAA,CAANK,MAAM;MACNC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,YAAA,GAAAP,IAAA,CACNQ,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,YAAA;MACjBE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MAAAC,UAAA,GAAAV,IAAA,CACRW,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;MAClBE,SAAS,GAAAZ,IAA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CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyH,aAAa,GAAG;AACzB5D,EAAAA,IAAI,EAAE,SAAS;AACf6D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElI,WAAW;AACnBmI,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvG,IAAAA,IAAI,EAAE;AACFwG,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1G,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\nimport { Portal } from '../Portal';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n opened,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n closeOnOverlayClick,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: innerIsOpen ? 'visible' : 'hidden',\n opacity: innerIsOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (innerIsOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, innerIsOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (innerIsOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n const popoverRootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget && !popoverRootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, innerIsOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!innerIsOpen, event);\n }\n }\n },\n [trigger, innerIsOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [innerIsOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, innerIsOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!innerIsOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [innerIsOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children && portalRef.current && (\n <Portal container={portalRef.current}>\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: innerIsOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>\n </Portal>\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","_placement$","target","children","isOpen","opened","_ref$trigger","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","closeOnOverlayClick","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","_popoverRef$current","targetIsRoot","rootHasTarget","contains","popoverRootHasTarget","onClick","_popoverRef$current2","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","Portal","container","_extends","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,UAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IAAAC,WAAA,CAAA;AAAA,IAAA,IArBGC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,MAAM,GAAAL,IAAA,CAANK,MAAM;MACNC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,YAAA,GAAAP,IAAA,CACNQ,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,YAAA;MACjBE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MAAAC,UAAA,GAAAV,IAAA,CACRW,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;MAClBE,SAAS,GAAAZ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GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyH,aAAa,GAAG;AACzB5D,EAAAA,IAAI,EAAE,SAAS;AACf6D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElI,WAAW;AACnBmI,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvG,IAAAA,IAAI,EAAE;AACFwG,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1G,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
|
package/es/index.css
CHANGED
@@ -804,3 +804,26 @@
|
|
804
804
|
.IconButton_styles_1q2jfs2_shuaj1a__7aea03a6{--plasma-icon-button-color:var(--plasma-attach-icon-button-cancel-color);--plasma-icon-button-background-color:var(--plasma-attach-icon-button-cancel-background-color);--plasma-icon-button-loading-background-color:var(--plasma-attach-icon-button-cancel-loading-background-color);--plasma-icon-button-color-hover:var(--plasma-attach-icon-button-cancel-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-attach-icon-button-cancel-background-color-hover);--plasma-icon-button-color-active:var(--plasma-attach-icon-button-cancel-color-active);--plasma-icon-button-background-color-active:var(--plasma-attach-icon-button-cancel-background-color-active);--plasma-icon-button-scale-hover:var(--plasma-attach-icon-button-cancel-scale-hover);---plasma-icon-button-scale-active:var(---plasma-attach-icon-button-cancel-scale-active);--plasma-icon-button-height:var(--plasma-attach-icon-button-cancel-height);--plasma-icon-button-width:var(--plasma-attach-icon-button-cancel-width);--plasma-icon-button-padding:var(--plasma-attach-icon-button-cancel-padding);--plasma-icon-button-radius:var(--plasma-attach-icon-button-cancel-radius);--plasma-icon-button-radius-circle:var(--plasma-attach-icon-button-cancel-radius-circle);--plasma-icon-button-font-family:var(--plasma-attach-icon-button-cancel-font-family);--plasma-icon-button-font-size:var(--plasma-attach-icon-button-cancel-font-size);--plasma-icon-button-font-style:var(--plasma-attach-icon-button-cancel-font-style);--plasma-icon-button-font-weight:var(--plasma-attach-icon-button-cancel-font-weight);--plasma-icon-button-letter-spacing:var(--plasma-attach-icon-button-cancel-letter-spacing);--plasma-icon-button-line-height:var(--plasma-attach-icon-button-cancel-line-height);--plasma-icon-button-disabled-opacity:var(--plasma-attach-icon-button-cancel-disabled-opacity);--plasma-icon-button-focus-color:var(--plasma-attach-icon-button-cancel-focus-color);--plasma-icon-button-spinner-color:var(--plasma-attach-icon-button-cancel-spinner-color);--plasma-icon-button-spinner-size:var(--plasma-attach-icon-button-cancel-spinner-size);}
|
805
805
|
|
806
806
|
.ViewContainer_yiqfcb_bemjbnt__5b2a6776{position:relative;}
|
807
|
+
|
808
|
+
.Input_styles_fhgb95_i1s8bsh6__3bed5c8f{overflow-x:auto;overflow-y:hidden;-webkit-flex:1;-ms-flex:1;flex:1;cursor:var(--i1s8bsh6-0);-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.Input_styles_fhgb95_i1s8bsh6__3bed5c8f::-webkit-scrollbar{display:none;}
|
809
|
+
.Input_styles_fhgb95_t6wb9c__3bed5c8f{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;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;box-sizing:border-box;}
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
.Input_styles_fhgb95_d1n4jo6t__3bed5c8f{position:relative;}
|
814
|
+
.Input_styles_fhgb95_i1tgbhg7__3bed5c8f{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:var(--i1tgbhg7-0);box-sizing:border-box;cursor:var(--i1tgbhg7-1);pointer-events:var(--i1tgbhg7-2);-webkit-transition:width 0.1s;transition:width 0.1s;}
|
815
|
+
.Input_styles_fhgb95_i1il5xze__3bed5c8f{position:absolute;z-index:-999;visibility:hidden;top:0;left:0;opacity:0;height:0;white-space:pre;}
|
816
|
+
|
817
|
+
.NumberInput_styles_jeawjl_bwds6g__9a871afb{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;}
|
818
|
+
|
819
|
+
.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017{--plasma-icon-button-color:var(--plasma-number-input_icon-button_color);--plasma-icon-button-background-color:var(--plasma-number-input_icon-button_background-color);--plasma-icon-button-color-hover:var(--plasma-number-input_icon-button_color-hover);--plasma-icon-button-background-color-hover:var(--plasma-number-input_icon-button_background-color-hover);--plasma-icon-button-color-active:var(--plasma-number-input_icon-button_color-active);--plasma-icon-button-background-color-active:var(--plasma-number-input_icon-button_background-color-active);}.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonDecrementDisabled__00c46017,.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonIncrementDisabled__00c46017{opacity:var(--plasma-number-input_action-button_disabled-opacity);cursor:not-allowed;}.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonDecrementDisabled__00c46017:hover,.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonIncrementDisabled__00c46017:hover,.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonDecrementDisabled__00c46017:active,.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_sj0ab1b__00c46017.base_3gefjm_actionButtonIncrementDisabled__00c46017:active{scale:none;color:var(--plasma-number-input_icon-button_color);background-color:var(--plasma-number-input_icon-button_background-color);}.base_3gefjm_bhi37xj__00c46017.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_i1s8bsh6__00c46017.base_3gefjm_manualInputNumberInput__00c46017:focus-within{background-color:var(--plasma-number-input_background-color-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-focus);}.base_3gefjm_bhi37xj__00c46017.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_i1s8bsh6__00c46017.base_3gefjm_manualInputNumberInput__00c46017.base_3gefjm_errorAnimation__00c46017{background-color:var(--plasma-number-input_background_error-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border_error-color);-webkit-animation:base_3gefjm_shakingErrorBhi37xj__00c46017 0.5s forwards;animation:base_3gefjm_shakingErrorBhi37xj__00c46017 0.5s forwards;}.base_3gefjm_bhi37xj__00c46017.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_i1s8bsh6__00c46017.base_3gefjm_manualInputNumberInput__00c46017.base_3gefjm_errorAnimation__00c46017 .base_3gefjm_i1tgbhg7__00c46017{color:var(--plasma-number-input_error-color);-webkit-animation:base_3gefjm_fadeErrorBhi37xj__00c46017 0.5s forwards;animation:base_3gefjm_fadeErrorBhi37xj__00c46017 0.5s forwards;}.base_3gefjm_bhi37xj__00c46017.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_i1s8bsh6__00c46017.base_3gefjm_manualInputNumberInput__00c46017.base_3gefjm_errorAnimation__00c46017:focus-within{background-color:var(--plasma-number-input_background_error-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border_error-color);}@-webkit-keyframes base_3gefjm_shakingErrorBhi37xj__00c46017{12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@keyframes base_3gefjm_shakingErrorBhi37xj__00c46017{12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@-webkit-keyframes base_3gefjm_fadeErrorBhi37xj__00c46017{50%{opacity:1;}100%{opacity:0;}}@keyframes base_3gefjm_fadeErrorBhi37xj__00c46017{50%{opacity:1;}100%{opacity:0;}}.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_s1ft73sv__00c46017{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color);}.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_i1tgbhg7__00c46017{color:var(--plasma-number-input_color);caret-color:var(--plasma-number-input_caret_color);}.base_3gefjm_bhi37xj__00c46017 .base_3gefjm_az36kha__00c46017{color:var(--plasma-number-input_additional-text_color);}
|
820
|
+
|
821
|
+
.base_yqdmk4_b13wjeky__9b206d94{width:var(--plasma_private-number-input_width);min-width:var(--plasma-number-input_min-width);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_sj0ab1b__9b206d94{--plasma-icon-button-height:var(--plasma-number-input_icon-button_height);--plasma-icon-button-width:var(--plasma-number-input_icon-button_width);--plasma-icon-button-padding:var(--plasma-number-input_icon-button_padding);--plasma-icon-button-font-family:var(--plasma-number-input_icon-button_font-family);--plasma-icon-button-font-size:var(--plasma-number-input_icon-button_font-size);--plasma-icon-button-font-style:var(--plasma-number-input_icon-button_font-style);--plasma-icon-button-font-weight:var(--plasma-number-input_icon-button_font-weight);--plasma-icon-button-letter-spacing:var(--plasma-number-input_icon-button_letter-spacing);--plasma-icon-button-line-height:var(--plasma-number-input_icon-button_line-height);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_i1s8bsh6__9b206d94{margin:var(--plasma-number-input_input-wrapper_margin);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_t6wb9c__9b206d94{height:var(--plasma-number-input_text-wrapper_height);padding:var(--plasma-number-input_text-wrapper_padding);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_d1n4jo6t__9b206d94,.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_i1tgbhg7__9b206d94,.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_az36kha__9b206d94{font-family:var(--plasma-number-input_font-family);font-size:var(--plasma-number-input_font-size);font-style:var(--plasma-number-input_font-style);font-weight:var(--plasma-number-input_font-weight);-webkit-letter-spacing:var(--plasma-number-input_letter-spacing);-moz-letter-spacing:var(--plasma-number-input_letter-spacing);-ms-letter-spacing:var(--plasma-number-input_letter-spacing);letter-spacing:var(--plasma-number-input_letter-spacing);line-height:var(--plasma-number-input_line-height);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_az36kha__9b206d94.base_yqdmk4_textBefore__9b206d94{margin-right:var(--plasma-number-input_text-before_margin-right);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_az36kha__9b206d94.base_yqdmk4_textAfter__9b206d94{margin-left:var(--plasma-number-input_text-after_margin-left);}.base_yqdmk4_b13wjeky__9b206d94 .base_yqdmk4_s1ft73sv__9b206d94{--plasma-spinner-size:var(--plasma-number-input_loader-spinner_size);}
|
822
|
+
|
823
|
+
.base_k05biw_b1l31q8y__7da7a6d0 .base_k05biw_sj0ab1b__7da7a6d0{--plasma-icon-button-radius:var(--plasma-number-input_icon-button_radius);}
|
824
|
+
|
825
|
+
.base_dx9knv_b15uqx38__1d74109c .base_dx9knv_i1s8bsh6__1d74109c{background-color:var(--plasma-number-input_background-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color);}.base_dx9knv_b15uqx38__1d74109c .base_dx9knv_i1s8bsh6__1d74109c.base_dx9knv_manualInputNumberInput__1d74109c:hover{background-color:var(--plasma-number-input_background-color-hover);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-hover);}
|
826
|
+
|
827
|
+
.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_i1s8bsh6__b0f7c19c{border-radius:var(--plasma-number-input_input-wrapper_border-radius);}.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_radius);}.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_segmentedView__b0f7c19c,.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_segmentation_radius,var(--plasma-number-input_icon-button_radius));}.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrement__b0f7c19c{border-radius:var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius) var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius);}.base_1mg9wqg_bpps6rw__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrement__b0f7c19c{border-radius:var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius) var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_segmentedView__b0f7c19c .base_1mg9wqg_i1s8bsh6__b0f7c19c{border-radius:var(--plasma-number-input_icon-button_segmentation_radius);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c{position:relative;}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c:before{content:'';position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:calc(100% - var(--plasma-number-input_icon-button_width) * 2);height:100%;background:var(--plasma-number-input_background-color-solid);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_i1s8bsh6__b0f7c19c{position:relative;color:var(--plasma-number-input_color-solid);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_i1s8bsh6__b0f7c19c:not(error-animation).base_1mg9wqg_manualInputNumberInput__b0f7c19c:focus-within{background-color:var(--plasma-number-input_background-color-solid-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-solid-focus);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c:hover,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c:hover,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c:active,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c:active{background-color:transparent;}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c{opacity:1;}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c svg,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c:hover svg,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c:hover svg,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonDecrementDisabled__b0f7c19c:active svg,.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c.base_1mg9wqg_clearView__b0f7c19c .base_1mg9wqg_sj0ab1b__b0f7c19c.base_1mg9wqg_actionButtonIncrementDisabled__b0f7c19c:active svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_s1ft73sv__b0f7c19c{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color-solid);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_i1tgbhg7__b0f7c19c{caret-color:var(--plasma-number-input_caret_color-solid,var(--plasma-number-input_caret_color));}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_i1tgbhg7__b0f7c19c:not(.base_1mg9wqg_errorAnimation__b0f7c19c){color:var(--plasma-number-input_color-solid);}.base_1mg9wqg_bpps6rw__b0f7c19c.base_1mg9wqg_solidView__b0f7c19c .base_1mg9wqg_az36kha__b0f7c19c{color:var(--plasma-number-input_additional-text_color-solid);}
|
828
|
+
|
829
|
+
.base_1sl0mh8_bmqk5v5__e93ebd2b.base_1sl0mh8_bmqk5v5__e93ebd2b.base_1sl0mh8_numberInputDisabled__e93ebd2b{pointer-events:none;opacity:var(--plasma-number-input_disabled-opacity);cursor:not-allowed;}
|
package/es/index.js
CHANGED
@@ -203,4 +203,6 @@ export { composeMask } from './components/Mask/Mask.js';
|
|
203
203
|
export { attachConfig, attachRoot } from './components/Attach/Attach.js';
|
204
204
|
export { tokens as attachTokens } from './components/Attach/Attach.tokens.js';
|
205
205
|
export { viewContainerConfig, viewContainerRoot } from './components/ViewContainer/ViewContainer.js';
|
206
|
+
export { numberInputConfig, numberInputRoot } from './components/NumberInput/NumberInput.js';
|
207
|
+
export { classes as numberInputClasses, tokens as numberInputTokens } from './components/NumberInput/NumberInput.tokens.js';
|
206
208
|
//# sourceMappingURL=index.js.map
|
package/es/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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.1511.11555353496.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": "9fb1511eed38fba88270160cae2b65d2a0b27cd6"
|
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,
|