@arbeidstilsynet/design-react 0.10.3 → 0.11.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/index.js +157 -48
- package/dist/index.js.map +1 -1
- package/dist/src/components/filepicker/filepicker.d.ts +1 -1
- package/dist/src/components/filepicker/filepickerDropzone.d.ts +1 -1
- package/dist/src/components/filepicker/filepickerErrors.d.ts +1 -1
- package/dist/src/components/filepicker/filepickerFiles.d.ts +1 -1
- package/dist/src/components/header/header.d.ts +1 -1
- package/dist/src/components/header/headerIllustration.d.ts +1 -1
- package/dist/src/components/header/headerLogo.d.ts +1 -1
- package/dist/src/components/header/headerMenu.d.ts +1 -1
- package/dist/src/components/header/headerMenuRow.d.ts +3 -3
- package/dist/src/components/header/headerNavbar.d.ts +1 -1
- package/dist/src/components/header/headerTitle.d.ts +1 -1
- package/dist/src/components/header/stories-helpers/headerStoriesIllustration.d.ts +1 -1
- package/dist/src/components/header/stories-helpers/headerStoriesTitle.d.ts +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/lightdarkimage/index.d.ts +1 -1
- package/dist/src/components/logo/logoblack.d.ts +1 -1
- package/dist/src/components/logo/logogreen.d.ts +1 -1
- package/dist/src/components/logo/logowhite.d.ts +1 -1
- package/dist/src/components/steps/index.d.ts +60 -0
- package/dist/src/components/steps/steps.d.ts +27 -0
- package/dist/src/components/steps/stepsStep.d.ts +22 -0
- package/dist/src/components/steps/stepsStepDescription.d.ts +5 -0
- package/dist/src/components/steps/stepsStepDetails.d.ts +5 -0
- package/dist/src/components/steps/stepsStepMark.d.ts +25 -0
- package/dist/src/components/steps/stepsStepTitle.d.ts +5 -0
- package/dist/src/docs-components/CssVariables.d.ts +1 -1
- package/package.json +30 -36
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import { ChevronDownIcon, ChevronUpIcon, CloudUpIcon, MenuHamburgerIcon, TrashIc
|
|
|
5
5
|
import { useDropzone } from "react-dropzone";
|
|
6
6
|
import { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_AvatarStack, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading, Input, Label, Link, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation } from "@digdir/designsystemet-react";
|
|
7
7
|
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
-
import clsx from "clsx";
|
|
8
|
+
import clsx$1, { clsx } from "clsx";
|
|
9
9
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/lite.mjs
|
|
10
|
-
function clsx$
|
|
10
|
+
function clsx$2() {
|
|
11
11
|
for (var t, r = 0, e = "", n = arguments.length; r < n; r++) (t = arguments[r]) && "string" == typeof t && (e += (e && " ") + t);
|
|
12
12
|
return e;
|
|
13
13
|
}
|
|
@@ -28,7 +28,7 @@ var FilePickerContext = createContext({
|
|
|
28
28
|
function FilePicker$1({ ref, className, children, disabled = false, isWaiting = false, files, errors, onAdd, onRemove, ...rest }) {
|
|
29
29
|
return /* @__PURE__ */ jsx("div", {
|
|
30
30
|
ref,
|
|
31
|
-
className: clsx$
|
|
31
|
+
className: clsx$2("at-filepicker", className),
|
|
32
32
|
"data-disabled": disabled,
|
|
33
33
|
...rest,
|
|
34
34
|
children: /* @__PURE__ */ jsx(FilePickerContext, {
|
|
@@ -46,6 +46,11 @@ function FilePicker$1({ ref, className, children, disabled = false, isWaiting =
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/components/filepicker/filepickerDropzone.tsx
|
|
49
|
+
var defaultDropzoneLabelText = [
|
|
50
|
+
"Dra og slipp eller",
|
|
51
|
+
"Last opp fil",
|
|
52
|
+
"Filformater: pdf, txt og docx"
|
|
53
|
+
];
|
|
49
54
|
function DefaultLabel({ defaultLabelText }) {
|
|
50
55
|
const text1 = defaultLabelText?.[0];
|
|
51
56
|
const text2 = defaultLabelText?.[1];
|
|
@@ -70,11 +75,7 @@ function DefaultLabel({ defaultLabelText }) {
|
|
|
70
75
|
*
|
|
71
76
|
* Pass either `label` or `defaultLabelText` to customize the label.
|
|
72
77
|
*/
|
|
73
|
-
function FilePickerDropzone({ className, label, defaultLabelText =
|
|
74
|
-
"Dra og slipp eller",
|
|
75
|
-
"Last opp fil",
|
|
76
|
-
"Filformater: pdf, txt og docx"
|
|
77
|
-
], dropLabel = "Slipp for å legge til", ...rest }) {
|
|
78
|
+
function FilePickerDropzone({ className, label, defaultLabelText = defaultDropzoneLabelText, dropLabel = "Slipp for å legge til", ...rest }) {
|
|
78
79
|
const { onAdd, disabled, isWaiting, errors } = use(FilePickerContext);
|
|
79
80
|
const isDisabled = Boolean(disabled || isWaiting);
|
|
80
81
|
const onDrop = (acceptedFiles) => {
|
|
@@ -94,7 +95,7 @@ function FilePickerDropzone({ className, label, defaultLabelText = [
|
|
|
94
95
|
...getRootProps({
|
|
95
96
|
role: "group",
|
|
96
97
|
"aria-disabled": isDisabled || void 0,
|
|
97
|
-
className: clsx$
|
|
98
|
+
className: clsx$2("at-filepicker-dropzone-wrapper", className),
|
|
98
99
|
...rest
|
|
99
100
|
}),
|
|
100
101
|
children: [/* @__PURE__ */ jsx("input", {
|
|
@@ -107,7 +108,7 @@ function FilePickerDropzone({ className, label, defaultLabelText = [
|
|
|
107
108
|
"aria-label": "Processing files",
|
|
108
109
|
"data-size": "lg"
|
|
109
110
|
}),
|
|
110
|
-
className: clsx$
|
|
111
|
+
className: clsx$2("at-filepicker-dropzone", isDragActive && "is-drag", errors && errors.length > 0 && "has-error"),
|
|
111
112
|
onClick: () => {
|
|
112
113
|
if (!isDisabled) open();
|
|
113
114
|
},
|
|
@@ -124,7 +125,7 @@ function FilePickerErrors({ className, ...rest }) {
|
|
|
124
125
|
const { errors } = use(FilePickerContext);
|
|
125
126
|
if (!errors?.length) return null;
|
|
126
127
|
return /* @__PURE__ */ jsx("output", {
|
|
127
|
-
className: clsx$
|
|
128
|
+
className: clsx$2("at-filepicker-errors", className),
|
|
128
129
|
...rest,
|
|
129
130
|
children: errors.map((error, index) => /* @__PURE__ */ jsx(ValidationMessage, { children: error }, index))
|
|
130
131
|
});
|
|
@@ -145,19 +146,19 @@ function formatFileSize(bytes) {
|
|
|
145
146
|
}
|
|
146
147
|
//#endregion
|
|
147
148
|
//#region src/components/filepicker/filepickerFiles.tsx
|
|
148
|
-
|
|
149
|
-
* Displays files added to the parent `FilePicker` component.
|
|
150
|
-
*/
|
|
151
|
-
function FilePickerFiles({ className, columnNames = [
|
|
149
|
+
var defaultColumnNames = [
|
|
152
150
|
"Navn",
|
|
153
151
|
"Størrelse",
|
|
154
152
|
""
|
|
155
|
-
]
|
|
153
|
+
];
|
|
154
|
+
/**
|
|
155
|
+
* Displays files added to the parent `FilePicker` component.
|
|
156
|
+
*/
|
|
157
|
+
function FilePickerFiles({ className, columnNames = defaultColumnNames, removeButtonLabel = "Fjern", ...rest }) {
|
|
156
158
|
const { files, onRemove, disabled } = use(FilePickerContext);
|
|
157
159
|
if (!files?.length) return null;
|
|
158
160
|
return /* @__PURE__ */ jsxs(Table, {
|
|
159
|
-
|
|
160
|
-
className: clsx$1("at-filepicker-files-table", className),
|
|
161
|
+
className: clsx$2("at-filepicker-files-table", className),
|
|
161
162
|
...rest,
|
|
162
163
|
children: [/* @__PURE__ */ jsx(Table.Head, { children: /* @__PURE__ */ jsxs(Table.Row, { children: [
|
|
163
164
|
/* @__PURE__ */ jsx(Table.HeaderCell, {
|
|
@@ -198,17 +199,15 @@ function FilePickerFiles({ className, columnNames = [
|
|
|
198
199
|
title: size,
|
|
199
200
|
children: size
|
|
200
201
|
}),
|
|
201
|
-
/* @__PURE__ */ jsx(Table.Cell, {
|
|
202
|
+
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsxs(Button, {
|
|
202
203
|
"data-color": "danger",
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
211
|
-
})
|
|
204
|
+
variant: "tertiary",
|
|
205
|
+
disabled,
|
|
206
|
+
"aria-label": `Remove ${file.name}`,
|
|
207
|
+
onClick: () => onRemove(id),
|
|
208
|
+
className: "at-filepicker-files-file__button",
|
|
209
|
+
children: [removeButtonLabel, /* @__PURE__ */ jsx(TrashIcon, { "aria-hidden": true })]
|
|
210
|
+
}) })
|
|
212
211
|
]
|
|
213
212
|
}, id);
|
|
214
213
|
}) })]
|
|
@@ -249,7 +248,8 @@ var HeaderContext = createContext({
|
|
|
249
248
|
});
|
|
250
249
|
//#endregion
|
|
251
250
|
//#region src/components/header/header.tsx
|
|
252
|
-
|
|
251
|
+
var defaultLinks = [];
|
|
252
|
+
function Header$1({ ref, className, children, links = defaultLinks, ...rest }) {
|
|
253
253
|
const internalRef = useRef(null);
|
|
254
254
|
const headerRef = ref ?? internalRef;
|
|
255
255
|
return /* @__PURE__ */ jsx(HeaderContext, {
|
|
@@ -259,7 +259,7 @@ function Header$1({ ref, className, children, links = [], ...rest }) {
|
|
|
259
259
|
},
|
|
260
260
|
children: /* @__PURE__ */ jsx("header", {
|
|
261
261
|
ref: headerRef,
|
|
262
|
-
className: clsx$
|
|
262
|
+
className: clsx$2("at-header", className),
|
|
263
263
|
...rest,
|
|
264
264
|
children: /* @__PURE__ */ jsx("div", {
|
|
265
265
|
className: "at-header__container",
|
|
@@ -286,7 +286,7 @@ function Header$1({ ref, className, children, links = [], ...rest }) {
|
|
|
286
286
|
*/
|
|
287
287
|
function HeaderIllustration({ className, children, ...rest }) {
|
|
288
288
|
return /* @__PURE__ */ jsx("div", {
|
|
289
|
-
className: clsx$
|
|
289
|
+
className: clsx$2("at-header__illustration", className),
|
|
290
290
|
...rest,
|
|
291
291
|
children
|
|
292
292
|
});
|
|
@@ -310,7 +310,7 @@ function HeaderIllustration({ className, children, ...rest }) {
|
|
|
310
310
|
*/
|
|
311
311
|
function HeaderLogo({ className, children, ...rest }) {
|
|
312
312
|
return /* @__PURE__ */ jsx("div", {
|
|
313
|
-
className: clsx$
|
|
313
|
+
className: clsx$2("at-header__logo", className),
|
|
314
314
|
...rest,
|
|
315
315
|
children
|
|
316
316
|
});
|
|
@@ -320,11 +320,11 @@ function HeaderLogo({ className, children, ...rest }) {
|
|
|
320
320
|
var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/components/hooks/useMediaQuery.ts
|
|
323
|
-
var IS_SERVER =
|
|
323
|
+
var IS_SERVER = globalThis.window === void 0;
|
|
324
324
|
function useMediaQuery$1(query, { defaultValue = false, initializeWithValue = true } = {}) {
|
|
325
|
-
const getMatches = (
|
|
325
|
+
const getMatches = (q) => {
|
|
326
326
|
if (IS_SERVER) return defaultValue;
|
|
327
|
-
return
|
|
327
|
+
return globalThis.matchMedia(q).matches;
|
|
328
328
|
};
|
|
329
329
|
const [matches, setMatches] = useState(() => {
|
|
330
330
|
if (initializeWithValue) return getMatches(query);
|
|
@@ -334,7 +334,7 @@ function useMediaQuery$1(query, { defaultValue = false, initializeWithValue = tr
|
|
|
334
334
|
setMatches(getMatches(query));
|
|
335
335
|
}
|
|
336
336
|
useIsomorphicLayoutEffect$1(() => {
|
|
337
|
-
const matchMedia =
|
|
337
|
+
const matchMedia = globalThis.matchMedia(query);
|
|
338
338
|
handleChange();
|
|
339
339
|
if (matchMedia.addListener) matchMedia.addListener(handleChange);
|
|
340
340
|
else matchMedia.addEventListener("change", handleChange);
|
|
@@ -413,7 +413,7 @@ function HeaderMenu({ className, children, triggerContent, mobileMenuText = "Men
|
|
|
413
413
|
};
|
|
414
414
|
}, [open, headerRef]);
|
|
415
415
|
return /* @__PURE__ */ jsxs("div", {
|
|
416
|
-
className: clsx$
|
|
416
|
+
className: clsx$2("at-header__right", className),
|
|
417
417
|
...rest,
|
|
418
418
|
children: [/* @__PURE__ */ jsxs(Dropdown.TriggerContext, { children: [/* @__PURE__ */ jsx(Dropdown.Trigger, {
|
|
419
419
|
variant: isMobile ? "primary" : "tertiary",
|
|
@@ -428,14 +428,14 @@ function HeaderMenu({ className, children, triggerContent, mobileMenuText = "Men
|
|
|
428
428
|
style: { top: isMobile ? `${headerBottom - 1}px` : void 0 },
|
|
429
429
|
children: /* @__PURE__ */ jsxs(Dropdown.List, { children: [
|
|
430
430
|
links?.map((link, index) => /* @__PURE__ */ jsx(Dropdown.Item, { children: /* @__PURE__ */ jsx("div", {
|
|
431
|
-
className: clsx$
|
|
431
|
+
className: clsx$2("at-header__dropdown-controls", "at-header__dropdown-item-mobile"),
|
|
432
432
|
children: isValidElement(link) ? /* @__PURE__ */ jsx(Slot, {
|
|
433
|
-
className: clsx$
|
|
433
|
+
className: clsx$2("at-header__link", "ds-link"),
|
|
434
434
|
children: link
|
|
435
435
|
}) : link
|
|
436
436
|
}) }, "nav-" + index)),
|
|
437
437
|
links && links.length > 0 && /* @__PURE__ */ jsx(Dropdown.Item, { children: /* @__PURE__ */ jsx("div", {
|
|
438
|
-
className: clsx$
|
|
438
|
+
className: clsx$2("at-header__dropdown-item-mobile at-header__dropdown-controls"),
|
|
439
439
|
children: /* @__PURE__ */ jsx(Divider, {})
|
|
440
440
|
}) }),
|
|
441
441
|
children && /* @__PURE__ */ jsx(Dropdown.Item, { children: /* @__PURE__ */ jsx("div", {
|
|
@@ -467,19 +467,19 @@ function HeaderMenu({ className, children, triggerContent, mobileMenuText = "Men
|
|
|
467
467
|
*/
|
|
468
468
|
function HeaderMenuRow({ className, padded, ...rest }) {
|
|
469
469
|
return /* @__PURE__ */ jsx(Slot, {
|
|
470
|
-
className: clsx("at-header__menu-row", padded && "padded", className),
|
|
470
|
+
className: clsx$1("at-header__menu-row", padded && "padded", className),
|
|
471
471
|
...rest
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
function HeaderMenuIcon({ className, ...rest }) {
|
|
475
475
|
return /* @__PURE__ */ jsx("div", {
|
|
476
|
-
className: clsx("at-header__menu-icon", className),
|
|
476
|
+
className: clsx$1("at-header__menu-icon", className),
|
|
477
477
|
...rest
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
function HeaderMenuBadge({ className, color = "info", ...rest }) {
|
|
481
481
|
return /* @__PURE__ */ jsx("div", {
|
|
482
|
-
className: clsx(`at-header__menu-badge-${color}`, className),
|
|
482
|
+
className: clsx$1(`at-header__menu-badge-${color}`, className),
|
|
483
483
|
...rest
|
|
484
484
|
});
|
|
485
485
|
}
|
|
@@ -504,11 +504,11 @@ function HeaderMenuBadge({ className, color = "info", ...rest }) {
|
|
|
504
504
|
function HeaderNavbar({ className, ...rest }) {
|
|
505
505
|
const { links } = use(HeaderContext);
|
|
506
506
|
return /* @__PURE__ */ jsx("nav", {
|
|
507
|
-
className: clsx$
|
|
507
|
+
className: clsx$2("at-header__center", className),
|
|
508
508
|
...rest,
|
|
509
509
|
children: links?.map((link, idx) => {
|
|
510
510
|
if (isValidElement(link)) return /* @__PURE__ */ jsx(Slot, {
|
|
511
|
-
className: clsx$
|
|
511
|
+
className: clsx$2("at-header__link", "ds-link"),
|
|
512
512
|
children: link
|
|
513
513
|
}, link.key ?? idx);
|
|
514
514
|
return link;
|
|
@@ -534,7 +534,7 @@ function HeaderNavbar({ className, ...rest }) {
|
|
|
534
534
|
*/
|
|
535
535
|
function HeaderTitle({ className, children, ...rest }) {
|
|
536
536
|
return /* @__PURE__ */ jsx("div", {
|
|
537
|
-
className: clsx$
|
|
537
|
+
className: clsx$2("at-header__left", className),
|
|
538
538
|
...rest,
|
|
539
539
|
children
|
|
540
540
|
});
|
|
@@ -640,7 +640,7 @@ var Header = Object.assign(Header$1, {
|
|
|
640
640
|
*/
|
|
641
641
|
function LightDarkImage({ className, light, dark, ...rest }) {
|
|
642
642
|
return /* @__PURE__ */ jsxs("span", {
|
|
643
|
-
className: clsx("at-lightdarkimage", className),
|
|
643
|
+
className: clsx$1("at-lightdarkimage", className),
|
|
644
644
|
...rest,
|
|
645
645
|
children: [/* @__PURE__ */ jsx("span", {
|
|
646
646
|
className: "at-lightdarkimage-light",
|
|
@@ -902,6 +902,115 @@ var LogoWhite = ({ width = "100%" }) => /* @__PURE__ */ jsxs("svg", {
|
|
|
902
902
|
]
|
|
903
903
|
});
|
|
904
904
|
//#endregion
|
|
905
|
-
|
|
905
|
+
//#region src/components/steps/steps.tsx
|
|
906
|
+
function Steps$1({ className, ...rest }) {
|
|
907
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
908
|
+
className: clsx$2("at-steps", className),
|
|
909
|
+
...rest
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region src/components/steps/stepsStep.tsx
|
|
914
|
+
function StepsStep({ className, ...rest }) {
|
|
915
|
+
return /* @__PURE__ */ jsx("li", {
|
|
916
|
+
className: clsx("at-steps__step", className),
|
|
917
|
+
...rest
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region src/components/steps/stepsStepDescription.tsx
|
|
922
|
+
function StepsStepDescription({ className, ...rest }) {
|
|
923
|
+
return /* @__PURE__ */ jsx("small", {
|
|
924
|
+
className: clsx("at-steps__description", className),
|
|
925
|
+
...rest
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
//#endregion
|
|
929
|
+
//#region src/components/steps/stepsStepDetails.tsx
|
|
930
|
+
function StepsStepDetails({ className, ...rest }) {
|
|
931
|
+
return /* @__PURE__ */ jsx("small", {
|
|
932
|
+
className: clsx("at-steps__details", className),
|
|
933
|
+
...rest
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/components/steps/stepsStepMark.tsx
|
|
938
|
+
/**
|
|
939
|
+
* Renders the visual indicator (dot) for a step.
|
|
940
|
+
*
|
|
941
|
+
* Two usage modes:
|
|
942
|
+
* - **With children** — pass an icon element as children; it will be rendered
|
|
943
|
+
* inside the dot at the correct size and colour.
|
|
944
|
+
* - **Without children** — leave empty and control appearance with `data-color`:
|
|
945
|
+
* - No `data-color`: inherits the auto-state (empty dot, check when passed, etc.)
|
|
946
|
+
* - `"danger"` or `"warning"`: filled dot with a close (×) icon.
|
|
947
|
+
* - `"info"`: filled dot with an info (!) icon.
|
|
948
|
+
* - Any other palette value: filled dot in that colour with no icon.
|
|
949
|
+
*/
|
|
950
|
+
function StepsStepMark({ className, ...rest }) {
|
|
951
|
+
return /* @__PURE__ */ jsx("mark", {
|
|
952
|
+
className: clsx$1("at-steps__step-mark", className),
|
|
953
|
+
...rest
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
//#endregion
|
|
957
|
+
//#region src/components/steps/stepsStepTitle.tsx
|
|
958
|
+
function StepsStepTitle({ className, ...rest }) {
|
|
959
|
+
return /* @__PURE__ */ jsx("strong", {
|
|
960
|
+
className: clsx("at-steps__title", className),
|
|
961
|
+
...rest
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/components/steps/index.tsx
|
|
966
|
+
/**
|
|
967
|
+
* Compound component for displaying a step-by-step progress indicator.
|
|
968
|
+
*
|
|
969
|
+
* ## Subcomponents
|
|
970
|
+
*
|
|
971
|
+
* - `Steps.Step` — Individual step item (renders as `<li>`)
|
|
972
|
+
* - `Steps.StepMark` — Visual dot/icon for the step. Accepts an icon as child. Use `data-color` to override color.
|
|
973
|
+
* - `Steps.StepTitle` — Label for the step
|
|
974
|
+
* - `Steps.StepDescription` — Short secondary text below the title
|
|
975
|
+
* - `Steps.StepDetails` — Additional detail text (e.g. body copy inside a vertical step)
|
|
976
|
+
*
|
|
977
|
+
* ## Props
|
|
978
|
+
*
|
|
979
|
+
* - `data-direction` — Layout direction: `"right"` (default, horizontal), `"down"`, or `"up"` (vertical)
|
|
980
|
+
* - `data-fade` — Fades inactive steps: `"start"`, `"end"`, `"both"`, or `"none"`
|
|
981
|
+
* - `data-state` — Set to `"complete"` to mark all steps as finished
|
|
982
|
+
*
|
|
983
|
+
* Mark the active step with `aria-current="step"` on `Steps.Step`.
|
|
984
|
+
*
|
|
985
|
+
* ## Usage
|
|
986
|
+
*
|
|
987
|
+
* ```tsx
|
|
988
|
+
* <Steps>
|
|
989
|
+
* <Steps.Step>
|
|
990
|
+
* <Steps.StepMark />
|
|
991
|
+
* <Steps.StepTitle>Steg 1</Steps.StepTitle>
|
|
992
|
+
* <Steps.StepDescription>Beskrivelse</Steps.StepDescription>
|
|
993
|
+
* <Steps.StepDetails>Detaljer</Steps.StepDetails>
|
|
994
|
+
* </Steps.Step>
|
|
995
|
+
* <Steps.Step aria-current="step">
|
|
996
|
+
* <Steps.StepMark />
|
|
997
|
+
* <Steps.StepTitle>Steg 2</Steps.StepTitle>
|
|
998
|
+
* </Steps.Step>
|
|
999
|
+
* <Steps.Step>
|
|
1000
|
+
* <Steps.StepMark />
|
|
1001
|
+
* <Steps.StepTitle>Steg 3</Steps.StepTitle>
|
|
1002
|
+
* </Steps.Step>
|
|
1003
|
+
* </Steps>
|
|
1004
|
+
* ```
|
|
1005
|
+
*/
|
|
1006
|
+
var Steps = Object.assign(Steps$1, {
|
|
1007
|
+
Step: StepsStep,
|
|
1008
|
+
StepDescription: StepsStepDescription,
|
|
1009
|
+
StepDetails: StepsStepDetails,
|
|
1010
|
+
StepMark: StepsStepMark,
|
|
1011
|
+
StepTitle: StepsStepTitle
|
|
1012
|
+
});
|
|
1013
|
+
//#endregion
|
|
1014
|
+
export { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_AvatarStack, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, FilePicker, FilePickerContext, FilePickerDropzone, FilePickerErrors, FilePickerFiles, Header, HeaderContext, HeaderIllustration, HeaderLogo, HeaderMenu, HeaderMenuBadge, HeaderMenuIcon, HeaderMenuRow, HeaderNavbar, HeaderTitle, Heading, Input, Label, LightDarkImage, Link, List, ListItem, ListOrdered, ListUnordered, LogoBlack, LogoGreen, LogoWhite, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner, Steps, StepsStep, StepsStepDescription, StepsStepDetails, StepsStepMark, StepsStepTitle, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation };
|
|
906
1015
|
|
|
907
1016
|
//# sourceMappingURL=index.js.map
|