@midas-ds/components 17.27.4 โ 17.28.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/CHANGELOG.md +21 -0
- package/assets/stack.css +1 -0
- package/chunks/stack-LF3ExhH9.js +22 -0
- package/index.d.ts +1 -0
- package/index.js +9 -8
- package/package.json +2 -2
- package/stack/Stack.d.ts +43 -0
- package/stack/Stack.stories.d.ts +24 -0
- package/stack/index.d.ts +2 -0
- package/stack/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 17.28.0 (2026-10-08)
|
|
2
|
+
|
|
3
|
+
### ๐ Features
|
|
4
|
+
|
|
5
|
+
- **components,stack:** add Stack component ([811b12f3cc2](https://github.com/migrationsverket/midas/commit/811b12f3cc2))
|
|
6
|
+
|
|
7
|
+
### ๐งช Tests updated
|
|
8
|
+
|
|
9
|
+
- **components,stack:** add visual regression baselines ([5653f8c8e8b](https://github.com/migrationsverket/midas/commit/5653f8c8e8b))
|
|
10
|
+
- remove chromatic ([7c0e6fe5135](https://github.com/migrationsverket/midas/commit/7c0e6fe5135))
|
|
11
|
+
|
|
12
|
+
## 17.27.5 (2026-10-07)
|
|
13
|
+
|
|
14
|
+
### ๐ฉน Fixes
|
|
15
|
+
|
|
16
|
+
- **storybook:** resolve a11y violations in Card and layout stories ([c11917e085a](https://github.com/migrationsverket/midas/commit/c11917e085a))
|
|
17
|
+
|
|
18
|
+
### ๐งฑ Updated Dependencies
|
|
19
|
+
|
|
20
|
+
- Updated theme to 3.17.6
|
|
21
|
+
|
|
1
22
|
## 17.27.4 (2026-10-05)
|
|
2
23
|
|
|
3
24
|
### ๐ญ Refactoring
|
package/assets/stack.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer midas{._stack_1g0ly_7{box-sizing:border-box;justify-content:flex-start;align-items:stretch;gap:var(--midas-stack-spacing,var(--midas-space-small));flex-direction:column;display:flex}._stack_1g0ly_7:is(ul,ol){margin:0;padding:0;list-style:none}._stack_1g0ly_7:is(fieldset){border:0;min-inline-size:0;margin:0;padding:0}._stack_1g0ly_7[data-direction=row]{flex-direction:row}._stack_1g0ly_7[data-direction=row-reverse]{flex-direction:row-reverse}._stack_1g0ly_7[data-direction=column-reverse]{flex-direction:column-reverse}._stack_1g0ly_7[data-align=start]{align-items:flex-start}._stack_1g0ly_7[data-align=center]{align-items:center}._stack_1g0ly_7[data-align=end]{align-items:flex-end}._stack_1g0ly_7[data-align=baseline]{align-items:baseline}._stack_1g0ly_7[data-justify=center]{justify-content:center}._stack_1g0ly_7[data-justify=end]{justify-content:flex-end}._stack_1g0ly_7[data-justify=between]{justify-content:space-between}._stack_1g0ly_7[data-justify=around]{justify-content:space-around}._stack_1g0ly_7[data-justify=evenly]{justify-content:space-evenly}._stack_1g0ly_7[data-wrap]{flex-wrap:wrap}._stack_1g0ly_7[data-spacing=xsmall]{--midas-stack-spacing:var(--midas-space-xsmall)}._stack_1g0ly_7[data-spacing=small]{--midas-stack-spacing:var(--midas-space-small)}._stack_1g0ly_7[data-spacing=medium]{--midas-stack-spacing:var(--midas-space-medium)}._stack_1g0ly_7[data-spacing=large]{--midas-stack-spacing:var(--midas-space-large)}._stack_1g0ly_7[data-spacing=xlarge]{--midas-stack-spacing:var(--midas-space-xlarge)}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import '../assets/stack.css';var r = { stack: "_stack_1g0ly_7" }, i = t.forwardRef(({ children: t, elementType: i = "div", direction: a = "column", spacing: o = "small", alignItems: s = "stretch", justifyContent: c = "start", wrap: l = !1, className: u, role: d, ...f }, p) => {
|
|
6
|
+
let m = i, h = i === "ul" || i === "ol";
|
|
7
|
+
return /* @__PURE__ */ n(m, {
|
|
8
|
+
...f,
|
|
9
|
+
ref: p,
|
|
10
|
+
role: d ?? (h ? "list" : void 0),
|
|
11
|
+
className: e(r.stack, u),
|
|
12
|
+
"data-direction": a,
|
|
13
|
+
"data-align": s,
|
|
14
|
+
"data-justify": c,
|
|
15
|
+
"data-wrap": l || void 0,
|
|
16
|
+
"data-spacing": o,
|
|
17
|
+
children: t
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
i.displayName = "Stack";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as t };
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -42,13 +42,14 @@ import { n as Ie, t as Le } from "./chunks/logo-DyZ2pXt7.js";
|
|
|
42
42
|
import { t as Re } from "./chunks/progress-bar-7w_kWo2f.js";
|
|
43
43
|
import { i as ze, n as Be, r as Ve, t as He } from "./chunks/radio-C-MUMGu7.js";
|
|
44
44
|
import { t as Ue } from "./chunks/skeleton-B_BPRPJy.js";
|
|
45
|
-
import {
|
|
46
|
-
import { i as
|
|
47
|
-
import { t as Qe } from "./chunks/
|
|
48
|
-
import {
|
|
45
|
+
import { t as We } from "./chunks/stack-LF3ExhH9.js";
|
|
46
|
+
import { i as Ge, n as Ke, r as qe, t as Je } from "./chunks/tabs-Co09VWvC.js";
|
|
47
|
+
import { i as Ye, n as Xe, r as Ze, t as Qe } from "./chunks/textfield-CXqzzOtw.js";
|
|
48
|
+
import { t as $e } from "./chunks/time-field-CmjGBQph.js";
|
|
49
|
+
import { a as et, i as tt, n as nt, o as rt, r as it, t as at } from "./chunks/toast-gJgjitZF.js";
|
|
49
50
|
//#endregion
|
|
50
51
|
//#region src/version.ts
|
|
51
|
-
var
|
|
52
|
+
var ot = {
|
|
52
53
|
name: "@midas-ds/components",
|
|
53
54
|
author: { name: "Migrationsverket" },
|
|
54
55
|
keywords: [
|
|
@@ -60,7 +61,7 @@ var at = {
|
|
|
60
61
|
description: "Midas Components",
|
|
61
62
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
62
63
|
license: "CC0-1.0",
|
|
63
|
-
version: "17.
|
|
64
|
+
version: "17.28.0",
|
|
64
65
|
module: "./index.js",
|
|
65
66
|
type: "module",
|
|
66
67
|
main: "./index.js",
|
|
@@ -84,7 +85,7 @@ var at = {
|
|
|
84
85
|
},
|
|
85
86
|
dependencies: {
|
|
86
87
|
"@internationalized/string": "^3.2.10",
|
|
87
|
-
"@midas-ds/theme": "3.17.
|
|
88
|
+
"@midas-ds/theme": "3.17.6",
|
|
88
89
|
"@react-stately/utils": "3.12.1",
|
|
89
90
|
"react-aria-components": "1.21.1",
|
|
90
91
|
"react-aria": "3.52.1",
|
|
@@ -92,4 +93,4 @@ var at = {
|
|
|
92
93
|
}
|
|
93
94
|
}.version;
|
|
94
95
|
//#endregion
|
|
95
|
-
export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, h as Calendar, de as Card, se as CardActionArea, ae as CardActions, le as CardBody, ue as CardContent, pe as CardHeader, fe as CardImage, oe as CardLink, ce as CardTitle, d as Cell, me as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, c as Column, we as ComboBox, he as ContrastFilled, Te as DateField, Ee as DateInput, Oe as DateInputDivider, p as DatePicker, m as DateRangePicker, De as DateSegment, U as DialogTrigger, ke as DropZone, G as FieldError, k as FileList, A as FileListItem, Ae as FileTrigger,
|
|
96
|
+
export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, h as Calendar, de as Card, se as CardActionArea, ae as CardActions, le as CardBody, ue as CardContent, pe as CardHeader, fe as CardImage, oe as CardLink, ce as CardTitle, d as Cell, me as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, c as Column, we as ComboBox, he as ContrastFilled, Te as DateField, Ee as DateInput, Oe as DateInputDivider, p as DatePicker, m as DateRangePicker, De as DateSegment, U as DialogTrigger, ke as DropZone, G as FieldError, k as FileList, A as FileListItem, Ae as FileTrigger, at as GlobalToastRegion, je as Grid, Me as GridItem, b as Header, P as Heading, Ne as InfoBanner, Ze as Input, z as Label, x as Layout, a as Link, f as LinkButton, Y as ListBox, ee as ListBoxButton, te as ListBoxEmptyState, Z as ListBoxHeader, Q as ListBoxItem, $ as ListBoxLoadMoreItem, J as ListBoxPopover, X as ListBoxSection, Le as Logo, Ie as LogoContext, ve as Menu, ye as MenuItem, Se as MenuPopover, be as MenuSection, xe as MenuTrigger, V as Modal, H as ModalOverlay, y as Navbar, B as Popover, Re as ProgressBar, Be as Radio, Ve as RadioButton, ze as RadioField, He as RadioGroup, g as RangeCalendar, i as RouterProvider, u as Row, O as SearchField, q as Select, K as SelectTrigger, Ce as Separator, v as Sidebar, _ as SidebarLink, Ue as Skeleton, r as Spinner, We as Stack, qe as Tab, Je as TabList, Ke as TabPanel, s as Table, o as TableBody, l as TableHeader, Ge as Tabs, re as Tag, ie as TagGroup, ne as TagList, W as Text, Qe as TextArea, Xe as TextField, Ye as TextFieldBase, $e as TimeField, nt as Toast, it as ToastProvider, tt as ToastRegion, ge as ToggleButton, _e as ToggleButtonGroup, Fe as Tooltip, Pe as TooltipTrigger, ot as VERSION, n as clsx, et as toastQueue, j as useLocalizedStringFormatter, rt as useToastState };
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Midas Components",
|
|
15
15
|
"homepage": "https://designsystem.migrationsverket.se/",
|
|
16
16
|
"license": "CC0-1.0",
|
|
17
|
-
"version": "17.
|
|
17
|
+
"version": "17.28.0",
|
|
18
18
|
"module": "./index.js",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@internationalized/string": "^3.2.10",
|
|
45
|
-
"@midas-ds/theme": "3.17.
|
|
45
|
+
"@midas-ds/theme": "3.17.6",
|
|
46
46
|
"@react-stately/utils": "3.12.1",
|
|
47
47
|
"react-aria-components": "1.21.1",
|
|
48
48
|
"react-aria": "3.52.1",
|
package/stack/Stack.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** The Midas semantic space tokens, `--midas-space-*` */
|
|
3
|
+
export type StackSpacing = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
4
|
+
export type StackElementType = 'div' | 'ul' | 'ol' | 'section' | 'nav' | 'fieldset' | 'form' | 'header' | 'footer' | 'aside' | 'article';
|
|
5
|
+
export interface StackProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* The HTML element to render, e.g. `ul` for a list of items
|
|
9
|
+
* @default 'div'
|
|
10
|
+
*/
|
|
11
|
+
elementType?: StackElementType;
|
|
12
|
+
/** @default 'column' */
|
|
13
|
+
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
14
|
+
/**
|
|
15
|
+
* Space between the items, from the Midas semantic space tokens
|
|
16
|
+
* @default 'small'
|
|
17
|
+
*/
|
|
18
|
+
spacing?: StackSpacing;
|
|
19
|
+
/**
|
|
20
|
+
* How the items line up across the direction: horizontally in a column,
|
|
21
|
+
* vertically in a row. `stretch` makes them as wide as the Stack in a
|
|
22
|
+
* column and as tall as it in a row
|
|
23
|
+
* @default 'stretch'
|
|
24
|
+
*/
|
|
25
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
26
|
+
/**
|
|
27
|
+
* How the items are placed along the direction: vertically in a column,
|
|
28
|
+
* horizontally in a row. `between` puts the first and last item at the
|
|
29
|
+
* edges, `around` gives each item equal space on both sides and `evenly`
|
|
30
|
+
* makes every gap the same, edges included
|
|
31
|
+
* @default 'start'
|
|
32
|
+
*/
|
|
33
|
+
justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
34
|
+
/** Let the items wrap onto several lines */
|
|
35
|
+
wrap?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Lays out its children in one direction, with spacing from the Midas space
|
|
39
|
+
* tokens.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://designsystem.migrationsverket.se/components/stack}
|
|
42
|
+
*/
|
|
43
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Stack } from '.';
|
|
3
|
+
type Story = StoryObj<typeof Stack>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('./Stack').StackProps & import('react').RefAttributes<HTMLElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
children: import('react').JSX.Element[];
|
|
10
|
+
direction: "column";
|
|
11
|
+
alignItems: "stretch";
|
|
12
|
+
justifyContent: "start";
|
|
13
|
+
wrap: false;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
export declare const Vertical: Story;
|
|
18
|
+
export declare const Horizontal: Story;
|
|
19
|
+
/** Every Midas semantic space token */
|
|
20
|
+
export declare const Spacing: Story;
|
|
21
|
+
/** A list keeps its list semantics, also without bullets */
|
|
22
|
+
export declare const AsList: Story;
|
|
23
|
+
export declare const Wrap: Story;
|
|
24
|
+
export declare const SpaceBetween: Story;
|
package/stack/index.d.ts
ADDED
package/stack/index.js
ADDED