Skip to content

Commit

Permalink
feat: support string style prop (#432)
Browse files Browse the repository at this point in the history
* chore: update formatter
  • Loading branch information
jer3m01 authored Jun 18, 2024
1 parent 92d48c3 commit 4dc7f8d
Show file tree
Hide file tree
Showing 376 changed files with 2,667 additions and 1,870 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 1.5.2
version: 1.8.1

- name: Run Biome
run: biome ci .
2 changes: 1 addition & 1 deletion apps/docs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { nodeTypes } from "@mdx-js/mdx";
import { defineConfig } from "@solidjs/start/config";
// @ts-ignore missing types
import pkg from "@vinxi/plugin-mdx";
import { Options as AcornOptions, parse } from "acorn";
import { type Options as AcornOptions, parse } from "acorn";
// @ts-ignore
import Slugger from "github-slugger";
import rehypePrettyCode from "rehype-pretty-code";
Expand Down
12 changes: 10 additions & 2 deletions apps/docs/public/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
"name": "",
"short_name": "",
"icons": [
{ "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/callout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { clsx } from "clsx";
import { ComponentProps, splitProps } from "solid-js";
import { type ComponentProps, splitProps } from "solid-js";

interface CalloutProps extends ComponentProps<"div"> {
type: "note" | "warning";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
LATEST_CORE_CHANGELOG_URL,
LATEST_CORE_VERSION_NAME,
} from "../VERSIONS";
import { NavSection } from "../model/navigation";
import type { NavSection } from "../model/navigation";
import { GitHubIcon } from "./icons";
import { MobileNavigation } from "./mobile-navigation";
import { ThemeSelector } from "./theme-selector";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentProps } from "solid-js";
import type { ComponentProps } from "solid-js";

export function GitHubIcon(props: ComponentProps<"svg">) {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/kbd.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { clsx } from "clsx";
import { ComponentProps, splitProps } from "solid-js";
import { type ComponentProps, splitProps } from "solid-js";

export function Kbd(props: ComponentProps<"kbd">) {
const [local, others] = splitProps(props, ["class"]);
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useLocation } from "@solidjs/router";
import { ParentProps, Show } from "solid-js";
import { type ParentProps, Show } from "solid-js";

import { NavSection } from "../model/navigation";
import type { NavSection } from "../model/navigation";
import { Footer } from "./footer";
import { Header } from "./header";
import { Navigation } from "./navigation";
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/components/mobile-navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { createDisclosureState } from "@kobalte/core/primitives/create-disclosur
import { Separator } from "@kobalte/core/separator";
import { useIsRouting, useMatch } from "@solidjs/router";
import { clsx } from "clsx";
import { ComponentProps, createComputed, splitProps } from "solid-js";
import { type ComponentProps, createComputed, splitProps } from "solid-js";

import {
LATEST_CORE_CHANGELOG_URL,
LATEST_CORE_VERSION_NAME,
} from "../VERSIONS";
import { NavSection } from "../model/navigation";
import type { NavSection } from "../model/navigation";
import { CrossIcon, HamburgerMenuIcon } from "./icons";
import { Navigation } from "./navigation";

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/components/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useLocation } from "@solidjs/router";
import { clsx } from "clsx";
import { ComponentProps, For, Match, Switch, splitProps } from "solid-js";
import { type ComponentProps, For, Match, Switch, splitProps } from "solid-js";

import { NavSection } from "../model/navigation";
import type { NavSection } from "../model/navigation";

interface NavigationProps extends ComponentProps<"nav"> {
sections: NavSection[];
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { clsx } from "clsx";
import { ComponentProps, mergeProps, splitProps } from "solid-js";
import { type ComponentProps, mergeProps, splitProps } from "solid-js";

interface PreviewProps extends ComponentProps<"div"> {
isCentered?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/prose.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { clsx } from "clsx";
import { ComponentProps, splitProps } from "solid-js";
import { type ComponentProps, splitProps } from "solid-js";

export function Prose(props: ComponentProps<"div">) {
const [local, others] = splitProps(props, ["class"]);
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/components/table-of-contents.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useLocation } from "@solidjs/router";
import { clsx } from "clsx";
import {
Accessor,
type Accessor,
For,
Setter,
type Setter,
Suspense,
createEffect,
createSignal,
Expand All @@ -28,7 +28,7 @@ function getHeadingsFromToc(tableOfContents: TocItem[]) {
}

const style = window.getComputedStyle(el);
const scrollMt = parseFloat(style.scrollMarginTop) + 1;
const scrollMt = Number.parseFloat(style.scrollMarginTop) + 1;

const top = window.scrollY + el.getBoundingClientRect().top - scrollMt;

Expand Down
8 changes: 6 additions & 2 deletions apps/docs/src/components/tabs-snippets.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Tabs, TabsRootProps } from "@kobalte/core/tabs";
import { Tabs, type TabsRootProps } from "@kobalte/core/tabs";
import { clsx } from "clsx";
import { ComponentProps, ParentComponent, splitProps } from "solid-js";
import {
type ComponentProps,
type ParentComponent,
splitProps,
} from "solid-js";

type TabsSnippetsComposite = {
List: typeof Tabs.List;
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/components/theme-selector.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
ConfigColorMode,
MaybeConfigColorMode,
type ConfigColorMode,
type MaybeConfigColorMode,
useColorMode,
} from "@kobalte/core/color-mode";
import { Select } from "@kobalte/core/select";
import { JSX, createSignal, onMount } from "solid-js";
import { type JSX, createSignal, onMount } from "solid-js";

import { DesktopIcon, MoonIcon, SunIcon } from "./icons";

Expand Down
5 changes: 4 additions & 1 deletion apps/docs/src/examples/navigation-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { NavigationMenu, Orientation } from "@kobalte/core/navigation-menu";
import {
NavigationMenu,
type Orientation,
} from "@kobalte/core/navigation-menu";
import { RadioGroup } from "@kobalte/core/radio-group";
import { For, createSignal } from "solid-js";

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/examples/toggle-group.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ToggleGroup } from "@kobalte/core/toggle-group";

import { JSXElement, createSignal } from "solid-js";
import { type JSXElement, createSignal } from "solid-js";
import style from "./toggle-group.module.css";

export function BasicExample() {
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button } from "@kobalte/core/button";
import { Title as MetaTitle } from "@solidjs/meta";
import { clsx } from "clsx";
import { ComponentProps, Show, createSignal, splitProps } from "solid-js";
import { type ComponentProps, Show, createSignal, splitProps } from "solid-js";

import { CheckIcon, CopyIcon } from "./components";

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/routes/docs/changelog.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { RouteProps } from "@solidjs/router";
import type { RouteProps } from "@solidjs/router";

import { CORE_VERSIONS } from "../../VERSIONS";
import { Layout } from "../../components";
import { NavSection } from "../../model/navigation";
import type { NavSection } from "../../model/navigation";

const CHANGELOG_NAV_SECTIONS: NavSection[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/routes/docs/core.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RouteProps } from "@solidjs/router";
import type { RouteProps } from "@solidjs/router";

import { Layout } from "../../components";
import { NavSection } from "../../model/navigation";
import type { NavSection } from "../../model/navigation";

const CORE_NAV_SECTIONS: NavSection[] = [
{
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"license": "MIT",
"author": "jer3m01 <[email protected]>",
"contributors": ["Fabien Marie-Louise <[email protected]>"],
"workspaces": [
"apps/*",
"packages/*"
],
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"build": "turbo run build",
"build:libs": "pnpm -F \\!docs -F \\!playground build && pnpm i",
Expand All @@ -24,9 +21,8 @@
"commit": "git-cz",
"dev:core": "pnpm -F @kobalte/core dev",
"dev:docs": "pnpm -F @kobalte/docs dev",
"format": "biome format . --write && prettier . --write",
"lint": "pnpm check --apply",
"check": "biome check .",
"format": "biome check --write && prettier . --write",
"check": "biome check",
"test": "turbo run test",
"typecheck": "turbo run typecheck"
},
Expand All @@ -38,7 +34,7 @@
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/preset-env": "7.22.10",
"@biomejs/biome": "1.5.2",
"@biomejs/biome": "1.8.1",
"@changesets/cli": "2.26.2",
"@commitlint/cli": "17.7.1",
"@commitlint/config-conventional": "17.7.0",
Expand Down
Loading

0 comments on commit 4dc7f8d

Please sign in to comment.