@xqmsg/ui-core 0.24.10 → 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 +3 -3
- package/dist/components/input/components/dropdown/index.d.ts +2 -2
- package/dist/components/input/index.d.ts +3 -3
- 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 +92 -24
- 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 +92 -24
- 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/input/InputTypes.ts +0 -2
- package/src/components/input/StackedMultiSelect/index.tsx +5 -9
- package/src/components/input/StackedRadio/StackedRadioGroup.tsx +2 -3
- package/src/components/input/StackedSelect/index.tsx +4 -4
- package/src/components/input/components/dropdown/index.tsx +2 -2
- package/src/components/input/index.tsx +6 -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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldOption, InputType } from '../input/InputTypes';
|
|
2
2
|
export interface FormInput {
|
|
3
3
|
label: string;
|
|
4
4
|
name: string;
|
|
5
5
|
ariaLabel: string;
|
|
6
6
|
inputType: InputType;
|
|
7
|
-
options?:
|
|
7
|
+
options?: FieldOption[];
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
maxLength?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldOption, ReactSelectFieldProps } from '../InputTypes';
|
|
3
3
|
import { Control, FieldValues, UseFormClearErrors, UseFormSetError, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
export interface StackedMultiSelectProps extends ReactSelectFieldProps {
|
|
5
|
-
options:
|
|
5
|
+
options: FieldOption[];
|
|
6
6
|
setValue: UseFormSetValue<FieldValues>;
|
|
7
7
|
setError: UseFormSetError<FieldValues>;
|
|
8
8
|
clearErrors: UseFormClearErrors<FieldValues>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldOption, SelectFieldProps } from '../InputTypes';
|
|
3
3
|
export interface StackedRadioGroupProps extends SelectFieldProps {
|
|
4
4
|
flexDirection?: 'row' | 'column';
|
|
5
|
-
options:
|
|
5
|
+
options: FieldOption[];
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* A functional React component utilized to render the `StackedRadio` component.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldOption } from '../InputTypes';
|
|
3
3
|
import { StackedInputProps } from '../StackedInput/StackedInput';
|
|
4
4
|
import { UseFormSetValue, FieldValues, Control } from 'react-hook-form';
|
|
5
5
|
export interface StackedSelectProps extends StackedInputProps {
|
|
6
|
-
options:
|
|
7
|
-
fullOptions?:
|
|
6
|
+
options: FieldOption[];
|
|
7
|
+
fullOptions?: FieldOption[];
|
|
8
8
|
setValue: UseFormSetValue<FieldValues>;
|
|
9
9
|
control: Control<FieldValues, any>;
|
|
10
10
|
handleOnChange: (value?: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
import { FieldOption
|
|
2
|
+
import { FieldOption } from '../../InputTypes';
|
|
3
3
|
export interface DropdownProps {
|
|
4
4
|
onSelectItem: (option: FieldOption) => void;
|
|
5
|
-
options:
|
|
5
|
+
options: FieldOption[];
|
|
6
6
|
dropdownRef: RefObject<HTMLDivElement>;
|
|
7
7
|
position: 'top' | 'bottom';
|
|
8
8
|
optionIndex?: number | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldOption, ValidationProps, InputType } from './InputTypes';
|
|
3
3
|
import { Control, FieldValues, UseFormClearErrors, UseFormSetError, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
export interface InputProps<T extends FieldValues = FieldValues> extends ValidationProps {
|
|
5
5
|
inputType: InputType;
|
|
@@ -9,8 +9,8 @@ export interface InputProps<T extends FieldValues = FieldValues> extends Validat
|
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
label?: string;
|
|
11
11
|
className?: string;
|
|
12
|
-
options?:
|
|
13
|
-
fullOptions?:
|
|
12
|
+
options?: FieldOption[];
|
|
13
|
+
fullOptions?: FieldOption[];
|
|
14
14
|
maxLength?: number;
|
|
15
15
|
helperText?: React.ReactNode;
|
|
16
16
|
control: Control<T, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectProps } from '@chakra-ui/react';
|
|
3
3
|
import { Control, FieldValues, Path, UseFormClearErrors, UseFormSetError, UseFormSetValue } from 'react-hook-form';
|
|
4
|
-
import {
|
|
4
|
+
import { FieldOption, ValidationProps } from 'src/components/input/InputTypes';
|
|
5
5
|
export interface SelectNativeProps<T extends FieldValues> extends ValidationProps, SelectProps {
|
|
6
6
|
isRequired: boolean;
|
|
7
7
|
name: Path<T>;
|
|
@@ -10,8 +10,8 @@ export interface SelectNativeProps<T extends FieldValues> extends ValidationProp
|
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
label?: string;
|
|
12
12
|
className?: string;
|
|
13
|
-
options?:
|
|
14
|
-
fullOptions?:
|
|
13
|
+
options?: FieldOption[];
|
|
14
|
+
fullOptions?: FieldOption[];
|
|
15
15
|
helperText?: React.ReactNode;
|
|
16
16
|
control: Control<T, unknown>;
|
|
17
17
|
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FieldOption
|
|
2
|
+
import { FieldOption } from '../../../../input/InputTypes';
|
|
3
3
|
export interface SortProps {
|
|
4
4
|
onSelectItem: (option: FieldOption) => void;
|
|
5
|
-
sortOptions:
|
|
5
|
+
sortOptions: FieldOption[];
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* A functional React component utilized to render the `Sort` component
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
import { FieldOption
|
|
2
|
+
import { FieldOption } from '../../../input/InputTypes';
|
|
3
3
|
export interface DropdownProps {
|
|
4
4
|
onSelectItem: (option: FieldOption) => void;
|
|
5
|
-
options:
|
|
5
|
+
options: FieldOption[];
|
|
6
6
|
dropdownRef: RefObject<HTMLDivElement>;
|
|
7
7
|
position: 'top' | 'bottom';
|
|
8
8
|
optionIndex: number | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
parts: string[];
|
|
3
|
+
baseStyle: (props: Record<string, any>) => {
|
|
4
|
+
list: {
|
|
5
|
+
bg: string;
|
|
6
|
+
boxShadow: string;
|
|
7
|
+
color: string;
|
|
8
|
+
minW: string;
|
|
9
|
+
py: number;
|
|
10
|
+
px: number;
|
|
11
|
+
zIndex: string;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
overflow: string;
|
|
14
|
+
backdropFilter: string;
|
|
15
|
+
backdropBlur: string;
|
|
16
|
+
borderRadius: string;
|
|
17
|
+
border: string;
|
|
18
|
+
borderColor: string;
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
fontSize: string;
|
|
22
|
+
fontWeight: number;
|
|
23
|
+
lineHeight: string;
|
|
24
|
+
py: number;
|
|
25
|
+
px: number;
|
|
26
|
+
borderRadius: string;
|
|
27
|
+
width: string;
|
|
28
|
+
transition: string;
|
|
29
|
+
_hover: {
|
|
30
|
+
color: string;
|
|
31
|
+
background: string;
|
|
32
|
+
};
|
|
33
|
+
_active: {
|
|
34
|
+
bg: string;
|
|
35
|
+
};
|
|
36
|
+
_expanded: {
|
|
37
|
+
bg: string;
|
|
38
|
+
};
|
|
39
|
+
_disabled: {
|
|
40
|
+
opacity: number;
|
|
41
|
+
cursor: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
groupTitle: {
|
|
45
|
+
mx: number;
|
|
46
|
+
my: number;
|
|
47
|
+
fontWeight: string;
|
|
48
|
+
fontSize: string;
|
|
49
|
+
};
|
|
50
|
+
command: {
|
|
51
|
+
opacity: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
@@ -4277,8 +4277,75 @@ var Link$1 = {
|
|
|
4277
4277
|
variants: variants$6
|
|
4278
4278
|
};
|
|
4279
4279
|
|
|
4280
|
-
var parts$4 = ['
|
|
4281
|
-
|
|
4280
|
+
var parts$4 = ['item', 'command', 'list', 'button', 'groupTitle'];
|
|
4281
|
+
function baseStyleList(props) {
|
|
4282
|
+
return {
|
|
4283
|
+
bg: colors.fill.light.quaternary,
|
|
4284
|
+
boxShadow: themeTools.mode("2xl", "dark-lg")(props),
|
|
4285
|
+
color: 'inherit',
|
|
4286
|
+
minW: '3xs',
|
|
4287
|
+
py: 4,
|
|
4288
|
+
px: 2,
|
|
4289
|
+
zIndex: 'docked',
|
|
4290
|
+
borderWidth: 0,
|
|
4291
|
+
overflow: 'hidden',
|
|
4292
|
+
backdropFilter: 'auto',
|
|
4293
|
+
backdropBlur: '64px',
|
|
4294
|
+
borderRadius: '4px',
|
|
4295
|
+
border: '0.25px solid',
|
|
4296
|
+
borderColor: colors.fill.light.tertiary
|
|
4297
|
+
};
|
|
4298
|
+
}
|
|
4299
|
+
function baseStyleItem(props) {
|
|
4300
|
+
return {
|
|
4301
|
+
fontSize: '13px;',
|
|
4302
|
+
fontWeight: 500,
|
|
4303
|
+
lineHeight: '16px',
|
|
4304
|
+
py: 3,
|
|
4305
|
+
px: 4,
|
|
4306
|
+
borderRadius: '4px',
|
|
4307
|
+
width: '100%',
|
|
4308
|
+
transition: 'background 50ms ease-in 0s',
|
|
4309
|
+
_hover: {
|
|
4310
|
+
color: colors.white,
|
|
4311
|
+
background: colors.fill.action
|
|
4312
|
+
},
|
|
4313
|
+
_active: {
|
|
4314
|
+
bg: themeTools.mode("gray.200", "whiteAlpha.200")(props)
|
|
4315
|
+
},
|
|
4316
|
+
_expanded: {
|
|
4317
|
+
bg: themeTools.mode("gray.100", "whiteAlpha.100")(props)
|
|
4318
|
+
},
|
|
4319
|
+
_disabled: {
|
|
4320
|
+
opacity: 0.4,
|
|
4321
|
+
cursor: 'not-allowed'
|
|
4322
|
+
}
|
|
4323
|
+
};
|
|
4324
|
+
}
|
|
4325
|
+
var baseStyleGroupTitle = {
|
|
4326
|
+
mx: 4,
|
|
4327
|
+
my: 2,
|
|
4328
|
+
fontWeight: 'semibold',
|
|
4329
|
+
fontSize: 'sm'
|
|
4330
|
+
};
|
|
4331
|
+
var baseStyleCommand = {
|
|
4332
|
+
opacity: 0.6
|
|
4333
|
+
};
|
|
4334
|
+
var baseStyle$9 = function baseStyle(props) {
|
|
4335
|
+
return {
|
|
4336
|
+
list: baseStyleList(props),
|
|
4337
|
+
item: baseStyleItem(props),
|
|
4338
|
+
groupTitle: baseStyleGroupTitle,
|
|
4339
|
+
command: baseStyleCommand
|
|
4340
|
+
};
|
|
4341
|
+
};
|
|
4342
|
+
var Menu$1 = {
|
|
4343
|
+
parts: parts$4,
|
|
4344
|
+
baseStyle: baseStyle$9
|
|
4345
|
+
};
|
|
4346
|
+
|
|
4347
|
+
var parts$5 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
|
|
4348
|
+
var baseStyle$a = {
|
|
4282
4349
|
width: 'fit-content',
|
|
4283
4350
|
height: 'fit-content',
|
|
4284
4351
|
background: '#F6F6F6',
|
|
@@ -4309,8 +4376,8 @@ var baseStyle$9 = {
|
|
|
4309
4376
|
}
|
|
4310
4377
|
};
|
|
4311
4378
|
var Modal$1 = {
|
|
4312
|
-
parts: parts$
|
|
4313
|
-
baseStyle: baseStyle$
|
|
4379
|
+
parts: parts$5,
|
|
4380
|
+
baseStyle: baseStyle$a
|
|
4314
4381
|
};
|
|
4315
4382
|
|
|
4316
4383
|
var Popover = {
|
|
@@ -4323,7 +4390,7 @@ var Popover = {
|
|
|
4323
4390
|
|
|
4324
4391
|
var defaultProps$5 = Input$1.defaultProps,
|
|
4325
4392
|
variants$7 = Input$1.variants;
|
|
4326
|
-
var parts$
|
|
4393
|
+
var parts$6 = ['field', 'icon'];
|
|
4327
4394
|
function baseStyleField() {
|
|
4328
4395
|
return _extends$6({}, Input$1.baseStyle.field, {
|
|
4329
4396
|
appearance: 'none',
|
|
@@ -4342,20 +4409,20 @@ var baseStyleInput = {
|
|
|
4342
4409
|
opacity: 0.5
|
|
4343
4410
|
}
|
|
4344
4411
|
};
|
|
4345
|
-
var baseStyle$
|
|
4412
|
+
var baseStyle$b = function baseStyle() {
|
|
4346
4413
|
return {
|
|
4347
4414
|
field: baseStyleField(),
|
|
4348
4415
|
icon: baseStyleInput
|
|
4349
4416
|
};
|
|
4350
4417
|
};
|
|
4351
4418
|
var Select = {
|
|
4352
|
-
parts: parts$
|
|
4353
|
-
baseStyle: baseStyle$
|
|
4419
|
+
parts: parts$6,
|
|
4420
|
+
baseStyle: baseStyle$b,
|
|
4354
4421
|
variants: variants$7,
|
|
4355
4422
|
defaultProps: defaultProps$5
|
|
4356
4423
|
};
|
|
4357
4424
|
|
|
4358
|
-
var parts$
|
|
4425
|
+
var parts$7 = ['track', 'thumb'];
|
|
4359
4426
|
function baseStyleTrack(props) {
|
|
4360
4427
|
var c = props.colorScheme,
|
|
4361
4428
|
theme = props.theme;
|
|
@@ -4385,7 +4452,7 @@ var baseStyleThumb = {
|
|
|
4385
4452
|
borderRadius: 'full',
|
|
4386
4453
|
transform: 'translateX(0)'
|
|
4387
4454
|
};
|
|
4388
|
-
var baseStyle$
|
|
4455
|
+
var baseStyle$c = function baseStyle(props) {
|
|
4389
4456
|
return {
|
|
4390
4457
|
track: baseStyleTrack(props),
|
|
4391
4458
|
thumb: baseStyleThumb
|
|
@@ -4437,14 +4504,14 @@ var defaultProps$6 = {
|
|
|
4437
4504
|
colorScheme: 'blue'
|
|
4438
4505
|
};
|
|
4439
4506
|
var Switch = {
|
|
4440
|
-
parts: parts$
|
|
4441
|
-
baseStyle: baseStyle$
|
|
4507
|
+
parts: parts$7,
|
|
4508
|
+
baseStyle: baseStyle$c,
|
|
4442
4509
|
sizes: sizes,
|
|
4443
4510
|
defaultProps: defaultProps$6
|
|
4444
4511
|
};
|
|
4445
4512
|
|
|
4446
|
-
var parts$
|
|
4447
|
-
var baseStyle$
|
|
4513
|
+
var parts$8 = ['th', 'td', 'tr', 'body', 'thead'];
|
|
4514
|
+
var baseStyle$d = {
|
|
4448
4515
|
thead: {
|
|
4449
4516
|
bg: colors.label.primary.dark
|
|
4450
4517
|
},
|
|
@@ -4480,11 +4547,11 @@ var baseStyle$c = {
|
|
|
4480
4547
|
}
|
|
4481
4548
|
};
|
|
4482
4549
|
var Table = {
|
|
4483
|
-
parts: parts$
|
|
4484
|
-
baseStyle: baseStyle$
|
|
4550
|
+
parts: parts$8,
|
|
4551
|
+
baseStyle: baseStyle$d
|
|
4485
4552
|
};
|
|
4486
4553
|
|
|
4487
|
-
var parts$
|
|
4554
|
+
var parts$9 = ['root', 'tablist', 'tab', 'tabpanel', 'indicator'];
|
|
4488
4555
|
function baseStyleRoot(props) {
|
|
4489
4556
|
var orientation = props.orientation;
|
|
4490
4557
|
return {
|
|
@@ -4519,7 +4586,7 @@ function baseStyleTablist(props) {
|
|
|
4519
4586
|
var baseStyleTabpanel = {
|
|
4520
4587
|
p: 4
|
|
4521
4588
|
};
|
|
4522
|
-
var baseStyle$
|
|
4589
|
+
var baseStyle$e = function baseStyle(props) {
|
|
4523
4590
|
return {
|
|
4524
4591
|
root: baseStyleRoot(props),
|
|
4525
4592
|
tab: baseStyleTab(props),
|
|
@@ -4705,14 +4772,14 @@ var defaultProps$7 = {
|
|
|
4705
4772
|
colorScheme: 'blue'
|
|
4706
4773
|
};
|
|
4707
4774
|
var Tabs = {
|
|
4708
|
-
parts: parts$
|
|
4709
|
-
baseStyle: baseStyle$
|
|
4775
|
+
parts: parts$9,
|
|
4776
|
+
baseStyle: baseStyle$e,
|
|
4710
4777
|
sizes: sizes$1,
|
|
4711
4778
|
variants: variants$8,
|
|
4712
4779
|
defaultProps: defaultProps$7
|
|
4713
4780
|
};
|
|
4714
4781
|
|
|
4715
|
-
var baseStyle$
|
|
4782
|
+
var baseStyle$f = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
|
|
4716
4783
|
fontSize: '13px',
|
|
4717
4784
|
display: 'block',
|
|
4718
4785
|
paddingY: '8px',
|
|
@@ -4720,7 +4787,7 @@ var baseStyle$e = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
|
|
|
4720
4787
|
height: '78px',
|
|
4721
4788
|
lineHeight: 'short'
|
|
4722
4789
|
});
|
|
4723
|
-
var mobileInputs$1 = /*#__PURE__*/react.defineStyle( /*#__PURE__*/_extends$6({}, baseStyle$
|
|
4790
|
+
var mobileInputs$1 = /*#__PURE__*/react.defineStyle( /*#__PURE__*/_extends$6({}, baseStyle$f, Input$1.variants.mobile.field, {
|
|
4724
4791
|
border: 'none',
|
|
4725
4792
|
borderRadius: 0,
|
|
4726
4793
|
paddingY: '16px',
|
|
@@ -4735,14 +4802,14 @@ var mobileInputs$1 = /*#__PURE__*/react.defineStyle( /*#__PURE__*/_extends$6({},
|
|
|
4735
4802
|
minHeight: '208px'
|
|
4736
4803
|
}));
|
|
4737
4804
|
var variants$9 = {
|
|
4738
|
-
"default": baseStyle$
|
|
4805
|
+
"default": baseStyle$f,
|
|
4739
4806
|
mobile: mobileInputs$1
|
|
4740
4807
|
};
|
|
4741
4808
|
var defaultProps$8 = {
|
|
4742
4809
|
variant: 'default'
|
|
4743
4810
|
};
|
|
4744
4811
|
var Textarea = {
|
|
4745
|
-
baseStyle: baseStyle$
|
|
4812
|
+
baseStyle: baseStyle$f,
|
|
4746
4813
|
variants: variants$9,
|
|
4747
4814
|
defaultProps: defaultProps$8
|
|
4748
4815
|
};
|
|
@@ -4874,6 +4941,7 @@ var customXQChakraTheme = /*#__PURE__*/react.extendTheme( /*#__PURE__*/_extends$
|
|
|
4874
4941
|
FormLabel: FormLabel,
|
|
4875
4942
|
Input: Input$1,
|
|
4876
4943
|
Link: Link$1,
|
|
4944
|
+
Menu: Menu$1,
|
|
4877
4945
|
Modal: Modal$1,
|
|
4878
4946
|
Popover: Popover,
|
|
4879
4947
|
Select: Select,
|