@arc-ui/components 11.3.0 → 11.4.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.
Files changed (49) hide show
  1. package/dist/Button/Button.cjs.d.ts +1 -1
  2. package/dist/Button/Button.cjs.js +1 -1
  3. package/dist/Button/Button.esm.d.ts +1 -1
  4. package/dist/Button/Button.esm.js +1 -1
  5. package/dist/Card/Card.cjs.js +1 -1
  6. package/dist/Card/Card.esm.js +1 -1
  7. package/dist/ProgressBar/ProgressBar.cjs.d.ts +47 -0
  8. package/dist/ProgressBar/ProgressBar.cjs.js +113 -0
  9. package/dist/ProgressBar/ProgressBar.esm.d.ts +47 -0
  10. package/dist/ProgressBar/ProgressBar.esm.js +105 -0
  11. package/dist/ProgressBar/package.json +7 -0
  12. package/dist/SiteHeader/SiteHeader.cjs.js +1 -1
  13. package/dist/SiteHeader/SiteHeader.esm.js +1 -1
  14. package/dist/Switch/Switch.cjs.js +1 -1
  15. package/dist/Switch/Switch.esm.js +1 -1
  16. package/dist/Tag/Tag.cjs.d.ts +33 -0
  17. package/dist/Tag/Tag.cjs.js +73 -0
  18. package/dist/Tag/Tag.esm.d.ts +33 -0
  19. package/dist/Tag/Tag.esm.js +65 -0
  20. package/dist/Tag/package.json +7 -0
  21. package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -1
  22. package/dist/VerticalSpace/VerticalSpace.cjs.js +1 -1
  23. package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -1
  24. package/dist/VerticalSpace/VerticalSpace.esm.js +1 -1
  25. package/dist/_shared/cjs/{Button-b3a69953.js → Button-1af6868c.js} +1 -4
  26. package/dist/_shared/{esm/VerticalSpace-6b4f5e50.d.ts → cjs/VerticalSpace-7aed88ab.d.ts} +16 -0
  27. package/dist/_shared/cjs/{VerticalSpace-65ad083c.js → VerticalSpace-7aed88ab.js} +6 -2
  28. package/dist/_shared/esm/{Button-69439f8f.js → Button-10700df4.js} +1 -4
  29. package/dist/_shared/{cjs/VerticalSpace-65ad083c.d.ts → esm/VerticalSpace-3579b20e.d.ts} +16 -0
  30. package/dist/_shared/esm/{VerticalSpace-6b4f5e50.js → VerticalSpace-3579b20e.js} +6 -2
  31. package/dist/index.es.js +133 -75
  32. package/dist/index.es.js.map +1 -1
  33. package/dist/index.js +361 -302
  34. package/dist/index.js.map +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/types/components/ProgressBar/ProgressBar.d.ts +46 -0
  37. package/dist/types/components/ProgressBar/constants/progress-bar-icon-map.d.ts +3 -0
  38. package/dist/types/components/ProgressBar/index.d.ts +1 -0
  39. package/dist/types/components/ProgressBar/types/progress-bar-icons.d.ts +1 -0
  40. package/dist/types/components/ProgressBar/types/progress-bar-state.d.ts +1 -0
  41. package/dist/types/components/ProgressBar/utils/get-progress-bar-props.d.ts +1 -0
  42. package/dist/types/components/Tag/Tag.d.ts +32 -0
  43. package/dist/types/components/Tag/index.d.ts +1 -0
  44. package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +16 -0
  45. package/dist/types/components/index.d.ts +1 -0
  46. package/dist/types/styles.d.ts +2 -0
  47. package/package.json +4 -4
  48. /package/dist/_shared/cjs/{Button-b3a69953.d.ts → Button-1af6868c.d.ts} +0 -0
  49. /package/dist/_shared/esm/{Button-69439f8f.d.ts → Button-10700df4.d.ts} +0 -0
@@ -1 +1 @@
1
- export { Button } from "../_shared/cjs/Button-b3a69953";
1
+ export { Button } from "../_shared/cjs/Button-1af6868c";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Button = require('../_shared/cjs/Button-b3a69953.js');
5
+ var Button = require('../_shared/cjs/Button-1af6868c.js');
6
6
  require('../_shared/cjs/index-78b35bc1.js');
7
7
  require('react');
8
8
  require('../_shared/cjs/BtIconChevronRightMid-5a38d855.js');
