@wonderflow/react-components 10.20.0 → 11.0.1

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 (164) hide show
  1. package/core/basic.css +1 -1
  2. package/core.css +1 -1
  3. package/dist/components/accordion/accordion.test.js +0 -15
  4. package/dist/components/aspect-ratio/aspect-ratio.test.js +0 -15
  5. package/dist/components/autocomplete/autocomplete.d.ts +4 -0
  6. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  7. package/dist/components/autocomplete/autocomplete.js +2 -4
  8. package/dist/components/autocomplete/autocomplete.module.css +1 -1
  9. package/dist/components/autocomplete/autocomplete.test.js +0 -15
  10. package/dist/components/avatar/avatar.module.css +1 -1
  11. package/dist/components/avatar/avatar.test.js +0 -15
  12. package/dist/components/button/button.d.ts +1 -2
  13. package/dist/components/button/button.d.ts.map +1 -1
  14. package/dist/components/button/button.module.css +1 -1
  15. package/dist/components/button/button.stories.d.ts +4 -4
  16. package/dist/components/button/button.stories.d.ts.map +1 -1
  17. package/dist/components/button/button.test.js +0 -15
  18. package/dist/components/card/card.d.ts.map +1 -1
  19. package/dist/components/card/card.js +1 -1
  20. package/dist/components/card/card.module.css +1 -1
  21. package/dist/components/card/card.test.js +0 -15
  22. package/dist/components/chip/chip.module.css +1 -1
  23. package/dist/components/chip/chip.test.js +0 -15
  24. package/dist/components/circular-progress/circular-progress.test.js +0 -15
  25. package/dist/components/clamp-text/clamp-text.test.js +0 -15
  26. package/dist/components/container/container.d.ts +1 -1
  27. package/dist/components/container/container.d.ts.map +1 -1
  28. package/dist/components/container/container.module.css +1 -1
  29. package/dist/components/container/container.stories.d.ts +4 -5
  30. package/dist/components/container/container.stories.d.ts.map +1 -1
  31. package/dist/components/container/container.stories.js +11 -14
  32. package/dist/components/container/container.test.js +0 -15
  33. package/dist/components/datetime/datetime.test.js +0 -15
  34. package/dist/components/disclosure/disclosure.module.css +1 -1
  35. package/dist/components/disclosure/disclosure.test.d.ts.map +1 -1
  36. package/dist/components/disclosure/disclosure.test.js +0 -15
  37. package/dist/components/elevator/elevator.test.js +0 -15
  38. package/dist/components/expander/expander.test.js +0 -15
  39. package/dist/components/grid/grid.test.js +0 -15
  40. package/dist/components/info-state/info-state.d.ts.map +1 -1
  41. package/dist/components/info-state/info-state.js +1 -9
  42. package/dist/components/info-state/info-state.module.css +1 -1
  43. package/dist/components/info-state/info-state.stories.d.ts +31 -31
  44. package/dist/components/info-state/info-state.stories.d.ts.map +1 -1
  45. package/dist/components/info-state/info-state.stories.js +5 -5
  46. package/dist/components/info-state/info-state.test.js +0 -15
  47. package/dist/components/input-group/input-group.test.js +0 -15
  48. package/dist/components/linear-progress/linear-progress.module.css +1 -1
  49. package/dist/components/linear-progress/linear-progress.test.js +0 -15
  50. package/dist/components/list/list.module.css +1 -1
  51. package/dist/components/list/list.test.js +0 -15
  52. package/dist/components/masonry/masonry.test.js +0 -15
  53. package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
  54. package/dist/components/menu/menu-item/menu-item.js +3 -1
  55. package/dist/components/menu/menu-item/menu-item.module.css +1 -1
  56. package/dist/components/menu/menu-item/menu-item.stories.d.ts.map +1 -1
  57. package/dist/components/menu/menu-item/menu-item.stories.js +1 -0
  58. package/dist/components/menu/menu.test.js +0 -15
  59. package/dist/components/modal/content/modal-content.d.ts +7 -8
  60. package/dist/components/modal/content/modal-content.d.ts.map +1 -1
  61. package/dist/components/modal/content/modal-content.js +3 -7
  62. package/dist/components/modal/content/modal-content.module.css +1 -1
  63. package/dist/components/modal/footer/modal-footer.d.ts +32 -0
  64. package/dist/components/modal/footer/modal-footer.d.ts.map +1 -0
  65. package/dist/components/modal/footer/modal-footer.js +22 -0
  66. package/dist/components/modal/footer/modal-footer.module.css +1 -0
  67. package/dist/components/modal/header/modal-header.d.ts +20 -0
  68. package/dist/components/modal/header/modal-header.d.ts.map +1 -0
  69. package/dist/components/modal/header/modal-header.js +26 -0
  70. package/dist/components/modal/header/modal-header.module.css +1 -0
  71. package/dist/components/modal/modal.d.ts +79 -7
  72. package/dist/components/modal/modal.d.ts.map +1 -1
  73. package/dist/components/modal/modal.js +16 -6
  74. package/dist/components/modal/modal.module.css +1 -1
  75. package/dist/components/modal/modal.stories.d.ts +69 -5
  76. package/dist/components/modal/modal.stories.d.ts.map +1 -1
  77. package/dist/components/modal/modal.stories.js +145 -10
  78. package/dist/components/modal/modal.test.d.ts +2 -0
  79. package/dist/components/modal/modal.test.d.ts.map +1 -0
  80. package/dist/components/modal/modal.test.js +60 -0
  81. package/dist/components/overlay-container/overlay-container.test.d.ts +2 -0
  82. package/dist/components/overlay-container/overlay-container.test.d.ts.map +1 -0
  83. package/dist/components/overlay-container/overlay-container.test.js +19 -0
  84. package/dist/components/pagination/pagination.test.js +0 -15
  85. package/dist/components/popover/popover.d.ts +4 -0
  86. package/dist/components/popover/popover.d.ts.map +1 -1
  87. package/dist/components/popover/popover.js +6 -8
  88. package/dist/components/popover/popover.module.css +1 -1
  89. package/dist/components/popover/popover.stories.d.ts +13 -9
  90. package/dist/components/popover/popover.stories.d.ts.map +1 -1
  91. package/dist/components/popover/popover.stories.js +8 -2
  92. package/dist/components/popover/popover.test.js +0 -15
  93. package/dist/components/prose/prose.test.js +0 -15
  94. package/dist/components/select/select.js +1 -1
  95. package/dist/components/select/select.module.css +1 -1
  96. package/dist/components/select/select.test.js +0 -15
  97. package/dist/components/selection-controls/selection-controls.test.js +0 -15
  98. package/dist/components/separator/separator.test.js +0 -15
  99. package/dist/components/skeleton/skeleton.test.js +0 -15
  100. package/dist/components/slider/slider.test.js +0 -15
  101. package/dist/components/snackbar/snackbar.test.js +0 -15
  102. package/dist/components/spinner/spinner.test.js +0 -15
  103. package/dist/components/split-button/split-button.test.js +0 -15
  104. package/dist/components/stack/stack.test.js +0 -15
  105. package/dist/components/star-meter/star-meter.module.css +1 -1
  106. package/dist/components/star-meter/star-meter.test.js +0 -15
  107. package/dist/components/symbol/symbol.test.js +0 -15
  108. package/dist/components/tab/tab.js +1 -1
  109. package/dist/components/tab/tab.module.css +1 -1
  110. package/dist/components/tab/tab.stories.d.ts +1 -0
  111. package/dist/components/tab/tab.stories.d.ts.map +1 -1
  112. package/dist/components/tab/tab.stories.js +4 -17
  113. package/dist/components/tab/tab.test.js +0 -15
  114. package/dist/components/table/table-cell/table-cell.test.js +0 -15
  115. package/dist/components/table/table-checkbox/table-checkbox.test.js +0 -15
  116. package/dist/components/table/table-controls/table-controls.test.js +0 -15
  117. package/dist/components/table/table-header/table-header.test.js +0 -15
  118. package/dist/components/table/table-pagination/table-pagination.test.js +0 -15
  119. package/dist/components/table/table-row/table-row.test.js +0 -15
  120. package/dist/components/table/table.module.css +1 -1
  121. package/dist/components/table/table.stories.d.ts.map +1 -1
  122. package/dist/components/table/table.stories.js +1 -0
  123. package/dist/components/table/table.test.js +0 -15
  124. package/dist/components/text/text.module.css +1 -1
  125. package/dist/components/text/text.test.js +0 -15
  126. package/dist/components/textfield/textfield.module.css +1 -1
  127. package/dist/components/textfield/textfield.test.js +0 -15
  128. package/dist/components/title/title.module.css +1 -1
  129. package/dist/components/title/title.test.js +0 -15
  130. package/dist/components/toggle-button/toggle-button.test.js +0 -15
  131. package/dist/components/tooltip/tooltip.d.ts +4 -0
  132. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  133. package/dist/components/tooltip/tooltip.js +2 -4
  134. package/dist/components/tooltip/tooltip.module.css +1 -1
  135. package/dist/components/tooltip/tooltip.stories.d.ts +1 -1
  136. package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -1
  137. package/dist/components/tooltip/tooltip.stories.js +4 -3
  138. package/dist/components/tooltip/tooltip.test.js +0 -15
  139. package/dist/hooks/index.d.ts +3 -1
  140. package/dist/hooks/index.d.ts.map +1 -1
  141. package/dist/hooks/index.js +3 -1
  142. package/dist/hooks/useBreakpoints.d.ts +11 -0
  143. package/dist/hooks/useBreakpoints.d.ts.map +1 -0
  144. package/dist/hooks/useBreakpoints.js +84 -0
  145. package/dist/hooks/useBreakpoints.test.d.ts +2 -0
  146. package/dist/hooks/useBreakpoints.test.d.ts.map +1 -0
  147. package/dist/hooks/useBreakpoints.test.js +35 -0
  148. package/dist/hooks/useBreakpointsConfig.d.ts +12 -0
  149. package/dist/hooks/useBreakpointsConfig.d.ts.map +1 -0
  150. package/dist/hooks/useBreakpointsConfig.js +31 -0
  151. package/dist/hooks/useBreakpointsConfig.test.d.ts +2 -0
  152. package/dist/hooks/useBreakpointsConfig.test.d.ts.map +1 -0
  153. package/dist/hooks/useBreakpointsConfig.test.js +16 -0
  154. package/dist/hooks/useSSR.d.ts +5 -0
  155. package/dist/hooks/useSSR.d.ts.map +1 -0
  156. package/dist/hooks/useSSR.js +24 -0
  157. package/dist/hooks/useSSR.test.d.ts +2 -0
  158. package/dist/hooks/useSSR.test.d.ts.map +1 -0
  159. package/dist/hooks/useSSR.test.js +11 -0
  160. package/dist/providers/providers.test.js +11 -17
  161. package/package.json +5 -4
  162. package/dist/hooks/usePopupWrapper.d.ts +0 -4
  163. package/dist/hooks/usePopupWrapper.d.ts.map +0 -1
  164. package/dist/hooks/usePopupWrapper.js +0 -42
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { Grid } from './grid';
19
4
  describe('<Grid>', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"info-state.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAiC,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACE,UAAU,EAAU,WAAW,EACvC,MAAM,cAAc,CAAC;AAItB,oBAAY,cAAc,GAAG,cAAc,CAAC;IAC1C;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7E;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC,CAAA;AAEF,eAAO,MAAM,SAAS;;;;IA9BpB;;;OAGG;WACI,SAAS;IAChB;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;gBACS,UAAU,CAAC,WAAW,CAAC;IACnC;;;OAGG;cACO,SAAS;;;kDAoEnB,CAAC"}
