@midas-ds/components 16.2.4 → 16.3.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 +24 -0
- package/calendar/index.js +1 -1
- package/character-counter/CharacterCounter.d.ts +1 -2
- package/character-counter/index.js +1 -1
- package/checkbox/Checkbox.d.ts +2 -3
- package/checkbox/CheckboxGroupItem.d.ts +1 -2
- package/checkbox/CheckboxInner.d.ts +1 -2
- package/checkbox/SingleCheckbox.d.ts +1 -2
- package/checkbox/index.js +2 -2
- package/checkbox/types.d.ts +1 -1
- package/chunks/{CharacterCounter-DeuE2det.js → CharacterCounter-R6vh7AE5.js} +7 -6
- package/chunks/Checkbox-BTAfwDxU.js +130 -0
- package/chunks/{CheckboxGroup-C5kaqBcn.js → CheckboxGroup-BQ8EpX7O.js} +3 -3
- package/chunks/{ComboBox-N97lv5kN.js → ComboBox-DVK0dL2W.js} +1 -1
- package/chunks/{DateField-DeuLPe1Y.js → DateField-06YL8tj_.js} +1 -1
- package/chunks/{DateRangePicker-BqjLArNi.js → DateRangePicker-CZRWDV_g.js} +2 -2
- package/chunks/FieldError-Bra5aRT3.js +24 -0
- package/chunks/{Layout-ClW2Lbvq.js → Layout-DX3HUm5b.js} +72 -71
- package/chunks/{Radio-Dro99zCs.js → Radio-BDHczAt5.js} +1 -1
- package/chunks/{RangeCalendar-CGk2btOp.js → RangeCalendar-BSth1Fmv.js} +1 -1
- package/chunks/{SearchField-BfpeANM6.js → SearchField-DTkfUFwn.js} +1 -1
- package/chunks/{Select-D-LtFSZX.js → Select-C8Fr7Vn3.js} +2 -2
- package/chunks/{Select-nL9iJMlf.js → Select-CPM82ww2.js} +2 -2
- package/chunks/{Table-CgBjwlIi.js → Table-BgsgXhC_.js} +1 -1
- package/chunks/TextArea-DQ_dAC-2.js +137 -0
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/FieldError.d.ts +1 -2
- package/field-error/index.js +1 -1
- package/index.js +15 -15
- package/layout/components/SidebarLink.d.ts +1 -2
- package/layout/index.js +1 -1
- package/legacy-select/HiddenMultiSelect.d.ts +2 -2
- package/legacy-select/MultiSelectValueTag.d.ts +3 -3
- package/legacy-select/index.js +1 -1
- package/legacy-select/useMultiSelect.d.ts +1 -1
- package/package.json +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/table/index.js +1 -1
- package/textfield/Input.d.ts +1 -2
- package/textfield/PasswordField.d.ts +1 -2
- package/textfield/TextArea.d.ts +1 -2
- package/textfield/TextField.d.ts +1 -2
- package/textfield/TextFieldBase.d.ts +3 -3
- package/textfield/index.js +1 -1
- package/chunks/Checkbox-CP6Nv9yx.js +0 -122
- package/chunks/FieldError-C0HRIcAx.js +0 -23
- package/chunks/TextArea-CRvbqqVZ.js +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { Table as w, useTableOptions as u, TableHeader as g, Collection as p, Row as N, Button as k, Column as f, Cell as x, TableBody as T } from "react-aria-components";
|
|
3
|
-
import { C as h } from "./Checkbox-
|
|
3
|
+
import { C as h } from "./Checkbox-BTAfwDxU.js";
|
|
4
4
|
import { c as a } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { c as d } from "./createLucideIcon-D4r5Phnh.js";
|
|
6
6
|
import '../assets/Table.css';const C = [
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsxs as c, jsx as s, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useState as C } from "react";
|
|
3
|
+
import { useContextProps as p, TextFieldContext as b, TextField as g, InputContext as f, Input as I, TextArea as v } from "react-aria-components";
|
|
4
|
+
import { a as A, c as h } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { s as d } from "./TextField.module-DZslrEPC.js";
|
|
6
|
+
import { T as w } from "./Text-TWzJxnto.js";
|
|
7
|
+
import { B } from "./Button-wBgWrXj3.js";
|
|
8
|
+
import { u as L } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
9
|
+
import { F as u } from "./FieldError-Bra5aRT3.js";
|
|
10
|
+
import { C as E } from "./CharacterCounter-R6vh7AE5.js";
|
|
11
|
+
import { a as S, L as $ } from "./Label-Dup4lWaR.js";
|
|
12
|
+
const x = l(
|
|
13
|
+
(e, a) => {
|
|
14
|
+
[e] = p(e, a, b);
|
|
15
|
+
const {
|
|
16
|
+
label: r,
|
|
17
|
+
description: o,
|
|
18
|
+
errorMessage: i,
|
|
19
|
+
showCounter: n,
|
|
20
|
+
errorPosition: t = "top",
|
|
21
|
+
size: m = "large",
|
|
22
|
+
popover: N,
|
|
23
|
+
children: y
|
|
24
|
+
} = e;
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
g,
|
|
27
|
+
{
|
|
28
|
+
...e,
|
|
29
|
+
className: A(d.textField, {
|
|
30
|
+
[d.medium]: m === "medium"
|
|
31
|
+
}),
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ s(S, { popover: N, children: r && /* @__PURE__ */ s($, { children: r }) }),
|
|
34
|
+
o && /* @__PURE__ */ s(w, { slot: "description", children: o }),
|
|
35
|
+
n && /* @__PURE__ */ s(E, { isLonely: !o }),
|
|
36
|
+
t === "top" && /* @__PURE__ */ s(u, { "data-testid": "fieldError", children: i }),
|
|
37
|
+
y,
|
|
38
|
+
t === "bottom" && /* @__PURE__ */ s(
|
|
39
|
+
u,
|
|
40
|
+
{
|
|
41
|
+
"data-testid": "fieldError",
|
|
42
|
+
className: d.bottomError,
|
|
43
|
+
children: i
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
x.displayName = "TextFieldBase";
|
|
52
|
+
const j = { hide: "Hide", show: "Show" }, z = { hide: "Dölj", show: "Visa" }, D = {
|
|
53
|
+
en: j,
|
|
54
|
+
sv: z
|
|
55
|
+
}, T = l(
|
|
56
|
+
(e, a) => {
|
|
57
|
+
[e, a] = p(e, a, f);
|
|
58
|
+
const [r, o] = C(!1), i = () => o((t) => !t), n = L(D);
|
|
59
|
+
return /* @__PURE__ */ c(P, { children: [
|
|
60
|
+
r && /* @__PURE__ */ s(
|
|
61
|
+
w,
|
|
62
|
+
{
|
|
63
|
+
slot: "description",
|
|
64
|
+
className: d.passwordText,
|
|
65
|
+
children: e.value
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ s(
|
|
69
|
+
B,
|
|
70
|
+
{
|
|
71
|
+
variant: "tertiary",
|
|
72
|
+
onPress: i,
|
|
73
|
+
className: d.passwordButton,
|
|
74
|
+
children: r ? n.format("hide") : n.format("show")
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
T.displayName = "PasswordField";
|
|
81
|
+
const F = l(
|
|
82
|
+
({ skipContext: e = !1, ...a }, r) => {
|
|
83
|
+
const [o, i] = p(
|
|
84
|
+
a,
|
|
85
|
+
r,
|
|
86
|
+
f
|
|
87
|
+
), n = e ? r : i, t = e ? a : o;
|
|
88
|
+
return /* @__PURE__ */ c("div", { className: d.wrap, children: [
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
|
+
I,
|
|
91
|
+
{
|
|
92
|
+
...t,
|
|
93
|
+
ref: n,
|
|
94
|
+
className: h(d.input, t.className)
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
t.type === "password" && /* @__PURE__ */ s(T, { ...t })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
F.displayName = "Input";
|
|
102
|
+
const H = l(
|
|
103
|
+
({ className: e, list: a, type: r, min: o, max: i, form: n, ...t }, m) => /* @__PURE__ */ s(x, { ...t, children: /* @__PURE__ */ s(
|
|
104
|
+
F,
|
|
105
|
+
{
|
|
106
|
+
className: h(e),
|
|
107
|
+
form: n,
|
|
108
|
+
list: a,
|
|
109
|
+
min: o,
|
|
110
|
+
max: i,
|
|
111
|
+
ref: m,
|
|
112
|
+
type: r,
|
|
113
|
+
skipContext: !0
|
|
114
|
+
}
|
|
115
|
+
) })
|
|
116
|
+
);
|
|
117
|
+
H.displayName = "TextField";
|
|
118
|
+
const M = l(
|
|
119
|
+
({ className: e, cols: a, form: r, rows: o, wrap: i, ...n }, t) => /* @__PURE__ */ s(x, { ...n, children: /* @__PURE__ */ s(
|
|
120
|
+
v,
|
|
121
|
+
{
|
|
122
|
+
className: h(d.textArea, e),
|
|
123
|
+
cols: a,
|
|
124
|
+
form: r,
|
|
125
|
+
ref: t,
|
|
126
|
+
rows: o,
|
|
127
|
+
wrap: i
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
130
|
+
);
|
|
131
|
+
M.displayName = "TextArea";
|
|
132
|
+
export {
|
|
133
|
+
F as I,
|
|
134
|
+
x as T,
|
|
135
|
+
H as a,
|
|
136
|
+
M as b
|
|
137
|
+
};
|
package/combobox/index.js
CHANGED
package/date-field/index.js
CHANGED
package/date-picker/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FieldErrorProps as AriaFieldErrorProps } from 'react-aria-components';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
export interface FieldErrorProps extends AriaFieldErrorProps {
|
|
4
3
|
isInvalid?: boolean;
|
|
5
4
|
}
|
|
6
|
-
export declare const FieldError:
|
|
5
|
+
export declare const FieldError: import('react').ForwardRefExoticComponent<FieldErrorProps & import('react').RefAttributes<HTMLElement>>;
|
package/field-error/index.js
CHANGED
package/index.js
CHANGED
|
@@ -3,41 +3,41 @@ import { B as s, a as p } from "./chunks/BadgeContainer-CKVsfTlF.js";
|
|
|
3
3
|
import { B as m } from "./chunks/Breadcrumbs-By2bMbQd.js";
|
|
4
4
|
import { B as i } from "./chunks/Button-wBgWrXj3.js";
|
|
5
5
|
import { B as d } from "./chunks/ButtonGroup-Dr6HOBo2.js";
|
|
6
|
-
import { C as l, R as C } from "./chunks/RangeCalendar-
|
|
6
|
+
import { C as l, R as C } from "./chunks/RangeCalendar-BSth1Fmv.js";
|
|
7
7
|
import { C as g, d as u, c as B, a as c, e as L, f as S, b as D } from "./chunks/Card-ia98VoKL.js";
|
|
8
|
-
import { C as G } from "./chunks/CharacterCounter-
|
|
9
|
-
import { C as R } from "./chunks/Checkbox-
|
|
10
|
-
import { C as M } from "./chunks/CheckboxGroup-
|
|
8
|
+
import { C as G } from "./chunks/CharacterCounter-R6vh7AE5.js";
|
|
9
|
+
import { C as R } from "./chunks/Checkbox-BTAfwDxU.js";
|
|
10
|
+
import { C as M } from "./chunks/CheckboxGroup-BQ8EpX7O.js";
|
|
11
11
|
import { C as v } from "./chunks/ColorSchemeSwitch-DugvPh6T.js";
|
|
12
|
-
import { C as h, a as H, b as y } from "./chunks/ComboBox-
|
|
13
|
-
import { D as N } from "./chunks/DateField-
|
|
12
|
+
import { C as h, a as H, b as y } from "./chunks/ComboBox-DVK0dL2W.js";
|
|
13
|
+
import { D as N } from "./chunks/DateField-06YL8tj_.js";
|
|
14
14
|
import { a as Q, b as Z, D as j } from "./chunks/DateInputDivider-CkTB5q5k.js";
|
|
15
|
-
import { D as z, a as J } from "./chunks/DateRangePicker-
|
|
16
|
-
import { F as O } from "./chunks/FieldError-
|
|
15
|
+
import { D as z, a as J } from "./chunks/DateRangePicker-CZRWDV_g.js";
|
|
16
|
+
import { F as O } from "./chunks/FieldError-Bra5aRT3.js";
|
|
17
17
|
import { D as V, F as W } from "./chunks/FileUpload-h1PxqQmb.js";
|
|
18
18
|
import { G as Y } from "./chunks/Grid-B-WgMwON.js";
|
|
19
19
|
import { G as $ } from "./chunks/GridItem-5t1Z14sM.js";
|
|
20
20
|
import { H as ao } from "./chunks/Heading-D8tNNJkt.js";
|
|
21
21
|
import { I as eo } from "./chunks/InfoBanner-DLiVpNON.js";
|
|
22
22
|
import { L as so } from "./chunks/Label-Dup4lWaR.js";
|
|
23
|
-
import { H as xo, L as mo, N as fo, S as io, a as no } from "./chunks/Layout-
|
|
23
|
+
import { H as xo, L as mo, N as fo, S as io, a as no } from "./chunks/Layout-DX3HUm5b.js";
|
|
24
24
|
import { L as lo } from "./chunks/Link-yTNUNv3C.js";
|
|
25
25
|
import { L as bo } from "./chunks/LinkButton-3nAekUJ4.js";
|
|
26
26
|
import { L as uo } from "./chunks/Logo-InDSslpO.js";
|
|
27
27
|
import { M as co } from "./chunks/Dialog-DC0cGNj5.js";
|
|
28
28
|
import { P as So } from "./chunks/Popover-BcEtFiU1.js";
|
|
29
29
|
import { P as Io } from "./chunks/ProgressBar-CbwvcHvk.js";
|
|
30
|
-
import { R as Po, a as Ro } from "./chunks/Radio-
|
|
31
|
-
import { S as Mo } from "./chunks/SearchField-
|
|
32
|
-
import { S as vo } from "./chunks/Select-
|
|
33
|
-
import { S as ho } from "./chunks/Select-
|
|
30
|
+
import { R as Po, a as Ro } from "./chunks/Radio-BDHczAt5.js";
|
|
31
|
+
import { S as Mo } from "./chunks/SearchField-DTkfUFwn.js";
|
|
32
|
+
import { S as vo } from "./chunks/Select-C8Fr7Vn3.js";
|
|
33
|
+
import { S as ho } from "./chunks/Select-CPM82ww2.js";
|
|
34
34
|
import { S as yo } from "./chunks/Skeleton-DqIHQLQl.js";
|
|
35
35
|
import { S as No } from "./chunks/Spinner-BORNnHph.js";
|
|
36
|
-
import { b as Qo, C as Zo, R as jo, T as qo, c as zo, a as Jo } from "./chunks/Table-
|
|
36
|
+
import { b as Qo, C as Zo, R as jo, T as qo, c as zo, a as Jo } from "./chunks/Table-BgsgXhC_.js";
|
|
37
37
|
import { a as Oo, c as Uo, b as Vo, T as Wo } from "./chunks/TabList-D2XV5ixe.js";
|
|
38
38
|
import { T as Yo, a as _o } from "./chunks/Tag-DxBoeE_n.js";
|
|
39
39
|
import { T as oa } from "./chunks/Text-TWzJxnto.js";
|
|
40
|
-
import { I as ra, b as ea, a as ta, T as sa } from "./chunks/TextArea-
|
|
40
|
+
import { I as ra, b as ea, a as ta, T as sa } from "./chunks/TextArea-DQ_dAC-2.js";
|
|
41
41
|
import { G as xa, b as ma, T as fa, a as ia, t as na } from "./chunks/Toast-DTwUGSJ8.js";
|
|
42
42
|
import { T as Ta, a as la } from "./chunks/ToggleButtonGroup-CXKTrLbb.js";
|
|
43
43
|
import { T as ba, a as ga } from "./chunks/Tooltip-m032jGgF.js";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { SidebarLinkProps } from '../Layout';
|
|
2
|
-
|
|
3
|
-
export declare const SidebarLink: React.FC<SidebarLinkProps>;
|
|
2
|
+
export declare const SidebarLink: ({ title, href, icon: IconComponent, active, hasBadge, }: SidebarLinkProps) => import("react/jsx-runtime").JSX.Element;
|
package/layout/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FocusableElement
|
|
2
|
-
import { default as React, ReactNode } from 'react';
|
|
1
|
+
import { FocusableElement } from '@react-types/shared';
|
|
2
|
+
import { default as React, ReactNode, RefObject } from 'react';
|
|
3
3
|
import { MultiSelectState } from './types';
|
|
4
4
|
import { ListBoxOption } from '../list-box';
|
|
5
5
|
export interface AriaHiddenMultiSelectProps {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { MultiSelectState, SelectProps } from './types';
|
|
2
3
|
import { ListBoxOption } from '../list-box';
|
|
3
|
-
import * as React from 'react';
|
|
4
4
|
interface MultiSelectValueTagProps extends SelectProps {
|
|
5
5
|
state: MultiSelectState<ListBoxOption>;
|
|
6
6
|
parentWidth: number;
|
|
7
7
|
onClear: () => void;
|
|
8
|
-
triggerRef:
|
|
8
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
9
9
|
}
|
|
10
|
-
export declare const MultiSelectValueTag:
|
|
10
|
+
export declare const MultiSelectValueTag: ({ state: { selectedItems: items }, isDisabled, parentWidth, onClear, triggerRef, isClearable, }: MultiSelectValueTagProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
package/legacy-select/index.js
CHANGED
|
@@ -2,4 +2,4 @@ import { RefObject } from 'react';
|
|
|
2
2
|
import { MultiSelectDOMProps, MultiSelectProps, MultiSelectState } from './types';
|
|
3
3
|
import { ListBoxOption } from '../list-box';
|
|
4
4
|
import { SelectionMode } from '../select';
|
|
5
|
-
export declare function useMultiSelect<T extends ListBoxOption, M extends SelectionMode>(props: MultiSelectProps<T, M>, state: MultiSelectState<T>, ref: RefObject<HTMLElement>): MultiSelectDOMProps<T>;
|
|
5
|
+
export declare function useMultiSelect<T extends ListBoxOption, M extends SelectionMode>(props: MultiSelectProps<T, M>, state: MultiSelectState<T>, ref: RefObject<HTMLElement | null>): MultiSelectDOMProps<T>;
|
package/package.json
CHANGED
package/radio/index.js
CHANGED
package/search-field/index.js
CHANGED
package/select/index.js
CHANGED
package/table/index.js
CHANGED
package/textfield/Input.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { InputProps as AriaInputProps } from 'react-aria-components';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
export interface InputProps extends AriaInputProps {
|
|
4
3
|
/** If the component should use local props and ref instead of a parent context
|
|
5
4
|
* @default false
|
|
6
5
|
*/
|
|
7
6
|
skipContext?: boolean;
|
|
8
7
|
}
|
|
9
|
-
export declare const Input:
|
|
8
|
+
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { InputProps } from './Input';
|
|
2
|
-
|
|
3
|
-
export declare const PasswordField: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
2
|
+
export declare const PasswordField: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
package/textfield/TextArea.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TextFieldBaseProps } from './TextFieldBase';
|
|
2
2
|
import { TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
3
3
|
import { Complement } from '../utils/types';
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
export type TextAreaProps = Omit<TextFieldBaseProps, 'type' | 'pattern'> & Complement<TextFieldBaseProps, AriaTextAreaProps>;
|
|
6
|
-
export declare const TextArea:
|
|
5
|
+
export declare const TextArea: import('react').ForwardRefExoticComponent<Omit<TextFieldBaseProps, "type" | "pattern"> & Complement<TextFieldBaseProps, AriaTextAreaProps> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
package/textfield/TextField.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TextFieldBaseProps } from './TextFieldBase';
|
|
2
2
|
import { InputProps } from './Input';
|
|
3
3
|
import { Complement } from '../utils/types';
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
export type TextFieldProps = TextFieldBaseProps & Complement<TextFieldBaseProps, InputProps>;
|
|
6
|
-
export declare const TextField:
|
|
5
|
+
export declare const TextField: import('react').ForwardRefExoticComponent<TextFieldBaseProps & Complement<TextFieldBaseProps, InputProps> & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TextFieldProps, ValidationResult } from 'react-aria-components';
|
|
2
3
|
import { Size } from '../common/types';
|
|
3
4
|
import { InfoPopoverProps } from '../label';
|
|
4
|
-
import * as React from 'react';
|
|
5
5
|
export interface TextFieldBaseProps extends Omit<TextFieldProps, 'className'> {
|
|
6
|
-
children?:
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
/** Specify label displayed above the TextField*/
|
|
8
8
|
label?: string;
|
|
9
9
|
/** Specify description displayed below the label */
|
|
@@ -23,4 +23,4 @@ export interface TextFieldBaseProps extends Omit<TextFieldProps, 'className'> {
|
|
|
23
23
|
size?: Size;
|
|
24
24
|
popover?: InfoPopoverProps;
|
|
25
25
|
}
|
|
26
|
-
export declare const TextFieldBase:
|
|
26
|
+
export declare const TextFieldBase: import('react').ForwardRefExoticComponent<TextFieldBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
package/textfield/index.js
CHANGED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { jsxs as v, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import * as c from "react";
|
|
3
|
-
import f from "react";
|
|
4
|
-
import { mergeProps as u, VisuallyHidden as k, useCheckboxGroupItem as C, useCheckbox as R, useHover as _, usePress as I, useFocusRing as P } from "react-aria";
|
|
5
|
-
import { useContextProps as g, CheckboxContext as G, useSlottedContext as y, FormContext as z } from "react-aria-components";
|
|
6
|
-
import { a as h } from "./clsx-AexbMWKp.js";
|
|
7
|
-
import { variables as m } from "@midas-ds/theme";
|
|
8
|
-
import { c as w } from "./createLucideIcon-D4r5Phnh.js";
|
|
9
|
-
import { C as B } from "./check-BxlvVsvD.js";
|
|
10
|
-
import { useToggleState as F } from "@react-stately/toggle";
|
|
11
|
-
import '../assets/Checkbox.css';const L = [["path", { d: "M5 12h14", key: "1ays0h" }]], N = w("minus", L), S = f.createContext(null), D = "_checkboxInner_tzrii_1", H = "_checkbox_tzrii_1", O = "_checkboxGroup_tzrii_143", j = "_checkboxList_tzrii_154", x = {
|
|
12
|
-
checkboxInner: D,
|
|
13
|
-
checkbox: H,
|
|
14
|
-
checkboxGroup: O,
|
|
15
|
-
checkboxList: j
|
|
16
|
-
}, b = c.forwardRef((e, o) => {
|
|
17
|
-
const { hoverProps: i, isHovered: s } = e.hoverResult, { pressProps: n, isPressed: a } = e.pressResult, { isFocused: r, isFocusVisible: d, focusProps: l } = e.focusRingAria;
|
|
18
|
-
return /* @__PURE__ */ v(
|
|
19
|
-
"label",
|
|
20
|
-
{
|
|
21
|
-
ref: o,
|
|
22
|
-
...u(i, n, e.labelProps),
|
|
23
|
-
slot: e.slot || void 0,
|
|
24
|
-
className: h(x.checkbox, e.className),
|
|
25
|
-
"data-hovered": s || void 0,
|
|
26
|
-
"data-selected": e.isSelected || void 0,
|
|
27
|
-
"data-indeterminate": e.isIndeterminate || void 0,
|
|
28
|
-
"data-pressed": a || void 0,
|
|
29
|
-
"data-disabled": e.isDisabled || void 0,
|
|
30
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
31
|
-
"data-invalid": e.isInvalid || void 0,
|
|
32
|
-
"data-focused": r || void 0,
|
|
33
|
-
"data-focus-visible": d || void 0,
|
|
34
|
-
"data-required": e.isRequired || void 0,
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ t("div", { className: h(x.checkboxInner), children: e.isIndeterminate ? /* @__PURE__ */ t(
|
|
37
|
-
N,
|
|
38
|
-
{
|
|
39
|
-
size: 14,
|
|
40
|
-
color: m.iconOnColor
|
|
41
|
-
}
|
|
42
|
-
) : /* @__PURE__ */ t(
|
|
43
|
-
B,
|
|
44
|
-
{
|
|
45
|
-
size: 14,
|
|
46
|
-
color: m.iconOnColor
|
|
47
|
-
}
|
|
48
|
-
) }),
|
|
49
|
-
/* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(
|
|
50
|
-
"input",
|
|
51
|
-
{
|
|
52
|
-
...u(e.inputProps, l),
|
|
53
|
-
ref: e.inputRef
|
|
54
|
-
}
|
|
55
|
-
) }),
|
|
56
|
-
e.children
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}), q = c.forwardRef((e, o) => {
|
|
61
|
-
const i = C(
|
|
62
|
-
{
|
|
63
|
-
...e,
|
|
64
|
-
value: e.value || ""
|
|
65
|
-
},
|
|
66
|
-
e.state,
|
|
67
|
-
e.inputRef
|
|
68
|
-
);
|
|
69
|
-
return /* @__PURE__ */ t(
|
|
70
|
-
b,
|
|
71
|
-
{
|
|
72
|
-
...e,
|
|
73
|
-
...i,
|
|
74
|
-
ref: o
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}), A = c.forwardRef((e, o) => {
|
|
78
|
-
const i = R(e, F(e), e.inputRef);
|
|
79
|
-
return /* @__PURE__ */ t(
|
|
80
|
-
b,
|
|
81
|
-
{
|
|
82
|
-
...e,
|
|
83
|
-
...i,
|
|
84
|
-
ref: o
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}), X = c.forwardRef(
|
|
88
|
-
(e, o) => {
|
|
89
|
-
[e, o] = g(e, o, G);
|
|
90
|
-
const i = y(z), s = e.validationBehavior ?? i?.validationBehavior ?? "native", n = c.useContext(S), a = c.useRef(null), r = _(e), d = I({
|
|
91
|
-
ref: o,
|
|
92
|
-
isDisabled: e.isDisabled
|
|
93
|
-
}), l = P();
|
|
94
|
-
return n ? /* @__PURE__ */ t(
|
|
95
|
-
q,
|
|
96
|
-
{
|
|
97
|
-
...e,
|
|
98
|
-
state: n,
|
|
99
|
-
inputRef: a,
|
|
100
|
-
hoverResult: r,
|
|
101
|
-
pressResult: d,
|
|
102
|
-
focusRingAria: l,
|
|
103
|
-
validationBehavior: s
|
|
104
|
-
}
|
|
105
|
-
) : /* @__PURE__ */ t(
|
|
106
|
-
A,
|
|
107
|
-
{
|
|
108
|
-
...e,
|
|
109
|
-
inputRef: a,
|
|
110
|
-
hoverResult: r,
|
|
111
|
-
pressResult: d,
|
|
112
|
-
focusRingAria: l,
|
|
113
|
-
validationBehavior: s
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
export {
|
|
119
|
-
X as C,
|
|
120
|
-
S as a,
|
|
121
|
-
x as s
|
|
122
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import * as s from "react";
|
|
3
|
-
import { FieldErrorContext as c, FieldError as f } from "react-aria-components";
|
|
4
|
-
import { c as a } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { T as d } from "./Text-TWzJxnto.js";
|
|
6
|
-
import '../assets/FieldError.css';const m = "_fieldError_u3cks_1", E = {
|
|
7
|
-
fieldError: m
|
|
8
|
-
}, _ = s.forwardRef(
|
|
9
|
-
(r, n) => {
|
|
10
|
-
const { children: o, isInvalid: l } = r, t = a(E.fieldError, r.className), e = s.useContext(c);
|
|
11
|
-
return !e && l && typeof o != "function" ? /* @__PURE__ */ i(d, { className: t, children: o }) : e?.isInvalid ? /* @__PURE__ */ i(
|
|
12
|
-
f,
|
|
13
|
-
{
|
|
14
|
-
...r,
|
|
15
|
-
ref: n,
|
|
16
|
-
className: t
|
|
17
|
-
}
|
|
18
|
-
) : null;
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
export {
|
|
22
|
-
_ as F
|
|
23
|
-
};
|