@atelier-ui/react 0.2.17 → 0.2.18
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
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.2.18 (2026-08-26)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **icons:** type the variant icon-name maps as partial records ([e59b45a](https://github.com/DominikPieper/atelier-ui/commit/e59b45a))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Claude Opus 5
|
|
10
|
+
- Dominik Pieper @DominikPieper
|
|
11
|
+
|
|
1
12
|
## 0.2.17 (2026-08-26)
|
|
2
13
|
|
|
3
14
|
### 🚀 Features
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atl-alert.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/alert/atl-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"atl-alert.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/alert/atl-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,SAAS,CAAC;AACzD,OAAO,iBAAiB,CAAC;AAczB,KAAK,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,aACf,SAAQ,cAAc,CAAC,cAAc,CAAC,EACpC,YAAY;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAgB,EAChB,WAAmB,EACnB,WAAW,EACX,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,aAAa,+BAwBf"}
|
|
@@ -16,6 +16,6 @@ const VARIANT_ICON_NAMES = {
|
|
|
16
16
|
export function AtlAlert({ variant = 'info', dismissible = false, onDismissed, children, className, ...rest }) {
|
|
17
17
|
const classes = ['atl-alert', `variant-${variant}`, className].filter(Boolean).join(' ');
|
|
18
18
|
const ariaLive = variant === 'danger' || variant === 'warning' ? 'assertive' : 'polite';
|
|
19
|
-
return (_jsxs("div", { className: classes, role: "alert", "aria-live": ariaLive, ...rest, children: [_jsxs("span", { className: "content", children: [_jsx(AtlIcon, { className: "variant-icon", name: VARIANT_ICON_NAMES[variant], size: "sm" }), children] }), dismissible && (_jsx("button", { className: "dismiss", type: "button", "aria-label": "Dismiss", onClick: onDismissed, children: _jsx(AtlIcon, { name: "close", size: "sm" }) }))] }));
|
|
19
|
+
return (_jsxs("div", { className: classes, role: "alert", "aria-live": ariaLive, ...rest, children: [_jsxs("span", { className: "content", children: [VARIANT_ICON_NAMES[variant] && (_jsx(AtlIcon, { className: "variant-icon", name: VARIANT_ICON_NAMES[variant], size: "sm" })), children] }), dismissible && (_jsx("button", { className: "dismiss", type: "button", "aria-label": "Dismiss", onClick: onDismissed, children: _jsx(AtlIcon, { name: "close", size: "sm" }) }))] }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=atl-alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atl-alert.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/alert/atl-alert.tsx"],"names":[],"mappings":";AAEA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAA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AC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,GAAG,GAC3B,CACV,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { HTMLAttributes, ReactNode } from 'react';\nimport type { AtlAlertSpec, AtlIconName } from '../spec';\nimport './atl-alert.css';\nimport { AtlIcon } from '../icon/atl-icon';\n\n/** Which AtlIcon each variant carries. Names, not glyphs: a glyph in a string map\n * was the fifth way this library drew an icon, and the one check:iconography\n * missed (ADR-0050). */\nconst VARIANT_ICON_NAMES: Partial<Record<AtlAlertVariant, AtlIconName>> = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n};\n\n\ntype AtlAlertVariant = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * Properties for the AtlAlert component.\n */\nexport interface AtlAlertProps\n extends HTMLAttributes<HTMLDivElement>,\n AtlAlertSpec {\n /**\n * The visual style variant of the alert.\n */\n variant?: AtlAlertVariant;\n /**\n * Whether the alert can be dismissed by the user.\n */\n dismissible?: boolean;\n /**\n * Callback triggered when the alert is dismissed.\n */\n onDismissed?: () => void;\n /**\n * The content to be rendered inside the alert.\n */\n children?: ReactNode;\n}\n\n/**\n * An alert component for displaying important messages.\n */\nexport function AtlAlert({\n variant = 'info',\n dismissible = false,\n onDismissed,\n children,\n className,\n ...rest\n}: AtlAlertProps) {\n const classes = ['atl-alert', `variant-${variant}`, className].filter(Boolean).join(' ');\n const ariaLive = variant === 'danger' || variant === 'warning' ? 'assertive' : 'polite';\n\n return (\n <div className={classes} role=\"alert\" aria-live={ariaLive} {...rest}>\n <span className=\"content\">\n {VARIANT_ICON_NAMES[variant] && (\n <AtlIcon className=\"variant-icon\" name={VARIANT_ICON_NAMES[variant]} size=\"sm\" />\n )}\n {children}\n </span>\n {dismissible && (\n <button\n className=\"dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={onDismissed}\n >\n <AtlIcon name=\"close\" size=\"sm\" />\n </button>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atl-badge.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/badge/atl-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"atl-badge.d.ts","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/badge/atl-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,SAAS,CAAC;AACzD,OAAO,iBAAiB,CAAC;AAczB,KAAK,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,aACf,SAAQ,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAmB,EACnB,IAAW,EACX,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,aAAa,+BAUf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atl-badge.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/badge/atl-badge.tsx"],"names":[],"mappings":";AAEA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;wBAEwB;AACxB,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"atl-badge.js","sourceRoot":"","sources":["../../../../../../libs/react/src/lib/badge/atl-badge.tsx"],"names":[],"mappings":";AAEA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;wBAEwB;AACxB,MAAM,kBAAkB,GAAkD;IACxE,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAyBF;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACO;IACd,MAAM,OAAO,GAAG,CAAC,WAAW,EAAE,WAAW,OAAO,EAAE,EAAE,QAAQ,IAAI,EAAE,EAAE,SAAS,CAAC;SAC3E,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC7C,OAAO,CACL,gBAAM,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,KAAK,IAAI,aAC7C,QAAQ,IAAI,KAAC,OAAO,IAAC,SAAS,EAAC,cAAc,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,IAAI,GAAG,EAC1E,QAAQ,IACJ,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { HTMLAttributes, ReactNode } from 'react';\nimport type { AtlBadgeSpec, AtlIconName } from '../spec';\nimport './atl-badge.css';\nimport { AtlIcon } from '../icon/atl-icon';\n\n/** Which AtlIcon each variant carries. Names, not glyphs: a glyph in a string map\n * was the fifth way this library drew an icon, and the one check:iconography\n * missed (ADR-0050). */\nconst VARIANT_ICON_NAMES: Partial<Record<AtlBadgeVariant, AtlIconName>> = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n};\n\n\ntype AtlBadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';\n\n/**\n * Properties for the AtlBadge component.\n */\nexport interface AtlBadgeProps\n extends HTMLAttributes<HTMLSpanElement>,\n AtlBadgeSpec {\n /**\n * The visual style variant of the badge.\n */\n variant?: AtlBadgeVariant;\n /**\n * The size of the badge.\n */\n size?: 'sm' | 'md';\n /**\n * The content to be rendered inside the badge.\n */\n children?: ReactNode;\n}\n\n/**\n * A badge component for displaying small amounts of information or status.\n */\nexport function AtlBadge({\n variant = 'default',\n size = 'md',\n children,\n className,\n ...rest\n}: AtlBadgeProps) {\n const classes = ['atl-badge', `variant-${variant}`, `size-${size}`, className]\n .filter(Boolean).join(' ');\n const iconName = VARIANT_ICON_NAMES[variant];\n return (\n <span className={classes} role=\"status\" {...rest}>\n {iconName && <AtlIcon className=\"variant-icon\" name={iconName} size=\"sm\" />}\n {children}\n </span>\n );\n}\n"]}
|