1
+ {"version":3,"file":"info-state.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAiC,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACE,UAAU,EAAU,WAAW,EACvC,MAAM,cAAc,CAAC;AAItB,oBAAY,cAAc,GAAG,cAAc,CAAC;IAC1C;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7E;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC,CAAA;AAEF,eAAO,MAAM,SAAS;;;;IA9BpB;;;OAGG;WACI,SAAS;IAChB;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;gBACS,UAAU,CAAC,WAAW,CAAC;IACnC;;;OAGG;cACO,SAAS;;;kDA0DnB,CAAC"}
@@ -20,14 +20,6 @@ import { Stack, Symbol, Text, Title, } from '../..';
20
20
  import * as styles from './info-state.module.css';
21
21
  export const InfoState = forwardRef(({ className, children, title, icon, image, direction = 'column', iconColor = 'blue', actions, ...otherProps }, forwardedRef) => {
22
22
  const isHorizontal = direction === 'row';
23
- return (_jsx(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: _jsxs(LazyMotion, { features: domMax, children: [(!image && icon) && (_jsx(m.span, { "data-info-state-icon-color": iconColor, className: styles.IconWrapper, animate: {
24
- scale: [1, 0.8, 1],
25
- }, transition: {
26
- duration: 0.8,
27
- repeat: Infinity,
28
- repeatDelay: 5.2,
29
- repeatType: 'reverse',
30
- type: 'spring',
31
- }, children: _jsx(Symbol, { 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, { as: "div", 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 }))] })] }) }));
23
+ return (_jsx(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: _jsxs(LazyMotion, { features: domMax, children: [(!image && icon) && (_jsx(m.span, { "data-info-state-icon-color": iconColor, className: styles.IconWrapper, children: _jsx(Symbol, { 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, { as: "div", 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 }))] })] }) }));
32
24
  });
