Skip to content

Commit

Permalink
format/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dtemkin1 committed Jan 3, 2025
1 parent d36c91b commit c6973fd
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 245 deletions.
2 changes: 1 addition & 1 deletion src/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { Input, type InputProps } from './styled/input'
export { Input, type InputProps } from "./styled/input";
4 changes: 2 additions & 2 deletions src/components/ui/select.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { createListCollection } from '@ark-ui/solid/select'
export * as Select from './styled/select'
export { createListCollection } from "@ark-ui/solid/select";
export * as Select from "./styled/select";
12 changes: 6 additions & 6 deletions src/components/ui/styled/input.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ark } from '@ark-ui/solid'
import type { ComponentProps } from 'solid-js'
import { styled } from 'styled-system/jsx'
import { input } from 'styled-system/recipes'
import { ark } from "@ark-ui/solid";
import type { ComponentProps } from "solid-js";
import { styled } from "styled-system/jsx";
import { input } from "styled-system/recipes";

export type InputProps = ComponentProps<typeof Input>
export const Input = styled(ark.input, input)
export type InputProps = ComponentProps<typeof Input>;
export const Input = styled(ark.input, input);
150 changes: 71 additions & 79 deletions src/components/ui/styled/select.tsx
Original file line number Diff line number Diff line change
@@ -1,95 +1,87 @@
import { type Assign, Select } from '@ark-ui/solid'
import type { ComponentProps } from 'solid-js'
import { type SelectVariantProps, select } from 'styled-system/recipes'
import type { HTMLStyledProps } from 'styled-system/types'
import { createStyleContext } from './utils/create-style-context'
import { type Assign, Select } from "@ark-ui/solid";
import type { ComponentProps } from "solid-js";
import { type SelectVariantProps, select } from "styled-system/recipes";
import type { HTMLStyledProps } from "styled-system/types";
import { createStyleContext } from "./utils/create-style-context";

const { withRootProvider, withContext } = createStyleContext(select)
const { withRootProvider, withContext } = createStyleContext(select);

export type RootProviderProps = ComponentProps<typeof RootProvider>
export type RootProviderProps = ComponentProps<typeof RootProvider>;
export const RootProvider = withRootProvider<
Assign<
Assign<HTMLStyledProps<'div'>, Select.RootProviderBaseProps<Select.CollectionItem>>,
SelectVariantProps
>
>(Select.RootProvider)

export type RootProps = ComponentProps<typeof Root>
Assign<
Assign<
HTMLStyledProps<"div">,
Select.RootProviderBaseProps<Select.CollectionItem>
>,
SelectVariantProps
>
>(Select.RootProvider);

export type RootProps = ComponentProps<typeof Root>;
export const Root = withRootProvider<
Assign<
Assign<HTMLStyledProps<'div'>, Select.RootBaseProps<Select.CollectionItem>>,
SelectVariantProps
>
>(Select.Root)
Assign<
Assign<HTMLStyledProps<"div">, Select.RootBaseProps<Select.CollectionItem>>,
SelectVariantProps
>
>(Select.Root);

export const ClearTrigger = withContext<
Assign<HTMLStyledProps<'button'>, Select.ClearTriggerBaseProps>
>(Select.ClearTrigger, 'clearTrigger')
Assign<HTMLStyledProps<"button">, Select.ClearTriggerBaseProps>
>(Select.ClearTrigger, "clearTrigger");

export const Content = withContext<Assign<HTMLStyledProps<'div'>, Select.ContentBaseProps>>(
Select.Content,
'content',
)
export const Content = withContext<
Assign<HTMLStyledProps<"div">, Select.ContentBaseProps>
>(Select.Content, "content");

export const Control = withContext<Assign<HTMLStyledProps<'div'>, Select.ControlBaseProps>>(
Select.Control,
'control',
)
export const Control = withContext<
Assign<HTMLStyledProps<"div">, Select.ControlBaseProps>
>(Select.Control, "control");

export const Indicator = withContext<Assign<HTMLStyledProps<'div'>, Select.IndicatorBaseProps>>(
Select.Indicator,
'indicator',
)
export const Indicator = withContext<
Assign<HTMLStyledProps<"div">, Select.IndicatorBaseProps>
>(Select.Indicator, "indicator");

export const ItemGroupLabel = withContext<
Assign<HTMLStyledProps<'div'>, Select.ItemGroupLabelBaseProps>
>(Select.ItemGroupLabel, 'itemGroupLabel')
Assign<HTMLStyledProps<"div">, Select.ItemGroupLabelBaseProps>
>(Select.ItemGroupLabel, "itemGroupLabel");

