@telia/teddy 0.6.11 → 0.6.13
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/components/avatar/avatar-root.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/breadcrumbs/breadcrumbs-link.d.ts +1 -1
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/card/card-illustration.d.ts +1 -1
- package/dist/components/card/card-link.d.ts +1 -1
- package/dist/components/channel-button/channel-button-root.d.ts +6 -6
- package/dist/components/channel-button/index.d.ts +6 -6
- package/dist/components/checkbox/checkbox-group-list.d.ts +1 -1
- package/dist/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/chip/chip-indicator.d.ts +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/circle-bar/css.cjs +9 -9
- package/dist/components/circle-bar/css.js +9 -9
- package/dist/components/dashboard-card/dashboard-card-avatar.d.ts +1 -1
- package/dist/components/expandable-card/expandable-card-button.d.ts +4 -4
- package/dist/components/expandable-card/index.d.ts +5 -5
- package/dist/components/flip-card/flip-card-trigger.d.ts +4 -4
- package/dist/components/icon/utils.d.ts +1 -1
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/modal/modal-close.cjs +1 -0
- package/dist/components/modal/modal-close.js +1 -0
- package/dist/components/modal/modal-title.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu.cjs +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +1 -0
- package/dist/components/notabene/notabene-icon.d.ts +1 -1
- package/dist/components/notification/index.d.ts +4 -4
- package/dist/components/notification/notification-icon.d.ts +1 -1
- package/dist/components/notification/notification-root.d.ts +4 -4
- package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -0
- package/dist/components/radio-card-group/radio-card-group-content.js +1 -0
- package/dist/components/radio-card-group/radio-card-group-item-title.cjs +1 -0
- package/dist/components/radio-card-group/radio-card-group-item-title.js +1 -0
- package/dist/components/radio-card-group/radio-card-group-item.cjs +1 -0
- package/dist/components/radio-card-group/radio-card-group-item.js +1 -0
- package/dist/components/scroll-area/index.d.ts +5 -5
- package/dist/components/scroll-area/scroll-area-button.d.ts +4 -4
- package/dist/components/select/index.cjs +31 -0
- package/dist/components/select/index.d.ts +51 -0
- package/dist/components/select/index.js +31 -0
- package/dist/components/select/select-content.cjs +38 -0
- package/dist/components/select/select-content.d.ts +5 -0
- package/dist/components/select/select-content.js +21 -0
- package/dist/components/select/select-group.cjs +31 -0
- package/dist/components/select/select-group.d.ts +9 -0
- package/dist/components/select/select-group.js +14 -0
- package/dist/components/select/select-indicator.cjs +14 -0
- package/dist/components/select/select-indicator.d.ts +5 -0
- package/dist/components/select/select-indicator.js +14 -0
- package/dist/components/select/select-item.cjs +34 -0
- package/dist/components/select/select-item.d.ts +5 -0
- package/dist/components/select/select-item.js +17 -0
- package/dist/components/select/select-portal.cjs +27 -0
- package/dist/components/select/select-portal.d.ts +5 -0
- package/dist/components/select/select-portal.js +10 -0
- package/dist/components/select/select-root.cjs +89 -0
- package/dist/components/select/select-root.d.ts +49 -0
- package/dist/components/select/select-root.js +72 -0
- package/dist/components/select/select-trigger.cjs +63 -0
- package/dist/components/select/select-trigger.d.ts +16 -0
- package/dist/components/select/select-trigger.js +46 -0
- package/dist/components/select/select-value.cjs +29 -0
- package/dist/components/select/select-value.d.ts +9 -0
- package/dist/components/select/select-value.js +12 -0
- package/dist/components/select/select-viewport.cjs +30 -0
- package/dist/components/select/select-viewport.d.ts +5 -0
- package/dist/components/select/select-viewport.js +13 -0
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/tabs-root.d.ts +1 -1
- package/dist/components/tabs/tabs-scroll-button.d.ts +4 -4
- package/dist/components/tabs/tabs-scroll.d.ts +1 -1
- package/dist/components/text-field/index.d.ts +4 -4
- package/dist/components/text-field/text-field-button.d.ts +4 -4
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/main.cjs +2 -0
- package/dist/main.js +2 -0
- package/dist/style.css +144 -48
- package/package.json +2 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
const components_select_selectRoot = require("./select-root.cjs");
|
|
7
|
+
const components_select_selectIndicator = require("./select-indicator.cjs");
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
25
|
+
const Item = React.forwardRef(
|
|
26
|
+
({ children, ...props }, forwardRef) => {
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadixSelect__namespace.Item, { className: components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__item`], ...props, ref: forwardRef, children: [
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.ItemText, { children }),
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.ItemIndicator, { className: components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__item-indicator`], children: /* @__PURE__ */ jsxRuntime.jsx(components_select_selectIndicator.Indicator, { name: "chevron-down" }) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
Item.displayName = "Select.Item";
|
|
34
|
+
exports.Item = Item;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type ItemProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Item> & {};
|
|
5
|
+
export declare const Item: React.ForwardRefExoticComponent<Omit<RadixSelect.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
import { s as styles, rootClassName } from "./select-root.js";
|
|
5
|
+
import { Indicator } from "./select-indicator.js";
|
|
6
|
+
const Item = React__default.forwardRef(
|
|
7
|
+
({ children, ...props }, forwardRef) => {
|
|
8
|
+
return /* @__PURE__ */ jsxs(RadixSelect.Item, { className: styles[`${rootClassName}__item`], ...props, ref: forwardRef, children: [
|
|
9
|
+
/* @__PURE__ */ jsx(RadixSelect.ItemText, { children }),
|
|
10
|
+
/* @__PURE__ */ jsx(RadixSelect.ItemIndicator, { className: styles[`${rootClassName}__item-indicator`], children: /* @__PURE__ */ jsx(Indicator, { name: "chevron-down" }) })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
Item.displayName = "Select.Item";
|
|
15
|
+
export {
|
|
16
|
+
Item
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
23
|
+
const Portal = React.forwardRef(({ ...props }) => {
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Portal, { ...props });
|
|
25
|
+
});
|
|
26
|
+
Portal.displayName = "Select.Portal";
|
|
27
|
+
exports.Portal = Portal;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type PortalProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Portal> & {};
|
|
5
|
+
export declare const Portal: React.ForwardRefExoticComponent<RadixSelect.SelectPortalProps & React.RefAttributes<never>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
const Portal = React__default.forwardRef(({ ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(RadixSelect.Portal, { ...props });
|
|
6
|
+
});
|
|
7
|
+
Portal.displayName = "Select.Portal";
|
|
8
|
+
export {
|
|
9
|
+
Portal
|
|
10
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
const components_label_label = require("../label/label.cjs");
|
|
7
|
+
const components_helperText_helperText = require("../helper-text/helper-text.cjs");
|
|
8
|
+
const components_fieldErrorText_fieldErrorText = require("../field-error-text/field-error-text.cjs");
|
|
9
|
+
const clsx = require("clsx");
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
12
|
+
if (e) {
|
|
13
|
+
for (const k in e) {
|
|
14
|
+
if (k !== "default") {
|
|
15
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: () => e[k]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
27
|
+
const styles = {
|
|
28
|
+
"teddy-select": "_teddy-select_1i9a7_1",
|
|
29
|
+
"teddy-select__trigger": "_teddy-select__trigger_1i9a7_12",
|
|
30
|
+
"teddy-select__trigger--error": "_teddy-select__trigger--error_1i9a7_38",
|
|
31
|
+
"teddy-select__trigger--disabled": "_teddy-select__trigger--disabled_1i9a7_42",
|
|
32
|
+
"teddy-select__trigger--readonly": "_teddy-select__trigger--readonly_1i9a7_48",
|
|
33
|
+
"teddy-select__icon": "_teddy-select__icon_1i9a7_53",
|
|
34
|
+
"teddy-select__content": "_teddy-select__content_1i9a7_56",
|
|
35
|
+
"teddy-select__viewport": "_teddy-select__viewport_1i9a7_65",
|
|
36
|
+
"teddy-select__item": "_teddy-select__item_1i9a7_69",
|
|
37
|
+
"teddy-select__item-indicator": "_teddy-select__item-indicator_1i9a7_89"
|
|
38
|
+
};
|
|
39
|
+
const SelectContext = React.createContext({
|
|
40
|
+
isDirty: false,
|
|
41
|
+
setIsDirty: () => null,
|
|
42
|
+
inputRef: { current: null },
|
|
43
|
+
options: []
|
|
44
|
+
});
|
|
45
|
+
const rootClassName = "teddy-select";
|
|
46
|
+
const Root = React.forwardRef(
|
|
47
|
+
({
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
onValueChange,
|
|
51
|
+
frameClassName,
|
|
52
|
+
value,
|
|
53
|
+
label,
|
|
54
|
+
disabled,
|
|
55
|
+
helperText,
|
|
56
|
+
validationState,
|
|
57
|
+
errorText,
|
|
58
|
+
options,
|
|
59
|
+
...props
|
|
60
|
+
}, forwardRef) => {
|
|
61
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
62
|
+
const inputRef = React.useRef(null);
|
|
63
|
+
const [isDirty, setIsDirty] = React.useState(false);
|
|
64
|
+
const [currentValue, setCurrentValue] = React.useState("");
|
|
65
|
+
const handleValueChange = (value2) => {
|
|
66
|
+
if (onValueChange)
|
|
67
|
+
onValueChange(value2);
|
|
68
|
+
setCurrentValue(value2);
|
|
69
|
+
return value2;
|
|
70
|
+
};
|
|
71
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, ref: forwardRef, className: classes, children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value: { isDirty, setIsDirty, inputRef, options }, children: /* @__PURE__ */ jsxRuntime.jsxs(RadixSelect__namespace.Root, { ...props, onValueChange: handleValueChange, value: value || currentValue, children: [
|
|
73
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(components_label_label.Label, { disabled, children: label }),
|
|
74
|
+
children,
|
|
75
|
+
helperText && /* @__PURE__ */ jsxRuntime.jsx(components_helperText_helperText.HelperText, { children: helperText }),
|
|
76
|
+
validationState === "invalid" && errorText && /* @__PURE__ */ jsxRuntime.jsxs(components_fieldErrorText_fieldErrorText.FieldErrorText, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_fieldErrorText_fieldErrorText.FieldErrorText.Indicator, {}),
|
|
78
|
+
errorText
|
|
79
|
+
] })
|
|
80
|
+
] }) }),
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx(styles[`${rootClassName}__frame`], frameClassName) })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
Root.displayName = "Select";
|
|
86
|
+
exports.Root = Root;
|
|
87
|
+
exports.SelectContext = SelectContext;
|
|
88
|
+
exports.rootClassName = rootClassName;
|
|
89
|
+
exports.styles = styles;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type ValidationState = 'valid' | 'invalid';
|
|
5
|
+
type SelectContextValue = {
|
|
6
|
+
isDirty: boolean;
|
|
7
|
+
setIsDirty: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
validationState?: ValidationState;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
options: string[];
|
|
14
|
+
};
|
|
15
|
+
export declare const SelectContext: React.Context<SelectContextValue>;
|
|
16
|
+
export type RootProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Root> & {
|
|
17
|
+
name: string;
|
|
18
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
19
|
+
validationState?: ValidationState;
|
|
20
|
+
/** Called when the value changes. */
|
|
21
|
+
onValueChange?: (value: string) => string;
|
|
22
|
+
label?: string;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
errorText?: string;
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
value?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
frameClassName?: string;
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
export declare const rootClassName = "teddy-select";
|
|
33
|
+
export declare const Root: React.ForwardRefExoticComponent<RadixSelect.SelectProps & {
|
|
34
|
+
name: string;
|
|
35
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
36
|
+
validationState?: ValidationState | undefined;
|
|
37
|
+
/** Called when the value changes. */
|
|
38
|
+
onValueChange?: ((value: string) => string) | undefined;
|
|
39
|
+
label?: string | undefined;
|
|
40
|
+
helperText?: string | undefined;
|
|
41
|
+
placeholder?: string | undefined;
|
|
42
|
+
errorText?: string | undefined;
|
|
43
|
+
readonly?: boolean | undefined;
|
|
44
|
+
value?: string | undefined;
|
|
45
|
+
className?: string | undefined;
|
|
46
|
+
frameClassName?: string | undefined;
|
|
47
|
+
options: string[];
|
|
48
|
+
} & React.RefAttributes<never>>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
import { Label } from "../label/label.js";
|
|
5
|
+
import { HelperText } from "../helper-text/helper-text.js";
|
|
6
|
+
import { FieldErrorText } from "../field-error-text/field-error-text.js";
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
const styles = {
|
|
9
|
+
"teddy-select": "_teddy-select_1i9a7_1",
|
|
10
|
+
"teddy-select__trigger": "_teddy-select__trigger_1i9a7_12",
|
|
11
|
+
"teddy-select__trigger--error": "_teddy-select__trigger--error_1i9a7_38",
|
|
12
|
+
"teddy-select__trigger--disabled": "_teddy-select__trigger--disabled_1i9a7_42",
|
|
13
|
+
"teddy-select__trigger--readonly": "_teddy-select__trigger--readonly_1i9a7_48",
|
|
14
|
+
"teddy-select__icon": "_teddy-select__icon_1i9a7_53",
|
|
15
|
+
"teddy-select__content": "_teddy-select__content_1i9a7_56",
|
|
16
|
+
"teddy-select__viewport": "_teddy-select__viewport_1i9a7_65",
|
|
17
|
+
"teddy-select__item": "_teddy-select__item_1i9a7_69",
|
|
18
|
+
"teddy-select__item-indicator": "_teddy-select__item-indicator_1i9a7_89"
|
|
19
|
+
};
|
|
20
|
+
const SelectContext = React__default.createContext({
|
|
21
|
+
isDirty: false,
|
|
22
|
+
setIsDirty: () => null,
|
|
23
|
+
inputRef: { current: null },
|
|
24
|
+
options: []
|
|
25
|
+
});
|
|
26
|
+
const rootClassName = "teddy-select";
|
|
27
|
+
const Root = React__default.forwardRef(
|
|
28
|
+
({
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
onValueChange,
|
|
32
|
+
frameClassName,
|
|
33
|
+
value,
|
|
34
|
+
label,
|
|
35
|
+
disabled,
|
|
36
|
+
helperText,
|
|
37
|
+
validationState,
|
|
38
|
+
errorText,
|
|
39
|
+
options,
|
|
40
|
+
...props
|
|
41
|
+
}, forwardRef) => {
|
|
42
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
43
|
+
const inputRef = React__default.useRef(null);
|
|
44
|
+
const [isDirty, setIsDirty] = React__default.useState(false);
|
|
45
|
+
const [currentValue, setCurrentValue] = React__default.useState("");
|
|
46
|
+
const handleValueChange = (value2) => {
|
|
47
|
+
if (onValueChange)
|
|
48
|
+
onValueChange(value2);
|
|
49
|
+
setCurrentValue(value2);
|
|
50
|
+
return value2;
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ jsxs("div", { ...props, ref: forwardRef, className: classes, children: [
|
|
53
|
+
/* @__PURE__ */ jsx(SelectContext.Provider, { value: { isDirty, setIsDirty, inputRef, options }, children: /* @__PURE__ */ jsxs(RadixSelect.Root, { ...props, onValueChange: handleValueChange, value: value || currentValue, children: [
|
|
54
|
+
label && /* @__PURE__ */ jsx(Label, { disabled, children: label }),
|
|
55
|
+
children,
|
|
56
|
+
helperText && /* @__PURE__ */ jsx(HelperText, { children: helperText }),
|
|
57
|
+
validationState === "invalid" && errorText && /* @__PURE__ */ jsxs(FieldErrorText, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(FieldErrorText.Indicator, {}),
|
|
59
|
+
errorText
|
|
60
|
+
] })
|
|
61
|
+
] }) }),
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: clsx(styles[`${rootClassName}__frame`], frameClassName) })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
Root.displayName = "Select";
|
|
67
|
+
export {
|
|
68
|
+
Root,
|
|
69
|
+
SelectContext,
|
|
70
|
+
rootClassName,
|
|
71
|
+
styles as s
|
|
72
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
const clsx = require("clsx");
|
|
7
|
+
const components_select_selectRoot = require("./select-root.cjs");
|
|
8
|
+
const components_select_selectIndicator = require("./select-indicator.cjs");
|
|
9
|
+
function _interopNamespaceDefault(e) {
|
|
10
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
11
|
+
if (e) {
|
|
12
|
+
for (const k in e) {
|
|
13
|
+
if (k !== "default") {
|
|
14
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: () => e[k]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
26
|
+
const Trigger = React.forwardRef(
|
|
27
|
+
({ className, readonly, validationState, name, children, ...props }, forwardRef) => {
|
|
28
|
+
const selectContextValues = React.useContext(components_select_selectRoot.SelectContext);
|
|
29
|
+
const { disabled = false } = selectContextValues;
|
|
30
|
+
const classes = clsx(
|
|
31
|
+
[
|
|
32
|
+
components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__trigger`],
|
|
33
|
+
{
|
|
34
|
+
[components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__trigger--valid`]]: validationState === "valid",
|
|
35
|
+
[components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__trigger--error`]]: validationState === "invalid"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
[components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__trigger--readonly`]]: readonly
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
[components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__trigger--disabled`]]: disabled
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
className
|
|
45
|
+
);
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
47
|
+
RadixSelect__namespace.Trigger,
|
|
48
|
+
{
|
|
49
|
+
...props,
|
|
50
|
+
className: classes,
|
|
51
|
+
"aria-label": name,
|
|
52
|
+
disabled: disabled || readonly,
|
|
53
|
+
ref: forwardRef,
|
|
54
|
+
children: [
|
|
55
|
+
children,
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Icon, { className: components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__icon`], asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_select_selectIndicator.Indicator, {}) })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
Trigger.displayName = "Select.Trigger";
|
|
63
|
+
exports.Trigger = Trigger;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ValidationState } from './select-root';
|
|
3
|
+
|
|
4
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
5
|
+
export type TriggerProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Trigger> & {
|
|
6
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
7
|
+
validationState?: ValidationState;
|
|
8
|
+
/** Called when the value changes. */
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const Trigger: React.ForwardRefExoticComponent<Omit<RadixSelect.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
12
|
+
/** Whether the input should display its "valid" or "invalid" visual styling. */
|
|
13
|
+
validationState?: ValidationState | undefined;
|
|
14
|
+
/** Called when the value changes. */
|
|
15
|
+
readonly?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default, { useContext } from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { SelectContext, s as styles, rootClassName } from "./select-root.js";
|
|
6
|
+
import { Indicator } from "./select-indicator.js";
|
|
7
|
+
const Trigger = React__default.forwardRef(
|
|
8
|
+
({ className, readonly, validationState, name, children, ...props }, forwardRef) => {
|
|
9
|
+
const selectContextValues = useContext(SelectContext);
|
|
10
|
+
const { disabled = false } = selectContextValues;
|
|
11
|
+
const classes = clsx(
|
|
12
|
+
[
|
|
13
|
+
styles[`${rootClassName}__trigger`],
|
|
14
|
+
{
|
|
15
|
+
[styles[`${rootClassName}__trigger--valid`]]: validationState === "valid",
|
|
16
|
+
[styles[`${rootClassName}__trigger--error`]]: validationState === "invalid"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
[styles[`${rootClassName}__trigger--readonly`]]: readonly
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
[styles[`${rootClassName}__trigger--disabled`]]: disabled
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
className
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ jsxs(
|
|
28
|
+
RadixSelect.Trigger,
|
|
29
|
+
{
|
|
30
|
+
...props,
|
|
31
|
+
className: classes,
|
|
32
|
+
"aria-label": name,
|
|
33
|
+
disabled: disabled || readonly,
|
|
34
|
+
ref: forwardRef,
|
|
35
|
+
children: [
|
|
36
|
+
children,
|
|
37
|
+
/* @__PURE__ */ jsx(RadixSelect.Icon, { className: styles[`${rootClassName}__icon`], asChild: true, children: /* @__PURE__ */ jsx(Indicator, {}) })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
Trigger.displayName = "Select.Trigger";
|
|
44
|
+
export {
|
|
45
|
+
Trigger
|
|
46
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
23
|
+
const Value = React.forwardRef(
|
|
24
|
+
({ placeholder, ...props }, forwardRef) => {
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Value, { ...props, placeholder, ref: forwardRef });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
Value.displayName = "Select.Value";
|
|
29
|
+
exports.Value = Value;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type ValueProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Value> & {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const Value: React.ForwardRefExoticComponent<Omit<RadixSelect.SelectValueProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
8
|
+
placeholder?: string | undefined;
|
|
9
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
const Value = React__default.forwardRef(
|
|
5
|
+
({ placeholder, ...props }, forwardRef) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(RadixSelect.Value, { ...props, placeholder, ref: forwardRef });
|
|
7
|
+
}
|
|
8
|
+
);
|
|
9
|
+
Value.displayName = "Select.Value";
|
|
10
|
+
export {
|
|
11
|
+
Value
|
|
12
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const RadixSelect = require("@radix-ui/react-select");
|
|
6
|
+
const components_select_selectRoot = require("./select-root.cjs");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const RadixSelect__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSelect);
|
|
24
|
+
const Viewport = React.forwardRef(
|
|
25
|
+
({ ...props }, forwardRef) => {
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixSelect__namespace.Viewport, { ...props, ref: forwardRef, className: components_select_selectRoot.styles[`${components_select_selectRoot.rootClassName}__viewport`] });
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Viewport.displayName = "Select.Viewport";
|
|
30
|
+
exports.Viewport = Viewport;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
4
|
+
export type ViewportProps = React.ComponentPropsWithoutRef<typeof RadixSelect.Viewport> & {};
|
|
5
|
+
export declare const Viewport: React.ForwardRefExoticComponent<Omit<RadixSelect.SelectViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
4
|
+
import { s as styles, rootClassName } from "./select-root.js";
|
|
5
|
+
const Viewport = React__default.forwardRef(
|
|
6
|
+
({ ...props }, forwardRef) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(RadixSelect.Viewport, { ...props, ref: forwardRef, className: styles[`${rootClassName}__viewport`] });
|
|
8
|
+
}
|
|
9
|
+
);
|
|
10
|
+
Viewport.displayName = "Select.Viewport";
|
|
11
|
+
export {
|
|
12
|
+
Viewport
|
|
13
|
+
};
|
|
@@ -45,7 +45,7 @@ type TabsProps = {
|
|
|
45
45
|
* <Tabs.Content value="tab2">Content for second tab</Tabs.Content>
|
|
46
46
|
* </Tabs>
|
|
47
47
|
*/
|
|
48
|
-
declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-tabs').TabsProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "
|
|
48
|
+
declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-tabs').TabsProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "defaultValue" | "value" | "onValueChange" | "activationMode"> & {
|
|
49
49
|
value?: string | undefined;
|
|
50
50
|
onValueChange?: ((value: string) => void) | undefined;
|
|
51
51
|
defaultValue?: string | undefined;
|
|
@@ -34,7 +34,7 @@ type RootContextType = {
|
|
|
34
34
|
value: string | undefined;
|
|
35
35
|
};
|
|
36
36
|
export declare const RootContext: React.Context<RootContextType | undefined>;
|
|
37
|
-
export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref">, "
|
|
37
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref">, "defaultValue" | "value" | "onValueChange" | "activationMode"> & {
|
|
38
38
|
/** The controlled value of the tab to activate. Should be used in conjunction with onValueChange. */
|
|
39
39
|
value?: TabsPrimitive.TabsProps['value'];
|
|
40
40
|
/** Event handler called when the value changes. */
|
|
@@ -10,8 +10,8 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
|
|
|
10
10
|
loading?: boolean | undefined;
|
|
11
11
|
fullWidth?: boolean | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | undefined;
|
|
13
|
-
variant?: "
|
|
14
|
-
borderStyle?: ("
|
|
13
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
14
|
+
borderStyle?: ("default" | "dashed") | undefined;
|
|
15
15
|
} & {
|
|
16
16
|
iconOnly: true;
|
|
17
17
|
"aria-label": string;
|
|
@@ -22,8 +22,8 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
|
|
|
22
22
|
loading?: boolean | undefined;
|
|
23
23
|
fullWidth?: boolean | undefined;
|
|
24
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
25
|
-
variant?: "
|
|
26
|
-
borderStyle?: ("
|
|
25
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
26
|
+
borderStyle?: ("default" | "dashed") | undefined;
|
|
27
27
|
} & {
|
|
28
28
|
iconOnly?: false | undefined;
|
|
29
29
|
"aria-label"?: string | undefined;
|
|
@@ -5,7 +5,7 @@ export type ScrollProps = React.ComponentPropsWithoutRef<typeof ScrollArea>;
|
|
|
5
5
|
export declare const ScrollContext: React.Context<boolean>;
|
|
6
6
|
/** */
|
|
7
7
|
export declare const Scroll: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-scroll-area').ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
8
|
-
variant?: ("button" | "
|
|
8
|
+
variant?: ("button" | "hidden" | "scrollbar") | undefined;
|
|
9
9
|
scrollBehavior?: "auto" | "smooth" | undefined;
|
|
10
10
|
viewPortClassName?: string | undefined;
|
|
11
11
|
barClassName?: string | undefined;
|
|
@@ -35,8 +35,8 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
|
|
|
35
35
|
loading?: boolean | undefined;
|
|
36
36
|
fullWidth?: boolean | undefined;
|
|
37
37
|
size?: "sm" | "md" | "lg" | undefined;
|
|
38
|
-
variant?: "
|
|
39
|
-
borderStyle?: ("
|
|
38
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
39
|
+
borderStyle?: ("default" | "dashed") | undefined;
|
|
40
40
|
} & {
|
|
41
41
|
iconOnly: true;
|
|
42
42
|
"aria-label": string;
|
|
@@ -47,8 +47,8 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
|
|
|
47
47
|
loading?: boolean | undefined;
|
|
48
48
|
fullWidth?: boolean | undefined;
|
|
49
49
|
size?: "sm" | "md" | "lg" | undefined;
|
|
50
|
-
variant?: "
|
|
51
|
-
borderStyle?: ("
|
|
50
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
51
|
+
borderStyle?: ("default" | "dashed") | undefined;
|
|
52
52
|
} & {
|
|
53
53
|
iconOnly?: false | undefined;
|
|
54
54
|
"aria-label"?: string | undefined;
|