@wonderflow/react-components 6.1.0 → 7.0.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 (108) hide show
  1. package/core/utils/media.css +5 -5
  2. package/dist/components/autocomplete/autocomplete-option.js +1 -1
  3. package/dist/components/autocomplete/autocomplete.js +2 -2
  4. package/dist/components/avatar/avatar.js +1 -1
  5. package/dist/components/button/button.js +2 -2
  6. package/dist/components/button/button.module.css +1 -1
  7. package/dist/components/card/card.js +1 -1
  8. package/dist/components/chip/chip.js +1 -1
  9. package/dist/components/circular-progress/circular-progress.js +3 -3
  10. package/dist/components/clamp-text/clamp-text.js +1 -1
  11. package/dist/components/container/container.js +1 -1
  12. package/dist/components/datetime/datetime.js +1 -1
  13. package/dist/components/disclosure/disclosure.js +3 -3
  14. package/dist/components/disclosure/disclosure.module.css +1 -1
  15. package/dist/components/drawer/drawer.js +1 -1
  16. package/dist/components/elevator/elevator.js +1 -1
  17. package/dist/components/grid/grid.js +1 -1
  18. package/dist/components/grid/item/grid-item.js +1 -1
  19. package/dist/components/icon/icon.js +2 -2
  20. package/dist/components/icon-button/icon-button.js +1 -1
  21. package/dist/components/index.d.ts +1 -1
  22. package/dist/components/index.d.ts.map +1 -1
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/info-state/info-state.js +1 -1
  25. package/dist/components/input-group/input-group.js +4 -4
  26. package/dist/components/linear-progress/linear-progress.js +2 -2
  27. package/dist/components/list/index.d.ts +1 -0
  28. package/dist/components/list/index.d.ts.map +1 -1
  29. package/dist/components/list/list-item.d.ts +28 -0
  30. package/dist/components/list/list-item.d.ts.map +1 -0
  31. package/dist/components/list/list-item.js +31 -0
  32. package/dist/components/list/list.d.ts +6 -11
  33. package/dist/components/list/list.d.ts.map +1 -1
  34. package/dist/components/list/list.js +9 -19
  35. package/dist/components/list/list.module.css +1 -1
  36. package/dist/components/masonry/masonry.js +1 -1
  37. package/dist/components/menu/menu-item/menu-item-checkbox.js +1 -1
  38. package/dist/components/menu/menu-item/menu-item.js +3 -3
  39. package/dist/components/menu/menu.d.ts +1 -1
  40. package/dist/components/menu/menu.js +1 -1
  41. package/dist/components/modal/content/modal-content.js +1 -1
  42. package/dist/components/modal/modal.js +1 -1
  43. package/dist/components/overlay-container/overlay-container.js +1 -1
  44. package/dist/components/overlay-container/overlay-context.js +1 -1
  45. package/dist/components/pagination/pagination.js +1 -1
  46. package/dist/components/popover/index.d.ts +4 -0
  47. package/dist/components/popover/index.d.ts.map +1 -0
  48. package/dist/components/popover/index.js +2 -0
  49. package/dist/components/popover/popover.d.ts +95 -0
  50. package/dist/components/popover/popover.d.ts.map +1 -0
  51. package/dist/components/popover/popover.js +93 -0
  52. package/dist/components/popover/popover.module.css +1 -0
  53. package/dist/components/prose/prose.js +1 -1
  54. package/dist/components/select/select.js +1 -1
  55. package/dist/components/select/select.module.css +1 -1
  56. package/dist/components/selection-controls/checkbox.js +1 -1
  57. package/dist/components/selection-controls/radio.js +1 -1
  58. package/dist/components/selection-controls/selection-controls.module.css +1 -1
  59. package/dist/components/selection-controls/toggle.js +1 -1
  60. package/dist/components/separator/separator.js +1 -1
  61. package/dist/components/skeleton/skeleton.js +3 -3
  62. package/dist/components/slider/slider.d.ts.map +1 -1
  63. package/dist/components/slider/slider.js +2 -2
  64. package/dist/components/slider/slider.module.css +1 -1
  65. package/dist/components/snackbar/snackbar.js +1 -1
  66. package/dist/components/spinner/spinner.js +1 -1
  67. package/dist/components/split-button/split-button.d.ts +2 -2
  68. package/dist/components/split-button/split-button.d.ts.map +1 -1
  69. package/dist/components/split-button/split-button.js +2 -2
  70. package/dist/components/stack/stack.js +1 -1
  71. package/dist/components/star-meter/star-meter.d.ts.map +1 -1
  72. package/dist/components/star-meter/star-meter.js +10 -10
  73. package/dist/components/star-meter/star-meter.module.css +1 -1
  74. package/dist/components/tab/primitive-tab.js +1 -1
  75. package/dist/components/tab/tab-item.d.ts.map +1 -1
  76. package/dist/components/tab/tab-item.js +1 -1
  77. package/dist/components/tab/tab-list.js +1 -1
  78. package/dist/components/tab/tab-panel.js +1 -1
  79. package/dist/components/tab/tab.js +2 -2
  80. package/dist/components/table/table-cell/table-cell.js +1 -1
  81. package/dist/components/table/table-checkbox/table-checkbox.js +1 -1
  82. package/dist/components/table/table-controls/toggle-columns.js +2 -2
  83. package/dist/components/table/table-expand/table-expand.js +1 -1
  84. package/dist/components/table/table-header/table-header.js +1 -1
  85. package/dist/components/table/table-pagination/table-pagination.js +2 -2
  86. package/dist/components/table/table-row/table-row.js +1 -1
  87. package/dist/components/table/table.d.ts +1 -1
  88. package/dist/components/table/table.d.ts.map +1 -1
  89. package/dist/components/table/table.js +28 -23
  90. package/dist/components/text/text.js +3 -3
  91. package/dist/components/text/text.module.css +1 -1
  92. package/dist/components/textfield/base-field/base-field.js +1 -1
  93. package/dist/components/textfield/base-field/base-field.module.css +1 -1
  94. package/dist/components/textfield/textfield.js +3 -3
  95. package/dist/components/title/title.js +3 -3
  96. package/dist/components/title/title.module.css +1 -1
  97. package/dist/components/toggle-button/toggle-button.js +2 -2
  98. package/dist/components/tooltip/tooltip.d.ts +1 -1
  99. package/dist/components/tooltip/tooltip.js +2 -2
  100. package/dist/components/tooltip/tooltip.module.css +1 -1
  101. package/package.json +10 -11
  102. package/dist/components/dropdown/dropdown.d.ts +0 -87
  103. package/dist/components/dropdown/dropdown.d.ts.map +0 -1
  104. package/dist/components/dropdown/dropdown.js +0 -69
  105. package/dist/components/dropdown/dropdown.module.css +0 -1
  106. package/dist/components/dropdown/index.d.ts +0 -3
  107. package/dist/components/dropdown/index.d.ts.map +0 -1
  108. package/dist/components/dropdown/index.js +0 -1
@@ -9,11 +9,11 @@
9
9
 
10
10
  /* Mobile First Media Queries */
11
11
 
