@pexip/components 16.9.0 → 16.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 16.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7f59a752: Adds `data-testid` attributes to `BreakoutRoom`-related components.
8
+ - dfd80cb1: Update color palette of `Button` variant "bordered" in light theme
9
+ - fe6ce452: - Simplifies css class hierarchy of `Divider` component
10
+ - Adds `onPointerMoveExtra` prop to `Draggable`. A callback to be ran on
11
+ `pointermove` event.
12
+ - 8b6184da: Export TextProps type.
13
+ - 237ed011: Support `withScrollbars` prop in `Modal`.
14
+
3
15
  ## 16.9.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -1,15 +1,10 @@
1
- # @pexip/components
1
+ # `@pexip/components`
2
2
 
3
3
  Shared UI component library based on Pexip's design system.
4
4
 
5
- Current style guide:
6
- [Figma - Style guide](https://www.figma.com/file/opMo7dh4FO56qqGsozGzv2/Pexip-prototype?node-id=43%3A403)
5
+ ## Install
7
6
 
8
- ## Storybook
9
-
10
- Current state is published to
11
-
12
- ### [https://main--5f6dd462e70810002208a2c9.chromatic.com/](https://main--5f6dd462e70810002208a2c9.chromatic.com/)
7
+ `npm install @pexip/components`
13
8
 
14
9
  ## Usage
15
10
 
@@ -29,113 +24,3 @@ import '@pexip/components/src/fonts.css';
29
24
  // Import other global styles
30
25
  import '@pexip/components/dist/index.css';
31
26
  ```
32
-
33
- ## Development
34
-
35
- When developing new components for this library, please run Storybook to view
36
- the components.
37
-
38
- [See the documentation here](../storybook/README.md).
39
-
40
- ### Creating new components
41
-
42
- Create new components in the `/src/components` folder and add it to the correct
43
- category.
44
- [See the documentation about the folders in Storybook](https://main--5f6dd462e70810002208a2c9.chromatic.com/?path=/story/overview-getting-started--page#development).
45
-
46
- ```
47
- src
48
- |__components
49
- |__elements
50
- |__Component
51
- |__Component.tsx
52
- |__Component.module.scss
53
- |__Component.tokens.scss
54
- |__stories
55
- |__Component.stories.tsx
56
- |__foundation
57
- |__modules
58
- ```
59
-
60
- #### Setting up a new component
61
-
62
- Create a `*.tsx` file to write the component in React/JSX format. Read about the
63
- repo's [best practices for React](../../docs/react.md).
64
-
65
- **Component.tsx**
66
-
67
- ```tsx
68
- import React from 'react';
69
-
70
- export const Button: React.FC<{text: string}> = ({text}) => (
71
- <button>{text}</button>
72
- );
73
- ```
74
-
75
- To view and test the component, create a `*.stories.tsx` file under the
76
- `stories` folder in that component's folder and it should appear in Storybook
77
- given the correct title, e.g. `Elements/Component` appears under the Elements
78
- tab.
79
-
80
- #### Styling
81
-
82
- For styling, the project uses the CSS modules. To add styling to the components,
83
- create a `*.module.scss` file to be used in the `.tsx` file, and a
84
- `*.tokens.scss` file for generating CSS variables.
85
-
86
- **Component.tokens.scss**
87
-
88
- ```scss
89
- @import '../../../../design-tokens/variables.scss';
90
-
91
- :root {
92
- // Creates a global variable --button-size
93
- @include create-token(button-size, 40px);
94
- }
95
- ```
96
-
97
- **Component.module.scss**
98
-
99
- ```scss
100
- // Relative path to the exported variables.scss
101
- @import '../../../../design-tokens/variables.scss';
102
-
103
- .button {
104
- border: 0;
105
- background: 0;
106
-
107
- // Rewritten as a CSS variable `height: var(--button-size)`
108
- height: get-token(button-size);
109
- }
110
- ```
111
-
112
- **Component.tsx**
113
-
114
- ```tsx
115
- import React from 'react';
116
-
117
- import styles from './Component.module.scss';
118
-
119
- export const Button: React.FC<{text: string}> = ({text}) => (
120
- <button
121
- /*
122
- * Property is derived from the CSS class
123
- * defined in Components.modules.scss
124
- */
125
- className={styles.button}
126
- >
127
- {text}
128
- </button>
129
- );
130
- ```
131
-
132
- ### Exporting the new component
133
-
134
- Add the newly created component in `/src/index.ts` folder so that it may be used
135
- from the library.
136
-
137
- ```ts
138
- export {Component} from './components/elements/Component/Component';
139
- ```
140
-
141
- The component should now be usable from the `@pexip/components` library.
@@ -20,6 +20,17 @@ $secondary-color-800: color-hex('deep-blue-80');
20
20
  $secondary-color-900: color-hex('deep-blue-90');
21
21
  $secondary-color-1000: color-hex('deep-blue-100');
22
22
 
23
+ $bordered-color-100: color-hex('white');
24
+ $bordered-color-200: color-hex('neutral-10');
25
+ $bordered-color-300: color-hex('neutral-20');
26
+ $bordered-color-400: color-hex('neutral-30');
27
+ $bordered-color-500: color-hex('neutral-40');
28
+ $bordered-color-600: color-hex('neutral-50');
29
+ $bordered-color-700: color-hex('neutral-60');
30
+ $bordered-color-800: color-hex('neutral-80');
31
+ $bordered-color-900: color-hex('neutral-90');
32
+ $bordered-color-1000: color-hex('neutral-100');
33
+
23
34
  $error-bg-color: color-hex('signal-red');
24
35
  $error-bg-color-hover: color-hex('signal-red-hover');
25
36
  $error-text-color: color-hex('white');