@xqmsg/ui-core 0.24.9 → 0.24.11
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/components/form/FormTypes.d.ts +2 -2
- package/dist/components/input/InputTypes.d.ts +0 -1
- package/dist/components/input/StackedMultiSelect/index.d.ts +2 -2
- package/dist/components/input/StackedRadio/StackedRadioGroup.d.ts +2 -2
- package/dist/components/input/StackedSelect/index.d.ts +4 -3
- package/dist/components/input/components/dropdown/index.d.ts +2 -2
- package/dist/components/input/index.d.ts +5 -4
- package/dist/components/select/index.d.ts +3 -3
- package/dist/components/toolbar/components/actions/sort/index.d.ts +2 -2
- package/dist/components/toolbar/components/dropdown/index.d.ts +2 -2
- package/dist/theme/components/menu.d.ts +55 -0
- package/dist/ui-core.cjs.development.js +109 -34
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +109 -34
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/form/FormTypes.ts +2 -2
- package/src/components/icons/workspace/index.tsx +1 -1
- package/src/components/input/Input.stories.tsx +1 -0
- package/src/components/input/InputTypes.ts +0 -2
- package/src/components/input/StackedMultiSelect/index.tsx +6 -9
- package/src/components/input/StackedRadio/StackedRadioGroup.tsx +2 -3
- package/src/components/input/StackedSelect/index.tsx +16 -12
- package/src/components/input/components/dropdown/index.tsx +2 -2
- package/src/components/input/index.tsx +9 -6
- package/src/components/select/index.tsx +3 -3
- package/src/components/toolbar/components/actions/sort/index.tsx +2 -2
- package/src/components/toolbar/components/dropdown/index.tsx +2 -2
- package/src/theme/components/menu.ts +78 -0
- package/src/theme/customXQChakraTheme.ts +2 -0
package/dist/ui-core.esm.js
CHANGED
|
@@ -1034,7 +1034,7 @@ var Dropdown$1 = function Dropdown(_ref) {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
};
|
|
1036
1036
|
|
|
1037
|
-
var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "disabled", "value", "fullOptions", "loadingOptions"];
|
|
1037
|
+
var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "disabled", "value", "fullOptions", "loadingOptions", "searchable"];
|
|
1038
1038
|
/**
|
|
1039
1039
|
* A functional React component utilized to render the `StackedSelect` component.
|
|
1040
1040
|
*/
|
|
@@ -1049,6 +1049,8 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1049
1049
|
value = _ref2.value,
|
|
1050
1050
|
fullOptions = _ref2.fullOptions,
|
|
1051
1051
|
loadingOptions = _ref2.loadingOptions,
|
|
1052
|
+
_ref2$searchable = _ref2.searchable,
|
|
1053
|
+
searchable = _ref2$searchable === void 0 ? true : _ref2$searchable,
|
|
1052
1054
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
1053
1055
|
var dropdownRef = useRef(null);
|
|
1054
1056
|
var dropdownMenuRef = useRef(null);
|
|
@@ -1167,11 +1169,13 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1167
1169
|
}));
|
|
1168
1170
|
}, [options, searchValue]);
|
|
1169
1171
|
var handleInput = function handleInput(e) {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1172
|
+
if (searchable) {
|
|
1173
|
+
var _filteredOptions$;
|
|
1174
|
+
var initialOptionIndex = filteredOptions.length && ((_filteredOptions$ = filteredOptions[0]) == null ? void 0 : _filteredOptions$.value) === 'section_header' ? 1 : 0;
|
|
1175
|
+
setOptionIndex(initialOptionIndex);
|
|
1176
|
+
var _value = e.target.value;
|
|
1177
|
+
setSearchValue(_value);
|
|
1178
|
+
}
|
|
1175
1179
|
};
|
|
1176
1180
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1177
1181
|
ref: dropdownRef,
|
|
@@ -1184,7 +1188,6 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1184
1188
|
return setIsFocussed(!isFocussed);
|
|
1185
1189
|
},
|
|
1186
1190
|
cursor: isFocussed ? 'default' : 'pointer',
|
|
1187
|
-
color: loadingOptions ? 'transparent' : 'inital',
|
|
1188
1191
|
fontSize: "13px",
|
|
1189
1192
|
value: isFocussed ? searchValue : selectedOption,
|
|
1190
1193
|
autoComplete: "off",
|
|
@@ -1590,6 +1593,7 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1590
1593
|
optionIndex: optionIndex,
|
|
1591
1594
|
loading: loadingOptions
|
|
1592
1595
|
}, /*#__PURE__*/React__default.createElement(Input$2, {
|
|
1596
|
+
autoFocus: true,
|
|
1593
1597
|
value: searchValue,
|
|
1594
1598
|
onChange: handleInput,
|
|
1595
1599
|
disabled: loadingOptions
|
|
@@ -1939,7 +1943,8 @@ function Input(_ref) {
|
|
|
1939
1943
|
separators = _ref.separators,
|
|
1940
1944
|
_ref$loadingOptions = _ref.loadingOptions,
|
|
1941
1945
|
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
|
|
1942
|
-
truncatePillLength = _ref.truncatePillLength
|
|
1946
|
+
truncatePillLength = _ref.truncatePillLength,
|
|
1947
|
+
searchable = _ref.searchable;
|
|
1943
1948
|
function selectedInputField(onChange, onBlur, ref, value) {
|
|
1944
1949
|
switch (inputType) {
|
|
1945
1950
|
case 'text':
|
|
@@ -1994,7 +1999,8 @@ function Input(_ref) {
|
|
|
1994
1999
|
defaultValue: defaultValue,
|
|
1995
2000
|
placeholder: placeholder,
|
|
1996
2001
|
fullOptions: fullOptions,
|
|
1997
|
-
loadingOptions: loadingOptions
|
|
2002
|
+
loadingOptions: loadingOptions,
|
|
2003
|
+
searchable: searchable
|
|
1998
2004
|
});
|
|
1999
2005
|
case 'textarea':
|
|
2000
2006
|
return /*#__PURE__*/React__default.createElement(StackedTextarea, {
|
|
@@ -3027,7 +3033,8 @@ var Workspace = function Workspace(_ref) {
|
|
|
3027
3033
|
filled = _ref$filled === void 0 ? false : _ref$filled;
|
|
3028
3034
|
if (filled) {
|
|
3029
3035
|
return /*#__PURE__*/React__default.createElement(Memo$w, {
|
|
3030
|
-
|
|
3036
|
+
width: boxSize,
|
|
3037
|
+
height: boxSize
|
|
3031
3038
|
});
|
|
3032
3039
|
}
|
|
3033
3040
|
return /*#__PURE__*/React__default.createElement(Image$1, {
|
|
@@ -4263,8 +4270,75 @@ var Link$1 = {
|
|
|
4263
4270
|
variants: variants$6
|
|
4264
4271
|
};
|
|
4265
4272
|
|
|
4266
|
-
var parts$4 = ['
|
|
4267
|
-
|
|
4273
|
+
var parts$4 = ['item', 'command', 'list', 'button', 'groupTitle'];
|
|
4274
|
+
function baseStyleList(props) {
|
|
4275
|
+
return {
|
|
4276
|
+
bg: colors.fill.light.quaternary,
|
|
4277
|
+
boxShadow: mode("2xl", "dark-lg")(props),
|
|
4278
|
+
color: 'inherit',
|
|
4279
|
+
minW: '3xs',
|
|
4280
|
+
py: 4,
|
|
4281
|
+
px: 2,
|
|
4282
|
+
zIndex: 'docked',
|
|
4283
|
+
borderWidth: 0,
|
|
4284
|
+
overflow: 'hidden',
|
|
4285
|
+
backdropFilter: 'auto',
|
|
4286
|
+
backdropBlur: '64px',
|
|
4287
|
+
borderRadius: '4px',
|
|
4288
|
+
border: '0.25px solid',
|
|
4289
|
+
borderColor: colors.fill.light.tertiary
|
|
4290
|
+
};
|
|
4291
|
+
}
|
|
4292
|
+
function baseStyleItem(props) {
|
|
4293
|
+
return {
|
|
4294
|
+
fontSize: '13px;',
|
|
4295
|
+
fontWeight: 500,
|
|
4296
|
+
lineHeight: '16px',
|
|
4297
|
+
py: 3,
|
|
4298
|
+
px: 4,
|
|
4299
|
+
borderRadius: '4px',
|
|
4300
|
+
width: '100%',
|
|
4301
|
+
transition: 'background 50ms ease-in 0s',
|
|
4302
|
+
_hover: {
|
|
4303
|
+
color: colors.white,
|
|
4304
|
+
background: colors.fill.action
|
|
4305
|
+
},
|
|
4306
|
+
_active: {
|
|
4307
|
+
bg: mode("gray.200", "whiteAlpha.200")(props)
|
|
4308
|
+
},
|
|
4309
|
+
_expanded: {
|
|
4310
|
+
bg: mode("gray.100", "whiteAlpha.100")(props)
|
|
4311
|
+
},
|
|
4312
|
+
_disabled: {
|
|
4313
|
+
opacity: 0.4,
|
|
4314
|
+
cursor: 'not-allowed'
|
|
4315
|
+
}
|
|
4316
|
+
};
|
|
4317
|
+
}
|
|
4318
|
+
var baseStyleGroupTitle = {
|
|
4319
|
+
mx: 4,
|
|
4320
|
+
my: 2,
|
|
4321
|
+
fontWeight: 'semibold',
|
|
4322
|
+
fontSize: 'sm'
|
|
4323
|
+
};
|
|
4324
|
+
var baseStyleCommand = {
|
|
4325
|
+
opacity: 0.6
|
|
4326
|
+
};
|
|
4327
|
+
var baseStyle$9 = function baseStyle(props) {
|
|
4328
|
+
return {
|
|
4329
|
+
list: baseStyleList(props),
|
|
4330
|
+
item: baseStyleItem(props),
|
|
4331
|
+
groupTitle: baseStyleGroupTitle,
|
|
4332
|
+
command: baseStyleCommand
|
|
4333
|
+
};
|
|
4334
|
+
};
|
|
4335
|
+
var Menu$1 = {
|
|
4336
|
+
parts: parts$4,
|
|
4337
|
+
baseStyle: baseStyle$9
|
|
4338
|
+
};
|
|
4339
|
+
|
|
4340
|
+
var parts$5 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
|
|
4341
|
+
var baseStyle$a = {
|
|
4268
4342
|
width: 'fit-content',
|
|
4269
4343
|
height: 'fit-content',
|
|
4270
4344
|
background: '#F6F6F6',
|
|
@@ -4295,8 +4369,8 @@ var baseStyle$9 = {
|
|
|
4295
4369
|
}
|
|
4296
4370
|
};
|
|
4297
4371
|
var Modal$1 = {
|
|
4298
|
-
parts: parts$
|
|
4299
|
-
baseStyle: baseStyle$
|
|
4372
|
+
parts: parts$5,
|
|
4373
|
+
baseStyle: baseStyle$a
|
|
4300
4374
|
};
|
|
4301
4375
|
|
|
4302
4376
|
var Popover = {
|
|
@@ -4309,7 +4383,7 @@ var Popover = {
|
|
|
4309
4383
|
|
|
4310
4384
|
var defaultProps$5 = Input$1.defaultProps,
|
|
4311
4385
|
variants$7 = Input$1.variants;
|
|
4312
|
-
var parts$
|
|
4386
|
+
var parts$6 = ['field', 'icon'];
|
|
4313
4387
|
function baseStyleField() {
|
|
4314
4388
|
return _extends$6({}, Input$1.baseStyle.field, {
|
|
4315
4389
|
appearance: 'none',
|
|
@@ -4328,20 +4402,20 @@ var baseStyleInput = {
|
|
|
4328
4402
|
opacity: 0.5
|
|
4329
4403
|
}
|
|
4330
4404
|
};
|
|
4331
|
-
var baseStyle$
|
|
4405
|
+
var baseStyle$b = function baseStyle() {
|
|
4332
4406
|
return {
|
|
4333
4407
|
field: baseStyleField(),
|
|
4334
4408
|
icon: baseStyleInput
|
|
4335
4409
|
};
|
|
4336
4410
|
};
|
|
4337
4411
|
var Select = {
|
|
4338
|
-
parts: parts$
|
|
4339
|
-
baseStyle: baseStyle$
|
|
4412
|
+
parts: parts$6,
|
|
4413
|
+
baseStyle: baseStyle$b,
|
|
4340
4414
|
variants: variants$7,
|
|
4341
4415
|
defaultProps: defaultProps$5
|
|
4342
4416
|
};
|
|
4343
4417
|
|
|
4344
|
-
var parts$
|
|
4418
|
+
var parts$7 = ['track', 'thumb'];
|
|
4345
4419
|
function baseStyleTrack(props) {
|
|
4346
4420
|
var c = props.colorScheme,
|
|
4347
4421
|
theme = props.theme;
|
|
@@ -4371,7 +4445,7 @@ var baseStyleThumb = {
|
|
|
4371
4445
|
borderRadius: 'full',
|
|
4372
4446
|
transform: 'translateX(0)'
|
|
4373
4447
|
};
|
|
4374
|
-
var baseStyle$
|
|
4448
|
+
var baseStyle$c = function baseStyle(props) {
|
|
4375
4449
|
return {
|
|
4376
4450
|
track: baseStyleTrack(props),
|
|
4377
4451
|
thumb: baseStyleThumb
|
|
@@ -4423,14 +4497,14 @@ var defaultProps$6 = {
|
|
|
4423
4497
|
colorScheme: 'blue'
|
|
4424
4498
|
};
|
|
4425
4499
|
var Switch = {
|
|
4426
|
-
parts: parts$
|
|
4427
|
-
baseStyle: baseStyle$
|
|
4500
|
+
parts: parts$7,
|
|
4501
|
+
baseStyle: baseStyle$c,
|
|
4428
4502
|
sizes: sizes,
|
|
4429
4503
|
defaultProps: defaultProps$6
|
|
4430
4504
|
};
|
|
4431
4505
|
|
|
4432
|
-
var parts$
|
|
4433
|
-
var baseStyle$
|
|
4506
|
+
var parts$8 = ['th', 'td', 'tr', 'body', 'thead'];
|
|
4507
|
+
var baseStyle$d = {
|
|
4434
4508
|
thead: {
|
|
4435
4509
|
bg: colors.label.primary.dark
|
|
4436
4510
|
},
|
|
@@ -4466,11 +4540,11 @@ var baseStyle$c = {
|
|
|
4466
4540
|
}
|
|
4467
4541
|
};
|
|
4468
4542
|
var Table = {
|
|
4469
|
-
parts: parts$
|
|
4470
|
-
baseStyle: baseStyle$
|
|
4543
|
+
parts: parts$8,
|
|
4544
|
+
baseStyle: baseStyle$d
|
|
4471
4545
|
};
|
|
4472
4546
|
|
|
4473
|
-
var parts$
|
|
4547
|
+
var parts$9 = ['root', 'tablist', 'tab', 'tabpanel', 'indicator'];
|
|
4474
4548
|
function baseStyleRoot(props) {
|
|
4475
4549
|
var orientation = props.orientation;
|
|
4476
4550
|
return {
|
|
@@ -4505,7 +4579,7 @@ function baseStyleTablist(props) {
|
|
|
4505
4579
|
var baseStyleTabpanel = {
|
|
4506
4580
|
p: 4
|
|
4507
4581
|
};
|
|
4508
|
-
var baseStyle$
|
|
4582
|
+
var baseStyle$e = function baseStyle(props) {
|
|
4509
4583
|
return {
|
|
4510
4584
|
root: baseStyleRoot(props),
|
|
4511
4585
|
tab: baseStyleTab(props),
|
|
@@ -4691,14 +4765,14 @@ var defaultProps$7 = {
|
|
|
4691
4765
|
colorScheme: 'blue'
|
|
4692
4766
|
};
|
|
4693
4767
|
var Tabs = {
|
|
4694
|
-
parts: parts$
|
|
4695
|
-
baseStyle: baseStyle$
|
|
4768
|
+
parts: parts$9,
|
|
4769
|
+
baseStyle: baseStyle$e,
|
|
4696
4770
|
sizes: sizes$1,
|
|
4697
4771
|
variants: variants$8,
|
|
4698
4772
|
defaultProps: defaultProps$7
|
|
4699
4773
|
};
|
|
4700
4774
|
|
|
4701
|
-
var baseStyle$
|
|
4775
|
+
var baseStyle$f = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
|
|
4702
4776
|
fontSize: '13px',
|
|
4703
4777
|
display: 'block',
|
|
4704
4778
|
paddingY: '8px',
|
|
@@ -4706,7 +4780,7 @@ var baseStyle$e = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
|
|
|
4706
4780
|
height: '78px',
|
|
4707
4781
|
lineHeight: 'short'
|
|
4708
4782
|
});
|
|
4709
|
-
var mobileInputs$1 = /*#__PURE__*/defineStyle$1( /*#__PURE__*/_extends$6({}, baseStyle$
|
|
4783
|
+
var mobileInputs$1 = /*#__PURE__*/defineStyle$1( /*#__PURE__*/_extends$6({}, baseStyle$f, Input$1.variants.mobile.field, {
|
|
4710
4784
|
border: 'none',
|
|
4711
4785
|
borderRadius: 0,
|
|
4712
4786
|
paddingY: '16px',
|
|
@@ -4721,14 +4795,14 @@ var mobileInputs$1 = /*#__PURE__*/defineStyle$1( /*#__PURE__*/_extends$6({}, bas
|
|
|
4721
4795
|
minHeight: '208px'
|
|
4722
4796
|
}));
|
|
4723
4797
|
var variants$9 = {
|
|
4724
|
-
"default": baseStyle$
|
|
4798
|
+
"default": baseStyle$f,
|
|
4725
4799
|
mobile: mobileInputs$1
|
|
4726
4800
|
};
|
|
4727
4801
|
var defaultProps$8 = {
|
|
4728
4802
|
variant: 'default'
|
|
4729
4803
|
};
|
|
4730
4804
|
var Textarea = {
|
|
4731
|
-
baseStyle: baseStyle$
|
|
4805
|
+
baseStyle: baseStyle$f,
|
|
4732
4806
|
variants: variants$9,
|
|
4733
4807
|
defaultProps: defaultProps$8
|
|
4734
4808
|
};
|
|
@@ -4860,6 +4934,7 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends$6({
|
|
|
4860
4934
|
FormLabel: FormLabel,
|
|
4861
4935
|
Input: Input$1,
|
|
4862
4936
|
Link: Link$1,
|
|
4937
|
+
Menu: Menu$1,
|
|
4863
4938
|
Modal: Modal$1,
|
|
4864
4939
|
Popover: Popover,
|
|
4865
4940
|
Select: Select,
|