@pismo/marola 1.0.0-beta.44 → 1.0.0-beta.45
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/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/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}
|
|
@@ -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,
|
|
@@ -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
|
-
};
|