asma-ui-core 3.78.3 → 3.78.4

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,19 +1,18 @@
1
- import { cn as b } from "../../../helpers/cn.js";
2
- import { ChevronDownIcon as F } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { ChevronUpIcon as O } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
1
+ import { cn as C } from "../../../helpers/cn.js";
2
+ import { ChevronDownIcon as j } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
+ import { ChevronUpIcon as z } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
4
4
  import h from "./Pathfinder.module.js";
5
- import { useCallback as I, useEffect as M, useLayoutEffect as j, useMemo as y, useRef as R, useState as x, useSyncExternalStore as P } from "react";
6
- import { Fragment as D, jsx as e, jsxs as k } from "react/jsx-runtime";
7
- var _ = typeof window < "u" ? j : M;
5
+ import { useCallback as R, useEffect as M, useLayoutEffect as O, useMemo as y, useRef as k, useState as x, useSyncExternalStore as P } from "react";
6
+ import { Fragment as D, jsx as e, jsxs as I } from "react/jsx-runtime";
7
+ var _ = typeof window < "u" ? O : M;
8
8
  function q() {
9
- const [i, n] = x(null), d = I((t) => {
9
+ const [i, n] = x(null), d = R((t) => {
10
10
  n(t);
11
- }, []), s = I(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
11
+ }, []), s = R(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
12
12
  return {
13
13
  ref: d,
14
- width: P(I((t) => {
14
+ width: P(R((t) => {
15
15
  if (!i || typeof ResizeObserver > "u") return () => {
16
- console.log("Node is missing or ResizeObserver is undefined");
17
16
  };
18
17
  let a = 0;
19
18
  const o = new ResizeObserver(() => {
@@ -32,15 +31,15 @@ function A(i) {
32
31
  });
33
32
  }
34
33
  function K(i) {
35
- const { items: n, leadSlot: d, actionSlot: s } = i, t = R({}), a = R(null), o = R(null), [l, v] = x({
34
+ const { items: n, leadSlot: d, actionSlot: s } = i, t = k({}), a = k(null), o = k(null), [l, v] = x({
36
35
  itemWidths: {},
37
36
  leadWidth: 0,
38
37
  actionWidth: 0
39
- }), f = R(l);
38
+ }), f = k(l);
40
39
  M(() => {
41
40
  f.current = l;
42
41
  }, [l]);
43
- const p = I((r) => (m) => {
42
+ const p = R((r) => (m) => {
44
43
  t.current[r] = m;
45
44
  }, []);
46
45
  return _(() => {
@@ -76,7 +75,7 @@ function U(i) {
76
75
  }
77
76
  return a;
78
77
  }
79
- function C({ item: i, compact: n }) {
78
+ function b({ item: i, compact: n }) {
80
79
  return /* @__PURE__ */ e(D, { children: i.render({ compact: n }) });
81
80
  }
82
81
  function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot: t, className: a, leadReservePx: o = 140, actionReservePx: l = 44 }) {
@@ -86,10 +85,10 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
86
85
  actionSlot: t
87
86
  }), w = y(() => {
88
87
  if (n) return r;
89
- const c = 24, L = 24, z = s ? Math.max(o, m.leadWidth + 12) : 0, B = t ? Math.max(l, m.actionWidth) : 0;
88
+ const c = 24, L = 24, B = s ? Math.max(o, m.leadWidth + 12) : 0, F = t ? Math.max(l, m.actionWidth) : 0;
90
89
  return U({
91
90
  items: r,
92
- availableWidth: Math.max(0, f - c - L - z - B - 24),
91
+ availableWidth: Math.max(0, f - c - L - B - F - 24),
93
92
  gapPx: 12,
94
93
  itemWidths: m.itemWidths
95
94
  });
@@ -103,9 +102,9 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
103
102
  l,
104
103
  m
105
104
  ]), N = p && w.length < Math.min(2, r.length), E = N ? r.slice(0, 2) : w;
106
- return /* @__PURE__ */ k("div", {
105
+ return /* @__PURE__ */ I("div", {
107
106
  ref: v,
108
- className: b(h.root, p ? "overflow-hidden" : "overflow-visible", a),
107
+ className: C(h.root, p ? "overflow-hidden" : "overflow-visible", a),
109
108
  "aria-expanded": n,
110
109
  role: "button",
111
110
  tabIndex: 0,
@@ -114,27 +113,27 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
114
113
  (c.key === "Enter" || c.key === " ") && (c.preventDefault(), d());
115
114
  },
116
115
  children: [
117
- /* @__PURE__ */ k("div", {
118
- className: b(h.shell, p ? h.shellCompact : h.shellExpanded),
116
+ /* @__PURE__ */ I("div", {
117
+ className: C(h.shell, p ? h.shellCompact : h.shellExpanded),
119
118
  children: [s ? /* @__PURE__ */ e("div", {
120
119
  className: "shrink-0",
121
120
  children: s
122
121
  }) : null, /* @__PURE__ */ e("div", {
123
122
  className: h.content,
124
123
  children: p ? /* @__PURE__ */ e("div", {
125
- className: b(h.compactItems, N && h.compactItemsStacked),
124
+ className: C(h.compactItems, N && h.compactItemsStacked),
126
125
  children: E.map((c) => /* @__PURE__ */ e("div", {
127
126
  className: "shrink-0 whitespace-nowrap",
128
- children: /* @__PURE__ */ e(C, {
127
+ children: /* @__PURE__ */ e(b, {
129
128
  item: c,
130
129
  compact: p
131
130
  })
132
131
  }, c.id))
133
- }) : /* @__PURE__ */ k("div", {
132
+ }) : /* @__PURE__ */ I("div", {
134
133
  className: h.expandedItems,
135
134
  children: [r.map((c) => /* @__PURE__ */ e("div", {
136
135
  className: "shrink-0 whitespace-nowrap",
137
- children: /* @__PURE__ */ e(C, {
136
+ children: /* @__PURE__ */ e(b, {
138
137
  item: c,
139
138
  compact: p
140
139
  })
@@ -150,12 +149,12 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
150
149
  }),
151
150
  /* @__PURE__ */ e("div", {
152
151
  className: h.chevron,
153
- children: n ? /* @__PURE__ */ e(O, { className: "size-6" }) : /* @__PURE__ */ e(F, { className: "size-6" })
152
+ children: n ? /* @__PURE__ */ e(z, { className: "size-6" }) : /* @__PURE__ */ e(j, { className: "size-6" })
154
153
  }),
155
154
  /* @__PURE__ */ e("div", {
156
155
  "aria-hidden": !0,
157
156
  className: h.measureLayer,
158
- children: /* @__PURE__ */ k("div", {
157
+ children: /* @__PURE__ */ I("div", {
159
158
  className: h.measureRow,
160
159
  children: [
161
160
  s ? /* @__PURE__ */ e("div", {
@@ -168,7 +167,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: d, leadSlot: s, actionSlot
168
167
  r.map((c) => /* @__PURE__ */ e("div", {
169
168
  ref: g(c.id),
170
169
  className: "shrink-0 whitespace-nowrap",
171
- children: /* @__PURE__ */ e(C, {
170
+ children: /* @__PURE__ */ e(b, {
172
171
  item: c,
173
172
  compact: !0
174
173
  })
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.78.3",
6
+ "version": "3.78.4",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",
@@ -6,6 +6,17 @@
6
6
  --colors-alpha-600: var(--colors-blue-600);
7
7
  --colors-alpha-700: var(--colors-blue-700);
8
8
  --colors-beta-100: var(--colors-red-100);
9
+ /* Focus-indicator shade for the three error-button *-focused-border-color rules.
10
+ Chosen by measurement on the rendered baseline, not by ramp position:
11
+ 2.4.7 Focus Visible (AA) PASS - a ring renders where contained/outlined/text
12
+ previously painted none.
13
+ 1.4.11 Non-text Contrast(AA) PASS - contained 8.37:1 against white on both sides
14
+ (a 1px white inset separates it from the fill,
15
+ itself 4.96:1); outlined and text 8.37:1 vs
16
+ page and 6.56:1 vs fill.
17
+ 2.4.13 Focus Appearance(AAA) not claimed, outside this library's AA scope.
18
+ See docs/a11y-contrast.md (F-15) for the derivation and per-theme numbers. */
19
+ --colors-beta-400: var(--colors-red-700);
9
20
  --colors-beta-500: var(--colors-red-500);
10
21
  --colors-beta-600: var(--colors-red-600);
11
22
  --colors-beta-700: var(--colors-red-700);
@@ -178,8 +178,8 @@
178
178
  --colors-button-textWhite-common-disabled-bg-color: transparent;
179
179
  --colors-button-textWhite-common-disabled-border-color: transparent;
180
180
 
181
- --colors-colors-btn-bg-mini-action: var(--colors-zinc-100);
182
- --colors-colors-btn-bg-mini-action-hover: var(--colors-gama-700);
181
+ --colors-btn-bg-mini-action: var(--colors-zinc-100);
182
+ --colors-btn-bg-mini-action-hover: var(--colors-gama-700);
183
183
  --colors-link-text-hover: var(--colors-red-700);
184
184
  --colors-link-text-standart: var(--colors-gray-500);
185
185
  --colors-link-text-active: var(--colors-red-700);
@@ -188,7 +188,7 @@
188
188
  --colors-app-directory-button-select-recipient-bg: var(--colors-slate-500);
189
189
  --colors-btn-task-status-bg: var(--colors-green-100);
190
190
  --colors-chat-ticket-message-bg: var(--colors-alpha-500);
191
- --colors-colors-topbar-text: #ffffff;
191
+ --colors-topbar-text: #ffffff;
192
192
 
193
193
  --colors-menu-text-active: var(--colors-beta-700);
194
194
  }
@@ -1,5 +1,16 @@
1
1
  [data-theme='greenish'] {
2
2
  --colors-beta-100: var(--colors-red-100);
3
+ /* Focus-indicator shade for the three error-button *-focused-border-color rules.
4
+ Chosen by measurement on the rendered baseline, not by ramp position:
5
+ 2.4.7 Focus Visible (AA) PASS - a ring renders where contained/outlined/text
6
+ previously painted none.
7
+ 1.4.11 Non-text Contrast(AA) PASS - contained 8.37:1 against white on both sides
8
+ (a 1px white inset separates it from the fill,
9
+ itself 4.96:1); outlined and text 8.37:1 vs
10
+ page and 6.56:1 vs fill.
11
+ 2.4.13 Focus Appearance(AAA) not claimed, outside this library's AA scope.
12
+ See docs/a11y-contrast.md (F-15) for the derivation and per-theme numbers. */
13
+ --colors-beta-400: var(--colors-red-700);
3
14
  --colors-beta-500: var(--colors-red-500);
4
15
  --colors-beta-600: var(--colors-red-600);
5
16
  --colors-beta-700: var(--colors-red-700);
@@ -1,3 +1,12 @@
1
+ /*
2
+ * Declared on :root as well as the theme blocks: a host page that renders without any
3
+ * data-theme attribute must still get valid --colors-input-* / --input-* values (otherwise every
4
+ * var() below is invalid-at-computed-value-time and StyledTextarea falls back to inherited or
5
+ * initial colors). All three themes share these values today, so listing :root alongside them is
6
+ * exact -- the theme selectors stay in place, and because they come later in the selector list
7
+ * they continue to win on equal specificity once a theme starts overriding a token.
8
+ */
9
+ :root,
1
10
  [data-theme='default'],
2
11
  [data-theme='fretex'],
3
12
  [data-theme='greenish'] {
@@ -65,7 +74,7 @@
65
74
  --colors-input-notEditable-focus-bg-color: var(--colors-delta-50);
66
75
  --colors-input-notEditable-disabled-bg-color: var(--colors-delta-50);
67
76
  --colors-input-notEditable-text-color: var(--colors-delta-800);
68
- --colors-input-active-hover-text-color: var(--colors-delta-800);
77
+ --colors-input-notEditable-hover-text-color: var(--colors-delta-800);
69
78
  --colors-input-notEditable-active-text-color: var(--colors-delta-800);
70
79
  --colors-input-notEditable-focus-text-color: var(--colors-delta-800);
71
80
  --colors-input-notEditable-disabled-text-color: var(--colors-delta-300);
@@ -95,10 +104,10 @@
95
104
  --colors-input-readOnly-focus-bg-color: transparent;
96
105
  --colors-input-readOnly-disabled-bg-color: transparent;
97
106
  --colors-input-readOnly-text-color: var(--colors-delta-800);
98
- --colors-input-active-hover-text-color: var(--colors-delta-800);
107
+ --colors-input-readOnly-hover-text-color: var(--colors-delta-800);
99
108
  --colors-input-readOnly-active-text-color: var(--colors-delta-800);
100
109
  --colors-input-readOnly-focus-text-color: var(--colors-delta-800);
101
- --colors-input-readOnly-active-text-color: var(--colors-delta-300);
110
+ --colors-input-readOnly-disabled-text-color: var(--colors-delta-300);
102
111
  --input-readOnly-cursor: text;
103
112
  --input-readOnly-hover-cursor: text;
104
113
  --input-readOnly-active-cursor: text;
@@ -37,7 +37,7 @@
37
37
  "delta-700": "var(--colors-delta-700)",
38
38
  "delta-800": "var(--colors-delta-800)",
39
39
  "delta-900": "var(--colors-delta-900)",
40
- "delta-9000": "var(--colors-gray-9000)",
40
+ "delta-9000": "var(--colors-delta-9000)",
41
41
  "sigma-700": "var(--colors-sigma-700)",
42
42
  "theta-100": "var(--colors-theta-100)",
43
43
  "theta-200": "var(--colors-theta-200)",
@@ -83,11 +83,11 @@
83
83
  "btn-bg-mini-action-hover": "var(--colors-btn-bg-mini-action-hover)",
84
84
  "chat-ticket-message-bg": "var(--colors-chat-ticket-message-bg)",
85
85
  "colors-topbar-text": "var(--colors-topbar-text)",
86
- "custom-grey-01": "hsl(var(--color-cardea--grey-01) / <alpha-value>)",
87
- "custom-grey-02": "hsl(var(--color-cardea--grey-02) / <alpha-value>)",
88
- "custom-grey-03": "hsl(var(--color-cardea--grey-03) / <alpha-value>)",
89
- "custom-grey-04": "hsl(var(--color-cardea--grey-04) / <alpha-value>)",
90
- "custom-grey-06": "hsl(var(--color-cardea--grey-06) / <alpha-value>)"
86
+ "custom-grey-01": "hsl(var(--colors-cardea--grey-01) / <alpha-value>)",
87
+ "custom-grey-02": "hsl(var(--colors-cardea--grey-02) / <alpha-value>)",
88
+ "custom-grey-03": "hsl(var(--colors-cardea--grey-03) / <alpha-value>)",
89
+ "custom-grey-04": "hsl(var(--colors-cardea--grey-04) / <alpha-value>)",
90
+ "custom-grey-06": "hsl(var(--colors-cardea--grey-06) / <alpha-value>)"
91
91
  },
92
92
  "boxShadow": {
93
93
  "ash": "-1px 8px 18px -20px black",