@pismo/marola 0.0.1-alpha.25 → 0.0.1-alpha.27

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.
@@ -0,0 +1,26 @@
1
+ import './assets/Group.css';
2
+ import { jsxs as l, 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_guqvs_1", u = "_toggle__label_guqvs_8", o = {
6
+ toggle__input: c,
7
+ toggle__label: u,
8
+ "toggle__label--selected": "_toggle__label--selected_guqvs_15",
9
+ "toggle-group__fieldset": "_toggle-group__fieldset_guqvs_20",
10
+ "toggle-group__options": "_toggle-group__options_guqvs_25",
11
+ "toggle-group__error": "_toggle-group__error_guqvs_29"
12
+ }, f = i((e, r) => {
13
+ const { children: s, legend: g, error: _ } = e, d = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, a = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
14
+ return /* @__PURE__ */ l("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
15
+ g && /* @__PURE__ */ t("legend", { "data-testid": d, children: g }),
16
+ /* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
17
+ _ && /* @__PURE__ */ l("div", { className: o["toggle-group__error"], "data-testid": a, children: [
18
+ /* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
19
+ _
20
+ ] })
21
+ ] });
22
+ });
23
+ export {
24
+ f as G,
25
+ o as s
26
+ };
@@ -0,0 +1,143 @@
1
+ import './assets/Toggle.css';
2
+ import { jsx as r, jsxs as y } from "react/jsx-runtime";
3
+ import { forwardRef as u, cloneElement as m } from "react";
4
+ import { c as l } from "./clsx-DB4S2d7J.js";
5
+ import "./components/Button/Button.js";
6
+ import { Icon as g } from "./components/Icon/Icon.js";
7
+ import "./components/Dialog/Backdrop.js";
8
+ import { Typography as j } from "./components/Typography/Typography.js";
9
+ import "./components/IconButton/IconButton.js";
10
+ import "./components/Select/Select.js";
11
+ import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
12
+ import "./components/Table/Table.js";
13
+ import "./components/Tabs/Tabs.js";
14
+ import { s as c } from "./Group-Dj___O8t.js";
15
+ import "./contexts/SnackbarProvider/SnackbarProvider.js";
16
+ import { B as k } from "./Button-2b1peDFT.js";
17
+ const x = "_chip_bu1ja_60", C = "_chip__adornment_bu1ja_114", N = "_chip__remove_bu1ja_119", v = "_chip__skeleton_bu1ja_133", _ = {
18
+ "u-typography-h1": "_u-typography-h1_bu1ja_1",
19
+ "u-typography-h2": "_u-typography-h2_bu1ja_8",
20
+ "u-typography-h3": "_u-typography-h3_bu1ja_15",
21
+ "u-typography-h4": "_u-typography-h4_bu1ja_22",
22
+ "u-typography-h5": "_u-typography-h5_bu1ja_29",
23
+ "u-typography-h6": "_u-typography-h6_bu1ja_36",
24
+ "u-typography-base": "_u-typography-base_bu1ja_43",
25
+ "u-typography-base--xxl": "_u-typography-base--xxl_bu1ja_48",
26
+ "u-typography-base--xl": "_u-typography-base--xl_bu1ja_52",
27
+ "u-typography-base--lg": "_u-typography-base--lg_bu1ja_56",
28
+ "u-typography-base--sm": "_u-typography-base--sm_bu1ja_60",
29
+ chip: x,
30
+ "u-typography-base--bold": "_u-typography-base--bold_bu1ja_64",
31
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_bu1ja_67",
32
+ "u-typography-base--underlined": "_u-typography-base--underlined_bu1ja_70",
33
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_bu1ja_73",
34
+ "chip--button": "_chip--button_bu1ja_89",
35
+ "chip--outlined": "_chip--outlined_bu1ja_102",
36
+ "chip--contained": "_chip--contained_bu1ja_108",
37
+ chip__adornment: C,
38
+ chip__remove: N,
39
+ "chip__remove--disabled": "_chip__remove--disabled_bu1ja_130",
40
+ chip__skeleton: v
41
+ }, T = u((a, t) => {
42
+ const { children: i, onClickContent: e, disabled: s, className: p, variant: h } = a;
43
+ let o = l(
44
+ _.chip,
45
+ { [_["chip--outlined"]]: h === "outlined" },
46
+ { [_["chip--contained"]]: h === "contained" },
47
+ p
48
+ );
49
+ return e ? (o += ` ${_["chip--button"]}`, /* @__PURE__ */ r(
50
+ k,
51
+ {
52
+ onClick: e,
53
+ disabled: s,
54
+ "data-testid": a["data-testid"],
55
+ ref: t,
56
+ className: o,
57
+ children: i
58
+ }
59
+ )) : /* @__PURE__ */ r("span", { "data-testid": a["data-testid"], ref: t, className: o, children: i });
60
+ }), R = (a) => {
61
+ const { icon: t, disabled: i = !1, className: e } = a;
62
+ if (t) {
63
+ const s = l(_.chip__adornment, e), p = i ? m(t, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : t;
64
+ return /* @__PURE__ */ r("span", { className: s, children: p });
65
+ }
66
+ return null;
67
+ }, H = u((a, t) => {
68
+ const {
69
+ label: i,
70
+ className: e,
71
+ onClickContent: s,
72
+ leftAdornment: p,
73
+ loading: h = !1,
74
+ disabled: o = !1,
75
+ variant: b = "default",
76
+ onClickRemove: d
77
+ } = a;
78
+ return h ? /* @__PURE__ */ r(
79
+ f,
80
+ {
81
+ className: a["className-skeleton"],
82
+ style: { width: "6rem", height: "2rem", borderRadius: "4rem", display: "inline-flex" },
83
+ "data-testid": a["data-testid-skeleton"]
84
+ }
85
+ ) : /* @__PURE__ */ y(
86
+ T,
87
+ {
88
+ ref: t,
89
+ "data-testid": a["data-testid"],
90
+ onClickContent: s,
91
+ disabled: o,
92
+ className: e,
93
+ variant: b,
94
+ children: [
95
+ p && /* @__PURE__ */ r(R, { ...p, disabled: o }),
96
+ i,
97
+ d && /* @__PURE__ */ r(
98
+ "span",
99
+ {
100
+ className: l(_.chip__remove, { [_["chip__remove--disabled"]]: o }),
101
+ role: "button",
102
+ tabIndex: o ? -1 : 0,
103
+ "aria-label": "remove",
104
+ onClick: (n) => {
105
+ n == null || n.stopPropagation(), n == null || n.nativeEvent.stopImmediatePropagation(), d();
106
+ },
107
+ "aria-disabled": o,
108
+ children: /* @__PURE__ */ r(g, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ );
114
+ }), J = u((a, t) => {
115
+ const { text: i, isSelected: e = !1, value: s, onChange: p } = a;
116
+ return /* @__PURE__ */ y(
117
+ "label",
118
+ {
119
+ className: l([c.toggle__label], { [c["toggle__label--selected"]]: e }),
120
+ "data-testid": a["data-testid"],
121
+ children: [
122
+ /* @__PURE__ */ r(
123
+ "input",
124
+ {
125
+ className: l([c.toggle__input]),
126
+ type: "radio",
127
+ ref: t,
128
+ value: s.toString(),
129
+ onChange: () => p(s),
130
+ role: "radio",
131
+ checked: e,
132
+ "aria-checked": e
133
+ }
134
+ ),
135
+ /* @__PURE__ */ r(j, { bold: !0, children: i })
136
+ ]
137
+ }
138
+ );
139
+ });
140
+ export {
141
+ H as C,
142
+ J as T
143
+ };
@@ -1 +1 @@
1
- ._toggle__input_1hgsq_1{position:absolute;opacity:0;width:0;height:0;margin:0}._toggle__label_1hgsq_8{border-radius:6px;border:solid 1px var(--gray-25);padding:.5rem 1rem;flex-grow:1;text-align:center}._toggle__label--selected_1hgsq_15{color:var(--accent);border-color:var(--accent)}._toggle-group__fieldset_1hgsq_20{border:none}._toggle-group__options_1hgsq_23{display:flex;gap:.5rem}._toggle-group__error_1hgsq_27{color:var(--alert);display:flex;gap:.5rem;margin-top:.5rem}
1
+ ._toggle__input_guqvs_1{position:absolute;opacity:0;width:0;height:0;margin:0}._toggle__label_guqvs_8{border-radius:6px;border:solid 1px var(--gray-25);padding:.5rem 1rem;flex-grow:1;text-align:center}._toggle__label--selected_guqvs_15{color:var(--accent);border-color:var(--accent)}._toggle-group__fieldset_guqvs_20{border:none;margin:0;padding:0}._toggle-group__options_guqvs_25{display:flex;gap:.5rem}._toggle-group__error_guqvs_29{color:var(--alert);display:flex;gap:.5rem;margin-top:.5rem}
@@ -1 +1 @@
1
- ._u-typography-h1_1j9h1_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_1j9h1_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_1j9h1_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_1j9h1_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_1j9h1_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_1j9h1_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_1j9h1_43{font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1j9h1_48{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1j9h1_52{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1j9h1_56{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1j9h1_60,._chip_1j9h1_60{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1j9h1_64,._chip_1j9h1_60{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1j9h1_67{text-decoration:line-through}._u-typography-base--underlined_1j9h1_70{text-decoration:underline}._u-typography-base--strikethrough-underlined_1j9h1_73{text-decoration:underline line-through}._chip_1j9h1_60{display:flex;align-items:center;width:fit-content;padding:.375rem .5rem;background-color:var(--cream);border-width:1px;border-radius:calc(var(--border-radius-soft) * 4)}._chip_1j9h1_60:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_1j9h1_89{cursor:pointer;border-color:transparent}._chip--button_1j9h1_89:disabled{cursor:initial}._chip--button_1j9h1_89:focus-visible{outline:none}._chip--button_1j9h1_89:focus{outline:2px solid var(--black-100)}._chip--outlined_1j9h1_102{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_1j9h1_108{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_1j9h1_114{display:flex;align-items:center;margin-right:.5rem}._chip__remove_1j9h1_119{display:flex;margin-left:.5rem}._chip__remove_1j9h1_119:focus-visible{outline:none}._chip__remove_1j9h1_119:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_1j9h1_130{cursor:default}
1
+ ._u-typography-h1_bu1ja_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_bu1ja_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_bu1ja_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_bu1ja_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_bu1ja_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_bu1ja_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_bu1ja_43{font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_bu1ja_48{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_bu1ja_52{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_bu1ja_56{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_bu1ja_60,._chip_bu1ja_60{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_bu1ja_64,._chip_bu1ja_60{font-weight:var(--base-bold)}._u-typography-base--strikethrough_bu1ja_67{text-decoration:line-through}._u-typography-base--underlined_bu1ja_70{text-decoration:underline}._u-typography-base--strikethrough-underlined_bu1ja_73{text-decoration:underline line-through}._chip_bu1ja_60{display:flex;align-items:center;width:fit-content;padding:.375rem .5rem;background-color:var(--cream);border-width:1px;border-radius:calc(var(--border-radius-soft) * 4)}._chip_bu1ja_60:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_bu1ja_89{cursor:pointer;border-color:transparent}._chip--button_bu1ja_89:disabled{cursor:initial}._chip--button_bu1ja_89:focus-visible{outline:none}._chip--button_bu1ja_89:focus{outline:2px solid var(--black-100)}._chip--outlined_bu1ja_102{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_bu1ja_108{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_bu1ja_114{display:flex;align-items:center;margin-right:.5rem}._chip__remove_bu1ja_119{display:flex;margin-left:.5rem}._chip__remove_bu1ja_119:focus-visible{outline:none}._chip__remove_bu1ja_119:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_bu1ja_130{cursor:default}._chip__skeleton_bu1ja_133{width:6rem;height:2rem;border-radius:4rem;display:inline-flex}
@@ -20,6 +20,8 @@ type ChipProps = {
20
20
  disabled?: boolean;
21
21
  /** Any additional classes to apply to the Chip wrapper */
22
22
  className?: string;
23
+ /** Any additional classes to apply to the chip skeleton */
24
+ 'className-skeleton'?: string;
23
25
  /** Which style of chip to show */
24
26
  variant?: Variant;
25
27
  /** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
4
  import "../Icon/Icon.js";
5
5
  import "../Button/Button.js";
6
- import { C as g } from "../../Toggle-Cs5nKfr-.js";
6
+ import { C as j } from "../../Toggle-D4VPm4X_.js";
7
7
  import "../Dialog/Backdrop.js";
8
8
  import "../Typography/Typography.js";
9
9
  import "../IconButton/IconButton.js";
@@ -11,8 +11,9 @@ import "../Select/Select.js";
11
11
  import "../Skeleton/Skeleton.js";
12
12
  import "../Table/Table.js";
13
13
  import "../Tabs/Tabs.js";
14
- import "../../Group-CS_qGuuW.js";
14
+ import "../../Group-Dj___O8t.js";
15
+ import "../../contexts/SnackbarProvider/SnackbarProvider.js";
15
16
  import "../../Button-2b1peDFT.js";
16
17
  export {
17
- g as Chip
18
+ j as Chip
18
19
  };
@@ -11,6 +11,7 @@ declare const meta: {
11
11
  onClickRemove?: (() => void) | undefined;
12
12
  disabled?: boolean | undefined;
13
13
  className?: string | undefined;
14
+ 'className-skeleton'?: string | undefined;
14
15
  variant?: import('./Chip').Variant | undefined;
15
16
  'data-testid-skeleton'?: string | undefined;
16
17
  } & import('react').RefAttributes<unknown>>;
@@ -24,6 +25,7 @@ declare const meta: {
24
25
  onClickRemove?: (() => void) | undefined;
25
26
  disabled?: boolean | undefined;
26
27
  className?: string | undefined;
28
+ 'className-skeleton'?: string | undefined;
27
29
  variant?: import('./Chip').Variant | undefined;
28
30
  'data-testid-skeleton'?: string | undefined;
29
31
  ref?: import('react').LegacyRef<unknown> | undefined;
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../Icon/Icon.js";
4
- import { G as i } from "../../Group-CS_qGuuW.js";
4
+ import { G as i } from "../../Group-Dj___O8t.js";
5
5
  export {
6
6
  i as default
7
7
  };
@@ -2,14 +2,15 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
4
  import "../Button/Button.js";
5
- import { T as x } from "../../Toggle-Cs5nKfr-.js";
5
+ import { T } from "../../Toggle-D4VPm4X_.js";
6
6
  import "../Dialog/Backdrop.js";
7
7
  import "../Typography/Typography.js";
8
8
  import "../IconButton/IconButton.js";
9
9
  import "../Select/Select.js";
10
10
  import "../Table/Table.js";
11
11
  import "../Tabs/Tabs.js";
12
- import "../../Group-CS_qGuuW.js";
12
+ import "../../Group-Dj___O8t.js";
13
+ import "../../contexts/SnackbarProvider/SnackbarProvider.js";
13
14
  export {
14
- x as default
15
+ T as default
15
16
  };
@@ -1,5 +1,5 @@
1
- import { T as e } from "../../Toggle-Cs5nKfr-.js";
2
- import { G as p } from "../../Group-CS_qGuuW.js";
1
+ import { T as e } from "../../Toggle-D4VPm4X_.js";
2
+ import { G as p } from "../../Group-Dj___O8t.js";
3
3
  export {
4
4
  p as ToggleGroup,
5
5
  e as ToggleGroupItem
@@ -1,8 +1,9 @@
1
- import { SnackbarProps } from './Snackbar';
1
+ import { SnackbarProps } from '../../components/Snackbar/Snackbar';
2
2
 
3
3
  export type SnackbarContextProps = {
4
4
  showMessage: (message: string, variant?: SnackbarProps['variant'], duration?: number) => void;
5
5
  };
6
+ export declare const SnackbarContext: import('react').Context<SnackbarContextProps>;
6
7
  export type SnackbarProviderProps = {
7
8
  children: React.ReactNode;
8
9
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as l, Fragment as g } from "react/jsx-runtime";
2
2
  import { createContext as m, useState as p, useCallback as f, useContext as C } from "react";
3
- import { Snackbar as b } from "./Snackbar.js";
3
+ import { Snackbar as b } from "../../components/Snackbar/Snackbar.js";
4
4
  const o = m({
5
5
  showMessage: () => {
6
6
  }
@@ -44,6 +44,7 @@ const o = m({
44
44
  );
45
45
  }, S = () => C(o);
46
46
  export {
47
+ o as SnackbarContext,
47
48
  h as SnackbarProvider,
48
49
  S as useSnackbar
49
50
  };
package/dist/main.d.ts CHANGED
@@ -26,3 +26,4 @@ export * from './components/Toggle/Toggle';
26
26
  export * from './components/ToggleGroup/ToggleGroup';
27
27
  export * from './components/Tooltip/Tooltip';
28
28
  export * from './components/Typography/Typography';
29
+ export * from './contexts/SnackbarProvider/SnackbarProvider';
package/dist/main.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { Advice as e } from "./components/Advice/Advice.js";
2
2
  import { Button as p } from "./components/Button/Button.js";
3
3
  import { Checkbox as f } from "./components/Checkbox/Checkbox.js";
4
- import { C as x, T as n } from "./Toggle-Cs5nKfr-.js";
5
- import { Dialog as T } from "./components/Dialog/Dialog.js";
6
- import { FamilyAndIcons as s, Icon as g } from "./components/Icon/Icon.js";
7
- import { IconButton as u } from "./components/IconButton/IconButton.js";
8
- import { Input as S } from "./components/Input/Input.js";
9
- import { InputSearch as I } from "./components/InputSearch/InputSearch.js";
10
- import { LoadingSpinner as k } from "./components/LoadingSpinner/LoadingSpinner.js";
11
- import { PageHeader as C } from "./components/PageHeader/PageHeader.js";
12
- import { Pagination as A, paginationDefaultTranslations as B } from "./components/Pagination/Pagination.js";
13
- import { Select as P, SelectOption as H } from "./components/Select/Select.js";
4
+ import { C as m, T as n } from "./Toggle-D4VPm4X_.js";
5
+ import { Dialog as i } from "./components/Dialog/Dialog.js";
6
+ import { FamilyAndIcons as s, Icon as c } from "./components/Icon/Icon.js";
7
+ import { IconButton as S } from "./components/IconButton/IconButton.js";
8
+ import { Input as d } from "./components/Input/Input.js";
9
+ import { InputSearch as k } from "./components/InputSearch/InputSearch.js";
10
+ import { LoadingSpinner as I } from "./components/LoadingSpinner/LoadingSpinner.js";
11
+ import { PageHeader as y } from "./components/PageHeader/PageHeader.js";
12
+ import { Pagination as P, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
13
+ import { Select as G, SelectOption as v } from "./components/Select/Select.js";
14
14
  import { Skeleton as F, SkeletonCircle as L, SkeletonTable as O } from "./components/Skeleton/Skeleton.js";
15
15
  import { Snackbar as q } from "./components/Snackbar/Snackbar.js";
16
16
  import { SortTooltip as z, sortTooltipDefaultTranslations as E } from "./components/SortTooltip/SortTooltip.js";
@@ -19,43 +19,46 @@ import { TBody as N, THead as Q, Table as R, Td as U, Th as V, Tr as W } from ".
19
19
  import { Tabs as Y } from "./components/Tabs/Tabs.js";
20
20
  import { TextDisplay as _ } from "./components/TextDisplay/TextDisplay.js";
21
21
  import { Toggle as oo } from "./components/Toggle/Toggle.js";
22
- import { G as eo } from "./Group-CS_qGuuW.js";
22
+ import { G as eo } from "./Group-Dj___O8t.js";
23
23
  import { Tooltip as po } from "./components/Tooltip/Tooltip.js";
24
24
  import { Typography as fo } from "./components/Typography/Typography.js";
25
- import { default as xo } from "./components/Dialog/DialogTitle.js";
26
- import { default as lo } from "./components/Dialog/Content.js";
27
- import { default as io } from "./components/Dialog/Actions.js";
28
- import { Tab as go } from "./components/Tabs/Tab.js";
29
- import { TabPanel as uo } from "./components/Tabs/TabPanel.js";
25
+ import { SnackbarContext as mo, SnackbarProvider as no, useSnackbar as lo } from "./contexts/SnackbarProvider/SnackbarProvider.js";
26
+ import { default as To } from "./components/Dialog/DialogTitle.js";
27
+ import { default as co } from "./components/Dialog/Content.js";
28
+ import { default as So } from "./components/Dialog/Actions.js";
29
+ import { Tab as bo } from "./components/Tabs/Tab.js";
30
+ import { TabPanel as Co } from "./components/Tabs/TabPanel.js";
30
31
  export {
31
- io as Actions,
32
+ So as Actions,
32
33
  e as Advice,
33
34
  p as Button,
34
35
  f as Checkbox,
35
- x as Chip,
36
- lo as Content,
37
- T as Dialog,
38
- xo as DialogTitle,
36
+ m as Chip,
37
+ co as Content,
38
+ i as Dialog,
39
+ To as DialogTitle,
39
40
  s as FamilyAndIcons,
40
- g as Icon,
41
- u as IconButton,
42
- S as Input,
43
- I as InputSearch,
44
- k as LoadingSpinner,
45
- C as PageHeader,
46
- A as Pagination,
47
- P as Select,
48
- H as SelectOption,
41
+ c as Icon,
42
+ S as IconButton,
43
+ d as Input,
44
+ k as InputSearch,
45
+ I as LoadingSpinner,
46
+ y as PageHeader,
47
+ P as Pagination,
48
+ G as Select,
49
+ v as SelectOption,
49
50
  F as Skeleton,
50
51
  L as SkeletonCircle,
51
52
  O as SkeletonTable,
52
53
  q as Snackbar,
54
+ mo as SnackbarContext,
55
+ no as SnackbarProvider,
53
56
  z as SortTooltip,
54
57
  K as Stepper,
55
58
  N as TBody,
56
59
  Q as THead,
57
- go as Tab,
58
- uo as TabPanel,
60
+ bo as Tab,
61
+ Co as TabPanel,
59
62
  R as Table,
60
63
  Y as Tabs,
61
64
  U as Td,
@@ -67,6 +70,7 @@ export {
67
70
  po as Tooltip,
68
71
  W as Tr,
69
72
  fo as Typography,
70
- B as paginationDefaultTranslations,
71
- E as sortTooltipDefaultTranslations
73
+ A as paginationDefaultTranslations,
74
+ E as sortTooltipDefaultTranslations,
75
+ lo as useSnackbar
72
76
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "0.0.1-alpha.25",
4
+ "version": "0.0.1-alpha.27",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -91,4 +91,4 @@
91
91
  "@mui/base": "^5.0.0-beta.40",
92
92
  "@mui/material": "^5.15.15"
93
93
  }
94
- }
94
+ }
@@ -1,26 +0,0 @@
1
- import './assets/Group.css';
2
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
3
- import { forwardRef as a } from "react";
4
- import { Icon as i } from "./components/Icon/Icon.js";
5
- const d = "_toggle__input_1hgsq_1", n = "_toggle__label_1hgsq_8", o = {
6
- toggle__input: d,
7
- toggle__label: n,
8
- "toggle__label--selected": "_toggle__label--selected_1hgsq_15",
9
- "toggle-group__fieldset": "_toggle-group__fieldset_1hgsq_20",
10
- "toggle-group__options": "_toggle-group__options_1hgsq_23",
11
- "toggle-group__error": "_toggle-group__error_1hgsq_27"
12
- }, h = a((e, r) => {
13
- const { children: s, legend: g, error: _ } = e;
14
- return /* @__PURE__ */ l("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
15
- g && /* @__PURE__ */ t("legend", { "data-testid": `${e["data-testid"]}-legend`, children: g }),
16
- /* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
17
- _ && /* @__PURE__ */ l("div", { className: o["toggle-group__error"], "data-testid": `${e["data-testid"]}-error`, children: [
18
- /* @__PURE__ */ t(i, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
19
- _
20
- ] })
21
- ] });
22
- });
23
- export {
24
- h as G,
25
- o as s
26
- };
@@ -1,140 +0,0 @@
1
- import './assets/Toggle.css';
2
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
3
- import { forwardRef as c, cloneElement as m } from "react";
4
- import { c as _ } from "./clsx-DB4S2d7J.js";
5
- import "./components/Button/Button.js";
6
- import { Icon as b } from "./components/Icon/Icon.js";
7
- import "./components/Dialog/Backdrop.js";
8
- import { Typography as j } from "./components/Typography/Typography.js";
9
- import "./components/IconButton/IconButton.js";
10
- import "./components/Select/Select.js";
11
- import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
12
- import "./components/Table/Table.js";
13
- import "./components/Tabs/Tabs.js";
14
- import { s as d } from "./Group-CS_qGuuW.js";
15
- import { B as k } from "./Button-2b1peDFT.js";
16
- const x = "_chip_1j9h1_60", C = "_chip__adornment_1j9h1_114", N = "_chip__remove_1j9h1_119", s = {
17
- "u-typography-h1": "_u-typography-h1_1j9h1_1",
18
- "u-typography-h2": "_u-typography-h2_1j9h1_8",
19
- "u-typography-h3": "_u-typography-h3_1j9h1_15",
20
- "u-typography-h4": "_u-typography-h4_1j9h1_22",
21
- "u-typography-h5": "_u-typography-h5_1j9h1_29",
22
- "u-typography-h6": "_u-typography-h6_1j9h1_36",
23
- "u-typography-base": "_u-typography-base_1j9h1_43",
24
- "u-typography-base--xxl": "_u-typography-base--xxl_1j9h1_48",
25
- "u-typography-base--xl": "_u-typography-base--xl_1j9h1_52",
26
- "u-typography-base--lg": "_u-typography-base--lg_1j9h1_56",
27
- "u-typography-base--sm": "_u-typography-base--sm_1j9h1_60",
28
- chip: x,
29
- "u-typography-base--bold": "_u-typography-base--bold_1j9h1_64",
30
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1j9h1_67",
31
- "u-typography-base--underlined": "_u-typography-base--underlined_1j9h1_70",
32
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1j9h1_73",
33
- "chip--button": "_chip--button_1j9h1_89",
34
- "chip--outlined": "_chip--outlined_1j9h1_102",
35
- "chip--contained": "_chip--contained_1j9h1_108",
36
- chip__adornment: C,
37
- chip__remove: N,
38
- "chip__remove--disabled": "_chip__remove--disabled_1j9h1_130"
39
- }, v = c((t, a) => {
40
- const { children: i, onClickContent: e, disabled: h, className: p, variant: l } = t;
41
- let o = _(
42
- s.chip,
43
- { [s["chip--outlined"]]: l === "outlined" },
44
- { [s["chip--contained"]]: l === "contained" },
45
- p
46
- );
47
- return e ? (o += ` ${s["chip--button"]}`, /* @__PURE__ */ r(
48
- k,
49
- {
50
- onClick: e,
51
- disabled: h,
52
- "data-testid": t["data-testid"],
53
- ref: a,
54
- className: o,
55
- children: i
56
- }
57
- )) : /* @__PURE__ */ r("span", { "data-testid": t["data-testid"], ref: a, className: o, children: i });
58
- }), T = (t) => {
59
- const { icon: a, disabled: i = !1, className: e } = t;
60
- if (a) {
61
- const h = _(s.chip__adornment, e), p = i ? m(a, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : a;
62
- return /* @__PURE__ */ r("span", { className: h, children: p });
63
- }
64
- return null;
65
- }, F = c((t, a) => {
66
- const {
67
- label: i,
68
- className: e,
69
- onClickContent: h,
70
- leftAdornment: p,
71
- loading: l = !1,
72
- disabled: o = !1,
73
- variant: g = "default",
74
- onClickRemove: y
75
- } = t;
76
- return l ? /* @__PURE__ */ r(
77
- f,
78
- {
79
- style: { width: "6rem", height: "2rem", borderRadius: "4rem", display: "inline-flex" },
80
- "data-testid": t["data-testid-skeleton"]
81
- }
82
- ) : /* @__PURE__ */ u(
83
- v,
84
- {
85
- ref: a,
86
- "data-testid": t["data-testid"],
87
- onClickContent: h,
88
- disabled: o,
89
- className: e,
90
- variant: g,
91
- children: [
92
- p && /* @__PURE__ */ r(T, { ...p, disabled: o }),
93
- i,
94
- y && /* @__PURE__ */ r(
95
- "span",
96
- {
97
- className: _(s.chip__remove, { [s["chip__remove--disabled"]]: o }),
98
- role: "button",
99
- tabIndex: o ? -1 : 0,
100
- "aria-label": "remove",
101
- onClick: (n) => {
102
- n == null || n.stopPropagation(), n == null || n.nativeEvent.stopImmediatePropagation(), y();
103
- },
104
- "aria-disabled": o,
105
- children: /* @__PURE__ */ r(b, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
106
- }
107
- )
108
- ]
109
- }
110
- );
111
- }), G = c((t, a) => {
112
- const { text: i, isSelected: e = !1, value: h, onChange: p } = t;
113
- return /* @__PURE__ */ u(
114
- "label",
115
- {
116
- className: _([d.toggle__label], { [d["toggle__label--selected"]]: e }),
117
- "data-testid": t["data-testid"],
118
- children: [
119
- /* @__PURE__ */ r(
120
- "input",
121
- {
122
- className: _([d.toggle__input]),
123
- type: "radio",
124
- ref: a,
125
- value: h.toString(),
126
- onChange: () => p(h),
127
- role: "radio",
128
- checked: e,
129
- "aria-checked": e
130
- }
131
- ),
132
- /* @__PURE__ */ r(j, { bold: !0, children: i })
133
- ]
134
- }
135
- );
136
- });
137
- export {
138
- F as C,
139
- G as T
140
- };