Skip to content

Commit 1d663c5

Browse files
authored
Merge pull request #540 from qwikifiers/pr-qwik-1-3
2 parents e8124d1 + 8d1397b commit 1d663c5

File tree

15 files changed

+570
-518
lines changed

15 files changed

+570
-518
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ on:
44
- workflow_dispatch
55

66
jobs:
7-
# test:
8-
# runs-on: ubuntu-latest
7+
test:
8+
runs-on: ubuntu-latest
99

10-
# strategy:
11-
# matrix:
12-
# node_version: [16, 18, 20, 21]
10+
strategy:
11+
matrix:
12+
node_version: [16, 18, 20, 21]
1313

14-
# steps:
15-
# - uses: actions/checkout@v3
16-
# - name: Setup
17-
# uses: ./.github/actions/setup
18-
# with:
19-
# node_version: ${{ matrix.node_version }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup
17+
uses: ./.github/actions/setup
18+
with:
19+
node_version: ${{ matrix.node_version }}
2020

21-
# - name: Test
22-
# uses: ./.github/actions/test
23-
# with:
24-
# codecov_token: ${{ secrets.CODECOV_TOKEN }}
21+
- name: Test
22+
uses: ./.github/actions/test
23+
with:
24+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
2525

2626
release:
2727
runs-on: ubuntu-latest
2828

2929
if: github.ref == 'refs/heads/main'
3030

31-
# needs: [test]
31+
needs: [test]
3232

