@dscout/particle 1.0.0-alpha.21 → 1.0.0-alpha.22
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/lib/cjs/components/attribute_input.d.ts +2 -1
- package/lib/cjs/components/attribute_input.js +2 -2
- package/lib/cjs/components/attribute_input.js.map +1 -1
- package/lib/cjs/components/attribute_selector.d.ts +2 -1
- package/lib/cjs/components/attribute_selector.js +2 -2
- package/lib/cjs/components/attribute_selector.js.map +1 -1
- package/lib/cjs/components/blitz.d.ts +2 -2
- package/lib/cjs/components/blitz.js +28 -4
- package/lib/cjs/components/blitz.js.map +1 -1
- package/lib/cjs/components/checkbox_input.d.ts +3 -1
- package/lib/cjs/components/checkbox_input.js +2 -2
- package/lib/cjs/components/checkbox_input.js.map +1 -1
- package/lib/cjs/components/drag_and_drop.d.ts +3 -1
- package/lib/cjs/components/drag_and_drop.js +2 -2
- package/lib/cjs/components/drag_and_drop.js.map +1 -1
- package/lib/cjs/components/file_input.d.ts +3 -1
- package/lib/cjs/components/file_input.js +2 -2
- package/lib/cjs/components/file_input.js.map +1 -1
- package/lib/cjs/components/focus_trap.d.ts +1 -1
- package/lib/cjs/components/modal.d.ts +2 -2
- package/lib/cjs/components/modal.js.map +1 -1
- package/lib/cjs/components/radio_input.d.ts +2 -1
- package/lib/cjs/components/radio_input.js +2 -2
- package/lib/cjs/components/radio_input.js.map +1 -1
- package/lib/cjs/components/range_input.d.ts +2 -1
- package/lib/cjs/components/range_input.js +2 -2
- package/lib/cjs/components/range_input.js.map +1 -1
- package/lib/cjs/components/select_input.d.ts +3 -1
- package/lib/cjs/components/select_input.js +3 -3
- package/lib/cjs/components/select_input.js.map +1 -1
- package/lib/cjs/components/textarea.d.ts +3 -1
- package/lib/cjs/components/textarea.js +3 -3
- package/lib/cjs/components/textarea.js.map +1 -1
- package/lib/cjs/components/theme_provider.d.ts +29 -1
- package/lib/cjs/components/theme_provider.js +28 -28
- package/lib/cjs/components/theme_provider.js.map +1 -1
- package/lib/cjs/components/toggle.d.ts +3 -1
- package/lib/cjs/components/toggle.js +2 -2
- package/lib/cjs/components/toggle.js.map +1 -1
- package/lib/esm/components/attribute_input.d.ts +2 -1
- package/lib/esm/components/attribute_input.js +2 -2
- package/lib/esm/components/attribute_input.js.map +1 -1
- package/lib/esm/components/attribute_selector.d.ts +2 -1
- package/lib/esm/components/attribute_selector.js +2 -2
- package/lib/esm/components/attribute_selector.js.map +1 -1
- package/lib/esm/components/blitz.d.ts +2 -2
- package/lib/esm/components/blitz.js +5 -4
- package/lib/esm/components/blitz.js.map +1 -1
- package/lib/esm/components/checkbox_input.d.ts +3 -1
- package/lib/esm/components/checkbox_input.js +2 -2
- package/lib/esm/components/checkbox_input.js.map +1 -1
- package/lib/esm/components/drag_and_drop.d.ts +3 -1
- package/lib/esm/components/drag_and_drop.js +2 -2
- package/lib/esm/components/drag_and_drop.js.map +1 -1
- package/lib/esm/components/file_input.d.ts +3 -1
- package/lib/esm/components/file_input.js +2 -2
- package/lib/esm/components/file_input.js.map +1 -1
- package/lib/esm/components/focus_trap.d.ts +1 -1
- package/lib/esm/components/modal.d.ts +2 -2
- package/lib/esm/components/modal.js.map +1 -1
- package/lib/esm/components/radio_input.d.ts +2 -1
- package/lib/esm/components/radio_input.js +2 -2
- package/lib/esm/components/radio_input.js.map +1 -1
- package/lib/esm/components/range_input.d.ts +2 -1
- package/lib/esm/components/range_input.js +2 -2
- package/lib/esm/components/range_input.js.map +1 -1
- package/lib/esm/components/select_input.d.ts +3 -1
- package/lib/esm/components/select_input.js +3 -3
- package/lib/esm/components/select_input.js.map +1 -1
- package/lib/esm/components/textarea.d.ts +3 -1
- package/lib/esm/components/textarea.js +3 -3
- package/lib/esm/components/textarea.js.map +1 -1
- package/lib/esm/components/theme_provider.d.ts +29 -1
- package/lib/esm/components/theme_provider.js +28 -28
- package/lib/esm/components/theme_provider.js.map +1 -1
- package/lib/esm/components/toggle.d.ts +3 -1
- package/lib/esm/components/toggle.js +2 -2
- package/lib/esm/components/toggle.js.map +1 -1
- package/lib/stylesheets/particle.css +14 -14
- package/lib/stylesheets/particle.min.css +1 -1
- package/lib/stylesheets/particle.min.css.gz +0 -0
- package/package.json +1 -1
- package/styles/color_schemes/_base_colors.scss +1 -1
- package/styles/components/container/_base.scss +1 -1
- package/styles/components/drag_and_drop/themes/_theme_builder.scss +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAK1B,qEAA8C;AAC9C,wCAA4C;AAC5C,6EAAyD;
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAK1B,qEAA8C;AAC9C,wCAA4C;AAC5C,6EAAyD;AA6BzD,IAAM,cAAc,GAAmC;IACrD,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,SAAS,YAAY,CAAC,MAA+B;IACnD,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,eAAe,CAAC,MAAqC;IAArC,uBAAA,EAAA,YAAqC;IAC5D,IAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1E,OAAO,kBAAW,UAAU,CAAE,CAAC;AACjC,CAAC;AAED,SAAgB,QAAQ,CAAC,EA4BT;IA3Bd,IAAA,cAAc,oBAAA,EACM,eAAe,yBAAA,EACnB,WAAW,qBAAA,EACb,SAAS,mBAAA,EACJ,cAAc,wBAAA,EAChB,YAAY,s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
|
|
@@ -12,7 +12,7 @@ interface ThemeProviderProps extends CommonComponentProps {
|
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
/** Additional class name(s) to apply. */
|
|
14
14
|
className?: string;
|
|
15
|
-
/** Name of the color scheme to apply. */
|
|
15
|
+
/** **Experimental**: Name of the color scheme to apply. */
|
|
16
16
|
colorScheme?: ColorSchemes;
|
|
17
17
|
/** Name of the theme to apply. */
|
|
18
18
|
theme?: Themes;
|
|
@@ -26,5 +26,33 @@ export declare const ThemeContext: React.Context<{
|
|
|
26
26
|
theme: Themes;
|
|
27
27
|
colorScheme: ColorSchemes;
|
|
28
28
|
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Use the `<ThemeProvider />` to apply a theme to Particle. Particle is
|
|
31
|
+
* largely unstyled without a defined theme, so each app will need to render a
|
|
32
|
+
* `<ThemeProvider />` at the top level. The top-level provider should use the
|
|
33
|
+
* `global` prop to set the theme class on the body element. You'll likely
|
|
34
|
+
* want to also use the `applyBackgroundColor` prop on the top-level provider to
|
|
35
|
+
* apply the color scheme's base background color to the whole page.
|
|
36
|
+
*
|
|
37
|
+
* Themes can be nested to apply a different theme or color scheme to only a
|
|
38
|
+
* subsection of an interface. Do not apply the `global` prop for nested themes.
|
|
39
|
+
*
|
|
40
|
+
* The `<ThemeProvider />` also renders a React context provider, so descendants
|
|
41
|
+
* can use `ThemeContext` to customize their behavior based on the theme or
|
|
42
|
+
* color scheme. For example:
|
|
43
|
+
*
|
|
44
|
+
* ```jsx
|
|
45
|
+
* import React, { useContext } from 'react';
|
|
46
|
+
* import { ThemeContext } from '@dscout/particle';
|
|
47
|
+
*
|
|
48
|
+
* function Descendant() {
|
|
49
|
+
* const { colorScheme, theme } = useContext(ThemeContext)
|
|
50
|
+
*
|
|
51
|
+
* return (
|
|
52
|
+
* <p>I'm in the {theme} theme with the {colorScheme} color scheme!</p>
|
|
53
|
+
* );
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
29
57
|
export declare function ThemeProvider({ applyBackgroundColor, applyColor, as: ElementToRenderAs, children, className, colorScheme: specifiedColorScheme, theme: specifiedTheme, global, ...props }: ThemeProviderProps): React.JSX.Element;
|
|
30
58
|
export {};
|
|
@@ -55,40 +55,40 @@ exports.ThemeContext = react_1.default.createContext({
|
|
|
55
55
|
theme: 'researcher',
|
|
56
56
|
colorScheme: 'light'
|
|
57
57
|
});
|
|
58
|
-
/**
|
|
59
|
-
Use the `<ThemeProvider />` to apply a theme to Particle. Particle is
|
|
60
|
-
largely unstyled without a defined theme, so each app will need to render a
|
|
61
|
-
`<ThemeProvider />` at the top level. The top-level provider should use the
|
|
62
|
-
`global` prop to set the theme class on the body element. You'll likely
|
|
63
|
-
want to also use the `applyBackgroundColor` prop on the top-level provider to
|
|
64
|
-
apply the color scheme's base background color to the whole page.
|
|
65
|
-
|
|
66
|
-
Themes can be nested to apply a different theme or color scheme to only a
|
|
67
|
-
subsection of an interface. Do not apply the `global` prop for nested themes.
|
|
68
|
-
|
|
69
|
-
The `<ThemeProvider />` also renders a React context provider, so descendants
|
|
70
|
-
can use `ThemeContext` to customize their behavior based on the theme or
|
|
71
|
-
color scheme. For example:
|
|
72
|
-
|
|
73
|
-
```jsx
|
|
74
|
-
import React, { useContext } from 'react';
|
|
75
|
-
import { ThemeContext } from '@dscout/particle';
|
|
76
|
-
|
|
77
|
-
function Descendant() {
|
|
78
|
-
const { colorScheme, theme } = useContext(ThemeContext)
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<p>I'm in the {theme} theme with the {colorScheme} color scheme!</p>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
*/
|
|
86
58
|
function splitClassNames(string) {
|
|
87
59
|
return string
|
|
88
60
|
.trim()
|
|
89
61
|
.split(' ')
|
|
90
62
|
.filter(function (className) { return Boolean(className); });
|
|
91
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Use the `<ThemeProvider />` to apply a theme to Particle. Particle is
|
|
66
|
+
* largely unstyled without a defined theme, so each app will need to render a
|
|
67
|
+
* `<ThemeProvider />` at the top level. The top-level provider should use the
|
|
68
|
+
* `global` prop to set the theme class on the body element. You'll likely
|
|
69
|
+
* want to also use the `applyBackgroundColor` prop on the top-level provider to
|
|
70
|
+
* apply the color scheme's base background color to the whole page.
|
|
71
|
+
*
|
|
72
|
+
* Themes can be nested to apply a different theme or color scheme to only a
|
|
73
|
+
* subsection of an interface. Do not apply the `global` prop for nested themes.
|
|
74
|
+
*
|
|
75
|
+
* The `<ThemeProvider />` also renders a React context provider, so descendants
|
|
76
|
+
* can use `ThemeContext` to customize their behavior based on the theme or
|
|
77
|
+
* color scheme. For example:
|
|
78
|
+
*
|
|
79
|
+
* ```jsx
|
|
80
|
+
* import React, { useContext } from 'react';
|
|
81
|
+
* import { ThemeContext } from '@dscout/particle';
|
|
82
|
+
*
|
|
83
|
+
* function Descendant() {
|
|
84
|
+
* const { colorScheme, theme } = useContext(ThemeContext)
|
|
85
|
+
*
|
|
86
|
+
* return (
|
|
87
|
+
* <p>I'm in the {theme} theme with the {colorScheme} color scheme!</p>
|
|
88
|
+
* );
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
92
|
function ThemeProvider(_a) {
|
|
93
93
|
var _b = _a.applyBackgroundColor, applyBackgroundColor = _b === void 0 ? false : _b, _c = _a.applyColor, applyColor = _c === void 0 ? true : _c, _d = _a.as, ElementToRenderAs = _d === void 0 ? 'div' : _d, children = _a.children, className = _a.className, specifiedColorScheme = _a.colorScheme, specifiedTheme = _a.theme, _e = _a.global, global = _e === void 0 ? false : _e, props = __rest(_a, ["applyBackgroundColor", "applyColor", "as", "children", "className", "colorScheme", "theme", "global"]);
|
|
94
94
|
var _f = (0, react_1.useContext)(exports.ThemeContext), inheritedTheme = _f.theme, inheritedColorScheme = _f.colorScheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme_provider.js","sourceRoot":"","sources":["../../../src/components/theme_provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAoE;AAIpE,qEAA8C;AAkCjC,QAAA,YAAY,GAAG,eAAK,CAAC,aAAa,CAG5C;IACD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,OAAO;CACrB,CAAC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"theme_provider.js","sourceRoot":"","sources":["../../../src/components/theme_provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAoE;AAIpE,qEAA8C;AAkCjC,QAAA,YAAY,GAAG,eAAK,CAAC,aAAa,CAG5C;IACD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,OAAO;CACrB,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,MAAM;SACV,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,UAAC,SAAS,IAAK,OAAA,OAAO,CAAC,SAAS,CAAC,EAAlB,CAAkB,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,aAAa,CAAC,EAUT;IATnB,IAAA,4BAA4B,EAA5B,oBAAoB,mBAAG,KAAK,KAAA,EAC5B,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,UAA6B,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EAC7B,QAAQ,cAAA,EACR,SAAS,eAAA,EACI,oBAAoB,iBAAA,EAC1B,cAAc,WAAA,EACrB,cAAc,EAAd,MAAM,mBAAG,KAAK,KAAA,EACX,KAAK,cAToB,uGAU7B,CADS;IAEF,IAAA,KACJ,IAAA,kBAAU,EAAC,oBAAY,CAAC,EADX,cAAc,WAAA,EAAe,oBAAoB,iBACtC,CAAC;IAE3B,IAAM,KAAK,GAA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AAE,KAAK,IAAG,QAAQ,CAAyB,CACxE,CAAC;IAEF,IAAI,MAAM;QAAE,OAAO,mBAAmB,CAAC;IAEvC,OAAO,CACL,8BAAC,iBAAiB,aAChB,SAAS,EAAE,IAAA,qBAAU,EAAC,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE;YAC7D,qCAAqC,EAAE,oBAAoB;YAC3D,0BAA0B,EAAE,UAAU;SACvC,CAAC,IACE,KAAK;QAET,8BAAC,oBAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAyB,CACrD,CACrB,CAAC;AACJ,CAAC;AAxED,sCAwEC"}
|
|
@@ -2,16 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import type { Colors, CommonComponentProps, ModifierProps } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
4
|
interface ToggleProps extends CommonComponentProps, ModifierProps {
|
|
5
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
5
6
|
defaultToggled?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
getRef?: GetRef<HTMLDivElement>;
|
|
8
9
|
id?: string;
|
|
9
10
|
name?: string;
|
|
10
11
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
+
required?: boolean;
|
|
11
13
|
toggled?: boolean;
|
|
12
14
|
value?: number | string;
|
|
13
15
|
color?: Colors;
|
|
14
16
|
variant?: 'ai';
|
|
15
17
|
}
|
|
16
|
-
export declare function Toggle({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, defaultToggled, disabled, getRef, id, name, onChange, toggled, value, color, variant, ...rest }: ToggleProps): React.JSX.Element;
|
|
18
|
+
export declare function Toggle({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-required': ariaRequired, defaultToggled, disabled, getRef, id, name, onChange, required, toggled, value, color, variant, ...rest }: ToggleProps): React.JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -31,9 +31,9 @@ var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
32
|
function Toggle(_a) {
|
|
33
33
|
var _b, _c;
|
|
34
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], defaultToggled = _a.defaultToggled, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onChange = _a.onChange, toggled = _a.toggled, value = _a.value, _d = _a.color, color = _d === void 0 ? 'dscout' : _d, variant = _a.variant, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "defaultToggled", "disabled", "getRef", "id", "name", "onChange", "toggled", "value", "color", "variant"]);
|
|
34
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaRequired = _a["aria-required"], defaultToggled = _a.defaultToggled, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onChange = _a.onChange, required = _a.required, toggled = _a.toggled, value = _a.value, _d = _a.color, color = _d === void 0 ? 'dscout' : _d, variant = _a.variant, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-required', "defaultToggled", "disabled", "getRef", "id", "name", "onChange", "required", "toggled", "value", "color", "variant"]);
|
|
35
35
|
return (react_1.default.createElement("div", { className: (0, class_names_1.default)('Toggle', { 'Toggle--ai': variant === 'ai' }, (_b = {}, _b["color--ai-purple-500"] = variant === 'ai', _b), (_c = {}, _c["color--".concat(color)] = color && variant !== 'ai', _c), _modifierClass), ref: getRef },
|
|
36
|
-
react_1.default.createElement("input", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, checked: toggled, className: "Toggle__Checkbox", defaultChecked: defaultToggled, disabled: disabled, id: id, name: name, onChange: onChange, type: "checkbox", value: value })),
|
|
36
|
+
react_1.default.createElement("input", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired, checked: toggled, className: "Toggle__Checkbox", defaultChecked: defaultToggled, disabled: disabled, id: id, name: name, required: required, onChange: onChange, type: "checkbox", value: value })),
|
|
37
37
|
react_1.default.createElement("div", { className: "Toggle__Track" })));
|
|
38
38
|
}
|
|
39
39
|
exports.Toggle = Toggle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../src/components/toggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAK1B,qEAA8C;AAC9C,6EAAyD;
|
|
1
|
+
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../src/components/toggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAK1B,qEAA8C;AAC9C,6EAAyD;AAiBzD,SAAgB,MAAM,CAAC,EAkBT;;IAjBZ,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EAClB,YAAY,sBAAA,EAC7B,cAAc,oBAAA,EACd,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,KAAK,WAAA,EACL,aAAgB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAChB,OAAO,aAAA,EACJ,IAAI,cAjBc,8MAkBtB,CADQ;IAEP,OAAO,CACL,uCACE,SAAS,EAAE,IAAA,qBAAU,EACnB,QAAQ,EACR,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,EAAE,YAChC,GAAC,sBAAsB,IAAG,OAAO,KAAK,IAAI,iBAC1C,GAAC,iBAAU,KAAK,CAAE,IAAG,KAAK,IAAI,OAAO,KAAK,IAAI,OAChD,cAAc,CACf,EACD,GAAG,EAAE,MAAM;QAEX,oDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,kBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,mBAClB,YAAY,EAC3B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,kBAAkB,EAC5B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,KAAK,IACZ;QACF,uCAAK,SAAS,EAAC,eAAe,GAAG,CAC7B,CACP,CAAC;AACJ,CAAC;AAlDD,wBAkDC"}
|
|
@@ -12,8 +12,9 @@ interface AttributeInputProps extends CommonComponentProps, ModifierProps {
|
|
|
12
12
|
name?: string;
|
|
13
13
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
14
14
|
readOnly?: boolean;
|
|
15
|
+
required?: boolean;
|
|
15
16
|
tabIndex?: number;
|
|
16
17
|
value: number | string;
|
|
17
18
|
}
|
|
18
|
-
export declare function AttributeInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, defaultChecked, checked, disabled, getRef, id, label, name, value, onChange, readOnly, tabIndex, ...rest }: AttributeInputProps): React.JSX.Element;
|
|
19
|
+
export declare function AttributeInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, defaultChecked, checked, disabled, getRef, id, label, name, value, onChange, readOnly, required, tabIndex, ...rest }: AttributeInputProps): React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -25,14 +25,14 @@ import classNames from '../utils/class_names';
|
|
|
25
25
|
import getDataAttributes from '../utils/data_attributes';
|
|
26
26
|
import { useFallbackId } from './shared_hooks';
|
|
27
27
|
export function AttributeInput(_a) {
|
|
28
|
-
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], defaultChecked = _a.defaultChecked, checked = _a.checked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, label = _a.label, name = _a.name, value = _a.value, onChange = _a.onChange, readOnly = _a.readOnly, tabIndex = _a.tabIndex, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "defaultChecked", "checked", "disabled", "getRef", "id", "label", "name", "value", "onChange", "readOnly", "tabIndex"]);
|
|
28
|
+
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], defaultChecked = _a.defaultChecked, checked = _a.checked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, label = _a.label, name = _a.name, value = _a.value, onChange = _a.onChange, readOnly = _a.readOnly, required = _a.required, tabIndex = _a.tabIndex, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "defaultChecked", "checked", "disabled", "getRef", "id", "label", "name", "value", "onChange", "readOnly", "required", "tabIndex"]);
|
|
29
29
|
var attributeId = useFallbackId(id);
|
|
30
30
|
var selectorClassName = classNames('Attribute', _modifierClass);
|
|
31
31
|
var labelClassName = classNames('Attribute__Label', {
|
|
32
32
|
'Attribute__Label--read-only': readOnly
|
|
33
33
|
});
|
|
34
34
|
return (React.createElement("div", { className: selectorClassName },
|
|
35
|
-
React.createElement("input", __assign({}, getDataAttributes(rest), { id: attributeId, name: name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, ref: getRef, checked: checked, defaultChecked: defaultChecked, className: "Attribute__Input", onChange: readOnly ? undefined : onChange, type: "radio", value: value, tabIndex: tabIndex, readOnly: readOnly, disabled: disabled })),
|
|
35
|
+
React.createElement("input", __assign({}, getDataAttributes(rest), { id: attributeId, name: name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, ref: getRef, checked: checked, defaultChecked: defaultChecked, className: "Attribute__Input", onChange: readOnly ? undefined : onChange, type: "radio", value: value, tabIndex: tabIndex, readOnly: readOnly, required: required, disabled: disabled })),
|
|
36
36
|
React.createElement("label", { className: labelClassName, htmlFor: attributeId },
|
|
37
37
|
React.createElement("span", { className: "Attribute__Label__Content" }, label))));
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute_input.js","sourceRoot":"","sources":["../../../src/components/attribute_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"attribute_input.js","sourceRoot":"","sources":["../../../src/components/attribute_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAkB/C,MAAM,UAAU,cAAc,CAAC,EAmBT;IAlBpB,IAAA,cAAc,oBAAA,EACM,eAAe,yBAAA,EACnB,WAAW,qBAAA,EACb,SAAS,mBA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string;
|
|
16
16
|
onClick: (value: string) => void;
|
|
17
17
|
readOnly?: boolean;
|
|
18
|
+
required?: boolean;
|
|
18
19
|
selected?: keyof AttributesMap;
|
|
19
20
|
}
|
|
20
|
-
export declare function AttributeSelector({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, attributes, disabled, getRef, id, name, onClick, readOnly, selected, ...rest }: AttributeSelectorProps): React.JSX.Element;
|
|
21
|
+
export declare function AttributeSelector({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, attributes, disabled, getRef, id, name, onClick, readOnly, required, selected, ...rest }: AttributeSelectorProps): React.JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -25,14 +25,14 @@ import classNames from '../utils/class_names';
|
|
|
25
25
|
import getDataAttributes from '../utils/data_attributes';
|
|
26
26
|
import { AttributeInput } from './attribute_input';
|
|
27
27
|
export function AttributeSelector(_a) {
|
|
28
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], attributes = _a.attributes, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onClick = _a.onClick, readOnly = _a.readOnly, selected = _a.selected, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "attributes", "disabled", "getRef", "id", "name", "onClick", "readOnly", "selected"]);
|
|
28
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], attributes = _a.attributes, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onClick = _a.onClick, readOnly = _a.readOnly, required = _a.required, selected = _a.selected, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "attributes", "disabled", "getRef", "id", "name", "onClick", "readOnly", "required", "selected"]);
|
|
29
29
|
function handleAttributeSelected(_a) {
|
|
30
30
|
var target = _a.target;
|
|
31
31
|
if (onClick)
|
|
32
32
|
onClick(target.value);
|
|
33
33
|
}
|
|
34
34
|
function renderAttribute(attribute) {
|
|
35
|
-
return (React.createElement(AttributeInput, { checked: selected !== undefined ? attribute === selected : undefined, disabled: disabled, id: "".concat(name, "[").concat(attribute, "]"), key: attribute, label: attributes[attribute], name: name, onChange: handleAttributeSelected, readOnly: readOnly, value: attribute }));
|
|
35
|
+
return (React.createElement(AttributeInput, { checked: selected !== undefined ? attribute === selected : undefined, disabled: disabled, id: "".concat(name, "[").concat(attribute, "]"), key: attribute, label: attributes[attribute], name: name, onChange: handleAttributeSelected, readOnly: readOnly, required: required, value: attribute }));
|
|
36
36
|
}
|
|
37
37
|
return (React.createElement("div", __assign({}, getDataAttributes(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: classNames('Attribute__Selector spacing-h--0.25', _modifierClass), id: id, ref: getRef }), Object.keys(attributes).map(renderAttribute)));
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute_selector.js","sourceRoot":"","sources":["../../../src/components/attribute_selector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"attribute_selector.js","sourceRoot":"","sources":["../../../src/components/attribute_selector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MA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
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
2
|
import type { CommonComponentProps } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
4
|
interface BlitzProps extends CommonComponentProps {
|
|
@@ -6,7 +6,7 @@ interface BlitzProps extends CommonComponentProps {
|
|
|
6
6
|
closeButtonTitle?: string;
|
|
7
7
|
getRef?: GetRef<HTMLDivElement>;
|
|
8
8
|
id?: string;
|
|
9
|
-
initialFocusOn?: Element | string;
|
|
9
|
+
initialFocusOn?: RefObject<Element> | Element | string;
|
|
10
10
|
isVisible?: boolean;
|
|
11
11
|
requestClose?: () => void;
|
|
12
12
|
type?: 'alert' | 'notification' | 'coaching';
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React from 'react';
|
|
23
|
+
import React, { useId } from 'react';
|
|
24
24
|
import cx from '../utils/class_names';
|
|
25
25
|
import getDataAttributes from '../utils/data_attributes';
|
|
26
26
|
import { ButtonPlain } from './button_plain';
|
|
@@ -31,17 +31,18 @@ var CLOSE_BUTTON_NAME = 'close';
|
|
|
31
31
|
var DEFAULT_FOCUS_SELECTOR = "button[name=\"".concat(CLOSE_BUTTON_NAME, "\"]");
|
|
32
32
|
export function Blitz(_a) {
|
|
33
33
|
var ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, _b = _a.closeButtonTitle, closeButtonTitle = _b === void 0 ? 'Close' : _b, getRef = _a.getRef, id = _a.id, initialFocusOn = _a.initialFocusOn, isVisible = _a.isVisible, requestClose = _a.requestClose, _c = _a.type, type = _c === void 0 ? 'notification' : _c, rest = __rest(_a, ['aria-label', 'aria-labelledby', 'aria-describedby', "children", "closeButtonTitle", "getRef", "id", "initialFocusOn", "isVisible", "requestClose", "type"]);
|
|
34
|
+
var labelId = useId();
|
|
34
35
|
var wrapperClassName = cx('Blitz__Wrapper', {
|
|
35
36
|
'Blitz__Wrapper--show': isVisible
|
|
36
37
|
});
|
|
37
|
-
var alertClassName = cx('Blitz', 'flex', {
|
|
38
|
+
var alertClassName = cx('Blitz', 'flex', 'color--invert', {
|
|
38
39
|
'bg-color--dscout': type === 'notification',
|
|
39
40
|
'bg-color--alert': type === 'alert',
|
|
40
41
|
'bg-color--coachmark': type === 'coaching'
|
|
41
42
|
});
|
|
42
43
|
return (React.createElement("div", __assign({}, getDataAttributes(rest), { className: wrapperClassName }),
|
|
43
|
-
React.createElement(FocusTrap, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: alertClassName, fallbackFocusOn: DEFAULT_FOCUS_SELECTOR, getRef: getRef, id: id, initialFocusOn: initialFocusOn, role: "alertdialog", setInitialFocus: isVisible },
|
|
44
|
-
children,
|
|
44
|
+
React.createElement(FocusTrap, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby || labelId, "aria-describedby": ariaDescribedby, className: alertClassName, fallbackFocusOn: DEFAULT_FOCUS_SELECTOR, getRef: getRef, id: id, initialFocusOn: initialFocusOn, role: "alertdialog", setInitialFocus: isVisible },
|
|
45
|
+
React.createElement("span", { className: "flex", id: labelId }, children),
|
|
45
46
|
React.createElement(Modifier, { margin: { left: '1' } },
|
|
46
47
|
React.createElement(ButtonPlain, { "aria-label": closeButtonTitle, name: CLOSE_BUTTON_NAME, onClick: requestClose, title: closeButtonTitle },
|
|
47
48
|
React.createElement(IconX, { "aria-hidden": true }))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blitz.js","sourceRoot":"","sources":["../../../src/components/blitz.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"blitz.js","sourceRoot":"","sources":["../../../src/components/blitz.tsx"],"names":[],"mappings":";;;;;;;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BACI,SAAS,qBACJ,cAAc,IAAI,OAAO,sBACxB,eAAe,EACjC,SAAS,EAAE,cAAc,EACzB,eAAe,EAAE,sBAAsB,EACvC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,EAAE,EACN,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAC,aAAa,EAClB,eAAe,EAAE,SAAS;YAE1B,8BAAM,SAAS,EAAC,MAAM,EAAC,EAAE,EAAE,OAAO,IAC/B,QAAQ,CACJ;YACP,oBAAC,QAAQ,IAAC,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;gBAC7B,oBAAC,WAAW,kBACE,gBAAgB,EAC5B,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,gBAAgB;oBAEvB,oBAAC,KAAK,0BAAe,CACT,CACL,CACD,CACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { GetRef } from '../utils/refs';
|
|
|
3
3
|
import type { Colors, CommonComponentProps, ModifierProps } from '../types';
|
|
4
4
|
interface CheckboxInputProps extends CommonComponentProps, ModifierProps {
|
|
5
5
|
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
6
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
6
7
|
checked?: boolean;
|
|
7
8
|
color?: Colors;
|
|
8
9
|
defaultChecked?: boolean;
|
|
@@ -14,8 +15,9 @@ interface CheckboxInputProps extends CommonComponentProps, ModifierProps {
|
|
|
14
15
|
name?: string;
|
|
15
16
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
16
17
|
readOnly?: boolean;
|
|
18
|
+
required?: boolean;
|
|
17
19
|
tabIndex?: number;
|
|
18
20
|
value?: number | string;
|
|
19
21
|
}
|
|
20
|
-
export declare function CheckboxInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, checked, color, defaultChecked, disabled, getRef, id, indeterminate, label, name, onChange, readOnly, tabIndex, value, ...rest }: CheckboxInputProps): React.JSX.Element;
|
|
22
|
+
export declare function CheckboxInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-required': ariaRequired, checked, color, defaultChecked, disabled, getRef, id, indeterminate, label, name, onChange, readOnly, required, tabIndex, value, ...rest }: CheckboxInputProps): React.JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -34,13 +34,13 @@ function renderIcon(checked, indeterminate, readOnly) {
|
|
|
34
34
|
return React.createElement(IconCheckboxCheck, { "aria-hidden": true });
|
|
35
35
|
}
|
|
36
36
|
export function CheckboxInput(_a) {
|
|
37
|
-
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, indeterminate = _a.indeterminate, label = _a.label, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "indeterminate", "label", "name", "onChange", "readOnly", "tabIndex", "value"]);
|
|
37
|
+
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaRequired = _a["aria-required"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, indeterminate = _a.indeterminate, label = _a.label, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, required = _a.required, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', 'aria-required', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "indeterminate", "label", "name", "onChange", "readOnly", "required", "tabIndex", "value"]);
|
|
38
38
|
var checkboxId = useFallbackId(id);
|
|
39
39
|
var className = classNames('Selector', _modifierClass, {
|
|
40
40
|
'Selector--with-label': label
|
|
41
41
|
});
|
|
42
42
|
return (React.createElement("div", { className: className },
|
|
43
|
-
React.createElement("input", __assign({}, getDataAttributes(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked: checked, className: "Selector__Checkbox", defaultChecked: defaultChecked, disabled: disabled || readOnly, id: checkboxId, name: name, onChange: onChange, readOnly: readOnly, ref: function (ref) {
|
|
43
|
+
React.createElement("input", __assign({}, getDataAttributes(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-required": ariaRequired, checked: checked, className: "Selector__Checkbox", defaultChecked: defaultChecked, disabled: disabled || readOnly, id: checkboxId, name: name, onChange: onChange, readOnly: readOnly, required: required, ref: function (ref) {
|
|
44
44
|
if (ref)
|
|
45
45
|
ref.indeterminate = indeterminate;
|
|
46
46
|
handleGetRef(getRef, ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox_input.js","sourceRoot":"","sources":["../../../src/components/checkbox_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OA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entProps, ModifierProps } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
4
|
interface DragAndDropProps extends CommonComponentProps, ModifierProps {
|
|
5
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
5
6
|
accept?: string;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -15,9 +16,10 @@ interface DragAndDropProps extends CommonComponentProps, ModifierProps {
|
|
|
15
16
|
onDragLeave?: React.DragEventHandler<HTMLInputElement>;
|
|
16
17
|
onDragOver?: React.DragEventHandler<HTMLInputElement>;
|
|
17
18
|
onDrop?: React.DragEventHandler<HTMLInputElement>;
|
|
19
|
+
required?: boolean;
|
|
18
20
|
success?: boolean;
|
|
19
21
|
tabIndex?: number;
|
|
20
22
|
value?: string;
|
|
21
23
|
}
|
|
22
|
-
export declare function DragAndDrop({ _modifierClass, accept, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, error, children, disabled, getRef, id, multiple, name, onChange, onDrop, onDragEnter, onDragOver, onDragLeave, success, tabIndex, value, ...rest }: DragAndDropProps): React.JSX.Element;
|
|
24
|
+
export declare function DragAndDrop({ _modifierClass, accept, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-required': ariaRequired, error, children, disabled, getRef, id, multiple, name, onChange, onDrop, onDragEnter, onDragOver, onDragLeave, required, success, tabIndex, value, ...rest }: DragAndDropProps): React.JSX.Element;
|
|
23
25
|
export {};
|
|
@@ -24,7 +24,7 @@ import React, { useState } from 'react';
|
|
|
24
24
|
import classNames from '../utils/class_names';
|
|
25
25
|
import getDataAttributes from '../utils/data_attributes';
|
|
26
26
|
export function DragAndDrop(_a) {
|
|
27
|
-
var _modifierClass = _a._modifierClass, accept = _a.accept, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], error = _a.error, children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, multiple = _a.multiple, name = _a.name, onChange = _a.onChange, onDrop = _a.onDrop, onDragEnter = _a.onDragEnter, onDragOver = _a.onDragOver, onDragLeave = _a.onDragLeave, success = _a.success, tabIndex = _a.tabIndex, _b = _a.value, value = _b === void 0 ? '' : _b, rest = __rest(_a, ["_modifierClass", "accept", 'aria-label', 'aria-labelledby', 'aria-describedby', "error", "children", "disabled", "getRef", "id", "multiple", "name", "onChange", "onDrop", "onDragEnter", "onDragOver", "onDragLeave", "success", "tabIndex", "value"]);
|
|
27
|
+
var _modifierClass = _a._modifierClass, accept = _a.accept, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaRequired = _a["aria-required"], error = _a.error, children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, multiple = _a.multiple, name = _a.name, onChange = _a.onChange, onDrop = _a.onDrop, onDragEnter = _a.onDragEnter, onDragOver = _a.onDragOver, onDragLeave = _a.onDragLeave, required = _a.required, success = _a.success, tabIndex = _a.tabIndex, _b = _a.value, value = _b === void 0 ? '' : _b, rest = __rest(_a, ["_modifierClass", "accept", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-required', "error", "children", "disabled", "getRef", "id", "multiple", "name", "onChange", "onDrop", "onDragEnter", "onDragOver", "onDragLeave", "required", "success", "tabIndex", "value"]);
|
|
28
28
|
var _c = useState(false), draggedOver = _c[0], setDraggedOver = _c[1];
|
|
29
29
|
var className = classNames('Drag-and-Drop', _modifierClass, {
|
|
30
30
|
'Drag-and-Drop--dragged-over': draggedOver,
|
|
@@ -46,7 +46,7 @@ export function DragAndDrop(_a) {
|
|
|
46
46
|
onDragLeave(event);
|
|
47
47
|
}
|
|
48
48
|
return (React.createElement("div", { className: className, onDragOver: disabled ? undefined : onDragOver, onDragEnter: disabled ? undefined : handleEnter, onDragLeave: disabled ? undefined : handleLeave, onDrop: disabled ? undefined : onDrop },
|
|
49
|
-
React.createElement("input", __assign({}, getDataAttributes(rest), { accept: accept, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: fileInputClassName, disabled: disabled, id: id, multiple: multiple, name: name, onChange: onChange, ref: getRef, tabIndex: tabIndex, type: "file", value: value })),
|
|
49
|
+
React.createElement("input", __assign({}, getDataAttributes(rest), { accept: accept, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired, className: fileInputClassName, disabled: disabled, id: id, multiple: multiple, name: name, onChange: onChange, ref: getRef, required: required, tabIndex: tabIndex, type: "file", value: value })),
|
|
50
50
|
children));
|
|
51
51
|
}
|
|
52
52
|
//# sourceMappingURL=drag_and_drop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag_and_drop.js","sourceRoot":"","sources":["../../../src/components/drag_and_drop.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"drag_and_drop.js","sourceRoot":"","sources":["../../../src/components/drag_and_drop.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAuBzD,MAAM,UAAU,WAAW,CAAC,EAwBT;IAvBjB,IAAA,cAAc,oBAAA,EACd,MAAM,YAAA,EACQ,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EAClB,YAAY,sBAAA,EAC7B,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,MAAM,YAA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AAC,CAAC,CAAC,MAAM;QAErC,0CACM,iBAAiB,CAAC,IAAI,CAAC,IAC3B,MAAM,EAAE,MAAM,gBACF,SAAS,qBACJ,cAAc,sBACb,eAAe,mBAClB,YAAY,EAC3B,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,IACZ;QACD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,15 +4,17 @@ import type { GetRef } from '../utils/refs';
|
|
|
4
4
|
interface FileInputProps extends CommonComponentProps, ModifierProps {
|
|
5
5
|
accept?: string;
|
|
6
6
|
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
7
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
7
8
|
filename?: string;
|
|
8
9
|
getRef?: GetRef<HTMLInputElement>;
|
|
9
10
|
id?: string;
|
|
10
11
|
label?: string;
|
|
11
12
|
multiple?: boolean;
|
|
12
13
|
name?: string;
|
|
14
|
+
required?: boolean;
|
|
13
15
|
value?: string;
|
|
14
16
|
tabIndex?: number;
|
|
15
17
|
onChange?: React.ChangeEventHandler;
|
|
16
18
|
}
|
|
17
|
-
export declare function FileInput({ _modifierClass, accept, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, filename, getRef, id, label, multiple, name, value, tabIndex, onChange, ...rest }: FileInputProps): React.JSX.Element;
|
|
19
|
+
export declare function FileInput({ _modifierClass, accept, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-required': ariaRequired, filename, getRef, id, label, multiple, name, required, value, tabIndex, onChange, ...rest }: FileInputProps): React.JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -24,10 +24,10 @@ import React from 'react';
|
|
|
24
24
|
import getDataAttributes from '../utils/data_attributes';
|
|
25
25
|
import { useFallbackId } from './shared_hooks';
|
|
26
26
|
export function FileInput(_a) {
|
|
27
|
-
var _modifierClass = _a._modifierClass, accept = _a.accept, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], filename = _a.filename, getRef = _a.getRef, id = _a.id, label = _a.label, multiple = _a.multiple, name = _a.name, _b = _a.value, value = _b === void 0 ? '' : _b, tabIndex = _a.tabIndex, onChange = _a.onChange, rest = __rest(_a, ["_modifierClass", "accept", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "filename", "getRef", "id", "label", "multiple", "name", "value", "tabIndex", "onChange"]);
|
|
27
|
+
var _modifierClass = _a._modifierClass, accept = _a.accept, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaRequired = _a["aria-required"], filename = _a.filename, getRef = _a.getRef, id = _a.id, label = _a.label, multiple = _a.multiple, name = _a.name, required = _a.required, _b = _a.value, value = _b === void 0 ? '' : _b, tabIndex = _a.tabIndex, onChange = _a.onChange, rest = __rest(_a, ["_modifierClass", "accept", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', 'aria-required', "filename", "getRef", "id", "label", "multiple", "name", "required", "value", "tabIndex", "onChange"]);
|
|
28
28
|
var inputId = useFallbackId(id);
|
|
29
29
|
return (React.createElement("div", { className: _modifierClass },
|
|
30
|
-
React.createElement("input", __assign({}, getDataAttributes(rest), { accept: accept, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ref: getRef, id: inputId, className: "File-Input", multiple: multiple, name: name, value: value, onChange: onChange, tabIndex: tabIndex, type: "file" })),
|
|
30
|
+
React.createElement("input", __assign({}, getDataAttributes(rest), { accept: accept, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-required": ariaRequired, ref: getRef, id: inputId, className: "File-Input", multiple: multiple, name: name, required: required, value: value, onChange: onChange, tabIndex: tabIndex, type: "file" })),
|
|
31
31
|
React.createElement("label", { htmlFor: inputId, className: "File-Input__Label Button Button--small Button--color-dscout" }, label),
|
|
32
32
|
!!filename && (React.createElement("span", { className: "color--gray-2 margin-l--0.75" }, filename))));
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file_input.js","sourceRoot":"","sources":["../../../src/components/file_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"file_input.js","sourceRoot":"","sources":["../../../src/components/file_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAkB/C,MAAM,UAAU,SAAS,CAAC,EAmBT;IAlBf,IAAA,cAAc,oBAAA,EACd,MAAM,YAAA,EACc,eAAe,yBAAA,EACnB,WAAW,qBAAA,EACb,SAAS,mBAAA,EACJ,cAAc,wBAAA,EAChB,YAAY,sBAAA,EAC7B,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,QAAQ,cAAA,EACR,QAAQ,cAAA,EACL,IAAI,cAlBiB,wNAmBzB,CADQ;IAEP,IAAM,OAAO,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,CACL,6BAAK,SAAS,EAAE,cAAc;QAC5B,0CACM,iBAAiB,CAAC,IAAI,CAAC,IAC3B,MAAM,EAAE,MAAM,sBACI,eAAe,kBACnB,WAAW,gBACb,SAAS,qBACJ,cAAc,mBAChB,YAAY,EAC3B,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,OAAO,EACX,SAAS,EAAC,YAAY,EACtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,MAAM,IACX;QACF,+BACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,6DAA6D,IAEtE,KAAK,CACA;QACP,CAAC,CAAC,QAAQ,IAAI,CACb,8BAAM,SAAS,EAAC,8BAA8B,IAAE,QAAQ,CAAQ,CACjE,CACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@ interface FocusTrapProps extends CommonComponentProps {
|
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
fallbackFocusOn?: RefObject<Element> | Element | string;
|
|
9
9
|
getRef?: GetRef<HTMLDivElement | HTMLSpanElement>;
|
|
10
|
-
initialFocusOn?: Element | string;
|
|
10
|
+
initialFocusOn?: RefObject<Element> | Element | string;
|
|
11
11
|
refProp?: string;
|
|
12
12
|
setInitialFocus?: boolean;
|
|
13
13
|
[key: string]: unknown;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
2
|
import type { CommonComponentProps, Spacing } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
4
|
interface ModalProps extends CommonComponentProps {
|
|
5
5
|
animationDuration?: number;
|
|
6
6
|
backdropColor?: 'coachmark' | 'default' | 'dscout' | 'main' | 'success';
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
initialFocusOn?: Element | string;
|
|
8
|
+
initialFocusOn?: RefObject<Element> | Element | string;
|
|
9
9
|
getRef?: GetRef;
|
|
10
10
|
id?: string;
|
|
11
11
|
isOpen?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/modal.tsx"],"names":[],"mappings":"AAAA,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;AAE5D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/modal.tsx"],"names":[],"mappings":"AAAA,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;AAE5D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAG3E,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAkBzD,IAAM,gCAAgC,GAAG,GAAG,CAAC,CAAC,2BAA2B;AAEzE,MAAM,UAAU,KAAK,CAAC,EAkBT;;IAjBX,IAAc,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,yBAAoD,EAApD,iBAAiB,mBAAG,gCAAgC,KAAA,EACpD,aAAa,mBAAA,EACb,MAAM,YAAA,EACN,EAAE,QAAA,EACF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IACb,iBAAiB,CAAC,IAAI,CAAC;QAE3B,oBAAC,SAAS,kBACI,SAAS,qBACJ,cAAc,sBACb,eAAe,sBAKjC,SAAS,EAAE,cAAc,EACzB,eAAe,EAAE,YAAY,EAC7B,EAAE,EAAE,EAAE,EACN,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,UAAC,GAAG;gBACV,IAAI,GAAG;oBAAE,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;gBACpC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC5B,CAAC,EACD,IAAI,EAAC,QAAQ,EACb,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,EAAE,QAAQ,UAAA,EAAE,KAAK,OAAA,EAAE,EAC1B,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAEhC,CAAC,MAAM,IAAI,kBAAkB,IAAI,OAAO,CAAC,IAAI,QAAQ,CAC5C,CACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -13,8 +13,9 @@ interface RadioInputProps extends CommonComponentProps, ModifierProps {
|
|
|
13
13
|
name?: string;
|
|
14
14
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
15
15
|
readOnly?: boolean;
|
|
16
|
+
required?: boolean;
|
|
16
17
|
tabIndex?: number;
|
|
17
18
|
value?: number | string;
|
|
18
19
|
}
|
|
19
|
-
export declare function RadioInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, checked, color, defaultChecked, disabled, getRef, id, label, name, onChange, readOnly, tabIndex, value, ...rest }: RadioInputProps): React.JSX.Element;
|
|
20
|
+
export declare function RadioInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, checked, color, defaultChecked, disabled, getRef, id, label, name, onChange, readOnly, required, tabIndex, value, ...rest }: RadioInputProps): React.JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -27,13 +27,13 @@ import getDataAttributes from '../utils/data_attributes';
|
|
|
27
27
|
import { useFallbackId } from './shared_hooks';
|
|
28
28
|
import { IconRadioCircle } from '../icons/radio_circle';
|
|
29
29
|
export function RadioInput(_a) {
|
|
30
|
-
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, label = _a.label, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "label", "name", "onChange", "readOnly", "tabIndex", "value"]);
|
|
30
|
+
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, label = _a.label, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, required = _a.required, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "label", "name", "onChange", "readOnly", "required", "tabIndex", "value"]);
|
|
31
31
|
var radioId = useFallbackId(id);
|
|
32
32
|
var className = classNames('Selector', _modifierClass, {
|
|
33
33
|
'Selector--with-label': label
|
|
34
34
|
});
|
|
35
35
|
return (React.createElement("div", { className: className },
|
|
36
|
-
React.createElement("input", __assign({}, getDataAttributes(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked: checked, className: "Selector__Radio", defaultChecked: defaultChecked, disabled: disabled, id: radioId, name: name, onChange: onChange, readOnly: readOnly, ref: getRef, tabIndex: tabIndex, type: "radio", value: inputValue(value, onChange) })),
|
|
36
|
+
React.createElement("input", __assign({}, getDataAttributes(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked: checked, className: "Selector__Radio", defaultChecked: defaultChecked, disabled: disabled, id: radioId, name: name, onChange: onChange, readOnly: readOnly, required: required, ref: getRef, tabIndex: tabIndex, type: "radio", value: inputValue(value, onChange) })),
|
|
37
37
|
React.createElement("div", { className: classNames('Selector__Field', "color--".concat(color)) }),
|
|
38
38
|
label && (React.createElement("label", { className: "Selector__Label", htmlFor: radioId }, label)),
|
|
39
39
|
React.createElement(IconRadioCircle, { "aria-hidden": true })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio_input.js","sourceRoot":"","sources":["../../../src/components/radio_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"radio_input.js","sourceRoot":"","sources":["../../../src/components/radio_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,UAAU,MAAM,sBAAsB,CAAC;AA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