12
- @custom-media --from-extra-small (min-width: env(--breakpoint-extra-small));
13
- @custom-media --from-small (min-width: env(--breakpoint-small));
14
- @custom-media --from-medium (min-width: env(--breakpoint-medium));
15
- @custom-media --from-large (min-width: env(--breakpoint-large));
16
- @custom-media --from-extra-large (min-width: env(--breakpoint-extra-large));
12
+ @custom-media --from-extra-small (min-width: token(--breakpoint-extra-small));
13
+ @custom-media --from-small (min-width: token(--breakpoint-small));
14
+ @custom-media --from-medium (min-width: token(--breakpoint-medium));
15
+ @custom-media --from-large (min-width: token(--breakpoint-large));
16
+ @custom-media --from-extra-large (min-width: token(--breakpoint-extra-large));
17
17
 
18
18
  /* Orientation Media Queries */
19
19
 
@@ -6,6 +6,6 @@ export const AutocompleteOption = forwardRef(({ children, value, onClick, ...oth
6
6
  const handleClick = useCallback(() => {
7
7
  onClick && onClick(value, contentRef?.current?.innerText);
8
8
  }, [onClick, value]);
9
- return (_jsx(Menu.Item, { ref: forwardedRef, role: "option", padding: false, onClick: handleClick, ...otherProps, children: _jsx("span", { ref: contentRef, children: children }, void 0) }, void 0));
9
+ return (_jsx(Menu.Item, { ref: forwardedRef, role: "option", padding: false, onClick: handleClick, ...otherProps, children: _jsx("span", { ref: contentRef, children: children }) }));
10
10
  });
11
11
  AutocompleteOption.displayName = 'Autocomplete.Option';
@@ -72,10 +72,10 @@ export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly
72
72
  value && setContent(String(value));
73
73
  }, [value]);
74
74
  return (_jsxs("div", { ref: autocompleteRef, className: styles.Autocomplete, "data-focus-within": isFocusWithin, children: [_jsx(Textfield, { ref: setTriggerRef, id: seedID('autocomplete-trigger'), "aria-haspopup": "true", "aria-controls": seedID('autocomplete-menu'), "aria-expanded": isOpen, onChange: handleFilter, value: content, autoComplete: "off", disabled: disabled, readOnly: readOnly, ...otherProps }, seedID('autocomplete-trigger')), _jsx(AnimatePresence, { children: visible && (_jsx("div", { ref: setTooltipRef, ...getTooltipProps({ className: styles.PopUp, style: { minInlineSize: triggerSize ? (triggerSize.width + 2) : 'auto' } }), children: _jsx(motion.div, { variants: AutocompleteAnimation, initial: "hidden", animate: "visible", exit: "hidden", children: _jsx(Menu, { role: "listbox", id: seedID('autocomplete-menu'), className: styles.OptionsList, style: dynamicStyle, "aria-labelledby": seedID('autocomplete-trigger'), children: filteredOptions.length === 0
75
- ? _jsx(Text, { as: "div", textAlign: "center", dimmed: 5, children: emptyMessage }, void 0)
75
+ ? _jsx(Text, { as: "div", textAlign: "center", dimmed: 5, children: emptyMessage })
76
76
  : Children.map(filteredOptions, (child) => isValidElement(child) && cloneElement(child, {
77
77
  onClick: handleOptionClick
78
- })) }, void 0) }, void 0) }, void 0)) }, void 0)] }, void 0));
78
+ })) }) }) })) })] }));
79
79
  });
80
80
  Autocomplete.Option = AutocompleteOption;
81
81
  Autocomplete.displayName = 'Autocomplete';
