@pismo/marola 2.1.3 → 2.1.5

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.
@@ -44,7 +44,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
44
44
  "chip__remove--disabled": "_chip__remove--disabled_1wvod_133",
45
45
  "chip-loading": "_chip-loading_1wvod_137"
46
46
  }, S = u((t, d) => {
47
- const { children: _, onClickContent: o, disabled: r, className: a, variant: s } = t;
47
+ const { children: p, onClickContent: o, disabled: r, className: a, variant: s } = t;
48
48
  let e = l(
49
49
  n.chip,
50
50
  { [n["chip--outlined"]]: s === "outlined" },
@@ -59,12 +59,12 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
59
59
  "data-testid": t["data-testid"],
60
60
  ref: d,
61
61
  className: e,
62
- children: _
62
+ children: p
63
63
  }
64
- )) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: d, className: e, children: _ });
64
+ )) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: d, className: e, children: p });
65
65
  }), Y = u((t, d) => {
66
66
  const {
67
- label: _,
67
+ label: p,
68
68
  className: o,
69
69
  onClickContent: r,
70
70
  leftAdornment: a,
@@ -93,7 +93,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
93
93
  variant: g,
94
94
  children: [
95
95
  a && /* @__PURE__ */ i(v, { ...w }),
96
- _,
96
+ p,
97
97
  m && /* @__PURE__ */ i(
98
98
  "span",
99
99
  {
@@ -101,8 +101,8 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
101
101
  role: "button",
102
102
  tabIndex: e ? -1 : 0,
103
103
  "aria-label": "remove",
104
- onClick: (p) => {
105
- p == null || p.stopPropagation(), p == null || p.nativeEvent.stopImmediatePropagation(), m();
104
+ onClick: (_) => {
105
+ _ == null || _.stopPropagation(), _ == null || _.nativeEvent.stopImmediatePropagation(), m();
106
106
  },
107
107
  "aria-disabled": e,
108
108
  children: /* @__PURE__ */ i(C, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
@@ -117,14 +117,14 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
117
117
  "row-item--disabled": "_row-item--disabled_8z1a0_19",
118
118
  "row-item__content": "_row-item__content_8z1a0_22"
119
119
  }, Z = u((t, d) => {
120
- const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons: s, ariaLabel: e, className: g } = t, m = l(o == null ? void 0 : o.className, h["row-item__adornment"]), w = {
120
+ const { children: p, leftAdornment: o, disabled: r, onClick: a, buttons: s, ariaLabel: e, className: g } = t, m = l(o == null ? void 0 : o.className, h["row-item__adornment"]), w = {
121
121
  onClick: (c) => {
122
122
  r || a && a(c);
123
123
  },
124
124
  tabIndex: 0,
125
125
  "aria-label": e,
126
126
  role: "button"
127
- }, p = o != null && o.customIcon ? o : { size: "1rem", ...o };
127
+ }, _ = o != null && o.customIcon ? o : { size: "1rem", ...o };
128
128
  return /* @__PURE__ */ k(
129
129
  "div",
130
130
  {
@@ -138,8 +138,8 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
138
138
  ...!!a && w,
139
139
  ref: d,
140
140
  children: [
141
- o && /* @__PURE__ */ i(v, { ...p, className: m, disabled: r }),
142
- /* @__PURE__ */ i("span", { className: l(h["row-item__content"]), children: _ }),
141
+ o && /* @__PURE__ */ i(v, { ..._, className: m, disabled: r }),
142
+ /* @__PURE__ */ i("span", { className: l(h["row-item__content"]), children: p }),
143
143
  s && /* @__PURE__ */ i(
144
144
  "div",
145
145
  {
@@ -153,7 +153,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
153
153
  }
154
154
  );
155
155
  }), A = u((t, d) => {
156
- const { text: _, isSelected: o = !1, value: r, onChange: a, disabled: s } = t;
156
+ const { text: p, isSelected: o = !1, value: r, onChange: a, disabled: s, type: e } = t;
157
157
  return /* @__PURE__ */ k(
158
158
  "label",
159
159
  {
@@ -168,17 +168,17 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
168
168
  "input",
169
169
  {
170
170
  className: l([y.toggle__input]),
171
- type: "radio",
171
+ type: e ?? "radio",
172
172
  ref: d,
173
173
  value: r.toString(),
174
174
  onChange: () => a(r),
175
- role: "radio",
175
+ role: e ?? "radio",
176
176
  checked: o,
177
177
  "aria-checked": o,
178
178
  disabled: s
179
179
  }
180
180
  ),
181
- /* @__PURE__ */ i(N, { bold: !0, children: _ })
181
+ /* @__PURE__ */ i(N, { bold: !0, children: p })
182
182
  ]
183
183
  }
184
184
  );
@@ -1 +1 @@
1
- ._container_1zn5j_1{width:100%;height:56px;border-top:1px solid var(--border-secondary)}._container-grid_1zn5j_6{display:grid;grid-template-columns:1fr 2fr .5fr 4fr 2fr 2fr;align-items:center;justify-content:space-between;padding:12px 16px}._container-pending_1zn5j_13{display:flex;align-items:center;justify-content:flex-start;padding:12px 16px}._container-pending--right_1zn5j_19{margin-left:auto}._container_1zn5j_1 :hover{background-color:var(--border-secondary)}._info-section_1zn5j_26{display:flex}._info-section--item_1zn5j_29{padding-left:8px}._info-section--item_1zn5j_29:not(:first-child){margin-left:8px;border-left:1px solid var(--border-secondary)}._info-section--right_1zn5j_36{display:flex;justify-content:flex-end}
1
+ ._container_1apn3_1{width:100%;height:56px;border-top:1px solid var(--border-secondary)}._container-grid_1apn3_6{display:grid;grid-template-columns:1fr 2fr .5fr 4fr 2fr 2fr;align-items:center;justify-content:space-between;padding:12px 16px}._container-pending_1apn3_13{display:flex;align-items:center;justify-content:flex-start;padding:12px 16px}._container-pending--right_1apn3_19{margin-left:auto}._container_1apn3_1 :hover{cursor:pointer;background-color:var(--border-secondary)}._info-section_1apn3_27{display:flex}._info-section--item_1apn3_30{padding-left:8px}._info-section--item_1apn3_30:not(:first-child){margin-left:8px;border-left:1px solid var(--border-secondary)}._info-section--right_1apn3_37{display:flex;justify-content:flex-end}
@@ -7,7 +7,7 @@ import "../Typography/Typography.js";
7
7
  import "../Input/Input.js";
8
8
  import "../Avatar/Avatar.js";
9
9
  import "../Button/Button.js";
10
- import { C as v } from "../../Toggle-Dp20f7qn.js";
10
+ import { C as v } from "../../Toggle-C-6aiSvn.js";
11
11
  import "../Dialog/Dialog.js";
12
12
  import "../DatePicker/DatePicker.js";
13
13
  import "../Skeleton/Skeleton.js";
@@ -7,7 +7,7 @@ import { Typography as Me } from "../Typography/Typography.js";
7
7
  import "../Input/Input.js";
8
8
  import "../Avatar/Avatar.js";
9
9
  import "../Button/Button.js";
10
- import "../../Toggle-Dp20f7qn.js";
10
+ import "../../Toggle-C-6aiSvn.js";
11
11
  import "../Dialog/Dialog.js";
12
12
  import "../DatePicker/DatePicker.js";
13
13
  import "../IconButton/IconButton.js";
@@ -6,7 +6,7 @@ import * as a from "react";
6
6
  import "../Input/Input.js";
7
7
  import "../Avatar/Avatar.js";
8
8
  import "../Button/Button.js";
9
- import "../../Toggle-Dp20f7qn.js";
9
+ import "../../Toggle-C-6aiSvn.js";
10
10
  import "../Dialog/Dialog.js";
11
11
  import "../DatePicker/DatePicker.js";
12
12
  import "../IconButton/IconButton.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { C as t } from "../../Toggle-Dp20f7qn.js";
2
+ import { C as t } from "../../Toggle-C-6aiSvn.js";
3
3
  import '../../assets/ResultWithChips.css';const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
4
4
  container: r,
5
5
  "chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
@@ -7,7 +7,7 @@ import "../Typography/Typography.js";
7
7
  import "../Input/Input.js";
8
8
  import "../Avatar/Avatar.js";
9
9
  import "../Button/Button.js";
10
- import { R as j, R as k } from "../../Toggle-Dp20f7qn.js";
10
+ import { R as j, R as k } from "../../Toggle-C-6aiSvn.js";
11
11
  import "../Dialog/Dialog.js";
12
12
  import "../DatePicker/DatePicker.js";
13
13
  import "../IconButton/IconButton.js";
@@ -12,6 +12,8 @@ export type ToggleGroupItemProps<T extends string | number> = {
12
12
  'data-testid'?: string;
13
13
  /** Controls if component should be disabled */
14
14
  disabled?: boolean;
15
+ /** Set type radio or checkbox */
16
+ type?: 'radio' | 'checkbox';
15
17
  };
16
18
  declare const Toggle: import('react').ForwardRefExoticComponent<ToggleGroupItemProps<string | number> & import('react').RefAttributes<HTMLInputElement>>;
17
19
  export default Toggle;
@@ -6,7 +6,7 @@ import "../Typography/Typography.js";
6
6
  import "../Input/Input.js";
7
7
  import "../Avatar/Avatar.js";
8
8
  import "../Button/Button.js";
9
- import { T as k } from "../../Toggle-Dp20f7qn.js";
9
+ import { T as k } from "../../Toggle-C-6aiSvn.js";
10
10
  import "../Dialog/Dialog.js";
11
11
  import "../DatePicker/DatePicker.js";
12
12
  import "../IconButton/IconButton.js";
@@ -1,4 +1,4 @@
1
- import { T as e } from "../../Toggle-Dp20f7qn.js";
1
+ import { T as e } from "../../Toggle-C-6aiSvn.js";
2
2
  import { G as p } from "../../Group-DJz1rK2n.js";
3
3
  export {
4
4
  p as ToggleGroup,
@@ -3,6 +3,7 @@ type TransactionRowProps = {
3
3
  dateTime?: React.ReactNode;
4
4
  month?: React.ReactNode;
5
5
  category?: React.ReactNode;
6
+ categoryType?: React.ReactNode;
6
7
  name: React.ReactNode;
7
8
  type?: React.ReactNode;
8
9
  icon?: IconName;
@@ -10,6 +11,8 @@ type TransactionRowProps = {
10
11
  installments?: React.ReactNode;
11
12
  onClick?: () => void;
12
13
  isPendingTransaction?: boolean;
14
+ isLoading?: boolean;
15
+ 'data-testid'?: string;
13
16
  };
14
- export declare const TransactionRow: ({ dateTime, category, name, type, installments, amount, month, icon, onClick, isPendingTransaction, }: TransactionRowProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const TransactionRow: ({ dateTime, category, categoryType, name, type, installments, amount, month, icon, onClick, isPendingTransaction, isLoading, "data-testid": dataTestId, }: TransactionRowProps) => import("react/jsx-runtime").JSX.Element;
15
18
  export {};
@@ -1,43 +1,48 @@
1
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { Avatar as l } from "../Avatar/Avatar.js";
3
- import { Icon as h } from "../Icon/Icon.js";
4
- import { Typography as r } from "../Typography/Typography.js";
5
- import '../../assets/TransactionRow.css';const f = "_container_1zn5j_1", n = {
6
- container: f,
7
- "container-grid": "_container-grid_1zn5j_6",
8
- "container-pending": "_container-pending_1zn5j_13",
9
- "container-pending--right": "_container-pending--right_1zn5j_19",
10
- "info-section": "_info-section_1zn5j_26",
11
- "info-section--item": "_info-section--item_1zn5j_29",
12
- "info-section--right": "_info-section--right_1zn5j_36"
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { Avatar as p } from "../Avatar/Avatar.js";
3
+ import { Icon as y } from "../Icon/Icon.js";
4
+ import { SkeletonCircle as f, Skeleton as r } from "../Skeleton/Skeleton.js";
5
+ import { Typography as a } from "../Typography/Typography.js";
6
+ import '../../assets/TransactionRow.css';const $ = "_container_1apn3_1", i = {
7
+ container: $,
8
+ "container-grid": "_container-grid_1apn3_6",
9
+ "container-pending": "_container-pending_1apn3_13",
10
+ "container-pending--right": "_container-pending--right_1apn3_19",
11
+ "info-section": "_info-section_1apn3_27",
12
+ "info-section--item": "_info-section--item_1apn3_30",
13
+ "info-section--right": "_info-section--right_1apn3_37"
13
14
  }, j = ({
14
- dateTime: v,
15
- category: c,
16
- name: o,
17
- type: m,
18
- installments: t,
19
- amount: s,
15
+ dateTime: _,
16
+ category: s,
17
+ categoryType: l,
18
+ name: d,
19
+ type: N,
20
+ installments: h,
21
+ amount: v,
20
22
  month: g,
21
- icon: d,
22
- onClick: e,
23
- isPendingTransaction: _
24
- }) => _ ? /* @__PURE__ */ i("div", { className: n.container, children: /* @__PURE__ */ a("div", { className: n["container-pending"], onClick: () => e == null ? void 0 : e(), children: [
25
- /* @__PURE__ */ i(l, { type: "icon", children: /* @__PURE__ */ i(h, { icon: d || "clock" }) }),
26
- /* @__PURE__ */ i("div", { className: n["info-section"], children: /* @__PURE__ */ i("div", { className: n["info-section--item"], children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: o }) }) }),
27
- /* @__PURE__ */ i("div", { className: n["container-pending--right"], children: /* @__PURE__ */ i(r, { bold: !0, color: "var(--gray-95)", variant: "base", children: s }) })
28
- ] }) }) : /* @__PURE__ */ i("div", { className: n.container, children: /* @__PURE__ */ a("div", { onClick: () => e == null ? void 0 : e(), className: n["container-grid"], children: [
29
- /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: g }) }),
30
- /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: v }) }),
31
- /* @__PURE__ */ i(l, { type: "icon", children: /* @__PURE__ */ i(h, { icon: d || "coin" }) }),
32
- /* @__PURE__ */ a("div", { className: n["info-section"], children: [
33
- /* @__PURE__ */ i("div", { className: n["info-section--item"], children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: o }) }),
34
- c && /* @__PURE__ */ i("div", { className: n["info-section--item"], children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: c }) })
23
+ icon: m,
24
+ onClick: o,
25
+ isPendingTransaction: b,
26
+ isLoading: n = !1,
27
+ "data-testid": t = "Description"
28
+ }) => b ? /* @__PURE__ */ e("div", { className: i.container, children: /* @__PURE__ */ c("div", { className: i["container-pending"], onClick: () => o == null ? void 0 : o(), children: [
29
+ n ? /* @__PURE__ */ e(f, { size: "32px", "data-testid": `${t}-skeletonIcon` }) : /* @__PURE__ */ e(p, { type: "icon", children: /* @__PURE__ */ e(y, { icon: m || "clock" }) }),
30
+ /* @__PURE__ */ e("div", { className: i["info-section"], children: /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 140 }, "data-testid": `${t}-skeletonName` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: d }) }) }),
31
+ /* @__PURE__ */ e("div", { className: i["container-pending--right"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonAmount` }) : /* @__PURE__ */ e(a, { bold: !0, color: "var(--gray-95)", variant: "base", children: v }) })
32
+ ] }) }) : /* @__PURE__ */ e("div", { className: i.container, children: /* @__PURE__ */ c("div", { onClick: () => o == null ? void 0 : o(), className: i["container-grid"], children: [
33
+ /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(r, { style: { width: 50 }, "data-testid": `${t}-skeletonMonth` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: g }) }),
34
+ /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(r, { style: { width: 90 }, "data-testid": `${t}-skeletonDate` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: _ }) }),
35
+ n ? /* @__PURE__ */ e(f, { size: "32px", "data-testid": `${t}-skeletonIcon` }) : /* @__PURE__ */ e(p, { type: "icon", children: /* @__PURE__ */ e(y, { icon: m || "coin" }) }),
36
+ /* @__PURE__ */ c("div", { className: i["info-section"], children: [
37
+ /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonName` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: d }) }),
38
+ s && /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonCategory` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: s }) }),
39
+ l && /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonCategoryType` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: l }) })
35
40
  ] }),
