@stack-spot/citric-react 0.42.0-beta.0 → 0.43.0
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/CHANGELOG.md +13 -13
- package/dist/citric.css +2926 -2920
- package/dist/components/Accordion.d.ts +1 -1
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Alert.d.ts +1 -1
- package/dist/components/Alert.js +1 -1
- package/dist/components/AsyncContent.d.ts +1 -1
- package/dist/components/AsyncContent.js +1 -1
- package/dist/components/Autocomplete.d.ts +370 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/{Autocomplete/Autocomplete.js → Autocomplete.js} +163 -98
- package/dist/components/Autocomplete.js.map +1 -0
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/AvatarGroup.d.ts +1 -1
- package/dist/components/AvatarGroup.js +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote.js +1 -1
- package/dist/components/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb.js +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/ButtonLink.d.ts +1 -1
- package/dist/components/ButtonLink.js +1 -1
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/Card.js +1 -1
- package/dist/components/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup.d.ts +1 -1
- package/dist/components/CheckboxGroup.js +1 -1
- package/dist/components/Circle.d.ts +1 -1
- package/dist/components/Circle.js +1 -1
- package/dist/components/Divider.d.ts +1 -1
- package/dist/components/Divider.js +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorBoundary.js +1 -1
- package/dist/components/ErrorMessage.d.ts +1 -1
- package/dist/components/ErrorMessage.js +1 -1
- package/dist/components/FallbackBoundary.d.ts +1 -1
- package/dist/components/FallbackBoundary.js +1 -1
- package/dist/components/Favorite.d.ts +1 -1
- package/dist/components/Favorite.js +1 -1
- package/dist/components/FieldGroup.d.ts +1 -1
- package/dist/components/FieldGroup.js +1 -1
- package/dist/components/Form.d.ts +2 -2
- package/dist/components/Form.js +1 -1
- package/dist/components/FormGroup.d.ts +1 -1
- package/dist/components/FormGroup.js +1 -1
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/IconBox.d.ts +3 -3
- package/dist/components/IconBox.js +1 -1
- package/dist/components/ImageBox.d.ts +3 -3
- package/dist/components/ImageBox.js +1 -1
- package/dist/components/ImageWithFallback.d.ts +1 -1
- package/dist/components/ImageWithFallback.js +1 -1
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/LoadingPanel.d.ts +1 -1
- package/dist/components/LoadingPanel.js +1 -1
- package/dist/components/MenuOverlay/Menu.d.ts +1 -1
- package/dist/components/MenuOverlay/Menu.js +1 -1
- package/dist/components/MenuOverlay/index.d.ts +1 -1
- package/dist/components/MenuOverlay/index.js +1 -1
- package/dist/components/Overlay/index.d.ts +1 -1
- package/dist/components/Overlay/index.js +1 -1
- package/dist/components/Pagination.d.ts +1 -1
- package/dist/components/Pagination.js +1 -1
- package/dist/components/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar.js +1 -1
- package/dist/components/ProgressCircular.d.ts +1 -1
- package/dist/components/ProgressCircular.js +1 -1
- package/dist/components/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/Rating.d.ts +1 -1
- package/dist/components/Rating.js +1 -1
- package/dist/components/Select/MultiSelect.d.ts +1 -1
- package/dist/components/Select/MultiSelect.js +1 -1
- package/dist/components/Select/RichSelect.d.ts +1 -1
- package/dist/components/Select/RichSelect.js +1 -1
- package/dist/components/Select/SimpleSelect.d.ts +1 -1
- package/dist/components/Select/SimpleSelect.js +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectBox.d.ts +9 -1
- package/dist/components/SelectBox.d.ts.map +1 -1
- package/dist/components/SelectBox.js +6 -5
- package/dist/components/SelectBox.js.map +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Slider.d.ts +1 -1
- package/dist/components/Slider.js +1 -1
- package/dist/components/SmartTable.d.ts +1 -1
- package/dist/components/SmartTable.js +1 -1
- package/dist/components/Stepper.d.ts +1 -1
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Table.d.ts +3 -3
- package/dist/components/Table.js +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/Textarea.js +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/context/CitricProvider.d.ts +1 -1
- package/dist/context/CitricProvider.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/overlay.js +1 -1
- package/dist/theme.css +415 -415
- package/dist/utils/css.js +1 -1
- package/dist/utils/css.js.map +1 -1
- package/package.json +1 -1
- package/scripts/build-css.ts +49 -49
- package/src/components/Accordion.tsx +130 -130
- package/src/components/Alert.tsx +24 -24
- package/src/components/AsyncContent.tsx +75 -75
- package/src/components/{Autocomplete/Autocomplete.tsx → Autocomplete.tsx} +403 -159
- package/src/components/Avatar.tsx +45 -45
- package/src/components/AvatarGroup.tsx +49 -49
- package/src/components/Badge.tsx +47 -47
- package/src/components/Blockquote.tsx +18 -18
- package/src/components/Breadcrumb.tsx +33 -33
- package/src/components/Button.tsx +105 -105
- package/src/components/ButtonLink.tsx +45 -45
- package/src/components/Card.tsx +68 -68
- package/src/components/Checkbox.tsx +51 -52
- package/src/components/CheckboxGroup.tsx +153 -153
- package/src/components/Circle.tsx +43 -43
- package/src/components/CitricComponent.ts +47 -47
- package/src/components/Divider.tsx +24 -24
- package/src/components/ErrorBoundary.tsx +75 -75
- package/src/components/ErrorMessage.tsx +11 -11
- package/src/components/FallbackBoundary.tsx +40 -40
- package/src/components/Favorite.tsx +57 -57
- package/src/components/FieldGroup.tsx +46 -46
- package/src/components/Form.tsx +36 -36
- package/src/components/FormGroup.tsx +57 -57
- package/src/components/Icon.tsx +35 -35
- package/src/components/IconBox.tsx +134 -134
- package/src/components/ImageBox.tsx +125 -125
- package/src/components/ImageWithFallback.tsx +65 -65
- package/src/components/Input.tsx +49 -49
- package/src/components/Link.tsx +55 -55
- package/src/components/LoadingPanel.tsx +12 -12
- package/src/components/MenuOverlay/Menu.tsx +158 -158
- package/src/components/MenuOverlay/context.ts +20 -20
- package/src/components/MenuOverlay/index.tsx +55 -55
- package/src/components/MenuOverlay/keyboard.ts +60 -60
- package/src/components/MenuOverlay/types.ts +171 -171
- package/src/components/Overlay/context.ts +10 -10
- package/src/components/Overlay/index.tsx +182 -182
- package/src/components/Overlay/types.ts +75 -75
- package/src/components/Pagination.tsx +133 -133
- package/src/components/ProgressBar.tsx +45 -45
- package/src/components/ProgressCircular.tsx +45 -45
- package/src/components/RadioGroup.tsx +147 -147
- package/src/components/Rating.tsx +98 -98
- package/src/components/Select/MultiSelect.tsx +217 -217
- package/src/components/Select/RichSelect.tsx +128 -128
- package/src/components/Select/SimpleSelect.tsx +73 -73
- package/src/components/Select/hooks.ts +133 -133
- package/src/components/Select/index.tsx +35 -35
- package/src/components/Select/types.ts +134 -134
- package/src/components/SelectBox.tsx +181 -167
- package/src/components/Skeleton.tsx +53 -53
- package/src/components/Slider.tsx +89 -89
- package/src/components/SmartTable.tsx +227 -227
- package/src/components/Stepper.tsx +163 -163
- package/src/components/Table.tsx +234 -234
- package/src/components/Tabs/TabController.ts +54 -54
- package/src/components/Tabs/index.tsx +106 -106
- package/src/components/Tabs/types.ts +67 -67
- package/src/components/Tabs/utils.ts +6 -6
- package/src/components/Text.ts +111 -111
- package/src/components/Textarea.tsx +27 -27
- package/src/components/Tooltip.tsx +83 -83
- package/src/components/layout.tsx +101 -101
- package/src/context/CitricContext.tsx +4 -4
- package/src/context/CitricProvider.tsx +14 -14
- package/src/context/hooks.ts +6 -6
- package/src/index.ts +59 -59
- package/src/overlay.ts +348 -348
- package/src/types.ts +235 -235
- package/src/utils/ValueController.ts +28 -28
- package/src/utils/acessibility.ts +92 -92
- package/src/utils/checkbox.ts +121 -121
- package/src/utils/css.ts +119 -119
- package/src/utils/options.ts +9 -9
- package/src/utils/radio.ts +93 -93
- package/src/utils/react.ts +6 -6
- package/src/utils/time.ts +5 -5
- package/tsconfig.json +10 -10
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -211
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +0 -1
- package/dist/components/Autocomplete/Autocomplete.js.map +0 -1
- package/dist/components/Autocomplete/index.d.ts +0 -3
- package/dist/components/Autocomplete/index.d.ts.map +0 -1
- package/dist/components/Autocomplete/index.js +0 -2
- package/dist/components/Autocomplete/index.js.map +0 -1
- package/src/components/Autocomplete/index.ts +0 -3
|
@@ -13,5 +13,5 @@ export type DividerProps = React.JSX.IntrinsicElements['hr'] & BaseDividerProps;
|
|
|
13
13
|
/**
|
|
14
14
|
* Renders a divider (hr). "size" determines how thick the ruler is and "direction" places it on the vertical or horizontal axis.
|
|
15
15
|
*/
|
|
16
|
-
export declare const Divider: ({ size, direction, className, ...props }: DividerProps) => import("react/jsx-runtime
|
|
16
|
+
export declare const Divider: ({ size, direction, className, ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -39,7 +39,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
39
39
|
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
40
40
|
private renderCustomErrorUI;
|
|
41
41
|
private renderErrorUI;
|
|
42
|
-
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime
|
|
42
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
43
43
|
}
|
|
44
44
|
export {};
|
|
45
45
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Icon } from '@stack-spot/citric-icons';
|
|
3
3
|
import { theme } from '@stack-spot/portal-theme';
|
|
4
4
|
import { Row } from './layout.js';
|
|
@@ -19,6 +19,6 @@ interface Props {
|
|
|
19
19
|
* </FallbackBoundary>
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export declare const FallbackBoundary: ({ children, message }: Props) => import("react/jsx-runtime
|
|
22
|
+
export declare const FallbackBoundary: ({ children, message }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=FallbackBoundary.d.ts.map
|
|
@@ -35,6 +35,6 @@ export type FavoriteProps = Omit<ControlledInput, 'size'> & BaseFavoriteProps;
|
|
|
35
35
|
* return <Favorite value={isFavorite} onChange={setFavorite} loading={isLoading} />
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export declare const Favorite: ({ value, size, appearance, onChange, loading, disabled, className, ...props }: FavoriteProps) => import("react/jsx-runtime
|
|
38
|
+
export declare const Favorite: ({ value, size, appearance, onChange, loading, disabled, className, ...props }: FavoriteProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export {};
|
|
40
40
|
//# sourceMappingURL=Favorite.d.ts.map
|
|
@@ -28,5 +28,5 @@ export type FieldGroupProps = React.JSX.IntrinsicElements['div'] & BaseFieldGrou
|
|
|
28
28
|
* </FieldGroup>
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export declare const FieldGroup: ({ auto, fullWidth, className, children, ...props }: FieldGroupProps) => import("react/jsx-runtime
|
|
31
|
+
export declare const FieldGroup: ({ auto, fullWidth, className, children, ...props }: FieldGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
//# sourceMappingURL=FieldGroup.d.ts.map
|
|
@@ -5,7 +5,7 @@ export type ButtonGroupProps = JSX.IntrinsicElements['div'];
|
|
|
5
5
|
*
|
|
6
6
|
* This has the exact same interface as the HTML form.
|
|
7
7
|
*/
|
|
8
|
-
export declare const Form: ({ children, ...props }: FormProps) => import("react/jsx-runtime
|
|
8
|
+
export declare const Form: ({ children, ...props }: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* Renders a group of buttons in a form.
|
|
11
11
|
*
|
|
@@ -19,5 +19,5 @@ export declare const Form: ({ children, ...props }: FormProps) => import("react/
|
|
|
19
19
|
* </Form>
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export declare const ButtonGroup: ({ className, children, ...props }: ButtonGroupProps) => import("react/jsx-runtime
|
|
22
|
+
export declare const ButtonGroup: ({ className, children, ...props }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
//# sourceMappingURL=Form.d.ts.map
|
package/dist/components/Form.js
CHANGED
|
@@ -29,5 +29,5 @@ export type FormGroupProps = React.JSX.IntrinsicElements['div'] & BaseFormGroupP
|
|
|
29
29
|
* </FormGroup>
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export declare const FormGroup: ({ error, help, label, warning, className, children, ...props }: FormGroupProps) => import("react/jsx-runtime
|
|
32
|
+
export declare const FormGroup: ({ error, help, label, warning, className, children, ...props }: FormGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
//# sourceMappingURL=FormGroup.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { withRef } from '../utils/react.js';
|
|
4
4
|
import { CitricComponent } from './CitricComponent.js';
|
|
@@ -27,5 +27,5 @@ export type IconProps<T extends IconGroup> = Omit<OgIconProps<T>, 'color'> & {
|
|
|
27
27
|
* <Icon icon="Search" />
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export declare function Icon<T extends IconGroup>({ color, style, ...props }: IconProps<T>): import("react/jsx-runtime
|
|
30
|
+
export declare function Icon<T extends IconGroup>({ color, style, ...props }: IconProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
//# sourceMappingURL=Icon.d.ts.map
|
package/dist/components/Icon.js
CHANGED
|
@@ -63,7 +63,7 @@ export type IconBoxProps<T extends IconBoxTag, G extends IconGroup> = Omit<HTMLT
|
|
|
63
63
|
* <IconBox icon="Search" colorScheme="primary" />
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
export declare const IconBox: <T extends IconBoxTag = "i", G extends IconGroup = "outline">({ group, icon, tag, appearance, size, className, metadata, onClick, feedback, ...props }: IconBoxProps<T, G>) => import("react/jsx-runtime
|
|
66
|
+
export declare const IconBox: <T extends IconBoxTag = "i", G extends IconGroup = "outline">({ group, icon, tag, appearance, size, className, metadata, onClick, feedback, ...props }: IconBoxProps<T, G>) => import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
/**
|
|
68
68
|
* A shortcut for `<IconBox tag="button">`.
|
|
69
69
|
*
|
|
@@ -75,7 +75,7 @@ export declare const IconBox: <T extends IconBoxTag = "i", G extends IconGroup =
|
|
|
75
75
|
* <IconButton icon="Search" />
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
-
export declare const IconButton: <G extends IconGroup = "outline">({ type, ...props }: Omit<IconBoxProps<"button", G>, "tag">) => import("react/jsx-runtime
|
|
78
|
+
export declare const IconButton: <G extends IconGroup = "outline">({ type, ...props }: Omit<IconBoxProps<"button", G>, "tag">) => import("react/jsx-runtime").JSX.Element;
|
|
79
79
|
/**
|
|
80
80
|
* A shortcut for `<IconBox tag="a">`.
|
|
81
81
|
*
|
|
@@ -87,6 +87,6 @@ export declare const IconButton: <G extends IconGroup = "outline">({ type, ...pr
|
|
|
87
87
|
* <IconLink icon="Search" href="#" />
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
export declare const IconLink: <G extends IconGroup = "outline">(props: Omit<IconBoxProps<"a", G>, "tag">) => import("react/jsx-runtime
|
|
90
|
+
export declare const IconLink: <G extends IconGroup = "outline">(props: Omit<IconBoxProps<"a", G>, "tag">) => import("react/jsx-runtime").JSX.Element;
|
|
91
91
|
export {};
|
|
92
92
|
//# sourceMappingURL=IconBox.d.ts.map
|
|
@@ -54,7 +54,7 @@ export type ImageBoxProps<T extends ImageBoxTag> = HTMLTag[T] & BaseImageBoxProp
|
|
|
54
54
|
* <ImageBox><img src="https://images.com/myimage.png" /></ImageBox>
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export declare const ImageBox: <T extends ImageBoxTag = "div">({ tag, appearance, size, className, metadata, onClick, feedback, ...props }: ImageBoxProps<T>) => import("react/jsx-runtime
|
|
57
|
+
export declare const ImageBox: <T extends ImageBoxTag = "div">({ tag, appearance, size, className, metadata, onClick, feedback, ...props }: ImageBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
/**
|
|
59
59
|
* A shortcut for `<ImageBox tag="button">`.
|
|
60
60
|
*
|
|
@@ -66,7 +66,7 @@ export declare const ImageBox: <T extends ImageBoxTag = "div">({ tag, appearance
|
|
|
66
66
|
* <ImageButton><img src="https://images.com/myimage.png" /></ImageButton>
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
export declare const ImageButton: (props: Omit<ImageBoxProps<"button">, "tag">) => import("react/jsx-runtime
|
|
69
|
+
export declare const ImageButton: (props: Omit<ImageBoxProps<"button">, "tag">) => import("react/jsx-runtime").JSX.Element;
|
|
70
70
|
/**
|
|
71
71
|
* A shortcut for `<ImageBox tag="a">`.
|
|
72
72
|
*
|
|
@@ -78,6 +78,6 @@ export declare const ImageButton: (props: Omit<ImageBoxProps<"button">, "tag">)
|
|
|
78
78
|
* <ImageLink href="#"><img src="https://images.com/myimage.png" /></ImageButton>
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
export declare const ImageLink: (props: Omit<ImageBoxProps<"a">, "tag">) => import("react/jsx-runtime
|
|
81
|
+
export declare const ImageLink: (props: Omit<ImageBoxProps<"a">, "tag">) => import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
export {};
|
|
83
83
|
//# sourceMappingURL=ImageBox.d.ts.map
|
|
@@ -22,5 +22,5 @@ export type ImageWithFallbackProps = JSX.IntrinsicElements['img'] & BaseImageWit
|
|
|
22
22
|
* <ImageWithFallback src={item.image} fallback={<Icon icon="Agent" />} />
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
export declare const ImageWithFallback: ({ onLoad, onError, className, style: ogStyle, fallback, showLoading, w, h, radius, bg, ...props }: ImageWithFallbackProps) => import("react/jsx-runtime
|
|
25
|
+
export declare const ImageWithFallback: ({ onLoad, onError, className, style: ogStyle, fallback, showLoading, w, h, radius, bg, ...props }: ImageWithFallbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
//# sourceMappingURL=ImageWithFallback.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { getStyleFromProps } from '../utils/css.js';
|
|
@@ -25,5 +25,5 @@ export type InputProps<T extends SupportedInputType = 'text'> = ControlledInput
|
|
|
25
25
|
* return <Input value={value} onChange={setValue} />
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare const Input: <T extends SupportedInputType = "text">({ type, value, onChange, ...props }: InputProps<T>) => import("react/jsx-runtime
|
|
28
|
+
export declare const Input: <T extends SupportedInputType = "text">({ type, value, onChange, ...props }: InputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
//# sourceMappingURL=Input.d.ts.map
|
package/dist/components/Input.js
CHANGED
|
@@ -28,5 +28,5 @@ export type LinkProps = React.JSX.IntrinsicElements['a'] & BaseLinkProps;
|
|
|
28
28
|
* Whenever a link is clicked, the function `onClickLink` of the nearest CitricController is called with the event and the value of the
|
|
29
29
|
* prop `metadata`.
|
|
30
30
|
*/
|
|
31
|
-
export declare const Link: ({ appearance, color, style, className, children, onClick, metadata, underline, ...props }: LinkProps) => import("react/jsx-runtime
|
|
31
|
+
export declare const Link: ({ appearance, color, style, className, children, onClick, metadata, underline, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
//# sourceMappingURL=Link.d.ts.map
|
package/dist/components/Link.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCitricController } from '../context/hooks.js';
|
|
3
3
|
import { applyColor, applyTextAppearance } from '../utils/css.js';
|
|
4
4
|
import { withRef } from '../utils/react.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LoadingStyle } from '../types.js';
|
|
2
|
-
export declare const LoadingPanel: ({ type, text, colorScheme }: LoadingStyle) => import("react/jsx-runtime
|
|
2
|
+
export declare const LoadingPanel: ({ type, text, colorScheme }: LoadingStyle) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=LoadingPanel.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Column } from './layout.js';
|
|
3
3
|
import { ProgressBar } from './ProgressBar.js';
|
|
4
4
|
import { ProgressCircular } from './ProgressCircular.js';
|
|
@@ -2,5 +2,5 @@ import { MenuProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* TODO: make the height changes animated.
|
|
4
4
|
*/
|
|
5
|
-
export declare function Menu({ items, appearance, bgLevel, header, roundedItems, showBorders, showShadows, spaced, className, onKeyDown, ...props }: MenuProps): import("react/jsx-runtime
|
|
5
|
+
export declare function Menu({ items, appearance, bgLevel, header, roundedItems, showBorders, showShadows, spaced, className, onKeyDown, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
4
|
import { createElement, useEffect, useMemo } from 'react';
|
|
@@ -19,5 +19,5 @@ import { MenuOverlayProps } from './types.js';
|
|
|
19
19
|
* return <MenuOverlay items={items}><IconButton icon="Plus" /></MenuOverlay>
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export declare const MenuOverlay: ({ id, items, appearance, bgLevel, header, roundedItems, showBorders, showShadows, spaced, menuClass, menuStyle, children, ...props }: MenuOverlayProps) => import("react/jsx-runtime
|
|
22
|
+
export declare const MenuOverlay: ({ id, items, appearance, bgLevel, header, roundedItems, showBorders, showShadows, spaced, menuClass, menuStyle, children, ...props }: MenuOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -26,5 +26,5 @@ export { useOverlayController } from './context.js';
|
|
|
26
26
|
* )
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare function Overlay<T extends keyof HTMLTag>({ tag, children, content, position, triggerOn, alignment, attributes, onRenderChild, autoFocusBehavior, openDelayMS, closeDelayMS, ...props }: OverlayProps<T>): import("react/jsx-runtime
|
|
29
|
+
export declare function Overlay<T extends keyof HTMLTag>({ tag, children, content, position, triggerOn, alignment, attributes, onRenderChild, autoFocusBehavior, openDelayMS, closeDelayMS, ...props }: OverlayProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -42,5 +42,5 @@ export type PaginationProps = Omit<React.JSX.IntrinsicElements['div'], 'onChange
|
|
|
42
42
|
* />
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
export declare const Pagination: ({ value, onChange, totalPages, pageSizeOptions, ...props }: PaginationProps) => import("react/jsx-runtime
|
|
45
|
+
export declare const Pagination: ({ value, onChange, totalPages, pageSizeOptions, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
46
|
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { interpolate, useTranslate } from '@stack-spot/portal-translate';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { withRef } from '../utils/react.js';
|
|
@@ -26,5 +26,5 @@ export type ProgressBarProps = React.JSX.IntrinsicElements['div'] & BaseProgress
|
|
|
26
26
|
* <ProgressBar progress={50} />
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const ProgressBar: ({ progress, speed, style, className, ...props }: ProgressBarProps) => import("react/jsx-runtime
|
|
29
|
+
export declare const ProgressBar: ({ progress, speed, style, className, ...props }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -26,5 +26,5 @@ export type ProgressCircularProps = React.JSX.IntrinsicElements['div'] & BasePro
|
|
|
26
26
|
* <ProgressCircular progress={50} />
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const ProgressCircular: ({ progress, size, style, className, ...props }: ProgressCircularProps) => import("react/jsx-runtime
|
|
29
|
+
export declare const ProgressCircular: ({ progress, size, style, className, ...props }: ProgressCircularProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=ProgressCircular.d.ts.map
|
|
@@ -93,5 +93,5 @@ export type RadioGroupProps<T> = Omit<React.JSX.IntrinsicElements['div'], 'onCha
|
|
|
93
93
|
* return <RadioGroup options={options} renderLabel={o => o.name} renderKey={o => o.id} value={value} setValue={setValue} />
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
export declare const RadioGroup: <T>({ name, value, options, onChange, renderLabel, renderKey, renderItem, isDisabled, colorScheme, gap, focusable, style, ...props }: RadioGroupProps<T>) => import("react/jsx-runtime
|
|
96
|
+
export declare const RadioGroup: <T>({ name, value, options, onChange, renderLabel, renderKey, renderItem, isDisabled, colorScheme, gap, focusable, style, ...props }: RadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
97
97
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isNil } from 'lodash';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { defaultRenderKey, defaultRenderLabel } from '../utils/options.js';
|
|
@@ -32,5 +32,5 @@ export type RatingProps = Omit<React.JSX.IntrinsicElements['div'], 'onChange' |
|
|
|
32
32
|
* ```
|
|
33
33
|
* In the example above, `RatingValue` is any integer from 1 to 5.
|
|
34
34
|
*/
|
|
35
|
-
export declare const Rating: ({ value, onChange, name, disabled, readonly, ...props }: RatingProps) => import("react/jsx-runtime
|
|
35
|
+
export declare const Rating: ({ value, onChange, name, disabled, readonly, ...props }: RatingProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
//# sourceMappingURL=Rating.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import { withRef } from '../utils/react.js';
|
|
4
4
|
import { CitricComponent } from './CitricComponent.js';
|
|
@@ -56,5 +56,5 @@ export type MultiSelectProps<T> = Omit<React.JSX.IntrinsicElements['div'], 'ref'
|
|
|
56
56
|
* return <MultiSelect options={options} renderLabel={o => o.name} renderKey={o => o.id} value={value} setValue={setValue} />
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
export declare const MultiSelect: <T>({ ref, options, value, onChange, renderLabel, renderKey, disabled, loading, renderOption, renderHeader, searchable, maxHeight, style, className, showArrow, placeholder, showSelectAll, ...props }: MultiSelectProps<T>) => import("react/jsx-runtime
|
|
59
|
+
export declare const MultiSelect: <T>({ ref, options, value, onChange, renderLabel, renderKey, disabled, loading, renderOption, renderHeader, searchable, maxHeight, style, className, showArrow, placeholder, showSelectAll, ...props }: MultiSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
60
60
|
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectProps } from './types.js';
|
|
2
2
|
export declare const RichSelect: <T>({ ref, options, value, onChange, renderLabel, renderKey, required, disabled, loading, renderOption, renderHeader, searchable, maxHeight, style, className, onFocus, onBlur, showArrow, placeholder, ...props }: SelectProps<T> & {
|
|
3
3
|
type?: "rich";
|
|
4
|
-
}) => import("react/jsx-runtime
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=RichSelect.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
4
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectProps } from './types.js';
|
|
2
2
|
export declare const SimpleSelect: <T>({ ref, options, value, onChange, renderLabel, renderKey, required, loading, disabled, onBlur, onFocus, wrap, ...props }: SelectProps<T> & {
|
|
3
3
|
wrap?: boolean;
|
|
4
|
-
}) => import("react/jsx-runtime
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=SimpleSelect.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { defaultRenderKey, defaultRenderLabel } from '../../utils/options.js';
|
|
4
4
|
import { withRef } from '../../utils/react.js';
|
|
@@ -24,5 +24,5 @@ export type * from './types.js';
|
|
|
24
24
|
* return <Select options={options} renderLabel={o => o.name} renderKey={o => o.id} value={value} onChange={setValue} />
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime
|
|
27
|
+
export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -47,6 +47,14 @@ export interface CommonSelectBoxProps<T> extends WithColorPalette, WithColorSche
|
|
|
47
47
|
* @default 300
|
|
48
48
|
*/
|
|
49
49
|
bgLevel?: 300 | 400 | 500 | 600 | 700;
|
|
50
|
+
/**
|
|
51
|
+
* The appearance of each option.
|
|
52
|
+
*
|
|
53
|
+
* Attention: the appearance "button" hides the description text.
|
|
54
|
+
*
|
|
55
|
+
* @default 'box'
|
|
56
|
+
*/
|
|
57
|
+
appearance?: 'box' | 'button';
|
|
50
58
|
}
|
|
51
59
|
interface CheckboxProps<T> extends CommonSelectBoxProps<T> {
|
|
52
60
|
multiple: true;
|
|
@@ -90,6 +98,6 @@ export type SelectBoxProps<T> = Omit<React.JSX.IntrinsicElements['div'], 'onChan
|
|
|
90
98
|
* />
|
|
91
99
|
* ```
|
|
92
100
|
*/
|
|
93
|
-
export declare const SelectBox: <T>({ multiple, name, value, options, onChange, renderLabel, renderKey, isDisabled, className, style, direction, bgLevel, colorPalette, colorScheme, ...props }: SelectBoxProps<T>) => import("react/jsx-runtime
|
|
101
|
+
export declare const SelectBox: <T>({ multiple, name, value, options, onChange, renderLabel, renderKey, isDisabled, className, style, direction, bgLevel, colorPalette, colorScheme, appearance, ...props }: SelectBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
94
102
|
export {};
|
|
95
103
|
//# sourceMappingURL=SelectBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBox.d.ts","sourceRoot":"","sources":["../../src/components/SelectBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAM5D,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,EAAE,eAAe;IAChF;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,CAAC,EAAE,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,cAAc,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectBox.d.ts","sourceRoot":"","sources":["../../src/components/SelectBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAM5D,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IA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MAAM,kBAAkB,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;AAEpE,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAA;AAEzH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,SAAS,GACD,CAAC,2KAiBjB,cAAc,CAAC,CAAC,CAAC,4CAiDrB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { defaultRenderKey, defaultRenderLabel } from '../utils/options.js';
|
|
@@ -35,23 +35,24 @@ import { layout } from './layout.js';
|
|
|
35
35
|
* />
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export const SelectBox = withRef(function SelectBox({ multiple, name, value, options, onChange, renderLabel = o => ({ title: defaultRenderLabel(o) }), renderKey = defaultRenderKey, isDisabled, className, style, direction, bgLevel, colorPalette, colorScheme, ...props }) {
|
|
38
|
+
export const SelectBox = withRef(function SelectBox({ multiple, name, value, options, onChange, renderLabel = o => ({ title: defaultRenderLabel(o) }), renderKey = defaultRenderKey, isDisabled, className, style, direction, bgLevel, colorPalette, colorScheme, appearance, ...props }) {
|
|
39
39
|
const items = useMemo(() => {
|
|
40
40
|
const valueAsArray = value ? (Array.isArray(value) ? value : [value]) : [];
|
|
41
41
|
const valueKeys = valueAsArray.map(renderKey);
|
|
42
42
|
return options.map((o) => {
|
|
43
43
|
const key = renderKey(o);
|
|
44
44
|
const label = renderLabel(o);
|
|
45
|
-
|
|
45
|
+
const checked = value ? valueKeys.includes(key) : undefined;
|
|
46
|
+
return (_jsxs(CitricComponent, { tag: "label", component: "select-box", className: listToClass([bgLevel && `bg-${bgLevel}`, appearance]), children: [_jsx("input", { type: multiple ? 'checkbox' : 'radio', name: name, value: key, checked: checked, disabled: isDisabled?.(o), onChange: onChange ? (e) => {
|
|
46
47
|
if (multiple) {
|
|
47
48
|
onChange(e.target.checked ? [...valueAsArray, o] : valueAsArray.filter(v => renderKey(v) !== key));
|
|
48
49
|
}
|
|
49
50
|
else {
|
|
50
51
|
onChange(o);
|
|
51
52
|
}
|
|
52
|
-
} : undefined }), _jsxs("div", { className: "option", children: [label.icon, _jsx("p", { className: "title", children: label.title }), label.description && _jsx("p", { className: "description", children: label.description })] })] }, key));
|
|
53
|
+
} : undefined }, `${key}-${checked}`), _jsxs("div", { className: "option", children: [label.icon, _jsx("p", { className: "title", children: label.title }), label.description && appearance !== 'button' && _jsx("p", { className: "description", children: label.description })] })] }, key));
|
|
53
54
|
});
|
|
54
|
-
}, [options, value, name, multiple, bgLevel]);
|
|
55
|
+
}, [options, value, name, multiple, bgLevel, appearance]);
|
|
55
56
|
return (_jsx("div", { "data-color-palette": colorPalette, "data-color-scheme": colorScheme, className: listToClass([className, direction === 'vertical' ? layout.column : layout.row]), style: { gap: '5px', ...style }, ...props, children: items }));
|
|
56
57
|
});
|
|
57
58
|
//# sourceMappingURL=SelectBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBox.js","sourceRoot":"","sources":["../../src/components/SelectBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAA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AAK,CAAC,WAAW,IAAI,UAAU,KAAK,QAAQ,IAAI,YAAG,SAAS,EAAC,aAAa,YAAE,KAAK,CAAC,WAAW,GAAK,IAC/F,KAvBc,GAAG,CAwBP,CACnB,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;IACzD,OAAO,CACL,oCACsB,YAAY,uBACb,WAAW,EAC9B,SAAS,EAAE,WAAW,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAC1F,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,KAC3B,KAAK,YAER,KAAK,GACF,CACP,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -36,5 +36,5 @@ export type SkeletonProps = React.JSX.IntrinsicElements['div'] & BaseSkeletonPro
|
|
|
36
36
|
* <Skeleton width="100%" height="20px" />
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
export declare const Skeleton: ({ appearance, className, style, width, height, bgLevel, ...props }: SkeletonProps) => import("react/jsx-runtime
|
|
39
|
+
export declare const Skeleton: ({ appearance, className, style, width, height, bgLevel, ...props }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -40,5 +40,5 @@ export type SliderProps = ControlledInput & BaseSliderProps;
|
|
|
40
40
|
* return <Slider value={value} setValue={setValue} />
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
export declare const Slider: ({ value, onChange, min, max, style, showValue, renderValue, colorPalette, colorScheme, className, ...props }: SliderProps) => import("react/jsx-runtime
|
|
43
|
+
export declare const Slider: ({ value, onChange, min, max, style, showValue, renderValue, colorPalette, colorScheme, className, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
//# sourceMappingURL=Slider.d.ts.map
|