@@ -3,6 +3,6 @@ import { forwardRef } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import styles from './avatar.module.css';
5
5
  export const Avatar = forwardRef(({ className, src, dimension = 'regular', ...otherProps }, forwardedRef) => {
6
- return (_jsxs("picture", { className: clsx(styles.Avatar, className), "data-avatar-dimension": dimension, children: [_jsxs("svg", { "aria-hidden": "true", className: styles.Placeholder, height: 18, viewBox: "0 0 12 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { opacity: 0.7, d: "M6 0C3.795 0 2 1.794 2 4s1.795 4 4 4 4-1.794 4-4-1.795-4-4-4z", fill: "var(--highlight-blue-foreground)" }, void 0), _jsx("path", { d: "M8.4 9H3.6C1.612 9 0 10.575 0 12.531v5.126C1.814 18.517 3.85 19 6 19s4.186-.483 6-1.343v-5.126C12 10.581 10.394 9 8.4 9z", fill: "var(--highlight-blue-foreground)" }, void 0)] }, void 0), src && (_jsx("img", { ref: forwardedRef, alt: "", src: src, ...otherProps }, void 0))] }, void 0));
6
+ return (_jsxs("picture", { className: clsx(styles.Avatar, className), "data-avatar-dimension": dimension, children: [_jsxs("svg", { "aria-hidden": "true", className: styles.Placeholder, height: 18, viewBox: "0 0 12 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { opacity: 0.7, d: "M6 0C3.795 0 2 1.794 2 4s1.795 4 4 4 4-1.794 4-4-1.795-4-4-4z", fill: "var(--highlight-blue-foreground)" }), _jsx("path", { d: "M8.4 9H3.6C1.612 9 0 10.575 0 12.531v5.126C1.814 18.517 3.85 19 6 19s4.186-.483 6-1.343v-5.126C12 10.581 10.394 9 8.4 9z", fill: "var(--highlight-blue-foreground)" })] }), src && (_jsx("img", { ref: forwardedRef, alt: "", src: src, ...otherProps }))] }));
7
7
  });
8
8
  Avatar.displayName = 'Avatar';
@@ -15,9 +15,9 @@ export const Button = forwardRef(({ kind = 'primary', dimension = 'regular', cla
15
15
  regular: 16,
16
16
  small: 12
17
17
  };
18
- return (_jsxs(Wrapper, { ref: forwardedRef, type: Wrapper === 'button' ? type : undefined, className: clsx(styles.Button, className), "data-button-icon-position": iconPosition, "data-button-dimension": dimension, "data-button-kind": kind, "data-button-fullwidth": fullWidth, "aria-disabled": disabled, "aria-busy": busy, "aria-pressed": Wrapper === 'button' ? pressed : undefined, "aria-live": busy ? 'polite' : undefined, onClick: handleClick(), ...otherProps, children: [icon && (_jsx(Icon, { source: icon, fill: iconColor, weight: "solid", dimension: iconSize[dimension] }, void 0)), (children && busy) ? _jsx("span", { children: children }, void 0) : children, busy && (_jsx("span", { className: styles.SpinnerIndicator, children: _jsx(Spinner, { dimension: dimension }, void 0) }, void 0))] }, void 0));
18
+ return (_jsxs(Wrapper, { ref: forwardedRef, type: Wrapper === 'button' ? type : undefined, className: clsx(styles.Button, className), "data-button-icon-position": iconPosition, "data-button-dimension": dimension, "data-button-kind": kind, "data-button-fullwidth": fullWidth, "aria-disabled": disabled, "aria-busy": busy, "aria-pressed": Wrapper === 'button' ? pressed : undefined, "aria-live": busy ? 'polite' : undefined, onClick: handleClick(), ...otherProps, children: [icon && (_jsx(Icon, { source: icon, fill: iconColor, weight: "solid", dimension: iconSize[dimension] })), (children && busy) ? _jsx("span", { children: children }) : children, busy && (_jsx("span", { className: styles.SpinnerIndicator, children: _jsx(Spinner, { dimension: dimension }) }))] }));
19
19
  });
20
20
  export const ButtonsGroup = ({ children, className, kind, dimension = 'regular' }) => (_jsx("div", { className: clsx(styles.ButtonsGroup, className), children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
21
21
  kind,
22
22
  dimension
23
- })) }, void 0));
23
+ })) }));
@@ -1 +1 @@
1
- .Button{-webkit-touch-callout:none;grid-gap:.44rem;align-items:center;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:.22rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;-webkit-user-select:none;user-select:none;white-space:nowrap}.Button[data-button-dimension=big]{block-size:2.67rem;font-size:1rem;padding:.55rem 1.33rem .66rem}.Button[data-button-dimension=regular]{block-size:2.22rem;font-size:.89rem;padding:.33rem .89rem .44rem}.Button[data-button-dimension=small]{grid-gap:.22rem;block-size:1.33rem;font-size:.78rem;padding:0 .44rem .11rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background:var(--cta-dark)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:active){background:#9e0018;color:#fff}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:active){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background-color:var(--global-vibrancy-background-hard)}.Button[data-button-kind=flat]:is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]:is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed}.Button[aria-busy=true]>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0;box-shadow:inset -1px 0 0 hsla(0,0%,40%,.1)}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0;box-shadow:inset 1px 0 0 hsla(0,0%,40%,.1)}
1
+ .Button{-webkit-touch-callout:none;grid-gap:.44rem;align-items:center;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:.22rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;-webkit-user-select:none;user-select:none;white-space:nowrap}.Button[data-button-dimension=big]{block-size:2.67rem;font-size:1rem;padding:.55rem 1.33rem .66rem}.Button[data-button-dimension=regular]{block-size:2.22rem;font-size:.89rem;padding:.33rem .89rem .44rem}.Button[data-button-dimension=small]{grid-gap:.22rem;block-size:1.33rem;font-size:.78rem;padding:0 .44rem .11rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background:var(--cta-dark)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:active){background:#9e0018;color:#fff}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:active){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background-color:var(--global-vibrancy-background-hard)}.Button[data-button-kind=flat]:is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]:is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed}.Button[aria-busy=true]>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>*+*{box-shadow:inset 1px 0 0 hsla(0,0%,40%,.2)}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0}
@@ -9,5 +9,5 @@ export const Card = forwardRef(({ as: Wrapper = 'div', children, className, padd
9
9
  '--padding': padding && tkns.space[padding],
10
10
  '--radius': radius && tkns.radius[radius]
11
11
  };
12
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Card, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...otherProps, children: _jsxs(Stack, { direction: "row", fill: false, vAlign: vAlign, hAlign: hAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap, children: [left && _jsx("div", { className: styles.Left, children: left }, void 0), children && (_jsx("div", { className: styles.Content, children: children }, void 0)), right && (_jsx("div", { className: styles.Right, children: right }, void 0))] }, void 0) }, void 0));
12
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Card, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...otherProps, children: _jsxs(Stack, { direction: "row", fill: false, vAlign: vAlign, hAlign: hAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap, children: [left && _jsx("div", { className: styles.Left, children: left }), children && (_jsx("div", { className: styles.Content, children: children })), right && (_jsx("div", { className: styles.Right, children: right }))] }) }));
13
13
  });
@@ -18,6 +18,6 @@ export const Chip = forwardRef(({ children, className, dimension = 'regular', co
18
18
  style: 'outline'
19
19
  }
20
20
  };
21
- return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, inline: true, "data-chip-color": color, "data-chip-dimension": dimension, className: clsx(styles.Chip, className), vAlign: "center", ref: forwardedRef, ...otherProps, children: [_jsx("b", { children: children }, void 0), interactive && (_jsx("button", { onClick: interactive && onDismissClick, className: styles.Action, type: "button", children: _jsx(Icon, { source: "xmark", weight: properties[dimension].style, dimension: properties[dimension].iconSize }, void 0) }, void 0))] }, void 0));
21
+ return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, inline: true, "data-chip-color": color, "data-chip-dimension": dimension, className: clsx(styles.Chip, className), vAlign: "center", ref: forwardedRef, ...otherProps, children: [_jsx("b", { children: children }), interactive && (_jsx("button", { onClick: interactive && onDismissClick, className: styles.Action, type: "button", children: _jsx(Icon, { source: "xmark", weight: properties[dimension].style, dimension: properties[dimension].iconSize }) }))] }));
22
22
  });
23
23
  Chip.displayName = 'Chip';
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useCallback } from 'react';
2
+ import { forwardRef, useCallback, useMemo } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import styles from './circular-progress.module.css';
5
5
  export const CircularProgress = forwardRef(({ className, value, max = 100, dimension = 'regular', showProgress, style, ...otherProps }, forwardedRef) => {
6
6
  const getPercentage = useCallback(() => value ? Math.round((100 * value) / max) : 0, [max, value]);
7
- const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
7
+ const clamp = useMemo(() => (num, min, max) => Math.min(Math.max(num, min), max), []);
8
8
  const dynamicStyle = {
9
9
  '--progress': `${getPercentage()}%`
10
10
  };
11
- return (_jsx("div", { ref: forwardedRef, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, className: clsx(styles.CircularProgress, className), "data-circular-progress": clamp(getPercentage(), 0, 100), "data-circular-progress-dimension": dimension, "data-circular-progress-show-progress": showProgress, style: { ...dynamicStyle, ...style }, ...otherProps }, void 0));
11
+ return (_jsx("div", { ref: forwardedRef, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, className: clsx(styles.CircularProgress, className), "data-circular-progress": clamp(getPercentage(), 0, 100), "data-circular-progress-dimension": dimension, "data-circular-progress-show-progress": showProgress, style: { ...dynamicStyle, ...style }, ...otherProps }));
12
12
  });
13
13
  CircularProgress.displayName = 'CircularProgress';
@@ -6,5 +6,5 @@ export const ClampText = forwardRef(({ className, children, rows = 1, style, as:
6
6
  const dynamicStyle = {
7
7
  '--r': rows
8
8
  };
9
- return (_jsx(Wrapper, { ref: forwardedRef, style: { ...dynamicStyle, ...style }, className: clsx(styles.ClampText, className), ...otherProps, children: children }, void 0));
9
+ return (_jsx(Wrapper, { ref: forwardedRef, style: { ...dynamicStyle, ...style }, className: clsx(styles.ClampText, className), ...otherProps, children: children }));
10
10
  });
@@ -3,5 +3,5 @@ import { forwardRef } from 'react';
3
3
  import styles from './container.module.css';
4
4
  import clsx from 'clsx';
5
5
  export const Container = forwardRef(({ children, className, dimension = 'full', padding = true, as: Wrapper = 'div', ...otherProps }, forwardedRef) => {
6
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Container, className), "data-container-dimension": dimension, "data-container-padding": padding, ...otherProps, children: children }, void 0));
6
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Container, className), "data-container-dimension": dimension, "data-container-padding": padding, ...otherProps, children: children }));
7
7
  });
