@majoo-ui/react 1.55.33 → 1.55.34

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.
@@ -5,6 +5,7 @@ export interface IResource {
5
5
  label: string;
6
6
  variants?: string[];
7
7
  description?: string;
8
+ icon?: () => JSX.Element;
8
9
  }
9
10
  interface IInputResourceListProps {
10
11
  data: IResource[];
package/index.esm.js CHANGED
@@ -10989,34 +10989,44 @@ function InputResourceList({
10989
10989
  }
10990
10990
  }, [defaultSort]);
10991
10991
  const renderCheckbox = (resource, index) => {
10992
- var _a;
10992
+ var _a, _b;
10993
10993
  const isDisabled = enabledItems && (!enabledItems.find(id => id === resource.value) || enabledItems.length === 0);
10994
10994
  return jsxs(Flex$1, Object.assign({
10995
10995
  direction: "column",
10996
10996
  gap: 1
10997
10997
  }, {
10998
- children: [jsx(InputCheckbox, {
10999
- label: jsxs(Flex$1, Object.assign({
11000
- gap: 3
11001
- }, {
11002
- children: [jsx(Paragraph, Object.assign({
11003
- paragraph: "longContentRegular"
11004
- }, {
11005
- children: resource.label
11006
- }), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map((variant, index) => jsx(Tag, Object.assign({
11007
- type: "varian",
11008
- size: "lg",
11009
- css: {
11010
- color: disabled || isDisabled ? '$textDisable' : '$textGreen'
11011
- }
10998
+ children: [jsxs(Flex$1, Object.assign({
10999
+ align: "center"
11000
+ }, {
11001
+ children: [jsx(InputCheckbox, {
11002
+ label: jsxs(Flex$1, Object.assign({
11003
+ gap: 3
11012
11004
  }, {
11013
- children: variant
11014
- }), index))]
11015
- }), void 0),
11016
- index: index,
11017
- value: resource.value,
11018
- disabled: isDisabled
11019
- }, void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsx(Paragraph, Object.assign({
11005
+ children: [jsx(Paragraph, Object.assign({
11006
+ paragraph: "longContentRegular"
11007
+ }, {
11008
+ children: resource.label
11009
+ }), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map((variant, index) => jsx(Tag, Object.assign({
11010
+ type: "varian",
11011
+ size: "lg",
11012
+ css: {
11013
+ color: disabled || isDisabled ? '$textDisable' : '$textGreen'
11014
+ }
11015
+ }, {
11016
+ children: variant
11017
+ }), index))]
11018
+ }), void 0),
11019
+ index: index,
11020
+ value: resource.value,
11021
+ disabled: isDisabled
11022
+ }, void 0), (resource === null || resource === void 0 ? void 0 : resource.icon) && jsx(Box, Object.assign({
11023
+ css: {
11024
+ marginLeft: '$spacing-03'
11025
+ }
11026
+ }, {
11027
+ children: (_b = resource === null || resource === void 0 ? void 0 : resource.icon) === null || _b === void 0 ? void 0 : _b.call(resource)
11028
+ }), void 0)]
11029
+ }), void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsx(Paragraph, Object.assign({
11020
11030
  css: {
11021
11031
  fontSize: 12,
11022
11032
  paddingLeft: 30
@@ -15583,7 +15593,7 @@ const CalendarBox = ({
15583
15593
  fontWeight: 600
15584
15594
  },
15585
15595
  onClick: onReset,
15586
- disabled: disabled,
15596
+ disabled: disabled || !selected || selected.length <= 1,
15587
15597
  size: "sm",
15588
15598
  type: "button"
15589
15599
  }, {
@@ -16164,7 +16174,7 @@ const MobileCalendarBox = ({
16164
16174
  flex: 1
16165
16175
  },
16166
16176
  onClick: onReset,
16167
- disabled: disabled,
16177
+ disabled: disabled || !selected || selected.length <= 1,
16168
16178
  type: "button"
16169
16179
  }, {
16170
16180
  children: "Reset"
@@ -16193,7 +16203,7 @@ const MobileCalendarBox = ({
16193
16203
  flex: 1
16194
16204
  },
16195
16205
  onClick: onUpdate,
16196
- disabled: disabled,
16206
+ disabled: disabled || !selected || selected.length <= 1,
16197
16207
  type: "button"
16198
16208
  }, {
16199
16209
  children: t('label.process', 'Proses', {
package/index.umd.js CHANGED
@@ -11112,7 +11112,7 @@
11112
11112
  }
11113
11113
  }, [defaultSort]);
11114
11114
  var renderCheckbox = function renderCheckbox(resource, index) {
11115
- var _a;
11115
+ var _a, _b;
11116
11116
  var isDisabled = enabledItems && (!enabledItems.find(function (id) {
11117
11117
  return id === resource.value;
11118
11118
  }) || enabledItems.length === 0);
@@ -11120,30 +11120,40 @@
11120
11120
  direction: "column",
11121
11121
  gap: 1
11122
11122
  }, {
11123
- children: [jsxRuntime.jsx(InputCheckbox, {
11124
- label: jsxRuntime.jsxs(Flex$1, __assign({
11125
- gap: 3
11126
- }, {
11127
- children: [jsxRuntime.jsx(Paragraph, __assign({
11128
- paragraph: "longContentRegular"
11123
+ children: [jsxRuntime.jsxs(Flex$1, __assign({
11124
+ align: "center"
11125
+ }, {
11126
+ children: [jsxRuntime.jsx(InputCheckbox, {
11127
+ label: jsxRuntime.jsxs(Flex$1, __assign({
11128
+ gap: 3
11129
11129
  }, {
11130
- children: resource.label
11131
- }), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map(function (variant, index) {
11132
- return jsxRuntime.jsx(Tag, __assign({
11133
- type: "varian",
11134
- size: "lg",
11135
- css: {
11136
- color: disabled || isDisabled ? '$textDisable' : '$textGreen'
11137
- }
11130
+ children: [jsxRuntime.jsx(Paragraph, __assign({
11131
+ paragraph: "longContentRegular"
11138
11132
  }, {
11139
- children: variant
11140
- }), index);
11141
- })]
11142
- }), void 0),
11143
- index: index,
11144
- value: resource.value,
11145
- disabled: isDisabled
11146
- }, void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsxRuntime.jsx(Paragraph, __assign({
11133
+ children: resource.label
11134
+ }), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map(function (variant, index) {
11135
+ return jsxRuntime.jsx(Tag, __assign({
11136
+ type: "varian",
11137
+ size: "lg",
11138
+ css: {
11139
+ color: disabled || isDisabled ? '$textDisable' : '$textGreen'
11140
+ }
11141
+ }, {
11142
+ children: variant
11143
+ }), index);
11144
+ })]
11145
+ }), void 0),
11146
+ index: index,
11147
+ value: resource.value,
11148
+ disabled: isDisabled
11149
+ }, void 0), (resource === null || resource === void 0 ? void 0 : resource.icon) && jsxRuntime.jsx(Box, __assign({
11150
+ css: {
11151
+ marginLeft: '$spacing-03'
11152
+ }
11153
+ }, {
11154
+ children: (_b = resource === null || resource === void 0 ? void 0 : resource.icon) === null || _b === void 0 ? void 0 : _b.call(resource)
11155
+ }), void 0)]
11156
+ }), void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsxRuntime.jsx(Paragraph, __assign({
11147
11157
  css: {
11148
11158
  fontSize: 12,
11149
11159
  paddingLeft: 30
@@ -15765,7 +15775,7 @@
15765
15775
  fontWeight: 600
15766
15776
  },
15767
15777
  onClick: onReset,
15768
- disabled: disabled,
15778
+ disabled: disabled || !selected || selected.length <= 1,
15769
15779
  size: "sm",
15770
15780
  type: "button"
15771
15781
  }, {
@@ -16383,7 +16393,7 @@
16383
16393
  flex: 1
16384
16394
  },
16385
16395
  onClick: onReset,
16386
- disabled: disabled,
16396
+ disabled: disabled || !selected || selected.length <= 1,
16387
16397
  type: "button"
16388
16398
  }, {
16389
16399
  children: "Reset"
@@ -16412,7 +16422,7 @@
16412
16422
  flex: 1
16413
16423
  },
16414
16424
  onClick: onUpdate,
16415
- disabled: disabled,
16425
+ disabled: disabled || !selected || selected.length <= 1,
16416
16426
  type: "button"
16417
16427
  }, {
16418
16428
  children: t('label.process', 'Proses', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.55.33",
3
+ "version": "1.55.34",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",