@uipath/apollo-wind 2.39.0 → 2.40.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.
@@ -31,22 +31,25 @@ const external_lucide_react_namespaceObject = require("lucide-react");
31
31
  const external_react_namespaceObject = require("react");
32
32
  const accordion_cjs_namespaceObject = require("../ui/accordion.cjs");
33
33
  const input_cjs_namespaceObject = require("../ui/input.cjs");
34
+ const label_cjs_namespaceObject = require("../ui/label.cjs");
34
35
  const select_cjs_namespaceObject = require("../ui/select.cjs");
35
36
  const typography_cjs_namespaceObject = require("../../foundation/Future/typography.cjs");
36
37
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
37
38
  function FieldItem({ field, onGraphControl }) {
38
39
  const [value, setValue] = external_react_namespaceObject.useState(field.value ?? '');
40
+ const inputId = external_react_namespaceObject.useId();
39
41
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
40
42
  className: "flex flex-col gap-1 pt-4",
41
43
  children: [
42
44
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
43
45
  className: "flex items-center justify-between",
44
46
  children: [
45
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
47
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(label_cjs_namespaceObject.Label, {
48
+ htmlFor: inputId,
46
49
  className: "text-sm font-medium leading-5 text-foreground-muted",
47
50
  children: [
48
51
  field.label,
49
- field.required && '*'
52
+ field.required && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(label_cjs_namespaceObject.RequiredIndicator, {})
50
53
  ]
51
54
  }),
52
55
  field.showGraphControl && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
@@ -65,7 +68,8 @@ function FieldItem({ field, onGraphControl }) {
65
68
  onValueChange: setValue,
66
69
  children: [
67
70
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
68
- "aria-label": field.label,
71
+ "aria-required": field.required,
72
+ id: inputId,
69
73
  className: "h-10 rounded-xl border-0 bg-surface-overlay text-foreground shadow-sm placeholder:text-foreground-muted",
70
74
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
71
75
  placeholder: field.placeholder ?? 'Select...'
@@ -84,6 +88,8 @@ function FieldItem({ field, onGraphControl }) {
84
88
  className: "flex h-10 w-full items-center overflow-hidden rounded-xl bg-surface-overlay shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)] transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background",
85
89
  children: [
86
90
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
91
+ "aria-required": field.required,
92
+ id: inputId,
87
93
  value: value,
88
94
  onChange: (e)=>setValue(e.target.value),
89
95
  placeholder: field.placeholder,
@@ -99,6 +105,8 @@ function FieldItem({ field, onGraphControl }) {
99
105
  })
100
106
  ]
101
107
  }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
108
+ "aria-required": field.required,
109
+ id: inputId,
102
110
  value: value,
103
111
  onChange: (e)=>setValue(e.target.value),
104
112
  placeholder: field.placeholder
@@ -1,24 +1,27 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Copy, FileJson, Folder, Redo2, RefreshCw, Settings2, Undo2, Variable, Webhook, X } from "lucide-react";
3
- import { useState } from "react";
3
+ import { useId, useState } from "react";
4
4
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../ui/accordion.js";
5
5
  import { Input } from "../ui/input.js";
6
+ import { Label, RequiredIndicator } from "../ui/label.js";
6
7
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select.js";
7
8
  import { fontFamily } from "../../foundation/Future/typography.js";
8
9
  import { cn } from "../../lib/index.js";
9
10
  function FieldItem({ field, onGraphControl }) {
10
11
  const [value, setValue] = useState(field.value ?? '');
12
+ const inputId = useId();
11
13
  return /*#__PURE__*/ jsxs("div", {
12
14
  className: "flex flex-col gap-1 pt-4",
13
15
  children: [
14
16
  /*#__PURE__*/ jsxs("div", {
15
17
  className: "flex items-center justify-between",
16
18
  children: [
17
- /*#__PURE__*/ jsxs("span", {
19
+ /*#__PURE__*/ jsxs(Label, {
20
+ htmlFor: inputId,
18
21
  className: "text-sm font-medium leading-5 text-foreground-muted",
19
22
  children: [
20
23
  field.label,
21
- field.required && '*'
24
+ field.required && /*#__PURE__*/ jsx(RequiredIndicator, {})
22
25
  ]
23
26
  }),
24
27
  field.showGraphControl && /*#__PURE__*/ jsx("button", {
@@ -37,7 +40,8 @@ function FieldItem({ field, onGraphControl }) {
37
40
  onValueChange: setValue,
38
41
  children: [
39
42
  /*#__PURE__*/ jsx(SelectTrigger, {
40
- "aria-label": field.label,
43
+ "aria-required": field.required,
44
+ id: inputId,
41
45
  className: "h-10 rounded-xl border-0 bg-surface-overlay text-foreground shadow-sm placeholder:text-foreground-muted",
42
46
  children: /*#__PURE__*/ jsx(SelectValue, {
43
47
  placeholder: field.placeholder ?? 'Select...'
@@ -56,6 +60,8 @@ function FieldItem({ field, onGraphControl }) {
56
60
  className: "flex h-10 w-full items-center overflow-hidden rounded-xl bg-surface-overlay shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)] transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background",
57
61
  children: [
58
62
  /*#__PURE__*/ jsx(Input, {
63
+ "aria-required": field.required,
64
+ id: inputId,
59
65
  value: value,
60
66
  onChange: (e)=>setValue(e.target.value),
61
67
  placeholder: field.placeholder,
@@ -71,6 +77,8 @@ function FieldItem({ field, onGraphControl }) {
71
77
  })
72
78
  ]
73
79
  }) : /*#__PURE__*/ jsx(Input, {
80
+ "aria-required": field.required,
81
+ id: inputId,
74
82
  value: value,
75
83
  onChange: (e)=>setValue(e.target.value),
76
84
  placeholder: field.placeholder
@@ -36,7 +36,7 @@ var __webpack_modules__ = {
36
36
  "./chart" (module) {
37
37
  module.exports = require("./chart.cjs");
38
38
  },
39
- "@/components/ui/checkbox" (module) {
39
+ "./checkbox" (module) {
40
40
  module.exports = require("./checkbox.cjs");
41
41
  },
42
42
  "./collapsible" (module) {
@@ -66,10 +66,10 @@ var __webpack_modules__ = {
66
66
  "./drawer" (module) {
67
67
  module.exports = require("./drawer.cjs");
68
68
  },
69
- "@/components/ui/dropdown-menu" (module) {
69
+ "./dropdown-menu" (module) {
70
70
  module.exports = require("./dropdown-menu.cjs");
71
71
  },
72
- "@/components/ui/editable-cell" (module) {
72
+ "./editable-cell" (module) {
73
73
  module.exports = require("./editable-cell.cjs");
74
74
  },
75
75
  "./empty-state" (module) {
@@ -84,10 +84,10 @@ var __webpack_modules__ = {
84
84
  "@/components/ui/input-group" (module) {
85
85
  module.exports = require("./input-group.cjs");
86
86
  },
87
- "@/components/ui/input" (module) {
87
+ "./input" (module) {
88
88
  module.exports = require("./input.cjs");
89
89
  },
90
- "./label" (module) {
90
+ "@/components/ui/label" (module) {
91
91
  module.exports = require("./label.cjs");
92
92
  },
93
93
  "./layout" (module) {
@@ -156,7 +156,7 @@ var __webpack_modules__ = {
156
156
  "./switch" (module) {
157
157
  module.exports = require("./switch.cjs");
158
158
  },
159
- "@/components/ui/table" (module) {
159
+ "./table" (module) {
160
160
  module.exports = require("./table.cjs");
161
161
  },
162
162
  "./tabs" (module) {
@@ -168,7 +168,7 @@ var __webpack_modules__ = {
168
168
  "./toggle-group" (module) {
169
169
  module.exports = require("./toggle-group.cjs");
170
170
  },
171
- "@/components/ui/toggle" (module) {
171
+ "./toggle" (module) {
172
172
  module.exports = require("./toggle.cjs");
173
173
  },
174
174
  "./tooltip" (module) {
@@ -311,7 +311,7 @@ var __webpack_exports__ = {};
311
311
  "default"
312
312
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_chart__rspack_import_11[__rspack_import_key];
313
313
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
314
- var _checkbox__rspack_import_12 = __webpack_require__("@/components/ui/checkbox");
314
+ var _checkbox__rspack_import_12 = __webpack_require__("./checkbox");
315
315
  var __rspack_reexport = {};
316
316
  for(const __rspack_import_key in _checkbox__rspack_import_12)if ([
317
317
  "TreeView",
@@ -381,14 +381,14 @@ var __webpack_exports__ = {};
381
381
  "default"
382
382
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_21[__rspack_import_key];
383
383
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
384
- var _dropdown_menu__rspack_import_22 = __webpack_require__("@/components/ui/dropdown-menu");
384
+ var _dropdown_menu__rspack_import_22 = __webpack_require__("./dropdown-menu");
385
385
  var __rspack_reexport = {};
386
386
  for(const __rspack_import_key in _dropdown_menu__rspack_import_22)if ([
387
387
  "TreeView",
388
388
  "default"
389
389
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropdown_menu__rspack_import_22[__rspack_import_key];
390
390
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
391
- var _editable_cell__rspack_import_23 = __webpack_require__("@/components/ui/editable-cell");
391
+ var _editable_cell__rspack_import_23 = __webpack_require__("./editable-cell");
392
392
  var __rspack_reexport = {};
393
393
  for(const __rspack_import_key in _editable_cell__rspack_import_23)if ([
394
394
  "TreeView",
@@ -416,7 +416,7 @@ var __webpack_exports__ = {};
416
416
  "default"
417
417
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_26[__rspack_import_key];
418
418
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
419
- var _input__rspack_import_27 = __webpack_require__("@/components/ui/input");
419
+ var _input__rspack_import_27 = __webpack_require__("./input");
420
420
  var __rspack_reexport = {};
421
421
  for(const __rspack_import_key in _input__rspack_import_27)if ([
422
422
  "TreeView",
@@ -430,7 +430,7 @@ var __webpack_exports__ = {};
430
430
  "default"
431
431
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_input_group__rspack_import_28[__rspack_import_key];
432
432
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
433
- var _label__rspack_import_29 = __webpack_require__("./label");
433
+ var _label__rspack_import_29 = __webpack_require__("@/components/ui/label");
434
434
  var __rspack_reexport = {};
435
435
  for(const __rspack_import_key in _label__rspack_import_29)if ([
436
436
  "TreeView",
@@ -591,7 +591,7 @@ var __webpack_exports__ = {};
591
591
  "default"
592
592
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_switch__rspack_import_51[__rspack_import_key];
593
593
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
594
- var _table__rspack_import_52 = __webpack_require__("@/components/ui/table");
594
+ var _table__rspack_import_52 = __webpack_require__("./table");
595
595
  var __rspack_reexport = {};
596
596
  for(const __rspack_import_key in _table__rspack_import_52)if ([
597
597
  "TreeView",
@@ -612,7 +612,7 @@ var __webpack_exports__ = {};
612
612
  "default"
613
613
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_textarea__rspack_import_54[__rspack_import_key];
614
614
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
615
- var _toggle__rspack_import_55 = __webpack_require__("@/components/ui/toggle");
615
+ var _toggle__rspack_import_55 = __webpack_require__("./toggle");
616
616
  var __rspack_reexport = {};
617
617
  for(const __rspack_import_key in _toggle__rspack_import_55)if ([
618
618
  "TreeView",
@@ -32,7 +32,7 @@ const react_label_namespaceObject = require("@radix-ui/react-label");
32
32
  const external_class_variance_authority_namespaceObject = require("class-variance-authority");
33
33
  const external_react_namespaceObject = require("react");
34
34
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
35
- const labelVariants = (0, external_class_variance_authority_namespaceObject.cva)('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
35
+ const labelVariants = (0, external_class_variance_authority_namespaceObject.cva)('text-xs font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
36
36
  const Label = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_label_namespaceObject.Root, {
37
37
  ref: ref,
38
38
  "data-slot": "label",
@@ -43,7 +43,7 @@ Label.displayName = react_label_namespaceObject.Root.displayName;
43
43
  const RequiredIndicator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
44
44
  ref: ref,
45
45
  ...props,
46
- className: (0, index_cjs_namespaceObject.cn)('ml-0.5 text-current', className),
46
+ className: (0, index_cjs_namespaceObject.cn)('ml-0.5', className, 'text-foreground'),
47
47
  children: [
48
48
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
49
49
  "aria-hidden": "true",
@@ -9,7 +9,7 @@ export interface RequiredIndicatorProps extends Omit<React.HTMLAttributes<HTMLSp
9
9
  /**
10
10
  * Marks a field as required. Place it right after the label text.
11
11
  *
12
- * Uses `text-current` rather than an error/destructive color: an untouched
12
+ * Uses the foreground color rather than an error/destructive color: an untouched
13
13
  * required field isn't in an error state, so coloring the asterisk red reads
14
14
  * as a validation failure before the person has done anything. The asterisk
15
15
  * glyph is `aria-hidden` since it's a visual affordance, not the thing that
@@ -3,7 +3,7 @@ import { Root } from "@radix-ui/react-label";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { forwardRef } from "react";
5
5
  import { cn } from "../../lib/index.js";
6
- const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
6
+ const labelVariants = cva('text-xs font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
7
7
  const Label = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
8
8
  ref: ref,
9
9
  "data-slot": "label",
@@ -14,7 +14,7 @@ Label.displayName = Root.displayName;
14
14
  const RequiredIndicator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", {
15
15
  ref: ref,
16
16
  ...props,
17
- className: cn('ml-0.5 text-current', className),
17
+ className: cn('ml-0.5', className, 'text-foreground'),
18
18
  children: [
19
19
  /*#__PURE__*/ jsx("span", {
20
20
  "aria-hidden": "true",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-wind",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "description": "UiPath wind design system - A Tailwind CSS based React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",