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

[AsciiDoc] Remove css svgs #77

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 0 additions & 58 deletions components/dist/asciidoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,51 +108,6 @@
@apply 800:bottom-[2px];
}

.asciidoc-body h1 a:hover::after,
.asciidoc-body h2 a:hover::after,
.asciidoc-body h3 a:hover::after,
.asciidoc-body h4 a:hover::after,
.asciidoc-body h5 a:hover::after,
.asciidoc-body .table-wrapper caption a:hover::after {
content: ' ';
@apply ml-2 inline-block h-4 w-4 min-w-[16px];
background: url(/svgs/link.svg) no-repeat top left;
background-size: contain;
}

.blue-theme {
& .asciidoc-body h1 a:hover::after,
& .asciidoc-body h2 a:hover::after,
& .asciidoc-body h3 a:hover::after,
& .asciidoc-body h4 a:hover::after,
& .asciidoc-body h5 a:hover::after,
& .asciidoc-body .table-wrapper caption a:hover::after {
background: url(/svgs/link-blue.svg) no-repeat top left;
}
}

.purple-theme {
& .asciidoc-body h1 a:hover::after,
& .asciidoc-body h2 a:hover::after,
& .asciidoc-body h3 a:hover::after,
& .asciidoc-body h4 a:hover::after,
& .asciidoc-body h5 a:hover::after,
& .asciidoc-body .table-wrapper caption a:hover::after {
background: url(/svgs/link-purple.svg) no-repeat top left;
}
}

.yellow-theme {
& .asciidoc-body h1 a:hover::after,
& .asciidoc-body h2 a:hover::after,
& .asciidoc-body h3 a:hover::after,
& .asciidoc-body h4 a:hover::after,
& .asciidoc-body h5 a:hover::after,
& .asciidoc-body .table-wrapper caption a:hover::after {
background: url(/svgs/link-yellow.svg) no-repeat top left;
}
}

.asciidoc-body h2 {
@apply text-sans-2xl;
}
Expand Down Expand Up @@ -509,19 +464,6 @@
@apply mr-2 mt-0.5 h-3 w-3;
}

/* .asciidoc-body .admonitionblock.warning .admonition-icon {
background: url(/svgs/warning.svg) no-repeat top left;
}

.asciidoc-body .admonitionblock.caution .admonition-icon,
.asciidoc-body .admonitionblock.important .admonition-icon {
background: url(/svgs/caution.svg) no-repeat top left;
}

.asciidoc-body .admonitionblock.tip .admonition-icon {
background: url(/svgs/tip.svg) no-repeat top left;
} */

.asciidoc-body .admonition-content {
@apply text-sans-md 800:mr-[1.25rem];
}
Expand Down
271 changes: 94 additions & 177 deletions components/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,203 +1,120 @@
import * as _asciidoctor_core_types from '@asciidoctor/core/types'
import {
TabsContentProps,
TabsListProps,
TabsProps,
TabsTriggerProps,
} from '@radix-ui/react-tabs'
import * as react from 'react'
import { ReactElement, ReactNode } from 'react'
import * as react_jsx_runtime from 'react/jsx-runtime'
import { SetRequired } from 'type-fest'
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as _asciidoctor_core_types from '@asciidoctor/core/types';
import * as react from 'react';
import { ReactNode, ReactElement } from 'react';
import { TabsProps, TabsTriggerProps, TabsListProps, TabsContentProps } from '@radix-ui/react-tabs';
import { SetRequired } from 'type-fest';

declare const AsciiDocBlocks: {
Admonition: ({
node,
}: {
node: _asciidoctor_core_types.Block
}) => react_jsx_runtime.JSX.Element
Listing: ({
node,
}: {
node: _asciidoctor_core_types.Block
}) => react_jsx_runtime.JSX.Element
Table: ({
node,
}: {
node: _asciidoctor_core_types.Table
}) => react_jsx_runtime.JSX.Element
Section: ({
node,
}: {
node: _asciidoctor_core_types.Section
}) => react_jsx_runtime.JSX.Element
}
Admonition: ({ node }: {
node: _asciidoctor_core_types.Block;
}) => react_jsx_runtime.JSX.Element;
Listing: ({ node }: {
node: _asciidoctor_core_types.Block;
}) => react_jsx_runtime.JSX.Element;
Table: ({ node }: {
node: _asciidoctor_core_types.Table;
}) => react_jsx_runtime.JSX.Element;
Section: ({ node }: {
node: _asciidoctor_core_types.Section;
}) => react_jsx_runtime.JSX.Element;
};

type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue'
type BadgeVariant = 'default' | 'solid'
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue';
type BadgeVariant = 'default' | 'solid';
interface BadgeProps {
color?: BadgeColor
className?: string
children: React.ReactNode
variant?: BadgeVariant
color?: BadgeColor;
className?: string;
children: React.ReactNode;
variant?: BadgeVariant;
}
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string>>
declare const Badge: ({
className,
children,
color,
variant,
}: BadgeProps) => react_jsx_runtime.JSX.Element
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string>>;
declare const Badge: ({ className, children, color, variant, }: BadgeProps) => react_jsx_runtime.JSX.Element;