3333
steps:
3434
- uses: actions/checkout@v3

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
},
2929
"packageManager": "[email protected]",
3030
"devDependencies": {
31-
"@builder.io/qwik": "github:BuilderIO/qwik-build#decd924161c22323caecc64628b736d1d6d6e3fc",
32-
"@builder.io/qwik-city": "github:BuilderIO/qwik-city-build#58208e2036d6907d18d01980a3da26d10b84c85e",
31+
"@builder.io/qwik": "^1.3.0",
32+
"@builder.io/qwik-city": "^1.3.0",
3333
"@builder.io/vite-plugin-macro": "~0.0.7",
3434
"@commitlint/cli": "^17.7.1",
3535
"@commitlint/config-angular": "^17.7.0",
@@ -89,7 +89,7 @@
8989
"eslint": "^8.48.0",
9090
"eslint-config-prettier": "9.0.0",
9191
"eslint-plugin-cypress": "^2.14.0",
92-
"eslint-plugin-qwik": "^1.2.19",
92+
"eslint-plugin-qwik": "^1.3.0",
9393
"eslint-plugin-storybook": "^0.6.13",
9494
"focus-trap": "7.5.3",
9595
"husky": "^8.0.3",

packages/kit-headless/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"rules": {
3+
"qwik/valid-lexical-scope": "off",
34
"@typescript-eslint/no-unused-vars": [
45
"error",
56
// allow unused vars starting with _
@@ -28,7 +29,7 @@
2829
}
2930
},
3031
"plugins": ["@typescript-eslint"],
31-
"ignorePatterns": ["!**/*", "**/.storybook/*"],
32+
"ignorePatterns": ["!**/*", "cypress.config.ts", "**/.storybook/*"],
3233
"overrides": [
3334
{
3435
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],

packages/kit-headless/src/components/accordion/accordion-root.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import {
22
$,
3-
component$,
43
Slot,
4+
component$,
55
useContextProvider,
66
useSignal,
77
useTask$,
8-
type QwikIntrinsicElements,
9-
type PropFunction,
108
useVisibleTask$,
9+
type PropFunction,
10+
type QwikIntrinsicElements,
1111
} from '@builder.io/qwik';
1212

13-
import { type AccordionRootContext } from './accordion-context.type';
1413
import { accordionRootContextId } from './accordion-context-id';
14+
import { type AccordionRootContext } from './accordion-context.type';
1515

1616
export type AccordionRootProps = {
1717
behavior?: 'single' | 'multi';
@@ -40,6 +40,7 @@ export const AccordionRoot = component$(
4040

4141
useTask$(({ track }) => {
4242
track(() => currSelectedTriggerIndexSig.value);
43+
4344
if (onSelectedIndexChange$) {
4445
onSelectedIndexChange$(currSelectedTriggerIndexSig.value);
4546
}

packages/kit-headless/src/components/carousel/carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ type ControlContext = {
117117
id: string;
118118
};
119119

120-
type ControlsProps = QwikIntrinsicElements['div'];
120+
type ControlsProps = QwikIntrinsicElements['nav'];
121121

122122
export const controlContext = createContextId<ControlContext>('carousel-control-root');
123123

packages/kit-headless/src/components/checkbox/checkbox.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type CheckboxProps = QwikIntrinsicElements['input'] & {
2626
id?: string;
2727
value?: string;
2828
tabIndex?: number;
29-
onChange?: PropFunction<
29+
onChange$?: PropFunction<
3030
(event: QwikChangeEvent<HTMLInputElement>, element: HTMLInputElement) => void
3131
>;
3232
};
@@ -40,7 +40,7 @@ export const Root = component$(
4040
id,
4141
value,
4242
tabIndex,
43-
onChange,
43+
onChange$,
4444
...props
4545
}: CheckboxProps) => {
4646
return (
@@ -56,8 +56,8 @@ export const Root = component$(
5656
value={value}
5757
tabIndex={tabIndex}
5858
onChange$={(event, element) => {
59-
if (onChange) {
60-
onChange(event, element);
59+
if (onChange$) {
60+
onChange$(event, element);
6161
}
6262
}}
6363
{...props}

packages/kit-headless/src/components/separator/separator.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('Critical Functionality', () => {
5151

5252
it('GIVEN invalid orientation prop THEN console.warn is called', () => {
5353
const consoleSpy = cy.spy(console, 'warn');
54+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5455
cy.mount(<Separator orientation={'invalid' as any} />);
5556

5657
cy.wrap(consoleSpy).should('have.been.calledWithMatch', /Invalid prop 'orientation'/);

packages/kit-headless/src/components/tabs/tabs.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ export type TabInfo = {
7070
// unchanged so signals keep working
7171
export const Tabs: FunctionComponent<TabsProps> = (props) => {
7272
const { children: myChildren, tabClass, panelClass, ...rest } = props;
73-
const childrenToProcess = (
74-
Array.isArray(myChildren) ? [...myChildren] : [myChildren]
75-
) as JSXNode[];
73+
const childrenToProcess = Array.isArray(myChildren) ? [...myChildren] : [myChildren];
7674
let tabListComponent: JSXNode | undefined;
7775
const tabComponents: JSXNode[] = [];
7876
const panelComponents: JSXNode[] = [];
@@ -82,7 +80,7 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
8280

8381
// Extract the Tab related components from the children
8482
while (childrenToProcess.length) {
85-
const child = childrenToProcess.shift();
83+
const child = childrenToProcess.shift() as JSXNode;
8684
if (!child) {
8785
continue;
8886
}
@@ -111,12 +109,12 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
111109
break;
112110
}
113111
case TabPanel: {
114-
const { label, selected } = child.props;
112+
const { label, selected } = child.props as TabPanelProps;
115113
// The consumer must provide a key if they change the order
116114
const matchedTabComponent = tabComponents[panelIndex];
117115
const tabIdFromTabMaybe =
118-
matchedTabComponent?.props.tabId || matchedTabComponent?.key;
119-
const tabId = tabIdFromTabMaybe || child.key || `${panelIndex}`;
116+
(matchedTabComponent?.props as TabProps).tabId || matchedTabComponent?.key;
117+
const tabId: string = tabIdFromTabMaybe || child.key || `${panelIndex}`;
120118

121119
if (label) {
122120
tabComponents.push(<Tab>{label}</Tab>);
@@ -136,6 +134,7 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
136134
tabInfoList.push({
137135
tabId,
138136
index: panelIndex,
137+
tabProps: {},
139138
panelProps: child.props,
140139
} as TabInfo);
141140
panelIndex++;
@@ -165,7 +164,7 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
165164
) {
166165
tab.props.disabled = tabInfoList[index].panelProps.disabled;
167166
}
168-
tabInfoList[index].tabProps = tab.props;
167+
tabInfoList[index].tabProps = tab.props as TabProps;
169168
});
170169

171170
if (tabListComponent) {

packages/kit-headless/src/utils/clsq.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

packages/kit-material/src/components/button/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type MaterialButtonProps = {
1212
export type ButtonProps = HTMLButtonProps & MaterialButtonProps;
1313

1414
export const Button = component$((props: ButtonProps) => {
15-
const { class: classNames, disabled, floating, flat, size = 'medium', ...rest } = props;
15+
const { disabled, floating, flat, size = 'medium', ...rest } = props;
1616

1717
return (
1818
<button

0 commit comments

Comments
 (0)