@@ -12,5 +12,5 @@ export const Datetime = ({ date, locale = 'en-US', options, ...otherProps }) =>
12
12
  }).format(timeDate);
13
13
  setDateTime(humanDate);
14
14
  }, [date, locale, options]);
15
- return (_jsx("time", { dateTime: date, ...otherProps, children: datetime }, void 0));
15
+ return (_jsx("time", { dateTime: date, ...otherProps, children: datetime }));
16
16
  };
@@ -16,7 +16,7 @@ export const Disclosure = forwardRef(({ children, open = false, padding = true,
16
16
  (ref.current && expandable) && setIsOpen(ref.current.open);
17
17
  }, [expandable]);
18
18
  const dynamicStyle = {
19
- '--maxHeight': contentMaxHeight
19
+ '--max-height': contentMaxHeight
20
20
  };
21
21
  const sizes = {
22
22
  small: {
@@ -32,7 +32,7 @@ export const Disclosure = forwardRef(({ children, open = false, padding = true,
32
32
  icon: 24
33
33
  }
34
34
  };
35
- const renderContent = useCallback(() => (_jsx(motion.div, { className: styles.Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 5, opacity: 1 } : { y: 0, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 }, initial: false, children: children }, void 0)), [children, contentMaxHeight, padding, isOpen]);
36
- return (_jsxs("details", { style: { ...dynamicStyle, ...style }, className: clsx(styles.Disclosure, className), "data-disclosure-icon-position": iconPosition, "data-disclosure-dimension": dimension, "data-disclosure-expandable": expandable, onToggle: handleOpen(), "aria-expanded": isOpen ? 'true' : 'false', ref: ref, ...otherProps, children: [_jsxs(Text, { as: "summary", responsive: false, className: styles.Summary, "aria-expanded": isOpen, tabIndex: !expandable ? -1 : 0, size: dimension ? sizes[dimension].summary : undefined, weight: "bold", children: [summary, expandable && (_jsx(Icon, { className: styles.ExpandIcon, source: "chevron-right", dimension: sizes[dimension].icon }, void 0))] }, void 0), renderContent()] }, void 0));
35
+ const renderContent = useCallback(() => (_jsx(motion.div, { className: styles.Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 5, opacity: 1 } : { y: 0, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 }, initial: false, children: children })), [children, contentMaxHeight, padding, isOpen]);
36
+ return (_jsxs("details", { style: { ...dynamicStyle, ...style }, className: clsx(styles.Disclosure, className), "data-disclosure-icon-position": iconPosition, "data-disclosure-dimension": dimension, "data-disclosure-expandable": expandable, onToggle: handleOpen(), "aria-expanded": isOpen ? 'true' : 'false', ref: ref, ...otherProps, children: [_jsxs(Text, { as: "summary", responsive: false, className: styles.Summary, "aria-expanded": isOpen, tabIndex: !expandable ? -1 : 0, size: dimension ? sizes[dimension].summary : undefined, weight: "bold", children: [summary, expandable && (_jsx(Icon, { className: styles.ExpandIcon, source: "chevron-right", dimension: sizes[dimension].icon }))] }), renderContent()] }));
37
37
  });
38
38
  Disclosure.displayName = 'Disclosure';
@@ -1 +1 @@
1
- .Disclosure{--icon-size:1.11rem;--icon-padding:0.44rem;--padding:calc(var(--icon-size) + var(--icon-padding) + var(--icon-size)/2);--icon-top-offset:calc(var(--icon-size)/2);display:block;position:relative;transform:translateZ(0);z-index:0}.Disclosure *{box-sizing:border-box}.Disclosure[data-disclosure-dimension=small]{--icon-top-offset:calc(var(--icon-size)/1.5);--icon-size:0.67rem}.Disclosure[data-disclosure-dimension=regular]{--icon-size:0.89rem}.Disclosure[data-disclosure-dimension=big]{--icon-top-offset:calc(var(--icon-size)/4);--icon-size:1.33rem;--icon-padding:0.89rem}.Summary{display:list-item;outline-offset:-2px;padding:.11rem 0;position:relative;touch-action:manipulation;-webkit-user-select:none;user-select:none}.Disclosure[data-disclosure-icon-position=right][data-disclosure-expandable=true] .Summary{padding-inline-end:var(--padding)}.Disclosure[data-disclosure-icon-position=left][data-disclosure-expandable=true] .Summary{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-expandable=true] .Summary{cursor:pointer}.Summary::marker{content:""}.Summary::-webkit-details-marker{display:none}.ExpandIcon{block-size:var(--icon-size);content:"";inline-size:var(--icon-size);position:absolute;right:calc(var(--icon-size)/2);top:var(--icon-top-offset);transform-box:fill-box;transform-origin:50% center;transition:transform .1s cubic-bezier(.3,.07,.34,1)}.Disclosure[data-disclosure-icon-position=left] .ExpandIcon{left:calc(var(--icon-size)/2);right:auto}.Disclosure[open]>.Summary>.ExpandIcon{transform:rotate(90deg)}.Content{box-sizing:border-box}.Disclosure[data-disclosure-icon-position=left] .Content[data-disclosure-padding=true]{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-icon-position=right] .Content[data-disclosure-padding=true]{padding-right:var(--padding)}.Content[data-disclosure-height=true]{-webkit-overflow-scrolling:touch;max-block-size:var(--maxHeight);overflow:auto;overscroll-behavior:contain}
1
+ .Disclosure{--icon-size:1.11rem;--icon-padding:0.44rem;--padding:calc(var(--icon-size) + var(--icon-padding) + var(--icon-size)/2);--icon-top-offset:calc(var(--icon-size)/2);display:block;position:relative;transform:translateZ(0);z-index:0}.Disclosure *{box-sizing:border-box}.Disclosure[data-disclosure-dimension=small]{--icon-top-offset:calc(var(--icon-size)/1.5);--icon-size:0.67rem}.Disclosure[data-disclosure-dimension=regular]{--icon-size:0.89rem}.Disclosure[data-disclosure-dimension=big]{--icon-top-offset:calc(var(--icon-size)/4);--icon-size:1.33rem;--icon-padding:0.89rem}.Summary{display:list-item;outline-offset:-2px;padding:.11rem 0;position:relative;touch-action:manipulation;-webkit-user-select:none;user-select:none}.Disclosure[data-disclosure-icon-position=right][data-disclosure-expandable=true] .Summary{padding-inline-end:var(--padding)}.Disclosure[data-disclosure-icon-position=left][data-disclosure-expandable=true] .Summary{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-expandable=true] .Summary{cursor:pointer}.Summary::marker{content:""}.Summary::-webkit-details-marker{display:none}.ExpandIcon{block-size:var(--icon-size);content:"";inline-size:var(--icon-size);position:absolute;right:calc(var(--icon-size)/2);top:var(--icon-top-offset);transform-box:fill-box;transform-origin:50% center;transition:transform .1s cubic-bezier(.3,.07,.34,1)}.Disclosure[data-disclosure-icon-position=left] .ExpandIcon{left:calc(var(--icon-size)/2);right:auto}.Disclosure[open]>.Summary>.ExpandIcon{transform:rotate(90deg)}.Content{box-sizing:border-box}.Disclosure[data-disclosure-icon-position=left] .Content[data-disclosure-padding=true]{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-icon-position=right] .Content[data-disclosure-padding=true]{padding-right:var(--padding)}.Content[data-disclosure-height=true]{-webkit-overflow-scrolling:touch;max-block-size:var(--max-height);overflow:auto;overscroll-behavior:contain}
@@ -28,6 +28,6 @@ export const Drawer = forwardRef(({ children, className, closeOnClickOutside = t
28
28
  }
29
29
  }
30
30
  };
