-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promote v11 to latest #1482
Merged
Merged
Promote v11 to latest #1482
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: theme can no longer be imported from "@nulogy/components" NDS is introducing context-specific default themes. Directly importing themes from NDS may result in using the wrong theme, causing conflicts between custom app themes, desktop, and touch variants. Instead of importing the theme from NDS like so: `import { theme } from "@nulogy/components"`, you can use and access the theme in one of the following ways: - Inside styled components ```tsx const Example = styled.div(({ theme }) => ({ marginLeft: theme.space.x3, marginBottom: theme.space.x1, color: theme.colors.darkBlue, })); ``` - Inside components: using styled props ```tsx function Component(props: Props) { return ( <Box ml="x3" mb="x1" color="darkBlue"> {props.children} </Box> ) } ``` - Inside components: using useTheme() ```tsx import { useTheme } from "styled-components" function getPaddingBasedOnSomeProp(foo, theme) { ... } function Component(props: Props) { const theme = useTheme() const horizontalPadding = getPaddingBasedOnSomeProp(props.foo, theme) return ( <Box px={horizontalPadding}> {props.children} </Box> ) } ```
BREAKING CHANGE: changes NDSProvider `size` prop to `variant`. The `size` prop was originally used sparingly in some components like the Button and the Icon to resize those components. It was later extended to make all interactive components large enough to be used on a touch screen, through changing the `size` prop directly or by passing a `size` prop to the NDSProvider globally. With this change, we retain the use of the `size` prop for select components, and introduce a `variant` prop that can be passed either to individual components or the NDSProvider globally with the value of either `desktop` or `touch`.
BREAKING CHANGE: removes the `icon` and `iconSize` props from the input in-favor of `iconLeft`, `iconRight`, `iconRightSize`, `iconLeftSize` Migration: * Replace `icon` prop with `iconRight` * Replace `iconSize` prop with `iconRightSize`
BREAKING CHANGE: removes the old unused NavBar component that was replaced with the BrandedNavBar
The configuration panel requires duplicating logic of the NDSProvider and can cause unwanted bugs.
* Use numbers for fontWeights * Double the size coefficient
* cypress global scope const declaration ([029fb35](029fb35)) * minor format/copy corrections ([e4b8458](e4b8458)) * unused parameter ([9959206](9959206)) * add a BottomSheet component ([9f6eddd](9f6eddd)) * add a component spec ([2e1a59c](2e1a59c)) * add BottomSheet parts ([6b8ad6c](6b8ad6c)) * Add documentation and refine the API ([1ef3c5f](1ef3c5f)) * further refine the API, stories, and documentation ([fd308f9](fd308f9)) * improve BottomSheet API and types ([fe42f8b](fe42f8b)) * test the BottomSheet interactivity ([463fd2d](463fd2d))
* colocate theme files to be in the same folder
* Add vertical margin to checkboxes with labels only ([08d5f20](08d5f20)) * align interactive elements with the label ([eecbf7d](eecbf7d)) * change the fontSize back to medium ([3c49a1f](3c49a1f)) * correct the theme generator scale and types ([dd8c34f](dd8c34f)) * cypress global scope const declaration ([c07e082](c07e082)) * format theme after generating it ([aa2848f](aa2848f)) * issues with scaling up the theme ([cc9cc3d](cc9cc3d)) * lint issues ([d1419a6](d1419a6)) * lint issues ([cff8f1b](cff8f1b)) * lint issues ([03ad4c3](03ad4c3)) * minor format/copy corrections ([cd346cd](cd346cd)) * MultiSelect pills padding ([895a906](895a906)) * pipeline build errors ([a4b4b47](a4b4b47)) * preserve styled components composability ([0141663](0141663)) * prevent shrinking icon ([7a4ce7a](7a4ce7a)) * remove obsolete stories ([c175cf1](c175cf1)) * remove theme configuration panel ([1797f50](1797f50)) * TypeScript parse error ([c7fd903](c7fd903)) * unexport the theme directly ([eb212fc](eb212fc)) * unused parameter ([a2638a5](a2638a5)) * Use a specific width and height for Chromatic ([5a2b34c](5a2b34c)) * visual defects following theme change ([eed23cd](eed23cd)) * visual defects in the touch variant ([393f034](393f034)) * removes old NavBar ([229980c](229980c)) * add a BottomSheet component ([01b95c0](01b95c0)) * add a component spec ([953a13f](953a13f)) * add a touch variant ([d580396](d580396)) * add BottomSheet parts ([e4bde1d](e4bde1d)) * Add documentation and refine the API ([716d49a](716d49a)) * add futureFlags ([22d961a](22d961a)) * allow adding left and right icons to the input ([6675bc9](6675bc9)) * change font size and line height for touch interactive elements ([a75c1e0](a75c1e0)) * export the BottomSheet ([07958d2](07958d2)) * further refine the API, stories, and documentation ([e1847b2](e1847b2)) * generate the theme based on a base unit ([d091ce0](d091ce0)) * improve BottomSheet API and types ([f511eb1](f511eb1)) * improve BottomSheet API and types ([5983b6c](5983b6c)) * introduce new desktop typography scale ([8838821](8838821)) * refactor away from size to variant ([2998732](2998732)) * support tablet and phone media queries ([3fcaa36](3fcaa36)) * test the BottomSheet interactivity ([3e9ed36](3e9ed36)) * update theme ([36b255e](36b255e)) * removes the old unused NavBar component that was replaced with the BrandedNavBar * removes the `icon` and `iconSize` props from the input in-favor of `iconLeft`, `iconRight`, `iconRightSize`, `iconLeftSize` Migration: * Replace `icon` prop with `iconRight` * Replace `iconSize` prop with `iconRightSize` * changes NDSProvider `size` prop to `variant`. The `size` prop was originally used sparingly in some components like the Button and the Icon to resize those components. It was later extended to make all interactive components large enough to be used on a touch screen, through changing the `size` prop directly or by passing a `size` prop to the NDSProvider globally. With this change, we retain the use of the `size` prop for select components, and introduce a `variant` prop that can be passed either to individual components or the NDSProvider globally with the value of either `desktop` or `touch`. * theme can no longer be imported from "@nulogy/components" NDS is introducing context-specific default themes. Directly importing themes from NDS may result in using the wrong theme, causing conflicts between custom app themes, desktop, and touch variants. Instead of importing the theme from NDS like so: `import { theme } from "@nulogy/components"`, you can use and access the theme in one of the following ways: - Inside styled components ```tsx const Example = styled.div(({ theme }) => ({ marginLeft: theme.space.x3, marginBottom: theme.space.x1, color: theme.colors.darkBlue, })); ``` - Inside components: using styled props ```tsx function Component(props: Props) { return ( <Box ml="x3" mb="x1" color="darkBlue"> {props.children} </Box> ) } ``` - Inside components: using useTheme() ```tsx import { useTheme } from "styled-components" function getPaddingBasedOnSomeProp(foo, theme) { ... } function Component(props: Props) { const theme = useTheme() const horizontalPadding = getPaddingBasedOnSomeProp(props.foo, theme) return ( <Box px={horizontalPadding}> {props.children} </Box> ) } ```
haideralsh
commented
Nov 25, 2024
# [11.0.0](v10.4.0...v11.0.0) (2024-11-25) ### Bug Fixes * Add vertical margin to checkboxes with labels only ([8fe0688](8fe0688)) * align interactive elements with the label ([5044ecf](5044ecf)) * change the fontSize back to medium ([983ae7b](983ae7b)) * CI issues ([9ff5fb8](9ff5fb8)) * correct the theme generator scale and types ([3503e87](3503e87)) * cypress global scope const declaration ([7c99f19](7c99f19)) * format theme after generating it ([38da451](38da451)) * issues with scaling up the theme ([33dcc7c](33dcc7c)) * lint issues ([70399f9](70399f9)) * lint issues ([9c064d6](9c064d6)) * lint issues ([314413e](314413e)) * minor format/copy corrections ([e64733a](e64733a)) * MultiSelect pills padding ([21f7b75](21f7b75)) * pipeline build errors ([6059b25](6059b25)) * preserve styled components composability ([a653085](a653085)) * prevent shrinking icon ([555ae83](555ae83)) * remove obsolete stories ([b4060cc](b4060cc)) * remove theme configuration panel ([d44fb39](d44fb39)) * TypeScript parse error ([4c24edc](4c24edc)) * unexport the theme directly ([8efc00a](8efc00a)) * unused parameter ([dd83f4e](dd83f4e)) * Use a specific width and height for Chromatic ([a8ac7c5](a8ac7c5)) * visual defects following theme change ([66dc7c5](66dc7c5)) * visual defects in the touch variant ([e05fa5d](e05fa5d)) ### Code Refactoring * removes old NavBar ([074407e](074407e)) ### Features * add a BottomSheet component ([bfbb8a9](bfbb8a9)) * add a component spec ([2606c7a](2606c7a)) * add a touch variant ([9208f0a](9208f0a)) * add BottomSheet parts ([9450193](9450193)) * Add documentation and refine the API ([2ac885b](2ac885b)) * add futureFlags ([ffe95a7](ffe95a7)) * allow adding left and right icons to the input ([03fb009](03fb009)) * change font size and line height for touch interactive elements ([9592de0](9592de0)) * export the BottomSheet ([3ef420d](3ef420d)) * further refine the API, stories, and documentation ([d575059](d575059)) * generate the theme based on a base unit ([ef28b78](ef28b78)) * improve BottomSheet API and types ([08061f5](08061f5)) * improve BottomSheet API and types ([c852179](c852179)) * introduce new desktop typography scale ([e4c4353](e4c4353)) * refactor away from size to variant ([5024a5d](5024a5d)) * support tablet and phone media queries ([a75a3a0](a75a3a0)) * test the BottomSheet interactivity ([1891d56](1891d56)) * update theme ([3f80200](3f80200)) ### BREAKING CHANGES * removes the old unused NavBar component that was replaced with the BrandedNavBar * removes the `icon` and `iconSize` props from the input in-favor of `iconLeft`, `iconRight`, `iconRightSize`, `iconLeftSize` Migration: * Replace `icon` prop with `iconRight` * Replace `iconSize` prop with `iconRightSize` * changes NDSProvider `size` prop to `variant`. The `size` prop was originally used sparingly in some components like the Button and the Icon to resize those components. It was later extended to make all interactive components large enough to be used on a touch screen, through changing the `size` prop directly or by passing a `size` prop to the NDSProvider globally. With this change, we retain the use of the `size` prop for select components, and introduce a `variant` prop that can be passed either to individual components or the NDSProvider globally with the value of either `desktop` or `touch`. * theme can no longer be imported from "@nulogy/components" NDS is introducing context-specific default themes. Directly importing themes from NDS may result in using the wrong theme, causing conflicts between custom app themes, desktop, and touch variants. Instead of importing the theme from NDS like so: `import { theme } from "@nulogy/components"`, you can use and access the theme in one of the following ways: - Inside styled components ```tsx const Example = styled.div(({ theme }) => ({ marginLeft: theme.space.x3, marginBottom: theme.space.x1, color: theme.colors.darkBlue, })); ``` - Inside components: using styled props ```tsx function Component(props: Props) { return ( <Box ml="x3" mb="x1" color="darkBlue"> {props.children} </Box> ) } ``` - Inside components: using useTheme() ```tsx import { useTheme } from "styled-components" function getPaddingBasedOnSomeProp(foo, theme) { ... } function Component(props: Props) { const theme = useTheme() const horizontalPadding = getPaddingBasedOnSomeProp(props.foo, theme) return ( <Box px={horizontalPadding}> {props.children} </Box> ) } ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR takes v11 out of pre-release and makes it available as the latest release for NDS
Changes include
Feature checklist