@ngrok/mantle 0.0.1-alpha.1 → 0.0.1-alpha.11
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.
- package/dist/assets/fonts/euclid-square/swisstypefaces-EULA.pdf +0 -0
- package/dist/dts/index.d.ts +15 -0
- package/dist/{input → dts/input}/index.d.ts +1 -1
- package/dist/{media-object → dts/media-object}/index.d.ts +4 -5
- package/dist/{core → dts}/tailwind.preset.d.ts +3 -2
- package/dist/{theme-provider → dts/theme-provider}/index.d.ts +10 -9
- package/dist/index.d.ts +256 -0
- package/dist/index.js +547 -0
- package/dist/index.js.map +1 -0
- package/dist/tailwind.preset.d.ts +309 -0
- package/dist/tailwind.preset.js +321 -0
- package/dist/tailwind.preset.js.map +1 -0
- package/package.json +20 -5
- package/dist/back-to-top-button/index.js +0 -22
- package/dist/button/index.js +0 -58
- package/dist/card/index.js +0 -33
- package/dist/core/tailwind.preset.js +0 -299
- package/dist/cx/index.js +0 -10
- package/dist/dropdown-menu/index.js +0 -32
- package/dist/hooks/use-matches-media-query.js +0 -21
- package/dist/hooks/use-prefers-reduced-motion.js +0 -28
- package/dist/input/index.js +0 -24
- package/dist/media-object/index.js +0 -27
- package/dist/portal/index.js +0 -3
- package/dist/select/index.js +0 -22
- package/dist/theme-provider/index.js +0 -143
- package/dist/tooltip/index.js +0 -10
- package/dist/types/as-child.js +0 -1
- package/dist/types/deep-non-nullable.js +0 -1
- package/dist/types/input.js +0 -1
- package/dist/types/variant-props.js +0 -1
- package/dist/types/with-style-props.js +0 -1
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Bold-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-BoldItalic-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Light-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-LightItalic-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Medium-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-MediumItalic-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Regular-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-RegularItalic-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-Semibold-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/euclid-square/EuclidSquare-SemiboldItalic-WebS.woff +0 -0
- /package/dist/{core → assets}/fonts/fonts.css +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Bold.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-BoldItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ExtraLight.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ExtraLightItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Italic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Light.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-LightItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Medium.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-MediumItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Regular.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-SemiBold.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-SemiBoldItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Text.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-TextItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-Thin.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/IBMPlexMono-ThinItalic.woff +0 -0
- /package/dist/{core → assets}/fonts/ibm-plex-mono/license.txt +0 -0
- /package/dist/{core → assets}/mantle.css +0 -0
- /package/dist/{back-to-top-button → dts/back-to-top-button}/index.d.ts +0 -0
- /package/dist/{button → dts/button}/index.d.ts +0 -0
- /package/dist/{card → dts/card}/index.d.ts +0 -0
- /package/dist/{cx → dts/cx}/index.d.ts +0 -0
- /package/dist/{dropdown-menu → dts/dropdown-menu}/index.d.ts +0 -0
- /package/dist/{hooks → dts/hooks}/use-matches-media-query.d.ts +0 -0
- /package/dist/{hooks → dts/hooks}/use-prefers-reduced-motion.d.ts +0 -0
- /package/dist/{types/input.d.ts → dts/input/types.d.ts} +0 -0
- /package/dist/{portal → dts/portal}/index.d.ts +0 -0
- /package/dist/{select → dts/select}/index.d.ts +0 -0
- /package/dist/{tooltip → dts/tooltip}/index.d.ts +0 -0
- /package/dist/{types → dts/types}/as-child.d.ts +0 -0
- /package/dist/{types → dts/types}/deep-non-nullable.d.ts +0 -0
- /package/dist/{types → dts/types}/variant-props.d.ts +0 -0
- /package/dist/{types → dts/types}/with-style-props.d.ts +0 -0
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { Button } from "./button";
|
|
2
|
+
export { Card, CardBody, CardFooter, CardHeader, CardTitle } from "./card";
|
|
3
|
+
export { cx } from "./cx";
|
|
4
|
+
export { Input } from "./input";
|
|
5
|
+
export { MediaObject, MediaObjectMedia, MediaObjectContent } from "./media-object";
|
|
6
|
+
export { Select, SelectContent, SelectGroup, SelectIcon, SelectLabel, SelectOption, SelectSeparator, SelectTrigger, SelectValue, } from "./select";
|
|
7
|
+
export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme } from "./theme-provider";
|
|
8
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./tooltip";
|
|
9
|
+
export type { ButtonProps } from "./button";
|
|
10
|
+
export type { CardProps, CardTitleProps } from "./card";
|
|
11
|
+
export type { InputProps } from "./input";
|
|
12
|
+
export type { AutoComplete, InputType } from "./input/types";
|
|
13
|
+
export type { Theme, ThemeProviderProps } from "./theme-provider";
|
|
14
|
+
export type { WithAsChild } from "./types/as-child";
|
|
15
|
+
export type { WithStyleProps } from "./types/with-style-props";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InputHTMLAttributes } from "react";
|
|
2
2
|
import type { VariantProps } from "../types/variant-props";
|
|
3
|
-
import type { AutoComplete, InputType } from "
|
|
3
|
+
import type { AutoComplete, InputType } from "./types";
|
|
4
4
|
declare const inputVariants: (props?: ({
|
|
5
5
|
state?: "default" | "danger" | "success" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
|
-
type Props = HTMLAttributes<HTMLDivElement>;
|
|
3
2
|
/**
|
|
4
3
|
* The media object is an image/icon (media) to the left, with descriptive
|
|
5
4
|
* content (title and subtitle/description) to the right.
|
|
@@ -12,13 +11,13 @@ type Props = HTMLAttributes<HTMLDivElement>;
|
|
|
12
11
|
* Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`
|
|
13
12
|
* components as direct children.
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
declare const MediaObject: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
15
|
/**
|
|
17
16
|
* The container for an image or icon to display in the media slot of the media object.
|
|
18
17
|
*/
|
|
19
|
-
|
|
18
|
+
declare const MediaObjectMedia: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
19
|
/**
|
|
21
20
|
* The container for the content slot of a media object.
|
|
22
21
|
*/
|
|
23
|
-
|
|
24
|
-
export {};
|
|
22
|
+
declare const MediaObjectContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export { MediaObject, MediaObjectMedia, MediaObjectContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const preset: {
|
|
2
2
|
content: never[];
|
|
3
3
|
darkMode: "class";
|
|
4
4
|
theme: {
|
|
@@ -305,4 +305,5 @@ declare const _default: {
|
|
|
305
305
|
handler: () => void;
|
|
306
306
|
}[];
|
|
307
307
|
};
|
|
308
|
-
export
|
|
308
|
+
export type Preset = typeof preset;
|
|
309
|
+
export default preset;
|
|
@@ -6,33 +6,33 @@ declare const themes: readonly ["system", "light", "dark", "light-high-contrast"
|
|
|
6
6
|
/**
|
|
7
7
|
* Theme is a string literal type that represents a valid theme.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type Theme = (typeof themes)[number];
|
|
10
10
|
/**
|
|
11
11
|
* theme is a helper which translates the Theme type into a string literal type.
|
|
12
12
|
*/
|
|
13
|
-
export declare const theme: (value: Theme) => "
|
|
13
|
+
export declare const theme: (value: Theme) => "system" | "light" | "dark" | "light-high-contrast" | "dark-high-contrast";
|
|
14
14
|
/**
|
|
15
15
|
* Type predicate that checks if a value is a valid theme.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
declare function isTheme(value: unknown): value is Theme;
|
|
18
18
|
/**
|
|
19
19
|
* ThemeProviderState is the shape of the state returned by the ThemeProviderContext.
|
|
20
20
|
*/
|
|
21
21
|
type ThemeProviderState = [theme: Theme, setTheme: (theme: Theme) => void];
|
|
22
|
-
type
|
|
22
|
+
type ThemeProviderProps = PropsWithChildren & {
|
|
23
23
|
defaultTheme?: Theme;
|
|
24
24
|
storageKey?: string;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
declare function ThemeProvider({ children, defaultTheme, storageKey }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* useTheme returns the current theme and a function to set the theme.
|
|
32
32
|
*
|
|
33
33
|
* @note This function will throw an error if used outside of a ThemeProvider context tree.
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
declare function useTheme(): ThemeProviderState;
|
|
36
36
|
/**
|
|
37
37
|
* determineThemeFromMediaQuery returns the theme that should be used based on the user's media query preferences.
|
|
38
38
|
*/
|
|
@@ -44,8 +44,9 @@ export declare function determineThemeFromMediaQuery({ prefersDarkMode, prefersC
|
|
|
44
44
|
* PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
|
|
45
45
|
* Render as high as possible in the DOM, preferably in the <head> element.
|
|
46
46
|
*/
|
|
47
|
-
|
|
48
|
-
defaultTheme?: "
|
|
47
|
+
declare const PreventWrongThemeFlash: ({ defaultTheme, storageKey, }: {
|
|
48
|
+
defaultTheme?: "system" | "light" | "dark" | "light-high-contrast" | "dark-high-contrast" | undefined;
|
|
49
49
|
storageKey?: string | undefined;
|
|
50
50
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
export {};
|
|
51
|
+
export type { Theme, ThemeProviderProps };
|
|
52
|
+
export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @ngrok/mantle v0.0.1-alpha.11
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) ngrok.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
import * as react from 'react';
|
|
13
|
+
import { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, PropsWithChildren, CSSProperties } from 'react';
|
|
14
|
+
import * as class_variance_authority from 'class-variance-authority';
|
|
15
|
+
import { VariantProps as VariantProps$1 } from 'class-variance-authority';
|
|
16
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
17
|
+
import { ClassValue } from 'clsx';
|
|
18
|
+
import * as _radix_ui_react_select from '@radix-ui/react-select';
|
|
19
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
20
|
+
import * as _radix_ui_react_tooltip from '@radix-ui/react-tooltip';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Makes all properties in an object non-nullable, recursively.
|
|
24
|
+
*/
|
|
25
|
+
type DeepNonNullable<Type> = {
|
|
26
|
+
[Property in keyof Type]-?: Type[Property] & {};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Utility type for adding the `asChild` boolean prop to a component.
|
|
31
|
+
*/
|
|
32
|
+
type WithAsChild = {
|
|
33
|
+
/**
|
|
34
|
+
* Use the `asChild` prop to compose Radix's functionality onto alternative
|
|
35
|
+
* element types or your own React components.
|
|
36
|
+
*
|
|
37
|
+
* All Radix primitive parts that render a DOM element accept an `asChild`
|
|
38
|
+
* prop. When `asChild` is set to `true`, Radix will not render a default DOM
|
|
39
|
+
* element, instead cloning the part's child and passing it the props and
|
|
40
|
+
* behavior required to make it functional.
|
|
41
|
+
*
|
|
42
|
+
* asChild can be used as deeply as you need to. This means it is a great way
|
|
43
|
+
* to compose multiple primitive's behavior together.
|
|
44
|
+
*
|
|
45
|
+
* @see https://www.radix-ui.com/docs/primitives/guides/composition#composition
|
|
46
|
+
*/
|
|
47
|
+
asChild?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Variant props that are optional and cannot be `null`.
|
|
52
|
+
*
|
|
53
|
+
* Using VariantProps directly from CVA produces that can be `null`, which is not what we want.
|
|
54
|
+
*/
|
|
55
|
+
type VariantProps<Variants extends (props?: Record<PropertyKey, unknown> | undefined) => string> = Partial<DeepNonNullable<VariantProps$1<Variants>>>;
|
|
56
|
+
|
|
57
|
+
declare const buttonVariants: (props?: ({
|
|
58
|
+
priority?: "default" | "primary" | "secondary" | null | undefined;
|
|
59
|
+
state?: "default" | "danger" | null | undefined;
|
|
60
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
61
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
62
|
+
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
63
|
+
/**
|
|
64
|
+
* The props for the `Button` component.
|
|
65
|
+
*/
|
|
66
|
+
type ButtonProps = WithAsChild & ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariants;
|
|
67
|
+
/**
|
|
68
|
+
* Renders a button or a component that looks like a button, an interactive
|
|
69
|
+
* element activated by a user with a mouse, keyboard, finger, voice command, or
|
|
70
|
+
* other assistive technology. Once activated, it then performs an action, such
|
|
71
|
+
* as submitting a form or opening a dialog.
|
|
72
|
+
*
|
|
73
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
|
|
74
|
+
*/
|
|
75
|
+
declare const Button: react.ForwardRefExoticComponent<WithAsChild & ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
76
|
+
priority?: "default" | "primary" | "secondary" | null | undefined;
|
|
77
|
+
state?: "default" | "danger" | null | undefined;
|
|
78
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
79
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & react.RefAttributes<HTMLButtonElement>>;
|
|
80
|
+
|
|
81
|
+
type CardProps = HTMLAttributes<HTMLDivElement>;
|
|
82
|
+
/**
|
|
83
|
+
* A container that can be used to display content in a box resembling a playing
|
|
84
|
+
* card.
|
|
85
|
+
*/
|
|
86
|
+
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
87
|
+
/**
|
|
88
|
+
* The main content of a card. Usually composed as a direct child of a `Card` component.
|
|
89
|
+
*/
|
|
90
|
+
declare const CardBody: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
91
|
+
/**
|
|
92
|
+
* The footer container of a card. Usually composed as a direct child of a `Card` component.
|
|
93
|
+
*/
|
|
94
|
+
declare const CardFooter: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
/**
|
|
96
|
+
* The header container of a card. Usually composed as a direct child of a `Card` component.
|
|
97
|
+
*/
|
|
98
|
+
declare const CardHeader: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
99
|
+
type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;
|
|
100
|
+
/**
|
|
101
|
+
* The title of a card. Usually composed as a direct child of a `CardHeader` component.
|
|
102
|
+
*/
|
|
103
|
+
declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & WithAsChild & react.RefAttributes<HTMLParagraphElement>>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Conditionally add Tailwind (and other) CSS classes.
|
|
107
|
+
*
|
|
108
|
+
* Allows for tailwind overrides in LTR-specificity-like order of applied classes.
|
|
109
|
+
*/
|
|
110
|
+
declare function cx(...inputs: ClassValue[]): string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* (Not a Boolean attribute!) The autocomplete attribute takes as its value a space-separated string that describes what,
|
|
114
|
+
* if any, type of autocomplete functionality the input should provide. A typical implementation of autocomplete recalls
|
|
115
|
+
* previous values entered in the same input field, but more complex forms of autocomplete can exist. For instance, a
|
|
116
|
+
* browser could integrate with a device's contacts list to autocomplete email addresses in an email input field.
|
|
117
|
+
*
|
|
118
|
+
* The autocomplete attribute is valid on hidden, text, search, url, tel, email, date, month, week, time, datetime-local,
|
|
119
|
+
* number, range, color, and password. This attribute has no effect on input types that do not return numeric or text
|
|
120
|
+
* data, being valid for all input types except checkbox, radio, file, or any of the button types.
|
|
121
|
+
*
|
|
122
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
|
|
123
|
+
*/
|
|
124
|
+
type AutoComplete = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
|
|
125
|
+
/**
|
|
126
|
+
* A string specifying the type of control to render. For example, to create a checkbox, a value of `"checkbox"` is used.
|
|
127
|
+
* If omitted (or an unknown value is specified), the input type `"text"` is used, creating a plaintext input field.
|
|
128
|
+
*
|
|
129
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
130
|
+
*/
|
|
131
|
+
type InputType = "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week";
|
|
132
|
+
|
|
133
|
+
declare const inputVariants: (props?: ({
|
|
134
|
+
state?: "default" | "danger" | "success" | null | undefined;
|
|
135
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
136
|
+
type InputVariants = VariantProps<typeof inputVariants>;
|
|
137
|
+
/**
|
|
138
|
+
* The props for the `Input` component.
|
|
139
|
+
*/
|
|
140
|
+
type InputProps = InputVariants & Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & {
|
|
141
|
+
autoComplete?: AutoComplete;
|
|
142
|
+
type?: InputType;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Used to create interactive controls for web-based forms in order to accept data from the user
|
|
146
|
+
*/
|
|
147
|
+
declare const Input: react.ForwardRefExoticComponent<Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
148
|
+
state?: "default" | "danger" | "success" | null | undefined;
|
|
149
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & {
|
|
150
|
+
autoComplete?: AutoComplete | undefined;
|
|
151
|
+
type?: InputType | undefined;
|
|
152
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The media object is an image/icon (media) to the left, with descriptive
|
|
156
|
+
* content (title and subtitle/description) to the right.
|
|
157
|
+
*
|
|
158
|
+
* Change the spacing between the media and content by passing a `gap-*` class.
|
|
159
|
+
* The default gap is `gap-4`.
|
|
160
|
+
*
|
|
161
|
+
* Use flexbox utilities to change the alignment of the media and content.
|
|
162
|
+
*
|
|
163
|
+
* Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`
|
|
164
|
+
* components as direct children.
|
|
165
|
+
*/
|
|
166
|
+
declare const MediaObject: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
167
|
+
/**
|
|
168
|
+
* The container for an image or icon to display in the media slot of the media object.
|
|
169
|
+
*/
|
|
170
|
+
declare const MediaObjectMedia: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
171
|
+
/**
|
|
172
|
+
* The container for the content slot of a media object.
|
|
173
|
+
*/
|
|
174
|
+
declare const MediaObjectContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
175
|
+
|
|
176
|
+
declare const Select: react.FC<_radix_ui_react_select.SelectProps>;
|
|
177
|
+
declare const SelectGroup: react.ForwardRefExoticComponent<_radix_ui_react_select.SelectGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
178
|
+
declare const SelectValue: react.ForwardRefExoticComponent<_radix_ui_react_select.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
|
|
179
|
+
declare const SelectIcon: react.ForwardRefExoticComponent<_radix_ui_react_select.SelectIconProps & react.RefAttributes<HTMLSpanElement>>;
|
|
180
|
+
declare const SelectTrigger: react.ForwardRefExoticComponent<Omit<_radix_ui_react_select.SelectTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
181
|
+
hideIcon?: boolean | undefined;
|
|
182
|
+
} & react.RefAttributes<HTMLButtonElement>>;
|
|
183
|
+
declare const SelectContent: react.ForwardRefExoticComponent<Omit<_radix_ui_react_select.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
184
|
+
declare const SelectLabel: react.ForwardRefExoticComponent<Omit<_radix_ui_react_select.SelectLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
185
|
+
declare const SelectOption: react.ForwardRefExoticComponent<Omit<_radix_ui_react_select.SelectItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
186
|
+
declare const SelectSeparator: react.ForwardRefExoticComponent<Omit<_radix_ui_react_select.SelectSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* themes is a tuple of valid themes.
|
|
190
|
+
*/
|
|
191
|
+
declare const themes: readonly ["system", "light", "dark", "light-high-contrast", "dark-high-contrast"];
|
|
192
|
+
/**
|
|
193
|
+
* Theme is a string literal type that represents a valid theme.
|
|
194
|
+
*/
|
|
195
|
+
type Theme = (typeof themes)[number];
|
|
196
|
+
/**
|
|
197
|
+
* Type predicate that checks if a value is a valid theme.
|
|
198
|
+
*/
|
|
199
|
+
declare function isTheme(value: unknown): value is Theme;
|
|
200
|
+
/**
|
|
201
|
+
* ThemeProviderState is the shape of the state returned by the ThemeProviderContext.
|
|
202
|
+
*/
|
|
203
|
+
type ThemeProviderState = [theme: Theme, setTheme: (theme: Theme) => void];
|
|
204
|
+
type ThemeProviderProps = PropsWithChildren & {
|
|
205
|
+
defaultTheme?: Theme;
|
|
206
|
+
storageKey?: string;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.
|
|
210
|
+
*/
|
|
211
|
+
declare function ThemeProvider({ children, defaultTheme, storageKey }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
/**
|
|
213
|
+
* useTheme returns the current theme and a function to set the theme.
|
|
214
|
+
*
|
|
215
|
+
* @note This function will throw an error if used outside of a ThemeProvider context tree.
|
|
216
|
+
*/
|
|
217
|
+
declare function useTheme(): ThemeProviderState;
|
|
218
|
+
/**
|
|
219
|
+
* PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
|
|
220
|
+
* Render as high as possible in the DOM, preferably in the <head> element.
|
|
221
|
+
*/
|
|
222
|
+
declare const PreventWrongThemeFlash: ({ defaultTheme, storageKey, }: {
|
|
223
|
+
defaultTheme?: "system" | "light" | "dark" | "light-high-contrast" | "dark-high-contrast" | undefined;
|
|
224
|
+
storageKey?: string | undefined;
|
|
225
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
227
|
+
declare const TooltipProvider: react.FC<_radix_ui_react_tooltip.TooltipProviderProps>;
|
|
228
|
+
declare const Tooltip: react.FC<_radix_ui_react_tooltip.TooltipProps>;
|
|
229
|
+
declare const TooltipTrigger: react.ForwardRefExoticComponent<_radix_ui_react_tooltip.TooltipTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
230
|
+
declare const TooltipContent: react.ForwardRefExoticComponent<Omit<_radix_ui_react_tooltip.TooltipContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Helper type that includes an optional className and style prop for react
|
|
234
|
+
* components.
|
|
235
|
+
*/
|
|
236
|
+
type WithStyleProps = {
|
|
237
|
+
/**
|
|
238
|
+
* A string. Specifies the element’s CSS class name.
|
|
239
|
+
*
|
|
240
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/className
|
|
241
|
+
*/
|
|
242
|
+
className?: string;
|
|
243
|
+
/**
|
|
244
|
+
* An object with CSS styles, for example `{ fontWeight: 'bold', margin: 20 }`.
|
|
245
|
+
* Similarly to the DOM style property, the CSS property names need to be
|
|
246
|
+
* written as camelCase, for example fontWeight instead of font-weight.
|
|
247
|
+
* You can pass strings or numbers as values. If you pass a number, like
|
|
248
|
+
* `width: 100`, React will automatically append px (“pixels”) to the value
|
|
249
|
+
* unless it’s a unitless property.
|
|
250
|
+
*
|
|
251
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
|
|
252
|
+
*/
|
|
253
|
+
style?: CSSProperties;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export { type AutoComplete, Button, type ButtonProps, Card, CardBody, CardFooter, CardHeader, type CardProps, CardTitle, type CardTitleProps, Input, type InputProps, type InputType, MediaObject, MediaObjectContent, MediaObjectMedia, PreventWrongThemeFlash, Select, SelectContent, SelectGroup, SelectIcon, SelectLabel, SelectOption, SelectSeparator, SelectTrigger, SelectValue, type Theme, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type WithAsChild, type WithStyleProps, cx, isTheme, useTheme };
|