@indico-data/design-system 2.17.2 → 2.19.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.
Files changed (49) hide show
  1. package/lib/index.css +616 -184
  2. package/lib/index.d.ts +17 -21
  3. package/lib/index.esm.css +616 -184
  4. package/lib/index.esm.js +36 -462
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +37 -463
  7. package/lib/index.js.map +1 -1
  8. package/lib/src/components/button/Button.stories.d.ts +1 -0
  9. package/lib/src/components/forms/input/Input.d.ts +5 -7
  10. package/lib/src/components/forms/passwordInput/PasswordInput.d.ts +5 -7
  11. package/lib/src/components/forms/subcomponents/Label.d.ts +6 -3
  12. package/lib/src/components/forms/textarea/Textarea.d.ts +5 -7
  13. package/lib/src/legacy/components/modals/ModalBase/ModalBase.d.ts +0 -1
  14. package/lib/src/storybook/labelArgTypes.d.ts +3 -0
  15. package/package.json +1 -1
  16. package/src/components/button/Button.mdx +6 -3
  17. package/src/components/button/Button.stories.tsx +8 -0
  18. package/src/components/button/Button.tsx +14 -6
  19. package/src/components/button/__tests__/Button.test.tsx +38 -0
  20. package/src/components/button/styles/Button.scss +14 -22
  21. package/src/components/button/styles/_variables.scss +77 -4
  22. package/src/components/forms/checkbox/styles/Checkbox.scss +3 -3
  23. package/src/components/forms/input/Input.mdx +15 -2
  24. package/src/components/forms/input/Input.stories.tsx +10 -45
  25. package/src/components/forms/input/Input.tsx +22 -15
  26. package/src/components/forms/input/styles/Input.scss +2 -15
  27. package/src/components/forms/passwordInput/PasswordInput.mdx +10 -8
  28. package/src/components/forms/passwordInput/PasswordInput.stories.tsx +3 -44
  29. package/src/components/forms/passwordInput/PasswordInput.tsx +20 -15
  30. package/src/components/forms/passwordInput/styles/PasswordInput.scss +2 -15
  31. package/src/components/forms/radio/styles/Radio.scss +3 -3
  32. package/src/components/forms/select/styles/Select.scss +21 -4
  33. package/src/components/forms/subcomponents/Label.tsx +29 -6
  34. package/src/components/forms/subcomponents/__tests__/Label.test.tsx +63 -15
  35. package/src/components/forms/textarea/Textarea.mdx +12 -2
  36. package/src/components/forms/textarea/Textarea.stories.tsx +4 -46
  37. package/src/components/forms/textarea/Textarea.tsx +15 -13
  38. package/src/components/forms/textarea/styles/Textarea.scss +2 -14
  39. package/src/components/forms/toggle/styles/Toggle.scss +2 -2
  40. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.scss +441 -0
  41. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +3 -4
  42. package/src/legacy/components/modals/ModalBase/ModalBase.tsx +5 -1
  43. package/src/storybook/labelArgTypes.ts +50 -0
  44. package/src/styles/globals.scss +11 -0
  45. package/src/styles/index.scss +2 -2
  46. package/src/styles/variables/themes/dark.scss +8 -7
  47. package/src/styles/variables/themes/light.scss +1 -0
  48. package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +0 -1
  49. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.ts +0 -449
package/lib/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import styled, { css as css$1, createGlobalStyle, ThemeProvider, keyframes } from 'styled-components';
3
3
  import * as e from 'react';
4
- import e__default, { cloneElement, useState, useEffect, useRef, useCallback, useContext, useMemo, createContext, forwardRef, useLayoutEffect, useImperativeHandle } from 'react';
4
+ import e__default, { cloneElement, forwardRef, useState, useEffect, useRef, useCallback, useContext, useMemo, createContext, useLayoutEffect, useImperativeHandle } from 'react';
5
5
  import ReactSelect, { components } from 'react-select';
6
6
  import { Link } from 'react-router-dom';
7
7
  import * as ReactDOM from 'react-dom';
@@ -3174,9 +3174,7 @@ const Button$2 = (props) => {
3174
3174
  props.onClick(event);
3175
3175
  }
