@altinn/altinn-components 0.52.6 → 0.53.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/assets/Button.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/ButtonGroupDivider.css +1 -1
- package/dist/assets/ButtonLabel.css +1 -1
- package/dist/assets/DatepickerTable.css +1 -1
- package/dist/assets/IconButton.css +1 -0
- package/dist/assets/LocaleButton.css +1 -1
- package/dist/assets/ModalBody.css +1 -1
- package/dist/assets/ModalHeader.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/button-BB5sYVKY.js +38 -0
- package/dist/components/AccessAreaListItem/AccessAreaListItem.js +7 -6
- package/dist/components/AccessPackageListItem/AccessPackageListItem.js +3 -2
- package/dist/components/Account/AccountList.js +3 -2
- package/dist/components/Account/AccountListItem.js +6 -5
- package/dist/components/Account/AccountListItemControls.js +16 -16
- package/dist/components/Account/AccountListItemDetails.js +2 -2
- package/dist/components/Account/AccountListVirtual.js +9 -8
- package/dist/components/Account/AccountMenu.js +7 -6
- package/dist/components/Account/AccountMenuButton.js +30 -30
- package/dist/components/Account/AccountNotificationSettings.js +9 -8
- package/dist/components/Account/AccountOrganization.js +7 -6
- package/dist/components/ActivityLog/ActivityLogItem.js +3 -2
- package/dist/components/ActivityLog/ActivityLogSegment.js +3 -2
- package/dist/components/Article/Article.js +3 -2
- package/dist/components/Article/ArticleContact.js +3 -2
- package/dist/components/Article/ArticleHeader.js +3 -2
- package/dist/components/Attachment/AttachmentLink.js +24 -23
- package/dist/components/Banner/Banner.js +10 -19
- package/dist/components/Button/Button.js +22 -58
- package/dist/components/Button/ButtonGroup.js +11 -21
- package/dist/components/Button/ButtonGroupDivider.js +5 -4
- package/dist/components/Button/ButtonIcon.js +5 -4
- package/dist/components/Button/ButtonLabel.js +2 -2
- package/dist/components/Button/ComboButton.js +11 -68
- package/dist/components/Button/FloatingActionButton.js +13 -18
- package/dist/components/Button/IconButton.js +6 -33
- package/dist/components/Button/index.js +16 -16
- package/dist/components/Byline/Byline.js +7 -6
- package/dist/components/ContextMenu/ContextMenu.js +35 -35
- package/dist/components/Dashboard/DashboardCard.js +3 -2
- package/dist/components/Dashboard/DashboardHeader.js +10 -9
- package/dist/components/Dashboard/DashboardIcon.js +3 -2
- package/dist/components/Datepicker/DatepickerHeader.js +22 -22
- package/dist/components/Datepicker/DatepickerTable.js +14 -14
- package/dist/components/Dialog/Dialog.js +3 -2
- package/dist/components/Dialog/DialogActions.js +36 -44
- package/dist/components/Dialog/DialogActivityLog.js +3 -2
- package/dist/components/Dialog/DialogAttachments.js +3 -2
- package/dist/components/Dialog/DialogBody.js +3 -2
- package/dist/components/Dialog/DialogByline.js +3 -2
- package/dist/components/Dialog/DialogContact.js +3 -2
- package/dist/components/Dialog/DialogHeader.js +7 -6
- package/dist/components/Dialog/DialogHistoryItem.js +3 -2
- package/dist/components/Dialog/DialogHistorySegment.js +3 -2
- package/dist/components/Dialog/DialogLayout.js +3 -2
- package/dist/components/Dialog/DialogList.js +5 -4
- package/dist/components/Dialog/DialogListGroup.js +3 -2
- package/dist/components/Dialog/DialogListItem.js +3 -2
- package/dist/components/Dialog/DialogMetadata.js +3 -2
- package/dist/components/Dialog/DialogSection.js +3 -2
- package/dist/components/Dialog/DialogSeenBy.js +3 -2
- package/dist/components/Dialog/DialogSelect.js +5 -4
- package/dist/components/Dialog/DialogStatus.js +3 -2
- package/dist/components/Dialog/DialogTabs.js +3 -2
- package/dist/components/Dialog/SeenByLog.js +9 -8
- package/dist/components/Dialog/SeenByLogButton.js +3 -2
- package/dist/components/Dialog/SeenByLogItem.js +11 -10
- package/dist/components/Dropdown/DrawerButton.js +3 -3
- package/dist/components/Dropdown/DrawerHeader.js +8 -18
- package/dist/components/Dropdown/DrawerOrDropdown.js +7 -6
- package/dist/components/Dropdown/DropdownBase.js +7 -6
- package/dist/components/Dropdown/FloatingDropdown.js +36 -36
- package/dist/components/DsComponents/index.js +15 -16
- package/dist/components/Forms/Checkbox.js +3 -2
- package/dist/components/Forms/CheckboxOptions.js +3 -2
- package/dist/components/Forms/FieldBase.js +3 -2
- package/dist/components/Forms/FieldsetBase.js +3 -2
- package/dist/components/Forms/Radio.js +3 -2
- package/dist/components/Forms/RadioOptions.js +3 -2
- package/dist/components/Forms/SearchField.js +22 -23
- package/dist/components/Forms/SelectField.js +4 -3
- package/dist/components/Forms/Switch.js +3 -2
- package/dist/components/Forms/SwitchOptions.js +3 -2
- package/dist/components/Forms/TextField.js +3 -2
- package/dist/components/Forms/TextareaField.js +3 -2
- package/dist/components/GlobalHeader/AccountSelector.js +2 -2
- package/dist/components/GlobalHeader/GlobalHeader.js +3 -2
- package/dist/components/GlobalHeader/GlobalHeaderBase.js +6 -5
- package/dist/components/GlobalHeader/GlobalSearch.js +7 -6
- package/dist/components/GlobalHeader/GlobalSearchButton.js +8 -7
- package/dist/components/GlobalHeader/HeaderLogo.js +13 -16
- package/dist/components/GlobalMenu/BackButton.js +3 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +9 -8
- package/dist/components/GlobalMenu/GlobalMenuButton.js +2 -2
- package/dist/components/GlobalMenu/LocaleButton.js +3 -2
- package/dist/components/GlobalMenu/LocaleSwitcher.js +3 -2
- package/dist/components/GlobalMenu/LogoutButton.js +6 -8
- package/dist/components/GlobalMenu_old/BackButton.js +3 -2
- package/dist/components/GlobalMenu_old/CurrentAccount.js +5 -4
- package/dist/components/GlobalMenu_old/GlobalMenu.js +11 -10
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +23 -23
- package/dist/components/GlobalMenu_old/LogoutButton.js +6 -8
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/HeaderBase.js +5 -4
- package/dist/components/Header/HeaderButton.js +22 -22
- package/dist/components/Header/HeaderLogo.js +13 -17
- package/dist/components/Header/LocaleButton.js +17 -17
- package/dist/components/Header/LocaleSwitcher.js +8 -7
- package/dist/components/Icon/Icon.js +12 -11
- package/dist/components/Icon/IconOrAvatar.js +15 -14
- package/dist/components/InboxSearch/InboxSearch.js +11 -10
- package/dist/components/Layout/Layout.js +11 -10
- package/dist/components/LayoutAction/ActionHeader.js +18 -18
- package/dist/components/LayoutAction/LayoutAction.js +3 -2
- package/dist/components/List/List.js +3 -2
- package/dist/components/List/ListBase.js +3 -2
- package/dist/components/List/ListItemHeader.js +5 -4
- package/dist/components/List/ListItemIcon.js +3 -2
- package/dist/components/List/ListItemLabel.js +16 -15
- package/dist/components/List/ListItemSelect.js +4 -3
- package/dist/components/Menu/MenuItem.js +15 -14
- package/dist/components/Menu/MenuItemBase.js +5 -5
- package/dist/components/Menu/MenuItemIcon.js +6 -5
- package/dist/components/Menu/MenuItemLabel.js +13 -12
- package/dist/components/Menu/MenuItems.js +1 -0
- package/dist/components/Menu/MenuItemsVirtual.js +26 -25
- package/dist/components/Menu/MenuOption.js +17 -16
- package/dist/components/Menu/MenuSearch.js +3 -2
- package/dist/components/Metadata/MetaItem.js +7 -6
- package/dist/components/Metadata/MetaItemIcon.js +3 -2
- package/dist/components/Metadata/MetaProgress.js +3 -2
- package/dist/components/Metadata/MetaTimestamp.js +7 -6
- package/dist/components/Metadata/Metadata.js +8 -7
- package/dist/components/Modal/Modal.js +13 -13
- package/dist/components/Modal/ModalBase.js +7 -6
- package/dist/components/Modal/ModalBody.js +5 -10
- package/dist/components/Modal/ModalFooter.js +3 -2
- package/dist/components/Modal/ModalHeader.js +26 -36
- package/dist/components/Modal/ModalIcon.js +7 -6
- package/dist/components/Notifications/NotificationItem.js +6 -5
- package/dist/components/Notifications/NotificationItemBase.js +10 -9
- package/dist/components/Notifications/NotificationItemControls.js +14 -24
- package/dist/components/Notifications/NotificationItemIcon.js +8 -7
- package/dist/components/Page/AccordionSection.js +3 -2
- package/dist/components/Page/Breadcrumbs.js +7 -6
- package/dist/components/Page/ContactButtons.js +11 -6
- package/dist/components/Page/ContactSection.js +3 -2
- package/dist/components/Page/PageMenu.js +6 -5
- package/dist/components/Page/PageNav.js +11 -8
- package/dist/components/Page/PageTabs.js +6 -5
- package/dist/components/Page/Section.js +27 -7
- package/dist/components/ResourceListItem/ResourceListItem.js +3 -2
- package/dist/components/RootProvider/RootProvider.js +9 -8
- package/dist/components/Search/SearchItem.js +5 -4
- package/dist/components/Searchbar/Autocomplete.js +3 -2
- package/dist/components/Searchbar/AutocompleteItem.js +11 -10
- package/dist/components/Searchbar/Searchbar.js +10 -9
- package/dist/components/Searchbar/SearchbarField.js +54 -53
- package/dist/components/Settings/BookmarksSettingsList.js +7 -6
- package/dist/components/Settings/SettingsItem.js +3 -2
- package/dist/components/Settings/SettingsItemBase.js +7 -6
- package/dist/components/Settings/SettingsList.js +7 -6
- package/dist/components/Settings/SettingsModal.js +33 -26
- package/dist/components/Settings/SettingsSection.js +3 -2
- package/dist/components/Settings/UsedByLog.js +8 -7
- package/dist/components/Settings/UsedByLogItem.js +10 -9
- package/dist/components/Snackbar/SnackbarItem.js +13 -22
- package/dist/components/Timeline/Timeline.js +3 -2
- package/dist/components/Timeline/TimelineActivity.js +3 -2
- package/dist/components/Timeline/TimelineBase.js +10 -9
- package/dist/components/Timeline/TimelineFooter.js +6 -5
- package/dist/components/Timeline/TimelineHeader.js +3 -2
- package/dist/components/Timeline/TimelineIcon.js +6 -5
- package/dist/components/Timeline/TimelineSection.js +3 -2
- package/dist/components/Timeline/TimelineSegment.js +6 -5
- package/dist/components/Timeline/index.js +2 -4
- package/dist/components/Toolbar/ToolbarAccountMenu.js +18 -17
- package/dist/components/Toolbar/ToolbarAdd.js +5 -4
- package/dist/components/Toolbar/ToolbarButton.js +94 -88
- package/dist/components/Toolbar/ToolbarDaterange.js +3 -2
- package/dist/components/Toolbar/ToolbarFilter.js +24 -23
- package/dist/components/Toolbar/ToolbarFilterBase.js +8 -8
- package/dist/components/Toolbar/ToolbarMenu.js +3 -2
- package/dist/components/Toolbar/ToolbarOptions.js +3 -2
- package/dist/components/Toolbar/ToolbarSearch.js +7 -6
- package/dist/components/Transmission/Transmission.js +8 -7
- package/dist/components/Transmission/TransmissionList.js +8 -7
- package/dist/components/Transmission/TransmissionType.js +3 -2
- package/dist/components/Typography/Heading.js +3 -2
- package/dist/components/UserListItem/UserListItem.js +12 -11
- package/dist/components/index.js +192 -195
- package/dist/functions/name/name.js +16 -12
- package/dist/functions/name/name.spec.js +14 -0
- package/dist/hooks/useAccountSelector.js +46 -46
- package/dist/{index-Dg71_7ad.js → index-DttADHE1.js} +1 -1
- package/dist/index.js +204 -207
- package/dist/{textfield-B_OMMEbF.js → textfield-C_c2H05R.js} +25 -26
- package/dist/types/lib/components/Account/AccountListItemDetails.d.ts +5 -1
- package/dist/types/lib/components/Button/Button.d.ts +21 -10
- package/dist/types/lib/components/Button/Button.stories.d.ts +13 -10
- package/dist/types/lib/components/Button/ButtonGroup.d.ts +6 -6
- package/dist/types/lib/components/Button/ButtonGroup.stories.d.ts +3 -1
- package/dist/types/lib/components/Button/ButtonGroupDivider.d.ts +5 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonLabel.d.ts +1 -1
- package/dist/types/lib/components/Button/ComboButton.d.ts +6 -15
- package/dist/types/lib/components/Button/ComboButton.stories.d.ts +0 -3
- package/dist/types/lib/components/Button/FloatingActionButton.d.ts +5 -12
- package/dist/types/lib/components/Button/IconButton.d.ts +4 -17
- package/dist/types/lib/components/Button/index.d.ts +4 -4
- package/dist/types/lib/components/Datepicker/Datepicker.stories.d.ts +6 -0
- package/dist/types/lib/components/Dialog/DialogActions.d.ts +1 -0
- package/dist/types/lib/components/Dropdown/FloatingDropdown.d.ts +2 -2
- package/dist/types/lib/components/GlobalHeader/HeaderLogo.d.ts +1 -2
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -2
- package/dist/types/lib/components/Header/HeaderLogo.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -2
- package/dist/types/lib/components/Modal/ModalBody.d.ts +2 -3
- package/dist/types/lib/components/Page/ContactButtons.d.ts +1 -0
- package/dist/types/lib/components/Page/Section.d.ts +1 -1
- package/dist/types/lib/components/Settings/SettingsModal.d.ts +1 -0
- package/dist/types/lib/components/Settings/VerifySettingsModal.stories.d.ts +14 -0
- package/dist/types/lib/components/Timeline/index.d.ts +0 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +2 -3
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilterBase.d.ts +2 -2
- package/package.json +2 -1
- package/dist/assets/ButtonBase.css +0 -1
- package/dist/assets/ComboButton.css +0 -1
- package/dist/assets/TimelineLink.css +0 -1
- package/dist/button-MzZgmHyA.js +0 -23
- package/dist/components/Button/ButtonBase.js +0 -41
- package/dist/components/Timeline/TimelineLink.js +0 -36
- package/dist/spinner-0Qe_jRGB.js +0 -23
- package/dist/types/lib/components/Button/ButtonBase.d.ts +0 -26
- package/dist/types/lib/components/Button/IconButton.stories.d.ts +0 -7
- package/dist/types/lib/components/Timeline/TimelineLink.d.ts +0 -9
|
@@ -4,18 +4,17 @@ import xe, { forwardRef as w, useState as A, useRef as F, useEffect as D, create
|
|
|
4
4
|
import { jsx as c, jsxs as _, Fragment as Se } from "react/jsx-runtime";
|
|
5
5
|
import { c as E } from "./lite-1fxw3LjI.js";
|
|
6
6
|
import { S as M, a as _t } from "./index-D7FJjvrv.js";
|
|
7
|
-
import { C as q, u as ke, a as qe, o as ce, p as P, r as Ee, b as _e, i as Nt, c as Mt, d as zt, e as Tt, f as Rt, g as Pt, h as Dt, s as Ft, j as At, k as Ue, l as Lt, m as ae, F as Bt, n as Vt, q as $t, t as jt, v as Wt, w as Kt, x as Ht } from "./index-
|
|
7
|
+
import { C as q, u as ke, a as qe, o as ce, p as P, r as Ee, b as _e, i as Nt, c as Mt, d as zt, e as Tt, f as Rt, g as Pt, h as Dt, s as Ft, j as At, k as Ue, l as Lt, m as ae, F as Bt, n as Vt, q as $t, t as jt, v as Wt, w as Kt, x as Ht } from "./index-DttADHE1.js";
|
|
8
8
|
import { flushSync as Xe } from "react-dom";
|
|
9
|
-
import { S as qt, u as Ut } from "./
|
|
9
|
+
import { S as qt, B as ue, u as Ut } from "./button-BB5sYVKY.js";
|
|
10
10
|
import { V as Ne, u as Me, F as de, a as Xt, b as Yt, c as Ve } from "./index-z82sbSVU.js";
|
|
11
11
|
import { P as Ie } from "./paragraph-BRiIBpbY.js";
|
|
12
|
-
import { I as
|
|
12
|
+
import { I as he } from "./input-wBv_FkEV.js";
|
|
13
13
|
import { S as Gt } from "./XMark-tKk6aExO.js";
|
|
14
14
|
import { S as Jt, a as Qt } from "./ChevronUp-_BBfEirx.js";
|
|
15
15
|
import { L as K } from "./label-xTmTyPhk.js";
|
|
16
16
|
import { u as Zt } from "./useId-BVFxCjkq.js";
|
|
17
17
|
import { S as en } from "./Checkmark-Byz_C9x4.js";
|
|
18
|
-
import { B as he } from "./button-MzZgmHyA.js";
|
|
19
18
|
import { u as U } from "./use-merge-refs-Cj4kTYVj.js";
|
|
20
19
|
import { T as tn } from "./textarea-BBstVlPT.js";
|
|
21
20
|
var nn = function(o, s) {
|
|
@@ -126,7 +125,7 @@ const an = w(({ value: o, asChild: s, ...e }, t) => {
|
|
|
126
125
|
}), ln = (o, s, e) => {
|
|
127
126
|
const t = (e - 1) / 2, n = Math.max(1, Math.min(Math.max(o - Math.floor(t), 1), s - e + 1)), i = Math.min(Math.max(o + Math.ceil(t), e), s), r = Array.from({ length: i + 1 - n }, (a, l) => l + n);
|
|
128
127
|
return e > 4 && n > 1 && r.splice(0, 2, 1, 0), e > 3 && i < s && r.splice(-2, 2, 0, s), r;
|
|
129
|
-
},
|
|
128
|
+
}, mo = ({ currentPage: o = 1, setCurrentPage: s, onChange: e, totalPages: t = 1, showPages: n = 7 }) => J(() => {
|
|
130
129
|
const i = o < t, r = o !== 1, a = (l) => (d) => {
|
|
131
130
|
if (l < 1 || l > t)
|
|
132
131
|
return d.preventDefault();
|
|
@@ -776,7 +775,7 @@ const Qe = w(function({ asChild: s, className: e, ...t }, n) {
|
|
|
776
775
|
return c(Qe, { "data-removable": !0, ref: e, ...s });
|
|
777
776
|
}), et = w(function({ asChild: s, children: e, className: t, "data-size": n, "data-color": i, ...r }, a) {
|
|
778
777
|
const l = r.type ?? "checkbox";
|
|
779
|
-
return _(s ? M : "label", { className: E("ds-chip", t), "data-size": n, "data-color": i, ref: a, children: [c(
|
|
778
|
+
return _(s ? M : "label", { className: E("ds-chip", t), "data-size": n, "data-color": i, ref: a, children: [c(he, { ...r, type: l }), c(_t, { children: e })] });
|
|
780
779
|
}), In = w(function(s, e) {
|
|
781
780
|
return c(et, { ref: e, type: "radio", ...s });
|
|
782
781
|
}), fe = {
|
|
@@ -1223,8 +1222,8 @@ me.Option = ze;
|
|
|
1223
1222
|
me.Empty = ct;
|
|
1224
1223
|
me.Option.displayName = "Combobox.Option";
|
|
1225
1224
|
me.Empty.displayName = "Combobox.Empty";
|
|
1226
|
-
const
|
|
1227
|
-
return _(de, { "data-size": s, className: e, style: t, children: [c(
|
|
1225
|
+
const po = w(function({ "data-size": s, className: e, style: t, children: n, label: i, description: r, error: a, ...l }, d) {
|
|
1226
|
+
return _(de, { "data-size": s, className: e, style: t, children: [c(he, { type: "checkbox", ref: d, ...l }), !!i && c(K, { weight: "regular", children: i }), !!r && c("div", { "data-field": "description", children: r }), !!a && c(Ne, { children: a })] });
|
|
1228
1227
|
}), Te = se({
|
|
1229
1228
|
current: null
|
|
1230
1229
|
}), dt = ({ children: o }) => {
|
|
@@ -1259,12 +1258,12 @@ const Dn = w(function({ asChild: s, children: e, className: t, placement: n = "c
|
|
|
1259
1258
|
}, [r]), D(() => {
|
|
1260
1259
|
const b = (v) => l?.(v), m = f.current;
|
|
1261
1260
|
return m?.addEventListener("close", b), () => m?.removeEventListener("close", b);
|
|
1262
|
-
}, [l]), _(g, { className: E("ds-dialog", t), ref: y, "data-placement": n, "data-modal": a, closedby: r, ...h, children: [i !== !1 && c(
|
|
1261
|
+
}, [l]), _(g, { className: E("ds-dialog", t), ref: y, "data-placement": n, "data-modal": a, closedby: r, ...h, children: [i !== !1 && c(ue, { "aria-label": i, "data-color": "neutral", icon: !0, variant: "tertiary", "data-command": "close" }), e] });
|
|
1263
1262
|
}), Fn = w(function({ asChild: s, className: e, ...t }, n) {
|
|
1264
1263
|
return c(s ? M : "div", { className: E("ds-dialog__block", e), ref: n, ...t });
|
|
1265
1264
|
}), An = w(function({ asChild: s, ...e }, t) {
|
|
1266
1265
|
const n = R(Te);
|
|
1267
|
-
return c(s ? M :
|
|
1266
|
+
return c(s ? M : ue, { "aria-haspopup": "dialog", onClick: () => {
|
|
1268
1267
|
n.current?.getAttribute("data-modal") === "true" ? n.current?.showModal() : n.current?.show();
|
|
1269
1268
|
}, ref: t, ...e });
|
|
1270
1269
|
}), Re = Object.assign(Dn, {
|
|
@@ -1336,16 +1335,16 @@ const Pe = se({}), Ln = w(function({ id: s, className: e, onClose: t, onOpen: n,
|
|
|
1336
1335
|
return s.floating.setAttribute("data-placement", t.split("-")[0]), s.floating.style.setProperty("--ds-popover-arrow-x", n), s.floating.style.setProperty("--ds-popover-arrow-y", i), o;
|
|
1337
1336
|
}
|
|
1338
1337
|
}, Vn = w(function({ id: s, inline: e, asChild: t, ...n }, i) {
|
|
1339
|
-
const { popoverId: r } = R(Pe), a = t ? M : e ? "button" :
|
|
1338
|
+
const { popoverId: r } = R(Pe), a = t ? M : e ? "button" : ue, l = Object.assign({
|
|
1340
1339
|
[kt.startsWith("19") ? "popoverTarget" : "popovertarget"]: r,
|
|
1341
1340
|
...e ? {
|
|
1342
1341
|
"data-popover": "inline"
|
|
1343
1342
|
} : {}
|
|
1344
1343
|
}, n);
|
|
1345
1344
|
return c(a, { ref: i, ...l });
|
|
1346
|
-
}),
|
|
1345
|
+
}), bo = w(function({ asChild: s, ...e }, t) {
|
|
1347
1346
|
return c(s ? M : "li", { ...e, ref: t });
|
|
1348
|
-
}), ht = (o, { asChild: s, className: e, ...t }, n) => c(s ? M : o, { className: E("ds-list", e), ref: n, ...t }),
|
|
1347
|
+
}), ht = (o, { asChild: s, className: e, ...t }, n) => c(s ? M : o, { className: E("ds-list", e), ref: n, ...t }), go = w(function(s, e) {
|
|
1349
1348
|
return ht("ul", s, e);
|
|
1350
1349
|
});
|
|
1351
1350
|
w(function(s, e) {
|
|
@@ -1354,7 +1353,7 @@ w(function(s, e) {
|
|
|
1354
1353
|
const $n = w(function({ "aria-label": s = "Sidenavigering", asChild: e, className: t, ...n }, i) {
|
|
1355
1354
|
return c(e ? M : "nav", { "aria-label": s, className: E("ds-pagination", t), ref: i, ...n });
|
|
1356
1355
|
}), jn = w(function(s, e) {
|
|
1357
|
-
return c(
|
|
1356
|
+
return c(ue, { ref: e, ...s });
|
|
1358
1357
|
}), Wn = w(function({ asChild: s, className: e, ...t }, n) {
|
|
1359
1358
|
return c(s ? M : "li", { ref: n, ...t });
|
|
1360
1359
|
}), Kn = w(function({ asChild: s, ...e }, t) {
|
|
@@ -1373,11 +1372,11 @@ const ft = Object.assign(Ln, {
|
|
|
1373
1372
|
});
|
|
1374
1373
|
ft.TriggerContext.displayName = "Popover.TriggerContext";
|
|
1375
1374
|
ft.Trigger.displayName = "Popover.Trigger";
|
|
1376
|
-
const
|
|
1375
|
+
const vo = w(function({ asChild: s, className: e, height: t, style: n, variant: i = "rectangle", width: r, ...a }, l) {
|
|
1377
1376
|
const d = s ? M : "span", h = i === "text", p = Ut("ds-skeleton-opacity-fade"), u = U([p, l]);
|
|
1378
1377
|
return c(d, { "aria-hidden": "true", className: E("ds-skeleton", e), "data-text": h ? "-".repeat(Number(r) || 1) : void 0, "data-variant": i, ref: u, style: h ? n : { width: r, height: t, ...n }, ...a });
|
|
1379
|
-
}),
|
|
1380
|
-
return _(de, { className: t, "data-position": r, "data-size": s, style: a, children: [c(
|
|
1378
|
+
}), yo = w(function({ "data-size": s, children: e, className: t, description: n, label: i, position: r, style: a, ...l }, d) {
|
|
1379
|
+
return _(de, { className: t, "data-position": r, "data-size": s, style: a, children: [c(he, { type: "checkbox", role: "switch", ref: d, ...l }), !!i && c(K, { weight: "regular", children: i }), !!n && c("div", { "data-field": "description", children: n })] });
|
|
1381
1380
|
}), pe = se({}), Hn = w(function({ value: s, defaultValue: e, className: t, onChange: n, ...i }, r) {
|
|
1382
1381
|
const a = F(null), l = s !== void 0, [d, h] = A(e), [p, u] = A(/* @__PURE__ */ new Map());
|
|
1383
1382
|
let f = n;
|
|
@@ -1420,23 +1419,23 @@ const yo = w(function({ asChild: s, className: e, height: t, style: n, variant:
|
|
|
1420
1419
|
Fe.Tab.displayName = "Tabs.Tab";
|
|
1421
1420
|
Fe.List.displayName = "Tabs.List";
|
|
1422
1421
|
Fe.Panel.displayName = "Tabs.Panel";
|
|
1423
|
-
const
|
|
1424
|
-
return _(de, { className: h, "data-size": a, style: d, children: [!!s && c(K, { children: s }), !!e && c(Xt, { children: e }), _(Yt, { children: [i === void 0 || c(Ve, { children: i }), n === !0 ? c(tn, { ref: u, "aria-invalid": !!t || void 0, ...p }) : c(
|
|
1422
|
+
const Co = w(function({ label: s, description: e, error: t, multiline: n, prefix: i, suffix: r, "data-size": a, counter: l, style: d, className: h, ...p }, u) {
|
|
1423
|
+
return _(de, { className: h, "data-size": a, style: d, children: [!!s && c(K, { children: s }), !!e && c(Xt, { children: e }), _(Yt, { children: [i === void 0 || c(Ve, { children: i }), n === !0 ? c(tn, { ref: u, "aria-invalid": !!t || void 0, ...p }) : c(he, { ref: u, "aria-invalid": !!t || void 0, ...p }), r === void 0 || c(Ve, { children: r })] }), !!l && c(de.Counter, { ...typeof l == "number" ? { limit: l } : l }), !!t && c(Ne, { children: t })] });
|
|
1425
1424
|
});
|
|
1426
1425
|
export {
|
|
1427
1426
|
un as B,
|
|
1428
|
-
|
|
1427
|
+
po as C,
|
|
1429
1428
|
Re as D,
|
|
1430
1429
|
hn as L,
|
|
1431
1430
|
De as P,
|
|
1432
|
-
|
|
1433
|
-
|
|
1431
|
+
yo as S,
|
|
1432
|
+
Co as T,
|
|
1434
1433
|
fe as a,
|
|
1435
1434
|
me as b,
|
|
1436
|
-
|
|
1437
|
-
|
|
1435
|
+
bo as c,
|
|
1436
|
+
go as d,
|
|
1438
1437
|
ft as e,
|
|
1439
|
-
|
|
1438
|
+
vo as f,
|
|
1440
1439
|
Fe as g,
|
|
1441
|
-
|
|
1440
|
+
mo as u
|
|
1442
1441
|
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AccountOrganizationProps, ButtonProps, SectionProps, SettingsItemProps } from '..';
|
|
3
|
+
interface AccountListItemButtonProps extends ButtonProps {
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
3
6
|
export interface AccountListItemDetailsProps {
|
|
4
7
|
color?: SectionProps['color'];
|
|
5
8
|
loading?: boolean;
|
|
6
9
|
loadingText?: string;
|
|
7
|
-
buttons?:
|
|
10
|
+
buttons?: AccountListItemButtonProps[];
|
|
8
11
|
settings?: SettingsItemProps[];
|
|
9
12
|
organization?: AccountOrganizationProps['items'];
|
|
10
13
|
children?: ReactNode;
|
|
11
14
|
}
|
|
12
15
|
export declare const AccountListItemDetails: ({ color, loading, loadingText, buttons, settings, organization, children, }: AccountListItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ButtonProps as DsButtonProps } from '@digdir/designsystemet-react';
|
|
2
|
+
import { ButtonIconProps } from './ButtonIcon';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type ButtonColor = DsButtonProps['data-color'] | undefined;
|
|
5
|
+
export type ButtonVariant = 'solid' | 'outline' | 'tinted' | 'ghost' | DsButtonProps['variant'];
|
|
6
|
+
export type ButtonSize = 'xs' | DsButtonProps['data-size'];
|
|
7
|
+
export type ButtonProps = {
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
rounded?: boolean;
|
|
3
12
|
icon?: ButtonIconProps['icon'];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
href?: string;
|
|
14
|
+
} & Omit<DsButtonProps, 'icon' | 'variant' | 'asChild' | 'data-size' | 'data-color' | 'data-variant' | 'data-rounded'>;
|
|
15
|
+
export declare const Button: React.ForwardRefExoticComponent<{
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
size?: ButtonSize;
|
|
18
|
+
variant?: ButtonVariant;
|
|
19
|
+
rounded?: boolean;
|
|
20
|
+
icon?: ButtonIconProps["icon"];
|
|
21
|
+
href?: string;
|
|
22
|
+
} & Omit<DsButtonProps, "variant" | "data-color" | "data-variant" | "data-size" | "icon" | "asChild" | "data-rounded"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ButtonSize, ButtonVariant } from './Button';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
|
-
component:
|
|
5
|
+
component: React.ForwardRefExoticComponent<{
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
variant?: ButtonVariant;
|
|
9
|
+
rounded?: boolean;
|
|
10
|
+
icon?: import('./ButtonIcon').ButtonIconProps["icon"];
|
|
11
|
+
href?: string;
|
|
12
|
+
} & Omit<import('@digdir/designsystemet-react').ButtonProps, "variant" | "data-color" | "data-variant" | "data-size" | "icon" | "asChild" | "data-rounded"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
13
|
parameters: {};
|
|
6
14
|
args: {
|
|
7
15
|
children: string;
|
|
@@ -9,14 +17,9 @@ declare const meta: {
|
|
|
9
17
|
};
|
|
10
18
|
export default meta;
|
|
11
19
|
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
13
|
-
export declare const Solid: Story;
|
|
14
|
-
export declare const Outline: Story;
|
|
15
|
-
export declare const Text: Story;
|
|
16
|
-
export declare const Loading: Story;
|
|
17
|
-
export declare const Disabled: Story;
|
|
18
|
-
export declare const Sizes: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare const LabelSize: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const Default: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export declare const Variants: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare const
|
|
22
|
+
export declare const Colors: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Sizes: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const Icons: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
export declare const Specimens: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ButtonGroupProps extends
|
|
1
|
+
import { ButtonProps } from './Button';
|
|
2
|
+
export interface ButtonGroupProps extends ButtonProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
variant?:
|
|
5
|
-
color?:
|
|
6
|
-
size?:
|
|
4
|
+
variant?: ButtonProps['variant'];
|
|
5
|
+
color?: ButtonProps['color'];
|
|
6
|
+
size?: ButtonProps['size'];
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
connected?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const ButtonGroup: ({ children, variant,
|
|
10
|
+
export declare const ButtonGroup: ({ children, variant, size, disabled, connected, color }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const meta: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: ({ children, variant,
|
|
3
|
+
component: ({ children, variant, size, disabled, connected, color }: import('./ButtonGroup').ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
parameters: {};
|
|
5
5
|
args: {
|
|
6
6
|
children: string;
|
|
@@ -10,3 +10,5 @@ export default meta;
|
|
|
10
10
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const Connected: () => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const WithDivider: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ComboButton: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Toolbar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ButtonProps } from './Button';
|
|
2
|
+
export interface ButtonGroupDividerProps {
|
|
3
|
+
variant?: ButtonProps['variant'];
|
|
4
|
+
}
|
|
5
|
+
export declare const ButtonGroupDivider: ({ variant }: ButtonGroupDividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonSize } from '.';
|
|
3
|
+
import { AvatarGroupProps, AvatarProps, IconProps, SvgElement } from '..';
|
|
3
4
|
export interface ButtonIconProps {
|
|
4
5
|
icon?: IconProps | SvgElement | AvatarProps | AvatarGroupProps | ReactNode;
|
|
5
6
|
iconAltText?: string;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ComboButtonProps extends
|
|
4
|
-
|
|
5
|
-
iconSize?: ButtonSize;
|
|
6
|
-
iconAltText?: string;
|
|
7
|
-
ariaLabel?: string;
|
|
8
|
-
onIconClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
-
onLabelClick?: MouseEventHandler<HTMLButtonElement>;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
label?: string;
|
|
12
|
-
labelSize?: ButtonSize;
|
|
13
|
-
dataTestId?: string;
|
|
14
|
-
tabIndex?: number;
|
|
1
|
+
import { ButtonProps } from '.';
|
|
2
|
+
type SecondaryButtonProps = ButtonProps & Omit<ButtonProps, 'size' | 'variant' | 'color'>;
|
|
3
|
+
export interface ComboButtonProps extends ButtonProps {
|
|
4
|
+
secondaryButton: SecondaryButtonProps;
|
|
15
5
|
}
|
|
16
|
-
export declare const ComboButton: ({
|
|
6
|
+
export declare const ComboButton: ({ secondaryButton, size, variant, color, disabled, ...props }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -4,7 +4,4 @@ declare const meta: Meta<typeof ComboButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const Solid: Story;
|
|
8
|
-
export declare const Outline: Story;
|
|
9
|
-
export declare const Text: Story;
|
|
10
7
|
export declare const Disabled: Story;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
iconSize?: ButtonSize;
|
|
1
|
+
import { ButtonProps } from '.';
|
|
2
|
+
export interface FloatingActionButtonProps extends ButtonProps {
|
|
3
|
+
icon: ButtonProps['icon'];
|
|
4
|
+
iconSize?: ButtonProps['size'];
|
|
6
5
|
iconAltText: string;
|
|
7
|
-
color?: ButtonColor;
|
|
8
|
-
size?: ButtonSize;
|
|
9
|
-
variant?: ButtonVariant;
|
|
10
|
-
onClick?: MouseEventHandler;
|
|
11
|
-
dataTestId?: string;
|
|
12
|
-
onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
13
6
|
}
|
|
14
|
-
export declare const FloatingActionButton: ({ variant, size, icon, iconSize, iconAltText, color, onClick,
|
|
7
|
+
export declare const FloatingActionButton: ({ variant, size, icon, iconSize, iconAltText, color, onClick, onBlurCapture, }: FloatingActionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
icon: ButtonIconProps['icon'];
|
|
5
|
-
iconAltText: string;
|
|
6
|
-
color?: ButtonColor;
|
|
7
|
-
size?: ButtonSize;
|
|
8
|
-
iconSize?: ButtonSize;
|
|
9
|
-
variant?: ButtonVariant;
|
|
10
|
-
rounded?: boolean;
|
|
11
|
-
selected?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
onClick?: MouseEventHandler;
|
|
14
|
-
dataTestId?: string;
|
|
15
|
-
onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
16
|
-
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
1
|
+
import { ButtonProps } from '.';
|
|
2
|
+
export interface IconButtonProps extends ButtonProps {
|
|
3
|
+
label: string;
|
|
17
4
|
}
|
|
18
|
-
export declare const IconButton: ({
|
|
5
|
+
export declare const IconButton: ({ children, label, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './ButtonBase';
|
|
2
|
-
export * from './ButtonLabel';
|
|
3
|
-
export * from './ButtonIcon';
|
|
4
1
|
export * from './Button';
|
|
2
|
+
export * from './ButtonIcon';
|
|
3
|
+
export * from './ButtonLabel';
|
|
4
|
+
export * from './ButtonGroup';
|
|
5
|
+
export * from './ButtonGroupDivider';
|
|
5
6
|
export * from './ComboButton';
|
|
6
7
|
export * from './IconButton';
|
|
7
8
|
export * from './FloatingActionButton';
|
|
8
|
-
export * from './ButtonGroup';
|
|
@@ -3,6 +3,7 @@ export type DialogButtonPriority = 'primary' | 'secondary' | 'tertiary';
|
|
|
3
3
|
export interface DialogActionButtonProps extends ButtonProps {
|
|
4
4
|
id: string;
|
|
5
5
|
priority: DialogButtonPriority;
|
|
6
|
+
label: string;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
}
|
|
8
9
|
export interface DialogActionsProps {
|
|
@@ -15,7 +15,7 @@ export interface FloatingDropdownProps {
|
|
|
15
15
|
color?: ButtonColor;
|
|
16
16
|
size?: ButtonSize;
|
|
17
17
|
variant?: ButtonVariant;
|
|
18
|
-
|
|
18
|
+
'data-testid'?: string;
|
|
19
19
|
id?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const FloatingDropdown: ({ variant, size, icon, iconOpen, iconSize, iconAltText, id, color, items, dataTestId, }: FloatingDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const FloatingDropdown: ({ variant, size, icon, iconOpen, iconSize, iconAltText, id, color, items, "data-testid": dataTestId, }: FloatingDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ElementType
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
2
|
import { BadgeProps } from '../Badge';
|
|
3
3
|
export interface HeaderLogoProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
as?: ElementType;
|
|
6
6
|
href?: string;
|
|
7
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
7
|
badge?: BadgeProps;
|
|
9
8
|
}
|
|
10
9
|
export declare const HeaderLogo: ({ className, as, href, badge }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,6 @@ import { ElementType } from 'react';
|
|
|
2
2
|
import { AvatarProps, AvatarGroupProps } from '../Avatar';
|
|
3
3
|
import { BadgeProps } from '../Badge';
|
|
4
4
|
import { ButtonProps } from '../Button';
|
|
5
|
-
import { SvgElement } from '../Icon';
|
|
6
5
|
export interface HeaderButtonProps extends ButtonProps {
|
|
7
6
|
label?: string;
|
|
8
7
|
avatar?: AvatarProps;
|
|
@@ -10,7 +9,6 @@ export interface HeaderButtonProps extends ButtonProps {
|
|
|
10
9
|
as?: ElementType;
|
|
11
10
|
className?: string;
|
|
12
11
|
expanded?: boolean;
|
|
13
|
-
icon?: SvgElement;
|
|
14
12
|
badge?: BadgeProps | undefined;
|
|
15
13
|
tabIndex?: number;
|
|
16
14
|
}
|
|
@@ -8,4 +8,4 @@ export interface HeaderLogoProps {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
badge?: BadgeProps;
|
|
10
10
|
}
|
|
11
|
-
export declare const HeaderLogo: ({ className, as, title, href, badge }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const HeaderLogo: ({ className, as, title, href, onClick, badge }: HeaderLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,6 @@ export interface MenuItemProps extends MenuItemBaseProps {
|
|
|
22
22
|
className?: string;
|
|
23
23
|
label?: ReactNode | (() => ReactElement);
|
|
24
24
|
items?: MenuItemProps[];
|
|
25
|
-
|
|
25
|
+
'data-testid'?: string;
|
|
26
26
|
}
|
|
27
27
|
export declare const MenuItem: ({ as, size, color, variant, collapsible, expanded, icon, iconTheme, iconBadge, title, description, highlightWords, badge, controls, loading, linkIcon, label, ariaLabel, ...rest }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,6 +23,6 @@ export type MenuItemBaseProps = {
|
|
|
23
23
|
expanded?: boolean;
|
|
24
24
|
children?: ReactNode;
|
|
25
25
|
onMouseEnter?: MouseEventHandler;
|
|
26
|
-
|
|
26
|
+
'data-testid'?: string;
|
|
27
27
|
};
|
|
28
|
-
export declare const MenuItemBase: ({ interactive, ariaLabel, role, as, color, variant, size, className, href, onClick, onKeyPress, tabIndex, hidden, selected, disabled, children, active, onMouseEnter, dataTestId, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const MenuItemBase: ({ interactive, ariaLabel, role, as, color, variant, size, className, href, onClick, onKeyPress, tabIndex, hidden, selected, disabled, children, active, onMouseEnter, "data-testid": dataTestId, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ModalBodyProps extends SectionProps {
|
|
2
|
+
export interface ModalBodyProps {
|
|
4
3
|
children?: ReactNode;
|
|
5
4
|
}
|
|
6
|
-
export declare const ModalBody: ({ children
|
|
5
|
+
export declare const ModalBody: ({ children }: ModalBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface SectionProps extends FlexProps {
|
|
|
6
6
|
variant?: 'default' | 'subtle' | 'tinted';
|
|
7
7
|
bleed?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const Section: ({ as, direction, variant, className, children, ...rest }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const Section: ({ as, direction, align, variant, className, children, ...rest }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: ({ icon, title, description, open, onClose, buttons, children, ...args }: import('./SettingsModal').SettingsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
tags: string[];
|
|
5
|
+
parameters: {};
|
|
6
|
+
args: {
|
|
7
|
+
open: true;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Verified: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Unverified: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const VerificationCodeSent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,12 +6,11 @@ export type ToolbarButtonProps = {
|
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
iconAltText?: string;
|
|
8
8
|
removable?: boolean;
|
|
9
|
-
selected?: boolean;
|
|
10
9
|
active?: boolean;
|
|
11
10
|
children?: ReactNode;
|
|
12
11
|
onToggle?: MouseEventHandler;
|
|
13
12
|
onRemove?: MouseEventHandler;
|
|
14
|
-
|
|
13
|
+
'data-testid'?: string;
|
|
15
14
|
tabIndex?: number;
|
|
16
15
|
} & AriaAttributes;
|
|
17
|
-
export declare const ToolbarButton: ({ type,
|
|
16
|
+
export declare const ToolbarButton: ({ type, removable, ariaLabel, active, children, onToggle, onRemove, iconAltText, "data-testid": dataTestId, tabIndex, "aria-expanded": ariaExpanded, }: ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ type,
|
|
4
|
+
component: ({ type, removable, ariaLabel, active, children, onToggle, onRemove, iconAltText, "data-testid": dataTestId, tabIndex, "aria-expanded": ariaExpanded, }: import('./ToolbarButton').ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -3,6 +3,6 @@ export interface ToolbarFilterBaseProps {
|
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
expanded?: boolean;
|
|
5
5
|
onBlurCapture?: React.FocusEventHandler<HTMLDivElement>;
|
|
6
|
-
|
|
6
|
+
'data-testid'?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const ToolbarFilterBase: ({ expanded, children, onBlurCapture, dataTestId, }: ToolbarFilterBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ToolbarFilterBase: ({ expanded, children, onBlurCapture, "data-testid": dataTestId, }: ToolbarFilterBaseProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altinn/altinn-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"test": "vitest run",
|
|
78
|
+
"test:unit": "vitest run --project=unit",
|
|
78
79
|
"storybook": "storybook dev -p 6006",
|
|
79
80
|
"typecheck": "tsc --noEmit",
|
|
80
81
|
"build": "tsc && vite build",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_129q3_1{--dsc-button-background--active: transparent;--dsc-button-background--hover: transparent;--dsc-button-background: transparent;--dsc-button-color: inherit;--dsc-button-color--hover: inherit;--dsc-button-border-width: var(--ds-border-width-default);--dsc-button-border-style: solid;--dsc-button-border-color: transparent;--dsc-button-border-radius: var(--ds-border-radius-default);--dsc-button-gap: var(--ds-size-2);--dsc-button-padding: var(--ds-size-2) var(--ds-size-4);--dsc-button-size: var(--ds-size-12);border-style:var(--dsc-button-border-style);border-width:var(--dsc-button-border-width);border-color:var(--dsc-button-border-color);border-radius:var(--dsc-button-border-radius);background:var(--dsc-button-background);color:var(--dsc-button-color);margin:0;padding:0;min-width:var(--dsc-button-size);min-height:var(--dsc-button-size);height:fit-content;align-items:center;justify-content:center;overflow:visible;text-decoration:none;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex}._button_129q3_1:not([data-size]){font-size:inherit}._button_129q3_1:is(:disabled,[aria-disabled=true]){cursor:not-allowed;opacity:.75;pointer-events:none}._button_129q3_1:is(:disabled,[aria-disabled=true])[aria-busy=true]{opacity:1;cursor:progress}@media(hover:hover)and (pointer:fine){._button_129q3_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):hover{background:var(--dsc-button-background--hover);color:var(--dsc-button-color--hover)}}._button_129q3_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):active{background:var(--dsc-button-background--active)}._button_129q3_1[data-variant=solid]{--dsc-button-background--active: var(--ds-color-base-active);--dsc-button-background--hover: var(--ds-color-base-hover);--dsc-button-background: var(--ds-color-base-default);--dsc-button-color: var(--ds-color-base-contrast-default);--dsc-button-color--hover: var(--ds-color-base-contrast-default);--dsc-button-border-color: var(--ds-color-base-default)}._button_129q3_1[data-variant=outline],._button_129q3_1[data-variant=dotted],._button_129q3_1[data-variant=text]{--dsc-button-background: transparent;--dsc-button-background--active: var(--ds-color-surface-active);--dsc-button-background--hover: var(--ds-color-surface-hover);--dsc-button-color: var(--ds-color-text-subtle);--dsc-button-color--hover: var(--ds-color-text-default)}._button_129q3_1[data-variant=outline],._button_129q3_1[data-variant=dotted]{--dsc-button-border-color: var(--ds-color-border-strong)}._button_129q3_1[data-variant=dotted]{--dsc-button-border-style: dotted}._button_129q3_1[data-variant=tinted]{background-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-base-default);color:var(--ds-color-base-surface-tinted)}._button_129q3_1[data-variant=tinted]:hover{background-color:var(--ds-color-surface-hover)}._button_129q3_1[data-variant=tinted]:active{background-color:var(--ds-color-surface-active)}._button_129q3_1[data-rounded=true]{border-radius:50%}._button_129q3_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._button_129q3_1:focus-visible *{--_ds--focus: }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_hbn70_1{display:inline-flex;flex-direction:row;align-items:center;max-width:100%;min-width:0}._divider_hbn70_9{align-self:stretch;border-left:1px solid currentColor;width:1px;margin:.375rem 0}._primary_hbn70_16,._secondary_hbn70_17{display:inline-flex;align-items:center;border-width:0;margin:-1px;padding:0 .5em}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_87kyt_1{display:inline-flex;column-gap:.25em;align-items:center;justify-content:flex-start;font-size:.875rem;min-height:auto}._label_87kyt_10{flex-shrink:1;font-weight:400;white-space:inherit;padding:.3125rem}._button_87kyt_1 a{color:inherit}
|