33
25
  InfoState.displayName = 'InfoState';
@@ -1 +1 @@
1
- @layer components{.IconWrapper{background-color:var(--bg);border-radius:.5rem;color:var(--fg);display:block;padding:.5rem;position:relative}.IconWrapper:before{animation:pulse 6s ease .5s infinite;animation-fill-mode:backwards;background-color:var(--bg,currentColor);border-radius:inherit;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.IconWrapper svg{display:block}.IconWrapper[data-info-state-icon-color=cyan]{--bg:var(--highlight-cyan-background);--fg:var(--highlight-cyan-foreground)}.IconWrapper[data-info-state-icon-color=gray]{--bg:var(--highlight-gray-background);--fg:var(--highlight-gray-foreground)}.IconWrapper[data-info-state-icon-color=green]{--bg:var(--highlight-green-background);--fg:var(--highlight-green-foreground)}.IconWrapper[data-info-state-icon-color=purple]{--bg:var(--highlight-purple-background);--fg:var(--highlight-purple-foreground)}.IconWrapper[data-info-state-icon-color=yellow]{--bg:var(--highlight-yellow-background);--fg:var(--highlight-yellow-foreground)}.IconWrapper[data-info-state-icon-color=red]{--bg:var(--highlight-red-background);--fg:var(--highlight-red-foreground)}.IconWrapper[data-info-state-icon-color=blue]{--bg:var(--highlight-blue-background);--fg:var(--highlight-blue-foreground)}.Image{max-block-size:22rem;max-inline-size:22rem}}@keyframes pulse{0%{opacity:.8;transform:scale(.8)}30%,to{border-radius:50px;opacity:0;transform:scale(3)}}
1
+ @layer components{.IconWrapper{background-color:var(--bg);border:8px solid hsla(0,0%,100%,.6);border-radius:.5rem;color:var(--fg);display:block;padding:.5rem;position:relative}.IconWrapper:before{background-color:var(--bg,currentColor);border-radius:inherit;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.IconWrapper svg{display:block}.IconWrapper[data-info-state-icon-color=cyan]{--bg:var(--highlight-cyan-background);--fg:var(--highlight-cyan-foreground)}.IconWrapper[data-info-state-icon-color=gray]{--bg:var(--highlight-gray-background);--fg:var(--highlight-gray-foreground)}.IconWrapper[data-info-state-icon-color=green]{--bg:var(--highlight-green-background);--fg:var(--highlight-green-foreground)}.IconWrapper[data-info-state-icon-color=purple]{--bg:var(--highlight-purple-background);--fg:var(--highlight-purple-foreground)}.IconWrapper[data-info-state-icon-color=yellow]{--bg:var(--highlight-yellow-background);--fg:var(--highlight-yellow-foreground)}.IconWrapper[data-info-state-icon-color=red]{--bg:var(--highlight-red-background);--fg:var(--highlight-red-foreground)}.IconWrapper[data-info-state-icon-color=blue]{--bg:var(--highlight-blue-background);--fg:var(--highlight-blue-foreground)}.Image{max-block-size:22rem;max-inline-size:22rem}}
@@ -1,71 +1,71 @@
1
+ /// <reference types="react" />
1
2
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import React from 'react';
3
3
  import { InfoState } from './info-state';
4
4
  declare const story: ComponentMeta<typeof InfoState>;
5
5
  export default story;
6
- export declare const Default: ComponentStory<React.ForwardRefExoticComponent<{
6
+ export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<{
7
7
  style?: Record<string, any> | undefined;
8
8
  className?: string | undefined;
9
9
  } & {
10
- title: React.ReactNode;
11
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
10
+ title: import("react").ReactNode;
11
+ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
12
12
  iconColor?: "gray" | "blue" | "cyan" | "green" | "purple" | "red" | "yellow" | undefined;
13
13
  image?: string | undefined;
14
14
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
15
- actions?: React.ReactNode;
15
+ actions?: import("react").ReactNode;
16
16
  } & {
17
- children?: React.ReactNode;
18
- } & React.RefAttributes<HTMLDivElement>>>;
19
- export declare const Horizontal: ComponentStory<React.ForwardRefExoticComponent<{
17
+ children?: import("react").ReactNode;
18
+ } & import("react").RefAttributes<HTMLDivElement>>>;
19
+ export declare const Horizontal: ComponentStory<import("react").ForwardRefExoticComponent<{
20
20
  style?: Record<string, any> | undefined;
21
21
  className?: string | undefined;
22
22
  } & {
23
- title: React.ReactNode;
24
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
23
+ title: import("react").ReactNode;
24
+ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
25
25
  iconColor?: "gray" | "blue" | "cyan" | "green" | "purple" | "red" | "yellow" | undefined;
26
26
  image?: string | undefined;
27
27
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
28
- actions?: React.ReactNode;
28
+ actions?: import("react").ReactNode;
29
29
  } & {
30
- children?: React.ReactNode;
31
- } & React.RefAttributes<HTMLDivElement>>>;
32
- export declare const WithImage: ComponentStory<React.ForwardRefExoticComponent<{
30
+ children?: import("react").ReactNode;
31
+ } & import("react").RefAttributes<HTMLDivElement>>>;
32
+ export declare const WithImage: ComponentStory<import("react").ForwardRefExoticComponent<{
33
33
  style?: Record<string, any> | undefined;
34
34
  className?: string | undefined;
35
35
  } & {
36
- title: React.ReactNode;
37
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
36
+ title: import("react").ReactNode;
37
+ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
38
38
  iconColor?: "gray" | "blue" | "cyan" | "green" | "purple" | "red" | "yellow" | undefined;
39
39
  image?: string | undefined;
40
40
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
41
- actions?: React.ReactNode;
41
+ actions?: import("react").ReactNode;
42
42
  } & {
43
- children?: React.ReactNode;
44
- } & React.RefAttributes<HTMLDivElement>>>;
45
- export declare const WithImageHorizontal: ComponentStory<React.ForwardRefExoticComponent<{
43
+ children?: import("react").ReactNode;
44
+ } & import("react").RefAttributes<HTMLDivElement>>>;
45
+ export declare const WithImageHorizontal: ComponentStory<import("react").ForwardRefExoticComponent<{
46
46
  style?: Record<string, any> | undefined;
47
47
  className?: string | undefined;
48
48
  } & {
49
- title: React.ReactNode;
50
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
49
+ title: import("react").ReactNode;
50
+ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
51
51
  iconColor?: "gray" | "blue" | "cyan" | "green" | "purple" | "red" | "yellow" | undefined;
52
52
  image?: string | undefined;
53
53
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
54
- actions?: React.ReactNode;
54
+ actions?: import("react").ReactNode;
55
55
  } & {
56
- children?: React.ReactNode;
57
- } & React.RefAttributes<HTMLDivElement>>>;
58
- export declare const WithActions: ComponentStory<React.ForwardRefExoticComponent<{
56
+ children?: import("react").ReactNode;
57
+ } & import("react").RefAttributes<HTMLDivElement>>>;
58
+ export declare const WithActions: ComponentStory<import("react").ForwardRefExoticComponent<{
59
59
  style?: Record<string, any> | undefined;
60
60
  className?: string | undefined;
61
61
  } & {
62
- title: React.ReactNode;
63
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
62
+ title: import("react").ReactNode;
63
+ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
64
64
  iconColor?: "gray" | "blue" | "cyan" | "green" | "purple" | "red" | "yellow" | undefined;
65
65
  image?: string | undefined;
66
66
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
67
- actions?: React.ReactNode;
67
+ actions?: import("react").ReactNode;
68
68
  } & {
69
- children?: React.ReactNode;
70
- } & React.RefAttributes<HTMLDivElement>>>;
69
+ children?: import("react").ReactNode;
70
+ } & import("react").RefAttributes<HTMLDivElement>>>;
71
71
  //# sourceMappingURL=info-state.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"info-state.stories.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAY1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO;;;;;;;;;;;;yCAAoB,CAAC;AAKzC,eAAO,MAAM,UAAU;;;;;;;;;;;;yCAAoB,CAAC;AAM5C,eAAO,MAAM,SAAS;;;;;;;;;;;;yCAAoB,CAAC;AAK3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;yCAAoB,CAAC;AAMrD,eAAO,MAAM,WAAW;;;;;;;;;;;;yCAAoB,CAAC"}
1
+ {"version":3,"file":"info-state.stories.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAY1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAWrB,eAAO,MAAM,OAAO;;;;;;;;;;;;mDAAoB,CAAC;AAKzC,eAAO,MAAM,UAAU;;;;;;;;;;;;mDAAoB,CAAC;AAM5C,eAAO,MAAM,SAAS;;;;;;;;;;;;mDAAoB,CAAC;AAK3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;mDAAoB,CAAC;AAMrD,eAAO,MAAM,WAAW;;;;;;;;;;;;mDAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button, List, Stack } from '../..';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Stack } from '../..';
3
3
  import { InfoState } from './info-state';
4
4
  const story = {
5
5
  title: 'Dialogs/InfoState',
@@ -15,7 +15,7 @@ const story = {
15
15
  },
16
16
  };
17
17
  export default story;
18
- const Template = args => (_jsx(InfoState, { ...args, children: _jsxs(Stack, { hAlign: "center", fill: false, children: ["Cras ultricies, elit sit amet cursus consectetur, risus felis ullamcorper nulla, ut scelerisque sapien lorem non sem.", _jsxs(List, { children: [_jsx(List.Li, { children: "ciao" }), _jsx(List.Li, { children: "ciao" })] })] }) }));
18
+ const Template = args => (_jsx(InfoState, { ...args, children: _jsx(Stack, { hAlign: "center", fill: false, children: "Cras ultricies, elit sit amet cursus consectetur, risus felis ullamcorper nulla, ut scelerisque sapien lorem non sem." }) }));
19
19
  export const Default = Template.bind({});
20
20
  Default.args = {
21
21
  icon: 'compass',
@@ -27,12 +27,12 @@ Horizontal.args = {
27
27
  };
28
28
  export const WithImage = Template.bind({});
29
29
  WithImage.args = {
30
- image: 'https://svgshare.com/i/b5f.svg',
30
+ image: 'https://wonderimages.gumlet.io/placeholders/illustration.png?format=webp&q=100',
31
31
  };
32
32
  export const WithImageHorizontal = Template.bind({});
33
33
  WithImageHorizontal.args = {
34
34
  direction: 'row',
35
- image: 'https://svgshare.com/i/b5f.svg',
35
+ image: 'https://wonderimages.gumlet.io/placeholders/illustration.png?format=webp&q=100',
36
36
  };
37
37
  export const WithActions = Template.bind({});
38
38
  WithActions.args = {
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { Button } from '../button';
19
4
  import { InfoState } from './info-state';
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { Select } from '../select';
19
4
  import { Textfield } from '../textfield';
@@ -1 +1 @@
1
- @layer components{.LinearProgress,.Progress{position:relative}.Progress{--progress-height:0.25rem;--track-color:var(--dimmed-1);--fill-color:var(--cta-default);appearance:none;background:var(--track-color);border:none;display:block;height:var(--progress-height);overflow:hidden;vertical-align:baseline;width:100%}.Progress[data-progress-dimension=big]{--progress-height:0.50rem}.Progress::-webkit-progress-bar{background-color:transparent}.Progress::-webkit-progress-value{background:var(--fill-color);-webkit-transition:width .2s cubic-bezier(0,0,.34,1);transition:width .2s cubic-bezier(0,0,.34,1)}.Progress::-moz-progress-bar{background:var(--fill-color)}.Progress:not([value])::-moz-progress-bar{background:transparent}.Progress:indeterminate{animation:progress-stripes 2s linear infinite;background-image:linear-gradient(to right,transparent 50%,var(--fill-color) 50%,var(--fill-color) 60%,transparent 60%,transparent 71.5%,var(--fill-color) 71.5%,var(--fill-color) 84%,transparent 84%);background-size:200% 100%}.Percentage{left:var(--offset);position:absolute;transform:translateX(var(--translation));transition:left .2s cubic-bezier(0,0,.34,1)}}@keyframes progress-stripes{0%{background-position:left -31.25% top 0;background-size:200% 100%}50%{background-position:left -49% top 0;background-size:800% 100%}to{background-position:left -102% top 0;background-size:400% 100%}}
1
+ @layer components{.LinearProgress,.Progress{position:relative}.Progress{--progress-height:0.250rem;--track-color:var(--dimmed-1);--fill-color:var(--cta-default);appearance:none;background:var(--track-color);border:none;display:block;height:var(--progress-height);overflow:hidden;vertical-align:baseline;width:100%}.Progress[data-progress-dimension=big]{--progress-height:0.500rem}.Progress::-webkit-progress-bar{background-color:transparent}.Progress::-webkit-progress-value{background:var(--fill-color);-webkit-transition:width .2s cubic-bezier(0,0,.34,1);transition:width .2s cubic-bezier(0,0,.34,1)}.Progress::-moz-progress-bar{background:var(--fill-color)}.Progress:not([value])::-moz-progress-bar{background:transparent}.Progress:indeterminate{animation:progress-stripes 2s linear infinite;background-image:linear-gradient(to right,transparent 50%,var(--fill-color) 50%,var(--fill-color) 60%,transparent 60%,transparent 71.5%,var(--fill-color) 71.5%,var(--fill-color) 84%,transparent 84%);background-size:200% 100%}.Percentage{left:var(--offset);position:absolute;transform:translateX(var(--translation));transition:left .2s cubic-bezier(0,0,.34,1)}}@keyframes progress-stripes{0%{background-position:left -31.25% top 0;background-size:200% 100%}50%{background-position:left -49% top 0;background-size:800% 100%}to{background-position:left -102% top 0;background-size:400% 100%}}
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { LinearProgress } from './linear-progress';
19
4
  describe('<LinearProgress>', () => {
@@ -1 +1 @@
1
- @layer components{.List{--marker-size:1.00rem;--marker-gap:0.50rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.75rem;--marker-gap:0.50rem}.List[data-list-size=big]{--marker-size:1.13rem;--marker-gap:1.00rem}.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)}.List[data-list-size=big] .Marker{margin-block-start:calc(var(--marker-size)/2.8)}}@layer overrides{.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem{display:list-item}[data-list-ordered=true] .ListItem::marker{color:var(--dimmed-5)}}
1
+ @layer components{.List{--marker-size:1.000rem;--marker-gap:0.500rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.750rem;--marker-gap:0.500rem}.List[data-list-size=big]{--marker-size:1.125rem;--marker-gap:1.000rem}.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)}.List[data-list-size=big] .Marker{margin-block-start:calc(var(--marker-size)/2.8)}}@layer overrides{.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem{display:list-item}[data-list-ordered=true] .ListItem::marker{color:var(--dimmed-5)}}
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { List } from './list';
19
4
  describe('<List>', () => {
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { render } from '@testing-library/react';
18
3
  import { Masonry } from './masonry';
19
4
  describe('<Masonry>', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu-item/menu-item.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACO,SAAS,EACtB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,WAAW,EAAiB,WAAW,EAExC,MAAM,cAAc,CAAC;AAItB,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,aAAK,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAEpF,eAAO,MAAM,QAAQ,qBAmGI,CAAC"}
1
+ {"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu-item/menu-item.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACO,SAAS,EACtB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,WAAW,EAAiB,WAAW,EAExC,MAAM,cAAc,CAAC;AAItB,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,aAAK,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAEpF,eAAO,MAAM,QAAQ,qBAqGI,CAAC"}
@@ -14,6 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ import { useHover } from 'ahooks';
17
18
  import clsx from 'clsx';
18
19
  import { forwardRef, useCallback, useMemo, useRef, } from 'react';
19
20
  import { useFocusEffect, useRovingTabIndex } from 'react-roving-tabindex';
@@ -24,6 +25,7 @@ export const MenuItem = forwardRef(({ className, children, subtext, onClick, ico
24
25
  const [tabIndex, isFocused, handleKeyDown, handleClick] = useRovingTabIndex(itemRef, disabled);
25
26
  const isIconRight = iconPosition === 'right';
26
27
  useFocusEffect(isFocused, itemRef);
28
+ const isHovering = useHover(itemRef);
27
29
  const triggerClick = useCallback((e) => {
28
30
  if (onClick) {
29
31
  handleClick();
@@ -32,7 +34,7 @@ export const MenuItem = forwardRef(({ className, children, subtext, onClick, ico
32
34
  }, [handleClick, onClick, value]);
33
35
  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(Symbol, { className: styles.Icon, source: icon, dimension: dimension === 'small' ? 12 : 16 })), _jsxs(Stack, { className: styles.DecorationContent, columnGap: 16, fill: false, direction: "row", hAlign: "space-between", children: [_jsxs(Stack, { direction: "column", children: [children, subtext && _jsx(Text, { size: 14, style: { fontWeight: '400' }, children: subtext })] }), decoration] })] })), [children, subtext, dimension, icon, isIconRight, decoration, padding]);
34
36
  return (_jsx(Stack, { as: "li", role: "none", children: _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, "data-testid": "MenuItem", ...otherProps, children: description
35
- ? (_jsx(Tooltip, { fill: true, open: isFocused, placement: "right-start", interactive: true, trigger: InnerContent, children: description }))
37
+ ? (_jsx(Tooltip, { fill: true, open: isFocused || isHovering, placement: "auto", interactive: true, trigger: InnerContent, children: description }))
36
38
  : InnerContent }) }));
37
39
  });
38
40
  MenuItem.displayName = 'Menu.Item';
@@ -1 +1 @@
1
- @layer components{.MenuItem{--padding:2.50rem;background:none;border:0;box-sizing:border-box;color:var(--dimmed-6);cursor:pointer;font:inherit;font-size:1rem;font-weight:600;inline-size:100%;padding:0;position:relative;text-align:start}.MenuItem:hover{color:var(--global-foreground)}.MenuItem[aria-checked=true]{color:var(--global-interactive-text)}.MenuItem:before{border-radius:0;bottom:0;content:"";left:0;opacity:.6;position:absolute;right:0;top:0;z-index:0}.MenuItem:is(:hover,:focus-visible,[aria-pressed=true]):not([aria-disabled=true]){outline:none}.MenuItem:is(:hover,:focus-visible,[aria-pressed=true]):not([aria-disabled=true]):before{background-color:var(--dimmed-1)}.MenuItem[data-menu-item-dimension=small]{--padding:2.25rem;font-size:.88rem}.MenuItem>*{position:relative}.MenuItem[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}.MenuItem [data-menu-item-padding=true][data-menu-item-has-icon=false][data-menu-item-icon-right=false]{padding-left:var(--padding)}.MenuItem [data-menu-item-padding=true][data-menu-item-has-icon=false][data-menu-item-icon-right=true]{padding-right:var(--padding)}.ItemContent{position:relative}.DecorationContent{flex-grow:1}.Icon{align-self:flex-start;flex-grow:0;flex-shrink:0;margin-top:4px}}
1
+ @layer components{.MenuItem{--padding:2.500rem;background:none;border:0;box-sizing:border-box;color:var(--dimmed-6);cursor:pointer;font:inherit;font-size:1rem;font-weight:600;inline-size:100%;padding:0;position:relative;text-align:start}.MenuItem:hover{color:var(--global-foreground)}.MenuItem[aria-checked=true]{color:var(--global-interactive-text)}.MenuItem:before{border-radius:0;bottom:0;content:"";left:0;opacity:.6;position:absolute;right:0;top:0;z-index:0}.MenuItem:is(:hover,:focus-visible,[aria-pressed=true]):not([aria-disabled=true]){outline:none}.MenuItem:is(:hover,:focus-visible,[aria-pressed=true]):not([aria-disabled=true]):before{background-color:var(--dimmed-1)}.MenuItem[data-menu-item-dimension=small]{--padding:2.25rem;font-size:.875rem}.MenuItem>*{position:relative}.MenuItem[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}.MenuItem [data-menu-item-padding=true][data-menu-item-has-icon=false][data-menu-item-icon-right=false]{padding-left:var(--padding)}.MenuItem [data-menu-item-padding=true][data-menu-item-has-icon=false][data-menu-item-icon-right=true]{padding-right:var(--padding)}.ItemContent{position:relative}.DecorationContent{flex-grow:1}.Icon{align-self:flex-start;flex-grow:0;flex-shrink:0;margin-top:4px}}
@@ -1 +1 @@
1
- {"version":3,"file":"menu-item.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu-item/menu-item.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,IAAI,CAAC,IAAI,CAmB1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAsBrB,eAAO,MAAM,WAAW,yHAAwB,CAAC;AA+BjD,eAAO,MAAM,cAAc;;GAAgC,CAAC;AAW5D,eAAO,MAAM,eAAe,yHAAkC,CAAC"}
1
+ {"version":3,"file":"menu-item.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu-item/menu-item.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,IAAI,CAAC,IAAI,CAoB1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAsBrB,eAAO,MAAM,WAAW,yHAAwB,CAAC;AA+BjD,eAAO,MAAM,cAAc;;GAAgC,CAAC;AAW5D,eAAO,MAAM,eAAe,yHAAkC,CAAC"}
@@ -10,6 +10,7 @@ const story = {
10
10
  padding: true,
11
11
  iconPosition: 'left',
12
12
  subtext: '',
13
+ description: '',
13
14
  },
14
15
  argTypes: {
15
16
  dimension: {
@@ -1,19 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright 2023 Wonderflow Design Team
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
2
  import { fireEvent, render } from '@testing-library/react';
18
3
  import { Menu } from './menu';
19
4
  describe('<Menu>', () => {
@@ -1,31 +1,30 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  export declare type ModalContentProps = PropsWithChildren<PropsWithClass<{
3
3
  /**
4
- * Set the accessible title of the modal. This is used by screen readers to
5
- * announce the title of the modal when opened.
4
+ * Set Modal content vertically in the center on a mobile screen.
6
5
  */
7
- title: ReactNode;
6
+ alignContentCenter?: boolean;
8
7
  /**
9
8
  * Set the theme of the content card. To ensure contrast with the default overlay color (dark),
10
9
  * this is set to `light` by default.
11
10
  */
12
11
  theme?: 'dark' | 'light' | 'auto';
13
12
  }>>;
13
+ export declare type ModalContentComponent = React.ForwardRefExoticComponent<ModalContentProps>;
14
14
  export declare const ModalContent: import("react").ForwardRefExoticComponent<{
15
15
  style?: Record<string, any> | undefined;
16
16
  className?: string | undefined;
17
17
  } & {
18
18
  /**
19
- * Set the accessible title of the modal. This is used by screen readers to
20
- * announce the title of the modal when opened.
19
+ * Set Modal content vertically in the center on a mobile screen.
21
20
  */
22
- title: ReactNode;
21
+ alignContentCenter?: boolean | undefined;
23
22
  /**
24
23
  * Set the theme of the content card. To ensure contrast with the default overlay color (dark),
25
24
  * this is set to `light` by default.
26
25
  */
27
26
  theme?: "auto" | "dark" | "light" | undefined;
28
27
  } & {
29
- children?: ReactNode;
28
+ children?: import("react").ReactNode;
30
29
  } & import("react").RefAttributes<HTMLDivElement>>;
31
30
  //# sourceMappingURL=modal-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/content/modal-content.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,oBAAY,iBAAiB,GAAG,iBAAiB,CAAC,cAAc,CAAC;IAC/D;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC,CAAA;AAEH,eAAO,MAAM,YAAY;;;;IAZvB;;;OAGG;WACI,SAAS;IAChB;;;OAGG;;;;kDA+BH,CAAC"}
1
+ {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/content/modal-content.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,oBAAY,iBAAiB,GAAG,iBAAiB,CAAC,cAAc,CAAC;IAC/D;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC,CAAA;AAEH,oBAAY,qBAAqB,GAAG,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAA;AAEtF,eAAO,MAAM,YAAY;;;;IAbvB;;OAEG;;IAEH;;;OAGG;;;;kDAyBH,CAAC"}
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright 2022-2023 Wonderflow Design Team
3
+ * Copyright 2023 Wonderflow Design Team
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -17,10 +17,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  import clsx from 'clsx';
18
18
  import { forwardRef } from 'react';
19
19
  import { AutoFocusInside } from 'react-focus-on';
20
- import { Elevator, IconButton, Stack, Title, useOverlayContext, } from '../../..';
21
20
  import * as styles from './modal-content.module.css';
22
- export const ModalContent = forwardRef(({ children, className, title, theme = 'light', ...otherProps }, forwardedRef) => {
23
- const { onClose, titleId } = useOverlayContext();
24
- 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 })] }) }));
25
- });
21
+ export const ModalContent = forwardRef(({ children, className, alignContentCenter = false, theme = 'light', ...otherProps }, forwardedRef) => (_jsx("div", { "aria-label": "Content", className: clsx(styles.Content, className), ref: forwardedRef, "data-theme": theme, "data-center-vertically": alignContentCenter, ...otherProps, children: _jsx(AutoFocusInside, { children: children }) })));
26
22
  ModalContent.displayName = 'Modal.Content';
