@arc-ui/components 10.6.0 → 10.7.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 (34) hide show
  1. package/dist/Base/index.js +5 -2
  2. package/dist/Breadcrumbs/index.js +17 -10
  3. package/dist/Button/index.d.ts +1 -1
  4. package/dist/Button/index.js +3 -3
  5. package/dist/Card/index.d.ts +4 -0
  6. package/dist/Card/index.js +2 -2
  7. package/dist/Icon/index.d.ts +1 -1
  8. package/dist/Icon/index.js +2 -2
  9. package/dist/Poster/index.d.ts +5 -0
  10. package/dist/SiteFooter/index.js +1 -1
  11. package/dist/SiteHeader/index.js +3 -3
  12. package/dist/VisuallyHidden/index.js +1 -1
  13. package/dist/_shared/{Button-39e56303.d.ts → Button-2fcbd4ed.d.ts} +0 -0
  14. package/dist/_shared/{Button-39e56303.js → Button-2fcbd4ed.js} +1 -1
  15. package/dist/_shared/{Icon-cef09451.d.ts → Icon-b053f03d.d.ts} +0 -0
  16. package/dist/_shared/{Icon-cef09451.js → Icon-b053f03d.js} +1 -1
  17. package/dist/_shared/index.es-ff960629.js +286 -0
  18. package/dist/index.es.js +299 -289
  19. package/dist/index.es.js.map +1 -1
  20. package/dist/index.js +299 -289
  21. package/dist/index.js.map +1 -1
  22. package/dist/styles.css +1 -1
  23. package/dist/types/components/Base/Base.d.ts +2 -1
  24. package/dist/types/components/Card/Card.d.ts +4 -0
  25. package/dist/types/components/Modal/Modal.d.ts +28 -0
  26. package/dist/types/components/Modal/index.d.ts +1 -0
  27. package/dist/types/components/Poster/PosterImage.d.ts +5 -1
  28. package/dist/types/components/Select/Select.d.ts +21 -0
  29. package/dist/types/components/Select/index.d.ts +1 -0
  30. package/dist/types/components/Switch/Switch.d.ts +34 -0
  31. package/dist/types/components/Switch/index.d.ts +1 -0
  32. package/dist/types/styles.d.ts +5 -0
  33. package/package.json +12 -5
  34. package/dist/_shared/index.es-793935a1.js +0 -286
@@ -1,4 +1,5 @@
1
- import { FC } from "react";
1
+ import React, { FC } from "react";
2
+ export declare const ArcRootElementContext: React.Context<HTMLElement | null>;
2
3
  /**
3
4
  * Use `Base` as the root component of the arc system.
4
5
  */
