@udixio/ui-react 1.0.1 → 1.2.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/CHANGELOG.md +26 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +1191 -1144
- package/dist/lib/components/Button.d.ts +1 -1
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/icon/icon.d.ts +8 -1
- package/dist/lib/icon/icon.d.ts.map +1 -1
- package/dist/lib/interfaces/button.interface.d.ts +8 -2
- package/dist/lib/interfaces/button.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/fab.interface.d.ts +2 -2
- package/dist/lib/interfaces/fab.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/icon-button.interface.d.ts +2 -1
- package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/navigation-rail-item.interface.d.ts +2 -1
- package/dist/lib/interfaces/navigation-rail-item.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/navigation-rail.interface.d.ts +2 -2
- package/dist/lib/interfaces/navigation-rail.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/snackbar.interface.d.ts +2 -2
- package/dist/lib/interfaces/snackbar.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/switch.interface.d.ts +3 -3
- package/dist/lib/interfaces/switch.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/tab.interface.d.ts +2 -2
- package/dist/lib/interfaces/tab.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/text-field.interface.d.ts +3 -3
- package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -1
- package/dist/lib/styles/button.style.d.ts +7 -3
- package/dist/lib/styles/button.style.d.ts.map +1 -1
- package/dist/lib/styles/fab.style.d.ts +3 -3
- package/dist/lib/styles/icon-button.style.d.ts +3 -3
- package/dist/lib/styles/navigation-rail-item.style.d.ts +1 -1
- package/dist/lib/styles/navigation-rail-item.style.d.ts.map +1 -1
- package/dist/lib/styles/navigation-rail.style.d.ts +2 -2
- package/dist/lib/styles/snackbar.style.d.ts +1 -1
- package/dist/lib/styles/switch.style.d.ts +2 -2
- package/dist/lib/styles/tab.style.d.ts +1 -1
- package/dist/lib/styles/text-field.style.d.ts +2 -2
- package/package.json +8 -8
- package/src/lib/components/Button.tsx +2 -0
- package/src/lib/icon/icon.tsx +67 -5
- package/src/lib/interfaces/button.interface.ts +9 -2
- package/src/lib/interfaces/fab.interface.ts +2 -2
- package/src/lib/interfaces/icon-button.interface.ts +2 -1
- package/src/lib/interfaces/navigation-rail-item.interface.ts +2 -1
- package/src/lib/interfaces/navigation-rail.interface.ts +3 -3
- package/src/lib/interfaces/snackbar.interface.ts +2 -2
- package/src/lib/interfaces/switch.interface.ts +3 -3
- package/src/lib/interfaces/tab.interface.ts +3 -3
- package/src/lib/interfaces/text-field.interface.ts +3 -3
- package/src/lib/styles/button.style.ts +12 -9
- package/src/lib/styles/navigation-rail-item.style.ts +13 -10
|
@@ -5,5 +5,5 @@ import { ButtonInterface } from '../interfaces';
|
|
|
5
5
|
* @status beta
|
|
6
6
|
* @category Action
|
|
7
7
|
*/
|
|
8
|
-
export declare const Button: ({ variant, disabled, icon, href, label, className, iconPosition, loading, shape, onClick, onToggle, activated, ref, size, allowShapeTransformation, transition, children, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Button: ({ variant, disabled, icon, href, label, disableTextMargins, className, iconPosition, loading, shape, onClick, onToggle, activated, ref, size, allowShapeTransformation, transition, children, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,8MAoBpB,UAAU,CAAC,eAAe,CAAC,4CA8I7B,CAAC"}
|
package/dist/lib/icon/icon.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
export type Icon = IconDefinition | SvgImport | string;
|
|
4
|
+
interface SvgImport {
|
|
5
|
+
src: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
format: string;
|
|
9
|
+
}
|
|
3
10
|
interface Props {
|
|
4
|
-
icon:
|
|
11
|
+
icon: Icon;
|
|
5
12
|
colors?: string[];
|
|
6
13
|
className?: string;
|
|
7
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/lib/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,UAAU,KAAK;IACb,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/lib/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAyFhC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
1
|
import { ActionOrLink } from '../utils';
|
|
3
2
|
import { Transition } from 'motion';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* The label is the text that is displayed on the button.
|
|
@@ -16,10 +16,16 @@ type Props = {
|
|
|
16
16
|
* Disables the button if set to true.
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Controls whether negative margins are applied to text variant buttons.
|
|
21
|
+
* When true, removes the default negative horizontal margins.
|
|
22
|
+
* Only applies to 'text' variant buttons.
|
|
23
|
+
*/
|
|
24
|
+
disableTextMargins?: boolean;
|
|
19
25
|
/**
|
|
20
26
|
* An optional icon to display in the button.
|
|
21
27
|
*/
|
|
22
|
-
icon?:
|
|
28
|
+
icon?: Icon;
|
|
23
29
|
iconPosition?: 'left' | 'right';
|
|
24
30
|
loading?: boolean;
|
|
25
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IAClD,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE;QACN,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
1
|
import { ActionOrLink } from '../utils/component';
|
|
3
2
|
import { Transition } from 'motion';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
4
|
export type FabVariant = 'surface' | 'primary' | 'secondary' | 'tertiary';
|
|
5
5
|
type Props = {
|
|
6
6
|
variant?: FabVariant;
|
|
7
7
|
label?: string;
|
|
8
8
|
children?: string;
|
|
9
|
-
icon:
|
|
9
|
+
icon: Icon;
|
|
10
10
|
size?: 'small' | 'medium' | 'large';
|
|
11
11
|
isExtended?: boolean;
|
|
12
12
|
transition?: Transition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fab.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/fab.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"fab.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/fab.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAC1E,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IAC/C,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
|
|
@@ -2,10 +2,11 @@ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
|
2
2
|
import { IconButtonVariant } from '../components/IconButton';
|
|
3
3
|
import { ActionOrLink } from '../utils/component';
|
|
4
4
|
import { Transition } from 'motion';
|
|
5
|
+
import { Icon } from '../icon';
|
|
5
6
|
type Props = {
|
|
6
7
|
label?: string;
|
|
7
8
|
children?: string;
|
|
8
|
-
icon:
|
|
9
|
+
icon: Icon;
|
|
9
10
|
size?: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
|
|
10
11
|
width?: 'default' | 'narrow' | 'wide';
|
|
11
12
|
iconSelected?: IconDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/icon-button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/icon-button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AACF,KAAK,QAAQ,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IACtD,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
|
|
@@ -2,12 +2,13 @@ import { ActionOrLink } from '../utils';
|
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { Dispatch, RefObject, SetStateAction } from 'react';
|
|
4
4
|
import { Transition } from 'motion';
|
|
5
|
+
import { Icon } from '../icon';
|
|
5
6
|
export type NavProps = {
|
|
6
7
|
selected?: boolean;
|
|
7
8
|
variant?: 'vertical' | 'horizontal';
|
|
8
9
|
label?: string;
|
|
9
10
|
children?: string;
|
|
10
|
-
icon:
|
|
11
|
+
icon: Icon;
|
|
11
12
|
iconSelected: IconDefinition;
|
|
12
13
|
selectedItem?: number | null;
|
|
13
14
|
setSelectedItem?: Dispatch<SetStateAction<number | null>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-rail-item.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/navigation-rail-item.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation-rail-item.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/navigation-rail-item.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,cAAc,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,CACf,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;QACzD,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;KACrB,KACA,IAAI,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,oBAAoB;IACpB,YAAY;IACZ,MAAM;IACN,OAAO;IACP,WAAW;CACZ,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,QAAQ,CAAC,GAAG;IACjE,MAAM,EAAE;QACN,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Dispatch, ReactNode, RefObject, SetStateAction } from 'react';
|
|
2
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
2
|
import { Transition } from 'motion';
|
|
4
3
|
import { ReactProps } from '../utils';
|
|
5
4
|
import { NavigationRailItemInterface } from './navigation-rail-item.interface';
|
|
5
|
+
import { Icon } from '../icon';
|
|
6
6
|
type MenuState = {
|
|
7
|
-
icon:
|
|
7
|
+
icon: Icon;
|
|
8
8
|
label: string;
|
|
9
9
|
};
|
|
10
10
|
export interface NavigationRailInterface {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-rail.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/navigation-rail.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"navigation-rail.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/navigation-rail.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;QAC/B,cAAc,CAAC,EAAE,CACf,IAAI,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAC5B,UAAU,CAAC,2BAA2B,CAAC,EACvC,OAAO,GAAG,MAAM,CACjB,GAAG;YACA,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;SACrB,KACA,IAAI,CAAC;QACV,QAAQ,EAAE,SAAS,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;QAC7B,IAAI,CAAC,EAAE;YACL,MAAM,EAAE,SAAS,CAAC;YAClB,MAAM,EAAE,SAAS,CAAC;SACnB,CAAC;QACF,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;QAE/C,UAAU,CAAC,EAAE,UAAU,CAAC;KACzB,CAAC;IACF,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACjC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;CAChE"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from '../icon';
|
|
2
2
|
export interface SnackbarInterface {
|
|
3
3
|
type: 'div';
|
|
4
4
|
props: {
|
|
5
5
|
duration?: number;
|
|
6
6
|
onClose?: () => void;
|
|
7
7
|
message: string;
|
|
8
|
-
closeIcon?:
|
|
8
|
+
closeIcon?: Icon;
|
|
9
9
|
};
|
|
10
10
|
states: {
|
|
11
11
|
isVisible: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/snackbar.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"snackbar.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/snackbar.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,IAAI,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/B,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CACzE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from '../icon';
|
|
2
2
|
export interface SwitchInterface {
|
|
3
3
|
type: 'div';
|
|
4
4
|
props: {
|
|
5
5
|
selected?: boolean;
|
|
6
|
-
activeIcon?:
|
|
7
|
-
inactiveIcon?:
|
|
6
|
+
activeIcon?: Icon;
|
|
7
|
+
inactiveIcon?: Icon;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
onChange?: (checked: boolean) => void;
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/switch.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"switch.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/switch.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE;QACL,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,IAAI,CAAC;QAClB,YAAY,CAAC,EAAE,IAAI,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;KACvC,CAAC;IACF,MAAM,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAChC,QAAQ,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,MAAM,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CAAC;CAC/E"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ActionOrLink } from '../utils/component';
|
|
2
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
2
|
import { TabsVariant } from './tabs.interface';
|
|
4
3
|
import { Dispatch, RefObject, SetStateAction } from 'react';
|
|
4
|
+
import { Icon } from '../icon';
|
|
5
5
|
export type TabProps = {
|
|
6
6
|
selected?: boolean;
|
|
7
7
|
variant?: TabsVariant;
|
|
8
8
|
label?: string;
|
|
9
|
-
icon?:
|
|
9
|
+
icon?: Icon;
|
|
10
10
|
selectedTab?: number | null;
|
|
11
11
|
setSelectedTab?: Dispatch<SetStateAction<number | null>>;
|
|
12
12
|
tabsId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/tab.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tab.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/tab.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,CACd,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;QACzD,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;KACrB,KACA,IAAI,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAE/E,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,GAAG;IAClD,MAAM,EAAE;QACN,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
1
|
import { default as React } from 'react';
|
|
3
2
|
import { IconButton } from '../components/IconButton';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
4
|
export type TextFieldVariant = 'filled' | 'outlined';
|
|
5
5
|
type Props = {
|
|
6
6
|
placeholder?: string;
|
|
@@ -9,8 +9,8 @@ type Props = {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
errorText?: string | null;
|
|
11
11
|
supportingText?: string;
|
|
12
|
-
trailingIcon?: React.ReactElement<typeof IconButton> |
|
|
13
|
-
leadingIcon?: React.ReactElement<typeof IconButton> |
|
|
12
|
+
trailingIcon?: React.ReactElement<typeof IconButton> | Icon;
|
|
13
|
+
leadingIcon?: React.ReactElement<typeof IconButton> | Icon;
|
|
14
14
|
onChange?: (value: string) => void;
|
|
15
15
|
showSupportingText?: boolean;
|
|
16
16
|
suffix?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/text-field.interface.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"text-field.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/text-field.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAErD,KAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IACtC,YAAY,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC,QAAQ,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,CAAC;CACrD,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE;QACR,WAAW;QACX,SAAS;QACT,OAAO;QACP,OAAO;QACP,iBAAiB;QACjB,gBAAgB;QAChB,aAAa;QACb,cAAc;QACd,QAAQ;QACR,YAAY;KACb,CAAC;CACH"}
|
|
@@ -5,6 +5,7 @@ export declare const buttonStyle: (states: (({
|
|
|
5
5
|
size: any;
|
|
6
6
|
variant: any;
|
|
7
7
|
disabled: any;
|
|
8
|
+
disableTextMargins: any;
|
|
8
9
|
icon: any;
|
|
9
10
|
iconPosition: any;
|
|
10
11
|
loading: any;
|
|
@@ -20,6 +21,7 @@ export declare const buttonStyle: (states: (({
|
|
|
20
21
|
size: any;
|
|
21
22
|
variant: any;
|
|
22
23
|
disabled: any;
|
|
24
|
+
disableTextMargins: any;
|
|
23
25
|
icon: any;
|
|
24
26
|
iconPosition: any;
|
|
25
27
|
loading: any;
|
|
@@ -35,7 +37,8 @@ export declare const buttonStyle: (states: (({
|
|
|
35
37
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
36
38
|
variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
|
|
37
39
|
disabled?: boolean;
|
|
38
|
-
|
|
40
|
+
disableTextMargins?: boolean;
|
|
41
|
+
icon?: import('..').Icon;
|
|
39
42
|
iconPosition?: "left" | "right";
|
|
40
43
|
loading?: boolean;
|
|
41
44
|
shape?: "squared" | "rounded";
|
|
@@ -51,7 +54,8 @@ export declare const buttonStyle: (states: (({
|
|
|
51
54
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
52
55
|
variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
|
|
53
56
|
disabled?: boolean;
|
|
54
|
-
|
|
57
|
+
disableTextMargins?: boolean;
|
|
58
|
+
icon?: import('..').Icon;
|
|
55
59
|
iconPosition?: "left" | "right";
|
|
56
60
|
loading?: boolean;
|
|
57
61
|
shape?: "squared" | "rounded";
|
|
@@ -65,5 +69,5 @@ export declare const buttonStyle: (states: (({
|
|
|
65
69
|
isActive: boolean;
|
|
66
70
|
} & {
|
|
67
71
|
className: string | import('..').ClassNameComponent<ButtonInterface> | undefined;
|
|
68
|
-
}) => Record<"button" | "label" | "
|
|
72
|
+
}) => Record<"button" | "label" | "icon" | "stateLayer" | "touchTarget", string>;
|
|
69
73
|
//# sourceMappingURL=button.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFA6IvB,CAAC"}
|
|
@@ -21,7 +21,7 @@ export declare const fabStyle: (states: ({
|
|
|
21
21
|
variant?: import('..').FabVariant;
|
|
22
22
|
label?: string;
|
|
23
23
|
children?: string;
|
|
24
|
-
icon: import('
|
|
24
|
+
icon: import('..').Icon;
|
|
25
25
|
size?: "small" | "medium" | "large";
|
|
26
26
|
isExtended?: boolean;
|
|
27
27
|
transition?: import('motion').Transition;
|
|
@@ -31,7 +31,7 @@ export declare const fabStyle: (states: ({
|
|
|
31
31
|
variant?: import('..').FabVariant;
|
|
32
32
|
label?: string;
|
|
33
33
|
children?: string;
|
|
34
|
-
icon: import('
|
|
34
|
+
icon: import('..').Icon;
|
|
35
35
|
size?: "small" | "medium" | "large";
|
|
36
36
|
isExtended?: boolean;
|
|
37
37
|
transition?: import('motion').Transition;
|
|
@@ -39,5 +39,5 @@ export declare const fabStyle: (states: ({
|
|
|
39
39
|
href?: never;
|
|
40
40
|
})) & {
|
|
41
41
|
className: string | import('..').ClassNameComponent<FabInterface> | undefined;
|
|
42
|
-
})) => Record<"label" | "
|
|
42
|
+
})) => Record<"label" | "icon" | "fab" | "stateLayer", string>;
|
|
43
43
|
//# sourceMappingURL=fab.style.d.ts.map
|
|
@@ -32,7 +32,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
32
32
|
}) & (({
|
|
33
33
|
label?: string;
|
|
34
34
|
children?: string;
|
|
35
|
-
icon: import('
|
|
35
|
+
icon: import('..').Icon;
|
|
36
36
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
37
37
|
width?: "default" | "narrow" | "wide";
|
|
38
38
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -48,7 +48,7 @@ export declare const iconButtonStyle: (states: (({
|
|
|
48
48
|
}) | ({
|
|
49
49
|
label?: string;
|
|
50
50
|
children?: string;
|
|
51
|
-
icon: import('
|
|
51
|
+
icon: import('..').Icon;
|
|
52
52
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
53
53
|
width?: "default" | "narrow" | "wide";
|
|
54
54
|
iconSelected?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
@@ -63,5 +63,5 @@ export declare const iconButtonStyle: (states: (({
|
|
|
63
63
|
href?: never;
|
|
64
64
|
}))) & import('..').IconButtonStates & {
|
|
65
65
|
className: string | import('..').ClassNameComponent<IconButtonInterface> | undefined;
|
|
66
|
-
}) => Record<"
|
|
66
|
+
}) => Record<"icon" | "stateLayer" | "iconButton" | "touchTarget", string>;
|
|
67
67
|
//# sourceMappingURL=icon-button.style.d.ts.map
|
|
@@ -37,5 +37,5 @@ export declare const navigationRailItemStyle: (states: (({
|
|
|
37
37
|
isSelected: boolean;
|
|
38
38
|
} & {
|
|
39
39
|
className: string | import('..').ClassNameComponent<NavigationRailItemInterface> | undefined;
|
|
40
|
-
}) => Record<"container" | "label" | "
|
|
40
|
+
}) => Record<"container" | "label" | "icon" | "stateLayer" | "navigationRailItem", string>;
|
|
41
41
|
//# sourceMappingURL=navigation-rail-item.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-rail-item.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/navigation-rail-item.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"navigation-rail-item.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/navigation-rail-item.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0FA2CjC,CAAC"}
|
|
@@ -24,11 +24,11 @@ export declare const navigationRailStyle: (states: {
|
|
|
24
24
|
alignment?: "middle" | "top";
|
|
25
25
|
menu?: {
|
|
26
26
|
closed: {
|
|
27
|
-
icon: import('
|
|
27
|
+
icon: import('..').Icon;
|
|
28
28
|
label: string;
|
|
29
29
|
};
|
|
30
30
|
opened: {
|
|
31
|
-
icon: import('
|
|
31
|
+
icon: import('..').Icon;
|
|
32
32
|
label: string;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
@@ -7,8 +7,8 @@ export declare const switchStyle: (states: {
|
|
|
7
7
|
onChange: any;
|
|
8
8
|
} & {
|
|
9
9
|
selected?: boolean;
|
|
10
|
-
activeIcon?: import('
|
|
11
|
-
inactiveIcon?: import('
|
|
10
|
+
activeIcon?: import('..').Icon;
|
|
11
|
+
inactiveIcon?: import('..').Icon;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
onChange?: (checked: boolean) => void;
|
|
14
14
|
} & {
|
|
@@ -31,5 +31,5 @@ export declare const tabStyle: (states: (({
|
|
|
31
31
|
isSelected: boolean;
|
|
32
32
|
} & {
|
|
33
33
|
className: string | import('..').ClassNameComponent<TabInterface> | undefined;
|
|
34
|
-
}) => Record<"content" | "label" | "
|
|
34
|
+
}) => Record<"content" | "label" | "icon" | "tab" | "underline" | "stateLayer", string>;
|
|
35
35
|
//# sourceMappingURL=tab.style.d.ts.map
|
|
@@ -24,8 +24,8 @@ export declare const textFieldStyle: (states: {
|
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
errorText?: string | null;
|
|
26
26
|
supportingText?: string;
|
|
27
|
-
trailingIcon?: React.ReactElement<typeof import('..').IconButton> | import('
|
|
28
|
-
leadingIcon?: React.ReactElement<typeof import('..').IconButton> | import('
|
|
27
|
+
trailingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
28
|
+
leadingIcon?: React.ReactElement<typeof import('..').IconButton> | import('..').Icon;
|
|
29
29
|
onChange?: (value: string) => void;
|
|
30
30
|
showSupportingText?: boolean;
|
|
31
31
|
suffix?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"motion": "^12.23.0",
|
|
27
27
|
"tailwind-merge": "^3.3.1",
|
|
28
28
|
"uuid": "^11.0.3",
|
|
29
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
30
|
-
"@fortawesome/free-brands-svg-icons": "^
|
|
31
|
-
"@fortawesome/free-regular-svg-icons": "^
|
|
32
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
33
|
-
"@fortawesome/react-fontawesome": "^0.
|
|
29
|
+
"@fortawesome/fontawesome-svg-core": "^7.0.0",
|
|
30
|
+
"@fortawesome/free-brands-svg-icons": "^7.0.0",
|
|
31
|
+
"@fortawesome/free-regular-svg-icons": "^7.0.0",
|
|
32
|
+
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
|
33
|
+
"@fortawesome/react-fontawesome": "^3.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"react": "^19.1.1",
|
|
37
37
|
"react-dom": "^19.1.1",
|
|
38
|
-
"@udixio/
|
|
39
|
-
"@udixio/
|
|
38
|
+
"@udixio/theme": "1.0.0",
|
|
39
|
+
"@udixio/tailwind": "1.2.1"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
@@ -17,6 +17,7 @@ export const Button = ({
|
|
|
17
17
|
icon,
|
|
18
18
|
href,
|
|
19
19
|
label,
|
|
20
|
+
disableTextMargins,
|
|
20
21
|
className,
|
|
21
22
|
iconPosition = 'left',
|
|
22
23
|
loading = false,
|
|
@@ -74,6 +75,7 @@ export const Button = ({
|
|
|
74
75
|
const styles = buttonStyle({
|
|
75
76
|
allowShapeTransformation,
|
|
76
77
|
size,
|
|
78
|
+
disableTextMargins,
|
|
77
79
|
shape,
|
|
78
80
|
href,
|
|
79
81
|
disabled,
|
package/src/lib/icon/icon.tsx
CHANGED
|
@@ -2,14 +2,78 @@ import type React from 'react';
|
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { classNames } from '../utils';
|
|
4
4
|
|
|
5
|
+
export type Icon = IconDefinition | SvgImport | string;
|
|
6
|
+
|
|
7
|
+
interface SvgImport {
|
|
8
|
+
src: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
format: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
interface Props {
|
|
6
|
-
icon:
|
|
15
|
+
icon: Icon;
|
|
7
16
|
colors?: string[];
|
|
8
17
|
className?: string;
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
export const Icon: React.FC<Props> = ({ icon, colors = [], className }) => {
|
|
12
|
-
|
|
21
|
+
// Si c'est une chaîne de caractères (SVG raw)
|
|
22
|
+
if (typeof icon === 'string') {
|
|
23
|
+
// Modifier la couleur du SVG en remplaçant les attributs fill/stroke
|
|
24
|
+
let svgContent = icon;
|
|
25
|
+
if (colors[0]) {
|
|
26
|
+
// Remplacer ou ajouter des attributs de couleur
|
|
27
|
+
svgContent = svgContent.replace(
|
|
28
|
+
/<svg([^>]*)>/,
|
|
29
|
+
`<svg$1 fill="${colors[0]}" color="${colors[0]}">`,
|
|
30
|
+
);
|
|
31
|
+
// Remplacer les paths existants pour utiliser currentColor
|
|
32
|
+
svgContent = svgContent.replace(
|
|
33
|
+
/<path([^>]*?)>/g,
|
|
34
|
+
'<path$1 fill="currentColor">',
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className={classNames(
|
|
41
|
+
'size-5 box-content inline-flex fill-current',
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
style={{ color: colors[0] || 'inherit' }}
|
|
45
|
+
dangerouslySetInnerHTML={{ __html: svgContent }}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Si c'est un objet SVG importé (cas précédent)
|
|
51
|
+
if (icon && typeof icon === 'object' && 'src' in icon) {
|
|
52
|
+
const svgImport = icon as SvgImport;
|
|
53
|
+
return (
|
|
54
|
+
<img
|
|
55
|
+
src={svgImport.src}
|
|
56
|
+
width={svgImport.width}
|
|
57
|
+
height={svgImport.height}
|
|
58
|
+
className={classNames('size-5 box-content', className)}
|
|
59
|
+
style={{
|
|
60
|
+
filter: colors[0]
|
|
61
|
+
? `brightness(0) saturate(100%) invert(1)`
|
|
62
|
+
: undefined,
|
|
63
|
+
}}
|
|
64
|
+
alt=""
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Si c'est une IconDefinition FontAwesome
|
|
71
|
+
const faIcon = icon as IconDefinition;
|
|
72
|
+
if (!faIcon?.prefix) {
|
|
73
|
+
throw new Error(`Invalid icon type: ${typeof icon}`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const { icon: iconData } = faIcon;
|
|
13
77
|
const [width, height, , , svgPathData] = iconData || [];
|
|
14
78
|
|
|
15
79
|
const getColorStyle = (colors: string[]): React.CSSProperties => {
|
|
@@ -29,9 +93,7 @@ export const Icon: React.FC<Props> = ({ icon, colors = [], className }) => {
|
|
|
29
93
|
return (
|
|
30
94
|
<svg
|
|
31
95
|
className={classNames('size-5 box-content', className)}
|
|
32
|
-
style={{
|
|
33
|
-
...getColorStyle(colors),
|
|
34
|
-
}}
|
|
96
|
+
style={{ ...getColorStyle(colors) }}
|
|
35
97
|
xmlns="http://www.w3.org/2000/svg"
|
|
36
98
|
viewBox={`0 0 ${width} ${height}`}
|
|
37
99
|
role="img"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
1
|
import { ActionOrLink } from '../utils';
|
|
3
2
|
import { Transition } from 'motion';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
6
6
|
/**
|
|
@@ -22,10 +22,17 @@ type Props = {
|
|
|
22
22
|
*/
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Controls whether negative margins are applied to text variant buttons.
|
|
27
|
+
* When true, removes the default negative horizontal margins.
|
|
28
|
+
* Only applies to 'text' variant buttons.
|
|
29
|
+
*/
|
|
30
|
+
disableTextMargins?: boolean;
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* An optional icon to display in the button.
|
|
27
34
|
*/
|
|
28
|
-
icon?:
|
|
35
|
+
icon?: Icon;
|
|
29
36
|
|
|
30
37
|
iconPosition?: 'left' | 'right';
|
|
31
38
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
1
|
import { ActionOrLink } from '../utils/component';
|
|
3
2
|
import { Transition } from 'motion';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
4
|
|
|
5
5
|
export type FabVariant = 'surface' | 'primary' | 'secondary' | 'tertiary';
|
|
6
6
|
type Props = {
|
|
7
7
|
variant?: FabVariant;
|
|
8
8
|
label?: string;
|
|
9
9
|
children?: string;
|
|
10
|
-
icon:
|
|
10
|
+
icon: Icon;
|
|
11
11
|
size?: 'small' | 'medium' | 'large';
|
|
12
12
|
isExtended?: boolean;
|
|
13
13
|
transition?: Transition;
|