Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(modal): provide initial implementation #277

Merged
merged 154 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
36fdfec
feat(dialog): add dialog
GregOnNet May 2, 2023
bfc48a7
feat(dialog): introduce Dialog.Trigger & Dialog.Portal
GregOnNet May 2, 2023
b2b4a4d
test(dialog): provide basic tests
GregOnNet May 2, 2023
64250a8
refactor(dialog): remove class-overrides
GregOnNet May 2, 2023
cc26112
docs(headless): add dialog
GregOnNet May 4, 2023
ea5ba0e
fix(dialog): close dialog on backdrop click
GregOnNet May 12, 2023
bcd283b
refactor(dialog): clean up code
GregOnNet May 12, 2023
964f34d
refactor(dialog): split components in seperate files
GregOnNet May 12, 2023
f6f40ef
refactor(dialog): split components in separate files
GregOnNet May 12, 2023
65d7b9a
docs(dialog): remove unused examples
GregOnNet May 12, 2023
c846303
test(dialog): add storybook story
GregOnNet May 18, 2023
74a9b55
fix(dialog:a11y): replce role=button with section element
GregOnNet May 18, 2023
6499f88
refactor(dialog): set story title automatically
GregOnNet May 18, 2023
8e85362
fix(dialog): export dialog from headless library
GregOnNet May 18, 2023
cedd23f
docs(dialog): explain why the storybook test is not valuable
GregOnNet May 18, 2023
253fd58
feat(dialog): add Dialog.Actions
GregOnNet May 20, 2023
a8470ed
feat(dialog): support full-screen mode
GregOnNet May 20, 2023
4b14485
refactor(dialog): rename Portal to Content
GregOnNet May 20, 2023
64997dc
feat(dialog): all dialog overrides are passed via Dialog.Root
GregOnNet May 20, 2023
61ace39
feat(dialog): add Dialog.Title
GregOnNet May 20, 2023
0591394
feat(dialog): stop passing through every dialog-property
GregOnNet May 21, 2023
017164a
feat(dialog): add ContentText
GregOnNet May 21, 2023
cb578e4
feat(dialog): expose props of Dialog.Root
GregOnNet May 21, 2023
f320e0c
refactor(dialog): add $ suffix
GregOnNet May 21, 2023
7713ed1
fix(dialog): resolve lint-error concerning scope
GregOnNet May 21, 2023
9aba660
feat(dialog): expose public API via ref
GregOnNet May 21, 2023
2485101
refactor(dialog): simplify story
GregOnNet May 21, 2023
6d4ffc2
feat(dialog): position Dialog.ContentTitle sticky
GregOnNet May 21, 2023
cf6783e
fix(dialog): lock scrolling when dialog is opened
GregOnNet May 23, 2023
a3207ee
docs(dialog): document useVisibleTask$
GregOnNet May 23, 2023
413588b
refactor(dialog): move backdrop-click logic
GregOnNet May 23, 2023
5b292b9
test(dialog): remove useless storybook-play-test
GregOnNet May 25, 2023
70efddb
refactor(dialog): simplify method names
GregOnNet May 25, 2023
584fc0e
feat(dialog): add Example for tailwind dialog
GregOnNet May 28, 2023
2c6cf96
refactor(dialog): reduce API surface
GregOnNet May 30, 2023
394b666
refactor(dialog): introduce helper ensureDialog
GregOnNet May 30, 2023
438cfc5
refactor(dialog): remove $ suffix of function
GregOnNet May 30, 2023
28d4c80
refactor(dialog): transform store to signal
GregOnNet May 30, 2023
b29d0ac
refactor(dialog): transform useVisibleTask$ to useTask$
GregOnNet May 30, 2023
2c93081
feat(dialog): make tailwind example work
GregOnNet May 31, 2023
82ad47f
refactor(dialog): rename opened to isOpen
GregOnNet May 31, 2023
6e2fb7b
refactor(dialog): remove dialog-state
GregOnNet May 31, 2023
a9cf007
refactor(dialog): rename opened to isOpen
GregOnNet May 31, 2023
1b1b7fe
refactor(dialog): remove console.log
GregOnNet May 31, 2023
03f3120
feat(tailwind:dialog): add scrolling content example
GregOnNet May 31, 2023
0cd8aee
fix(tailwind:dialg): correct indentation
GregOnNet May 31, 2023
854ad5e
feat(tailwind:dialog): use <Button/>
GregOnNet May 31, 2023
de0d112
chore(tailwind:dialog): add headings for examples
GregOnNet May 31, 2023
03a6d1f
feat(tailwind:dialog): add full-screen example
GregOnNet May 31, 2023
91130a9
chore(tailwind:dialog): remove autoFocus since it does not work
GregOnNet May 31, 2023
e89a8e6
refactor(dialog): add rename files
GregOnNet Aug 25, 2023
ac97b53
refactor(modal): rename dialog to modal
GregOnNet Aug 25, 2023
c737fce
feat(modal): export public API
GregOnNet Aug 25, 2023
92c1426
refactor(modal): replace dialog with modal term
GregOnNet Aug 25, 2023
3ccc4bb
docs(modal): adjust example
GregOnNet Aug 25, 2023
31e5e2e
docs(modal): reference example in headless menu
GregOnNet Aug 25, 2023
3634321
chore(modal): remove completed todos
GregOnNet Aug 25, 2023
d3219bd
fix(modal): get modal to work again
GregOnNet Aug 25, 2023
6ffa690
feat(modal): use signals instead of exposing functions
GregOnNet Aug 25, 2023
a849cd8
feat(modal): allow styling ModalContent
GregOnNet Sep 19, 2023
986ffe8
refactor(modal): use named function
GregOnNet Sep 19, 2023
104d3ac
chore(dialog): add todos
GregOnNet Sep 19, 2023
b251bdf
docs(modal): reboot examples
GregOnNet Oct 7, 2023
e48645d
docs(modal): use new documentation infrastructure
GregOnNet Oct 7, 2023
669983c
chore: install focus-trap
GregOnNet Oct 7, 2023
067cb3a
refactor(modal): rename Modal to ModalRoot
GregOnNet Oct 7, 2023
7dc96a1
refactor(modal): inline helper function
GregOnNet Oct 7, 2023
be52fc2
feat(modal): remove fullScreen property
GregOnNet Oct 7, 2023
96cbb20
refactor(modal): remove comments
GregOnNet Oct 7, 2023
4d4f4b5
feat(focus-trap): setup skeleton
GregOnNet Oct 7, 2023
456240c
feat(focus trapping): adding focus trapping to the modal, executes wh…
thejackshelton Oct 8, 2023
0192837
docs(modal): fix heading
GregOnNet Oct 8, 2023
0270e0f
feat(modal): introduce trigger, close and portal
GregOnNet Oct 8, 2023
cb81d11
fix(modal): remove focus logic since it works out-of-the-box
GregOnNet Oct 8, 2023
3c94385
refactor(modal): rename ModalRoot to Modal
GregOnNet Oct 8, 2023
979d726
test(modal): update story
GregOnNet Oct 9, 2023
06c9193
refactor(modal): passing HTMLDialog to ModalPortal
GregOnNet Oct 9, 2023
d969c3d
docs(modal): simplify example
GregOnNet Oct 9, 2023
a802ef2
fix(modal): deactivate focus-trap before close
GregOnNet Oct 9, 2023
580ea8d
chore: setup cypress-real-commands
GregOnNet Oct 9, 2023
4e25a0d
test(modal): ensure modal is closed hitting escape
GregOnNet Oct 9, 2023
277ccb5
test(modal): reword test descriptions
GregOnNet Oct 9, 2023
98a3f4d
feat(modal): clean up focus-trap
GregOnNet Oct 9, 2023
831dd89
feat(modal): hero example changed, fixed copy button and border radiu…
thejackshelton Oct 10, 2023
87fce3e
fix(modal): avoid closing when label is clicked
GregOnNet Oct 10, 2023
bb4b582
fix(modal): avoid accidantal close clicking the edges of the modal
GregOnNet Oct 10, 2023
f45bfa4
refactor(modal): remoce ModalTrigger & ModalClose
GregOnNet Oct 10, 2023
95f9676
fix(modal): correct calculation of boundingClientRect
GregOnNet Oct 10, 2023
fc3f0cf
fix(modal): scrollbar flicker, copy button goes back to normal state
thejackshelton Oct 10, 2023
34f86bb
fix(modal): type errors preventing preview build
thejackshelton Oct 10, 2023
c154ad3
docs(modal): fix storybook
GregOnNet Oct 10, 2023
06d5e67
refactor(modal): remove ModalPortal in favor of Modal
GregOnNet Oct 10, 2023
c570d14
test(modal): fix component-tests
GregOnNet Oct 10, 2023
8aacab0
refactor(modal): removed the need to eagerly execute code with a visi…
thejackshelton Oct 10, 2023
5b700f6
refactor(modal): focus lock and scroll lock task logic separated
thejackshelton Oct 10, 2023
3f10ed3
refactor(modal): performance refactor, moved useTasks into one
thejackshelton Oct 11, 2023
3b61a56
docs(docs & modal): more docs, docs changes
thejackshelton Oct 11, 2023
274fac3
refactor(modal): extract behavior
GregOnNet Oct 11, 2023
9419e74
refactor(modal): refine variable name
GregOnNet Oct 11, 2023
3358519
test(modal): ensure focus-trap is working
GregOnNet Oct 11, 2023
ea02759
refactor(modal): extract backdrop-click-detection
GregOnNet Oct 11, 2023
20946a9
fix(modal): scroll flicker
thejackshelton Oct 11, 2023
5d2ed8c
docs(docs): fixed navigation layout, setup for toc component
thejackshelton Oct 11, 2023
f205374
docs(docs): dOCS IMPROVEMENTS!!!
thejackshelton Oct 12, 2023
81ee5d2
fix(modal): tolerate if no tabbable elements are inside the modal
GregOnNet Oct 12, 2023
62b276e
docs(docs & modal): docs polishing, small fixes, ts / routing fixes
thejackshelton Oct 13, 2023
3410dba
docs(modal): updating modal docs
thejackshelton Oct 13, 2023
70c88cc
feat(modal): allow disabling close on backdrop-click
GregOnNet Oct 13, 2023
9108bd9
docs(modal): add API table
GregOnNet Oct 13, 2023
d0dc878
feat(modal): remove "show" & "bind:closeOnBackdropClick"
GregOnNet Oct 13, 2023
afa0f02
docs(modal): remove "show" & "bind:closeOnBackdropClick" from API-Table
GregOnNet Oct 13, 2023
b0d3cd7
docs(modal): added alertdialog & refactored, more docs
thejackshelton Oct 14, 2023
3ab1824
fix(docs): animation support, fixed scrollbar flickering across the b…
thejackshelton Oct 16, 2023
40cd056
fix(modal): animations events are now properly cleaned up
thejackshelton Oct 17, 2023
10360be
fix(modal): transition was using the wrong event, fixed
thejackshelton Oct 17, 2023
9d9722d
docs(modal): animation example
thejackshelton Oct 17, 2023
5848b9f
feat(modal): backdrop animation example
thejackshelton Oct 17, 2023
783e324
docs(modal): fixing up docs example
thejackshelton Oct 17, 2023
38e8b03
fix(modal): deactivate FocusTrap once
GregOnNet Oct 18, 2023
3a3528d
refactor(modal): remove duplicated function
GregOnNet Oct 18, 2023
74b3fe8
docs(modal): explain behavior functions
GregOnNet Oct 18, 2023
5ebf5d9
fix(modal): prevent closing from being executed twice
GregOnNet Oct 18, 2023
d18ca00
fix(modal): remove modal-closing when no animation is applied
GregOnNet Oct 18, 2023
e850bf5
test(modal): ensure animation CSS-classes are set
GregOnNet Oct 18, 2023
faddf1a
fix(modal): stop calling closing in task-clean-up
GregOnNet Oct 18, 2023
884a0df
fix(modal): remove modal-opening after animation is finished
GregOnNet Oct 18, 2023
47a42af
refactor(modal): rename .modal-opening to .modal-showing
GregOnNet Oct 18, 2023
5422ed0
refactor(modal): remove empty keyframe
GregOnNet Oct 18, 2023
3fe7976
refactor(modal): remove ESC-handler
GregOnNet Oct 18, 2023
4a453a8
Revert "refactor(modal): remove ESC-handler"
GregOnNet Oct 18, 2023
99755d4
docs(modal): improved modal readability, animation snippet, beta
thejackshelton Oct 19, 2023
75ba5df
docs(modal): remove unused examples
thejackshelton Oct 19, 2023
3e1bd4a
refactor(modal): make binding of closeOnBackdropClick more expressive
GregOnNet Oct 20, 2023
e12cfbb
refactor(modal): extract ESC-Key overriding
GregOnNet Oct 20, 2023
542699b
refactor(modal): improve property name
GregOnNet Oct 20, 2023
c2004cf
refactor(modal): extract modal position fix when scrollbar reappears
GregOnNet Oct 20, 2023
cee0023
refactor(modal): remove props binding since it was not used
GregOnNet Oct 20, 2023
0da3e6b
feat(modal): transition support, fixed type errors in spec
thejackshelton Oct 20, 2023
99ae628
feat(modal): require bind:show
GregOnNet Oct 20, 2023
cd87648
test(modal): ensure opening button is focused after closing
GregOnNet Oct 20, 2023
1108fa8
docs(modal): note about invokers in the future
thejackshelton Oct 20, 2023
a8bc5b9
refactor(modal): register animated/transitioned once
GregOnNet Oct 20, 2023
99b30be
refactor(modal): simplify modal opening
GregOnNet Oct 20, 2023
f6ce318
test(modal): expecting .modal-showing to be applied after modal has b…
GregOnNet Oct 20, 2023
cc6516a
refactor(modal): restructure helpers adding animation support
GregOnNet Oct 20, 2023
8353aeb
refactor(modal): call onShow$ & onClose$ in Modal directly
GregOnNet Oct 20, 2023
4c3da81
refactor(modal): simplify ESC-handler by using { once: true }
GregOnNet Oct 20, 2023
cabdea4
refactor(modal): destrucure ...props first on <dialog>
GregOnNet Oct 20, 2023
a030c17
docs(docs): sheet docs examp;le
thejackshelton Oct 23, 2023
426bf48
fix(modal): fixing scrollbar flickers
thejackshelton Oct 23, 2023
a83d3a5
docs(docs): fixing the header, making it sticky so there is no layout…
thejackshelton Oct 23, 2023
fafbb31
docs(docs): sheet examples
thejackshelton Oct 24, 2023
e9c57a4
refactor(modal): improve naming of helper
GregOnNet Oct 20, 2023
f50b16f
refactor(modal): inline BodyScrollOptions
GregOnNet Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/website/public/images/test-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions apps/website/src/_state/component-statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const statusByComponent: ComponentKitsStatuses = {
Input: ComponentStatus.Planned,
'Input Phone': ComponentStatus.Planned,
'Navigation Bar': ComponentStatus.Planned,
Modal: ComponentStatus.Planned,
Pagination: ComponentStatus.Planned,
Popover: ComponentStatus.Planned,
Progress: ComponentStatus.Planned,
Expand All @@ -43,6 +44,7 @@ export const statusByComponent: ComponentKitsStatuses = {
Carousel: ComponentStatus.Planned,
Combobox: ComponentStatus.Beta,
Popover: ComponentStatus.Draft,
Modal: ComponentStatus.Beta,
Select: ComponentStatus.Draft,
Separator: ComponentStatus.Beta,
Tabs: ComponentStatus.Beta,
Expand Down
116 changes: 92 additions & 24 deletions apps/website/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@

--border-radius: 0.375rem;

--shiki-color-text: theme('colors.black');
--shiki-token-constant: theme('colors.emerald.800');
--shiki-token-string: theme('colors.emerald.700');
--shiki-token-comment: theme('colors.zinc.700');
--shiki-token-keyword: theme('colors.sky.600');
--shiki-token-parameter: theme('colors.pink.700');
--shiki-token-function: theme('colors.purple.700');
--shiki-token-string-expression: theme('colors.emerald.700');
--shiki-token-punctuation: theme('colors.zinc.700');
--shiki-color-text: theme('colors.white');
--shiki-token-constant: theme('colors.emerald.300');
--shiki-token-string: theme('colors.emerald.300');
--shiki-token-comment: theme('colors.zinc.500');
--shiki-token-keyword: theme('colors.sky.300');
--shiki-token-parameter: theme('colors.pink.300');
--shiki-token-function: theme('colors.violet.300');
--shiki-token-string-expression: theme('colors.emerald.300');
--shiki-token-punctuation: theme('colors.zinc.200');
}

.dark {
Expand Down Expand Up @@ -78,16 +78,6 @@
--color-input: 263 32.6% 17.5%;

--color-ring: 263 26.8% 83.9%;

--shiki-color-text: theme('colors.white');
--shiki-token-constant: theme('colors.emerald.300');
--shiki-token-string: theme('colors.emerald.300');
--shiki-token-comment: theme('colors.zinc.500');
--shiki-token-keyword: theme('colors.sky.300');
--shiki-token-parameter: theme('colors.pink.300');
--shiki-token-function: theme('colors.violet.300');
--shiki-token-string-expression: theme('colors.emerald.300');
--shiki-token-punctuation: theme('colors.zinc.200');
}
}

