@caseparts-org/caseblocks 0.0.207 → 0.0.208

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 +1 @@
1
- ._root_1q683_1{display:inline-flex;align-items:stretch}._segment_1q683_6{height:100%}._segment-sm_1q683_10{min-height:22px}._segment-md_1q683_14{min-height:32px}._segment-lg_1q683_18{min-height:40px}._actionSegment_1q683_22{border-top-right-radius:0;border-bottom-right-radius:0}._actionSegment-sm_1q683_27{min-width:70px}._actionSegment-md_1q683_31{min-width:90px}._actionSegment-lg_1q683_35{min-width:112px}._toggleSegment_1q683_39{border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid white;padding-inline:var(--spacing-spacing-2xs)}._toggleSegment-sm_1q683_46{min-width:26px}._toggleSegment-md_1q683_50{min-width:32px}._toggleSegment-lg_1q683_54{min-width:40px}._menu_1q683_58{padding:var(--spacing-spacing-2xs);min-width:0;box-sizing:border-box}._menuList_1q683_65{display:flex;flex-direction:column;width:100%}._menuItem_1q683_71{background:transparent;border:none;border-radius:var(--border-radius-xs);color:inherit;cursor:pointer;padding:var(--spacing-spacing-3xs);text-align:left;width:100%;box-sizing:border-box}._menuItem_1q683_71:hover{background:var(--surface-surface-secondary)}._menuItem_1q683_71:disabled{color:var(--surface-surface-disabled-btn);cursor:default}._menuItem_1q683_71:disabled:hover{background:transparent}
1
+ ._root_1s2i7_1{display:inline-flex;align-items:stretch}._segment_1s2i7_6{height:100%}._segment-sm_1s2i7_10{min-height:22px}._segment-md_1s2i7_14{min-height:32px}._segment-lg_1s2i7_18{min-height:40px}._actionSegment_1s2i7_22{border-top-right-radius:0;border-bottom-right-radius:0}._actionSegment-sm_1s2i7_27{min-width:70px}._actionSegment-md_1s2i7_31{min-width:90px}._actionSegment-lg_1s2i7_35{min-width:112px}._toggleSegment_1s2i7_39{border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid white;padding-inline:var(--spacing-spacing-2xs)}._toggleSegment-sm_1s2i7_46{min-width:26px}._toggleSegment-md_1s2i7_50{min-width:32px}._toggleSegment-lg_1s2i7_54{min-width:40px}._menu_1s2i7_58{--menu-item-hover-background: var(--surface-surface-secondary);padding:var(--spacing-spacing-2xs);min-width:0;box-sizing:border-box}._menu-primary_1s2i7_65{--menu-item-hover-background: var(--color-brand-secondary-dark-teal-blue);background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._menu-secondary_1s2i7_71{--menu-item-hover-background: var(--surface-surface-secondary);background-color:var(--surface-surface-secondary-btn);color:var(--text-text-links)}._menu-secondary-transparent_1s2i7_77{--menu-item-hover-background: var(--color-neutrals-neutral-2);background-color:var(--color-neutrals-neutral-1);color:#000}._menu-cta-primary_1s2i7_83{--menu-item-hover-background: var(--surface-surface-call-to-action-btn-focus);background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._menu-tertiary_1s2i7_89{--menu-item-hover-background: var(--surface-surface-tertiary-btn-focus);background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._menu-destructive_1s2i7_95{--menu-item-hover-background: var(--border-border-error-warning);background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._menuList_1s2i7_101{display:flex;flex-direction:column;width:100%}._menuItem_1s2i7_107{background:transparent;border:none;border-radius:var(--border-radius-xs);color:inherit;cursor:pointer;display:flex;justify-content:flex-start;padding:var(--spacing-spacing-3xs);text-align:left;width:100%;box-sizing:border-box}._menuItem_1s2i7_107:hover{background:var(--menu-item-hover-background)}._menuItem_1s2i7_107:disabled{color:var(--surface-surface-disabled-btn);cursor:default}._menuItem_1s2i7_107:disabled:hover{background:transparent}
@@ -1,94 +1,101 @@
1
- import { jsxs as L, jsx as o } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { c } from "../../clsx-OuTLNxxd.js";
4
- import { getHideAtStyles as R } from "../HideAt.js";
5
- import { Icon as $ } from "../Icon/Icon.js";
6
- import { Popover as k } from "../Popover/Popover.js";
7
- import { buttonClassNames as b } from "../Button/buttonClassName.js";
8
- import { Text as W } from "../Text/Text.js";
9
- import '../../assets/DropdownButton.css';const j = "_root_1q683_1", B = "_segment_1q683_6", D = "_actionSegment_1q683_22", M = "_toggleSegment_1q683_39", T = "_menu_1q683_58", A = "_menuList_1q683_65", E = "_menuItem_1q683_71", n = {
10
- root: j,
11
- segment: B,
12
- "segment-sm": "_segment-sm_1q683_10",
13
- "segment-md": "_segment-md_1q683_14",
14
- "segment-lg": "_segment-lg_1q683_18",
15
- actionSegment: D,
16
- "actionSegment-sm": "_actionSegment-sm_1q683_27",
17
- "actionSegment-md": "_actionSegment-md_1q683_31",
18
- "actionSegment-lg": "_actionSegment-lg_1q683_35",
19
- toggleSegment: M,
20
- "toggleSegment-sm": "_toggleSegment-sm_1q683_46",
21
- "toggleSegment-md": "_toggleSegment-md_1q683_50",
22
- "toggleSegment-lg": "_toggleSegment-lg_1q683_54",
23
- menu: T,
24
- menuList: A,
25
- menuItem: E
1
+ import { jsxs as R, jsx as o } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { c as s } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as $ } from "../HideAt.js";
5
+ import { Icon as k } from "../Icon/Icon.js";
6
+ import { Popover as W } from "../Popover/Popover.js";
7
+ import { buttonClassNames as S } from "../Button/buttonClassName.js";
8
+ import { Text as j } from "../Text/Text.js";
9
+ import '../../assets/DropdownButton.css';const B = "_root_1s2i7_1", D = "_segment_1s2i7_6", M = "_actionSegment_1s2i7_22", T = "_toggleSegment_1s2i7_39", A = "_menu_1s2i7_58", E = "_menuList_1s2i7_101", H = "_menuItem_1s2i7_107", n = {
10
+ root: B,
11
+ segment: D,
12
+ "segment-sm": "_segment-sm_1s2i7_10",
13
+ "segment-md": "_segment-md_1s2i7_14",
14
+ "segment-lg": "_segment-lg_1s2i7_18",
15
+ actionSegment: M,
16
+ "actionSegment-sm": "_actionSegment-sm_1s2i7_27",
17
+ "actionSegment-md": "_actionSegment-md_1s2i7_31",
18
+ "actionSegment-lg": "_actionSegment-lg_1s2i7_35",
19
+ toggleSegment: T,
20
+ "toggleSegment-sm": "_toggleSegment-sm_1s2i7_46",
21
+ "toggleSegment-md": "_toggleSegment-md_1s2i7_50",
22
+ "toggleSegment-lg": "_toggleSegment-lg_1s2i7_54",
23
+ menu: A,
24
+ "menu-primary": "_menu-primary_1s2i7_65",
25
+ "menu-secondary": "_menu-secondary_1s2i7_71",
26
+ "menu-secondary-transparent": "_menu-secondary-transparent_1s2i7_77",
27
+ "menu-cta-primary": "_menu-cta-primary_1s2i7_83",
28
+ "menu-tertiary": "_menu-tertiary_1s2i7_89",
29
+ "menu-destructive": "_menu-destructive_1s2i7_95",
30
+ menuList: E,
31
+ menuItem: H
26
32
  };
27
33
  function U({
28
- children: f,
29
- options: s,
30
- menuLabel: p = "More actions",
31
- toggleLabel: q = "Open actions menu",
34
+ children: p,
35
+ options: u,
36
+ menuLabel: b = "More actions",
37
+ toggleLabel: d = "Open actions menu",
32
38
  styles: t,
33
39
  size: e,
34
- variant: l,
35
- hideAt: h,
36
- className: d,
37
- disabled: a,
40
+ variant: c,
41
+ hideAt: f,
42
+ className: h,
43
+ disabled: _,
38
44
  type: N = "button",
39
45
  ...x
40
46
  }) {
41
- const r = s.length > 0, _ = a || !r, I = e === "sm" ? "xs" : e === "md" ? "sm" : "md", i = u.useRef(null), [w, C] = u.useState();
42
- return u.useLayoutEffect(() => {
43
- const g = i.current;
47
+ const C = u.length > 0, a = _ || !C, I = e === "sm" ? "xs" : e === "md" ? "sm" : "md", l = i.useRef(null), [w, L] = i.useState();
48
+ return i.useLayoutEffect(() => {
49
+ const g = l.current;
44
50
  if (!g) return;
45
51
  const m = () => {
46
- C(g.getBoundingClientRect().width + 2);
52
+ L(g.getBoundingClientRect().width + 2);
47
53
  };
48
54
  m();
49
- const S = new ResizeObserver(m);
50
- return S.observe(g), () => {
51
- S.disconnect();
55
+ const r = new ResizeObserver(m);
56
+ return r.observe(g), () => {
57
+ r.disconnect();
52
58
  };
53
- }, []), /* @__PURE__ */ L(
59
+ }, []), /* @__PURE__ */ R(
54
60
  "div",
55
61
  {
56
- ref: i,
57
- className: c(n.root, R(h), d, t == null ? void 0 : t.root),
62
+ ref: l,
63
+ className: s(n.root, $(f), h, t == null ? void 0 : t.root),
58
64
  role: "group",
59
65
  children: [
60
66
  /* @__PURE__ */ o(
61
67
  "button",
62
68
  {
63
- className: c(
64
- b({ size: e, variant: l, disabled: a, className: t == null ? void 0 : t.action }),
69
+ className: s(
70
+ S({ size: e, variant: c, disabled: _, className: t == null ? void 0 : t.action }),
65
71
  n.segment,
66
72
  n[`segment-${e}`],
67
73
  n[`actionSegment-${e}`],
68
74
  n.actionSegment
69
75
  ),
70
- disabled: a,
76
+ disabled: _,
71
77
  type: N,
72
78
  ...x,
73
- children: f
79
+ children: p
74
80
  }
75
81
  ),
76
82
  /* @__PURE__ */ o(
77
- k,
83
+ W,
78
84
  {
79
- disabled: _,
85
+ disabled: a,
80
86
  position: "bottom right",
81
- contentClassName: c(n.menu, t == null ? void 0 : t.menu),
87
+ contentClassName: s(n.menu, n[`menu-${c}`], t == null ? void 0 : t.menu),
82
88
  contentStyle: { width: w },
89
+ closeOnOutsideClick: !0,
83
90
  trigger: /* @__PURE__ */ o(
84
91
  "button",
85
92
  {
86
93
  type: "button",
87
- className: c(
88
- b({
94
+ className: s(
95
+ S({
89
96
  size: e,
90
- variant: l,
91
- disabled: _,
97
+ variant: c,
98
+ disabled: a,
92
99
  className: t == null ? void 0 : t.toggle
93
100
  }),
94
101
  n.segment,
@@ -96,22 +103,22 @@ function U({
96
103
  n[`toggleSegment-${e}`],
97
104
  n.toggleSegment
98
105
  ),
99
- "aria-label": q,
100
- disabled: _,
101
- children: /* @__PURE__ */ o($, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
106
+ "aria-label": d,
107
+ disabled: a,
108
+ children: /* @__PURE__ */ o(k, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
102
109
  }
103
110
  ),
104
- children: ({ close: g }) => /* @__PURE__ */ o("div", { className: n.menuList, role: "menu", "aria-label": p, children: s.map((m) => /* @__PURE__ */ o(
111
+ children: ({ close: g }) => /* @__PURE__ */ o("div", { className: n.menuList, role: "menu", "aria-label": b, children: u.map((m) => /* @__PURE__ */ o(
105
112
  "button",
106
113
  {
107
114
  type: "button",
108
115
  role: "menuitem",
109
- className: c(n.menuItem, t == null ? void 0 : t.menuItem),
116
+ className: s(n.menuItem, t == null ? void 0 : t.menuItem),
110
117
  disabled: m.disabled,
111
118
  onClick: () => {
112
119
  m.onClick(), g();
113
120
  },
114
- children: /* @__PURE__ */ o(W, { size: I, children: m.label })
121
+ children: /* @__PURE__ */ o(j, { size: I, children: m.label })
115
122
  },
116
123
  m.key
117
124
  )) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.207",
4
+ "version": "0.0.208",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",