@@ -1 +1 @@
1
- export { Button } from "../_shared/esm/Button-69439f8f";
1
+ export { Button } from "../_shared/esm/Button-10700df4";
@@ -1,4 +1,4 @@
1
- export { B as Button } from '../_shared/esm/Button-69439f8f.js';
1
+ export { B as Button } from '../_shared/esm/Button-10700df4.js';
2
2
  import '../_shared/esm/index-229fc864.js';
3
3
  import 'react';
4
4
  import '../_shared/esm/BtIconChevronRightMid-d9b11761.js';
@@ -120,7 +120,7 @@ var CardLink = function (_a) {
120
120
  }), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target }, index.filterDataAttrs(linkData)),
121
121
  React__default["default"].createElement("span", { className: "arc-Card-linkText" }, children),
122
122
  isButton && (React__default["default"].createElement("span", { className: "arc-Card-linkIcon" },
123
- React__default["default"].createElement(Icon.Icon, { testId: "cardIcon", icon: BtIconChevronRightMid.BtIconChevronRightMid_2, size: 16 })))));
123
+ React__default["default"].createElement(Icon.Icon, { testId: "cardIcon", icon: BtIconChevronRightMid.BtIconChevronRightMid_2, size: 24 })))));
124
124
  };
125
125
 
126
126
  exports.Card = Card;
@@ -112,7 +112,7 @@ var CardLink = function (_a) {
112
112
  }), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target }, filterDataAttrs(linkData)),
113
113
  React__default.createElement("span", { className: "arc-Card-linkText" }, children),
114
114
  isButton && (React__default.createElement("span", { className: "arc-Card-linkIcon" },
115
- React__default.createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size: 16 })))));
115
+ React__default.createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size: 24 })))));
116
116
  };
117
117
 
118
118
  export { Card };
