@charcoal-ui/react 2.0.0-rc.0 → 2.0.0-rc.2
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 +78 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.modern.js +133 -83
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +75 -40
- package/dist/index.module.js.map +1 -1
- package/package.json +7 -7
- package/src/index.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Switch, type SwitchProps } from './components/Switch';
|
|
|
9
9
|
export { default as TextField, type TextFieldProps, type SingleLineTextFieldProps, type MultiLineTextFieldProps, } from './components/TextField';
|
|
10
10
|
export { default as Icon, type IconProps } from './components/Icon';
|
|
11
11
|
export { default as Modal, type ModalProps } from './components/Modal';
|
|
12
|
+
export { ModalHeader, ModalAlign, ModalBody, ModalButtons, } from './components/Modal/ModalPlumbing';
|
|
12
13
|
export { default as LoadingSpinner, LoadingSpinnerIcon, } from './components/LoadingSpinner';
|
|
13
14
|
export { default as DropdownSelector, DropdownSelectorItem, } from './components/DropdownSelector';
|
|
14
15
|
export { default as SegmentedControl, type SegmentedControlProps, } from './components/SegmentedControl';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,uBAAuB,EACvB,KAAK,SAAS,GACf,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB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A"}
|
package/dist/index.modern.js
CHANGED
|
@@ -91,10 +91,10 @@ function unreachable(value) {
|
|
|
91
91
|
|
|
92
92
|
const theme$2 = createTheme(styled);
|
|
93
93
|
|
|
94
|
-
let _$
|
|
95
|
-
_t$
|
|
96
|
-
_t2$
|
|
97
|
-
_t3$
|
|
94
|
+
let _$e = t => t,
|
|
95
|
+
_t$e,
|
|
96
|
+
_t2$c,
|
|
97
|
+
_t3$c;
|
|
98
98
|
|
|
99
99
|
const _excluded$d = ["onClick", "disabled"];
|
|
100
100
|
const Clickable = React__default.forwardRef(function Clickable(props, ref) {
|
|
@@ -121,7 +121,7 @@ const Clickable = React__default.forwardRef(function Clickable(props, ref) {
|
|
|
121
121
|
}));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
const clickableCss = css(_t$
|
|
124
|
+
const clickableCss = css(_t$e || (_t$e = _$e`
|
|
125
125
|
/* Clickable style */
|
|
126
126
|
cursor: pointer;
|
|
127
127
|
|
|
@@ -129,7 +129,7 @@ const clickableCss = css(_t$d || (_t$d = _$d`
|
|
|
129
129
|
cursor: default;
|
|
130
130
|
}
|
|
131
131
|
`), disabledSelector);
|
|
132
|
-
const Button$1 = styled.button(_t2$
|
|
132
|
+
const Button$1 = styled.button(_t2$c || (_t2$c = _$e`
|
|
133
133
|
/* Reset button appearance */
|
|
134
134
|
appearance: none;
|
|
135
135
|
background: transparent;
|
|
@@ -165,7 +165,7 @@ const Button$1 = styled.button(_t2$b || (_t2$b = _$d`
|
|
|
165
165
|
|
|
166
166
|
${0}
|
|
167
167
|
`), clickableCss);
|
|
168
|
-
const A = styled.span(_t3$
|
|
168
|
+
const A = styled.span(_t3$c || (_t3$c = _$e`
|
|
169
169
|
/* Reset a-tag appearance */
|
|
170
170
|
color: inherit;
|
|
171
171
|
|
|
@@ -180,8 +180,8 @@ const A = styled.span(_t3$b || (_t3$b = _$d`
|
|
|
180
180
|
${0}
|
|
181
181
|
`), clickableCss);
|
|
182
182
|
|
|
183
|
-
let _$
|
|
184
|
-
_t$
|
|
183
|
+
let _$d = t => t,
|
|
184
|
+
_t$d;
|
|
185
185
|
|
|
186
186
|
const _excluded$c = ["children", "variant", "size", "fixed", "disabled"];
|
|
187
187
|
const Button = React__default.forwardRef(function Button(_ref, ref) {
|
|
@@ -208,7 +208,7 @@ const StyledButton = styled(Clickable).withConfig({
|
|
|
208
208
|
return prop !== 'fixed';
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
}).attrs(styledProps$1)(_t$
|
|
211
|
+
}).attrs(styledProps$1)(_t$d || (_t$d = _$d`
|
|
212
212
|
width: ${0};
|
|
213
213
|
display: inline-grid;
|
|
214
214
|
align-items: center;
|
|
@@ -280,8 +280,8 @@ function sizeToProps$1(size) {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
let _$
|
|
284
|
-
_t$
|
|
283
|
+
let _$c = t => t,
|
|
284
|
+
_t$c;
|
|
285
285
|
|
|
286
286
|
const _excluded$b = ["variant", "size", "icon"];
|
|
287
287
|
const IconButton = React__default.forwardRef(function IconButtonInner(_ref, ref) {
|
|
@@ -301,7 +301,7 @@ const IconButton = React__default.forwardRef(function IconButtonInner(_ref, ref)
|
|
|
301
301
|
name: icon
|
|
302
302
|
}));
|
|
303
303
|
});
|
|
304
|
-
const StyledIconButton = styled(Clickable).attrs(styledProps)(_t$
|
|
304
|
+
const StyledIconButton = styled(Clickable).attrs(styledProps)(_t$c || (_t$c = _$c`
|
|
305
305
|
user-select: none;
|
|
306
306
|
|
|
307
307
|
width: ${0}px;
|
|
@@ -391,11 +391,11 @@ function validateIconSize(size, icon) {
|
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
let _$
|
|
395
|
-
_t$
|
|
396
|
-
_t2$
|
|
397
|
-
_t3$
|
|
398
|
-
_t4$
|
|
394
|
+
let _$b = t => t,
|
|
395
|
+
_t$b,
|
|
396
|
+
_t2$b,
|
|
397
|
+
_t3$b,
|
|
398
|
+
_t4$9;
|
|
399
399
|
function Radio({
|
|
400
400
|
value,
|
|
401
401
|
forceChecked = false,
|
|
@@ -429,7 +429,7 @@ function Radio({
|
|
|
429
429
|
disabled: isDisabled || isReadonly
|
|
430
430
|
}), children != null && /*#__PURE__*/React__default.createElement(RadioLabel$1, null, children));
|
|
431
431
|
}
|
|
432
|
-
const RadioRoot = styled.label(_t$
|
|
432
|
+
const RadioRoot = styled.label(_t$b || (_t$b = _$b`
|
|
433
433
|
display: grid;
|
|
434
434
|
grid-template-columns: auto 1fr;
|
|
435
435
|
grid-gap: ${0};
|
|
@@ -442,7 +442,7 @@ const RadioRoot = styled.label(_t$a || (_t$a = _$a`
|
|
|
442
442
|
}) => px(theme.spacing[4]), theme$2(o => [o.disabled]));
|
|
443
443
|
const RadioInput = styled.input.attrs({
|
|
444
444
|
type: 'radio'
|
|
445
|
-
})(_t2$
|
|
445
|
+
})(_t2$b || (_t2$b = _$b`
|
|
446
446
|
/** Make prior to browser default style */
|
|
447
447
|
&[type='radio'] {
|
|
448
448
|
appearance: none;
|
|
@@ -483,11 +483,11 @@ const RadioInput = styled.input.attrs({
|
|
|
483
483
|
}) => theme$2(o => [o.borderRadius('oval'), o.bg.text5.hover.press, _hasError && o.outline.assertive]), ({
|
|
484
484
|
theme
|
|
485
485
|
}) => theme.color.text4, theme$2(o => o.bg.brand.hover.press), theme$2(o => [o.bg.text5.hover.press, o.borderRadius('oval')]), theme$2(o => o.outline.default.focus));
|
|
486
|
-
const RadioLabel$1 = styled.div(_t3$
|
|
486
|
+
const RadioLabel$1 = styled.div(_t3$b || (_t3$b = _$b`
|
|
487
487
|
${0}
|
|
488
488
|
`), theme$2(o => [o.typography(14)])); // TODO: use (or polyfill) flex gap
|
|
489
489
|
|
|
490
|
-
const StyledRadioGroup = styled.div(_t4$
|
|
490
|
+
const StyledRadioGroup = styled.div(_t4$9 || (_t4$9 = _$b`
|
|
491
491
|
display: grid;
|
|
492
492
|
grid-template-columns: 1fr;
|
|
493
493
|
grid-gap: ${0};
|
|
@@ -551,12 +551,12 @@ const MultiSelectGroupContext = createContext({
|
|
|
551
551
|
|
|
552
552
|
});
|
|
553
553
|
|
|
554
|
-
let _$
|
|
555
|
-
_t$
|
|
556
|
-
_t2$
|
|
557
|
-
_t3$
|
|
558
|
-
_t4$
|
|
559
|
-
_t5$
|
|
554
|
+
let _$a = t => t,
|
|
555
|
+
_t$a,
|
|
556
|
+
_t2$a,
|
|
557
|
+
_t3$a,
|
|
558
|
+
_t4$8,
|
|
559
|
+
_t5$7;
|
|
560
560
|
function MultiSelect({
|
|
561
561
|
value,
|
|
562
562
|
forceChecked = false,
|
|
@@ -611,7 +611,7 @@ function MultiSelect({
|
|
|
611
611
|
"unsafe-non-guideline-scale": 16 / 24
|
|
612
612
|
})), Boolean(children) && /*#__PURE__*/React__default.createElement(MultiSelectLabel, null, children));
|
|
613
613
|
}
|
|
614
|
-
const MultiSelectRoot = styled.label(_t$
|
|
614
|
+
const MultiSelectRoot = styled.label(_t$a || (_t$a = _$a`
|
|
615
615
|
display: grid;
|
|
616
616
|
grid-template-columns: auto 1fr;
|
|
617
617
|
align-items: center;
|
|
@@ -625,14 +625,14 @@ const MultiSelectRoot = styled.label(_t$9 || (_t$9 = _$9`
|
|
|
625
625
|
`), disabledSelector, ({
|
|
626
626
|
theme
|
|
627
627
|
}) => px(theme.spacing[4]), theme$2(o => o.disabled));
|
|
628
|
-
const MultiSelectLabel = styled.div(_t2$
|
|
628
|
+
const MultiSelectLabel = styled.div(_t2$a || (_t2$a = _$a`
|
|
629
629
|
display: flex;
|
|
630
630
|
align-items: center;
|
|
631
631
|
${0}
|
|
632
632
|
`), theme$2(o => [o.typography(14), o.font.text1]));
|
|
633
633
|
const MultiSelectInput = styled.input.attrs({
|
|
634
634
|
type: 'checkbox'
|
|
635
|
-
})(_t3$
|
|
635
|
+
})(_t3$a || (_t3$a = _$a`
|
|
636
636
|
&[type='checkbox'] {
|
|
637
637
|
appearance: none;
|
|
638
638
|
display: block;
|
|
@@ -650,7 +650,7 @@ const MultiSelectInput = styled.input.attrs({
|
|
|
650
650
|
hasError,
|
|
651
651
|
overlay
|
|
652
652
|
}) => theme$2(o => [o.bg.text3.hover.press, o.borderRadius('oval'), hasError && !overlay && o.outline.assertive, overlay && o.bg.surface4]));
|
|
653
|
-
const MultiSelectInputOverlay = styled.div(_t4$
|
|
653
|
+
const MultiSelectInputOverlay = styled.div(_t4$8 || (_t4$8 = _$a`
|
|
654
654
|
position: absolute;
|
|
655
655
|
top: -2px;
|
|
656
656
|
left: -2px;
|
|
@@ -667,7 +667,7 @@ const MultiSelectInputOverlay = styled.div(_t4$7 || (_t4$7 = _$9`
|
|
|
667
667
|
overlay
|
|
668
668
|
}) => theme$2(o => [o.width.px(24), o.height.px(24), o.borderRadius('oval'), o.font.text5, hasError && overlay && o.outline.assertive]), ({
|
|
669
669
|
overlay
|
|
670
|
-
}) => overlay && css(_t5$
|
|
670
|
+
}) => overlay && css(_t5$7 || (_t5$7 = _$a`
|
|
671
671
|
border-color: ${0};
|
|
672
672
|
border-width: 2px;
|
|
673
673
|
border-style: solid;
|
|
@@ -714,10 +714,10 @@ function MultiSelectGroup({
|
|
|
714
714
|
}, children));
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
-
let _$
|
|
718
|
-
_t$
|
|
719
|
-
_t2$
|
|
720
|
-
_t3$
|
|
717
|
+
let _$9 = t => t,
|
|
718
|
+
_t$9,
|
|
719
|
+
_t2$9,
|
|
720
|
+
_t3$9;
|
|
721
721
|
|
|
722
722
|
const _excluded$a = ["className", "type"];
|
|
723
723
|
function SwitchCheckbox(props) {
|
|
@@ -747,7 +747,7 @@ function SwitchCheckbox(props) {
|
|
|
747
747
|
// eslint-disable-next-line react/destructuring-assignment
|
|
748
748
|
React__default.createElement(LabelInner, null, props.children) : undefined);
|
|
749
749
|
}
|
|
750
|
-
const Label$1 = styled.label(_t$
|
|
750
|
+
const Label$1 = styled.label(_t$9 || (_t$9 = _$9`
|
|
751
751
|
display: inline-grid;
|
|
752
752
|
grid-template-columns: auto 1fr;
|
|
753
753
|
gap: ${0};
|
|
@@ -762,12 +762,12 @@ const Label$1 = styled.label(_t$8 || (_t$8 = _$8`
|
|
|
762
762
|
`), ({
|
|
763
763
|
theme
|
|
764
764
|
}) => px(theme.spacing[4]), theme$2(o => o.disabled), disabledSelector);
|
|
765
|
-
const LabelInner = styled.div(_t2$
|
|
765
|
+
const LabelInner = styled.div(_t2$9 || (_t2$9 = _$9`
|
|
766
766
|
${0}
|
|
767
767
|
`), theme$2(o => o.typography(14)));
|
|
768
768
|
const SwitchInput = styled.input.attrs({
|
|
769
769
|
type: 'checkbox'
|
|
770
|
-
})(_t3$
|
|
770
|
+
})(_t3$9 || (_t3$9 = _$9`
|
|
771
771
|
&[type='checkbox'] {
|
|
772
772
|
appearance: none;
|
|
773
773
|
display: inline-flex;
|
|
@@ -802,11 +802,11 @@ const SwitchInput = styled.input.attrs({
|
|
|
802
802
|
}
|
|
803
803
|
`), theme$2(o => [o.borderRadius(16), o.height.px(16), o.bg.text4.hover.press, o.outline.default.focus]), theme$2(o => [o.bg.text5.hover.press, o.borderRadius('oval')]), theme$2(o => o.bg.brand.hover.press));
|
|
804
804
|
|
|
805
|
-
let _$
|
|
806
|
-
_t$
|
|
807
|
-
_t2$
|
|
808
|
-
_t3$
|
|
809
|
-
_t4$
|
|
805
|
+
let _$8 = t => t,
|
|
806
|
+
_t$8,
|
|
807
|
+
_t2$8,
|
|
808
|
+
_t3$8,
|
|
809
|
+
_t4$7;
|
|
810
810
|
|
|
811
811
|
const _excluded$9 = ["style", "className", "label", "required", "requiredText", "subLabel"];
|
|
812
812
|
const FieldLabel = React__default.forwardRef(function FieldLabel(_ref, ref) {
|
|
@@ -828,16 +828,16 @@ const FieldLabel = React__default.forwardRef(function FieldLabel(_ref, ref) {
|
|
|
828
828
|
}, labelProps), label), required && /*#__PURE__*/React__default.createElement(RequiredText, null, requiredText), /*#__PURE__*/React__default.createElement(SubLabelClickable, null, /*#__PURE__*/React__default.createElement("span", null, subLabel)));
|
|
829
829
|
});
|
|
830
830
|
const theme$1 = createTheme(styled);
|
|
831
|
-
const Label = styled.label(_t$
|
|
831
|
+
const Label = styled.label(_t$8 || (_t$8 = _$8`
|
|
832
832
|
${0}
|
|
833
833
|
`), theme$1(o => [o.typography(14).bold, o.font.text1]));
|
|
834
|
-
const RequiredText = styled.span(_t2$
|
|
834
|
+
const RequiredText = styled.span(_t2$8 || (_t2$8 = _$8`
|
|
835
835
|
${0}
|
|
836
836
|
`), theme$1(o => [o.typography(14), o.font.text3]));
|
|
837
|
-
const SubLabelClickable = styled.div(_t3$
|
|
837
|
+
const SubLabelClickable = styled.div(_t3$8 || (_t3$8 = _$8`
|
|
838
838
|
${0}
|
|
839
839
|
`), theme$1(o => [o.typography(14), o.font.text3.hover.press, o.outline.default.focus]));
|
|
840
|
-
const FieldLabelWrapper = styled.div(_t4$
|
|
840
|
+
const FieldLabelWrapper = styled.div(_t4$7 || (_t4$7 = _$8`
|
|
841
841
|
display: inline-flex;
|
|
842
842
|
align-items: center;
|
|
843
843
|
|
|
@@ -850,12 +850,12 @@ const FieldLabelWrapper = styled.div(_t4$6 || (_t4$6 = _$7`
|
|
|
850
850
|
}
|
|
851
851
|
`), RequiredText, theme$1(o => o.margin.left(4)), SubLabelClickable, theme$1(o => o.margin.left('auto')));
|
|
852
852
|
|
|
853
|
-
let _$
|
|
854
|
-
_t$
|
|
855
|
-
_t2$
|
|
856
|
-
_t3$
|
|
857
|
-
_t4$
|
|
858
|
-
_t5$
|
|
853
|
+
let _$7 = t => t,
|
|
854
|
+
_t$7,
|
|
855
|
+
_t2$7,
|
|
856
|
+
_t3$7,
|
|
857
|
+
_t4$6,
|
|
858
|
+
_t5$6,
|
|
859
859
|
_t6$3,
|
|
860
860
|
_t7$2,
|
|
861
861
|
_t8,
|
|
@@ -1099,7 +1099,7 @@ const MultiLineTextField = React__default.forwardRef(function MultiLineTextField
|
|
|
1099
1099
|
invalid: invalid
|
|
1100
1100
|
}, invalid ? errorMessageProps : descriptionProps), assistiveText));
|
|
1101
1101
|
});
|
|
1102
|
-
const TextFieldRoot = styled.div(_t$
|
|
1102
|
+
const TextFieldRoot = styled.div(_t$7 || (_t$7 = _$7`
|
|
1103
1103
|
display: flex;
|
|
1104
1104
|
flex-direction: column;
|
|
1105
1105
|
|
|
@@ -1107,21 +1107,21 @@ const TextFieldRoot = styled.div(_t$6 || (_t$6 = _$6`
|
|
|
1107
1107
|
`), p => p.isDisabled && {
|
|
1108
1108
|
opacity: p.theme.elementEffect.disabled.opacity
|
|
1109
1109
|
});
|
|
1110
|
-
const TextFieldLabel = styled(FieldLabel)(_t2$
|
|
1110
|
+
const TextFieldLabel = styled(FieldLabel)(_t2$7 || (_t2$7 = _$7`
|
|
1111
1111
|
${0}
|
|
1112
1112
|
`), theme(o => o.margin.bottom(8)));
|
|
1113
|
-
const StyledInputContainer = styled.div(_t3$
|
|
1113
|
+
const StyledInputContainer = styled.div(_t3$7 || (_t3$7 = _$7`
|
|
1114
1114
|
height: 40px;
|
|
1115
1115
|
display: grid;
|
|
1116
1116
|
position: relative;
|
|
1117
1117
|
`));
|
|
1118
|
-
const PrefixContainer = styled.span(_t4$
|
|
1118
|
+
const PrefixContainer = styled.span(_t4$6 || (_t4$6 = _$7`
|
|
1119
1119
|
position: absolute;
|
|
1120
1120
|
top: 50%;
|
|
1121
1121
|
left: 8px;
|
|
1122
1122
|
transform: translateY(-50%);
|
|
1123
1123
|
`));
|
|
1124
|
-
const SuffixContainer = styled.span(_t5$
|
|
1124
|
+
const SuffixContainer = styled.span(_t5$6 || (_t5$6 = _$7`
|
|
1125
1125
|
position: absolute;
|
|
1126
1126
|
top: 50%;
|
|
1127
1127
|
right: 8px;
|
|
@@ -1130,12 +1130,12 @@ const SuffixContainer = styled.span(_t5$5 || (_t5$5 = _$6`
|
|
|
1130
1130
|
display: flex;
|
|
1131
1131
|
gap: 8px;
|
|
1132
1132
|
`));
|
|
1133
|
-
const Affix = styled.span(_t6$3 || (_t6$3 = _$
|
|
1133
|
+
const Affix = styled.span(_t6$3 || (_t6$3 = _$7`
|
|
1134
1134
|
user-select: none;
|
|
1135
1135
|
|
|
1136
1136
|
${0}
|
|
1137
1137
|
`), theme(o => [o.typography(14).preserveHalfLeading, o.font.text2]));
|
|
1138
|
-
const StyledInput = styled.input(_t7$2 || (_t7$2 = _$
|
|
1138
|
+
const StyledInput = styled.input(_t7$2 || (_t7$2 = _$7`
|
|
1139
1139
|
border: none;
|
|
1140
1140
|
box-sizing: border-box;
|
|
1141
1141
|
outline: none;
|
|
@@ -1161,7 +1161,7 @@ const StyledInput = styled.input(_t7$2 || (_t7$2 = _$6`
|
|
|
1161
1161
|
${0}
|
|
1162
1162
|
}
|
|
1163
1163
|
`), p => p.extraLeftPadding, p => p.extraRightPadding, p => theme(o => [o.bg.surface3.hover, o.outline.default.focus, p.invalid && o.outline.assertive, o.font.text2]), theme(o => o.font.text3));
|
|
1164
|
-
const StyledTextareaContainer = styled.div(_t8 || (_t8 = _$
|
|
1164
|
+
const StyledTextareaContainer = styled.div(_t8 || (_t8 = _$7`
|
|
1165
1165
|
position: relative;
|
|
1166
1166
|
overflow: hidden;
|
|
1167
1167
|
padding: 0 8px;
|
|
@@ -1175,10 +1175,10 @@ const StyledTextareaContainer = styled.div(_t8 || (_t8 = _$6`
|
|
|
1175
1175
|
${0};
|
|
1176
1176
|
`), p => theme(o => [o.bg.surface3.hover, p.invalid && o.outline.assertive, o.font.text2, o.borderRadius(4)]), p => theme(o => p.invalid ? o.outline.assertive : o.outline.default), ({
|
|
1177
1177
|
rows
|
|
1178
|
-
}) => css(_t9 || (_t9 = _$
|
|
1178
|
+
}) => css(_t9 || (_t9 = _$7`
|
|
1179
1179
|
height: calc(22px * ${0} + 18px);
|
|
1180
1180
|
`), rows));
|
|
1181
|
-
const StyledTextarea = styled.textarea(_t10 || (_t10 = _$
|
|
1181
|
+
const StyledTextarea = styled.textarea(_t10 || (_t10 = _$7`
|
|
1182
1182
|
border: none;
|
|
1183
1183
|
outline: none;
|
|
1184
1184
|
resize: none;
|
|
@@ -1213,20 +1213,20 @@ const StyledTextarea = styled.textarea(_t10 || (_t10 = _$6`
|
|
|
1213
1213
|
scrollbar-width: none; /* Firefox */
|
|
1214
1214
|
`), p => p.noBottomPadding ? 0 : '', ({
|
|
1215
1215
|
rows: _rows = 1
|
|
1216
|
-
}) => css(_t11 || (_t11 = _$
|
|
1216
|
+
}) => css(_t11 || (_t11 = _$7`
|
|
1217
1217
|
height: calc(22px / 0.875 * ${0});
|
|
1218
1218
|
`), _rows), theme(o => o.font.text3));
|
|
1219
|
-
const SingleLineCounter = styled.span(_t12 || (_t12 = _$
|
|
1219
|
+
const SingleLineCounter = styled.span(_t12 || (_t12 = _$7`
|
|
1220
1220
|
${0}
|
|
1221
1221
|
`), theme(o => [o.typography(14).preserveHalfLeading, o.font.text3]));
|
|
1222
|
-
const MultiLineCounter = styled.span(_t13 || (_t13 = _$
|
|
1222
|
+
const MultiLineCounter = styled.span(_t13 || (_t13 = _$7`
|
|
1223
1223
|
position: absolute;
|
|
1224
1224
|
bottom: 9px;
|
|
1225
1225
|
right: 8px;
|
|
1226
1226
|
|
|
1227
1227
|
${0}
|
|
1228
1228
|
`), theme(o => [o.typography(14).preserveHalfLeading, o.font.text3]));
|
|
1229
|
-
const AssistiveText = styled.p(_t14 || (_t14 = _$
|
|
1229
|
+
const AssistiveText = styled.p(_t14 || (_t14 = _$7`
|
|
1230
1230
|
${0}
|
|
1231
1231
|
`), p => theme(o => [o.typography(14), o.margin.top(8), o.margin.bottom(0), o.font[p.invalid ? 'assertive' : 'text1']]));
|
|
1232
1232
|
|
|
@@ -18557,12 +18557,12 @@ const host = createHost(primitives, {
|
|
|
18557
18557
|
});
|
|
18558
18558
|
const animated = host.animated;
|
|
18559
18559
|
|
|
18560
|
-
let _$
|
|
18561
|
-
_t$
|
|
18562
|
-
_t2$
|
|
18563
|
-
_t3$
|
|
18564
|
-
_t4$
|
|
18565
|
-
_t5$
|
|
18560
|
+
let _$6 = t => t,
|
|
18561
|
+
_t$6,
|
|
18562
|
+
_t2$6,
|
|
18563
|
+
_t3$6,
|
|
18564
|
+
_t4$5,
|
|
18565
|
+
_t5$5,
|
|
18566
18566
|
_t6$2,
|
|
18567
18567
|
_t7$1;
|
|
18568
18568
|
|
|
@@ -18665,7 +18665,7 @@ const ModalContext = React__default.createContext({
|
|
|
18665
18665
|
close: undefined,
|
|
18666
18666
|
showDismiss: true
|
|
18667
18667
|
});
|
|
18668
|
-
const ModalBackground = animated(styled.div(_t$
|
|
18668
|
+
const ModalBackground = animated(styled.div(_t$6 || (_t$6 = _$6`
|
|
18669
18669
|
z-index: ${0};
|
|
18670
18670
|
position: fixed;
|
|
18671
18671
|
top: 0;
|
|
@@ -18677,7 +18677,7 @@ const ModalBackground = animated(styled.div(_t$5 || (_t$5 = _$5`
|
|
|
18677
18677
|
`), ({
|
|
18678
18678
|
zIndex
|
|
18679
18679
|
}) => zIndex, theme$2(o => [o.bg.surface4])));
|
|
18680
|
-
const ModalDialog = animated(styled.div(_t2$
|
|
18680
|
+
const ModalDialog = animated(styled.div(_t2$6 || (_t2$6 = _$6`
|
|
18681
18681
|
position: absolute;
|
|
18682
18682
|
top: 50%;
|
|
18683
18683
|
left: 50%;
|
|
@@ -18692,7 +18692,7 @@ const ModalDialog = animated(styled.div(_t2$5 || (_t2$5 = _$5`
|
|
|
18692
18692
|
`), p => p.size === 'S' ? columnSystem(3, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : p.size === 'M' ? columnSystem(4, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
18693
18693
|
p.size === 'L' ? columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : unreachable(p.size), theme$2(o => [o.bg.background1, o.borderRadius(24)]), ({
|
|
18694
18694
|
theme
|
|
18695
|
-
}) => maxWidth(theme.breakpoint.screen1), p => p.bottomSheet === 'full' ? css(_t3$
|
|
18695
|
+
}) => maxWidth(theme.breakpoint.screen1), p => p.bottomSheet === 'full' ? css(_t3$6 || (_t3$6 = _$6`
|
|
18696
18696
|
top: auto;
|
|
18697
18697
|
bottom: 0;
|
|
18698
18698
|
left: 0;
|
|
@@ -18700,29 +18700,79 @@ p.size === 'L' ? columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2 : u
|
|
|
18700
18700
|
border-radius: 0;
|
|
18701
18701
|
width: 100%;
|
|
18702
18702
|
height: 100%;
|
|
18703
|
-
`)) : p.bottomSheet ? css(_t4$
|
|
18703
|
+
`)) : p.bottomSheet ? css(_t4$5 || (_t4$5 = _$6`
|
|
18704
18704
|
top: auto;
|
|
18705
18705
|
bottom: 0;
|
|
18706
18706
|
left: 0;
|
|
18707
18707
|
transform: none;
|
|
18708
18708
|
border-radius: 0;
|
|
18709
18709
|
width: 100%;
|
|
18710
|
-
`)) : css(_t5$
|
|
18710
|
+
`)) : css(_t5$5 || (_t5$5 = _$6`
|
|
18711
18711
|
width: calc(100% - 48px);
|
|
18712
18712
|
`))));
|
|
18713
|
-
const ModalCrossButton = styled(IconButton)(_t6$2 || (_t6$2 = _$
|
|
18713
|
+
const ModalCrossButton = styled(IconButton)(_t6$2 || (_t6$2 = _$6`
|
|
18714
18714
|
position: absolute;
|
|
18715
18715
|
top: 8px;
|
|
18716
18716
|
right: 8px;
|
|
18717
18717
|
|
|
18718
18718
|
${0}
|
|
18719
18719
|
`), theme$2(o => [o.font.text3.hover.press]));
|
|
18720
|
-
|
|
18720
|
+
function ModalTitle(props) {
|
|
18721
|
+
const {
|
|
18722
|
+
titleProps,
|
|
18723
|
+
title
|
|
18724
|
+
} = useContext(ModalContext);
|
|
18725
|
+
return /*#__PURE__*/React__default.createElement(ModalHeading, _extends$3({}, titleProps, props), title);
|
|
18726
|
+
}
|
|
18727
|
+
const ModalHeading = styled.h3(_t7$1 || (_t7$1 = _$6`
|
|
18721
18728
|
margin: 0;
|
|
18722
18729
|
font-weight: inherit;
|
|
18723
18730
|
font-size: inherit;
|
|
18724
18731
|
`));
|
|
18725
18732
|
|
|
18733
|
+
let _$5 = t => t,
|
|
18734
|
+
_t$5,
|
|
18735
|
+
_t2$5,
|
|
18736
|
+
_t3$5,
|
|
18737
|
+
_t4$4,
|
|
18738
|
+
_t5$4;
|
|
18739
|
+
function ModalHeader() {
|
|
18740
|
+
return /*#__PURE__*/React__default.createElement(ModalHeaderRoot, null, /*#__PURE__*/React__default.createElement(StyledModalTitle, null));
|
|
18741
|
+
}
|
|
18742
|
+
const ModalHeaderRoot = styled.div(_t$5 || (_t$5 = _$5`
|
|
18743
|
+
height: 64px;
|
|
18744
|
+
display: grid;
|
|
18745
|
+
align-content: center;
|
|
18746
|
+
justify-content: center;
|
|
18747
|
+
`));
|
|
18748
|
+
const StyledModalTitle = styled(ModalTitle)(_t2$5 || (_t2$5 = _$5`
|
|
18749
|
+
${0}
|
|
18750
|
+
`), theme$2(o => [o.font.text1, o.typography(16).bold]));
|
|
18751
|
+
const ModalAlign = styled.div(_t3$5 || (_t3$5 = _$5`
|
|
18752
|
+
${0}
|
|
18753
|
+
|
|
18754
|
+
@media ${0} {
|
|
18755
|
+
${0}
|
|
18756
|
+
}
|
|
18757
|
+
`), theme$2(o => [o.padding.horizontal(24)]), ({
|
|
18758
|
+
theme
|
|
18759
|
+
}) => maxWidth(theme.breakpoint.screen1), theme$2(o => [o.padding.horizontal(16)]));
|
|
18760
|
+
const ModalBody = styled.div(_t4$4 || (_t4$4 = _$5`
|
|
18761
|
+
${0}
|
|
18762
|
+
`), theme$2(o => [o.padding.bottom(40)]));
|
|
18763
|
+
const ModalButtons = styled.div(_t5$4 || (_t5$4 = _$5`
|
|
18764
|
+
display: grid;
|
|
18765
|
+
grid-auto-flow: row;
|
|
18766
|
+
grid-row-gap: 8px;
|
|
18767
|
+
${0}
|
|
18768
|
+
|
|
18769
|
+
@media ${0} {
|
|
18770
|
+
${0}
|
|
18771
|
+
}
|
|
18772
|
+
`), theme$2(o => [o.padding.horizontal(24).top(16)]), ({
|
|
18773
|
+
theme
|
|
18774
|
+
}) => maxWidth(theme.breakpoint.screen1), theme$2(o => [o.padding.horizontal(16)]));
|
|
18775
|
+
|
|
18726
18776
|
let _$4 = t => t,
|
|
18727
18777
|
_t$4,
|
|
18728
18778
|
_t2$4,
|
|
@@ -21910,5 +21960,5 @@ const InputLabel = styled.div(_t5 || (_t5 = _`
|
|
|
21910
21960
|
${0}
|
|
21911
21961
|
`), theme$2(o => [o.typography(14)]));
|
|
21912
21962
|
|
|
21913
|
-
export { Button, index as Checkbox, Clickable, ComponentAbstraction, DropdownSelector, DropdownSelectorItem, Icon$1 as Icon, IconButton, LoadingSpinner, LoadingSpinnerIcon, Modal, MultiSelect, MultiSelectGroup, Radio, RadioGroup, index$1 as SegmentedControl, SwitchCheckbox as Switch, TextField, useComponentAbstraction };
|
|
21963
|
+
export { Button, index as Checkbox, Clickable, ComponentAbstraction, DropdownSelector, DropdownSelectorItem, Icon$1 as Icon, IconButton, LoadingSpinner, LoadingSpinnerIcon, Modal, ModalAlign, ModalBody, ModalButtons, ModalHeader, MultiSelect, MultiSelectGroup, Radio, RadioGroup, index$1 as SegmentedControl, SwitchCheckbox as Switch, TextField, useComponentAbstraction };
|
|
21914
21964
|
//# sourceMappingURL=index.modern.js.map
|