@valerius_petrini/corekit-ui 0.1.81 → 0.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/README.md +2 -64
  2. package/dist/components/display/Card/index.stories.svelte +11 -3
  3. package/dist/components/display/Card/index.svelte +16 -4
  4. package/dist/components/display/Card/types.d.ts +10 -1
  5. package/dist/components/display/Card/variant.js +4 -2
  6. package/dist/components/display/KBD/index.svelte +2 -1
  7. package/dist/components/display/Skeleton/index.svelte +1 -2
  8. package/dist/components/feedback/Loader/index.svelte +1 -3
  9. package/dist/components/navigation/Navbar/NavbarDropdown.svelte +7 -4
  10. package/dist/components/navigation/Navbar/NavbarElement.svelte +1 -6
  11. package/dist/components/navigation/Navbar/NavbarStoryWrapper.svelte +10 -0
  12. package/dist/components/navigation/Navbar/NavbarStoryWrapper.svelte.d.ts +26 -0
  13. package/dist/components/navigation/Navbar/index.stories.svelte +11 -2
  14. package/dist/components/navigation/Navbar/index.svelte +8 -7
  15. package/dist/components/navigation/Navbar/types.d.ts +3 -2
  16. package/dist/components/navigation/SideNavbar/SideNavbarStoryWrapper.svelte +3 -0
  17. package/dist/components/navigation/SideNavbar/SideNavbarStoryWrapper.svelte.d.ts +26 -0
  18. package/dist/components/navigation/SideNavbar/index.stories.svelte +22 -0
  19. package/dist/components/navigation/SideNavbar/index.stories.svelte.d.ts +18 -0
  20. package/dist/components/navigation/SideNavbar/index.svelte +5 -4
  21. package/dist/components/navigation/SideNavbar/types.d.ts +2 -0
  22. package/dist/components/typography/Text/index.svelte +7 -7
  23. package/dist/styles/layout.css +18 -0
  24. package/package.json +1 -1
package/README.md CHANGED
@@ -1,65 +1,3 @@
1
- # Svelte library
1
+ # Corekit UI
2
2
 
