From 48c729ecfc58d265e398ccfe54edd0853d49f16e Mon Sep 17 00:00:00 2001 From: gioboa Date: Tue, 30 Jan 2024 15:05:02 +0100 Subject: [PATCH] fix: solve build errors --- .../website/src/components/utils/Controls.tsx | 49 +++++++++---------- .../src/routes/examples/SfCheckbox/index.tsx | 4 +- .../src/routes/examples/SfInput/index.tsx | 4 +- .../src/routes/examples/SfRadio/index.tsx | 4 +- .../src/routes/examples/SfSwitch/index.tsx | 5 +- .../routes/showcases/Banners/Hero/index.tsx | 2 +- .../showcases/Drawer/Placement/index.tsx | 5 +- .../routes/showcases/Filters/Color/index.tsx | 4 +- .../showcases/Filters/FiltersPanel/index.tsx | 4 +- .../showcases/Input/InputCharacters/index.tsx | 4 +- .../showcases/Input/InputReadonly/index.tsx | 4 +- .../Input/InputWithoutLabel/index.tsx | 2 +- .../showcases/MegaMenu/BaseMegaMenu/index.tsx | 2 +- .../showcases/NavbarTop/NavbarTop/index.tsx | 2 +- .../NavbarTop/NavbarTopFilled/index.tsx | 2 +- .../NewsletterBox/NewsletterBox/index.tsx | 4 +- .../OrderSummary/OrderSummary/index.tsx | 4 +- .../ProgressCircularFloatingLabel/index.tsx | 12 ++--- .../showcases/Radio/RadioLeading/index.tsx | 4 +- .../showcases/Radio/RadioTrailing/index.tsx | 4 +- .../Radio/RadioWithoutLabel/index.tsx | 4 +- .../showcases/Switch/SwitchLeading/index.tsx | 4 +- .../showcases/Switch/SwitchTrailing/index.tsx | 4 +- .../Switch/SwitchWithoutLabel/index.tsx | 4 +- apps/website/vite.config.ts | 12 +---- .../src/components/SfIcons/SfIconCancel.tsx | 4 +- .../SfIcons/SfIconCheckBoxOutlineBlank.tsx | 4 +- .../src/components/SfIcons/SfIconCloseSm.tsx | 4 +- .../src/components/SfIcons/SfIconError.tsx | 4 +- .../src/components/SfIcons/SfIconFavorite.tsx | 4 +- .../SfIcons/SfIconIndeterminateCheckBox.tsx | 4 +- .../src/components/SfIcons/SfIconInfo.tsx | 4 +- .../src/components/SfIcons/SfIconLanguage.tsx | 4 +- .../components/SfIcons/SfIconLocationOn.tsx | 4 +- .../SfIcons/SfIconLocationOnFilled.tsx | 4 +- .../src/components/SfIcons/SfIconWarning.tsx | 4 +- .../src/components/SfInput/SfInput.tsx | 2 - .../src/components/SfInput/types.ts | 14 ++---- .../src/components/SfModal/types.ts | 4 +- .../src/components/SfRadio/types.ts | 11 ++--- .../src/components/SfSelect/types.ts | 1 + .../src/components/SfSwitch/types.ts | 11 ++--- packages/qwik-storefront-ui/vite.config.ts | 11 ----- 43 files changed, 104 insertions(+), 147 deletions(-) diff --git a/apps/website/src/components/utils/Controls.tsx b/apps/website/src/components/utils/Controls.tsx index c1c8d08..3693d53 100644 --- a/apps/website/src/components/utils/Controls.tsx +++ b/apps/website/src/components/utils/Controls.tsx @@ -1,10 +1,4 @@ -import { - $, - QwikChangeEvent, - component$, - useContext, - useSignal, -} from '@builder.io/qwik'; +import { $, component$, useContext, useSignal } from '@builder.io/qwik'; import { SfButton, SfButtonSize, @@ -26,22 +20,20 @@ export const Controls = component$(() => { }; }); - const handleJsonOnChangeValue = $( - (e: QwikChangeEvent, name: string) => { - examplesState.data.state = { - ...examplesState.data.state, - [name]: JSON.parse(e.target.value), - }; - } - ); + const handleJsonOnChangeValue = $((el: HTMLTextAreaElement, name: string) => { + examplesState.data.state = { + ...examplesState.data.state, + [name]: JSON.parse(el.value), + }; + }); const handleCheckbox = $( ( - e: QwikChangeEvent, + el: HTMLInputElement, name: string, currentValue: string | boolean | [] ) => { - const { value } = e.target; + const { value } = el; if (Array.isArray(currentValue)) { const newValue: string[] = [...currentValue]; const valueItemIndex = newValue.indexOf(value); @@ -161,11 +153,8 @@ export const Controls = component$(() => {