@wonderflow/react-components 2.25.11 → 2.27.0-next.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.
package/icons/all.svg CHANGED
@@ -84,6 +84,8 @@
84
84
  <path d="M14 8A6 6 0 1 0 2 8a6 6 0 1 0 12 0Z"/>
85
85
  </symbol><symbol id="16/clock-rotate-left" viewBox="0 0 16 16">
86
86
  <path d="M14.863 6.588C14.659 5.532 13.122.998 8 1c-2.173-.001-3.812.909-4.948 2.051l-.932-.933A.656.656 0 0 0 1 2.582v3.547c0 .257.209.466.466.466H5.01a.656.656 0 0 0 .464-1.12L4.372 4.371C5.902 2.832 7.635 2.866 8 2.866c2.716-.001 4.585 1.978 5.014 4.013A5.144 5.144 0 0 1 8 13.132a5.09 5.09 0 0 1-2.318-.557.94.94 0 0 0-1.099.16c-.441.442-.34 1.196.216 1.484A6.919 6.919 0 0 0 8 15c4.325 0 7.735-3.926 6.863-8.412ZM8 4.267c-.385 0-.7.315-.7.7v3.5a.7.7 0 0 0 .28.56l1.867 1.4a.63.63 0 0 0 .393.14.7.7 0 0 0 .421-1.26L8.7 8.117v-3.15a.7.7 0 0 0-.7-.7Z"/>
87
+ </symbol><symbol id="16/code" viewBox="0 0 16 16">
88
+ <path d="M13 1H3a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3c0-1.104-.897-2-2-2ZM6.753 9.694a.751.751 0 1 1-1.005 1.114l-2.5-2.25a.75.75 0 0 1 0-1.115l2.5-2.25a.751.751 0 0 1 1.004 1.115L4.872 8l1.881 1.694Zm6-1.138-2.5 2.25c-.144.103-.325.194-.503.194a.75.75 0 0 1-.502-1.308L11.128 8l-1.88-1.692a.751.751 0 0 1 1.003-1.116l2.5 2.25a.75.75 0 0 1 .002 1.114Z"/>
87
89
  </symbol><symbol id="16/comment" viewBox="0 0 16 16">
88
90
  <path d="M7.988 2C4.115 2 1.001 4.494 1.001 7.572c0 1.329.585 2.544 1.56 3.5-.342 1.35-1.486 2.553-1.5 2.566a.205.205 0 0 0-.041.234.21.21 0 0 0 .199.128c1.815 0 3.153-.85 3.851-1.377a8.53 8.53 0 0 0 2.942.52c3.873 0 6.988-2.495 6.988-5.548S11.862 2 7.988 2Zm-3.53 6.429c-.487 0-.877-.382-.877-.833a.88.88 0 0 1 .877-.857c.486 0 .876.381.876.857 0 .475-.367.833-.876.833Zm3.53 0a.838.838 0 0 1-.851-.833c0-.451.39-.857.851-.857.462 0 .852.381.852.857 0 .475-.364.833-.852.833Zm3.482 0c-.486 0-.877-.382-.877-.833a.88.88 0 0 1 .877-.857c.486 0 .877.381.877.857 0 .475-.368.833-.877.833Z"/>
89
91
  </symbol><symbol id="16/compass" viewBox="0 0 16 16">
@@ -271,6 +273,8 @@
271
273
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z"/>
272
274
  </symbol><symbol id="24/clock-rotate-left" viewBox="0 0 24 24">
273
275
  <path fill-rule="evenodd" clip-rule="evenodd" d="M6 4.005A9.953 9.953 0 0 1 12 2 10 10 0 1 1 2 12.004a.833.833 0 0 1 1.667 0A8.329 8.329 0 1 0 7 5.338l1.5 1.995-6 .334L4.5 2 6 4.005Zm5.41 3.24a.833.833 0 0 1 1.423.588v3.822l3.09 3.09a.833.833 0 0 1-1.179 1.178l-3.333-3.334a.833.833 0 0 1-.244-.589V7.833c0-.22.088-.433.244-.589Z"/>