3
- Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
4
-
5
- Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
6
-
7
- ## Creating a project
8
-
9
- If you're seeing this, you've probably already done this step. Congrats!
10
-
11
- ```sh
12
- # create a new project in the current directory
13
- npx sv create
14
-
15
- # create a new project in my-app
16
- npx sv create my-app
17
- ```
18
-
19
- To recreate this project with the same configuration:
20
-
21
- ```sh
22
- # recreate this project
23
- npx sv@0.12.5 create --template library --types ts --add tailwindcss="plugins:typography,forms" --install npm ./
24
- ```
25
-
26
- ## Developing
27
-
28
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
29
-
30
- ```sh
31
- npm run dev
32
-
33
- # or start the server and open the app in a new browser tab
34
- npm run dev -- --open
35
- ```
36
-
37
- Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
38
-
39
- ## Building
40
-
41
- To build your library:
42
-
43
- ```sh
44
- npm pack
45
- ```
46
-
47
- To create a production version of your showcase app:
48
-
49
- ```sh
50
- npm run build
51
- ```
52
-
53
- You can preview the production build with `npm run preview`.
54
-
55
- > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
56
-
57
- ## Publishing
58
-
59
- Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
60
-
61
- To publish your library to [npm](https://www.npmjs.com):
62
-
63
- ```sh
64
- npm publish
65
- ```
3
+ Corekit UI is a component library written in Svelte 5
@@ -12,7 +12,7 @@
12
12
  argTypes: {
13
13
  variant: {
14
14
  control: "select",
15
- options: ["bordered", "elevated"],
15
+ options: ["bordered", "elevated", "ghost", "flat"],
16
16
  },
17
17
  size: {
18
18
  control: "select",
@@ -28,8 +28,16 @@
28
28
  });
29
29
  </script>
30
30
 
31
- <Story name="Default" args={{ variant: "bordered", size: "md" }}>
31
+ {#snippet header()}
32
+ <img src="https://upload.wikimedia.org/wikipedia/commons/c/c8/Altja_j%C3%B5gi_Lahemaal.jpg" alt="Card">
33
+ {/snippet}
34
+
35
+ {#snippet footer()}
36
+ <Button href="https://example.com" external class="ml-auto mr-4" color="sub">Learn More</Button>
37
+ <Button href="https://example.com" external>Get Started</Button>
38
+ {/snippet}
39
+
40
+ <Story name="Default" args={{ variant: "bordered", size: "md", footer, header }}>
32
41
  <Text tag="h2" class="text-2xl font-bold mb-4">Customizable Card</Text>
33
42
  <Text class="mb-4">This is a customizable card component. You can add any content here and style it as needed.</Text>
34
- <Button href="https://example.com" target="_blank">Learn More</Button>
35
43
  </Story>
@@ -14,14 +14,14 @@
14
14
  variant = "bordered",
15
15
  size = "md",
16
16
  radius = "md",
17
+ footer = undefined,
18
+ header = undefined,
17
19
  ...restProps
18
20
  }: CardProps = $props();
19
21
 
20
- let defaultClass = "text-main-text rounded-lg transition-colors ease-in-out bg-sub-background p-4 w-full";
21
- let linkClass = "block hover:bg-sub-background-hover cursor-pointer";
22
22
  let combinedClass = $derived(twMerge(
23
- defaultClass,
24
- href && linkClass,
23
+ "text-main-text rounded-lg transition-colors transition-all ease-in-out bg-gradient-to-br from-sub-background to-sub-background-accent p-4 w-full flex flex-col",
24
+ href && "block hover:from-sub-background-hover hover:to-sub-background-hover cursor-pointer hover:border-sub-background-border-hover hover:-translate-y-0.5",
25
25
  cardVariantStyles[variant],
26
26
  getSizeStyleClass(size, "card"),
27
27
  getSizeStyleClass(radius, "radius"),
@@ -45,5 +45,17 @@
45
45
  {...restProps}
46
46
  bind:this={element}
47
47
  >
48
+ {#if header}
49
+ <div class="-mx-4 -mt-4 mb-4 overflow-hidden">
50
+ {@render header()}
51
+ </div>
52
+ {/if}
53
+
48
54
  {@render children?.()}
55
+
56
+ {#if footer}
57
+ <div class="flex items-center justify-between border-t border-sub-background-border mt-4 -mx-4 -mb-4 px-4 py-3 text-sm text-sub-text">
58
+ {@render footer()}
59
+ </div>
60
+ {/if}
49
61
  </svelte:element>
@@ -1,10 +1,19 @@
1
+ import type { Snippet } from "svelte";
1
2
  import type { SizeStyle } from "../../../styles/size";
2
3
  import type { BaseComponentProps } from "../../../types/BaseComponent";
3
- export type CardVariant = "bordered" | "elevated";
4
+ export type CardVariant = "bordered" | "elevated" | "ghost" | "flat";
5
+ /**
6
+ * <Corekit UI> A Card component
7
+ *
8
+ * @prop `href` Defines the website the card will link to
9
+ * @prop `external` Opens the website in a new tab. Only works if `href` is defined.
10
+ */
4
11
  export interface CardProps extends BaseComponentProps {
5
12
  href?: string;
6
13
  external?: boolean;
7
14
  variant?: CardVariant;
8
15
  size?: SizeStyle;
9
16
  radius?: SizeStyle;
17
+ footer?: Snippet;
18
+ header?: Snippet;
10
19
  }
@@ -1,4 +1,6 @@
1
1
  export const cardVariantStyles = {
2
- bordered: "border-[1px] border-sub-background-hover",
3
- elevated: "shadow-md",
2
+ bordered: "border-[1px] border-sub-background-border",
3
+ elevated: "shadow-[0_4px_12px_rgba(0,0,0,0.35)]",
4
+ ghost: "bg-transparent border-transparent",
5
+ flat: "border border-transparent shadow-none",
4
6
  };
@@ -10,6 +10,7 @@
10
10
  }: any = $props();
11
11
 
12
12
  const defaultClass = "inline-flex flex-col items-center justify-center rounded bg-sub-background px-1.5 py-0.5 text-xs font-mono text-main-text border-sub-background-hover border-1";
13
+ const subtextClass = "text-sub-text text-[10px] mt-0.5";
13
14
 
14
15
  const combinedClass = $derived(twMerge(defaultClass, className));
15
16
  </script>
@@ -17,7 +18,7 @@
17
18
  <kbd class={combinedClass} {...restProps} bind:this={element}>
18
19
  {@render children?.()}
19
20
  {#if subtext}
20
- <span class="text-sub-text text-[10px] mt-0.5">
21
+ <span class={subtextClass}>
21
22
  {@render subtext?.()}
22
23
  </span>
23
24
  {/if}
@@ -16,9 +16,8 @@
16
16
  const defaultWidths = [21, 19, 24, 15, 10, 30, 22, 17, 26, 20, 28, 10, 22, 45, 16, 23, 37, 25, 25];
17
17
  const widths = $derived(Array.from({ length: count }, (_, i) => defaultWidths[i % defaultWidths.length]));
18
18
 
19
- const defaultContainerClass = "animate-pulse duration-100 w-lg flex flex-col gap-2";
20
19
  const combinedContainerClass = $derived(twMerge(
21
- defaultContainerClass,
20
+ "animate-pulse duration-100 w-lg flex flex-col gap-2",
22
21
  getSizeStyleClass(size, "card"),
23
22
  className
24
23
  ));
@@ -12,10 +12,8 @@
12
12
  ...restProps
13
13
  }: LoaderProps = $props();
14
14
 
15
- const defaultClass = "loader rounded-full border-main-text border-4";
16
-
17
15
  let sizeClass = $derived(twMerge(
18
- defaultClass,
16
+ "loader rounded-full border-main-text border-4",
19
17
  getSizeStyleClass(size, "loader"),
20
18
  className,
21
19
  generateColorStyle(color, "loader"),
@@ -22,6 +22,7 @@
22
22
  wrapperClass = "",
23
23
  label = "",
24
24
  navelement = undefined,
25
+ showArrow = true,
25
26
  ...restProps
26
27
  }: NavbarDropdownProps = $props();
27
28
 
@@ -90,10 +91,12 @@
90
91
  {#if navelement}
91
92
  {@render navelement()}
92
93
  {/if}
93
- <span class="sr-only">{open ? 'Close' : 'Open'} dropdown</span>
94
- <ChevronDown
95
- class="mt-0.5 transition-transform ease-out duration-150 {open ? 'rotate-180' : 'rotate-0'}"
96
- size="16"/>
94
+ {#if showArrow}
95
+ <span class="sr-only">{open ? 'Close' : 'Open'} dropdown</span>
96
+ <ChevronDown
97
+ class="mt-0.5 transition-transform ease-out duration-150 {open ? 'rotate-180' : 'rotate-0'}"
98
+ size="16"/>
99
+ {/if}
97
100
  </NavbarElement>
98
101
 
99
102
  {#if open}
@@ -18,19 +18,14 @@
18
18
 
19
19
  let defaultClass = "navbar-element w-fit h-fit mx-2 px-2.5 py-1.5 rounded text-main-text";
20
20
 
21
- let scrollY = $state(0);
22
- let isAtTop = $derived(scrollY <= threshold);
23
-
24
21
  const combinedClass = $derived(twMerge(
25
22
  defaultClass,
23
+ (color === "sub") && "bg-transparent",
26
24
  className,
27
25
  active ? activeClass : "",
28
- isAtTop ? classTop : "",
29
26
  ));
30
27
  </script>
31
28
 
32
- <svelte:window bind:scrollY={scrollY}/>
33
-
34
29
  <Button bind:element radius="none" {href} {color} class={combinedClass} {...restProps} aria-current={active ? 'page' : undefined}>
35
30
  {@render children?.()}
36
31
  </Button>
@@ -0,0 +1,10 @@
1
+ <script>
2
+ import { fbmBackground } from "../../../actions/fbm";
3
+ import Text from "../../typography/Text/index.svelte";
4
+ </script>
5
+
6
+ <div class="h-screen w-full">
7
+ <slot />
8
+ <canvas class="w-full h-screen" use:fbmBackground></canvas>
9
+ <Text class="p-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</Text>
10
+ </div>
@@ -0,0 +1,26 @@
1
+ export default NavbarStoryWrapper;
2
+ type NavbarStoryWrapper = SvelteComponent<any, {
3
+ [evt: string]: CustomEvent<any>;
4
+ }, {
5
+ default: {};
6
+ }> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const NavbarStoryWrapper: $$__sveltets_2_IsomorphicComponent<any, {
10
+ [evt: string]: CustomEvent<any>;
11
+ }, {
12
+ default: {};
13
+ }, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -2,8 +2,11 @@
2
2
  import { defineMeta } from "@storybook/addon-svelte-csf";
3
3
  import Navbar from "./index.svelte";
4
4
  import NavbarElement from "./NavbarElement.svelte";
5
- import NavbarSeparator from "./NavbarSeparator.svelte";
6
- import NavbarDropdown from "./NavbarDropdown.svelte";
5
+ import NavbarSeparator from "./NavbarSeparator.svelte";
6
+ import NavbarDropdown from "./NavbarDropdown.svelte";
7
+ import NavbarStoryWrapper from "./NavbarStoryWrapper.svelte";
8
+ import type { Component } from "svelte";
9
+ import type { NavbarProps } from "./types";
7
10
 
8
11
  const { Story } = defineMeta({
9
12
  title: "Components/Navigation/Navbar",
@@ -11,6 +14,12 @@
11
14
  argTypes: {
12
15
 
13
16
  },
17
+ parameters: {
18
+ layout: "fullscreen",
19
+ },
20
+ decorators: [
21
+ () => ({ Component: NavbarStoryWrapper as unknown as Component<NavbarProps, {}, "element"> })
22
+ ]
14
23
  });
15
24
  </script>
16
25
 
@@ -5,21 +5,22 @@
5
5
  let {
6
6
  children = undefined,
7
7
  class: className = "",
8
- classTop = "",
9
- threshold = 10,
8
+ scrollThreshold = 10,
10
9
  element = $bindable(),
10
+ variant = "default",
11
11
  ...restProps
12
12
  }: NavbarProps = $props();
13
13
 
14
- let defaultClass = "transition-colors duration-300 fixed top-0 left-0 w-full h-14 z-[100] flex items-center bg-sub-background/99 border-b border-box border-b-sub-background-hover px-4 md:px-6 lg:px-8";
14
+ let defaultClass = "transition-colors duration-300 fixed top-0 left-0 w-full h-14 z-[100] flex items-center bg-sub-background border-b border-box border-b-sub-background-hover px-4 md:px-6 lg:px-8 backdrop-blur-sm";
15
+ let topClass = "bg-transparent border-b-transparent [&>_.navbar-element]:bg-transparent!";
15
16
 
16
- let scrollY = $state(0);
17
- let isAtTop = $derived(scrollY <= threshold);
17
+ let scrollY = $state(typeof window !== "undefined" ? window.scrollY : 0);
18
+ let isAtTop = $derived(scrollY <= scrollThreshold);
18
19
 
19
20
  const combinedClass = $derived(twMerge(
20
21
  defaultClass,
21
22
  className,
22
- isAtTop ? classTop : ""
23
+ (isAtTop && variant === "hero") && topClass
23
24
  ));
24
25
  </script>
25
26
 
@@ -27,4 +28,4 @@
27
28
 
28
29
  <nav class={combinedClass} {...restProps} bind:this={element}>
29
30
  {@render children?.()}
30
- </nav>
31
+ </nav>
@@ -3,14 +3,14 @@ import type { BaseComponentProps } from "../../../types/BaseComponent.ts";
3
3
  import type { ColorStyle } from "../../../styles/color.ts";
4
4
  export interface NavbarProps extends BaseComponentProps {
5
5
  classTop?: string;
6
- threshold?: number;
6
+ scrollThreshold?: number;
7
+ variant?: "default" | "hero";
7
8
  }
8
9
  export interface NavbarElementProps extends BaseComponentProps {
9
10
  classTop?: string;
10
11
  activeClass?: string;
11
12
  active?: boolean;
12
13
  href?: string;
13
- threshold?: number;
14
14
  color?: ColorStyle;
15
15
  }
16
16
  export type NavbarSeparatorVariant = "vertical" | "horizontal" | "dynamic";
@@ -25,4 +25,5 @@ export interface NavbarDropdownProps extends BaseComponentProps {
25
25
  wrapperClass?: string;
26
26
  activeClass?: string;
27
27
  threshold?: number;
28
+ showArrow?: boolean;
28
29
  }
@@ -0,0 +1,3 @@
1
+ <div class="h-screen w-full">
2
+ <slot />
3
+ </div>
@@ -0,0 +1,26 @@
1
+ export default SideNavbarStoryWrapper;
2
+ type SideNavbarStoryWrapper = SvelteComponent<any, {
3
+ [evt: string]: CustomEvent<any>;
4
+ }, {
5
+ default: {};
6
+ }> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const SideNavbarStoryWrapper: $$__sveltets_2_IsomorphicComponent<any, {
10
+ [evt: string]: CustomEvent<any>;
11
+ }, {
12
+ default: {};
13
+ }, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -0,0 +1,22 @@
1
+ <script module lang="ts">
2
+ import { defineMeta } from "@storybook/addon-svelte-csf";
3
+ import SideNavbar from "./index.svelte";
4
+
5
+ import Home from "@lucide/svelte/icons/home";
6
+ import Book from "@lucide/svelte/icons/book";
7
+ import Database from "@lucide/svelte/icons/database";
8
+
9
+ const { Story } = defineMeta({
10
+ title: "Components/Navigation/SideNavbar",
11
+ component: SideNavbar,
12
+ parameters: {
13
+ layout: "fullscreen",
14
+ },
15
+ });
16
+ </script>
17
+
18
+ <Story name="Default" args={{ items: [
19
+ { label: "Home", href: "/", icon: Home },
20
+ { label: "Library", href: "/library", icon: Book },
21
+ { label: "Data", href: "/data", icon: Database },
22
+ ], offset: "0" }}></Story>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Index: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type Index = InstanceType<typeof Index>;
18
+ export default Index;
@@ -3,19 +3,20 @@
3
3
  import { twMerge } from "tailwind-merge";
4
4
  import Button from "../../inputs/Button/index.svelte";
5
5
  import Text from "../../typography/Text/index.svelte";
6
- import { page } from '$app/state';
7
6
 
8
7
  let {
9
8
  children = undefined,
10
9
  class: className = "",
11
10
  element = $bindable(),
12
11
  items = [],
12
+ currentPath = "",
13
+ offset = "3.5rem",
13
14
  ...restProps
14
15
  }: SideNavbarProps = $props();
15
16
 
16
17
  let expanded = $state(false);
17
18
 
18
- const defaultClass = "transition-[width] duration-300 overflow-hidden fixed left-0 h-full mt-14 z-[100] py-2 flex flex-col items-center gap-1 bg-sub-background/99 border-r border-box border-r-sub-background-hover";
19
+ const defaultClass = "transition-[width] duration-300 overflow-hidden fixed left-0 h-full z-[100] py-2 flex flex-col items-center gap-1 bg-sub-background border-r border-box border-r-sub-background-hover";
19
20
  const expandedClass = $derived(expanded ? "w-48" : "w-12");
20
21
 
21
22
  const combinedClass = $derived(twMerge(
@@ -25,9 +26,9 @@
25
26
  ));
26
27
  </script>
27
28
 
28
- <nav class={combinedClass} {...restProps} onmouseenter={() => expanded = true} onmouseleave={() => expanded = false} bind:this={element}>
29
+ <nav style="margin-top: {offset}" class={combinedClass} {...restProps} onmouseenter={() => expanded = true} onmouseleave={() => expanded = false} bind:this={element}>
29
30
  {#each items as item}
30
- {@const isActive = page.url.pathname === item.href}
31
+ {@const isActive = currentPath === item.href}
31
32
  <Button size="xs" color="none" class="{isActive ? 'bg-form-background text-main-text' : 'text-sub-text'} hover:text-main-text py-1 text-nowrap flex justify-start gap-2 overflow-hidden mx-1 w-[calc(100%-16px)] hover:bg-form-background px-1.5" href={item.href}>
32
33
  <item.icon class="w-5 h-5 shrink-0"/>
33
34
  <Text tag="span" class="transition-opacity duration-200 text-sm text-inherit {expanded ? 'w-auto opacity-100 pr-3' : 'w-0 opacity-0'}">
@@ -2,6 +2,8 @@ import type { BaseComponentProps } from "../../../types/BaseComponent";
2
2
  import type { Component } from "svelte";
3
3
  export interface SideNavbarProps extends BaseComponentProps {
4
4
  items?: SideNavbarItem[];
5
+ currentPath?: string;
6
+ offset?: string;
5
7
  }
6
8
  export interface SideNavbarItem {
7
9
  href: string;
@@ -29,12 +29,12 @@
29
29
  "code": { class: "font-mono bg-sub-background px-1 rounded inline-block", size: "text-base" },
30
30
  "a": { class: "text-blue-400 decoration-blue-400/0 underline underline-offset-2 transition-all cursor-pointer duration-150 hover:decoration-blue-400 ", size: "text-base" },
31
31
  "li": { class: "text-base list-disc list-inside", size: "text-base" },
32
- "h1": { class: "font-bold", size: "text-4xl" },
33
- "h2": { class: "font-bold", size: "text-3xl" },
34
- "h3": { class: "font-semibold", size: "text-2xl" },
35
- "h4": { class: "font-semibold", size: "text-xl" },
36
- "h5": { class: "font-medium", size: "text-lg" },
37
- "h6": { class: "font-normal", size: "text-base" }
32
+ "h1": { class: "font-bold font-display", size: "text-4xl" },
33
+ "h2": { class: "font-bold font-display", size: "text-3xl" },
34
+ "h3": { class: "font-semibold font-display", size: "text-2xl" },
35
+ "h4": { class: "font-semibold font-display", size: "text-xl" },
36
+ "h5": { class: "font-medium font-display", size: "text-lg" },
37
+ "h6": { class: "font-normal font-display", size: "text-base" }
38
38
  };
39
39
 
40
40
  function getTextSizeInRem(): string {
@@ -51,7 +51,7 @@
51
51
  : ""
52
52
  );
53
53
 
54
- let defaultClass = "text-main-text";
54
+ let defaultClass = "text-main-text font-body";
55
55
  let combinedClass = $derived(twMerge(
56
56
  defaultClass,
57
57
  tagStyles[tag]?.class || "",
@@ -10,12 +10,15 @@
10
10
  --color-main-background: var(--vpcui-main-background);
11
11
  --color-sub-background: var(--vpcui-sub-background);
12
12
  --color-sub-background-hover: var(--vpcui-sub-background-hover);
13
+ --color-sub-background-border: var(--vpcui-sub-background-border);
14
+ --color-sub-background-accent: var(--vpcui-sub-background-accent);
13
15
  --color-main-text: var(--vpcui-main-text);
14
16
  --color-sub-text: var(--vpcui-sub-text);
15
17
  --color-contrast-text: var(--vpcui-contrast-text);
16
18
  --color-form-background: var(--vpcui-form-background);
17
19
  --color-form-hover: var(--vpcui-form-hover);
18
20
  --color-form-border: var(--vpcui-form-border);
21
+ --color-sub-background-border-hover: var(--vpcui-sub-background-border-hover);
19
22
 
20
23
  --color-primary: var(--vpcui-primary);
21
24
  --color-secondary: var(--vpcui-secondary);
@@ -58,6 +61,10 @@
58
61
  --color-accent-800: #164e63;
59
62
  --color-accent-900: #0c2f3d;
60
63
  --color-accent-950: #061e28;
64
+
65
+ --font-display: var(--vpcui-font-display);
66
+ --font-body: var(--vpcui-font-body);
67
+ --font-mono: var(--vpcui-font-mono);
61
68
  }
62
69
 
63
70
  :root {
@@ -73,6 +80,9 @@
73
80
  --vpcui-main-background: var(--vpcui-light-50);
74
81
  --vpcui-sub-background: var(--vpcui-light-100);
75
82
  --vpcui-sub-background-hover: var(--vpcui-light-150);
83
+ --vpcui-sub-background-border: var(--vpcui-light-200);
84
+ --vpcui-sub-background-accent: var(--vpcui-light-50);
85
+ --vpcui-sub-background-border-hover: var(--vpcui-light-250);
76
86
  --vpcui-main-text: var(--vpcui-light-950);
77
87
  --vpcui-sub-text: var(--vpcui-light-300);
78
88
  --vpcui-contrast-text: var(--vpcui-light-950);
@@ -81,11 +91,16 @@
81
91
  --vpcui-form-border: var(--vpcui-light-250);
82
92
 
83
93
  --vpcui-loader-btn-color: rgba(255, 255, 255, 0.25);
94
+
95
+ --vpcui-font-display: ui-serif, Georgia, serif;
96
+ --vpcui-font-body: ui-sans-serif, system-ui sans-serif;
97
+ --vpcui-font-mono: ui-monospace, monospace;
84
98
  }
85
99
 
86
100
  html.dark {
87
101
  --vpcui-dark-50: #121212;
88
102
  --vpcui-dark-100: #1E1E1E;
103
+ --vpcui-dark-125: #212121;
89
104
  --vpcui-dark-150: #2A2A2A;
90
105
  --vpcui-dark-200: #3A3A3A;
91
106
  --vpcui-dark-250: #4A4A4A;
@@ -96,6 +111,9 @@ html.dark {
96
111
  --vpcui-main-background: var(--vpcui-dark-50);
97
112
  --vpcui-sub-background: var(--vpcui-dark-100);
98
113
  --vpcui-sub-background-hover: var(--vpcui-dark-150);
114
+ --vpcui-sub-background-border: var(--vpcui-dark-200);
115
+ --vpcui-sub-background-accent: var(--vpcui-dark-150);
116
+ --vpcui-sub-background-border-hover: var(--vpcui-dark-250);
99
117
  --vpcui-main-text: var(--vpcui-dark-950);
100
118
  --vpcui-sub-text: var(--vpcui-dark-300);
101
119
  --vpcui-contrast-text: var(--vpcui-dark-50);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valerius_petrini/corekit-ui",
3
- "version": "0.1.81",
3
+ "version": "0.1.83",
4
4
  "description": "Component Library used across all my projects",
5
5
  "author": "Valerius Petrini Jr.",
6
6
  "license": "MIT",