PromucFlow_constructor/app/client/packages/design-system/theming/src/index.ts

6 lines
125 B
TypeScript
Raw Normal View History

chore: move typography to themeprovider (#23904) ## Description **Typography** - Move typography to the provider. - Add context for the theme provider - Move `fontFaces` styles to the provider **Tooltip** - Add `isRounded` check for the tooltip (shift for the arrow) - Fix the position of the arrow in the tooltip **Tokens** Move `rootUnit` from `sizing` since this is a common value and is used not only for sizing. We will do the sizing iteration separately, if necessary. **Theming package** Theming package refactoring. So now we have 4 folders (color, theme, token, and typography) with related files #### PR fixes following issue(s) Fixes #21927 #### Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [x] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag --------- Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
2023-06-07 09:49:24 +00:00
export * from "./token";
export * from "./theme";
export * from "./color";
fix: calculate fluid tokens based on provider width (#29316) ## Description - I added `--provider-width` CSS variable to the provider, which we get with the help of [ResizeObserver hook](https://github.com/jaredLunde/react-hook/tree/master/packages/resize-observer), the variable is calculated through [debounces](https://github.com/jaredLunde/react-hook/tree/master/packages/debounce) every 100 ms. - Styles for typography are now calculated only through CSS - Split useFluidTokens hook into several, now there are separate hook for sizing, spacing and typography - Create a separate folder for hooks in the theme package #### PR fixes following issue(s) Fixes #29177 #### Media https://github.com/appsmithorg/appsmith/assets/11555074/7778c5a0-9ed9-4f9c-a2b6-787784ed3e1f #### Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced fluid sizing, spacing, and typography hooks for responsive design adjustments. - Added global font stack utility for consistent typography across platforms. - Enhanced theming capabilities with new hooks and utilities. - **Improvements** - Updated `ThemeProvider` to support new styling hooks and responsive design features. - Refined typography utilities for dynamic class name generation based on design tokens. - **Documentation** - Added comments to clarify the use of `className` and `style` properties in `ThemeProviderProps`. - **Refactor** - Streamlined token access with updated `TokensAccessor` class. - Consolidated typography and font metric types for better type safety and clarity. - **Bug Fixes** - Fixed modal handling in `ComplexForm` component with improved state management and accessibility. - **Breaking Changes** - Removed exports of deprecated typography module and fluid token module. - Changed public interface for theming hooks, which may affect existing consumers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-12-06 07:38:36 +00:00
export * from "./utils";
export * from "./hooks";