@cdx-ui/icons 0.0.1-beta.133 → 0.0.1-beta.134
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/LICENSE +32 -0
- package/LICENSE-APACHE-2.0 +202 -0
- package/NOTICE +115 -0
- package/README.md +96 -13
- package/lib/commonjs/aliases/prefixed.js +2 -2
- package/lib/commonjs/aliases/suffixed.js +2 -2
- package/lib/commonjs/brand-icons/WhatsApp.js +33 -0
- package/lib/commonjs/brand-icons/createBrandIcon.js +56 -0
- package/lib/commonjs/icons/index.js +2 -2
- package/lib/module/aliases/prefixed.js +1 -1
- package/lib/module/aliases/suffixed.js +1 -1
- package/lib/module/brand-icons/WhatsApp.js +28 -0
- package/lib/module/brand-icons/createBrandIcon.js +50 -0
- package/lib/module/icons/index.js +1 -1
- package/lib/typescript/aliases/prefixed.d.ts +1 -1
- package/lib/typescript/aliases/suffixed.d.ts +1 -1
- package/lib/typescript/brand-icons/WhatsApp.d.ts +3 -0
- package/lib/typescript/brand-icons/createBrandIcon.d.ts +17 -0
- package/lib/typescript/icons/index.d.ts +1 -1
- package/lib/typescript/types.d.ts +12 -0
- package/package.json +5 -2
- package/lib/commonjs/icons/whats_app.js +0 -17
- package/lib/module/icons/whats_app.js +0 -13
- package/lib/typescript/icons/whats_app.d.ts +0 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Candescent
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
This package also incorporates and redistributes third-party material under
|
|
26
|
+
separate license and trademark terms:
|
|
27
|
+
|
|
28
|
+
- NOTICE — attribution and trademark notices
|
|
29
|
+
- LICENSE-APACHE-2.0 — full Apache License 2.0 text for Material
|
|
30
|
+
Symbols–derived icon path data
|
|
31
|
+
|
|
32
|
+
See NOTICE for the layered licensing model and WhatsApp interim status.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute
|
|
108
|
+
must include a readable copy of the attribution notices
|
|
109
|
+
contained within such NOTICE file, excluding those notices
|
|
110
|
+
that do not pertain to any part of the Derivative Works, in
|
|
111
|
+
at least one of the following places: within a NOTICE text
|
|
112
|
+
file distributed as part of the Derivative Works; within the
|
|
113
|
+
Source form or documentation, if provided along with the
|
|
114
|
+
Derivative Works; or, within a display generated by the
|
|
115
|
+
Derivative Works, if and wherever such third-party notices
|
|
116
|
+
normally appear. The contents of the NOTICE file are for
|
|
117
|
+
informational purposes only and do not modify the License.
|
|
118
|
+
You may add Your own attribution notices within Derivative
|
|
119
|
+
Works that You distribute, alongside or as an addendum to the
|
|
120
|
+
NOTICE text from the Work, provided that such additional
|
|
121
|
+
attribution notices cannot be construed as modifying the
|
|
122
|
+
License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@cdx-ui/icons — Third-Party Notices
|
|
2
|
+
====================================
|
|
3
|
+
|
|
4
|
+
This package (the factory code, build tooling, and TypeScript wrapper) is
|
|
5
|
+
licensed under the MIT License — see LICENSE.
|
|
6
|
+
|
|
7
|
+
The generated icon components in this package's published output (`lib/`)
|
|
8
|
+
include Material Symbols–derived path data and, separately, fixed-color
|
|
9
|
+
brand mark components (currently WhatsApp). Each category has distinct
|
|
10
|
+
obligations, described below.
|
|
11
|
+
|
|
12
|
+
------------------------------------------------------------------------------
|
|
13
|
+
1. Material Symbols (Apache License 2.0)
|
|
14
|
+
------------------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
The overwhelming majority of icons in this package — all themeable icons
|
|
17
|
+
generated via `createForgeIcon`, excluding the fixed-color `WhatsApp` brand
|
|
18
|
+
mark (see §2) — are derived from Material Symbols SVG source files published
|
|
19
|
+
by Google and licensed under the Apache License, Version 2.0:
|
|
20
|
+
|
|
21
|
+
https://github.com/google/material-design-icons
|
|
22
|
+
|
|
23
|
+
The path data extracted from those SVGs (coordinate-normalized and converted
|
|
24
|
+
from SVG markup to TypeScript path definitions by this package's build
|
|
25
|
+
scripts — see `scripts/generate-icons.ts`) constitutes a derivative work
|
|
26
|
+
within the meaning of the Apache License, Version 2.0.
|
|
27
|
+
|
|
28
|
+
Apache redistribution obligations that apply to this distribution:
|
|
29
|
+
|
|
30
|
+
(a) License copy — Recipients must be able to obtain a copy of the Apache
|
|
31
|
+
License 2.0. The full license text is provided in LICENSE-APACHE-2.0
|
|
32
|
+
at the package root (included in the published tarball).
|
|
33
|
+
|
|
34
|
+
(b) Changed-files notice — Modified files must carry a notice that they
|
|
35
|
+
were changed. The generated TypeScript path data in `lib/` is a
|
|
36
|
+
derivative of Google's SVG source with format conversion (SVG → path
|
|
37
|
+
data) and viewBox normalization to this package's 960×960 coordinate
|
|
38
|
+
system (see "Custom icons" in README.md). This NOTICE file serves as
|
|
39
|
+
that changed-files attribution.
|
|
40
|
+
|
|
41
|
+
Attribution in this NOTICE file for Google Material Symbols is provided as a
|
|
42
|
+
best practice. Google's upstream `material-design-icons` repository ships the
|
|
43
|
+
Apache-2.0 LICENSE text but does not include a separate NOTICE file, so
|
|
44
|
+
Apache §4(d) (propagate upstream NOTICE contents) does not strictly apply to
|
|
45
|
+
that upstream work.
|
|
46
|
+
|
|
47
|
+
Copyright Google LLC
|
|
48
|
+
|
|
49
|
+
SPDX-License-Identifier: Apache-2.0
|
|
50
|
+
|
|
51
|
+
A full copy of the Apache License, Version 2.0 is in LICENSE-APACHE-2.0.
|
|
52
|
+
|
|
53
|
+
This package's MIT license (see LICENSE) governs the Candescent-authored
|
|
54
|
+
wrapper code, factory functions, and TypeScript types. It does not relicense
|
|
55
|
+
the Material Symbols-derived path data, which remains subject to the Apache
|
|
56
|
+
License, Version 2.0.
|
|
57
|
+
|
|
58
|
+
------------------------------------------------------------------------------
|
|
59
|
+
2. Brand marks (third-party trademarks)
|
|
60
|
+
------------------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
Brand marks (logos of third-party services, e.g. WhatsApp) are handled
|
|
63
|
+
separately from Material Symbols. Two independent questions apply to every
|
|
64
|
+
brand mark shipped in this package:
|
|
65
|
+
|
|
66
|
+
(a) Theming — decided, permanent. No brand mark is exposed through the
|
|
67
|
+
themeable `createForgeIcon` API. Each ships as a fixed-color,
|
|
68
|
+
non-themeable component from `src/brand-icons/` and does not accept a
|
|
69
|
+
`color` or `filled` prop. See
|
|
70
|
+
docs/internal/research/brand-icons-direction-summary.md for the
|
|
71
|
+
decision record.
|
|
72
|
+
|
|
73
|
+
(b) Redistribution — case-by-case. Whether a given mark may ship in this
|
|
74
|
+
package at all, and under what conditions, is governed by that brand's
|
|
75
|
+
own trademark/brand guidelines and is evaluated per mark below. Formal
|
|
76
|
+
Legal review is sought when a mark's intended use is ambiguous under
|
|
77
|
+
that brand's guidelines; it is not required for every mark by default.
|
|
78
|
+
|
|
79
|
+
WhatsApp
|
|
80
|
+
--------
|
|
81
|
+
|
|
82
|
+
The `WhatsApp` icon (source: `icons/custom/whats_app.svg`; exported as
|
|
83
|
+
`WhatsApp`, `WhatsAppIcon`, `CdxWhatsApp`) is a vector reproduction of the
|
|
84
|
+
WhatsApp brand mark. "WhatsApp" and the WhatsApp logo are trademarks of
|
|
85
|
+
WhatsApp LLC / Meta Platforms, Inc. and are not licensed under MIT, Apache
|
|
86
|
+
2.0, or any other open-source license.
|
|
87
|
+
|
|
88
|
+
The team confirmed that formal Legal review is not required to redistribute
|
|
89
|
+
this mark for its intended use (see PR #368): the mark ships fixed-color and
|
|
90
|
+
unmodified (per (a) above — `src/brand-icons/WhatsApp.tsx`, no `color` or
|
|
91
|
+
`filled` prop) and is included solely so that consuming applications can
|
|
92
|
+
render a recognizable "share to WhatsApp" / "contact via WhatsApp"
|
|
93
|
+
affordance. This determination does not extend to uses outside that scope —
|
|
94
|
+
see the guidance below.
|
|
95
|
+
|
|
96
|
+
Inclusion of this mark in this package:
|
|
97
|
+
|
|
98
|
+
- does not grant any trademark rights or license to the mark itself,
|
|
99
|
+
- does not imply sponsorship, endorsement, or affiliation with WhatsApp LLC
|
|
100
|
+
or Meta Platforms, Inc., and
|
|
101
|
+
- is subject to WhatsApp's brand guidelines: https://www.whatsapp.com/brand
|
|
102
|
+
|
|
103
|
+
Consumers who redistribute or repurpose this icon outside the context of
|
|
104
|
+
identifying the WhatsApp service should independently confirm their use
|
|
105
|
+
complies with WhatsApp's brand guidelines.
|
|
106
|
+
|
|
107
|
+
Any additional brand mark added to this package in the future (e.g. YouTube,
|
|
108
|
+
LinkedIn) follows the same pattern: fixed-color per (a) above, plus its own
|
|
109
|
+
redistribution determination and NOTICE entry per (b) before it ships.
|
|
110
|
+
|
|
111
|
+
Planned removal: `WhatsApp` and the brand-icons carve-out described in this
|
|
112
|
+
section are scheduled for removal from `@cdx-ui/icons` in a future announced
|
|
113
|
+
release — see docs/internal/research/brand-icons-direction-summary.md for the
|
|
114
|
+
rationale and status. This NOTICE will be simplified to Material Symbols
|
|
115
|
+
(Apache-2.0) only once that removal lands.
|
package/README.md
CHANGED
|
@@ -158,12 +158,22 @@ Place custom SVGs in `icons/custom/`. The generation script reads from both `ico
|
|
|
158
158
|
`<path>` nested inside a `<g>` is dropped. Flatten any group (and bake its transform into the
|
|
159
159
|
path `d`) before committing.
|
|
160
160
|
|
|
161
|
+
> **Brand marks are excluded from the themeable API.** `WhatsApp` (and any future brand mark —
|
|
162
|
+
> YouTube, LinkedIn, …) is **not** generated via `createForgeIcon`. It ships as a fixed-color
|
|
163
|
+
> component from `src/brand-icons/` — no `color` or `filled` props, ever. This matches how
|
|
164
|
+
> [Lucide](https://lucide.dev/), [Material Design Icons](https://pictogrammers.com/library/mdi/),
|
|
165
|
+
> and [Feather](https://feathericons.com/) all removed brand logos from their core icon sets and
|
|
166
|
+
> point users to [Simple Icons](https://simpleicons.org/) instead. See
|
|
167
|
+
> [Brand logos](#brand-logos) below, the decision record
|
|
168
|
+
> ([`docs/internal/research/brand-icons-direction-summary.md`](../../docs/internal/research/brand-icons-direction-summary.md)),
|
|
169
|
+
> and [License](#license).
|
|
170
|
+
|
|
161
171
|
To convert a 24px brand/Figma export into the 960 grid, apply the affine transform
|
|
162
172
|
`x' = 40·x`, `y' = 40·y − 960` (uniform scale ×40, then translate y by −960) to the path data —
|
|
163
173
|
e.g. with [`svgpath`](https://www.npmjs.com/package/svgpath):
|
|
164
174
|
`svgpath(d).scale(40).translate(0, -960).round(2).toString()`. See `icons/custom/whats_app.svg`
|
|
165
|
-
for a normalized reference.
|
|
166
|
-
`fill`
|
|
175
|
+
for a normalized reference. Themeable custom icons render monochrome via `currentColor` (the `color`
|
|
176
|
+
prop overrides any source `fill`). Brand marks routed through `src/brand-icons/` keep fixed colors.
|
|
167
177
|
|
|
168
178
|
### Brand logos
|
|
169
179
|
|
|
@@ -184,6 +194,25 @@ cross-referencing Figma components against local files, so the mapping resolves
|
|
|
184
194
|
Material Symbols that genuinely start with `Logo` (e.g. `logo_dev`) match by exact name first
|
|
185
195
|
and are unaffected.
|
|
186
196
|
|
|
197
|
+
**Brand marks never go through `createForgeIcon`.** Per the
|
|
198
|
+
[direction summary](../../docs/internal/research/brand-icons-direction-summary.md), no brand icon
|
|
199
|
+
is themeable — trademark and brand-guideline restrictions (WhatsApp's especially prohibit
|
|
200
|
+
recoloring or modifying the mark) apply regardless of license. Adding a new brand mark:
|
|
201
|
+
|
|
202
|
+
1. Add the SVG to `icons/custom/` following the table above (960-grid coordinates, flattened
|
|
203
|
+
`<path>` elements, brand fill baked in).
|
|
204
|
+
2. Author a fixed-color module in `src/brand-icons/<PascalName>.tsx` using `createBrandIcon` (see
|
|
205
|
+
`src/brand-icons/WhatsApp.tsx` for the pattern) — the brand color is hardcoded in the SVG path
|
|
206
|
+
`fill`, never `currentColor`.
|
|
207
|
+
3. Register the base name in `brand-icons.config.json`. The generation script fails the build if a
|
|
208
|
+
registered entry has no matching SVG or hand-authored module, so the registry can't drift from
|
|
209
|
+
the actual files.
|
|
210
|
+
|
|
211
|
+
Registered brand icons are excluded from `createForgeIcon` and barrel-exported from their
|
|
212
|
+
hand-authored module instead — their generated export (`WhatsApp`, `WhatsAppIcon`, `CdxWhatsApp`,
|
|
213
|
+
etc.) has the same three naming conventions as any other icon, but the underlying component type is
|
|
214
|
+
`BrandIcon`/`BrandIconProps` (no `color`, no `filled`), not `ForgeIcon`/`ForgeIconProps`.
|
|
215
|
+
|
|
187
216
|
## Development
|
|
188
217
|
|
|
189
218
|
### Downloading Material Symbols SVGs
|
|
@@ -236,21 +265,17 @@ To add an icon to the curated set, add its base name to `tab-icons.config.json`
|
|
|
236
265
|
|
|
237
266
|
The generation script also emits a **registry module** that provides programmatic access to the curated tab icon set. All three exports are available from the `@cdx-ui/icons/tab-icons` subpath:
|
|
238
267
|
|
|
239
|
-
| Export
|
|
240
|
-
|
|
|
241
|
-
| `TAB_ICON_NAMES`
|
|
242
|
-
| `TabIconName`
|
|
243
|
-
| `TAB_ICON_COMPONENTS
|
|
268
|
+
| Export | Type | Description |
|
|
269
|
+
| --------------------- | --------------------------------- | ------------------------------------------------------------------------------ |
|
|
270
|
+
| `TAB_ICON_NAMES` | `readonly string[]` (const tuple) | Sorted array of all snake_case icon names from the config |
|
|
271
|
+
| `TabIconName` | union type | String literal union derived from the tuple (e.g. `'home' \| 'settings' \| …`) |
|
|
272
|
+
| `TAB_ICON_COMPONENTS` | `Record<TabIconName, ForgeIcon>` | Maps each name to its SVG icon component |
|
|
244
273
|
|
|
245
274
|
```tsx
|
|
246
|
-
import {
|
|
247
|
-
TAB_ICON_NAMES,
|
|
248
|
-
TAB_ICON_COMPONENTS,
|
|
249
|
-
type TabIconName,
|
|
250
|
-
} from '@cdx-ui/icons/tab-icons';
|
|
275
|
+
import { TAB_ICON_NAMES, TAB_ICON_COMPONENTS, type TabIconName } from '@cdx-ui/icons/tab-icons';
|
|
251
276
|
|
|
252
277
|
// Iterate available names
|
|
253
|
-
TAB_ICON_NAMES.forEach(name => console.log(name));
|
|
278
|
+
TAB_ICON_NAMES.forEach((name) => console.log(name));
|
|
254
279
|
|
|
255
280
|
// Look up a component by name
|
|
256
281
|
const Icon = TAB_ICON_COMPONENTS['home'];
|
|
@@ -316,3 +341,61 @@ The package follows the patterns established by [lucide-react-native](https://gi
|
|
|
316
341
|
- **OTA compatibility** — `childDefaultAttributes` explicitly sets `fill` on every child SVG element, working around an inheritance bug in CodePush/expo-updates.
|
|
317
342
|
|
|
318
343
|
For the full research and design rationale, see [docs/internal/research/lucide-react-native/](../../docs/internal/research/lucide-react-native/README.md).
|
|
344
|
+
|
|
345
|
+
## License
|
|
346
|
+
|
|
347
|
+
[](./LICENSE)
|
|
348
|
+
|
|
349
|
+
`@cdx-ui/icons` bundles three distinct categories of content. No single SPDX identifier
|
|
350
|
+
represents all of them — see `package.json` (`"license": "SEE LICENSE IN LICENSE"`) and the
|
|
351
|
+
files below.
|
|
352
|
+
|
|
353
|
+
| Layer | What ships | License / terms |
|
|
354
|
+
| ------------------------------ | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
355
|
+
| Wrapper code | `createForgeIcon`, `createBrandIcon`, scripts, types, build tooling | **MIT** — [LICENSE](./LICENSE) (`© 2026 Candescent`) |
|
|
356
|
+
| Icon path data (~3,800 icons) | Generated TypeScript path data in `lib/` from Google Material Symbols | **Apache-2.0** derivative — full text in [LICENSE-APACHE-2.0](./LICENSE-APACHE-2.0); attribution in [NOTICE](./NOTICE) |
|
|
357
|
+
| `WhatsApp` brand mark (1 icon) | Fixed-color component in `lib/` (not themeable, by permanent policy) | **Trademark** — see [Brand marks](#brand-marks-trademark-not-open-source-licensed) below |
|
|
358
|
+
|
|
359
|
+
### Material Symbols (Apache-2.0)
|
|
360
|
+
|
|
361
|
+
Google licenses [Material Symbols](https://github.com/google/material-design-icons) under the
|
|
362
|
+
Apache License 2.0. Path data generated from those SVGs is a derivative work distributed in
|
|
363
|
+
`lib/`. Redistribution obligations:
|
|
364
|
+
|
|
365
|
+
- **§4(a)** — recipients must be able to obtain a copy of the Apache-2.0 license ([LICENSE-APACHE-2.0](./LICENSE-APACHE-2.0))
|
|
366
|
+
- **§4(b)** — modified files must carry a changed-files notice ([NOTICE](./NOTICE) §1)
|
|
367
|
+
|
|
368
|
+
Google's upstream repo does not ship a separate NOTICE file, so Apache §4(d) does not strictly
|
|
369
|
+
apply; attribution in NOTICE is provided as best practice.
|
|
370
|
+
|
|
371
|
+
### Brand marks (trademark, not open-source licensed)
|
|
372
|
+
|
|
373
|
+
Brand marks like `WhatsApp` are third-party trademarks (e.g. WhatsApp LLC / Meta Platforms, Inc.)
|
|
374
|
+
— not open-source licensed. Two independent questions apply to any brand mark:
|
|
375
|
+
|
|
376
|
+
1. **Theming — decided, permanent.** No brand mark is themeable: it ships as a **fixed-color,
|
|
377
|
+
non-themeable** component (`src/brand-icons/`), excluded from the `createForgeIcon` API — no
|
|
378
|
+
`color` or `filled` props, ever. See the
|
|
379
|
+
[direction summary](../../docs/internal/research/brand-icons-direction-summary.md).
|
|
380
|
+
2. **Redistribution — case-by-case.** Whether a given mark may ship in `@cdx-ui/icons` at all
|
|
381
|
+
depends on that brand's own guidelines. For `WhatsApp`, the team confirmed that formal Legal
|
|
382
|
+
review is not required to redistribute the mark for its intended use (fixed-color, unmodified,
|
|
383
|
+
used solely to identify the WhatsApp service — see [NOTICE](./NOTICE) §2 and
|
|
384
|
+
[PR #368](https://github.com/dfh-candescent-ui/ui-component-framework/pull/368)), subject to
|
|
385
|
+
[WhatsApp Brand Resources](https://www.whatsapp.com/brand).
|
|
386
|
+
|
|
387
|
+
`WhatsApp` and this brand-marks carve-out are scheduled for removal from `@cdx-ui/icons` in a
|
|
388
|
+
future announced release — see the
|
|
389
|
+
[direction summary](../../docs/internal/research/brand-icons-direction-summary.md) for status.
|
|
390
|
+
|
|
391
|
+
Do not add further brand marks without going through the same redistribution determination and an
|
|
392
|
+
updated NOTICE entry for that mark — Legal review may still be warranted where a brand's
|
|
393
|
+
guidelines are ambiguous or the intended use goes beyond service identification.
|
|
394
|
+
|
|
395
|
+
### Package files
|
|
396
|
+
|
|
397
|
+
| File | Purpose |
|
|
398
|
+
| ------------------------------------------ | -------------------------------------------------------------------- |
|
|
399
|
+
| [LICENSE](./LICENSE) | MIT license for Candescent-authored wrapper code |
|
|
400
|
+
| [LICENSE-APACHE-2.0](./LICENSE-APACHE-2.0) | Full Apache-2.0 text for Material Symbols–derived path data |
|
|
401
|
+
| [NOTICE](./NOTICE) | Layered attribution, changed-files notice, per-mark trademark status |
|
|
@@ -22980,7 +22980,7 @@ Object.defineProperty(exports, "CdxWest", {
|
|
|
22980
22980
|
Object.defineProperty(exports, "CdxWhatsApp", {
|
|
22981
22981
|
enumerable: true,
|
|
22982
22982
|
get: function () {
|
|
22983
|
-
return
|
|
22983
|
+
return _WhatsApp.default;
|
|
22984
22984
|
}
|
|
22985
22985
|
});
|
|
22986
22986
|
Object.defineProperty(exports, "CdxWhatshot", {
|
|
@@ -27229,7 +27229,7 @@ var _webhook = _interopRequireDefault(require("../icons/webhook"));
|
|
|
27229
27229
|
var _weekend = _interopRequireDefault(require("../icons/weekend"));
|
|
27230
27230
|
var _weight = _interopRequireDefault(require("../icons/weight"));
|
|
27231
27231
|
var _west = _interopRequireDefault(require("../icons/west"));
|
|
27232
|
-
var
|
|
27232
|
+
var _WhatsApp = _interopRequireDefault(require("../brand-icons/WhatsApp"));
|
|
27233
27233
|
var _whatshot = _interopRequireDefault(require("../icons/whatshot"));
|
|
27234
27234
|
var _wheat = _interopRequireDefault(require("../icons/wheat"));
|
|
27235
27235
|
var _wheelchair_pickup = _interopRequireDefault(require("../icons/wheelchair_pickup"));
|
|
@@ -22578,7 +22578,7 @@ Object.defineProperty(exports, "WestIcon", {
|
|
|
22578
22578
|
Object.defineProperty(exports, "WhatsAppIcon", {
|
|
22579
22579
|
enumerable: true,
|
|
22580
22580
|
get: function () {
|
|
22581
|
-
return
|
|
22581
|
+
return _WhatsApp.default;
|
|
22582
22582
|
}
|
|
22583
22583
|
});
|
|
22584
22584
|
Object.defineProperty(exports, "WhatshotIcon", {
|
|
@@ -27229,7 +27229,7 @@ var _webhook = _interopRequireDefault(require("../icons/webhook"));
|
|
|
27229
27229
|
var _weekend = _interopRequireDefault(require("../icons/weekend"));
|
|
27230
27230
|
var _weight = _interopRequireDefault(require("../icons/weight"));
|
|
27231
27231
|
var _west = _interopRequireDefault(require("../icons/west"));
|
|
27232
|
-
var
|
|
27232
|
+
var _WhatsApp = _interopRequireDefault(require("../brand-icons/WhatsApp"));
|
|
27233
27233
|
var _whatshot = _interopRequireDefault(require("../icons/whatshot"));
|
|
27234
27234
|
var _wheat = _interopRequireDefault(require("../icons/wheat"));
|
|
27235
27235
|
var _wheelchair_pickup = _interopRequireDefault(require("../icons/wheelchair_pickup"));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _createBrandIcon = _interopRequireDefault(require("./createBrandIcon"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
/**
|
|
10
|
+
* WhatsApp brand mark — fixed-color, non-themeable component.
|
|
11
|
+
*
|
|
12
|
+
* Do not route this mark through `createForgeIcon` or add `color` / `filled`
|
|
13
|
+
* props: brand icons are permanently excluded from the themeable API, per
|
|
14
|
+
* `docs/internal/research/brand-icons-direction-summary.md`. This is a
|
|
15
|
+
* standing rule for all brand marks, not a WhatsApp-specific carve-out.
|
|
16
|
+
*
|
|
17
|
+
* Separately: whether this mark may ship in `@cdx-ui/icons` at all was a
|
|
18
|
+
* distinct redistribution question under Meta's WhatsApp Brand Resource
|
|
19
|
+
* guidelines, independent of the no-theming rule above. The team confirmed
|
|
20
|
+
* formal Legal review is not required for this mark's current, narrow use
|
|
21
|
+
* (fixed-color, unmodified, service identification only) — see NOTICE §2
|
|
22
|
+
* and README § License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** Official WhatsApp brand green — fixed; not overridable via props. */
|
|
26
|
+
const WHATSAPP_BRAND_GREEN = '#25D366';
|
|
27
|
+
const WhatsApp = (0, _createBrandIcon.default)('WhatsApp', {
|
|
28
|
+
paths: [['path', {
|
|
29
|
+
d: 'M670 -401.6C680 -396.4 686.4 -393.6 688.4 -389.6C690.8 -385.2 690 -365.2 680 -342.4C672 -320 630.4 -298.4 612 -297.6C593.6 -296.8 593.2 -283.2 493.6 -326.8C394 -370.4 334 -476.8 329.2 -483.6C324.4 -490.4 290.8 -538.8 292.4 -588C294.4 -636.8 320 -660 330.4 -669.6C340 -680 350.8 -681.2 357.6 -680H376.4C382.4 -680 390.8 -682.4 398.4 -662L426 -587.2C428.4 -582 430 -576 426.4 -569.6L415.6 -553.2L400 -536.4C395.2 -531.6 389.6 -526.4 395.2 -516.4C400 -506 420 -472.8 448 -445.2C484.4 -410 516.4 -398.4 526 -393.2C535.6 -387.6 541.6 -388.4 547.6 -394.8L580 -432.4C587.6 -442.4 594 -440 603.2 -436.8L670 -401.6ZM480 -880C532.53 -880 584.54 -869.65 633.07 -849.55C681.6 -829.45 725.7 -799.99 762.84 -762.84C799.99 -725.7 829.45 -681.6 849.55 -633.07C869.65 -584.54 880 -532.53 880 -480C880 -373.91 837.86 -272.17 762.84 -197.16C687.83 -122.14 586.09 -80 480 -80C401.2 -80 328 -102.8 266 -142L80 -80L142 -266C101.42 -329.99 79.91 -404.22 80 -480C80 -586.09 122.14 -687.83 197.16 -762.84C272.17 -837.86 373.91 -880 480 -880ZM480 -800C395.13 -800 313.74 -766.29 253.73 -706.27C193.71 -646.26 160 -564.87 160 -480C160 -411.2 181.6 -347.6 218.4 -295.6L180 -180L295.6 -218.4C349.51 -180.26 413.96 -159.85 480 -160C564.87 -160 646.26 -193.72 706.28 -253.72C766.29 -313.74 800 -395.13 800 -480C800 -564.87 766.29 -646.26 706.28 -706.27C646.26 -766.29 564.87 -800 480 -800Z',
|
|
30
|
+
fill: WHATSAPP_BRAND_GREEN
|
|
31
|
+
}]]
|
|
32
|
+
});
|
|
33
|
+
var _default = exports.default = WhatsApp;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var NativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
9
|
+
var _defaultAttributes = _interopRequireDefault(require("../defaultAttributes"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
13
|
+
* Factory for third-party brand marks (WhatsApp, YouTube, LinkedIn, …), which
|
|
14
|
+
* are permanently excluded from the themeable `createForgeIcon` API — brand
|
|
15
|
+
* guidelines generally prohibit recoloring or otherwise modifying a mark. See
|
|
16
|
+
* `docs/internal/research/brand-icons-direction-summary.md` for the decision
|
|
17
|
+
* record and `brand-icons.config.json` for the registry of brand icons routed
|
|
18
|
+
* through this factory.
|
|
19
|
+
*
|
|
20
|
+
* Unlike `createForgeIcon`, this factory:
|
|
21
|
+
* - does not accept `color` or `filled` props (`BrandIconProps` omits both),
|
|
22
|
+
* - does not override per-path `fill` attributes with `currentColor`, and
|
|
23
|
+
* - renders path data exactly as authored (fixed brand colors).
|
|
24
|
+
*/
|
|
25
|
+
const createBrandIcon = (iconName, iconData) => {
|
|
26
|
+
const Component = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
27
|
+
size = 24,
|
|
28
|
+
accessibilityLabel,
|
|
29
|
+
'data-testid': dataTestId,
|
|
30
|
+
...rest
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const isInformative = !!accessibilityLabel;
|
|
33
|
+
return /*#__PURE__*/(0, _react.createElement)(NativeSvg.Svg, {
|
|
34
|
+
ref,
|
|
35
|
+
..._defaultAttributes.default,
|
|
36
|
+
width: size,
|
|
37
|
+
height: size,
|
|
38
|
+
accessible: isInformative,
|
|
39
|
+
...(isInformative && {
|
|
40
|
+
accessibilityRole: 'image',
|
|
41
|
+
accessibilityLabel
|
|
42
|
+
}),
|
|
43
|
+
'data-testid': dataTestId,
|
|
44
|
+
...rest
|
|
45
|
+
}, iconData.paths.map(([tag, attrs], index) => {
|
|
46
|
+
const upperCasedTag = tag.charAt(0).toUpperCase() + tag.slice(1);
|
|
47
|
+
return /*#__PURE__*/(0, _react.createElement)(NativeSvg[upperCasedTag], {
|
|
48
|
+
...attrs,
|
|
49
|
+
key: index
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
Component.displayName = iconName;
|
|
54
|
+
return Component;
|
|
55
|
+
};
|
|
56
|
+
var _default = exports.default = createBrandIcon;
|
|
@@ -22560,7 +22560,7 @@ Object.defineProperty(exports, "West", {
|
|
|
22560
22560
|
Object.defineProperty(exports, "WhatsApp", {
|
|
22561
22561
|
enumerable: true,
|
|
22562
22562
|
get: function () {
|
|
22563
|
-
return
|
|
22563
|
+
return _WhatsApp.default;
|
|
22564
22564
|
}
|
|
22565
22565
|
});
|
|
22566
22566
|
Object.defineProperty(exports, "Whatshot", {
|
|
@@ -27211,7 +27211,7 @@ var _webhook = _interopRequireDefault(require("./webhook"));
|
|
|
27211
27211
|
var _weekend = _interopRequireDefault(require("./weekend"));
|
|
27212
27212
|
var _weight = _interopRequireDefault(require("./weight"));
|
|
27213
27213
|
var _west = _interopRequireDefault(require("./west"));
|
|
27214
|
-
var
|
|
27214
|
+
var _WhatsApp = _interopRequireDefault(require("../brand-icons/WhatsApp"));
|
|
27215
27215
|
var _whatshot = _interopRequireDefault(require("./whatshot"));
|
|
27216
27216
|
var _wheat = _interopRequireDefault(require("./wheat"));
|
|
27217
27217
|
var _wheelchair_pickup = _interopRequireDefault(require("./wheelchair_pickup"));
|
|
@@ -3826,7 +3826,7 @@ export { default as CdxWebhook } from '../icons/webhook';
|
|
|
3826
3826
|
export { default as CdxWeekend } from '../icons/weekend';
|
|
3827
3827
|
export { default as CdxWeight } from '../icons/weight';
|
|
3828
3828
|
export { default as CdxWest } from '../icons/west';
|
|
3829
|
-
export { default as CdxWhatsApp } from '../icons/
|
|
3829
|
+
export { default as CdxWhatsApp } from '../brand-icons/WhatsApp';
|
|
3830
3830
|
export { default as CdxWhatshot } from '../icons/whatshot';
|
|
3831
3831
|
export { default as CdxWheat } from '../icons/wheat';
|
|
3832
3832
|
export { default as CdxWheelchairPickup } from '../icons/wheelchair_pickup';
|
|
@@ -3826,7 +3826,7 @@ export { default as WebhookIcon } from '../icons/webhook';
|
|
|
3826
3826
|
export { default as WeekendIcon } from '../icons/weekend';
|
|
3827
3827
|
export { default as WeightIcon } from '../icons/weight';
|
|
3828
3828
|
export { default as WestIcon } from '../icons/west';
|
|
3829
|
-
export { default as WhatsAppIcon } from '../icons/
|
|
3829
|
+
export { default as WhatsAppIcon } from '../brand-icons/WhatsApp';
|
|
3830
3830
|
export { default as WhatshotIcon } from '../icons/whatshot';
|
|
3831
3831
|
export { default as WheatIcon } from '../icons/wheat';
|
|
3832
3832
|
export { default as WheelchairPickupIcon } from '../icons/wheelchair_pickup';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WhatsApp brand mark — fixed-color, non-themeable component.
|
|
5
|
+
*
|
|
6
|
+
* Do not route this mark through `createForgeIcon` or add `color` / `filled`
|
|
7
|
+
* props: brand icons are permanently excluded from the themeable API, per
|
|
8
|
+
* `docs/internal/research/brand-icons-direction-summary.md`. This is a
|
|
9
|
+
* standing rule for all brand marks, not a WhatsApp-specific carve-out.
|
|
10
|
+
*
|
|
11
|
+
* Separately: whether this mark may ship in `@cdx-ui/icons` at all was a
|
|
12
|
+
* distinct redistribution question under Meta's WhatsApp Brand Resource
|
|
13
|
+
* guidelines, independent of the no-theming rule above. The team confirmed
|
|
14
|
+
* formal Legal review is not required for this mark's current, narrow use
|
|
15
|
+
* (fixed-color, unmodified, service identification only) — see NOTICE §2
|
|
16
|
+
* and README § License.
|
|
17
|
+
*/
|
|
18
|
+
import createBrandIcon from './createBrandIcon';
|
|
19
|
+
|
|
20
|
+
/** Official WhatsApp brand green — fixed; not overridable via props. */
|
|
21
|
+
const WHATSAPP_BRAND_GREEN = '#25D366';
|
|
22
|
+
const WhatsApp = createBrandIcon('WhatsApp', {
|
|
23
|
+
paths: [['path', {
|
|
24
|
+
d: 'M670 -401.6C680 -396.4 686.4 -393.6 688.4 -389.6C690.8 -385.2 690 -365.2 680 -342.4C672 -320 630.4 -298.4 612 -297.6C593.6 -296.8 593.2 -283.2 493.6 -326.8C394 -370.4 334 -476.8 329.2 -483.6C324.4 -490.4 290.8 -538.8 292.4 -588C294.4 -636.8 320 -660 330.4 -669.6C340 -680 350.8 -681.2 357.6 -680H376.4C382.4 -680 390.8 -682.4 398.4 -662L426 -587.2C428.4 -582 430 -576 426.4 -569.6L415.6 -553.2L400 -536.4C395.2 -531.6 389.6 -526.4 395.2 -516.4C400 -506 420 -472.8 448 -445.2C484.4 -410 516.4 -398.4 526 -393.2C535.6 -387.6 541.6 -388.4 547.6 -394.8L580 -432.4C587.6 -442.4 594 -440 603.2 -436.8L670 -401.6ZM480 -880C532.53 -880 584.54 -869.65 633.07 -849.55C681.6 -829.45 725.7 -799.99 762.84 -762.84C799.99 -725.7 829.45 -681.6 849.55 -633.07C869.65 -584.54 880 -532.53 880 -480C880 -373.91 837.86 -272.17 762.84 -197.16C687.83 -122.14 586.09 -80 480 -80C401.2 -80 328 -102.8 266 -142L80 -80L142 -266C101.42 -329.99 79.91 -404.22 80 -480C80 -586.09 122.14 -687.83 197.16 -762.84C272.17 -837.86 373.91 -880 480 -880ZM480 -800C395.13 -800 313.74 -766.29 253.73 -706.27C193.71 -646.26 160 -564.87 160 -480C160 -411.2 181.6 -347.6 218.4 -295.6L180 -180L295.6 -218.4C349.51 -180.26 413.96 -159.85 480 -160C564.87 -160 646.26 -193.72 706.28 -253.72C766.29 -313.74 800 -395.13 800 -480C800 -564.87 766.29 -646.26 706.28 -706.27C646.26 -766.29 564.87 -800 480 -800Z',
|
|
25
|
+
fill: WHATSAPP_BRAND_GREEN
|
|
26
|
+
}]]
|
|
27
|
+
});
|
|
28
|
+
export default WhatsApp;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, createElement } from 'react';
|
|
4
|
+
import * as NativeSvg from 'react-native-svg';
|
|
5
|
+
import defaultAttributes from '../defaultAttributes';
|
|
6
|
+
/**
|
|
7
|
+
* Factory for third-party brand marks (WhatsApp, YouTube, LinkedIn, …), which
|
|
8
|
+
* are permanently excluded from the themeable `createForgeIcon` API — brand
|
|
9
|
+
* guidelines generally prohibit recoloring or otherwise modifying a mark. See
|
|
10
|
+
* `docs/internal/research/brand-icons-direction-summary.md` for the decision
|
|
11
|
+
* record and `brand-icons.config.json` for the registry of brand icons routed
|
|
12
|
+
* through this factory.
|
|
13
|
+
*
|
|
14
|
+
* Unlike `createForgeIcon`, this factory:
|
|
15
|
+
* - does not accept `color` or `filled` props (`BrandIconProps` omits both),
|
|
16
|
+
* - does not override per-path `fill` attributes with `currentColor`, and
|
|
17
|
+
* - renders path data exactly as authored (fixed brand colors).
|
|
18
|
+
*/
|
|
19
|
+
const createBrandIcon = (iconName, iconData) => {
|
|
20
|
+
const Component = /*#__PURE__*/forwardRef(({
|
|
21
|
+
size = 24,
|
|
22
|
+
accessibilityLabel,
|
|
23
|
+
'data-testid': dataTestId,
|
|
24
|
+
...rest
|
|
25
|
+
}, ref) => {
|
|
26
|
+
const isInformative = !!accessibilityLabel;
|
|
27
|
+
return /*#__PURE__*/createElement(NativeSvg.Svg, {
|
|
28
|
+
ref,
|
|
29
|
+
...defaultAttributes,
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
accessible: isInformative,
|
|
33
|
+
...(isInformative && {
|
|
34
|
+
accessibilityRole: 'image',
|
|
35
|
+
accessibilityLabel
|
|
36
|
+
}),
|
|
37
|
+
'data-testid': dataTestId,
|
|
38
|
+
...rest
|
|
39
|
+
}, iconData.paths.map(([tag, attrs], index) => {
|
|
40
|
+
const upperCasedTag = tag.charAt(0).toUpperCase() + tag.slice(1);
|
|
41
|
+
return /*#__PURE__*/createElement(NativeSvg[upperCasedTag], {
|
|
42
|
+
...attrs,
|
|
43
|
+
key: index
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
Component.displayName = iconName;
|
|
48
|
+
return Component;
|
|
49
|
+
};
|
|
50
|
+
export default createBrandIcon;
|
|
@@ -3826,7 +3826,7 @@ export { default as Webhook } from './webhook';
|
|
|
3826
3826
|
export { default as Weekend } from './weekend';
|
|
3827
3827
|
export { default as Weight } from './weight';
|
|
3828
3828
|
export { default as West } from './west';
|
|
3829
|
-
export { default as WhatsApp } from '
|
|
3829
|
+
export { default as WhatsApp } from '../brand-icons/WhatsApp';
|
|
3830
3830
|
export { default as Whatshot } from './whatshot';
|
|
3831
3831
|
export { default as Wheat } from './wheat';
|
|
3832
3832
|
export { default as WheelchairPickup } from './wheelchair_pickup';
|
|
@@ -3824,7 +3824,7 @@ export { default as CdxWebhook } from '../icons/webhook';
|
|
|
3824
3824
|
export { default as CdxWeekend } from '../icons/weekend';
|
|
3825
3825
|
export { default as CdxWeight } from '../icons/weight';
|
|
3826
3826
|
export { default as CdxWest } from '../icons/west';
|
|
3827
|
-
export { default as CdxWhatsApp } from '../icons/
|
|
3827
|
+
export { default as CdxWhatsApp } from '../brand-icons/WhatsApp';
|
|
3828
3828
|
export { default as CdxWhatshot } from '../icons/whatshot';
|
|
3829
3829
|
export { default as CdxWheat } from '../icons/wheat';
|
|
3830
3830
|
export { default as CdxWheelchairPickup } from '../icons/wheelchair_pickup';
|
|
@@ -3824,7 +3824,7 @@ export { default as WebhookIcon } from '../icons/webhook';
|
|
|
3824
3824
|
export { default as WeekendIcon } from '../icons/weekend';
|
|
3825
3825
|
export { default as WeightIcon } from '../icons/weight';
|
|
3826
3826
|
export { default as WestIcon } from '../icons/west';
|
|
3827
|
-
export { default as WhatsAppIcon } from '../icons/
|
|
3827
|
+
export { default as WhatsAppIcon } from '../brand-icons/WhatsApp';
|
|
3828
3828
|
export { default as WhatshotIcon } from '../icons/whatshot';
|
|
3829
3829
|
export { default as WheatIcon } from '../icons/wheat';
|
|
3830
3830
|
export { default as WheelchairPickupIcon } from '../icons/wheelchair_pickup';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BrandIconData, BrandIcon } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Factory for third-party brand marks (WhatsApp, YouTube, LinkedIn, …), which
|
|
4
|
+
* are permanently excluded from the themeable `createForgeIcon` API — brand
|
|
5
|
+
* guidelines generally prohibit recoloring or otherwise modifying a mark. See
|
|
6
|
+
* `docs/internal/research/brand-icons-direction-summary.md` for the decision
|
|
7
|
+
* record and `brand-icons.config.json` for the registry of brand icons routed
|
|
8
|
+
* through this factory.
|
|
9
|
+
*
|
|
10
|
+
* Unlike `createForgeIcon`, this factory:
|
|
11
|
+
* - does not accept `color` or `filled` props (`BrandIconProps` omits both),
|
|
12
|
+
* - does not override per-path `fill` attributes with `currentColor`, and
|
|
13
|
+
* - renders path data exactly as authored (fixed brand colors).
|
|
14
|
+
*/
|
|
15
|
+
declare const createBrandIcon: (iconName: string, iconData: BrandIconData) => BrandIcon;
|
|
16
|
+
export default createBrandIcon;
|
|
17
|
+
//# sourceMappingURL=createBrandIcon.d.ts.map
|
|
@@ -3824,7 +3824,7 @@ export { default as Webhook } from './webhook';
|
|
|
3824
3824
|
export { default as Weekend } from './weekend';
|
|
3825
3825
|
export { default as Weight } from './weight';
|
|
3826
3826
|
export { default as West } from './west';
|
|
3827
|
-
export { default as WhatsApp } from '
|
|
3827
|
+
export { default as WhatsApp } from '../brand-icons/WhatsApp';
|
|
3828
3828
|
export { default as Whatshot } from './whatshot';
|
|
3829
3829
|
export { default as Wheat } from './wheat';
|
|
3830
3830
|
export { default as WheelchairPickup } from './wheelchair_pickup';
|
|
@@ -19,6 +19,18 @@ export interface ForgeIconProps extends SvgProps {
|
|
|
19
19
|
'data-testid'?: string;
|
|
20
20
|
}
|
|
21
21
|
export type ForgeIcon = ForwardRefExoticComponent<ForgeIconProps>;
|
|
22
|
+
export interface BrandIconData {
|
|
23
|
+
/** Path elements with fixed `fill` (or other) attributes — not themeable. */
|
|
24
|
+
paths: IconNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for fixed-color brand marks (WhatsApp, YouTube, LinkedIn, …) — no
|
|
28
|
+
* `color` or `filled`. Brand marks are permanently excluded from the
|
|
29
|
+
* themeable API; see `docs/internal/research/brand-icons-direction-summary.md`.
|
|
30
|
+
*/
|
|
31
|
+
export interface BrandIconProps extends Omit<ForgeIconProps, 'color' | 'filled'> {
|
|
32
|
+
}
|
|
33
|
+
export type BrandIcon = ForwardRefExoticComponent<BrandIconProps>;
|
|
22
34
|
/** @deprecated Use `ForgeIconProps` instead. */
|
|
23
35
|
export type CdxIconProps = ForgeIconProps;
|
|
24
36
|
/** @deprecated Use `ForgeIcon` instead. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/icons",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.134",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
4
5
|
"main": "lib/commonjs/index.js",
|
|
5
6
|
"module": "lib/module/index.js",
|
|
6
7
|
"react-native": "lib/module/index.js",
|
|
@@ -25,7 +26,9 @@
|
|
|
25
26
|
},
|
|
26
27
|
"files": [
|
|
27
28
|
"lib",
|
|
28
|
-
"!lib/**/*.map"
|
|
29
|
+
"!lib/**/*.map",
|
|
30
|
+
"NOTICE",
|
|
31
|
+
"LICENSE-APACHE-2.0"
|
|
29
32
|
],
|
|
30
33
|
"react-native-builder-bob": {
|
|
31
34
|
"source": "src",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _createForgeIcon = _interopRequireDefault(require("../createForgeIcon"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
/**
|
|
10
|
-
* @preview 
|
|
11
|
-
*/
|
|
12
|
-
const WhatsApp = (0, _createForgeIcon.default)('WhatsApp', {
|
|
13
|
-
outlined: [["path", {
|
|
14
|
-
"d": "M670 -401.6C680 -396.4 686.4 -393.6 688.4 -389.6C690.8 -385.2 690 -365.2 680 -342.4C672 -320 630.4 -298.4 612 -297.6C593.6 -296.8 593.2 -283.2 493.6 -326.8C394 -370.4 334 -476.8 329.2 -483.6C324.4 -490.4 290.8 -538.8 292.4 -588C294.4 -636.8 320 -660 330.4 -669.6C340 -680 350.8 -681.2 357.6 -680H376.4C382.4 -680 390.8 -682.4 398.4 -662L426 -587.2C428.4 -582 430 -576 426.4 -569.6L415.6 -553.2L400 -536.4C395.2 -531.6 389.6 -526.4 395.2 -516.4C400 -506 420 -472.8 448 -445.2C484.4 -410 516.4 -398.4 526 -393.2C535.6 -387.6 541.6 -388.4 547.6 -394.8L580 -432.4C587.6 -442.4 594 -440 603.2 -436.8L670 -401.6ZM480 -880C532.53 -880 584.54 -869.65 633.07 -849.55C681.6 -829.45 725.7 -799.99 762.84 -762.84C799.99 -725.7 829.45 -681.6 849.55 -633.07C869.65 -584.54 880 -532.53 880 -480C880 -373.91 837.86 -272.17 762.84 -197.16C687.83 -122.14 586.09 -80 480 -80C401.2 -80 328 -102.8 266 -142L80 -80L142 -266C101.42 -329.99 79.91 -404.22 80 -480C80 -586.09 122.14 -687.83 197.16 -762.84C272.17 -837.86 373.91 -880 480 -880ZM480 -800C395.13 -800 313.74 -766.29 253.73 -706.27C193.71 -646.26 160 -564.87 160 -480C160 -411.2 181.6 -347.6 218.4 -295.6L180 -180L295.6 -218.4C349.51 -180.26 413.96 -159.85 480 -160C564.87 -160 646.26 -193.72 706.28 -253.72C766.29 -313.74 800 -395.13 800 -480C800 -564.87 766.29 -646.26 706.28 -706.27C646.26 -766.29 564.87 -800 480 -800Z"
|
|
15
|
-
}]]
|
|
16
|
-
});
|
|
17
|
-
var _default = exports.default = WhatsApp;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import createForgeIcon from '../createForgeIcon';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @preview 
|
|
7
|
-
*/
|
|
8
|
-
const WhatsApp = createForgeIcon('WhatsApp', {
|
|
9
|
-
outlined: [["path", {
|
|
10
|
-
"d": "M670 -401.6C680 -396.4 686.4 -393.6 688.4 -389.6C690.8 -385.2 690 -365.2 680 -342.4C672 -320 630.4 -298.4 612 -297.6C593.6 -296.8 593.2 -283.2 493.6 -326.8C394 -370.4 334 -476.8 329.2 -483.6C324.4 -490.4 290.8 -538.8 292.4 -588C294.4 -636.8 320 -660 330.4 -669.6C340 -680 350.8 -681.2 357.6 -680H376.4C382.4 -680 390.8 -682.4 398.4 -662L426 -587.2C428.4 -582 430 -576 426.4 -569.6L415.6 -553.2L400 -536.4C395.2 -531.6 389.6 -526.4 395.2 -516.4C400 -506 420 -472.8 448 -445.2C484.4 -410 516.4 -398.4 526 -393.2C535.6 -387.6 541.6 -388.4 547.6 -394.8L580 -432.4C587.6 -442.4 594 -440 603.2 -436.8L670 -401.6ZM480 -880C532.53 -880 584.54 -869.65 633.07 -849.55C681.6 -829.45 725.7 -799.99 762.84 -762.84C799.99 -725.7 829.45 -681.6 849.55 -633.07C869.65 -584.54 880 -532.53 880 -480C880 -373.91 837.86 -272.17 762.84 -197.16C687.83 -122.14 586.09 -80 480 -80C401.2 -80 328 -102.8 266 -142L80 -80L142 -266C101.42 -329.99 79.91 -404.22 80 -480C80 -586.09 122.14 -687.83 197.16 -762.84C272.17 -837.86 373.91 -880 480 -880ZM480 -800C395.13 -800 313.74 -766.29 253.73 -706.27C193.71 -646.26 160 -564.87 160 -480C160 -411.2 181.6 -347.6 218.4 -295.6L180 -180L295.6 -218.4C349.51 -180.26 413.96 -159.85 480 -160C564.87 -160 646.26 -193.72 706.28 -253.72C766.29 -313.74 800 -395.13 800 -480C800 -564.87 766.29 -646.26 706.28 -706.27C646.26 -766.29 564.87 -800 480 -800Z"
|
|
11
|
-
}]]
|
|
12
|
-
});
|
|
13
|
-
export default WhatsApp;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @preview 
|
|
3
|
-
*/
|
|
4
|
-
declare const WhatsApp: import("..").ForgeIcon;
|
|
5
|
-
export default WhatsApp;
|
|
6
|
-
//# sourceMappingURL=whats_app.d.ts.map
|