@pie-lib/config-ui 13.0.3 → 13.0.4-next.0

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.
Files changed (188) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/alert-dialog.d.ts +44 -0
  3. package/dist/alert-dialog.js +47 -0
  4. package/dist/checkbox.d.ts +34 -0
  5. package/dist/checkbox.js +57 -0
  6. package/dist/choice-configuration/feedback-menu.d.ts +32 -0
  7. package/dist/choice-configuration/feedback-menu.js +85 -0
  8. package/dist/choice-configuration/index.d.ts +62 -0
  9. package/dist/choice-configuration/index.js +240 -0
  10. package/dist/choice-utils.d.ts +21 -0
  11. package/dist/choice-utils.js +15 -0
  12. package/dist/feedback-config/feedback-selector.d.ts +33 -0
  13. package/dist/feedback-config/feedback-selector.js +92 -0
  14. package/dist/feedback-config/group.d.ts +21 -0
  15. package/dist/feedback-config/group.js +33 -0
  16. package/dist/feedback-config/index.d.ts +48 -0
  17. package/dist/feedback-config/index.js +96 -0
  18. package/dist/form-section.d.ts +25 -0
  19. package/dist/form-section.js +25 -0
  20. package/dist/help.d.ts +41 -0
  21. package/dist/help.js +61 -0
  22. package/dist/index.d.ts +31 -0
  23. package/dist/index.js +34 -0
  24. package/dist/input.d.ts +29 -0
  25. package/dist/input.js +65 -0
  26. package/dist/inputs.d.ts +63 -0
  27. package/dist/inputs.js +70 -0
  28. package/dist/langs.d.ts +41 -0
  29. package/dist/langs.js +76 -0
  30. package/dist/layout/config-layout.d.ts +10 -0
  31. package/dist/layout/config-layout.js +75 -0
  32. package/dist/layout/index.d.ts +11 -0
  33. package/dist/layout/index.js +10 -0
  34. package/dist/layout/layout-contents.d.ts +21 -0
  35. package/dist/layout/layout-contents.js +70 -0
  36. package/dist/layout/settings-box.d.ts +19 -0
  37. package/dist/layout/settings-box.js +31 -0
  38. package/dist/mui-box/index.d.ts +21 -0
  39. package/dist/mui-box/index.js +47 -0
  40. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  41. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
  42. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  43. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  44. package/dist/node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js +122 -0
  45. package/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +276 -0
  46. package/dist/number-text-field-custom.d.ts +51 -0
  47. package/dist/number-text-field-custom.js +192 -0
  48. package/dist/number-text-field.d.ts +47 -0
  49. package/dist/number-text-field.js +122 -0
  50. package/dist/radio-with-label.d.ts +25 -0
  51. package/dist/radio-with-label.js +27 -0
  52. package/dist/settings/display-size.d.ts +26 -0
  53. package/dist/settings/display-size.js +45 -0
  54. package/dist/settings/index.d.ts +45 -0
  55. package/dist/settings/index.js +63 -0
  56. package/dist/settings/panel.d.ts +27 -0
  57. package/dist/settings/panel.js +201 -0
  58. package/dist/settings/settings-radio-label.d.ts +25 -0
  59. package/dist/settings/settings-radio-label.js +29 -0
  60. package/dist/settings/toggle.d.ts +25 -0
  61. package/dist/settings/toggle.js +33 -0
  62. package/dist/tabs/index.d.ts +22 -0
  63. package/dist/tabs/index.js +39 -0
  64. package/dist/tags-input/index.d.ts +21 -0
  65. package/dist/tags-input/index.js +83 -0
  66. package/dist/two-choice.d.ts +43 -0
  67. package/dist/two-choice.js +79 -0
  68. package/dist/with-stateful-model.d.ts +42 -0
  69. package/dist/with-stateful-model.js +32 -0
  70. package/package.json +30 -18
  71. package/CHANGELOG.json +0 -32
  72. package/CHANGELOG.md +0 -2419
  73. package/LICENSE.md +0 -5
  74. package/lib/alert-dialog.js +0 -68
  75. package/lib/alert-dialog.js.map +0 -1
  76. package/lib/checkbox.js +0 -84
  77. package/lib/checkbox.js.map +0 -1
  78. package/lib/choice-configuration/feedback-menu.js +0 -129
  79. package/lib/choice-configuration/feedback-menu.js.map +0 -1
  80. package/lib/choice-configuration/index.js +0 -381
  81. package/lib/choice-configuration/index.js.map +0 -1
  82. package/lib/choice-utils.js +0 -42
  83. package/lib/choice-utils.js.map +0 -1
  84. package/lib/feedback-config/feedback-selector.js +0 -155
  85. package/lib/feedback-config/feedback-selector.js.map +0 -1
  86. package/lib/feedback-config/group.js +0 -61
  87. package/lib/feedback-config/group.js.map +0 -1
  88. package/lib/feedback-config/index.js +0 -146
  89. package/lib/feedback-config/index.js.map +0 -1
  90. package/lib/form-section.js +0 -44
  91. package/lib/form-section.js.map +0 -1
  92. package/lib/help.js +0 -106
  93. package/lib/help.js.map +0 -1
  94. package/lib/index.js +0 -186
  95. package/lib/index.js.map +0 -1
  96. package/lib/input.js +0 -106
  97. package/lib/input.js.map +0 -1
  98. package/lib/inputs.js +0 -105
  99. package/lib/inputs.js.map +0 -1
  100. package/lib/langs.js +0 -136
  101. package/lib/langs.js.map +0 -1
  102. package/lib/layout/config-layout.js +0 -137
  103. package/lib/layout/config-layout.js.map +0 -1
  104. package/lib/layout/index.js +0 -21
  105. package/lib/layout/index.js.map +0 -1
  106. package/lib/layout/layout-contents.js +0 -160
  107. package/lib/layout/layout-contents.js.map +0 -1
  108. package/lib/layout/settings-box.js +0 -57
  109. package/lib/layout/settings-box.js.map +0 -1
  110. package/lib/mui-box/index.js +0 -63
  111. package/lib/mui-box/index.js.map +0 -1
  112. package/lib/number-text-field-custom.js +0 -376
  113. package/lib/number-text-field-custom.js.map +0 -1
  114. package/lib/number-text-field.js +0 -229
  115. package/lib/number-text-field.js.map +0 -1
  116. package/lib/radio-with-label.js +0 -48
  117. package/lib/radio-with-label.js.map +0 -1
  118. package/lib/settings/display-size.js +0 -61
  119. package/lib/settings/display-size.js.map +0 -1
  120. package/lib/settings/index.js +0 -110
  121. package/lib/settings/index.js.map +0 -1
  122. package/lib/settings/panel.js +0 -392
  123. package/lib/settings/panel.js.map +0 -1
  124. package/lib/settings/settings-radio-label.js +0 -51
  125. package/lib/settings/settings-radio-label.js.map +0 -1
  126. package/lib/settings/toggle.js +0 -63
  127. package/lib/settings/toggle.js.map +0 -1
  128. package/lib/tabs/index.js +0 -75
  129. package/lib/tabs/index.js.map +0 -1
  130. package/lib/tags-input/index.js +0 -149
  131. package/lib/tags-input/index.js.map +0 -1
  132. package/lib/two-choice.js +0 -136
  133. package/lib/two-choice.js.map +0 -1
  134. package/lib/with-stateful-model.js +0 -61
  135. package/lib/with-stateful-model.js.map +0 -1
  136. package/src/__tests__/alert-dialog.test.jsx +0 -183
  137. package/src/__tests__/checkbox.test.jsx +0 -152
  138. package/src/__tests__/choice-utils.test.js +0 -12
  139. package/src/__tests__/form-section.test.jsx +0 -328
  140. package/src/__tests__/help.test.jsx +0 -184
  141. package/src/__tests__/input.test.jsx +0 -156
  142. package/src/__tests__/langs.test.jsx +0 -376
  143. package/src/__tests__/number-text-field-custom.test.jsx +0 -255
  144. package/src/__tests__/number-text-field.test.jsx +0 -263
  145. package/src/__tests__/radio-with-label.test.jsx +0 -155
  146. package/src/__tests__/settings-panel.test.js +0 -187
  147. package/src/__tests__/settings.test.jsx +0 -452
  148. package/src/__tests__/tabs.test.jsx +0 -188
  149. package/src/__tests__/two-choice.test.js +0 -110
  150. package/src/__tests__/with-stateful-model.test.jsx +0 -139
  151. package/src/alert-dialog.jsx +0 -75
  152. package/src/checkbox.jsx +0 -61
  153. package/src/choice-configuration/__tests__/feedback-menu.test.jsx +0 -151
  154. package/src/choice-configuration/__tests__/index.test.jsx +0 -234
  155. package/src/choice-configuration/feedback-menu.jsx +0 -96
  156. package/src/choice-configuration/index.jsx +0 -357
  157. package/src/choice-utils.js +0 -30
  158. package/src/feedback-config/__tests__/feedback-config.test.jsx +0 -141
  159. package/src/feedback-config/__tests__/feedback-selector.test.jsx +0 -97
  160. package/src/feedback-config/feedback-selector.jsx +0 -112
  161. package/src/feedback-config/group.jsx +0 -51
  162. package/src/feedback-config/index.jsx +0 -111
  163. package/src/form-section.jsx +0 -31
  164. package/src/help.jsx +0 -79
  165. package/src/index.js +0 -55
  166. package/src/input.jsx +0 -72
  167. package/src/inputs.jsx +0 -69
  168. package/src/langs.jsx +0 -111
  169. package/src/layout/__tests__/config.layout.test.jsx +0 -59
  170. package/src/layout/__tests__/layout-content.test.jsx +0 -3
  171. package/src/layout/config-layout.jsx +0 -103
  172. package/src/layout/index.js +0 -4
  173. package/src/layout/layout-contents.jsx +0 -117
  174. package/src/layout/settings-box.jsx +0 -32
  175. package/src/mui-box/index.jsx +0 -56
  176. package/src/number-text-field-custom.jsx +0 -333
  177. package/src/number-text-field.jsx +0 -215
  178. package/src/radio-with-label.jsx +0 -30
  179. package/src/settings/display-size.jsx +0 -53
  180. package/src/settings/index.js +0 -83
  181. package/src/settings/panel.jsx +0 -333
  182. package/src/settings/settings-radio-label.jsx +0 -32
  183. package/src/settings/toggle.jsx +0 -46
  184. package/src/tabs/index.jsx +0 -47
  185. package/src/tags-input/__tests__/index.test.jsx +0 -113
  186. package/src/tags-input/index.jsx +0 -116
  187. package/src/two-choice.jsx +0 -90
  188. package/src/with-stateful-model.jsx +0 -36
