@cypress-design/react-icon 0.18.2 → 0.19.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/.gitignore CHANGED
@@ -1 +1 @@
1
- TreeShakableIcons.ts
1
+ _TreeShakableIcons.ts
@@ -0,0 +1,13 @@
1
+ $ yarn build:codegen && yarn build:module && yarn build:types
2
+ $ node ./generate-icons.js
3
+ $ rollup -c ./rollup.config.mjs
4
+ 
5
+ ./index.ts → ./dist/index.umd.js, ./dist/index.es.mjs...
6
+ (!) Mixing named and default exports
7
+ https://rollupjs.org/configuration-options/#output-exports
8
+ The following entry modules are using named and default exports together:
9
+ index.ts
10
+
11
+ Consumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
12
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 14.9s
13
+ $ tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @cypress-design/react-icon
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#167](https://github.com/cypress-io/cypress-design/pull/167) [`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251) Thanks [@elevatebart](https://github.com/elevatebart)! - add icons shape pieces of heaven (sun & moon)
8
+
9
+ - [#178](https://github.com/cypress-io/cypress-design/pull/178) [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650) Thanks [@elevatebart](https://github.com/elevatebart)! - deliver new docs and improved components
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251), [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650)]:
14
+ - @cypress-design/icon-registry@0.21.0
15
+
3
16
  ## 0.18.2
4
17
 
5
18
  ### Patch Changes
package/IconReact.cy.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
2
  import Icon, { IconObjectBookCode } from './index'
3
- import { mount } from 'cypress/react'
3
+ import { mount } from 'cypress/react18'
4
4
 
5
5
  describe('Icon', () => {
6
6
  it('renders correctly', () => {
package/ReadMe.md CHANGED
@@ -1,17 +1,29 @@
1
1
  # Icon
2
2
 
3
+ ## Install
4
+
5
+ ```bash
6
+ npm install @cypress-design/react-icon
7
+ ```
8
+
9
+ or with yarn
10
+
11
+ ```bash
12
+ yarn add @cypress-design/react-icon
13
+ ```
14
+
3
15
  ## Usage
4
16
 
5
17
  The simple way using the Icon component
6
18
 
7
- ```tsx
8
- import { Icon } from '@cypress-design/react-icon'
19
+ ```tsx live
20
+ import Icon from '@cypress-design/react-icon'
9
21
 
10
22
  export const MyButtonWithIcon = () => {
11
23
  return (
12
- <button>
24
+ <button className="flex items-center gap-[8px] p-[8px] border-1 border-red-500">
13
25
  <Icon
14
- name="book"
26
+ name="object-book"
15
27
  size="16"
16
28
  strokeColor="blue-600"
17
29
  fillColor="red-200"
@@ -25,14 +37,12 @@ export const MyButtonWithIcon = () => {
25
37
 
26
38
  The tree-shakable way (more optimized)
27
39
 
28
- ```tsx
29
- import { IconBook } from '@cypress-design/react-icon'
40
+ ```tsx live
41
+ import { IconObjectBook } from '@cypress-design/react-icon'
30
42
 
31
43
  export const MyButtonWithIcon = () => {
32
44
  return (
33
- <button>
34
- <IconBook size="16" strokeColor="indigo-600" fillColor="red-200" />
35
- </button>
45
+ <IconObjectBook size="16" strokeColor="indigo-600" fillColor="red-200" />
36
46
  )
37
47
  }
38
48
  ```
@@ -41,13 +51,13 @@ Should you need to change the color of the icon on `hover` or `focus` prefix the
41
51
 
42
52
  Here, the `strokeColor` will change on hover from indigo to jade
43
53
 
44
- ```tsx
45
- import { IconBook } from '@cypress-design/react-icon'
54
+ ```tsx live
55
+ import { IconObjectBook } from '@cypress-design/react-icon'
46
56
 
47
57
  export const MyButtonWithIcon = () => {
48
58
  return (
49
59
  <button>
50
- <IconBook
60
+ <IconObjectBook
51
61
  size="16"
52
62
  strokeColor="indigo-600"
53
63
  hoverStrokeColor="jade-600"
@@ -62,14 +72,14 @@ This prop will change all the pseudo prefixes to be group focused instead of tri
62
72
 
63
73
  To achieve the same goal, in WindiCSS, we would use `group-hover:` instead of `hover:`.
64
74
 
65
- ```tsx
66
- import { IconBook } from '@cypress-design/react-icon'
75
+ ```tsx live
76
+ import { IconObjectBook } from '@cypress-design/react-icon'
67
77
 
68
78
  export const MyButtonWithIcon = () => {
69
79
  return (
70
- <button className="group hover:text-jade-800">
71
- <IconBook
72
- size="16"
80
+ <button className="flex items-center gap-[8px] group hover:text-jade-800">
81
+ <IconObjectBook
82
+ size="48"
73
83
  strokeColor="indigo-600"
74
84
  hoverStrokeColor="jade-600"
75
85
  interactiveColorsOnGroup
@@ -79,15 +89,3 @@ export const MyButtonWithIcon = () => {
79
89
  )
80
90
  }
81
91
  ```
82
-
83
- ## install
84
-
85
- ```bash
86
- npm install @cypress-design/react-icon
87
- ```
88
-
89
- or with yarn
90
-
91
- ```bash
92
- yarn add @cypress-design/react-icon
93
- ```