@@ -3,11 +3,11 @@ import type {
33 ComponentEntry ,
44 ParsedProps
55} from "@kunai-consulting/code-notate-core" ;
6+ import { Lucide , Popover } from "@qds.dev/ui" ;
67import { component$ , useContext , useTask$ } from "@qwik.dev/core" ;
7-
8- import { Popover } from "@qds.dev/ui" ;
8+ import { H2 , H3 } from "~/mdx/components" ;
99import { rootContextId } from "~/routes/components/layout" ;
10- import { MainHeading , SubHeading } from "../toc/toc " ;
10+ import { Spacer } from "../spacer/spacer " ;
1111
1212type DataAttribute = {
1313 name : string ;
@@ -105,9 +105,11 @@ export const APITable = component$(({ api }: { api: ComponentParts }) => {
105105 } ) ;
106106
107107 return (
108- < div class = "overflow-x-auto" >
109- < MainHeading id = "api-reference" > API Reference</ MainHeading >
110- { items . map ( ( item , index ) => {
108+ < div class = "overflow-x-auto sm:overflow-x-visible" >
109+ < H2 id = "api-reference" class = "mt-16 mb-6" >
110+ API Reference
111+ </ H2 >
112+ { items . map ( ( item ) => {
111113 const componentData = Object . entries ( item ) [ 0 ] ;
112114 const [ itemName , itemProps ] = componentData ;
113115
@@ -117,50 +119,58 @@ export const APITable = component$(({ api }: { api: ComponentParts }) => {
117119
118120 return (
119121 < div key = { itemName } >
120- < div
121- class = { `h-[1px] bg-neutral-primary ${ index === 0 ? "mt-0" : "mt-8" } ` }
122- aria-hidden = "true"
123- />
124- < SubHeading id = { itemName } > { itemName } </ SubHeading >
122+ < H3 id = { itemName } > { itemName } </ H3 >
125123 { itemProps . inheritsFrom && (
126- < p class = "mb-4 text-sm text-neutral-foreground mt-4" >
127- Inherits from:{ " " }
128- < code class = "px-2 py-1 !bg-neutral-primary !text-qwik-blue-300" >
129- { `<${ itemProps . inheritsFrom } />` }
130- </ code >
124+ < p class = "text-sm my-6 font-semibold leading-[137.5%]" >
125+ < span class = "text-light-700" > Inherits from: </ span >
126+ < code class = "text-blue-600 ml-1" > { `<${ itemProps . inheritsFrom } />` } </ code >
131127 </ p >
132128 ) }
133129
134130 { /* Props Table */ }
135131 { propsArray && propsArray . length > 0 && (
136132 < >
137- < h4 class = "mb-2 font-medium " > Props</ h4 >
138- < div class = "border-neutral-primary border mb-6" >
133+ < h4 class = "mb-2 font-semibold " > Props</ h4 >
134+ < div class = "border-blue-500 border-[1.6px] overflow-hidden shadow-[6px_6px_0_0px_var(--color-blue-200)] mb-6" >
139135 < table class = "w-full border-collapse text-sm" >
140136 < thead >
141- < tr class = "border-b border-neutral-primary bg-neutral-primary" >
142- < th class = "py-4 px-4 text-left font-medium" > Prop</ th >
143- < th class = "py-4 px-4 text-left font-medium" > Type</ th >
144- < th class = "py-4 px-4 text-left font-medium" > Default</ th >
145- < th class = "py-4 px-4 text-left font-medium" > Description</ th >
137+ < tr class = "border-b-[1.6px] border-blue-500 bg-blue-200" >
138+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase border-r-[1.6px] border-blue-500" >
139+ Prop
140+ </ th >
141+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase border-r-[1.6px] border-blue-500" >
142+ Type
143+ </ th >
144+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase border-r-[1.6px] border-blue-500" >
145+ Default
146+ </ th >
147+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase" >
148+ Description
149+ </ th >
146150 </ tr >
147151 </ thead >
148152 < tbody >
149153 { propsArray . map ( ( prop : ParsedProps ) => (
150154 < tr
151155 key = { prop . prop }
152- class = "border-b last-of-type:border-b-0 border-qwik-neutral-900 "
156+ class = "border-b-[1.6px] last-of-type:border-b-0 border-blue-500 "
153157 >
154- < td class = "py-4 px-4 text-sm" > { prop . prop } </ td >
155- < td class = "py-4 px-4 text-sm" > { prop . type } </ td >
156- < td class = "py-4 px-4 text-sm" > { prop . defaultValue || "-" } </ td >
157- < td class = "py-4 px-4" >
158+ < td class = "py-[10px] px-4 text-sm border-r-[1.6px] border-blue-500" >
159+ { prop . prop }
160+ </ td >
161+ < td class = "py-[10px] px-4 text-sm border-r-[1.6px] border-blue-500" >
162+ { prop . type }
163+ </ td >
164+ < td class = "py-[10px] px-4 text-sm border-r-[1.6px] border-blue-500" >
165+ { prop . defaultValue || "-" }
166+ </ td >
167+ < td class = "py-[10px] px-4" >
158168 { prop . comment && (
159169 < Popover . Root >
160- < Popover . Trigger class = "text-qwik-blue-500 hover:text-blue-300 cursor-pointer" >
161- Details
170+ < Popover . Trigger class = "text-qwik-blue-500 hover:text-blue-300 cursor-pointer w-fit " >
171+ < Lucide . Info class = "size-5 text-lavender-600" />
162172 </ Popover . Trigger >
163- < Popover . Content class = "p-4 max-w-xs bg-neutral-foreground rounded-md mt-1 " >
173+ < Popover . Content class = "bg-neutral-foreground mt-1 w-fit max-w-[500px] rounded-full shadow-[4px_4px_0_0px_#6C2CC4] border-[1.6px] border-lavender-500 py-1.5 px-3 " >
164174 { prop . comment }
165175 </ Popover . Content >
166176 </ Popover . Root >
@@ -177,30 +187,35 @@ export const APITable = component$(({ api }: { api: ComponentParts }) => {
177187 { /* Data Attributes Table */ }
178188 { itemProps . dataAttributes && itemProps . dataAttributes . length > 0 && (
179189 < >
180- < h4 class = "mb-2 font-medium " > Data Attributes</ h4 >
181- < div class = "border-neutral-primary border" >
190+ < h4 class = "mb-2 font-semibold " > Data Attributes</ h4 >
191+ < div class = "border-blue-500 border-[1.6px] overflow-hidden shadow-[6px_6px_0_0px_var(--color-blue-200)] " >
182192 < table class = "w-full border-collapse text-sm" >
183193 < thead >
184- < tr class = "border-b border-neutral-primary bg-neutral-primary" >
185- < th class = "py-4 px-4 text-left font-medium" > Attribute</ th >
186- < th class = "py-4 px-4 text-left font-medium" > Description</ th >
194+ < tr class = "border-b-[1.6px] border-blue-500 bg-blue-200" >
195+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase border-r-[1.6px] border-blue-500" >
196+ Attribute
197+ </ th >
198+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase" >
199+ Description
200+ </ th >
187201 </ tr >
188202 </ thead >
189203 < tbody >
190204 { itemProps . dataAttributes . map ( ( attr : DataAttribute ) => (
191205 < tr
192206 key = { attr . name }
193- class = "border-b last-of-type:border-b-0 border-neutral-primary "
207+ class = "border-b-[1.6px] last-of-type:border-b-0 border-blue-500 "
194208 >
195- < td class = "py-4 px-4 text-sm text-qwik- blue-200 " >
209+ < td class = "py-[10px] px-4 text-sm border-r-[1.6px] border- blue-500 text-blue-600 " >
196210 { attr . name }
197211 </ td >
198- < td class = "py-4 px-4" > { attr . comment } </ td >
212+ < td class = "py-[10px] px-4 text-light-700 " > { attr . comment } </ td >
199213 </ tr >
200214 ) ) }
201215 </ tbody >
202216 </ table >
203217 </ div >
218+ < Spacer class = "h-12" />
204219 </ >
205220 ) }
206221 </ div >
@@ -210,28 +225,34 @@ export const APITable = component$(({ api }: { api: ComponentParts }) => {
210225 { /* Add Keyboard Interactions Table */ }
211226 { api . keyboardInteractions && api . keyboardInteractions . length > 0 && (
212227 < >
213- < MainHeading id = "accessibility" > Accessibility</ MainHeading >
214- < SubHeading id = "keyboard-interactions" > Keyboard Interactions</ SubHeading >
215- < div class = "border-neutral-primary border mt-6" >
216- < table class = "w-full border-collapse border-spacing-1 text-sm" >
228+ < H2 id = "accessibility" class = "mt-16 mb-6" >
229+ Accessibility
230+ </ H2 >
231+ < H3 id = "keyboard-interactions" > Keyboard Interactions</ H3 >
232+ < div class = "border-blue-500 border-[1.6px] overflow-hidden shadow-[6px_6px_0_0px_var(--color-blue-200)] mt-6" >
233+ < table class = "w-full border-collapse text-sm" >
217234 < thead >
218- < tr class = "border-b border-neutral-primary bg-neutral-primary" >
219- < th class = "py-4 px-4 text-left font-medium" > Key</ th >
220- < th class = "py-4 px-4 text-left font-medium" > Description</ th >
235+ < tr class = "border-b-[1.6px] border-blue-500 bg-blue-200" >
236+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase border-r-[1.6px] border-blue-500" >
237+ Key
238+ </ th >
239+ < th class = "py-[10px] px-4 text-left font-bold text-blue-600 uppercase" >
240+ Description
241+ </ th >
221242 </ tr >
222243 </ thead >
223244 < tbody >
224245 { api . keyboardInteractions . map ( ( interaction ) => (
225246 < tr
226247 key = { interaction . key }
227- class = "border-b last-of-type:border-b-0 border-neutral-primary "
248+ class = "border-b-[1.6px] last-of-type:border-b-0 border-blue-500 "
228249 >
229- < td class = "py-4 px-4 text-sm flex items-center " >
230- < span class = "bg-neutral-interactive px-3 py-1 border-b-2 border-neutral-primary rounded-md" >
250+ < td class = "py-[10px] px-4 text-sm border-r-[1.6px] border-blue-500 " >
251+ < span class = "bg-neutral-interactive px-4 py-1.5 border-b-4 border-[#6A7581] bg-light-700 rounded-md inline-flex items-center text-white " >
231252 { interaction . key }
232253 </ span >
233254 </ td >
234- < td class = "py-4 px-4" > { interaction . comment } </ td >
255+ < td class = "py-[10px] px-4 text-light-700 " > { interaction . comment } </ td >
235256 </ tr >
236257 ) ) }
237258 </ tbody >
0 commit comments