Expand All @@ -98,6 +88,77 @@
body {
@apply bg-background text-foreground;
}

*::-webkit-scrollbar {
background-color: transparent;
width: 1rem;
height: 1rem;
}

*::-webkit-scrollbar-thumb {
/* Thumb color */
background-color: var(--qwikui-slate-500);
border-radius: 0.5rem;
background-clip: padding-box;
border: 0.3rem solid transparent;
}

*::-webkit-scrollbar-corner {
background: transparent;
}

*::-webkit-scrollbar-track {
background: #f1f1f1;
border-left: 1px solid var(--qwikui-slate-300);
}

.dark *::-webkit-scrollbar-thumb {
background-color: var(--qwikui-slate-500);
}

.dark *::-webkit-scrollbar-track {
background: var(--qwikui-slate-950);
border-left: 1px solid var(--qwikui-slate-800);
}

.code-example *::-webkit-scrollbar-track {
background: transparent;
border-left: 0px;
}

.code-example *::-webkit-scrollbar-thumb {
background: var(--qwikui-slate-400);
border-radius: 0.5rem;
background-clip: padding-box;
border: 0.35rem solid transparent;
}

.code-example *::-webkit-scrollbar-thumb:hover {
background: var(--qwikui-slate-500);
border-radius: 0.5rem;
background-clip: padding-box;
border: 0.35rem solid transparent;
}