export const ItemGroup = withContext<Assign<HTMLStyledProps<'div'>, Select.ItemGroupBaseProps>>(
Select.ItemGroup,
'itemGroup',
)
export const ItemGroup = withContext<
Assign<HTMLStyledProps<"div">, Select.ItemGroupBaseProps>
>(Select.ItemGroup, "itemGroup");

export const ItemIndicator = withContext<
Assign<HTMLStyledProps<'div'>, Select.ItemIndicatorBaseProps>
>(Select.ItemIndicator, 'itemIndicator')

export const Item = withContext<Assign<HTMLStyledProps<'div'>, Select.ItemBaseProps>>(
Select.Item,
'item',
)

export const ItemText = withContext<Assign<HTMLStyledProps<'span'>, Select.ItemTextBaseProps>>(
Select.ItemText,
'itemText',
)

export const Label = withContext<Assign<HTMLStyledProps<'label'>, Select.LabelBaseProps>>(
Select.Label,
'label',
)

export const List = withContext<Assign<HTMLStyledProps<'div'>, Select.ListBaseProps>>(
Select.List,
'list',
)

export const Positioner = withContext<Assign<HTMLStyledProps<'div'>, Select.PositionerBaseProps>>(
Select.Positioner,
'positioner',
)

export const Trigger = withContext<Assign<HTMLStyledProps<'button'>, Select.TriggerBaseProps>>(
Select.Trigger,
'trigger',
)

export const ValueText = withContext<Assign<HTMLStyledProps<'span'>, Select.ValueTextBaseProps>>(
Select.ValueText,
'valueText',
)
Assign<HTMLStyledProps<"div">, Select.ItemIndicatorBaseProps>
>(Select.ItemIndicator, "itemIndicator");

export const Item = withContext<
Assign<HTMLStyledProps<"div">, Select.ItemBaseProps>
>(Select.Item, "item");

export const ItemText = withContext<
Assign<HTMLStyledProps<"span">, Select.ItemTextBaseProps>
>(Select.ItemText, "itemText");

export const Label = withContext<
Assign<HTMLStyledProps<"label">, Select.LabelBaseProps>
>(Select.Label, "label");

export const List = withContext<
Assign<HTMLStyledProps<"div">, Select.ListBaseProps>
>(Select.List, "list");

export const Positioner = withContext<
Assign<HTMLStyledProps<"div">, Select.PositionerBaseProps>
>(Select.Positioner, "positioner");

export const Trigger = withContext<
Assign<HTMLStyledProps<"button">, Select.TriggerBaseProps>
>(Select.Trigger, "trigger");

export const ValueText = withContext<
Assign<HTMLStyledProps<"span">, Select.ValueTextBaseProps>
>(Select.ValueText, "valueText");

export {
SelectContext as Context,
SelectHiddenSelect as HiddenSelect,
} from '@ark-ui/solid'
SelectContext as Context,
SelectHiddenSelect as HiddenSelect,
} from "@ark-ui/solid";
60 changes: 33 additions & 27 deletions src/components/ui/styled/switch.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
import { type Assign, Switch } from '@ark-ui/solid'
import type { ComponentProps } from 'solid-js'
import { type SwitchRecipeVariantProps, switchRecipe } from 'styled-system/recipes'
import type { HTMLStyledProps } from 'styled-system/types'
import { createStyleContext } from './utils/create-style-context'
import { type Assign, Switch } from "@ark-ui/solid";
import type { ComponentProps } from "solid-js";
import {
type SwitchRecipeVariantProps,
switchRecipe,
} from "styled-system/recipes";
import type { HTMLStyledProps } from "styled-system/types";
import { createStyleContext } from "./utils/create-style-context";

const { withProvider, withContext } = createStyleContext(switchRecipe)
const { withProvider, withContext } = createStyleContext(switchRecipe);

export type RootProviderProps = ComponentProps<typeof RootProvider>
export type RootProviderProps = ComponentProps<typeof RootProvider>;
export const RootProvider = withProvider<
Assign<Assign<HTMLStyledProps<'label'>, Switch.RootProviderBaseProps>, SwitchRecipeVariantProps>
>(Switch.RootProvider, 'root')
Assign<
Assign<HTMLStyledProps<"label">, Switch.RootProviderBaseProps>,
SwitchRecipeVariantProps
>
>(Switch.RootProvider, "root");

export type RootProps = ComponentProps<typeof Root>
export type RootProps = ComponentProps<typeof Root>;
export const Root = withProvider<
Assign<Assign<HTMLStyledProps<'label'>, Switch.RootBaseProps>, SwitchRecipeVariantProps>
>(Switch.Root, 'root')
Assign<
Assign<HTMLStyledProps<"label">, Switch.RootBaseProps>,
SwitchRecipeVariantProps
>
>(Switch.Root, "root");