@@ -1 +1 @@
1
- @layer components{.Content{-webkit-overflow-scrolling:touch;align-self:end;background-color:var(--global-background);border-radius:1rem 1rem 0 0;inline-size:100%;justify-self:center;max-block-size:95vh;overflow:auto;overscroll-behavior:contain}@media (min-width:48em){.Content{align-self:center;border-radius:.5rem;justify-self:center;max-block-size:80vh;max-inline-size:600px}}.Header{background-color:inherit;border-bottom:1px solid var(--dimmed-1);padding:1rem 5rem 1rem 1.5rem;position:sticky;top:0}}@layer overrides{.CloseButton{position:absolute;right:.5rem;top:.5rem}}
1
+ @layer components{.Content{-webkit-overflow-scrolling:touch;background-color:var(--global-background);overflow:auto;overscroll-behavior:contain;padding:1.5rem}.Content[data-center-vertically=true]{margin:auto}@media (min-width:48em){.Content{margin:0;min-height:auto}}}
@@ -0,0 +1,32 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare type ModalFooterProps = PropsWithChildren<PropsWithClass<{
3
+ /**
4
+ * Hide the border at the top of the footer. This will be automatically dismissed
5
+ * if no actions are provided.
6
+ */
7
+ hideBorder?: boolean;
8
+ /**
9
+ * Set the theme of the content card. To ensure contrast with the default overlay color (dark),
10
+ * this is set to `light` by default.
11
+ */
12
+ theme?: 'dark' | 'light' | 'auto';
13
+ }>>;
14
+ export declare type ModalFooterComponent = React.ForwardRefExoticComponent<ModalFooterProps>;
15
+ export declare const ModalFooter: import("react").ForwardRefExoticComponent<{
16
+ style?: Record<string, any> | undefined;
17
+ className?: string | undefined;
18
+ } & {
19
+ /**
20
+ * Hide the border at the top of the footer. This will be automatically dismissed
21
+ * if no actions are provided.
22
+ */
23
+ hideBorder?: boolean | undefined;
24
+ /**
25
+ * Set the theme of the content card. To ensure contrast with the default overlay color (dark),
26
+ * this is set to `light` by default.
27
+ */
28
+ theme?: "auto" | "dark" | "light" | undefined;
29
+ } & {
30
+ children?: import("react").ReactNode;
31
+ } & import("react").RefAttributes<HTMLDivElement>>;
32
+ //# sourceMappingURL=modal-footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-footer.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/footer/modal-footer.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC,cAAc,CAAC;IAC9D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC,CAAA;AAEH,oBAAY,oBAAoB,GAAG,KAAK,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAA;AAEpF,eAAO,MAAM,WAAW;;;;IAdtB;;;OAGG;;IAEH;;;OAGG;;;;kDAyBH,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2023 Wonderflow Design Team
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import clsx from 'clsx';
18
+ import { forwardRef } from 'react';
19
+ import { AutoFocusInside } from 'react-focus-on';
20
+ import * as styles from './modal-footer.module.css';
21
+ export const ModalFooter = forwardRef(({ children, className, hideBorder = false, theme = 'light', ...otherProps }, forwardedRef) => (_jsx("div", { "aria-label": "Footer", className: clsx(styles.Footer, className), ref: forwardedRef, "data-theme": theme, "data-border-hidden": hideBorder || !children, ...otherProps, children: _jsx(AutoFocusInside, { children: children }) })));
22
+ ModalFooter.displayName = 'Modal.Footer';
@@ -0,0 +1 @@
1
+ @layer components{.Footer{align-self:end;background-color:var(--global-background);border-top:1px solid var(--dimmed-1);bottom:0;margin-top:.5rem;min-height:56px;padding:1rem 1.5rem;position:sticky}.Footer[data-border-hidden=true]{border-top:0;padding-top:.5rem}}
@@ -0,0 +1,20 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare type ModalHeaderProps = PropsWithChildren<PropsWithClass<{
3
+ /**
4
+ * Hide the Close icon Button.
5
+ */
6
+ hideCloseButton?: boolean;
7
+ /**
8
+ * Hide the border at the bottom of the header. This will be automatically dismissed
9
+ * if no content is provided.
10
+ */
11
+ hideBorder?: boolean;
12
+ /**
13
+ * Set the theme of the content card. To ensure contrast with the default overlay color (dark),
14
+ * this is set to `light` by default.
15
+ */
16
+ theme?: 'dark' | 'light' | 'auto';
17
+ }>>;
18
+ export declare type ModalHeaderComponent = React.ForwardRefExoticComponent<ModalHeaderProps>;
19
+ export declare const ModalHeader: ModalHeaderComponent;
20
+ //# sourceMappingURL=modal-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/header/modal-header.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAM/D,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC,cAAc,CAAC;IAC9D;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC,CAAA;AAEH,oBAAY,oBAAoB,GAAG,KAAK,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAA;AAEpF,eAAO,MAAM,WAAW,sBA4BE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2022-2023 Wonderflow Design Team
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import clsx from 'clsx';
18
+ import { forwardRef, useMemo } from 'react';
19
+ import { IconButton, Stack, useOverlayContext } from '../../..';
20
+ import * as styles from './modal-header.module.css';
21
+ export const ModalHeader = forwardRef(({ children, className, hideCloseButton = false, hideBorder = false, theme = 'light', ...otherProps }, forwardedRef) => {
22
+ const { onClose } = useOverlayContext();
23
+ const isBorderHidden = useMemo(() => hideBorder || !children, [hideBorder, children]);
24
+ return (_jsx("div", { "aria-label": "Header", className: clsx(styles.HeaderWrapper, className), ref: forwardedRef, "data-theme": theme, ...otherProps, children: _jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, "data-border-hidden": isBorderHidden, children: [_jsx("div", { children: children }), (onClose && !hideCloseButton) && (_jsx(IconButton, { "aria-label": "Close Button", onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" }))] }) }));
25
+ });
26
+ ModalHeader.displayName = 'Modal.Header';
@@ -0,0 +1 @@
1
+ @layer components{.HeaderWrapper{background-color:var(--global-background);height:max-content}.Header{background-color:inherit;border-bottom:1px solid var(--dimmed-1);min-height:56px;padding:1rem 5rem 1rem 1.5rem;position:sticky;top:0}.Header[data-border-hidden=true]{border-bottom:0}}@layer overrides{.CloseButton{position:absolute;right:.5rem;top:.5rem}}