@navikt/ds-react 7.29.1 → 7.30.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/cjs/date/datepicker/parts/DatePicker.WeekNumber.js +1 -1
- package/cjs/date/datepicker/parts/DatePicker.WeekNumber.js.map +1 -1
- package/cjs/form/form-summary/FormSummary.d.ts +11 -17
- package/cjs/form/form-summary/FormSummary.js +5 -1
- package/cjs/form/form-summary/FormSummary.js.map +1 -1
- package/cjs/form/form-summary/FormSummaryEditLink.js +6 -1
- package/cjs/form/form-summary/FormSummaryEditLink.js.map +1 -1
- package/cjs/form/form-summary/FormSummaryFooter.d.ts +12 -0
- package/cjs/form/form-summary/FormSummaryFooter.js +56 -0
- package/cjs/form/form-summary/FormSummaryFooter.js.map +1 -0
- package/cjs/form/form-summary/FormSummaryHeader.d.ts +1 -1
- package/cjs/form/form-summary/FormSummaryHeader.js +3 -1
- package/cjs/form/form-summary/FormSummaryHeader.js.map +1 -1
- package/cjs/form/form-summary/index.d.ts +1 -0
- package/cjs/form/form-summary/index.js +3 -1
- package/cjs/form/form-summary/index.js.map +1 -1
- package/cjs/timeline/period/index.d.ts +1 -1
- package/cjs/timeline/period/index.js.map +1 -1
- package/cjs/timeline/utils/timeline.d.ts +7 -6
- package/cjs/timeline/utils/timeline.js +39 -62
- package/cjs/timeline/utils/timeline.js.map +1 -1
- package/cjs/timeline/utils/types.external.d.ts +2 -3
- package/cjs/timeline/utils/types.internal.d.ts +1 -1
- package/cjs/util/composition-warning/CompositionWarning.d.ts +37 -0
- package/cjs/util/composition-warning/CompositionWarning.js +71 -0
- package/cjs/util/composition-warning/CompositionWarning.js.map +1 -0
- package/cjs/util/composition-warning/index.d.ts +1 -0
- package/cjs/util/composition-warning/index.js +38 -0
- package/cjs/util/composition-warning/index.js.map +1 -0
- package/cjs/util/getChildRef.d.ts +1 -0
- package/cjs/util/getChildRef.js +8 -0
- package/cjs/util/getChildRef.js.map +1 -0
- package/cjs/util/renderStoriesForChromatic.d.ts +2 -10
- package/cjs/util/renderStoriesForChromatic.js +2 -2
- package/cjs/util/renderStoriesForChromatic.js.map +1 -1
- package/esm/date/datepicker/parts/DatePicker.WeekNumber.js +1 -1
- package/esm/date/datepicker/parts/DatePicker.WeekNumber.js.map +1 -1
- package/esm/form/form-summary/FormSummary.d.ts +11 -17
- package/esm/form/form-summary/FormSummary.js +5 -1
- package/esm/form/form-summary/FormSummary.js.map +1 -1
- package/esm/form/form-summary/FormSummaryEditLink.js +6 -1
- package/esm/form/form-summary/FormSummaryEditLink.js.map +1 -1
- package/esm/form/form-summary/FormSummaryFooter.d.ts +12 -0
- package/esm/form/form-summary/FormSummaryFooter.js +20 -0
- package/esm/form/form-summary/FormSummaryFooter.js.map +1 -0
- package/esm/form/form-summary/FormSummaryHeader.d.ts +1 -1
- package/esm/form/form-summary/FormSummaryHeader.js +3 -1
- package/esm/form/form-summary/FormSummaryHeader.js.map +1 -1
- package/esm/form/form-summary/index.d.ts +1 -0
- package/esm/form/form-summary/index.js +1 -0
- package/esm/form/form-summary/index.js.map +1 -1
- package/esm/timeline/period/index.d.ts +1 -1
- package/esm/timeline/period/index.js.map +1 -1
- package/esm/timeline/utils/timeline.d.ts +7 -6
- package/esm/timeline/utils/timeline.js +39 -62
- package/esm/timeline/utils/timeline.js.map +1 -1
- package/esm/timeline/utils/types.external.d.ts +2 -3
- package/esm/timeline/utils/types.internal.d.ts +1 -1
- package/esm/util/composition-warning/CompositionWarning.d.ts +37 -0
- package/esm/util/composition-warning/CompositionWarning.js +34 -0
- package/esm/util/composition-warning/CompositionWarning.js.map +1 -0
- package/esm/util/composition-warning/index.d.ts +1 -0
- package/esm/util/composition-warning/index.js +2 -0
- package/esm/util/composition-warning/index.js.map +1 -0
- package/esm/util/getChildRef.d.ts +1 -0
- package/esm/util/getChildRef.js +4 -0
- package/esm/util/getChildRef.js.map +1 -0
- package/esm/util/renderStoriesForChromatic.d.ts +2 -10
- package/esm/util/renderStoriesForChromatic.js +2 -2
- package/esm/util/renderStoriesForChromatic.js.map +1 -1
- package/package.json +3 -3
- package/src/date/datepicker/parts/DatePicker.WeekNumber.tsx +3 -1
- package/src/form/form-summary/FormSummary.tsx +12 -17
- package/src/form/form-summary/FormSummaryEditLink.tsx +16 -7
- package/src/form/form-summary/FormSummaryFooter.tsx +33 -0
- package/src/form/form-summary/FormSummaryHeader.tsx +12 -9
- package/src/form/form-summary/index.ts +4 -0
- package/src/timeline/period/index.tsx +3 -1
- package/src/timeline/utils/timeline.ts +56 -67
- package/src/timeline/utils/types.external.ts +4 -3
- package/src/timeline/utils/types.internal.ts +3 -1
- package/src/util/composition-warning/CompositionWarning.tsx +67 -0
- package/src/util/composition-warning/index.ts +1 -0
- package/src/util/getChildRef.ts +6 -0
- package/src/util/renderStoriesForChromatic.tsx +12 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositionWarning.js","sourceRoot":"","sources":["../../../src/util/composition-warning/CompositionWarning.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEwC,gDAAS;AAlEjD;;;;;;;;;;;;GAYG;AACH,+CAAiD;AACjD,0CAAuC;AACvC,sDAAkD;AAIlD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AASpD,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAC/C,IAAA,8BAAa,EAAgC;IAC3C,YAAY,EACV,oEAAoE;CACvE,CAAC,CAAC;AAkCoE,kCAAI;AApB7E,SAAS,2BAA2B,CAAC,EACnC,QAAQ,EACR,IAAI,EACJ,OAAO,GAC0B;;IACjC,MAAM,eAAe,GAAG,MAAA,qBAAqB,CAAC,KAAK,CAAC,0CAAE,IAAI,CAAC;IAE3D,MAAM,UAAU,GAAG,IAAA,cAAM,EAAc,IAAI,CAAC,CAAC;IAE7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,eAAe,IAAI,IAAI,KAAK,eAAe,EAAE,CAAC;YAC3D,OAAO;QACT,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,WAAW,OAAO,aAAa,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAErC,OAAO,8BAAC,WAAI,IAAC,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAQ,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as CompositionWarning from "./CompositionWarning";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CompositionWarning = void 0;
|
|
37
|
+
exports.CompositionWarning = __importStar(require("./CompositionWarning"));
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/composition-warning/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA2D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getChildRef: <T>(children: React.ReactElement<React.RefAttributes<T>>) => React.Ref<T> | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChildRef = void 0;
|
|
4
|
+
const getChildRef = (children) => Object.prototype.propertyIsEnumerable.call(children.props, "ref")
|
|
5
|
+
? children.props.ref // React 19 (children.ref still works, but gives a warning)
|
|
6
|
+
: children.ref; // React <19
|
|
7
|
+
exports.getChildRef = getChildRef;
|
|
8
|
+
//# sourceMappingURL=getChildRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getChildRef.js","sourceRoot":"","sources":["../../src/util/getChildRef.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CACzB,QAAoD,EAC1B,EAAE,CAC5B,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAC/D,CAAC,CAAE,QAAQ,CAAC,KAAa,CAAC,GAAG,CAAC,2DAA2D;IACzF,CAAC,CAAE,QAAgB,CAAC,GAAG,CAAC,CAAC,YAAY;AAL5B,QAAA,WAAW,eAKI"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Renderer, StoryContext } from "storybook/internal/types";
|
|
4
3
|
export declare function renderStoriesForChromatic(stories: Record<string, {
|
|
5
4
|
render?: (...args: any[]) => React.ReactNode;
|
|
6
|
-
} | React.FunctionComponent<void>>):
|
|
7
|
-
render: (args_0: Args, args_1: StoryContext<Renderer, Args>) => React.JSX.Element[];
|
|
8
|
-
parameters: {
|
|
9
|
-
chromatic: {
|
|
10
|
-
disable: boolean;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
5
|
+
} | React.FunctionComponent<void>>): StoryObj;
|
|
@@ -7,12 +7,12 @@ exports.renderStoriesForChromatic = renderStoriesForChromatic;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
function renderStoriesForChromatic(stories) {
|
|
9
9
|
return {
|
|
10
|
-
render: (...args) => Object.entries(stories).map(([storyName, story]) => {
|
|
10
|
+
render: (...args) => (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(stories).map(([storyName, story]) => {
|
|
11
11
|
var _a;
|
|
12
12
|
return (react_1.default.createElement("div", { key: storyName },
|
|
13
13
|
react_1.default.createElement("h2", { className: "storyheading" }, storyName),
|
|
14
14
|
typeof story === "function" ? story() : (_a = story.render) === null || _a === void 0 ? void 0 : _a.call(story, ...args)));
|
|
15
|
-
}),
|
|
15
|
+
}))),
|
|
16
16
|
parameters: {
|
|
17
17
|
chromatic: { disable: false },
|
|
18
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStoriesForChromatic.js","sourceRoot":"","sources":["../../src/util/renderStoriesForChromatic.tsx"],"names":[],"mappings":";;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"renderStoriesForChromatic.js","sourceRoot":"","sources":["../../src/util/renderStoriesForChromatic.tsx"],"names":[],"mappings":";;;;;AAIA,8DAsBC;AAzBD,kDAA0B;AAG1B,SAAgB,yBAAyB,CACvC,OAIC;IAED,OAAO;QACL,MAAM,EAAE,CAAC,GAAG,IAA0C,EAAE,EAAE,CAAC,CACzD,8DACG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;;YAAC,OAAA,CACnD,uCAAK,GAAG,EAAE,SAAS;gBACjB,sCAAI,SAAS,EAAC,cAAc,IAAE,SAAS,CAAM;gBAC5C,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,MAAM,sDAAG,GAAG,IAAI,CAAC,CAC5D,CACP,CAAA;SAAA,CAAC,CACD,CACJ;QACD,UAAU,EAAE;YACV,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC9B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -30,7 +30,7 @@ const DatePickerWeekNumber = ({ week: { weekNumber, days }, onWeekNumberClick, c
|
|
|
30
30
|
}) },
|
|
31
31
|
React.createElement(Button, { variant: "secondary-neutral", size: "small", name: "week-number", "aria-label": translate("selectWeekNumber", { week: weekNumber }), style: style, className: cn("navds-date__weeknumber", "rdp-weeknumber"), onClick: () => {
|
|
32
32
|
onWeekNumberClick(weekNumber, days.map((day) => day.date));
|
|
33
|
-
}, icon: React.createElement("span", { className: "navds-date__weeknumber-number" }, weekNumber) }))));
|
|
33
|
+
}, icon: React.createElement("span", { className: cn("navds-date__weeknumber-number") }, weekNumber) }))));
|
|
34
34
|
};
|
|
35
35
|
export { DatePickerWeekNumber };
|
|
36
36
|
//# sourceMappingURL=DatePicker.WeekNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.WeekNumber.js","sourceRoot":"","sources":["../../../../src/date/datepicker/parts/DatePicker.WeekNumber.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAgB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,MAAM,oBAAoB,GAAG,CAAC,EAC5B,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAC1B,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,aAAa,GAKiC,EAAE,EAAE;IAClD,MAAM,SAAS,GAAG,yBAAyB,EAAE,CAAC,SAAS,CAAC;IACxD,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;IAE9B,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC;IAExC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,IACE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,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3
3
|
import FormSummaryAnswers from "./FormSummaryAnswers.js";
|
|
4
4
|
import FormSummaryEditLink from "./FormSummaryEditLink.js";
|
|
5
|
+
import FormSummaryFooter from "./FormSummaryFooter.js";
|
|
5
6
|
import FormSummaryHeader from "./FormSummaryHeader.js";
|
|
6
7
|
import FormSummaryHeading from "./FormSummaryHeading.js";
|
|
7
8
|
import FormSummaryLabel from "./FormSummaryLabel.js";
|
|
8
9
|
import FormSummaryValue from "./FormSummaryValue.js";
|
|
9
10
|
interface FormSummaryComponent extends React.ForwardRefExoticComponent<FormSummaryProps & React.RefAttributes<HTMLDivElement>> {
|
|
10
11
|
/**
|
|
11
|
-
* Must include `<FormSummary.Heading
|
|
12
|
+
* Must include `<FormSummary.Heading>`.
|
|
12
13
|
*/
|
|
13
14
|
Header: typeof FormSummaryHeader;
|
|
14
15
|
/**
|
|
@@ -16,7 +17,7 @@ interface FormSummaryComponent extends React.ForwardRefExoticComponent<FormSumma
|
|
|
16
17
|
*/
|
|
17
18
|
Heading: typeof FormSummaryHeading;
|
|
18
19
|
/**
|
|
19
|
-
* Link to edit the answers to use in the `FormSummary.
|
|
20
|
+
* Link to edit the answers to use in the `FormSummary.Footer` component. Should link to the relevant part of the form.
|
|
20
21
|
*/
|
|
21
22
|
EditLink: typeof FormSummaryEditLink;
|
|
22
23
|
/**
|
|
@@ -35,6 +36,10 @@ interface FormSummaryComponent extends React.ForwardRefExoticComponent<FormSumma
|
|
|
35
36
|
* Corresponds to the answer in the form. To be used in the `FormSummary.Answer` component.
|
|
36
37
|
*/
|
|
37
38
|
Value: typeof FormSummaryValue;
|
|
39
|
+
/**
|
|
40
|
+
* Footer component for the form summary, if applicable this is a good place for `<FormSummary.EditLink>`.
|
|
41
|
+
*/
|
|
42
|
+
Footer: typeof FormSummaryFooter;
|
|
38
43
|
}
|
|
39
44
|
export interface FormSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
40
45
|
/**
|
|
@@ -42,20 +47,7 @@ export interface FormSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
42
47
|
*
|
|
43
48
|
* - `<FormSummary.Header>`
|
|
44
49
|
* - `<FormSummary.Answers>`
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* <FormSummary>
|
|
48
|
-
* <FormSummary.Header>
|
|
49
|
-
* <FormSummary.Heading level="2">HeadingTekst</FormSummary.Heading>
|
|
50
|
-
* <FormSummary.EditLink href="#" />
|
|
51
|
-
* </FormSummary.Header>
|
|
52
|
-
* <FormSummary.Answers>
|
|
53
|
-
* <FormSummary.Answer>
|
|
54
|
-
* <FormSummary.Label>Navn</FormSummary.Label>
|
|
55
|
-
* <FormSummary.Value>Ola Nordmann</FormSummary.Value>
|
|
56
|
-
* </FormSummary.Answer>
|
|
57
|
-
* </FormSummary.Answers>
|
|
58
|
-
* </FormSummary>
|
|
50
|
+
* - `<FormSummary.Footer>` (optional)
|
|
59
51
|
*/
|
|
60
52
|
children: React.ReactNode;
|
|
61
53
|
}
|
|
@@ -68,7 +60,6 @@ export interface FormSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
68
60
|
* <FormSummary>
|
|
69
61
|
* <FormSummary.Header>
|
|
70
62
|
* <FormSummary.Heading level="2">HeadingTekst</FormSummary.Heading>
|
|
71
|
-
* <FormSummary.EditLink href="#" />
|
|
72
63
|
* </FormSummary.Header>
|
|
73
64
|
* <FormSummary.Answers>
|
|
74
65
|
* <FormSummary.Answer>
|
|
@@ -76,6 +67,9 @@ export interface FormSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
76
67
|
* <FormSummary.Value>Ola Nordmann</FormSummary.Value>
|
|
77
68
|
* </FormSummary.Answer>
|
|
78
69
|
* </FormSummary.Answers>
|
|
70
|
+
* <FormSummary.Footer>
|
|
71
|
+
* <FormSummary.EditLink href="#" />
|
|
72
|
+
* </FormSummary.Footer>
|
|
79
73
|
* </FormSummary>
|
|
80
74
|
*/
|
|
81
75
|
export declare const FormSummary: FormSummaryComponent;
|
|
@@ -14,6 +14,7 @@ import { useRenameCSS } from "../../theme/Theme.js";
|
|
|
14
14
|
import FormSummaryAnswer from "./FormSummaryAnswer.js";
|
|
15
15
|
import FormSummaryAnswers from "./FormSummaryAnswers.js";
|
|
16
16
|
import FormSummaryEditLink from "./FormSummaryEditLink.js";
|
|
17
|
+
import FormSummaryFooter from "./FormSummaryFooter.js";
|
|
17
18
|
import FormSummaryHeader from "./FormSummaryHeader.js";
|
|
18
19
|
import FormSummaryHeading from "./FormSummaryHeading.js";
|
|
19
20
|
import FormSummaryLabel from "./FormSummaryLabel.js";
|
|
@@ -27,7 +28,6 @@ import FormSummaryValue from "./FormSummaryValue.js";
|
|
|
27
28
|
* <FormSummary>
|
|
28
29
|
* <FormSummary.Header>
|
|
29
30
|
* <FormSummary.Heading level="2">HeadingTekst</FormSummary.Heading>
|
|
30
|
-
* <FormSummary.EditLink href="#" />
|
|
31
31
|
* </FormSummary.Header>
|
|
32
32
|
* <FormSummary.Answers>
|
|
33
33
|
* <FormSummary.Answer>
|
|
@@ -35,6 +35,9 @@ import FormSummaryValue from "./FormSummaryValue.js";
|
|
|
35
35
|
* <FormSummary.Value>Ola Nordmann</FormSummary.Value>
|
|
36
36
|
* </FormSummary.Answer>
|
|
37
37
|
* </FormSummary.Answers>
|
|
38
|
+
* <FormSummary.Footer>
|
|
39
|
+
* <FormSummary.EditLink href="#" />
|
|
40
|
+
* </FormSummary.Footer>
|
|
38
41
|
* </FormSummary>
|
|
39
42
|
*/
|
|
40
43
|
export const FormSummary = forwardRef((_a, ref) => {
|
|
@@ -49,5 +52,6 @@ FormSummary.Answers = FormSummaryAnswers;
|
|
|
49
52
|
FormSummary.Answer = FormSummaryAnswer;
|
|
50
53
|
FormSummary.Label = FormSummaryLabel;
|
|
51
54
|
FormSummary.Value = FormSummaryValue;
|
|
55
|
+
FormSummary.Footer = FormSummaryFooter;
|
|
52
56
|
export default FormSummary;
|
|
53
57
|
//# sourceMappingURL=FormSummary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSummary.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummary.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormSummary.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummary.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAmDlD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,CAAC,EAAgC,EAAE,GAAG,EAAE,EAAE;QAAzC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAC7B,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;IAE9B,OAAO,CACL,2CAAK,GAAG,EAAE,GAAG,IAAM,IAAI,IAAE,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,KACpE,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACsB,CAAC;AAE1B,WAAW,CAAC,MAAM,GAAG,iBAAiB,CAAC;AACvC,WAAW,CAAC,OAAO,GAAG,kBAAkB,CAAC;AACzC,WAAW,CAAC,QAAQ,GAAG,mBAAmB,CAAC;AAC3C,WAAW,CAAC,OAAO,GAAG,kBAAkB,CAAC;AACzC,WAAW,CAAC,MAAM,GAAG,iBAAiB,CAAC;AACvC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC;AACrC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC;AACrC,WAAW,CAAC,MAAM,GAAG,iBAAiB,CAAC;AAEvC,eAAe,WAAW,CAAC"}
|
|
@@ -10,14 +10,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React, { forwardRef } from "react";
|
|
13
|
+
import { PencilIcon } from "@navikt/aksel-icons";
|
|
13
14
|
import { Link } from "../../link/index.js";
|
|
14
15
|
import { useRenameCSS } from "../../theme/Theme.js";
|
|
16
|
+
import { CompositionWarning } from "../../util/composition-warning/index.js";
|
|
15
17
|
import { useI18n } from "../../util/i18n/i18n.hooks.js";
|
|
16
18
|
export const FormSummaryEditLink = forwardRef((_a, ref) => {
|
|
17
19
|
var { children, className, as = "a" } = _a, rest = __rest(_a, ["children", "className", "as"]);
|
|
18
20
|
const { cn } = useRenameCSS();
|
|
19
21
|
const translate = useI18n("FormSummary");
|
|
20
|
-
return (React.createElement(
|
|
22
|
+
return (React.createElement(CompositionWarning.Forbidden, { name: "FormSummary.Header", message: "<FormSummary.EditLink> should not be placed in <FormSummary.Header> anymore. See https://aksel.nav.no/komponenter/core/formsummary" },
|
|
23
|
+
React.createElement(Link, Object.assign({ ref: ref, as: as }, rest, { className: cn("navds-form-summary__edit", className) }),
|
|
24
|
+
React.createElement(PencilIcon, { "aria-hidden": true, fontSize: "1.5rem" }),
|
|
25
|
+
children || translate("editAnswer"))));
|
|
21
26
|
});
|
|
22
27
|
export default FormSummaryEditLink;
|
|
23
28
|
//# sourceMappingURL=FormSummaryEditLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSummaryEditLink.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummaryEditLink.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAkBrD,MAAM,CAAC,MAAM,mBAAmB,GAG5B,UAAU,CAAC,CAAC,EAA0C,EAAE,GAAG,EAAE,EAAE;QAAnD,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,GAAG,OAAW,EAAN,IAAI,cAAxC,+BAA0C,CAAF;IACtD,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"FormSummaryEditLink.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummaryEditLink.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAkBrD,MAAM,CAAC,MAAM,mBAAmB,GAG5B,UAAU,CAAC,CAAC,EAA0C,EAAE,GAAG,EAAE,EAAE;QAAnD,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,GAAG,OAAW,EAAN,IAAI,cAAxC,+BAA0C,CAAF;IACtD,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;IAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEzC,OAAO,CACL,oBAAC,kBAAkB,CAAC,SAAS,IAC3B,IAAI,EAAC,oBAAoB,EACzB,OAAO,EAAC,oIAAoI;QAE5I,oBAAC,IAAI,kBACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,IACF,IAAI,IACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC;YAEpD,oBAAC,UAAU,yBAAa,QAAQ,EAAC,QAAQ,GAAG;YAC3C,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,CAC/B,CACsB,CAChC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Footer slot for actions in `FormSummary`.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormSummaryFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Should include `<FormSummary.EditLink>`.
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormSummaryFooter: React.ForwardRefExoticComponent<FormSummaryFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default FormSummaryFooter;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { forwardRef } from "react";
|
|
13
|
+
import { useRenameCSS } from "../../theme/Theme.js";
|
|
14
|
+
export const FormSummaryFooter = forwardRef((_a, ref) => {
|
|
15
|
+
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
16
|
+
const { cn } = useRenameCSS();
|
|
17
|
+
return (React.createElement("div", Object.assign({ ref: ref, "data-color": "info" }, rest, { className: cn("navds-form-summary__footer", className) }), children));
|
|
18
|
+
});
|
|
19
|
+
export default FormSummaryFooter;
|
|
20
|
+
//# sourceMappingURL=FormSummaryFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSummaryFooter.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummaryFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAajD,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAGzC,CAAC,EAAgC,EAAE,GAAG,EAAE,EAAE;QAAzC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAC/B,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;IAE9B,OAAO,CACL,2CACE,GAAG,EAAE,GAAG,gBACG,MAAM,IACb,IAAI,IACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAErD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface FormSummaryHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/**
|
|
4
|
-
* Must include `<FormSummary.Heading
|
|
4
|
+
* Must include `<FormSummary.Heading>`.
|
|
5
5
|
*/
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -11,10 +11,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React, { forwardRef } from "react";
|
|
13
13
|
import { useRenameCSS } from "../../theme/Theme.js";
|
|
14
|
+
import { CompositionWarning } from "../../util/composition-warning/index.js";
|
|
14
15
|
export const FormSummaryHeader = forwardRef((_a, ref) => {
|
|
15
16
|
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
16
17
|
const { cn } = useRenameCSS();
|
|
17
|
-
return (React.createElement(
|
|
18
|
+
return (React.createElement(CompositionWarning.Root, { name: "FormSummary.Header" },
|
|
19
|
+
React.createElement("div", Object.assign({ ref: ref }, rest, { className: cn("navds-form-summary__header", className) }), children)));
|
|
18
20
|
});
|
|
19
21
|
export default FormSummaryHeader;
|
|
20
22
|
//# sourceMappingURL=FormSummaryHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSummaryHeader.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummaryHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormSummaryHeader.js","sourceRoot":"","sources":["../../../src/form/form-summary/FormSummaryHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAUpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAGzC,CAAC,EAAwD,EAAE,GAAG,EAAE,EAAE;QAAjE,EAAE,QAAQ,EAAE,SAAS,OAAmC,EAA9B,IAAI,cAA9B,yBAAgC,CAAF;IAC/B,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC;IAE9B,OAAO,CACL,oBAAC,kBAAkB,CAAC,IAAI,IAAC,IAAI,EAAC,oBAAoB;QAChD,2CACE,GAAG,EAAE,GAAG,IACJ,IAAI,IACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAErD,QAAQ,CACL,CACkB,CAC3B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { default as FormSummary, type FormSummaryProps } from "./FormSummary.js"
|
|
|
2
2
|
export { default as FormSummaryAnswer, type FormSummaryAnswerProps, } from "./FormSummaryAnswer.js";
|
|
3
3
|
export { default as FormSummaryAnswers, type FormSummaryAnswersProps, } from "./FormSummaryAnswers.js";
|
|
4
4
|
export { default as FormSummaryEditLink, type FormSummaryEditProps, } from "./FormSummaryEditLink.js";
|
|
5
|
+
export { default as FormSummaryFooter, type FormSummaryFooterProps, } from "./FormSummaryFooter.js";
|
|
5
6
|
export { default as FormSummaryHeader, type FormSummaryHeaderProps, } from "./FormSummaryHeader.js";
|
|
6
7
|
export { default as FormSummaryHeading, type FormSummaryHeadingProps, } from "./FormSummaryHeading.js";
|
|
7
8
|
export { default as FormSummaryLabel, type FormSummaryLabelProps, } from "./FormSummaryLabel.js";
|
|
@@ -3,6 +3,7 @@ export { default as FormSummary } from "./FormSummary.js";
|
|
|
3
3
|
export { default as FormSummaryAnswer, } from "./FormSummaryAnswer.js";
|
|
4
4
|
export { default as FormSummaryAnswers, } from "./FormSummaryAnswers.js";
|
|
5
5
|
export { default as FormSummaryEditLink, } from "./FormSummaryEditLink.js";
|
|
6
|
+
export { default as FormSummaryFooter, } from "./FormSummaryFooter.js";
|
|
6
7
|
export { default as FormSummaryHeader, } from "./FormSummaryHeader.js";
|
|
7
8
|
export { default as FormSummaryHeading, } from "./FormSummaryHeading.js";
|
|
8
9
|
export { default as FormSummaryLabel, } from "./FormSummaryLabel.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/form/form-summary/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,OAAO,IAAI,WAAW,EAAyB,MAAM,eAAe,CAAC;AAC9E,OAAO,EACL,OAAO,IAAI,iBAAiB,GAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,OAAO,IAAI,mBAAmB,GAE/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,IAAI,iBAAiB,GAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/form/form-summary/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,OAAO,IAAI,WAAW,EAAyB,MAAM,eAAe,CAAC;AAC9E,OAAO,EACL,OAAO,IAAI,iBAAiB,GAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,OAAO,IAAI,mBAAmB,GAE/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,IAAI,iBAAiB,GAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,iBAAiB,GAE7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,kBAAkB,GAE9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -26,7 +26,7 @@ export interface TimelinePeriodProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
26
26
|
/**
|
|
27
27
|
* Callback when selecting a period.
|
|
28
28
|
*/
|
|
29
|
-
onSelectPeriod?: (
|
|
29
|
+
onSelectPeriod?: (event: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => void;
|
|
30
30
|
/**
|
|
31
31
|
* Content displayed in Popover on click.
|
|
32
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/timeline/period/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/timeline/period/index.tsx"],"names":[],"mappings":"AAAA,O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,IAEnB,QAAQ,CACO,CACnB,CAAC,CAAC,CAAC,CACF,oBAAC,kBAAkB,IACjB,SAAS,EAAE,GAAG,EACd,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,IAAI,EAAE,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC,CACY,CAAC;AAEhB,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAC;AAEhC,eAAe,MAAM,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import type { TimelineRowProps } from "../index.js";
|
|
2
3
|
import { Period } from "./types.external.js";
|
|
3
|
-
type
|
|
4
|
-
label
|
|
4
|
+
type ParsedRow = {
|
|
5
|
+
label: string;
|
|
5
6
|
icon?: React.ReactNode;
|
|
6
|
-
headingTag
|
|
7
|
+
headingTag?: string;
|
|
7
8
|
periods: Omit<Period, "id" | "endInclusive">[];
|
|
8
|
-
restProps:
|
|
9
|
-
ref
|
|
9
|
+
restProps: Omit<TimelineRowProps, "label" | "icon" | "headingTag">;
|
|
10
|
+
ref?: React.Ref<HTMLOListElement>;
|
|
10
11
|
};
|
|
11
|
-
export declare const parseRows: (rowChildren: ReactNode[]) =>
|
|
12
|
+
export declare const parseRows: (rowChildren: ReactNode[]) => ParsedRow[];
|
|
12
13
|
export {};
|
|
@@ -1,72 +1,49 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { omit } from "../../util/index.js";
|
|
3
|
+
import { getChildRef } from "../../util/getChildRef.js";
|
|
3
4
|
export const parseRows = (rowChildren) => {
|
|
4
5
|
const parsedChildren = [];
|
|
5
|
-
rowChildren === null || rowChildren === void 0 ? void 0 : rowChildren.forEach((
|
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
6
|
+
rowChildren === null || rowChildren === void 0 ? void 0 : rowChildren.forEach((row) => {
|
|
7
7
|
const periods = [];
|
|
8
|
-
if (React.isValidElement(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
status: ((_d = p === null || p === void 0 ? void 0 : p.props) === null || _d === void 0 ? void 0 : _d.status) || "neutral",
|
|
16
|
-
onSelectPeriod: (_e = p.props) === null || _e === void 0 ? void 0 : _e.onSelectPeriod,
|
|
17
|
-
label: r.props.label,
|
|
18
|
-
icon: p.props.icon,
|
|
19
|
-
children: p.props.children,
|
|
20
|
-
isActive: p.props.isActive,
|
|
21
|
-
statusLabel: p.props.statusLabel,
|
|
22
|
-
restProps: omit(p.props, [
|
|
23
|
-
"start",
|
|
24
|
-
"end",
|
|
25
|
-
"status",
|
|
26
|
-
"onSelectPeriod",
|
|
27
|
-
"label",
|
|
28
|
-
"icon",
|
|
29
|
-
"children",
|
|
30
|
-
"isActive",
|
|
31
|
-
"statusLabel",
|
|
32
|
-
]),
|
|
33
|
-
ref: p === null || p === void 0 ? void 0 : p.ref,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
periods.push({
|
|
39
|
-
start: r.props.children.props.start,
|
|
40
|
-
end: r.props.children.props.end,
|
|
41
|
-
status: ((_f = r.props.children.props) === null || _f === void 0 ? void 0 : _f.status) || "neutral",
|
|
42
|
-
onSelectPeriod: (_g = r.props.children.props) === null || _g === void 0 ? void 0 : _g.onSelectPeriod,
|
|
43
|
-
label: r.props.label,
|
|
44
|
-
icon: (_h = r.props.children.props) === null || _h === void 0 ? void 0 : _h.icon,
|
|
45
|
-
children: (_j = r.props.children.props) === null || _j === void 0 ? void 0 : _j.children,
|
|
46
|
-
statusLabel: (_k = r.props.children.props) === null || _k === void 0 ? void 0 : _k.statusLabel,
|
|
47
|
-
restProps: omit(r.props.children.props, [
|
|
48
|
-
"start",
|
|
49
|
-
"end",
|
|
50
|
-
"status",
|
|
51
|
-
"onSelectPeriod",
|
|
52
|
-
"label",
|
|
53
|
-
"icon",
|
|
54
|
-
"children",
|
|
55
|
-
"isActive",
|
|
56
|
-
"statusLabel",
|
|
57
|
-
]),
|
|
58
|
-
ref: (_m = (_l = r.props) === null || _l === void 0 ? void 0 : _l.children) === null || _m === void 0 ? void 0 : _m.ref,
|
|
59
|
-
});
|
|
8
|
+
if (!React.isValidElement(row) ||
|
|
9
|
+
!row.props.children) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
React.Children.toArray(row.props.children).forEach((period) => {
|
|
13
|
+
if (!React.isValidElement(period)) {
|
|
14
|
+
return;
|
|
60
15
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
16
|
+
periods.push({
|
|
17
|
+
start: period.props.start,
|
|
18
|
+
end: period.props.end,
|
|
19
|
+
status: period.props.status || "neutral",
|
|
20
|
+
onSelectPeriod: period.props.onSelectPeriod,
|
|
21
|
+
icon: period.props.icon,
|
|
22
|
+
children: period.props.children,
|
|
23
|
+
isActive: period.props.isActive,
|
|
24
|
+
statusLabel: period.props.statusLabel,
|
|
25
|
+
restProps: omit(period.props, [
|
|
26
|
+
"start",
|
|
27
|
+
"end",
|
|
28
|
+
"status",
|
|
29
|
+
"onSelectPeriod",
|
|
30
|
+
"icon",
|
|
31
|
+
"children",
|
|
32
|
+
"isActive",
|
|
33
|
+
"statusLabel",
|
|
34
|
+
"placement",
|
|
35
|
+
]),
|
|
36
|
+
ref: getChildRef(period),
|
|
68
37
|
});
|
|
69
|
-
}
|
|
38
|
+
});
|
|
39
|
+
parsedChildren.push({
|
|
40
|
+
label: row.props.label,
|
|
41
|
+
icon: row.props.icon,
|
|
42
|
+
headingTag: row.props.headingTag,
|
|
43
|
+
periods,
|
|
44
|
+
restProps: omit(row.props, ["label", "icon", "headingTag"]),
|
|
45
|
+
ref: getChildRef(row),
|
|
46
|
+
});
|
|
70
47
|
});
|
|
71
48
|
return parsedChildren;
|
|
72
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../src/timeline/utils/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../src/timeline/utils/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAerD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,WAAwB,EAAE,EAAE;IACpD,MAAM,cAAc,GAAgB,EAAE,CAAC;IAEvC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,CAAC,GAAoB,EAAE,EAAE;QAC5C,MAAM,OAAO,GAAyB,EAAE,CAAC;QAEzC,IACE,CAAC,KAAK,CAAC,cAAc,CAA0B,GAAG,CAAC;YACnD,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EACnB,CAAC;YACD,OAAO;QACT,CAAC;QAED,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5D,IAAI,CAAC,KAAK,CAAC,cAAc,CAA6B,MAAM,CAAC,EAAE,CAAC;gBAC9D,OAAO;YACT,CAAC;YAED,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;gBACzB,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG;gBACrB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS;gBACxC,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc;gBAC3C,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI;gBACvB,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;gBAC/B,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;gBAC/B,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;gBACrC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;oBAC5B,OAAO;oBACP,KAAK;oBACL,QAAQ;oBACR,gBAAgB;oBAChB,MAAM;oBACN,UAAU;oBACV,UAAU;oBACV,aAAa;oBACb,WAAW;iBACZ,CAAC;gBACF,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC;aACzB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,IAAI,CAAC;YAClB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK;YACtB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI;YACpB,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU;YAChC,OAAO;YACP,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAC3D,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;SACtB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -7,18 +7,17 @@ export interface Positioned {
|
|
|
7
7
|
}
|
|
8
8
|
export interface Period {
|
|
9
9
|
id: string;
|
|
10
|
-
label?: string;
|
|
11
10
|
start: Date;
|
|
12
11
|
endInclusive: Date;
|
|
13
12
|
status?: PeriodStatus;
|
|
14
|
-
onSelectPeriod?: () => void;
|
|
13
|
+
onSelectPeriod?: (e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
|
|
15
14
|
icon?: React.ReactNode;
|
|
16
15
|
children?: React.ReactNode;
|
|
17
16
|
end: Date;
|
|
18
17
|
isActive?: boolean;
|
|
19
18
|
statusLabel?: string;
|
|
20
19
|
restProps?: any;
|
|
21
|
-
ref?:
|
|
20
|
+
ref?: React.Ref<HTMLDivElement | HTMLButtonElement>;
|
|
22
21
|
}
|
|
23
22
|
export interface PositionedPeriod extends Period, Positioned {
|
|
24
23
|
width: number;
|
|
@@ -11,7 +11,7 @@ export interface Period {
|
|
|
11
11
|
start: Date;
|
|
12
12
|
endInclusive: Date;
|
|
13
13
|
status?: PeriodStatus;
|
|
14
|
-
onSelectPeriod?: () => void;
|
|
14
|
+
onSelectPeriod?: (e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
|
|
15
15
|
icon?: React.ReactNode;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
isActive?: boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Give warnings based on component composition (which slot/parent a child is rendered in).
|
|
3
|
+
*
|
|
4
|
+
* Used when child components need to know which slot/parent they are rendered in
|
|
5
|
+
* (e.g. `FormSummary.Header` vs `FormSummary.Footer`) and should warn or error in development
|
|
6
|
+
* if placed in a discouraged or forbidden slot.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* - Wrap slot components with <CompositionWarning.Root name="FormSummary.Header">...</CompositionWarning.Root>
|
|
10
|
+
* - In child: `<CompositionWarning.Forbidden name="FormSummary.Header" />` to forbid slot.
|
|
11
|
+
*
|
|
12
|
+
* This is guidance only: warnings are logged to the console in development, never enforced at runtime.
|
|
13
|
+
*/
|
|
14
|
+
import React from "react";
|
|
15
|
+
type CompositionName = string;
|
|
16
|
+
type CompositionWarningContextType = {
|
|
17
|
+
/**
|
|
18
|
+
* Name of the slot component we want to check.
|
|
19
|
+
*/
|
|
20
|
+
name: CompositionName;
|
|
21
|
+
};
|
|
22
|
+
declare const CompositionWarning: React.ForwardRefExoticComponent<CompositionWarningContextType & {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
} & React.RefAttributes<unknown>>;
|
|
25
|
+
type CompositionWarningForbiddenProps = {
|
|
26
|
+
children?: React.ReactElement;
|
|
27
|
+
/**
|
|
28
|
+
* Name of the parent slot component where the child is not allowed.
|
|
29
|
+
*/
|
|
30
|
+
name: CompositionName;
|
|
31
|
+
/**
|
|
32
|
+
* Warning message to display if the child is found.
|
|
33
|
+
*/
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
declare function CompositionWarningForbidden({ children, name, message, }: CompositionWarningForbiddenProps): React.JSX.Element;
|
|
37
|
+
export { CompositionWarningForbidden as Forbidden, CompositionWarning as Root };
|