31
- return (_jsx("div", { role: "dialog", "aria-modal": isModal, "data-theme": theme, "aria-labelledby": titleId, className: clsx(styles.Drawer, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { enabled: isModal, onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(motion.div, { variants: DrawerAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, "data-drawer-side": side, children: _jsx(Elevator, { resting: 4, children: _jsxs("div", { className: styles.Content, style: dynamicStyle, ref: forwardedRef, ...otherProps, children: [(showHeader && title) && (_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "6", id: titleId, children: title }, void 0), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" }, void 0)] }, void 0)), _jsx(AutoFocusInside, { children: children }, void 0)] }, void 0) }, void 0) }, void 0) }, void 0) }, void 0));
31
+ return (_jsx("div", { role: "dialog", "aria-modal": isModal, "data-theme": theme, "aria-labelledby": titleId, className: clsx(styles.Drawer, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { enabled: isModal, onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(motion.div, { variants: DrawerAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, "data-drawer-side": side, children: _jsx(Elevator, { resting: 4, children: _jsxs("div", { className: styles.Content, style: dynamicStyle, ref: forwardedRef, ...otherProps, children: [(showHeader && title) && (_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "6", id: titleId, children: title }), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" })] })), _jsx(AutoFocusInside, { children: children })] }) }) }) }) }));
32
32
  });
33
33
  Drawer.displayName = 'Drawer';
@@ -4,5 +4,5 @@ export const Elevator = ({ children, resting, hover }) => {
4
4
  return (_jsx(Fragment, { children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
5
5
  'data-elevation': resting,
6
6
  'data-elevation-hover': hover
7
- })) }, void 0));
7
+ })) }));
8
8
  };
@@ -13,7 +13,7 @@ export const Grid = forwardRef(({ className, children, columns, rows, rowGap, co
13
13
  '--rows': rows,
14
14
  '--row-min-h': rowMinHeight
15
15
  };
16
- return (_jsx("ul", { className: clsx(styles.Grid, className), style: { ...computedStyle, ...style }, "data-grid-filling-type": filling, ref: forwardedRef, ...otherProps, children: children }, void 0));
16
+ return (_jsx("ul", { className: clsx(styles.Grid, className), style: { ...computedStyle, ...style }, "data-grid-filling-type": filling, ref: forwardedRef, ...otherProps, children: children }));
17
17
  });
18
18
  Grid.displayName = 'Grid';
19
19
  Grid.Item = GridItem;
@@ -7,6 +7,6 @@ export const GridItem = forwardRef(({ children, style, className, fullWidth = fa
7
7
  '--column': column,
8
8
  '--row': row
9
9
  };
10
- return (_jsx("li", { ref: forwardedRef, className: clsx(styles.GridItem, className), style: { ...dynamicStyle, ...style }, "data-grid-item-fullwidth": fullWidth, ...otherProps, children: children }, void 0));
10
+ return (_jsx("li", { ref: forwardedRef, className: clsx(styles.GridItem, className), style: { ...dynamicStyle, ...style }, "data-grid-item-fullwidth": fullWidth, ...otherProps, children: children }));
11
11
  });
12
12
  GridItem.displayName = 'Grid.Item';
@@ -6,12 +6,12 @@ import styles from './icon.module.css';
6
6
  export const Icon = forwardRef(({ className, source, dimension = 16, weight = 'outline', fill, ...otherProps }, forwardedRef) => {
7
7
  const computedStyle = useMemo(() => dimension < 16 ? 'solid' : weight, [weight, dimension]);
8
8
  return (typeof source === 'string')
9
- ? (_jsx("svg", { "aria-hidden": "true", width: dimension, height: dimension, fill: fill, className: clsx(styles.Icon, className), ref: forwardedRef, ...otherProps, children: _jsx("use", { href: `${sprite}#${computedStyle}/${source}` }, void 0) }, void 0))
9
+ ? (_jsx("svg", { "aria-hidden": "true", width: dimension, height: dimension, fill: fill, className: clsx(styles.Icon, className), ref: forwardedRef, ...otherProps, children: _jsx("use", { href: `${sprite}#${computedStyle}/${source}` }) }))
10
10
  : (_jsx(_Fragment, { children: Children.map(source, (child) => cloneElement(child, {
11
11
  className,
12
12
  'aria-hidden': 'true',
13
13
  width: dimension,
14
14
  height: dimension
15
- })) }, void 0));
15
+ })) }));
16
16
  });
17
17
  Icon.displayName = 'Icon';
@@ -3,4 +3,4 @@ import { forwardRef } from 'react';
3
3
  import styles from './icon-button.module.css';
4
4
  import { Button } from '../..';
5
5
  import clsx from 'clsx';
6
- export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, className: clsx(styles.IconButton, className), ...otherProps }, void 0)));
6
+ export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, className: clsx(styles.IconButton, className), ...otherProps })));
@@ -9,7 +9,7 @@ export * from './container';
9
9
  export * from './datetime';
10
10
  export * from './disclosure';
11
11
  export * from './drawer';
12
- export * from './dropdown';
12
+ export * from './popover';
13
13
  export * from './elevator';
14
14
  export * from './grid';
15
15
  export * from './icon-button';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
@@ -9,7 +9,7 @@ export * from './container';
9
9
  export * from './datetime';
10
10
  export * from './disclosure';
11
11
  export * from './drawer';
12
- export * from './dropdown';
12
+ export * from './popover';
13
13
  export * from './elevator';
14
14
  export * from './grid';
15
15
  export * from './icon-button';
@@ -4,6 +4,6 @@ import { Stack, Icon, Title, Text } from '../..';
4
4
  import styles from './info-state.module.css';
