@bekk-basen/neutral-ui-do-not-use 0.9.0 → 0.10.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/dist/components/form/textarea/textarea.d.ts +9 -0
- package/dist/components/form/textarea/textarea.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +157 -141
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Field } from '@base-ui/react/field';
|
|
2
|
+
declare const textareaVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
type TextareaProps = Omit<Field.Control.Props, "render"> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function Textarea({ className, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Textarea, textareaVariants };
|
|
8
|
+
export type { TextareaProps };
|
|
9
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/form/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAM5C,QAAA,MAAM,gBAAgB,oFAAuB,CAAA;AAE7C,KAAK,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CASvD;AAED,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { Checkbox } from './components/form/checkbox/checkbox';
|
|
|
4
4
|
export type { CheckboxProps } from './components/form/checkbox/checkbox';
|
|
5
5
|
export { CheckboxGroup } from './components/form/checkbox-group/checkbox-group';
|
|
6
6
|
export type { CheckboxGroupProps } from './components/form/checkbox-group/checkbox-group';
|
|
7
|
+
export { Textarea, textareaVariants } from './components/form/textarea/textarea';
|
|
8
|
+
export type { TextareaProps } from './components/form/textarea/textarea';
|
|
7
9
|
export { Field, FieldLabel, FieldDescription, FieldError, } from './components/form/field/field';
|
|
8
10
|
export type { FieldProps, FieldLabelProps, FieldDescriptionProps, FieldErrorProps, } from './components/form/field/field';
|
|
9
11
|
export { Form } from './components/form/form/form';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AAEzF,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,GACX,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,eAAe,GAChB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAA;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AAEzF,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAChF,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAExE,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,GACX,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,eAAe,GAChB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAA;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as o, jsxs as h, Fragment as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { clsx as
|
|
1
|
+
import { jsx as o, jsxs as h, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { Button as V } from "@base-ui/react/button";
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
import { clsx as a } from "clsx";
|
|
5
5
|
import { Checkbox as C } from "@base-ui/react/checkbox";
|
|
6
|
-
import { Field as
|
|
6
|
+
import { Field as d } from "@base-ui/react/field";
|
|
7
7
|
import { Check as A } from "lucide-react";
|
|
8
8
|
import { createContext as B, use as q, useState as D } from "react";
|
|
9
|
-
import { CheckboxGroup as
|
|
10
|
-
import { Form as
|
|
11
|
-
const
|
|
12
|
-
base:
|
|
13
|
-
primary:
|
|
9
|
+
import { CheckboxGroup as G } from "@base-ui/react/checkbox-group";
|
|
10
|
+
import { Form as H } from "@base-ui/react/form";
|
|
11
|
+
const I = "bnui-base-wpVVq", j = "bnui-primary-OKCHe", K = "bnui-secondary-dazFR", R = "bnui-lg-WgiKr", z = "bnui-sm-0Kb5B", X = "bnui-iconOnly-LsvO8", Z = "bnui-content-q0g4H", M = "bnui-pending-xP-rH", Q = "bnui-spinner-jLkEm", s = {
|
|
12
|
+
base: I,
|
|
13
|
+
primary: j,
|
|
14
14
|
secondary: K,
|
|
15
15
|
lg: R,
|
|
16
16
|
sm: z,
|
|
@@ -18,18 +18,18 @@ const j = "bnui-base-wpVVq", G = "bnui-primary-OKCHe", K = "bnui-secondary-dazFR
|
|
|
18
18
|
content: Z,
|
|
19
19
|
pending: M,
|
|
20
20
|
spinner: Q
|
|
21
|
-
}, J =
|
|
21
|
+
}, J = f(s.base, {
|
|
22
22
|
variants: {
|
|
23
23
|
variant: {
|
|
24
|
-
primary:
|
|
25
|
-
secondary:
|
|
24
|
+
primary: s.primary,
|
|
25
|
+
secondary: s.secondary
|
|
26
26
|
},
|
|
27
27
|
size: {
|
|
28
|
-
lg:
|
|
29
|
-
sm:
|
|
28
|
+
lg: s.lg,
|
|
29
|
+
sm: s.sm
|
|
30
30
|
},
|
|
31
31
|
iconOnly: {
|
|
32
|
-
true:
|
|
32
|
+
true: s.iconOnly,
|
|
33
33
|
false: ""
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -39,45 +39,45 @@ const j = "bnui-base-wpVVq", G = "bnui-primary-OKCHe", K = "bnui-secondary-dazFR
|
|
|
39
39
|
iconOnly: !1
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
function
|
|
42
|
+
function qo({
|
|
43
43
|
className: n,
|
|
44
44
|
variant: e,
|
|
45
|
-
size:
|
|
45
|
+
size: r,
|
|
46
46
|
iconOnly: c,
|
|
47
47
|
isPending: i,
|
|
48
48
|
disabled: l,
|
|
49
49
|
children: p,
|
|
50
|
-
...
|
|
50
|
+
...v
|
|
51
51
|
}) {
|
|
52
52
|
return /* @__PURE__ */ o(
|
|
53
|
-
|
|
53
|
+
V,
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "button",
|
|
56
56
|
disabled: i || l,
|
|
57
57
|
"aria-busy": i,
|
|
58
|
-
className:
|
|
59
|
-
J({ variant: e, size:
|
|
60
|
-
i &&
|
|
58
|
+
className: a(
|
|
59
|
+
J({ variant: e, size: r, iconOnly: c }),
|
|
60
|
+
i && s.pending,
|
|
61
61
|
n
|
|
62
62
|
),
|
|
63
|
-
...
|
|
64
|
-
children: i ? /* @__PURE__ */ h(
|
|
65
|
-
/* @__PURE__ */ o("span", { className:
|
|
66
|
-
/* @__PURE__ */ o("span", { className:
|
|
63
|
+
...v,
|
|
64
|
+
children: i ? /* @__PURE__ */ h(N, { children: [
|
|
65
|
+
/* @__PURE__ */ o("span", { className: s.content, children: p }),
|
|
66
|
+
/* @__PURE__ */ o("span", { className: s.spinner, "aria-hidden": "true" })
|
|
67
67
|
] }) : p
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const $ = B(!1), P = "bnui-headline-6c9bn", U = "bnui-button-lekqm", Y = "bnui-body-2BdnA", W = "bnui-description-6roeu", t = {
|
|
72
72
|
headline: P,
|
|
73
73
|
"headline-sm": "bnui-headline-sm-eesRr",
|
|
74
74
|
"headline-xs": "bnui-headline-xs-bBHXL",
|
|
75
75
|
button: U,
|
|
76
76
|
"body-bold": "bnui-body-bold-0cir6",
|
|
77
|
-
body:
|
|
77
|
+
body: Y,
|
|
78
78
|
"body-sm-bold": "bnui-body-sm-bold-9SPZK",
|
|
79
79
|
"body-sm": "bnui-body-sm-MOXMI",
|
|
80
|
-
description:
|
|
80
|
+
description: W,
|
|
81
81
|
"color-default": "bnui-color-default-38dch",
|
|
82
82
|
"color-white": "bnui-color-white-d9q0c",
|
|
83
83
|
"color-background": "bnui-color-background-Flq4G",
|
|
@@ -89,31 +89,31 @@ const V = B(!1), P = "bnui-headline-6c9bn", U = "bnui-button-lekqm", W = "bnui-b
|
|
|
89
89
|
"color-success": "bnui-color-success-ThRnA",
|
|
90
90
|
"color-info": "bnui-color-info-PtkS-",
|
|
91
91
|
"color-interactive": "bnui-color-interactive-b9cqS"
|
|
92
|
-
}, _ =
|
|
92
|
+
}, _ = f("", {
|
|
93
93
|
variants: {
|
|
94
94
|
variant: {
|
|
95
|
-
headline:
|
|
96
|
-
"headline-sm":
|
|
97
|
-
"headline-xs":
|
|
98
|
-
button:
|
|
99
|
-
"body-bold":
|
|
100
|
-
body:
|
|
101
|
-
"body-sm-bold":
|
|
102
|
-
"body-sm":
|
|
103
|
-
description:
|
|
95
|
+
headline: t.headline,
|
|
96
|
+
"headline-sm": t["headline-sm"],
|
|
97
|
+
"headline-xs": t["headline-xs"],
|
|
98
|
+
button: t.button,
|
|
99
|
+
"body-bold": t["body-bold"],
|
|
100
|
+
body: t.body,
|
|
101
|
+
"body-sm-bold": t["body-sm-bold"],
|
|
102
|
+
"body-sm": t["body-sm"],
|
|
103
|
+
description: t.description
|
|
104
104
|
},
|
|
105
105
|
color: {
|
|
106
|
-
default:
|
|
107
|
-
white:
|
|
108
|
-
background:
|
|
109
|
-
surface:
|
|
110
|
-
"divider-dark":
|
|
111
|
-
informative:
|
|
112
|
-
error:
|
|
113
|
-
warning:
|
|
114
|
-
success:
|
|
115
|
-
info:
|
|
116
|
-
interactive:
|
|
106
|
+
default: t["color-default"],
|
|
107
|
+
white: t["color-white"],
|
|
108
|
+
background: t["color-background"],
|
|
109
|
+
surface: t["color-surface"],
|
|
110
|
+
"divider-dark": t["color-divider-dark"],
|
|
111
|
+
informative: t["color-informative"],
|
|
112
|
+
error: t["color-error"],
|
|
113
|
+
warning: t["color-warning"],
|
|
114
|
+
success: t["color-success"],
|
|
115
|
+
info: t["color-info"],
|
|
116
|
+
interactive: t["color-interactive"],
|
|
117
117
|
inherit: ""
|
|
118
118
|
}
|
|
119
119
|
},
|
|
@@ -132,202 +132,216 @@ const V = B(!1), P = "bnui-headline-6c9bn", U = "bnui-button-lekqm", W = "bnui-b
|
|
|
132
132
|
description: "p",
|
|
133
133
|
button: "span"
|
|
134
134
|
};
|
|
135
|
-
function
|
|
135
|
+
function y({
|
|
136
136
|
variant: n = "body",
|
|
137
137
|
color: e,
|
|
138
|
-
as:
|
|
138
|
+
as: r,
|
|
139
139
|
className: c,
|
|
140
140
|
...i
|
|
141
141
|
}) {
|
|
142
|
-
const l =
|
|
142
|
+
const l = r ?? oo[n];
|
|
143
143
|
return /* @__PURE__ */ o(
|
|
144
144
|
l,
|
|
145
145
|
{
|
|
146
146
|
"data-slot": "text",
|
|
147
|
-
className:
|
|
147
|
+
className: a(_({ variant: n, color: e, className: c })),
|
|
148
148
|
...i
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
|
-
const no = "bnui-checkbox-mTFTt", eo = "bnui-label-JOyrO",
|
|
152
|
+
const no = "bnui-checkbox-mTFTt", eo = "bnui-label-JOyrO", to = "bnui-indicator-VOiAE", ro = "bnui-check-6pYVz", io = "bnui-item-qNsgX", b = {
|
|
153
153
|
checkbox: no,
|
|
154
154
|
label: eo,
|
|
155
|
-
indicator:
|
|
156
|
-
check:
|
|
155
|
+
indicator: to,
|
|
156
|
+
check: ro,
|
|
157
157
|
item: io
|
|
158
158
|
};
|
|
159
|
-
function
|
|
160
|
-
const c = q(
|
|
159
|
+
function Do({ className: n, label: e, ...r }) {
|
|
160
|
+
const c = q($), i = /* @__PURE__ */ o(
|
|
161
161
|
C.Root,
|
|
162
162
|
{
|
|
163
163
|
"data-slot": "checkbox",
|
|
164
|
-
className:
|
|
165
|
-
...
|
|
164
|
+
className: a(b.checkbox, n),
|
|
165
|
+
...r,
|
|
166
166
|
children: /* @__PURE__ */ o(
|
|
167
167
|
C.Indicator,
|
|
168
168
|
{
|
|
169
169
|
"data-slot": "checkbox-indicator",
|
|
170
|
-
className:
|
|
171
|
-
children: /* @__PURE__ */ o(A, { className:
|
|
170
|
+
className: b.indicator,
|
|
171
|
+
children: /* @__PURE__ */ o(A, { className: b.check })
|
|
172
172
|
}
|
|
173
173
|
)
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
if (e === void 0) return i;
|
|
177
|
-
const l = /* @__PURE__ */ h(
|
|
177
|
+
const l = /* @__PURE__ */ h(N, { children: [
|
|
178
178
|
i,
|
|
179
|
-
/* @__PURE__ */ o(
|
|
179
|
+
/* @__PURE__ */ o(y, { variant: "body", as: "span", children: e })
|
|
180
180
|
] });
|
|
181
|
-
return c ? /* @__PURE__ */ o(
|
|
181
|
+
return c ? /* @__PURE__ */ o(d.Item, { className: b.item, children: /* @__PURE__ */ o(d.Label, { className: b.label, children: l }) }) : /* @__PURE__ */ o("label", { className: b.label, children: l });
|
|
182
182
|
}
|
|
183
|
-
const co = "bnui-group-76ZZz", ao = "bnui-column-ev6Qg", so = "bnui-row-K6-hO",
|
|
183
|
+
const co = "bnui-group-76ZZz", ao = "bnui-column-ev6Qg", so = "bnui-row-K6-hO", g = {
|
|
184
184
|
group: co,
|
|
185
185
|
column: ao,
|
|
186
186
|
row: so
|
|
187
187
|
};
|
|
188
|
-
function
|
|
188
|
+
function Go({
|
|
189
189
|
className: n,
|
|
190
190
|
orientation: e = "row",
|
|
191
|
-
...
|
|
191
|
+
...r
|
|
192
192
|
}) {
|
|
193
193
|
return /* @__PURE__ */ o(
|
|
194
|
-
|
|
194
|
+
G,
|
|
195
195
|
{
|
|
196
196
|
"data-slot": "checkbox-group",
|
|
197
|
-
className:
|
|
198
|
-
|
|
199
|
-
e === "column" ?
|
|
197
|
+
className: a(
|
|
198
|
+
g.group,
|
|
199
|
+
e === "column" ? g.column : g.row,
|
|
200
200
|
n
|
|
201
201
|
),
|
|
202
|
-
...
|
|
202
|
+
...r
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
const lo = "bnui-textarea-6uYeG", uo = {
|
|
207
|
+
textarea: lo
|
|
208
|
+
}, bo = f(uo.textarea);
|
|
209
|
+
function Ho({ className: n, ...e }) {
|
|
210
|
+
return /* @__PURE__ */ o(
|
|
211
|
+
d.Control,
|
|
212
|
+
{
|
|
213
|
+
"data-slot": "textarea",
|
|
214
|
+
render: /* @__PURE__ */ o("textarea", {}),
|
|
215
|
+
className: a(bo(), n),
|
|
216
|
+
...e
|
|
203
217
|
}
|
|
204
218
|
);
|
|
205
219
|
}
|
|
206
|
-
const
|
|
207
|
-
container:
|
|
208
|
-
error:
|
|
209
|
-
errorDot:
|
|
220
|
+
const mo = "bnui-container-GujCE", po = "bnui-error-9Pli1", ho = "bnui-errorDot-mVjXf", O = {
|
|
221
|
+
container: mo,
|
|
222
|
+
error: po,
|
|
223
|
+
errorDot: ho
|
|
210
224
|
};
|
|
211
|
-
function
|
|
212
|
-
return /* @__PURE__ */ o(
|
|
213
|
-
|
|
225
|
+
function Io({ className: n, ...e }) {
|
|
226
|
+
return /* @__PURE__ */ o($, { value: !0, children: /* @__PURE__ */ o(
|
|
227
|
+
d.Root,
|
|
214
228
|
{
|
|
215
229
|
"data-slot": "field",
|
|
216
|
-
className:
|
|
230
|
+
className: a(O.container, n),
|
|
217
231
|
...e
|
|
218
232
|
}
|
|
219
233
|
) });
|
|
220
234
|
}
|
|
221
|
-
function
|
|
235
|
+
function jo({
|
|
222
236
|
children: n,
|
|
223
237
|
nativeLabel: e = !0,
|
|
224
|
-
...
|
|
238
|
+
...r
|
|
225
239
|
}) {
|
|
226
240
|
return /* @__PURE__ */ o(
|
|
227
|
-
|
|
241
|
+
d.Label,
|
|
228
242
|
{
|
|
229
243
|
"data-slot": "field-label",
|
|
230
244
|
nativeLabel: e,
|
|
231
|
-
render: /* @__PURE__ */ o(
|
|
232
|
-
...
|
|
245
|
+
render: /* @__PURE__ */ o(y, { variant: "body-sm", as: e ? "label" : "span", children: n }),
|
|
246
|
+
...r
|
|
233
247
|
}
|
|
234
248
|
);
|
|
235
249
|
}
|
|
236
|
-
function
|
|
250
|
+
function Ko({ children: n, ...e }) {
|
|
237
251
|
return /* @__PURE__ */ o(
|
|
238
|
-
|
|
252
|
+
d.Description,
|
|
239
253
|
{
|
|
240
254
|
"data-slot": "field-description",
|
|
241
|
-
render: /* @__PURE__ */ o(
|
|
255
|
+
render: /* @__PURE__ */ o(y, { variant: "description", color: "informative", children: n }),
|
|
242
256
|
...e
|
|
243
257
|
}
|
|
244
258
|
);
|
|
245
259
|
}
|
|
246
|
-
function
|
|
260
|
+
function Ro({ children: n, className: e, ...r }) {
|
|
247
261
|
return /* @__PURE__ */ o(
|
|
248
|
-
|
|
262
|
+
d.Error,
|
|
249
263
|
{
|
|
250
264
|
"data-slot": "field-error",
|
|
251
|
-
className:
|
|
265
|
+
className: a(O.error, e),
|
|
252
266
|
render: ({ children: c, ...i }) => /* @__PURE__ */ h("div", { ...i, children: [
|
|
253
|
-
/* @__PURE__ */ o("span", { "aria-hidden": !0, className:
|
|
254
|
-
/* @__PURE__ */ o(
|
|
267
|
+
/* @__PURE__ */ o("span", { "aria-hidden": !0, className: O.errorDot }),
|
|
268
|
+
/* @__PURE__ */ o(y, { variant: "description", as: "div", children: n ?? c })
|
|
255
269
|
] }),
|
|
256
|
-
...
|
|
270
|
+
...r
|
|
257
271
|
}
|
|
258
272
|
);
|
|
259
273
|
}
|
|
260
|
-
const
|
|
261
|
-
form:
|
|
274
|
+
const fo = "bnui-form-9QnXK", yo = {
|
|
275
|
+
form: fo
|
|
262
276
|
};
|
|
263
|
-
function
|
|
277
|
+
function zo({ className: n, ...e }) {
|
|
264
278
|
return /* @__PURE__ */ o(
|
|
265
|
-
|
|
279
|
+
H,
|
|
266
280
|
{
|
|
267
281
|
"data-slot": "form",
|
|
268
|
-
className:
|
|
282
|
+
className: a(yo.form, n),
|
|
269
283
|
...e
|
|
270
284
|
}
|
|
271
285
|
);
|
|
272
286
|
}
|
|
273
|
-
const
|
|
274
|
-
root:
|
|
275
|
-
hasSelectedSecondOption:
|
|
276
|
-
filled:
|
|
277
|
-
stroked:
|
|
278
|
-
option:
|
|
279
|
-
selectedOption:
|
|
287
|
+
const vo = "bnui-root-oLVBN", xo = "bnui-hasSelectedSecondOption-LfH49", ko = "bnui-filled-L-AUH", go = "bnui-stroked-wRb92", Oo = "bnui-option-Hou7J", No = "bnui-selectedOption-twuTF", m = {
|
|
288
|
+
root: vo,
|
|
289
|
+
hasSelectedSecondOption: xo,
|
|
290
|
+
filled: ko,
|
|
291
|
+
stroked: go,
|
|
292
|
+
option: Oo,
|
|
293
|
+
selectedOption: No
|
|
280
294
|
};
|
|
281
|
-
function
|
|
295
|
+
function Xo({
|
|
282
296
|
options: n,
|
|
283
297
|
title: e,
|
|
284
|
-
variant:
|
|
298
|
+
variant: r = "filled",
|
|
285
299
|
value: c,
|
|
286
300
|
defaultValue: i,
|
|
287
301
|
onValueChange: l,
|
|
288
302
|
name: p,
|
|
289
|
-
className:
|
|
303
|
+
className: v
|
|
290
304
|
}) {
|
|
291
|
-
const [
|
|
305
|
+
const [S, E] = D(
|
|
292
306
|
i ?? n[0].value
|
|
293
|
-
),
|
|
307
|
+
), x = c ?? S, k = n[0].value === x ? 0 : 1, F = n[k], w = n[k === 0 ? 1 : 0];
|
|
294
308
|
function L() {
|
|
295
|
-
const
|
|
296
|
-
c === void 0 && E(
|
|
309
|
+
const u = w.value;
|
|
310
|
+
c === void 0 && E(u), l?.(u);
|
|
297
311
|
}
|
|
298
|
-
return /* @__PURE__ */ h(
|
|
299
|
-
p && /* @__PURE__ */ o("input", { type: "hidden", name: p, value:
|
|
312
|
+
return /* @__PURE__ */ h(N, { children: [
|
|
313
|
+
p && /* @__PURE__ */ o("input", { type: "hidden", name: p, value: x }),
|
|
300
314
|
/* @__PURE__ */ o(
|
|
301
|
-
|
|
315
|
+
V,
|
|
302
316
|
{
|
|
303
317
|
onClick: L,
|
|
304
318
|
"aria-label": `Bytt ${e} mellom ${F.label} og ${w.label}, valgt: ${F.label}`,
|
|
305
|
-
className:
|
|
306
|
-
|
|
307
|
-
k === 1 &&
|
|
308
|
-
|
|
319
|
+
className: a(
|
|
320
|
+
Fo({ variant: r }),
|
|
321
|
+
k === 1 && m.hasSelectedSecondOption,
|
|
322
|
+
v
|
|
309
323
|
),
|
|
310
|
-
children: n.map((
|
|
311
|
-
const T =
|
|
324
|
+
children: n.map((u) => {
|
|
325
|
+
const T = u.value === x;
|
|
312
326
|
return /* @__PURE__ */ o(
|
|
313
327
|
"span",
|
|
314
328
|
{
|
|
315
329
|
"aria-hidden": "true",
|
|
316
|
-
className:
|
|
317
|
-
children:
|
|
330
|
+
className: a(m.option, T && m.selectedOption),
|
|
331
|
+
children: u.icon
|
|
318
332
|
},
|
|
319
|
-
|
|
333
|
+
u.value
|
|
320
334
|
);
|
|
321
335
|
})
|
|
322
336
|
}
|
|
323
337
|
)
|
|
324
338
|
] });
|
|
325
339
|
}
|
|
326
|
-
const
|
|
340
|
+
const Fo = f(m.root, {
|
|
327
341
|
variants: {
|
|
328
342
|
variant: {
|
|
329
|
-
filled:
|
|
330
|
-
stroked:
|
|
343
|
+
filled: m.filled,
|
|
344
|
+
stroked: m.stroked
|
|
331
345
|
}
|
|
332
346
|
},
|
|
333
347
|
defaultVariants: {
|
|
@@ -335,15 +349,17 @@ const go = N(b.root, {
|
|
|
335
349
|
}
|
|
336
350
|
});
|
|
337
351
|
export {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
352
|
+
qo as Button,
|
|
353
|
+
Do as Checkbox,
|
|
354
|
+
Go as CheckboxGroup,
|
|
355
|
+
Io as Field,
|
|
356
|
+
Ko as FieldDescription,
|
|
357
|
+
Ro as FieldError,
|
|
358
|
+
jo as FieldLabel,
|
|
359
|
+
zo as Form,
|
|
360
|
+
Xo as IconsToggle,
|
|
361
|
+
Ho as Textarea,
|
|
362
|
+
J as buttonVariants,
|
|
363
|
+
bo as textareaVariants
|
|
348
364
|
};
|
|
349
365
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/button/button.tsx","../src/components/form/field/field-context.ts","../src/components/text/text.tsx","../src/components/form/checkbox/checkbox.tsx","../src/components/form/checkbox-group/checkbox-group.tsx","../src/components/form/field/field.tsx","../src/components/form/form/form.tsx","../src/components/form/icons-toggle/icons-toggle.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./button.module.css\"\n\nconst buttonVariants = cva(styles.base, {\n variants: {\n variant: {\n primary: styles.primary,\n secondary: styles.secondary,\n },\n size: {\n lg: styles.lg,\n sm: styles.sm,\n },\n iconOnly: {\n true: styles.iconOnly,\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"sm\",\n iconOnly: false,\n },\n})\n\ntype ButtonProps = Omit<ButtonPrimitive.Props, \"disabled\"> &\n VariantProps<typeof buttonVariants> & {\n isPending?: boolean\n /** @deprecated Avoid disabled buttons — they hurt accessibility and discoverability. Prefer `isPending` for in-flight actions, or keep the button enabled and show validation/error feedback. */\n disabled?: ButtonPrimitive.Props[\"disabled\"]\n }\n\n/**\n * @param variant - `\"primary\"` (default) or `\"secondary\"`\n *\n * @param size - `\"sm\"` (default) or `\"lg\"`.\n *\n * @param iconOnly - `true` if button contains only an icon. Always provide an `aria-label` when using this.\n *\n * @param isPending - `true` to show a centered spinner and block interaction. The button width is unchanged.\n *\n * @param disabled - **Deprecated.** Avoid disabled buttons — prefer `isPending` for in-flight actions, or keep the button enabled and show validation feedback.\n *\n * @example\n * <Button variant=\"primary\" size=\"sm\">Click me</Button>\n *\n * @example\n * <Button iconOnly><Info /></Button>\n *\n * @example\n * <Button isPending>Saving…</Button>\n */\nfunction Button({\n className,\n variant,\n size,\n iconOnly,\n isPending,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n disabled={isPending || disabled}\n aria-busy={isPending}\n className={clsx(\n buttonVariants({ variant, size, iconOnly }),\n isPending && styles.pending,\n className\n )}\n {...props}\n >\n {isPending ? (\n <>\n <span className={styles.content}>{children}</span>\n <span className={styles.spinner} aria-hidden=\"true\" />\n </>\n ) : (\n children\n )}\n </ButtonPrimitive>\n )\n}\n\nexport { Button, buttonVariants }\nexport type { ButtonProps }\n","import { createContext } from \"react\"\n\n/**\n * True when rendered inside our `Field`. Base UI's `Field.Item` / `Field.Label`\n * throw without a `Field.Root` ancestor, so controls that want to use them must\n * check first and fall back to plain markup.\n */\nconst InsideFieldContext = createContext(false)\n\nexport { InsideFieldContext }\n","import { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./text.module.css\"\n\nconst textVariants = cva(\"\", {\n variants: {\n variant: {\n headline: styles.headline,\n \"headline-sm\": styles[\"headline-sm\"],\n \"headline-xs\": styles[\"headline-xs\"],\n button: styles.button,\n \"body-bold\": styles[\"body-bold\"],\n body: styles.body,\n \"body-sm-bold\": styles[\"body-sm-bold\"],\n \"body-sm\": styles[\"body-sm\"],\n description: styles.description,\n },\n color: {\n default: styles[\"color-default\"],\n white: styles[\"color-white\"],\n background: styles[\"color-background\"],\n surface: styles[\"color-surface\"],\n \"divider-dark\": styles[\"color-divider-dark\"],\n informative: styles[\"color-informative\"],\n error: styles[\"color-error\"],\n warning: styles[\"color-warning\"],\n success: styles[\"color-success\"],\n info: styles[\"color-info\"],\n interactive: styles[\"color-interactive\"],\n inherit: \"\",\n },\n },\n defaultVariants: {\n variant: \"body\",\n color: \"default\",\n },\n})\n\nconst DEFAULT_ELEMENTS = {\n headline: \"h1\",\n \"headline-sm\": \"h2\",\n \"headline-xs\": \"h3\",\n body: \"p\",\n \"body-bold\": \"p\",\n \"body-sm\": \"p\",\n \"body-sm-bold\": \"p\",\n description: \"p\",\n button: \"span\",\n} as const\n\ntype TextVariant = NonNullable<VariantProps<typeof textVariants>[\"variant\"]>\ntype TextColor = NonNullable<VariantProps<typeof textVariants>[\"color\"]>\n\ntype TextOwnProps<E extends React.ElementType> = {\n variant?: TextVariant\n color?: TextColor\n as?: E\n className?: string\n children?: React.ReactNode\n}\n\ntype TextProps<E extends React.ElementType> = TextOwnProps<E> &\n Omit<React.ComponentPropsWithoutRef<E>, keyof TextOwnProps<E>>\n\nfunction Text<E extends React.ElementType = \"p\">({\n variant = \"body\",\n color,\n as,\n className,\n ...props\n}: TextProps<E>) {\n const Component = (as ?? DEFAULT_ELEMENTS[variant]) as React.ElementType\n return (\n <Component\n data-slot=\"text\"\n className={clsx(textVariants({ variant, color, className }))}\n {...props}\n />\n )\n}\n\nexport { Text, textVariants }\n","import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\"\nimport { Check } from \"lucide-react\"\nimport { use, type ReactNode } from \"react\"\n\nimport { InsideFieldContext } from \"@/components/form/field/field-context\"\nimport { Text } from \"@/components/text/text\"\nimport { clsx } from \"clsx\"\nimport styles from \"./checkbox.module.css\"\n\ntype CheckboxProps = Omit<\n CheckboxPrimitive.Root.Props,\n \"disabled\" | \"indeterminate\"\n> & {\n label?: ReactNode\n}\n\n/**\n * @param label - Label rendered next to the checkbox. Accepts any `ReactNode`.\n *\n * @example\n * <Checkbox label=\"Jeg godtar vilkår og betingelser\" />\n *\n * @example\n * <Checkbox\n * label={\n * <>\n * Jeg godtar <Link href=\"#\">vilkår og betingelser</Link>\n * </>\n * }\n * />\n */\nfunction Checkbox({ className, label, ...props }: CheckboxProps) {\n const insideField = use(InsideFieldContext)\n\n const box = (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={clsx(styles.checkbox, className)}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className={styles.indicator}\n >\n <Check className={styles.check} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n\n if (label === undefined) return box\n\n const labelContent = (\n <>\n {box}\n <Text variant=\"body\" as=\"span\">\n {label}\n </Text>\n </>\n )\n\n if (!insideField) {\n return <label className={styles.label}>{labelContent}</label>\n }\n\n return (\n <FieldPrimitive.Item className={styles.item}>\n <FieldPrimitive.Label className={styles.label}>\n {labelContent}\n </FieldPrimitive.Label>\n </FieldPrimitive.Item>\n )\n}\n\nexport { Checkbox }\nexport type { CheckboxProps }\n","import { CheckboxGroup as CheckboxGroupPrimitive } from \"@base-ui/react/checkbox-group\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./checkbox-group.module.css\"\n\ntype CheckboxGroupProps = Omit<CheckboxGroupPrimitive.Props, \"disabled\"> & {\n orientation?: \"row\" | \"column\"\n}\n\nfunction CheckboxGroup({\n className,\n orientation = \"row\",\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupPrimitive\n data-slot=\"checkbox-group\"\n className={clsx(\n styles.group,\n orientation === \"column\" ? styles.column : styles.row,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { CheckboxGroup }\nexport type { CheckboxGroupProps }\n","import { Field as FieldPrimitive } from \"@base-ui/react/field\"\n\nimport { Text } from \"@/components/text/text\"\nimport { clsx } from \"clsx\"\nimport { InsideFieldContext } from \"./field-context\"\nimport styles from \"./field.module.css\"\n\ntype FieldProps = FieldPrimitive.Root.Props\n\nfunction Field({ className, ...props }: FieldProps) {\n return (\n <InsideFieldContext value={true}>\n <FieldPrimitive.Root\n data-slot=\"field\"\n className={clsx(styles.container, className)}\n {...props}\n />\n </InsideFieldContext>\n )\n}\n\ntype FieldLabelProps = Omit<FieldPrimitive.Label.Props, \"render\">\n\nfunction FieldLabel({\n children,\n nativeLabel = true,\n ...props\n}: FieldLabelProps) {\n return (\n <FieldPrimitive.Label\n data-slot=\"field-label\"\n nativeLabel={nativeLabel}\n render={\n <Text variant=\"body-sm\" as={nativeLabel ? \"label\" : \"span\"}>\n {children}\n </Text>\n }\n {...props}\n />\n )\n}\n\ntype FieldDescriptionProps = Omit<FieldPrimitive.Description.Props, \"render\">\n\nfunction FieldDescription({ children, ...props }: FieldDescriptionProps) {\n return (\n <FieldPrimitive.Description\n data-slot=\"field-description\"\n render={\n <Text variant=\"description\" color=\"informative\">\n {children}\n </Text>\n }\n {...props}\n />\n )\n}\n\ntype FieldErrorProps = Omit<FieldPrimitive.Error.Props, \"render\">\n\nfunction FieldError({ children, className, ...props }: FieldErrorProps) {\n return (\n <FieldPrimitive.Error\n data-slot=\"field-error\"\n className={clsx(styles.error, className)}\n // `message` is the validation message Base UI resolved (the `validate`\n // result, or the native one). Own children win when provided.\n render={({ children: message, ...errorProps }) => (\n <div {...errorProps}>\n <span aria-hidden className={styles.errorDot} />\n <Text variant=\"description\" as=\"div\">\n {children ?? message}\n </Text>\n </div>\n )}\n {...props}\n />\n )\n}\n\nexport { Field, FieldLabel, FieldDescription, FieldError }\nexport type {\n FieldProps,\n FieldLabelProps,\n FieldDescriptionProps,\n FieldErrorProps,\n}\n","import { Form as FormPrimitive } from \"@base-ui/react/form\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./form.module.css\"\n\ntype FormProps = FormPrimitive.Props\n\nfunction Form({ className, ...props }: FormProps) {\n return (\n <FormPrimitive\n data-slot=\"form\"\n className={clsx(styles.form, className)}\n {...props}\n />\n )\n}\n\nexport { Form }\nexport type { FormProps }\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { clsx } from \"clsx\"\nimport { type ReactNode, useState } from \"react\"\n\nimport styles from \"./icons-toggle.module.css\"\n\n/**\n * A pill-shaped toggle with two icon options. Clicking anywhere on the toggle\n * switches to the other option. Exactly one option is always active.\n *\n * @param options Pair of `{ value, icon, label }` objects.\n *\n * @param variant `\"filled\"` (default) — active item has a solid background.\n * `\"stroked\"` — outlined border style.\n *\n * @param name When set, renders a hidden `<input>` so the active value is\n * included in the nearest `<form>`'s submit data.\n *\n * @example — uncontrolled\n * <IconsToggle\n * options={[\n * { value: \"grid\", icon: <LayoutGrid />, label: \"Rutenett\" },\n * { value: \"list\", icon: <AlignJustify />, label: \"Liste\" },\n * ]}\n * defaultValue=\"grid\"\n * />\n *\n * @example — uncontrolled in a form\n * <IconsToggle\n * name=\"view\"\n * options={[\n * { value: \"grid\", icon: <LayoutGrid />, label: \"Rutenett\" },\n * { value: \"list\", icon: <AlignJustify />, label: \"Liste\" },\n * ]}\n * defaultValue=\"grid\"\n * />\n *\n * @example — controlled\n * const [view, setView] = useState<\"grid\" | \"list\">(\"grid\")\n * <IconsToggle\n * options={[...]}\n * value={view}\n * onValueChange={setView}\n * />\n */\nfunction IconsToggle<A extends string, B extends string>({\n options,\n title,\n variant = \"filled\",\n value: controlledValue,\n defaultValue,\n onValueChange,\n name,\n className,\n}: IconsToggleProps<A, B>) {\n const [internalValue, setInternalValue] = useState<A | B>(\n defaultValue ?? options[0].value\n )\n\n const activeValue = controlledValue ?? internalValue\n const activeIndex = options[0].value === activeValue ? 0 : 1\n const activeOption = options[activeIndex]\n const inactiveOption = options[activeIndex === 0 ? 1 : 0]\n\n function handleClick() {\n const nextValue = inactiveOption.value\n if (controlledValue === undefined) setInternalValue(nextValue)\n onValueChange?.(nextValue)\n }\n\n return (\n <>\n {name && <input type=\"hidden\" name={name} value={activeValue} />}\n <ButtonPrimitive\n onClick={handleClick}\n aria-label={`Bytt ${title} mellom ${activeOption.label} og ${inactiveOption.label}, valgt: ${activeOption.label}`}\n className={clsx(\n iconsToggleVariants({ variant }),\n activeIndex === 1 && styles.hasSelectedSecondOption,\n className\n )}\n >\n {options.map((option) => {\n const isActive = option.value === activeValue\n return (\n <span\n key={option.value}\n aria-hidden=\"true\"\n className={clsx(styles.option, isActive && styles.selectedOption)}\n >\n {option.icon}\n </span>\n )\n })}\n </ButtonPrimitive>\n </>\n )\n}\n\nexport { IconsToggle }\n\nconst iconsToggleVariants = cva(styles.root, {\n variants: {\n variant: {\n filled: styles.filled,\n stroked: styles.stroked,\n },\n },\n defaultVariants: {\n variant: \"filled\",\n },\n})\n\ninterface IconsToggleOption<Value extends string> {\n /** Unique identifier of this option */\n value: Value\n /** Icon displayed inside the toggle for this option. Can be any React node, but must be equal\n * in width to the other option's icon */\n icon: ReactNode\n /** Accessible label for this option */\n label: string\n}\n\ninterface IconsToggleBaseProps<\n A extends string,\n B extends string,\n> extends VariantProps<typeof iconsToggleVariants> {\n options: [IconsToggleOption<A>, IconsToggleOption<B>]\n title: string\n /** The identifier for the control in a form */\n name?: string\n className?: string\n}\n\ninterface IconsToggleControlledProps<\n A extends string,\n B extends string,\n> extends IconsToggleBaseProps<A, B> {\n value: A | B\n defaultValue?: never\n onValueChange: (value: A | B) => void\n}\n\ninterface IconsToggleUncontrolledProps<\n A extends string,\n B extends string,\n> extends IconsToggleBaseProps<A, B> {\n value?: never\n defaultValue?: A | B\n onValueChange?: (value: A | B) => void\n}\n\nexport type IconsToggleProps<A extends string, B extends string> =\n | IconsToggleControlledProps<A, B>\n | IconsToggleUncontrolledProps<A, B>\n"],"names":["buttonVariants","cva","styles","Button","className","variant","size","iconOnly","isPending","disabled","children","props","jsx","ButtonPrimitive","clsx","jsxs","Fragment","InsideFieldContext","createContext","textVariants","DEFAULT_ELEMENTS","Text","color","as","Component","Checkbox","label","insideField","use","box","CheckboxPrimitive","Check","labelContent","FieldPrimitive","CheckboxGroup","orientation","CheckboxGroupPrimitive","Field","FieldLabel","nativeLabel","FieldDescription","FieldError","message","errorProps","Form","FormPrimitive","IconsToggle","options","title","controlledValue","defaultValue","onValueChange","name","internalValue","setInternalValue","useState","activeValue","activeIndex","activeOption","inactiveOption","handleClick","nextValue","iconsToggleVariants","option","isActive"],"mappings":";;;;;;;;;;;;;;;;;;;;GAMMA,IAAiBC,EAAIC,EAAO,MAAM;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,IAAA;AAAA,IAEpB,MAAM;AAAA,MACJ,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,IAAA;AAAA,IAEb,UAAU;AAAA,MACR,MAAMA,EAAO;AAAA,MACb,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,EAAA;AAEd,CAAC;AA6BD,SAASC,GAAO;AAAA,EACd,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AACd,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,UAAUL,KAAaC;AAAA,MACvB,aAAWD;AAAA,MACX,WAAWM;AAAA,QACTd,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,UAAAC,GAAU;AAAA,QAC1CC,KAAaN,EAAO;AAAA,QACpBE;AAAA,MAAA;AAAA,MAED,GAAGO;AAAA,MAEH,cACC,gBAAAI,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAJ,EAAC,QAAA,EAAK,WAAWV,EAAO,SAAU,UAAAQ,GAAS;AAAA,0BAC1C,QAAA,EAAK,WAAWR,EAAO,SAAS,eAAY,OAAA,CAAO;AAAA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MAAK,UAAS,MAAAA,GAAY,OAAOI,GAAa;AAAA,IAC9D,gBAAA5C;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,SAAS+C;AAAA,QACT,cAAY,QAAQZ,CAAK,WAAWU,EAAa,KAAK,OAAOC,EAAe,KAAK,YAAYD,EAAa,KAAK;AAAA,QAC/G,WAAW5C;AAAA,UACTgD,GAAoB,EAAE,SAAAzD,GAAS;AAAA,UAC/BoD,MAAgB,KAAKvD,EAAO;AAAA,UAC5BE;AAAA,QAAA;AAAA,QAGD,UAAA2C,EAAQ,IAAI,CAACgB,MAAW;AACvB,gBAAMC,IAAWD,EAAO,UAAUP;AAClC,iBACE,gBAAA5C;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,eAAY;AAAA,cACZ,WAAWE,EAAKZ,EAAO,QAAQ8D,KAAY9D,EAAO,cAAc;AAAA,cAE/D,UAAA6D,EAAO;AAAA,YAAA;AAAA,YAJHA,EAAO;AAAA,UAAA;AAAA,QAOlB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;AAIA,MAAMD,KAAsB7D,EAAIC,EAAO,MAAM;AAAA,EAC3C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,QAAQA,EAAO;AAAA,MACf,SAASA,EAAO;AAAA,IAAA;AAAA,EAClB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/button/button.tsx","../src/components/form/field/field-context.ts","../src/components/text/text.tsx","../src/components/form/checkbox/checkbox.tsx","../src/components/form/checkbox-group/checkbox-group.tsx","../src/components/form/textarea/textarea.tsx","../src/components/form/field/field.tsx","../src/components/form/form/form.tsx","../src/components/form/icons-toggle/icons-toggle.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./button.module.css\"\n\nconst buttonVariants = cva(styles.base, {\n variants: {\n variant: {\n primary: styles.primary,\n secondary: styles.secondary,\n },\n size: {\n lg: styles.lg,\n sm: styles.sm,\n },\n iconOnly: {\n true: styles.iconOnly,\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"sm\",\n iconOnly: false,\n },\n})\n\ntype ButtonProps = Omit<ButtonPrimitive.Props, \"disabled\"> &\n VariantProps<typeof buttonVariants> & {\n isPending?: boolean\n /** @deprecated Avoid disabled buttons — they hurt accessibility and discoverability. Prefer `isPending` for in-flight actions, or keep the button enabled and show validation/error feedback. */\n disabled?: ButtonPrimitive.Props[\"disabled\"]\n }\n\n/**\n * @param variant - `\"primary\"` (default) or `\"secondary\"`\n *\n * @param size - `\"sm\"` (default) or `\"lg\"`.\n *\n * @param iconOnly - `true` if button contains only an icon. Always provide an `aria-label` when using this.\n *\n * @param isPending - `true` to show a centered spinner and block interaction. The button width is unchanged.\n *\n * @param disabled - **Deprecated.** Avoid disabled buttons — prefer `isPending` for in-flight actions, or keep the button enabled and show validation feedback.\n *\n * @example\n * <Button variant=\"primary\" size=\"sm\">Click me</Button>\n *\n * @example\n * <Button iconOnly><Info /></Button>\n *\n * @example\n * <Button isPending>Saving…</Button>\n */\nfunction Button({\n className,\n variant,\n size,\n iconOnly,\n isPending,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n disabled={isPending || disabled}\n aria-busy={isPending}\n className={clsx(\n buttonVariants({ variant, size, iconOnly }),\n isPending && styles.pending,\n className\n )}\n {...props}\n >\n {isPending ? (\n <>\n <span className={styles.content}>{children}</span>\n <span className={styles.spinner} aria-hidden=\"true\" />\n </>\n ) : (\n children\n )}\n </ButtonPrimitive>\n )\n}\n\nexport { Button, buttonVariants }\nexport type { ButtonProps }\n","import { createContext } from \"react\"\n\n/**\n * True when rendered inside our `Field`. Base UI's `Field.Item` / `Field.Label`\n * throw without a `Field.Root` ancestor, so controls that want to use them must\n * check first and fall back to plain markup.\n */\nconst InsideFieldContext = createContext(false)\n\nexport { InsideFieldContext }\n","import { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./text.module.css\"\n\nconst textVariants = cva(\"\", {\n variants: {\n variant: {\n headline: styles.headline,\n \"headline-sm\": styles[\"headline-sm\"],\n \"headline-xs\": styles[\"headline-xs\"],\n button: styles.button,\n \"body-bold\": styles[\"body-bold\"],\n body: styles.body,\n \"body-sm-bold\": styles[\"body-sm-bold\"],\n \"body-sm\": styles[\"body-sm\"],\n description: styles.description,\n },\n color: {\n default: styles[\"color-default\"],\n white: styles[\"color-white\"],\n background: styles[\"color-background\"],\n surface: styles[\"color-surface\"],\n \"divider-dark\": styles[\"color-divider-dark\"],\n informative: styles[\"color-informative\"],\n error: styles[\"color-error\"],\n warning: styles[\"color-warning\"],\n success: styles[\"color-success\"],\n info: styles[\"color-info\"],\n interactive: styles[\"color-interactive\"],\n inherit: \"\",\n },\n },\n defaultVariants: {\n variant: \"body\",\n color: \"default\",\n },\n})\n\nconst DEFAULT_ELEMENTS = {\n headline: \"h1\",\n \"headline-sm\": \"h2\",\n \"headline-xs\": \"h3\",\n body: \"p\",\n \"body-bold\": \"p\",\n \"body-sm\": \"p\",\n \"body-sm-bold\": \"p\",\n description: \"p\",\n button: \"span\",\n} as const\n\ntype TextVariant = NonNullable<VariantProps<typeof textVariants>[\"variant\"]>\ntype TextColor = NonNullable<VariantProps<typeof textVariants>[\"color\"]>\n\ntype TextOwnProps<E extends React.ElementType> = {\n variant?: TextVariant\n color?: TextColor\n as?: E\n className?: string\n children?: React.ReactNode\n}\n\ntype TextProps<E extends React.ElementType> = TextOwnProps<E> &\n Omit<React.ComponentPropsWithoutRef<E>, keyof TextOwnProps<E>>\n\nfunction Text<E extends React.ElementType = \"p\">({\n variant = \"body\",\n color,\n as,\n className,\n ...props\n}: TextProps<E>) {\n const Component = (as ?? DEFAULT_ELEMENTS[variant]) as React.ElementType\n return (\n <Component\n data-slot=\"text\"\n className={clsx(textVariants({ variant, color, className }))}\n {...props}\n />\n )\n}\n\nexport { Text, textVariants }\n","import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\"\nimport { Check } from \"lucide-react\"\nimport { use, type ReactNode } from \"react\"\n\nimport { InsideFieldContext } from \"@/components/form/field/field-context\"\nimport { Text } from \"@/components/text/text\"\nimport { clsx } from \"clsx\"\nimport styles from \"./checkbox.module.css\"\n\ntype CheckboxProps = Omit<\n CheckboxPrimitive.Root.Props,\n \"disabled\" | \"indeterminate\"\n> & {\n label?: ReactNode\n}\n\n/**\n * @param label - Label rendered next to the checkbox. Accepts any `ReactNode`.\n *\n * @example\n * <Checkbox label=\"Jeg godtar vilkår og betingelser\" />\n *\n * @example\n * <Checkbox\n * label={\n * <>\n * Jeg godtar <Link href=\"#\">vilkår og betingelser</Link>\n * </>\n * }\n * />\n */\nfunction Checkbox({ className, label, ...props }: CheckboxProps) {\n const insideField = use(InsideFieldContext)\n\n const box = (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={clsx(styles.checkbox, className)}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className={styles.indicator}\n >\n <Check className={styles.check} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n\n if (label === undefined) return box\n\n const labelContent = (\n <>\n {box}\n <Text variant=\"body\" as=\"span\">\n {label}\n </Text>\n </>\n )\n\n if (!insideField) {\n return <label className={styles.label}>{labelContent}</label>\n }\n\n return (\n <FieldPrimitive.Item className={styles.item}>\n <FieldPrimitive.Label className={styles.label}>\n {labelContent}\n </FieldPrimitive.Label>\n </FieldPrimitive.Item>\n )\n}\n\nexport { Checkbox }\nexport type { CheckboxProps }\n","import { CheckboxGroup as CheckboxGroupPrimitive } from \"@base-ui/react/checkbox-group\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./checkbox-group.module.css\"\n\ntype CheckboxGroupProps = Omit<CheckboxGroupPrimitive.Props, \"disabled\"> & {\n orientation?: \"row\" | \"column\"\n}\n\nfunction CheckboxGroup({\n className,\n orientation = \"row\",\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupPrimitive\n data-slot=\"checkbox-group\"\n className={clsx(\n styles.group,\n orientation === \"column\" ? styles.column : styles.row,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { CheckboxGroup }\nexport type { CheckboxGroupProps }\n","import { Field } from \"@base-ui/react/field\"\nimport { cva } from \"class-variance-authority\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./textarea.module.css\"\n\nconst textareaVariants = cva(styles.textarea)\n\ntype TextareaProps = Omit<Field.Control.Props, \"render\"> & {\n className?: string\n}\n\nfunction Textarea({ className, ...props }: TextareaProps) {\n return (\n <Field.Control\n data-slot=\"textarea\"\n render={<textarea />}\n className={clsx(textareaVariants(), className)}\n {...props}\n />\n )\n}\n\nexport { Textarea, textareaVariants }\nexport type { TextareaProps }\n","import { Field as FieldPrimitive } from \"@base-ui/react/field\"\n\nimport { Text } from \"@/components/text/text\"\nimport { clsx } from \"clsx\"\nimport { InsideFieldContext } from \"./field-context\"\nimport styles from \"./field.module.css\"\n\ntype FieldProps = FieldPrimitive.Root.Props\n\nfunction Field({ className, ...props }: FieldProps) {\n return (\n <InsideFieldContext value={true}>\n <FieldPrimitive.Root\n data-slot=\"field\"\n className={clsx(styles.container, className)}\n {...props}\n />\n </InsideFieldContext>\n )\n}\n\ntype FieldLabelProps = Omit<FieldPrimitive.Label.Props, \"render\">\n\nfunction FieldLabel({\n children,\n nativeLabel = true,\n ...props\n}: FieldLabelProps) {\n return (\n <FieldPrimitive.Label\n data-slot=\"field-label\"\n nativeLabel={nativeLabel}\n render={\n <Text variant=\"body-sm\" as={nativeLabel ? \"label\" : \"span\"}>\n {children}\n </Text>\n }\n {...props}\n />\n )\n}\n\ntype FieldDescriptionProps = Omit<FieldPrimitive.Description.Props, \"render\">\n\nfunction FieldDescription({ children, ...props }: FieldDescriptionProps) {\n return (\n <FieldPrimitive.Description\n data-slot=\"field-description\"\n render={\n <Text variant=\"description\" color=\"informative\">\n {children}\n </Text>\n }\n {...props}\n />\n )\n}\n\ntype FieldErrorProps = Omit<FieldPrimitive.Error.Props, \"render\">\n\nfunction FieldError({ children, className, ...props }: FieldErrorProps) {\n return (\n <FieldPrimitive.Error\n data-slot=\"field-error\"\n className={clsx(styles.error, className)}\n // `message` is the validation message Base UI resolved (the `validate`\n // result, or the native one). Own children win when provided.\n render={({ children: message, ...errorProps }) => (\n <div {...errorProps}>\n <span aria-hidden className={styles.errorDot} />\n <Text variant=\"description\" as=\"div\">\n {children ?? message}\n </Text>\n </div>\n )}\n {...props}\n />\n )\n}\n\nexport { Field, FieldLabel, FieldDescription, FieldError }\nexport type {\n FieldProps,\n FieldLabelProps,\n FieldDescriptionProps,\n FieldErrorProps,\n}\n","import { Form as FormPrimitive } from \"@base-ui/react/form\"\n\nimport { clsx } from \"clsx\"\nimport styles from \"./form.module.css\"\n\ntype FormProps = FormPrimitive.Props\n\nfunction Form({ className, ...props }: FormProps) {\n return (\n <FormPrimitive\n data-slot=\"form\"\n className={clsx(styles.form, className)}\n {...props}\n />\n )\n}\n\nexport { Form }\nexport type { FormProps }\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { clsx } from \"clsx\"\nimport { type ReactNode, useState } from \"react\"\n\nimport styles from \"./icons-toggle.module.css\"\n\n/**\n * A pill-shaped toggle with two icon options. Clicking anywhere on the toggle\n * switches to the other option. Exactly one option is always active.\n *\n * @param options Pair of `{ value, icon, label }` objects.\n *\n * @param variant `\"filled\"` (default) — active item has a solid background.\n * `\"stroked\"` — outlined border style.\n *\n * @param name When set, renders a hidden `<input>` so the active value is\n * included in the nearest `<form>`'s submit data.\n *\n * @example — uncontrolled\n * <IconsToggle\n * options={[\n * { value: \"grid\", icon: <LayoutGrid />, label: \"Rutenett\" },\n * { value: \"list\", icon: <AlignJustify />, label: \"Liste\" },\n * ]}\n * defaultValue=\"grid\"\n * />\n *\n * @example — uncontrolled in a form\n * <IconsToggle\n * name=\"view\"\n * options={[\n * { value: \"grid\", icon: <LayoutGrid />, label: \"Rutenett\" },\n * { value: \"list\", icon: <AlignJustify />, label: \"Liste\" },\n * ]}\n * defaultValue=\"grid\"\n * />\n *\n * @example — controlled\n * const [view, setView] = useState<\"grid\" | \"list\">(\"grid\")\n * <IconsToggle\n * options={[...]}\n * value={view}\n * onValueChange={setView}\n * />\n */\nfunction IconsToggle<A extends string, B extends string>({\n options,\n title,\n variant = \"filled\",\n value: controlledValue,\n defaultValue,\n onValueChange,\n name,\n className,\n}: IconsToggleProps<A, B>) {\n const [internalValue, setInternalValue] = useState<A | B>(\n defaultValue ?? options[0].value\n )\n\n const activeValue = controlledValue ?? internalValue\n const activeIndex = options[0].value === activeValue ? 0 : 1\n const activeOption = options[activeIndex]\n const inactiveOption = options[activeIndex === 0 ? 1 : 0]\n\n function handleClick() {\n const nextValue = inactiveOption.value\n if (controlledValue === undefined) setInternalValue(nextValue)\n onValueChange?.(nextValue)\n }\n\n return (\n <>\n {name && <input type=\"hidden\" name={name} value={activeValue} />}\n <ButtonPrimitive\n onClick={handleClick}\n aria-label={`Bytt ${title} mellom ${activeOption.label} og ${inactiveOption.label}, valgt: ${activeOption.label}`}\n className={clsx(\n iconsToggleVariants({ variant }),\n activeIndex === 1 && styles.hasSelectedSecondOption,\n className\n )}\n >\n {options.map((option) => {\n const isActive = option.value === activeValue\n return (\n <span\n key={option.value}\n aria-hidden=\"true\"\n className={clsx(styles.option, isActive && styles.selectedOption)}\n >\n {option.icon}\n </span>\n )\n })}\n </ButtonPrimitive>\n </>\n )\n}\n\nexport { IconsToggle }\n\nconst iconsToggleVariants = cva(styles.root, {\n variants: {\n variant: {\n filled: styles.filled,\n stroked: styles.stroked,\n },\n },\n defaultVariants: {\n variant: \"filled\",\n },\n})\n\ninterface IconsToggleOption<Value extends string> {\n /** Unique identifier of this option */\n value: Value\n /** Icon displayed inside the toggle for this option. Can be any React node, but must be equal\n * in width to the other option's icon */\n icon: ReactNode\n /** Accessible label for this option */\n label: string\n}\n\ninterface IconsToggleBaseProps<\n A extends string,\n B extends string,\n> extends VariantProps<typeof iconsToggleVariants> {\n options: [IconsToggleOption<A>, IconsToggleOption<B>]\n title: string\n /** The identifier for the control in a form */\n name?: string\n className?: string\n}\n\ninterface IconsToggleControlledProps<\n A extends string,\n B extends string,\n> extends IconsToggleBaseProps<A, B> {\n value: A | B\n defaultValue?: never\n onValueChange: (value: A | B) => void\n}\n\ninterface IconsToggleUncontrolledProps<\n A extends string,\n B extends string,\n> extends IconsToggleBaseProps<A, B> {\n value?: never\n defaultValue?: A | B\n onValueChange?: (value: A | B) => void\n}\n\nexport type IconsToggleProps<A extends string, B extends string> =\n | IconsToggleControlledProps<A, B>\n | IconsToggleUncontrolledProps<A, B>\n"],"names":["buttonVariants","cva","styles","Button","className","variant","size","iconOnly","isPending","disabled","children","props","jsx","ButtonPrimitive","clsx","jsxs","Fragment","InsideFieldContext","createContext","textVariants","DEFAULT_ELEMENTS","Text","color","as","Component","Checkbox","label","insideField","use","box","CheckboxPrimitive","Check","labelContent","FieldPrimitive","CheckboxGroup","orientation","CheckboxGroupPrimitive","textareaVariants","Textarea","Field","FieldLabel","nativeLabel","FieldDescription","FieldError","message","errorProps","Form","FormPrimitive","IconsToggle","options","title","controlledValue","defaultValue","onValueChange","name","internalValue","setInternalValue","useState","activeValue","activeIndex","activeOption","inactiveOption","handleClick","nextValue","iconsToggleVariants","option","isActive"],"mappings":";;;;;;;;;;;;;;;;;;;;GAMMA,IAAiBC,EAAIC,EAAO,MAAM;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,IAAA;AAAA,IAEpB,MAAM;AAAA,MACJ,IAAIA,EAAO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,SAASiD;AAAA,QACT,cAAY,QAAQZ,CAAK,WAAWU,EAAa,KAAK,OAAOC,EAAe,KAAK,YAAYD,EAAa,KAAK;AAAA,QAC/G,WAAW9C;AAAA,UACTkD,GAAoB,EAAE,SAAA3D,GAAS;AAAA,UAC/BsD,MAAgB,KAAKzD,EAAO;AAAA,UAC5BE;AAAA,QAAA;AAAA,QAGD,UAAA6C,EAAQ,IAAI,CAACgB,MAAW;AACvB,gBAAMC,IAAWD,EAAO,UAAUP;AAClC,iBACE,gBAAA9C;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,eAAY;AAAA,cACZ,WAAWE,EAAKZ,EAAO,QAAQgE,KAAYhE,EAAO,cAAc;AAAA,cAE/D,UAAA+D,EAAO;AAAA,YAAA;AAAA,YAJHA,EAAO;AAAA,UAAA;AAAA,QAOlB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;AAIA,MAAMD,KAAsB/D,EAAIC,EAAO,MAAM;AAAA,EAC3C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,QAAQA,EAAO;AAAA,MACf,SAASA,EAAO;AAAA,IAAA;AAAA,EAClB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;"}
|
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
@layer bnui {
|
|
2
|
-
:root{--color-neutral-0: #000000;--color-neutral-10: #1a1a1a;--color-neutral-20: #353535;--color-neutral-30: #595959;--color-neutral-40: #757575;--color-neutral-50: #a0a0a0;--color-neutral-60: #c4c4c4;--color-neutral-70: #dedede;--color-neutral-80: #eaeaea;--color-neutral-90: #f4f4f4;--color-neutral-95: #f9f9f9;--color-neutral-98: #fbfbfb;--color-neutral-100: #ffffff;--color-info-0: #000000;--color-info-10: #032345;--color-info-20: #00315d;--color-info-30: #00468e;--color-info-40: #004e95;--color-info-50: #0062ba;--color-info-60: #1a72c1;--color-info-70: #3381c8;--color-info-80: #66a1d6;--color-info-90: #80b1dd;--color-info-95: #b3d0ea;--color-info-98: #e6eff8;--color-info-100: #ffffff;--color-success-0: #000000;--color-success-10: #03381c;--color-success-20: #084826;--color-success-30: #0c6536;--color-success-40: #118849;--color-success-50: #189f59;--color-success-60: #15b560;--color-success-70: #2ece7a;--color-success-80: #5dd997;--color-success-90: #8be4b5;--color-success-95: #d1f4e1;--color-success-98: #e8faf0;--color-success-100: #ffffff;--color-warning-0: #000000;--color-warning-10: #522d02;--color-warning-20: #663802;--color-warning-30: #874b06;--color-warning-40: #a45800;--color-warning-50: #dd7e10;--color-warning-60: #f29305;--color-warning-70: #faa322;--color-warning-80: #ffb240;--color-warning-90: #ffcc80;--color-warning-95: #ffe8cd;--color-warning-98: #fff3e0;--color-warning-100: #ffffff;--color-error-0: #000000;--color-error-10: #480e17;--color-error-20: #5a121d;--color-error-30: #7f091a;--color-error-40: #9c0f0f;--color-error-50: #ae1616;--color-error-60: #c62828;--color-error-70: #dc2f2f;--color-error-80: #ef5350;--color-error-90: #ef9a9a;--color-error-95: #ffcdd2;--color-error-98: #ffebee;--color-error-100: #ffffff;--color-interactive-0: #000000;--color-interactive-10: #15143c;--color-interactive-20: #292878;--color-interactive-30: #3e3bb4;--color-interactive-40: #524ff0;--color-interactive-50: #615efc;--color-interactive-60: #7471ff;--color-interactive-70: #8987ff;--color-interactive-80: #a2a0ff;--color-interactive-90: #bebcff;--color-interactive-95: #dddcff;--color-interactive-98: #ededff;--color-interactive-100: #ffffff;--font-sans: Arial, Helvetica, "Helvetica Neue", system-ui, -apple-system, sans-serif;--font-america-gt: "GT America Expanded", var(--font-sans);--color-blue: #0042fe;--color-rebel-0: #000000;--color-rebel-10: #030400;--color-rebel-20: #121900;--color-rebel-30: #273300;--color-rebel-40: #3e5000;--color-rebel-50: #566f00;--color-rebel-60: #708e00;--color-rebel-70: #8baf00;--color-rebel-80: #a8d100;--color-rebel-90: #c3e835;--color-rebel-95: #d3ff27;--color-rebel-98: #f0ffc9;--color-rebel-100: #ffffff;--radius-4: .25rem;--radius-8: .5rem;--radius-full: 9999px;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-32: 2rem;--spacing-40: 2.5rem;--spacing-64: 4rem;--spacing-80: 5rem;--icon-size-lg: 1.375rem;--icon-stroke-width-lg: 1.5;--icon-size-sm: 1.125rem;--icon-stroke-width-sm: 1.5}:root{--background: var(--color-neutral-100);--text-background: var(--color-neutral-0);--surface: var(--color-neutral-90);--text-surface: var(--color-neutral-0);--divider-dark: var(--color-neutral-20);--text-divider-dark: var(--color-neutral-100);--border-divider: var(--color-neutral-50);--border-divider-light: var(--color-neutral-70);--text-informative: var(--color-neutral-30);--error: var(--color-error-40);--background-error: var(--color-error-98);--text-error: var(--color-error-10);--warning: var(--color-warning-60);--background-warning: var(--color-warning-98);--text-warning: var(--color-warning-10);--success: var(--color-success-30);--background-success: var(--color-success-98);--text-success: var(--color-success-10);--info: var(--color-info-40);--background-info: var(--color-info-98);--text-info: var(--color-info-10);--interactive: var(--color-interactive-50);--background-interactive: var(--color-interactive-98);--text-interactive: var(--color-interactive-10);--color-black: var(--color-neutral-10);--color-white: var(--color-neutral-100);--font-default: var(--font-sans);--text-headline-size: 2rem;--text-headline-line-height: 1.2;--text-headline-weight: 700;--text-headline-sm-size: 1.375rem;--text-headline-sm-line-height: 1.2;--text-headline-sm-weight: 700;--text-headline-xs-size: 1.125rem;--text-headline-xs-line-height: 1.2;--text-headline-xs-weight: 700;--text-button-size: 1.125rem;--text-button-line-height: 1.2;--text-button-weight: 400;--text-body-bold-size: 1rem;--text-body-bold-line-height: 1.2;--text-body-bold-weight: 700;--text-body-size: 1rem;--text-body-line-height: 1.2;--text-body-weight: 400;--text-body-sm-bold-size: .875rem;--text-body-sm-bold-line-height: 1.2;--text-body-sm-bold-weight: 700;--text-body-sm-size: .875rem;--text-body-sm-line-height: 1.2;--text-body-sm-weight: 400;--text-description-size: .75rem;--text-description-line-height: 1.2;--text-description-weight: 400}.bnui-base-wpVVq{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0;border:1px solid transparent;border-radius:var(--radius-4);outline:none;background-color:transparent;font-family:var(--font-sans);font-size:var(--text-button-size);font-weight:var(--text-button-weight);line-height:var(--text-button-line-height);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.bnui-base-wpVVq:focus-visible{box-shadow:0 0 0 2px var(--color-interactive-40)}.bnui-base-wpVVq:disabled{pointer-events:none}.bnui-base-wpVVq svg{flex-shrink:0;width:var(--icon-size-lg);height:var(--icon-size-lg);stroke-width:var(--icon-stroke-width-lg)}.bnui-primary-OKCHe{background-color:var(--color-neutral-10);color:var(--color-neutral-100)}.bnui-primary-OKCHe:hover{background-color:var(--color-interactive-40)}.bnui-primary-OKCHe:disabled{background-color:var(--color-neutral-30)}.bnui-secondary-dazFR{border-color:var(--color-neutral-10);color:var(--color-neutral-10)}.bnui-secondary-dazFR:hover{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98);color:var(--color-interactive-10)}.bnui-secondary-dazFR:disabled{border-color:var(--color-neutral-30);color:var(--color-neutral-30);background-color:var(--color-neutral-90)}.bnui-lg-WgiKr{gap:var(--spacing-12);padding:var(--spacing-12) var(--spacing-16)}.bnui-sm-0Kb5B{gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-12)}.bnui-sm-0Kb5B svg{width:var(--icon-size-sm);height:var(--icon-size-sm);stroke-width:var(--icon-stroke-width-sm)}.bnui-iconOnly-LsvO8{gap:0}.bnui-content-q0g4H{display:inline-flex;align-items:center;gap:inherit}.bnui-pending-xP-rH{position:relative}.bnui-pending-xP-rH .bnui-content-q0g4H{visibility:hidden}.bnui-spinner-jLkEm{position:absolute;top:50%;left:50%;width:1rem;height:1rem;margin:-.5rem 0 0 -.5rem;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:bnui-button-spin--7o11 2s linear infinite}@keyframes bnui-button-spin--7o11{to{transform:rotate(360deg)}}.bnui-headline-6c9bn{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-size);line-height:var(--text-headline-line-height);font-weight:var(--text-headline-weight)}.bnui-headline-sm-eesRr{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-sm-size);line-height:var(--text-headline-sm-line-height);font-weight:var(--text-headline-sm-weight)}.bnui-headline-xs-bBHXL{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-xs-size);line-height:var(--text-headline-xs-line-height);font-weight:var(--text-headline-xs-weight)}.bnui-button-lekqm{margin:0;font-family:var(--font-sans);font-size:var(--text-button-size);line-height:var(--text-button-line-height);font-weight:var(--text-button-weight)}.bnui-body-bold-0cir6{margin:0;font-family:var(--font-sans);font-size:var(--text-body-bold-size);line-height:var(--text-body-bold-line-height);font-weight:var(--text-body-bold-weight)}.bnui-body-2BdnA{margin:0;font-family:var(--font-sans);font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-body-weight)}.bnui-body-sm-bold-9SPZK{margin:0;font-family:var(--font-sans);font-size:var(--text-body-sm-bold-size);line-height:var(--text-body-sm-bold-line-height);font-weight:var(--text-body-sm-bold-weight)}.bnui-body-sm-MOXMI{margin:0;font-family:var(--font-sans);font-size:var(--text-body-sm-size);line-height:var(--text-body-sm-line-height);font-weight:var(--text-body-sm-weight)}.bnui-description-6roeu{margin:0;font-family:var(--font-sans);font-size:var(--text-description-size);line-height:var(--text-description-line-height);font-weight:var(--text-description-weight)}.bnui-color-default-38dch{color:var(--color-neutral-10)}.bnui-color-white-d9q0c{color:var(--color-neutral-100)}.bnui-color-background-Flq4G{color:var(--text-background)}.bnui-color-surface-80oSA{color:var(--text-surface)}.bnui-color-divider-dark-lGQki{color:var(--text-divider-dark)}.bnui-color-informative-xAFpg{color:var(--text-informative)}.bnui-color-error-jEnPS{color:var(--text-error)}.bnui-color-warning-6lm-Z{color:var(--text-warning)}.bnui-color-success-ThRnA{color:var(--text-success)}.bnui-color-info-PtkS-{color:var(--text-info)}.bnui-color-interactive-b9cqS{color:var(--text-interactive)}.bnui-checkbox-mTFTt{display:inline-flex;box-sizing:border-box;width:var(--spacing-24);height:var(--spacing-24);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--radius-4);border:1px solid transparent;background-color:transparent;padding:0;font-family:var(--font-sans);color:inherit;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease;outline:none}.bnui-checkbox-mTFTt:focus-visible{outline:2px solid var(--color-interactive-40);outline-offset:2px}.bnui-checkbox-mTFTt[data-checked]{border-width:2px;border-color:var(--color-neutral-10);background-color:var(--color-neutral-10);color:var(--color-neutral-100)}.bnui-checkbox-mTFTt[data-checked]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-checked]{border-color:var(--color-interactive-40);background-color:var(--color-interactive-40)}.bnui-checkbox-mTFTt[data-unchecked]{border-color:var(--color-neutral-50)}.bnui-checkbox-mTFTt[data-unchecked]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-unchecked]{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98)}.bnui-checkbox-mTFTt[data-invalid],.bnui-checkbox-mTFTt[data-invalid]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-invalid]{border-color:var(--color-error-40)}.bnui-indicator-VOiAE{display:inline-flex;align-items:center;justify-content:center}.bnui-check-6pYVz{width:var(--icon-size-lg);height:var(--icon-size-lg);stroke-width:2}.bnui-item-qNsgX{display:contents}.bnui-label-JOyrO{display:inline-flex;cursor:pointer;align-items:center;gap:var(--spacing-8);font-family:var(--font-sans);-webkit-user-select:none;user-select:none}.bnui-group-76ZZz{display:inline-flex;box-sizing:border-box}.bnui-column-ev6Qg{flex-direction:column;align-items:flex-start;gap:var(--spacing-8)}.bnui-row-K6-hO{flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--spacing-16)}.bnui-container-GujCE{display:flex;box-sizing:border-box;width:100%;flex-direction:column;gap:var(--spacing-4);font-family:var(--font-sans)}.bnui-error-9Pli1{display:flex;align-items:center;gap:var(--spacing-4)}.bnui-errorDot-mVjXf{display:inline-block;width:.5rem;height:.5rem;flex-shrink:0;border-radius:var(--radius-full);background-color:var(--color-error-40)}.bnui-form-9QnXK{display:flex;box-sizing:border-box;width:100%;flex-direction:column;gap:var(--spacing-24);margin:0;font-family:var(--font-sans)}.bnui-root-oLVBN{--pill-padding: .1875rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;border-radius:var(--radius-full);padding:var(--pill-padding);border:1px solid transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.bnui-root-oLVBN:before{content:"";position:absolute;top:var(--pill-padding);left:var(--pill-padding);width:calc(50% - var(--pill-padding));bottom:var(--pill-padding);border-radius:var(--radius-full);pointer-events:none;transition:transform .15s ease}.bnui-root-oLVBN:focus-visible{outline:2px solid var(--color-interactive-50)}.bnui-hasSelectedSecondOption-LfH49:before{transform:translate(100%)}.bnui-filled-L-AUH{background-color:var(--color-neutral-90)}.bnui-filled-L-AUH:hover{background-color:var(--color-interactive-50)}.bnui-filled-L-AUH:before{background-color:var(--color-neutral-100)}.bnui-stroked-wRb92{background-color:var(--color-neutral-100);border-color:var(--color-neutral-10)}.bnui-stroked-wRb92:hover{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98)}.bnui-stroked-wRb92:before{background-color:var(--color-neutral-10)}.bnui-option-Hou7J{position:relative;z-index:1;display:flex;place-items:center;padding:var(--spacing-4);flex-grow:1;transition:color .15s ease}.bnui-filled-L-AUH:hover .bnui-option-Hou7J:not(.bnui-selectedOption-twuTF){color:var(--color-white)}.bnui-filled-L-AUH .bnui-option-Hou7J:not(.bnui-selectedOption-twuTF){color:var(--color-neutral-50)}.bnui-filled-L-AUH .bnui-selectedOption-twuTF{color:var(--color-neutral-10)}.bnui-stroked-wRb92 .bnui-selectedOption-twuTF{color:var(--color-neutral-100)}.bnui-option-Hou7J svg{width:var(--icon-size-sm);height:var(--icon-size-sm);stroke-width:var(--icon-stroke-width-sm)}
|
|
2
|
+
:root{--color-neutral-0: #000000;--color-neutral-10: #1a1a1a;--color-neutral-20: #353535;--color-neutral-30: #595959;--color-neutral-40: #757575;--color-neutral-50: #a0a0a0;--color-neutral-60: #c4c4c4;--color-neutral-70: #dedede;--color-neutral-80: #eaeaea;--color-neutral-90: #f4f4f4;--color-neutral-95: #f9f9f9;--color-neutral-98: #fbfbfb;--color-neutral-100: #ffffff;--color-info-0: #000000;--color-info-10: #032345;--color-info-20: #00315d;--color-info-30: #00468e;--color-info-40: #004e95;--color-info-50: #0062ba;--color-info-60: #1a72c1;--color-info-70: #3381c8;--color-info-80: #66a1d6;--color-info-90: #80b1dd;--color-info-95: #b3d0ea;--color-info-98: #e6eff8;--color-info-100: #ffffff;--color-success-0: #000000;--color-success-10: #03381c;--color-success-20: #084826;--color-success-30: #0c6536;--color-success-40: #118849;--color-success-50: #189f59;--color-success-60: #15b560;--color-success-70: #2ece7a;--color-success-80: #5dd997;--color-success-90: #8be4b5;--color-success-95: #d1f4e1;--color-success-98: #e8faf0;--color-success-100: #ffffff;--color-warning-0: #000000;--color-warning-10: #522d02;--color-warning-20: #663802;--color-warning-30: #874b06;--color-warning-40: #a45800;--color-warning-50: #dd7e10;--color-warning-60: #f29305;--color-warning-70: #faa322;--color-warning-80: #ffb240;--color-warning-90: #ffcc80;--color-warning-95: #ffe8cd;--color-warning-98: #fff3e0;--color-warning-100: #ffffff;--color-error-0: #000000;--color-error-10: #480e17;--color-error-20: #5a121d;--color-error-30: #7f091a;--color-error-40: #9c0f0f;--color-error-50: #ae1616;--color-error-60: #c62828;--color-error-70: #dc2f2f;--color-error-80: #ef5350;--color-error-90: #ef9a9a;--color-error-95: #ffcdd2;--color-error-98: #ffebee;--color-error-100: #ffffff;--color-interactive-0: #000000;--color-interactive-10: #15143c;--color-interactive-20: #292878;--color-interactive-30: #3e3bb4;--color-interactive-40: #524ff0;--color-interactive-50: #615efc;--color-interactive-60: #7471ff;--color-interactive-70: #8987ff;--color-interactive-80: #a2a0ff;--color-interactive-90: #bebcff;--color-interactive-95: #dddcff;--color-interactive-98: #ededff;--color-interactive-100: #ffffff;--font-sans: Arial, Helvetica, "Helvetica Neue", system-ui, -apple-system, sans-serif;--font-america-gt: "GT America Expanded", var(--font-sans);--color-blue: #0042fe;--color-rebel-0: #000000;--color-rebel-10: #030400;--color-rebel-20: #121900;--color-rebel-30: #273300;--color-rebel-40: #3e5000;--color-rebel-50: #566f00;--color-rebel-60: #708e00;--color-rebel-70: #8baf00;--color-rebel-80: #a8d100;--color-rebel-90: #c3e835;--color-rebel-95: #d3ff27;--color-rebel-98: #f0ffc9;--color-rebel-100: #ffffff;--radius-4: .25rem;--radius-8: .5rem;--radius-full: 9999px;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-32: 2rem;--spacing-40: 2.5rem;--spacing-64: 4rem;--spacing-80: 5rem;--icon-size-lg: 1.375rem;--icon-stroke-width-lg: 1.5;--icon-size-sm: 1.125rem;--icon-stroke-width-sm: 1.5}:root{--background: var(--color-neutral-100);--text-background: var(--color-neutral-0);--surface: var(--color-neutral-90);--text-surface: var(--color-neutral-0);--divider-dark: var(--color-neutral-20);--text-divider-dark: var(--color-neutral-100);--border-divider: var(--color-neutral-50);--border-divider-light: var(--color-neutral-70);--text-informative: var(--color-neutral-30);--error: var(--color-error-40);--background-error: var(--color-error-98);--text-error: var(--color-error-10);--warning: var(--color-warning-60);--background-warning: var(--color-warning-98);--text-warning: var(--color-warning-10);--success: var(--color-success-30);--background-success: var(--color-success-98);--text-success: var(--color-success-10);--info: var(--color-info-40);--background-info: var(--color-info-98);--text-info: var(--color-info-10);--interactive: var(--color-interactive-50);--background-interactive: var(--color-interactive-98);--text-interactive: var(--color-interactive-10);--color-black: var(--color-neutral-10);--color-white: var(--color-neutral-100);--font-default: var(--font-sans);--text-headline-size: 2rem;--text-headline-line-height: 1.2;--text-headline-weight: 700;--text-headline-sm-size: 1.375rem;--text-headline-sm-line-height: 1.2;--text-headline-sm-weight: 700;--text-headline-xs-size: 1.125rem;--text-headline-xs-line-height: 1.2;--text-headline-xs-weight: 700;--text-button-size: 1.125rem;--text-button-line-height: 1.2;--text-button-weight: 400;--text-body-bold-size: 1rem;--text-body-bold-line-height: 1.2;--text-body-bold-weight: 700;--text-body-size: 1rem;--text-body-line-height: 1.2;--text-body-weight: 400;--text-body-sm-bold-size: .875rem;--text-body-sm-bold-line-height: 1.2;--text-body-sm-bold-weight: 700;--text-body-sm-size: .875rem;--text-body-sm-line-height: 1.2;--text-body-sm-weight: 400;--text-description-size: .75rem;--text-description-line-height: 1.2;--text-description-weight: 400}.bnui-base-wpVVq{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0;border:1px solid transparent;border-radius:var(--radius-4);outline:none;background-color:transparent;font-family:var(--font-sans);font-size:var(--text-button-size);font-weight:var(--text-button-weight);line-height:var(--text-button-line-height);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.bnui-base-wpVVq:focus-visible{box-shadow:0 0 0 2px var(--color-interactive-40)}.bnui-base-wpVVq:disabled{pointer-events:none}.bnui-base-wpVVq svg{flex-shrink:0;width:var(--icon-size-lg);height:var(--icon-size-lg);stroke-width:var(--icon-stroke-width-lg)}.bnui-primary-OKCHe{background-color:var(--color-neutral-10);color:var(--color-neutral-100)}.bnui-primary-OKCHe:hover{background-color:var(--color-interactive-40)}.bnui-primary-OKCHe:disabled{background-color:var(--color-neutral-30)}.bnui-secondary-dazFR{border-color:var(--color-neutral-10);color:var(--color-neutral-10)}.bnui-secondary-dazFR:hover{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98);color:var(--color-interactive-10)}.bnui-secondary-dazFR:disabled{border-color:var(--color-neutral-30);color:var(--color-neutral-30);background-color:var(--color-neutral-90)}.bnui-lg-WgiKr{gap:var(--spacing-12);padding:var(--spacing-12) var(--spacing-16)}.bnui-sm-0Kb5B{gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-12)}.bnui-sm-0Kb5B svg{width:var(--icon-size-sm);height:var(--icon-size-sm);stroke-width:var(--icon-stroke-width-sm)}.bnui-iconOnly-LsvO8{gap:0}.bnui-content-q0g4H{display:inline-flex;align-items:center;gap:inherit}.bnui-pending-xP-rH{position:relative}.bnui-pending-xP-rH .bnui-content-q0g4H{visibility:hidden}.bnui-spinner-jLkEm{position:absolute;top:50%;left:50%;width:1rem;height:1rem;margin:-.5rem 0 0 -.5rem;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:bnui-button-spin--7o11 2s linear infinite}@keyframes bnui-button-spin--7o11{to{transform:rotate(360deg)}}.bnui-headline-6c9bn{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-size);line-height:var(--text-headline-line-height);font-weight:var(--text-headline-weight)}.bnui-headline-sm-eesRr{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-sm-size);line-height:var(--text-headline-sm-line-height);font-weight:var(--text-headline-sm-weight)}.bnui-headline-xs-bBHXL{margin:0;font-family:var(--font-sans);font-size:var(--text-headline-xs-size);line-height:var(--text-headline-xs-line-height);font-weight:var(--text-headline-xs-weight)}.bnui-button-lekqm{margin:0;font-family:var(--font-sans);font-size:var(--text-button-size);line-height:var(--text-button-line-height);font-weight:var(--text-button-weight)}.bnui-body-bold-0cir6{margin:0;font-family:var(--font-sans);font-size:var(--text-body-bold-size);line-height:var(--text-body-bold-line-height);font-weight:var(--text-body-bold-weight)}.bnui-body-2BdnA{margin:0;font-family:var(--font-sans);font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-body-weight)}.bnui-body-sm-bold-9SPZK{margin:0;font-family:var(--font-sans);font-size:var(--text-body-sm-bold-size);line-height:var(--text-body-sm-bold-line-height);font-weight:var(--text-body-sm-bold-weight)}.bnui-body-sm-MOXMI{margin:0;font-family:var(--font-sans);font-size:var(--text-body-sm-size);line-height:var(--text-body-sm-line-height);font-weight:var(--text-body-sm-weight)}.bnui-description-6roeu{margin:0;font-family:var(--font-sans);font-size:var(--text-description-size);line-height:var(--text-description-line-height);font-weight:var(--text-description-weight)}.bnui-color-default-38dch{color:var(--color-neutral-10)}.bnui-color-white-d9q0c{color:var(--color-neutral-100)}.bnui-color-background-Flq4G{color:var(--text-background)}.bnui-color-surface-80oSA{color:var(--text-surface)}.bnui-color-divider-dark-lGQki{color:var(--text-divider-dark)}.bnui-color-informative-xAFpg{color:var(--text-informative)}.bnui-color-error-jEnPS{color:var(--text-error)}.bnui-color-warning-6lm-Z{color:var(--text-warning)}.bnui-color-success-ThRnA{color:var(--text-success)}.bnui-color-info-PtkS-{color:var(--text-info)}.bnui-color-interactive-b9cqS{color:var(--text-interactive)}.bnui-checkbox-mTFTt{display:inline-flex;box-sizing:border-box;width:var(--spacing-24);height:var(--spacing-24);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--radius-4);border:1px solid transparent;background-color:transparent;padding:0;font-family:var(--font-sans);color:inherit;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease;outline:none}.bnui-checkbox-mTFTt:focus-visible{outline:2px solid var(--color-interactive-40);outline-offset:2px}.bnui-checkbox-mTFTt[data-checked]{border-width:2px;border-color:var(--color-neutral-10);background-color:var(--color-neutral-10);color:var(--color-neutral-100)}.bnui-checkbox-mTFTt[data-checked]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-checked]{border-color:var(--color-interactive-40);background-color:var(--color-interactive-40)}.bnui-checkbox-mTFTt[data-unchecked]{border-color:var(--color-neutral-50)}.bnui-checkbox-mTFTt[data-unchecked]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-unchecked]{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98)}.bnui-checkbox-mTFTt[data-invalid],.bnui-checkbox-mTFTt[data-invalid]:hover,.bnui-label-JOyrO:hover .bnui-checkbox-mTFTt[data-invalid]{border-color:var(--color-error-40)}.bnui-indicator-VOiAE{display:inline-flex;align-items:center;justify-content:center}.bnui-check-6pYVz{width:var(--icon-size-lg);height:var(--icon-size-lg);stroke-width:2}.bnui-item-qNsgX{display:contents}.bnui-label-JOyrO{display:inline-flex;cursor:pointer;align-items:center;gap:var(--spacing-8);font-family:var(--font-sans);-webkit-user-select:none;user-select:none}.bnui-group-76ZZz{display:inline-flex;box-sizing:border-box}.bnui-column-ev6Qg{flex-direction:column;align-items:flex-start;gap:var(--spacing-8)}.bnui-row-K6-hO{flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--spacing-16)}.bnui-textarea-6uYeG{display:block;box-sizing:border-box;min-height:6rem;min-width:20rem;width:100%;border-radius:var(--radius-4);border:1px solid var(--color-neutral-50);background-color:var(--color-neutral-100);padding:var(--spacing-8);resize:none;font-family:var(--font-sans);font-size:var(--text-body-size);line-height:var(--text-body-line-height);color:var(--color-neutral-10);outline:none;field-sizing:content;overflow:hidden}.bnui-textarea-6uYeG::placeholder{color:var(--color-neutral-40)}.bnui-textarea-6uYeG:hover{box-shadow:inset 0 0 0 1px var(--color-neutral-50)}.bnui-textarea-6uYeG:focus{border-color:var(--color-interactive-40);box-shadow:inset 0 0 0 1px var(--color-interactive-40)}.bnui-textarea-6uYeG[data-invalid]{border-color:var(--color-error-40)}.bnui-textarea-6uYeG[data-invalid]:hover{box-shadow:none}.bnui-textarea-6uYeG[data-invalid]:focus{border-color:var(--color-interactive-40);box-shadow:inset 0 0 0 1px var(--color-interactive-40)}.bnui-textarea-6uYeG:disabled{cursor:not-allowed;opacity:.5}.bnui-container-GujCE{display:flex;box-sizing:border-box;width:100%;flex-direction:column;gap:var(--spacing-4);font-family:var(--font-sans)}.bnui-error-9Pli1{display:flex;align-items:center;gap:var(--spacing-4)}.bnui-errorDot-mVjXf{display:inline-block;width:.5rem;height:.5rem;flex-shrink:0;border-radius:var(--radius-full);background-color:var(--color-error-40)}.bnui-form-9QnXK{display:flex;box-sizing:border-box;width:100%;flex-direction:column;gap:var(--spacing-24);margin:0;font-family:var(--font-sans)}.bnui-root-oLVBN{--pill-padding: .1875rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;border-radius:var(--radius-full);padding:var(--pill-padding);border:1px solid transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.bnui-root-oLVBN:before{content:"";position:absolute;top:var(--pill-padding);left:var(--pill-padding);width:calc(50% - var(--pill-padding));bottom:var(--pill-padding);border-radius:var(--radius-full);pointer-events:none;transition:transform .15s ease}.bnui-root-oLVBN:focus-visible{outline:2px solid var(--color-interactive-50)}.bnui-hasSelectedSecondOption-LfH49:before{transform:translate(100%)}.bnui-filled-L-AUH{background-color:var(--color-neutral-90)}.bnui-filled-L-AUH:hover{background-color:var(--color-interactive-50)}.bnui-filled-L-AUH:before{background-color:var(--color-neutral-100)}.bnui-stroked-wRb92{background-color:var(--color-neutral-100);border-color:var(--color-neutral-10)}.bnui-stroked-wRb92:hover{border-color:var(--color-interactive-40);background-color:var(--color-interactive-98)}.bnui-stroked-wRb92:before{background-color:var(--color-neutral-10)}.bnui-option-Hou7J{position:relative;z-index:1;display:flex;place-items:center;padding:var(--spacing-4);flex-grow:1;transition:color .15s ease}.bnui-filled-L-AUH:hover .bnui-option-Hou7J:not(.bnui-selectedOption-twuTF){color:var(--color-white)}.bnui-filled-L-AUH .bnui-option-Hou7J:not(.bnui-selectedOption-twuTF){color:var(--color-neutral-50)}.bnui-filled-L-AUH .bnui-selectedOption-twuTF{color:var(--color-neutral-10)}.bnui-stroked-wRb92 .bnui-selectedOption-twuTF{color:var(--color-neutral-100)}.bnui-option-Hou7J svg{width:var(--icon-size-sm);height:var(--icon-size-sm);stroke-width:var(--icon-stroke-width-sm)}
|
|
3
3
|
|
|
4
4
|
}
|