package/dist/inputs.js ADDED
@@ -0,0 +1,70 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { styled as t } from "@mui/material/styles";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import * as r from "@pie-lib/render-ui";
6
+ import { InputContainer as i, color as a } from "@pie-lib/render-ui";
7
+ import o from "@mui/material/Radio";
8
+ import s from "@mui/material/Checkbox";
9
+ import c from "@mui/material/Switch";
10
+ //#region src/inputs.tsx
11
+ function l(e) {
12
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
13
+ }
14
+ function u(e, t) {
15
+ return !e || l(e) ? e : l(e.default) ? e.default : t && l(e[t]) ? e[t] : t && l(e[t]?.default) ? e[t].default : e;
16
+ }
17
+ var d = u(i, "InputContainer") || u(m.InputContainer, "InputContainer"), f = r, p = f.default, m = p && typeof p == "object" ? p : f, h = {
18
+ className: e.string,
19
+ label: e.string,
20
+ checked: e.bool,
21
+ onChange: e.func,
22
+ disabled: e.bool,
23
+ error: e.string
24
+ }, g = t(c)(() => ({
25
+ justifyContent: "inherit",
26
+ transform: "translate(-20%, 20%)"
27
+ })), _ = ({ className: e, label: t, checked: r, onChange: i }) => /* @__PURE__ */ n(d, {
28
+ className: e,
29
+ label: t,
30
+ children: /* @__PURE__ */ n(g, {
31
+ checked: r,
32
+ onChange: i,
33
+ "aria-label": t
34
+ })
35
+ });
36
+ _.propTypes = { ...h };
37
+ var v = t(s)(({ theme: e, error: t }) => ({
38
+ transform: "translate(-25%, 20%)",
39
+ color: `${a.tertiary()} !important`,
40
+ ...t && { color: `${e.palette.error.main} !important` }
41
+ })), y = ({ className: e, label: t, checked: r, onChange: i, disabled: a, error: o }) => /* @__PURE__ */ n(d, {
42
+ className: e,
43
+ label: t,
44
+ children: /* @__PURE__ */ n(v, {
45
+ disabled: a,
46
+ checked: r,
47
+ onChange: i,
48
+ "aria-label": t,
49
+ error: o
50
+ })
51
+ });
52
+ y.propTypes = { ...h };
53
+ var b = t(o)(({ theme: e, error: t }) => ({
54
+ transform: "translate(-20%, 20%)",
55
+ color: `${a.tertiary()} !important`,
56
+ ...t && { color: `${e.palette.error.main} !important` }
57
+ })), x = ({ className: e, label: t, checked: r, onChange: i, disabled: a, error: o }) => /* @__PURE__ */ n(d, {
58
+ className: e,
59
+ label: t,
60
+ children: /* @__PURE__ */ n(b, {
61
+ disabled: a,
62
+ checked: r,
63
+ onChange: i,
64
+ "aria-label": t,
65
+ error: o
66
+ })
67
+ });
68
+ x.propTypes = { ...h };
69
+ //#endregion
70
+ export { y as InputCheckbox, x as InputRadio, _ as InputSwitch };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/langs.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import PropTypes from 'prop-types';
10
+ import React from 'react';
11
+ export declare class Langs extends React.Component {
12
+ static propTypes: {
13
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
14
+ langs: PropTypes.Requireable<any[]>;
15
+ selected: PropTypes.Requireable<string>;
16
+ label: PropTypes.Requireable<string>;
17
+ uid: PropTypes.Requireable<string>;
18
+ };
19
+ constructor(props: any);
20
+ choose: any;
21
+ render(): React.JSX.Element;
22
+ }
23
+ export default Langs;
24
+ export declare const LanguageControls: {
25
+ ({ langs, activeLang, defaultLang, onActiveLangChange, onDefaultLangChange, className, }: {
26
+ langs: any;
27
+ activeLang: any;
28
+ defaultLang: any;
29
+ onActiveLangChange: any;
30
+ onDefaultLangChange: any;
31
+ className: any;
32
+ }): React.JSX.Element;
33
+ propTypes: {
34
+ langs: PropTypes.Requireable<any[]>;
35
+ activeLang: PropTypes.Validator<string>;
36
+ defaultLang: PropTypes.Validator<string>;
37
+ onActiveLangChange: PropTypes.Validator<(...args: any[]) => any>;
38
+ onDefaultLangChange: PropTypes.Validator<(...args: any[]) => any>;
39
+ className: PropTypes.Requireable<string>;
40
+ };
41
+ };
package/dist/langs.js ADDED
@@ -0,0 +1,76 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import a from "@mui/material/Input";
6
+ import o from "@mui/material/InputLabel";
7
+ import s from "@mui/material/Select";
8
+ import c from "@mui/material/MenuItem";
9
+ import l from "@mui/material/FormControl";
10
+ import u from "debug";
11
+ //#region src/langs.tsx
12
+ var d = u("pie-elements:config-ui:langs"), f = n("div")(() => ({
13
+ flexDirection: "column",
14
+ alignItems: "start",
15
+ display: "flex",
16
+ position: "relative",
17
+ paddingTop: "0px",
18
+ paddingRight: "0px"
19
+ })), p = n(l)(() => ({ position: "initial" })), m = n(o)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), h = class extends e.Component {
20
+ static propTypes = {
21
+ onChange: t.func,
22
+ langs: t.array,
23
+ selected: t.string,
24
+ label: t.string,
25
+ uid: t.string
26
+ };
27
+ constructor(e) {
28
+ super(e), this.uid = e.uid || (Math.random() * 1e4).toFixed();
29
+ }
30
+ choose = (e) => {
31
+ d("[choose] event: ", e), this.props.onChange && this.props.onChange(e.target.value);
32
+ };
33
+ render() {
34
+ let { langs: e, selected: t, label: n } = this.props;
35
+ return d("[render] selected:", t), /* @__PURE__ */ r(f, { children: /* @__PURE__ */ i(p, { children: [/* @__PURE__ */ r(m, {
36
+ htmlFor: this.uid,
37
+ children: n
38
+ }), /* @__PURE__ */ r(s, {
39
+ value: t,
40
+ onChange: this.choose,
41
+ input: /* @__PURE__ */ r(a, { id: this.uid }),
42
+ children: e.map((e, t) => /* @__PURE__ */ r(c, {
43
+ value: e,
44
+ children: e
45
+ }, t))
46
+ })] }) });
47
+ }
48
+ }, g = n("div")(() => ({
49
+ display: "grid",
50
+ gridAutoFlow: "column",
51
+ gridAutoColumns: "1fr",
52
+ gridGap: "8px"
53
+ })), _ = ({ langs: e, activeLang: t, defaultLang: n, onActiveLangChange: a, onDefaultLangChange: o, className: s }) => /* @__PURE__ */ i(g, {
54
+ className: s,
55
+ children: [/* @__PURE__ */ r(h, {
56
+ label: "Choose language to edit",
57
+ langs: e,
58
+ selected: t,
59
+ onChange: (e) => a(e)
60
+ }), /* @__PURE__ */ r(h, {
61
+ label: "Default language",
62
+ langs: e,
63
+ selected: n,
64
+ onChange: (e) => o(e)
65
+ })]
66
+ });
67
+ _.propTypes = {
68
+ langs: t.array,
69
+ activeLang: t.string.isRequired,
70
+ defaultLang: t.string.isRequired,
71
+ onActiveLangChange: t.func.isRequired,
72
+ onDefaultLangChange: t.func.isRequired,
73
+ className: t.string
74
+ };
75
+ //#endregion
76
+ export { _ as LanguageControls, h as default };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/layout/config-layout.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ declare const ConfigLayout: any;
10
+ export default ConfigLayout;
@@ -0,0 +1,75 @@
1
+ import e, { withContentRect as t } from "../node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js";
2
+ import n from "./layout-contents.js";
3
+ import r from "./settings-box.js";
4
+ import i from "react";
5
+ import a from "prop-types";
6
+ import { StyledEngineProvider as o, ThemeProvider as s, createTheme as c } from "@mui/material/styles";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ //#region src/layout/config-layout.tsx
9
+ var d = c({
10
+ typography: { fontFamily: "inherit" },
11
+ components: { MuiButton: { styleOverrides: { contained: {
12
+ backgroundColor: "#e0e0e0",
13
+ color: "#000000",
14
+ "&:hover": { backgroundColor: "#bdbdbd" }
15
+ } } } }
16
+ }), f = class extends i.Component {
17
+ static propTypes = {
18
+ children: a.oneOfType([
19
+ a.string,
20
+ a.arrayOf(a.element),
21
+ a.element
22
+ ]),
23
+ className: a.string,
24
+ dimensions: a.object,
25
+ settings: a.element,
26
+ sidePanelMinWidth: a.number,
27
+ hideSettings: a.bool,
28
+ extraCSSRules: a.shape({
29
+ names: a.arrayOf(a.string),
30
+ rules: a.string
31
+ })
32
+ };
33
+ static defaultProps = {
34
+ sidePanelMinWidth: 1135,
35
+ hideSettings: !1,
36
+ dimensions: {}
37
+ };
38
+ constructor(...e) {
39
+ super(...e), this.state = { layoutMode: void 0 };
40
+ }
41
+ onResize = (e) => {
42
+ let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
43
+ a !== this.state.layoutMode && this.setState({ layoutMode: a });
44
+ };
45
+ render() {
46
+ return /* @__PURE__ */ l(o, {
47
+ injectFirst: !0,
48
+ children: /* @__PURE__ */ l(s, {
49
+ theme: d,
50
+ children: /* @__PURE__ */ l(e, {
51
+ bounds: !0,
52
+ onResize: this.onResize,
53
+ children: ({ measureRef: e }) => {
54
+ let { children: t, settings: i, hideSettings: a, dimensions: o, extraCSSRules: s } = this.props, { layoutMode: c } = this.state, d = a ? null : c === "inline" ? /* @__PURE__ */ l(r, {
55
+ className: "settings-box",
56
+ children: i
57
+ }) : i;
58
+ return /* @__PURE__ */ u("div", {
59
+ ref: e,
60
+ className: "main-container extraCSSRules",
61
+ children: [s?.rules ? /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${s.rules} }` } }) : null, /* @__PURE__ */ l(n, {
62
+ mode: c,
63
+ secondary: d,
64
+ dimensions: o,
65
+ children: t
66
+ })]
67
+ });
68
+ }
69
+ })
70
+ })
71
+ });
72
+ }
73
+ }, p = t("bounds")(f);
74
+ //#endregion
75
+ export { p as default };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/layout/index.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import ConfigLayout from './config-layout.js';
10
+ import LayoutContents from './layout-contents.js';
11
+ export { LayoutContents, ConfigLayout };
@@ -0,0 +1,10 @@
1
+ import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
+ import t from "./layout-contents.js";
3
+ import n from "./config-layout.js";
4
+ //#region src/layout/index.ts
5
+ var r = /* @__PURE__ */ e({
6
+ ConfigLayout: () => n,
7
+ LayoutContents: () => t
8
+ });
9
+ //#endregion
10
+ export { r as layout_exports };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/layout/layout-contents.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare class RawLayoutContents extends React.Component {
12
+ static propTypes: {
13
+ mode: PropTypes.Requireable<string>;
14
+ secondary: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
15
+ children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
16
+ dimensions: PropTypes.Requireable<object>;
17
+ };
18
+ getConfiguration: any;
19
+ render(): React.JSX.Element;
20
+ }
21
+ export default RawLayoutContents;
@@ -0,0 +1,70 @@
1
+ import e from "../tabs/index.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { styled as r } from "@mui/material/styles";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ //#region src/layout/layout-contents.tsx
7
+ var o = r("div")(() => ({
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ position: "relative"
11
+ })), s = r("div")(() => ({
12
+ display: "flex",
13
+ justifyContent: "space-between"
14
+ })), c = r("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), l = r("div")(() => ({ flex: "1" })), u = r("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), d = class extends t.Component {
15
+ static propTypes = {
16
+ mode: n.oneOf(["tabbed", "inline"]),
17
+ secondary: n.oneOfType([n.arrayOf(n.node), n.node]),
18
+ children: n.oneOfType([n.arrayOf(n.node), n.node]),
19
+ dimensions: n.object
20
+ };
21
+ getConfiguration = () => {
22
+ let { secondary: e } = this.props;
23
+ return e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;
24
+ };
25
+ render() {
26
+ let { mode: t, secondary: n, children: r, dimensions: d } = this.props, { minHeight: f, minWidth: p, maxHeight: m, maxWidth: h } = d || {}, g = this.getConfiguration(), _ = Object.entries(g || {}).some(([, e]) => !!e?.settings);
27
+ if (!_) try {
28
+ _ = JSON.stringify(g)?.match(/settings":true/)?.length;
29
+ } catch (e) {
30
+ console.log(e.toString());
31
+ }
32
+ return /* @__PURE__ */ a(o, {
33
+ style: {
34
+ minHeight: f,
35
+ minWidth: p,
36
+ maxHeight: m,
37
+ maxWidth: h
38
+ },
39
+ children: [
40
+ t === "inline" && /* @__PURE__ */ a(s, { children: [/* @__PURE__ */ i(l, {
41
+ className: "design-container",
42
+ children: r
43
+ }), _ && /* @__PURE__ */ i(u, {
44
+ className: "settings-container",
45
+ children: n
46
+ })] }),
47
+ t === "tabbed" && _ && /* @__PURE__ */ a(e, {
48
+ onChange: this.onTabsChange,
49
+ contentClassName: "content-container",
50
+ indicatorColor: "primary",
51
+ children: [/* @__PURE__ */ i(c, {
52
+ title: "Design",
53
+ className: "design-container",
54
+ children: r
55
+ }), /* @__PURE__ */ i(c, {
56
+ title: "Settings",
57
+ className: "settings-container",
58
+ children: n
59
+ })]
60
+ }),
61
+ t === "tabbed" && !_ && /* @__PURE__ */ i(c, {
62
+ className: "design-container",
63
+ children: r
64
+ })
65
+ ]
66
+ });
67
+ }
68
+ };
69
+ //#endregion
70
+ export { d as default };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/layout/settings-box.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class SettingsBox extends React.Component {
12
+ static propTypes: {
13
+ className: PropTypes.Requireable<string>;
14
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
15
+ };
16
+ static defaultProps: {};
17
+ render(): React.JSX.Element;
18
+ }
19
+ export default SettingsBox;
@@ -0,0 +1,31 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/layout/settings-box.tsx
6
+ var i = n("div")(({ theme: e }) => ({
7
+ backgroundColor: e.palette.background.paper,
8
+ border: `2px solid ${e.palette.grey[200]}`,
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ justifyContent: "flex-start",
12
+ minWidth: "275px",
13
+ maxWidth: "300px",
14
+ padding: "20px 4px 4px 20px",
15
+ zIndex: 99
16
+ })), a = class extends e.Component {
17
+ static propTypes = {
18
+ className: t.string,
19
+ children: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired
20
+ };
21
+ static defaultProps = {};
22
+ render() {
23
+ let { className: e, children: t } = this.props;
24
+ return /* @__PURE__ */ r(i, {
25
+ className: e,
26
+ children: t
27
+ });
28
+ }
29
+ };
30
+ //#endregion
31
+ export { a as default };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/mui-box/index.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare const MuiBox: {
12
+ ({ children, focused }: {
13
+ children: any;
14
+ focused: any;
15
+ }): React.JSX.Element;
16
+ propTypes: {
17
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
18
+ focused: PropTypes.Validator<boolean>;
19
+ };
20
+ };
21
+ export default MuiBox;
@@ -0,0 +1,47 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { styled as t } from "@mui/material/styles";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import r from "debug";
6
+ //#region src/mui-box/index.tsx
7
+ var i = r("pie-elements:config-ui:mui-box"), a = t("div")(({ theme: e, focused: t }) => {
8
+ let n = e.palette.mode === "light" ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)";
9
+ return i(e.palette.primary[e.palette.mode || "light"]), {
10
+ paddingTop: e.spacing(1),
11
+ paddingBottom: e.spacing(1),
12
+ position: "relative",
13
+ "&:before": {
14
+ left: 0,
15
+ right: 0,
16
+ bottom: 0,
17
+ height: "1px",
18
+ content: "\"\"",
19
+ position: "absolute",
20
+ transition: "background-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
21
+ pointerEvents: "none",
22
+ backgroundColor: n
23
+ },
24
+ "&:hover:before": { height: "2px" },
25
+ "&:after": {
26
+ left: 0,
27
+ right: 0,
28
+ bottom: 0,
29
+ height: "2px",
30
+ content: "\"\"",
31
+ position: "absolute",
32
+ transform: t ? "scaleX(1)" : "scaleX(0)",
33
+ transition: "transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms",
34
+ pointerEvents: "none",
35
+ backgroundColor: e.palette.primary[e.palette.mode]
36
+ }
37
+ };
38
+ }), o = ({ children: e, focused: t }) => /* @__PURE__ */ n(a, {
39
+ focused: t,
40
+ children: e
41
+ });
42
+ o.propTypes = {
43
+ children: e.oneOfType([e.arrayOf(e.node), e.node]).isRequired,
44
+ focused: e.bool.isRequired
45
+ };
46
+ //#endregion
47
+ export { o as default };
@@ -0,0 +1,12 @@
1
+ //#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
2
+ function e() {
3
+ return e = Object.assign ? Object.assign.bind() : function(e) {
4
+ for (var t = 1; t < arguments.length; t++) {
5
+ var n = arguments[t];
6
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
7
+ }
8
+ return e;
9
+ }, e.apply(null, arguments);
10
+ }
11
+ //#endregion
12
+ export { e as _extends };
@@ -0,0 +1,7 @@
1
+ import { _setPrototypeOf as e } from "./setPrototypeOf.js";
2
+ //#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
3
+ function t(t, n) {
4
+ t.prototype = Object.create(n.prototype), t.prototype.constructor = t, e(t, n);
5
+ }
6
+ //#endregion
7
+ export { t as _inheritsLoose };
@@ -0,0 +1,12 @@
1
+ //#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
2
+ function e(e, t) {
3
+ if (e == null) return {};
4
+ var n = {};
5
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
6
+ if (t.indexOf(r) !== -1) continue;
7
+ n[r] = e[r];
8
+ }
9
+ return n;
10
+ }
11
+ //#endregion
12
+ export { e as _objectWithoutPropertiesLoose };
@@ -0,0 +1,8 @@
1
+ //#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
2
+ function e(t, n) {
3
+ return e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
4
+ return e.__proto__ = t, e;
5
+ }, e(t, n);
6
+ }
7
+ //#endregion
8
+ export { e as _setPrototypeOf };