@zendeskgarden/react-forms 8.47.2 → 8.48.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/index.cjs.js +117 -99
- package/dist/index.esm.js +116 -98
- package/dist/typings/elements/MultiThumbRange.d.ts +1 -1
- package/dist/typings/elements/common/Field.d.ts +4 -1
- package/dist/typings/elements/common/Fieldset.d.ts +4 -6
- package/dist/typings/elements/{FauxInput.d.ts → faux-input/FauxInput.d.ts} +14 -13
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +24 -0
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +24 -0
- package/dist/typings/elements/file-list/FileList.d.ts +4 -6
- package/dist/typings/elements/file-list/components/File.d.ts +5 -7
- package/dist/typings/elements/tiles/Tiles.d.ts +7 -9
- package/dist/typings/elements/tiles/components/Description.d.ts +1 -1
- package/dist/typings/elements/tiles/components/Icon.d.ts +1 -1
- package/dist/typings/elements/tiles/components/Label.d.ts +1 -1
- package/dist/typings/elements/tiles/components/Tile.d.ts +4 -5
- package/dist/typings/index.d.ts +5 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import React__default, { createContext, useContext, Children, useState, useRef, useMemo, forwardRef, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
import { useField } from '@zendeskgarden/container-field';
|
|
12
11
|
import styled, { css, ThemeContext } from 'styled-components';
|
|
13
12
|
import { retrieveComponentStyles, DEFAULT_THEME, getLineHeight, getColor, useDocument } from '@zendeskgarden/react-theming';
|
|
14
13
|
import { hideVisually, math, rgba, em } from 'polished';
|
|
14
|
+
import PropTypes from 'prop-types';
|
|
15
15
|
import { composeEventHandlers, KEY_CODES, getControlledValue } from '@zendeskgarden/container-utilities';
|
|
16
16
|
import mergeRefs from 'react-merge-refs';
|
|
17
17
|
import debounce from 'lodash.debounce';
|
|
@@ -195,7 +195,7 @@ var useFieldContext = function useFieldContext() {
|
|
|
195
195
|
var COMPONENT_ID$K = 'forms.field';
|
|
196
196
|
var StyledField = styled.div.attrs({
|
|
197
197
|
'data-garden-id': COMPONENT_ID$K,
|
|
198
|
-
'data-garden-version': '8.
|
|
198
|
+
'data-garden-version': '8.48.0'
|
|
199
199
|
}).withConfig({
|
|
200
200
|
displayName: "StyledField",
|
|
201
201
|
componentId: "sc-12gzfsu-0"
|
|
@@ -212,7 +212,7 @@ var COMPONENT_ID$J = 'forms.fieldset';
|
|
|
212
212
|
var StyledFieldset = styled(StyledField).attrs({
|
|
213
213
|
as: 'fieldset',
|
|
214
214
|
'data-garden-id': COMPONENT_ID$J,
|
|
215
|
-
'data-garden-version': '8.
|
|
215
|
+
'data-garden-version': '8.48.0'
|
|
216
216
|
}).withConfig({
|
|
217
217
|
displayName: "StyledFieldset",
|
|
218
218
|
componentId: "sc-1vr4mxv-0"
|
|
@@ -228,7 +228,7 @@ StyledFieldset.defaultProps = {
|
|
|
228
228
|
var COMPONENT_ID$I = 'forms.input_label';
|
|
229
229
|
var StyledLabel = styled.label.attrs({
|
|
230
230
|
'data-garden-id': COMPONENT_ID$I,
|
|
231
|
-
'data-garden-version': '8.
|
|
231
|
+
'data-garden-version': '8.48.0'
|
|
232
232
|
}).withConfig({
|
|
233
233
|
displayName: "StyledLabel",
|
|
234
234
|
componentId: "sc-2utmsz-0"
|
|
@@ -263,7 +263,7 @@ var COMPONENT_ID$H = 'forms.fieldset_legend';
|
|
|
263
263
|
var StyledLegend = styled(StyledLabel).attrs({
|
|
264
264
|
as: 'legend',
|
|
265
265
|
'data-garden-id': COMPONENT_ID$H,
|
|
266
|
-
'data-garden-version': '8.
|
|
266
|
+
'data-garden-version': '8.48.0'
|
|
267
267
|
}).withConfig({
|
|
268
268
|
displayName: "StyledLegend",
|
|
269
269
|
componentId: "sc-6s0zwq-0"
|
|
@@ -277,7 +277,7 @@ StyledLegend.defaultProps = {
|
|
|
277
277
|
var COMPONENT_ID$G = 'forms.input_hint';
|
|
278
278
|
var StyledHint = styled.div.attrs({
|
|
279
279
|
'data-garden-id': COMPONENT_ID$G,
|
|
280
|
-
'data-garden-version': '8.
|
|
280
|
+
'data-garden-version': '8.48.0'
|
|
281
281
|
}).withConfig({
|
|
282
282
|
displayName: "StyledHint",
|
|
283
283
|
componentId: "sc-17c2wu8-0"
|
|
@@ -397,7 +397,7 @@ var MessageIcon = function MessageIcon(_ref) {
|
|
|
397
397
|
var COMPONENT_ID$F = 'forms.input_message_icon';
|
|
398
398
|
var StyledMessageIcon = styled(MessageIcon).attrs({
|
|
399
399
|
'data-garden-id': COMPONENT_ID$F,
|
|
400
|
-
'data-garden-version': '8.
|
|
400
|
+
'data-garden-version': '8.48.0'
|
|
401
401
|
}).withConfig({
|
|
402
402
|
displayName: "StyledMessageIcon",
|
|
403
403
|
componentId: "sc-1ph2gba-0"
|
|
@@ -430,7 +430,7 @@ var validationStyles = function validationStyles(props) {
|
|
|
430
430
|
var COMPONENT_ID$E = 'forms.input_message';
|
|
431
431
|
var StyledMessage = styled.div.attrs({
|
|
432
432
|
'data-garden-id': COMPONENT_ID$E,
|
|
433
|
-
'data-garden-version': '8.
|
|
433
|
+
'data-garden-version': '8.48.0'
|
|
434
434
|
}).withConfig({
|
|
435
435
|
displayName: "StyledMessage",
|
|
436
436
|
componentId: "sc-30hgg7-0"
|
|
@@ -522,7 +522,7 @@ var sizeStyles$f = function sizeStyles(props) {
|
|
|
522
522
|
var StyledTextInput = styled.input.attrs(function (props) {
|
|
523
523
|
return {
|
|
524
524
|
'data-garden-id': COMPONENT_ID$D,
|
|
525
|
-
'data-garden-version': '8.
|
|
525
|
+
'data-garden-version': '8.48.0',
|
|
526
526
|
'aria-invalid': isInvalid(props.validation)
|
|
527
527
|
};
|
|
528
528
|
}).withConfig({
|
|
@@ -558,7 +558,7 @@ var hiddenStyles = "\n visibility: hidden;\n position: absolute;\n overflow:
|
|
|
558
558
|
var StyledTextarea = styled(StyledTextInput).attrs({
|
|
559
559
|
as: 'textarea',
|
|
560
560
|
'data-garden-id': COMPONENT_ID$C,
|
|
561
|
-
'data-garden-version': '8.
|
|
561
|
+
'data-garden-version': '8.48.0'
|
|
562
562
|
}).withConfig({
|
|
563
563
|
displayName: "StyledTextarea",
|
|
564
564
|
componentId: "sc-wxschl-0"
|
|
@@ -609,7 +609,7 @@ function (_ref) {
|
|
|
609
609
|
return React__default.cloneElement(Children.only(children), props);
|
|
610
610
|
}).attrs({
|
|
611
611
|
'data-garden-id': COMPONENT_ID$B,
|
|
612
|
-
'data-garden-version': '8.
|
|
612
|
+
'data-garden-version': '8.48.0'
|
|
613
613
|
}).withConfig({
|
|
614
614
|
displayName: "StyledTextMediaFigure",
|
|
615
615
|
componentId: "sc-1qepknj-0"
|
|
@@ -633,7 +633,7 @@ var StyledTextFauxInput = styled(StyledTextInput).attrs(function (props) {
|
|
|
633
633
|
'aria-readonly': props.isReadOnly,
|
|
634
634
|
'aria-disabled': props.isDisabled,
|
|
635
635
|
'data-garden-id': COMPONENT_ID$A,
|
|
636
|
-
'data-garden-version': '8.
|
|
636
|
+
'data-garden-version': '8.48.0'
|
|
637
637
|
};
|
|
638
638
|
}).withConfig({
|
|
639
639
|
displayName: "StyledTextFauxInput",
|
|
@@ -658,7 +658,7 @@ StyledTextFauxInput.defaultProps = {
|
|
|
658
658
|
var COMPONENT_ID$z = 'forms.media_input';
|
|
659
659
|
var StyledTextMediaInput = styled(StyledTextInput).attrs({
|
|
660
660
|
'data-garden-id': COMPONENT_ID$z,
|
|
661
|
-
'data-garden-version': '8.
|
|
661
|
+
'data-garden-version': '8.48.0',
|
|
662
662
|
isBare: true
|
|
663
663
|
}).withConfig({
|
|
664
664
|
displayName: "StyledTextMediaInput",
|
|
@@ -683,7 +683,7 @@ var itemStyles = function itemStyles(props) {
|
|
|
683
683
|
};
|
|
684
684
|
var StyledInputGroup = styled.div.attrs({
|
|
685
685
|
'data-garden-id': COMPONENT_ID$y,
|
|
686
|
-
'data-garden-version': '8.
|
|
686
|
+
'data-garden-version': '8.48.0'
|
|
687
687
|
}).withConfig({
|
|
688
688
|
displayName: "StyledInputGroup",
|
|
689
689
|
componentId: "sc-kjh1f0-0"
|
|
@@ -707,7 +707,7 @@ var sizeStyles$d = function sizeStyles(props) {
|
|
|
707
707
|
};
|
|
708
708
|
var StyledRadioLabel = styled(StyledLabel).attrs({
|
|
709
709
|
'data-garden-id': COMPONENT_ID$x,
|
|
710
|
-
'data-garden-version': '8.
|
|
710
|
+
'data-garden-version': '8.48.0',
|
|
711
711
|
isRadio: true
|
|
712
712
|
}).withConfig({
|
|
713
713
|
displayName: "StyledRadioLabel",
|
|
@@ -724,7 +724,7 @@ StyledRadioLabel.defaultProps = {
|
|
|
724
724
|
var COMPONENT_ID$w = 'forms.checkbox_label';
|
|
725
725
|
var StyledCheckLabel = styled(StyledRadioLabel).attrs({
|
|
726
726
|
'data-garden-id': COMPONENT_ID$w,
|
|
727
|
-
'data-garden-version': '8.
|
|
727
|
+
'data-garden-version': '8.48.0'
|
|
728
728
|
}).withConfig({
|
|
729
729
|
displayName: "StyledCheckLabel",
|
|
730
730
|
componentId: "sc-x7nr1-0"
|
|
@@ -738,7 +738,7 @@ StyledCheckLabel.defaultProps = {
|
|
|
738
738
|
var COMPONENT_ID$v = 'forms.radio_hint';
|
|
739
739
|
var StyledRadioHint = styled(StyledHint).attrs({
|
|
740
740
|
'data-garden-id': COMPONENT_ID$v,
|
|
741
|
-
'data-garden-version': '8.
|
|
741
|
+
'data-garden-version': '8.48.0'
|
|
742
742
|
}).withConfig({
|
|
743
743
|
displayName: "StyledRadioHint",
|
|
744
744
|
componentId: "sc-eo8twg-0"
|
|
@@ -756,7 +756,7 @@ StyledRadioHint.defaultProps = {
|
|
|
756
756
|
var COMPONENT_ID$u = 'forms.checkbox_hint';
|
|
757
757
|
var StyledCheckHint = styled(StyledRadioHint).attrs({
|
|
758
758
|
'data-garden-id': COMPONENT_ID$u,
|
|
759
|
-
'data-garden-version': '8.
|
|
759
|
+
'data-garden-version': '8.48.0'
|
|
760
760
|
}).withConfig({
|
|
761
761
|
displayName: "StyledCheckHint",
|
|
762
762
|
componentId: "sc-1kl8e8c-0"
|
|
@@ -796,16 +796,16 @@ var sizeStyles$c = function sizeStyles(props) {
|
|
|
796
796
|
var iconPosition = math("(".concat(size, " - ").concat(iconSize, ") / 2"));
|
|
797
797
|
var iconTop = math("".concat(iconPosition, " + ").concat(top));
|
|
798
798
|
var marginTop = "".concat(props.theme.space.base * (props.isCompact ? 1 : 2), "px");
|
|
799
|
-
return css(["
|
|
799
|
+
return css(["top:", ";width:", ";height:", ";& ~ ", "::before{top:", ";background-size:", ";width:", ";height:", ";box-sizing:border-box;}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&& ~ ", " ~ ", "{margin-top:", ";}"], top, size, size, StyledRadioLabel, top, props.theme.iconSizes.sm, size, size, StyledRadioLabel, iconTop, props.theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledRadioLabel, StyledMessage, marginTop);
|
|
800
800
|
};
|
|
801
801
|
var StyledRadioInput = styled.input.attrs({
|
|
802
802
|
'data-garden-id': COMPONENT_ID$t,
|
|
803
|
-
'data-garden-version': '8.
|
|
803
|
+
'data-garden-version': '8.48.0',
|
|
804
804
|
type: 'radio'
|
|
805
805
|
}).withConfig({
|
|
806
806
|
displayName: "StyledRadioInput",
|
|
807
807
|
componentId: "sc-qsavpv-0"
|
|
808
|
-
})(["position:absolute;
|
|
808
|
+
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border:", ";border-radius:50%;background-repeat:no-repeat;background-position:center;content:'';}& ~ ", " > svg{position:absolute;}", ";&:focus ~ ", "::before{outline:none;}& ~ ", ":active::before{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,color 0.1s ease-in-out;}", ";&:disabled ~ ", "{cursor:default;}", ";"], StyledRadioLabel, function (props) {
|
|
809
809
|
return props.theme.rtl ? 'right' : 'left';
|
|
810
810
|
}, function (props) {
|
|
811
811
|
return props.theme.borders.sm;
|
|
@@ -832,7 +832,7 @@ var colorStyles$8 = function colorStyles(props) {
|
|
|
832
832
|
};
|
|
833
833
|
var StyledCheckInput = styled(StyledRadioInput).attrs({
|
|
834
834
|
'data-garden-id': COMPONENT_ID$s,
|
|
835
|
-
'data-garden-version': '8.
|
|
835
|
+
'data-garden-version': '8.48.0',
|
|
836
836
|
type: 'checkbox'
|
|
837
837
|
}).withConfig({
|
|
838
838
|
displayName: "StyledCheckInput",
|
|
@@ -851,7 +851,7 @@ StyledCheckInput.defaultProps = {
|
|
|
851
851
|
var COMPONENT_ID$r = 'forms.radio_message';
|
|
852
852
|
var StyledRadioMessage = styled(StyledMessage).attrs({
|
|
853
853
|
'data-garden-id': COMPONENT_ID$r,
|
|
854
|
-
'data-garden-version': '8.
|
|
854
|
+
'data-garden-version': '8.48.0'
|
|
855
855
|
}).withConfig({
|
|
856
856
|
displayName: "StyledRadioMessage",
|
|
857
857
|
componentId: "sc-1pmi0q8-0"
|
|
@@ -869,7 +869,7 @@ StyledRadioMessage.defaultProps = {
|
|
|
869
869
|
var COMPONENT_ID$q = 'forms.checkbox_message';
|
|
870
870
|
var StyledCheckMessage = styled(StyledRadioMessage).attrs({
|
|
871
871
|
'data-garden-id': COMPONENT_ID$q,
|
|
872
|
-
'data-garden-version': '8.
|
|
872
|
+
'data-garden-version': '8.48.0'
|
|
873
873
|
}).withConfig({
|
|
874
874
|
displayName: "StyledCheckMessage",
|
|
875
875
|
componentId: "sc-s4p6kd-0"
|
|
@@ -905,7 +905,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
905
905
|
var COMPONENT_ID$p = 'forms.check_svg';
|
|
906
906
|
var StyledCheckSvg = styled(SvgCheckSmFill).attrs({
|
|
907
907
|
'data-garden-id': COMPONENT_ID$p,
|
|
908
|
-
'data-garden-version': '8.
|
|
908
|
+
'data-garden-version': '8.48.0'
|
|
909
909
|
}).withConfig({
|
|
910
910
|
displayName: "StyledCheckSvg",
|
|
911
911
|
componentId: "sc-fvxetk-0"
|
|
@@ -939,7 +939,7 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
939
939
|
var COMPONENT_ID$o = 'forms.dash_svg';
|
|
940
940
|
var StyledDashSvg = styled(SvgDashFill).attrs({
|
|
941
941
|
'data-garden-id': COMPONENT_ID$o,
|
|
942
|
-
'data-garden-version': '8.
|
|
942
|
+
'data-garden-version': '8.48.0'
|
|
943
943
|
}).withConfig({
|
|
944
944
|
displayName: "StyledDashSvg",
|
|
945
945
|
componentId: "sc-z3vq71-0"
|
|
@@ -970,7 +970,7 @@ var sizeStyles$b = function sizeStyles(props) {
|
|
|
970
970
|
};
|
|
971
971
|
var StyledFileUpload = styled.div.attrs({
|
|
972
972
|
'data-garden-id': COMPONENT_ID$n,
|
|
973
|
-
'data-garden-version': '8.
|
|
973
|
+
'data-garden-version': '8.48.0'
|
|
974
974
|
}).withConfig({
|
|
975
975
|
displayName: "StyledFileUpload",
|
|
976
976
|
componentId: "sc-1rodjgn-0"
|
|
@@ -990,7 +990,7 @@ StyledFileUpload.defaultProps = {
|
|
|
990
990
|
var COMPONENT_ID$m = 'forms.file.close';
|
|
991
991
|
var StyledFileClose = styled.div.attrs({
|
|
992
992
|
'data-garden-id': COMPONENT_ID$m,
|
|
993
|
-
'data-garden-version': '8.
|
|
993
|
+
'data-garden-version': '8.48.0'
|
|
994
994
|
}).withConfig({
|
|
995
995
|
displayName: "StyledFileClose",
|
|
996
996
|
componentId: "sc-1m31jbf-0"
|
|
@@ -1033,7 +1033,7 @@ var sizeStyles$a = function sizeStyles(props) {
|
|
|
1033
1033
|
};
|
|
1034
1034
|
var StyledFile = styled.div.attrs({
|
|
1035
1035
|
'data-garden-id': COMPONENT_ID$l,
|
|
1036
|
-
'data-garden-version': '8.
|
|
1036
|
+
'data-garden-version': '8.48.0'
|
|
1037
1037
|
}).withConfig({
|
|
1038
1038
|
displayName: "StyledFile",
|
|
1039
1039
|
componentId: "sc-195lzp1-0"
|
|
@@ -1049,7 +1049,7 @@ StyledFile.defaultProps = {
|
|
|
1049
1049
|
var COMPONENT_ID$k = 'forms.file.delete';
|
|
1050
1050
|
var StyledFileDelete = styled(StyledFileClose).attrs({
|
|
1051
1051
|
'data-garden-id': COMPONENT_ID$k,
|
|
1052
|
-
'data-garden-version': '8.
|
|
1052
|
+
'data-garden-version': '8.48.0'
|
|
1053
1053
|
}).withConfig({
|
|
1054
1054
|
displayName: "StyledFileDelete",
|
|
1055
1055
|
componentId: "sc-a8nnhx-0"
|
|
@@ -1072,7 +1072,7 @@ var StyledFileIcon = styled(function (_ref) {
|
|
|
1072
1072
|
return React__default.cloneElement(Children.only(children), props);
|
|
1073
1073
|
}).attrs({
|
|
1074
1074
|
'data-garden-id': COMPONENT_ID$j,
|
|
1075
|
-
'data-garden-version': '8.
|
|
1075
|
+
'data-garden-version': '8.48.0'
|
|
1076
1076
|
}).withConfig({
|
|
1077
1077
|
displayName: "StyledFileIcon",
|
|
1078
1078
|
componentId: "sc-7b3q0c-0"
|
|
@@ -1092,7 +1092,7 @@ StyledFileIcon.defaultProps = {
|
|
|
1092
1092
|
var COMPONENT_ID$i = 'forms.file_list';
|
|
1093
1093
|
var StyledFileList = styled.ul.attrs({
|
|
1094
1094
|
'data-garden-id': COMPONENT_ID$i,
|
|
1095
|
-
'data-garden-version': '8.
|
|
1095
|
+
'data-garden-version': '8.48.0'
|
|
1096
1096
|
}).withConfig({
|
|
1097
1097
|
displayName: "StyledFileList",
|
|
1098
1098
|
componentId: "sc-gbahjg-0"
|
|
@@ -1106,7 +1106,7 @@ StyledFileList.defaultProps = {
|
|
|
1106
1106
|
var COMPONENT_ID$h = 'forms.file_list.item';
|
|
1107
1107
|
var StyledFileListItem = styled.li.attrs({
|
|
1108
1108
|
'data-garden-id': COMPONENT_ID$h,
|
|
1109
|
-
'data-garden-version': '8.
|
|
1109
|
+
'data-garden-version': '8.48.0'
|
|
1110
1110
|
}).withConfig({
|
|
1111
1111
|
displayName: "StyledFileListItem",
|
|
1112
1112
|
componentId: "sc-1ova3lo-0"
|
|
@@ -1142,7 +1142,7 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
1142
1142
|
var COMPONENT_ID$g = 'forms.radio_svg';
|
|
1143
1143
|
var StyledRadioSvg = styled(SvgCircleSmFill$1).attrs({
|
|
1144
1144
|
'data-garden-id': COMPONENT_ID$g,
|
|
1145
|
-
'data-garden-version': '8.
|
|
1145
|
+
'data-garden-version': '8.48.0'
|
|
1146
1146
|
}).withConfig({
|
|
1147
1147
|
displayName: "StyledRadioSvg",
|
|
1148
1148
|
componentId: "sc-1r1qtr1-0"
|
|
@@ -1161,7 +1161,7 @@ var sizeStyles$9 = function sizeStyles(props) {
|
|
|
1161
1161
|
};
|
|
1162
1162
|
var StyledToggleLabel = styled(StyledCheckLabel).attrs({
|
|
1163
1163
|
'data-garden-id': COMPONENT_ID$f,
|
|
1164
|
-
'data-garden-version': '8.
|
|
1164
|
+
'data-garden-version': '8.48.0'
|
|
1165
1165
|
}).withConfig({
|
|
1166
1166
|
displayName: "StyledToggleLabel",
|
|
1167
1167
|
componentId: "sc-e0asdk-0"
|
|
@@ -1177,7 +1177,7 @@ StyledToggleLabel.defaultProps = {
|
|
|
1177
1177
|
var COMPONENT_ID$e = 'forms.toggle_hint';
|
|
1178
1178
|
var StyledToggleHint = styled(StyledHint).attrs({
|
|
1179
1179
|
'data-garden-id': COMPONENT_ID$e,
|
|
1180
|
-
'data-garden-version': '8.
|
|
1180
|
+
'data-garden-version': '8.48.0'
|
|
1181
1181
|
}).withConfig({
|
|
1182
1182
|
displayName: "StyledToggleHint",
|
|
1183
1183
|
componentId: "sc-nziggu-0"
|
|
@@ -1206,11 +1206,11 @@ var sizeStyles$8 = function sizeStyles(props) {
|
|
|
1206
1206
|
var iconSize = props.theme.iconSizes.md;
|
|
1207
1207
|
var iconPosition = math("(".concat(height, " - ").concat(iconSize, ") / 2"));
|
|
1208
1208
|
var checkedIconPosition = math("".concat(width, " - ").concat(iconSize, " - ").concat(iconPosition));
|
|
1209
|
-
return css(["
|
|
1209
|
+
return css(["top:0;width:", ";height:", ";& ~ ", "::before{width:", ";height:", ";}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&:checked ~ ", " > svg{", ":", ";}"], width, height, StyledToggleLabel, width, height, StyledToggleLabel, iconPosition, props.theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledToggleLabel, props.theme.rtl ? 'right' : 'left', checkedIconPosition);
|
|
1210
1210
|
};
|
|
1211
1211
|
var StyledToggleInput = styled(StyledCheckInput).attrs({
|
|
1212
1212
|
'data-garden-id': COMPONENT_ID$d,
|
|
1213
|
-
'data-garden-version': '8.
|
|
1213
|
+
'data-garden-version': '8.48.0'
|
|
1214
1214
|
}).withConfig({
|
|
1215
1215
|
displayName: "StyledToggleInput",
|
|
1216
1216
|
componentId: "sc-sgp47s-0"
|
|
@@ -1228,7 +1228,7 @@ StyledToggleInput.defaultProps = {
|
|
|
1228
1228
|
var COMPONENT_ID$c = 'forms.toggle_message';
|
|
1229
1229
|
var StyledToggleMessage = styled(StyledMessage).attrs({
|
|
1230
1230
|
'data-garden-id': COMPONENT_ID$c,
|
|
1231
|
-
'data-garden-version': '8.
|
|
1231
|
+
'data-garden-version': '8.48.0'
|
|
1232
1232
|
}).withConfig({
|
|
1233
1233
|
displayName: "StyledToggleMessage",
|
|
1234
1234
|
componentId: "sc-13vuvl1-0"
|
|
@@ -1270,7 +1270,7 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
1270
1270
|
var COMPONENT_ID$b = 'forms.toggle_svg';
|
|
1271
1271
|
var StyledToggleSvg = styled(SvgCircleSmFill).attrs({
|
|
1272
1272
|
'data-garden-id': COMPONENT_ID$b,
|
|
1273
|
-
'data-garden-version': '8.
|
|
1273
|
+
'data-garden-version': '8.48.0'
|
|
1274
1274
|
}).withConfig({
|
|
1275
1275
|
displayName: "StyledToggleSvg",
|
|
1276
1276
|
componentId: "sc-162xbyx-0"
|
|
@@ -1294,7 +1294,7 @@ var sizeStyles$7 = function sizeStyles(props) {
|
|
|
1294
1294
|
};
|
|
1295
1295
|
var StyledSelect = styled(StyledTextInput).attrs({
|
|
1296
1296
|
'data-garden-id': COMPONENT_ID$a,
|
|
1297
|
-
'data-garden-version': '8.
|
|
1297
|
+
'data-garden-version': '8.48.0',
|
|
1298
1298
|
as: 'select'
|
|
1299
1299
|
}).withConfig({
|
|
1300
1300
|
displayName: "StyledSelect",
|
|
@@ -1313,7 +1313,7 @@ StyledSelect.defaultProps = {
|
|
|
1313
1313
|
var COMPONENT_ID$9 = 'forms.select_wrapper';
|
|
1314
1314
|
var StyledSelectWrapper = styled(StyledTextFauxInput).attrs({
|
|
1315
1315
|
'data-garden-id': COMPONENT_ID$9,
|
|
1316
|
-
'data-garden-version': '8.
|
|
1316
|
+
'data-garden-version': '8.48.0',
|
|
1317
1317
|
isBare: true
|
|
1318
1318
|
}).withConfig({
|
|
1319
1319
|
displayName: "StyledSelectWrapper",
|
|
@@ -1366,7 +1366,7 @@ var sizeStyles$6 = function sizeStyles(props) {
|
|
|
1366
1366
|
var StyledRangeInput = styled.input.attrs(function (props) {
|
|
1367
1367
|
return {
|
|
1368
1368
|
'data-garden-id': COMPONENT_ID$8,
|
|
1369
|
-
'data-garden-version': '8.
|
|
1369
|
+
'data-garden-version': '8.48.0',
|
|
1370
1370
|
type: 'range',
|
|
1371
1371
|
style: {
|
|
1372
1372
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1398,7 +1398,7 @@ var COMPONENT_ID$7 = 'forms.slider';
|
|
|
1398
1398
|
var StyledSlider = styled.div.attrs(function (props) {
|
|
1399
1399
|
return {
|
|
1400
1400
|
'data-garden-id': COMPONENT_ID$7,
|
|
1401
|
-
'data-garden-version': '8.
|
|
1401
|
+
'data-garden-version': '8.48.0',
|
|
1402
1402
|
'aria-disabled': props.isDisabled
|
|
1403
1403
|
};
|
|
1404
1404
|
}).withConfig({
|
|
@@ -1438,7 +1438,7 @@ var sizeStyles$5 = function sizeStyles(props) {
|
|
|
1438
1438
|
var StyledSliderThumb = styled.div.attrs(function (props) {
|
|
1439
1439
|
return {
|
|
1440
1440
|
'data-garden-id': COMPONENT_ID$6,
|
|
1441
|
-
'data-garden-version': '8.
|
|
1441
|
+
'data-garden-version': '8.48.0',
|
|
1442
1442
|
'aria-disabled': props.isDisabled
|
|
1443
1443
|
};
|
|
1444
1444
|
}).withConfig({
|
|
@@ -1482,7 +1482,7 @@ var sizeStyles$4 = function sizeStyles(props) {
|
|
|
1482
1482
|
var StyledSliderTrack = styled.div.attrs(function (props) {
|
|
1483
1483
|
return {
|
|
1484
1484
|
'data-garden-id': COMPONENT_ID$5,
|
|
1485
|
-
'data-garden-version': '8.
|
|
1485
|
+
'data-garden-version': '8.48.0',
|
|
1486
1486
|
'aria-disabled': props.isDisabled
|
|
1487
1487
|
};
|
|
1488
1488
|
}).withConfig({
|
|
@@ -1509,7 +1509,7 @@ var sizeStyles$3 = function sizeStyles(props) {
|
|
|
1509
1509
|
};
|
|
1510
1510
|
var StyledSliderTrackRail = styled.div.attrs({
|
|
1511
1511
|
'data-garden-id': COMPONENT_ID$4,
|
|
1512
|
-
'data-garden-version': '8.
|
|
1512
|
+
'data-garden-version': '8.48.0'
|
|
1513
1513
|
}).withConfig({
|
|
1514
1514
|
displayName: "StyledSliderTrackRail",
|
|
1515
1515
|
componentId: "sc-1o5owbd-0"
|
|
@@ -1540,7 +1540,7 @@ var sizeStyles$2 = function sizeStyles(props) {
|
|
|
1540
1540
|
};
|
|
1541
1541
|
var StyledTileIcon = styled.span.attrs({
|
|
1542
1542
|
'data-garden-id': COMPONENT_ID$3,
|
|
1543
|
-
'data-garden-version': '8.
|
|
1543
|
+
'data-garden-version': '8.48.0'
|
|
1544
1544
|
}).withConfig({
|
|
1545
1545
|
displayName: "StyledTileIcon",
|
|
1546
1546
|
componentId: "sc-1wazhg4-0"
|
|
@@ -1580,7 +1580,7 @@ var colorStyles = function colorStyles(props) {
|
|
|
1580
1580
|
var StyledTile = styled.label.attrs(function (props) {
|
|
1581
1581
|
return {
|
|
1582
1582
|
'data-garden-id': COMPONENT_ID$2,
|
|
1583
|
-
'data-garden-version': '8.
|
|
1583
|
+
'data-garden-version': '8.48.0',
|
|
1584
1584
|
'data-garden-focus-visible': props.isFocused,
|
|
1585
1585
|
'data-garden-selected': props.isSelected
|
|
1586
1586
|
};
|
|
@@ -1618,7 +1618,7 @@ var sizeStyles$1 = function sizeStyles(props) {
|
|
|
1618
1618
|
};
|
|
1619
1619
|
var StyledTileDescription = styled.span.attrs({
|
|
1620
1620
|
'data-garden-id': COMPONENT_ID$1,
|
|
1621
|
-
'data-garden-version': '8.
|
|
1621
|
+
'data-garden-version': '8.48.0'
|
|
1622
1622
|
}).withConfig({
|
|
1623
1623
|
displayName: "StyledTileDescription",
|
|
1624
1624
|
componentId: "sc-xfuu7u-0"
|
|
@@ -1661,7 +1661,7 @@ var sizeStyles = function sizeStyles(props) {
|
|
|
1661
1661
|
};
|
|
1662
1662
|
var StyledTileLabel = styled.span.attrs({
|
|
1663
1663
|
'data-garden-id': COMPONENT_ID,
|
|
1664
|
-
'data-garden-version': '8.
|
|
1664
|
+
'data-garden-version': '8.48.0'
|
|
1665
1665
|
}).withConfig({
|
|
1666
1666
|
displayName: "StyledTileLabel",
|
|
1667
1667
|
componentId: "sc-1mypv27-0"
|
|
@@ -1714,9 +1714,6 @@ var Field = React__default.forwardRef(function (props, ref) {
|
|
|
1714
1714
|
ref: ref
|
|
1715
1715
|
})));
|
|
1716
1716
|
});
|
|
1717
|
-
Field.propTypes = {
|
|
1718
|
-
id: PropTypes.string
|
|
1719
|
-
};
|
|
1720
1717
|
Field.displayName = 'Field';
|
|
1721
1718
|
|
|
1722
1719
|
var FieldsetContext = createContext(undefined);
|
|
@@ -1725,15 +1722,16 @@ var useFieldsetContext = function useFieldsetContext() {
|
|
|
1725
1722
|
return fieldsetContext;
|
|
1726
1723
|
};
|
|
1727
1724
|
|
|
1728
|
-
var
|
|
1725
|
+
var LegendComponent = forwardRef(function (props, ref) {
|
|
1729
1726
|
var fieldsetContext = useFieldsetContext();
|
|
1730
1727
|
return React__default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, {
|
|
1731
1728
|
ref: ref
|
|
1732
1729
|
}));
|
|
1733
1730
|
});
|
|
1734
|
-
|
|
1731
|
+
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1732
|
+
var Legend = LegendComponent;
|
|
1735
1733
|
|
|
1736
|
-
var
|
|
1734
|
+
var FieldsetComponent = forwardRef(function (props, ref) {
|
|
1737
1735
|
var fieldsetContext = useMemo(function () {
|
|
1738
1736
|
return {
|
|
1739
1737
|
isCompact: props.isCompact
|
|
@@ -1745,8 +1743,9 @@ var Fieldset = forwardRef(function (props, ref) {
|
|
|
1745
1743
|
ref: ref
|
|
1746
1744
|
})));
|
|
1747
1745
|
});
|
|
1746
|
+
FieldsetComponent.displayName = 'Fieldset';
|
|
1747
|
+
var Fieldset = FieldsetComponent;
|
|
1748
1748
|
Fieldset.Legend = Legend;
|
|
1749
|
-
Fieldset.displayName = 'Fieldset';
|
|
1750
1749
|
|
|
1751
1750
|
var InputContext = createContext(undefined);
|
|
1752
1751
|
var useInputContext = function useInputContext() {
|
|
@@ -2190,18 +2189,24 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
2190
2189
|
})));
|
|
2191
2190
|
};
|
|
2192
2191
|
|
|
2193
|
-
var
|
|
2194
|
-
var StartIcon = function StartIcon(props) {
|
|
2192
|
+
var StartIconComponent = function StartIconComponent(props) {
|
|
2195
2193
|
return React__default.createElement(StyledTextMediaFigure, _extends$t({
|
|
2196
2194
|
position: "start"
|
|
2197
2195
|
}, props));
|
|
2198
2196
|
};
|
|
2199
|
-
|
|
2197
|
+
StartIconComponent.displayName = 'FauxInput.StartIcon';
|
|
2198
|
+
var StartIcon = StartIconComponent;
|
|
2199
|
+
|
|
2200
|
+
var EndIconComponent = function EndIconComponent(props) {
|
|
2200
2201
|
return React__default.createElement(StyledTextMediaFigure, _extends$t({
|
|
2201
2202
|
position: "end"
|
|
2202
2203
|
}, props));
|
|
2203
2204
|
};
|
|
2204
|
-
|
|
2205
|
+
EndIconComponent.displayName = 'FauxInput.EndIcon';
|
|
2206
|
+
var EndIcon = EndIconComponent;
|
|
2207
|
+
|
|
2208
|
+
var _excluded$8 = ["onFocus", "onBlur", "disabled", "readOnly", "isFocused"];
|
|
2209
|
+
var FauxInputComponent = forwardRef(function (_ref, ref) {
|
|
2205
2210
|
var onFocus = _ref.onFocus,
|
|
2206
2211
|
onBlur = _ref.onBlur,
|
|
2207
2212
|
disabled = _ref.disabled,
|
|
@@ -2229,10 +2234,8 @@ var FauxInput = forwardRef(function (_ref, ref) {
|
|
|
2229
2234
|
ref: ref
|
|
2230
2235
|
}));
|
|
2231
2236
|
});
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
FauxInput.displayName = 'FauxInput';
|
|
2235
|
-
FauxInput.propTypes = {
|
|
2237
|
+
FauxInputComponent.displayName = 'FauxInput';
|
|
2238
|
+
FauxInputComponent.propTypes = {
|
|
2236
2239
|
isCompact: PropTypes.bool,
|
|
2237
2240
|
isBare: PropTypes.bool,
|
|
2238
2241
|
focusInset: PropTypes.bool,
|
|
@@ -2240,6 +2243,9 @@ FauxInput.propTypes = {
|
|
|
2240
2243
|
readOnly: PropTypes.bool,
|
|
2241
2244
|
validation: PropTypes.oneOf(['success', 'warning', 'error'])
|
|
2242
2245
|
};
|
|
2246
|
+
var FauxInput = FauxInputComponent;
|
|
2247
|
+
FauxInput.EndIcon = EndIcon;
|
|
2248
|
+
FauxInput.StartIcon = StartIcon;
|
|
2243
2249
|
|
|
2244
2250
|
var _excluded$7 = ["disabled", "isCompact"];
|
|
2245
2251
|
var Select = React__default.forwardRef(function (_ref, ref) {
|
|
@@ -2272,7 +2278,7 @@ Select.propTypes = {
|
|
|
2272
2278
|
Select.displayName = 'Select';
|
|
2273
2279
|
|
|
2274
2280
|
var _excluded$6 = ["min", "max", "minValue", "maxValue", "disabled", "step", "onChange", "onMouseDown"];
|
|
2275
|
-
var MultiThumbRange = function
|
|
2281
|
+
var MultiThumbRange = forwardRef(function (_ref, ref) {
|
|
2276
2282
|
var min = _ref.min,
|
|
2277
2283
|
max = _ref.max,
|
|
2278
2284
|
minValue = _ref.minValue,
|
|
@@ -2513,6 +2519,7 @@ var MultiThumbRange = function MultiThumbRange(_ref) {
|
|
|
2513
2519
|
var sliderBackgroundSize = Math.abs(maxPosition) - Math.abs(minPosition);
|
|
2514
2520
|
var onSliderMouseDown = composeEventHandlers(onMouseDown, onTrackMouseDown);
|
|
2515
2521
|
return React__default.createElement(StyledSlider, _extends$t({
|
|
2522
|
+
ref: ref,
|
|
2516
2523
|
isDisabled: disabled,
|
|
2517
2524
|
onMouseDown: onSliderMouseDown
|
|
2518
2525
|
}, props), React__default.createElement(StyledSliderTrack, {
|
|
@@ -2568,7 +2575,8 @@ var MultiThumbRange = function MultiThumbRange(_ref) {
|
|
|
2568
2575
|
maxThumbRef.current && maxThumbRef.current.focus();
|
|
2569
2576
|
}
|
|
2570
2577
|
}))));
|
|
2571
|
-
};
|
|
2578
|
+
});
|
|
2579
|
+
MultiThumbRange.displayName = 'MultiThumbRange';
|
|
2572
2580
|
MultiThumbRange.propTypes = {
|
|
2573
2581
|
min: PropTypes.number,
|
|
2574
2582
|
max: PropTypes.number,
|
|
@@ -2592,7 +2600,7 @@ var useTilesContext = function useTilesContext() {
|
|
|
2592
2600
|
};
|
|
2593
2601
|
|
|
2594
2602
|
var _excluded$5 = ["children", "value", "disabled"];
|
|
2595
|
-
var
|
|
2603
|
+
var TileComponent = React__default.forwardRef(function (_ref, ref) {
|
|
2596
2604
|
var children = _ref.children,
|
|
2597
2605
|
value = _ref.value,
|
|
2598
2606
|
disabled = _ref.disabled,
|
|
@@ -2635,31 +2643,34 @@ var Tile = React__default.forwardRef(function (_ref, ref) {
|
|
|
2635
2643
|
ref: inputRef
|
|
2636
2644
|
})));
|
|
2637
2645
|
});
|
|
2638
|
-
|
|
2639
|
-
|
|
2646
|
+
TileComponent.displayName = 'Tiles.Tile';
|
|
2647
|
+
TileComponent.propTypes = {
|
|
2640
2648
|
value: PropTypes.string,
|
|
2641
2649
|
disabled: PropTypes.bool
|
|
2642
2650
|
};
|
|
2651
|
+
var Tile = TileComponent;
|
|
2643
2652
|
|
|
2644
|
-
var
|
|
2653
|
+
var DescriptionComponent = forwardRef(function (props, ref) {
|
|
2645
2654
|
var tilesContext = useTilesContext();
|
|
2646
2655
|
return React__default.createElement(StyledTileDescription, _extends$t({
|
|
2647
2656
|
ref: ref,
|
|
2648
2657
|
isCentered: tilesContext && tilesContext.isCentered
|
|
2649
2658
|
}, props));
|
|
2650
2659
|
});
|
|
2651
|
-
|
|
2660
|
+
DescriptionComponent.displayName = 'Tiles.Description';
|
|
2661
|
+
var Description = DescriptionComponent;
|
|
2652
2662
|
|
|
2653
|
-
var
|
|
2663
|
+
var IconComponent = forwardRef(function (props, ref) {
|
|
2654
2664
|
var tileContext = useTilesContext();
|
|
2655
2665
|
return React__default.createElement(StyledTileIcon, _extends$t({
|
|
2656
2666
|
ref: ref,
|
|
2657
2667
|
isCentered: tileContext && tileContext.isCentered
|
|
2658
2668
|
}, props));
|
|
2659
2669
|
});
|
|
2660
|
-
|
|
2670
|
+
IconComponent.displayName = 'Tiles.Icon';
|
|
2671
|
+
var Icon = IconComponent;
|
|
2661
2672
|
|
|
2662
|
-
var
|
|
2673
|
+
var LabelComponent = forwardRef(function (props, forwardedRef) {
|
|
2663
2674
|
var _useState = useState(''),
|
|
2664
2675
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2665
2676
|
title = _useState2[0],
|
|
@@ -2677,10 +2688,11 @@ var Label = React__default.forwardRef(function (props, forwardedRef) {
|
|
|
2677
2688
|
isCentered: tilesContext && tilesContext.isCentered
|
|
2678
2689
|
}, props));
|
|
2679
2690
|
});
|
|
2680
|
-
|
|
2691
|
+
LabelComponent.displayName = 'Tiles.Label';
|
|
2692
|
+
var Label = LabelComponent;
|
|
2681
2693
|
|
|
2682
2694
|
var _excluded$4 = ["onChange", "value", "name", "isCentered"];
|
|
2683
|
-
var
|
|
2695
|
+
var TilesComponent = forwardRef(function (_ref, ref) {
|
|
2684
2696
|
var onChange = _ref.onChange,
|
|
2685
2697
|
controlledValue = _ref.value,
|
|
2686
2698
|
name = _ref.name,
|
|
@@ -2715,20 +2727,21 @@ var Tiles = React__default.forwardRef(function (_ref, ref) {
|
|
|
2715
2727
|
role: "radiogroup"
|
|
2716
2728
|
}, props)));
|
|
2717
2729
|
});
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
Tiles.Icon = Icon;
|
|
2721
|
-
Tiles.Label = Label;
|
|
2722
|
-
Tiles.Description = Description;
|
|
2723
|
-
Tiles.propTypes = {
|
|
2730
|
+
TilesComponent.displayName = 'Tiles';
|
|
2731
|
+
TilesComponent.propTypes = {
|
|
2724
2732
|
value: PropTypes.string,
|
|
2725
2733
|
onChange: PropTypes.func,
|
|
2726
2734
|
name: PropTypes.string.isRequired,
|
|
2727
2735
|
isCentered: PropTypes.bool
|
|
2728
2736
|
};
|
|
2729
|
-
|
|
2737
|
+
TilesComponent.defaultProps = {
|
|
2730
2738
|
isCentered: true
|
|
2731
2739
|
};
|
|
2740
|
+
var Tiles = TilesComponent;
|
|
2741
|
+
Tiles.Description = Description;
|
|
2742
|
+
Tiles.Icon = Icon;
|
|
2743
|
+
Tiles.Label = Label;
|
|
2744
|
+
Tiles.Tile = Tile;
|
|
2732
2745
|
|
|
2733
2746
|
var _excluded$3 = ["isCompact"];
|
|
2734
2747
|
var InputGroup = React__default.forwardRef(function (_ref, ref) {
|
|
@@ -2767,21 +2780,23 @@ FileUpload.propTypes = {
|
|
|
2767
2780
|
};
|
|
2768
2781
|
FileUpload.displayName = 'FileUpload';
|
|
2769
2782
|
|
|
2770
|
-
var
|
|
2783
|
+
var ItemComponent = forwardRef(function (_ref, ref) {
|
|
2771
2784
|
var props = _extends$t({}, _ref);
|
|
2772
2785
|
return React__default.createElement(StyledFileListItem, _extends$t({}, props, {
|
|
2773
2786
|
ref: ref
|
|
2774
2787
|
}));
|
|
2775
2788
|
});
|
|
2776
|
-
|
|
2789
|
+
ItemComponent.displayName = 'FileList.Item';
|
|
2790
|
+
var Item = ItemComponent;
|
|
2777
2791
|
|
|
2778
|
-
var
|
|
2792
|
+
var FileListComponent = forwardRef(function (_ref, ref) {
|
|
2779
2793
|
var props = _extends$t({}, _ref);
|
|
2780
2794
|
return React__default.createElement(StyledFileList, _extends$t({}, props, {
|
|
2781
2795
|
ref: ref
|
|
2782
2796
|
}));
|
|
2783
2797
|
});
|
|
2784
|
-
|
|
2798
|
+
FileListComponent.displayName = 'FileList';
|
|
2799
|
+
var FileList = FileListComponent;
|
|
2785
2800
|
FileList.Item = Item;
|
|
2786
2801
|
|
|
2787
2802
|
var _path$j;
|
|
@@ -2827,7 +2842,7 @@ var useFileContext = function useFileContext() {
|
|
|
2827
2842
|
return useContext(FileContext);
|
|
2828
2843
|
};
|
|
2829
2844
|
|
|
2830
|
-
var
|
|
2845
|
+
var CloseComponent = React__default.forwardRef(function (props, ref) {
|
|
2831
2846
|
var fileContext = useFileContext();
|
|
2832
2847
|
var onMouseDown = composeEventHandlers(props.onMouseDown, function (event) {
|
|
2833
2848
|
return event.preventDefault();
|
|
@@ -2839,7 +2854,8 @@ var Close = React__default.forwardRef(function (props, ref) {
|
|
|
2839
2854
|
onMouseDown: onMouseDown
|
|
2840
2855
|
}), fileContext && fileContext.isCompact ? React__default.createElement(SvgXStroke$1, null) : React__default.createElement(SvgXStroke, null));
|
|
2841
2856
|
});
|
|
2842
|
-
|
|
2857
|
+
CloseComponent.displayName = 'File.Close';
|
|
2858
|
+
var Close = CloseComponent;
|
|
2843
2859
|
|
|
2844
2860
|
var _path$h;
|
|
2845
2861
|
|
|
@@ -2881,7 +2897,7 @@ var SvgTrashStroke = function SvgTrashStroke(props) {
|
|
|
2881
2897
|
})));
|
|
2882
2898
|
};
|
|
2883
2899
|
|
|
2884
|
-
var
|
|
2900
|
+
var DeleteComponent = React__default.forwardRef(function (props, ref) {
|
|
2885
2901
|
var fileContext = useFileContext();
|
|
2886
2902
|
var onMouseDown = composeEventHandlers(props.onMouseDown, function (event) {
|
|
2887
2903
|
return event.preventDefault();
|
|
@@ -2893,7 +2909,8 @@ var Delete = React__default.forwardRef(function (props, ref) {
|
|
|
2893
2909
|
onMouseDown: onMouseDown
|
|
2894
2910
|
}), fileContext && fileContext.isCompact ? React__default.createElement(SvgTrashStroke$1, null) : React__default.createElement(SvgTrashStroke, null));
|
|
2895
2911
|
});
|
|
2896
|
-
|
|
2912
|
+
DeleteComponent.displayName = 'File.Delete';
|
|
2913
|
+
var Delete = DeleteComponent;
|
|
2897
2914
|
|
|
2898
2915
|
var _path$f, _rect$1;
|
|
2899
2916
|
|
|
@@ -3304,7 +3321,7 @@ var fileIconsCompact = {
|
|
|
3304
3321
|
};
|
|
3305
3322
|
|
|
3306
3323
|
var _excluded$1 = ["children", "type", "isCompact", "focusInset", "validation"];
|
|
3307
|
-
var
|
|
3324
|
+
var FileComponent = forwardRef(function (_ref, ref) {
|
|
3308
3325
|
var children = _ref.children,
|
|
3309
3326
|
type = _ref.type,
|
|
3310
3327
|
isCompact = _ref.isCompact,
|
|
@@ -3330,15 +3347,16 @@ var File = forwardRef(function (_ref, ref) {
|
|
|
3330
3347
|
return typeof child === 'string' ? React__default.createElement("span", null, child) : child;
|
|
3331
3348
|
})));
|
|
3332
3349
|
});
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
File.Delete = Delete;
|
|
3336
|
-
File.propTypes = {
|
|
3350
|
+
FileComponent.displayName = 'File';
|
|
3351
|
+
FileComponent.propTypes = {
|
|
3337
3352
|
focusInset: PropTypes.bool,
|
|
3338
3353
|
isCompact: PropTypes.bool,
|
|
3339
3354
|
type: PropTypes.oneOf(ARRAY_FILE_TYPE),
|
|
3340
3355
|
validation: PropTypes.oneOf(['success', 'error'])
|
|
3341
3356
|
};
|
|
3357
|
+
var File = FileComponent;
|
|
3358
|
+
File.Close = Close;
|
|
3359
|
+
File.Delete = Delete;
|
|
3342
3360
|
|
|
3343
3361
|
var _excluded = ["start", "end", "disabled", "isCompact", "isBare", "focusInset", "readOnly", "validation", "wrapperProps", "wrapperRef", "onSelect"],
|
|
3344
3362
|
_excluded2 = ["onClick", "onFocus", "onBlur", "onMouseOver", "onMouseOut"];
|