@box/metadata-editor 1.3.4 → 1.3.6

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,19 @@
1
1
  import { BoxAiLogo as s } from "@box/blueprint-web-assets/icons/Logo";
2
2
  import i from "../esm/lib/components/interactive-text/interactive-text.js";
3
- import { convertISOStringtoRFC3339String as p } from "../esm/lib/utils/convertDate.js";
4
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
5
- import '../styles/utils.css';const _ = "_noAttributesText_tpqxf_2", x = "_fieldWrapper_tpqxf_6", b = "_hasSuggestion_tpqxf_11", g = "_error_tpqxf_19", d = "_dateField_tpqxf_31", f = "_suggestionApplied_tpqxf_35", m = "_comboboxContainer_tpqxf_35", u = "_labelWrapper_tpqxf_50", T = "_labelText_tpqxf_56", q = "_labelIcon_tpqxf_59", o = {
3
+ import { convertISOStringtoRFC3339String as c } from "../esm/lib/utils/convertDate.js";
4
+ import { jsxs as g, jsx as l } from "react/jsx-runtime";
5
+ import '../styles/utils.css';const _ = "_noAttributesText_fefg3_2", f = "_fieldWrapper_fefg3_6", b = "_hasSuggestion_fefg3_11", p = "_error_fefg3_20", d = "_dateField_fefg3_33", x = "_suggestionApplied_fefg3_37", m = "_comboboxContainer_fefg3_37", u = "_labelWrapper_fefg3_52", T = "_labelText_fefg3_58", h = "_labelIcon_fefg3_61", o = {
6
6
  noAttributesText: _,
7
- fieldWrapper: x,
7
+ fieldWrapper: f,
8
8
  hasSuggestion: b,
9
- error: g,
9
+ error: p,
10
10
  dateField: d,
11
- suggestionApplied: f,
11
+ suggestionApplied: x,
12
12
  comboboxContainer: m,
13
13
  labelWrapper: u,
14
14
  labelText: T,
15
- labelIcon: q
16
- }, I = (t, e, r = !1, n = "label") => (a) => /* @__PURE__ */ c("div", {
15
+ labelIcon: h
16
+ }, F = (t, e, r = !1, n = "label") => (a) => /* @__PURE__ */ g("div", {
17
17
  className: o.labelWrapper,
18
18
  children: [e ? /* @__PURE__ */ l(i, {
19
19
  as: n,
@@ -28,16 +28,16 @@ import '../styles/utils.css';const _ = "_noAttributesText_tpqxf_2", x = "_fieldW
28
28
  }), r && /* @__PURE__ */ l(s, {
29
29
  className: o.labelIcon
30
30
  })]
31
- }), F = (t) => {
31
+ }), N = (t) => {
32
32
  try {
33
- const e = p(t), r = new Date(e);
33
+ const e = c(t), r = new Date(e);
34
34
  return isNaN(r.getTime()) ? null : e;
35
35
  } catch {
36
36
  return null;
37
37
  }
38
38
  };
39
39
  export {
40
- I as g,
40
+ F as g,
41
41
  o as s,
42
- F as t
42
+ N as t
43
43
  };
@@ -1,30 +1,33 @@
1
- import { Text as l, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
2
- import { Checkmark as u, Ellipsis as f } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as I, FormattedMessage as r } from "react-intl";
1
+ import { useBlueprintModernization as C, Text as s, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
2
+ import { Checkmark as p, Ellipsis as I } from "@box/blueprint-web-assets/icons/Fill";
3
+ import { useIntl as w, FormattedMessage as r } from "react-intl";
4
4
  import t from "./messages.js";
5
- import { formatSuggestionValue as w } from "./utils.js";
6
- import { jsx as e, jsxs as i, Fragment as m } from "react/jsx-runtime";
7
- import '../../../../../../styles/ai-suggestion-field.css';const C = "_wrapperGradient_z7sut_1", _ = "_wrapper_z7sut_1", b = "_buttons_z7sut_18", x = "_selectTrigger_z7sut_22", o = {
8
- wrapperGradient: C,
9
- wrapper: _,
5
+ import { formatSuggestionValue as x } from "./utils.js";
6
+ import { jsx as e, jsxs as n, Fragment as u } from "react/jsx-runtime";
7
+ import '../../../../../../styles/ai-suggestion-field.css';const _ = "_wrapperGradient_mllxq_1", M = "_wrapper_mllxq_1", b = "_buttons_mllxq_23", v = "_selectTrigger_mllxq_27", o = {
8
+ wrapperGradient: _,
9
+ wrapper: M,
10
10
  buttons: b,
11
- selectTrigger: x
11
+ selectTrigger: v
12
12
  };
13
- function N({
13
+ function z({
14
14
  aiSuggestion: S,
15
- onAiSuggestionAppend: g,
16
- onAiSuggestionReplace: d,
17
- onAiSuggestionIgnore: p,
18
- type: n,
15
+ onAiSuggestionAppend: d,
16
+ onAiSuggestionReplace: g,
17
+ onAiSuggestionIgnore: m,
18
+ type: i,
19
19
  isSameValue: h
20
20
  }) {
21
- const s = I();
21
+ const l = w(), {
22
+ enableModernizedComponents: f
23
+ } = C();
22
24
  return /* @__PURE__ */ e("div", {
23
25
  className: o.wrapperGradient,
26
+ "data-modern": f,
24
27
  children: /* @__PURE__ */ e("div", {
25
28
  className: o.wrapper,
26
- children: h ? /* @__PURE__ */ i(m, {
27
- children: [/* @__PURE__ */ e(l, {
29
+ children: h ? /* @__PURE__ */ n(u, {
30
+ children: [/* @__PURE__ */ e(s, {
28
31
  as: "p",
29
32
  color: "textOnLightSecondary",
30
33
  variant: "caption",
@@ -34,60 +37,60 @@ function N({
34
37
  }), /* @__PURE__ */ e("div", {
35
38
  className: o.buttons,
36
39
  children: /* @__PURE__ */ e(c, {
37
- "aria-label": s.formatMessage(t.aiSuggestionConfirm),
38
- icon: u,
39
- onClick: p,
40
+ "aria-label": l.formatMessage(t.aiSuggestionConfirm),
41
+ icon: p,
42
+ onClick: m,
40
43
  size: "x-small",
41
44
  "data-target-id": "IconButton-aiSuggestionConfirm"
42
45
  })
43
46
  })]
44
- }) : /* @__PURE__ */ i(m, {
45
- children: [/* @__PURE__ */ i("div", {
46
- children: [/* @__PURE__ */ e(l, {
47
+ }) : /* @__PURE__ */ n(u, {
48
+ children: [/* @__PURE__ */ n("div", {
49
+ children: [/* @__PURE__ */ e(s, {
47
50
  as: "p",
48
51
  color: "textOnLightSecondary",
49
52
  variant: "caption",
50
53
  children: /* @__PURE__ */ e(r, {
51
54
  ...t.aiSuggestionCaption
52
55
  })
53
- }), /* @__PURE__ */ e(l, {
56
+ }), /* @__PURE__ */ e(s, {
54
57
  as: "p",
55
- children: w(S, {
56
- type: n,
57
- locale: s.locale
58
+ children: x(S, {
59
+ type: i,
60
+ locale: l.locale
58
61
  })
59
62
  })]
60
- }), /* @__PURE__ */ i("div", {
63
+ }), /* @__PURE__ */ n("div", {
61
64
  className: o.buttons,
62
65
  children: [/* @__PURE__ */ e(c, {
63
- "aria-label": s.formatMessage(n === "multiSelect" ? t.aiSuggestionAppend : t.aiSuggestionClearAndReplace),
64
- "data-target-id": n === "multiSelect" ? "IconButton-aiSuggestionAppend" : "IconButton-aiSuggestionClearAndReplace",
65
- icon: u,
66
- onClick: n === "multiSelect" ? g : d,
66
+ "aria-label": l.formatMessage(i === "multiSelect" ? t.aiSuggestionAppend : t.aiSuggestionClearAndReplace),
67
+ "data-target-id": i === "multiSelect" ? "IconButton-aiSuggestionAppend" : "IconButton-aiSuggestionClearAndReplace",
68
+ icon: p,
69
+ onClick: i === "multiSelect" ? d : g,
67
70
  size: "x-small"
68
- }), /* @__PURE__ */ i(a.Root, {
71
+ }), /* @__PURE__ */ n(a.Root, {
69
72
  children: [/* @__PURE__ */ e(a.Trigger, {
70
73
  className: o.selectTrigger,
71
74
  children: /* @__PURE__ */ e(c, {
72
- "aria-label": s.formatMessage(t.aiSuggestionOptions),
73
- icon: f,
75
+ "aria-label": l.formatMessage(t.aiSuggestionOptions),
76
+ icon: I,
74
77
  "data-target-id": "IconButton-aiSuggestionOptions"
75
78
  })
76
- }), /* @__PURE__ */ i(a.Content, {
77
- children: [n === "multiSelect" && /* @__PURE__ */ e(a.Item, {
78
- onSelect: g,
79
+ }), /* @__PURE__ */ n(a.Content, {
80
+ children: [i === "multiSelect" && /* @__PURE__ */ e(a.Item, {
81
+ onSelect: d,
79
82
  "data-target-id": "DropdownMenu.Item-aiSuggestionAppend",
80
83
  children: /* @__PURE__ */ e(r, {
81
84
  ...t.aiSuggestionAppend
82
85
  })
83
86
  }), /* @__PURE__ */ e(a.Item, {
84
- onSelect: d,
87
+ onSelect: g,
85
88
  "data-target-id": "DropdownMenu.Item-aiSuggestionClearAndReplace",
86
89
  children: /* @__PURE__ */ e(r, {
87
90
  ...t.aiSuggestionClearAndReplace
88
91
  })
89
92
  }), /* @__PURE__ */ e(a.Separator, {}), /* @__PURE__ */ e(a.Item, {
90
- onSelect: p,
93
+ onSelect: m,
91
94
  "data-target-id": "DropdownMenu.Item-aiSuggestionIgnore",
92
95
  children: /* @__PURE__ */ e(r, {
93
96
  ...t.aiSuggestionIgnore
@@ -101,5 +104,5 @@ function N({
101
104
  });
102
105
  }
103
106
  export {
104
- N as AiSuggestionField
107
+ z as AiSuggestionField
105
108
  };
@@ -1 +1 @@
1
- ._wrapperGradient_z7sut_1{background:linear-gradient(135deg,#fe03dc,#2784fa);border-radius:0 0 var(--radius-2) var(--radius-2)}._wrapperGradient_z7sut_1 ._wrapper_z7sut_1{position:relative;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--space-2) var(--space-3);background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent;border-radius:inherit;-webkit-user-select:none;user-select:none}._wrapperGradient_z7sut_1 ._wrapper_z7sut_1 ._buttons_z7sut_18{display:flex;gap:var(--space-1)}._wrapperGradient_z7sut_1 ._wrapper_z7sut_1 ._selectTrigger_z7sut_22{width:var(--size-6);height:var(--size-6)}._wrapperGradient_z7sut_1 ._wrapper_z7sut_1>div>p{overflow-wrap:anywhere}
1
+ ._wrapperGradient_mllxq_1{background:linear-gradient(135deg,#fe03dc,#2784fa)}._wrapperGradient_mllxq_1[data-modern=false]{border-radius:0 0 var(--radius-2) var(--radius-2)}._wrapperGradient_mllxq_1[data-modern=true]{border-radius:0 0 var(--bp-radius-06) var(--bp-radius-06)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1{position:relative;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--space-2) var(--space-3);background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent;border-radius:inherit;-webkit-user-select:none;user-select:none}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1 ._buttons_mllxq_23{display:flex;gap:var(--space-1)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1 ._selectTrigger_mllxq_27{width:var(--size-6);height:var(--size-6)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1>div>p{overflow-wrap:anywhere}
@@ -1 +1 @@
1
- ._noAttributesText_tpqxf_2{text-align:center}._fieldWrapper_tpqxf_6{position:relative;isolation:isolate}._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>input,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>button,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>div[role=group]>div,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>div>div{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>input:not(:disabled):not(:focus-visible):not(._error_tpqxf_19):hover,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>button:not(:disabled):not(:focus-visible):not(._error_tpqxf_19):hover,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_tpqxf_19):hover,._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11>div>div:not(:disabled):not(:focus-visible):not(._error_tpqxf_19):hover{border-bottom:none}._fieldWrapper_tpqxf_6 ._hasSuggestion_tpqxf_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_tpqxf_6 ._dateField_tpqxf_31>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>._comboboxContainer_tpqxf_35,._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>input,._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>button,._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>div[role=group]>div,._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>div>div,._fieldWrapper_tpqxf_6 ._suggestionApplied_tpqxf_35>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_tpqxf_50{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_tpqxf_50 ._labelText_tpqxf_56{flex:unset!important}._labelWrapper_tpqxf_50 ._labelIcon_tpqxf_59{width:var(--space-4);height:var(--space-4);margin-inline-end:var(--space-3);margin-inline-start:var(--space-3)}
1
+ ._noAttributesText_fefg3_2{text-align:center}._fieldWrapper_fefg3_6{position:relative;isolation:isolate}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>input,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>button,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div[role=group]>div,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>div,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>input:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>button:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>div:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>input:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover{border-bottom:none}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_fefg3_6 ._dateField_fefg3_33>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>._comboboxContainer_fefg3_37,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>input,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>button,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div[role=group]>div,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div>div,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_fefg3_52{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_fefg3_52 ._labelText_fefg3_58{flex:unset!important}._labelWrapper_fefg3_52 ._labelIcon_fefg3_61{width:var(--space-4);height:var(--space-4);margin-inline-end:var(--space-3);margin-inline-start:var(--space-3)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/box-ai-agent-selector": "^0.55.2",
@@ -15,9 +15,9 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@ariakit/react": "0.4.15",
18
- "@box/box-ai-agent-selector": "^1.3.4",
18
+ "@box/box-ai-agent-selector": "^1.3.5",
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
- "@box/blueprint-web": "^12.89.0",
20
+ "@box/blueprint-web": "^12.89.1",
21
21
  "@box/blueprint-web-assets": "^4.75.0",
22
22
  "@box/storybook-utils": "^0.14.11",
23
23
  "@testing-library/react": "^15.0.6",