@orioncactuscorp/ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +273 -0
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion.js +320 -0
- package/dist/components/Accordion/Accordion.module.scss.js +31 -0
- package/dist/components/Accordion.d.ts +6 -0
- package/dist/components/Accordion.js +9 -0
- package/dist/components/ActionArea/ActionArea.css +1 -0
- package/dist/components/ActionArea/ActionArea.js +158 -0
- package/dist/components/ActionArea/ActionArea.module.scss.js +9 -0
- package/dist/components/ActionArea.d.ts +6 -0
- package/dist/components/ActionArea.js +6 -0
- package/dist/components/Alert/Alert.css +1 -0
- package/dist/components/Alert/Alert.js +293 -0
- package/dist/components/Alert/Alert.module.scss.js +21 -0
- package/dist/components/Alert.d.ts +6 -0
- package/dist/components/Alert.js +10 -0
- package/dist/components/Background/Background.css +1 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.module.scss.js +21 -0
- package/dist/components/Background.d.ts +6 -0
- package/dist/components/Background.js +4 -0
- package/dist/components/BackgroundIconButton/BackgroundIconButton.css +1 -0
- package/dist/components/BackgroundIconButton/BackgroundIconButton.js +61 -0
- package/dist/components/BackgroundIconButton/BackgroundIconButton.module.scss.js +13 -0
- package/dist/components/BackgroundIconButton.d.ts +6 -0
- package/dist/components/BackgroundIconButton.js +4 -0
- package/dist/components/Badge/Badge.css +1 -0
- package/dist/components/Badge/Badge.js +34 -0
- package/dist/components/Badge/Badge.module.scss.js +17 -0
- package/dist/components/Badge.d.ts +6 -0
- package/dist/components/Badge.js +4 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button.js +151 -0
- package/dist/components/Button/Button.module.scss.js +29 -0
- package/dist/components/Button.d.ts +6 -0
- package/dist/components/Button.js +4 -0
- package/dist/components/Cell/Cell.css +1 -0
- package/dist/components/Cell/Cell.js +129 -0
- package/dist/components/Cell/Cell.module.scss.js +17 -0
- package/dist/components/Cell.d.ts +6 -0
- package/dist/components/Cell.js +5 -0
- package/dist/components/CheckMark/CheckMark.css +1 -0
- package/dist/components/CheckMark/CheckMark.js +44 -0
- package/dist/components/CheckMark/CheckMark.module.scss.js +7 -0
- package/dist/components/CheckMark.d.ts +6 -0
- package/dist/components/CheckMark.js +4 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox.js +82 -0
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -0
- package/dist/components/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox.js +4 -0
- package/dist/components/Divider/Divider.css +1 -0
- package/dist/components/Divider/Divider.js +41 -0
- package/dist/components/Divider/Divider.module.scss.js +17 -0
- package/dist/components/Divider.d.ts +6 -0
- package/dist/components/Divider.js +4 -0
- package/dist/components/Field/Field.css +1 -0
- package/dist/components/Field/Field.js +179 -0
- package/dist/components/Field/Field.module.scss.js +17 -0
- package/dist/components/Field/useFieldControlOverlayMetrics.js +44 -0
- package/dist/components/Field.d.ts +6 -0
- package/dist/components/Field.js +10 -0
- package/dist/components/Fieldset/Fieldset.css +1 -0
- package/dist/components/Fieldset/Fieldset.js +97 -0
- package/dist/components/Fieldset/Fieldset.module.scss.js +11 -0
- package/dist/components/Fieldset.d.ts +6 -0
- package/dist/components/Fieldset.js +8 -0
- package/dist/components/IconButton/IconButton.css +1 -0
- package/dist/components/IconButton/IconButton.js +49 -0
- package/dist/components/IconButton/IconButton.module.scss.js +11 -0
- package/dist/components/IconButton.d.ts +6 -0
- package/dist/components/IconButton.js +4 -0
- package/dist/components/Interaction/Interaction.css +1 -0
- package/dist/components/Interaction/Interaction.js +23 -0
- package/dist/components/Interaction/Interaction.module.scss.js +11 -0
- package/dist/components/Interaction.d.ts +6 -0
- package/dist/components/Interaction.js +4 -0
- package/dist/components/Loading/Loading.css +1 -0
- package/dist/components/Loading/Loading.js +47 -0
- package/dist/components/Loading/Loading.module.scss.js +21 -0
- package/dist/components/Loading.d.ts +6 -0
- package/dist/components/Loading.js +4 -0
- package/dist/components/Menu/Menu.css +1 -0
- package/dist/components/Menu/Menu.js +238 -0
- package/dist/components/Menu/Menu.module.scss.js +31 -0
- package/dist/components/Menu.d.ts +6 -0
- package/dist/components/Menu.js +9 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal.js +628 -0
- package/dist/components/Modal/Modal.module.scss.js +48 -0
- package/dist/components/Modal/contexts.js +14 -0
- package/dist/components/Modal/modalScrollArbitration.js +134 -0
- package/dist/components/Modal/snapPoints.js +79 -0
- package/dist/components/Modal/useControllableState.js +17 -0
- package/dist/components/Modal/useElementSize.js +23 -0
- package/dist/components/Modal/useModalDrag.js +1498 -0
- package/dist/components/Modal/useModalPlacement.js +26 -0
- package/dist/components/Modal/useModalStackDepth.js +41 -0
- package/dist/components/Modal.d.ts +6 -0
- package/dist/components/Modal.js +11 -0
- package/dist/components/Radio/Radio.css +1 -0
- package/dist/components/Radio/Radio.js +68 -0
- package/dist/components/Radio/Radio.module.scss.js +11 -0
- package/dist/components/Radio.d.ts +6 -0
- package/dist/components/Radio.js +4 -0
- package/dist/components/ScrollArea/ScrollArea.css +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +541 -0
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +17 -0
- package/dist/components/ScrollArea/contexts.js +7 -0
- package/dist/components/ScrollArea.d.ts +6 -0
- package/dist/components/ScrollArea.js +8 -0
- package/dist/components/SectionHeader/SectionHeader.css +1 -0
- package/dist/components/SectionHeader/SectionHeader.js +48 -0
- package/dist/components/SectionHeader/SectionHeader.module.scss.js +7 -0
- package/dist/components/SectionHeader.d.ts +6 -0
- package/dist/components/SectionHeader.js +4 -0
- package/dist/components/Select/Select.css +1 -0
- package/dist/components/Select/Select.js +67 -0
- package/dist/components/Select/Select.module.scss.js +9 -0
- package/dist/components/Select/SelectContent.css +1 -0
- package/dist/components/Select/SelectContent.js +26 -0
- package/dist/components/Select/SelectContent.module.scss.js +15 -0
- package/dist/components/Select.d.ts +6 -0
- package/dist/components/Select.js +6 -0
- package/dist/components/SvgIcon.d.ts +6 -0
- package/dist/components/SvgIcon.js +4 -0
- package/dist/components/Switch/Switch.css +1 -0
- package/dist/components/Switch/Switch.js +46 -0
- package/dist/components/Switch/Switch.module.scss.js +8 -0
- package/dist/components/Switch.d.ts +6 -0
- package/dist/components/Switch.js +4 -0
- package/dist/components/TextArea/TextArea.css +1 -0
- package/dist/components/TextArea/TextArea.js +105 -0
- package/dist/components/TextArea/TextArea.module.scss.js +9 -0
- package/dist/components/TextArea/TextAreaContent.css +1 -0
- package/dist/components/TextArea/TextAreaContent.js +26 -0
- package/dist/components/TextArea/TextAreaContent.module.scss.js +15 -0
- package/dist/components/TextArea.d.ts +6 -0
- package/dist/components/TextArea.js +6 -0
- package/dist/components/TextButton/TextButton.css +1 -0
- package/dist/components/TextButton/TextButton.js +74 -0
- package/dist/components/TextButton/TextButton.module.scss.js +15 -0
- package/dist/components/TextButton.d.ts +6 -0
- package/dist/components/TextButton.js +4 -0
- package/dist/components/TextInput/TextInput.css +1 -0
- package/dist/components/TextInput/TextInput.js +69 -0
- package/dist/components/TextInput/TextInput.module.scss.js +9 -0
- package/dist/components/TextInput/TextInputContent.css +1 -0
- package/dist/components/TextInput/TextInputContent.js +26 -0
- package/dist/components/TextInput/TextInputContent.module.scss.js +15 -0
- package/dist/components/TextInput.d.ts +6 -0
- package/dist/components/TextInput.js +6 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip.js +123 -0
- package/dist/components/Tooltip/Tooltip.module.scss.js +9 -0
- package/dist/components/Tooltip.d.ts +6 -0
- package/dist/components/Tooltip.js +8 -0
- package/dist/components/internal/slot.js +10 -0
- package/dist/foundations/atomic.css +1 -0
- package/dist/foundations/breakpoint.css +1 -0
- package/dist/foundations/color.global.css +1 -0
- package/dist/foundations/color.theme.dark.css +1 -0
- package/dist/foundations/color.theme.light.css +1 -0
- package/dist/foundations/motion.css +1 -0
- package/dist/foundations/reset.css +1 -0
- package/dist/foundations/space.css +1 -0
- package/dist/foundations/typo.css +1 -0
- package/dist/foundations/zindex.css +1 -0
- package/dist/foundations.css +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +102 -0
- package/dist/react/motion.d.ts +6 -0
- package/dist/react/motion.js +176 -0
- package/dist/react/spring.d.ts +2 -0
- package/dist/react/spring.js +87 -0
- package/dist/reset.css +2 -0
- package/dist/styles.css +41 -0
- package/dist/ui/src/components/Accordion/Accordion.d.ts +9 -0
- package/dist/ui/src/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/ui/src/components/Accordion/index.d.ts +3 -0
- package/dist/ui/src/components/Accordion/index.d.ts.map +1 -0
- package/dist/ui/src/components/Accordion/types.d.ts +39 -0
- package/dist/ui/src/components/Accordion/types.d.ts.map +1 -0
- package/dist/ui/src/components/ActionArea/ActionArea.d.ts +8 -0
- package/dist/ui/src/components/ActionArea/ActionArea.d.ts.map +1 -0
- package/dist/ui/src/components/ActionArea/index.d.ts +3 -0
- package/dist/ui/src/components/ActionArea/index.d.ts.map +1 -0
- package/dist/ui/src/components/ActionArea/types.d.ts +34 -0
- package/dist/ui/src/components/ActionArea/types.d.ts.map +1 -0
- package/dist/ui/src/components/Alert/Alert.d.ts +17 -0
- package/dist/ui/src/components/Alert/Alert.d.ts.map +1 -0
- package/dist/ui/src/components/Alert/index.d.ts +3 -0
- package/dist/ui/src/components/Alert/index.d.ts.map +1 -0
- package/dist/ui/src/components/Alert/types.d.ts +43 -0
- package/dist/ui/src/components/Alert/types.d.ts.map +1 -0
- package/dist/ui/src/components/Background/Background.d.ts +4 -0
- package/dist/ui/src/components/Background/Background.d.ts.map +1 -0
- package/dist/ui/src/components/Background/index.d.ts +3 -0
- package/dist/ui/src/components/Background/index.d.ts.map +1 -0
- package/dist/ui/src/components/Background/types.d.ts +17 -0
- package/dist/ui/src/components/Background/types.d.ts.map +1 -0
- package/dist/ui/src/components/BackgroundIconButton/BackgroundIconButton.d.ts +4 -0
- package/dist/ui/src/components/BackgroundIconButton/BackgroundIconButton.d.ts.map +1 -0
- package/dist/ui/src/components/BackgroundIconButton/index.d.ts +3 -0
- package/dist/ui/src/components/BackgroundIconButton/index.d.ts.map +1 -0
- package/dist/ui/src/components/BackgroundIconButton/types.d.ts +16 -0
- package/dist/ui/src/components/BackgroundIconButton/types.d.ts.map +1 -0
- package/dist/ui/src/components/Badge/Badge.d.ts +4 -0
- package/dist/ui/src/components/Badge/Badge.d.ts.map +1 -0
- package/dist/ui/src/components/Badge/index.d.ts +3 -0
- package/dist/ui/src/components/Badge/index.d.ts.map +1 -0
- package/dist/ui/src/components/Badge/types.d.ts +9 -0
- package/dist/ui/src/components/Badge/types.d.ts.map +1 -0
- package/dist/ui/src/components/Button/Button.d.ts +4 -0
- package/dist/ui/src/components/Button/Button.d.ts.map +1 -0
- package/dist/ui/src/components/Button/index.d.ts +3 -0
- package/dist/ui/src/components/Button/index.d.ts.map +1 -0
- package/dist/ui/src/components/Button/types.d.ts +30 -0
- package/dist/ui/src/components/Button/types.d.ts.map +1 -0
- package/dist/ui/src/components/Cell/Cell.d.ts +5 -0
- package/dist/ui/src/components/Cell/Cell.d.ts.map +1 -0
- package/dist/ui/src/components/Cell/index.d.ts +3 -0
- package/dist/ui/src/components/Cell/index.d.ts.map +1 -0
- package/dist/ui/src/components/Cell/types.d.ts +23 -0
- package/dist/ui/src/components/Cell/types.d.ts.map +1 -0
- package/dist/ui/src/components/CheckMark/CheckMark.d.ts +4 -0
- package/dist/ui/src/components/CheckMark/CheckMark.d.ts.map +1 -0
- package/dist/ui/src/components/CheckMark/index.d.ts +3 -0
- package/dist/ui/src/components/CheckMark/index.d.ts.map +1 -0
- package/dist/ui/src/components/CheckMark/types.d.ts +6 -0
- package/dist/ui/src/components/CheckMark/types.d.ts.map +1 -0
- package/dist/ui/src/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/ui/src/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/ui/src/components/Checkbox/index.d.ts +3 -0
- package/dist/ui/src/components/Checkbox/index.d.ts.map +1 -0
- package/dist/ui/src/components/Checkbox/types.d.ts +11 -0
- package/dist/ui/src/components/Checkbox/types.d.ts.map +1 -0
- package/dist/ui/src/components/Divider/Divider.d.ts +4 -0
- package/dist/ui/src/components/Divider/Divider.d.ts.map +1 -0
- package/dist/ui/src/components/Divider/index.d.ts +3 -0
- package/dist/ui/src/components/Divider/index.d.ts.map +1 -0
- package/dist/ui/src/components/Divider/types.d.ts +10 -0
- package/dist/ui/src/components/Divider/types.d.ts.map +1 -0
- package/dist/ui/src/components/Field/Field.d.ts +9 -0
- package/dist/ui/src/components/Field/Field.d.ts.map +1 -0
- package/dist/ui/src/components/Field/index.d.ts +3 -0
- package/dist/ui/src/components/Field/index.d.ts.map +1 -0
- package/dist/ui/src/components/Field/types.d.ts +30 -0
- package/dist/ui/src/components/Field/types.d.ts.map +1 -0
- package/dist/ui/src/components/Field/useFieldControlOverlayMetrics.d.ts +14 -0
- package/dist/ui/src/components/Field/useFieldControlOverlayMetrics.d.ts.map +1 -0
- package/dist/ui/src/components/Fieldset/Fieldset.d.ts +9 -0
- package/dist/ui/src/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/ui/src/components/Fieldset/index.d.ts +3 -0
- package/dist/ui/src/components/Fieldset/index.d.ts.map +1 -0
- package/dist/ui/src/components/Fieldset/types.d.ts +7 -0
- package/dist/ui/src/components/Fieldset/types.d.ts.map +1 -0
- package/dist/ui/src/components/IconButton/IconButton.d.ts +4 -0
- package/dist/ui/src/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/ui/src/components/IconButton/index.d.ts +3 -0
- package/dist/ui/src/components/IconButton/index.d.ts.map +1 -0
- package/dist/ui/src/components/IconButton/types.d.ts +16 -0
- package/dist/ui/src/components/IconButton/types.d.ts.map +1 -0
- package/dist/ui/src/components/Interaction/Interaction.d.ts +4 -0
- package/dist/ui/src/components/Interaction/Interaction.d.ts.map +1 -0
- package/dist/ui/src/components/Interaction/index.d.ts +3 -0
- package/dist/ui/src/components/Interaction/index.d.ts.map +1 -0
- package/dist/ui/src/components/Interaction/types.d.ts +6 -0
- package/dist/ui/src/components/Interaction/types.d.ts.map +1 -0
- package/dist/ui/src/components/Loading/Loading.d.ts +4 -0
- package/dist/ui/src/components/Loading/Loading.d.ts.map +1 -0
- package/dist/ui/src/components/Loading/index.d.ts +3 -0
- package/dist/ui/src/components/Loading/index.d.ts.map +1 -0
- package/dist/ui/src/components/Loading/types.d.ts +8 -0
- package/dist/ui/src/components/Loading/types.d.ts.map +1 -0
- package/dist/ui/src/components/Menu/Menu.d.ts +12 -0
- package/dist/ui/src/components/Menu/Menu.d.ts.map +1 -0
- package/dist/ui/src/components/Menu/index.d.ts +3 -0
- package/dist/ui/src/components/Menu/index.d.ts.map +1 -0
- package/dist/ui/src/components/Menu/types.d.ts +52 -0
- package/dist/ui/src/components/Menu/types.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/Modal.d.ts +19 -0
- package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/contexts.d.ts +33 -0
- package/dist/ui/src/components/Modal/contexts.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/index.d.ts +3 -0
- package/dist/ui/src/components/Modal/index.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts +33 -0
- package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/snapPoints.d.ts +38 -0
- package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/types.d.ts +117 -0
- package/dist/ui/src/components/Modal/types.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useControllableState.d.ts +6 -0
- package/dist/ui/src/components/Modal/useControllableState.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useElementSize.d.ts +6 -0
- package/dist/ui/src/components/Modal/useElementSize.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useModalDrag.d.ts +37 -0
- package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useModalPlacement.d.ts +3 -0
- package/dist/ui/src/components/Modal/useModalPlacement.d.ts.map +1 -0
- package/dist/ui/src/components/Modal/useModalStackDepth.d.ts +2 -0
- package/dist/ui/src/components/Modal/useModalStackDepth.d.ts.map +1 -0
- package/dist/ui/src/components/Radio/Radio.d.ts +4 -0
- package/dist/ui/src/components/Radio/Radio.d.ts.map +1 -0
- package/dist/ui/src/components/Radio/index.d.ts +3 -0
- package/dist/ui/src/components/Radio/index.d.ts.map +1 -0
- package/dist/ui/src/components/Radio/types.d.ts +10 -0
- package/dist/ui/src/components/Radio/types.d.ts.map +1 -0
- package/dist/ui/src/components/ScrollArea/ScrollArea.d.ts +6 -0
- package/dist/ui/src/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/ui/src/components/ScrollArea/contexts.d.ts +3 -0
- package/dist/ui/src/components/ScrollArea/contexts.d.ts.map +1 -0
- package/dist/ui/src/components/ScrollArea/index.d.ts +4 -0
- package/dist/ui/src/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/ui/src/components/ScrollArea/types.d.ts +21 -0
- package/dist/ui/src/components/ScrollArea/types.d.ts.map +1 -0
- package/dist/ui/src/components/SectionHeader/SectionHeader.d.ts +4 -0
- package/dist/ui/src/components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/ui/src/components/SectionHeader/index.d.ts +3 -0
- package/dist/ui/src/components/SectionHeader/index.d.ts.map +1 -0
- package/dist/ui/src/components/SectionHeader/types.d.ts +13 -0
- package/dist/ui/src/components/SectionHeader/types.d.ts.map +1 -0
- package/dist/ui/src/components/Select/Select.d.ts +4 -0
- package/dist/ui/src/components/Select/Select.d.ts.map +1 -0
- package/dist/ui/src/components/Select/SelectContent.d.ts +4 -0
- package/dist/ui/src/components/Select/SelectContent.d.ts.map +1 -0
- package/dist/ui/src/components/Select/index.d.ts +4 -0
- package/dist/ui/src/components/Select/index.d.ts.map +1 -0
- package/dist/ui/src/components/Select/types.d.ts +12 -0
- package/dist/ui/src/components/Select/types.d.ts.map +1 -0
- package/dist/ui/src/components/SvgIcon/SvgIcon.d.ts +2 -0
- package/dist/ui/src/components/SvgIcon/SvgIcon.d.ts.map +1 -0
- package/dist/ui/src/components/SvgIcon/index.d.ts +3 -0
- package/dist/ui/src/components/SvgIcon/index.d.ts.map +1 -0
- package/dist/ui/src/components/SvgIcon/types.d.ts +2 -0
- package/dist/ui/src/components/SvgIcon/types.d.ts.map +1 -0
- package/dist/ui/src/components/Switch/Switch.d.ts +4 -0
- package/dist/ui/src/components/Switch/Switch.d.ts.map +1 -0
- package/dist/ui/src/components/Switch/index.d.ts +3 -0
- package/dist/ui/src/components/Switch/index.d.ts.map +1 -0
- package/dist/ui/src/components/Switch/types.d.ts +8 -0
- package/dist/ui/src/components/Switch/types.d.ts.map +1 -0
- package/dist/ui/src/components/TextArea/TextArea.d.ts +4 -0
- package/dist/ui/src/components/TextArea/TextArea.d.ts.map +1 -0
- package/dist/ui/src/components/TextArea/TextAreaContent.d.ts +4 -0
- package/dist/ui/src/components/TextArea/TextAreaContent.d.ts.map +1 -0
- package/dist/ui/src/components/TextArea/index.d.ts +4 -0
- package/dist/ui/src/components/TextArea/index.d.ts.map +1 -0
- package/dist/ui/src/components/TextArea/types.d.ts +15 -0
- package/dist/ui/src/components/TextArea/types.d.ts.map +1 -0
- package/dist/ui/src/components/TextButton/TextButton.d.ts +4 -0
- package/dist/ui/src/components/TextButton/TextButton.d.ts.map +1 -0
- package/dist/ui/src/components/TextButton/index.d.ts +3 -0
- package/dist/ui/src/components/TextButton/index.d.ts.map +1 -0
- package/dist/ui/src/components/TextButton/types.d.ts +25 -0
- package/dist/ui/src/components/TextButton/types.d.ts.map +1 -0
- package/dist/ui/src/components/TextInput/TextInput.d.ts +4 -0
- package/dist/ui/src/components/TextInput/TextInput.d.ts.map +1 -0
- package/dist/ui/src/components/TextInput/TextInputContent.d.ts +4 -0
- package/dist/ui/src/components/TextInput/TextInputContent.d.ts.map +1 -0
- package/dist/ui/src/components/TextInput/index.d.ts +4 -0
- package/dist/ui/src/components/TextInput/index.d.ts.map +1 -0
- package/dist/ui/src/components/TextInput/types.d.ts +12 -0
- package/dist/ui/src/components/TextInput/types.d.ts.map +1 -0
- package/dist/ui/src/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/ui/src/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/ui/src/components/Tooltip/index.d.ts +3 -0
- package/dist/ui/src/components/Tooltip/index.d.ts.map +1 -0
- package/dist/ui/src/components/Tooltip/types.d.ts +21 -0
- package/dist/ui/src/components/Tooltip/types.d.ts.map +1 -0
- package/dist/ui/src/components/internal/slot.d.ts +3 -0
- package/dist/ui/src/components/internal/slot.d.ts.map +1 -0
- package/dist/ui/src/components/types.d.ts +2 -0
- package/dist/ui/src/components/types.d.ts.map +1 -0
- package/dist/ui/src/index.d.ts +59 -0
- package/dist/ui/src/index.d.ts.map +1 -0
- package/dist/ui/src/react/motion/index.d.ts +27 -0
- package/dist/ui/src/react/motion/index.d.ts.map +1 -0
- package/dist/ui/src/react/spring/index.d.ts +33 -0
- package/dist/ui/src/react/spring/index.d.ts.map +1 -0
- package/dist/ui/src/utils/breakpoints.d.ts +6 -0
- package/dist/ui/src/utils/breakpoints.d.ts.map +1 -0
- package/dist/ui/src/utils/css.d.ts +3 -0
- package/dist/ui/src/utils/css.d.ts.map +1 -0
- package/dist/ui/src/utils/motion.d.ts +80 -0
- package/dist/ui/src/utils/motion.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/animator.d.ts +3 -0
- package/dist/ui/src/utils/spring/animator.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/constants.d.ts +13 -0
- package/dist/ui/src/utils/spring/constants.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/format.d.ts +5 -0
- package/dist/ui/src/utils/spring/format.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/model.d.ts +18 -0
- package/dist/ui/src/utils/spring/model.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/solver.d.ts +6 -0
- package/dist/ui/src/utils/spring/solver.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/static.d.ts +5 -0
- package/dist/ui/src/utils/spring/static.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/types.d.ts +141 -0
- package/dist/ui/src/utils/spring/types.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/validation.d.ts +5 -0
- package/dist/ui/src/utils/spring/validation.d.ts.map +1 -0
- package/dist/ui/src/utils/spring/value.d.ts +5 -0
- package/dist/ui/src/utils/spring/value.d.ts.map +1 -0
- package/dist/ui/src/utils/spring.d.ts +12 -0
- package/dist/ui/src/utils/spring.d.ts.map +1 -0
- package/dist/utils/breakpoints.d.ts +2 -0
- package/dist/utils/breakpoints.js +26 -0
- package/dist/utils/css.js +7 -0
- package/dist/utils/motion.d.ts +2 -0
- package/dist/utils/motion.js +343 -0
- package/dist/utils/spring/animator.js +179 -0
- package/dist/utils/spring/constants.js +15 -0
- package/dist/utils/spring/format.js +10 -0
- package/dist/utils/spring/model.js +120 -0
- package/dist/utils/spring/solver.js +78 -0
- package/dist/utils/spring/static.js +76 -0
- package/dist/utils/spring/validation.js +19 -0
- package/dist/utils/spring/value.js +65 -0
- package/dist/utils/spring.d.ts +2 -0
- package/dist/utils/spring.js +14 -0
- package/dist/vscode/oc-ui-vars.css +468 -0
- package/package.json +128 -0
- package/src/scss/foundations/_color.config.scss +14 -0
- package/src/scss/foundations/_responsive.config.scss +6 -0
- package/src/scss/foundations/atomic.scss +24 -0
- package/src/scss/foundations/breakpoint.scss +3 -0
- package/src/scss/foundations/color-theme.test.ts +99 -0
- package/src/scss/foundations/color.global.scss +210 -0
- package/src/scss/foundations/color.theme.dark.scss +80 -0
- package/src/scss/foundations/color.theme.light.scss +72 -0
- package/src/scss/foundations/motion.scss +46 -0
- package/src/scss/foundations/reset.scss +129 -0
- package/src/scss/foundations/responsive.test.ts +294 -0
- package/src/scss/foundations/space.scss +206 -0
- package/src/scss/foundations/typo.scss +381 -0
- package/src/scss/foundations/zindex.scss +12 -0
- package/src/scss/index.scss +18 -0
- package/src/scss/mixins/_breakpoint.scss +115 -0
- package/src/scss/mixins/_color.scss +29 -0
- package/src/scss/mixins/_color.test.ts +35 -0
- package/src/scss/mixins/_element.scss +52 -0
- package/src/scss/mixins/_element.test.ts +44 -0
- package/src/scss/mixins/_motion.scss +450 -0
- package/src/scss/mixins/_motion.test.ts +336 -0
- package/src/scss/mixins/_responsive.scss +366 -0
- package/src/scss/mixins/_spring.scss +396 -0
- package/src/scss/mixins/_spring.test.ts +128 -0
- package/src/scss/mixins/_typo.scss +67 -0
- package/src/scss/mixins/_typo.test.ts +28 -0
- package/src/scss/mixins/_utils.scss +26 -0
- package/src/scss/spring.scss +1 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
@use 'sass:meta';
|
|
5
|
+
@use './spring' as *;
|
|
6
|
+
|
|
7
|
+
// CSS-token tables keep non-spring transitions and reduced-motion output themeable.
|
|
8
|
+
$oc-motion-token-duration-by-intent: (
|
|
9
|
+
feedback: var(--oc-motion-duration-feedback),
|
|
10
|
+
reject: var(--oc-motion-duration-reject),
|
|
11
|
+
reveal: var(--oc-motion-duration-reveal),
|
|
12
|
+
move: var(--oc-motion-duration-move),
|
|
13
|
+
gesture: var(--oc-motion-duration-gesture),
|
|
14
|
+
ambient: var(--oc-motion-duration-ambient),
|
|
15
|
+
) !default;
|
|
16
|
+
|
|
17
|
+
$oc-motion-token-timing-by-intent: (
|
|
18
|
+
feedback: var(--oc-motion-timing-feedback),
|
|
19
|
+
reject: var(--oc-motion-timing-reject),
|
|
20
|
+
reveal: var(--oc-motion-timing-reveal),
|
|
21
|
+
move: var(--oc-motion-timing-move),
|
|
22
|
+
gesture: var(--oc-motion-timing-gesture),
|
|
23
|
+
ambient: var(--oc-motion-timing-ambient),
|
|
24
|
+
) !default;
|
|
25
|
+
|
|
26
|
+
$oc-motion-token-duration-by-phase: (
|
|
27
|
+
reveal: (
|
|
28
|
+
exit: var(--oc-motion-duration-reveal-exit),
|
|
29
|
+
),
|
|
30
|
+
gesture: (
|
|
31
|
+
settle: var(--oc-motion-duration-gesture-settle),
|
|
32
|
+
),
|
|
33
|
+
) !default;
|
|
34
|
+
|
|
35
|
+
$oc-motion-token-timing-by-phase: (
|
|
36
|
+
reveal: (
|
|
37
|
+
exit: var(--oc-motion-timing-reveal-exit),
|
|
38
|
+
),
|
|
39
|
+
gesture: (
|
|
40
|
+
settle: var(--oc-motion-timing-gesture-settle),
|
|
41
|
+
),
|
|
42
|
+
) !default;
|
|
43
|
+
|
|
44
|
+
$oc-motion-token-pace-scale: (
|
|
45
|
+
quick: var(--oc-motion-pace-quick),
|
|
46
|
+
normal: var(--oc-motion-pace-normal),
|
|
47
|
+
slow: var(--oc-motion-pace-slow),
|
|
48
|
+
) !default;
|
|
49
|
+
|
|
50
|
+
$oc-motion-token-scale-by-intent: (
|
|
51
|
+
feedback: var(--oc-motion-scale-feedback),
|
|
52
|
+
reject: var(--oc-motion-scale-feedback),
|
|
53
|
+
reveal: var(--oc-motion-scale-reveal),
|
|
54
|
+
move: var(--oc-motion-scale-reveal),
|
|
55
|
+
gesture: var(--oc-motion-scale-feedback),
|
|
56
|
+
ambient: var(--oc-motion-scale-feedback),
|
|
57
|
+
) !default;
|
|
58
|
+
|
|
59
|
+
$oc-motion-token-distance-by-intent: (
|
|
60
|
+
feedback: var(--oc-motion-distance-scale-reject),
|
|
61
|
+
reject: var(--oc-motion-distance-scale-reject),
|
|
62
|
+
reveal: var(--oc-motion-distance-scale-reveal),
|
|
63
|
+
move: var(--oc-motion-distance-scale-reveal),
|
|
64
|
+
gesture: var(--oc-motion-distance-scale-reject),
|
|
65
|
+
ambient: var(--oc-motion-distance-scale-reveal),
|
|
66
|
+
) !default;
|
|
67
|
+
|
|
68
|
+
// Spring profiles need compile-time Sass values because oc-spring() samples timing curves.
|
|
69
|
+
$oc-motion-spring-duration-by-intent: (
|
|
70
|
+
feedback: 0.2s,
|
|
71
|
+
reject: 0.32s,
|
|
72
|
+
reveal: 0.3s,
|
|
73
|
+
move: 0.3s,
|
|
74
|
+
gesture: 0.2s,
|
|
75
|
+
ambient: 1.2s,
|
|
76
|
+
) !default;
|
|
77
|
+
|
|
78
|
+
$oc-motion-spring-duration-by-phase: (
|
|
79
|
+
reveal: (
|
|
80
|
+
exit: 0.125s,
|
|
81
|
+
),
|
|
82
|
+
) !default;
|
|
83
|
+
|
|
84
|
+
$oc-motion-phases: (change, enter, exit, settle, loop) !default;
|
|
85
|
+
$oc-motion-reduced-policies: (auto, preserve, fade, static, feedback) !default;
|
|
86
|
+
|
|
87
|
+
// Intent-level spring profiles preserve component motion quality without raw oc-spring() calls in components.
|
|
88
|
+
$oc-motion-spring-by-intent: (
|
|
89
|
+
feedback: (
|
|
90
|
+
phases: (
|
|
91
|
+
settle,
|
|
92
|
+
),
|
|
93
|
+
preset: snappy,
|
|
94
|
+
extra-bounce: 0,
|
|
95
|
+
),
|
|
96
|
+
reject: (
|
|
97
|
+
phases: (
|
|
98
|
+
change,
|
|
99
|
+
enter,
|
|
100
|
+
),
|
|
101
|
+
preset: smooth,
|
|
102
|
+
extra-bounce: 0,
|
|
103
|
+
),
|
|
104
|
+
reveal: (
|
|
105
|
+
preset: smooth,
|
|
106
|
+
extra-bounce: 0,
|
|
107
|
+
phases: (
|
|
108
|
+
change: (
|
|
109
|
+
preset: snappy,
|
|
110
|
+
property-preset: (
|
|
111
|
+
opacity: smooth,
|
|
112
|
+
transform: snappy,
|
|
113
|
+
),
|
|
114
|
+
property-extra-bounce: (
|
|
115
|
+
transform: 0.1,
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
enter: (
|
|
119
|
+
preset: snappy,
|
|
120
|
+
property-preset: (
|
|
121
|
+
opacity: smooth,
|
|
122
|
+
transform: snappy,
|
|
123
|
+
),
|
|
124
|
+
property-extra-bounce: (
|
|
125
|
+
transform: 0.1,
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
),
|
|
129
|
+
),
|
|
130
|
+
move: (
|
|
131
|
+
preset: smooth,
|
|
132
|
+
extra-bounce: 0,
|
|
133
|
+
),
|
|
134
|
+
ambient: (
|
|
135
|
+
phases: (
|
|
136
|
+
loop,
|
|
137
|
+
),
|
|
138
|
+
preset: smooth,
|
|
139
|
+
extra-bounce: 0,
|
|
140
|
+
),
|
|
141
|
+
) !default;
|
|
142
|
+
|
|
143
|
+
$oc-motion-reduced-policy-by-intent: (
|
|
144
|
+
feedback: feedback,
|
|
145
|
+
reject: feedback,
|
|
146
|
+
reveal: fade,
|
|
147
|
+
move: static,
|
|
148
|
+
gesture: feedback,
|
|
149
|
+
ambient: static,
|
|
150
|
+
) !default;
|
|
151
|
+
|
|
152
|
+
$oc-motion-feedback-properties: (opacity, color, background-color, border-color, box-shadow, outline-color, fill, stroke) !default;
|
|
153
|
+
|
|
154
|
+
@function _oc-motion-require-intent($intent) {
|
|
155
|
+
@if not map.has-key($oc-motion-token-duration-by-intent, $intent) {
|
|
156
|
+
@error 'Unknown oc-motion intent: #{$intent}.';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@return $intent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@function _oc-motion-require-duration-scale($duration-scale) {
|
|
163
|
+
@if meta.type-of($duration-scale) != 'number' or not math.is-unitless($duration-scale) {
|
|
164
|
+
@error 'oc-motion $duration-scale must be a unitless number.';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@if $duration-scale < 0 {
|
|
168
|
+
@error 'oc-motion $duration-scale must be greater than or equal to 0.';
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@return $duration-scale;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@function _oc-motion-require-phase($phase) {
|
|
175
|
+
@if list.index($oc-motion-phases, $phase) == null {
|
|
176
|
+
@error 'Unknown oc-motion phase: #{$phase}. Use change, enter, exit, settle, or loop.';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@return $phase;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@function _oc-motion-require-reduced-policy($reduced) {
|
|
183
|
+
@if list.index($oc-motion-reduced-policies, $reduced) == null {
|
|
184
|
+
@error 'Unknown oc-motion reduced policy: #{$reduced}. Use auto, preserve, fade, static, or feedback.';
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@return $reduced;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@function _oc-motion-token-pace-scale($pace) {
|
|
191
|
+
@if not map.has-key($oc-motion-token-pace-scale, $pace) {
|
|
192
|
+
@error 'Unknown oc-motion pace: #{$pace}. Use quick, normal, or slow.';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@return map.get($oc-motion-token-pace-scale, $pace);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@function _oc-motion-require-scale-value($scale) {
|
|
199
|
+
@if meta.type-of($scale) != 'number' {
|
|
200
|
+
@return $scale;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@if not math.is-unitless($scale) {
|
|
204
|
+
@error 'oc-motion-scale $scale must be a unitless number.';
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@if $scale < 0 {
|
|
208
|
+
@error 'oc-motion-scale $scale must be greater than or equal to 0.';
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@return $scale;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@function _oc-motion-phase-value($table, $intent, $phase, $fallback) {
|
|
215
|
+
@if map.has-key($table, $intent) {
|
|
216
|
+
$phase-table: map.get($table, $intent);
|
|
217
|
+
|
|
218
|
+
@if map.has-key($phase-table, $phase) {
|
|
219
|
+
@return map.get($phase-table, $phase);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@return $fallback;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@function _oc-motion-properties($properties) {
|
|
227
|
+
@if meta.type-of($properties) == 'list' {
|
|
228
|
+
@if list.length($properties) == 0 {
|
|
229
|
+
@error 'oc-motion $properties must not be empty.';
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@return $properties;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@return ($properties);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@function _oc-motion-has-property($properties, $property) {
|
|
239
|
+
@return list.index(_oc-motion-properties($properties), $property) != null;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@function _oc-motion-feedback-property-list($properties) {
|
|
243
|
+
$reduced-properties: ();
|
|
244
|
+
|
|
245
|
+
@each $property in _oc-motion-properties($properties) {
|
|
246
|
+
@if list.index($oc-motion-feedback-properties, $property) != null {
|
|
247
|
+
$reduced-properties: list.append($reduced-properties, $property, $separator: comma);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@return $reduced-properties;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@function _oc-motion-transition-item($property, $duration, $timing) {
|
|
255
|
+
@return #{$property} #{$duration} #{$timing};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@function _oc-motion-spring-duration-value($intent, $phase) {
|
|
259
|
+
$base-duration: map.get($oc-motion-spring-duration-by-intent, $intent);
|
|
260
|
+
|
|
261
|
+
@return _oc-motion-phase-value($oc-motion-spring-duration-by-phase, $intent, $phase, $base-duration);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@function _oc-motion-spring-config($intent, $phase) {
|
|
265
|
+
@if not map.has-key($oc-motion-spring-by-intent, $intent) {
|
|
266
|
+
@return null;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
$config: map.get($oc-motion-spring-by-intent, $intent);
|
|
270
|
+
$phases: map.get($config, phases);
|
|
271
|
+
|
|
272
|
+
@if $phases == null {
|
|
273
|
+
@return $config;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@if meta.type-of($phases) == 'map' {
|
|
277
|
+
@if map.has-key($phases, $phase) {
|
|
278
|
+
@return map.merge($config, map.get($phases, $phase));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@return $config;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@if list.index($phases, $phase) != null {
|
|
285
|
+
@return $config;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@return null;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@function _oc-motion-spring-extra-bounce($config, $property) {
|
|
292
|
+
$property-extra-bounce: map.get($config, property-extra-bounce);
|
|
293
|
+
|
|
294
|
+
@if $property-extra-bounce != null and map.has-key($property-extra-bounce, $property) {
|
|
295
|
+
@return map.get($property-extra-bounce, $property);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@return map.get($config, extra-bounce);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@function _oc-motion-spring-preset($config, $property) {
|
|
302
|
+
$property-preset: map.get($config, property-preset);
|
|
303
|
+
|
|
304
|
+
@if $property-preset != null and map.has-key($property-preset, $property) {
|
|
305
|
+
@return map.get($property-preset, $property);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@return map.get($config, preset);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
@function _oc-motion-spring-transition-item($property, $spring-duration, $config, $pace, $duration-scale) {
|
|
312
|
+
$preset: _oc-motion-spring-preset($config, $property);
|
|
313
|
+
$extra-bounce: _oc-motion-spring-extra-bounce($config, $property);
|
|
314
|
+
$settle-duration: oc-spring-settle-duration($spring-duration, $preset, $extra-bounce);
|
|
315
|
+
$duration: calc(#{$settle-duration} * var(--oc-motion-duration-scale) * #{_oc-motion-token-pace-scale($pace)} * #{$duration-scale});
|
|
316
|
+
$timing: oc-spring-timing($spring-duration, $preset, $extra-bounce);
|
|
317
|
+
|
|
318
|
+
@return _oc-motion-transition-item($property, $duration, $timing);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@function _oc-motion-spring($properties, $intent, $phase, $pace, $duration-scale, $config) {
|
|
322
|
+
$spring-duration: _oc-motion-spring-duration-value($intent, $phase);
|
|
323
|
+
$transitions: ();
|
|
324
|
+
|
|
325
|
+
@each $property in _oc-motion-properties($properties) {
|
|
326
|
+
$transitions: list.append($transitions, _oc-motion-spring-transition-item($property, $spring-duration, $config, $pace, $duration-scale), $separator: comma);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@return $transitions;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@function oc-motion-duration($intent, $phase: change, $pace: normal, $duration-scale: 1, $duration-scale-token: var(--oc-motion-duration-scale), $duration-token: null) {
|
|
333
|
+
$intent: _oc-motion-require-intent($intent);
|
|
334
|
+
$phase: _oc-motion-require-phase($phase);
|
|
335
|
+
$duration-scale: _oc-motion-require-duration-scale($duration-scale);
|
|
336
|
+
$base-duration: map.get($oc-motion-token-duration-by-intent, $intent);
|
|
337
|
+
$duration: $duration-token;
|
|
338
|
+
|
|
339
|
+
@if $duration == null {
|
|
340
|
+
$duration: _oc-motion-phase-value($oc-motion-token-duration-by-phase, $intent, $phase, $base-duration);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
$pace-scale: _oc-motion-token-pace-scale($pace);
|
|
344
|
+
|
|
345
|
+
@return calc(#{$duration} * #{$duration-scale-token} * #{$pace-scale} * #{$duration-scale});
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@function oc-motion-timing($intent, $phase: change) {
|
|
349
|
+
$intent: _oc-motion-require-intent($intent);
|
|
350
|
+
$phase: _oc-motion-require-phase($phase);
|
|
351
|
+
$base-timing: map.get($oc-motion-token-timing-by-intent, $intent);
|
|
352
|
+
|
|
353
|
+
@return _oc-motion-phase-value($oc-motion-token-timing-by-phase, $intent, $phase, $base-timing);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@function oc-motion-scale($scale, $intent: feedback, $scale-token: null) {
|
|
357
|
+
$intent: _oc-motion-require-intent($intent);
|
|
358
|
+
$scale: _oc-motion-require-scale-value($scale);
|
|
359
|
+
|
|
360
|
+
@if $scale-token == null {
|
|
361
|
+
$scale-token: map.get($oc-motion-token-scale-by-intent, $intent);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@return max(0, calc(1 + (#{$scale} - 1) * #{$scale-token}));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@function oc-motion-distance($distance, $intent: reveal, $distance-token: null) {
|
|
368
|
+
$intent: _oc-motion-require-intent($intent);
|
|
369
|
+
|
|
370
|
+
@if $distance-token == null {
|
|
371
|
+
$distance-token: map.get($oc-motion-token-distance-by-intent, $intent);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
@return calc(#{$distance} * #{$distance-token});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
@function oc-motion($properties, $intent, $phase: change, $pace: normal, $duration-scale: 1, $duration-token: null) {
|
|
378
|
+
$intent: _oc-motion-require-intent($intent);
|
|
379
|
+
$phase: _oc-motion-require-phase($phase);
|
|
380
|
+
$duration-scale: _oc-motion-require-duration-scale($duration-scale);
|
|
381
|
+
$spring-config: _oc-motion-spring-config($intent, $phase);
|
|
382
|
+
|
|
383
|
+
@if $spring-config != null {
|
|
384
|
+
@if $duration-token != null {
|
|
385
|
+
@error 'oc-motion $duration-token is not supported for spring-backed motion.';
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@return _oc-motion-spring($properties, $intent, $phase, $pace, $duration-scale, $spring-config);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
$duration: oc-motion-duration($intent, $phase, $pace, $duration-scale, $duration-token: $duration-token);
|
|
392
|
+
$timing: oc-motion-timing($intent, $phase);
|
|
393
|
+
$transitions: ();
|
|
394
|
+
|
|
395
|
+
@each $property in _oc-motion-properties($properties) {
|
|
396
|
+
$transitions: list.append($transitions, _oc-motion-transition-item($property, $duration, $timing), $separator: comma);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@return $transitions;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@function _oc-motion-reduced-policy($intent, $reduced) {
|
|
403
|
+
$reduced: _oc-motion-require-reduced-policy($reduced);
|
|
404
|
+
|
|
405
|
+
@if $reduced != auto {
|
|
406
|
+
@return $reduced;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@return map.get($oc-motion-reduced-policy-by-intent, _oc-motion-require-intent($intent));
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// stylelint-disable-next-line scss/at-mixin-pattern -- Private helper mirrors the public oc-motion mixin name.
|
|
413
|
+
@mixin _oc-motion-reduced($properties, $intent, $phase, $pace, $duration-scale, $reduced, $duration-token) {
|
|
414
|
+
$policy: _oc-motion-reduced-policy($intent, $reduced);
|
|
415
|
+
|
|
416
|
+
@if $policy == preserve {
|
|
417
|
+
transition-duration: oc-motion-duration($intent, $phase, $pace, $duration-scale, var(--oc-motion-duration-scale-preserve), $duration-token);
|
|
418
|
+
transition-timing-function: oc-motion-timing($intent, $phase);
|
|
419
|
+
} @else if $policy == static {
|
|
420
|
+
transition: none;
|
|
421
|
+
|
|
422
|
+
@if _oc-motion-has-property($properties, transform) {
|
|
423
|
+
transform: none;
|
|
424
|
+
}
|
|
425
|
+
} @else if $policy == fade or $policy == feedback {
|
|
426
|
+
$reduced-properties: _oc-motion-feedback-property-list($properties);
|
|
427
|
+
|
|
428
|
+
@if list.length($reduced-properties) == 0 {
|
|
429
|
+
transition: none;
|
|
430
|
+
} @else {
|
|
431
|
+
transition-property: $reduced-properties;
|
|
432
|
+
transition-duration: oc-motion-duration($intent, $phase, $pace, $duration-scale, var(--oc-motion-duration-scale-reduced), $duration-token);
|
|
433
|
+
transition-timing-function: oc-motion-timing($intent, $phase);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@if _oc-motion-has-property($properties, transform) {
|
|
437
|
+
transform: none;
|
|
438
|
+
}
|
|
439
|
+
} @else {
|
|
440
|
+
@error 'Unknown oc-motion reduced policy: #{$policy}.';
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
@mixin oc-motion($properties, $intent, $phase: change, $pace: normal, $duration-scale: 1, $reduced: auto, $duration-token: null) {
|
|
445
|
+
transition: oc-motion($properties, $intent, $phase, $pace, $duration-scale, $duration-token);
|
|
446
|
+
|
|
447
|
+
@media (prefers-reduced-motion: reduce) {
|
|
448
|
+
@include _oc-motion-reduced($properties, $intent, $phase, $pace, $duration-scale, $reduced, $duration-token);
|
|
449
|
+
}
|
|
450
|
+
}
|