@dataesr/dsfr-plus 0.1.1 → 0.3.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/dist/components/Input/Input.d.ts +9 -7
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +15 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedElement.d.ts +17 -0
- package/dist/components/SegmentedControl/SegmentedElement.d.ts.map +1 -0
- package/dist/components/SegmentedControl/index.d.ts +3 -0
- package/dist/components/SegmentedControl/index.d.ts.map +1 -0
- package/dist/components/Tag/Tag.d.ts +3 -7
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/TagGroup.d.ts +1 -1
- package/dist/components/Tag/TagGroup.d.ts.map +1 -1
- package/dist/components/TagInput/TagInput.d.ts +11 -0
- package/dist/components/TagInput/TagInput.d.ts.map +1 -0
- package/dist/components/TagInput/index.d.ts +2 -0
- package/dist/components/TagInput/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/dsfr-plus.js +1781 -1605
- package/dist/hooks/useDSFRConfig.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { Argument } from
|
|
2
|
-
import { Merge } from
|
|
1
|
+
import { Argument } from "classnames";
|
|
2
|
+
import { Merge } from "../../types/polymophic";
|
|
3
3
|
type TextInputCss = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
"fr-label"?: Argument;
|
|
5
|
+
"fr-hint-text"?: Argument;
|
|
6
|
+
"fr-input"?: Argument;
|
|
7
|
+
"fr-input-wrap"?: Argument;
|
|
8
8
|
};
|
|
9
9
|
export type TextInputBaseProps = {
|
|
10
10
|
className?: Argument;
|
|
11
11
|
css?: TextInputCss;
|
|
12
12
|
disableAutoValidation?: boolean;
|
|
13
13
|
message?: React.ReactNode;
|
|
14
|
-
messageType?:
|
|
14
|
+
messageType?: "error" | "valid" | "" | null;
|
|
15
15
|
label?: React.ReactNode;
|
|
16
16
|
hint?: React.ReactNode;
|
|
17
17
|
icon?: string;
|
|
18
|
+
isOptional?: boolean;
|
|
19
|
+
required?: boolean;
|
|
18
20
|
};
|
|
19
21
|
export type TextInputProps = Merge<React.InputHTMLAttributes<HTMLInputElement>, TextInputBaseProps>;
|
|
20
22
|
export type TextAreaProps = Merge<React.TextareaHTMLAttributes<HTMLTextAreaElement>, TextInputBaseProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,KAAK,YAAY,GAAG;IAClB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,KAAK,YAAY,GAAG;IAClB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,KAAK,CAChC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,kBAAkB,CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,CAC/B,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,kBAAkB,CACnB,CAAC;AAEF,eAAO,MAAM,SAAS;;oDAkHrB,CAAC;AAEF,eAAO,MAAM,QAAQ;;uDAkHpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Merge } from '../../types/polymophic';
|
|
3
|
+
type SegmentedControlBaseProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
isVertical?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
legendInline?: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
onChangeValue?: (value: string) => void;
|
|
10
|
+
value?: string;
|
|
11
|
+
};
|
|
12
|
+
export type SegmentedControlProps = Merge<React.HTMLAttributes<HTMLFieldSetElement>, SegmentedControlBaseProps>;
|
|
13
|
+
export declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAGrC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAG/C,KAAK,yBAAyB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAEhH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqD5D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Argument } from 'classnames';
|
|
2
|
+
import { Merge } from '../../types/polymophic';
|
|
3
|
+
type SegmentedElementBaseProps = {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
className?: Argument;
|
|
6
|
+
icon?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
label: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
export type SegmentedElementProps = Merge<React.HTMLAttributes<HTMLInputElement>, SegmentedElementBaseProps>;
|
|
13
|
+
export declare const SegmentedElement: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLInputElement>, keyof SegmentedElementBaseProps> & SegmentedElementBaseProps & {
|
|
14
|
+
children?: import("react").ReactNode;
|
|
15
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=SegmentedElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedElement.d.ts","sourceRoot":"","sources":["../../../../src/components/SegmentedControl/SegmentedElement.tsx"],"names":[],"mappings":"AACA,OAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAE7G,eAAO,MAAM,gBAAgB;;oDA0B3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -2,21 +2,17 @@ import { Argument } from 'classnames';
|
|
|
2
2
|
import { OnlyAs } from 'react-polymorphed';
|
|
3
3
|
import { ColorFamily } from '../../types/colors';
|
|
4
4
|
export type TagProps = {
|
|
5
|
+
'aria-label'?: string;
|
|
5
6
|
className?: Argument;
|
|
6
7
|
color?: ColorFamily;
|
|
7
8
|
icon?: string;
|
|
8
9
|
iconPosition?: "left" | "right";
|
|
9
10
|
size?: "md" | "sm";
|
|
10
11
|
};
|
|
11
|
-
export type SelectableTagProps = {
|
|
12
|
-
className?: Argument;
|
|
13
|
-
color?: ColorFamily;
|
|
14
|
-
icon?: string;
|
|
15
|
-
iconPosition?: "left" | "right";
|
|
12
|
+
export type SelectableTagProps = TagProps & {
|
|
16
13
|
selected: boolean;
|
|
17
|
-
size?: "md" | "sm";
|
|
18
14
|
};
|
|
19
15
|
export declare const Tag: import("react-polymorphed").PolyForwardComponent<"p", TagProps, OnlyAs<"a" | "button" | "p">>;
|
|
20
16
|
export declare const SelectableTag: import("react-polymorphed").PolyForwardComponent<"button", SelectableTagProps, OnlyAs<"a" | "button">>;
|
|
21
|
-
export declare const
|
|
17
|
+
export declare const DismissibleTag: import("react-polymorphed").PolyForwardComponent<"button", TagProps, OnlyAs<"a" | "button">>;
|
|
22
18
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,eAAe,CAAC;AAWvB,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,eAAe,CAAC;AAWvB,MAAM,MAAM,QAAQ,GAAG;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;CAAE,CAAC;AAEnE,eAAO,MAAM,GAAG,+FAoBd,CAAC;AAEH,eAAO,MAAM,aAAa,wGAuBxB,CAAC;AAEH,eAAO,MAAM,cAAc,8FAmBzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/TagGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/TagGroup.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAY5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Merge } from '../../types/polymophic';
|
|
2
|
+
export type TagInputBaseProps = {
|
|
3
|
+
hint?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
onTagsChange?: (tags: Array<string>) => any;
|
|
6
|
+
tagTitle?: string | ((tag: string) => string);
|
|
7
|
+
tags?: Array<string>;
|
|
8
|
+
};
|
|
9
|
+
export type TagInputProps = Merge<React.InputHTMLAttributes<HTMLInputElement>, TagInputBaseProps>;
|
|
10
|
+
export declare function TagInput({ hint, label, onTagsChange, tagTitle, tags, ...props }: TagInputProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TagInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagInput.d.ts","sourceRoot":"","sources":["../../../../src/components/TagInput/TagInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAElG,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,YAAwB,EACxB,QAAuI,EACvI,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,aAAa,2CAsDf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TagInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -26,7 +26,9 @@ export * from './Spinner';
|
|
|
26
26
|
export * from './Stepper';
|
|
27
27
|
export * from './Tabs';
|
|
28
28
|
export * from './Tag';
|
|
29
|
+
export * from './TagInput';
|
|
29
30
|
export * from './Toast';
|
|
30
31
|
export * from './Toggle';
|
|
31
32
|
export * from './Typography';
|
|
33
|
+
export * from './SegmentedControl';
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|