@cgi-learning-hub/ui 1.3.5-dev.1739285046 → 1.3.5-dev.1739378027

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 (32) hide show
  1. package/dist/Chip-DT0H_Vjk.js +522 -0
  2. package/dist/Chip-FQbM3QKF.cjs +1 -0
  3. package/dist/DatePicker-BroG1y5g.cjs +14 -0
  4. package/dist/{DatePicker-B2dOH7Zl.js → DatePicker-CYvDKr4R.js} +2638 -3146
  5. package/dist/{TableSortLabel-DrpjgQBL.js → TableSortLabel-BXto8Tc7.js} +2 -2
  6. package/dist/{TableSortLabel-B2Nvl2FF.cjs → TableSortLabel-h3un69IU.cjs} +1 -1
  7. package/dist/Tabs-Bg_Zi8UV.cjs +4 -0
  8. package/dist/{Tabs-CMnuOnzP.js → Tabs-DzbNYi2v.js} +1 -1
  9. package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
  10. package/dist/components/DatePicker/DatePicker.es.js +1 -1
  11. package/dist/components/DatePicker/index.cjs.js +1 -1
  12. package/dist/components/DatePicker/index.es.js +1 -1
  13. package/dist/components/index.cjs.js +1 -1
  14. package/dist/components/index.es.js +206 -205
  15. package/dist/components/stories/Chip.stories.cjs.js +1 -0
  16. package/dist/components/stories/Chip.stories.d.ts +10 -0
  17. package/dist/components/stories/Chip.stories.es.js +77 -0
  18. package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
  19. package/dist/components/stories/DatePicker.stories.es.js +1 -1
  20. package/dist/components/stories/TabList.stories.cjs.js +1 -1
  21. package/dist/components/stories/TabList.stories.es.js +2 -2
  22. package/dist/index.cjs.js +1 -1
  23. package/dist/index.es.js +206 -205
  24. package/dist/unsupportedProp-Bn6XWqwH.cjs +1 -0
  25. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  26. package/dist/useThemeProps-BAXMP5Ww.cjs +1 -0
  27. package/dist/useThemeProps-KNNlKFR_.js +17 -0
  28. package/package.json +1 -1
  29. package/dist/DatePicker-C3CzK9Fb.cjs +0 -14
  30. package/dist/Tabs-CTYqNGoo.cjs +0 -4
  31. package/dist/useThemeProps-DwnyQf-S.js +0 -24
  32. package/dist/useThemeProps-u8EQT0RR.cjs +0 -1