export const Control = withContext<Assign<HTMLStyledProps<'span'>, Switch.ControlBaseProps>>(
Switch.Control,
'control',
)
export const Control = withContext<
Assign<HTMLStyledProps<"span">, Switch.ControlBaseProps>
>(Switch.Control, "control");

export const Label = withContext<Assign<HTMLStyledProps<'span'>, Switch.LabelBaseProps>>(
Switch.Label,
'label',
)
export const Label = withContext<
Assign<HTMLStyledProps<"span">, Switch.LabelBaseProps>
>(Switch.Label, "label");

export const Thumb = withContext<Assign<HTMLStyledProps<'span'>, Switch.ThumbBaseProps>>(
Switch.Thumb,
'thumb',
)
export const Thumb = withContext<
Assign<HTMLStyledProps<"span">, Switch.ThumbBaseProps>
>(Switch.Thumb, "thumb");

export {
SwitchContext as Context,
SwitchHiddenInput as HiddenInput,
} from '@ark-ui/solid'
SwitchContext as Context,
SwitchHiddenInput as HiddenInput,
} from "@ark-ui/solid";
75 changes: 36 additions & 39 deletions src/components/ui/styled/tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
import { type Assign, Tooltip } from '@ark-ui/solid'
import type { ComponentProps } from 'solid-js'
import { type TooltipVariantProps, tooltip } from 'styled-system/recipes'
import type { HTMLStyledProps } from 'styled-system/types'
import { createStyleContext } from './utils/create-style-context'
import { type Assign, Tooltip } from "@ark-ui/solid";
import type { ComponentProps } from "solid-js";
import { type TooltipVariantProps, tooltip } from "styled-system/recipes";
import type { HTMLStyledProps } from "styled-system/types";
import { createStyleContext } from "./utils/create-style-context";

const { withRootProvider, withContext } = createStyleContext(tooltip)
const { withRootProvider, withContext } = createStyleContext(tooltip);

export type RootProviderProps = ComponentProps<typeof RootProvider>
export type RootProviderProps = ComponentProps<typeof RootProvider>;
export const RootProvider = withRootProvider<
Assign<Tooltip.RootProviderProps, TooltipVariantProps>
>(Tooltip.RootProvider)

export type RootProps = ComponentProps<typeof Root>
export const Root = withRootProvider<Assign<Tooltip.RootProps, TooltipVariantProps>>(Tooltip.Root)

export const Arrow = withContext<Assign<HTMLStyledProps<'div'>, Tooltip.ArrowBaseProps>>(
Tooltip.Arrow,
'arrow',
)

export const ArrowTip = withContext<Assign<HTMLStyledProps<'div'>, Tooltip.ArrowTipBaseProps>>(
Tooltip.ArrowTip,
'arrowTip',
)

export const Content = withContext<Assign<HTMLStyledProps<'div'>, Tooltip.ContentBaseProps>>(
Tooltip.Content,
'content',
)

export const Positioner = withContext<Assign<HTMLStyledProps<'div'>, Tooltip.PositionerBaseProps>>(
Tooltip.Positioner,
'positioner',
)

export const Trigger = withContext<Assign<HTMLStyledProps<'button'>, Tooltip.TriggerBaseProps>>(
Tooltip.Trigger,
'trigger',
)

export { TooltipContext as Context } from '@ark-ui/solid'
Assign<Tooltip.RootProviderProps, TooltipVariantProps>
>(Tooltip.RootProvider);

export type RootProps = ComponentProps<typeof Root>;
export const Root = withRootProvider<
Assign<Tooltip.RootProps, TooltipVariantProps>
>(Tooltip.Root);

export const Arrow = withContext<
Assign<HTMLStyledProps<"div">, Tooltip.ArrowBaseProps>
>(Tooltip.Arrow, "arrow");

export const ArrowTip = withContext<
Assign<HTMLStyledProps<"div">, Tooltip.ArrowTipBaseProps>
>(Tooltip.ArrowTip, "arrowTip");

export const Content = withContext<
Assign<HTMLStyledProps<"div">, Tooltip.ContentBaseProps>
>(Tooltip.Content, "content");

export const Positioner = withContext<
Assign<HTMLStyledProps<"div">, Tooltip.PositionerBaseProps>
>(Tooltip.Positioner, "positioner");

export const Trigger = withContext<
Assign<HTMLStyledProps<"button">, Tooltip.TriggerBaseProps>
>(Tooltip.Trigger, "trigger");

export { TooltipContext as Context } from "@ark-ui/solid";
Loading

0 comments on commit c6973fd

Please sign in to comment.