@bonprix-ds/internal-components 0.1.5 → 0.2.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/index.d.ts +25 -4
- package/dist/index.js +110 -86
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,22 @@ import { ButtonSize } from '@bonprix-ds/utils';
|
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
import { default as default_2 } from 'react';
|
|
4
4
|
import { ElementType } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { IconOrElement } from '@bonprix-ds/react-icon';
|
|
6
6
|
import { Ref } from 'react';
|
|
7
7
|
import { ControlGroupProps as SelectionControlGroupProps } from '@bonprix-ds/utils';
|
|
8
|
+
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
9
|
+
import { TVReturnType } from 'tailwind-variants';
|
|
8
10
|
|
|
9
11
|
declare interface AllyIds {
|
|
10
12
|
errorTextId: string;
|
|
11
13
|
helperTextId: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
export declare const backdrop: TVReturnType<{} | {} | {}, undefined, "fixed top-0 start-0 h-full w-full flex bg-clr-backdrop justify-center items-center", TVConfig<unknown, {} | {}>, {} | {}, undefined, TVReturnType<unknown, undefined, "fixed top-0 start-0 h-full w-full flex bg-clr-backdrop justify-center items-center", TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
17
|
+
|
|
14
18
|
export declare const BaseButton: <C extends ElementType = "button">({ children, size, variant, contentWidth, loading, icon, iconPosition, componentName, inverted, component, ...props }: BaseButtonProps<C>) => default_2.JSX.Element;
|
|
15
19
|
|
|
16
|
-
export declare type BaseButtonProps<C extends ElementType> = BaseProps & {
|
|
20
|
+
export declare type BaseButtonProps<C extends ElementType = "button"> = BaseProps & {
|
|
17
21
|
component?: C;
|
|
18
22
|
} & Omit<ComponentProps<C>, keyof BaseProps | "component">;
|
|
19
23
|
|
|
@@ -23,7 +27,7 @@ declare interface BaseProps {
|
|
|
23
27
|
variant?: "primary" | "secondary" | "tertiary";
|
|
24
28
|
contentWidth?: boolean;
|
|
25
29
|
loading?: boolean;
|
|
26
|
-
icon?:
|
|
30
|
+
icon?: IconOrElement;
|
|
27
31
|
iconPosition?: "start" | "end";
|
|
28
32
|
componentName?: "button" | "icon-button" | "badge-icon-button";
|
|
29
33
|
inverted?: boolean;
|
|
@@ -66,6 +70,8 @@ declare interface ControlledInputProps extends BaseProps_2 {
|
|
|
66
70
|
onChange: (value: boolean) => void;
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
export declare const fadeAnimation: TVReturnType<{} | {} | {}, undefined, "data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut", TVConfig<unknown, {} | {}>, {} | {}, undefined, TVReturnType<unknown, undefined, "data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut", TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
74
|
+
|
|
69
75
|
export declare const InputHelperText: ({ id, children, type }: InputHelperTextProps) => default_2.JSX.Element;
|
|
70
76
|
|
|
71
77
|
export declare interface InputHelperTextProps {
|
|
@@ -74,7 +80,7 @@ export declare interface InputHelperTextProps {
|
|
|
74
80
|
type?: "description" | "error";
|
|
75
81
|
}
|
|
76
82
|
|
|
77
|
-
export declare const InputHelperTextSection: ({ helperText, helperTextId, error, errorText, errorTextId, className }: InputHelperTextSectionProps) => default_2.JSX.Element;
|
|
83
|
+
export declare const InputHelperTextSection: ({ helperText, helperTextId, error, errorText, errorTextId, disabled, className, }: InputHelperTextSectionProps) => default_2.JSX.Element;
|
|
78
84
|
|
|
79
85
|
export declare interface InputHelperTextSectionProps {
|
|
80
86
|
helperText: string;
|
|
@@ -82,6 +88,7 @@ export declare interface InputHelperTextSectionProps {
|
|
|
82
88
|
error: boolean;
|
|
83
89
|
errorText: string;
|
|
84
90
|
errorTextId: string;
|
|
91
|
+
disabled?: boolean;
|
|
85
92
|
className?: string;
|
|
86
93
|
}
|
|
87
94
|
|
|
@@ -107,6 +114,20 @@ export declare const SelectionControlGroup: ({ label, children, error, errorText
|
|
|
107
114
|
|
|
108
115
|
export { SelectionControlGroupProps }
|
|
109
116
|
|
|
117
|
+
export declare const slideAnimation: TVReturnType<{} | {} | {}, undefined, "data-[state=open]:animate-slideLeft data-[state=closed]:animate-slideRight", TVConfig<unknown, {} | {}>, {} | {}, undefined, TVReturnType<unknown, undefined, "data-[state=open]:animate-slideLeft data-[state=closed]:animate-slideRight", TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
118
|
+
|
|
119
|
+
export declare const tabStyleContainerBase = "group flex flex-col relative cursor-pointer rounded after:start-0 after:bottom-0 after:w-full after:border-b-transparent after:content-[''] after:h-0.5 ";
|
|
120
|
+
|
|
121
|
+
export declare const tabStyleContainerVariant = "focus-visible:outline-none after:h-2 min-w-8 max-w-36 shrink-0";
|
|
122
|
+
|
|
123
|
+
export declare const tabStyleLabelClass = "line-clamp-2";
|
|
124
|
+
|
|
125
|
+
export declare const tabStyleLabelContainerBase = "flex flex-col mb-auto typography-body1 text-current px-0.5 border border-transparent rounded-sm";
|
|
126
|
+
|
|
127
|
+
export declare const tabStyleLabelContainerVariant = "group-focus-visible:outline outline-2 -outline-offset-2 text-left";
|
|
128
|
+
|
|
129
|
+
export declare const tabStyleList = "gap-x-3 text-clr-primary flex border-b border-b-clr-disabled overflow-x-auto overscroll-none scrollbar-none";
|
|
130
|
+
|
|
110
131
|
declare interface UncontrolledInputProps extends BaseProps_2 {
|
|
111
132
|
checked?: never;
|
|
112
133
|
defaultChecked: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e from "@bonprix-ds/react-icon";
|
|
3
|
-
import
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import { useId as
|
|
6
|
-
import { tv as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import * as
|
|
2
|
+
import e, { IconSlot as t } from "@bonprix-ds/react-icon";
|
|
3
|
+
import n from "@bonprix-ds/react-spinner";
|
|
4
|
+
import { twMerge as r } from "tailwind-merge";
|
|
5
|
+
import { useId as i, useState as a } from "react";
|
|
6
|
+
import { tv as o } from "tailwind-variants";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import * as u from "@radix-ui/react-label";
|
|
9
9
|
//#region src/BaseButton.tsx
|
|
10
|
-
var
|
|
10
|
+
var d = o({
|
|
11
11
|
base: ["preflight rounded typography-button relative flex items-center justify-center gap-2 border border-transparent group/button", "focus-visible:outline outline-2 outline-offset-2"],
|
|
12
12
|
slots: {
|
|
13
13
|
icon: "",
|
|
@@ -268,44 +268,44 @@ var u = a({
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
]
|
|
271
|
-
}),
|
|
272
|
-
let v = g, { disabled: y = !1, className: b = "", type: x, ...S } = _, C = y ||
|
|
271
|
+
}), f = ({ children: e, size: i = "medium", variant: a = "primary", contentWidth: o = !1, loading: u = !1, icon: f, iconPosition: p = "start", componentName: m, inverted: h = !1, component: g = "button", ..._ }) => {
|
|
272
|
+
let v = g, { disabled: y = !1, className: b = "", type: x, ...S } = _, C = y || u, w = m === "icon-button", { base: T, icon: E, contentWrapper: D, loader: O } = d({
|
|
273
273
|
size: i,
|
|
274
|
-
contentWidth:
|
|
274
|
+
contentWidth: o,
|
|
275
275
|
disabled: C,
|
|
276
276
|
iconButton: w,
|
|
277
277
|
iconPosition: p,
|
|
278
278
|
variant: a,
|
|
279
|
-
loading:
|
|
279
|
+
loading: u,
|
|
280
280
|
link: g !== "button",
|
|
281
281
|
inverted: h
|
|
282
|
-
}), k = /* @__PURE__ */
|
|
283
|
-
|
|
282
|
+
}), k = /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
|
|
283
|
+
icon: f,
|
|
284
284
|
className: E()
|
|
285
|
-
}), w ? void 0 :
|
|
286
|
-
|
|
285
|
+
}), w ? void 0 : e] }), A = k;
|
|
286
|
+
u && (A = /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("span", {
|
|
287
287
|
className: D(),
|
|
288
288
|
children: k
|
|
289
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ c("span", {
|
|
290
290
|
className: O(),
|
|
291
|
-
children: /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ c(n, { edgeLength: w ? "1.25rem" : "1rem" })
|
|
292
292
|
})] }));
|
|
293
293
|
let j;
|
|
294
|
-
return w && (j =
|
|
295
|
-
className:
|
|
294
|
+
return w && (j = e || "Icon"), /* @__PURE__ */ c(v, {
|
|
295
|
+
className: r(T(), b),
|
|
296
296
|
disabled: g === "button" ? C : void 0,
|
|
297
297
|
type: g === "button" ? x ?? "button" : void 0,
|
|
298
298
|
...S,
|
|
299
299
|
"aria-label": j,
|
|
300
300
|
"data-bpds": m,
|
|
301
|
-
"data-bpds-icon": f,
|
|
301
|
+
"data-bpds-icon": typeof f == "string" ? f : void 0,
|
|
302
302
|
"data-bpds-size": i,
|
|
303
|
-
"data-bpds-content-width": m === "icon-button" ? void 0 :
|
|
303
|
+
"data-bpds-content-width": m === "icon-button" ? void 0 : o,
|
|
304
304
|
"data-bpds-inverted": h,
|
|
305
305
|
"data-bpds-variant": a,
|
|
306
306
|
children: A
|
|
307
307
|
});
|
|
308
|
-
},
|
|
308
|
+
}, p = o({
|
|
309
309
|
base: "preflight typography-input-text flex gap-2 items-start py-3 text-clr-on-bg-high relative",
|
|
310
310
|
slots: {
|
|
311
311
|
input: ["appearance-none relative w-6 h-6 rounded-sm border text-current cursor-pointer shrink-0", "focus-visible:outline focus-visible:outline-current focus-visible:outline-2 focus-visible:outline-offset-2"],
|
|
@@ -320,21 +320,26 @@ var u = a({
|
|
|
320
320
|
},
|
|
321
321
|
false: { base: "hover:cursor-pointer hover:text-clr-on-bg-low" }
|
|
322
322
|
},
|
|
323
|
-
error: { true:
|
|
323
|
+
error: { true: "" }
|
|
324
|
+
},
|
|
325
|
+
compoundVariants: [{
|
|
326
|
+
disabled: !1,
|
|
327
|
+
error: !0,
|
|
328
|
+
class: {
|
|
324
329
|
input: "border-clr-fg-error bg-clr-bg-error [&:checked::after]:bg-clr-fg-error",
|
|
325
330
|
icon: "fill-clr-fg-error"
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}),
|
|
329
|
-
let { base: x, input: S, icon: C } =
|
|
331
|
+
}
|
|
332
|
+
}]
|
|
333
|
+
}), m = ({ label: t, name: n, onChange: r, onBlur: i, id: o, value: s = t, required: u, disabled: d = !1, error: f, errorText: m, helperText: h, helperTextId: g, errorTextId: _, rootRef: v, describedBy: y, ...b }) => {
|
|
334
|
+
let { base: x, input: S, icon: C } = p({
|
|
330
335
|
disabled: d,
|
|
331
|
-
error:
|
|
332
|
-
}), w = "defaultChecked" in b, T = b.checked, [E, D] =
|
|
333
|
-
return h && (k = g),
|
|
336
|
+
error: f
|
|
337
|
+
}), w = "defaultChecked" in b, T = b.checked, [E, D] = a(() => w ? b.defaultChecked : T), O = w ? E : T, k;
|
|
338
|
+
return h && (k = g), !d && f && m && (k = k ? k + " " + _ : _), y && (k = k ? k + " " + y : y), /* @__PURE__ */ l("label", {
|
|
334
339
|
className: x(),
|
|
335
340
|
tabIndex: -1,
|
|
336
341
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ c("input", {
|
|
338
343
|
className: S(),
|
|
339
344
|
type: "checkbox",
|
|
340
345
|
checked: O,
|
|
@@ -343,54 +348,54 @@ var u = a({
|
|
|
343
348
|
w && D(t), r?.(t);
|
|
344
349
|
},
|
|
345
350
|
onBlur: (e) => {
|
|
346
|
-
if (
|
|
351
|
+
if (i) {
|
|
347
352
|
if (e.relatedTarget?.contains(e.currentTarget)) {
|
|
348
353
|
e.preventDefault();
|
|
349
354
|
return;
|
|
350
355
|
}
|
|
351
|
-
|
|
356
|
+
i();
|
|
352
357
|
}
|
|
353
358
|
},
|
|
354
|
-
value:
|
|
359
|
+
value: s,
|
|
355
360
|
id: o,
|
|
356
361
|
name: n,
|
|
357
362
|
disabled: d,
|
|
358
363
|
ref: v,
|
|
359
364
|
required: u,
|
|
360
|
-
"aria-invalid":
|
|
365
|
+
"aria-invalid": f ? "true" : void 0,
|
|
361
366
|
"aria-describedby": k
|
|
362
367
|
}),
|
|
363
368
|
t,
|
|
364
|
-
O && /* @__PURE__ */
|
|
369
|
+
O && /* @__PURE__ */ c(e, {
|
|
365
370
|
variant: "check-bold",
|
|
366
371
|
className: C()
|
|
367
372
|
})
|
|
368
373
|
]
|
|
369
374
|
});
|
|
370
|
-
},
|
|
375
|
+
}, h = o({
|
|
371
376
|
base: "preflight typography-input-helper-text w-full inline-block",
|
|
372
377
|
variants: { type: {
|
|
373
378
|
description: "text-clr-on-bg-mid",
|
|
374
379
|
error: "text-clr-fg-error"
|
|
375
380
|
} }
|
|
376
|
-
}),
|
|
377
|
-
let r =
|
|
378
|
-
return /* @__PURE__ */
|
|
381
|
+
}), g = ({ id: e, children: t, type: n = "description" }) => {
|
|
382
|
+
let r = h({ type: n });
|
|
383
|
+
return /* @__PURE__ */ c("p", {
|
|
379
384
|
id: e,
|
|
380
385
|
className: r,
|
|
381
386
|
children: t
|
|
382
387
|
});
|
|
383
|
-
},
|
|
384
|
-
className: `${
|
|
385
|
-
children: [e && /* @__PURE__ */
|
|
388
|
+
}, _ = o({ base: "preflight flex flex-col gap-1 w-full" }), v = ({ helperText: e, helperTextId: t, error: n = !1, errorText: r, errorTextId: i, disabled: a = !1, className: o = "" }) => /* @__PURE__ */ l("div", {
|
|
389
|
+
className: `${_()} ${o}`,
|
|
390
|
+
children: [e && /* @__PURE__ */ c(g, {
|
|
386
391
|
id: t,
|
|
387
392
|
children: e
|
|
388
|
-
}), n && r && /* @__PURE__ */
|
|
393
|
+
}), !a && n && r && /* @__PURE__ */ c(g, {
|
|
389
394
|
id: i,
|
|
390
395
|
type: "error",
|
|
391
396
|
children: r
|
|
392
397
|
})]
|
|
393
|
-
}),
|
|
398
|
+
}), y = o({
|
|
394
399
|
slots: {
|
|
395
400
|
root: [
|
|
396
401
|
"preflight relative text-clr-primary fill-clr-primary pt-5",
|
|
@@ -424,12 +429,7 @@ var u = a({
|
|
|
424
429
|
},
|
|
425
430
|
false: { stateIndicator: ["group-hover/input-wrapper:h-0.25 group-hover/input-wrapper:block", "group-hover:group-focus-within/input-wrapper:h-0.75 group-hover:group-focus-within/input-wrapper:block"] }
|
|
426
431
|
},
|
|
427
|
-
error: { true:
|
|
428
|
-
root: "text-clr-fg-error fill-clr-fg-error [&_.input]:caret-clr-fg-error [&_.input]:caret-clr-fg-error",
|
|
429
|
-
inputWrapper: "border-clr-fg-error",
|
|
430
|
-
inputLabel: "text-clr-fg-error",
|
|
431
|
-
stateIndicator: "bg-clr-fg-error"
|
|
432
|
-
} },
|
|
432
|
+
error: { true: "" },
|
|
433
433
|
componentName: {
|
|
434
434
|
select: { inputWrapper: "has-[[data-radix-popper-side=top]]:rounded-t-none has-[[data-radix-popper-side=bottom]]:rounded-b-none" },
|
|
435
435
|
"password-field": "",
|
|
@@ -443,83 +443,107 @@ var u = a({
|
|
|
443
443
|
false: {}
|
|
444
444
|
}
|
|
445
445
|
},
|
|
446
|
-
compoundVariants: [
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
446
|
+
compoundVariants: [
|
|
447
|
+
{
|
|
448
|
+
labelFloated: !1,
|
|
449
|
+
componentName: [
|
|
450
|
+
"select",
|
|
451
|
+
"search-field",
|
|
452
|
+
"password-field"
|
|
453
|
+
],
|
|
454
|
+
class: { inputLabel: "pe-7" }
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
componentName: [
|
|
458
|
+
"text-field",
|
|
459
|
+
"search-field",
|
|
460
|
+
"password-field",
|
|
461
|
+
"email-field",
|
|
462
|
+
"textarea"
|
|
463
|
+
],
|
|
464
|
+
class: { inputLabel: "group-focus-within:-translate-y-8 group-focus-within:typography-input-label" }
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
disabled: !1,
|
|
468
|
+
error: !0,
|
|
469
|
+
class: {
|
|
470
|
+
root: "text-clr-fg-error fill-clr-fg-error [&_.input]:caret-clr-fg-error [&_.input]:caret-clr-fg-error",
|
|
471
|
+
inputWrapper: "border-clr-fg-error",
|
|
472
|
+
inputLabel: "text-clr-fg-error",
|
|
473
|
+
stateIndicator: "bg-clr-fg-error"
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}), b = ({ children: e, id: t, label: n, labelFloated: r, disabled: i, required: a, componentName: o, helperText: s, helperTextId: d, error: f, errorText: p, errorTextId: m, labelClassName: h = "" }) => {
|
|
478
|
+
let { root: g, inputWrapper: _, inputLabel: b, helperTextSection: x, stateIndicator: S } = y({
|
|
457
479
|
labelFloated: r,
|
|
458
480
|
disabled: i,
|
|
459
481
|
error: f,
|
|
460
482
|
componentName: o,
|
|
461
|
-
helperTextSectionVisible: !!(
|
|
483
|
+
helperTextSectionVisible: !!(s || !i && f && p)
|
|
462
484
|
});
|
|
463
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ l("div", {
|
|
464
486
|
className: g(),
|
|
465
487
|
"data-bpds": o,
|
|
466
488
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
className:
|
|
489
|
+
/* @__PURE__ */ l("div", {
|
|
490
|
+
className: _(),
|
|
469
491
|
"aria-disabled": i,
|
|
470
|
-
children: [e, /* @__PURE__ */
|
|
492
|
+
children: [e, /* @__PURE__ */ c("div", { className: S() })]
|
|
471
493
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ l(u.Root, {
|
|
473
495
|
htmlFor: t,
|
|
474
496
|
className: `${b()} ${h}`,
|
|
475
|
-
children: [n, a && /* @__PURE__ */
|
|
497
|
+
children: [n, a && /* @__PURE__ */ c("span", {
|
|
476
498
|
"aria-hidden": "true",
|
|
477
499
|
children: "*"
|
|
478
500
|
})]
|
|
479
501
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ c(v, {
|
|
481
503
|
className: x(),
|
|
482
|
-
helperText:
|
|
504
|
+
helperText: s,
|
|
483
505
|
helperTextId: d,
|
|
484
506
|
error: f,
|
|
485
507
|
errorText: p,
|
|
486
|
-
errorTextId: m
|
|
508
|
+
errorTextId: m,
|
|
509
|
+
disabled: i
|
|
487
510
|
})
|
|
488
511
|
]
|
|
489
512
|
});
|
|
490
|
-
},
|
|
513
|
+
}, x = o({
|
|
491
514
|
base: "preflight min-w-0",
|
|
492
515
|
slots: { label: "typography-input-label text-clr-on-bg-mid truncate inline-block w-full" },
|
|
493
516
|
variants: { horizontalPadding: { true: { base: "px-3" } } }
|
|
494
|
-
}),
|
|
495
|
-
let { base: h, label: g } =
|
|
496
|
-
return o && (
|
|
517
|
+
}), S = ({ label: e, children: t, error: n = !1, errorText: r = "", disabled: a = !1, helperText: o = "", required: s = !1, divider: u = !1, horizontalPadding: d = !1, "aria-label": f, "aria-labelledby": p, componentName: m }) => {
|
|
518
|
+
let { base: h, label: g } = x({ horizontalPadding: d }), _ = i(), y = i(), b;
|
|
519
|
+
return o && (b = _), !a && n && r && (b = b ? b + " " + y : y), /* @__PURE__ */ l("fieldset", {
|
|
497
520
|
className: h(),
|
|
498
521
|
disabled: a,
|
|
499
522
|
"data-bpds": m,
|
|
500
523
|
"data-bpds-has-divider": u ? "true" : "false",
|
|
501
524
|
"data-bpds-has-horizontal-padding": d ? "true" : "false",
|
|
502
|
-
"aria-describedby":
|
|
525
|
+
"aria-describedby": b,
|
|
503
526
|
"aria-invalid": n ? "true" : void 0,
|
|
504
527
|
"aria-label": f,
|
|
505
528
|
"aria-labelledby": p,
|
|
506
529
|
children: [
|
|
507
|
-
e && /* @__PURE__ */
|
|
530
|
+
e && /* @__PURE__ */ l("legend", {
|
|
508
531
|
className: g(),
|
|
509
|
-
children: [e,
|
|
532
|
+
children: [e, s && /* @__PURE__ */ c("span", { children: "*" })]
|
|
510
533
|
}),
|
|
511
534
|
t,
|
|
512
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ c(v, {
|
|
513
536
|
helperText: o,
|
|
514
537
|
error: n,
|
|
515
|
-
errorText:
|
|
516
|
-
helperTextId:
|
|
517
|
-
errorTextId: y
|
|
538
|
+
errorText: r,
|
|
539
|
+
helperTextId: _,
|
|
540
|
+
errorTextId: y,
|
|
541
|
+
disabled: a
|
|
518
542
|
})
|
|
519
543
|
]
|
|
520
544
|
});
|
|
521
|
-
};
|
|
545
|
+
}, C = o({ base: "data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut" }), w = o({ base: "data-[state=open]:animate-slideLeft data-[state=closed]:animate-slideRight" }), T = o({ base: "fixed top-0 start-0 h-full w-full flex bg-clr-backdrop justify-center items-center" }), E = "gap-x-3 text-clr-primary flex border-b border-b-clr-disabled overflow-x-auto overscroll-none scrollbar-none", D = "group flex flex-col relative cursor-pointer rounded after:start-0 after:bottom-0 after:w-full after:border-b-transparent after:content-[''] after:h-0.5 ", O = "focus-visible:outline-none after:h-2 min-w-8 max-w-36 shrink-0", k = "flex flex-col mb-auto typography-body1 text-current px-0.5 border border-transparent rounded-sm", A = "group-focus-visible:outline outline-2 -outline-offset-2 text-left", j = "line-clamp-2";
|
|
522
546
|
//#endregion
|
|
523
|
-
export {
|
|
547
|
+
export { f as BaseButton, m as CheckboxBase, g as InputHelperText, v as InputHelperTextSection, b as InputWrapper, S as SelectionControlGroup, T as backdrop, C as fadeAnimation, w as slideAnimation, D as tabStyleContainerBase, O as tabStyleContainerVariant, j as tabStyleLabelClass, k as tabStyleLabelContainerBase, A as tabStyleLabelContainerVariant, E as tabStyleList };
|
|
524
548
|
|
|
525
549
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/BaseButton.tsx","../src/CheckboxBase.tsx","../src/InputHelperText.tsx","../src/InputHelperTextSection.tsx","../src/InputWrapper.tsx","../src/SelectionControlGroup.tsx"],"sourcesContent":["import Icon, { type IconType } from \"@bonprix-ds/react-icon\";\nimport Spinner from \"@bonprix-ds/react-spinner\";\nimport type { ButtonSize } from \"@bonprix-ds/utils\";\nimport { twMerge } from \"tailwind-merge\";\nimport React, { ComponentProps, ElementType, ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: [\n \"preflight rounded typography-button relative flex items-center justify-center gap-2 border border-transparent group/button\",\n \"focus-visible:outline outline-2 outline-offset-2\",\n ],\n slots: {\n icon: \"\",\n loader: \"absolute\",\n contentWrapper: \"flex items-center justify-center gap-2\",\n },\n variants: {\n variant: { primary: {}, secondary: {}, tertiary: {} },\n disabled: { true: \"\", false: \"\" },\n contentWidth: { true: \"\", false: \"\" },\n size: { small: \"\", medium: \"\", large: \"\" },\n link: { true: \"\", false: \"\" },\n inverted: { true: { base: \"outline-clr-primary-inverse\" }, false: { base: \"outline-clr-primary\" } },\n iconPosition: {\n start: \"\",\n end: \"flex-row-reverse\",\n },\n loading: {\n true: {\n contentWrapper: \"invisible\",\n },\n false: \"\",\n },\n iconButton: {\n true: \"\",\n false: \"py-[0.4375rem]\",\n },\n },\n compoundVariants: [\n {\n variant: \"primary\",\n inverted: false,\n class: {\n base: \"bg-clr-primary text-clr-on-primary-high\",\n icon: \"fill-clr-on-primary-high\",\n },\n },\n {\n variant: \"primary\",\n inverted: true,\n class: {\n base: \"bg-clr-primary-inverse text-clr-on-primary-high-inverse\",\n icon: \"fill-clr-on-primary-high-inverse\",\n },\n },\n {\n variant: \"primary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled bg-clr-bg-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"primary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:bg-clr-on-bg-low active:bg-clr-on-bg-low\",\n },\n },\n {\n variant: \"primary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse bg-clr-bg-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"primary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:bg-clr-on-bg-low-inverse active:bg-clr-on-bg-low-inverse\",\n },\n },\n {\n variant: \"secondary\",\n inverted: false,\n class: {\n base: \"text-clr-primary border-clr-primary\",\n icon: \"fill-clr-primary\",\n },\n },\n {\n variant: \"secondary\",\n inverted: true,\n class: {\n base: \"text-clr-primary-inverse border-clr-primary-inverse\",\n icon: \"fill-clr-primary-inverse\",\n },\n },\n {\n variant: \"secondary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled border-clr-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"secondary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:text-clr-on-bg-low hover:border-clr-on-bg-low active:text-clr-on-bg-low active:border-clr-on-bg-low\",\n icon: \"group-hover/button:fill-clr-on-bg-low group-active/button:fill-clr-on-bg-low\",\n },\n },\n {\n variant: \"secondary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse border-clr-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"secondary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:text-clr-on-bg-low-inverse hover:border-clr-on-bg-low-inverse active:text-clr-on-bg-low-inverse active:border-clr-on-bg-low-inverse\",\n icon: \"group-hover/button:fill-clr-on-bg-low-inverse group-active/button:fill-clr-on-bg-low-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n inverted: false,\n class: {\n base: \"text-clr-primary\",\n icon: \"fill-clr-primary\",\n },\n },\n {\n variant: \"tertiary\",\n inverted: true,\n class: {\n base: \"text-clr-primary-inverse\",\n icon: \"fill-clr-primary-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:text-clr-on-bg-low active:text-clr-on-bg-low\",\n icon: \"group-hover/button:fill-clr-on-bg-low group-active/button:fill-clr-on-bg-low\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:text-clr-on-bg-low-inverse active:text-clr-on-bg-low-inverse\",\n icon: \"group-hover/button:fill-clr-on-bg-low-inverse group-active/button:fill-clr-on-bg-low-inverse\",\n },\n },\n {\n contentWidth: false,\n iconButton: false,\n class: \"w-full\",\n },\n {\n contentWidth: true,\n link: true,\n class: \"w-fit\",\n },\n {\n iconButton: false,\n variant: [\"primary\", \"secondary\"],\n class: \"px-4\",\n },\n // Regular Button sizes\n {\n iconButton: false,\n size: \"medium\",\n class: {\n icon: \"w-4 h-4\",\n },\n },\n {\n iconButton: false,\n size: \"large\",\n class: {\n base: \"py-[0.9375rem]\",\n icon: \"w-4 h-4\",\n },\n },\n // Icon Button sizes\n {\n iconButton: true,\n size: \"small\",\n class: {\n base: \"p-[0.1875rem]\",\n icon: \"w-4 h-4\",\n },\n },\n {\n iconButton: true,\n size: \"medium\",\n variant: [\"primary\", \"secondary\"],\n class: {\n base: \"p-[0.4375rem]\",\n icon: \"w-4 h-4\", // we currently predefine the fill color in the icon, so we cannot inherit the fill from base and instead have to set it directly\n },\n },\n {\n iconButton: true,\n size: \"medium\",\n variant: \"tertiary\",\n class: {\n base: \"p-[0.1875rem]\",\n icon: \"w-6 h-6\",\n },\n },\n {\n iconButton: true,\n size: \"large\",\n class: {\n base: \"p-[0.6875rem]\",\n icon: \"w-6 h-6\",\n },\n },\n ],\n});\n\ninterface BaseProps {\n children: string;\n size?: ButtonSize;\n variant?: \"primary\" | \"secondary\" | \"tertiary\";\n contentWidth?: boolean;\n loading?: boolean;\n icon?: IconType;\n iconPosition?: \"start\" | \"end\";\n componentName?: \"button\" | \"icon-button\" | \"badge-icon-button\";\n inverted?: boolean;\n}\n\nexport type Props<C extends ElementType> = BaseProps & {\n component?: C;\n} & Omit<ComponentProps<C>, keyof BaseProps | \"component\">;\n\nconst BaseButton = <C extends ElementType = \"button\">({\n children,\n size = \"medium\",\n variant = \"primary\",\n contentWidth = false,\n loading = false,\n icon,\n iconPosition = \"start\",\n componentName,\n inverted = false,\n component = \"button\" as C,\n ...props\n}: Props<C>) => {\n const Component: ElementType = component;\n const { disabled = false, className = \"\", type, ...otherProps } = props;\n const isDisabled = disabled || loading;\n const iconButton = componentName === \"icon-button\";\n const link = component !== \"button\";\n\n const {\n base,\n icon: iconClass,\n contentWrapper,\n loader,\n } = generateClasses({\n size,\n contentWidth,\n disabled: isDisabled,\n iconButton,\n iconPosition,\n variant,\n loading,\n link,\n inverted,\n });\n\n const actualContent = (\n <>\n {icon && <Icon variant={icon} className={iconClass()} />}\n {iconButton ? undefined : children}\n </>\n );\n\n let content: ReactNode = actualContent;\n\n if (loading) {\n content = (\n <>\n <span className={contentWrapper()}>{actualContent}</span>\n <span className={loader()}>\n <Spinner edgeLength={iconButton ? \"1.25rem\" : \"1rem\"} />\n </span>\n </>\n );\n }\n\n let ariaLabel = undefined;\n if (iconButton) {\n if (children) {\n ariaLabel = children;\n } else {\n ariaLabel = \"Icon\";\n }\n }\n\n return (\n <Component\n className={twMerge(base(), className)}\n disabled={component === \"button\" ? isDisabled : undefined}\n type={component === \"button\" ? (type ?? \"button\") : undefined}\n {...otherProps}\n aria-label={ariaLabel}\n data-bpds={componentName}\n data-bpds-icon={icon}\n data-bpds-size={size}\n data-bpds-content-width={componentName !== \"icon-button\" ? contentWidth : undefined}\n data-bpds-inverted={inverted}\n data-bpds-variant={variant}\n >\n {content}\n </Component>\n );\n};\n\nexport default BaseButton;\n","\"use client\";\n\nimport Icon from \"@bonprix-ds/react-icon\";\nimport React, { ChangeEvent, FocusEvent, Ref, useState } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: \"preflight typography-input-text flex gap-2 items-start py-3 text-clr-on-bg-high relative\",\n slots: {\n input: [\n \"appearance-none relative w-6 h-6 rounded-sm border text-current cursor-pointer shrink-0\",\n \"focus-visible:outline focus-visible:outline-current focus-visible:outline-2 focus-visible:outline-offset-2\",\n ],\n icon: \"w-[1.125rem] h-[1.125rem] absolute m-0.75 fill-current\",\n },\n variants: {\n disabled: {\n true: {\n base: \"text-clr-disabled border-clr-disabled\",\n input: \"bg-clr-bg-disabled\",\n icon: \"fill-clr-disabled\",\n },\n false: {\n base: \"hover:cursor-pointer hover:text-clr-on-bg-low\",\n },\n },\n error: {\n true: {\n input: \"border-clr-fg-error bg-clr-bg-error [&:checked::after]:bg-clr-fg-error\",\n icon: \"fill-clr-fg-error\",\n },\n },\n },\n});\n\ninterface BaseProps {\n label: string;\n /** The name of the checkbox. Will be submitted with the form. */\n name: string;\n /** Callback function that is called when the checkbox loses focus. */\n onBlur?: () => void;\n /** The id of the checkbox. */\n id?: string;\n /** Value that will be submitted when the form is submitted. */\n value?: string;\n /** If set to `true`, the checkbox will be marked as required. */\n required?: boolean;\n /** If set to `true`, the checkbox will be disabled. */\n disabled?: boolean;\n /** If set to `true`, the checkbox will be marked as erroneous. */\n error?: boolean;\n errorText?: string;\n helperText?: string;\n /** A reference to the root element of the checkbox. Helpful for intergrating with 3rd party form libraries like react-hook-form. */\n rootRef?: Ref<HTMLInputElement>;\n /** <a href=\"https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby\" target=\"_blank\">ARIA: aria-describedby attribute.</a> */\n describedBy?: string;\n}\n\ninterface ControlledInputProps extends BaseProps {\n /** Controls, whether the checkbox is checked or not. Should be used in conjunction with `onChange`. */\n checked: boolean;\n /** Initial value of the checkbox. Should be used for uncontrolled variant of the component. */\n defaultChecked?: never;\n /** Callback function that is called when the checkbox state changes. `checked` should be adjusted appropriately. */\n onChange: (value: boolean) => void;\n}\n\ninterface UncontrolledInputProps extends BaseProps {\n checked?: never;\n defaultChecked: boolean;\n onChange?: (value: boolean) => void;\n}\nexport interface AllyIds {\n errorTextId: string;\n helperTextId: string;\n}\nexport type Props = ControlledInputProps | UncontrolledInputProps;\n\nconst CheckboxItem = ({\n label,\n name,\n onChange,\n onBlur,\n id,\n value = label,\n required,\n disabled,\n error,\n errorText,\n helperText,\n helperTextId,\n errorTextId,\n rootRef,\n describedBy,\n ...props\n}: Props & AllyIds) => {\n const { base, input, icon } = generateClasses({ disabled, error });\n\n const isUncontrolled = \"defaultChecked\" in props;\n const controlledChecked = props.checked;\n\n const [internalChecked, setInternalChecked] = useState(() => (isUncontrolled ? props.defaultChecked : controlledChecked));\n\n const checked = isUncontrolled ? internalChecked : controlledChecked;\n let ariaDescribedBy;\n if (helperText) {\n ariaDescribedBy = helperTextId;\n }\n if (error && errorText) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + errorTextId : errorTextId;\n }\n if (describedBy) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + describedBy : describedBy;\n }\n\n const handleChange = (ev: ChangeEvent<HTMLInputElement>) => {\n const checked = ev.currentTarget.checked;\n\n if (isUncontrolled) {\n setInternalChecked(checked);\n }\n onChange?.(checked);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!onBlur) return;\n // prevent blur triggers if clicking in label instead input\n if (event.relatedTarget?.contains(event.currentTarget)) {\n event.preventDefault();\n return;\n }\n onBlur();\n };\n return (\n // Label causes inconsistent blur event when interacts with input.\n // -1 tabIndex makes 'relatedTarget' not being always null and helps detecting correct blur event\n <label className={base()} tabIndex={-1}>\n <input\n className={input()}\n type=\"checkbox\"\n checked={checked}\n onChange={handleChange}\n onBlur={handleBlur}\n value={value}\n id={id}\n name={name}\n disabled={disabled}\n ref={rootRef}\n required={required}\n aria-invalid={error ? \"true\" : undefined}\n aria-describedby={ariaDescribedBy}\n />\n {label}\n {checked && <Icon variant=\"check-bold\" className={icon()} />}\n </label>\n );\n};\n\nexport default CheckboxItem;\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: \"preflight typography-input-helper-text w-full inline-block\",\n variants: {\n type: {\n description: \"text-clr-on-bg-mid\",\n error: \"text-clr-fg-error\",\n },\n },\n});\n\nexport interface Props {\n id: string;\n children: string;\n type?: \"description\" | \"error\";\n}\n\nconst InputHelperText = ({ id, children, type = \"description\" }: Props) => {\n const className = generateClasses({ type });\n return (\n <p id={id} className={className}>\n {children}\n </p>\n );\n};\n\nexport default InputHelperText;\n","\"use client\";\n\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport InputHelperText from \"./InputHelperText\";\n\nconst generateClasses = tv({\n base: \"preflight flex flex-col gap-1 w-full\",\n});\n\nexport interface Props {\n helperText: string;\n helperTextId: string;\n error: boolean;\n errorText: string;\n errorTextId: string;\n className?: string;\n}\n\nconst InputHelperTextSection = ({ helperText, helperTextId, error = false, errorText, errorTextId, className = \"\" }: Props) => {\n return (\n <div className={`${generateClasses()} ${className}`}>\n {helperText && <InputHelperText id={helperTextId}>{helperText}</InputHelperText>}\n {error && errorText && (\n <InputHelperText id={errorTextId} type=\"error\">\n {errorText}\n </InputHelperText>\n )}\n </div>\n );\n};\n\nexport default InputHelperTextSection;\n","// floating label inspired by https://flowbite.com/docs/forms/floating-label/\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport * as Label from \"@radix-ui/react-label\";\n\nimport InputHelperTextSection from \"./InputHelperTextSection\";\n\nconst generateClasses = tv({\n slots: {\n root: [\n \"preflight relative text-clr-primary fill-clr-primary pt-5\",\n \"[&_.input]:placeholder:typography-caption [&_.input]:text-ellipsis\",\n \"[&_.input]:placeholder:text-clr-on-bg-mid [&_.input]:placeholder:truncate\", //input's placeholder\n \"[&_.input]:caret-clr-primary\", // caret\n \"group\", // needed for autofill selector on `inputLabel`\n ],\n inputWrapper: \"relative border border-clr-primary rounded-sm group/input-wrapper\",\n inputLabel: [\n \"absolute start-0 duration-300 px-1.5 mx-1.5\",\n \"top-[2.0625rem]\", // 20px padding + 13px ((48px - 22px) / 2)\n \"inline-block truncate max-w-[calc(100%-0.75rem)]\",\n \"pointer-events-none\", // allows dropdown menu in select to open instantly on first click\n // Caution: When changing these, make sure to also adjust the corresponding Chrome fix styles (search for \"[data-fix-chrome-page-load-autofill]\").\n \"group-has-[input:autofill]:-translate-y-8\",\n \"group-has-[input:autofill]:typography-input-label\",\n ],\n helperTextSection: \"\",\n stateIndicator: [\n \"hidden absolute bottom-0 start-0 w-full bg-clr-primary\",\n \"group-focus-within/input-wrapper:h-0.75 group-focus-within/input-wrapper:block\",\n ],\n },\n variants: {\n labelFloated: {\n true: {\n inputLabel: \"typography-input-label -translate-y-8\",\n },\n false: {\n inputLabel: \"typography-input-text\",\n },\n },\n disabled: {\n true: {\n root: \"text-clr-disabled fill-clr-disabled pointer-events-none [&_.input]:placeholder:text-clr-disabled\",\n inputWrapper: \"border-clr-disabled\",\n inputLabel: \"text-clr-disabled\",\n },\n false: {\n stateIndicator: [\n \"group-hover/input-wrapper:h-0.25 group-hover/input-wrapper:block\",\n \"group-hover:group-focus-within/input-wrapper:h-0.75 group-hover:group-focus-within/input-wrapper:block\",\n ],\n },\n },\n error: {\n true: {\n root: \"text-clr-fg-error fill-clr-fg-error [&_.input]:caret-clr-fg-error [&_.input]:caret-clr-fg-error\",\n inputWrapper: \"border-clr-fg-error\",\n inputLabel: \"text-clr-fg-error\",\n stateIndicator: \"bg-clr-fg-error\",\n },\n },\n componentName: {\n select: {\n inputWrapper: \"has-[[data-radix-popper-side=top]]:rounded-t-none has-[[data-radix-popper-side=bottom]]:rounded-b-none\",\n },\n [\"password-field\"]: \"\",\n [\"text-field\"]: \"\",\n [\"search-field\"]: \"\",\n [\"email-field\"]: \"\",\n textarea: \"\",\n },\n helperTextSectionVisible: {\n true: {\n helperTextSection: \"mt-1 px-3\",\n },\n false: {},\n },\n },\n compoundVariants: [\n {\n labelFloated: false,\n componentName: [\"select\", \"search-field\", \"password-field\"],\n class: {\n inputLabel: \"pe-7\", // Do not cover chevron/search icons\n },\n },\n ],\n});\n\nexport interface Props {\n children: React.ReactNode;\n id: string;\n labelFloated: boolean;\n disabled: boolean;\n required: boolean;\n componentName: \"select\" | \"password-field\" | \"text-field\" | \"search-field\" | \"email-field\" | \"textarea\";\n label?: string;\n helperText: string;\n helperTextId: string;\n error: boolean;\n errorText: string;\n errorTextId: string;\n labelClassName?: string;\n}\n\nconst InputWrapper = ({\n children,\n id,\n label,\n labelFloated,\n disabled,\n required,\n componentName,\n helperText,\n helperTextId,\n error,\n errorText,\n errorTextId,\n labelClassName = \"\",\n}: Props) => {\n const helperTextSectionVisible = Boolean(helperText || (error && errorText));\n const {\n root,\n inputWrapper,\n inputLabel,\n helperTextSection: helperTextSectionClass,\n stateIndicator,\n } = generateClasses({\n labelFloated,\n disabled,\n error,\n componentName,\n helperTextSectionVisible,\n });\n return (\n <div className={root()} data-bpds={componentName}>\n <div className={inputWrapper()} aria-disabled={disabled}>\n {children}\n <div className={stateIndicator()}></div>\n </div>\n <Label.Root htmlFor={id} className={`${inputLabel()} ${labelClassName}`}>\n {label}\n {required && <span aria-hidden=\"true\">*</span>}\n </Label.Root>\n <InputHelperTextSection\n className={helperTextSectionClass()}\n helperText={helperText}\n helperTextId={helperTextId}\n error={error}\n errorText={errorText}\n errorTextId={errorTextId}\n />\n </div>\n );\n};\n\nexport default InputWrapper;\n","\"use client\";\n\nimport type { ControlGroupProps } from \"@bonprix-ds/utils\";\nimport React, { useId } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport InputHelperTextSection from \"./InputHelperTextSection\";\n\nexport type { ControlGroupProps as Props } from \"@bonprix-ds/utils\";\n\nconst generateClasses = tv({\n // min-w-0 is required because of the weird fieldset behavior\n // fieldset will be placed in some fixed width container or flexbox\n // we need to make sure that the helper texts are truncated with ellipsis and not extending the fieldset\n // https://stackoverflow.com/questions/7434756/overflow-and-text-overflow-within-fieldsets\n base: \"preflight min-w-0\",\n slots: {\n label: \"typography-input-label text-clr-on-bg-mid truncate inline-block w-full\",\n },\n variants: {\n horizontalPadding: {\n true: {\n base: \"px-3\",\n },\n },\n },\n});\n\nconst SelectionControlGroup = ({\n label,\n children,\n error = false,\n errorText = \"\",\n disabled = false,\n helperText = \"\",\n required = false,\n divider = false,\n horizontalPadding = false,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n componentName,\n}: ControlGroupProps) => {\n const { base, label: labelClasses } = generateClasses({ horizontalPadding });\n const helperTextId = useId();\n const errorTextId = useId();\n let ariaDescribedBy;\n if (helperText) {\n ariaDescribedBy = helperTextId;\n }\n if (error && errorText) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + errorTextId : errorTextId;\n }\n return (\n <fieldset\n className={base()}\n disabled={disabled}\n data-bpds={componentName}\n data-bpds-has-divider={divider ? \"true\" : \"false\"}\n data-bpds-has-horizontal-padding={horizontalPadding ? \"true\" : \"false\"}\n aria-describedby={ariaDescribedBy}\n aria-invalid={error ? \"true\" : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n {label && (\n <legend className={labelClasses()}>\n {label}\n {required && <span>*</span>}\n </legend>\n )}\n {children}\n <InputHelperTextSection\n helperText={helperText}\n error={error}\n errorText={errorText}\n helperTextId={helperTextId}\n errorTextId={errorTextId}\n />\n </fieldset>\n );\n};\n\nexport default SelectionControlGroup;\n"],"mappings":";;;;;;;;;AAOA,IAAM,IAAkB,EAAG;CACzB,MAAM,CACJ,8HACA,kDACF;CACA,OAAO;EACL,MAAM;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;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,cAAc;GACd,YAAY;GACZ,OAAO;EACT;EACA;GACE,cAAc;GACd,MAAM;GACN,OAAO;EACT;EACA;GACE,YAAY;GACZ,SAAS,CAAC,WAAW,WAAW;GAChC,OAAO;EACT;EAEA;GACE,YAAY;GACZ,MAAM;GACN,OAAO,EACL,MAAM,UACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EAEA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,SAAS,CAAC,WAAW,WAAW;GAChC,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,SAAS;GACT,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;IACL,MAAM;IACN,MA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EAC/D,oBAAkB;EAClB,gBAAc,IAAQ,SAAS,KAAA;EAC/B,cAAY;EACZ,mBAAiB;EATnB,UAAA;GAWG,KACC,kBAAC,UAAD;IAAQ,WAAW,EAAa;IAAhC,UAAA,CACG,GACA,KAAY,kBAAC,QAAD,EAAA,UAAM,IAAO,CAAA,CACpB;;GAET;GACD,kBAAC,GAAD;IACc;IACL;IACI;IACG;IACD;GACd,CAAA;EACO;;AAEd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/BaseButton.tsx","../src/CheckboxBase.tsx","../src/InputHelperText.tsx","../src/InputHelperTextSection.tsx","../src/InputWrapper.tsx","../src/SelectionControlGroup.tsx","../src/componentStyles/overlayStyleClasses.ts","../src/componentStyles/tabStyleClasses.ts"],"sourcesContent":["import { IconSlot, type IconOrElement } from \"@bonprix-ds/react-icon\";\nimport Spinner from \"@bonprix-ds/react-spinner\";\nimport type { ButtonSize } from \"@bonprix-ds/utils\";\nimport { twMerge } from \"tailwind-merge\";\nimport React, { ComponentProps, ElementType, ReactNode } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: [\n \"preflight rounded typography-button relative flex items-center justify-center gap-2 border border-transparent group/button\",\n \"focus-visible:outline outline-2 outline-offset-2\",\n ],\n slots: {\n icon: \"\",\n loader: \"absolute\",\n contentWrapper: \"flex items-center justify-center gap-2\",\n },\n variants: {\n variant: { primary: {}, secondary: {}, tertiary: {} },\n disabled: { true: \"\", false: \"\" },\n contentWidth: { true: \"\", false: \"\" },\n size: { small: \"\", medium: \"\", large: \"\" },\n link: { true: \"\", false: \"\" },\n inverted: { true: { base: \"outline-clr-primary-inverse\" }, false: { base: \"outline-clr-primary\" } },\n iconPosition: {\n start: \"\",\n end: \"flex-row-reverse\",\n },\n loading: {\n true: {\n contentWrapper: \"invisible\",\n },\n false: \"\",\n },\n iconButton: {\n true: \"\",\n false: \"py-[0.4375rem]\",\n },\n },\n compoundVariants: [\n {\n variant: \"primary\",\n inverted: false,\n class: {\n base: \"bg-clr-primary text-clr-on-primary-high\",\n icon: \"fill-clr-on-primary-high\",\n },\n },\n {\n variant: \"primary\",\n inverted: true,\n class: {\n base: \"bg-clr-primary-inverse text-clr-on-primary-high-inverse\",\n icon: \"fill-clr-on-primary-high-inverse\",\n },\n },\n {\n variant: \"primary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled bg-clr-bg-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"primary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:bg-clr-on-bg-low active:bg-clr-on-bg-low\",\n },\n },\n {\n variant: \"primary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse bg-clr-bg-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"primary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:bg-clr-on-bg-low-inverse active:bg-clr-on-bg-low-inverse\",\n },\n },\n {\n variant: \"secondary\",\n inverted: false,\n class: {\n base: \"text-clr-primary border-clr-primary\",\n icon: \"fill-clr-primary\",\n },\n },\n {\n variant: \"secondary\",\n inverted: true,\n class: {\n base: \"text-clr-primary-inverse border-clr-primary-inverse\",\n icon: \"fill-clr-primary-inverse\",\n },\n },\n {\n variant: \"secondary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled border-clr-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"secondary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:text-clr-on-bg-low hover:border-clr-on-bg-low active:text-clr-on-bg-low active:border-clr-on-bg-low\",\n icon: \"group-hover/button:fill-clr-on-bg-low group-active/button:fill-clr-on-bg-low\",\n },\n },\n {\n variant: \"secondary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse border-clr-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"secondary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:text-clr-on-bg-low-inverse hover:border-clr-on-bg-low-inverse active:text-clr-on-bg-low-inverse active:border-clr-on-bg-low-inverse\",\n icon: \"group-hover/button:fill-clr-on-bg-low-inverse group-active/button:fill-clr-on-bg-low-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n inverted: false,\n class: {\n base: \"text-clr-primary\",\n icon: \"fill-clr-primary\",\n },\n },\n {\n variant: \"tertiary\",\n inverted: true,\n class: {\n base: \"text-clr-primary-inverse\",\n icon: \"fill-clr-primary-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: true,\n inverted: false,\n class: {\n base: \"text-clr-disabled\",\n icon: \"fill-clr-disabled\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: false,\n inverted: false,\n class: {\n base: \"hover:text-clr-on-bg-low active:text-clr-on-bg-low\",\n icon: \"group-hover/button:fill-clr-on-bg-low group-active/button:fill-clr-on-bg-low\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: true,\n inverted: true,\n class: {\n base: \"text-clr-disabled-inverse\",\n icon: \"fill-clr-disabled-inverse\",\n },\n },\n {\n variant: \"tertiary\",\n disabled: false,\n inverted: true,\n class: {\n base: \"hover:text-clr-on-bg-low-inverse active:text-clr-on-bg-low-inverse\",\n icon: \"group-hover/button:fill-clr-on-bg-low-inverse group-active/button:fill-clr-on-bg-low-inverse\",\n },\n },\n {\n contentWidth: false,\n iconButton: false,\n class: \"w-full\",\n },\n {\n contentWidth: true,\n link: true,\n class: \"w-fit\",\n },\n {\n iconButton: false,\n variant: [\"primary\", \"secondary\"],\n class: \"px-4\",\n },\n // Regular Button sizes\n {\n iconButton: false,\n size: \"medium\",\n class: {\n icon: \"w-4 h-4\",\n },\n },\n {\n iconButton: false,\n size: \"large\",\n class: {\n base: \"py-[0.9375rem]\",\n icon: \"w-4 h-4\",\n },\n },\n // Icon Button sizes\n {\n iconButton: true,\n size: \"small\",\n class: {\n base: \"p-[0.1875rem]\",\n icon: \"w-4 h-4\",\n },\n },\n {\n iconButton: true,\n size: \"medium\",\n variant: [\"primary\", \"secondary\"],\n class: {\n base: \"p-[0.4375rem]\",\n icon: \"w-4 h-4\", // we currently predefine the fill color in the icon, so we cannot inherit the fill from base and instead have to set it directly\n },\n },\n {\n iconButton: true,\n size: \"medium\",\n variant: \"tertiary\",\n class: {\n base: \"p-[0.1875rem]\",\n icon: \"w-6 h-6\",\n },\n },\n {\n iconButton: true,\n size: \"large\",\n class: {\n base: \"p-[0.6875rem]\",\n icon: \"w-6 h-6\",\n },\n },\n ],\n});\n\ninterface BaseProps {\n children: string;\n size?: ButtonSize;\n variant?: \"primary\" | \"secondary\" | \"tertiary\";\n contentWidth?: boolean;\n loading?: boolean;\n icon?: IconOrElement;\n iconPosition?: \"start\" | \"end\";\n componentName?: \"button\" | \"icon-button\" | \"badge-icon-button\";\n inverted?: boolean;\n}\n\nexport type Props<C extends ElementType = \"button\"> = BaseProps & {\n component?: C;\n} & Omit<ComponentProps<C>, keyof BaseProps | \"component\">;\n\nconst BaseButton = <C extends ElementType = \"button\">({\n children,\n size = \"medium\",\n variant = \"primary\",\n contentWidth = false,\n loading = false,\n icon,\n iconPosition = \"start\",\n componentName,\n inverted = false,\n component = \"button\" as C,\n ...props\n}: Props<C>) => {\n const Component: ElementType = component;\n const { disabled = false, className = \"\", type, ...otherProps } = props;\n const isDisabled = disabled || loading;\n const iconButton = componentName === \"icon-button\";\n const link = component !== \"button\";\n\n const {\n base,\n icon: iconClass,\n contentWrapper,\n loader,\n } = generateClasses({\n size,\n contentWidth,\n disabled: isDisabled,\n iconButton,\n iconPosition,\n variant,\n loading,\n link,\n inverted,\n });\n\n const actualContent = (\n <>\n <IconSlot icon={icon} className={iconClass()} />\n {iconButton ? undefined : children}\n </>\n );\n\n let content: ReactNode = actualContent;\n\n if (loading) {\n content = (\n <>\n <span className={contentWrapper()}>{actualContent}</span>\n <span className={loader()}>\n <Spinner edgeLength={iconButton ? \"1.25rem\" : \"1rem\"} />\n </span>\n </>\n );\n }\n\n let ariaLabel = undefined;\n if (iconButton) {\n if (children) {\n ariaLabel = children;\n } else {\n ariaLabel = \"Icon\";\n }\n }\n\n return (\n <Component\n className={twMerge(base(), className)}\n disabled={component === \"button\" ? isDisabled : undefined}\n type={component === \"button\" ? (type ?? \"button\") : undefined}\n {...otherProps}\n aria-label={ariaLabel}\n data-bpds={componentName}\n data-bpds-icon={typeof icon === \"string\" ? icon : undefined}\n data-bpds-size={size}\n data-bpds-content-width={componentName !== \"icon-button\" ? contentWidth : undefined}\n data-bpds-inverted={inverted}\n data-bpds-variant={variant}\n >\n {content}\n </Component>\n );\n};\n\nexport default BaseButton;\n","\"use client\";\n\nimport Icon from \"@bonprix-ds/react-icon\";\nimport React, { ChangeEvent, FocusEvent, Ref, useState } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: \"preflight typography-input-text flex gap-2 items-start py-3 text-clr-on-bg-high relative\",\n slots: {\n input: [\n \"appearance-none relative w-6 h-6 rounded-sm border text-current cursor-pointer shrink-0\",\n \"focus-visible:outline focus-visible:outline-current focus-visible:outline-2 focus-visible:outline-offset-2\",\n ],\n icon: \"w-[1.125rem] h-[1.125rem] absolute m-0.75 fill-current\",\n },\n variants: {\n disabled: {\n true: {\n base: \"text-clr-disabled border-clr-disabled\",\n input: \"bg-clr-bg-disabled\",\n icon: \"fill-clr-disabled\",\n },\n false: {\n base: \"hover:cursor-pointer hover:text-clr-on-bg-low\",\n },\n },\n error: {\n true: \"\",\n },\n },\n compoundVariants: [\n {\n disabled: false,\n error: true,\n class: {\n input: \"border-clr-fg-error bg-clr-bg-error [&:checked::after]:bg-clr-fg-error\",\n icon: \"fill-clr-fg-error\",\n },\n },\n ],\n});\n\ninterface BaseProps {\n label: string;\n /** The name of the checkbox. Will be submitted with the form. */\n name: string;\n /** Callback function that is called when the checkbox loses focus. */\n onBlur?: () => void;\n /** The id of the checkbox. */\n id?: string;\n /** Value that will be submitted when the form is submitted. */\n value?: string;\n /** If set to `true`, the checkbox will be marked as required. */\n required?: boolean;\n /** If set to `true`, the checkbox will be disabled. */\n disabled?: boolean;\n /** If set to `true`, the checkbox will be marked as erroneous. */\n error?: boolean;\n errorText?: string;\n helperText?: string;\n /** A reference to the root element of the checkbox. Helpful for intergrating with 3rd party form libraries like react-hook-form. */\n rootRef?: Ref<HTMLInputElement>;\n /** <a href=\"https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby\" target=\"_blank\">ARIA: aria-describedby attribute.</a> */\n describedBy?: string;\n}\n\ninterface ControlledInputProps extends BaseProps {\n /** Controls, whether the checkbox is checked or not. Should be used in conjunction with `onChange`. */\n checked: boolean;\n /** Initial value of the checkbox. Should be used for uncontrolled variant of the component. */\n defaultChecked?: never;\n /** Callback function that is called when the checkbox state changes. `checked` should be adjusted appropriately. */\n onChange: (value: boolean) => void;\n}\n\ninterface UncontrolledInputProps extends BaseProps {\n checked?: never;\n defaultChecked: boolean;\n onChange?: (value: boolean) => void;\n}\nexport interface AllyIds {\n errorTextId: string;\n helperTextId: string;\n}\nexport type Props = ControlledInputProps | UncontrolledInputProps;\n\nconst CheckboxItem = ({\n label,\n name,\n onChange,\n onBlur,\n id,\n value = label,\n required,\n disabled = false,\n error,\n errorText,\n helperText,\n helperTextId,\n errorTextId,\n rootRef,\n describedBy,\n ...props\n}: Props & AllyIds) => {\n const { base, input, icon } = generateClasses({ disabled, error });\n\n const isUncontrolled = \"defaultChecked\" in props;\n const controlledChecked = props.checked;\n\n const [internalChecked, setInternalChecked] = useState(() => (isUncontrolled ? props.defaultChecked : controlledChecked));\n\n const checked = isUncontrolled ? internalChecked : controlledChecked;\n let ariaDescribedBy;\n if (helperText) {\n ariaDescribedBy = helperTextId;\n }\n if (!disabled && error && errorText) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + errorTextId : errorTextId;\n }\n if (describedBy) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + describedBy : describedBy;\n }\n\n const handleChange = (ev: ChangeEvent<HTMLInputElement>) => {\n const checked = ev.currentTarget.checked;\n\n if (isUncontrolled) {\n setInternalChecked(checked);\n }\n onChange?.(checked);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!onBlur) return;\n // prevent blur triggers if clicking in label instead input\n if (event.relatedTarget?.contains(event.currentTarget)) {\n event.preventDefault();\n return;\n }\n onBlur();\n };\n return (\n // Label causes inconsistent blur event when interacts with input.\n // -1 tabIndex makes 'relatedTarget' not being always null and helps detecting correct blur event\n <label className={base()} tabIndex={-1}>\n <input\n className={input()}\n type=\"checkbox\"\n checked={checked}\n onChange={handleChange}\n onBlur={handleBlur}\n value={value}\n id={id}\n name={name}\n disabled={disabled}\n ref={rootRef}\n required={required}\n aria-invalid={error ? \"true\" : undefined}\n aria-describedby={ariaDescribedBy}\n />\n {label}\n {checked && <Icon variant=\"check-bold\" className={icon()} />}\n </label>\n );\n};\n\nexport default CheckboxItem;\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n base: \"preflight typography-input-helper-text w-full inline-block\",\n variants: {\n type: {\n description: \"text-clr-on-bg-mid\",\n error: \"text-clr-fg-error\",\n },\n },\n});\n\nexport interface Props {\n id: string;\n children: string;\n type?: \"description\" | \"error\";\n}\n\nconst InputHelperText = ({ id, children, type = \"description\" }: Props) => {\n const className = generateClasses({ type });\n return (\n <p id={id} className={className}>\n {children}\n </p>\n );\n};\n\nexport default InputHelperText;\n","\"use client\";\n\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport InputHelperText from \"./InputHelperText\";\n\nconst generateClasses = tv({\n base: \"preflight flex flex-col gap-1 w-full\",\n});\n\nexport interface Props {\n helperText: string;\n helperTextId: string;\n error: boolean;\n errorText: string;\n errorTextId: string;\n disabled?: boolean;\n className?: string;\n}\n\nconst InputHelperTextSection = ({\n helperText,\n helperTextId,\n error = false,\n errorText,\n errorTextId,\n disabled = false,\n className = \"\",\n}: Props) => {\n return (\n <div className={`${generateClasses()} ${className}`}>\n {helperText && <InputHelperText id={helperTextId}>{helperText}</InputHelperText>}\n {!disabled && error && errorText && (\n <InputHelperText id={errorTextId} type=\"error\">\n {errorText}\n </InputHelperText>\n )}\n </div>\n );\n};\n\nexport default InputHelperTextSection;\n","// floating label inspired by https://flowbite.com/docs/forms/floating-label/\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport * as Label from \"@radix-ui/react-label\";\n\nimport InputHelperTextSection from \"./InputHelperTextSection\";\n\nconst generateClasses = tv({\n slots: {\n root: [\n \"preflight relative text-clr-primary fill-clr-primary pt-5\",\n \"[&_.input]:placeholder:typography-caption [&_.input]:text-ellipsis\",\n \"[&_.input]:placeholder:text-clr-on-bg-mid [&_.input]:placeholder:truncate\", //input's placeholder\n \"[&_.input]:caret-clr-primary\", // caret\n \"group\", // needed for autofill selector on `inputLabel`\n ],\n inputWrapper: \"relative border border-clr-primary rounded-sm group/input-wrapper\",\n inputLabel: [\n \"absolute start-0 duration-300 px-1.5 mx-1.5\",\n \"top-[2.0625rem]\", // 20px padding + 13px ((48px - 22px) / 2)\n \"inline-block truncate max-w-[calc(100%-0.75rem)]\",\n \"pointer-events-none\", // allows dropdown menu in select to open instantly on first click\n // Caution: When changing these, make sure to also adjust the corresponding Chrome fix styles (search for \"[data-fix-chrome-page-load-autofill]\").\n \"group-has-[input:autofill]:-translate-y-8\",\n \"group-has-[input:autofill]:typography-input-label\",\n ],\n helperTextSection: \"\",\n stateIndicator: [\n \"hidden absolute bottom-0 start-0 w-full bg-clr-primary\",\n \"group-focus-within/input-wrapper:h-0.75 group-focus-within/input-wrapper:block\",\n ],\n },\n variants: {\n labelFloated: {\n true: {\n inputLabel: \"typography-input-label -translate-y-8\",\n },\n false: {\n inputLabel: \"typography-input-text\",\n },\n },\n disabled: {\n true: {\n root: \"text-clr-disabled fill-clr-disabled pointer-events-none [&_.input]:placeholder:text-clr-disabled\",\n inputWrapper: \"border-clr-disabled\",\n inputLabel: \"text-clr-disabled\",\n },\n false: {\n stateIndicator: [\n \"group-hover/input-wrapper:h-0.25 group-hover/input-wrapper:block\",\n \"group-hover:group-focus-within/input-wrapper:h-0.75 group-hover:group-focus-within/input-wrapper:block\",\n ],\n },\n },\n error: {\n true: \"\",\n },\n componentName: {\n select: {\n inputWrapper: \"has-[[data-radix-popper-side=top]]:rounded-t-none has-[[data-radix-popper-side=bottom]]:rounded-b-none\",\n },\n [\"password-field\"]: \"\",\n [\"text-field\"]: \"\",\n [\"search-field\"]: \"\",\n [\"email-field\"]: \"\",\n textarea: \"\",\n },\n helperTextSectionVisible: {\n true: {\n helperTextSection: \"mt-1 px-3\",\n },\n false: {},\n },\n },\n compoundVariants: [\n {\n labelFloated: false,\n componentName: [\"select\", \"search-field\", \"password-field\"],\n class: {\n inputLabel: \"pe-7\", // Do not cover chevron/search icons\n },\n },\n {\n // The floating label is a visual response to focus, but `labelFloated` is React state, so it\n // cannot follow a forced `:focus-within`. Expressing it in CSS too — as the autofill rules\n // above already do — keeps the story grids honest. Not for `select`, whose label floats only\n // once a value is chosen.\n componentName: [\"text-field\", \"search-field\", \"password-field\", \"email-field\", \"textarea\"],\n class: {\n inputLabel: \"group-focus-within:-translate-y-8 group-focus-within:typography-input-label\",\n },\n },\n {\n disabled: false,\n error: true,\n class: {\n root: \"text-clr-fg-error fill-clr-fg-error [&_.input]:caret-clr-fg-error [&_.input]:caret-clr-fg-error\",\n inputWrapper: \"border-clr-fg-error\",\n inputLabel: \"text-clr-fg-error\",\n stateIndicator: \"bg-clr-fg-error\",\n },\n },\n ],\n});\n\nexport interface Props {\n children: React.ReactNode;\n id: string;\n labelFloated: boolean;\n disabled: boolean;\n required: boolean;\n componentName: \"select\" | \"password-field\" | \"text-field\" | \"search-field\" | \"email-field\" | \"textarea\";\n label?: string;\n helperText: string;\n helperTextId: string;\n error: boolean;\n errorText: string;\n errorTextId: string;\n labelClassName?: string;\n}\n\nconst InputWrapper = ({\n children,\n id,\n label,\n labelFloated,\n disabled,\n required,\n componentName,\n helperText,\n helperTextId,\n error,\n errorText,\n errorTextId,\n labelClassName = \"\",\n}: Props) => {\n const helperTextSectionVisible = Boolean(helperText || (!disabled && error && errorText));\n const {\n root,\n inputWrapper,\n inputLabel,\n helperTextSection: helperTextSectionClass,\n stateIndicator,\n } = generateClasses({\n labelFloated,\n disabled,\n error,\n componentName,\n helperTextSectionVisible,\n });\n return (\n <div className={root()} data-bpds={componentName}>\n <div className={inputWrapper()} aria-disabled={disabled}>\n {children}\n <div className={stateIndicator()}></div>\n </div>\n <Label.Root htmlFor={id} className={`${inputLabel()} ${labelClassName}`}>\n {label}\n {required && <span aria-hidden=\"true\">*</span>}\n </Label.Root>\n <InputHelperTextSection\n className={helperTextSectionClass()}\n helperText={helperText}\n helperTextId={helperTextId}\n error={error}\n errorText={errorText}\n errorTextId={errorTextId}\n disabled={disabled}\n />\n </div>\n );\n};\n\nexport default InputWrapper;\n","\"use client\";\n\nimport type { ControlGroupProps } from \"@bonprix-ds/utils\";\nimport React, { useId } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport InputHelperTextSection from \"./InputHelperTextSection\";\n\nexport type { ControlGroupProps as Props } from \"@bonprix-ds/utils\";\n\nconst generateClasses = tv({\n // min-w-0 is required because of the weird fieldset behavior\n // fieldset will be placed in some fixed width container or flexbox\n // we need to make sure that the helper texts are truncated with ellipsis and not extending the fieldset\n // https://stackoverflow.com/questions/7434756/overflow-and-text-overflow-within-fieldsets\n base: \"preflight min-w-0\",\n slots: {\n label: \"typography-input-label text-clr-on-bg-mid truncate inline-block w-full\",\n },\n variants: {\n horizontalPadding: {\n true: {\n base: \"px-3\",\n },\n },\n },\n});\n\nconst SelectionControlGroup = ({\n label,\n children,\n error = false,\n errorText = \"\",\n disabled = false,\n helperText = \"\",\n required = false,\n divider = false,\n horizontalPadding = false,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n componentName,\n}: ControlGroupProps) => {\n const { base, label: labelClasses } = generateClasses({ horizontalPadding });\n const helperTextId = useId();\n const errorTextId = useId();\n let ariaDescribedBy;\n if (helperText) {\n ariaDescribedBy = helperTextId;\n }\n if (!disabled && error && errorText) {\n ariaDescribedBy = ariaDescribedBy ? ariaDescribedBy + \" \" + errorTextId : errorTextId;\n }\n return (\n <fieldset\n className={base()}\n disabled={disabled}\n data-bpds={componentName}\n data-bpds-has-divider={divider ? \"true\" : \"false\"}\n data-bpds-has-horizontal-padding={horizontalPadding ? \"true\" : \"false\"}\n aria-describedby={ariaDescribedBy}\n aria-invalid={error ? \"true\" : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n {label && (\n <legend className={labelClasses()}>\n {label}\n {required && <span>*</span>}\n </legend>\n )}\n {children}\n <InputHelperTextSection\n helperText={helperText}\n error={error}\n errorText={errorText}\n helperTextId={helperTextId}\n errorTextId={errorTextId}\n disabled={disabled}\n />\n </fieldset>\n );\n};\n\nexport default SelectionControlGroup;\n","import { tv } from \"tailwind-variants\";\n\nexport const fadeAnimation = tv({\n base: \"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut\",\n});\nexport const slideAnimation = tv({\n base: \"data-[state=open]:animate-slideLeft data-[state=closed]:animate-slideRight\",\n});\n\nexport const backdrop = tv({\n base: \"fixed top-0 start-0 h-full w-full flex bg-clr-backdrop justify-center items-center\",\n});\n","export const tabStyleList = \"gap-x-3 text-clr-primary flex border-b border-b-clr-disabled overflow-x-auto overscroll-none scrollbar-none\";\nexport const tabStyleContainerBase =\n \"group flex flex-col relative cursor-pointer rounded after:start-0 after:bottom-0 after:w-full after:border-b-transparent after:content-[''] after:h-0.5 \";\nexport const tabStyleContainerVariant = \"focus-visible:outline-none after:h-2 min-w-8 max-w-36 shrink-0\";\nexport const tabStyleLabelContainerBase = \"flex flex-col mb-auto typography-body1 text-current px-0.5 border border-transparent rounded-sm\";\nexport const tabStyleLabelContainerVariant = \"group-focus-visible:outline outline-2 -outline-offset-2 text-left\";\nexport const tabStyleLabelClass = \"line-clamp-2\";\n"],"mappings":";;;;;;;;;AAOA,IAAM,IAAkB,EAAG;CACzB,MAAM,CACJ,8HACA,kDACF;CACA,OAAO;EACL,MAAM;EACN,QAAQ;EACR,gBAAgB;CAClB;CACA,UAAU;EACR,SAAS;GAAE,SAAS,CAAC;GAAG,WAAW,CAAC;GAAG,UAAU,CAAC;EAAE;EACpD,UAAU;GAAE,MAAM;GAAI,OAAO;EAAG;EAChC,cAAc;GAAE,MAAM;GAAI,OAAO;EAAG;EACpC,MAAM;GAAE,OAAO;GAAI,QAAQ;GAAI,OAAO;EAAG;EACzC,MAAM;GAAE,MAAM;GAAI,OAAO;EAAG;EAC5B,UAAU;GAAE,MAAM,EAAE,MAAM,8BAA8B;GAAG,OAAO,EAAE,MAAM,sBAAsB;EAAE;EAClG,cAAc;GACZ,OAAO;GACP,KAAK;EACP;EACA,SAAS;GACP,MAAM,EACJ,gBAAgB,YAClB;GACA,OAAO;EACT;EACA,YAAY;GACV,MAAM;GACN,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO,EACL,MAAM,iDACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO,EACL,MAAM,iEACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,UAAU;GACV,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,cAAc;GACd,YAAY;GACZ,OAAO;EACT;EACA;GACE,cAAc;GACd,MAAM;GACN,OAAO;EACT;EACA;GACE,YAAY;GACZ,SAAS,CAAC,WAAW,WAAW;GAChC,OAAO;EACT;EAEA;GACE,YAAY;GACZ,MAAM;GACN,OAAO,EACL,MAAM,UACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EAEA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;GACR;EACF;EACA;GACE,YAAY;GACZ,MAAM;GACN,SAAS,CAAC,WAAW,WAAW;GAChC,OAAO;IACL,MAAM;IACN,MAA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A,aACA,WAAQ,IACR,eAAY,IACZ,cAAW,IACX,gBAAa,IACb,cAAW,IACX,aAAU,IACV,uBAAoB,IACpB,cAAc,GACd,mBAAmB,GACnB,uBACuB;CACvB,IAAM,EAAE,SAAM,OAAO,MAAiB,EAAgB,EAAE,qBAAkB,CAAC,GACrE,IAAe,EAAM,GACrB,IAAc,EAAM,GACtB;CAOJ,OANI,MACF,IAAkB,IAEhB,CAAC,KAAY,KAAS,MACxB,IAAkB,IAAkB,IAAkB,MAAM,IAAc,IAG1E,kBAAC,YAAD;EACE,WAAW,EAAK;EACN;EACV,aAAW;EACX,yBAAuB,IAAU,SAAS;EAC1C,oCAAkC,IAAoB,SAAS;EAC/D,oBAAkB;EAClB,gBAAc,IAAQ,SAAS,KAAA;EAC/B,cAAY;EACZ,mBAAiB;EATnB,UAAA;GAWG,KACC,kBAAC,UAAD;IAAQ,WAAW,EAAa;IAAhC,UAAA,CACG,GACA,KAAY,kBAAC,QAAD,EAAA,UAAM,IAAO,CAAA,CACpB;;GAET;GACD,kBAAC,GAAD;IACc;IACL;IACI;IACG;IACD;IACH;GACX,CAAA;EACO;;AAEd,GC/Ea,IAAgB,EAAG,EAC9B,MAAM,uEACR,CAAC,GACY,IAAiB,EAAG,EAC/B,MAAM,6EACR,CAAC,GAEY,IAAW,EAAG,EACzB,MAAM,qFACR,CAAC,GCXY,IAAe,+GACf,IACX,4JACW,IAA2B,kEAC3B,IAA6B,mGAC7B,IAAgC,qEAChC,IAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonprix-ds/internal-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Internal react components, which really shouldn't be used directly.",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"@radix-ui/react-label": "2.1.15",
|
|
24
24
|
"tailwind-merge": "2.6.1",
|
|
25
25
|
"tailwind-variants": "0.3.1",
|
|
26
|
-
"@bonprix-ds/react-icon": "1.
|
|
26
|
+
"@bonprix-ds/react-icon": "1.2.0",
|
|
27
27
|
"@bonprix-ds/react-spinner": "1.0.4",
|
|
28
|
-
"@bonprix-ds/utils": "0.2.
|
|
28
|
+
"@bonprix-ds/utils": "0.2.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^19.0.0",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"vite": "8.2.2",
|
|
36
36
|
"@types/react": "19.2.18",
|
|
37
|
-
"@vitejs/plugin-react": "6.1.
|
|
37
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
38
38
|
"rollup-preserve-directives": "1.1.3",
|
|
39
|
-
"unplugin-dts": "1.0
|
|
40
|
-
"@microsoft/api-extractor": "7.59.
|
|
39
|
+
"unplugin-dts": "1.1.0",
|
|
40
|
+
"@microsoft/api-extractor": "7.59.1"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [],
|
|
43
43
|
"author": "",
|