276
+ </symbol><symbol id="24/code" viewBox="0 0 24 24">
277
+ <path d="M10.718 8.746a.964.964 0 0 0-1.363 0l-2.572 2.571a.964.964 0 0 0 0 1.364l2.572 2.571c.222.191.471.284.716.284a.965.965 0 0 0 .682-1.646L8.862 12l1.89-1.89a.938.938 0 0 0-.034-1.364Zm3.857 0a.964.964 0 1 0-1.363 1.363L15.138 12l-1.89 1.89a.964.964 0 0 0 1.362 1.363l2.572-2.571a.964.964 0 0 0 0-1.364l-2.607-2.572ZM18.43 3H5.57A2.571 2.571 0 0 0 3 5.571V18.43A2.571 2.571 0 0 0 5.571 21H18.43A2.571 2.571 0 0 0 21 18.429V5.57A2.573 2.573 0 0 0 18.429 3Zm.642 15.429a.644.644 0 0 1-.642.642H5.57a.644.644 0 0 1-.642-.642V5.57c0-.354.288-.642.642-.642h12.86c.354 0 .642.288.642.642v12.86Z"/>
274
278
  </symbol><symbol id="24/comment" viewBox="0 0 24 24">
275
279
  <path d="M7.61 10.093c-.693 0-1.254.57-1.254 1.247 0 .746.56 1.32 1.254 1.32s1.22-.572 1.22-1.284c0-.711-.522-1.283-1.22-1.283Zm4.39-.036c-.695 0-1.219.572-1.219 1.283 0 .712.559 1.247 1.22 1.247.66 0 1.219-.571 1.219-1.247 0-.675-.522-1.283-1.22-1.283Zm4.39.036c-.695 0-1.218.572-1.218 1.284 0 .711.558 1.283 1.219 1.283.696 0 1.254-.572 1.254-1.284 0-.713-.556-1.283-1.254-1.283ZM12 3c-5.542 0-9.999 3.734-9.999 8.34 0 1.91.78 3.66 2.074 5.065-.583 1.584-1.798 2.922-1.818 2.937a.982.982 0 0 0-.18 1.043.857.857 0 0 0 .83.615c2.41 0 4.276-1.032 5.452-1.855 1.132.361 2.358.572 3.642.572 5.542 0 9.999-3.734 9.999-8.304S17.543 3 12 3Zm0 14.792a9.952 9.952 0 0 1-3.071-.486l-.892-.286-.764.552a8.317 8.317 0 0 1-2.253 1.163 9.963 9.963 0 0 0 .779-1.614l.416-1.123-.808-.877c-.705-.773-1.557-2.052-1.557-3.745 0-3.538 3.654-6.415 8.118-6.415 4.463 0 8.118 2.877 8.118 6.415 0 3.54-3.585 6.416-8.085 6.416Z"/>
276
280
  </symbol><symbol id="24/compass" viewBox="0 0 24 24">
@@ -374,7 +378,7 @@
374
378
  </symbol><symbol id="24/user" viewBox="0 0 24 24">
375
379
  <path d="M13.714 13.688h-3.428C6.814 13.688 4 16.457 4 19.875 4 20.496 4.512 21 5.143 21h13.714c.631 0 1.143-.504 1.143-1.125 0-3.417-2.814-6.188-6.286-6.188ZM5.75 19.311c.282-2.218 2.207-3.937 4.536-3.937h3.428c2.327 0 4.254 1.72 4.536 3.938H5.75ZM12 12c2.525 0 4.571-2.015 4.571-4.5S14.525 3 12 3 7.429 5.015 7.429 7.5C7.429 9.986 9.475 12 12 12Zm0-7.313c1.575 0 2.857 1.262 2.857 2.813 0 1.55-1.282 2.813-2.857 2.813-1.575 0-2.857-1.263-2.857-2.813 0-1.55 1.282-2.813 2.857-2.813Z"/>
376
380
  </symbol><symbol id="24/wave-sine" viewBox="0 0 24 24">
