Skip to content

Commit

Permalink
fix: color picker reset
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Oct 13, 2023
1 parent 2f386d7 commit a3a83a8
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 169 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@
]
},
"dependencies": {
"@axe-core/playwright": "4.7.3",
"@axe-core/playwright": "4.8.0",
"@babel/generator": "7.23.0",
"@babel/parser": "7.23.0",
"@babel/traverse": "7.23.0",
"@babel/traverse": "7.23.2",
"@babel/types": "7.23.0",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.2",
"@commitlint/cli": "17.7.2",
"@commitlint/config-conventional": "17.7.0",
"@internationalized/date": "^3.5.0",
"@octokit/rest": "20.0.2",
"@playwright/test": "1.38.1",
"@swc/core": "1.3.92",
"@playwright/test": "1.39.0",
"@swc/core": "1.3.93",
"@types/babel__traverse": "^7.20.2",
"@types/babel__generator": "^7.6.5",
"@types/node": "^20.8.4",
"@types/node": "^20.8.5",
"@types/signale": "1.4.5",
"@typescript-eslint/eslint-plugin": "6.7.5",
"@typescript-eslint/parser": "6.7.5",
Expand All @@ -96,8 +96,8 @@
"tsx": "3.13.0",
"typescript": "5.2.2",
"vite": "4.4.11",
"vite-plugin-dts": "3.5.4",
"vitest": "^0.34.5"
"vite-plugin-dts": "3.6.0",
"vitest": "^0.34.6"
},
"engines": {
"node": ">=18.0.0"
Expand Down
5 changes: 3 additions & 2 deletions packages/machines/color-picker/src/color-picker.machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,10 @@ const set = {
sync.inputs(ctx)
if (!color || ctx.value.isEqual(color)) return
const currentFormat = ctx.value.getFormat()

const outputColor = color.toFormat(currentFormat)
outputColor.outputFormat = ctx.value.outputFormat
try {
outputColor.outputFormat = ctx.value.outputFormat
} catch {}

ctx.value = ref(outputColor) as Color
invoke.change(ctx)
Expand Down
Loading

4 comments on commit a3a83a8

@vercel
Copy link

@vercel vercel bot commented on a3a83a8 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-nextjs – ./examples/next-ts

zag-nextjs-git-main-chakra-ui.vercel.app
zag-two.vercel.app
zag-nextjs-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a3a83a8 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-vue – ./examples/vue-ts

zag-vue.vercel.app
zag-vue-chakra-ui.vercel.app
zag-vue-git-main-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a3a83a8 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zag-solid – ./examples/solid-ts

zag-solid.vercel.app
zag-solid-git-main-chakra-ui.vercel.app
zag-solid-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a3a83a8 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.