@pismo/marola 1.0.0-beta.44 → 1.0.0-beta.46
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/Group-DspH8hyO.js +30 -0
- package/dist/{Toggle-CJvN6vqW.js → Toggle-BbmXeuJd.js} +1 -1
- package/dist/assets/Group.css +1 -1
- package/dist/assets/StepperNavigator.css +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +20 -5
- package/dist/components/StepperNavigator/StepperNavigator.js +94 -35
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +3 -1
- package/dist/components/ToggleGroup/Group.d.ts +2 -0
- package/dist/components/ToggleGroup/Group.js +4 -2
- package/dist/components/ToggleGroup/Toggle.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/dist/Group-B80_u5Q1.js +0 -27
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import './assets/Group.css';
|
|
2
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { c as u } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import { Icon as m } from "./components/Icon/Icon.js";
|
|
6
|
+
import { Typography as c } from "./components/Typography/Typography.js";
|
|
7
|
+
const p = "_toggle__input_hu6m0_1", h = "_toggle__label_hu6m0_11", t = {
|
|
8
|
+
toggle__input: p,
|
|
9
|
+
toggle__label: h,
|
|
10
|
+
"toggle__label--selected": "_toggle__label--selected_hu6m0_21",
|
|
11
|
+
"toggle__label--disabled": "_toggle__label--disabled_hu6m0_21",
|
|
12
|
+
"toggle-group__fieldset": "_toggle-group__fieldset_hu6m0_35",
|
|
13
|
+
"toggle-group__options": "_toggle-group__options_hu6m0_40",
|
|
14
|
+
"toggle-group__options-same-width": "_toggle-group__options-same-width_hu6m0_44",
|
|
15
|
+
"toggle-group__error": "_toggle-group__error_hu6m0_47"
|
|
16
|
+
}, y = n((e, r) => {
|
|
17
|
+
const { children: s, legend: _, error: g, equalWidth: a } = e, d = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, i = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
|
|
18
|
+
return /* @__PURE__ */ l("fieldset", { ref: r, "data-testid": e["data-testid"], className: t["toggle-group__fieldset"], children: [
|
|
19
|
+
_ && /* @__PURE__ */ o("legend", { "data-testid": d, children: _ }),
|
|
20
|
+
/* @__PURE__ */ o("div", { className: u(t["toggle-group__options"], a && t["toggle-group__options-same-width"]), children: s }),
|
|
21
|
+
g && /* @__PURE__ */ l(c, { className: t["toggle-group__error"], "data-testid": i, children: [
|
|
22
|
+
/* @__PURE__ */ o(m, { icon: "circle-exclamation" }),
|
|
23
|
+
g
|
|
24
|
+
] })
|
|
25
|
+
] });
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
y as G,
|
|
29
|
+
t as s
|
|
30
|
+
};
|
|
@@ -13,7 +13,7 @@ import "./components/Select/Select.js";
|
|
|
13
13
|
import "./components/Popover/Popover.js";
|
|
14
14
|
import "./components/Table/Table.js";
|
|
15
15
|
import "./components/Tabs/Tabs.js";
|
|
16
|
-
import { s as y } from "./Group-
|
|
16
|
+
import { s as y } from "./Group-DspH8hyO.js";
|
|
17
17
|
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
18
18
|
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
19
19
|
import { B as x } from "./Button-BAljjMv3.js";
|
package/dist/assets/Group.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toggle__input_hu6m0_1{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;visibility:hidden;opacity:0}._toggle__label_hu6m0_11{position:relative;flex-grow:1;padding:.5rem 1rem;color:var(--gray-90);text-align:center;cursor:pointer;border:solid 1px var(--gray-25);border-radius:6px}._toggle__label_hu6m0_11:hover:not(._toggle__label--selected_hu6m0_21,._toggle__label--disabled_hu6m0_21){border-color:var(--gray-75);opacity:.9}._toggle__label--selected_hu6m0_21{color:var(--accent);border-color:var(--accent)}._toggle__label--disabled_hu6m0_21{color:rgb(var(--black-100-rgb),.25);cursor:default;background-color:rgb(var(--black-100-rgb),.04)}._toggle-group__fieldset_hu6m0_35{padding:0;margin:0;border:none}._toggle-group__options_hu6m0_40{display:flex;gap:.5rem}._toggle-group__options-same-width_hu6m0_44>*{flex:1}._toggle-group__error_hu6m0_47{display:flex;gap:.375rem;align-items:center;margin-top:.3125rem;color:var(--alert)}._toggle-group__error_hu6m0_47 svg{min-width:1rem;min-height:1rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._stepper-
|
|
1
|
+
._stepper-navigator_27f6m_1{display:flex;justify-content:space-between;padding:1rem 0}._stepper-navigator_27f6m_1>span{display:flex;gap:1rem}._cancel-button_27f6m_11{color:var(--accent-alert-light);background-color:transparent}._cancel-button_27f6m_11:hover:not(:disabled){color:rgba(var(--alert-dark-rgb),.75);background-color:var(--gray-5)}._previous-button_27f6m_20{color:var(--gray-75);background-color:transparent;border:solid 1px var(--gray-75)}._previous-button_27f6m_20:disabled{border-color:transparent}._previous-button_27f6m_20:hover:not(:disabled){color:rgba(var(--gray-75-rgb),.75);background-color:var(--gray-5);border-color:rgba(var(--gray-75),.75)}._previous-button_27f6m_20,._cancel-button_27f6m_11{min-width:6.25rem}._next-button_27f6m_39,._finish-button_27f6m_40{min-width:15rem}._previous-button_27f6m_20,._cancel-button_27f6m_11,._next-button_27f6m_39,._finish-button_27f6m_40{display:flex;gap:.25rem;align-items:center;justify-content:space-between;padding:0 1rem;font-size:.875rem}._previous-button_27f6m_20>*,._cancel-button_27f6m_11>*,._next-button_27f6m_39>*,._finish-button_27f6m_40>*{display:inline-flex;flex:1;align-items:center;justify-content:center}._previous-button_27f6m_20>*:nth-child(1),._cancel-button_27f6m_11>*:nth-child(1),._next-button_27f6m_39>*:nth-child(1),._finish-button_27f6m_40>*:nth-child(1){justify-content:flex-start}._previous-button_27f6m_20>*:nth-child(3),._cancel-button_27f6m_11>*:nth-child(3),._next-button_27f6m_39>*:nth-child(3),._finish-button_27f6m_40>*:nth-child(3){justify-content:flex-end}
|
|
@@ -6,7 +6,7 @@ import "../Icon/Icon.js";
|
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Input/Input.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
9
|
-
import { C as n } from "../../Toggle-
|
|
9
|
+
import { C as n } from "../../Toggle-BbmXeuJd.js";
|
|
10
10
|
import "../Dialog/Dialog.js";
|
|
11
11
|
import "../IconButton/IconButton.js";
|
|
12
12
|
import "../Select/Select.js";
|
|
@@ -14,7 +14,7 @@ import "../Popover/Popover.js";
|
|
|
14
14
|
import "../Skeleton/Skeleton.js";
|
|
15
15
|
import "../Table/Table.js";
|
|
16
16
|
import "../Tabs/Tabs.js";
|
|
17
|
-
import "../../Group-
|
|
17
|
+
import "../../Group-DspH8hyO.js";
|
|
18
18
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
19
19
|
import "../../Button-BAljjMv3.js";
|
|
20
20
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../assets/ResultWithChips.css';
|
|
2
2
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { C as t } from "../../Toggle-
|
|
3
|
+
import { C as t } from "../../Toggle-BbmXeuJd.js";
|
|
4
4
|
const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
|
|
5
5
|
container: r,
|
|
6
6
|
"chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
|
|
@@ -6,14 +6,14 @@ import "../Icon/Icon.js";
|
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Input/Input.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
9
|
-
import { R as c, R as g } from "../../Toggle-
|
|
9
|
+
import { R as c, R as g } from "../../Toggle-BbmXeuJd.js";
|
|
10
10
|
import "../Dialog/Dialog.js";
|
|
11
11
|
import "../IconButton/IconButton.js";
|
|
12
12
|
import "../Select/Select.js";
|
|
13
13
|
import "../Popover/Popover.js";
|
|
14
14
|
import "../Table/Table.js";
|
|
15
15
|
import "../Tabs/Tabs.js";
|
|
16
|
-
import "../../Group-
|
|
16
|
+
import "../../Group-DspH8hyO.js";
|
|
17
17
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
18
18
|
export {
|
|
19
19
|
c as RowItem,
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type StepperNavigatorLang = 'en' | 'pt';
|
|
3
|
+
export type StepperNavigatorButtonProps = {
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
rightIcon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
};
|
|
2
9
|
export type StepperNavigatorProps = {
|
|
3
10
|
/** Hides the "previous" button */
|
|
4
11
|
hidePrevious?: boolean;
|
|
@@ -26,6 +33,18 @@ export type StepperNavigatorProps = {
|
|
|
26
33
|
labelFinish?: string;
|
|
27
34
|
/** Language to be used for the button labels. Default "en" */
|
|
28
35
|
lang?: StepperNavigatorLang;
|
|
36
|
+
/** CSS classes to be applied on the container element */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
39
|
+
'data-testid'?: string;
|
|
40
|
+
/** Previous button props */
|
|
41
|
+
previousButtonProps?: StepperNavigatorButtonProps;
|
|
42
|
+
/** Cancel button props */
|
|
43
|
+
cancelButtonProps?: StepperNavigatorButtonProps;
|
|
44
|
+
/** Next button props */
|
|
45
|
+
nextButtonProps?: StepperNavigatorButtonProps;
|
|
46
|
+
/** Finish button props */
|
|
47
|
+
finishButtonProps?: StepperNavigatorButtonProps;
|
|
29
48
|
/** Callback to be called when the "previous" button is clicked */
|
|
30
49
|
onPrevious?: () => void;
|
|
31
50
|
/** Callback to be called when the "cancel" button is clicked */
|
|
@@ -34,10 +53,6 @@ export type StepperNavigatorProps = {
|
|
|
34
53
|
onNext?: () => void;
|
|
35
54
|
/** Callback to be called when the "finish" button is clicked */
|
|
36
55
|
onFinish?: () => void;
|
|
37
|
-
/** CSS classes to be applied on the container element */
|
|
38
|
-
className?: string;
|
|
39
|
-
/** Id to be applied as `data-testid` on the container element */
|
|
40
|
-
'data-testid'?: string;
|
|
41
56
|
};
|
|
42
|
-
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
58
|
export {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import '../../assets/StepperNavigator.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Button as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
2
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as i } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Button as I } from "../Button/Button.js";
|
|
5
|
+
import { Icon as K } from "../Icon/Icon.js";
|
|
6
|
+
const _ = {
|
|
7
|
+
"stepper-navigator": "_stepper-navigator_27f6m_1",
|
|
8
|
+
"cancel-button": "_cancel-button_27f6m_11",
|
|
9
|
+
"previous-button": "_previous-button_27f6m_20",
|
|
10
|
+
"next-button": "_next-button_27f6m_39",
|
|
11
|
+
"finish-button": "_finish-button_27f6m_40"
|
|
12
|
+
}, b = {
|
|
10
13
|
en: {
|
|
11
14
|
previous: "Previous",
|
|
12
15
|
cancel: "Cancel",
|
|
@@ -19,38 +22,94 @@ const c = {
|
|
|
19
22
|
next: "Próximo",
|
|
20
23
|
finish: "Finalizar"
|
|
21
24
|
}
|
|
22
|
-
},
|
|
23
|
-
hideNext:
|
|
24
|
-
hidePrevious:
|
|
25
|
-
hideCancel:
|
|
26
|
-
hideFinish:
|
|
27
|
-
disableNext:
|
|
28
|
-
disablePrevious:
|
|
29
|
-
disableCancel:
|
|
30
|
-
disableFinish:
|
|
31
|
-
lang:
|
|
32
|
-
labelNext:
|
|
33
|
-
labelPrevious:
|
|
34
|
-
labelCancel:
|
|
35
|
-
labelFinish:
|
|
36
|
-
className:
|
|
37
|
-
"data-testid":
|
|
38
|
-
|
|
25
|
+
}, R = ({
|
|
26
|
+
hideNext: C = !1,
|
|
27
|
+
hidePrevious: j = !1,
|
|
28
|
+
hideCancel: z = !1,
|
|
29
|
+
hideFinish: w = !1,
|
|
30
|
+
disableNext: y = !1,
|
|
31
|
+
disablePrevious: A = !1,
|
|
32
|
+
disableCancel: S = !1,
|
|
33
|
+
disableFinish: q = !1,
|
|
34
|
+
lang: h = "en",
|
|
35
|
+
labelNext: N,
|
|
36
|
+
labelPrevious: f,
|
|
37
|
+
labelCancel: g,
|
|
38
|
+
labelFinish: k,
|
|
39
|
+
className: D,
|
|
40
|
+
"data-testid": E = "stepper-navigator",
|
|
41
|
+
previousButtonProps: d,
|
|
42
|
+
cancelButtonProps: c,
|
|
43
|
+
nextButtonProps: e = { rightIcon: /* @__PURE__ */ a(K, { icon: "circle-arrow-right", size: 24 }) },
|
|
44
|
+
finishButtonProps: m,
|
|
45
|
+
onNext: F = () => {
|
|
39
46
|
},
|
|
40
|
-
onPrevious:
|
|
47
|
+
onPrevious: G = () => {
|
|
41
48
|
},
|
|
42
|
-
onCancel:
|
|
49
|
+
onCancel: H = () => {
|
|
43
50
|
},
|
|
44
|
-
onFinish:
|
|
51
|
+
onFinish: J = () => {
|
|
45
52
|
}
|
|
46
|
-
}) => (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
}) => (g = g || b[h].cancel, f = f || b[h].previous, N = N || b[h].next, k = k || b[h].finish, /* @__PURE__ */ l("div", { className: i(_["stepper-navigator"], D), "data-testid": E, children: [
|
|
54
|
+
j ? /* @__PURE__ */ a("span", {}) : /* @__PURE__ */ l(
|
|
55
|
+
I,
|
|
56
|
+
{
|
|
57
|
+
className: i(_["previous-button"], d == null ? void 0 : d.className),
|
|
58
|
+
"data-testid": d == null ? void 0 : d["data-testid"],
|
|
59
|
+
disabled: A,
|
|
60
|
+
onClick: G,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.leftIcon }),
|
|
63
|
+
/* @__PURE__ */ a("span", { children: f }),
|
|
64
|
+
/* @__PURE__ */ a("span", { children: d == null ? void 0 : d.rightIcon })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ l("span", { children: [
|
|
69
|
+
!z && /* @__PURE__ */ l(
|
|
70
|
+
I,
|
|
71
|
+
{
|
|
72
|
+
className: i(_["cancel-button"], c == null ? void 0 : c.className),
|
|
73
|
+
"data-testid": c == null ? void 0 : c["data-testid"],
|
|
74
|
+
disabled: S,
|
|
75
|
+
onClick: H,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.leftIcon }),
|
|
78
|
+
/* @__PURE__ */ a("span", { children: g }),
|
|
79
|
+
/* @__PURE__ */ a("span", { children: c == null ? void 0 : c.rightIcon })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
!C && /* @__PURE__ */ l(
|
|
84
|
+
I,
|
|
85
|
+
{
|
|
86
|
+
className: i(_["next-button"], e == null ? void 0 : e.className),
|
|
87
|
+
"data-testid": e == null ? void 0 : e["data-testid"],
|
|
88
|
+
disabled: y,
|
|
89
|
+
onClick: F,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.leftIcon }),
|
|
92
|
+
/* @__PURE__ */ a("span", { children: N }),
|
|
93
|
+
/* @__PURE__ */ a("span", { children: e == null ? void 0 : e.rightIcon })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
!w && /* @__PURE__ */ l(
|
|
98
|
+
I,
|
|
99
|
+
{
|
|
100
|
+
className: i(_["finish-button"], m == null ? void 0 : m.className),
|
|
101
|
+
"data-testid": m == null ? void 0 : m["data-testid"],
|
|
102
|
+
disabled: q,
|
|
103
|
+
onClick: J,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.leftIcon }),
|
|
106
|
+
/* @__PURE__ */ a("span", { children: k }),
|
|
107
|
+
/* @__PURE__ */ a("span", { children: m == null ? void 0 : m.rightIcon })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
52
111
|
] })
|
|
53
112
|
] }));
|
|
54
113
|
export {
|
|
55
|
-
|
|
114
|
+
R as StepperNavigator
|
|
56
115
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
|
@@ -14,3 +14,5 @@ export declare const Simple: Story;
|
|
|
14
14
|
export declare const WithCustomLanguage: Story;
|
|
15
15
|
export declare const WithCustomLabels: Story;
|
|
16
16
|
export declare const Disabled: Story;
|
|
17
|
+
export declare const WithIcons: Story;
|
|
18
|
+
export declare const DefaultWithNoIcons: Story;
|
|
@@ -13,6 +13,8 @@ export type ToggleGroupProps = {
|
|
|
13
13
|
* error and legend append their names e.g. {data-testid}-error and {data-testid}-legend
|
|
14
14
|
* */
|
|
15
15
|
'data-testid'?: string;
|
|
16
|
+
/** Controls if children items should have same width */
|
|
17
|
+
equalWidth?: boolean;
|
|
16
18
|
};
|
|
17
19
|
declare const Group: import('react').ForwardRefExoticComponent<ToggleGroupProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
18
20
|
export default Group;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
+
import "../../clsx-DB4S2d7J.js";
|
|
3
4
|
import "../Icon/Icon.js";
|
|
4
|
-
import
|
|
5
|
+
import "../Typography/Typography.js";
|
|
6
|
+
import { G as e } from "../../Group-DspH8hyO.js";
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
e as default
|
|
7
9
|
};
|
|
@@ -10,6 +10,7 @@ export type ToggleGroupItemProps<T extends string | number> = {
|
|
|
10
10
|
onChange: (value: T | '') => void;
|
|
11
11
|
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the label */
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
+
/** Controls if component should be disabled */
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
};
|
|
15
16
|
declare const Toggle: import('react').ForwardRefExoticComponent<ToggleGroupItemProps<string | number> & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -5,14 +5,14 @@ import "../Icon/Icon.js";
|
|
|
5
5
|
import "../Typography/Typography.js";
|
|
6
6
|
import "../Input/Input.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
|
-
import { T as g } from "../../Toggle-
|
|
8
|
+
import { T as g } from "../../Toggle-BbmXeuJd.js";
|
|
9
9
|
import "../Dialog/Dialog.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
12
12
|
import "../Popover/Popover.js";
|
|
13
13
|
import "../Table/Table.js";
|
|
14
14
|
import "../Tabs/Tabs.js";
|
|
15
|
-
import "../../Group-
|
|
15
|
+
import "../../Group-DspH8hyO.js";
|
|
16
16
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
17
17
|
export {
|
|
18
18
|
g as default
|
|
@@ -11,6 +11,7 @@ declare const meta: {
|
|
|
11
11
|
error?: import('react').ReactNode;
|
|
12
12
|
children: import('react').ReactElement<import('./Toggle.tsx').ToggleGroupItemProps<string | number>, string | import('react').JSXElementConstructor<any>>[];
|
|
13
13
|
'data-testid'?: string | undefined;
|
|
14
|
+
equalWidth?: boolean | undefined;
|
|
14
15
|
ref?: import('react').LegacyRef<HTMLFieldSetElement> | undefined;
|
|
15
16
|
key?: import('react').Key | null | undefined;
|
|
16
17
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -23,3 +24,4 @@ type Story = StoryObj<typeof meta>;
|
|
|
23
24
|
export declare const Simple: Story;
|
|
24
25
|
export declare const NoLegend: Story;
|
|
25
26
|
export declare const WithError: Story;
|
|
27
|
+
export declare const ItemsWithEqualWidth: Story;
|
package/dist/main.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Advice as p } from "./components/Advice/Advice.js";
|
|
|
3
3
|
import { Autocomplete as f } from "./components/Autocomplete/Autocomplete.js";
|
|
4
4
|
import { Button as x } from "./components/Button/Button.js";
|
|
5
5
|
import { Checkbox as l } from "./components/Checkbox/Checkbox.js";
|
|
6
|
-
import { C as T, R as s, T as c } from "./Toggle-
|
|
6
|
+
import { C as T, R as s, T as c } from "./Toggle-BbmXeuJd.js";
|
|
7
7
|
import { Dialog as u } from "./components/Dialog/Dialog.js";
|
|
8
8
|
import { EllipsisTooltip as d } from "./components/EllipsisTooltip/EllipsisTooltip.js";
|
|
9
9
|
import { Icon as k } from "./components/Icon/Icon.js";
|
|
@@ -25,7 +25,7 @@ import { TBody as ro, THead as eo, Table as to, Td as po, Th as ao, Tr as fo } f
|
|
|
25
25
|
import { Tabs as xo } from "./components/Tabs/Tabs.js";
|
|
26
26
|
import { TextDisplay as lo } from "./components/TextDisplay/TextDisplay.js";
|
|
27
27
|
import { Toggle as To } from "./components/Toggle/Toggle.js";
|
|
28
|
-
import { G as co } from "./Group-
|
|
28
|
+
import { G as co } from "./Group-DspH8hyO.js";
|
|
29
29
|
import { Tooltip as uo } from "./components/Tooltip/Tooltip.js";
|
|
30
30
|
import { Text as bo, Typography as ko } from "./components/Typography/Typography.js";
|
|
31
31
|
import { SnackbarContext as Co, SnackbarProvider as Io, useSnackbar as Do } from "./contexts/SnackbarProvider/SnackbarProvider.js";
|
package/package.json
CHANGED
package/dist/Group-B80_u5Q1.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import './assets/Group.css';
|
|
2
|
-
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as i } from "react";
|
|
4
|
-
import { Icon as n } from "./components/Icon/Icon.js";
|
|
5
|
-
const c = "_toggle__input_f3ebk_1", b = "_toggle__label_f3ebk_11", _ = {
|
|
6
|
-
toggle__input: c,
|
|
7
|
-
toggle__label: b,
|
|
8
|
-
"toggle__label--selected": "_toggle__label--selected_f3ebk_20",
|
|
9
|
-
"toggle__label--disabled": "_toggle__label--disabled_f3ebk_24",
|
|
10
|
-
"toggle-group__fieldset": "_toggle-group__fieldset_f3ebk_30",
|
|
11
|
-
"toggle-group__options": "_toggle-group__options_f3ebk_35",
|
|
12
|
-
"toggle-group__error": "_toggle-group__error_f3ebk_39"
|
|
13
|
-
}, p = i((e, r) => {
|
|
14
|
-
const { children: d, legend: o, error: l } = e, a = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, s = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
|
|
15
|
-
return /* @__PURE__ */ g("fieldset", { ref: r, "data-testid": e["data-testid"], className: _["toggle-group__fieldset"], children: [
|
|
16
|
-
o && /* @__PURE__ */ t("legend", { "data-testid": a, children: o }),
|
|
17
|
-
/* @__PURE__ */ t("div", { className: _["toggle-group__options"], children: d }),
|
|
18
|
-
l && /* @__PURE__ */ g("div", { className: _["toggle-group__error"], "data-testid": s, children: [
|
|
19
|
-
/* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
|
|
20
|
-
l
|
|
21
|
-
] })
|
|
22
|
-
] });
|
|
23
|
-
});
|
|
24
|
-
export {
|
|
25
|
-
p as G,
|
|
26
|
-
_ as s
|
|
27
|
-
};
|