@wonderflow/react-components 11.0.2 → 11.0.4

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',
@@ -26,6 +26,6 @@ export const Select = forwardRef(({ children, className, disabled = false, icon
26
26
  regular: 16,
27
27
  big: 24,
28
28
  };
29
- return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Select, className), "data-select-is-multiple": kind === 'multiple', "data-select-has-label": Boolean(label), "data-select-dimension": dimension, "aria-disabled": disabled, hAlign: "start", vAlign: "start", inline: true, tabIndex: disabled ? 0 : undefined, children: [label && _jsx(Text, { as: "label", "aria-disabled": disabled, className: styles.Label, size: dimension === 'small' ? 14 : 16, htmlFor: seedID('select'), children: label }), _jsxs("div", { className: styles.FieldContainer, children: [_jsx("select", { disabled: disabled, className: styles.Field, id: seedID('select'), multiple: kind === 'multiple', onChange: onChange, ref: forwardedRef, ...otherProps, children: children }), kind === 'single' && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
29
+ return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Select, className), "data-select-is-multiple": kind === 'multiple', "data-select-has-label": Boolean(label), "data-select-dimension": dimension, "aria-disabled": disabled, hAlign: "start", vAlign: "start", inline: true, tabIndex: disabled ? 0 : undefined, children: [label && _jsx(Text, { as: "label", lineHeight: "small", "aria-disabled": disabled, className: styles.Label, size: dimension === 'small' ? 14 : 16, htmlFor: seedID('select'), children: label }), _jsxs("div", { className: styles.FieldContainer, children: [_jsx("select", { disabled: disabled, className: styles.Field, id: seedID('select'), multiple: kind === 'multiple', onChange: onChange, ref: forwardedRef, ...otherProps, children: children }), kind === 'single' && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
30
30
  });
31
31
  Select.displayName = 'Select';
@@ -28,6 +28,6 @@ export const Slider = forwardRef(({ min = 0, max = 100, step, onInput, className
28
28
  }, [onInput]);
29
29
  const seedID = useUIDSeed();
30
30
  const fieldID = useMemo(() => id ?? seedID('slider'), [id, seedID]);
31
- return (_jsxs(Stack, { direction: "column", rowGap: 8, children: [label && _jsx(Text, { as: "label", size: isSmall ? 14 : 16, className: styles.Label, "aria-disabled": disabled, htmlFor: fieldID, children: label }), _jsxs(Stack, { direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.Slider, className), "data-slider-dimension": dimension, children: [showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", textAlign: "end", className: styles.Value, "aria-disabled": disabled, children: min }), (iconMin && !showValues) && (_jsx(Symbol, { source: iconMin, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled })), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled, step: step, onInput: handleInput, disabled: disabled, id: fieldID, "data-testid": "SliderInput", ...otherProps }), showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: styles.Value, "aria-disabled": disabled, children: max }), showValues && _jsx(Textfield, { readOnly: true, dimension: "small", size: String(max).length, value: value, disabled: disabled }), (iconMax && !showValues) && (_jsx(Symbol, { source: iconMax, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled }))] })] }));
31
+ return (_jsxs(Stack, { direction: "column", rowGap: 8, children: [label && _jsx(Text, { as: "label", lineHeight: "small", size: isSmall ? 14 : 16, className: styles.Label, "aria-disabled": disabled, htmlFor: fieldID, children: label }), _jsxs(Stack, { direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.Slider, className), "data-slider-dimension": dimension, children: [showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", textAlign: "end", className: styles.Value, "aria-disabled": disabled, children: min }), (iconMin && !showValues) && (_jsx(Symbol, { source: iconMin, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled })), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled, step: step, onInput: handleInput, disabled: disabled, id: fieldID, "data-testid": "SliderInput", ...otherProps }), showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: styles.Value, "aria-disabled": disabled, children: max }), showValues && _jsx(Textfield, { readOnly: true, dimension: "small", size: String(max).length, value: value, disabled: disabled }), (iconMax && !showValues) && (_jsx(Symbol, { source: iconMax, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled }))] })] }));
32
32
  });
33
33
  Slider.displayName = 'Slider';
@@ -1 +1 @@
1
- @layer components{.Table{position:relative;width:100%;z-index:0}.TableWrapper[data-table-scrolling=true]{-webkit-overflow-scrolling:touch;background:var(--table-background);max-height:var(--table-height);overflow:auto;overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}}
1
+ @layer components{.Table{position:relative;width:100%;z-index:0}.TableWrapper{overflow-x:auto}.TableWrapper[data-table-scrolling=true]{-webkit-overflow-scrolling:touch;background:var(--table-background);max-height:var(--table-height);overflow:auto;overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}}
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.4",
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.4",
86
+ "@wonderflow/tokens": "11.0.4",
87
87
  "babel-loader": "8.2.5",
88
88
  "cpy-cli": "3.1.1",
89
89
  "postcss": "8.4.17",