@digdir/designsystemet-react 1.0.0-next.39 → 1.0.0-next.40
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/cjs/components/{Accordion/AccordionItem.js → Details/Details.js} +8 -8
- package/dist/cjs/components/Details/DetailsContent.js +16 -0
- package/dist/cjs/components/{Accordion/AccordionHeading.js → Details/DetailsSummary.js} +4 -4
- package/dist/cjs/components/Details/index.js +25 -0
- package/dist/cjs/components/HelpText/HelpText.js +1 -1
- package/dist/cjs/components/Modal/Modal.js +1 -1
- package/dist/cjs/components/ValidationMessage/ValidationMessage.js +2 -2
- package/dist/cjs/components/form/Field/FieldCounter.js +1 -1
- package/dist/cjs/index.js +6 -8
- package/dist/esm/components/{Accordion/AccordionItem.js → Details/Details.js} +8 -8
- package/dist/esm/components/Details/DetailsContent.js +14 -0
- package/dist/esm/components/Details/DetailsSummary.js +15 -0
- package/dist/esm/components/Details/index.js +21 -0
- package/dist/esm/components/HelpText/HelpText.js +1 -1
- package/dist/esm/components/Modal/Modal.js +1 -1
- package/dist/esm/components/ValidationMessage/ValidationMessage.js +2 -2
- package/dist/esm/components/form/Field/FieldCounter.js +1 -1
- package/dist/esm/index.js +3 -4
- package/dist/types/components/Details/Details.d.ts +37 -0
- package/dist/types/components/Details/Details.d.ts.map +1 -0
- package/dist/types/components/Details/DetailsContent.d.ts +9 -0
- package/dist/types/components/Details/DetailsContent.d.ts.map +1 -0
- package/dist/types/components/Details/DetailsSummary.d.ts +15 -0
- package/dist/types/components/Details/DetailsSummary.d.ts.map +1 -0
- package/dist/types/components/Details/index.d.ts +21 -0
- package/dist/types/components/Details/index.d.ts.map +1 -0
- package/dist/types/components/HelpText/HelpText.d.ts +1 -5
- package/dist/types/components/HelpText/HelpText.d.ts.map +1 -1
- package/dist/types/components/Popover/Popover.d.ts +0 -1
- package/dist/types/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/ValidationMessage/ValidationMessage.d.ts +7 -4
- package/dist/types/components/ValidationMessage/ValidationMessage.d.ts.map +1 -1
- package/dist/types/components/form/Field/FieldCounter.d.ts +1 -2
- package/dist/types/components/form/Field/FieldCounter.d.ts.map +1 -1
- package/dist/types/components/form/Field/index.d.ts +1 -2
- package/dist/types/components/form/Field/index.d.ts.map +1 -1
- package/dist/types/components/form/Fieldset/Fieldset.d.ts +3 -282
- package/dist/types/components/form/Fieldset/Fieldset.d.ts.map +1 -1
- package/dist/types/components/form/Fieldset/index.d.ts +1 -274
- package/dist/types/components/form/Fieldset/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/cjs/components/Accordion/Accordion.js +0 -15
- package/dist/cjs/components/Accordion/AccordionContent.js +0 -16
- package/dist/cjs/components/Accordion/index.js +0 -30
- package/dist/esm/components/Accordion/Accordion.js +0 -13
- package/dist/esm/components/Accordion/AccordionContent.js +0 -14
- package/dist/esm/components/Accordion/AccordionHeading.js +0 -15
- package/dist/esm/components/Accordion/index.js +0 -25
- package/dist/types/components/Accordion/Accordion.d.ts +0 -293
- package/dist/types/components/Accordion/Accordion.d.ts.map +0 -1
- package/dist/types/components/Accordion/AccordionContent.d.ts +0 -9
- package/dist/types/components/Accordion/AccordionContent.d.ts.map +0 -1
- package/dist/types/components/Accordion/AccordionHeading.d.ts +0 -15
- package/dist/types/components/Accordion/AccordionHeading.d.ts.map +0 -1
- package/dist/types/components/Accordion/AccordionItem.d.ts +0 -37
- package/dist/types/components/Accordion/AccordionItem.d.ts.map +0 -1
- package/dist/types/components/Accordion/index.d.ts +0 -26
- package/dist/types/components/Accordion/index.d.ts.map +0 -1
- package/dist/types/components/form/CharacterCounter.d.ts +0 -22
- package/dist/types/components/form/CharacterCounter.d.ts.map +0 -1
|
@@ -8,14 +8,14 @@ var react = require('react');
|
|
|
8
8
|
require('@u-elements/u-details');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Details component, contains `Details.Summary` and `Details.Content` components.
|
|
12
12
|
* @example
|
|
13
|
-
* <
|
|
14
|
-
* <
|
|
15
|
-
* <
|
|
16
|
-
* </
|
|
13
|
+
* <Details>
|
|
14
|
+
* <DetailsSummary>Header</DetailsSummary>
|
|
15
|
+
* <DetailsContent>Content</DetailsContent>
|
|
16
|
+
* </Details>
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const Details = react.forwardRef(function Details({ className, open, defaultOpen = false, onToggle, ...rest }, ref) {
|
|
19
19
|
const detailsRef = react.useRef(null);
|
|
20
20
|
const initialOpen = react.useRef(defaultOpen); // Allow rendering defaultOpen on server, but only render once on client
|
|
21
21
|
const mergedRefs = react$1.useMergeRefs([detailsRef, ref]);
|
|
@@ -36,7 +36,7 @@ const AccordionItem = react.forwardRef(function AccordionItem({ className, open,
|
|
|
36
36
|
details?.addEventListener('toggle', handleToggle, true);
|
|
37
37
|
return () => details?.removeEventListener('toggle', handleToggle, true);
|
|
38
38
|
}, []);
|
|
39
|
-
return (jsxRuntime.jsx("u-details", { class: cl('ds-
|
|
39
|
+
return (jsxRuntime.jsx("u-details", { class: cl('ds-details', className), open: (open ?? initialOpen.current) || undefined, ref: mergedRefs, ...rest }));
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
exports.
|
|
42
|
+
exports.Details = Details;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Details content component, contains the content of the details item.
|
|
9
|
+
* @example
|
|
10
|
+
* <DetailsContent>Content</DetailsContent>
|
|
11
|
+
*/
|
|
12
|
+
const DetailsContent = react.forwardRef(function DetailsContent(rest, ref) {
|
|
13
|
+
return jsxRuntime.jsx("div", { ref: ref, ...rest });
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
exports.DetailsContent = DetailsContent;
|
|
@@ -5,13 +5,13 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Details summary component, contains a the heading to toggle the content.
|
|
9
9
|
* @example
|
|
10
|
-
* <
|
|
10
|
+
* <Details.Summary>Heading</Details.Summary>
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const DetailsSummary = react.forwardRef(function DetailsSummary({ className, ...rest }, ref) {
|
|
13
13
|
/* Set `className` as `class` so react is happy */
|
|
14
14
|
return jsxRuntime.jsx("u-summary", { ref: ref, class: className, ...rest });
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
exports.
|
|
17
|
+
exports.DetailsSummary = DetailsSummary;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var Details$1 = require('./Details.js');
|
|
5
|
+
var DetailsContent = require('./DetailsContent.js');
|
|
6
|
+
var DetailsSummary = require('./DetailsSummary.js');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Details are used to toggle the visibility of content.
|
|
10
|
+
* @example
|
|
11
|
+
* <Details>
|
|
12
|
+
* <Details.Summary>Heading 1</Details.Summary>
|
|
13
|
+
* <Details.Content>Content 1</Details.Content>
|
|
14
|
+
* </Details>
|
|
15
|
+
*/
|
|
16
|
+
const Details = Object.assign(Details$1.Details, {
|
|
17
|
+
Summary: DetailsSummary.DetailsSummary,
|
|
18
|
+
Content: DetailsContent.DetailsContent,
|
|
19
|
+
});
|
|
20
|
+
Details.Summary.displayName = 'Details.Summary';
|
|
21
|
+
Details.Content.displayName = 'Details.Content';
|
|
22
|
+
|
|
23
|
+
exports.DetailsContent = DetailsContent.DetailsContent;
|
|
24
|
+
exports.DetailsSummary = DetailsSummary.DetailsSummary;
|
|
25
|
+
exports.Details = Details;
|
|
@@ -7,7 +7,7 @@ var react = require('react');
|
|
|
7
7
|
var index = require('../Popover/index.js');
|
|
8
8
|
|
|
9
9
|
const HelpText = react.forwardRef(function HelpText({ placement = 'right', className, children, ...rest }, ref) {
|
|
10
|
-
return (jsxRuntime.jsxs(index.Popover.TriggerContext, { children: [jsxRuntime.jsx(index.Popover.Trigger, { className: cl('ds-helptext', className), ref: ref, variant: 'tertiary', ...rest }), jsxRuntime.jsx(index.Popover, { placement: placement, "data-color": 'info', children: children })] }));
|
|
10
|
+
return (jsxRuntime.jsxs(index.Popover.TriggerContext, { children: [jsxRuntime.jsx(index.Popover.Trigger, { className: cl('ds-helptext', className), ref: ref, variant: 'tertiary', "data-color": 'info', ...rest }), jsxRuntime.jsx(index.Popover, { placement: placement, "data-color": 'info', children: children })] }));
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
exports.HelpText = HelpText;
|
|
@@ -45,7 +45,7 @@ const Modal = react.forwardRef(function Modal({ asChild, children, className, cl
|
|
|
45
45
|
modalRef.current?.addEventListener('close', handleClose);
|
|
46
46
|
return () => modalRef.current?.removeEventListener('close', handleClose);
|
|
47
47
|
}, [onClose]);
|
|
48
|
-
return (jsxRuntime.jsxs(Component, { className: cl('ds-modal', className), ref: mergedRefs, ...rest, children: [closeButton !== false && (jsxRuntime.jsx("form", { method: 'dialog', children: jsxRuntime.jsx(Button.Button, { "aria-label": closeButton, autoFocus: true, color: 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
|
|
48
|
+
return (jsxRuntime.jsxs(Component, { className: cl('ds-modal', className), ref: mergedRefs, ...rest, children: [closeButton !== false && (jsxRuntime.jsx("form", { method: 'dialog', children: jsxRuntime.jsx(Button.Button, { "aria-label": closeButton, autoFocus: true, "data-color": 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
exports.Modal = Modal;
|
|
@@ -7,9 +7,9 @@ var cl = require('clsx/lite');
|
|
|
7
7
|
var react = require('react');
|
|
8
8
|
|
|
9
9
|
/** Use `ValidationMessage` to display validation text */
|
|
10
|
-
const ValidationMessage = react.forwardRef(function ValidationMessage({ className, asChild,
|
|
10
|
+
const ValidationMessage = react.forwardRef(function ValidationMessage({ className, asChild, ...rest }, ref) {
|
|
11
11
|
const Component = asChild ? reactSlot.Slot : 'div';
|
|
12
|
-
return (jsxRuntime.jsx(Component, { className: cl('ds-validation-message', className), "data-
|
|
12
|
+
return (jsxRuntime.jsx(Component, { className: cl('ds-validation-message', className), "data-field": 'validation', ref: ref, ...rest }));
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
exports.ValidationMessage = ValidationMessage;
|
|
@@ -22,7 +22,7 @@ const FieldCounter = react.forwardRef(function FieldCounter({ limit, under = '%d
|
|
|
22
22
|
field?.addEventListener('input', onInput);
|
|
23
23
|
return () => field?.removeEventListener('input', onInput);
|
|
24
24
|
}, [setCount]);
|
|
25
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsxRuntime.jsx(ValidationMessage.ValidationMessage, {
|
|
25
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsxRuntime.jsx(ValidationMessage.ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'success', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
exports.FieldCounter = FieldCounter;
|
package/dist/cjs/index.js
CHANGED
|
@@ -25,10 +25,9 @@ var Label = require('./components/Label/Label.js');
|
|
|
25
25
|
var Heading = require('./components/Heading/Heading.js');
|
|
26
26
|
var Paragraph = require('./components/Paragraph/Paragraph.js');
|
|
27
27
|
var ValidationMessage = require('./components/ValidationMessage/ValidationMessage.js');
|
|
28
|
-
var index$2 = require('./components/
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var AccordionHeading = require('./components/Accordion/AccordionHeading.js');
|
|
28
|
+
var index$2 = require('./components/Details/index.js');
|
|
29
|
+
var DetailsContent = require('./components/Details/DetailsContent.js');
|
|
30
|
+
var DetailsSummary = require('./components/Details/DetailsSummary.js');
|
|
32
31
|
var index$3 = require('./components/form/Select/index.js');
|
|
33
32
|
var SelectOption = require('./components/form/Select/SelectOption.js');
|
|
34
33
|
var SelectOptgroup = require('./components/form/Select/SelectOptgroup.js');
|
|
@@ -129,10 +128,9 @@ exports.Label = Label.Label;
|
|
|
129
128
|
exports.Heading = Heading.Heading;
|
|
130
129
|
exports.Paragraph = Paragraph.Paragraph;
|
|
131
130
|
exports.ValidationMessage = ValidationMessage.ValidationMessage;
|
|
132
|
-
exports.
|
|
133
|
-
exports.
|
|
134
|
-
exports.
|
|
135
|
-
exports.AccordionHeading = AccordionHeading.AccordionHeading;
|
|
131
|
+
exports.Details = index$2.Details;
|
|
132
|
+
exports.DetailsContent = DetailsContent.DetailsContent;
|
|
133
|
+
exports.DetailsSummary = DetailsSummary.DetailsSummary;
|
|
136
134
|
exports.Select = index$3.Select;
|
|
137
135
|
exports.SelectOption = SelectOption.SelectOption;
|
|
138
136
|
exports.SelectOptgroup = SelectOptgroup.SelectOptgroup;
|
|
@@ -6,14 +6,14 @@ import { forwardRef, useRef, useEffect } from 'react';
|
|
|
6
6
|
import '@u-elements/u-details';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Details component, contains `Details.Summary` and `Details.Content` components.
|
|
10
10
|
* @example
|
|
11
|
-
* <
|
|
12
|
-
* <
|
|
13
|
-
* <
|
|
14
|
-
* </
|
|
11
|
+
* <Details>
|
|
12
|
+
* <DetailsSummary>Header</DetailsSummary>
|
|
13
|
+
* <DetailsContent>Content</DetailsContent>
|
|
14
|
+
* </Details>
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const Details = forwardRef(function Details({ className, open, defaultOpen = false, onToggle, ...rest }, ref) {
|
|
17
17
|
const detailsRef = useRef(null);
|
|
18
18
|
const initialOpen = useRef(defaultOpen); // Allow rendering defaultOpen on server, but only render once on client
|
|
19
19
|
const mergedRefs = useMergeRefs([detailsRef, ref]);
|
|
@@ -34,7 +34,7 @@ const AccordionItem = forwardRef(function AccordionItem({ className, open, defau
|
|
|
34
34
|
details?.addEventListener('toggle', handleToggle, true);
|
|
35
35
|
return () => details?.removeEventListener('toggle', handleToggle, true);
|
|
36
36
|
}, []);
|
|
37
|
-
return (jsx("u-details", { class: cl('ds-
|
|
37
|
+
return (jsx("u-details", { class: cl('ds-details', className), open: (open ?? initialOpen.current) || undefined, ref: mergedRefs, ...rest }));
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
export {
|
|
40
|
+
export { Details };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Details content component, contains the content of the details item.
|
|
7
|
+
* @example
|
|
8
|
+
* <DetailsContent>Content</DetailsContent>
|
|
9
|
+
*/
|
|
10
|
+
const DetailsContent = forwardRef(function DetailsContent(rest, ref) {
|
|
11
|
+
return jsx("div", { ref: ref, ...rest });
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { DetailsContent };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Details summary component, contains a the heading to toggle the content.
|
|
7
|
+
* @example
|
|
8
|
+
* <Details.Summary>Heading</Details.Summary>
|
|
9
|
+
*/
|
|
10
|
+
const DetailsSummary = forwardRef(function DetailsSummary({ className, ...rest }, ref) {
|
|
11
|
+
/* Set `className` as `class` so react is happy */
|
|
12
|
+
return jsx("u-summary", { ref: ref, class: className, ...rest });
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { DetailsSummary };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Details as Details$1 } from './Details.js';
|
|
3
|
+
import { DetailsContent } from './DetailsContent.js';
|
|
4
|
+
import { DetailsSummary } from './DetailsSummary.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Details are used to toggle the visibility of content.
|
|
8
|
+
* @example
|
|
9
|
+
* <Details>
|
|
10
|
+
* <Details.Summary>Heading 1</Details.Summary>
|
|
11
|
+
* <Details.Content>Content 1</Details.Content>
|
|
12
|
+
* </Details>
|
|
13
|
+
*/
|
|
14
|
+
const Details = Object.assign(Details$1, {
|
|
15
|
+
Summary: DetailsSummary,
|
|
16
|
+
Content: DetailsContent,
|
|
17
|
+
});
|
|
18
|
+
Details.Summary.displayName = 'Details.Summary';
|
|
19
|
+
Details.Content.displayName = 'Details.Content';
|
|
20
|
+
|
|
21
|
+
export { Details, DetailsContent, DetailsSummary };
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import { Popover } from '../Popover/index.js';
|
|
6
6
|
|
|
7
7
|
const HelpText = forwardRef(function HelpText({ placement = 'right', className, children, ...rest }, ref) {
|
|
8
|
-
return (jsxs(Popover.TriggerContext, { children: [jsx(Popover.Trigger, { className: cl('ds-helptext', className), ref: ref, variant: 'tertiary', ...rest }), jsx(Popover, { placement: placement, "data-color": 'info', children: children })] }));
|
|
8
|
+
return (jsxs(Popover.TriggerContext, { children: [jsx(Popover.Trigger, { className: cl('ds-helptext', className), ref: ref, variant: 'tertiary', "data-color": 'info', ...rest }), jsx(Popover, { placement: placement, "data-color": 'info', children: children })] }));
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export { HelpText };
|
|
@@ -43,7 +43,7 @@ const Modal = forwardRef(function Modal({ asChild, children, className, closeBut
|
|
|
43
43
|
modalRef.current?.addEventListener('close', handleClose);
|
|
44
44
|
return () => modalRef.current?.removeEventListener('close', handleClose);
|
|
45
45
|
}, [onClose]);
|
|
46
|
-
return (jsxs(Component, { className: cl('ds-modal', className), ref: mergedRefs, ...rest, children: [closeButton !== false && (jsx("form", { method: 'dialog', children: jsx(Button, { "aria-label": closeButton, autoFocus: true, color: 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
|
|
46
|
+
return (jsxs(Component, { className: cl('ds-modal', className), ref: mergedRefs, ...rest, children: [closeButton !== false && (jsx("form", { method: 'dialog', children: jsx(Button, { "aria-label": closeButton, autoFocus: true, "data-color": 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
export { Modal };
|
|
@@ -5,9 +5,9 @@ import cl from 'clsx/lite';
|
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
|
|
7
7
|
/** Use `ValidationMessage` to display validation text */
|
|
8
|
-
const ValidationMessage = forwardRef(function ValidationMessage({ className, asChild,
|
|
8
|
+
const ValidationMessage = forwardRef(function ValidationMessage({ className, asChild, ...rest }, ref) {
|
|
9
9
|
const Component = asChild ? Slot : 'div';
|
|
10
|
-
return (jsx(Component, { className: cl('ds-validation-message', className), "data-
|
|
10
|
+
return (jsx(Component, { className: cl('ds-validation-message', className), "data-field": 'validation', ref: ref, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
export { ValidationMessage };
|
|
@@ -20,7 +20,7 @@ const FieldCounter = forwardRef(function FieldCounter({ limit, under = '%d tegn
|
|
|
20
20
|
field?.addEventListener('input', onInput);
|
|
21
21
|
return () => field?.removeEventListener('input', onInput);
|
|
22
22
|
}, [setCount]);
|
|
23
|
-
return (jsxs(Fragment, { children: [jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsx(ValidationMessage, {
|
|
23
|
+
return (jsxs(Fragment, { children: [jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsx(ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'success', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export { FieldCounter };
|
package/dist/esm/index.js
CHANGED
|
@@ -23,10 +23,9 @@ export { Label } from './components/Label/Label.js';
|
|
|
23
23
|
export { Heading } from './components/Heading/Heading.js';
|
|
24
24
|
export { Paragraph } from './components/Paragraph/Paragraph.js';
|
|
25
25
|
export { ValidationMessage } from './components/ValidationMessage/ValidationMessage.js';
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export { AccordionHeading } from './components/Accordion/AccordionHeading.js';
|
|
26
|
+
export { Details } from './components/Details/index.js';
|
|
27
|
+
export { DetailsContent } from './components/Details/DetailsContent.js';
|
|
28
|
+
export { DetailsSummary } from './components/Details/DetailsSummary.js';
|
|
30
29
|
export { Select } from './components/form/Select/index.js';
|
|
31
30
|
export { SelectOption } from './components/form/Select/SelectOption.js';
|
|
32
31
|
export { SelectOptgroup } from './components/form/Select/SelectOptgroup.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import '@u-elements/u-details';
|
|
3
|
+
export type DetailsProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Controls open-state.
|
|
6
|
+
*
|
|
7
|
+
* Using this removes automatic control of open-state
|
|
8
|
+
*
|
|
9
|
+
* @default undefined
|
|
10
|
+
*/
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Defaults the details to open if not controlled
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
/** Callback function when Details toggles due to click on summary or find in page-search */
|
|
18
|
+
onToggle?: (event: Event) => void;
|
|
19
|
+
/** Content should be one `<Details.Summary>` and `<Details.Content>` */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
} & Omit<HTMLAttributes<HTMLDetailsElement>, 'onToggle'> & ({
|
|
22
|
+
open: boolean;
|
|
23
|
+
onToggle: (event: Event) => void;
|
|
24
|
+
} | {
|
|
25
|
+
open?: never;
|
|
26
|
+
onToggle?: (event: Event) => void;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Details component, contains `Details.Summary` and `Details.Content` components.
|
|
30
|
+
* @example
|
|
31
|
+
* <Details>
|
|
32
|
+
* <DetailsSummary>Header</DetailsSummary>
|
|
33
|
+
* <DetailsContent>Content</DetailsContent>
|
|
34
|
+
* </Details>
|
|
35
|
+
*/
|
|
36
|
+
export declare const Details: React.ForwardRefExoticComponent<DetailsProps & React.RefAttributes<HTMLDetailsElement>>;
|
|
37
|
+
//# sourceMappingURL=Details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,uBAAuB,CAAC;AAE/B,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,UAAU,CAAC,GACtD,CACI;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,GACnD;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,CACtD,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,yFAmCnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type DetailsContentProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
/**
|
|
4
|
+
* Details content component, contains the content of the details item.
|
|
5
|
+
* @example
|
|
6
|
+
* <DetailsContent>Content</DetailsContent>
|
|
7
|
+
*/
|
|
8
|
+
export declare const DetailsContent: React.ForwardRefExoticComponent<DetailsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=DetailsContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsContent.d.ts","sourceRoot":"","sources":["../../../src/components/Details/DetailsContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,cAAc,4FAI1B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type DetailsSummaryProps = {
|
|
3
|
+
/** Heading text */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & HTMLAttributes<HTMLElement>;
|
|
6
|
+
/**
|
|
7
|
+
* Details summary component, contains a the heading to toggle the content.
|
|
8
|
+
* @example
|
|
9
|
+
* <Details.Summary>Heading</Details.Summary>
|
|
10
|
+
*/
|
|
11
|
+
export declare const DetailsSummary: React.ForwardRefExoticComponent<{
|
|
12
|
+
/** Heading text */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
} & HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
//# sourceMappingURL=DetailsSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsSummary.d.ts","sourceRoot":"","sources":["../../../src/components/Details/DetailsSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IATzB,mBAAmB;cACT,SAAS;mEAapB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DetailsContent } from './DetailsContent';
|
|
2
|
+
import { DetailsSummary } from './DetailsSummary';
|
|
3
|
+
/**
|
|
4
|
+
* Details are used to toggle the visibility of content.
|
|
5
|
+
* @example
|
|
6
|
+
* <Details>
|
|
7
|
+
* <Details.Summary>Heading 1</Details.Summary>
|
|
8
|
+
* <Details.Content>Content 1</Details.Content>
|
|
9
|
+
* </Details>
|
|
10
|
+
*/
|
|
11
|
+
declare const Details: React.ForwardRefExoticComponent<import("./Details").DetailsProps & React.RefAttributes<HTMLDetailsElement>> & {
|
|
12
|
+
Summary: React.ForwardRefExoticComponent<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
} & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
Content: React.ForwardRefExoticComponent<import("./DetailsContent").DetailsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
export type { DetailsContentProps } from './DetailsContent';
|
|
18
|
+
export type { DetailsSummaryProps } from './DetailsSummary';
|
|
19
|
+
export type { DetailsProps } from './Details';
|
|
20
|
+
export { Details, DetailsContent, DetailsSummary };
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Details/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO;;;;;CAGX,CAAC;AAKH,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { Placement } from '@floating-ui/utils';
|
|
2
2
|
import type { ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import type { Color } from '../../colors';
|
|
4
3
|
import type { DefaultProps } from '../../types';
|
|
5
4
|
import type { MergeRight } from '../../utilities';
|
|
6
5
|
export type HelpTextProps = MergeRight<DefaultProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, {
|
|
7
|
-
/** Specify which color palette to use. If left unspecified, the color is inherited from the nearest ancestor with data-color.
|
|
8
|
-
*/
|
|
9
|
-
'data-color'?: Color;
|
|
10
6
|
/**
|
|
11
7
|
* Required descriptive label for screen readers.
|
|
12
8
|
**/
|
|
@@ -70,6 +66,7 @@ export declare const HelpText: React.ForwardRefExoticComponent<{
|
|
|
70
66
|
is?: string | undefined;
|
|
71
67
|
popovertarget?: string | undefined;
|
|
72
68
|
'data-size'?: "sm" | "md" | "lg" | undefined;
|
|
69
|
+
'data-color'?: "info" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
73
70
|
"aria-activedescendant"?: string | undefined;
|
|
74
71
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
75
72
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
@@ -293,7 +290,6 @@ export declare const HelpText: React.ForwardRefExoticComponent<{
|
|
|
293
290
|
formMethod?: string | undefined;
|
|
294
291
|
formNoValidate?: boolean | undefined;
|
|
295
292
|
formTarget?: string | undefined;
|
|
296
|
-
'data-color'?: Color | undefined;
|
|
297
293
|
'aria-label': string;
|
|
298
294
|
placement?: Placement | undefined;
|
|
299
295
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpText.d.ts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HelpText.d.ts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EACrE;IACE;;QAEI;IACJ,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CACF,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBATH,MAAM;gBAKR,SAAS;2CAwBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA5CE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAWnB,MAAM;gBAKC,SAAS;mBAIN,KAAK;WAKb,OAAO;cAIL,MAAM,IAAI;eAIT,MAAM,IAAI;oBAKJ,OAAO;cAEb,OAAO;wCA8GpB,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { SeverityColors } from '../../colors';
|
|
2
3
|
import type { DefaultProps } from '../../types';
|
|
3
4
|
import type { MergeRight } from '../../utilities';
|
|
4
5
|
export type ValidationMessageProps = MergeRight<Omit<DefaultProps, 'data-color'> & HTMLAttributes<HTMLParagraphElement>, {
|
|
5
|
-
/**
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Sets color and icon.
|
|
8
|
+
* @default 'danger'
|
|
9
|
+
*/
|
|
10
|
+
'data-color'?: Extract<SeverityColors, 'success' | 'danger'>;
|
|
7
11
|
/**
|
|
8
12
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
9
13
|
* @default false
|
|
@@ -65,7 +69,6 @@ export declare const ValidationMessage: React.ForwardRefExoticComponent<{
|
|
|
65
69
|
is?: string | undefined;
|
|
66
70
|
popovertarget?: string | undefined;
|
|
67
71
|
'data-size'?: "sm" | "md" | "lg" | undefined;
|
|
68
|
-
'data-color'?: (import("../../colors").Color | (string & {})) | undefined;
|
|
69
72
|
"aria-activedescendant"?: string | undefined;
|
|
70
73
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
71
74
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
@@ -280,7 +283,7 @@ export declare const ValidationMessage: React.ForwardRefExoticComponent<{
|
|
|
280
283
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
|
|
281
284
|
onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
282
285
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
283
|
-
|
|
286
|
+
'data-color'?: Extract<SeverityColors, "success" | "danger"> | undefined;
|
|
284
287
|
asChild?: boolean | undefined;
|
|
285
288
|
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
286
289
|
//# sourceMappingURL=ValidationMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ValidationMessage/ValidationMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACvE;IACE
|
|
1
|
+
{"version":3,"file":"ValidationMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ValidationMessage/ValidationMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACvE;IACE;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;IAC7D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAVX,OAAO,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,CAAC;cAKlD,OAAO;8CAmBnB,CAAC"}
|
|
@@ -76,7 +76,6 @@ export declare const FieldCounter: React.ForwardRefExoticComponent<{
|
|
|
76
76
|
is?: string | undefined;
|
|
77
77
|
popovertarget?: string | undefined;
|
|
78
78
|
'data-size'?: "sm" | "md" | "lg" | undefined;
|
|
79
|
-
'data-color'?: (import("../../../colors").Color | (string & {})) | undefined;
|
|
80
79
|
"aria-activedescendant"?: string | undefined;
|
|
81
80
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
82
81
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
@@ -291,7 +290,7 @@ export declare const FieldCounter: React.ForwardRefExoticComponent<{
|
|
|
291
290
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
|
|
292
291
|
onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
293
292
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
294
|
-
|
|
293
|
+
'data-color'?: Extract<import("../../../colors").SeverityColors, "success" | "danger"> | undefined;
|
|
295
294
|
asChild?: boolean | undefined;
|
|
296
295
|
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
297
296
|
//# sourceMappingURL=FieldCounter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldCounter.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Field/FieldCounter.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,sBAAsB,CAAC;AAK3B,eAAO,MAAM,YAAY;IAfvB;;OAEG;WACI,MAAM;IACb;;OAEG;YACK,MAAM;IACd,sCAAsC;WAC/B,MAAM
|
|
1
|
+
{"version":3,"file":"FieldCounter.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Field/FieldCounter.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,sBAAsB,CAAC;AAK3B,eAAO,MAAM,YAAY;IAfvB;;OAEG;WACI,MAAM;IACb;;OAEG;YACK,MAAM;IACd,sCAAsC;WAC/B,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAqDd,CAAC"}
|
|
@@ -74,7 +74,6 @@ declare const Field: React.ForwardRefExoticComponent<{
|
|
|
74
74
|
is?: string | undefined;
|
|
75
75
|
popovertarget?: string | undefined;
|
|
76
76
|
'data-size'?: "sm" | "md" | "lg" | undefined;
|
|
77
|
-
'data-color'?: (import("../../../colors").Color | (string & {})) | undefined;
|
|
78
77
|
"aria-activedescendant"?: string | undefined;
|
|
79
78
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
80
79
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
@@ -289,7 +288,7 @@ declare const Field: React.ForwardRefExoticComponent<{
|
|
|
289
288
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
|
|
290
289
|
onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
291
290
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
|
|
292
|
-
|
|
291
|
+
'data-color'?: Extract<import("../../../colors").SeverityColors, "success" | "danger"> | undefined;
|
|
293
292
|
asChild?: boolean | undefined;
|
|
294
293
|
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
295
294
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Field/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;GAQG;AACH,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Field/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;GAQG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKT,CAAC;AAOH,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC"}
|