.code-example-gradient {
background: linear-gradient(
to bottom,
var(--qwikui-slate-900),
var(--qwikui-slate-800)
);
}
.dark .code-example-gradient {
background: linear-gradient(
to bottom,
var(--qwikui-slate-800),
var(--qwikui-slate-900)
);
}

/* no horizontal overflow on code examples */
.tab-size pre {
white-space: pre-wrap;
}
}

:root {
Expand Down Expand Up @@ -227,11 +288,6 @@ ol {
line-height: 1.75;
}

.layout {
grid-template-columns: 25% 70%;
grid-template-areas: 'sidebar content';
}

/* Utilities layer for animations. The current arbitrary & docs tailwind animation guidelines are not maintainable long term.
It would make more sense to supply the user with the animation declaration in the docs.
*/
Expand Down Expand Up @@ -314,4 +370,16 @@ ol {
-0.8px -0.8px 0 var(--qwikui-purple-700), 0.8px -0.8px 0 var(--qwikui-purple-700),
-0.8px 0.8px 0 var(--qwikui-purple-700), 0.8px 0.8px 0 var(--qwikui-purple-700);
}

.setup-grid-areas {
grid-template-areas: 'nav main toc';
}

.copy-btn-bg-dark {
background: hsla(215, 25%, 27%, 0.9);
}

.copy-btn-bg-light {
background: hsla(214, 32%, 91%, 0.9);
}
}
2 changes: 1 addition & 1 deletion apps/website/src/routes/_components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default component$(
return (
<header
class={[
`fixed top-0 z-20 flex h-20 w-full items-center gap-8 border-b-[1px] border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900 md:h-20`,
`sticky top-0 z-20 flex h-20 w-full items-center gap-8 border-b-[1px] border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900 md:h-20`,
`shadow-light-low dark:shadow-dark-medium`,
rootStore.isSidebarOpened
? 'bg-blue-200 brightness-75 dark:bg-indigo-900'
Expand Down
6 changes: 3 additions & 3 deletions apps/website/src/routes/docs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.docs {
& {
@apply w-full overflow-hidden px-8 py-8 lg:ml-80 lg:max-w-4xl lg:px-16 xl:max-w-6xl;
@apply mx-auto w-full max-w-[85ch] overflow-hidden px-8 py-8 lg:px-16;
}

/*
Expand All @@ -14,7 +14,7 @@
}

h1 {
@apply mb-6 text-3xl font-extrabold md:mb-12 md:text-5xl;
@apply mb-6 pt-6 text-3xl font-extrabold md:text-5xl;
}

h2 {
Expand All @@ -34,7 +34,7 @@
}

blockquote {
@apply bg-qwikui-blue-800 shadow-light-medium dark:shadow-dark-medium dark:bg-qwikui-purple-800 border-qwikui-blue-200 dark:border-qwikui-purple-200 my-4 rounded-xl border-[2px] p-4 text-white lg:p-6;
@apply from-qwikui-blue-800 to-qwikui-blue-900 shadow-light-medium dark:shadow-dark-medium dark:from-qwikui-purple-800 dark:to-qwikui-purple-900 border-qwikui-blue-200 dark:border-qwikui-purple-200 my-4 rounded-xl border-[2px] bg-gradient-to-b p-4 text-white lg:p-6;
}

ul {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export const APITable = component$(({ propDescriptors }: APITableProps) => {
{propDescriptors?.map((propDescriptor) => {
return (
<tr key={propDescriptor.name}>
<td class="prose prose-sm py-3 pl-4 align-baseline sm:pl-0 ">
<td class="prose prose-sm py-3 pl-4 sm:pl-0 ">
<code class="border-qwikui-blue-500 bg-qwikui-blue-50 dark:bg-qwikui-purple-100 dark:border-qwikui-purple-500 mr-6 rounded-md border-[1px] border-b-[2px] font-[400] text-slate-950">
{propDescriptor.name}
</code>
</td>
<td class="py-3 align-baseline">
<td class="py-3">
<span class="flex items-center">
<code class="rounded-md border-[1px] border-b-2 border-slate-700 bg-slate-100 px-2 dark:border-slate-400 dark:bg-slate-700">
{propDescriptor.type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const CodeCopy = component$(
onClick$={async () => {
await copy(code);
copied.value = true;

setTimeout(() => {
copied.value = false;
}, 4000);
}}
>
{!copied.value ? 'Copy' : 'Copied!'}
Expand Down
26 changes: 17 additions & 9 deletions apps/website/src/routes/docs/_components/highlight/highlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,23 @@ export const Highlight = component$(
});

return (
<div
{...props}
class={[
'tab-size relative max-w-full overflow-hidden overflow-x-auto rounded-xl bg-slate-50 p-12 text-sm dark:bg-slate-800',
props.class,
]}
>
<div dangerouslySetInnerHTML={codeSig.value} />
<CodeCopy class={['absolute right-2 top-2', copyCodeClass]} code={code} />
<div class="code-example relative max-h-[31.25rem] rounded-b-xl">
<CodeCopy
class={[
'copy-btn-bg-dark absolute right-4 top-4 bg-slate-200 text-white hover:bg-slate-600 hover:text-white',
copyCodeClass,
]}
code={code}
/>
<div
{...props}
class={[
'tab-size code-example-gradient max-h-[31.25rem] max-w-full overflow-auto rounded-xl bg-slate-800 p-6 text-sm dark:bg-slate-800',
props.class,
]}
>
<div dangerouslySetInnerHTML={codeSig.value} />
</div>
</div>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const DocsNavigation = component$(({ linksGroups }: DocsNavigationProps)
rounded-lg hover:bg-[var(--qwik-light-blue)] dark:hover:bg-[var(--qwik-dark-purple)]`;
return (
<nav
class={`fixed inset-0 top-20 z-10 flex-col gap-4 overflow-y-auto border-r-[1px]
border-slate-200 bg-slate-100 bg-white pb-6 dark:border-slate-800 dark:bg-slate-900 lg:w-80
class={`fixed inset-0 top-20 z-10 flex-col gap-4 overflow-y-auto border-r-[1px] border-slate-200
bg-slate-100 bg-white pb-6 [grid-area:nav] dark:border-slate-800 dark:bg-slate-900 lg:w-80
${rootStore.isSidebarOpened ? 'w-100 flex' : 'hidden lg:flex'} `}
>
<ul class="show mt-8 flex flex-col gap-2 pl-12 lg:hidden">
Expand Down Expand Up @@ -59,7 +59,7 @@ export const DocsNavigation = component$(({ linksGroups }: DocsNavigationProps)
{linksGroups?.map((group) => {
return (
<>
<div class="px-6 pt-6">
<div class="px-6 pt-8">
<h2 class="bg-qwikui-blue-600 dark:bg-qwikui-purple-800 shadow-dark-low dark:shadow-dark-high border-qwikui-blue-100 dark:border-qwikui-purple-100 text-outline-lg mb-4 rounded-lg border-2 px-4 py-1 text-3xl font-bold text-white lg:text-lg">
{group.name}
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PreviewCodeExampleTabs = component$((props: PreviewCodeExampleProps
class="shadow-light-medium dark:shadow-dark-medium mb-12 rounded-xl"
selectedClassName="previewCodeExampleSelectedTab"
>
<TabList class="bg-qwikui-blue-700 dark:bg-qwikui-purple-800 border-qwikui-blue-300 dark:border-qwikui-purple-200 shadow-light-medium dark:shadow-dark-medium flex rounded-t-xl border-[1.5px] border-b-0 text-white">
<TabList class="bg-qwikui-blue-700 dark:bg-qwikui-purple-800 border-qwikui-blue-300 dark:border-qwikui-purple-200 flex rounded-t-xl border-[1.5px] border-b-0 text-white">
<Tab class="hover:bg-qwikui-blue-500 dark:hover:bg-qwikui-purple-600 text-outline-lg rounded-tl-[.625rem] px-4 py-2">
Preview
</Tab>
Expand All @@ -35,7 +35,7 @@ export const PreviewCodeExampleTabs = component$((props: PreviewCodeExampleProps
</section>
</TabPanel>
<TabPanel class="border-qwikui-blue-300 dark:border-qwikui-purple-200 relative rounded-b-xl border-[1.5px]">
<Highlight code={props.code} />
<Highlight class="rounded-b-xl rounded-t-none" code={props.code} />
</TabPanel>
</Tabs>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PreviewCodeExampleProps } from './preview-code-example-props.type';

export const PreviewCodeExampleVertical = component$((props: PreviewCodeExampleProps) => {
return (
<div class="dark:border-qwikui-purple-200 shadow-light-medium dark:shadow-dark-medium flex w-full flex-col rounded-b-xl rounded-t-xl border-[1.5px] border-solid border-slate-200">
<div class="dark:border-qwikui-purple-200 shadow-light-medium dark:shadow-dark-medium flex w-full flex-col rounded-xl border-[1.5px] border-solid border-slate-200">
<h3 class=" flex rounded-t-xl text-white"></h3>
<section class="rounded-t-xl bg-slate-50 p-4 dark:bg-slate-800">
<Slot name="actualComponent" />
Expand All @@ -13,7 +13,7 @@ export const PreviewCodeExampleVertical = component$((props: PreviewCodeExampleP
Code
</h3>
<aside class="rounded-b-xl border-[1.5px] border-solid">
<Highlight code={props.code} class="rounded" />
<Highlight code={props.code} class="rounded rounded-t-none" />
</aside>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ function getBackgroundByStatus(status?: ComponentStatus) {
case ComponentStatus.Ready:
return 'bg-green-300';
case ComponentStatus.Beta:
return 'bg-qwikui-blue-800 dark:bg-qwikui-purple-800';
return 'bg-gradient-to-b from-qwikui-blue-800 to-qwikui-blue-900 dark:from-qwikui-purple-800 dark:to-qwikui-purple-900';
case ComponentStatus.Draft:
return 'bg-orange-700 dark:bg-red-800';
return 'bg-gradient-to-b from-orange-700 to-orange-800 dark:from-red-700 dark:to-red-800';
case ComponentStatus.Planned:
default:
return 'bg-orange-700 dark:bg-red-800';
return 'bg-gradient-to-b from-orange-700 to-orange-800 dark:from-red-700 dark:to-red-800';
}
}

export const StatusBanner = component$((props: StatusBannerProps) => {
const ref = useSignal<HTMLElement | undefined>();
const isBannerClosedSig = useSignal(false);
const marginBottom = 32;
const marginBottom = 64;

useStylesScoped$(`

Expand All @@ -90,7 +90,7 @@ export const StatusBanner = component$((props: StatusBannerProps) => {
}

.fade {
animation: fadeOut 0.5s ease forwards;
animation: fadeOut 1s cubic-bezier(0.6, 0.6, 0, 1) forwards;
margin-top: var(--dynamic-banner-height);
}

Expand Down
Loading
Loading