@arc-ui/components 10.8.1 → 11.0.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/Breadcrumbs/Breadcrumbs.cjs.js +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +4 -4
- package/dist/Button/Button.cjs.d.ts +1 -1
- package/dist/Button/Button.cjs.js +4 -4
- package/dist/Button/Button.esm.d.ts +1 -1
- package/dist/Button/Button.esm.js +4 -4
- package/dist/Card/Card.cjs.js +3 -3
- package/dist/Card/Card.esm.js +3 -3
- package/dist/Checkbox/Checkbox.cjs.js +32 -8
- package/dist/Checkbox/Checkbox.esm.js +34 -10
- package/dist/Disclosure/Disclosure.cjs.js +3 -0
- package/dist/Disclosure/Disclosure.esm.js +3 -0
- package/dist/FormControl/FormControl.cjs.d.ts +1 -1
- package/dist/FormControl/FormControl.cjs.js +1 -1
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +1 -1
- package/dist/Icon/Icon.cjs.d.ts +1 -1
- package/dist/Icon/Icon.cjs.js +2 -3
- package/dist/Icon/Icon.esm.d.ts +1 -1
- package/dist/Icon/Icon.esm.js +2 -3
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.cjs.js +1 -1
- package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.esm.js +1 -1
- package/dist/SiteFooter/SiteFooter.cjs.js +5 -3
- package/dist/SiteFooter/SiteFooter.esm.js +4 -2
- package/dist/SiteHeader/SiteHeader.cjs.js +35 -13
- package/dist/SiteHeader/SiteHeader.esm.js +32 -10
- package/dist/TextInput/TextInput.cjs.d.ts +1 -1
- package/dist/TextInput/TextInput.cjs.js +1 -1
- package/dist/TextInput/TextInput.esm.d.ts +1 -1
- package/dist/TextInput/TextInput.esm.js +1 -1
- package/dist/_shared/cjs/BtIconChevronDown2Px-8fb4e2eb.js +29 -0
- package/dist/_shared/cjs/BtIconChevronRight2Px-a8e40136.js +50 -0
- package/dist/_shared/cjs/BtIconChevronRightMid-5a38d855.js +31 -0
- package/dist/_shared/cjs/{Button-1743b3ec.d.ts → Button-b3a69953.d.ts} +3 -3
- package/dist/_shared/cjs/{Button-1743b3ec.js → Button-b3a69953.js} +29 -6
- package/dist/_shared/cjs/{FormControl-7d8e10fa.d.ts → FormControl-a1b7421b.d.ts} +0 -0
- package/dist/_shared/cjs/{FormControl-7d8e10fa.js → FormControl-a1b7421b.js} +38 -5
- package/dist/_shared/cjs/{Icon-bb5a5fd1.d.ts → Icon-719d13d4.d.ts} +6 -6
- package/dist/_shared/cjs/Icon-719d13d4.js +52 -0
- package/dist/_shared/cjs/arc-icon-17594b2f.d.ts +4 -0
- package/dist/_shared/cjs/index-c81c9401.d.ts +2 -2
- package/dist/_shared/cjs/{use-media-query-75d1bbae.d.ts → index.es-77def0c9.d.ts} +0 -0
- package/dist/_shared/cjs/{use-media-query-75d1bbae.js → index.es-77def0c9.js} +9 -0
- package/dist/_shared/esm/BtIconChevronDown2Px-4abd079b.js +23 -0
- package/dist/_shared/esm/BtIconChevronRight2Px-a5cc1d05.js +43 -0
- package/dist/_shared/esm/BtIconChevronRightMid-386cf272.js +25 -0
- package/dist/_shared/esm/{Button-d59c31a2.d.ts → Button-5ff56a7b.d.ts} +3 -3
- package/dist/_shared/esm/Button-5ff56a7b.js +74 -0
- package/dist/_shared/esm/{FormControl-33194106.d.ts → FormControl-feedc495.d.ts} +0 -0
- package/dist/_shared/esm/{FormControl-33194106.js → FormControl-feedc495.js} +40 -8
- package/dist/_shared/esm/{Icon-2fd92daa.d.ts → Icon-76d0d8c0.d.ts} +6 -6
- package/dist/_shared/esm/Icon-76d0d8c0.js +46 -0
- package/dist/_shared/esm/arc-icon-17594b2f.d.ts +4 -0
- package/dist/_shared/esm/index-c81c9401.d.ts +2 -2
- package/dist/_shared/esm/{use-media-query-38faed7f.d.ts → index.es-00cb3bcb.d.ts} +0 -0
- package/dist/_shared/esm/{use-media-query-38faed7f.js → index.es-00cb3bcb.js} +8 -1
- package/dist/index.es.js +454 -528
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +311 -385
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Icon/Icon.d.ts +6 -6
- package/dist/types/types/arc-icon.d.ts +2 -0
- package/package.json +4 -3
- package/dist/_shared/cjs/Icon-bb5a5fd1.js +0 -33
- package/dist/_shared/cjs/index.es-f590caaf.js +0 -290
- package/dist/_shared/esm/Button-d59c31a2.js +0 -51
- package/dist/_shared/esm/Icon-2fd92daa.js +0 -27
- package/dist/_shared/esm/index.es-42f84e2d.js +0 -286
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { icons } from "@arc-ui/tokens";
|
|
2
1
|
import React, { FC } from "react";
|
|
2
|
+
import { ArcIcon } from "../../types/arc-icon";
|
|
3
3
|
export declare type ElementUnion = HTMLButtonElement | HTMLAnchorElement;
|
|
4
4
|
export declare type Ref = React.Ref<ElementUnion> | null;
|
|
5
5
|
/**
|
|
@@ -10,7 +10,7 @@ export interface ButtonIconProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* Icon variant.
|
|
12
12
|
*/
|
|
13
|
-
icon?:
|
|
13
|
+
icon?: ArcIcon;
|
|
14
14
|
/**
|
|
15
15
|
* Should the icon be a default chevron?
|
|
16
16
|
*/
|
|
@@ -55,7 +55,7 @@ export interface ButtonProps extends ButtonElementProps, LinkElementProps {
|
|
|
55
55
|
/**
|
|
56
56
|
* Button icon variant.
|
|
57
57
|
*/
|
|
58
|
-
icon?:
|
|
58
|
+
icon?: ArcIcon;
|
|
59
59
|
/**
|
|
60
60
|
* How should a Button icon be displayed?
|
|
61
61
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { icons } from "@arc-ui/tokens";
|
|
2
1
|
import { FC } from "react";
|
|
2
|
+
import { ArcIcon } from "../../types/arc-icon";
|
|
3
3
|
/**
|
|
4
4
|
* Use `Icon` to display brand iconography.
|
|
5
5
|
*/
|
|
@@ -14,14 +14,10 @@ export interface IconProps {
|
|
|
14
14
|
* Should the Icon component be styled as an inline element?
|
|
15
15
|
*/
|
|
16
16
|
isInline?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Should a selected variant of the Icon be shown?
|
|
19
|
-
*/
|
|
20
|
-
isSelected?: boolean;
|
|
21
17
|
/**
|
|
22
18
|
* Icon variant.
|
|
23
19
|
*/
|
|
24
|
-
icon?:
|
|
20
|
+
icon?: ArcIcon;
|
|
25
21
|
/**
|
|
26
22
|
* Alternative text label for the Icon.
|
|
27
23
|
*/
|
|
@@ -30,4 +26,8 @@ export interface IconProps {
|
|
|
30
26
|
* Size of the Icon, in pixels.
|
|
31
27
|
*/
|
|
32
28
|
size?: number;
|
|
29
|
+
/**
|
|
30
|
+
* value for data-testid
|
|
31
|
+
*/
|
|
32
|
+
testId?: string;
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arc-ui/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"homepage": "https://ui.digital-ent-int.bt.com",
|
|
5
5
|
"author": "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"@radix-ui/react-switch": "^1.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@arc-ui/fonts": "^
|
|
36
|
-
"@arc-ui/
|
|
35
|
+
"@arc-ui/fonts": "^11.0.0",
|
|
36
|
+
"@arc-ui/icons": "^11.0.0",
|
|
37
|
+
"@arc-ui/tokens": "^11.0.0",
|
|
37
38
|
"@babel/core": "^7.14.3",
|
|
38
39
|
"@babel/helper-define-map": "^7.14.3",
|
|
39
40
|
"@storybook/addon-essentials": "^6.3.6",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-78b35bc1.js');
|
|
4
|
-
var index_es = require('./index.es-f590caaf.js');
|
|
5
|
-
var index$1 = require('./index-45bfb67b.js');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var suffixModifier = require('./suffix-modifier-edf7851e.js');
|
|
8
|
-
var Surface = require('./Surface-d6b8010e.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Use `Icon` to display brand iconography.
|
|
16
|
-
*/
|
|
17
|
-
var Icon = function (_a) {
|
|
18
|
-
var _b;
|
|
19
|
-
var _c = _a.color, color = _c === void 0 ? "auto" : _c, icon = _a.icon, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isSelected, isSelected = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = index.__rest(_a, ["color", "icon", "isInline", "isSelected", "label", "size"]);
|
|
20
|
-
var surface = React.useContext(Surface.Context).surface;
|
|
21
|
-
return (React__default["default"].createElement("span", index.__assign({ "aria-label": label, className: index$1.classNames((_b = {},
|
|
22
|
-
_b["arc-Icon"] = true,
|
|
23
|
-
_b[suffixModifier.suffixModifier("arc-Icon--color", color)] = color !== "auto",
|
|
24
|
-
_b["arc-Icon--".concat(icon).concat(isSelected && index_es.iconsSelected.includes("".concat(icon, "Fill")) ? "Fill" : "")] = icon,
|
|
25
|
-
_b["arc-Icon--inline"] = isInline,
|
|
26
|
-
_b["arc-Icon--onDarkSurface"] = surface === "dark",
|
|
27
|
-
_b)), role: label ? "img" : undefined, style: {
|
|
28
|
-
height: size,
|
|
29
|
-
width: size
|
|
30
|
-
} }, index.filterDataAttrs(props))));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.Icon = Icon;
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Do not edit directly
|
|
5
|
-
* Generated file
|
|
6
|
-
*/
|
|
7
|
-
var ArcBreakpointM = 768;
|
|
8
|
-
var ArcBreakpointL = 1024;
|
|
9
|
-
var iconsSelected = [
|
|
10
|
-
"bt3GFill",
|
|
11
|
-
"bt4GFill",
|
|
12
|
-
"bt5GFill",
|
|
13
|
-
"btAccessibilityFill",
|
|
14
|
-
"btAddFill",
|
|
15
|
-
"btAlertFill",
|
|
16
|
-
"btAlertTriangleFill",
|
|
17
|
-
"btAnswerPointFill",
|
|
18
|
-
"btArchitectureFill",
|
|
19
|
-
"btArchiveFill",
|
|
20
|
-
"btArrowAltDownFill",
|
|
21
|
-
"btArrowAltLeftFill",
|
|
22
|
-
"btArrowAltLeftRightFill",
|
|
23
|
-
"btArrowAltRightFill",
|
|
24
|
-
"btArrowAltUpFill",
|
|
25
|
-
"btArrowDownFill",
|
|
26
|
-
"btArrowLeftFill",
|
|
27
|
-
"btArrowLeftRightFill",
|
|
28
|
-
"btArrowRightFill",
|
|
29
|
-
"btArrowUpFill",
|
|
30
|
-
"btAttachmentAltFill",
|
|
31
|
-
"btAttachmentFill",
|
|
32
|
-
"btBagFill",
|
|
33
|
-
"btBasketFill",
|
|
34
|
-
"btBinFill",
|
|
35
|
-
"btBlockedNumberFill",
|
|
36
|
-
"btBoatFill",
|
|
37
|
-
"btBroadbandFill",
|
|
38
|
-
"btBuildingFill",
|
|
39
|
-
"btBurgerMenuFill",
|
|
40
|
-
"btCakeFill",
|
|
41
|
-
"btCalenderAcceptedFill",
|
|
42
|
-
"btCalenderAddEventFill",
|
|
43
|
-
"btCalenderFill",
|
|
44
|
-
"btCalenderPaymentPlanAltFill",
|
|
45
|
-
"btCalenderPaymentPlanFill",
|
|
46
|
-
"btCalenderSpecialDateFill",
|
|
47
|
-
"btCallRoutingFill",
|
|
48
|
-
"btCallerIdFill",
|
|
49
|
-
"btChatFill",
|
|
50
|
-
"btChatMessageFill",
|
|
51
|
-
"btChatTypingFill",
|
|
52
|
-
"btClipboardFill",
|
|
53
|
-
"btClipboardTickFill",
|
|
54
|
-
"btClockFill",
|
|
55
|
-
"btCloudAlertFill",
|
|
56
|
-
"btCloudDesktopFill",
|
|
57
|
-
"btCloudFill",
|
|
58
|
-
"btCloudLinkFill",
|
|
59
|
-
"btCloudMeetingFill",
|
|
60
|
-
"btCloudPhoneFill",
|
|
61
|
-
"btCloudSecurityFill",
|
|
62
|
-
"btCloudUploadFill",
|
|
63
|
-
"btCloudUserFill",
|
|
64
|
-
"btCollapseFill",
|
|
65
|
-
"btCompareFill",
|
|
66
|
-
"btComputerChipFill",
|
|
67
|
-
"btConnectedCareFill",
|
|
68
|
-
"btContactDetailsFill",
|
|
69
|
-
"btContactNoDetailsFill",
|
|
70
|
-
"btContactsFill",
|
|
71
|
-
"btCreditCardFill",
|
|
72
|
-
"btCrossAlt2pxFill",
|
|
73
|
-
"btCrossAltFill",
|
|
74
|
-
"btCrossFill",
|
|
75
|
-
"btDashboardFill",
|
|
76
|
-
"btDepositFill",
|
|
77
|
-
"btDesignFill",
|
|
78
|
-
"btDeskPhoneFill",
|
|
79
|
-
"btDetailsFill",
|
|
80
|
-
"btDetailsGroupFill",
|
|
81
|
-
"btDexterityFill",
|
|
82
|
-
"btDialPadFill",
|
|
83
|
-
"btDialPadWithHandFill",
|
|
84
|
-
"btDialledNumberDestinationFill",
|
|
85
|
-
"btDigitalCollaborationFill",
|
|
86
|
-
"btDisabilityFill",
|
|
87
|
-
"btDiscountFill",
|
|
88
|
-
"btDivertOnBusyFill",
|
|
89
|
-
"btDocumentAndPencilFill",
|
|
90
|
-
"btDocumentArticleFill",
|
|
91
|
-
"btDocumentBillsFill",
|
|
92
|
-
"btDocumentDownloadFill",
|
|
93
|
-
"btDocumentFill",
|
|
94
|
-
"btDocumentPdfFill",
|
|
95
|
-
"btDocumentWithCopyCrossedOutFill",
|
|
96
|
-
"btDocumentWithCopyFill",
|
|
97
|
-
"btDynamicCollaborationFill",
|
|
98
|
-
"btEducationFill",
|
|
99
|
-
"btEmailReadFill",
|
|
100
|
-
"btEmailUnreadFill",
|
|
101
|
-
"btEngagedFill",
|
|
102
|
-
"btEthernetFill",
|
|
103
|
-
"btFaceHappyFill",
|
|
104
|
-
"btFaceNeutralFill",
|
|
105
|
-
"btFaceSadFill",
|
|
106
|
-
"btFaceVeryHappyFill",
|
|
107
|
-
"btFirstAidFill",
|
|
108
|
-
"btFolderFill",
|
|
109
|
-
"btGamingFill",
|
|
110
|
-
"btGenderFemaleAndMaleFill",
|
|
111
|
-
"btGenderFemaleFill",
|
|
112
|
-
"btGenderMaleFill",
|
|
113
|
-
"btGenderNeutralFill",
|
|
114
|
-
"btGiftFill",
|
|
115
|
-
"btGlobalConnectivityFill",
|
|
116
|
-
"btGlobeFill",
|
|
117
|
-
"btGlossaryFill",
|
|
118
|
-
"btGondolaFill",
|
|
119
|
-
"btGraphBarAndPlotFill",
|
|
120
|
-
"btGraphBarChartFill",
|
|
121
|
-
"btGraphDownFill",
|
|
122
|
-
"btGraphUpAndDownFill",
|
|
123
|
-
"btGraphUpFill",
|
|
124
|
-
"btHeadsetFill",
|
|
125
|
-
"btHeartBrokenFill",
|
|
126
|
-
"btHeartCareFill",
|
|
127
|
-
"btHeartFill",
|
|
128
|
-
"btHoldingHeartFill",
|
|
129
|
-
"btHomeFill",
|
|
130
|
-
"btHomeTechExpertFill",
|
|
131
|
-
"btHometownFill",
|
|
132
|
-
"btHubAndMobileFill",
|
|
133
|
-
"btHubFill",
|
|
134
|
-
"btHubOldFill",
|
|
135
|
-
"btIpFill",
|
|
136
|
-
"btIPv6Fill",
|
|
137
|
-
"btIdeaFill",
|
|
138
|
-
"btInfoFill",
|
|
139
|
-
"btJsonFill",
|
|
140
|
-
"btJigsawFill",
|
|
141
|
-
"btJourneyFill",
|
|
142
|
-
"btKeyFill",
|
|
143
|
-
"btKnifeAndForkFill",
|
|
144
|
-
"btLanFill",
|
|
145
|
-
"btLaptopAndMobileFill",
|
|
146
|
-
"btLaptopConnectAndShareFill",
|
|
147
|
-
"btLaptopDetectionFill",
|
|
148
|
-
"btLaptopFill",
|
|
149
|
-
"btLaptopSecureFill",
|
|
150
|
-
"btLaptopVideoConferenceFill",
|
|
151
|
-
"btLaptopUsersFill",
|
|
152
|
-
"btLayoutGridLargeFill",
|
|
153
|
-
"btLayoutGridMediumFill",
|
|
154
|
-
"btLayoutGridSmallFill",
|
|
155
|
-
"btLayoutRowsLargeFill",
|
|
156
|
-
"btLayoutRowsMediumFill",
|
|
157
|
-
"btLayoutRowsSmallFill",
|
|
158
|
-
"btLeadershipFill",
|
|
159
|
-
"btLinkFill",
|
|
160
|
-
"btLiteracyNumeracyFill",
|
|
161
|
-
"btLocationFill",
|
|
162
|
-
"btLockedFill",
|
|
163
|
-
"btLogoutFill",
|
|
164
|
-
"btMedalFill",
|
|
165
|
-
"btMedalWithStarFill",
|
|
166
|
-
"btMeetingSpaceFill",
|
|
167
|
-
"btMegaphoneFill",
|
|
168
|
-
"btMicrophoneFill",
|
|
169
|
-
"btMobileFill",
|
|
170
|
-
"btMobileTransferCallFill",
|
|
171
|
-
"btMobileWithHandFill",
|
|
172
|
-
"btMobilityFill",
|
|
173
|
-
"btMoneyFill",
|
|
174
|
-
"btMonitorFill",
|
|
175
|
-
"btMonitorTickFill",
|
|
176
|
-
"btMoonFill",
|
|
177
|
-
"btMouseFill",
|
|
178
|
-
"btNamingFill",
|
|
179
|
-
"btNewWindowFill",
|
|
180
|
-
"btNoHearingFill",
|
|
181
|
-
"btNoHearingOrSpeechFill",
|
|
182
|
-
"btNoSpeechFill",
|
|
183
|
-
"btNoViewFill",
|
|
184
|
-
"btNotificationFill",
|
|
185
|
-
"btPaperTowelFill",
|
|
186
|
-
"btPasswordFIll",
|
|
187
|
-
"btPaymentMethodFill",
|
|
188
|
-
"btPayphoneFill",
|
|
189
|
-
"btPhoneBarredFill",
|
|
190
|
-
"btPhoneFill",
|
|
191
|
-
"btPictureFill",
|
|
192
|
-
"btPinAltFill",
|
|
193
|
-
"btPinFill",
|
|
194
|
-
"btPlaneFill",
|
|
195
|
-
"btPlanningFill",
|
|
196
|
-
"btPlantFill",
|
|
197
|
-
"btPlayFill",
|
|
198
|
-
"btPodcastFill",
|
|
199
|
-
"btPresentationFill",
|
|
200
|
-
"btPriceFill",
|
|
201
|
-
"btPrinterFill",
|
|
202
|
-
"btProcessFill",
|
|
203
|
-
"btProcessMiningFill",
|
|
204
|
-
"btProcessRolesFill",
|
|
205
|
-
"btProportionalCallDistributionFill",
|
|
206
|
-
"btQuestionFill",
|
|
207
|
-
"btRecyclingFill",
|
|
208
|
-
"btRefreshFill",
|
|
209
|
-
"btRefundFill",
|
|
210
|
-
"btReleaseFill",
|
|
211
|
-
"btResolution4KFill",
|
|
212
|
-
"btResolutionHdFill",
|
|
213
|
-
"btResolutionSdFill",
|
|
214
|
-
"btScaleFill",
|
|
215
|
-
"btSearchFill",
|
|
216
|
-
"btServerFill",
|
|
217
|
-
"btSettingsAlt2Fill",
|
|
218
|
-
"btSettingsAltFill",
|
|
219
|
-
"btSettingsFill",
|
|
220
|
-
"btShieldAddFill",
|
|
221
|
-
"btShieldFill",
|
|
222
|
-
"btShieldQuestionMarkFIll",
|
|
223
|
-
"btShieldSecurityFill",
|
|
224
|
-
"btShieldTickFill",
|
|
225
|
-
"btShipFill",
|
|
226
|
-
"btSignalFill",
|
|
227
|
-
"btSignatureFill",
|
|
228
|
-
"btSignpostFill",
|
|
229
|
-
"btSimFill",
|
|
230
|
-
"btSimpleFill",
|
|
231
|
-
"btSkiingFill",
|
|
232
|
-
"btSkisFill",
|
|
233
|
-
"btSnowboardingFill",
|
|
234
|
-
"btSpannerFill",
|
|
235
|
-
"btSpeakerFullVolumeFill",
|
|
236
|
-
"btSpeakerHalfVolumeFill",
|
|
237
|
-
"btSpeakerLowVolumeFill",
|
|
238
|
-
"btSpeakerMuteFill",
|
|
239
|
-
"btSpeedFasterFill",
|
|
240
|
-
"btSpeedFastestFill",
|
|
241
|
-
"btSpeedGuaranteeFill",
|
|
242
|
-
"btSpeedSlowFill",
|
|
243
|
-
"btSportFootballFill",
|
|
244
|
-
"btStarFill",
|
|
245
|
-
"btStopFill",
|
|
246
|
-
"btStopAltFill",
|
|
247
|
-
"btSuitcaseFill",
|
|
248
|
-
"btSunFill",
|
|
249
|
-
"btSwitchFill",
|
|
250
|
-
"btTvArialFill",
|
|
251
|
-
"btTvFill",
|
|
252
|
-
"btTvAndHubFill",
|
|
253
|
-
"btTvAndHubAndPhoneFill",
|
|
254
|
-
"btTabletFill",
|
|
255
|
-
"btTabletWithKeyboardFill",
|
|
256
|
-
"btTagFill",
|
|
257
|
-
"btTaxonomyFill",
|
|
258
|
-
"btTechBarFill",
|
|
259
|
-
"btTelemarkFill",
|
|
260
|
-
"btThumbsDownFill",
|
|
261
|
-
"btThumbsUpFill",
|
|
262
|
-
"btTickAlt2pxFill",
|
|
263
|
-
"btTickFill",
|
|
264
|
-
"btTickVariantFill",
|
|
265
|
-
"btTree1Fill",
|
|
266
|
-
"btTree2Fill",
|
|
267
|
-
"btTrophyFill",
|
|
268
|
-
"btUkFill",
|
|
269
|
-
"btUkHotspotsFill",
|
|
270
|
-
"btUsbFill",
|
|
271
|
-
"btUnlockedFill",
|
|
272
|
-
"btUserAddFill",
|
|
273
|
-
"btUserCloudFill",
|
|
274
|
-
"btUserDuplicateProfileFill",
|
|
275
|
-
"btUserFill",
|
|
276
|
-
"btUserGroupsFill",
|
|
277
|
-
"btUserParentAndChildFill",
|
|
278
|
-
"btUserWithQuestionmarkFill",
|
|
279
|
-
"btVanFill",
|
|
280
|
-
"btViewFill",
|
|
281
|
-
"btVirusFill",
|
|
282
|
-
"btWholeHomeWifiFill",
|
|
283
|
-
"btWiFiFill",
|
|
284
|
-
"btWizardFill",
|
|
285
|
-
"btWorkstationFill"
|
|
286
|
-
];
|
|
287
|
-
|
|
288
|
-
exports.ArcBreakpointL = ArcBreakpointL;
|
|
289
|
-
exports.ArcBreakpointM = ArcBreakpointM;
|
|
290
|
-
exports.iconsSelected = iconsSelected;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
|
|
2
|
-
import { c as classNames } from './index-2ae58626.js';
|
|
3
|
-
import React, { forwardRef, useContext } from 'react';
|
|
4
|
-
import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
|
|
5
|
-
import { I as Icon } from './Icon-2fd92daa.js';
|
|
6
|
-
import { C as Context } from './Surface-d515d212.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Use `Button` to allow users to take actions with clicks and taps.
|
|
10
|
-
*/
|
|
11
|
-
var Button = forwardRef(function (_a, ref) {
|
|
12
|
-
var _b;
|
|
13
|
-
var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, supportingText = _a.supportingText, target = _a.target, type = _a.type, props = __rest(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "supportingText", "target", "type"]);
|
|
14
|
-
var surface = useContext(Context).surface;
|
|
15
|
-
var buttonClasses = classNames((_b = {
|
|
16
|
-
"arc-Button": true,
|
|
17
|
-
"arc-Button--displayBlock": isDisplayBlock
|
|
18
|
-
},
|
|
19
|
-
_b[suffixModifier("arc-Button--fill", fill)] = fill !== "solid",
|
|
20
|
-
_b["arc-Button--fullWidth"] = isFullWidth,
|
|
21
|
-
_b[suffixModifier("arc-Button--icon", iconPosition.replace("icon", ""))] = (icon || fill === "flat") &&
|
|
22
|
-
iconPosition &&
|
|
23
|
-
iconPosition !== "afterText",
|
|
24
|
-
_b["arc-Button--hasSupportingText"] = supportingText,
|
|
25
|
-
_b["arc-Button--onDarkSurface"] = surface === "dark",
|
|
26
|
-
_b));
|
|
27
|
-
var commonProps = __assign({ id: id, onClick: onClick, ref: ref }, filterDataAttrs(props));
|
|
28
|
-
var buttonText = supportingText ? (React.createElement("span", null,
|
|
29
|
-
React.createElement("span", { className: "arc-Button-text" }, label),
|
|
30
|
-
React.createElement("span", { className: "arc-Button-supportingText" }, supportingText))) : (React.createElement("span", { className: "arc-Button-text" }, label));
|
|
31
|
-
var buttonIcon = icon || fill === "flat" ? (React.createElement(ButtonIcon, { icon: icon, isChevron: !icon && fill === "flat", isBeforeText: iconPosition === "beforeText" })) : null;
|
|
32
|
-
if (href && !isDisabled) {
|
|
33
|
-
return (React.createElement("a", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, href: href, rel: rel, target: target }),
|
|
34
|
-
React.createElement("span", { className: "arc-Button-inner" },
|
|
35
|
-
buttonText,
|
|
36
|
-
buttonIcon)));
|
|
37
|
-
}
|
|
38
|
-
return (React.createElement("button", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, disabled: isDisabled, type: type }),
|
|
39
|
-
React.createElement("span", { className: "arc-Button-inner" },
|
|
40
|
-
buttonText,
|
|
41
|
-
buttonIcon)));
|
|
42
|
-
});
|
|
43
|
-
var ButtonIcon = function (_a) {
|
|
44
|
-
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
45
|
-
return (React.createElement("span", { className: classNames({
|
|
46
|
-
"arc-Button-icon": true,
|
|
47
|
-
"arc-Button-icon--chevron": isChevron
|
|
48
|
-
}) }, isChevron ? (React.createElement(Icon, { icon: "btChevron".concat(isBeforeText ? "Left" : "Right", "Mid") })) : (React.createElement(Icon, { icon: icon }))));
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export { Button as B };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, f as filterDataAttrs } from './index-229fc864.js';
|
|
2
|
-
import { i as iconsSelected } from './index.es-42f84e2d.js';
|
|
3
|
-
import { c as classNames } from './index-2ae58626.js';
|
|
4
|
-
import React, { useContext } from 'react';
|
|
5
|
-
import { s as suffixModifier } from './suffix-modifier-f5e28822.js';
|
|
6
|
-
import { C as Context } from './Surface-d515d212.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Use `Icon` to display brand iconography.
|
|
10
|
-
*/
|
|
11
|
-
var Icon = function (_a) {
|
|
12
|
-
var _b;
|
|
13
|
-
var _c = _a.color, color = _c === void 0 ? "auto" : _c, icon = _a.icon, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isSelected, isSelected = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest(_a, ["color", "icon", "isInline", "isSelected", "label", "size"]);
|
|
14
|
-
var surface = useContext(Context).surface;
|
|
15
|
-
return (React.createElement("span", __assign({ "aria-label": label, className: classNames((_b = {},
|
|
16
|
-
_b["arc-Icon"] = true,
|
|
17
|
-
_b[suffixModifier("arc-Icon--color", color)] = color !== "auto",
|
|
18
|
-
_b["arc-Icon--".concat(icon).concat(isSelected && iconsSelected.includes("".concat(icon, "Fill")) ? "Fill" : "")] = icon,
|
|
19
|
-
_b["arc-Icon--inline"] = isInline,
|
|
20
|
-
_b["arc-Icon--onDarkSurface"] = surface === "dark",
|
|
21
|
-
_b)), role: label ? "img" : undefined, style: {
|
|
22
|
-
height: size,
|
|
23
|
-
width: size
|
|
24
|
-
} }, filterDataAttrs(props))));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { Icon as I };
|