@@ -0,0 +1,47 @@
1
+ import { FC } from "react";
2
+ type ProgressBarState = "loading" | "error" | "success";
3
+ type ProgressBarIcons = "refresh" | "cross" | "tick";
4
+ declare const ProgressBar: FC<ProgressBarProps>;
5
+ interface ProgressBarProps {
6
+ /**
7
+ * Label for screen readers.
8
+ */
9
+ ariaLabel: string;
10
+ /**
11
+ * Headline for the progress bar.
12
+ */
13
+ headline?: string;
14
+ /**
15
+ * Title for the progress bar, (e.g. an uploading file's name).
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Percentage value for the progress bar (negative numbers are rounded to 0, numbers over 100 are rounded to 100).
20
+ */
21
+ value?: number;
22
+ /**
23
+ * Provide an additional informative description for the progress bar, or brand building slot for secondary messaging which can change over time with progress.
24
+ */
25
+ description?: string;
26
+ /**
27
+ * Value to display for the progress bar. This is fully customisable, and can be a percentage (15%) Time remaining (1m 15s remaining), proportion of data uploaded/to upload (100KB out of 256KB).
28
+ */
29
+ displayValue?: string;
30
+ /**
31
+ * State of the progress bar.
32
+ */
33
+ state?: ProgressBarState;
34
+ /**
35
+ * Sets progress bar to infinitely animate. Use if the progress of a given task cannot be known. The value prop will have no effect if this prop is set to true.
36
+ */
37
+ isIndeterminate?: boolean;
38
+ /**
39
+ * Action for the progress bar.
40
+ */
41
+ action?: {
42
+ text: string;
43
+ action: () => void;
44
+ icon?: ProgressBarIcons;
45
+ };
46
+ }
47
+ export { ProgressBar };
@@ -0,0 +1,113 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index = require('../_shared/cjs/index-78b35bc1.js');
6
+ var index$1 = require('../_shared/cjs/index-45bfb67b.js');
7
+ var React$2 = require('react');
8
+ var Text = require('../_shared/cjs/Text-1d3844be.js');
9
+ var Heading = require('../_shared/cjs/Heading-cc38c3ec.js');
10
+ var VerticalSpace = require('../_shared/cjs/VerticalSpace-7aed88ab.js');
11
+ var Icon = require('../_shared/cjs/Icon-719d13d4.js');
12
+ var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
13
+ var BtIconTickAlt2Px = require('../_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js');
14
+ require('../_shared/cjs/suffix-modifier-edf7851e.js');
15
+
16
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
+
18
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$2);
19
+
20
+ const React$1 = React__default["default"];
21
+ const BtIconRefresh = props =>
22
+ /*#__PURE__*/ React$1.createElement(
23
+ "svg",
24
+ Object.assign(
25
+ {
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ viewBox: "0 0 32 32"
28
+ },
29
+ props
30
+ ),
31
+ /*#__PURE__*/ React$1.createElement("defs", null),
32
+ /*#__PURE__*/ React$1.createElement("path", {
33
+ d:
34
+ "M13.41077,21.99951a.5005.5005,0,0,0-.35743.8501l2.04609,2.08716A8.98732,8.98732,0,0,1,13.15332,7.46631a.50028.50028,0,1,0-.31641-.94922A9.98437,9.98437,0,0,0,15.127,25.93823l.00159.02881c.0011.01.02008.00128.03015.002L13.026,28.16846a.50036.50036,0,0,0,.71875.69629l3.28418-3.38819-3.26074-3.32715A.50106.50106,0,0,0,13.41077,21.99951Z",
35
+ fill: "currentColor"
36
+ }),
37
+ /*#__PURE__*/ React$1.createElement("path", {
38
+ d:
39
+ "M16.79028,6.04633,16.79,6.04077c-.0011-.01-.02008-.00128-.03015-.00195l2.13275-2.19946a.50036.50036,0,0,0-.71875-.69629L14.88965,6.53125,18.15039,9.8584a.50106.50106,0,0,0,.35742.1499.5005.5005,0,0,0,.35742-.8501L16.7951,7.04657a8.98484,8.98484,0,0,1,2.05646,17.47589.49982.49982,0,1,0,.31641.94824A9.98244,9.98244,0,0,0,16.79028,6.04633Z",
40
+ fill: "currentColor"
41
+ })
42
+ );
43
+ var BtIconRefresh_2 = BtIconRefresh;
44
+
45
+ const React = React__default["default"];
46
+ const BtIconCrossAlt2Px = props =>
47
+ /*#__PURE__*/ React.createElement(
48
+ "svg",
49
+ Object.assign(
50
+ {
51
+ xmlns: "http://www.w3.org/2000/svg",
52
+ viewBox: "0 0 32 32"
53
+ },
54
+ props
55
+ ),
56
+ /*#__PURE__*/ React.createElement("defs", null),
57
+ /*#__PURE__*/ React.createElement("path", {
58
+ d:
59
+ "M17.41406,16l3.793-3.793A.99989.99989,0,0,0,19.793,10.793L16,14.58594l-3.793-3.793A.99989.99989,0,0,0,10.793,12.207L14.58594,16l-3.793,3.793A.99989.99989,0,1,0,12.207,21.207L16,17.41406l3.793,3.793A.99989.99989,0,0,0,21.207,19.793Z",
60
+ fill: "currentColor"
61
+ })
62
+ );
63
+ var BtIconCrossAlt2Px_2 = BtIconCrossAlt2Px;
64
+
65
+ var PROGRESS_BAR_ICON_MAP = {
66
+ refresh: BtIconRefresh_2,
67
+ tick: BtIconTickAlt2Px.BtIconTickAlt2Px_2,
68
+ cross: BtIconCrossAlt2Px_2
69
+ };
70
+
71
+ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
72
+ var commonProps = {
73
+ role: "progressbar",
74
+ "data-testid": "progressbar",
75
+ "aria-label": ariaLabel,
76
+ tabIndex: 0
77
+ };
78
+ var indeterminateProps = index.__assign(index.__assign({}, commonProps), { className: index$1.classNames("arc-ProgressBar-bar", "arc-ProgressBar-bar--indeterminate") });
79
+ var determinateProps = index.__assign(index.__assign({}, commonProps), { className: "arc-ProgressBar-bar", "aria-valuenow": progressValue, style: {
80
+ transform: "translateX(".concat(-100 + progressValue, "%)")
81
+ } });
82
+ return isIndeterminate ? indeterminateProps : determinateProps;
83
+ };
84
+
85
+ var ProgressBar = function (_a) {
86
+ var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue;
87
+ var surface = React$2.useContext(Surface.Context).surface;
88
+ var progressValue = Math.min(100, Math.max(0, value));
89
+ return (React__default["default"].createElement("div", { "data-testid": "progress", className: index$1.classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
90
+ "arc-ProgressBar--onDarkSurface": surface === "dark"
91
+ }) },
92
+ React__default["default"].createElement("div", { className: "arc-ProgressBar-titleDisplayValueContainer" },
93
+ React__default["default"].createElement("div", { className: "arc-ProgressBar-titleContainer" },
94
+ headline && React__default["default"].createElement(Heading.Heading, { size: "s" }, headline),
95
+ headline && title && React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "4" }),
96
+ title && React__default["default"].createElement(Text.Text, null, title)),
97
+ displayValue && (React__default["default"].createElement("div", { "data-testid": "display-value", className: "arc-ProgressBar-displayValueContainer" },
98
+ React__default["default"].createElement(Text.Text, null, displayValue)))),
99
+ React__default["default"].createElement("div", { className: "arc-ProgressBar-container" },
100
+ React__default["default"].createElement("div", { className: "arc-ProgressBar-outerBar" },
101
+ React__default["default"].createElement("div", index.__assign({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
102
+ description && (React__default["default"].createElement("div", { className: "arc-ProgressBar-description" },
103
+ React__default["default"].createElement(Text.Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
104
+ action && (React__default["default"].createElement(React__default["default"].Fragment, null,
105
+ React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "8" }),
106
+ React__default["default"].createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
107
+ React__default["default"].createElement("div", { className: "arc-ProgressBar-actionContainer" },
108
+ React__default["default"].createElement(Text.Text, null, action.text),
109
+ action.icon && (React__default["default"].createElement("div", { className: "arc-ProgressBar-actionIcon" },
110
+ React__default["default"].createElement(Icon.Icon, { icon: PROGRESS_BAR_ICON_MAP[action.icon], size: 24 }))))))))));
111
+ };
112
+
113
+ exports.ProgressBar = ProgressBar;
@@ -0,0 +1,47 @@
1
+ import { FC } from "react";
2
+ type ProgressBarState = "loading" | "error" | "success";
3
+ type ProgressBarIcons = "refresh" | "cross" | "tick";
4
+ declare const ProgressBar: FC<ProgressBarProps>;
5
+ interface ProgressBarProps {
6
+ /**
7
+ * Label for screen readers.
8
+ */
9
+ ariaLabel: string;
10
+ /**
11
+ * Headline for the progress bar.
12
+ */
13
+ headline?: string;
14
+ /**
15
+ * Title for the progress bar, (e.g. an uploading file's name).
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Percentage value for the progress bar (negative numbers are rounded to 0, numbers over 100 are rounded to 100).
20
+ */
21
+ value?: number;
22
+ /**
23
+ * Provide an additional informative description for the progress bar, or brand building slot for secondary messaging which can change over time with progress.
24
+ */
25
+ description?: string;
26
+ /**
27
+ * Value to display for the progress bar. This is fully customisable, and can be a percentage (15%) Time remaining (1m 15s remaining), proportion of data uploaded/to upload (100KB out of 256KB).
28
+ */
29
+ displayValue?: string;
30
+ /**
31
+ * State of the progress bar.
32
+ */
33
+ state?: ProgressBarState;
34
+ /**
35
+ * Sets progress bar to infinitely animate. Use if the progress of a given task cannot be known. The value prop will have no effect if this prop is set to true.
36
+ */
37
+ isIndeterminate?: boolean;
38
+ /**
39
+ * Action for the progress bar.
40
+ */
41
+ action?: {
42
+ text: string;
43
+ action: () => void;
44
+ icon?: ProgressBarIcons;
45
+ };
46
+ }
47
+ export { ProgressBar };
@@ -0,0 +1,105 @@
1
+ import { a as __assign } from '../_shared/esm/index-229fc864.js';
2
+ import { c as classNames } from '../_shared/esm/index-2ae58626.js';
3
+ import React__default, { useContext } from 'react';
4
+ import { T as Text } from '../_shared/esm/Text-6b958ad8.js';
5
+ import { H as Heading } from '../_shared/esm/Heading-eb1e42db.js';
6
+ import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-3579b20e.js';
7
+ import { I as Icon } from '../_shared/esm/Icon-61f7237a.js';
8
+ import { C as Context } from '../_shared/esm/Surface-bf201530.js';
9
+ import { B as BtIconTickAlt2Px_2 } from '../_shared/esm/BtIconTickAlt2Px-da97e9ae.js';
10
+ import '../_shared/esm/suffix-modifier-f5e28822.js';
11
+
12
+ const React$1 = React__default;
13
+ const BtIconRefresh = props =>
14
+ /*#__PURE__*/ React$1.createElement(
15
+ "svg",
16
+ Object.assign(
17
+ {
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ viewBox: "0 0 32 32"
20
+ },
21
+ props
22
+ ),
23
+ /*#__PURE__*/ React$1.createElement("defs", null),
24
+ /*#__PURE__*/ React$1.createElement("path", {
25
+ d:
26
+ "M13.41077,21.99951a.5005.5005,0,0,0-.35743.8501l2.04609,2.08716A8.98732,8.98732,0,0,1,13.15332,7.46631a.50028.50028,0,1,0-.31641-.94922A9.98437,9.98437,0,0,0,15.127,25.93823l.00159.02881c.0011.01.02008.00128.03015.002L13.026,28.16846a.50036.50036,0,0,0,.71875.69629l3.28418-3.38819-3.26074-3.32715A.50106.50106,0,0,0,13.41077,21.99951Z",
27
+ fill: "currentColor"
28
+ }),
29
+ /*#__PURE__*/ React$1.createElement("path", {
30
+ d:
31
+ "M16.79028,6.04633,16.79,6.04077c-.0011-.01-.02008-.00128-.03015-.00195l2.13275-2.19946a.50036.50036,0,0,0-.71875-.69629L14.88965,6.53125,18.15039,9.8584a.50106.50106,0,0,0,.35742.1499.5005.5005,0,0,0,.35742-.8501L16.7951,7.04657a8.98484,8.98484,0,0,1,2.05646,17.47589.49982.49982,0,1,0,.31641.94824A9.98244,9.98244,0,0,0,16.79028,6.04633Z",
32
+ fill: "currentColor"
33
+ })
34
+ );
35
+ var BtIconRefresh_2 = BtIconRefresh;
36
+
37
+ const React = React__default;
38
+ const BtIconCrossAlt2Px = props =>
39
+ /*#__PURE__*/ React.createElement(
40
+ "svg",
41
+ Object.assign(
42
+ {
43
+ xmlns: "http://www.w3.org/2000/svg",
44
+ viewBox: "0 0 32 32"
45
+ },
46
+ props
47
+ ),
48
+ /*#__PURE__*/ React.createElement("defs", null),
49
+ /*#__PURE__*/ React.createElement("path", {
50
+ d:
51
+ "M17.41406,16l3.793-3.793A.99989.99989,0,0,0,19.793,10.793L16,14.58594l-3.793-3.793A.99989.99989,0,0,0,10.793,12.207L14.58594,16l-3.793,3.793A.99989.99989,0,1,0,12.207,21.207L16,17.41406l3.793,3.793A.99989.99989,0,0,0,21.207,19.793Z",
52
+ fill: "currentColor"
53
+ })
54
+ );
55
+ var BtIconCrossAlt2Px_2 = BtIconCrossAlt2Px;
56
+
57
+ var PROGRESS_BAR_ICON_MAP = {
58
+ refresh: BtIconRefresh_2,
59
+ tick: BtIconTickAlt2Px_2,
60
+ cross: BtIconCrossAlt2Px_2
61
+ };
62
+
63
+ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
64
+ var commonProps = {
65
+ role: "progressbar",
66
+ "data-testid": "progressbar",
67
+ "aria-label": ariaLabel,
68
+ tabIndex: 0
69
+ };
70
+ var indeterminateProps = __assign(__assign({}, commonProps), { className: classNames("arc-ProgressBar-bar", "arc-ProgressBar-bar--indeterminate") });
71
+ var determinateProps = __assign(__assign({}, commonProps), { className: "arc-ProgressBar-bar", "aria-valuenow": progressValue, style: {
72
+ transform: "translateX(".concat(-100 + progressValue, "%)")
73
+ } });
74
+ return isIndeterminate ? indeterminateProps : determinateProps;
75
+ };
76
+
77
+ var ProgressBar = function (_a) {
78
+ var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue;
79
+ var surface = useContext(Context).surface;
80
+ var progressValue = Math.min(100, Math.max(0, value));
81
+ return (React__default.createElement("div", { "data-testid": "progress", className: classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state), {
82
+ "arc-ProgressBar--onDarkSurface": surface === "dark"
83
+ }) },
84
+ React__default.createElement("div", { className: "arc-ProgressBar-titleDisplayValueContainer" },
85
+ React__default.createElement("div", { className: "arc-ProgressBar-titleContainer" },
86
+ headline && React__default.createElement(Heading, { size: "s" }, headline),
87
+ headline && title && React__default.createElement(VerticalSpace, { size: "4" }),
88
+ title && React__default.createElement(Text, null, title)),
89
+ displayValue && (React__default.createElement("div", { "data-testid": "display-value", className: "arc-ProgressBar-displayValueContainer" },
90
+ React__default.createElement(Text, null, displayValue)))),
91
+ React__default.createElement("div", { className: "arc-ProgressBar-container" },
92
+ React__default.createElement("div", { className: "arc-ProgressBar-outerBar" },
93
+ React__default.createElement("div", __assign({}, getProgressBarProps(isIndeterminate, progressValue, ariaLabel)))),
94
+ description && (React__default.createElement("div", { className: "arc-ProgressBar-description" },
95
+ React__default.createElement(Text, { tone: state !== "error" ? "supporting" : "default" }, description))),
96
+ action && (React__default.createElement(React__default.Fragment, null,
97
+ React__default.createElement(VerticalSpace, { size: "8" }),
98
+ React__default.createElement("button", { className: "arc-ProgressBar-actionButton", onClick: action.action },
99
+ React__default.createElement("div", { className: "arc-ProgressBar-actionContainer" },
100
+ React__default.createElement(Text, null, action.text),
101
+ action.icon && (React__default.createElement("div", { className: "arc-ProgressBar-actionIcon" },
102
+ React__default.createElement(Icon, { icon: PROGRESS_BAR_ICON_MAP[action.icon], size: 24 }))))))))));
103
+ };
104
+
105
+ export { ProgressBar };
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@arc-ui/progressbar",
3
+ "types": "./ProgressBar.esm.d.ts",
4
+ "main": "./ProgressBar.cjs.js",
5
+ "module": "./ProgressBar.esm.js",
6
+ "private": true
7
+ }
@@ -7,7 +7,7 @@ var index_es = require('../_shared/cjs/index.es-77def0c9.js');
7
7
  var index$1 = require('../_shared/cjs/index-45bfb67b.js');