36
- /* @__PURE__ */ a("div", { className: n["info-section--right"], children: [
37
- t && /* @__PURE__ */ i("div", { className: n["info-section--item"], children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: t }) }),
38
- /* @__PURE__ */ i("div", { className: n["info-section--item"], children: /* @__PURE__ */ i(r, { color: "var(--gray-95)", variant: "base", children: m }) })
41
+ /* @__PURE__ */ c("div", { className: i["info-section--right"], children: [
42
+ h && /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonInstallments` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: h }) }),
43
+ /* @__PURE__ */ e("div", { className: i["info-section--item"], children: n ? /* @__PURE__ */ e(r, { style: { width: 70 }, "data-testid": `${t}-skeletonType` }) : /* @__PURE__ */ e(a, { color: "var(--gray-95)", variant: "base", children: N }) })
39
44
  ] }),
40
- /* @__PURE__ */ i("div", { className: n["info-section--right"], children: /* @__PURE__ */ i(r, { bold: !0, variant: "base", children: s }) })
45
+ /* @__PURE__ */ e("div", { className: i["info-section--right"], children: n ? /* @__PURE__ */ e(r, { style: { width: 140 }, "data-testid": `${t}-skeletonAmount` }) : /* @__PURE__ */ e(a, { bold: !0, variant: "base", children: v }) })
41
46
  ] }) });
42
47
  export {
43
48
  j as TransactionRow
@@ -1,10 +1,11 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ dateTime, category, name, type, installments, amount, month, icon, onClick, isPendingTransaction, }: {
4
+ component: ({ dateTime, category, categoryType, name, type, installments, amount, month, icon, onClick, isPendingTransaction, isLoading, "data-testid": dataTestId, }: {
5
5
  dateTime?: import('react').ReactNode;
6
6
  month?: import('react').ReactNode;
7
7
  category?: import('react').ReactNode;
8
+ categoryType?: import('react').ReactNode;
8
9
  name: import('react').ReactNode;
9
10
  type?: import('react').ReactNode;
10
11
  icon?: import('../Icon/types').IconName | undefined;
@@ -12,6 +13,8 @@ declare const meta: {
12
13
  installments?: import('react').ReactNode;
13
14
  onClick?: (() => void) | undefined;
14
15
  isPendingTransaction?: boolean | undefined;
16
+ isLoading?: boolean | undefined;
17
+ 'data-testid'?: string | undefined;
15
18
  }) => import("react/jsx-runtime").JSX.Element;
16
19
  tags: string[];
17
20
  parameters: {
@@ -23,7 +26,10 @@ type Story = StoryObj<typeof meta>;
23
26
  export declare const Simple: Story;
24
27
  export declare const WithMonth: Story;
25
28
  export declare const WithInstallments: Story;
29
+ export declare const WithCategoryType: Story;
30
+ export declare const Loading: Story;
26
31
  export declare const WithoutCategory: Story;
27
32
  export declare const WithTwoCurrencies: Story;
28
33
  export declare const WithLargeAmount: Story;
29
34
  export declare const IsPending: Story;
35
+ export declare const IsPendingLoading: Story;
package/dist/main.js CHANGED
@@ -8,7 +8,7 @@ import { BankCard as g } from "./components/BankCard/BankCard.js";
8
8
  import { Button as u } from "./components/Button/Button.js";
9
9
  import { Calendar as C } from "./components/Calendar/Calendar.js";
10
10
  import { Checkbox as k } from "./components/Checkbox/Checkbox.js";
11
- import { C as D, R as A, T as B } from "./Toggle-Dp20f7qn.js";
11
+ import { C as D, R as A, T as B } from "./Toggle-C-6aiSvn.js";
12
12
  import { ConfirmationDialog as v } from "./components/ConfirmationDialog/ConfirmationDialog.js";
13
13
  import "./components/DatePicker/DatePicker.js";
14
14
  import { Description as R } from "./components/Description/Description.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "2.1.3",
4
+ "version": "2.1.5",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",