Issue:
The ModelItem component's onPeek handler was sometimes logging incorrect data, causing the model selector to appear inconsistent.
Changes Made:
Verified that the aria-selected attribute is true before calling onPeek(model), ensuring the function is only called when the element is actually selected.
Fixed Model Selector Inconsistency in Playground Example
fixes#4506
* fix: fix breaking changes for Command component that comes with cmdk 1.0.0
* chore: build registry
* chore: moving paths for some examples
* chore: moving paths for some examples
* chore: use data instead of aria
* fix: update command and pin cmdk
* fix: model selector
* fix: command for new york
---------
Co-authored-by: shadcn <m@shadcn.com>
# Current Issue
when running `next lint`, the typescript compiler fails on the chart component (closes#4229 )
`Type error: Type 'string[]' is not assignable to type 'string | TrustedHTML'.`
# Resolution
We can coerce the `string[]` into a valid type by `join`ing.
# Description
This PR adds support for customizing graphics themes in the `ThemeCustomizer` component. Users can now select and copy chart colors (`chart-1`, `chart-2`, `chart-3`, `chart-4`, `chart-5`) along with other themes.
## Changes Implemented
1. **Themes Update**: Added chart themes (`chart-1`, `chart-2`, `chart-3`, `chart-4`, `chart-5`) to the chart file. themes configuration (`themes.ts`).
2. **Modification of the `ThemeCustomizer` Component**: The new graphics themes were integrated into the component so that they can be selected and copied.
3. **CSS Tweak**: Updated the functions that generate CSS code to include the new graphics themes.
## How to Test
1. Run the project locally.
2. Navigate to the `ThemeCustomizer` component.
3. Verify that the new graphics themes are available for selection.
4. Test the functionality of copying the CSS code and making sure it includes the graphics colors.
## References
- Added support for graphics themes based on defaults provided by Shadcn.
Data attributes at <CommandPrimite.List /> component should be written as data-[disabled=true] in order to avoid styles being applied to element, even when it's not disabled.
## Bug:
When clicking on the "Lift Mode" Text instead of the toggle itself, since there were multiple `lift-mode` ids before (one for each block), the incorrect toggle would be activated.
https://github.com/shadcn-ui/ui/assets/61006057/261ec82f-9274-4e0a-ac21-5e3aa3ceece3
## Fix:
Instead of the id being static I changes the `id`, as well as the `htmlFor` attributes to `lift-mode-${block.name}`. This prevents duplicate ids, as long as there are no two blocks with the same name.