8
8
  var React = require('react');
9
9
  var BrandLogo = require('../_shared/cjs/BrandLogo-3c6102ef.js');
10
- var Button = require('../_shared/cjs/Button-b3a69953.js');
10
+ var Button = require('../_shared/cjs/Button-1af6868c.js');
11
11
  var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
12
12
  var BtIconChevronDown2Px = require('../_shared/cjs/BtIconChevronDown2Px-8fb4e2eb.js');
13
13
  var handleLinkClick = require('../_shared/cjs/handle-link-click-17a44cf4.js');
@@ -3,7 +3,7 @@ import { u as useMediaQuery, a as ArcBreakpointL } from '../_shared/esm/index.es
3
3
  import { c as classNames } from '../_shared/esm/index-2ae58626.js';
4
4
  import React__default, { useState, useEffect, Fragment, useContext, useRef, createContext } from 'react';
5
5
  import { B as BrandLogo } from '../_shared/esm/BrandLogo-4f13fe85.js';
6
- import { B as Button } from '../_shared/esm/Button-69439f8f.js';
6
+ import { B as Button } from '../_shared/esm/Button-10700df4.js';
7
7
  import { S as Surface } from '../_shared/esm/Surface-bf201530.js';
8
8
  import { B as BtIconChevronDown2Px_2 } from '../_shared/esm/BtIconChevronDown2Px-782876e2.js';
