@stack-spot/citric-react 0.10.0 → 0.10.1
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.
|
@@ -39,11 +39,11 @@ export interface BaseIconBoxProps<T extends IconBoxTag, G extends IconGroup> ext
|
|
|
39
39
|
export type IconBoxProps<T extends IconBoxTag, G extends IconGroup> = Omit<HTMLTag[T], 'children'> & BaseIconBoxProps<T, G>;
|
|
40
40
|
export declare function IconBox<T extends IconBoxTag = 'i', G extends IconGroup = 'outline'>({ group, icon, tag, colorScheme, colorPalette, appearance, size, className, analytics, onClick, feedback, ...props }: IconBoxProps<T, G>): import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
/**
|
|
42
|
-
* Shortcut to
|
|
42
|
+
* Shortcut to `<IconBox tag="button" />`
|
|
43
43
|
*/
|
|
44
44
|
export declare function IconButton<G extends IconGroup = 'outline'>(props: Omit<IconBoxProps<'button', G>, 'tag'>): import("react/jsx-runtime").JSX.Element;
|
|
45
45
|
/**
|
|
46
|
-
* Shortcut to
|
|
46
|
+
* Shortcut to `<IconBox tag="a" />`
|
|
47
47
|
*/
|
|
48
48
|
export declare function IconLink<G extends IconGroup = 'outline'>(props: Omit<IconBoxProps<'a', G>, 'tag'>): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
export {};
|
|
@@ -15,13 +15,13 @@ export function IconBox({ group, icon, tag, colorScheme, colorPalette, appearanc
|
|
|
15
15
|
return _jsx(CitricComponent, { tag: (tag || 'i'), component: "icon-box", className: listToClass(['citric-icon', group || 'outline', icon, appearance, size, className]), colorScheme: colorScheme, colorPalette: colorPalette, "data-feedback": feedback || undefined, onClick: ['button', 'a'].includes(tag ?? '') ? handleClick : onClick, ...props });
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Shortcut to
|
|
18
|
+
* Shortcut to `<IconBox tag="button" />`
|
|
19
19
|
*/
|
|
20
20
|
export function IconButton(props) {
|
|
21
21
|
return IconBox({ ...props, tag: 'button', type: props.type || 'button' });
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Shortcut to
|
|
24
|
+
* Shortcut to `<IconBox tag="a" />`
|
|
25
25
|
*/
|
|
26
26
|
export function IconLink(props) {
|
|
27
27
|
return IconBox({ ...props, tag: 'a' });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WithColorPalette, WithColorScheme } from '../../types.js';
|
|
2
2
|
import { TabController } from './TabController.js';
|
|
3
|
-
export interface Tab<Key extends string> {
|
|
3
|
+
export interface Tab<Key extends string = string> {
|
|
4
4
|
/**
|
|
5
5
|
* A unique identifier for the tab.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,WAAW,GAAG,CAAC,GAAG,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,WAAW,GAAG,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IAC9C;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IACT;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS,MAAM,CAAE,SAAQ,eAAe,EAAE,gBAAgB;IAC1F;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -69,14 +69,14 @@ export function IconBox<T extends IconBoxTag = 'i', G extends IconGroup = 'outli
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Shortcut to
|
|
72
|
+
* Shortcut to `<IconBox tag="button" />`
|
|
73
73
|
*/
|
|
74
74
|
export function IconButton<G extends IconGroup = 'outline'>(props: Omit<IconBoxProps<'button', G>, 'tag'>) {
|
|
75
75
|
return IconBox({ ...props, tag: 'button', type: props.type || 'button' })
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Shortcut to
|
|
79
|
+
* Shortcut to `<IconBox tag="a" />`
|
|
80
80
|
*/
|
|
81
81
|
export function IconLink<G extends IconGroup = 'outline'>(props: Omit<IconBoxProps<'a', G>, 'tag'>) {
|
|
82
82
|
return IconBox({ ...props, tag: 'a' })
|