377
- <path d="M21.966 12.64c-.188.551-1.944 5.36-5.366 5.36-2.976 0-4.222-3.066-5.319-5.772-.927-2.287-1.978-4.878-3.88-4.878-1.754 0-3.298 2.632-3.907 4.402-.121.354-.47.48-.733.48a.744.744 0 0 1-.21-.028.757.757 0 0 1-.466-.34.597.597 0 0 1-.05-.506C2.222 10.808 3.978 6 7.4 6c2.976 0 4.222 3.066 5.319 5.772.927 2.287 1.978 4.878 3.881 4.878 1.753 0 3.297-2.633 3.906-4.402.121-.353.473-.478.737-.478.078 0 .152.01.205.026a.752.752 0 0 1 .467.338.6.6 0 0 1 .05.506Z"/>
381
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.913 11.966a.956.956 0 0 0 .584.43.949.949 0 0 0 .264.035c.308 0 .762-.148.922-.614.299-.869.828-1.948 1.493-2.807.674-.87 1.446-1.46 2.224-1.46.848 0 1.534.575 2.14 1.492.603.913 1.09 2.113 1.556 3.261l.003.007c.545 1.345 1.14 2.81 1.976 3.938.845 1.137 1.954 1.952 3.525 1.952 1.812 0 3.159-1.272 4.06-2.558a12.676 12.676 0 0 0 1.495-2.936.8.8 0 0 0-.066-.67l-.001-.002a.951.951 0 0 0-.586-.43.95.95 0 0 0-.259-.034c-.31 0-.766.147-.926.613-.299.868-.828 1.948-1.493 2.807-.674.87-1.446 1.46-2.224 1.46-.848 0-1.534-.575-2.14-1.492-.603-.913-1.09-2.113-1.556-3.261l-.003-.007c-.545-1.345-1.139-2.81-1.976-3.938C10.08 6.615 8.97 5.8 7.4 5.8c-1.811 0-3.158 1.272-4.059 2.558a12.738 12.738 0 0 0-1.496 2.935.8.8 0 0 0 .068.673Zm19.33-.196Z"/>
378
382
  </symbol><symbol id="24/xmark" viewBox="0 0 24 24">
379
383
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.707 5.707a1 1 0 0 0-1.414-1.414L12 10.586 5.707 4.293a1 1 0 0 0-1.414 1.414L10.586 12l-6.293 6.293a1 1 0 1 0 1.414 1.414L12 13.414l6.293 6.293a1 1 0 0 0 1.414-1.414L13.414 12l6.293-6.293Z"/>
380
384
  </symbol></svg>
@@ -32,6 +32,7 @@
32
32
  "circle-x",
33
33
  "circle",
34
34
  "clock-rotate-left",
35
+ "code",
35
36
  "comment",
36
37
  "compass",
37
38
  "earth-europa",
package/icons/types.d.ts CHANGED
@@ -32,6 +32,7 @@ export type IconNames = 'arrow-down-left' |
32
32
  'circle-x' |
33
33
  'circle' |
34
34
  'clock-rotate-left' |
35
+ 'code' |
35
36
  'comment' |
36
37
  'compass' |
37
38
  'earth-europa' |
@@ -118,6 +119,7 @@ export type IconNames = 'arrow-down-left' |
118
119
  'circle-x' |
119
120
  'circle' |
120
121
  'clock-rotate-left' |
122
+ 'code' |
121
123
  'comment' |
122
124
  'compass' |
123
125
  'earth-europa' |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
3
  "description": "UI components from Wonderflow's Wanda design system",
4
- "version": "2.25.11",
4
+ "version": "2.27.0-next.3",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
package/text/text.d.ts CHANGED
@@ -7,6 +7,7 @@ export declare type TextProps = {
7
7
  weight?: 'thin' | 'bold';
8
8
  fluid?: boolean;
9
9
  maxWidth?: string;
10
+ textAlign?: 'start' | 'center' | 'end';
10
11
  };
11
12
  declare type PolymorphicText = Polymorphic.ForwardRefComponent<'p', TextProps>;
12
13
  export declare const Text: PolymorphicText;
package/text/text.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { Text as TextClass } from './text.module.css';
3
3
  import clsx from 'clsx';
