@cgi-learning-hub/ui 1.10.0-dev.1762955743 → 1.10.0-dev.1763111040
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.
- package/dist/index.cjs.js +21 -5
- package/dist/index.es.js +21 -5
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -43077,10 +43077,7 @@ const CheckmarkSwatch = ({
|
|
|
43077
43077
|
}
|
|
43078
43078
|
);
|
|
43079
43079
|
};
|
|
43080
|
-
const ColorPickerIcon = ({
|
|
43081
|
-
fill,
|
|
43082
|
-
onClick
|
|
43083
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43080
|
+
const ColorPickerIcon = ({ fill, onClick, showBorder = false }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43084
43081
|
"svg",
|
|
43085
43082
|
{
|
|
43086
43083
|
width: "100%",
|
|
@@ -43099,6 +43096,17 @@ const ColorPickerIcon = ({
|
|
|
43099
43096
|
fill: fill ?? "#EB4D4B"
|
|
43100
43097
|
}
|
|
43101
43098
|
),
|
|
43099
|
+
showBorder && /* @__PURE__ */ jsxRuntime.jsx(
|
|
43100
|
+
"circle",
|
|
43101
|
+
{
|
|
43102
|
+
cx: "20",
|
|
43103
|
+
cy: "20.2168",
|
|
43104
|
+
r: "10",
|
|
43105
|
+
fill: "none",
|
|
43106
|
+
stroke: "black",
|
|
43107
|
+
strokeWidth: "1.5"
|
|
43108
|
+
}
|
|
43109
|
+
),
|
|
43102
43110
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "29", cy: "28.2168", r: "5", fill: "white" }),
|
|
43103
43111
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43104
43112
|
"path",
|
|
@@ -43176,6 +43184,7 @@ const ColorPicker = ({
|
|
|
43176
43184
|
const normalizedOptions = options ? options.map(
|
|
43177
43185
|
(option) => typeof option === "string" ? { color: option, showBorder: false } : { ...option, showBorder: option.showBorder ?? false }
|
|
43178
43186
|
) : DEFAULT_COLOR_OPTIONS;
|
|
43187
|
+
const currentOption = normalizedOptions.find((opt) => opt.color === value);
|
|
43179
43188
|
const colorStrings = normalizedOptions.map((opt) => opt.color);
|
|
43180
43189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43181
43190
|
material.ClickAwayListener,
|
|
@@ -43189,7 +43198,14 @@ const ColorPicker = ({
|
|
|
43189
43198
|
tabIndex: 0,
|
|
43190
43199
|
onKeyDown: handleKeyDown,
|
|
43191
43200
|
children: [
|
|
43192
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43201
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43202
|
+
ColorPickerIcon,
|
|
43203
|
+
{
|
|
43204
|
+
onClick: handlePickerToggle,
|
|
43205
|
+
fill: value,
|
|
43206
|
+
showBorder: (currentOption == null ? void 0 : currentOption.showBorder) ?? false
|
|
43207
|
+
}
|
|
43208
|
+
),
|
|
43193
43209
|
isCirclePickerVisible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
43194
43210
|
material.Box,
|
|
43195
43211
|
{
|
package/dist/index.es.js
CHANGED
|
@@ -43060,10 +43060,7 @@ const CheckmarkSwatch = ({
|
|
|
43060
43060
|
}
|
|
43061
43061
|
);
|
|
43062
43062
|
};
|
|
43063
|
-
const ColorPickerIcon = ({
|
|
43064
|
-
fill,
|
|
43065
|
-
onClick
|
|
43066
|
-
}) => /* @__PURE__ */ jsxs(
|
|
43063
|
+
const ColorPickerIcon = ({ fill, onClick, showBorder = false }) => /* @__PURE__ */ jsxs(
|
|
43067
43064
|
"svg",
|
|
43068
43065
|
{
|
|
43069
43066
|
width: "100%",
|
|
@@ -43082,6 +43079,17 @@ const ColorPickerIcon = ({
|
|
|
43082
43079
|
fill: fill ?? "#EB4D4B"
|
|
43083
43080
|
}
|
|
43084
43081
|
),
|
|
43082
|
+
showBorder && /* @__PURE__ */ jsx(
|
|
43083
|
+
"circle",
|
|
43084
|
+
{
|
|
43085
|
+
cx: "20",
|
|
43086
|
+
cy: "20.2168",
|
|
43087
|
+
r: "10",
|
|
43088
|
+
fill: "none",
|
|
43089
|
+
stroke: "black",
|
|
43090
|
+
strokeWidth: "1.5"
|
|
43091
|
+
}
|
|
43092
|
+
),
|
|
43085
43093
|
/* @__PURE__ */ jsx("circle", { cx: "29", cy: "28.2168", r: "5", fill: "white" }),
|
|
43086
43094
|
/* @__PURE__ */ jsx(
|
|
43087
43095
|
"path",
|
|
@@ -43159,6 +43167,7 @@ const ColorPicker = ({
|
|
|
43159
43167
|
const normalizedOptions = options ? options.map(
|
|
43160
43168
|
(option) => typeof option === "string" ? { color: option, showBorder: false } : { ...option, showBorder: option.showBorder ?? false }
|
|
43161
43169
|
) : DEFAULT_COLOR_OPTIONS;
|
|
43170
|
+
const currentOption = normalizedOptions.find((opt) => opt.color === value);
|
|
43162
43171
|
const colorStrings = normalizedOptions.map((opt) => opt.color);
|
|
43163
43172
|
return /* @__PURE__ */ jsx(
|
|
43164
43173
|
ClickAwayListener$1,
|
|
@@ -43172,7 +43181,14 @@ const ColorPicker = ({
|
|
|
43172
43181
|
tabIndex: 0,
|
|
43173
43182
|
onKeyDown: handleKeyDown,
|
|
43174
43183
|
children: [
|
|
43175
|
-
/* @__PURE__ */ jsx(
|
|
43184
|
+
/* @__PURE__ */ jsx(
|
|
43185
|
+
ColorPickerIcon,
|
|
43186
|
+
{
|
|
43187
|
+
onClick: handlePickerToggle,
|
|
43188
|
+
fill: value,
|
|
43189
|
+
showBorder: (currentOption == null ? void 0 : currentOption.showBorder) ?? false
|
|
43190
|
+
}
|
|
43191
|
+
),
|
|
43176
43192
|
isCirclePickerVisible && /* @__PURE__ */ jsx(
|
|
43177
43193
|
Box$1,
|
|
43178
43194
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "1.10.0-dev.
|
|
3
|
+
"version": "1.10.0-dev.1763111040",
|
|
4
4
|
"description": "React component library for Hub's design system, built on Material UI with custom and extended components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cgi-learning-hub",
|