9
9
  import { h as handleLinkClick } from '../_shared/esm/handle-link-click-f64f55a2.js';
@@ -9,7 +9,7 @@ var Icon = require('../_shared/cjs/Icon-719d13d4.js');
9
9
  var BtIconTickAlt2Px = require('../_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js');
10
10
  var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
11
11
  var FormControl = require('../_shared/cjs/FormControl-d4d9c665.js');
12
- var VerticalSpace = require('../_shared/cjs/VerticalSpace-65ad083c.js');
12
+ var VerticalSpace = require('../_shared/cjs/VerticalSpace-7aed88ab.js');
13
13
  var Text = require('../_shared/cjs/Text-1d3844be.js');
14
14
  require('react-dom');
15
15
  require('../_shared/cjs/index-78b35bc1.js');
@@ -5,7 +5,7 @@ import { I as Icon } from '../_shared/esm/Icon-61f7237a.js';
5
5
  import { B as BtIconTickAlt2Px_2 } from '../_shared/esm/BtIconTickAlt2Px-da97e9ae.js';
6
6
  import { C as Context } from '../_shared/esm/Surface-bf201530.js';
7
7
  import { F as FormControl } from '../_shared/esm/FormControl-2cb96de7.js';
8
- import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-6b4f5e50.js';
8
+ import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-3579b20e.js';
9
9
  import { T as Text } from '../_shared/esm/Text-6b958ad8.js';
