Skip to content

Commit 1174068

Browse files
authored
Merge pull request #385 from shairez/pr-fluffy-panda-experiment
2 parents b5dacac + d2c0516 commit 1174068

38 files changed

+5924
-721
lines changed

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx --no-install commitlint --edit $1
4+
pnpm exec commitlint --edit $1

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
dist
66
node_modules
77
coverage
8-
**/*.mdx
8+
**/*.mdx
9+
discussion

apps/website/src/routes/docs.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
@apply lg:ml-80 w-full lg:max-w-4xl xl:max-w-6xl py-8 px-8 lg:px-16;
44
}
55

6-
/*
6+
/*
77
Styles that are direct descendents of .docs
8-
this should not affect the styles inside of the tabpanel
8+
this should not affect the styles inside of the tabpanel
99
A.K.A the components
1010
*/
1111
& > {
@@ -31,11 +31,11 @@
3131
}
3232

3333
h3 {
34-
@apply text-xl font-bold mb-6;
34+
@apply text-xl font-bold mt-4 mb-6;
3535
}
3636

3737
h4 {
38-
@apply text-lg mb-6;
38+
@apply text-lg mt-4 mb-6;
3939
}
4040

4141
h5 {

apps/website/src/routes/docs/_components/api-table/api-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type APITableProps = {
1212
export const APITable = component$(({ propDescriptors }: APITableProps) => {
1313
return (
1414
<div class="overflow-auto">
15-
<table class="w-full min-w-[540px] border-b border-gray-700 text-left sm:min-w-full">
15+
<table class="w-full min-w-[540px] border-b border-gray-700 text-left sm:min-w-full mb-6">
1616
<tbody class="divide-y divide-gray-700">
1717
<tr class="w-1/4 dark:text-white ">
1818
<td class="w-1/6 whitespace-nowrap py-2 pl-4 text-sm font-medium sm:pl-0">

apps/website/src/routes/docs/headless/(components)/tabs/examples.tsx

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ export const AutomaticBehaviorTabsExample = component$(() => {
102102
return (
103103
<PreviewCodeExample>
104104
<div q:slot="actualComponent" class="tabs-example mr-auto">
105+
<h3>Danish Composers</h3>
106+
<h4>(Hover over the tabs)</h4>
105107
<Tabs behavior="automatic">
106-
<h3>Danish Composers</h3>
107-
<h4>(Hover over the tabs)</h4>
108108
<TabList>
109109
<Tab>Maria Ahlefeldt</Tab>
110110
<Tab>Carl Andersen</Tab>
@@ -203,7 +203,7 @@ export const OnSelectedIndexChangeTabsExample = component$(() => {
203203
<PreviewCodeExample>
204204
<div q:slot="actualComponent" class="tabs-example mr-auto">
205205
<Tabs
206-
onSelectedIndexChange$={(index) => {
206+
onSelectedIndexChange$={(index: number) => {
207207
selectedIndexSig.value = index;
208208
}}
209209
>
@@ -234,6 +234,42 @@ export const OnSelectedIndexChangeTabsExample = component$(() => {
234234
);
235235
});
236236

237+
export const SelectedTabIdExample = component$(() => {
238+
const selectedTabIdSig = useSignal<string | undefined>();
239+
240+
return (
241+
<PreviewCodeExample>
242+
<div q:slot="actualComponent" class="tabs-example mr-auto">
243+
<Tabs bind:selectedTabId={selectedTabIdSig}>
244+
<h3>Danish Composers</h3>
245+
<TabList>
246+
<Tab tabId="Maria">Maria Ahlefeldt</Tab>
247+
<Tab tabId="Carl">Carl Andersen</Tab>
248+
<Tab tabId="Ida">Ida Henriette da Fonseca</Tab>
249+
</TabList>
250+
<TabPanel>
251+
<p>Maria Theresia Ahlefeldt (16 January 1755 - 20 December 1810) was a ...</p>
252+
</TabPanel>
253+
<TabPanel>
254+
<p>Carl Joachim Andersen (29 April 1847 - 7 May 1909) was a ...</p>
255+
</TabPanel>
256+
<TabPanel>
257+
<p>Ida Henriette da Fonseca (July 27, 1802 - July 6, 1858) was a ...</p>
258+
</TabPanel>
259+
</Tabs>
260+
<br />
261+
<p>
262+
<strong>Selected Tab Id</strong>: {selectedTabIdSig.value}
263+
</p>
264+
</div>
265+
266+
<div q:slot="codeExample">
267+
<Slot />
268+
</div>
269+
</PreviewCodeExample>
270+
);
271+
});
272+
237273
export const OnClickTabsExample = component$(() => {
238274
const tabsClickedCountSig = useSignal(0);
239275

@@ -272,3 +308,34 @@ export const OnClickTabsExample = component$(() => {
272308
</PreviewCodeExample>
273309
);
274310
});
311+
312+
export const SelectedPropExample = component$(() => {
313+
return (
314+
<PreviewCodeExample>
315+
<div q:slot="actualComponent" class="tabs-example mr-auto">
316+
<h3>Danish Composers</h3>
317+
318+
<Tabs>
319+
<TabList>
320+
<Tab>Maria Ahlefeldt</Tab>
321+
<Tab selected>Carl Andersen</Tab>
322+
<Tab>Ida Henriette da Fonseca</Tab>
323+
</TabList>
324+
<TabPanel>
325+
<p>Maria Theresia Ahlefeldt (16 January 1755 - 20 December 1810) was a ...</p>
326+
</TabPanel>
327+
<TabPanel>
328+
<p>Carl Joachim Andersen (29 April 1847 - 7 May 1909) was a ...</p>
329+
</TabPanel>
330+
<TabPanel>
331+
<p>Ida Henriette da Fonseca (July 27, 1802 - July 6, 1858) was a ...</p>
332+
</TabPanel>
333+
</Tabs>
334+
</div>
335+
336+
<div q:slot="codeExample">
337+
<Slot />
338+
</div>
339+
</PreviewCodeExample>
340+
);
341+
});

0 commit comments

Comments
 (0)