5
5
  export const InfoState = forwardRef(({ className, children, title, icon, image, direction = 'column', iconColor = 'blue', actions, ...otherProps }, forwardedRef) => {
6
6
  const isHorizontal = direction === 'row';
7
- return (_jsxs(Stack, { ref: forwardedRef, direction: direction, rowGap: 24, columnGap: 32, className: className, hAlign: isHorizontal ? 'start' : 'center', vAlign: (isHorizontal && image) ? 'center' : 'start', fill: false, wrap: !!image, ...otherProps, children: [(!image && icon) && (_jsx("span", { "data-info-state-icon-color": iconColor, className: styles.IconWrapper, children: _jsx(Icon, { source: icon, dimension: 48 }, void 0) }, void 0)), (image && !icon) && _jsx("img", { className: styles.Image, alt: "", width: "400", src: image, loading: "lazy", decoding: "async" }, void 0), _jsxs(Stack, { rowGap: 16, hAlign: isHorizontal ? 'start' : 'center', vAlign: "center", fill: false, children: [_jsx(Title, { maxWidth: "20ch", textAlign: isHorizontal ? 'start' : 'center', level: "4", children: title }, void 0), _jsx(Text, { maxWidth: "60ch", dimmed: 6, textAlign: isHorizontal ? 'start' : 'center', children: children }, void 0), actions && (_jsx(Stack, { vPadding: 16, inline: true, direction: "row", columnGap: 16, rowGap: 16, wrap: true, children: actions }, void 0))] }, void 0)] }, void 0));
7
+ return (_jsxs(Stack, { ref: forwardedRef, direction: direction, rowGap: 24, columnGap: 32, className: className, hAlign: isHorizontal ? 'start' : 'center', vAlign: (isHorizontal && image) ? 'center' : 'start', fill: false, wrap: !!image, ...otherProps, children: [(!image && icon) && (_jsx("span", { "data-info-state-icon-color": iconColor, className: styles.IconWrapper, children: _jsx(Icon, { source: icon, dimension: 48 }) })), (image && !icon) && _jsx("img", { className: styles.Image, alt: "", width: "400", src: image, loading: "lazy", decoding: "async" }), _jsxs(Stack, { rowGap: 16, hAlign: isHorizontal ? 'start' : 'center', vAlign: "center", fill: false, children: [_jsx(Title, { maxWidth: "20ch", textAlign: isHorizontal ? 'start' : 'center', level: "4", children: title }), _jsx(Text, { maxWidth: "60ch", dimmed: 6, textAlign: isHorizontal ? 'start' : 'center', children: children }), actions && (_jsx(Stack, { vPadding: 16, inline: true, direction: "row", columnGap: 16, rowGap: 16, wrap: true, children: actions }))] })] }));
8
8
  });
9
9
  InfoState.displayName = 'InfoState';
@@ -6,13 +6,13 @@ import { useUIDSeed } from 'react-uid';
6
6
  import styles from './input-group.module.css';
7
7
  export const InputGroup = forwardRef(({ className, input, end, start, label, dimension = 'regular', ...otherProps }, forwardedRef) => {
8
8
  const seedID = useUIDSeed();
9
- return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('field'), children: label }, void 0), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(end), "data-input-group-has-start": !!start, ...otherProps, children: [_jsx("div", { className: styles.Start, children: Children.map(start, (child) => isValidElement(child) && cloneElement(child, {
9
+ return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('field'), children: label }), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(end), "data-input-group-has-start": !!start, ...otherProps, children: [_jsx("div", { className: styles.Start, children: Children.map(start, (child) => isValidElement(child) && cloneElement(child, {
10
10
  dimension
11
- })) }, void 0), _jsx("div", { className: styles.InputField, children: Children.map(input, (child) => isValidElement(child) && cloneElement(child, {
11
+ })) }), _jsx("div", { className: styles.InputField, children: Children.map(input, (child) => isValidElement(child) && cloneElement(child, {
12
12
  id: seedID('field'),
13
13
  dimension
14
- })) }, void 0), _jsx("div", { className: styles.End, children: Children.map(end, (child) => isValidElement(child) && cloneElement(child, {
14
+ })) }), _jsx("div", { className: styles.End, children: Children.map(end, (child) => isValidElement(child) && cloneElement(child, {
15
15
  dimension
16
- })) }, void 0)] }, void 0)] }, void 0));
16
+ })) })] })] }));
17
17
  });
18
18
  InputGroup.displayName = 'InputGroup';
@@ -6,9 +6,9 @@ import styles from './linear-progress.module.css';
6
6
  export const LinearProgress = forwardRef(({ className, value, max = 100, dimension = 'regular', showProgress, ...otherProps }, forwardedRef) => {
7
7
  const getPercentage = useCallback(() => value ? Math.round((100 * value) / max) : 0, [max, value]);
8
8
  const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
9
- return (_jsxs("div", { className: clsx(styles.LinearProgress, className), children: [_jsx("progress", { role: "progressbar", ref: forwardedRef, className: styles.Progress, "data-progress-dimension": dimension, "aria-valuemin": 0, "aria-valuenow": value, "aria-valuemax": max, value: value, max: max, ...otherProps }, void 0), (showProgress) && (_jsx(Text, { as: "span", className: styles.Percentage, style: {
9
+ return (_jsxs("div", { className: clsx(styles.LinearProgress, className), children: [_jsx("progress", { role: "progressbar", ref: forwardedRef, className: styles.Progress, "data-progress-dimension": dimension, "aria-valuemin": 0, "aria-valuenow": value, "aria-valuemax": max, value: value, max: max, ...otherProps }), (showProgress) && (_jsx(Text, { as: "span", className: styles.Percentage, style: {
10
10
  '--offset': `${getPercentage()}%`,
11
11
  '--translation': value !== 0 ? '-100%' : '-50%'
12
- }, weight: "bold", size: dimension === 'regular' ? 16 : 18, children: value && clamp(getPercentage(), 0, 100) }, void 0))] }, void 0));
12
+ }, weight: "bold", size: dimension === 'regular' ? 16 : 18, children: value && clamp(getPercentage(), 0, 100) }))] }));
13
13
  });
14
14
  LinearProgress.displayName = 'LinearProgress';
@@ -1,3 +1,4 @@
1
1
  export { List } from './list';
2
2
  export type { ListProps } from './list';