@@ -10,6 +10,10 @@ export declare const Card: FC<CardProps> & {
10
10
  * Internal `Card.Block` component to section blocks of content within a Card.
11
11
  */
12
12
  declare const CardBlock: FC<{
13
+ /**
14
+ * Contents of the CardBlock.
15
+ */
16
+ children: React.ReactNode;
13
17
  /**
14
18
  * How should the content of the block be aligned?
15
19
  */
@@ -0,0 +1,28 @@
1
+ import React, { FC } from "react";
2
+ export declare const Modal: FC<ModalProps>;
3
+ export interface ModalProps {
4
+ /**
5
+ * title for the modal dialog, announced when opened
6
+ */
7
+ title: string;
8
+ /**
9
+ * description for the modal dialog, announced when opened
10
+ */
11
+ description: string;
12
+ /**
13
+ * Function to be called when the modal has been requested to close.
14
+ */
15
+ onClose: () => void;
16
+ /**
17
+ * determines whether the description is visible. If set to false it will be visually hidden, but will still be announaced by screen readers. Set to true by default.
18
+ */
19
+ showDescription?: boolean;
20
+ /**
21
+ * Set modal open or closed
22
+ */
23
+ isOpen?: boolean;
24
+ /**
25
+ * content for the modal
26
+ */
27
+ children?: React.ReactNode;
28
+ }
@@ -0,0 +1 @@
1
+ export { Modal } from "./Modal";
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
1
+ import React, { FC } from "react";
2
2
  import { anchorPoints } from "../../helpers";
3
3
  import { loadingOptions } from "../Image/Image";
4
4
  export declare const PosterImage: FC<PosterImageProps>;
@@ -27,4 +27,8 @@ export interface PosterImageProps {
27
27
  * A comma-separated list indicating a set of possible sources for the user agent to use for different screen sizes for the Poster.Image. Same format as [srcSet](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes), i.e. `my-image-200.png 200w, my-image-200.png 200w`.
28
28
  */
29
29
  srcSet?: string;
30
+ /**
31
+ * Contents of the PosterImage.
32
+ */
33
+ children?: React.ReactNode;
30
34
  }
@@ -0,0 +1,21 @@
1
+ import React, { FocusEvent } from "react";
2
+ import { FormControlProps } from "../FormControl/FormControl";
3
+ export interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id"> {
4
+ name: string;
5
+ label: string;
6
+ placeholder: string;
7
+ options: {
8
+ name: string;
9
+ value: string;
10
+ }[];
11
+ errorMessage?: string;
12
+ defaultValue?: string;
13
+ onChange?: (value: string) => void;
14
+ onBlur?: (e: FocusEvent) => void;
15
+ onOpenChange?: () => void;
16
+ isFluid?: boolean;
17
+ isDisabled?: boolean;
18
+ isDefaultOpen?: boolean;
19
+ isRequired?: boolean;
20
+ }
21
+ export declare const Select: React.FC<SelectProps>;
@@ -0,0 +1 @@
1
+ export { Select } from "./Select";
@@ -0,0 +1,34 @@
1
+ import { FC } from "react";
2
+ import { SwitchProps as RadixSwitchProps } from "@radix-ui/react-switch";
3
+ /** `WIP`: Use `Switch` to toggle between checked and not checked. */
4
+ export declare const Switch: FC<SwitchProps>;
5
+ export interface SwitchProps {
6
+ /**
7
+ * label for screen readers to announce
8
+ */
9
+ label: string;
10
+ /**
11
+ * handler for blur
12
+ */
13
+ onBlur?: RadixSwitchProps["onBlur"];
14
+ /**
15
+ * show rendered label above input, useful for forms
16
+ */
17
+ showLabel?: boolean;
18
+ /**
19
+ * set the switch to be checked by default
20
+ */
21
+ defaultChecked?: RadixSwitchProps["defaultChecked"];
22
+ /**
23
+ * value for the switch, is applied to a hidden checkbox if within a form
24
+ */
25
+ value?: RadixSwitchProps["value"];
26
+ /**
27
+ * name for the hidden checkbox if within a form
28
+ */
29
+ name?: RadixSwitchProps["name"];
30
+ /**
31
+ * callback for when the switch is toggled
32
+ */
33
+ onCheckedChange?: RadixSwitchProps["onCheckedChange"];
34
+ }
@@ -0,0 +1 @@
1
+ export { Switch } from "./Switch";
@@ -20,6 +20,7 @@ import "./components/Poster/Poster.css";
20
20
  import "./components/RadioGroup/RadioGroup.css";
21
21
  import "./components/Rule/Rule.css";
22
22
  import "./components/Section/Section.css";
23
+ import "./components/Select/Select.css";
23
24
  import "./components/SiteFooter/SiteFooter.css";
24
25
  import "./components/SiteHeader/SiteHeader.css";
25
26
  import "./components/Surface/Surface.css";
@@ -28,6 +29,7 @@ import "./components/TextInput/TextInput.css";
28
29
  import "./components/UniversalHeader/UniversalHeader.css";
29
30
  import "./components/VerticalSpace/VerticalSpace.css";
30
31
  import "./components/VisuallyHidden/VisuallyHidden.css";
32
+ import "./components/Switch/Switch.css";
31
33
  import "./components/Base/Base.bt.css";
32
34
  import "./components/BrandLogo/BrandLogo.bt.css";
33
35
  import "./components/Button/Button.bt.css";
@@ -44,9 +46,12 @@ import "./components/Markup/Markup.bt.css";
44
46
  import "./components/Poster/Poster.bt.css";
45
47
  import "./components/RadioGroup/RadioGroup.bt.css";
46
48
  import "./components/Rule/Rule.bt.css";
49
+ import "./components/Select/Select.bt.css";
47
50
  import "./components/SiteFooter/SiteFooter.bt.css";
48
51
  import "./components/SiteHeader/SiteHeader.bt.css";
49
52
  import "./components/Surface/Surface.bt.css";
50
53
  import "./components/Text/Text.bt.css";
51
54
  import "./components/TextInput/TextInput.bt.css";
52
55
  import "./components/UniversalHeader/UniversalHeader.bt.css";
56
+ import "./components/Switch/Switch.bt.css";
57
+ import "./components/Modal/Modal.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arc-ui/components",
3
- "version": "10.6.0",
3
+ "version": "10.7.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",
@@ -25,9 +25,15 @@
25
25
  "peerDependencies": {
26
26
  "react": "^18.0.0"
27
27
  },
28
+ "dependencies": {
29
+ "@radix-ui/react-dialog": "1.0.2",
30
+ "@radix-ui/react-label": "2.0.0",
31
+ "@radix-ui/react-select": "1.1.2",
32
+ "@radix-ui/react-switch": "^1.0.1"
33
+ },
28
34
  "devDependencies": {
29
- "@arc-ui/fonts": "^10.6.0",
30
- "@arc-ui/tokens": "^10.6.0",
35
+ "@arc-ui/fonts": "^10.7.0",
36
+ "@arc-ui/tokens": "^10.7.0",
31
37
  "@babel/core": "^7.14.3",
32
38
  "@babel/helper-define-map": "^7.14.3",
33
39
  "@storybook/addon-essentials": "^6.3.6",
@@ -37,12 +43,13 @@
37
43
  "@types/classnames": "^2.2.10",
38
44
  "@types/node": "^12.12.38",
39
45
  "@types/prop-types": "^15.7.3",
40
- "@types/react": "^16.9.49",
41
- "@types/react-dom": "^16.9.8",
46
+ "@types/react": "^18.0.26",
47
+ "@types/react-dom": "^18.0.9",
42
48
  "babel-loader": "^8.2.2",
43
49
  "camelcase": "^6.2.1",
44
50
  "cheerio": "^1.0.0-rc.3",
45
51
  "classnames": "^2.2.6",
52
+ "countries-list": "^2.6.1",
46
53
  "formik": "^2.2.9",
47
54
  "prop-types": "^15.7.2",
48
55
  "react": "^18.0.0",
@@ -1,286 +0,0 @@
1
- /**
2
- * Do not edit directly
3
- * Generated file
4
- */
5
- const ArcBreakpointM = 768;
6
- const ArcBreakpointL = 1024;
7
- const iconsSelected = [
8
- "bt3GFill",
9
- "bt4GFill",
10
- "bt5GFill",
11
- "btAccessibilityFill",
12
- "btAddFill",
13
- "btAlertFill",
14
- "btAlertTriangleFill",
15
- "btAnswerPointFill",
16
- "btArchitectureFill",
17
- "btArchiveFill",
18
- "btArrowAltDownFill",
19
- "btArrowAltLeftFill",
20
- "btArrowAltLeftRightFill",
21
- "btArrowAltRightFill",
22
- "btArrowAltUpFill",
23
- "btArrowDownFill",
24
- "btArrowLeftFill",
25
- "btArrowLeftRightFill",
26
- "btArrowRightFill",
27
- "btArrowUpFill",
28
- "btAttachmentAltFill",
29
- "btAttachmentFill",
30
- "btBagFill",
31
- "btBasketFill",
32
- "btBinFill",
33
- "btBlockedNumberFill",
34
- "btBoatFill",
35
- "btBroadbandFill",
36
- "btBuildingFill",
37
- "btBurgerMenuFill",
38
- "btCakeFill",
39
- "btCalenderAcceptedFill",
40
- "btCalenderAddEventFill",
41
- "btCalenderFill",
42
- "btCalenderPaymentPlanAltFill",
43
- "btCalenderPaymentPlanFill",
44
- "btCalenderSpecialDateFill",
45
- "btCallRoutingFill",
46
- "btCallerIdFill",
47
- "btChatFill",
48
- "btChatMessageFill",
49
- "btChatTypingFill",
50
- "btClipboardFill",
51
- "btClipboardTickFill",
52
- "btClockFill",
53
- "btCloudAlertFill",
54
- "btCloudDesktopFill",
55
- "btCloudFill",
56
- "btCloudLinkFill",
57
- "btCloudMeetingFill",
58
- "btCloudPhoneFill",
59
- "btCloudSecurityFill",
60
- "btCloudUploadFill",
61
- "btCloudUserFill",
62
- "btCollapseFill",
63
- "btCompareFill",
64
- "btComputerChipFill",
65
- "btConnectedCareFill",
66
- "btContactDetailsFill",
67
- "btContactNoDetailsFill",
68
- "btContactsFill",
69
- "btCreditCardFill",
70
- "btCrossAlt2pxFill",
71
- "btCrossAltFill",
72
- "btCrossFill",
73
- "btDashboardFill",
74
- "btDepositFill",
75
- "btDesignFill",
76
- "btDeskPhoneFill",
77
- "btDetailsFill",
78
- "btDetailsGroupFill",
79
- "btDexterityFill",
80
- "btDialPadFill",
81
- "btDialPadWithHandFill",
82
- "btDialledNumberDestinationFill",
83
- "btDigitalCollaborationFill",
84
- "btDisabilityFill",
85
- "btDiscountFill",
86
- "btDivertOnBusyFill",
87
- "btDocumentAndPencilFill",
88
- "btDocumentArticleFill",
89
- "btDocumentBillsFill",
90
- "btDocumentDownloadFill",
91
- "btDocumentFill",
92
- "btDocumentPdfFill",
93
- "btDocumentWithCopyCrossedOutFill",
94
- "btDocumentWithCopyFill",
95
- "btDynamicCollaborationFill",
96
- "btEducationFill",
97
- "btEmailReadFill",
98
- "btEmailUnreadFill",
99
- "btEngagedFill",
100
- "btEthernetFill",
101
- "btFaceHappyFill",
102
- "btFaceNeutralFill",
103
- "btFaceSadFill",
104
- "btFaceVeryHappyFill",
105
- "btFirstAidFill",
106
- "btFolderFill",
107
- "btGamingFill",
108
- "btGenderFemaleAndMaleFill",
109
- "btGenderFemaleFill",
110
- "btGenderMaleFill",
111
- "btGenderNeutralFill",
112
- "btGiftFill",
113
- "btGlobalConnectivityFill",
114
- "btGlobeFill",
115
- "btGlossaryFill",
116
- "btGondolaFill",
117
- "btGraphBarAndPlotFill",
118
- "btGraphBarChartFill",
119
- "btGraphDownFill",
120
- "btGraphUpAndDownFill",
121
- "btGraphUpFill",
122
- "btHeadsetFill",
123
- "btHeartBrokenFill",
124
- "btHeartCareFill",
125
- "btHeartFill",
126
- "btHoldingHeartFill",
127
- "btHomeFill",
128
- "btHomeTechExpertFill",
129
- "btHometownFill",
130
- "btHubAndMobileFill",
131
- "btHubFill",
132
- "btHubOldFill",
133
- "btIpFill",
134
- "btIPv6Fill",
135
- "btIdeaFill",
136
- "btInfoFill",
137
- "btJsonFill",
138
- "btJigsawFill",
139
- "btJourneyFill",
140
- "btKeyFill",
141
- "btKnifeAndForkFill",
142
- "btLanFill",
143
- "btLaptopAndMobileFill",
144
- "btLaptopConnectAndShareFill",
145
- "btLaptopDetectionFill",
146
- "btLaptopFill",
147
- "btLaptopSecureFill",
148
- "btLaptopVideoConferenceFill",
149
- "btLaptopUsersFill",
150
- "btLayoutGridLargeFill",
151
- "btLayoutGridMediumFill",
152
- "btLayoutGridSmallFill",
153
- "btLayoutRowsLargeFill",
154
- "btLayoutRowsMediumFill",
155
- "btLayoutRowsSmallFill",
156
- "btLeadershipFill",
157
- "btLinkFill",
158
- "btLiteracyNumeracyFill",
159
- "btLocationFill",
160
- "btLockedFill",
161
- "btLogoutFill",
162
- "btMedalFill",
163
- "btMedalWithStarFill",
164
- "btMeetingSpaceFill",
165
- "btMegaphoneFill",
166
- "btMicrophoneFill",
167
- "btMobileFill",
168
- "btMobileTransferCallFill",
169
- "btMobileWithHandFill",
170
- "btMobilityFill",
171
- "btMoneyFill",
172
- "btMonitorFill",
173
- "btMonitorTickFill",
174
- "btMoonFill",
175
- "btMouseFill",
176
- "btNamingFill",
177
- "btNewWindowFill",
178
- "btNoHearingFill",
179
- "btNoHearingOrSpeechFill",
180
- "btNoSpeechFill",
181
- "btNoViewFill",
182
- "btNotificationFill",
183
- "btPaperTowelFill",
184
- "btPasswordFIll",
185
- "btPaymentMethodFill",
186
- "btPayphoneFill",
187
- "btPhoneBarredFill",
188
- "btPhoneFill",
189
- "btPictureFill",
190
- "btPinAltFill",
191
- "btPinFill",
192
- "btPlaneFill",
193
- "btPlanningFill",
194
- "btPlantFill",
195
- "btPlayFill",
196
- "btPodcastFill",
197
- "btPresentationFill",
198
- "btPriceFill",
199
- "btPrinterFill",
200
- "btProcessFill",
201
- "btProcessMiningFill",
202
- "btProcessRolesFill",
203
- "btProportionalCallDistributionFill",
204
- "btQuestionFill",
205
- "btRecyclingFill",
206
- "btRefreshFill",
207
- "btRefundFill",
208
- "btReleaseFill",
209
- "btResolution4KFill",
210
- "btResolutionHdFill",
211
- "btResolutionSdFill",
212
- "btScaleFill",
213
- "btSearchFill",
214
- "btServerFill",
215
- "btSettingsAlt2Fill",
216
- "btSettingsAltFill",
217
- "btSettingsFill",
218
- "btShieldAddFill",
219
- "btShieldFill",
220
- "btShieldQuestionMarkFIll",
221
- "btShieldSecurityFill",
222
- "btShieldTickFill",
223
- "btShipFill",
224
- "btSignalFill",
225
- "btSignatureFill",
226
- "btSignpostFill",
227
- "btSimFill",
228
- "btSimpleFill",
229
- "btSkiingFill",
230
- "btSkisFill",
231
- "btSnowboardingFill",
232
- "btSpannerFill",
233
- "btSpeakerFullVolumeFill",
234
- "btSpeakerHalfVolumeFill",
235
- "btSpeakerLowVolumeFill",
236
- "btSpeakerMuteFill",
237
- "btSpeedFasterFill",
238
- "btSpeedFastestFill",
239
- "btSpeedGuaranteeFill",
240
- "btSpeedSlowFill",
241
- "btSportFootballFill",
242
- "btStarFill",
243
- "btStopFill",
244
- "btStopAltFill",
245
- "btSuitcaseFill",
246
- "btSunFill",
247
- "btSwitchFill",
248
- "btTvArialFill",
249
- "btTvFill",
250
- "btTvAndHubFill",
251
- "btTvAndHubAndPhoneFill",
252
- "btTabletFill",
253
- "btTabletWithKeyboardFill",
254
- "btTagFill",
255
- "btTaxonomyFill",
256
- "btTechBarFill",
257
- "btTelemarkFill",
258
- "btThumbsDownFill",
259
- "btThumbsUpFill",
260
- "btTickAlt2pxFill",
261
- "btTickFill",
262
- "btTickVariantFill",
263
- "btTree1Fill",
264
- "btTree2Fill",
265
- "btTrophyFill",
266
- "btUkFill",
267
- "btUkHotspotsFill",
268
- "btUsbFill",
269
- "btUnlockedFill",
270
- "btUserAddFill",
271
- "btUserCloudFill",
272
- "btUserDuplicateProfileFill",
273
- "btUserFill",
274
- "btUserGroupsFill",
275
- "btUserParentAndChildFill",
276
- "btUserWithQuestionmarkFill",
277
- "btVanFill",
278
- "btViewFill",
279
- "btVirusFill",
280
- "btWholeHomeWifiFill",
281
- "btWiFiFill",
282
- "btWizardFill",
283
- "btWorkstationFill"
284
- ];
285
-
286
- export { ArcBreakpointM as A, ArcBreakpointL as a, iconsSelected as i };