@equinor/eds-core-react 1.0.2 → 2.0.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/README.md +16 -1
- package/dist/eds-core-react.cjs +421 -136
- package/dist/esm/components/Accordion/Accordion.js +4 -3
- package/dist/esm/components/Autocomplete/Autocomplete.js +90 -23
- package/dist/esm/components/Autocomplete/Autocomplete.tokens.js +1 -1
- package/dist/esm/components/Button/tokens/contained.js +1 -1
- package/dist/esm/components/Button/tokens/contained_icon.js +1 -1
- package/dist/esm/components/Button/tokens/ghost.js +1 -1
- package/dist/esm/components/Button/tokens/icon.js +1 -1
- package/dist/esm/components/Button/tokens/outlined.js +1 -1
- package/dist/esm/components/Datepicker/fields/FieldWrapper.js +8 -2
- package/dist/esm/components/Icon/Icon.js +2 -3
- package/dist/esm/components/Input/Input.tokens.js +1 -1
- package/dist/esm/components/InputWrapper/InputWrapper.tokens.js +1 -1
- package/dist/esm/components/InputWrapper/useInputField.js +61 -0
- package/dist/esm/components/SideBar/SideBarAccordion/index.js +4 -3
- package/dist/esm/components/Slider/Slider.js +8 -5
- package/dist/esm/components/Table/DataCell/DataCell.tokens.js +1 -1
- package/dist/esm/components/Tabs/Tabs.js +4 -3
- package/dist/esm/components/TextField/TextField.js +23 -56
- package/dist/esm/components/Textarea/Textarea.js +64 -33
- package/dist/esm/components/Typography/Heading.js +51 -0
- package/dist/esm/components/Typography/Paragraph.js +28 -0
- package/dist/esm/components/Typography/Typography.js +15 -1
- package/dist/esm/components/Typography/Typography.new.js +67 -0
- package/dist/esm/index.js +5 -0
- package/dist/types/components/Button/tokens/contained.d.ts +3 -4
- package/dist/types/components/Button/tokens/outlined.d.ts +3 -4
- package/dist/types/components/InputWrapper/index.d.ts +3 -0
- package/dist/types/components/InputWrapper/types.d.ts +21 -0
- package/dist/types/components/InputWrapper/useInputField.d.ts +31 -0
- package/dist/types/components/TextField/TextField.d.ts +5 -25
- package/dist/types/components/Textarea/Textarea.d.ts +6 -27
- package/dist/types/components/Typography/Heading.d.ts +7 -0
- package/dist/types/components/Typography/Heading.types.d.ts +6 -0
- package/dist/types/components/Typography/Paragraph.d.ts +7 -0
- package/dist/types/components/Typography/Paragraph.types.d.ts +7 -0
- package/dist/types/components/Typography/Typography.d.ts +13 -0
- package/dist/types/components/Typography/Typography.new.d.ts +43 -0
- package/dist/types/components/Typography/Typography.new.types.d.ts +28 -0
- package/dist/types/components/Typography/Typography.stories.shared.d.ts +79 -0
- package/dist/types/components/Typography/index.d.ts +7 -0
- package/dist/types/components/Typography/types.d.ts +9 -0
- package/dist/types/components/Typography/utils.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +56 -40
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_curry1.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_curry2.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_curry3.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_has.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_isObject.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/internal/_isPlaceholder.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/mergeDeepRight.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/mergeDeepWithKey.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/mergeWith.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/mergeWithKey.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{ramda@0.31.3 → ramda@0.32.0}/node_modules/ramda/es/pickBy.js +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Read the [changelog](https://github.com/equinor/design-system/blob/main/packages
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
|
-
npm install @equinor/eds-core-react styled-components
|
|
11
|
+
npm install @equinor/eds-core-react @equinor/eds-tokens styled-components
|
|
12
12
|
```
|
|
13
13
|
If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:
|
|
14
14
|
```sh
|
|
@@ -23,6 +23,21 @@ npm install typescript --save-dev
|
|
|
23
23
|
<link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
### Required Stylesheets
|
|
27
|
+
|
|
28
|
+
EDS Core React components require css variables and foundation styles for typography and spacing. Import both stylesheets from `@equinor/eds-tokens`:
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
@import '@equinor/eds-tokens/css/variables';
|
|
32
|
+
@import '@equinor/eds-tokens/css/foundation';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Why both?**
|
|
36
|
+
- **Variables CSS** (`/css/variables`) provides all design tokens (colors, spacing, typography variables)
|
|
37
|
+
- **Foundation CSS** (`/css/foundation`) provides typography and spacing utility classes used in our components.
|
|
38
|
+
|
|
39
|
+
For more information about the typography system, see the [Typography component documentation](./src/components/Typography/README.md).
|
|
40
|
+
|
|
26
41
|
## Usage
|
|
27
42
|
|
|
28
43
|
```jsx
|