3
+ export type { ListItemProps } from './list-item';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { IconProps } from '../..';
2
+ import { PropsWithChildren } from 'react';
3
+ import { ListProps } from './list';
4
+ export declare type ListItemProps = PropsWithChildren<PropsWithClass> & Pick<ListProps, 'dimension' | 'hideMarker'> & {
5
+ /**
6
+ * Set the marker style. You can use any icon from the iconography as marker
7
+ * by passing its name.
8
+ */
9
+ marker?: IconProps['source'];
10
+ /**
11
+ * Set the color of the marker.
12
+ */
13
+ markerColor?: string;
14
+ };
15
+ export declare const ListItem: import("react").ForwardRefExoticComponent<PropsWithClass & {
16
+ children?: import("react").ReactNode;
17
+ } & Pick<ListProps, "dimension" | "hideMarker"> & {
18
+ /**
19
+ * Set the marker style. You can use any icon from the iconography as marker
20
+ * by passing its name.
21
+ */
22
+ marker?: import("packages/icons/dist").IconNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
23
+ /**
24
+ * Set the color of the marker.
25
+ */
26
+ markerColor?: string | undefined;
27
+ } & import("react").RefAttributes<HTMLLIElement>>;
28
+ //# sourceMappingURL=list-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../../src/components/list/list-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAa,MAAM,cAAc,CAAA;AAGtE,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,oBAAY,aAAa,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,YAAY,CAAC,GAAG;IAC5G;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ;;;IAXnB;;;OAGG;;IAEH;;OAEG;;iDA+DH,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack, Icon, Text } from '../..';
3
+ import styles from './list.module.css';
4
+ import clsx from 'clsx';
5
+ import { forwardRef } from 'react';
6
+ export const ListItem = forwardRef(({ className, hideMarker, marker = 'circle', markerColor, children, dimension = 'regular', ...otherProps }, forwardedRef) => {
7
+ const sizes = {
8
+ small: {
9
+ text: 16,
10
+ icon: {
11
+ size: 16,
12
+ weight: 'solid'
13
+ }
14
+ },
15
+ regular: {
16
+ text: 18,
17
+ icon: {
18
+ size: 16,
19
+ weight: 'outline'
20
+ }
21
+ },
22
+ big: {
23
+ text: 22,
24
+ icon: {
25
+ size: 24,
26
+ weight: 'duotone'
27
+ }
28
+ }
29
+ };
30
+ return (_jsxs(Stack, { className: clsx(styles.ListItem, className), as: "li", direction: "row", hAlign: "start", vAlign: "start", fill: false, ref: forwardedRef, ...otherProps, children: [!hideMarker && (_jsx(Icon, { source: marker, className: styles.Marker, fill: markerColor, "data-list-default-marker": marker === 'circle', weight: marker === 'circle' ? 'solid' : sizes[dimension].icon.weight, dimension: marker !== 'circle' ? sizes[dimension].icon.size : 16 })), _jsx(Text, { as: "span", size: sizes[dimension].text, children: children })] }));
31
+ });
@@ -1,24 +1,19 @@
1
- import { IconProps, Polymorphic } from '../..';
1
+ /// <reference types="react" />
2
+ import { Polymorphic } from '../..';
3
+ import { ListItemProps } from './list-item';
2
4
  export declare type ListProps = {
3
5
  /**
4
6
  * Set the dimension of the items in the list. This affects also the marker size.
5
7
  */
6
8
  dimension?: 'small' | 'regular' | 'big';
7
- /**
8
- * Set the marker style. You can use any icon from the iconography as marker
9
- * by passing its name.
10
- */
11
- marker?: IconProps['source'];
12
- /**
13
- * Set the color of the marker.
14
- */
15
- markerColor?: string;
16
9
  /**
17
10
  * Set to show or hide the marker indicator beside each item in the list.
18
11
  */
19
12
  hideMarker?: boolean;
20
13
  };
21
- declare type PolymorphicList = Polymorphic.ForwardRefComponent<'ul', ListProps>;
14
+ declare type PolymorphicList = Polymorphic.ForwardRefComponent<'ul', ListProps> & {
15
+ Li: React.ForwardRefExoticComponent<ListItemProps>;
16
+ };
22
17
  export declare const List: PolymorphicList;
23
18
  export {};
24
19
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgC,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnF,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAExE,eAAO,MAAM,IAAI,iBAuDI,CAAA"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAA;AAErD,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG;IACxE,EAAE,EAAE,KAAK,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,IAAI,iBA4BI,CAAA"}
@@ -1,23 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Children, forwardRef, useMemo } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Children, cloneElement, forwardRef, isValidElement, useMemo } from 'react';
3
3
  import styles from './list.module.css';
4
4
  import clsx from 'clsx';
5
- import { Text, Stack, Icon } from '../..';
6
- export const List = forwardRef(({ as: Wrapper = 'ul', children, marker = 'circle', dimension = 'regular', className, markerColor, hideMarker = false, ...otherProps }, forwardedRef) => {
7
- const sizes = {
8
- small: {
9
- text: 16,
10
- icon: 16
11
- },
12
- regular: {
13
- text: 18,
14
- icon: 16
15
- },
16
- big: {
17
- text: 22,
18
- icon: 24
19
- }
20
- };
5
+ import { ListItem } from './list-item';
6
+ export const List = forwardRef(({ as: Wrapper = 'ul', children, dimension = 'regular', className, hideMarker = false, ...otherProps }, forwardedRef) => {
21
7
  const isUnordered = useMemo(() => Wrapper === 'ul', [Wrapper]);
22
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.List, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, "data-list-no-marker": hideMarker, ...otherProps, children: Children.map(children, (child) => (_jsxs(Stack, { as: "li", direction: "row", hAlign: "start", vAlign: "start", fill: false, children: [(isUnordered && !hideMarker) && (_jsx(Icon, { source: marker, className: styles.Marker, fill: markerColor, "data-list-default-marker": marker === 'circle', weight: marker === 'circle' ? 'solid' : undefined, dimension: marker !== 'circle' ? sizes[dimension].icon : 16 }, void 0)), _jsx(Text, { as: "span", size: sizes[dimension].text, children: child.props.children }, void 0)] }, void 0))) }, void 0));
8
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.List, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, "data-list-no-marker": hideMarker, ...otherProps, children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
9
+ hideMarker: !isUnordered && !hideMarker,
10
+ dimension
11
+ })) }));
23
12
  });
13
+ List.Li = ListItem;
@@ -1 +1 @@
1
- .List{--marker-size:0.89rem;--marker-gap:0.44rem}.List li{gap:var(--marker-gap)}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-ordered=true] li::marker{color:var(--dimmed-5)}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.44rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:0.89rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
1
+ .List{--marker-size:0.89rem;--marker-gap:0.44rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.44rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:0.89rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.ListItem.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem.ListItem{display:list-item}[data-list-ordered=true] .ListItem.ListItem::marker{color:var(--dimmed-5)}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
@@ -22,5 +22,5 @@ export const Masonry = ({ className, children, columns = 3, gutter = 16, style,
22
22
  }), {});
23
23
  return (_jsx(MasonryLayout, { role: "list", className: clsx(styles.Masonry, className), columnClassName: styles.Column, breakpointCols: typeof columns === 'number' ? columns : computedColumns, style: { ...dynamicStyle, ...style }, ...otherProps, children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
24
24
  role: 'listitem'
25
- })) }, void 0));
25
+ })) }));
26
26
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import { MenuItem } from '../../..';
4
- export const MenuItemCheckbox = forwardRef(({ children, checked, ...otherProps }, forwardedRef) => (_jsx(MenuItem, { role: "menuitemcheckbox", "aria-checked": checked, ref: forwardedRef, ...otherProps, children: children }, void 0)));
4
+ export const MenuItemCheckbox = forwardRef(({ children, checked, ...otherProps }, forwardedRef) => (_jsx(MenuItem, { role: "menuitemcheckbox", "aria-checked": checked, ref: forwardedRef, ...otherProps, children: children })));
5
5
  MenuItemCheckbox.displayName = 'Menu.ItemCheckbox';
@@ -15,9 +15,9 @@ export const MenuItem = forwardRef(({ className, children, onClick, icon, dimens
15
15
  onClick(e);
16
16
  }
17
17
  }, [handleClick, onClick]);