3176
3176
  };
3177
- return (jsxs("button", Object.assign({ disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsx(Icon, { name: "fa-circle-notch", style: {
3178
- animation: 'spin 1s linear infinite',
3179
- }, className: "mr-2", ariaLabel: 'Loading...' })), iconPosition === 'left' && iconName && (jsx(Icon, { name: iconName, className: "mr-2", ariaLabel: `${iconName} Icon` })), children, iconPosition === 'right' && iconName && (jsx(Icon, { name: iconName, className: "ml-2", ariaLabel: `${iconName} Icon` }))] })));
3177
+ return (jsxs("button", Object.assign({ disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsx(Icon, { name: "fa-circle-notch", style: { animation: 'spin 1s linear infinite' }, className: "mr-2", ariaLabel: "Loading..." })), !children && iconName && jsx(Icon, { name: iconName, ariaLabel: `${iconName} Icon` }), children && iconPosition === 'left' && iconName && (jsx(Icon, { name: iconName, className: "mr-2", ariaLabel: `${iconName} Icon` })), children, children && iconPosition === 'right' && iconName && (jsx(Icon, { name: iconName, className: "ml-2", ariaLabel: `${iconName} Icon` }))] })));
3180
3178
  };
3181
3179
 
3182
3180
  function ownKeys$2(object, enumerableOnly) {
@@ -18591,22 +18589,38 @@ const Table$1 = (props) => {
18591
18589
  return (jsx("div", { className: "table-wrapper", children: jsx(Xe, Object.assign({ responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: `${striped ? 'pf__table--striped' : ''}`, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsx(LoadingComponent, {}) }, rest)) }));
18592
18590
  };
18593
18591
 
18594
- const Label = ({ label, name, isRequired, hasHiddenLabel }) => {
18595
- return (jsx("div", { "data-testid": `${name}-testId`, className: `form-label ${hasHiddenLabel ? 'is-visually-hidden' : ''}`, children: jsxs("label", { htmlFor: `${name}`, children: [label, isRequired ? jsx("span", { className: "text-error", children: " *" }) : ''] }) }));
18592
+ const Label = ({ label, name, isRequired }) => {
18593
+ return (jsx("div", { "data-testid": `${name}-testId`, className: `form-label`, children: jsxs("label", { htmlFor: `${name}`, children: [label, isRequired ? jsx("span", { className: "text-error", children: " *" }) : ''] }) }));
18596
18594
  };
18595
+ // HOC to add common label functionality to components
18596
+ function withLabel(WrappedComponent) {
18597
+ const WithLabelComponent = (_a, ref) => {
18598
+ var { label, hasHiddenLabel = false, name, isRequired } = _a, rest = __rest$1(_a, ["label", "hasHiddenLabel", "name", "isRequired"]);
18599
+ const ariaLabel = hasHiddenLabel
18600
+ ? { 'aria-label': isRequired ? `${label} (required)` : label }
18601
+ : {};
18602
+ return (jsxs("div", { className: "form-control", children: [!hasHiddenLabel && jsx(Label, { label: label, name: name, isRequired: isRequired }), jsx(WrappedComponent, Object.assign({}, rest, { id: name, name: name }, ariaLabel, { ref: ref }))] }));
18603
+ };
18604
+ return forwardRef(WithLabelComponent);
18605
+ }
18597
18606
 
18598
18607
  const DisplayFormError = ({ message }) => {
18599
18608
  return jsx("p", { className: "form-errors", children: message });
18600
18609
  };
18601
18610
 
18602
18611
  const Input = e__default.forwardRef((_a, ref) => {
18603
- var { label, name, placeholder, onChange, isRequired, isDisabled, isClearable, errorMessage, helpText, iconName, hasHiddenLabel, className } = _a, rest = __rest$1(_a, ["label", "name", "placeholder", "onChange", "isRequired", "isDisabled", "isClearable", "errorMessage", "helpText", "iconName", "hasHiddenLabel", "className"]);
18612
+ var { name, placeholder, onChange, isRequired, isDisabled, isClearable, errorMessage, helpText, iconName, className } = _a, rest = __rest$1(_a, ["name", "placeholder", "onChange", "isRequired", "isDisabled", "isClearable", "errorMessage", "helpText", "iconName", "className"]);
18604
18613
  const hasErrors = errorMessage && errorMessage.length > 0;
18605
18614
  const handleClear = () => {
18606
18615
  onChange({ target: { value: '' } });
18607
18616
  };
18608
- return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: `input ${hasErrors ? 'error' : ''} ${iconName ? 'input--has-icon' : ''} ${className}`, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)), isClearable && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18617
+ const inputClasses = y$1('input', {
18618
+ error: hasErrors,
18619
+ 'input--has-icon': iconName,
18620
+ }, className);
18621
+ return (jsxs(Fragment, { children: [jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: inputClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)), isClearable && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18609
18622
  });
18623
+ const LabeledInput = withLabel(Input);
18610
18624
 
18611
18625
  const Radio$2 = e__default.forwardRef((_a, ref) => {
18612
18626
  var { id, label, name, value, onChange, isDisabled } = _a, rest = __rest$1(_a, ["id", "label", "name", "value", "onChange", "isDisabled"]);
@@ -18626,18 +18640,24 @@ const Toggle$1 = e__default.forwardRef((_a, ref) => {
18626
18640
  const Textarea = e__default.forwardRef((_a, ref) => {
18627
18641
  var { label, name, placeholder, value, onChange, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus } = _a, rest = __rest$1(_a, ["label", "name", "placeholder", "value", "onChange", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus"]);
18628
18642
  const hasErrors = errorMessage && errorMessage.length > 0;
18629
- return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsx("div", { className: "textarea-wrapper", children: jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: `textarea ${hasErrors ? 'error' : ''}`, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)) }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18643
+ const textareaClasses = y$1('textarea', { error: hasErrors });
18644
+ return (jsxs(Fragment, { children: [jsx("div", { className: "textarea-wrapper", children: jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: textareaClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)) }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18630
18645
  });
18646
+ const LabeledTextarea = withLabel(Textarea);
18631
18647
 
18632
18648
  const PasswordInput = e__default.forwardRef((_a, ref) => {
18633
- var { label, name, placeholder, onChange, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, hasShowPassword = true } = _a, rest = __rest$1(_a, ["label", "name", "placeholder", "onChange", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "hasShowPassword"]);
18649
+ var { name, placeholder, onChange, isRequired, isDisabled, errorMessage, helpText, hasShowPassword = true } = _a, rest = __rest$1(_a, ["name", "placeholder", "onChange", "isRequired", "isDisabled", "errorMessage", "helpText", "hasShowPassword"]);
18634
18650
  const hasErrors = errorMessage && errorMessage.length > 0;
18635
18651
  const [showPassword, setShowPassword] = useState(false);
18636
18652
  const handleShowPassword = () => {
18637
18653
  setShowPassword((prevShowPassword) => !prevShowPassword);
18638
18654
  };
18639
- return (jsxs("div", { className: "form-control", children: [jsx(Label, { label: label, name: name, isRequired: isRequired, hasHiddenLabel: hasHiddenLabel }), jsxs("div", { className: "password-input-wrapper", children: [jsx(Icon, { name: "lock", "data-testid": `${name}-embedded-icon`, className: "embedded-icon" }), jsx("input", Object.assign({ ref: ref, "data-testid": `form-password-input-${name}`, name: name, type: showPassword ? 'text' : 'password', disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: `password-input ${hasErrors ? 'error' : ''} password-input--has-icon`, "aria-invalid": hasErrors ? 'true' : 'false', "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, "aria-label": label }, rest)), hasShowPassword && (jsx(Icon, { name: showPassword ? 'fa-eye-slash' : 'eye', "data-testid": `${name}-${showPassword ? 'hide' : 'show'}-password-icon`, size: "md", onClick: handleShowPassword, className: "toggle-show-password-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18655
+ const inputClasses = y$1('password-input', {
18656
+ error: hasErrors,
18657
+ }, 'password-input--has-icon');
18658
+ return (jsxs(Fragment, { children: [jsxs("div", { className: "password-input-wrapper", children: [jsx(Icon, { name: "lock", "data-testid": `${name}-embedded-icon`, className: "embedded-icon" }), jsx("input", Object.assign({ ref: ref, "data-testid": `form-password-input-${name}`, name: name, type: showPassword ? 'text' : 'password', disabled: isDisabled, placeholder: placeholder, onChange: onChange, className: inputClasses, "aria-invalid": hasErrors ? 'true' : 'false', "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)), hasShowPassword && (jsx(Icon, { name: showPassword ? 'fa-eye-slash' : 'eye', "data-testid": `${name}-${showPassword ? 'hide' : 'show'}-password-icon`, size: "md", onClick: handleShowPassword, className: "toggle-show-password-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
18640
18659
  });
18660
+ const LabeledPasswordInput = withLabel(PasswordInput);
18641
18661
 
18642
18662
  const OptionComponent = (_a) => {
18643
18663
  var _b, _c, _d;
@@ -37115,454 +37135,6 @@ const DatePicker = (props) => {
37115
37135
  }, children: jsx("div", Object.assign({ tabIndex: -1, style: popper.styles.popper, className: "DayPickerInput-Overlay" }, popper.attributes.popper, { ref: setPopperElement, role: "dialog", "aria-label": "DayPicker calendar", children: jsx(DayPicker, { disabled: disabled, mode: "single", defaultMonth: localSelected, selected: localSelected, onSelect: handleDaySelect, fromDate: disableBeforeDate, toDate: disableAfterDate }) })) }))] }));
37116
37136
  };
37117
37137
 
37118
- const StyledNoInputDatePicker = styled.div `
37119
- /************************************
37120
- * Default react-day-picker styling - this needed to be added because we were unable to import styling as specified by the docs (most likely because we are not using webpack)
37121
- *************************************/
37122
-
37123
- .rdp {
37124
- --rdp-cell-size: 40px;
37125
- --rdp-accent-color: #6833d0;
37126
- --rdp-background-color: #ffffff;
37127
- --rdp-accent-color-dark: #3003e1;
37128
- --rdp-background-color-dark: #180270;
37129
- --rdp-outline: 2px solid var(--rdp-accent-color); /* Outline border for focused elements */
37130
- --rdp-outline-selected: 3px solid var(--rdp-accent-color); /* Outline border for focused _and_ selected elements */
37131
-
37132
- margin: 1em;
37133
- }
37134
-
37135
- /* Hide elements for devices that are not screen readers */
37136
- .rdp-vhidden {
37137
- box-sizing: border-box;
37138
- padding: 0;
37139
- margin: 0;
37140
- background: transparent;
37141
- border: 0;
37142
- -moz-appearance: none;
37143
- -webkit-appearance: none;
37144
- appearance: none;
37145
- position: absolute !important;
37146
- top: 0;
37147
- width: 1px !important;
37148
- height: 1px !important;
37149
- padding: 0 !important;
37150
- overflow: hidden !important;
37151
- clip: rect(1px, 1px, 1px, 1px) !important;
37152
- border: 0 !important;
37153
- }
37154
-
37155
- /* Buttons */
37156
- .rdp-button_reset {
37157
- appearance: none;
37158
- position: relative;
37159
- margin: 0;
37160
- padding: 0;
37161
- cursor: default;
37162
- color: inherit;
37163
- background: none;
37164
- font: inherit;
37165
-
37166
- -moz-appearance: none;
37167
- -webkit-appearance: none;
37168
- }
37169
-
37170
- .rdp-button_reset:focus-visible {
37171
- /* Make sure to reset outline only when :focus-visible is supported */
37172
- outline: none;
37173
- }
37174
-
37175
- .rdp-button {
37176
- border: 2px solid transparent;
37177
- }
37178
-
37179
- .rdp-button[disabled]:not(.rdp-day_selected) {
37180
- opacity: 0.25;
37181
- }
37182
-
37183
- .rdp-button:not([disabled]) {
37184
- cursor: pointer;
37185
- }
37186
-
37187
- .rdp-button:focus-visible:not([disabled]) {
37188
- color: inherit;
37189
- background-color: var(--rdp-background-color);
37190
- border: var(--rdp-outline);
37191
- }
37192
-
37193
- .rdp-months {
37194
- display: flex;
37195
- }
37196
-
37197
- .rdp-month {
37198
- margin: 0 1em;
37199
- }
37200
-
37201
- .rdp-month:first-child {
37202
- margin-left: 0;
37203
- }
37204
-
37205
- .rdp-month:last-child {
37206
- margin-right: 0;
37207
- }
37208
-
37209
- .rdp-table {
37210
- margin: 0;
37211
- max-width: calc(var(--rdp-cell-size) * 7);
37212
- border-collapse: collapse;
37213
- }
37214
-
37215
- .rdp-with_weeknumber .rdp-table {
37216
- max-width: calc(var(--rdp-cell-size) * 8);
37217
- border-collapse: collapse;
37218
- }
37219
-
37220
- .rdp-caption {
37221
- display: flex;
37222
- align-items: center;
37223
- justify-content: space-between;
37224
- padding: 0;
37225
- text-align: left;
37226
- }
37227
-
37228
- .rdp-multiple_months .rdp-caption {
37229
- position: relative;
37230
- display: block;
37231
- text-align: center;
37232
- }
37233
-
37234
- .rdp-caption_dropdowns {
37235
- position: relative;
37236
- display: inline-flex;
37237
- }
37238
-
37239
- .rdp-caption_label {
37240
- position: relative;
37241
- z-index: 1;
37242
- display: inline-flex;
37243
- align-items: center;
37244
- margin: 0;
37245
- padding: 0 0.25em;
37246
- white-space: nowrap;
37247
- color: currentColor;
37248
- border: 0;
37249
- border: 2px solid transparent;
37250
- font-family: inherit;
37251
- font-size: 140%;
37252
- font-weight: bold;
37253
- }
37254
-
37255
- .rdp-nav {
37256
- white-space: nowrap;
37257
- }
37258
-
37259
- .rdp-multiple_months .rdp-caption_start .rdp-nav {
37260
- position: absolute;
37261
- top: 50%;
37262
- left: 0;
37263
- transform: translateY(-50%);
37264
- }
37265
-
37266
- .rdp-multiple_months .rdp-caption_end .rdp-nav {
37267
- position: absolute;
37268
- top: 50%;
37269
- right: 0;
37270
- transform: translateY(-50%);
37271
- }
37272
-
37273
- .rdp-nav_button {
37274
- display: inline-flex;
37275
- align-items: center;
37276
- justify-content: center;
37277
- width: var(--rdp-cell-size);
37278
- height: var(--rdp-cell-size);
37279
- padding: 0.25em;
37280
- border-radius: 100%;
37281
- }
37282
-
37283
- /* ---------- */
37284
- /* Dropdowns */
37285
- /* ---------- */
37286
-
37287
- .rdp-dropdown_year,
37288
- .rdp-dropdown_month {
37289
- position: relative;
37290
- display: inline-flex;
37291
- align-items: center;
37292
- }
37293
-
37294
- .rdp-dropdown {
37295
- appearance: none;
37296
- position: absolute;
37297
- z-index: 2;
37298
- top: 0;
37299
- bottom: 0;
37300
- left: 0;
37301
- width: 100%;
37302
- margin: 0;
37303
- padding: 0;
37304
- cursor: inherit;
37305
- opacity: 0;
37306
- border: none;
37307
- background-color: transparent;
37308
- font-family: inherit;
37309
- font-size: inherit;
37310
- line-height: inherit;
37311
- }
37312
-
37313
- .rdp-dropdown[disabled] {
37314
- opacity: unset;
37315
- color: unset;
37316
- }
37317
-
37318
- .rdp-dropdown:focus-visible:not([disabled]) + .rdp-caption_label {
37319
- background-color: var(--rdp-background-color);
37320
- border: var(--rdp-outline);
37321
- border-radius: 6px;
37322
- }
37323
-
37324
- .rdp-dropdown_icon {
37325
- margin: 0 0 0 5px;
37326
- }
37327
-
37328
- .rdp-head {
37329
- border: 0;
37330
- }
37331
-
37332
- .rdp-head_row,
37333
- .rdp-row {
37334
- height: 100%;
37335
- }
37336
-
37337
- .rdp-head_cell {
37338
- vertical-align: middle;
37339
- font-size: 0.75em;
37340
- font-weight: 700;
37341
- text-align: center;
37342
- height: 100%;
37343
- height: var(--rdp-cell-size);
37344
- padding: 0;
37345
- }
37346
-
37347
- .rdp-tbody {
37348
- border: 0;
37349
- }
37350
-
37351
- .rdp-tfoot {
37352
- margin: 0.5em;
37353
- }
37354
-
37355
- .rdp-cell {
37356
- width: var(--rdp-cell-size);
37357
- height: 100%;
37358
- height: var(--rdp-cell-size);
37359
- padding: 0;
37360
- text-align: center;
37361
- }
37362
-
37363
- .rdp-weeknumber {
37364
- font-size: 0.75em;
37365
- }
37366
-
37367
- .rdp-weeknumber,
37368
- .rdp-day {
37369
- display: flex;
37370
- overflow: hidden;
37371
- align-items: center;
37372
- justify-content: center;
37373
- box-sizing: border-box;
37374
- width: var(--rdp-cell-size);
37375
- max-width: var(--rdp-cell-size);
37376
- height: var(--rdp-cell-size);
37377
- margin: 0;
37378
- border: 2px solid transparent;
37379
- border-radius: 100%;
37380
- }
37381
-
37382
- .rdp-day_today:not(.rdp-day_outside) {
37383
- font-weight: bold;
37384
- }
37385
-
37386
- .rdp-day_selected,
37387
- .rdp-day_selected:focus-visible,
37388
- .rdp-day_selected:hover {
37389
- color: white;
37390
- opacity: 1;
37391
- background-color: var(--rdp-accent-color);
37392
- }
37393
-
37394
- .rdp-day_outside {
37395
- opacity: 0.5;
37396
- }
37397
-
37398
- .rdp-day_selected:focus-visible {
37399
- /* Since the background is the same use again the outline */
37400
- outline: var(--rdp-outline);
37401
- outline-offset: 2px;
37402
- z-index: 1;
37403
- }
37404
-
37405
- .rdp:not([dir='rtl']) .rdp-day_range_start:not(.rdp-day_range_end) {
37406
- border-top-right-radius: 0;
37407
- border-bottom-right-radius: 0;
37408
- }
37409
-
37410
- .rdp:not([dir='rtl']) .rdp-day_range_end:not(.rdp-day_range_start) {
37411
- border-top-left-radius: 0;
37412
- border-bottom-left-radius: 0;
37413
- }
37414
-
37415
- .rdp[dir='rtl'] .rdp-day_range_start:not(.rdp-day_range_end) {
37416
- border-top-left-radius: 0;
37417
- border-bottom-left-radius: 0;
37418
- }
37419
-
37420
- .rdp[dir='rtl'] .rdp-day_range_end:not(.rdp-day_range_start) {
37421
- border-top-right-radius: 0;
37422
- border-bottom-right-radius: 0;
37423
- }
37424
-
37425
- .rdp-day_range_end.rdp-day_range_start {
37426
- border-radius: 100%;
37427
- }
37428
-
37429
- .rdp-day_range_middle {
37430
- border-radius: 0;
37431
- }
37432
-
37433
- /*# sourceMappingURL=style.css.map */
37434
-
37435
- /******************************
37436
- * Indico Custom Styling For Insights
37437
- *******************************/
37438
- .rdp-button:hover:not([disabled]):not(.rdp-day_selected) {
37439
- background-color: #976cec;
37440
- }
37441
- .rdp-button,
37442
- .rdp-day {
37443
- box-shadow: none;
37444
- color: #000000;
37445
- &:hover {
37446
- background-color: #6833d0;
37447
- color: white;
37448
- }
37449
- }
37450
-
37451
- .rdp-head_cell,
37452
- .rdp-cell {
37453
- border: none;
37454
- }
37455
-
37456
- .DayPickerInput-Overlay {
37457
- border-radius: 4px;
37458
- z-index: 999;
37459
- .rdp {
37460
- background: white;
37461
- z-index: 999;
37462
- border: solid 1px #000000;
37463
- border-radius: 4px;
37464
- box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.4);
37465
- }
37466
- }
37467
-
37468
- .rdp-caption_label {
37469
- font-weight: 400;
37470
- font-size: 14px;
37471
- color: #000000;
37472
- }
37473
-
37474
- .rdp-day_today {
37475
- background-color: #dbd5e6;
37476
- color: #ffffff;
37477
- font-weight: 400;
37478
- }
37479
-
37480
- .rdp-button_reset {
37481
- &.rdp-button {
37482
- &.rdp-day {
37483
- &.rdp-day_selected {
37484
- background-color: #6833d0;
37485
- color: white;
37486
-
37487
- &:focus {
37488
- color: white;
37489
- }
37490
- &:active {
37491
- color: white;
37492
- }
37493
- }
37494
- }
37495
- }
37496
- }
37497
-
37498
- .rdp-head_cell {
37499
- color: #6833d0;
37500
- font-weight: 400;
37501
- }
37502
-
37503
- .date__picker__trigger {
37504
- color: #000000;
37505
- cursor: pointer;
37506
- }
37507
-
37508
- .custom__caption {
37509
- display: flex;
37510
- justify-content: space-between;
37511
- align-items: center;
37512
- padding: 15px 5px 15px 5px;
37513
-
37514
- .custom__caption__text {
37515
- font-size: 14px;
37516
- color: #000000;
37517
- margin: 0;
37518
- }
37519
-
37520
- .custom__caption__action__button {
37521
- background: none;
37522
- border: none;
37523
- cursor: pointer;
37524
- box-shadow: none;
37525
- padding: 0 5px 0 5px;
37526
-
37527
- border-radius: 60px;
37528
- color: #6833d0;
37529
- height: 20px;
37530
- width: 20px;
37531
-
37532
- &:hover {
37533
- background-color: #6833d0;
37534
- color: #ffffff;
37535
- border-radius: 20px;
37536
-
37537
- .rdp-nav_icon {
37538
- color: #ffffff;
37539
- }
37540
- }
37541
-
37542
- .rdp-nav_icon {
37543
- color: #6833d0;
37544
- }
37545
- }
37546
- }
37547
-
37548
- .visually-hidden,
37549
- .visually-hidden-focusable:not(:focus):not(:focus-within) {
37550
- border: 0 !important;
37551
- clip: rect(0, 0, 0, 0) !important;
37552
- height: 1px !important;
37553
- margin: -1px !important;
37554
- overflow: hidden !important;
37555
- padding: 0 !important;
37556
- white-space: nowrap !important;
37557
- width: 1px !important;
37558
- }
37559
-
37560
- .visually-hidden:not(caption),
37561
- .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) {
37562
- position: absolute !important;
37563
- }
37564
- `;
37565
-
37566
37138
  function CustomCaption(props) {
37567
37139
  const { goToMonth, nextMonth, previousMonth } = useNavigation();
37568
37140
  return (jsxs("div", { className: "custom__caption", children: [jsx("button", { className: "custom__caption__action__button", disabled: !previousMonth, onClick: (event) => {
@@ -37646,7 +37218,7 @@ const NoInputDatePicker = (props) => {
37646
37218
  onChange(range);
37647
37219
  }
37648
37220
  };
37649
- return (jsxs(StyledNoInputDatePicker, { className: className, "aria-label": ariaLabel || 'date select', "aria-describedby": `picker-label--${id}`, "data-cy": props['data-cy'], "data-testid": props['data-testid'], id: id, ref: datePickerRef, children: [label ? (jsx("div", { id: `picker-label--${id}`, className: "visually-hidden", children: label })) : null, jsx("div", { ref: popperRef, className: "no__input__date__picker-inputParent", children: jsx(Icon, { "aria-label": "Open date picker", name: triggerIcon, size: triggerIconSize, className: "date__picker__trigger", "data-testid": `datepicker-trigger-for-${id}`, onClick: () => setIsPopperOpen(!isPopperOpen) }) }), isPopperOpen && (jsx(FocusTrap$1, { active: isTrapActive, focusTrapOptions: {
37221
+ return (jsxs("div", { className: className, "aria-label": ariaLabel || 'date select', "aria-describedby": `picker-label--${id}`, "data-cy": props['data-cy'], "data-testid": props['data-testid'], id: id, ref: datePickerRef, children: [label ? (jsx("div", { id: `picker-label--${id}`, className: "visually-hidden", children: label })) : null, jsx("div", { ref: popperRef, className: "no__input__date__picker-inputParent", children: jsx(Icon, { "aria-label": "Open date picker", name: triggerIcon, size: triggerIconSize, className: "date__picker__trigger", "data-testid": `datepicker-trigger-for-${id}`, onClick: () => setIsPopperOpen(!isPopperOpen) }) }), isPopperOpen && (jsx(FocusTrap$1, { active: isTrapActive, focusTrapOptions: {
37650
37222
  initialFocus: false,
37651
37223
  allowOutsideClick: true,
37652
37224
  clickOutsideDeactivates: true,
@@ -39778,7 +39350,9 @@ function ModalBase(props) {
39778
39350
  if (describedBy) {
39779
39351
  ariaProps['describedby'] = describedBy;
39780
39352
  }
39781
- return (jsx(StyledModalBase, { ariaHideApp: false, "data-cy": props['data-cy'], aria: ariaProps, className: className || 'baseModal', contentLabel: 'labelText' in props ? props.labelText : null, id: id, isOpen: open, node: node, onRequestClose: clickToDismiss, shouldCloseOnEsc: !preventEscDismiss, shouldReturnFocusAfterClose: !preventReturnFocus, maxWidth: maxWidth, children: children }));
39353
+ // Try to render modal within the theme-root, otherwise attach to the root
39354
+ const parentSelector = () => document.getElementById('theme-root') || document.getElementById('root');
39355
+ return (jsx(StyledModalBase, { ariaHideApp: false, "data-cy": props['data-cy'], aria: ariaProps, className: className || 'baseModal', contentLabel: 'labelText' in props ? props.labelText : null, id: id, isOpen: open, node: node, onRequestClose: clickToDismiss, parentSelector: parentSelector, shouldCloseOnEsc: !preventEscDismiss, shouldReturnFocusAfterClose: !preventReturnFocus, maxWidth: maxWidth, children: children }));
39782
39356
  }
39783
39357
 
39784
39358
  const StyledStatusContainer = styled.div `
@@ -41501,5 +41075,5 @@ const Tooltip = (props) => {
41501
41075
  openOnClick: props.clickToShow, id: props.for, delayShow: props.delayShow, delayHide: props.delayHide, children: props.children })] }));
41502
41076
  };
41503
41077
 
41504
- export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button$2 as Button, allColors as COLORS, Card, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, Form, GlobalStyles, Icon, IconButton, Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PasswordInput, PercentageRing, Radio, RadioGroup, Radio$2 as RadioInput, RandomLoadingMessage, Row$1 as Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Select$1 as SelectInput, Shrug, SingleCombobox, Skeleton, typography as TYPOGRAPHY, Table$1 as Table, TextInput, TextTruncate, Textarea, Toggle, Toggle$1 as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
41078
+ export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button$2 as Button, allColors as COLORS, Card, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, Form, GlobalStyles, Icon, IconButton, LabeledInput as Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, LabeledPasswordInput as PasswordInput, PercentageRing, Radio, RadioGroup, Radio$2 as RadioInput, RandomLoadingMessage, Row$1 as Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Select$1 as SelectInput, Shrug, SingleCombobox, Skeleton, typography as TYPOGRAPHY, Table$1 as Table, TextInput, TextTruncate, LabeledTextarea as Textarea, Toggle, Toggle$1 as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
41505
41079
  //# sourceMappingURL=index.esm.js.map