@pismo/marola 2.1.36 → 2.1.37

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as I, jsx as T } from "react/jsx-runtime";
2
2
  import { c as F } from "../../clsx-OuTLNxxd.js";
3
3
  import { u as v, _ as y, g as U, a as q, b as H, c as N, d as M, e as A, P as e } from "../../useSlotProps-CYHDC4TN.js";
4
- import * as j from "react";
4
+ import * as V from "react";
5
5
  import { u as D } from "../../useControlled-CCMYYdCM.js";
6
6
  import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
7
7
  import '../../assets/Toggle.css';function W(l) {
@@ -10,37 +10,37 @@ import '../../assets/Toggle.css';function W(l) {
10
10
  defaultChecked: p,
11
11
  disabled: c,
12
12
  onBlur: a,
13
- onChange: g,
13
+ onChange: f,
14
14
  onFocus: r,
15
15
  onFocusVisible: u,
16
16
  readOnly: n,
17
17
  required: i
18
- } = l, [V, S] = D({
18
+ } = l, [S, x] = D({
19
19
  controlled: s,
20
20
  default: !!p,
21
21
  name: "Switch",
22
22
  state: "checked"
23
- }), x = (t) => (o) => {
24
- var b;
25
- o.nativeEvent.defaultPrevented || (S(o.target.checked), g == null || g(o), (b = t.onChange) == null || b.call(t, o));
23
+ }), B = (t) => (o) => {
24
+ var g;
25
+ o.nativeEvent.defaultPrevented || (x(o.target.checked), f == null || f(o), (g = t.onChange) == null || g.call(t, o));
26
26
  }, {
27
27
  isFocusVisibleRef: _,
28
- onBlur: B,
29
- onFocus: f,
28
+ onBlur: w,
29
+ onFocus: b,
30
30
  ref: m
31
- } = L(), [h, P] = j.useState(!1);
32
- c && h && P(!1), j.useEffect(() => {
31
+ } = L(), [h, P] = V.useState(!1);
32
+ c && h && P(!1), V.useEffect(() => {
33
33
  _.current = h;
34
34
  }, [h, _]);
35
- const k = j.useRef(null), w = (t) => (o) => {
36
- var b;
37
- k.current || (k.current = o.currentTarget), f(o), _.current === !0 && (P(!0), u == null || u(o)), r == null || r(o), (b = t.onFocus) == null || b.call(t, o);
35
+ const k = V.useRef(null), R = (t) => (o) => {
36
+ var g;
37
+ k.current || (k.current = o.currentTarget), b(o), _.current === !0 && (P(!0), u == null || u(o)), r == null || r(o), (g = t.onFocus) == null || g.call(t, o);
38
38
  }, O = (t) => (o) => {
39
- var b;
40
- B(o), _.current === !1 && P(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
39
+ var g;
40
+ w(o), _.current === !1 && P(!1), a == null || a(o), (g = t.onBlur) == null || g.call(t, o);
41
41
  }, C = v(m, k);
42
42
  return {
43
- checked: V,
43
+ checked: S,
44
44
  disabled: !!c,
45
45
  focusVisible: h,
46
46
  getInputProps: (t = {}) => y({
@@ -54,8 +54,8 @@ import '../../assets/Toggle.css';function W(l) {
54
54
  role: "switch",
55
55
  "aria-checked": s
56
56
  }, t, {
57
- onChange: x(t),
58
- onFocus: w(t),
57
+ onChange: B(t),
58
+ onFocus: R(t),
59
59
  onBlur: O(t)
60
60
  }),
61
61
  inputRef: C,
@@ -80,50 +80,50 @@ const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFoc
80
80
  input: ["input"],
81
81
  track: ["track"]
82
82
  }, A(z));
83
- }, E = /* @__PURE__ */ j.forwardRef(function(s, p) {
84
- var c, a, g, r;
83
+ }, E = /* @__PURE__ */ V.forwardRef(function(s, p) {
84
+ var c, a, f, r;
85
85
  const {
86
86
  slotProps: u = {},
87
87
  slots: n = {}
88
88
  } = s, i = H(s, G), {
89
- getInputProps: V,
90
- checked: S,
91
- disabled: x,
89
+ getInputProps: S,
90
+ checked: x,
91
+ disabled: B,
92
92
  focusVisible: _,
93
- readOnly: B
94
- } = W(s), f = y({}, s, {
95
- checked: S,
96
- disabled: x,
93
+ readOnly: w
94
+ } = W(s), b = y({}, s, {
95
+ checked: x,
96
+ disabled: B,
97
97
  focusVisible: _,
98
- readOnly: B
99
- }), m = J(f), h = (c = n.root) != null ? c : "span", P = N({
98
+ readOnly: w
99
+ }), m = J(b), h = (c = n.root) != null ? c : "span", P = N({
100
100
  elementType: h,
101
101
  externalSlotProps: u.root,
102
102
  externalForwardedProps: i,
103
103
  additionalProps: {
104
104
  ref: p
105
105
  },
106
- ownerState: f,
106
+ ownerState: b,
107
107
  className: m.root
108
- }), k = (a = n.thumb) != null ? a : "span", w = N({
108
+ }), k = (a = n.thumb) != null ? a : "span", R = N({
109
109
  elementType: k,
110
110
  externalSlotProps: u.thumb,
111
- ownerState: f,
111
+ ownerState: b,
112
112
  className: m.thumb
113
- }), O = (g = n.input) != null ? g : "input", C = N({
113
+ }), O = (f = n.input) != null ? f : "input", C = N({
114
114
  elementType: O,
115
- getSlotProps: V,
115
+ getSlotProps: S,
116
116
  externalSlotProps: u.input,
117
- ownerState: f,
117
+ ownerState: b,
118
118
  className: m.input
119
- }), R = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = N({
120
- elementType: R,
119
+ }), j = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = N({
120
+ elementType: j,
121
121
  externalSlotProps: u.track,
122
- ownerState: f,
122
+ ownerState: b,
123
123
  className: m.track
124
124
  });
125
125
  return /* @__PURE__ */ I(h, y({}, P, {
126
- children: [/* @__PURE__ */ T(R, y({}, t)), /* @__PURE__ */ T(k, y({}, w)), /* @__PURE__ */ T(O, y({}, C))]
126
+ children: [/* @__PURE__ */ T(j, y({}, t)), /* @__PURE__ */ T(k, y({}, R)), /* @__PURE__ */ T(O, y({}, C))]
127
127
  }));
128
128
  });
129
129
  process.env.NODE_ENV !== "production" && (E.propTypes = {
@@ -197,30 +197,30 @@ process.env.NODE_ENV !== "production" && (E.propTypes = {
197
197
  track: e.oneOfType([e.elementType, e.oneOf([null])])
198
198
  })
199
199
  });
200
- const K = "_toggle__label_jp9gu_43", Q = "_toggle_jp9gu_43", X = "_input_jp9gu_89", Y = "_thumb_jp9gu_100", Z = "_track_jp9gu_114", d = {
200
+ const K = "_toggle__label_1y8f9_44", Q = "_toggle_1y8f9_44", X = "_input_1y8f9_90", Y = "_thumb_1y8f9_101", Z = "_track_1y8f9_115", d = {
201
201
  toggle__label: K,
202
202
  toggle: Q,
203
- "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_jp9gu_85",
203
+ "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_1y8f9_86",
204
204
  input: X,
205
205
  thumb: Y,
206
206
  track: Z,
207
- "toggle--focus-visible": "_toggle--focus-visible_jp9gu_124",
208
- "toggle--checked": "_toggle--checked_jp9gu_128",
209
- "toggle--disabled": "_toggle--disabled_jp9gu_141"
207
+ "toggle--focus-visible": "_toggle--focus-visible_1y8f9_125",
208
+ "toggle--checked": "_toggle--checked_1y8f9_129",
209
+ "toggle--disabled": "_toggle--disabled_1y8f9_142"
210
210
  }, ce = ({
211
211
  label: l,
212
212
  checked: s,
213
213
  disabled: p,
214
214
  classNameWrapper: c,
215
215
  classNameInput: a,
216
- "data-testid": g,
216
+ "data-testid": f,
217
217
  onChange: r,
218
218
  classNameLabel: u
219
219
  }) => {
220
220
  const n = (i) => {
221
221
  r == null || r(i);
222
222
  };
223
- return /* @__PURE__ */ I("div", { className: F(d.toggle, c), "data-testid": g, children: [
223
+ return /* @__PURE__ */ I("div", { className: F(d.toggle, c), "data-testid": f, children: [
224
224
  /* @__PURE__ */ T(
225
225
  E,
226
226
  {
@@ -17,4 +17,5 @@ export default meta;
17
17
  type Story = StoryObj<typeof meta>;
18
18
  export declare const Simple: Story;
19
19
  export declare const WithLabel: Story;
20
- export declare const Disabled: Story;
20
+ export declare const DisabledChecked: Story;
21
+ export declare const DisabledUnchecked: Story;
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.36",
4
+ "version": "2.1.37",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,45 +0,0 @@
1
- import './assets/DatePicker.css';const t = "_header_zeltt_149", e = "_calendar_zeltt_172", a = "_weekdayNames_zeltt_177", _ = "_days_zeltt_178", n = "_weekdayName_zeltt_177", d = "_day_zeltt_178", r = "_disabled_zeltt_200", o = "_selected_zeltt_200", l = "_faded_zeltt_209", c = "_months_zeltt_247", s = "_years_zeltt_248", z = "_month_zeltt_115", i = "_year_zeltt_248", y = "_rotate_zeltt_328", h = {
2
- "datepicker-wrapper": "_datepicker-wrapper_zeltt_79",
3
- "datepicker-input-container": "_datepicker-input-container_zeltt_91",
4
- "datepicker-container": "_datepicker-container_zeltt_99",
5
- "range-mode": "_range-mode_zeltt_112",
6
- "month-header": "_month-header_zeltt_115",
7
- "month-header-row": "_month-header-row_zeltt_126",
8
- "nav-button": "_nav-button_zeltt_138",
9
- header: t,
10
- calendar: e,
11
- weekdayNames: a,
12
- days: _,
13
- weekdayName: n,
14
- day: d,
15
- disabled: r,
16
- selected: o,
17
- "range-start": "_range-start_zeltt_200",
18
- "range-end": "_range-end_zeltt_200",
19
- "range-selected": "_range-selected_zeltt_200",
20
- faded: l,
21
- months: c,
22
- years: s,
23
- month: z,
24
- year: i,
25
- "today-footer": "_today-footer_zeltt_287",
26
- "today-button": "_today-button_zeltt_293",
27
- rotate: y,
28
- "current-day": "_current-day_zeltt_332",
29
- "hovered-range": "_hovered-range_zeltt_337",
30
- "hovered-date": "_hovered-date_zeltt_342",
31
- "would-be-end-date": "_would-be-end-date_zeltt_348",
32
- "would-be-start-date": "_would-be-start-date_zeltt_354",
33
- "dual-calendar-container": "_dual-calendar-container_zeltt_361",
34
- "navigator-input": "_navigator-input_zeltt_372",
35
- "nav-month-button": "_nav-month-button_zeltt_401",
36
- "nav-year-button": "_nav-year-button_zeltt_402",
37
- "auto-width": "_auto-width_zeltt_411",
38
- "month-selector": "_month-selector_zeltt_416",
39
- "year-selector": "_year-selector_zeltt_417",
40
- "nav-calendar-static": "_nav-calendar-static_zeltt_449",
41
- "datepicker-buttons-container": "_datepicker-buttons-container_zeltt_468"
42
- };
43
- export {
44
- h as s
45
- };
@@ -1,58 +0,0 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as x } from "react";
3
- import { c as m } from "./clsx-OuTLNxxd.js";
4
- import { Icon as n } from "./components/Icon/Icon.js";
5
- import { Typography as i } from "./components/Typography/Typography.js";
6
- import './assets/SelectButton.css';const f = "_select__listbox__option__text_13h6t_65", w = "_select__wrapper_13h6t_78", g = "_select__label_13h6t_84", v = "_select_13h6t_57", y = "_select__popup_13h6t_99", N = "_select__listbox_13h6t_65", S = "_select__listbox__option_13h6t_65", j = "_select__listbox__option__icon_13h6t_129", t = {
7
- "select-button__text": "_select-button__text_13h6t_57",
8
- select__listbox__option__text: f,
9
- select__wrapper: w,
10
- "select__wrapper--fit-content-width": "_select__wrapper--fit-content-width_13h6t_81",
11
- select__label: g,
12
- "messages-wrapper": "_messages-wrapper_13h6t_92",
13
- select: v,
14
- select__popup: y,
15
- select__listbox: N,
16
- select__listbox__option: S,
17
- select__listbox__option__icon: j,
18
- "select__listbox__option--disabled": "_select__listbox__option--disabled_13h6t_132",
19
- "select__listbox__option--selected": "_select__listbox__option--selected_13h6t_132",
20
- "select-button": "_select-button_13h6t_57",
21
- "select-button--full-width": "_select-button--full-width_13h6t_167",
22
- "select-button--placeholder": "_select-button--placeholder_13h6t_170",
23
- "select-button__icon": "_select-button__icon_13h6t_188",
24
- "select-button--active": "_select-button--active_13h6t_191",
25
- "select-button--error": "_select-button--error_13h6t_194",
26
- "info-message": "_info-message_13h6t_223",
27
- "error-message": "_error-message_13h6t_224"
28
- }, R = x((_, r) => {
29
- const { children: s, disabled: a, className: p, "data-testid": b, prefix: o, onClick: h, fullWidth: d, placeholder: u } = _, l = _["aria-expanded"];
30
- return /* @__PURE__ */ c(
31
- "button",
32
- {
33
- className: m(
34
- p,
35
- l ? t["select-button--active"] : "",
36
- t["select-button"],
37
- d && t["select-button--full-width"],
38
- String(u) === String(s) && t["select-button--placeholder"]
39
- ),
40
- type: "button",
41
- onClick: h,
42
- disabled: a,
43
- "data-testid": b,
44
- ref: r,
45
- children: [
46
- /* @__PURE__ */ c("span", { className: t["select-button__text"], children: [
47
- o && /* @__PURE__ */ e(i, { variant: "base-lg", children: o }),
48
- /* @__PURE__ */ e(i, { variant: "base-lg", children: s })
49
- ] }),
50
- /* @__PURE__ */ e("span", { className: t["select-button__icon"], children: l ? /* @__PURE__ */ e(n, { icon: "chevron-up" }) : /* @__PURE__ */ e(n, { icon: "chevron-down" }) })
51
- ]
52
- }
53
- );
54
- });
55
- export {
56
- R as S,
57
- t as s
58
- };