4
- export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, as: Wrapper = 'p', fluid = true, style, ...props }, forwardedRef) => {
4
+ export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, textAlign = 'start', as: Wrapper = 'p', fluid = true, style, ...props }, forwardedRef) => {
5
5
  const dynamicStyle = {
6
- '--maxW': maxWidth
6
+ '--maxW': maxWidth,
7
+ '--tAlign': textAlign
7
8
  };
8
9
  return (React.createElement(Wrapper, { ref: forwardedRef, "data-text-size": size, "data-text-weight": weight, "data-text-sentiment": sentiment, "data-text-dimmed": dimmed, "data-text-is-fluid": fluid, className: clsx(TextClass, className), style: { ...dynamicStyle, ...style }, ...props }, children));
9
10
  });
@@ -3,6 +3,7 @@
3
3
  min-block-size: 0.01vh;
4
4
  font-size: var(--fluid-type-max);
5
5
  max-inline-size: var(--maxW, initial);
6
+ text-align: var(--tAlign);
6
7
 
7
8
  &[data-text-is-fluid='true'] {
8
9
  font-size:
package/themes/dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 07 Oct 2021 08:09:53 GMT
3
+ * Generated on Fri, 08 Oct 2021 09:54:41 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes/light.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 07 Oct 2021 08:09:53 GMT
3
+ * Generated on Fri, 08 Oct 2021 09:54:41 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes.css CHANGED
@@ -4,7 +4,7 @@
4
4
  color: var(--global-foreground);
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Thu, 07 Oct 2021 08:09:53 GMT
7
+ * Generated on Fri, 08 Oct 2021 09:54:41 GMT
8
8
  */
9
9
 
10
10
 
@@ -51,7 +51,7 @@
51
51
  color: var(--global-foreground);
52
52
  /**
53
53
  * Do not edit directly
54
- * Generated on Thu, 07 Oct 2021 08:09:53 GMT
54
+ * Generated on Fri, 08 Oct 2021 09:54:41 GMT
55
55
  */
56
56
 
57
57
 
@@ -99,7 +99,7 @@
99
99
  color: var(--global-foreground);
100
100
  /**
101
101
  * Do not edit directly
102
- * Generated on Thu, 07 Oct 2021 08:09:53 GMT
102
+ * Generated on Fri, 08 Oct 2021 09:54:41 GMT
103
103
  */
104
104
 
105
105
 
package/title/title.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Polymorphic } from '../';
2
2
  export declare type TitleProps = {
3
3
  level?: '1' | '2' | '3' | '4' | '5' | '6' | 'display';
4
- lineHeignt?: 'none' | 'small' | 'large';
4
+ lineHeight?: 'none' | 'small' | 'large';
5
+ textAlign?: 'start' | 'center' | 'end';
5
6
  maxWidth?: string;
6
7
  fluid?: boolean;
7
8
  };
package/title/title.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import * as styles from './title.module.css';
3
3
  import clsx from 'clsx';
4
- export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeignt = 'small', level = '1', fluid = true, maxWidth, style, ...props }, forwardedRef) => {
4
+ export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1', fluid = true, textAlign = 'start', maxWidth, style, ...props }, forwardedRef) => {
5
5
  const computedLevel = level.match(/\d/g) ? `H${level}` : level.charAt(0).toUpperCase() + level.slice(1);
6
6
  const dynamicStyle = {
7
- '--maxW': maxWidth
7
+ '--maxW': maxWidth,
8
+ '--tAlign': textAlign
8
9
  };
9
- return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeignt, "data-title-is-fluid": fluid, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, style }, ...props }, children));
10
+ return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, "data-title-is-fluid": fluid, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, style }, ...props }, children));
10
11
  });
11
12
  Title.displayName = 'Title';
@@ -7,6 +7,7 @@
7
7
  min-block-size: 0.01vh;
8
8
  font-size: var(--fluid-type-max);
9
9
  max-inline-size: var(--maxW, initial);
10
+ text-align: var(--tAlign);
10
11
 
11
12
  &[data-title-is-fluid='true'] {
12
13
  font-size: