@koine/react 1.0.1 → 1.0.2
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/Alert/Alert.d.ts +5 -0
- package/Alert/index.d.ts +1 -0
- package/Animations/Reveal.d.ts +4 -0
- package/Animations/Underline.d.ts +1 -0
- package/Animations/index.d.ts +3 -0
- package/Animations/useReveal.d.ts +34 -0
- package/Autocomplete/AutocompleteDownshift.d.ts +1 -0
- package/Autocomplete/AutocompleteDownshiftMultiselect.d.ts +1 -0
- package/Autocomplete/AutocompleteMui.d.ts +47 -0
- package/Autocomplete/AutocompleteReach.d.ts +1 -0
- package/Autocomplete/components.d.ts +21 -0
- package/Autocomplete/helpers.d.ts +3 -0
- package/Autocomplete/index.d.ts +2 -0
- package/Bg/BgColor.d.ts +36 -0
- package/Bg/BgPhoto.d.ts +14 -0
- package/Bg/BgSvg.d.ts +8 -0
- package/Bg/index.d.ts +3 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/Breadcrumbs/index.d.ts +1 -0
- package/Buttons/Button.d.ts +18 -0
- package/Buttons/ButtonComposite.d.ts +23 -0
- package/Buttons/ButtonFab.d.ts +7 -0
- package/Buttons/ButtonLink.d.ts +9 -0
- package/Buttons/IconButton.d.ts +11 -0
- package/Buttons/index.d.ts +5 -0
- package/Calendar/CalendarDaygridCell.d.ts +36 -0
- package/Calendar/CalendarDaygridNav.d.ts +28 -0
- package/Calendar/CalendarDaygridTable.d.ts +26 -0
- package/Calendar/CalendarLegend.d.ts +19 -0
- package/Calendar/calendar-api-google.d.ts +18 -0
- package/Calendar/index.d.ts +6 -0
- package/Calendar/types.d.ts +81 -0
- package/Calendar/useCalendar.d.ts +50 -0
- package/Calendar/utils.d.ts +11 -0
- package/Carousel/Carousel.d.ts +1 -0
- package/Carousel/CarouselCss.d.ts +47 -0
- package/Carousel/index.d.ts +1 -0
- package/Collapsable/Collapsable.d.ts +60 -0
- package/Collapsable/index.d.ts +1 -0
- package/Debug/Debug.d.ts +5 -0
- package/Debug/index.d.ts +1 -0
- package/Dialog/Dialog.d.ts +23 -0
- package/Dialog/index.d.ts +1 -0
- package/Editor/Editor--tiptap.d.ts +10 -0
- package/Editor/components.d.ts +8 -0
- package/Editor/index.d.ts +1 -0
- package/Favicon/FaviconTags.d.ts +19 -0
- package/Favicon/index.d.ts +1 -0
- package/Forms/Checkbox/Checkbox.d.ts +11 -0
- package/Forms/Checkbox/index.d.ts +1 -0
- package/Forms/Feedback/Feedback.d.ts +5 -0
- package/Forms/Feedback/index.d.ts +1 -0
- package/Forms/Field/Field.d.ts +16 -0
- package/Forms/Field/FieldControl.d.ts +26 -0
- package/Forms/Field/FieldHint.d.ts +1 -0
- package/Forms/Field/index.d.ts +2 -0
- package/Forms/Form/Form.d.ts +31 -0
- package/Forms/Form/index.d.ts +1 -0
- package/Forms/Input/Input.d.ts +9 -0
- package/Forms/Input/index.d.ts +1 -0
- package/Forms/InputGroup/InputGroup.d.ts +13 -0
- package/Forms/InputGroup/index.d.ts +1 -0
- package/Forms/Label/Label.d.ts +3 -0
- package/Forms/Label/index.d.ts +1 -0
- package/Forms/Password/Password.d.ts +5 -0
- package/Forms/Password/index.d.ts +1 -0
- package/Forms/Radio/Radio.d.ts +12 -0
- package/Forms/Radio/index.d.ts +1 -0
- package/Forms/Switch/Switch.d.ts +9 -0
- package/Forms/Switch/index.d.ts +1 -0
- package/Forms/Textarea/Textarea.d.ts +5 -0
- package/Forms/Textarea/TextareaRich.d.ts +6 -0
- package/Forms/Textarea/index.d.ts +2 -0
- package/Forms/Toggle/Toggle.d.ts +26 -0
- package/Forms/Toggle/index.d.ts +1 -0
- package/Forms/Toggle/useToggle.d.ts +46 -0
- package/Forms/antispam.d.ts +24 -0
- package/Forms/helpers.d.ts +26 -0
- package/Forms/index.d.ts +16 -0
- package/Forms/styles.d.ts +20 -0
- package/Gauge/Gauge.d.ts +5 -0
- package/Grid/Grid.d.ts +60 -0
- package/Grid/index.d.ts +1 -0
- package/Hamburger/Hamburger.d.ts +6 -0
- package/Hamburger/index.d.ts +1 -0
- package/Header/index.d.ts +1 -0
- package/Header/useHeader.d.ts +20 -0
- package/Hidden/Hidden.d.ts +6 -0
- package/Hidden/index.d.ts +1 -0
- package/Img/Img.d.ts +11 -0
- package/Img/index.d.ts +1 -0
- package/Link/Link.d.ts +5 -0
- package/Link/LinkBlank.d.ts +8 -0
- package/Link/index.d.ts +2 -0
- package/Menu/Menu.d.ts +1 -0
- package/Menu/index.d.ts +1 -0
- package/MenuItem/MenuItem.d.ts +4 -0
- package/MenuItem/index.d.ts +1 -0
- package/Meta/Meta.d.ts +15 -0
- package/Meta/index.d.ts +1 -0
- package/NoJs/NoJs.d.ts +3 -0
- package/NoJs/index.d.ts +1 -0
- package/Pagination/PaginationNav.d.ts +23 -0
- package/Pagination/PaginationResults.d.ts +3 -0
- package/Pagination/index.d.ts +2 -0
- package/Pill/Pill.d.ts +5 -0
- package/Pill/index.d.ts +1 -0
- package/Progress/ProgressCircular.d.ts +20 -0
- package/Progress/ProgressLinear.d.ts +23 -0
- package/Progress/ProgressOverlay.d.ts +5 -0
- package/Progress/index.d.ts +3 -0
- package/Rating/Rating.d.ts +35 -0
- package/Rating/index.d.ts +11 -0
- package/Select/SelectDownshift.d.ts +5 -0
- package/Select/components.d.ts +6 -0
- package/Select/index.d.ts +2 -0
- package/Sidebar/Sidebar.d.ts +3 -0
- package/Sidebar/index.d.ts +1 -0
- package/Spacing/Spacing.d.ts +30 -0
- package/Spacing/index.d.ts +1 -0
- package/Sticky/Sticky.d.ts +2 -0
- package/Sticky/StickyCss.d.ts +5 -0
- package/Sticky/index.d.ts +1 -0
- package/Tabs/Tabs.d.ts +25 -0
- package/Tabs/index.d.ts +1 -0
- package/Typography/CopyPasteVisible.d.ts +1 -0
- package/Typography/Native.d.ts +10 -0
- package/Typography/ReadMore.d.ts +12 -0
- package/Typography/TextLoop.d.ts +16 -0
- package/Typography/TypeStairs.d.ts +6 -0
- package/Typography/index.d.ts +5 -0
- package/helpers/index.d.ts +1 -0
- package/hooks/index.d.ts +5 -0
- package/hooks/useDateLocale.d.ts +7 -0
- package/hooks/useFocus.d.ts +5 -0
- package/hooks/usePrevious.d.ts +1 -0
- package/hooks/useTraceUpdate.d.ts +4 -0
- package/hooks/useWindowSize.d.ts +1 -0
- package/index.d.ts +35 -0
- package/index.esm.js +9223 -9676
- package/index.umd.js +9657 -10111
- package/package.json +5 -5
- package/styles/Body.d.ts +10 -0
- package/styles/Global.d.ts +15 -0
- package/styles/classed.d.ts +4 -0
- package/styles/index.d.ts +7 -0
- package/styles/media.d.ts +67 -0
- package/styles/spacing.d.ts +13 -0
- package/styles/styled.d.ts +12 -0
- package/styles/theme--vanilla.d.ts +18 -0
- package/styles/theme.d.ts +89 -0
- package/types.d.ts +11 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Option } from "../../types";
|
|
3
|
+
import { FormControl } from "../helpers";
|
|
4
|
+
export declare type UseToggleProps = Omit<FormControl, "value"> & {
|
|
5
|
+
value?: boolean;
|
|
6
|
+
valueTrue?: string;
|
|
7
|
+
valueFalse?: string;
|
|
8
|
+
options?: Option[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* This hook is meant to powere Checkboxes, Switches and checkbox-like Radios
|
|
12
|
+
* components, it works in fact in two modes:
|
|
13
|
+
*
|
|
14
|
+
* 1: behaviour as standard checkbox
|
|
15
|
+
* yup validation would simply look like:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* privacy: boolean().required(),
|
|
19
|
+
* // add `.nullable()` if you do not provide a boolean `defaultValue`
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* 2: beahviour as two radio for checkbox with custom true/false values as
|
|
23
|
+
* strings yup validation would look like:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* newsletter: string().oneOf(["yes", "no"]).required(),
|
|
27
|
+
* // add `.nullable()` if you do not provide a string `defaultValue`
|
|
28
|
+
*
|
|
29
|
+
* // to do not make it required and avoid triggering an error when the input is
|
|
30
|
+
* // untouched you need to set the default value of the input in the form
|
|
31
|
+
* // initialization's `defaultValues` as such:
|
|
32
|
+
*
|
|
33
|
+
* useForm({ defaultValues: { newsletter: "no" }})
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* To enable this mode either pass the props `valueTrue` and `valueFalse` or
|
|
37
|
+
* an array of options with the shape of `Option`
|
|
38
|
+
*/
|
|
39
|
+
export declare function useToggle(props: UseToggleProps, ref: React.ForwardedRef<HTMLInputElement>): {
|
|
40
|
+
Inputs: JSX.Element;
|
|
41
|
+
rootProps: {
|
|
42
|
+
htmlFor: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
label: any;
|
|
45
|
+
value: any;
|
|
46
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ObjectShape } from "yup/lib/object";
|
|
2
|
+
/**
|
|
3
|
+
* Encode form
|
|
4
|
+
*
|
|
5
|
+
* Takes a record of yup validations and outputs a `yup` schema with encoded
|
|
6
|
+
* names (antispam technique) and a record of the encoded/decoded input `name`s.
|
|
7
|
+
*
|
|
8
|
+
* We skip the names prefixed wth an underscore which are considered programmatic
|
|
9
|
+
* form data not created by user input.
|
|
10
|
+
*/
|
|
11
|
+
export declare function encodeForm<T extends ObjectShape = {}>(validationRules: T): {
|
|
12
|
+
encodedSchema: import("yup/lib/object").RequiredObjectSchema<Record<string, T[keyof T]>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<Record<string, T[keyof T]>>>;
|
|
13
|
+
encodedNames: Record<keyof T, string>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Decode form data
|
|
17
|
+
*
|
|
18
|
+
* This function is meant to be used inside an api endpoint to gather an encoded
|
|
19
|
+
* form submit data and transform it to the decoded desired json data.
|
|
20
|
+
*
|
|
21
|
+
* Here too we skip encoding/decoding process for names prefixed wth an underscore
|
|
22
|
+
* which are considered programmatic form data not created by user input.
|
|
23
|
+
*/
|
|
24
|
+
export declare function decodeForm<ReturnAs extends Record<string, unknown> = {}, FormData extends Record<string, unknown> = {}>(formData: FormData): ReturnAs;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Control, UseFormRegister, UseFormSetValue } from "react-hook-form";
|
|
3
|
+
import type { Option } from "../types";
|
|
4
|
+
declare type FormControlNativeType = "input" | "select" | "textarea";
|
|
5
|
+
declare type FormControlFieldValues = Record<string, any>;
|
|
6
|
+
export declare type FormControlNative<T extends FormControlNativeType = "input"> = Omit<React.ComponentPropsWithRef<T>, "name">;
|
|
7
|
+
export declare type FormControlProps<T extends FormControlFieldValues = any> = {
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
name: string;
|
|
10
|
+
control?: Control<T>;
|
|
11
|
+
register?: UseFormRegister<T>;
|
|
12
|
+
setValue?: UseFormSetValue<T>;
|
|
13
|
+
};
|
|
14
|
+
export declare type FormControl<TControlType extends FormControlNativeType = "input", TFieldValues extends FormControlFieldValues = any> = FormControlNative<TControlType> & FormControlProps<TFieldValues>;
|
|
15
|
+
export declare const normaliseOptions: (options?: (string | Option)[]) => Option[];
|
|
16
|
+
export declare function defaultOptionsFilterFn(options: Option[], inputValue?: string): Option[];
|
|
17
|
+
/**
|
|
18
|
+
* We are faking the native input `onChange` event
|
|
19
|
+
*/
|
|
20
|
+
export declare function triggerOnChange<T extends HTMLElement = HTMLInputElement>(onChange?: React.ChangeEventHandler<T>, name?: string, value?: any): void;
|
|
21
|
+
/**
|
|
22
|
+
* @see https://hustle.bizongo.in/simulate-react-on-change-on-controlled-components-baa336920e04
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
25
|
+
export declare function triggerChange(input: HTMLInputElement, value?: string): void;
|
|
26
|
+
export {};
|
package/Forms/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./antispam";
|
|
2
|
+
export * from "./Checkbox";
|
|
3
|
+
export * from "./Input";
|
|
4
|
+
export * from "./InputGroup";
|
|
5
|
+
export * from "./Feedback";
|
|
6
|
+
export * from "./Field";
|
|
7
|
+
export * from "./InputGroup";
|
|
8
|
+
export * from "./Form";
|
|
9
|
+
export * from "./Label";
|
|
10
|
+
export * from "./Password";
|
|
11
|
+
export * from "./Radio";
|
|
12
|
+
export * from "./Switch";
|
|
13
|
+
export * from "./Textarea";
|
|
14
|
+
export * from "./Toggle";
|
|
15
|
+
export * from "./helpers";
|
|
16
|
+
export * from "./styles";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputInvisible: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const InputHoneypot: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
4
|
+
type: "text";
|
|
5
|
+
autoComplete: "new-password";
|
|
6
|
+
tabIndex: -1;
|
|
7
|
+
}, "type" | "autoComplete" | "tabIndex">;
|
|
8
|
+
export declare const InputProgress: import("styled-components").StyledComponent<(p: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
/**
|
|
10
|
+
* Remove the default light blue background on autofilled inputs. To be used as
|
|
11
|
+
* a function that outputs a CSS string.
|
|
12
|
+
*
|
|
13
|
+
* @see https://stackoverflow.com/a/62624824/1938970
|
|
14
|
+
*/
|
|
15
|
+
export declare const inputResetAutofill = "\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-background-clip: text;\n }\n";
|
|
16
|
+
export declare const inputBorder = "\n border: 1px solid var(--forms-border-color);\n";
|
|
17
|
+
export declare const inputPadding = "\n padding: var(--forms-gutter-y) var(--forms-gutter-x);\n";
|
|
18
|
+
export declare const inputReset: string;
|
|
19
|
+
export declare const inputBase: string;
|
|
20
|
+
export declare const inputFocus: string;
|
package/Gauge/Gauge.d.ts
ADDED
package/Grid/Grid.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Theme, Breakpoint } from "../styles/theme";
|
|
3
|
+
export declare const GRID_COLUMNS = 12;
|
|
4
|
+
export declare const GRID_GUTTER_DEFAULT: keyof Theme["gutter"];
|
|
5
|
+
export declare type GridProps = {
|
|
6
|
+
/**
|
|
7
|
+
* @default "half"
|
|
8
|
+
*/
|
|
9
|
+
$gutter?: keyof Theme["gutter"];
|
|
10
|
+
};
|
|
11
|
+
export declare type ContainerProps = GridProps & {
|
|
12
|
+
size: Breakpoint;
|
|
13
|
+
clamp?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps & {
|
|
16
|
+
size: Breakpoint;
|
|
17
|
+
clamp?: boolean | undefined;
|
|
18
|
+
}, never>;
|
|
19
|
+
export declare type ContainerFluidProps = GridProps & {
|
|
20
|
+
size: Breakpoint;
|
|
21
|
+
};
|
|
22
|
+
export declare const ContainerFluid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps & {
|
|
23
|
+
size: Breakpoint;
|
|
24
|
+
}, never>;
|
|
25
|
+
declare type Direction = "min" | "max";
|
|
26
|
+
export declare type RowProps = GridProps & {
|
|
27
|
+
$valign?: React.CSSProperties["alignItems"];
|
|
28
|
+
$reverse?: `${Direction}:${Breakpoint}`;
|
|
29
|
+
/**
|
|
30
|
+
* It forces child columns to be on one line overflowing the content when it does not fit,
|
|
31
|
+
* it is suggested to use with children having a minimum width not in percentage,
|
|
32
|
+
* for things like sliders and carousels
|
|
33
|
+
*/
|
|
34
|
+
$noWrap?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare const Row: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps & {
|
|
37
|
+
$valign?: React.CSSProperties["alignItems"];
|
|
38
|
+
$reverse?: "min:xs" | "min:sm" | "min:md" | "min:lg" | "min:xl" | "min:xxl" | "max:xs" | "max:sm" | "max:md" | "max:lg" | "max:xl" | "max:xxl" | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* It forces child columns to be on one line overflowing the content when it does not fit,
|
|
41
|
+
* it is suggested to use with children having a minimum width not in percentage,
|
|
42
|
+
* for things like sliders and carousels
|
|
43
|
+
*/
|
|
44
|
+
$noWrap?: boolean | undefined;
|
|
45
|
+
}, never>;
|
|
46
|
+
export declare type ColProps = GridProps & Partial<Record<Breakpoint, number>> & {
|
|
47
|
+
$width?: number;
|
|
48
|
+
$flex?: boolean;
|
|
49
|
+
$valign?: React.CSSProperties["alignItems"];
|
|
50
|
+
$auto?: boolean;
|
|
51
|
+
$offset?: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const Col: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps & Partial<Record<Breakpoint, number>> & {
|
|
54
|
+
$width?: number | undefined;
|
|
55
|
+
$flex?: boolean | undefined;
|
|
56
|
+
$valign?: React.CSSProperties["alignItems"];
|
|
57
|
+
$auto?: boolean | undefined;
|
|
58
|
+
$offset?: string | undefined;
|
|
59
|
+
}, never>;
|
|
60
|
+
export {};
|
package/Grid/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Grid";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Hamburger";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useHeader";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type isSticky = boolean & {
|
|
2
|
+
_branded: true;
|
|
3
|
+
};
|
|
4
|
+
declare type placeholderHeight = number & {
|
|
5
|
+
_branded: true;
|
|
6
|
+
};
|
|
7
|
+
declare type headerHeight = number & {
|
|
8
|
+
_branded: true;
|
|
9
|
+
};
|
|
10
|
+
declare type logoWidth = number & {
|
|
11
|
+
_branded: true;
|
|
12
|
+
};
|
|
13
|
+
declare type UseHeaderState = readonly [
|
|
14
|
+
isSticky,
|
|
15
|
+
placeholderHeight,
|
|
16
|
+
headerHeight,
|
|
17
|
+
logoWidth
|
|
18
|
+
];
|
|
19
|
+
export declare const useHeader: () => UseHeaderState;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Breakpoint } from "../styles/theme";
|
|
2
|
+
export declare type HiddenProps = {
|
|
3
|
+
$min?: Breakpoint;
|
|
4
|
+
$max?: Breakpoint;
|
|
5
|
+
};
|
|
6
|
+
export declare const Hidden: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, HiddenProps, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Hidden";
|
package/Img/Img.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type KoineImgProps = {};
|
|
3
|
+
export declare const KoineImg: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare type KoineImgSmartWrapProps = {
|
|
5
|
+
$loaded?: boolean;
|
|
6
|
+
$error?: boolean;
|
|
7
|
+
$bg?: React.CSSProperties["backgroundColor"];
|
|
8
|
+
};
|
|
9
|
+
export declare type KoineImgSmartProps = KoineImgProps & {
|
|
10
|
+
Wrap: React.FC<KoineImgSmartWrapProps>;
|
|
11
|
+
};
|
package/Img/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Img";
|
package/Link/Link.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type KoineLinkProps = React.ComponentPropsWithRef<"a">;
|
|
3
|
+
export declare const KoineLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
4
|
+
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
5
|
+
}, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type LinkBlankProps = React.ComponentPropsWithRef<"a">;
|
|
3
|
+
export declare const LinkBlankA: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {
|
|
4
|
+
target: "_blank";
|
|
5
|
+
rel: "noopener";
|
|
6
|
+
}, "rel" | "target">;
|
|
7
|
+
export declare const LinkBlankIcon: import("styled-components").StyledComponent<import("@react-icons/all-files/lib").IconType, import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const LinkBlank: React.FC<LinkBlankProps>;
|
package/Link/index.d.ts
ADDED
package/Menu/Menu.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Menu: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
package/Menu/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Menu";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MenuItem";
|
package/Meta/Meta.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type MetaProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether `user-scalable=0` is add to the `meta->viewport` content
|
|
5
|
+
*
|
|
6
|
+
* This is an opt in instead of the default browser behaviour as it helps prevent
|
|
7
|
+
* weird zooming on input fields on iPhone iOS devices.
|
|
8
|
+
* @see https://www.warrenchandler.com/2019/04/02/stop-iphones-from-zooming-in-on-form-fields/
|
|
9
|
+
* @see https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/
|
|
10
|
+
*
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
zoom?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const Meta: ({ zoom }: MetaProps) => JSX.Element;
|
package/Meta/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Meta";
|
package/NoJs/NoJs.d.ts
ADDED
package/NoJs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NoJs";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KoineComponentProps, KoineComponent } from "../types";
|
|
3
|
+
export declare type KoinePaginationNavProps = {
|
|
4
|
+
/** The total number of elements to paginate */
|
|
5
|
+
total: string | number;
|
|
6
|
+
/** The amount of items per page */
|
|
7
|
+
perPage: string | number;
|
|
8
|
+
/** The current page in the pagination */
|
|
9
|
+
currentPage: string | number;
|
|
10
|
+
/** Is the relative path of the url to prefix to the page number */
|
|
11
|
+
baseUrl?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The number of pages to show as number (and not dots) around the currentPage
|
|
14
|
+
* @default 2
|
|
15
|
+
*/
|
|
16
|
+
showOffset?: number;
|
|
17
|
+
};
|
|
18
|
+
declare type PaginationNavProps = KoineComponentProps<KoinePaginationNavProps, {
|
|
19
|
+
currentUrl?: string;
|
|
20
|
+
Link?: KoineComponent;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const KoinePaginationNav: ({ total, perPage, currentPage, baseUrl, showOffset, Koine, }: PaginationNavProps) => JSX.Element | null;
|
|
23
|
+
export {};
|
package/Pill/Pill.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type PillProps = object;
|
|
2
|
+
export declare const Pill: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {} & object, never>;
|
|
3
|
+
export declare const PillGreyLight: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {} & object, never>;
|
|
4
|
+
export declare const PillAccentLight: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {} & object, never>;
|
|
5
|
+
export declare const PillAccentLightOutlined: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {} & object, never>;
|
package/Pill/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Pill";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSProperties } from "styled-components";
|
|
3
|
+
import type { Theme } from "../styles/theme";
|
|
4
|
+
export declare type ProgressCircularProps = {
|
|
5
|
+
/** @default "1em" */
|
|
6
|
+
size?: CSSProperties["width"];
|
|
7
|
+
/** @default 1 */
|
|
8
|
+
thickness: number;
|
|
9
|
+
/** @default "currentColor" */
|
|
10
|
+
color: keyof Theme | NonNullable<CSSProperties["color"]>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @see https://mui.com/components/progress/
|
|
14
|
+
*/
|
|
15
|
+
export declare const ProgressCircular: ({ size, thickness, color, ...props }: {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
size?: string | undefined;
|
|
18
|
+
thickness?: number | undefined;
|
|
19
|
+
color?: string | undefined;
|
|
20
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSProperties } from "styled-components";
|
|
3
|
+
import type { Theme } from "../styles/theme";
|
|
4
|
+
export declare type ProgressLinearProps = {
|
|
5
|
+
/** @default false */
|
|
6
|
+
done?: boolean;
|
|
7
|
+
/** @default "2px" */
|
|
8
|
+
height?: CSSProperties["height"];
|
|
9
|
+
/** @default "currentColor" */
|
|
10
|
+
bg: keyof Theme | NonNullable<CSSProperties["color"]>;
|
|
11
|
+
/** @default "currentColor" */
|
|
12
|
+
fg: keyof Theme | NonNullable<CSSProperties["color"]>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @see https://mui.com/components/progress/#linear
|
|
16
|
+
*/
|
|
17
|
+
export declare const ProgressLinear: ({ done, height, bg, fg, ...props }: {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
done?: boolean | undefined;
|
|
20
|
+
height?: string | undefined;
|
|
21
|
+
bg?: string | undefined;
|
|
22
|
+
fg?: string | undefined;
|
|
23
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type RatingStarProps = React.ComponentPropsWithoutRef<"svg"> & RatingStarModel & {
|
|
3
|
+
/** @default 16 */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** Between 0 and 1 */
|
|
6
|
+
value: number;
|
|
7
|
+
/** @default "#FFD84C" */
|
|
8
|
+
colorBg?: React.CSSProperties["color"];
|
|
9
|
+
/** @default "#947813" */
|
|
10
|
+
colorStroke?: React.CSSProperties["color"];
|
|
11
|
+
};
|
|
12
|
+
export declare const RatingStarRoot: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const RatingStar: ({ value, colorBg, colorStroke, size, ...props }: RatingStarProps) => JSX.Element;
|
|
14
|
+
export declare const RatingDetails: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const RatingCount: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const RatingValue: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
export declare const RatingRoot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
export declare type RatingStarModel = {
|
|
19
|
+
value: number;
|
|
20
|
+
idx?: number;
|
|
21
|
+
dataIdx?: number;
|
|
22
|
+
};
|
|
23
|
+
export declare type RatingProps = {
|
|
24
|
+
/** @default 0 */
|
|
25
|
+
value: number;
|
|
26
|
+
count?: number;
|
|
27
|
+
/** @default 0 */
|
|
28
|
+
min?: number;
|
|
29
|
+
/** @default 5 */
|
|
30
|
+
max?: number;
|
|
31
|
+
/** @default true */
|
|
32
|
+
showDetails?: boolean;
|
|
33
|
+
starSize?: RatingStarProps["size"];
|
|
34
|
+
} & Pick<RatingStarProps, "colorBg" | "colorStroke">;
|
|
35
|
+
export declare const Rating: ({ value, count, min, max, showDetails, colorBg, colorStroke, starSize, }: RatingProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./Rating";
|
|
2
|
+
export declare const getRatingWord: (value: number, precision?: number) => any;
|
|
3
|
+
export declare const getRatingValue: (value: number) => string | number;
|
|
4
|
+
/**
|
|
5
|
+
* @see https://stackoverflow.com/a/14224813
|
|
6
|
+
*/
|
|
7
|
+
export declare function convertRange(value: number, r1: number[], r2: number[]): number;
|
|
8
|
+
export declare const deriveRating: (title: string, date: Date, minValue?: number, maxValue?: number, minQuantity?: number) => {
|
|
9
|
+
value: number;
|
|
10
|
+
count: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SelectArrowStyled: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLSpanElement, import("framer-motion").HTMLMotionProps<"span">>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare type SelectArrowProps = {
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const SelectArrow: import("react").ForwardRefExoticComponent<SelectArrowProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Sidebar";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SpacingSize, SpacingFactor, SpacingProperty, SpacingDirectionAxis, SpacingDevices } from "../styles/spacing";
|
|
3
|
+
export declare type SpacingPropsStyled = {
|
|
4
|
+
$top?: SpacingFnArgs;
|
|
5
|
+
$bottom?: SpacingFnArgs;
|
|
6
|
+
};
|
|
7
|
+
declare type SpacingFnArgs = [
|
|
8
|
+
SpacingSize,
|
|
9
|
+
SpacingFactor,
|
|
10
|
+
SpacingProperty,
|
|
11
|
+
SpacingDevices[]
|
|
12
|
+
];
|
|
13
|
+
declare type SpacingSyntaxFactor = string;
|
|
14
|
+
declare type SpacingSyntaxDevices = `${SpacingDevices}` | `${SpacingDevices},${SpacingDevices}` | `${SpacingDevices},${SpacingDevices},${SpacingDevices}`;
|
|
15
|
+
declare type SpacingSyntax = `${SpacingSize}` | `${SpacingSize}:${SpacingSyntaxFactor}` | `${SpacingSize}:${SpacingSyntaxFactor}:${SpacingProperty}` | `${SpacingSize}:${SpacingSyntaxFactor}:${SpacingProperty}:${SpacingSyntaxDevices}`;
|
|
16
|
+
export declare type SpacingProps = React.ComponentPropsWithoutRef<"div"> & Partial<Record<SpacingDirectionAxis, SpacingSyntax>>;
|
|
17
|
+
/**
|
|
18
|
+
* Usage:
|
|
19
|
+
*
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <Spacing top="sm" />
|
|
22
|
+
* <Spacing top="sm:1.5" />
|
|
23
|
+
* <Spacing top="sm:1.5" bottom="lg" />
|
|
24
|
+
* <Spacing vertical="sm:1.5:margin:mobile" />
|
|
25
|
+
* <Spacing top="sm:1.5:padding:mobile" />
|
|
26
|
+
* <Spacing top="sm:2:padding:tablet,desktop" />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const Spacing: React.FC<SpacingProps>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Spacing";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./StickyCss";
|
package/Tabs/Tabs.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TabProps as _TabProps, TabsProps as _TabsProps } from "@reach/tabs";
|
|
3
|
+
export declare const TabsStyled: import("styled-components").StyledComponent<import("@reach/utils/dist/declarations/src/polymorphic").ForwardRefComponent<"div", _TabsProps>, import("styled-components").DefaultTheme, _TabsProps & {
|
|
4
|
+
$vertical?: boolean | undefined;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare type TabsProps = _TabsProps & {
|
|
7
|
+
$vertical?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
10
|
+
export declare const TabList: import("styled-components").StyledComponent<import("@reach/utils/dist/declarations/src/polymorphic").MemoComponent<"div", import("@reach/tabs/dist/declarations/src").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const TabWrap: import("styled-components").StyledComponent<import("@reach/utils/dist/declarations/src/polymorphic").ForwardRefComponent<"button", _TabProps>, import("styled-components").DefaultTheme, _TabProps & {
|
|
12
|
+
idx: number;
|
|
13
|
+
} & TabStyledProps, never>;
|
|
14
|
+
export declare const TabText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TabStyledProps, never>;
|
|
15
|
+
export declare const TabUnderline: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"i">>, import("styled-components").DefaultTheme, TabStyledProps, never>;
|
|
16
|
+
export declare type TabStyledProps = {
|
|
17
|
+
$active: boolean;
|
|
18
|
+
$focused: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare type TabProps = _TabProps & {
|
|
21
|
+
idx: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const Tab: ({ children, ...props }: TabProps) => JSX.Element;
|
|
24
|
+
export declare const TabPanels: import("styled-components").StyledComponent<import("@reach/utils/dist/declarations/src/polymorphic").MemoComponent<"div", import("@reach/tabs/dist/declarations/src").TabPanelsProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
25
|
+
export declare const TabPanel: import("styled-components").StyledComponent<import("@reach/utils/dist/declarations/src/polymorphic").ForwardRefComponent<"div", import("@reach/tabs/dist/declarations/src").TabPanelProps>, import("styled-components").DefaultTheme, {}, never>;
|
package/Tabs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tabs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CopyPasteVisible: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const p = "\n margin: 0 0 1em 0;\n";
|
|
2
|
+
export declare const h1: string;
|
|
3
|
+
export declare const h2 = "\n margin: 0 0 1em 0;\n font-size: 24px;\n font-weight: 800;\n line-height: var(--headingsLineHeight);\n";
|
|
4
|
+
export declare const h3 = "\n margin: 0 0 1em 0;\n font-size: 20px;\n font-weight: 600;\n line-height: var(--headingsLineHeight);\n";
|
|
5
|
+
export declare const h4 = "\n margin: 0 0 1em 0;\n font-size: 13px;\n font-weight: 600;\n line-height: var(--headingsLineHeight);\n";
|
|
6
|
+
export declare const P: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const H1: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const H2: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const H3: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const H4: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ReadMoreProps = {
|
|
3
|
+
lines?: number;
|
|
4
|
+
lineHeight?: number;
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
bg?: React.CSSProperties["background"];
|
|
7
|
+
/** @default "Expand" */
|
|
8
|
+
expand?: string;
|
|
9
|
+
/** @default "Collapse" */
|
|
10
|
+
collapse?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const ReadMore: React.FC<ReadMoreProps>;
|