@alixpartners/ui-components 2.3.0 → 2.3.1

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/README.md CHANGED
@@ -1,99 +1,99 @@
1
- # AlixPartners UI Component Library
2
-
3
- A modern, reusable component library built with **[ReactJS](https://react.dev/)**.
4
-
5
- Version **2.0** has been **rebuilt from the ground up** to align with the latest **AlixPartners Design System** and deliver improved developer experience, accessibility, and performance.
6
-
7
- ‼️ **BETA Notice**: This release is **not yet production-ready**. While stable for development and testing, expect ongoing refinements, new components, and breaking changes before the full release.
8
-
9
- ## ✨ What’s New in 2.0
10
-
11
- - Completely redesigned architecture with modern build tooling ([Vite](https://vitejs.dev/))
12
- - Updated design tokens and styles aligned with AlixPartners Design System
13
- - Improved accessibility (a11y) and semantic HTML usage
14
- - Streamlined props API for cleaner integration
15
- - Enhanced Storybook documentation
16
- - Faster build & development workflows
17
-
18
- ### Version Support
19
-
20
- - v2.x — Active development (BETA)
21
- - v1.x — Maintained for legacy projects (no new features, critical fixes only)
22
-
23
- ---
24
-
25
- ## 🚀 Installation
26
-
27
- ```bash
28
- npm install @alixpartners/ui-components
29
- ```
30
-
31
- ## 🔧 Usage
32
-
33
- ```tsx
34
- import { YourComponent } from '@alixpartners/ui-components'
35
-
36
- function App() {
37
- return <YourComponent />
38
- }
39
- ```
40
-
41
- ## 🧱 Components
42
-
43
- Explore all available components and documentation in Storybook.
44
-
45
- To run it locally:
46
-
47
- ```bash
48
- npm run storybook
49
- ```
50
-
51
- ---
52
-
53
- ## 📦 Build
54
-
55
- To bundle the library for publishing:
56
-
57
- ```bash
58
- npm run build
59
- ```
60
-
61
- The output will be in the `dist/` directory.
62
-
63
- ### Usage in projects while developing
64
-
65
- When working on the library and testing it in another project:
66
-
67
- ```bash
68
- # In the component library root:
69
- npm link
70
-
71
- # In the consuming project's root:
72
- npm link alix-partners-react-components-test
73
- ```
74
-
75
- Then import components using the `alix-partners-react-components-test` import.
76
-
77
- ## 🧪 Testing
78
-
79
- ```bash
80
- npm run test
81
- ```
82
-
83
- #### 🧪 Test Coverage
84
-
85
- ```bash
86
- npm run coverage
87
- ```
88
-
89
- ## 📚 Publish
90
-
91
- To publish to npm:
92
-
93
- 1. Bump the version in `package.json`
94
- 2. Create a pull request in Azure DevOps to the `main` branch
95
- 3. This will automatically publish the library to `npm` once approved
96
-
97
- ## 🤝 Contributing
98
-
99
- The **AlixPartners UI Component Library** is a collaborative, community-driven project where contributions from all team members are encouraged and valued. If you’d like to add new components or improve existing ones, please see the CONTRIBUTING.md file.
1
+ # AlixPartners UI Component Library
2
+
3
+ A modern, reusable component library built with **[ReactJS](https://react.dev/)**.
4
+
5
+ Version **2.0** has been **rebuilt from the ground up** to align with the latest **AlixPartners Design System** and deliver improved developer experience, accessibility, and performance.
6
+
7
+ ‼️ **BETA Notice**: This release is **not yet production-ready**. While stable for development and testing, expect ongoing refinements, new components, and breaking changes before the full release.
8
+
9
+ ## ✨ What’s New in 2.0
10
+
11
+ - Completely redesigned architecture with modern build tooling ([Vite](https://vitejs.dev/))
12
+ - Updated design tokens and styles aligned with AlixPartners Design System
13
+ - Improved accessibility (a11y) and semantic HTML usage
14
+ - Streamlined props API for cleaner integration
15
+ - Enhanced Storybook documentation
16
+ - Faster build & development workflows
17
+
18
+ ### Version Support
19
+
20
+ - v2.x — Active development (BETA)
21
+ - v1.x — Maintained for legacy projects (no new features, critical fixes only)
22
+
23
+ ---
24
+
25
+ ## 🚀 Installation
26
+
27
+ ```bash
28
+ npm install @alixpartners/ui-components
29
+ ```
30
+
31
+ ## 🔧 Usage
32
+
33
+ ```tsx
34
+ import { YourComponent } from '@alixpartners/ui-components'
35
+
36
+ function App() {
37
+ return <YourComponent />
38
+ }
39
+ ```
40
+
41
+ ## 🧱 Components
42
+
43
+ Explore all available components and documentation in Storybook.
44
+
45
+ To run it locally:
46
+
47
+ ```bash
48
+ npm run storybook
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 📦 Build
54
+
55
+ To bundle the library for publishing:
56
+
57
+ ```bash
58
+ npm run build
59
+ ```
60
+
61
+ The output will be in the `dist/` directory.
62
+
63
+ ### Usage in projects while developing
64
+
65
+ When working on the library and testing it in another project:
66
+
67
+ ```bash
68
+ # In the component library root:
69
+ npm link
70
+
71
+ # In the consuming project's root:
72
+ npm link alix-partners-react-components-test
73
+ ```
74
+
75
+ Then import components using the `alix-partners-react-components-test` import.
76
+
77
+ ## 🧪 Testing
78
+
79
+ ```bash
80
+ npm run test
81
+ ```
82
+
83
+ #### 🧪 Test Coverage
84
+
85
+ ```bash
86
+ npm run coverage
87
+ ```
88
+
89
+ ## 📚 Publish
90
+
91
+ To publish to npm:
92
+
93
+ 1. Bump the version in `package.json`
94
+ 2. Create a pull request in Azure DevOps to the `main` branch
95
+ 3. This will automatically publish the library to `npm` once approved
96
+
97
+ ## 🤝 Contributing
98
+
99
+ The **AlixPartners UI Component Library** is a collaborative, community-driven project where contributions from all team members are encouraged and valued. If you’d like to add new components or improve existing ones, please see the CONTRIBUTING.md file.
@@ -20,6 +20,8 @@ type FilePickerProps = {
20
20
  helpLink?: string;
21
21
  helpLinkText?: string;
22
22
  labelTooltip?: InputLabelTooltipProps;
23
+ onUpload?: (files: UploadFile[]) => void;
24
+ onRemoveFile?: (fileName: string) => void;
23
25
  } & InteractiveEventHandlers;
24
26
  /**
25
27
  * FilePicker component for uploading files.
@@ -42,5 +44,5 @@ type FilePickerProps = {
42
44
  * @param {InputLabelTooltipProps} props.labelTooltip - The label tooltip of the component
43
45
  * @returns {JSX.Element} The rendered FilePicker component
44
46
  */
45
- export default function FilePicker({ type, maxFiles, fileExtensionsAllowed, maxSize, queueFiles, disabled, value, label, required, placeholder, errorMessage, helpText, helpLink, helpLinkText, labelTooltip, }: FilePickerProps): import("react/jsx-runtime").JSX.Element;
47
+ export default function FilePicker({ type, maxFiles, fileExtensionsAllowed, maxSize, queueFiles, disabled, value, label, required, placeholder, errorMessage, helpText, helpLink, helpLinkText, labelTooltip, onUpload, onRemoveFile, }: FilePickerProps): import("react/jsx-runtime").JSX.Element;
46
48
  export {};
@@ -1,153 +1,155 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { useId as J, useRef as Y, useState as M, useEffect as G } from "react";
3
- import Q from "../Tooltip/Tooltip.js";
4
- import g from "../Icon/Icon.js";
5
- import I from "../Button/Button.js";
6
- import { c as W } from "../../clsx-OuTLNxxd.js";
7
- import '../../assets/FilePicker.css';const Z = "FilePicker-module__container___knCCi", ee = "FilePicker-module__label___al7Xe", ie = "FilePicker-module__required___41Vjd", le = "FilePicker-module__labelTooltipIcon___Cc1QF", te = "FilePicker-module__helpers___79-g5", ne = "FilePicker-module__helperText___ja9Rr", se = "FilePicker-module__errorMessage___TvHrL", oe = "FilePicker-module__singleFileHelpLinkContainer___mpjUf", ce = "FilePicker-module__singleFileHelpLinkReservedSpace___r8j2b", re = "FilePicker-module__helpLink___uu45D", me = "FilePicker-module__input___cL1Hs", ae = "FilePicker-module__singleFileContainer___OFSDt", ue = "FilePicker-module__singleFileInputContainer___MOkES", pe = "FilePicker-module__inputFileName___sMs7R", _e = "FilePicker-module__inputFileNamePlaceholder___-mkDD", Fe = "FilePicker-module__inputButton___ghLlD", de = "FilePicker-module__multipleHelpText___5tnnn", Ie = "FilePicker-module__multipleInputButton___WCJp9", he = "FilePicker-module__multipleFilesList___Kim0I", Le = "FilePicker-module__multipleFilesListItem___01PDS", ke = "FilePicker-module__multipleFilesListItemContent___pKbho", fe = "FilePicker-module__multipleFilesListItemContentData___5GC-C", Ne = "FilePicker-module__multipleFilesListItemIconContainer___7sUL5", ge = "FilePicker-module__multipleFilesListItemIcon___nfMX9", Ce = "FilePicker-module__multipleFilesListItemText___nPqrL", Pe = "FilePicker-module__multipleFilesListItemName___NjHhX", xe = "FilePicker-module__multipleFilesListItemSize___wc8LJ", ve = "FilePicker-module__multipleFilesListItemError___x9qkT", De = "FilePicker-module__multipleFilesListItemIconError___0RO46", Ee = "FilePicker-module__multipleFilesListItemIconDelete___9Z9Dl", Te = "FilePicker-module__disabled___szMiq", e = {
8
- container: Z,
9
- label: ee,
10
- required: ie,
11
- labelTooltipIcon: le,
12
- helpers: te,
13
- helperText: ne,
14
- errorMessage: se,
15
- singleFileHelpLinkContainer: oe,
16
- singleFileHelpLinkReservedSpace: ce,
17
- helpLink: re,
18
- input: me,
19
- singleFileContainer: ae,
20
- singleFileInputContainer: ue,
21
- inputFileName: pe,
22
- inputFileNamePlaceholder: _e,
23
- inputButton: Fe,
24
- multipleHelpText: de,
25
- multipleInputButton: Ie,
26
- multipleFilesList: he,
27
- multipleFilesListItem: Le,
28
- multipleFilesListItemContent: ke,
29
- multipleFilesListItemContentData: fe,
30
- multipleFilesListItemIconContainer: Ne,
31
- multipleFilesListItemIcon: ge,
32
- multipleFilesListItemText: Ce,
33
- multipleFilesListItemName: Pe,
34
- multipleFilesListItemSize: xe,
35
- multipleFilesListItemError: ve,
36
- multipleFilesListItemIconError: De,
37
- multipleFilesListItemIconDelete: Ee,
38
- disabled: Te
2
+ import { useId as Q, useRef as W, useState as q, useEffect as Z } from "react";
3
+ import U from "../Tooltip/Tooltip.js";
4
+ import P from "../Icon/Icon.js";
5
+ import h from "../Button/Button.js";
6
+ import { c as ee } from "../../clsx-OuTLNxxd.js";
7
+ import '../../assets/FilePicker.css';const ie = "FilePicker-module__container___knCCi", le = "FilePicker-module__label___al7Xe", te = "FilePicker-module__required___41Vjd", ne = "FilePicker-module__labelTooltipIcon___Cc1QF", se = "FilePicker-module__helpers___79-g5", ce = "FilePicker-module__helperText___ja9Rr", re = "FilePicker-module__errorMessage___TvHrL", me = "FilePicker-module__singleFileHelpLinkContainer___mpjUf", oe = "FilePicker-module__singleFileHelpLinkReservedSpace___r8j2b", ae = "FilePicker-module__helpLink___uu45D", ue = "FilePicker-module__input___cL1Hs", pe = "FilePicker-module__singleFileContainer___OFSDt", _e = "FilePicker-module__singleFileInputContainer___MOkES", Fe = "FilePicker-module__inputFileName___sMs7R", de = "FilePicker-module__inputFileNamePlaceholder___-mkDD", Ie = "FilePicker-module__inputButton___ghLlD", he = "FilePicker-module__multipleHelpText___5tnnn", Le = "FilePicker-module__multipleInputButton___WCJp9", ke = "FilePicker-module__multipleFilesList___Kim0I", fe = "FilePicker-module__multipleFilesListItem___01PDS", Ne = "FilePicker-module__multipleFilesListItemContent___pKbho", ge = "FilePicker-module__multipleFilesListItemContentData___5GC-C", Ce = "FilePicker-module__multipleFilesListItemIconContainer___7sUL5", Pe = "FilePicker-module__multipleFilesListItemIcon___nfMX9", xe = "FilePicker-module__multipleFilesListItemText___nPqrL", De = "FilePicker-module__multipleFilesListItemName___NjHhX", ve = "FilePicker-module__multipleFilesListItemSize___wc8LJ", Ee = "FilePicker-module__multipleFilesListItemError___x9qkT", Te = "FilePicker-module__multipleFilesListItemIconError___0RO46", Be = "FilePicker-module__multipleFilesListItemIconDelete___9Z9Dl", He = "FilePicker-module__disabled___szMiq", e = {
8
+ container: ie,
9
+ label: le,
10
+ required: te,
11
+ labelTooltipIcon: ne,
12
+ helpers: se,
13
+ helperText: ce,
14
+ errorMessage: re,
15
+ singleFileHelpLinkContainer: me,
16
+ singleFileHelpLinkReservedSpace: oe,
17
+ helpLink: ae,
18
+ input: ue,
19
+ singleFileContainer: pe,
20
+ singleFileInputContainer: _e,
21
+ inputFileName: Fe,
22
+ inputFileNamePlaceholder: de,
23
+ inputButton: Ie,
24
+ multipleHelpText: he,
25
+ multipleInputButton: Le,
26
+ multipleFilesList: ke,
27
+ multipleFilesListItem: fe,
28
+ multipleFilesListItemContent: Ne,
29
+ multipleFilesListItemContentData: ge,
30
+ multipleFilesListItemIconContainer: Ce,
31
+ multipleFilesListItemIcon: Pe,
32
+ multipleFilesListItemText: xe,
33
+ multipleFilesListItemName: De,
34
+ multipleFilesListItemSize: ve,
35
+ multipleFilesListItemError: Ee,
36
+ multipleFilesListItemIconError: Te,
37
+ multipleFilesListItemIconDelete: Be,
38
+ disabled: He
39
39
  };
40
- function Me({
41
- type: c = "single",
42
- maxFiles: _ = 1,
43
- fileExtensionsAllowed: h,
44
- maxSize: u,
45
- queueFiles: j = !1,
40
+ function qe({
41
+ type: r = "single",
42
+ maxFiles: F = 1,
43
+ fileExtensionsAllowed: L,
44
+ maxSize: p,
45
+ queueFiles: R = !1,
46
46
  disabled: s = !1,
47
- value: F,
48
- label: C,
49
- required: b = !1,
50
- placeholder: q,
51
- errorMessage: m,
52
- helpText: L,
53
- helpLink: P,
54
- helpLinkText: x,
55
- labelTooltip: r
47
+ value: d,
48
+ label: x,
49
+ required: K = !1,
50
+ placeholder: V,
51
+ errorMessage: a,
52
+ helpText: k,
53
+ helpLink: D,
54
+ helpLinkText: v,
55
+ labelTooltip: o,
56
+ onUpload: u,
57
+ onRemoveFile: f
56
58
  }) {
57
- var R, w;
58
- const v = J(), k = Y(null), [l, d] = M(F ? F.map((i) => ({
59
+ var M, j;
60
+ const E = Q(), N = W(null), [l, I] = q(d ? d.map((i) => ({
59
61
  file: i
60
- })) : []), [D, E] = M(!1);
61
- G(() => {
62
- const i = B(F ?? []);
63
- d(i);
64
- }, [F]);
65
- const K = h.map((i) => `.${i.replace(/^\./, "")}`).join(","), T = h.join(", "), V = (i) => {
66
- const o = i.name.toLowerCase();
67
- return o.includes(".") ? o.split(".").pop() ?? "" : "";
68
- }, B = (i) => {
69
- const a = l.length + i.length > _;
70
- E(a);
71
- const f = u ? u * 1024 * 1024 : Number.POSITIVE_INFINITY, y = new Set(h.map((p) => p.toLowerCase().replace(/^\./, "")));
72
- return i.map((p) => {
73
- const U = p.size <= f, X = y.size === 0 || y.has(V(p));
74
- let N;
75
- const A = u ? `up to ${u}MB` : "";
76
- return U || (N = `File size is too large. Must be ${A}.`), X || (N = `The file format is incorrect. Please make sure it is one of the extensions: ${T}.`), {
77
- file: p,
78
- error: N
62
+ })) : []), [T, B] = q(!1);
63
+ Z(() => {
64
+ const i = S(d ?? []);
65
+ I(i);
66
+ }, [d]);
67
+ const O = L.map((i) => `.${i.replace(/^\./, "")}`).join(","), H = L.join(", "), $ = (i) => {
68
+ const c = i.name.toLowerCase();
69
+ return c.includes(".") ? c.split(".").pop() ?? "" : "";
70
+ }, S = (i) => {
71
+ const m = l.length + i.length > F;
72
+ B(m);
73
+ const g = p ? p * 1024 * 1024 : Number.POSITIVE_INFINITY, b = new Set(L.map((_) => _.toLowerCase().replace(/^\./, "")));
74
+ return i.map((_) => {
75
+ const J = _.size <= g, Y = b.size === 0 || b.has($(_));
76
+ let C;
77
+ const G = p ? `up to ${p}MB` : "";
78
+ return J || (C = `File size is too large. Must be ${G}.`), Y || (C = `The file format is incorrect. Please make sure it is one of the extensions: ${H}.`), {
79
+ file: _,
80
+ error: C
79
81
  };
80
82
  });
81
- }, O = (i) => (i / 1024).toFixed(2) + " KB", H = () => {
83
+ }, X = (i) => (i / 1024).toFixed(2) + " KB", z = () => {
82
84
  var i;
83
- s || (i = k.current) == null || i.click();
84
- }, S = (i) => {
85
- var o;
86
- s || i.key === "Enter" && ((o = k.current) == null || o.click());
87
- }, $ = (i) => {
85
+ s || (i = N.current) == null || i.click();
86
+ }, w = (i) => {
87
+ var c;
88
+ s || i.key === "Enter" && ((c = N.current) == null || c.click());
89
+ }, A = (i) => {
88
90
  if (s) return;
89
- const o = i.target.files, a = B(Array.from(o ?? []));
90
- d(c === "multiple" && j ? [...l, ...a] : a);
91
- }, z = (i) => {
91
+ const c = i.target.files, m = S(Array.from(c ?? []));
92
+ r === "multiple" && R ? (I([...l, ...m]), u == null || u(m)) : (I(m), u == null || u(m)), i.target.value = "";
93
+ }, y = (i) => {
92
94
  if (s || !l) return;
93
- const a = l.length - 1 > _;
94
- E(a), d(l == null ? void 0 : l.filter((f) => f.file.name !== i));
95
+ const m = l.length - 1 > F;
96
+ B(m), I(l == null ? void 0 : l.filter((g) => g.file.name !== i)), f == null || f(i);
95
97
  };
96
- return /* @__PURE__ */ n("div", { className: W(e.container, s && e.disabled), children: [
97
- /* @__PURE__ */ n("label", { htmlFor: v, onClick: (i) => i.preventDefault(), className: e.label, children: [
98
- /* @__PURE__ */ t("span", { title: C, className: e.labelText, children: C }),
99
- b && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: e.required, children: "*" }),
100
- r && /* @__PURE__ */ t(Q, { content: r.content, size: r.size, theme: r.theme, tipSide: r.tipSide, tipAlignment: r.tipAlignment, startVisible: r.startVisible, children: /* @__PURE__ */ t(g, { icon: "ap-icon-info", className: e.labelTooltipIcon }) }),
101
- c === "multiple" && /* @__PURE__ */ n("span", { className: e.multipleHelpText, children: [
98
+ return /* @__PURE__ */ n("div", { className: ee(e.container, s && e.disabled), children: [
99
+ /* @__PURE__ */ n("label", { htmlFor: E, onClick: (i) => i.preventDefault(), className: e.label, children: [
100
+ /* @__PURE__ */ t("span", { title: x, className: e.labelText, children: x }),
101
+ K && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: e.required, children: "*" }),
102
+ o && /* @__PURE__ */ t(U, { content: o.content, size: o.size, theme: o.theme, tipSide: o.tipSide, tipAlignment: o.tipAlignment, startVisible: o.startVisible, children: /* @__PURE__ */ t(P, { icon: "ap-icon-info", className: e.labelTooltipIcon }) }),
103
+ r === "multiple" && /* @__PURE__ */ n("span", { className: e.multipleHelpText, children: [
102
104
  "Only ",
103
- T,
105
+ H,
104
106
  " files with max size of ",
105
- u,
107
+ p,
106
108
  "MB"
107
109
  ] })
108
110
  ] }),
109
- /* @__PURE__ */ t("input", { accept: K, multiple: c === "multiple", ref: k, type: "file", id: v, className: e.input, onChange: $ }),
110
- c === "single" && /* @__PURE__ */ n("div", { className: e.singleFileContainer, children: [
111
- /* @__PURE__ */ n("div", { tabIndex: s ? -1 : 0, onClick: H, onKeyDown: S, className: e.singleFileInputContainer, children: [
111
+ /* @__PURE__ */ t("input", { accept: O, multiple: r === "multiple", ref: N, type: "file", id: E, className: e.input, onChange: A }),
112
+ r === "single" && /* @__PURE__ */ n("div", { className: e.singleFileContainer, children: [
113
+ /* @__PURE__ */ n("div", { tabIndex: s ? -1 : 0, onClick: z, onKeyDown: w, className: e.singleFileInputContainer, children: [
112
114
  /* @__PURE__ */ n("span", { className: e.inputFileName, children: [
113
115
  l && l.length > 0 && /* @__PURE__ */ t("span", { className: e.inputFileNameText, children: l[0].file.name }),
114
- l && l.length === 0 && /* @__PURE__ */ t("span", { className: e.inputFileNamePlaceholder, children: q })
116
+ l && l.length === 0 && /* @__PURE__ */ t("span", { className: e.inputFileNamePlaceholder, children: V })
115
117
  ] }),
116
- /* @__PURE__ */ t(I, { type: "tertiary", variant: "default", size: "md", icon: "ap-icon-upload", className: e.inputButton, tabIndex: -1, disabled: s, children: /* @__PURE__ */ t("span", { children: "Browse file" }) })
118
+ /* @__PURE__ */ t(h, { type: "tertiary", variant: "default", size: "md", icon: "ap-icon-upload", className: e.inputButton, tabIndex: -1, disabled: s, children: /* @__PURE__ */ t("span", { children: "Browse file" }) })
117
119
  ] }),
118
- /* @__PURE__ */ t("span", { className: e.singleFileHelpLinkReservedSpace, children: l && l.length > 0 && /* @__PURE__ */ t(I, { type: "tertiary", variant: "default", size: "md", icon: "ap-icon-delete", className: e.singleFileDeleteButton, onClick: () => z(l[0].file.name), disabled: s }) })
120
+ /* @__PURE__ */ t("span", { className: e.singleFileHelpLinkReservedSpace, children: l && l.length > 0 && /* @__PURE__ */ t(h, { type: "tertiary", variant: "default", size: "md", icon: "ap-icon-delete", className: e.singleFileDeleteButton, onClick: () => y(l[0].file.name), disabled: s }) })
119
121
  ] }),
120
- c === "multiple" && /* @__PURE__ */ t(I, { type: "secondary", variant: "default", size: "md", icon: "ap-icon-upload", className: e.multipleInputButton, onClick: H, onKeyDown: S, disabled: s, children: /* @__PURE__ */ n("span", { children: [
122
+ r === "multiple" && /* @__PURE__ */ t(h, { type: "secondary", variant: "default", size: "md", icon: "ap-icon-upload", className: e.multipleInputButton, onClick: z, onKeyDown: w, disabled: s, children: /* @__PURE__ */ n("span", { children: [
121
123
  "Browse files (max ",
122
- _,
124
+ F,
123
125
  " files)"
124
126
  ] }) }),
125
127
  /* @__PURE__ */ n("div", { className: e.helpers, children: [
126
- m || D || (R = l[0]) != null && R.error ? /* @__PURE__ */ n("span", { title: m, className: e.errorMessage, children: [
127
- c === "single" && (m || ((w = l[0]) == null ? void 0 : w.error)),
128
- c === "multiple" && (m || (D ? `You can only upload up to ${_} files.` : ""))
129
- ] }) : L && c === "single" && /* @__PURE__ */ t("span", { title: L, className: e.helperText, children: L }),
130
- c === "single" && P && x && /* @__PURE__ */ n("span", { className: e.singleFileHelpLinkContainer, children: [
131
- /* @__PURE__ */ t("a", { href: P, className: e.helpLink, target: "_blank", rel: "noopener noreferrer", tabIndex: s ? -1 : 0, children: x }),
128
+ a || T || (M = l[0]) != null && M.error ? /* @__PURE__ */ n("span", { title: a, className: e.errorMessage, children: [
129
+ r === "single" && (a || ((j = l[0]) == null ? void 0 : j.error)),
130
+ r === "multiple" && (a || (T ? `You can only upload up to ${F} files.` : ""))
131
+ ] }) : k && r === "single" && /* @__PURE__ */ t("span", { title: k, className: e.helperText, children: k }),
132
+ r === "single" && D && v && /* @__PURE__ */ n("span", { className: e.singleFileHelpLinkContainer, children: [
133
+ /* @__PURE__ */ t("a", { href: D, className: e.helpLink, target: "_blank", rel: "noopener noreferrer", tabIndex: s ? -1 : 0, children: v }),
132
134
  /* @__PURE__ */ t("span", { className: e.singleFileHelpLinkReservedSpace })
133
135
  ] })
134
136
  ] }),
135
- c === "multiple" && l && (l == null ? void 0 : l.length) > 0 && /* @__PURE__ */ t("ul", { className: e.multipleFilesList, children: l == null ? void 0 : l.map((i, o) => /* @__PURE__ */ t("li", { className: e.multipleFilesListItem, children: /* @__PURE__ */ n("div", { className: e.multipleFilesListItemContent, children: [
136
- /* @__PURE__ */ t("span", { className: e.multipleFilesListItemIconContainer, children: /* @__PURE__ */ t(g, { icon: "ap-icon-document", className: e.multipleFilesListItemIcon }) }),
137
+ r === "multiple" && l && (l == null ? void 0 : l.length) > 0 && /* @__PURE__ */ t("ul", { className: e.multipleFilesList, children: l == null ? void 0 : l.map((i, c) => /* @__PURE__ */ t("li", { className: e.multipleFilesListItem, children: /* @__PURE__ */ n("div", { className: e.multipleFilesListItemContent, children: [
138
+ /* @__PURE__ */ t("span", { className: e.multipleFilesListItemIconContainer, children: /* @__PURE__ */ t(P, { icon: "ap-icon-document", className: e.multipleFilesListItemIcon }) }),
137
139
  /* @__PURE__ */ n("div", { className: e.multipleFilesListItemContentData, children: [
138
140
  /* @__PURE__ */ n("div", { className: e.multipleFilesListItemText, children: [
139
141
  /* @__PURE__ */ t("span", { className: e.multipleFilesListItemName, children: i.file.name }),
140
- /* @__PURE__ */ t("span", { className: e.multipleFilesListItemSize, children: O(i.file.size) }),
142
+ /* @__PURE__ */ t("span", { className: e.multipleFilesListItemSize, children: X(i.file.size) }),
141
143
  i.error && /* @__PURE__ */ n("span", { className: e.multipleFilesListItemError, children: [
142
- /* @__PURE__ */ t(g, { icon: "ap-icon-alert", className: e.multipleFilesListItemIconError }),
144
+ /* @__PURE__ */ t(P, { icon: "ap-icon-alert", className: e.multipleFilesListItemIconError }),
143
145
  i.error
144
146
  ] })
145
147
  ] }),
146
- /* @__PURE__ */ t(I, { type: "tertiary", variant: "default", size: "sm", onClick: () => z(i.file.name), icon: "ap-icon-delete", iconClassName: e.multipleFilesListItemIconDelete, disabled: s })
148
+ /* @__PURE__ */ t(h, { type: "tertiary", variant: "default", size: "sm", onClick: () => y(i.file.name), icon: "ap-icon-delete", iconClassName: e.multipleFilesListItemIconDelete, disabled: s })
147
149
  ] })
148
- ] }) }, o)) })
150
+ ] }) }, c)) })
149
151
  ] });
150
152
  }
151
153
  export {
152
- Me as default
154
+ qe as default
153
155
  };
package/dist/web.config CHANGED
@@ -1,9 +1,9 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <configuration>
3
- <system.webServer>
4
- <staticContent>
5
- <remove fileExtension=".json"/>
6
- <mimeMap fileExtension=".json" mimeType="application/json"/>
7
- </staticContent>
8
- </system.webServer>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <configuration>
3
+ <system.webServer>
4
+ <staticContent>
5
+ <remove fileExtension=".json"/>
6
+ <mimeMap fileExtension=".json" mimeType="application/json"/>
7
+ </staticContent>
8
+ </system.webServer>
9
9
  </configuration>
package/package.json CHANGED
@@ -1,87 +1,87 @@
1
- {
2
- "name": "@alixpartners/ui-components",
3
- "version": "2.3.0",
4
- "type": "module",
5
- "files": [
6
- "dist"
7
- ],
8
- "exports": "./dist/main.js",
9
- "module": "./dist/main.js",
10
- "types": "./dist/main.d.ts",
11
- "license": "SEE LICENSE IN LICENSE.md",
12
- "repository": "https://alixpartners-dev.visualstudio.com/_git/AP.UIComponents",
13
- "main": "./dist/umd/index.js",
14
- "scripts": {
15
- "build": "tsc -b && vite build",
16
- "lint": "eslint . --ext ts,tsx",
17
- "lint:fix": "eslint . --ext ts,tsx --fix",
18
- "format": "prettier --check .",
19
- "format:fix": "prettier --write .",
20
- "stylelint": "stylelint **/*.css",
21
- "stylelint:fix": "stylelint **/*.css --fix",
22
- "storybook": "storybook dev -p 6006",
23
- "build-storybook": "storybook build",
24
- "test": "vitest",
25
- "test:unit": "vitest --project unit",
26
- "test:storybook": "vitest --project storybook",
27
- "test:ui": "vitest --ui",
28
- "coverage": "vitest run --coverage",
29
- "generate-icons": "node ./src/assets/generateIconsHelperFiles.js"
30
- },
31
- "dependencies": {
32
- "clsx": "^2.1.1"
33
- },
34
- "peerDependencies": {
35
- "react": "^18.3.1",
36
- "react-dom": "^18.3.1",
37
- "radix-ui": "^1.4.2",
38
- "notistack": "^3.0.1"
39
- },
40
- "devDependencies": {
41
- "@chromatic-com/storybook": "^4.0.1",
42
- "@eslint/js": "^9.25.0",
43
- "@storybook/addon-designs": "^10.0.2",
44
- "@storybook/addon-onboarding": "^9.0.18",
45
- "@storybook/react-vite": "^9.0.18",
46
- "@testing-library/react": "^16.3.0",
47
- "@types/node": "^22.15.21",
48
- "@types/react": "^19.1.2",
49
- "@types/react-dom": "^19.1.2",
50
- "@vitejs/plugin-react": "^4.4.1",
51
- "@vitest/browser": "^3.1.4",
52
- "@vitest/coverage-v8": "^3.1.4",
53
- "@vitest/ui": "^3.1.4",
54
- "babel-plugin-react-remove-properties": "^0.3.0",
55
- "eslint": "^9.25.0",
56
- "eslint-config-prettier": "^10.1.5",
57
- "eslint-plugin-react-hooks": "^5.2.0",
58
- "eslint-plugin-react-refresh": "^0.4.19",
59
- "eslint-plugin-storybook": "^9.0.18",
60
- "globals": "^16.0.0",
61
- "happy-dom": "^15.11.6",
62
- "jsdom": "^26.1.0",
63
- "notistack": "^3.0.1",
64
- "playwright": "^1.52.0",
65
- "postcss-scss": "^4.0.9",
66
- "prettier": "^3.5.3",
67
- "sass": "^1.89.0",
68
- "storybook": "^9.0.18",
69
- "stylelint": "^16.19.1",
70
- "stylelint-config-standard": "^38.0.0",
71
- "stylelint-scss": "^6.12.0",
72
- "typescript": "~5.8.3",
73
- "typescript-eslint": "^8.30.1",
74
- "vite": "^6.3.5",
75
- "vite-plugin-dts": "^4.5.4",
76
- "vite-plugin-lib-inject-css": "^2.2.2",
77
- "vitest": "^3.1.4",
78
- "@storybook/addon-vitest": "9.0.18",
79
- "@storybook/addon-docs": "^9.0.18",
80
- "glob": "^11.0.2"
81
- },
82
- "eslintConfig": {
83
- "extends": [
84
- "plugin:storybook/recommended"
85
- ]
86
- }
87
- }
1
+ {
2
+ "name": "@alixpartners/ui-components",
3
+ "version": "2.3.1",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "exports": "./dist/main.js",
9
+ "module": "./dist/main.js",
10
+ "types": "./dist/main.d.ts",
11
+ "license": "SEE LICENSE IN LICENSE.md",
12
+ "repository": "https://alixpartners-dev.visualstudio.com/_git/AP.UIComponents",
13
+ "main": "./dist/umd/index.js",
14
+ "scripts": {
15
+ "build": "tsc -b && vite build",
16
+ "lint": "eslint . --ext ts,tsx",
17
+ "lint:fix": "eslint . --ext ts,tsx --fix",
18
+ "format": "prettier --check .",
19
+ "format:fix": "prettier --write .",
20
+ "stylelint": "stylelint **/*.css",
21
+ "stylelint:fix": "stylelint **/*.css --fix",
22
+ "storybook": "storybook dev -p 6006",
23
+ "build-storybook": "storybook build",
24
+ "test": "vitest",
25
+ "test:unit": "vitest --project unit",
26
+ "test:storybook": "vitest --project storybook",
27
+ "test:ui": "vitest --ui",
28
+ "coverage": "vitest run --coverage",
29
+ "generate-icons": "node ./src/assets/generateIconsHelperFiles.js"
30
+ },
31
+ "dependencies": {
32
+ "clsx": "^2.1.1"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "^18.3.1",
36
+ "react-dom": "^18.3.1",
37
+ "radix-ui": "^1.4.2",
38
+ "notistack": "^3.0.1"
39
+ },
40
+ "devDependencies": {
41
+ "@chromatic-com/storybook": "^4.0.1",
42
+ "@eslint/js": "^9.25.0",
43
+ "@storybook/addon-designs": "^10.0.2",
44
+ "@storybook/addon-onboarding": "^9.0.18",
45
+ "@storybook/react-vite": "^9.0.18",
46
+ "@testing-library/react": "^16.3.0",
47
+ "@types/node": "^22.15.21",
48
+ "@types/react": "^19.1.2",
49
+ "@types/react-dom": "^19.1.2",
50
+ "@vitejs/plugin-react": "^4.4.1",
51
+ "@vitest/browser": "^3.1.4",
52
+ "@vitest/coverage-v8": "^3.1.4",
53
+ "@vitest/ui": "^3.1.4",
54
+ "babel-plugin-react-remove-properties": "^0.3.0",
55
+ "eslint": "^9.25.0",
56
+ "eslint-config-prettier": "^10.1.5",
57
+ "eslint-plugin-react-hooks": "^5.2.0",
58
+ "eslint-plugin-react-refresh": "^0.4.19",
59
+ "eslint-plugin-storybook": "^9.0.18",
60
+ "globals": "^16.0.0",
61
+ "happy-dom": "^15.11.6",
62
+ "jsdom": "^26.1.0",
63
+ "notistack": "^3.0.1",
64
+ "playwright": "^1.52.0",
65
+ "postcss-scss": "^4.0.9",
66
+ "prettier": "^3.5.3",
67
+ "sass": "^1.89.0",
68
+ "storybook": "^9.0.18",
69
+ "stylelint": "^16.19.1",
70
+ "stylelint-config-standard": "^38.0.0",
71
+ "stylelint-scss": "^6.12.0",
72
+ "typescript": "~5.8.3",
73
+ "typescript-eslint": "^8.30.1",
74
+ "vite": "^6.3.5",
75
+ "vite-plugin-dts": "^4.5.4",
76
+ "vite-plugin-lib-inject-css": "^2.2.2",
77
+ "vitest": "^3.1.4",
78
+ "@storybook/addon-vitest": "9.0.18",
79
+ "@storybook/addon-docs": "^9.0.18",
80
+ "glob": "^11.0.2"
81
+ },
82
+ "eslintConfig": {
83
+ "extends": [
84
+ "plugin:storybook/recommended"
85
+ ]
86
+ }
87
+ }