declare const buttonSizes: readonly ['sm', 'icon', 'base']
declare const variants: readonly ['primary', 'secondary', 'ghost', 'danger']
type ButtonSize = typeof buttonSizes[number]
type Variant = typeof variants[number]
declare const buttonSizes: readonly ["sm", "icon", "base"];
declare const variants: readonly ["primary", "secondary", "ghost", "danger"];
type ButtonSize = typeof buttonSizes[number];
type Variant = typeof variants[number];
type ButtonStyleProps = {
size?: ButtonSize
variant?: Variant
}
declare const buttonStyle: ({ size, variant }?: ButtonStyleProps) => string
size?: ButtonSize;
variant?: Variant;
};
declare const buttonStyle: ({ size, variant, }?: ButtonStyleProps) => string;
interface ButtonProps extends React.ComponentPropsWithRef<'button'>, ButtonStyleProps {
innerClassName?: string
loading?: boolean
innerClassName?: string;
loading?: boolean;
}
declare const Button: react.ForwardRefExoticComponent<
Omit<ButtonProps, 'ref'> & react.RefAttributes<HTMLButtonElement>
>
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;

declare const spinnerSizes: readonly ['base', 'lg']
declare const spinnerVariants: readonly ['primary', 'secondary', 'ghost', 'danger']
type SpinnerSize = typeof spinnerSizes[number]
type SpinnerVariant = typeof spinnerVariants[number]
declare const spinnerSizes: readonly ["base", "lg"];
declare const spinnerVariants: readonly ["primary", "secondary", "ghost", "danger"];
type SpinnerSize = typeof spinnerSizes[number];
type SpinnerVariant = typeof spinnerVariants[number];
interface SpinnerProps {
className?: string
size?: SpinnerSize
variant?: SpinnerVariant
className?: string;
size?: SpinnerSize;
variant?: SpinnerVariant;
}
declare const Spinner: ({
className,
size,
variant,
}: SpinnerProps) => react_jsx_runtime.JSX.Element
declare const Spinner: ({ className, size, variant, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
type Props$1 = {
isLoading: boolean
children?: ReactNode
minTime?: number
}
isLoading: boolean;
children?: ReactNode;
minTime?: number;
};
/** Loading spinner that shows for a minimum of `minTime` */
declare const SpinnerLoader: ({
isLoading,
children,
minTime,
}: Props$1) => react_jsx_runtime.JSX.Element
declare const SpinnerLoader: ({ isLoading, children, minTime }: Props$1) => react_jsx_runtime.JSX.Element;

type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>;
declare const Tabs: {
Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element
Trigger: ({
children,
className,
...props
}: TabsTriggerProps) => react_jsx_runtime.JSX.Element
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element
}
Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element;
Trigger: ({ children, className, ...props }: TabsTriggerProps) => react_jsx_runtime.JSX.Element;
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element;
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element;
};

type CheckboxProps = {
indeterminate?: boolean
children?: React.ReactNode
className?: string
} & Omit<React.ComponentProps<'input'>, 'type'>
indeterminate?: boolean;
children?: React.ReactNode;
className?: string;
} & Omit<React.ComponentProps<'input'>, 'type'>;
/** Checkbox component that handles label, styling, and indeterminate state */
declare const Checkbox: ({
indeterminate,
children,
className,
...inputProps
}: CheckboxProps) => react_jsx_runtime.JSX.Element
declare const Checkbox: ({ indeterminate, children, className, ...inputProps }: CheckboxProps) => react_jsx_runtime.JSX.Element;

type Props = {
icon?: ReactElement
title: string
body?: string
} & (
| {
buttonText: string
buttonTo: string
}
| {
buttonText: string
onClick: () => void
}
| {
buttonText?: never
}
)
declare function EmptyMessage(props: Props): react_jsx_runtime.JSX.Element
icon?: ReactElement;
title: string;
body?: string;
} & ({
buttonText: string;
buttonTo: string;
} | {
buttonText: string;
onClick: () => void;
} | {
buttonText?: never;
});
declare function EmptyMessage(props: Props): react_jsx_runtime.JSX.Element;

type ListboxItem<Value extends string = string> = {
value: Value
} & (
| {
label: string
labelString?: never
}
| {
label: ReactNode
labelString: string
}
)
value: Value;
} & ({
label: string;
labelString?: never;
} | {
label: ReactNode;
labelString: string;
});
interface ListboxProps<Value extends string = string> {
selected: Value | null
onChange: (value: Value) => void
items: ListboxItem<Value>[]
placeholder?: string
className?: string
disabled?: boolean
hasError?: boolean
name?: string
isLoading?: boolean
selected: Value | null;
onChange: (value: Value) => void;
items: ListboxItem<Value>[];
placeholder?: string;
className?: string;
disabled?: boolean;
hasError?: boolean;
name?: string;
isLoading?: boolean;
}
declare const Listbox: <Value extends string = string>({
name,
selected,
items,
placeholder,
className,
onChange,
hasError,
disabled,
isLoading,
...props
}: ListboxProps<Value>) => react_jsx_runtime.JSX.Element
declare const Listbox: <Value extends string = string>({ name, selected, items, placeholder, className, onChange, hasError, disabled, isLoading, ...props }: ListboxProps<Value>) => react_jsx_runtime.JSX.Element;

export {
AsciiDocBlocks,
Badge,
BadgeColor,
BadgeProps,
BadgeVariant,
Button,
ButtonProps,
ButtonSize,
Checkbox,
CheckboxProps,
EmptyMessage,
Listbox,
ListboxItem,
ListboxProps,
Spinner,
SpinnerLoader,
SpinnerSize,
SpinnerVariant,
Tabs,
TabsRootProps,
Variant,
badgeColors,
buttonSizes,
buttonStyle,
spinnerSizes,
spinnerVariants,
variants,
}
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, EmptyMessage, Listbox, ListboxItem, ListboxProps, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, badgeColors, buttonSizes, buttonStyle, spinnerSizes, spinnerVariants, variants };
Loading
Loading