@wonderflow/react-components 11.0.2 → 11.0.3

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.
@@ -1 +1 @@
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}}}
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-bottom:auto;margin-top:auto}@media (min-width:48em){.Content{margin:0;min-height:auto}}}
@@ -51,7 +51,7 @@ export const Modal = forwardRef(({ children, className, size = 'medium', theme =
51
51
  },
52
52
  },
53
53
  }), [matches]);
54
- return (_jsx(_Fragment, { children: isVisible && (_jsx(OverlayContainer, { onClose: onCloseModal, overlayColor: otherProps.overlayColor, root: otherProps.root, index: otherProps.index, obfuscate: otherProps.obfuscate, children: _jsx("div", { "aria-modal": "true", "aria-labelledby": (typeof title === 'string') ? title : 'modal-label', className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: preventCloseOnClickOutside ? undefined : onCloseModal, onEscapeKey: onCloseModal, children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { role: "dialog", variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: _jsx(Elevator, { resting: 4, children: _jsx("div", { className: clsx(styles.Main, className), ref: forwardedRef, "data-theme": theme, "data-size": size, ...otherProps, children: children ?? (_jsxs(_Fragment, { children: [_jsxs(Modal.Header, { hideCloseButton: hideCloseButton, theme: theme, hideBorder: (!title ?? !subtitle) || hideHeaderBorder, children: [title && _jsx(Title, { level: "5", children: title }), (title && subtitle) && _jsx(Text, { size: 14, children: subtitle })] }), content && (_jsx(Modal.Content, { theme: theme, alignContentCenter: isLoading ?? alignContentCenter, children: isLoading
54
+ return (_jsx(_Fragment, { children: isVisible && (_jsx(OverlayContainer, { onClose: onCloseModal, overlayColor: otherProps.overlayColor, root: otherProps.root, index: otherProps.index, obfuscate: otherProps.obfuscate, children: _jsx("div", { "aria-modal": "true", "aria-labelledby": (typeof title === 'string') ? title : 'modal-label', className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: preventCloseOnClickOutside ? undefined : onCloseModal, onEscapeKey: onCloseModal, children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { role: "dialog", variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: _jsx(Elevator, { resting: 4, children: _jsx("div", { className: clsx(styles.Main, className), ref: forwardedRef, "data-theme": theme, "data-size": size, ...otherProps, children: children ?? (_jsxs(_Fragment, { children: [_jsxs(Modal.Header, { hideCloseButton: hideCloseButton, theme: theme, hideBorder: (!title ?? !subtitle) || hideHeaderBorder, children: [title && _jsx(Title, { level: "5", children: title }), (title && subtitle) && _jsx(Text, { size: 14, children: subtitle })] }), content && (_jsx(Modal.Content, { theme: theme, alignContentCenter: isLoading ? true : alignContentCenter, children: isLoading
55
55
  ? (_jsx(Stack, { fill: true, hAlign: "center", vPadding: 64, children: _jsxs(Stack, { hAlign: "center", vAlign: "center", rowGap: 16, children: [_jsx(Spinner, { dimension: "big" }), _jsx(Text, { size: "16", dimmed: 5, children: "Loading..." })] }) }))
56
56
  : content })), hasActions && (_jsx(Modal.Footer, { theme: theme, hideBorder: hideFooterBorder, children: _jsxs(Stack, { direction: matches.small ? 'row' : 'column-reverse', rowGap: matches.small ? undefined : '16', fill: false, hAlign: (alignActionCenter && matches.small) ? 'center' : 'space-between', vAlign: "center", columnGap: 16, children: [_jsx(Stack, { direction: "row", fill: true, children: tertiaryAction }), _jsxs(Stack, { direction: matches.small ? 'row' : 'column-reverse', rowGap: matches.small ? undefined : '16', columnGap: 16, children: [secondaryAction
57
57
  && isValidElement(secondaryAction)
@@ -1 +1 @@
1
- {"version":3,"file":"modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CAmCtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAkBrB,eAAO,MAAM,OAAO;;;;EAA2B,CAAC;AAEhD,eAAO,MAAM,OAAO;;;;EAA2B,CAAC;AAMhD,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAOvD,eAAO,MAAM,YAAY;;;;EAA2B,CAAC;AAWrD,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAevD,eAAO,MAAM,eAAe;;;;EAA2B,CAAC;AA8BxD,eAAO,MAAM,eAAe;;;;EAA2B,CAAC;AAgBxD,eAAO,MAAM,SAAS;;;;EAA2B,CAAC;AA+BlD,eAAO,MAAM,SAAS;;;;EAA2B,CAAC;AA0ClD,eAAO,MAAM,QAAQ;;;;EAA2B,CAAC;AA4DjD,eAAO,MAAM,kBAAkB;;;;EAA2B,CAAC;AAS3D,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAqBvD,eAAO,MAAM,YAAY;;;;EAA2B,CAAC;AA+CrD,eAAO,MAAM,MAAM;;;;EAA0B,CAAC"}
1
+ {"version":3,"file":"modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CAmCtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAkBrB,eAAO,MAAM,OAAO;;;;EAA2B,CAAC;AAEhD,eAAO,MAAM,OAAO;;;;EAA2B,CAAC;AAMhD,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAOvD,eAAO,MAAM,YAAY;;;;EAA2B,CAAC;AAWrD,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAevD,eAAO,MAAM,eAAe;;;;EAA2B,CAAC;AA8BxD,eAAO,MAAM,eAAe;;;;EAA2B,CAAC;AAgBxD,eAAO,MAAM,SAAS;;;;EAA2B,CAAC;AA+BlD,eAAO,MAAM,SAAS;;;;EAA2B,CAAC;AAoClD,eAAO,MAAM,QAAQ;;;;EAA2B,CAAC;AA4DjD,eAAO,MAAM,kBAAkB;;;;EAA2B,CAAC;AAS3D,eAAO,MAAM,cAAc;;;;EAA2B,CAAC;AAqBvD,eAAO,MAAM,YAAY;;;;EAA2B,CAAC;AA+CrD,eAAO,MAAM,MAAM;;;;EAA0B,CAAC"}
@@ -114,8 +114,8 @@ WithImage.args = {
114
114
  primaryAction: _jsx(Button, { children: "Primary" }),
115
115
  secondaryAction: _jsx(Button, { children: "Secondary" }),
116
116
  };
117
- const formWithin = (_jsxs(Stack, { rowGap: 24, children: [_jsxs(Stack, { direction: "row", columnGap: 24, children: [_jsx(Textfield, { label: "Label", placeHolder: "Sample value" }), _jsx(Textfield, { label: "Label", placeHolder: "Sample value" })] }), _jsx(Textfield, { label: "Label", placeHolder: "Sample value" })] }));
118
- const withTabsContent = (_jsxs(Tab, { defaultValue: "1", dimension: "regular", children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: _jsx(Card, { children: formWithin }) }), _jsx(Tab.Panel, { value: "2", label: "Tab 2", children: _jsx(Card, { children: formWithin }) }), _jsx(Tab.Panel, { value: "3", label: "Tab 3", children: _jsx(Card, { children: formWithin }) })] }));
117
+ const formWithin = (_jsxs(Stack, { rowGap: 24, style: { marginTop: '24px' }, children: [_jsxs(Stack, { direction: "row", columnGap: 24, children: [_jsx(Textfield, { label: "Label", placeHolder: "Sample value" }), _jsx(Textfield, { label: "Label", placeHolder: "Sample value" })] }), _jsx(Textfield, { label: "Label", placeHolder: "Sample value" })] }));
118
+ const withTabsContent = (_jsxs(Tab, { defaultValue: "1", dimension: "regular", children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: formWithin }), _jsx(Tab.Panel, { value: "2", label: "Tab 2", children: formWithin }), _jsx(Tab.Panel, { value: "3", label: "Tab 3", children: formWithin })] }));
119
119
  export const WithTabs = DefaultTemplate.bind({});
120
120
  WithTabs.args = {
121
121
  title: 'Modal title',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "11.0.2",
3
+ "version": "11.0.3",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "Apache-2.0",
@@ -82,8 +82,8 @@
82
82
  "@types/react-dom": "17.0.14",
83
83
  "@types/react-table": "7.7.12",
84
84
  "@types/react-test-renderer": "18.0.0",
85
- "@wonderflow/config": "11.0.2",
86
- "@wonderflow/tokens": "11.0.2",
85
+ "@wonderflow/config": "11.0.3",
86
+ "@wonderflow/tokens": "11.0.3",
87
87
  "babel-loader": "8.2.5",
88
88
  "cpy-cli": "3.1.1",
89
89
  "postcss": "8.4.17",