@uipath/apollo-react 6.9.0 → 6.10.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.
@@ -32,13 +32,13 @@ function ExpressionField({ label, value, mode = 'expr', description, onModeChang
32
32
  const expression = value ?? '';
33
33
  const activeMode = mode;
34
34
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
35
- className: "flex flex-col gap-2",
35
+ className: "flex flex-col gap-1.5",
36
36
  children: [
37
37
  label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
38
38
  className: "flex items-center justify-between",
39
39
  children: [
40
40
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
41
- className: "text-xs font-medium text-foreground-muted",
41
+ className: "text-xs font-medium leading-4 text-foreground",
42
42
  children: label
43
43
  }),
44
44
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
@@ -4,13 +4,13 @@ function ExpressionField({ label, value, mode = 'expr', description, onModeChang
4
4
  const expression = value ?? '';
5
5
  const activeMode = mode;
6
6
  return /*#__PURE__*/ jsxs("div", {
7
- className: "flex flex-col gap-2",
7
+ className: "flex flex-col gap-1.5",
8
8
  children: [
9
9
  label && /*#__PURE__*/ jsxs("div", {
10
10
  className: "flex items-center justify-between",
11
11
  children: [
12
12
  /*#__PURE__*/ jsx("span", {
13
- className: "text-xs font-medium text-foreground-muted",
13
+ className: "text-xs font-medium leading-4 text-foreground",
14
14
  children: label
15
15
  }),
16
16
  /*#__PURE__*/ jsxs("div", {
@@ -118,7 +118,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
118
118
  }) : formSchema ? formSchema.steps ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
119
119
  className: "flex min-h-0 flex-1 flex-col",
120
120
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
121
- className: (0, apollo_wind_namespaceObject.cn)('flex min-h-0 flex-1 flex-col [&_label]:text-foreground-muted', SURFACE_REMAP),
121
+ className: (0, apollo_wind_namespaceObject.cn)("flex min-h-0 flex-1 flex-col [&_[data-slot=form-description]]:text-xs [&_[data-slot=form-description]]:leading-4 [&_[data-slot=form-description]]:text-foreground-muted [&_[data-slot=form-label]]:text-xs [&_[data-slot=form-label]]:font-medium [&_[data-slot=form-label]]:leading-4 [&_[data-slot=form-label]]:text-foreground", SURFACE_REMAP),
122
122
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.MetadataForm, {
123
123
  schema: formSchema,
124
124
  plugins: plugins,
@@ -135,7 +135,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
135
135
  }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
136
136
  className: "min-h-0 flex-1 overflow-auto",
137
137
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
138
- className: (0, apollo_wind_namespaceObject.cn)('[&_label]:text-foreground-muted', SURFACE_REMAP),
138
+ className: (0, apollo_wind_namespaceObject.cn)("[&_[data-slot=form-description]]:text-xs [&_[data-slot=form-description]]:leading-4 [&_[data-slot=form-description]]:text-foreground-muted [&_[data-slot=form-label]]:text-xs [&_[data-slot=form-label]]:font-medium [&_[data-slot=form-label]]:leading-4 [&_[data-slot=form-label]]:text-foreground", SURFACE_REMAP),
139
139
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.MetadataForm, {
140
140
  schema: formSchema,
141
141
  plugins: plugins,
@@ -1 +1 @@
1
- {"version":3,"file":"NodePropertyPanel.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAmCxE,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAuB,EACvB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,EAAE,sBAAsB,2CA2HxB"}
1
+ {"version":3,"file":"NodePropertyPanel.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAmCxE,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAuB,EACvB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,EAAE,sBAAsB,2CAgIxB"}
@@ -90,7 +90,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
90
90
  }) : formSchema ? formSchema.steps ? /*#__PURE__*/ jsx("div", {
91
91
  className: "flex min-h-0 flex-1 flex-col",
92
92
  children: /*#__PURE__*/ jsx("div", {
93
- className: cn('flex min-h-0 flex-1 flex-col [&_label]:text-foreground-muted', SURFACE_REMAP),
93
+ className: cn("flex min-h-0 flex-1 flex-col [&_[data-slot=form-description]]:text-xs [&_[data-slot=form-description]]:leading-4 [&_[data-slot=form-description]]:text-foreground-muted [&_[data-slot=form-label]]:text-xs [&_[data-slot=form-label]]:font-medium [&_[data-slot=form-label]]:leading-4 [&_[data-slot=form-label]]:text-foreground", SURFACE_REMAP),
94
94
  children: /*#__PURE__*/ jsx(MetadataForm, {
95
95
  schema: formSchema,
96
96
  plugins: plugins,
@@ -107,7 +107,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
107
107
  }) : /*#__PURE__*/ jsx("div", {
108
108
  className: "min-h-0 flex-1 overflow-auto",
109
109
  children: /*#__PURE__*/ jsx("div", {
110
- className: cn('[&_label]:text-foreground-muted', SURFACE_REMAP),
110
+ className: cn("[&_[data-slot=form-description]]:text-xs [&_[data-slot=form-description]]:leading-4 [&_[data-slot=form-description]]:text-foreground-muted [&_[data-slot=form-label]]:text-xs [&_[data-slot=form-label]]:font-medium [&_[data-slot=form-label]]:leading-4 [&_[data-slot=form-label]]:text-foreground", SURFACE_REMAP),
111
111
  children: /*#__PURE__*/ jsx(MetadataForm, {
112
112
  schema: formSchema,
113
113
  plugins: plugins,
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ PanelFieldLabel: ()=>PanelFieldLabel,
28
+ PanelField: ()=>PanelField
29
+ });
30
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
32
+ const external_react_namespaceObject = require("react");
33
+ const PanelFieldLabel = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ children, className, required = false, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Label, {
34
+ ref: ref,
35
+ "data-slot": "panel-field-label",
36
+ className: (0, apollo_wind_namespaceObject.cn)('text-xs font-medium text-foreground', className),
37
+ ...props,
38
+ children: [
39
+ children,
40
+ required && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
41
+ className: "ml-0.5 text-destructive",
42
+ children: "*"
43
+ })
44
+ ]
45
+ }));
46
+ PanelFieldLabel.displayName = 'PanelFieldLabel';
47
+ function PanelField({ label, htmlFor, description, error, required = false, children, className }) {
48
+ const generatedId = (0, external_react_namespaceObject.useId)();
49
+ const controlId = htmlFor ?? children.props.id ?? generatedId;
50
+ const descriptionId = description ? `${controlId}-description` : void 0;
51
+ const errorId = error ? `${controlId}-error` : void 0;
52
+ const describedBy = [
53
+ children.props['aria-describedby'],
54
+ descriptionId,
55
+ errorId
56
+ ].filter(Boolean).join(' ');
57
+ const control = /*#__PURE__*/ (0, external_react_namespaceObject.isValidElement)(children) ? /*#__PURE__*/ (0, external_react_namespaceObject.cloneElement)(children, {
58
+ id: controlId,
59
+ 'aria-describedby': describedBy || void 0,
60
+ 'aria-invalid': error ? true : children.props['aria-invalid']
61
+ }) : children;
62
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
63
+ className: (0, apollo_wind_namespaceObject.cn)('grid gap-1.5', className),
64
+ "data-slot": "panel-field",
65
+ children: [
66
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PanelFieldLabel, {
67
+ htmlFor: controlId,
68
+ required: required,
69
+ children: label
70
+ }),
71
+ control,
72
+ description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
73
+ id: descriptionId,
74
+ "data-slot": "panel-field-description",
75
+ className: "text-xs leading-4 text-foreground-muted",
76
+ children: description
77
+ }),
78
+ error && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
79
+ id: errorId,
80
+ "data-slot": "panel-field-error",
81
+ className: "text-xs leading-4 text-destructive",
82
+ children: error
83
+ })
84
+ ]
85
+ });
86
+ }
87
+ exports.PanelField = __webpack_exports__.PanelField;
88
+ exports.PanelFieldLabel = __webpack_exports__.PanelFieldLabel;
89
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
90
+ "PanelField",
91
+ "PanelFieldLabel"
92
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
93
+ Object.defineProperty(exports, '__esModule', {
94
+ value: true
95
+ });
@@ -0,0 +1,23 @@
1
+ import { type LabelProps } from '@uipath/apollo-wind';
2
+ import { type ReactElement, type ReactNode } from 'react';
3
+ type PanelControlProps = {
4
+ id?: string;
5
+ 'aria-describedby'?: string;
6
+ 'aria-invalid'?: boolean;
7
+ };
8
+ export interface PanelFieldProps {
9
+ label: ReactNode;
10
+ htmlFor?: string;
11
+ description?: ReactNode;
12
+ error?: ReactNode;
13
+ required?: boolean;
14
+ children: ReactElement<PanelControlProps>;
15
+ className?: string;
16
+ }
17
+ export interface PanelFieldLabelProps extends LabelProps {
18
+ required?: boolean;
19
+ }
20
+ export declare const PanelFieldLabel: import("react").ForwardRefExoticComponent<PanelFieldLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
21
+ export declare function PanelField({ label, htmlFor, description, error, required, children, className, }: PanelFieldProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=PanelField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelField.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/PanelField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,KAAK,iBAAiB,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,eAAe;IAE9B,KAAK,EAAE,SAAS,CAAC;IAEjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IAEtD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,eAAO,MAAM,eAAe,mHAY3B,CAAC;AASF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,WAAW,EACX,KAAK,EACL,QAAgB,EAChB,QAAQ,EACR,SAAS,GACV,EAAE,eAAe,2CA0CjB"}
@@ -0,0 +1,58 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Label, cn } from "@uipath/apollo-wind";
3
+ import { cloneElement, forwardRef, isValidElement, useId } from "react";
4
+ const PanelFieldLabel = /*#__PURE__*/ forwardRef(({ children, className, required = false, ...props }, ref)=>/*#__PURE__*/ jsxs(Label, {
5
+ ref: ref,
6
+ "data-slot": "panel-field-label",
7
+ className: cn('text-xs font-medium text-foreground', className),
8
+ ...props,
9
+ children: [
10
+ children,
11
+ required && /*#__PURE__*/ jsx("span", {
12
+ className: "ml-0.5 text-destructive",
13
+ children: "*"
14
+ })
15
+ ]
16
+ }));
17
+ PanelFieldLabel.displayName = 'PanelFieldLabel';
18
+ function PanelField({ label, htmlFor, description, error, required = false, children, className }) {
19
+ const generatedId = useId();
20
+ const controlId = htmlFor ?? children.props.id ?? generatedId;
21
+ const descriptionId = description ? `${controlId}-description` : void 0;
22
+ const errorId = error ? `${controlId}-error` : void 0;
23
+ const describedBy = [
24
+ children.props['aria-describedby'],
25
+ descriptionId,
26
+ errorId
27
+ ].filter(Boolean).join(' ');
28
+ const control = /*#__PURE__*/ isValidElement(children) ? /*#__PURE__*/ cloneElement(children, {
29
+ id: controlId,
30
+ 'aria-describedby': describedBy || void 0,
31
+ 'aria-invalid': error ? true : children.props['aria-invalid']
32
+ }) : children;
33
+ return /*#__PURE__*/ jsxs("div", {
34
+ className: cn('grid gap-1.5', className),
35
+ "data-slot": "panel-field",
36
+ children: [
37
+ /*#__PURE__*/ jsx(PanelFieldLabel, {
38
+ htmlFor: controlId,
39
+ required: required,
40
+ children: label
41
+ }),
42
+ control,
43
+ description && /*#__PURE__*/ jsx("p", {
44
+ id: descriptionId,
45
+ "data-slot": "panel-field-description",
46
+ className: "text-xs leading-4 text-foreground-muted",
47
+ children: description
48
+ }),
49
+ error && /*#__PURE__*/ jsx("p", {
50
+ id: errorId,
51
+ "data-slot": "panel-field-error",
52
+ className: "text-xs leading-4 text-destructive",
53
+ children: error
54
+ })
55
+ ]
56
+ });
57
+ }
58
+ export { PanelField, PanelFieldLabel };
@@ -24,16 +24,23 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
+ PanelFieldLabel: ()=>external_PanelField_cjs_namespaceObject.PanelFieldLabel,
27
28
  NodePropertyPanel: ()=>external_NodePropertyPanel_cjs_namespaceObject.NodePropertyPanel,
29
+ PanelField: ()=>external_PanelField_cjs_namespaceObject.PanelField,
28
30
  ExpressionField: ()=>external_ExpressionField_cjs_namespaceObject.ExpressionField
29
31
  });
30
32
  const external_ExpressionField_cjs_namespaceObject = require("./ExpressionField.cjs");
31
33
  const external_NodePropertyPanel_cjs_namespaceObject = require("./NodePropertyPanel.cjs");
34
+ const external_PanelField_cjs_namespaceObject = require("./PanelField.cjs");
32
35
  exports.ExpressionField = __webpack_exports__.ExpressionField;
33
36
  exports.NodePropertyPanel = __webpack_exports__.NodePropertyPanel;
37
+ exports.PanelField = __webpack_exports__.PanelField;
38
+ exports.PanelFieldLabel = __webpack_exports__.PanelFieldLabel;
34
39
  for(var __rspack_i in __webpack_exports__)if (-1 === [
35
40
  "ExpressionField",
36
- "NodePropertyPanel"
41
+ "NodePropertyPanel",
42
+ "PanelField",
43
+ "PanelFieldLabel"
37
44
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
38
45
  Object.defineProperty(exports, '__esModule', {
39
46
  value: true
@@ -2,4 +2,6 @@ export type { ExpressionFieldProps, ExpressionMode } from './ExpressionField';
2
2
  export { ExpressionField } from './ExpressionField';
3
3
  export { NodePropertyPanel } from './NodePropertyPanel';
4
4
  export type { NodePropertyPanelProps } from './NodePropertyPanel.types';
5
+ export type { PanelFieldLabelProps, PanelFieldProps } from './PanelField';
6
+ export { PanelField, PanelFieldLabel } from './PanelField';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { ExpressionField } from "./ExpressionField.js";
2
2
  import { NodePropertyPanel } from "./NodePropertyPanel.js";
3
- export { ExpressionField, NodePropertyPanel };
3
+ import { PanelField, PanelFieldLabel } from "./PanelField.js";
4
+ export { ExpressionField, NodePropertyPanel, PanelField, PanelFieldLabel };