From e693c05b265c29630ed0b175b7aca1dddbd976f4 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 11:19:09 +1100 Subject: [PATCH 01/12] docs: add Input in menu --- apps/website/src/components/menu/menu.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/website/src/components/menu/menu.tsx b/apps/website/src/components/menu/menu.tsx index 066bac212..c2748844f 100644 --- a/apps/website/src/components/menu/menu.tsx +++ b/apps/website/src/components/menu/menu.tsx @@ -42,7 +42,11 @@ export const Menu = component$(({ onClose$ }) => { path: `/docs/${appState.theme.toLowerCase()}/navigation-bar`, }, { label: 'Drawer', path: `/docs/${appState.theme.toLowerCase()}/drawer` }, - { label: 'Input Phone', path: `/docs/headless/input-phone` }, + { label: 'Input', path: `/docs/${appState.theme.toLowerCase()}/input` }, + { + label: 'Input Phone', + path: `/docs/${appState.theme.toLowerCase()}/input-phone`, + }, { label: 'Rating', path: `/docs/${appState.theme.toLowerCase()}/rating` }, { label: 'Radio', path: `/docs/${appState.theme.toLowerCase()}/radio` }, { label: 'Popover', path: `/docs/${appState.theme.toLowerCase()}/popover` }, @@ -110,7 +114,7 @@ export const Menu = component$(({ onClose$ }) => { {menu .sort((a, b) => (a.label > b.label ? 1 : -1)) .map((menuItem) => ( -
  • +
  • {menuItem.label} From e8cbd0dc0682e98123a6cd28ee5678406d691818 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 11:40:37 +1100 Subject: [PATCH 02/12] docs: fix menu item for loop[ key --- apps/website/src/components/menu/menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website/src/components/menu/menu.tsx b/apps/website/src/components/menu/menu.tsx index 066bac212..8bd3aef8f 100644 --- a/apps/website/src/components/menu/menu.tsx +++ b/apps/website/src/components/menu/menu.tsx @@ -110,7 +110,7 @@ export const Menu = component$(({ onClose$ }) => { {menu .sort((a, b) => (a.label > b.label ? 1 : -1)) .map((menuItem) => ( -
  • +
  • {menuItem.label} From 3fcc6c70413a00728820937b7099ec1830ef5520 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 11:48:02 +1100 Subject: [PATCH 03/12] fix: remove deprecation & use useVisibleTask --- packages/headless/src/components/input-phone/input-phone.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/headless/src/components/input-phone/input-phone.tsx b/packages/headless/src/components/input-phone/input-phone.tsx index 272d65afe..2059ab983 100644 --- a/packages/headless/src/components/input-phone/input-phone.tsx +++ b/packages/headless/src/components/input-phone/input-phone.tsx @@ -5,8 +5,8 @@ import { useSignal, useStylesScoped$, useTask$, - useBrowserVisibleTask$, QwikIntrinsicElements, + useVisibleTask$, } from '@builder.io/qwik'; import { AsYouType, @@ -166,7 +166,7 @@ export const InputPhone = component$( /** * Emit the InputPhone's on initial render */ - useBrowserVisibleTask$(() => { + useVisibleTask$(() => { handleCountryChange(countrySignal.value); handleNumberChange(outputSignal.value); handleValidChange(outputSignal.value); From dafaa0056eefc65a19504f550fe5c8b7bd2b2d9d Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 11:49:55 +1100 Subject: [PATCH 04/12] feat: use input as main props & add wrapperProps --- .../components/input-phone/input-phone.tsx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/headless/src/components/input-phone/input-phone.tsx b/packages/headless/src/components/input-phone/input-phone.tsx index 2059ab983..e694862fc 100644 --- a/packages/headless/src/components/input-phone/input-phone.tsx +++ b/packages/headless/src/components/input-phone/input-phone.tsx @@ -21,9 +21,10 @@ import { countries, type CountryListItemType } from 'country-list-json'; import { timezoneCityToCountry } from './timezone-city-to-country'; import styles from './input-phone.css?inline'; -export type InputPhoneProps = QwikIntrinsicElements['div'] & { +export type InputPhoneProps = QwikIntrinsicElements['input'] & { value?: string; countryCode?: CountryCode | 'auto'; + wrapperProps?: QwikIntrinsicElements['div']; onCountryChange$?: QRL<(country?: InputPhoneCountry) => void>; onNumberChange$?: QRL<(phone: string) => void>; onValidChange$?: QRL<(validity: InputPhoneValidity) => void>; @@ -112,6 +113,7 @@ export const InputPhone = component$( countryCode, placeholder = 'Phone number', value = '', + wrapperProps, onCountryChange$, onNumberChange$, onValidChange$, @@ -262,7 +264,7 @@ export const InputPhone = component$( }); return ( -
    +
    @@ -278,22 +280,26 @@ export const InputPhone = component$( > {countries.map(({ code, dial_code, name }) => ( - ))} { - numberSignal.value = new AsYouType(countrySignal.value?.code).input( - value - ); - }} + onInput$={[ + $((_: Event, { value }: HTMLInputElement) => { + numberSignal.value = new AsYouType( + countrySignal.value?.code + ).input(value); + }), + props.onInput$, + ]} />
    ); From 5f04402803b9932e9ee9fe54957d2aa10c746c08 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 11:56:20 +1100 Subject: [PATCH 05/12] fix: import properly input phone in docs --- apps/website/src/routes/docs/headless/input-phone/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/website/src/routes/docs/headless/input-phone/index.tsx b/apps/website/src/routes/docs/headless/input-phone/index.tsx index e1219ce04..648dc4b04 100644 --- a/apps/website/src/routes/docs/headless/input-phone/index.tsx +++ b/apps/website/src/routes/docs/headless/input-phone/index.tsx @@ -6,10 +6,7 @@ import { useStylesScoped$, } from '@builder.io/qwik'; import { InputPhone } from '@qwik-ui/headless'; -import { - InputPhoneCountry, - InputPhoneValidity, -} from 'packages/headless/src/components/input-phone/input-phone'; +import { InputPhoneCountry, InputPhoneValidity } from '@qwik-ui/headless'; import styles from './input-phone.css?inline'; export default component$(() => { From afe13c5787c52b8515ccf53714eac3ed4b54548e Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 12:04:28 +1100 Subject: [PATCH 06/12] feat: add aria-label to country code list --- packages/headless/src/components/input-phone/input-phone.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/headless/src/components/input-phone/input-phone.tsx b/packages/headless/src/components/input-phone/input-phone.tsx index e694862fc..e375aaadd 100644 --- a/packages/headless/src/components/input-phone/input-phone.tsx +++ b/packages/headless/src/components/input-phone/input-phone.tsx @@ -272,6 +272,7 @@ export const InputPhone = component$( tabIndex={1} ref={selectRefSignal} title={countrySignal.value?.name} + aria-label="Country and dial code of your phone number" onChange$={(_, { value }) => { countrySignal.value = findBySelectValue(value); selectRefSignal.value?.blur(); From 8bc189eb8ac4dd18498fbd0712284d43474bd8bf Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 12:52:50 +1100 Subject: [PATCH 07/12] feat: update aria-labels and tabindex --- .../src/components/input-phone/index.ts | 2 +- .../input-phone/input-phone.axe.json | 191 +++++++++++------- .../components/input-phone/input-phone.tsx | 13 +- 3 files changed, 133 insertions(+), 73 deletions(-) diff --git a/packages/headless/src/components/input-phone/index.ts b/packages/headless/src/components/input-phone/index.ts index 79ee47e91..009e0f6a2 100644 --- a/packages/headless/src/components/input-phone/index.ts +++ b/packages/headless/src/components/input-phone/index.ts @@ -1 +1 @@ -export { InputPhone } from './input-phone'; +export * from './input-phone'; diff --git a/packages/headless/src/components/input-phone/input-phone.axe.json b/packages/headless/src/components/input-phone/input-phone.axe.json index 460d0d451..c201ee414 100644 --- a/packages/headless/src/components/input-phone/input-phone.axe.json +++ b/packages/headless/src/components/input-phone/input-phone.axe.json @@ -1,118 +1,173 @@ { - "url": "http://127.0.0.1:5173/docs/headless/input-phone/", - "extensionVersion": "4.51.0", + "url": "http://localhost:5173/docs/headless/input-phone/", + "extensionVersion": "4.52.0", "axeVersion": "4.6.3", "standard": "WCAG 2.1 AA", - "testingStartDate": "2023-03-18T11:26:34.819Z", - "testingEndDate": "2023-03-18T11:48:12.451Z", - "bestPracticesEnabled": false, + "testingStartDate": "2023-03-25T01:32:42.404Z", + "testingEndDate": "2023-03-25T01:48:43.415Z", + "bestPracticesEnabled": true, "issueSummary": { - "critical": 0, - "moderate": 0, + "critical": 1, + "moderate": 1, "minor": 0, - "serious": 3, - "bestPractices": 0, + "serious": 1, + "bestPractices": 1, "needsReview": 0 }, - "remainingTestingSummary": { "run": false }, + "remainingTestingSummary": { + "run": false + }, "igtSummary": [ - { "tool": "Table", "skipped": false, "name": null, "run": false }, + { + "tool": "Table", + "skipped": false, + "name": null, + "run": false + }, { "tool": "Keyboard", "skipped": false, - "name": "3/18/2023 at 10:42 PM", + "name": "3/25/2023 at 12:47 PM", "run": true, - "issues": { "critical": 0, "moderate": 0, "minor": 0, "serious": 0 }, - "duration": 157762 + "issues": { + "critical": 0, + "moderate": 0, + "minor": 0, + "serious": 0 + }, + "duration": 48646 + }, + { + "tool": "Modal Dialog", + "skipped": false, + "name": null, + "run": false }, - { "tool": "Modal Dialog", "skipped": false, "name": null, "run": false }, { "tool": "Interactive Elements", "skipped": false, - "name": "3/18/2023 at 10:26 PM", + "name": "3/25/2023 at 12:45 PM", "run": true, - "issues": { "critical": 0, "moderate": 0, "minor": 0, "serious": 0 }, - "duration": 624995 + "issues": { + "critical": 0, + "moderate": 0, + "minor": 0, + "serious": 0 + }, + "duration": 50924 }, { "tool": "Structure", "skipped": false, - "name": "3/18/2023 at 10:45 PM", - "run": true, - "issues": { "critical": 0, "moderate": 0, "minor": 0, "serious": 3 }, - "duration": 76867 + "name": null, + "run": false + }, + { + "tool": "Images", + "skipped": false, + "name": null, + "run": false }, - { "tool": "Images", "skipped": false, "name": null, "run": false }, - { "tool": "Forms", "skipped": false, "name": null, "run": false } + { + "tool": "Forms", + "skipped": false, + "name": null, + "run": false + } ], "failedRules": [ - { "name": "lang-change-not-marked", "count": 3, "mode": "manual" } + { + "name": "page-has-heading-one", + "count": 1, + "mode": "automated" + }, + { + "name": "image-alt", + "count": 1, + "mode": "automated" + }, + { + "name": "link-name", + "count": 1, + "mode": "automated" + } ], "needsReview": [], "allIssues": [ { - "ruleId": "lang-change-not-marked", - "description": "The change in language for a portion of content is not coded.", - "help": "Change in language is not marked", - "helpUrl": "https://docs.deque.com/issue-help/1.0.0/en/lang-change-not-marked", - "impact": "serious", + "ruleId": "page-has-heading-one", + "description": "Ensure that the page, or at least one of its frames contains a level-one heading", + "help": "Page should contain a level-one heading", + "helpUrl": "https://dequeuniversity.com/rules/axe/4.6/page-has-heading-one?application=AxeChrome", + "impact": "moderate", "needsReview": false, - "isManual": true, - "selector": ["body > form.\\00002b50\\0000fe0fdqh46j-1:nth-of-type(1)"], - "summary": "The change in language for a portion of content is not coded.", - "source": null, - "tags": ["wcag2aa", "wcag312a"], - "igt": "Structure", - "testName": "QwikUI | Headless | Input-phone [interactivity]", + "isManual": false, + "selector": ["html"], + "summary": "Fix all of the following:\n Page must have a level-one heading", + "source": "", + "tags": ["cat.semantics", "best-practice"], + "igt": "", + "testName": "QwikUI | Headless | Input-phone", "shareURL": "", - "createdAt": "2023-03-18T11:48:12.441Z", - "testUrl": "http://127.0.0.1:5173/docs/headless/input-phone/", + "createdAt": "2023-03-25T01:32:42.965Z", + "testUrl": "http://localhost:5173/docs/headless/input-phone/", "testPageTitle": "", "foundBy": "thomas.leperou@gmail.com", "axeVersion": "4.6.3" }, { - "ruleId": "lang-change-not-marked", - "description": "The change in language for a portion of content is not coded.", - "help": "Change in language is not marked", - "helpUrl": "https://docs.deque.com/issue-help/1.0.0/en/lang-change-not-marked", - "impact": "serious", + "ruleId": "image-alt", + "description": "Ensures elements have alternate text or a role of none or presentation", + "help": "Images must have alternate text", + "helpUrl": "https://dequeuniversity.com/rules/axe/4.6/image-alt?application=AxeChrome", + "impact": "critical", "needsReview": false, - "isManual": true, - "selector": [ - "body > form.\\00002b50\\0000fe0fdqh46j-1:nth-of-type(1) > div.\\00002b50\\0000fe0fokr433-0:nth-of-type(1) > select.\\00002b50\\0000fe0fokr433-0:nth-of-type(1)" + "isManual": false, + "selector": ["img"], + "summary": "Fix any of the following:\n Element does not have an alt attribute\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"", + "source": "", + "tags": [ + "cat.text-alternatives", + "wcag2a", + "wcag111", + "section508", + "section508.22.a", + "ACT" ], - "summary": "The change in language for a portion of content is not coded.", - "source": null, - "tags": ["wcag2aa", "wcag312a"], - "igt": "Structure", - "testName": "QwikUI | Headless | Input-phone [interactivity]", + "igt": "", + "testName": "QwikUI | Headless | Input-phone", "shareURL": "", - "createdAt": "2023-03-18T11:48:12.441Z", - "testUrl": "http://127.0.0.1:5173/docs/headless/input-phone/", + "createdAt": "2023-03-25T01:32:42.965Z", + "testUrl": "http://localhost:5173/docs/headless/input-phone/", "testPageTitle": "", "foundBy": "thomas.leperou@gmail.com", "axeVersion": "4.6.3" }, { - "ruleId": "lang-change-not-marked", - "description": "The change in language for a portion of content is not coded.", - "help": "Change in language is not marked", - "helpUrl": "https://docs.deque.com/issue-help/1.0.0/en/lang-change-not-marked", + "ruleId": "link-name", + "description": "Ensures links have discernible text", + "help": "Links must have discernible text", + "helpUrl": "https://dequeuniversity.com/rules/axe/4.6/link-name?application=AxeChrome", "impact": "serious", "needsReview": false, - "isManual": true, - "selector": [ - "body > form.\\00002b50\\0000fe0fdqh46j-1:nth-of-type(1) > div.\\00002b50\\0000fe0fokr433-0:nth-of-type(1) > input.\\00002b50\\0000fe0fokr433-0:nth-of-type(1)" + "isManual": false, + "selector": ["a[href=\"/\"]"], + "summary": "Fix all of the following:\n Element is in tab order and does not have accessible text\n\nFix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute", + "source": "", + "tags": [ + "cat.name-role-value", + "wcag2a", + "wcag412", + "wcag244", + "section508", + "section508.22.a", + "ACT" ], - "summary": "The change in language for a portion of content is not coded.", - "source": null, - "tags": ["wcag2aa", "wcag312a"], - "igt": "Structure", - "testName": "QwikUI | Headless | Input-phone [interactivity]", + "igt": "", + "testName": "QwikUI | Headless | Input-phone", "shareURL": "", - "createdAt": "2023-03-18T11:48:12.441Z", - "testUrl": "http://127.0.0.1:5173/docs/headless/input-phone/", + "createdAt": "2023-03-25T01:32:42.965Z", + "testUrl": "http://localhost:5173/docs/headless/input-phone/", "testPageTitle": "", "foundBy": "thomas.leperou@gmail.com", "axeVersion": "4.6.3" diff --git a/packages/headless/src/components/input-phone/input-phone.tsx b/packages/headless/src/components/input-phone/input-phone.tsx index e375aaadd..df5333845 100644 --- a/packages/headless/src/components/input-phone/input-phone.tsx +++ b/packages/headless/src/components/input-phone/input-phone.tsx @@ -265,14 +265,20 @@ export const InputPhone = component$( return (
    - Date: Sat, 25 Mar 2023 12:54:02 +1100 Subject: [PATCH 08/12] feat: add Input --- .../headless/src/components/input/input.tsx | 137 ++++++++++++++++++ packages/headless/src/index.ts | 1 + 2 files changed, 138 insertions(+) create mode 100644 packages/headless/src/components/input/input.tsx diff --git a/packages/headless/src/components/input/input.tsx b/packages/headless/src/components/input/input.tsx new file mode 100644 index 000000000..a468d336e --- /dev/null +++ b/packages/headless/src/components/input/input.tsx @@ -0,0 +1,137 @@ +import { + component$, + JSXNode, + QRL, + QwikIntrinsicElements, + type Signal, + Slot, + useSignal, + useId, + createContextId, + useContextProvider, + useContext, +} from '@builder.io/qwik'; +import { Switch as InputSwitch } from '../switch/switch'; +import { InputPhone, type InputPhoneProps } from '../input-phone'; + +type InputContextService = { + ref: Signal; + id: string; +}; + +const inputContext = createContextId( + 'input-context-service' +); + +/** + * + */ + +type ControlProps = QwikIntrinsicElements['div'] & { + resolve$?: QRL<(ref: Signal) => JSXNode>; +}; + +export const Root = component$((props: ControlProps) => { + const contextService: InputContextService = { + ref: useSignal(), + id: props.id || useId(), + }; + useContextProvider(inputContext, contextService); + + return ( +
    + +
    + ); +}); + +/** + * + */ + +type LabelProps = QwikIntrinsicElements['label']; + +export const Label = component$((props: LabelProps) => { + const context = useContext(inputContext); + const id = props.id || context.id; + + return ( + + ); +}); + +/** + * + */ + +type HintProps = QwikIntrinsicElements['small']; + +export const Hint = component$((props: HintProps) => { + const context = useContext(inputContext); + const id = props.id || context.id; + + return ( +
    + +
    + ); +}); + +/** + * + */ + +type InputMessage = QwikIntrinsicElements['div'] & { + status?: 'rejected' | 'pending' | 'resolved'; +}; + +export const Message = component$((props: InputMessage) => { + const context = useContext(inputContext); + const id = props.id || context.id; + + return ( +
    + +
    + ); +}); + +/** + * + */ + +type InputSwtichProps = QwikIntrinsicElements['input']; + +export const Switch = component$((props: InputSwtichProps) => { + const context = useContext(inputContext); + const id = props.id || context.id; + + return ( + + ); +}); + +/** + * + */ + +// type InputPhone = QwikIntrinsicElements['input']; + +export const Phone = component$((props: InputPhoneProps) => { + const context = useContext(inputContext); + const id = props.id || context.id; + + return ( + + ); +}); diff --git a/packages/headless/src/index.ts b/packages/headless/src/index.ts index 1de4a57a3..aa5f1ed5a 100644 --- a/packages/headless/src/index.ts +++ b/packages/headless/src/index.ts @@ -6,6 +6,7 @@ export * from './components/pagination/pagination'; export * from './components/collapse/collapse'; export * from './components/drawer'; export * from './components/input-phone'; +export * as Input from './components/input/input'; export * from './components/spinner/spinner'; export * from './components/menu/menu'; export * from './components/popover'; From aa722091c69fa0a874a9a958801ecadc071d68f8 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 12:54:16 +1100 Subject: [PATCH 09/12] docs: add Input docs headless --- .../src/routes/docs/headless/input/index.tsx | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 apps/website/src/routes/docs/headless/input/index.tsx diff --git a/apps/website/src/routes/docs/headless/input/index.tsx b/apps/website/src/routes/docs/headless/input/index.tsx new file mode 100644 index 000000000..e1736a707 --- /dev/null +++ b/apps/website/src/routes/docs/headless/input/index.tsx @@ -0,0 +1,85 @@ +import { component$, useStylesScoped$ } from '@builder.io/qwik'; +import { Input } from '@qwik-ui/headless'; + +const { Root, Label, Hint, Phone, Message } = Input; + +export default component$(() => { + const { scopeId } = useStylesScoped$(` + h1 { margin: 2rem 0; padding-top: 1rem; font-weight: bold; border-top: 1px dotted #222} + h2 { margin-block: 1.15em 0.5em; font-size: xx-large; } + h3 { margin-block: 0.85em 0.35em; font-size: x-large; } + h4 { margin-block: 0.85em 0.35em; font-size: x-large; } + + hr { + margin-block: 2em; + } + `); + + return ( + <> +

    This is the documentation for the Input

    + +

    Valid input

    + + + + + Shipper will call at this phone number when your parcel is delivered. + + + Your phone number is valid + + +
    + +

    Pending input

    + + + + + Shipper will call at this phone number when your parcel is delivered. + + + Your phone number is being verified + + +
    + +

    Valid invalid

    + + + + + Shipper will call at this phone number when your parcel is delivered. + + + Your phone number is valid + + +
    + +

    Part

    + +
      +
    • Root
    • +
    • Hint
    • +
    • Message
    • +
    • inputs - tbd
    • +
    + +
    + +

    Outputs

    + +
      +
    • same as any inputs
    • +
    + + ); +}); From f8855bcdb69d142f18a307274ccb41040076021f Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 12:54:41 +1100 Subject: [PATCH 10/12] feat: add Input a11y axe report --- .../src/components/input/input.axe.json | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 packages/headless/src/components/input/input.axe.json diff --git a/packages/headless/src/components/input/input.axe.json b/packages/headless/src/components/input/input.axe.json new file mode 100644 index 000000000..a6fd19c30 --- /dev/null +++ b/packages/headless/src/components/input/input.axe.json @@ -0,0 +1,81 @@ +{ + "url": "http://localhost:5173/docs/headless/input/", + "extensionVersion": "4.52.0", + "axeVersion": "4.6.3", + "standard": "WCAG 2.1 AA", + "testingStartDate": "2023-03-25T01:22:04.996Z", + "testingEndDate": "2023-03-25T01:24:40.848Z", + "bestPracticesEnabled": true, + "issueSummary": { + "critical": 0, + "moderate": 0, + "minor": 0, + "serious": 0, + "bestPractices": 0, + "needsReview": 0 + }, + "remainingTestingSummary": { + "run": false + }, + "igtSummary": [ + { + "tool": "Table", + "skipped": false, + "name": null, + "run": false + }, + { + "tool": "Keyboard", + "skipped": false, + "name": "3/25/2023 at 12:22 PM", + "run": true, + "issues": { + "critical": 0, + "moderate": 0, + "minor": 0, + "serious": 0 + }, + "duration": 32593 + }, + { + "tool": "Modal Dialog", + "skipped": false, + "name": null, + "run": false + }, + { + "tool": "Interactive Elements", + "skipped": false, + "name": "3/25/2023 at 12:22 PM", + "run": true, + "issues": { + "critical": 0, + "moderate": 0, + "minor": 0, + "serious": 0 + }, + "duration": 101542 + }, + { + "tool": "Structure", + "skipped": false, + "name": null, + "run": false + }, + { + "tool": "Images", + "skipped": false, + "name": null, + "run": false + }, + { + "tool": "Forms", + "skipped": false, + "name": null, + "run": false + } + ], + "failedRules": [], + "needsReview": [], + "allIssues": [] +} From 93902dccbdab2f24afdd498a961c88c56631fec3 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Sat, 25 Mar 2023 12:56:05 +1100 Subject: [PATCH 11/12] docs: remove Switch from example --- .../headless/src/components/input/input.tsx | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/packages/headless/src/components/input/input.tsx b/packages/headless/src/components/input/input.tsx index a468d336e..e6cc7b599 100644 --- a/packages/headless/src/components/input/input.tsx +++ b/packages/headless/src/components/input/input.tsx @@ -11,7 +11,6 @@ import { useContextProvider, useContext, } from '@builder.io/qwik'; -import { Switch as InputSwitch } from '../switch/switch'; import { InputPhone, type InputPhoneProps } from '../input-phone'; type InputContextService = { @@ -98,25 +97,6 @@ export const Message = component$((props: InputMessage) => { ); }); -/** - * - */ - -type InputSwtichProps = QwikIntrinsicElements['input']; - -export const Switch = component$((props: InputSwtichProps) => { - const context = useContext(inputContext); - const id = props.id || context.id; - - return ( - - ); -}); - /** * */ From a1122e0876e03e0968ef62341d358fc0efaff535 Mon Sep 17 00:00:00 2001 From: Thomas LEPEROU Date: Fri, 31 Mar 2023 11:43:26 +1100 Subject: [PATCH 12/12] fix: remove role presentation --- packages/headless/src/components/input/input.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/headless/src/components/input/input.tsx b/packages/headless/src/components/input/input.tsx index e6cc7b599..3ded58c2c 100644 --- a/packages/headless/src/components/input/input.tsx +++ b/packages/headless/src/components/input/input.tsx @@ -38,7 +38,7 @@ export const Root = component$((props: ControlProps) => { useContextProvider(inputContext, contextService); return ( -
    +
    ); @@ -101,8 +101,6 @@ export const Message = component$((props: InputMessage) => { * */ -// type InputPhone = QwikIntrinsicElements['input']; - export const Phone = component$((props: InputPhoneProps) => { const context = useContext(inputContext); const id = props.id || context.id;