@arc-ui/components 11.1.0 → 11.3.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/Checkbox/Checkbox.cjs.js +8 -27
- package/dist/Checkbox/Checkbox.esm.js +3 -22
- 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/RadioGroup/RadioGroup.cjs.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
- package/dist/RadioGroup/RadioGroup.esm.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.esm.js +2 -2
- package/dist/Select/Select.cjs.d.ts +2 -2
- package/dist/Select/Select.cjs.js +209 -607
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +45 -443
- package/dist/Switch/Switch.cjs.d.ts +40 -0
- package/dist/Switch/Switch.cjs.js +211 -0
- package/dist/Switch/Switch.esm.d.ts +40 -0
- package/dist/Switch/Switch.esm.js +203 -0
- package/dist/Switch/package.json +7 -0
- package/dist/TextInput/TextInput.cjs.d.ts +2 -2
- package/dist/TextInput/TextInput.cjs.js +1 -1
- package/dist/TextInput/TextInput.esm.d.ts +2 -2
- package/dist/TextInput/TextInput.esm.js +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -18
- package/dist/VerticalSpace/VerticalSpace.cjs.js +5 -20
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -18
- package/dist/VerticalSpace/VerticalSpace.esm.js +4 -19
- package/dist/_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js +29 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.d.ts → FormControl-d4d9c665.d.ts} +4 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.js → FormControl-d4d9c665.js} +6 -5
- package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +18 -0
- package/dist/_shared/cjs/VerticalSpace-65ad083c.js +25 -0
- package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
- package/dist/_shared/cjs/index.module-af7c85f2.js +400 -0
- package/dist/_shared/esm/BtIconTickAlt2Px-da97e9ae.js +23 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.d.ts → FormControl-2cb96de7.d.ts} +4 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.js → FormControl-2cb96de7.js} +6 -5
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +18 -0
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.js +19 -0
- package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
- package/dist/_shared/esm/index.module-599b86dd.js +388 -0
- package/dist/index.es.js +285 -112
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +500 -326
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/FormControl/FormControl.d.ts +4 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +13 -8
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var index = require('../_shared/cjs/index-78b35bc1.js');
|
|
6
|
-
var React
|
|
7
|
-
var
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var BtIconTickAlt2Px = require('../_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js');
|
|
8
|
+
var FormControl = require('../_shared/cjs/FormControl-d4d9c665.js');
|
|
8
9
|
var index$1 = require('../_shared/cjs/index-45bfb67b.js');
|
|
9
10
|
var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
|
|
10
11
|
require('../_shared/cjs/Text-1d3844be.js');
|
|
@@ -13,35 +14,15 @@ require('../_shared/cjs/BtIconChevronRightMid-5a38d855.js');
|
|
|
13
14
|
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
16
|
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React
|
|
17
|
-
|
|
18
|
-
const React = React__default["default"];
|
|
19
|
-
const BtIconTickVariant = props =>
|
|
20
|
-
/*#__PURE__*/ React.createElement(
|
|
21
|
-
"svg",
|
|
22
|
-
Object.assign(
|
|
23
|
-
{
|
|
24
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
-
viewBox: "0 0 32 32"
|
|
26
|
-
},
|
|
27
|
-
props
|
|
28
|
-
),
|
|
29
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
30
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
31
|
-
d:
|
|
32
|
-
"M13.5,21.207,9.14648,16.85352a.5.5,0,0,1,.707-.707L13.5,19.793l8.64648-8.64649a.5.5,0,0,1,.707.707Z",
|
|
33
|
-
fill: "currentColor"
|
|
34
|
-
})
|
|
35
|
-
);
|
|
36
|
-
var BtIconTickVariant_2 = BtIconTickVariant;
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
37
18
|
|
|
38
19
|
/**
|
|
39
20
|
* Use `Checkbox` to allow users to select individual options.
|
|
40
21
|
*/
|
|
41
|
-
var Checkbox = React
|
|
22
|
+
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
42
23
|
var _b = _a.checked, checked = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, label = _a.label, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _e = _a.size, size = _e === void 0 ? "l" : _e, value = _a.value, props = index.__rest(_a, ["checked", "errorMessage", "helper", "id", "isDisabled", "isRequired", "label", "name", "onBlur", "onChange", "size", "value"]);
|
|
43
|
-
var requirementStatus = React
|
|
44
|
-
var surface = React
|
|
24
|
+
var requirementStatus = React.useContext(FormControl.Context).requirementStatus;
|
|
25
|
+
var surface = React.useContext(Surface.Context).surface;
|
|
45
26
|
var _f = FormControl.useAriaDescribedby({
|
|
46
27
|
id: id,
|
|
47
28
|
errorMessage: errorMessage
|
|
@@ -67,7 +48,7 @@ var Checkbox = React$1.forwardRef(function (_a, ref) {
|
|
|
67
48
|
React__default["default"].createElement("label", { id: idLabel, htmlFor: id, className: "arc-Checkbox-label" },
|
|
68
49
|
React__default["default"].createElement("input", index.__assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, index.filterDataAttrs(props))),
|
|
69
50
|
React__default["default"].createElement("span", { className: "arc-Checkbox-box" },
|
|
70
|
-
React__default["default"].createElement(
|
|
51
|
+
React__default["default"].createElement(BtIconTickAlt2Px.BtIconTickAlt2Px_2, null)),
|
|
71
52
|
React__default["default"].createElement("span", null,
|
|
72
53
|
label,
|
|
73
54
|
!isRequired && requirementStatus !== "optional" ? (React__default["default"].createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
|
|
2
2
|
import React__default, { forwardRef, useContext } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { B as BtIconTickAlt2Px_2 } from '../_shared/esm/BtIconTickAlt2Px-da97e9ae.js';
|
|
4
|
+
import { C as Context, u as useAriaDescribedby, B as BtIconAlert_2 } from '../_shared/esm/FormControl-2cb96de7.js';
|
|
4
5
|
import { c as classNames } from '../_shared/esm/index-2ae58626.js';
|
|
5
6
|
import { C as Context$1 } from '../_shared/esm/Surface-bf201530.js';
|
|
6
7
|
import '../_shared/esm/Text-6b958ad8.js';
|
|
7
8
|
import '../_shared/esm/suffix-modifier-f5e28822.js';
|
|
8
9
|
import '../_shared/esm/BtIconChevronRightMid-d9b11761.js';
|
|
9
10
|
|
|
10
|
-
const React = React__default;
|
|
11
|
-
const BtIconTickVariant = props =>
|
|
12
|
-
/*#__PURE__*/ React.createElement(
|
|
13
|
-
"svg",
|
|
14
|
-
Object.assign(
|
|
15
|
-
{
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
-
viewBox: "0 0 32 32"
|
|
18
|
-
},
|
|
19
|
-
props
|
|
20
|
-
),
|
|
21
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
22
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
23
|
-
d:
|
|
24
|
-
"M13.5,21.207,9.14648,16.85352a.5.5,0,0,1,.707-.707L13.5,19.793l8.64648-8.64649a.5.5,0,0,1,.707.707Z",
|
|
25
|
-
fill: "currentColor"
|
|
26
|
-
})
|
|
27
|
-
);
|
|
28
|
-
var BtIconTickVariant_2 = BtIconTickVariant;
|
|
29
|
-
|
|
30
11
|
/**
|
|
31
12
|
* Use `Checkbox` to allow users to select individual options.
|
|
32
13
|
*/
|
|
@@ -59,7 +40,7 @@ var Checkbox = forwardRef(function (_a, ref) {
|
|
|
59
40
|
React__default.createElement("label", { id: idLabel, htmlFor: id, className: "arc-Checkbox-label" },
|
|
60
41
|
React__default.createElement("input", __assign({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
61
42
|
React__default.createElement("span", { className: "arc-Checkbox-box" },
|
|
62
|
-
React__default.createElement(
|
|
43
|
+
React__default.createElement(BtIconTickAlt2Px_2, null)),
|
|
63
44
|
React__default.createElement("span", null,
|
|
64
45
|
label,
|
|
65
46
|
!isRequired && requirementStatus !== "optional" ? (React__default.createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FormControl, FormControlContext } from "../_shared/cjs/FormControl-
|
|
1
|
+
export { FormControl, FormControlContext } from "../_shared/cjs/FormControl-d4d9c665";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
5
|
+
var FormControl = require('../_shared/cjs/FormControl-d4d9c665.js');
|
|
6
6
|
require('../_shared/cjs/index-78b35bc1.js');
|
|
7
7
|
require('../_shared/cjs/index-45bfb67b.js');
|
|
8
8
|
require('react');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FormControl, FormControlContext } from "../_shared/esm/FormControl-
|
|
1
|
+
export { FormControl, FormControlContext } from "../_shared/esm/FormControl-2cb96de7";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FormControl, C as FormControlContext } from '../_shared/esm/FormControl-
|
|
1
|
+
export { F as FormControl, C as FormControlContext } from '../_shared/esm/FormControl-2cb96de7.js';
|
|
2
2
|
import '../_shared/esm/index-229fc864.js';
|
|
3
3
|
import '../_shared/esm/index-2ae58626.js';
|
|
4
4
|
import 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
|
-
import { FormControlProps } from "../_shared/cjs/FormControl-
|
|
4
|
+
import { FormControlProps } from "../_shared/cjs/FormControl-d4d9c665";
|
|
5
5
|
/**
|
|
6
6
|
* Radio Button component.
|
|
7
7
|
*/
|
|
@@ -35,7 +35,7 @@ type EventType = React.ChangeEvent<HTMLInputElement>;
|
|
|
35
35
|
declare const RadioGroup: FC<RadioGroupProps> & {
|
|
36
36
|
RadioButton: typeof RadioButton;
|
|
37
37
|
};
|
|
38
|
-
interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus"> {
|
|
38
|
+
interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus" | "disclosureText" | "disclosureTitle" | "onClickDisclosure" | "helperUnderLabel"> {
|
|
39
39
|
/**
|
|
40
40
|
* Contents of the RadioGroup. Should only contain `RadioGroup.RadioButton`
|
|
41
41
|
*/
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var index = require('../_shared/cjs/index-78b35bc1.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
7
|
+
var FormControl = require('../_shared/cjs/FormControl-d4d9c665.js');
|
|
8
8
|
var index$1 = require('../_shared/cjs/index-45bfb67b.js');
|
|
9
9
|
var Surface = require('../_shared/cjs/Surface-d6b8010e.js');
|
|
10
10
|
require('../_shared/cjs/Text-1d3844be.js');
|
|
@@ -67,7 +67,7 @@ var RadioGroup = function (_a) {
|
|
|
67
67
|
size: size
|
|
68
68
|
} },
|
|
69
69
|
React__default["default"].createElement("div", index.__assign({ className: "arc-RadioGroup" }, index.filterDataAttrs(props)),
|
|
70
|
-
React__default["default"].createElement(FormControl.FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable" }, children))));
|
|
70
|
+
React__default["default"].createElement(FormControl.FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true }, children))));
|
|
71
71
|
};
|
|
72
72
|
RadioButton.displayName = "RadioGroup.RadioButton";
|
|
73
73
|
RadioGroup.RadioButton = RadioButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
|
-
import { FormControlProps } from "../_shared/esm/FormControl-
|
|
4
|
+
import { FormControlProps } from "../_shared/esm/FormControl-2cb96de7";
|
|
5
5
|
/**
|
|
6
6
|
* Radio Button component.
|
|
7
7
|
*/
|
|
@@ -35,7 +35,7 @@ type EventType = React.ChangeEvent<HTMLInputElement>;
|
|
|
35
35
|
declare const RadioGroup: FC<RadioGroupProps> & {
|
|
36
36
|
RadioButton: typeof RadioButton;
|
|
37
37
|
};
|
|
38
|
-
interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus"> {
|
|
38
|
+
interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus" | "disclosureText" | "disclosureTitle" | "onClickDisclosure" | "helperUnderLabel"> {
|
|
39
39
|
/**
|
|
40
40
|
* Contents of the RadioGroup. Should only contain `RadioGroup.RadioButton`
|
|
41
41
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index-229fc864.js';
|
|
2
2
|
import React__default, { createContext, useContext, forwardRef, useEffect } from 'react';
|
|
3
|
-
import { F as FormControl } from '../_shared/esm/FormControl-
|
|
3
|
+
import { F as FormControl } from '../_shared/esm/FormControl-2cb96de7.js';
|
|
4
4
|
import { c as classNames } from '../_shared/esm/index-2ae58626.js';
|
|
5
5
|
import { C as Context } from '../_shared/esm/Surface-bf201530.js';
|
|
6
6
|
import '../_shared/esm/Text-6b958ad8.js';
|
|
@@ -59,7 +59,7 @@ var RadioGroup = function (_a) {
|
|
|
59
59
|
size: size
|
|
60
60
|
} },
|
|
61
61
|
React__default.createElement("div", __assign({ className: "arc-RadioGroup" }, filterDataAttrs(props)),
|
|
62
|
-
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable" }, children))));
|
|
62
|
+
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true }, children))));
|
|
63
63
|
};
|
|
64
64
|
RadioButton.displayName = "RadioGroup.RadioButton";
|
|
65
65
|
RadioGroup.RadioButton = RadioButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FocusEvent } from "react";
|
|
4
|
-
import { FormControlProps } from "../_shared/cjs/FormControl-
|
|
4
|
+
import { FormControlProps } from "../_shared/cjs/FormControl-d4d9c665";
|
|
5
5
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
6
6
|
declare const Select: React.FC<SelectProps>;
|
|
7
|
-
interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id"> {
|
|
7
|
+
interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id" | "helperUnderLabel"> {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
10
|
placeholder: string;
|