Skip to content

Commit 13ae35f

Browse files
committed
feat: 1/2 to using dot.Notation
1 parent 41b15f4 commit 13ae35f

File tree

8 files changed

+22
-9
lines changed

8 files changed

+22
-9
lines changed

packages/kit-headless/src/components/checkbox/checkbox.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, test, type Page } from '@playwright/test';
22
import { createTestDriver } from './checkbox.driver';
3-
import { getTriBool } from './checklist-context-wrapper';
3+
import { getTriBool } from '../checklist/checklist-context-wrapper';
44
async function setup(page: Page, exampleName: string) {
55
await page.goto(`/headless/checkbox/${exampleName}`);
66

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export * from './checkbox';
2-
export * from './checkbox-indicator';
3-
export * from './checklist-context-wrapper';
4-
export * from './checklist-indicator';
5-
export * from './checklist';
1+
export { Checkbox as Root } from './checkbox';
2+
export { CheckboxIndicator as Indicator } from './checkbox-indicator';
63
export * from './context-id';

packages/kit-headless/src/components/checkbox/checklist.tsx renamed to packages/kit-headless/src/components/checklist/checklist.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type JSXNode, Component, PropsOf } from '@builder.io/qwik';
2-
import { Checkbox, type MixedStateCheckboxProps } from './checkbox';
2+
import { Checkbox, type MixedStateCheckboxProps } from '../checkbox/checkbox';
33
import { ChecklistContextWrapper, getTriBool } from './checklist-context-wrapper';
44

55
type CheckListProps = PropsOf<'ul'> & { ariaLabeledBy: string };
@@ -8,7 +8,7 @@ type CheckListProps = PropsOf<'ul'> & { ariaLabeledBy: string };
88
This is an inline component. An example use case of an inline component to get the proper indexes with CSR. See issue #4757
99
for more information.
1010
*/
11-
export const CheckList: Component<CheckListProps> = (props: CheckListProps) => {
11+
export const Checklist: Component<CheckListProps> = (props: CheckListProps) => {
1212
const checkArr: JSXNode[] = [];
1313
const hellSigs = [];
1414
let checklistCheckbox = undefined;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Signal, createContextId } from '@builder.io/qwik';
2+
import { TriBool } from './checklist-context-wrapper';
3+
4+
export type ArrSigs = Signal<boolean>[];
5+
type CheckContextObj = {
6+
checklistSig: Signal<TriBool>;
7+
checkboxes: Signal<ArrSigs>;
8+
idArr: string[];
9+
};
10+
export const CheckListContext = createContextId<CheckContextObj>('CheckList.context');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export { Checklist as Root } from './checklist';
2+
export * from './checklist-context-wrapper';
3+
export { ChecklistIndicator as Indicator } from './checklist-indicator';
4+
export * from './context-id';

packages/kit-headless/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ export * as Carousel from './components/carousel';
33
export * as Collapsible from './components/collapsible';
44
export * as Combobox from './components/combobox';
55
export { type ResolvedOption } from './components/combobox';
6-
export * from './components/label';
6+
export * from './components/carousel';
7+
export * as Checkbox from './components/checkbox/checkbox';
8+
export * as Checklist from './components/checklist/checklist';
79
export * as Modal from './components/modal';
810
export { Pagination } from './components/pagination';
911
export * as Popover from './components/popover';

0 commit comments

Comments
 (0)