groovinads-ui 1.9.94 → 1.9.96

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 CHANGED
@@ -34,6 +34,7 @@ The library includes the following components:
34
34
 
35
35
  - [Labels](#labels):
36
36
  - [Alert](#alert): For displaying alerts.
37
+ - [Card](#card): For containing and grouping related content.
37
38
  - [EditableContent](#editablecontent): For inline editing of text content.
38
39
  - [Icon](#icon): For displaying icons.
39
40
  - [LoginSource](#loginsource): For show icons of login sources.
@@ -82,6 +83,78 @@ Instead, they should be included in the `index.html` file of your project. This
82
83
 
83
84
  # Installation
84
85
 
86
+ ## 1. Configure FontAwesome Pro Access
87
+
88
+ This library requires **FontAwesome Pro** packages. Before installing, you need to configure access to the FontAwesome Pro registry.
89
+
90
+ ### For Yarn Berry (v2+) users:
91
+
92
+ Create or update `.yarnrc.yml` in your project root:
93
+
94
+ ```yaml
95
+ npmScopes:
96
+ fortawesome:
97
+ npmAlwaysAuth: true
98
+ npmRegistryServer: "https://npm.fontawesome.com/"
99
+ npmAuthToken: "YOUR_FONTAWESOME_TOKEN_HERE"
100
+ awesome.me:
101
+ npmAlwaysAuth: true
102
+ npmRegistryServer: "https://npm.fontawesome.com/"
103
+ npmAuthToken: "YOUR_FONTAWESOME_TOKEN_HERE"
104
+ ```
105
+
106
+ ### For npm and Yarn Classic (v1.x) users:
107
+
108
+ Create or update `.npmrc` in your project root:
109
+
110
+ ```
111
+ @fortawesome:registry=https://npm.fontawesome.com/
112
+ @awesome.me:registry=https://npm.fontawesome.com/
113
+ //npm.fontawesome.com/:_authToken=YOUR_FONTAWESOME_TOKEN_HERE
114
+ ```
115
+
116
+ Replace `YOUR_FONTAWESOME_TOKEN_HERE` with your FontAwesome Pro token (available at https://fontawesome.com/account).
117
+
118
+ **Note:** This library is for internal use only and requires a valid FontAwesome Pro license.
119
+
120
+ **Important:** Check your Yarn version with `yarn --version`:
121
+ - If you see `1.x.x`, use the `.npmrc` file
122
+ - If you see `2.x.x` or higher, use the `.yarnrc.yml` file
123
+
124
+ ## 2. Install Required Dependencies
125
+
126
+ This library requires several peer dependencies. Install them first:
127
+
128
+ ```bash
129
+ # For npm users
130
+ npm install @awesome.me/kit-9889deefc5@^1.0.3 \
131
+ @fortawesome/fontawesome-svg-core@^7.1.0 \
132
+ @fortawesome/free-brands-svg-icons@^7.1.0 \
133
+ @fortawesome/duotone-regular-svg-icons@^7.1.0 \
134
+ @fortawesome/pro-duotone-svg-icons@^7.1.0 \
135
+ @fortawesome/pro-regular-svg-icons@^7.1.0 \
136
+ @fortawesome/pro-solid-svg-icons@^7.1.0 \
137
+ @fortawesome/react-fontawesome@^3.1.1 \
138
+ react-datepicker@^7.3.0 \
139
+ react-loading-skeleton@^3.5.0 \
140
+ react-responsive@^10.0.0
141
+
142
+ # For Yarn users
143
+ yarn add @awesome.me/kit-9889deefc5@^1.0.3 \
144
+ @fortawesome/fontawesome-svg-core@^7.1.0 \
145
+ @fortawesome/free-brands-svg-icons@^7.1.0 \
146
+ @fortawesome/duotone-regular-svg-icons@^7.1.0 \
147
+ @fortawesome/pro-duotone-svg-icons@^7.1.0 \
148
+ @fortawesome/pro-regular-svg-icons@^7.1.0 \
149
+ @fortawesome/pro-solid-svg-icons@^7.1.0 \
150
+ @fortawesome/react-fontawesome@^3.1.1 \
151
+ react-datepicker@^7.3.0 \
152
+ react-loading-skeleton@^3.5.0 \
153
+ react-responsive@^10.0.0
154
+ ```
155
+
156
+ ## 3. Install the Library
157
+
85
158
  To use the Groovinads UI library in your project, run the following command:
86
159
 
87
160
  ```bash
@@ -965,6 +1038,48 @@ import { BlockIcon } from 'groovinads-ui';
965
1038
  | `name` | String | No | n/a | `font-awesome` | FontAwesome icon name. |
966
1039
  | `size` | String | No | `sm` `md` `lg` | `md` | Size of the block icon container. |
967
1040
 
1041
+ ### Card
1042
+
1043
+ ```jsx
1044
+ import React from 'react';
1045
+ import { Card } from 'groovinads-ui';
1046
+
1047
+ const ExampleCard = () => (
1048
+ <div>
1049
+ <Card className='p-4' depth={1} size='md'>
1050
+ <h3>Card Title</h3>
1051
+ <p>This is a simple card component that can contain any content.</p>
1052
+ </Card>
1053
+
1054
+ <Card className='mt-3 p-4' depth={2} size='lg'>
1055
+ <h4>User Profile</h4>
1056
+ <p>Name: John Doe</p>
1057
+ <p>Email: john@example.com</p>
1058
+ <button className='btn btn-primary'>Edit Profile</button>
1059
+ </Card>
1060
+
1061
+ <Card className='mt-3 p-4' depth={0} size='sm'>
1062
+ <h4>Small card without shadow</h4>
1063
+ <p>This card has no shadow depth and is small size.</p>
1064
+ </Card>
1065
+
1066
+ <Card className='mt-3 p-4' depth={3} size='full'>
1067
+ <h4>Full width card</h4>
1068
+ <p>This card takes the full width of its container.</p>
1069
+ </Card>
1070
+ </div>
1071
+ );
1072
+
1073
+ export default ExampleCard;
1074
+ ```
1075
+
1076
+ | Property | Type | Required | Options | Default | Description |
1077
+ | ----------- | ------ | -------- | ------------------------- | ------- | ---------------------------------------------------------------------------------------- |
1078
+ | `children` | Node | No | n/a | n/a | Content to be displayed inside the card. |
1079
+ | `className` | String | No | n/a | n/a | Additional CSS class names that can be applied to the card. |
1080
+ | `depth` | Number | No | `0` `1` `2` `3` `4` | `1` | Shadow depth level. Adds `.shadow-{depth}` class. Use `0` for no shadow. |
1081
+ | `size` | String | No | `sm` `md` `lg` `full` | `md` | Card size. Adds `.card-{size}` class. Use `md` for default size (no additional class). |
1082
+
968
1083
  ### EditableContent
969
1084
 
970
1085
  ```jsx