@pie-lib/math-input 9.0.8-next.20261027193325 → 9.0.8-next.20261103123052

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.
@@ -12,15 +12,14 @@ import u from "debug";
12
12
  import { color as d } from "@pie-lib/render-ui";
13
13
  import { jsx as f } from "react/jsx-runtime";
14
14
  //#region src/keypad/index.tsx
15
- var p = u("pie-lib:math-inline:keypad"), m = d.v("pie"), h = [d.text(), d.keypadInk()], g = { "& .MuiTouchRipple-root": { color: `rgb(from ${d.text()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))` } }, _ = { "&.Mui-focusVisible": {
16
- outline: `2px solid ${d.focusOutline()}`,
17
- outlineOffset: "-2px",
18
- boxShadow: `inset 0 0 0 4px ${m("background", d.defaults.WHITE)}`
19
- } }, v = l(n)(({ latex: e }) => {
15
+ var p = u("pie-lib:math-inline:keypad"), m = [d.text(), d.keypadInk()], h = { "& .MuiTouchRipple-root": { color: `rgb(from ${d.text()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))` } }, g = { "&.Mui-focusVisible": {
16
+ outline: `4px solid ${d.keyboardFocusOutline()}`,
17
+ outlineOffset: "-4px"
18
+ } }, _ = l(n)(({ latex: e }) => {
20
19
  let t = {
21
20
  pointerEvents: "none",
22
21
  textTransform: "none !important",
23
- color: h,
22
+ color: m,
24
23
  "& .mq-scaled.mq-sqrt-prefix": { transform: "scale(1, 0.9) !important" },
25
24
  "& .mq-sup-only .mq-sup": { marginBottom: "0.9px !important" },
26
25
  "& .mq-empty": { backgroundColor: `${d.keypadEmptyPlaceholder()} !important` },
@@ -114,12 +113,12 @@ var p = u("pie-lib:math-inline:keypad"), m = d.v("pie"), h = [d.text(), d.keypad
114
113
  }
115
114
  } : t;
116
115
  });
117
- v.propTypes = { latex: o.string.isRequired };
118
- var y = (e) => e ? {
116
+ _.propTypes = { latex: o.string.isRequired };
117
+ var v = (e) => e ? {
119
118
  gridTemplateColumns: `repeat(${e.columns}, minmax(min-content, 150px))`,
120
119
  gridTemplateRows: `repeat(${e.rows}, minmax(40px, 60px))`,
121
120
  gridAutoFlow: "initial"
122
- } : {}, b = l("div")(() => ({
121
+ } : {}, y = l("div")(() => ({
123
122
  ...t,
124
123
  width: "100%",
125
124
  display: "grid",
@@ -135,19 +134,19 @@ var y = (e) => e ? {
135
134
  gridTemplateRows: "repeat(4, minmax(40px, 50px)) !important",
136
135
  "& *": { fontFamily: "Roboto, Helvetica, Arial, sans-serif !important" }
137
136
  }
138
- })), x = l(s)(({ category: e, isDelete: t, isComma: n, isDot: r }) => ({
137
+ })), b = l(s)(({ category: e, isDelete: t, isComma: n, isDot: r }) => ({
139
138
  minWidth: "auto",
140
139
  textTransform: "none",
141
140
  fontSize: n || r ? "200% !important" : "140% !important",
142
141
  lineHeight: n || r ? "100%" : "normal",
143
- color: h,
142
+ color: m,
144
143
  backgroundColor: e === "operators" ? d.keypadButtonOperator() : d.keypadButton(),
145
144
  "&:hover": { backgroundColor: e === "operators" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() },
145
+ ...h,
146
146
  ...g,
147
- ..._,
148
147
  borderRadius: 0,
149
148
  ...t && { fontFamily: "Roboto, Helvetica, Arial, sans-serif !important" }
150
- })), S = l(s)(({ category: e }) => ({
149
+ })), x = l(s)(({ category: e }) => ({
151
150
  textTransform: "none",
152
151
  padding: 0,
153
152
  margin: 0,
@@ -156,15 +155,15 @@ var y = (e) => e ? {
156
155
  borderRadius: 0,
157
156
  backgroundColor: e === "operators" ? d.keypadButtonOperator() : d.keypadButton(),
158
157
  "&:hover": { backgroundColor: e === "operators" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() },
159
- ...g,
160
- ..._
161
- })), C = l(c)(({ category: e }) => ({
158
+ ...h,
159
+ ...g
160
+ })), S = l(c)(({ category: e }) => ({
162
161
  minWidth: "auto",
163
162
  backgroundColor: e === "operators" ? d.keypadButtonOperator() : d.keypadButton(),
164
163
  "&:hover": { backgroundColor: e === "operators" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() },
165
164
  borderRadius: 0,
166
165
  "& .icon": { height: "30px" }
167
- })), w = class extends a.Component {
166
+ })), C = class extends a.Component {
168
167
  static propTypes = {
169
168
  className: o.string,
170
169
  controlledKeypadMode: o.bool,
@@ -229,9 +228,9 @@ var y = (e) => e ? {
229
228
  "language"
230
229
  ].includes(a), s = o ? this.flowKeys([], n || []) : this.flowKeys(t, n || []), c = s.length % 5 ? 1 : 0, l = {
231
230
  gridTemplateColumns: `repeat(${Math.floor(s.length / 5) + c}, minmax(min-content, 150px))`,
232
- ...y(r)
231
+ ...v(r)
233
232
  };
234
- return /* @__PURE__ */ f(b, {
233
+ return /* @__PURE__ */ f(y, {
235
234
  ref: this.keypadRef,
236
235
  className: [e, a].filter(Boolean).join(" "),
237
236
  style: l,
@@ -239,7 +238,7 @@ var y = (e) => e ? {
239
238
  children: s.map((e, t) => {
240
239
  let n = this.buttonClick.bind(this, e);
241
240
  if (!e) return /* @__PURE__ */ f("span", {}, `empty-${t}`);
242
- if (!(e.label || e.latex || e.icon || e.command || e.keystroke || e.write || e.type || e.actions || e.extraProps)) return /* @__PURE__ */ f(x, {
241
+ if (!(e.label || e.latex || e.icon || e.command || e.keystroke || e.write || e.type || e.actions || e.extraProps)) return /* @__PURE__ */ f(b, {
243
242
  disabled: !0,
244
243
  "aria-hidden": "true",
245
244
  tabIndex: -1,
@@ -252,16 +251,18 @@ var y = (e) => e ? {
252
251
  ...e.actions || {},
253
252
  ...e.extraProps || {}
254
253
  };
255
- if (e.latex) return /* @__PURE__ */ f(S, {
254
+ if (e.latex) return /* @__PURE__ */ f(x, {
255
+ disableFocusRipple: !0,
256
256
  onClick: r.onClick,
257
257
  disabled: r.disabled,
258
258
  category: o ? void 0 : e.category,
259
259
  "aria-label": e.ariaLabel ? e.ariaLabel : e.name || e.label,
260
260
  ...e.actions || {},
261
261
  ...e.extraProps || {},
262
- children: /* @__PURE__ */ f(v, { latex: e.latex })
262
+ children: /* @__PURE__ */ f(_, { latex: e.latex })
263
263
  }, r.key);
264
- if (e.label) return /* @__PURE__ */ f(x, {
264
+ if (e.label) return /* @__PURE__ */ f(b, {
265
+ disableFocusRipple: !0,
265
266
  onClick: r.onClick,
266
267
  disabled: r.disabled,
267
268
  category: o ? void 0 : e.category,
@@ -275,7 +276,8 @@ var y = (e) => e ? {
275
276
  }, r.key);
276
277
  {
277
278
  let t = e.icon ? e.icon : "div";
278
- return /* @__PURE__ */ f(C, {
279
+ return /* @__PURE__ */ f(S, {
280
+ disableFocusRipple: !0,
279
281
  tabIndex: "-1",
280
282
  onClick: r.onClick,
281
283
  disabled: r.disabled,
@@ -291,4 +293,4 @@ var y = (e) => e ? {
291
293
  }
292
294
  };
293
295
  //#endregion
294
- export { w as KeyPad, w as default };
296
+ export { C as KeyPad, C as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/math-input",
3
- "version": "9.0.8-next.20261027193325",
3
+ "version": "9.0.8-next.20261103123052",
4
4
  "description": "React implementation of @pie-lib/math-input",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,8 +16,8 @@
16
16
  "debug": "^4.1.1",
17
17
  "prop-types": "^15.7.2",
18
18
  "@pie-element/shared-lodash": "0.1.4-next.20261026212738",
19
- "@pie-lib/render-ui": "8.0.8-next.20261027193325",
20
- "@pie-lib/translator": "5.0.3-next.20261027184745"
19
+ "@pie-lib/render-ui": "8.0.8-next.20261103123052",
20
+ "@pie-lib/translator": "5.0.3-next.20261103123052"
21
21
  },
22
22
  "type": "module",
23
23
  "main": "./dist/index.js",