18
- const InnerContent = useMemo(() => (_jsxs(Stack, { direction: isIconRight ? 'row-reverse' : 'row', as: "span", fill: false, className: styles.ItemContent, hAlign: isIconRight ? 'space-between' : 'start', vAlign: "center", columnGap: 8, hPadding: 16, vPadding: 8, "data-menu-item-icon-right": isIconRight, "data-menu-item-has-icon": Boolean(icon), "data-menu-item-padding": padding, style: { inlineSize: '100%' }, children: [icon && (_jsx(Icon, { className: styles.IconClass, source: icon, dimension: dimension === 'small' ? 12 : 16 }, void 0)), _jsxs(Stack, { className: styles.DecorationContent, columnGap: 16, fill: false, direction: "row", hAlign: "space-between", children: [children, decoration] }, void 0)] }, void 0)), [children, dimension, icon, isIconRight, decoration, padding]);
18
+ const InnerContent = useMemo(() => (_jsxs(Stack, { direction: isIconRight ? 'row-reverse' : 'row', as: "span", fill: false, className: styles.ItemContent, hAlign: isIconRight ? 'space-between' : 'start', vAlign: "center", columnGap: 8, hPadding: 16, vPadding: 8, "data-menu-item-icon-right": isIconRight, "data-menu-item-has-icon": Boolean(icon), "data-menu-item-padding": padding, style: { inlineSize: '100%' }, children: [icon && (_jsx(Icon, { className: styles.IconClass, source: icon, dimension: dimension === 'small' ? 12 : 16 })), _jsxs(Stack, { className: styles.DecorationContent, columnGap: 16, fill: false, direction: "row", hAlign: "space-between", children: [children, decoration] })] })), [children, dimension, icon, isIconRight, decoration, padding]);
19
19
  return (_jsx(Wrapper, { autoFocus: autoFocus, ref: itemRef, role: "menuitem", className: clsx(styles.MenuItem, className), onClick: disabled ? undefined : triggerClick, onKeyDown: disabled ? undefined : handleKeyDown, tabIndex: tabIndex, "aria-disabled": disabled, type: Wrapper === 'button' ? 'button' : undefined, "data-menu-item-dimension": dimension, ...otherProps, children: description
20
- ? (_jsx(Tooltip, { fill: true, open: focused, placement: "right-start", interactive: true, trigger: InnerContent, children: description }, void 0))
21
- : InnerContent }, void 0));
20
+ ? (_jsx(Tooltip, { fill: true, open: focused, placement: "right-start", interactive: true, trigger: InnerContent, children: description }))
21
+ : InnerContent }));
22
22
  });
23
23
  MenuItem.displayName = 'Menu.Item';
@@ -4,7 +4,7 @@ import { MenuItemCheckbox, MenuItemCheckboxProps } from './menu-item/menu-item-c
4
4
  import { Polymorphic } from '../..';
5
5
  export declare type MenuProps = HTMLAttributes<HTMLUListElement> & {
6
6
  /**
7
- * The items of the dropdown menu.
7
+ * The items of the menu.
8
8
  */
9
9
  children: ReactNode;
10
10
  };
@@ -8,7 +8,7 @@ import styles from './menu.module.css';
8
8
  import clsx from 'clsx';
9
9
  export const Menu = forwardRef(({ className, children, ...otherProps }, forwardedRef) => {
10
10
  const renderedChildren = Children.toArray(children).filter(Boolean);
11
- return (_jsx(Elevator, { resting: 2, children: _jsx(Stack, { as: "ul", ref: forwardedRef, className: clsx(styles.Menu, className), vPadding: 8, role: "menu", ...otherProps, children: _jsx(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true }, children: Children.map(renderedChildren, (child) => (_jsx(Stack, { as: "li", role: "none", vPadding: child.type?.displayName === 'Separator' ? 8 : undefined, children: child }, void 0))) }, void 0) }, void 0) }, void 0));
11
+ return (_jsx(Elevator, { resting: 2, children: _jsx(Stack, { as: "ul", ref: forwardedRef, className: clsx(styles.Menu, className), vPadding: 8, role: "menu", ...otherProps, children: _jsx(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true }, children: Children.map(renderedChildren, (child) => (_jsx(Stack, { as: "li", role: "none", vPadding: child.type?.displayName === 'Separator' ? 8 : undefined, children: child }))) }) }) }));
12
12
  });
13
13
  Menu.displayName = 'Menu';
14
14
  Menu.Item = MenuItem;
@@ -6,6 +6,6 @@ import styles from './modal-content.module.css';
6
6
  import { Title, Elevator, IconButton, Stack, useOverlayContext } from '../../..';
7
7
  export const ModalContent = forwardRef(({ children, className, title, theme = 'light', ...otherProps }, forwardedRef) => {
8
8
  const { onClose, titleId } = useOverlayContext();
9
- return (_jsx(Elevator, { resting: 4, children: _jsxs("div", { className: clsx(styles.Content, className), ref: forwardedRef, "data-theme": theme, ...otherProps, children: [_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "5", id: titleId, children: title }, void 0), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" }, void 0)] }, void 0), _jsx(AutoFocusInside, { children: children }, void 0)] }, void 0) }, void 0));
9
+ return (_jsx(Elevator, { resting: 4, children: _jsxs("div", { className: clsx(styles.Content, className), ref: forwardedRef, "data-theme": theme, ...otherProps, children: [_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "5", id: titleId, children: title }), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" })] }), _jsx(AutoFocusInside, { children: children })] }) }));
10
10
  });
11
11
  ModalContent.displayName = 'Modal.Content';
@@ -26,7 +26,7 @@ const ModalAnimation = {
26
26
  };
27
27
  export const Modal = forwardRef(({ children, className, closeOnClickOutside = true, ...otherProps }, forwardedRef) => {
28
28
  const { titleId, onClose } = useOverlayContext();
29
- return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(motion.div, { variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: children }, void 0) }, void 0) }, void 0));
29
+ return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(motion.div, { variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: children }) }) }));
30
30
  });
31
31
  Modal.displayName = 'Modal';
32
32
  Modal.Content = ModalContent;
@@ -12,6 +12,6 @@ export const OverlayContainer = ({ children, root = document.body, overlayColor
12
12
  throw new Error('An OverlayContainer must not be inside another container. Please change the root prop.');
13
13
  }
14
14
  }, [root]);
15
- const content = (_jsx(OverlayProvider, { onClose: onClose, children: _jsx(AnimatePresence, { exitBeforeEnter: true, children: children && (_jsxs("div", { "data-overlay-container": true, "data-overlay-container-obfuscate": obfuscate, className: styles.OverlayContainer, style: { zIndex: index }, children: [obfuscate && (_jsx(motion.span, { className: styles.Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, transition: { duration: 0.2 }, exit: { opacity: 0 } }, seedID('modal-backdrop'))), children] }, void 0)) }, void 0) }, void 0));
15
+ const content = (_jsx(OverlayProvider, { onClose: onClose, children: _jsx(AnimatePresence, { exitBeforeEnter: true, children: children && (_jsxs("div", { "data-overlay-container": true, "data-overlay-container-obfuscate": obfuscate, className: styles.OverlayContainer, style: { zIndex: index }, children: [obfuscate && (_jsx(motion.span, { className: styles.Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, transition: { duration: 0.2 }, exit: { opacity: 0 } }, seedID('modal-backdrop'))), children] })) }) }));
16
16
  return createPortal(content, root);
17
17
  };