@cdx-ui/components 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 +21 -0
- package/README.md +6 -0
- package/lib/commonjs/components/Icon/index.js +1 -1
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +1 -1
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts +10 -3
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/components/Icon/index.tsx +10 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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.
|
package/README.md
CHANGED
|
@@ -103,3 +103,9 @@ Production types use `tsconfig.json`; tests use `tsconfig.test.json`.
|
|
|
103
103
|
|
|
104
104
|
**A11y-only ad-hoc** (from `packages/components`):
|
|
105
105
|
`pnpm exec jest --config ../../jest.config.js --testNamePattern="a11y"`
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
[](./LICENSE)
|
|
110
|
+
|
|
111
|
+
MIT © 2026 Candescent. See [LICENSE](./LICENSE) for details.
|
|
@@ -49,7 +49,7 @@ const StyledIcon = (0, _uniwind.withUniwind)((0, _uniwind.withUniwind)(IconImpl)
|
|
|
49
49
|
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
|
-
* @param {ForgeIcon} as - The Forge icon component to render.
|
|
52
|
+
* @param {ForgeIcon | BrandIcon} as - The Forge (or brand) icon component to render.
|
|
53
53
|
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
54
54
|
* @param {number} size - Icon size (overrides the size class).
|
|
55
55
|
* @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_uniwind","require","_utils","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","Icon","className","cn"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAmC,IAAAE,WAAA,GAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_uniwind","require","_utils","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","Icon","className","cn"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAmC,IAAAE,WAAA,GAAAF,OAAA;AAenC,SAASG,QAAQA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAE,GAAGC;AAAiB,CAAC,EAAE;EAC5D,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACF,aAAa;IAAA,GAAKC;EAAK,CAAG,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,UAAU,GAAG,IAAAC,oBAAW,EAAC,IAAAA,oBAAW,EAACN,QAAQ,CAAC,EAAE;EACpDO,IAAI,EAAE;IACJC,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB,CAAC;EACDC,KAAK,EAAE;IACLF,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,IAAIA,CAAC;EAAEV,EAAE,EAAEC,aAAa;EAAEU,SAAS;EAAE,GAAGT;AAAiB,CAAC,EAAE;EAC1E,oBACE,IAAAJ,WAAA,CAAAK,GAAA,EAACC,UAAU;IACTJ,EAAE,EAAEC,aAAc;IAClBU,SAAS,EAAE,IAAAC,SAAE,EAAC,6BAA6B,EAAED,SAAS,CAAE;IAAA,GACpDT;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
|
|
@@ -45,7 +45,7 @@ const StyledIcon = withUniwind(withUniwind(IconImpl), {
|
|
|
45
45
|
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
46
46
|
* ```
|
|
47
47
|
*
|
|
48
|
-
* @param {ForgeIcon} as - The Forge icon component to render.
|
|
48
|
+
* @param {ForgeIcon | BrandIcon} as - The Forge (or brand) icon component to render.
|
|
49
49
|
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
50
50
|
* @param {number} size - Icon size (overrides the size class).
|
|
51
51
|
* @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withUniwind","cn","jsx","_jsx","IconImpl","as","IconComponent","props","StyledIcon","size","fromClassName","styleProperty","color","Icon","className"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,SAAS;AACrC,SAASC,EAAE,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["withUniwind","cn","jsx","_jsx","IconImpl","as","IconComponent","props","StyledIcon","size","fromClassName","styleProperty","color","Icon","className"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,SAAS;AACrC,SAASC,EAAE,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAenC,SAASC,QAAQA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAE,GAAGC;AAAiB,CAAC,EAAE;EAC5D,oBAAOJ,IAAA,CAACG,aAAa;IAAA,GAAKC;EAAK,CAAG,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAGR,WAAW,CAACA,WAAW,CAACI,QAAQ,CAAC,EAAE;EACpDK,IAAI,EAAE;IACJC,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB,CAAC;EACDC,KAAK,EAAE;IACLF,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,IAAIA,CAAC;EAAER,EAAE,EAAEC,aAAa;EAAEQ,SAAS;EAAE,GAAGP;AAAiB,CAAC,EAAE;EAC1E,oBACEJ,IAAA,CAACK,UAAU;IACTH,EAAE,EAAEC,aAAc;IAClBQ,SAAS,EAAEb,EAAE,CAAC,6BAA6B,EAAEa,SAAS,CAAE;IAAA,GACpDP;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import type { ForgeIcon, ForgeIconProps } from '@cdx-ui/icons';
|
|
1
|
+
import type { ForgeIcon, ForgeIconProps, BrandIcon } from '@cdx-ui/icons';
|
|
2
2
|
export type IconProps = ForgeIconProps & {
|
|
3
3
|
className?: string;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The icon component to render. Accepts `BrandIcon` components (e.g. `WhatsApp`
|
|
6
|
+
* from `@cdx-ui/icons`) in addition to themeable `ForgeIcon`s — the `size`
|
|
7
|
+
* portion of `className` still applies, but brand icons ignore `color`/`filled`
|
|
8
|
+
* (they are permanently fixed-color and non-themeable; see
|
|
9
|
+
* docs/internal/research/brand-icons-direction-summary.md).
|
|
10
|
+
*/
|
|
11
|
+
as: ForgeIcon | BrandIcon;
|
|
5
12
|
};
|
|
6
13
|
/**
|
|
7
14
|
* A wrapper component for CDX icons with Uniwind `className` support via `withUniwind`.
|
|
@@ -18,7 +25,7 @@ export type IconProps = ForgeIconProps & {
|
|
|
18
25
|
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
19
26
|
* ```
|
|
20
27
|
*
|
|
21
|
-
* @param {ForgeIcon} as - The Forge icon component to render.
|
|
28
|
+
* @param {ForgeIcon | BrandIcon} as - The Forge (or brand) icon component to render.
|
|
22
29
|
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
23
30
|
* @param {number} size - Icon size (overrides the size class).
|
|
24
31
|
* @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;CAC3B,CAAC;AAwBF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAQzE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.134",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"main": "lib/commonjs/index.js",
|
|
5
6
|
"module": "lib/module/index.js",
|
|
6
7
|
"react-native": "src/index.ts",
|
|
@@ -76,9 +77,9 @@
|
|
|
76
77
|
"class-variance-authority": "^0.7.1",
|
|
77
78
|
"react-native-reanimated-carousel": "5.0.0-beta.5",
|
|
78
79
|
"uniwind": "1.10.0",
|
|
79
|
-
"@cdx-ui/
|
|
80
|
-
"@cdx-ui/
|
|
81
|
-
"@cdx-ui/
|
|
80
|
+
"@cdx-ui/utils": "0.0.1-beta.134",
|
|
81
|
+
"@cdx-ui/icons": "0.0.1-beta.134",
|
|
82
|
+
"@cdx-ui/primitives": "0.0.1-beta.134"
|
|
82
83
|
},
|
|
83
84
|
"devDependencies": {
|
|
84
85
|
"@react-navigation/bottom-tabs": "*",
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { withUniwind } from 'uniwind';
|
|
2
2
|
import { cn } from '@cdx-ui/utils';
|
|
3
|
-
import type { ForgeIcon, ForgeIconProps } from '@cdx-ui/icons';
|
|
3
|
+
import type { ForgeIcon, ForgeIconProps, BrandIcon } from '@cdx-ui/icons';
|
|
4
4
|
|
|
5
5
|
export type IconProps = ForgeIconProps & {
|
|
6
6
|
className?: string; // TODO: Why does this need to specified manually?
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The icon component to render. Accepts `BrandIcon` components (e.g. `WhatsApp`
|
|
9
|
+
* from `@cdx-ui/icons`) in addition to themeable `ForgeIcon`s — the `size`
|
|
10
|
+
* portion of `className` still applies, but brand icons ignore `color`/`filled`
|
|
11
|
+
* (they are permanently fixed-color and non-themeable; see
|
|
12
|
+
* docs/internal/research/brand-icons-direction-summary.md).
|
|
13
|
+
*/
|
|
14
|
+
as: ForgeIcon | BrandIcon;
|
|
8
15
|
};
|
|
9
16
|
|
|
10
17
|
function IconImpl({ as: IconComponent, ...props }: IconProps) {
|
|
@@ -44,7 +51,7 @@ const StyledIcon = withUniwind(withUniwind(IconImpl), {
|
|
|
44
51
|
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
45
52
|
* ```
|
|
46
53
|
*
|
|
47
|
-
* @param {ForgeIcon} as - The Forge icon component to render.
|
|
54
|
+
* @param {ForgeIcon | BrandIcon} as - The Forge (or brand) icon component to render.
|
|
48
55
|
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
49
56
|
* @param {number} size - Icon size (overrides the size class).
|
|
50
57
|
* @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
|