@@ -0,0 +1,522 @@
1
+ import * as u from "react";
2
+ import { H as q, I as J, G as y, n as d, P as r } from "./generateUtilityClasses-v9KcqdK1.js";
3
+ import { c as Q } from "./createSvgIcon-Cd6y8E9W.js";
4
+ import { jsx as P, jsxs as X } from "react/jsx-runtime";
5
+ import { m as Y } from "./memoTheme-D-rebSfX.js";
6
+ import { c as k } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
7
+ import { u as Z, s as E, c as h } from "./DefaultPropsProvider-CmOKr9hq.js";
8
+ import { u as aa } from "./useForkRef-C_4o__cU.js";
9
+ import { B as N } from "./ButtonBase-eQU9HVgU.js";
10
+ import { c as t } from "./capitalize-yX_QSknw.js";
11
+ import { u as ea } from "./unsupportedProp-BuVD30Gh.js";
12
+ const oa = Q(/* @__PURE__ */ P("path", {
13
+ d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
14
+ }), "Cancel");
15
+ function ra(a) {
16
+ return J("MuiChip", a);
17
+ }
18
+ const o = q("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorDefault", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]), la = (a) => {
19
+ const {
20
+ classes: l,
21
+ disabled: e,
22
+ size: n,
23
+ color: i,
24
+ iconColor: g,
25
+ onDelete: f,
26
+ clickable: s,
27
+ variant: p
28
+ } = a, C = {
29
+ root: ["root", p, e && "disabled", `size${t(n)}`, `color${t(i)}`, s && "clickable", s && `clickableColor${t(i)}`, f && "deletable", f && `deletableColor${t(i)}`, `${p}${t(i)}`],
30
+ label: ["label", `label${t(n)}`],
31
+ avatar: ["avatar", `avatar${t(n)}`, `avatarColor${t(i)}`],
32
+ icon: ["icon", `icon${t(n)}`, `iconColor${t(g)}`],
33
+ deleteIcon: ["deleteIcon", `deleteIcon${t(n)}`, `deleteIconColor${t(i)}`, `deleteIcon${t(p)}Color${t(i)}`]
34
+ };
35
+ return h(C, ra, l);
36
+ }, ta = E("div", {
37
+ name: "MuiChip",
38
+ slot: "Root",
39
+ overridesResolver: (a, l) => {
40
+ const {
41
+ ownerState: e
42
+ } = a, {
43
+ color: n,
44
+ iconColor: i,
45
+ clickable: g,
46
+ onDelete: f,
47
+ size: s,
48
+ variant: p
49
+ } = e;
50
+ return [{
51
+ [`& .${o.avatar}`]: l.avatar
52
+ }, {
53
+ [`& .${o.avatar}`]: l[`avatar${t(s)}`]
54
+ }, {
55
+ [`& .${o.avatar}`]: l[`avatarColor${t(n)}`]
56
+ }, {
57
+ [`& .${o.icon}`]: l.icon
58
+ }, {
59
+ [`& .${o.icon}`]: l[`icon${t(s)}`]
60
+ }, {
61
+ [`& .${o.icon}`]: l[`iconColor${t(i)}`]
62
+ }, {
63
+ [`& .${o.deleteIcon}`]: l.deleteIcon
64
+ }, {
65
+ [`& .${o.deleteIcon}`]: l[`deleteIcon${t(s)}`]
66
+ }, {
67
+ [`& .${o.deleteIcon}`]: l[`deleteIconColor${t(n)}`]
68
+ }, {
69
+ [`& .${o.deleteIcon}`]: l[`deleteIcon${t(p)}Color${t(n)}`]
70
+ }, l.root, l[`size${t(s)}`], l[`color${t(n)}`], g && l.clickable, g && n !== "default" && l[`clickableColor${t(n)})`], f && l.deletable, f && n !== "default" && l[`deletableColor${t(n)}`], l[p], l[`${p}${t(n)}`]];
71
+ }
72
+ })(Y(({
73
+ theme: a
74
+ }) => {
75
+ const l = a.palette.mode === "light" ? a.palette.grey[700] : a.palette.grey[300];
76
+ return {
77
+ maxWidth: "100%",
78
+ fontFamily: a.typography.fontFamily,
79
+ fontSize: a.typography.pxToRem(13),
80
+ display: "inline-flex",
81
+ alignItems: "center",
82
+ justifyContent: "center",
83
+ height: 32,
84
+ color: (a.vars || a).palette.text.primary,
85
+ backgroundColor: (a.vars || a).palette.action.selected,
86
+ borderRadius: 32 / 2,
87
+ whiteSpace: "nowrap",
88
+ transition: a.transitions.create(["background-color", "box-shadow"]),
89
+ // reset cursor explicitly in case ButtonBase is used
90
+ cursor: "unset",
91
+ // We disable the focus ring for mouse, touch and keyboard users.
92
+ outline: 0,
93
+ textDecoration: "none",
94
+ border: 0,
95
+ // Remove `button` border
96
+ padding: 0,
97
+ // Remove `button` padding
98
+ verticalAlign: "middle",
99
+ boxSizing: "border-box",
100
+ [`&.${o.disabled}`]: {
101
+ opacity: (a.vars || a).palette.action.disabledOpacity,
102
+ pointerEvents: "none"
103
+ },
104
+ [`& .${o.avatar}`]: {
105
+ marginLeft: 5,
106
+ marginRight: -6,
107
+ width: 24,
108
+ height: 24,
109
+ color: a.vars ? a.vars.palette.Chip.defaultAvatarColor : l,
110
+ fontSize: a.typography.pxToRem(12)
111
+ },
112
+ [`& .${o.avatarColorPrimary}`]: {
113
+ color: (a.vars || a).palette.primary.contrastText,
114
+ backgroundColor: (a.vars || a).palette.primary.dark
115
+ },
116
+ [`& .${o.avatarColorSecondary}`]: {
117
+ color: (a.vars || a).palette.secondary.contrastText,
118
+ backgroundColor: (a.vars || a).palette.secondary.dark
119
+ },
120
+ [`& .${o.avatarSmall}`]: {
121
+ marginLeft: 4,
122
+ marginRight: -4,
123
+ width: 18,
124
+ height: 18,
125
+ fontSize: a.typography.pxToRem(10)
126
+ },
127
+ [`& .${o.icon}`]: {
128
+ marginLeft: 5,
129
+ marginRight: -6
130
+ },
131
+ [`& .${o.deleteIcon}`]: {
132
+ WebkitTapHighlightColor: "transparent",
133
+ color: a.vars ? `rgba(${a.vars.palette.text.primaryChannel} / 0.26)` : d(a.palette.text.primary, 0.26),
134
+ fontSize: 22,
135
+ cursor: "pointer",
136
+ margin: "0 5px 0 -6px",
137
+ "&:hover": {
138
+ color: a.vars ? `rgba(${a.vars.palette.text.primaryChannel} / 0.4)` : d(a.palette.text.primary, 0.4)
139
+ }
140
+ },
141
+ variants: [{
142
+ props: {
143
+ size: "small"
144
+ },
145
+ style: {
146
+ height: 24,
147
+ [`& .${o.icon}`]: {
148
+ fontSize: 18,
149
+ marginLeft: 4,
150
+ marginRight: -4
151
+ },
152
+ [`& .${o.deleteIcon}`]: {
153
+ fontSize: 16,
154
+ marginRight: 4,
155
+ marginLeft: -4
156
+ }
157
+ }
158
+ }, ...Object.entries(a.palette).filter(k(["contrastText"])).map(([e]) => ({
159
+ props: {
160
+ color: e
161
+ },
162
+ style: {
163
+ backgroundColor: (a.vars || a).palette[e].main,
164
+ color: (a.vars || a).palette[e].contrastText,
165
+ [`& .${o.deleteIcon}`]: {
166
+ color: a.vars ? `rgba(${a.vars.palette[e].contrastTextChannel} / 0.7)` : d(a.palette[e].contrastText, 0.7),
167
+ "&:hover, &:active": {
168
+ color: (a.vars || a).palette[e].contrastText
169
+ }
170
+ }
171
+ }
172
+ })), {
173
+ props: (e) => e.iconColor === e.color,
174
+ style: {
175
+ [`& .${o.icon}`]: {
176
+ color: a.vars ? a.vars.palette.Chip.defaultIconColor : l
177
+ }
178
+ }
179
+ }, {
180
+ props: (e) => e.iconColor === e.color && e.color !== "default",
181
+ style: {
182
+ [`& .${o.icon}`]: {
183
+ color: "inherit"
184
+ }
185
+ }
186
+ }, {
187
+ props: {
188
+ onDelete: !0
189
+ },
190
+ style: {
191
+ [`&.${o.focusVisible}`]: {
192
+ backgroundColor: a.vars ? `rgba(${a.vars.palette.action.selectedChannel} / calc(${a.vars.palette.action.selectedOpacity} + ${a.vars.palette.action.focusOpacity}))` : d(a.palette.action.selected, a.palette.action.selectedOpacity + a.palette.action.focusOpacity)
193
+ }
194
+ }
195
+ }, ...Object.entries(a.palette).filter(k(["dark"])).map(([e]) => ({
196
+ props: {
197
+ color: e,
198
+ onDelete: !0
199
+ },
200
+ style: {
201
+ [`&.${o.focusVisible}`]: {
202
+ background: (a.vars || a).palette[e].dark
203
+ }
204
+ }
205
+ })), {
206
+ props: {
207
+ clickable: !0
208
+ },
209
+ style: {
210
+ userSelect: "none",
211
+ WebkitTapHighlightColor: "transparent",
212
+ cursor: "pointer",
213
+ "&:hover": {
214
+ backgroundColor: a.vars ? `rgba(${a.vars.palette.action.selectedChannel} / calc(${a.vars.palette.action.selectedOpacity} + ${a.vars.palette.action.hoverOpacity}))` : d(a.palette.action.selected, a.palette.action.selectedOpacity + a.palette.action.hoverOpacity)
215
+ },
216
+ [`&.${o.focusVisible}`]: {
217
+ backgroundColor: a.vars ? `rgba(${a.vars.palette.action.selectedChannel} / calc(${a.vars.palette.action.selectedOpacity} + ${a.vars.palette.action.focusOpacity}))` : d(a.palette.action.selected, a.palette.action.selectedOpacity + a.palette.action.focusOpacity)
218
+ },
219
+ "&:active": {
220
+ boxShadow: (a.vars || a).shadows[1]
221
+ }
222
+ }
223
+ }, ...Object.entries(a.palette).filter(k(["dark"])).map(([e]) => ({
224
+ props: {
225
+ color: e,
226
+ clickable: !0
227
+ },
228
+ style: {
229
+ [`&:hover, &.${o.focusVisible}`]: {
230
+ backgroundColor: (a.vars || a).palette[e].dark
231
+ }
232
+ }
233
+ })), {
234
+ props: {
235
+ variant: "outlined"
236
+ },
237
+ style: {
238
+ backgroundColor: "transparent",
239
+ border: a.vars ? `1px solid ${a.vars.palette.Chip.defaultBorder}` : `1px solid ${a.palette.mode === "light" ? a.palette.grey[400] : a.palette.grey[700]}`,
240
+ [`&.${o.clickable}:hover`]: {
241
+ backgroundColor: (a.vars || a).palette.action.hover
242
+ },
243
+ [`&.${o.focusVisible}`]: {
244
+ backgroundColor: (a.vars || a).palette.action.focus
245
+ },
246
+ [`& .${o.avatar}`]: {
247
+ marginLeft: 4
248
+ },
249
+ [`& .${o.avatarSmall}`]: {
250
+ marginLeft: 2
251
+ },
252
+ [`& .${o.icon}`]: {
253
+ marginLeft: 4
254
+ },
255
+ [`& .${o.iconSmall}`]: {
256
+ marginLeft: 2
257
+ },
258
+ [`& .${o.deleteIcon}`]: {
259
+ marginRight: 5
260
+ },
261
+ [`& .${o.deleteIconSmall}`]: {
262
+ marginRight: 3
263
+ }
264
+ }
265
+ }, ...Object.entries(a.palette).filter(k()).map(([e]) => ({
266
+ props: {
267
+ variant: "outlined",
268
+ color: e
269
+ },
270
+ style: {
271
+ color: (a.vars || a).palette[e].main,
272
+ border: `1px solid ${a.vars ? `rgba(${a.vars.palette[e].mainChannel} / 0.7)` : d(a.palette[e].main, 0.7)}`,
273
+ [`&.${o.clickable}:hover`]: {
274
+ backgroundColor: a.vars ? `rgba(${a.vars.palette[e].mainChannel} / ${a.vars.palette.action.hoverOpacity})` : d(a.palette[e].main, a.palette.action.hoverOpacity)
275
+ },
276
+ [`&.${o.focusVisible}`]: {
277
+ backgroundColor: a.vars ? `rgba(${a.vars.palette[e].mainChannel} / ${a.vars.palette.action.focusOpacity})` : d(a.palette[e].main, a.palette.action.focusOpacity)
278
+ },
279
+ [`& .${o.deleteIcon}`]: {
280
+ color: a.vars ? `rgba(${a.vars.palette[e].mainChannel} / 0.7)` : d(a.palette[e].main, 0.7),
281
+ "&:hover, &:active": {
282
+ color: (a.vars || a).palette[e].main
283
+ }
284
+ }
285
+ }
286
+ }))]
287
+ };
288
+ })), na = E("span", {
289
+ name: "MuiChip",
290
+ slot: "Label",
291
+ overridesResolver: (a, l) => {
292
+ const {
293
+ ownerState: e
294
+ } = a, {
295
+ size: n
296
+ } = e;
297
+ return [l.label, l[`label${t(n)}`]];
298
+ }
299
+ })({
300
+ overflow: "hidden",
301
+ textOverflow: "ellipsis",
302
+ paddingLeft: 12,
303
+ paddingRight: 12,
304
+ whiteSpace: "nowrap",
305
+ variants: [{
306
+ props: {
307
+ variant: "outlined"
308
+ },
309
+ style: {
310
+ paddingLeft: 11,
311
+ paddingRight: 11
312
+ }
313
+ }, {
314
+ props: {
315
+ size: "small"
316
+ },
317
+ style: {
318
+ paddingLeft: 8,
319
+ paddingRight: 8
320
+ }
321
+ }, {
322
+ props: {
323
+ size: "small",
324
+ variant: "outlined"
325
+ },
326
+ style: {
327
+ paddingLeft: 7,
328
+ paddingRight: 7
329
+ }
330
+ }]
331
+ });
332
+ function V(a) {
333
+ return a.key === "Backspace" || a.key === "Delete";
334
+ }
335
+ const ia = /* @__PURE__ */ u.forwardRef(function(l, e) {
336
+ const n = Z({
337
+ props: l,
338
+ name: "MuiChip"
339
+ }), {
340
+ avatar: i,
341
+ className: g,
342
+ clickable: f,
343
+ color: s = "default",
344
+ component: p,
345
+ deleteIcon: C,
346
+ disabled: m = !1,
347
+ icon: $,
348
+ label: M,
349
+ onClick: T,
350
+ onDelete: v,
351
+ onKeyDown: w,
352
+ onKeyUp: z,
353
+ size: j = "medium",
354
+ variant: K = "filled",
355
+ tabIndex: U,
356
+ skipFocusWhenDisabled: F = !1,
357
+ // TODO v6: Rename to `focusableWhenDisabled`.
358
+ ...W
359
+ } = n, B = u.useRef(null), H = aa(B, e), D = (c) => {
360
+ c.stopPropagation(), v && v(c);
361
+ }, A = (c) => {
362
+ c.currentTarget === c.target && V(c) && c.preventDefault(), w && w(c);
363
+ }, _ = (c) => {
364
+ c.currentTarget === c.target && v && V(c) && v(c), z && z(c);
365
+ }, I = f !== !1 && T ? !0 : f, S = I || v ? N : p || "div", x = {
366
+ ...n,
367
+ component: S,
368
+ disabled: m,
369
+ size: j,
370
+ color: s,
371
+ iconColor: /* @__PURE__ */ u.isValidElement($) && $.props.color || s,
372
+ onDelete: !!v,
373
+ clickable: I,
374
+ variant: K
375
+ }, b = la(x), G = S === N ? {
376
+ component: p || "div",
377
+ focusVisibleClassName: b.focusVisible,
378
+ ...v && {
379
+ disableRipple: !0
380
+ }
381
+ } : {};
382
+ let L = null;
383
+ v && (L = C && /* @__PURE__ */ u.isValidElement(C) ? /* @__PURE__ */ u.cloneElement(C, {
384
+ className: y(C.props.className, b.deleteIcon),
385
+ onClick: D
386
+ }) : /* @__PURE__ */ P(oa, {
387
+ className: y(b.deleteIcon),
388
+ onClick: D
389
+ }));
390
+ let O = null;
391
+ i && /* @__PURE__ */ u.isValidElement(i) && (O = /* @__PURE__ */ u.cloneElement(i, {
392
+ className: y(b.avatar, i.props.className)
393
+ }));
394
+ let R = null;
395
+ return $ && /* @__PURE__ */ u.isValidElement($) && (R = /* @__PURE__ */ u.cloneElement($, {
396
+ className: y(b.icon, $.props.className)
397
+ })), process.env.NODE_ENV !== "production" && O && R && console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."), /* @__PURE__ */ X(ta, {
398
+ as: S,
399
+ className: y(b.root, g),
400
+ disabled: I && m ? !0 : void 0,
401
+ onClick: T,
402
+ onKeyDown: A,
403
+ onKeyUp: _,
404
+ ref: H,
405
+ tabIndex: F && m ? -1 : U,
406
+ ownerState: x,
407
+ ...G,
408
+ ...W,
409
+ children: [O || R, /* @__PURE__ */ P(na, {
410
+ className: y(b.label),
411
+ ownerState: x,
412
+ children: M
413
+ }), L]
414
+ });
415
+ });
416
+ process.env.NODE_ENV !== "production" && (ia.propTypes = {
417
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
418
+ // │ These PropTypes are generated from the TypeScript type definitions. │
419
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
420
+ // └─────────────────────────────────────────────────────────────────────┘
421
+ /**
422
+ * The Avatar element to display.
423
+ */
424
+ avatar: r.element,
425
+ /**
426
+ * This prop isn't supported.
427
+ * Use the `component` prop if you need to change the children structure.
428
+ */
429
+ children: ea,
430
+ /**
431
+ * Override or extend the styles applied to the component.
432
+ */
433
+ classes: r.object,
434
+ /**
435
+ * @ignore
436
+ */
437
+ className: r.string,
438
+ /**
439
+ * If `true`, the chip will appear clickable, and will raise when pressed,
440
+ * even if the onClick prop is not defined.
441
+ * If `false`, the chip will not appear clickable, even if onClick prop is defined.
442
+ * This can be used, for example,
443
+ * along with the component prop to indicate an anchor Chip is clickable.
444
+ * Note: this controls the UI and does not affect the onClick event.
445
+ */
446
+ clickable: r.bool,
447
+ /**
448
+ * The color of the component.
449
+ * It supports both default and custom theme colors, which can be added as shown in the
450
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
451
+ * @default 'default'
452
+ */
453
+ color: r.oneOfType([r.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), r.string]),
454
+ /**
455
+ * The component used for the root node.
456
+ * Either a string to use a HTML element or a component.
457
+ */
458
+ component: r.elementType,
459
+ /**
460
+ * Override the default delete icon element. Shown only if `onDelete` is set.
461
+ */
462
+ deleteIcon: r.element,
463
+ /**
464
+ * If `true`, the component is disabled.
465
+ * @default false
466
+ */
467
+ disabled: r.bool,
468
+ /**
469
+ * Icon element.
470
+ */
471
+ icon: r.element,
472
+ /**
473
+ * The content of the component.
474
+ */
475
+ label: r.node,
476
+ /**
477
+ * @ignore
478
+ */
479
+ onClick: r.func,
480
+ /**
481
+ * Callback fired when the delete icon is clicked.
482
+ * If set, the delete icon will be shown.
483
+ */
484
+ onDelete: r.func,
485
+ /**
486
+ * @ignore
487
+ */
488
+ onKeyDown: r.func,
489
+ /**
490
+ * @ignore
491
+ */
492
+ onKeyUp: r.func,
493
+ /**
494
+ * The size of the component.
495
+ * @default 'medium'
496
+ */
497
+ size: r.oneOfType([r.oneOf(["medium", "small"]), r.string]),
498
+ /**
499
+ * If `true`, allows the disabled chip to escape focus.
500
+ * If `false`, allows the disabled chip to receive focus.
501
+ * @default false
502
+ */
503
+ skipFocusWhenDisabled: r.bool,
504
+ /**
505
+ * The system prop that allows defining system overrides as well as additional CSS styles.
506
+ */
507
+ sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
508
+ /**
509
+ * @ignore
510
+ */
511
+ tabIndex: r.number,
512
+ /**
513
+ * The variant to use.
514
+ * @default 'filled'
515
+ */
516
+ variant: r.oneOfType([r.oneOf(["filled", "outlined"]), r.string])
517
+ });
518
+ export {
519
+ ia as C,
520
+ o as c,
521
+ ra as g
522
+ };
@@ -0,0 +1 @@
1
+ "use strict";const H=require("react"),a=require("./generateUtilityClasses-0dYt6eGZ.cjs"),G=require("./createSvgIcon-CWNQW6u6.cjs"),$=require("react/jsx-runtime"),J=require("./memoTheme-D1tPxCd9.cjs"),C=require("./createSimplePaletteValueFilter-PTK3TAhW.cjs"),P=require("./DefaultPropsProvider-PRhNsS_3.cjs"),Q=require("./useForkRef-CTI33h-3.cjs"),V=require("./ButtonBase-DKNIY_Ve.cjs"),r=require("./capitalize-Cq3s4y8R.cjs"),X=require("./unsupportedProp-Bn6XWqwH.cjs");function Y(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(l,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return l.default=e,Object.freeze(l)}const d=Y(H),Z=G.createSvgIcon($.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function N(e){return a.generateUtilityClass("MuiChip",e)}const t=a.generateUtilityClasses("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),ee=e=>{const{classes:l,disabled:o,size:i,color:n,iconColor:f,onDelete:u,clickable:s,variant:p}=e,v={root:["root",p,o&&"disabled",`size${r.capitalize(i)}`,`color${r.capitalize(n)}`,s&&"clickable",s&&`clickableColor${r.capitalize(n)}`,u&&"deletable",u&&`deletableColor${r.capitalize(n)}`,`${p}${r.capitalize(n)}`],label:["label",`label${r.capitalize(i)}`],avatar:["avatar",`avatar${r.capitalize(i)}`,`avatarColor${r.capitalize(n)}`],icon:["icon",`icon${r.capitalize(i)}`,`iconColor${r.capitalize(f)}`],deleteIcon:["deleteIcon",`deleteIcon${r.capitalize(i)}`,`deleteIconColor${r.capitalize(n)}`,`deleteIcon${r.capitalize(p)}Color${r.capitalize(n)}`]};return P.composeClasses(v,N,l)},ae=P.styled("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,l)=>{const{ownerState:o}=e,{color:i,iconColor:n,clickable:f,onDelete:u,size:s,variant:p}=o;return[{[`& .${t.avatar}`]:l.avatar},{[`& .${t.avatar}`]:l[`avatar${r.capitalize(s)}`]},{[`& .${t.avatar}`]:l[`avatarColor${r.capitalize(i)}`]},{[`& .${t.icon}`]:l.icon},{[`& .${t.icon}`]:l[`icon${r.capitalize(s)}`]},{[`& .${t.icon}`]:l[`iconColor${r.capitalize(n)}`]},{[`& .${t.deleteIcon}`]:l.deleteIcon},{[`& .${t.deleteIcon}`]:l[`deleteIcon${r.capitalize(s)}`]},{[`& .${t.deleteIcon}`]:l[`deleteIconColor${r.capitalize(i)}`]},{[`& .${t.deleteIcon}`]:l[`deleteIcon${r.capitalize(p)}Color${r.capitalize(i)}`]},l.root,l[`size${r.capitalize(s)}`],l[`color${r.capitalize(i)}`],f&&l.clickable,f&&i!=="default"&&l[`clickableColor${r.capitalize(i)})`],u&&l.deletable,u&&i!=="default"&&l[`deletableColor${r.capitalize(i)}`],l[p],l[`${p}${r.capitalize(i)}`]]}})(J.memoTheme(({theme:e})=>{const l=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${t.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${t.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:l,fontSize:e.typography.pxToRem(12)},[`& .${t.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${t.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${t.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${t.icon}`]:{marginLeft:5,marginRight:-6},[`& .${t.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:a.alpha(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:a.alpha(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${t.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${t.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(C.createSimplePaletteValueFilter(["contrastText"])).map(([o])=>({props:{color:o},style:{backgroundColor:(e.vars||e).palette[o].main,color:(e.vars||e).palette[o].contrastText,[`& .${t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o].contrastTextChannel} / 0.7)`:a.alpha(e.palette[o].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o].contrastText}}}})),{props:o=>o.iconColor===o.color,style:{[`& .${t.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:l}}},{props:o=>o.iconColor===o.color&&o.color!=="default",style:{[`& .${t.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:a.alpha(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(C.createSimplePaletteValueFilter(["dark"])).map(([o])=>({props:{color:o,onDelete:!0},style:{[`&.${t.focusVisible}`]:{background:(e.vars||e).palette[o].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:a.alpha(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:a.alpha(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(C.createSimplePaletteValueFilter(["dark"])).map(([o])=>({props:{color:o,clickable:!0},style:{[`&:hover, &.${t.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${t.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${t.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${t.avatar}`]:{marginLeft:4},[`& .${t.avatarSmall}`]:{marginLeft:2},[`& .${t.icon}`]:{marginLeft:4},[`& .${t.iconSmall}`]:{marginLeft:2},[`& .${t.deleteIcon}`]:{marginRight:5},[`& .${t.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(C.createSimplePaletteValueFilter()).map(([o])=>({props:{variant:"outlined",color:o},style:{color:(e.vars||e).palette[o].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o].mainChannel} / 0.7)`:a.alpha(e.palette[o].main,.7)}`,[`&.${t.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:a.alpha(e.palette[o].main,e.palette.action.hoverOpacity)},[`&.${t.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.focusOpacity})`:a.alpha(e.palette[o].main,e.palette.action.focusOpacity)},[`& .${t.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o].mainChannel} / 0.7)`:a.alpha(e.palette[o].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o].main}}}}))]}})),oe=P.styled("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,l)=>{const{ownerState:o}=e,{size:i}=o;return[l.label,l[`label${r.capitalize(i)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function j(e){return e.key==="Backspace"||e.key==="Delete"}const L=d.forwardRef(function(l,o){const i=P.useDefaultProps({props:l,name:"MuiChip"}),{avatar:n,className:f,clickable:u,color:s="default",component:p,deleteIcon:v,disabled:T=!1,icon:g,label:E,onClick:O,onDelete:y,onKeyDown:m,onKeyUp:R,size:F="medium",variant:M="filled",tabIndex:q,skipFocusWhenDisabled:U=!1,...K}=i,h=d.useRef(null),B=Q.useForkRef(h,o),D=c=>{c.stopPropagation(),y&&y(c)},W=c=>{c.currentTarget===c.target&&j(c)&&c.preventDefault(),m&&m(c)},_=c=>{c.currentTarget===c.target&&y&&j(c)&&y(c),R&&R(c)},k=u!==!1&&O?!0:u,z=k||y?V.ButtonBase:p||"div",S={...i,component:z,disabled:T,size:F,color:s,iconColor:d.isValidElement(g)&&g.props.color||s,onDelete:!!y,clickable:k,variant:M},b=ee(S),A=z===V.ButtonBase?{component:p||"div",focusVisibleClassName:b.focusVisible,...y&&{disableRipple:!0}}:{};let w=null;y&&(w=v&&d.isValidElement(v)?d.cloneElement(v,{className:a.clsx(v.props.className,b.deleteIcon),onClick:D}):$.jsx(Z,{className:a.clsx(b.deleteIcon),onClick:D}));let I=null;n&&d.isValidElement(n)&&(I=d.cloneElement(n,{className:a.clsx(b.avatar,n.props.className)}));let x=null;return g&&d.isValidElement(g)&&(x=d.cloneElement(g,{className:a.clsx(b.icon,g.props.className)})),process.env.NODE_ENV!=="production"&&I&&x&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),$.jsxs(ae,{as:z,className:a.clsx(b.root,f),disabled:k&&T?!0:void 0,onClick:O,onKeyDown:W,onKeyUp:_,ref:B,tabIndex:U&&T?-1:q,ownerState:S,...A,...K,children:[I||x,$.jsx(oe,{className:a.clsx(b.label),ownerState:S,children:E}),w]})});process.env.NODE_ENV!=="production"&&(L.propTypes={avatar:a.PropTypes.element,children:X.unsupportedProp,classes:a.PropTypes.object,className:a.PropTypes.string,clickable:a.PropTypes.bool,color:a.PropTypes.oneOfType([a.PropTypes.oneOf(["default","primary","secondary","error","info","success","warning"]),a.PropTypes.string]),component:a.PropTypes.elementType,deleteIcon:a.PropTypes.element,disabled:a.PropTypes.bool,icon:a.PropTypes.element,label:a.PropTypes.node,onClick:a.PropTypes.func,onDelete:a.PropTypes.func,onKeyDown:a.PropTypes.func,onKeyUp:a.PropTypes.func,size:a.PropTypes.oneOfType([a.PropTypes.oneOf(["medium","small"]),a.PropTypes.string]),skipFocusWhenDisabled:a.PropTypes.bool,sx:a.PropTypes.oneOfType([a.PropTypes.arrayOf(a.PropTypes.oneOfType([a.PropTypes.func,a.PropTypes.object,a.PropTypes.bool])),a.PropTypes.func,a.PropTypes.object]),tabIndex:a.PropTypes.number,variant:a.PropTypes.oneOfType([a.PropTypes.oneOf(["filled","outlined"]),a.PropTypes.string])});exports.Chip=L;exports.chipClasses=t;exports.getChipUtilityClass=N;