10
10
  import 'react-dom';
11
11
  import '../_shared/esm/index-229fc864.js';
@@ -0,0 +1,33 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { ArcIcon } from "../_shared/cjs/arc-icon-17594b2f";
3
+ /**
4
+ * use `Tag` to promote features and manage filtering.
5
+ */
6
+ declare const Tag: FC<TagProps>;
7
+ interface TagProps {
8
+ /**
9
+ * Content to render within the Tag
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Determine if the Tag is removable.
14
+ */
15
+ isRemovable?: boolean;
16
+ /**
17
+ * Provide a link for the tag
18
+ */
19
+ link?: string;
20
+ /**
21
+ * Determine a icon to display within the tag.
22
+ */
23
+ icon?: ArcIcon;
24
+ /**
25
+ * onClick Handler for Tag
26
+ */
27
+ onClick?: () => void;
28
+ /**
29
+ * Execute function on remove
30
+ */
31
+ onRemove?: () => void;
32
+ }
33
+ export { Tag };
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index = require('../_shared/cjs/index-78b35bc1.js');
6
+ var React$1 = require('react');
7
+ var index$1 = require('../_shared/cjs/index-45bfb67b.js');
8
+ var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
9
+ var Icon = require('../_shared/cjs/Icon-719d13d4.js');
10
+ require('../_shared/cjs/suffix-modifier-edf7851e.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
15
+
16
+ const React = React__default["default"];
17
+ const BtIconCross = props =>
18
+ /*#__PURE__*/ React.createElement(
19
+ "svg",
20
+ Object.assign(
21
+ {
22
+ xmlns: "http://www.w3.org/2000/svg",
23
+ viewBox: "0 0 32 32"
24
+ },
25
+ props
26
+ ),
27
+ /*#__PURE__*/ React.createElement("defs", null),
28
+ /*#__PURE__*/ React.createElement("path", {
29
+ d:
30
+ "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
31
+ fill: "currentColor"
32
+ }),
33
+ /*#__PURE__*/ React.createElement("path", {
34
+ d:
35
+ "M20.85352,11.14648a.49983.49983,0,0,0-.707,0L16,15.293l-4.14648-4.14649a.5.5,0,0,0-.707.707L15.293,16l-4.14649,4.14648a.5.5,0,1,0,.707.707L16,16.707l4.14648,4.14649a.5.5,0,0,0,.707-.707L16.707,16l4.14649-4.14648A.49983.49983,0,0,0,20.85352,11.14648Z",
36
+ fill: "currentColor"
37
+ })
38
+ );
39
+ var BtIconCross_2 = BtIconCross;
40
+
41
+ /**
42
+ * use `Tag` to promote features and manage filtering.
43
+ */
44
+ var Tag = function (_a) {
45
+ var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = index.__rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
46
+ var surface = React$1.useContext(Surface.Context).surface;
47
+ var _b = React$1.useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
48
+ var onRemoveHandler = function () {
49
+ setIsRemoved(function (p) { return !p; });
50
+ onRemove && onRemove();
51
+ };
52
+ return (React__default["default"].createElement("div", index.__assign({ className: index$1.classNames("arc-Tag", {
53
+ "arc-Tag--onDarkSurface": surface === "dark",
54
+ "arc-Tag--isRemovable": isRemovable,
55
+ "arc-Tag--hasIcon": icon,
56
+ "arc-Tag--hasLink": link || onClick,
57
+ "arc-Tag--removed": isRemoved
58
+ }) }, (isRemoved && { "aria-hidden": true }), index.filterDataAttrs(props)),
59
+ link ? (React__default["default"].createElement("a", { className: "arc-Tag-content", href: link, tabIndex: 0 },
60
+ icon && (React__default["default"].createElement("span", { className: "arc-Tag-icon" },
61
+ React__default["default"].createElement(Icon.Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
62
+ React__default["default"].createElement("div", { className: "arc-Tag-label" }, children))) : (React__default["default"].createElement(React__default["default"].Fragment, null, onClick ? (React__default["default"].createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
63
+ icon && (React__default["default"].createElement("span", { className: "arc-Tag-icon" },
64
+ React__default["default"].createElement(Icon.Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
65
+ React__default["default"].createElement("div", { className: "arc-Tag-label" }, children))) : (React__default["default"].createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
66
+ icon && (React__default["default"].createElement("span", { className: "arc-Tag-icon" },
67
+ React__default["default"].createElement(Icon.Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
68
+ React__default["default"].createElement("div", { className: "arc-Tag-label" }, children))))),
69
+ isRemovable && (React__default["default"].createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
70
+ React__default["default"].createElement(Icon.Icon, { icon: BtIconCross_2, color: "brand", size: 20 })))));
71
+ };
72
+
73
+ exports.Tag = Tag;
@@ -0,0 +1,33 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { ArcIcon } from "../_shared/esm/arc-icon-17594b2f";
3
+ /**
4
+ * use `Tag` to promote features and manage filtering.
5
+ */
6
+ declare const Tag: FC<TagProps>;
7
+ interface TagProps {
8
+ /**
9
+ * Content to render within the Tag
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Determine if the Tag is removable.
14
+ */
15
+ isRemovable?: boolean;
16
+ /**
17
+ * Provide a link for the tag
18
+ */
19
+ link?: string;
20
+ /**
21
+ * Determine a icon to display within the tag.
22
+ */
23
+ icon?: ArcIcon;
24
+ /**
25
+ * onClick Handler for Tag
26
+ */
27
+ onClick?: () => void;
28
+ /**
29
+ * Execute function on remove
30
+ */
31
+ onRemove?: () => void;
32
+ }
33
+ export { Tag };
@@ -0,0 +1,65 @@
1
+ import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
2
+ import React__default, { useContext, useState } from 'react';
3
+ import { c as classNames } from '../_shared/esm/index-2ae58626.js';
4
+ import { C as Context } from '../_shared/esm/Surface-bf201530.js';
5
+ import { I as Icon } from '../_shared/esm/Icon-61f7237a.js';
6
+ import '../_shared/esm/suffix-modifier-f5e28822.js';
7
+
8
+ const React = React__default;
9
+ const BtIconCross = props =>
10
+ /*#__PURE__*/ React.createElement(
11
+ "svg",
12
+ Object.assign(
13
+ {
14
+ xmlns: "http://www.w3.org/2000/svg",
15
+ viewBox: "0 0 32 32"
16
+ },
17
+ props
18
+ ),
19
+ /*#__PURE__*/ React.createElement("defs", null),
20
+ /*#__PURE__*/ React.createElement("path", {
21
+ d:
22
+ "M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
23
+ fill: "currentColor"
24
+ }),
25
+ /*#__PURE__*/ React.createElement("path", {
26
+ d:
27
+ "M20.85352,11.14648a.49983.49983,0,0,0-.707,0L16,15.293l-4.14648-4.14649a.5.5,0,0,0-.707.707L15.293,16l-4.14649,4.14648a.5.5,0,1,0,.707.707L16,16.707l4.14648,4.14649a.5.5,0,0,0,.707-.707L16.707,16l4.14649-4.14648A.49983.49983,0,0,0,20.85352,11.14648Z",
28
+ fill: "currentColor"
29
+ })
30
+ );
31
+ var BtIconCross_2 = BtIconCross;
32
+
33
+ /**
34
+ * use `Tag` to promote features and manage filtering.
35
+ */
36
+ var Tag = function (_a) {
37
+ var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = __rest(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
38
+ var surface = useContext(Context).surface;
39
+ var _b = useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
40
+ var onRemoveHandler = function () {
41
+ setIsRemoved(function (p) { return !p; });
42
+ onRemove && onRemove();
43
+ };
44
+ return (React__default.createElement("div", __assign({ className: classNames("arc-Tag", {
45
+ "arc-Tag--onDarkSurface": surface === "dark",
46
+ "arc-Tag--isRemovable": isRemovable,
47
+ "arc-Tag--hasIcon": icon,
48
+ "arc-Tag--hasLink": link || onClick,
49
+ "arc-Tag--removed": isRemoved
50
+ }) }, (isRemoved && { "aria-hidden": true }), filterDataAttrs(props)),
51
+ link ? (React__default.createElement("a", { className: "arc-Tag-content", href: link, tabIndex: 0 },
52
+ icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
53
+ React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
54
+ React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
55
+ icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
56
+ React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
57
+ React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
58
+ icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
59
+ React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
60
+ React__default.createElement("div", { className: "arc-Tag-label" }, children))))),
61
+ isRemovable && (React__default.createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
62
+ React__default.createElement(Icon, { icon: BtIconCross_2, color: "brand", size: 20 })))));
63
+ };
64
+
65
+ export { Tag };
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@arc-ui/tag",
3
+ "types": "./Tag.esm.d.ts",
4
+ "main": "./Tag.cjs.js",
5
+ "module": "./Tag.esm.js",
6
+ "private": true
7
+ }
@@ -1 +1 @@
1
- export { VerticalSpace } from "../_shared/cjs/VerticalSpace-65ad083c";
1
+ export { VerticalSpace } from "../_shared/cjs/VerticalSpace-7aed88ab";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var VerticalSpace = require('../_shared/cjs/VerticalSpace-65ad083c.js');
5
+ var VerticalSpace = require('../_shared/cjs/VerticalSpace-7aed88ab.js');
6
6
  require('../_shared/cjs/index-78b35bc1.js');
7
7
  require('../_shared/cjs/index-45bfb67b.js');
8
8
  require('react');