@hexure/ui 1.8.1 → 1.8.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.
@@ -7,6 +7,7 @@ export interface ButtonMenuProps {
7
7
  menuItems: Array<MenuItemProps>;
8
8
  maxHeight?: string | number;
9
9
  position?: 'left' | 'right';
10
+ format?: 'primary' | 'secondary';
10
11
  }
11
12
  declare const ButtonMenu: FC<ButtonMenuProps>;
12
13
  export default ButtonMenu;
package/dist/esm/index.js CHANGED
@@ -2388,43 +2388,43 @@ const BulkActionBar = (_a) => {
2388
2388
  React.createElement(ErrorMsg, null, errorMsg))) : null));
2389
2389
  };
2390
2390
 
2391
- const Wrapper$e = styled.div `
2392
- background: #fff;
2393
- border-radius: 8px;
2394
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2395
- display: flex;
2396
- flex-direction: column;
2397
- gap: 4px;
2398
- max-height: ${props => props.$maxHeight || '312px'};
2399
- padding: 10px;
2400
- width: 200px;
2391
+ const Wrapper$e = styled.div `
2392
+ background: #fff;
2393
+ border-radius: 8px;
2394
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2395
+ display: flex;
2396
+ flex-direction: column;
2397
+ gap: 4px;
2398
+ max-height: ${props => props.$maxHeight || '312px'};
2399
+ padding: 10px;
2400
+ width: 200px;
2401
2401
  `;
2402
- const MenuItem = styled.div `
2403
- align-items: center;
2404
- border-radius: 8px;
2405
- border: 1px solid transparent;
2406
- display: flex;
2407
- gap: 8px;
2408
- height: 38px;
2409
- padding: 8px;
2410
- &:hover {
2411
- background: rgba(1, 147, 215, 0.1);
2412
- cursor: pointer;
2413
-
2414
- svg,
2415
- path {
2416
- fill: ${Colors.PRIMARY.Hex} !important;
2417
- }
2418
- }
2402
+ const MenuItem = styled.div `
2403
+ align-items: center;
2404
+ border-radius: 8px;
2405
+ border: 1px solid transparent;
2406
+ display: flex;
2407
+ gap: 8px;
2408
+ height: 38px;
2409
+ padding: 8px;
2410
+ &:hover {
2411
+ background: rgba(1, 147, 215, 0.1);
2412
+ cursor: pointer;
2413
+
2414
+ svg,
2415
+ path {
2416
+ fill: ${Colors.PRIMARY.Hex} !important;
2417
+ }
2418
+ }
2419
2419
  `;
2420
- const Title = styled.span `
2421
- font-family: Roboto;
2422
- font-size: 14px;
2423
- font-weight: 400;
2424
- height: auto;
2425
- letter-spacing: 0px;
2426
- line-height: 22px;
2427
- text-align: left;
2420
+ const Title = styled.span `
2421
+ font-family: Roboto;
2422
+ font-size: 14px;
2423
+ font-weight: 400;
2424
+ height: auto;
2425
+ letter-spacing: 0px;
2426
+ line-height: 22px;
2427
+ text-align: left;
2428
2428
  `;
2429
2429
  const MoreMenu = (_a) => {
2430
2430
  var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
@@ -2435,21 +2435,21 @@ const MoreMenu = (_a) => {
2435
2435
  })));
2436
2436
  };
2437
2437
 
2438
- const Wrapper$d = styled.div `
2439
- position: relative;
2440
- display: inline-block;
2438
+ const Wrapper$d = styled.div `
2439
+ position: relative;
2440
+ display: inline-block;
2441
2441
  `;
2442
- const StyledMoreMenu = styled(MoreMenu) `
2443
- position: absolute;
2444
- right: ${props => (props.$position === 'right' ? '0px' : 'auto')};
2445
- left: ${props => (props.$position === 'left' ? '0px' : 'auto')};
2446
- top: ${props => (props.$small ? '30px' : '40px')};
2447
- z-index: 10;
2442
+ const StyledMoreMenu = styled(MoreMenu) `
2443
+ position: absolute;
2444
+ right: ${props => (props.$position === 'right' ? '0px' : 'auto')};
2445
+ left: ${props => (props.$position === 'left' ? '0px' : 'auto')};
2446
+ top: ${props => (props.$small ? '30px' : '40px')};
2447
+ z-index: 10;
2448
2448
  `;
2449
- const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', }) => {
2449
+ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', }) => {
2450
2450
  const [show_menu, toggleMenu] = useState(false);
2451
2451
  return (React.createElement(Wrapper$d, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
2452
- React.createElement(Button, { disabled: disabled, format: 'primary', icon: mdiDotsHorizontal, small: small }, label),
2452
+ React.createElement(Button, { disabled: disabled, format: format, icon: mdiDotsHorizontal, small: small }, label),
2453
2453
  show_menu ? (React.createElement(StyledMoreMenu, { "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
2454
2454
  };
2455
2455
 
@@ -3171,69 +3171,69 @@ const Field = (_a) => {
3171
3171
  validationText ? React.createElement(Validation, null, validationText) : null));
3172
3172
  };
3173
3173
 
3174
- const Dropzone = styled.div `
3175
- border-radius: 8px;
3176
- border-width: 1px;
3177
- border-style: dashed;
3178
- border-color: ${props => (props.$dragging ? Colors.PRIMARY.Hex : '#cccccc')};
3179
- background: ${props => (props.$dragging ? `rgba(${Colors.PRIMARY.Rgb}, 0.05)` : '#ffffff')};
3180
- cursor: copy;
3174
+ const Dropzone = styled.div `
3175
+ border-radius: 8px;
3176
+ border-width: 1px;
3177
+ border-style: dashed;
3178
+ border-color: ${props => (props.$dragging ? Colors.PRIMARY.Hex : '#cccccc')};
3179
+ background: ${props => (props.$dragging ? `rgba(${Colors.PRIMARY.Rgb}, 0.05)` : '#ffffff')};
3180
+ cursor: copy;
3181
3181
  `;
3182
- const IconWrapper$1 = styled.div `
3183
- width: 80px;
3184
- height: 80px;
3185
- border-radius: 40px;
3186
- background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
3187
- display: flex;
3188
- align-items: center;
3189
- justify-content: center;
3182
+ const IconWrapper$1 = styled.div `
3183
+ width: 80px;
3184
+ height: 80px;
3185
+ border-radius: 40px;
3186
+ background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
3187
+ display: flex;
3188
+ align-items: center;
3189
+ justify-content: center;
3190
3190
  `;
3191
- const StyledIcon$1 = styled(Icon) `
3192
- width: 40px !important;
3193
- height: 40px !important;
3194
-
3195
- > path {
3196
- fill: ${Colors.GRAY.Hex} !important;
3197
- }
3191
+ const StyledIcon$1 = styled(Icon) `
3192
+ width: 40px !important;
3193
+ height: 40px !important;
3194
+
3195
+ > path {
3196
+ fill: ${Colors.GRAY.Hex} !important;
3197
+ }
3198
3198
  `;
3199
- const ClickZone = styled.div `
3200
- margin: 40px 20px;
3201
- display: flex;
3202
- flex-direction: column;
3203
- align-items: center;
3204
- gap: 16px;
3199
+ const ClickZone = styled.div `
3200
+ margin: 40px 20px;
3201
+ display: flex;
3202
+ flex-direction: column;
3203
+ align-items: center;
3204
+ gap: 16px;
3205
3205
  `;
3206
- const Content$1 = styled.div `
3207
- display: flex;
3208
- flex-direction: column;
3209
- align-items: center;
3210
- gap: 2px;
3206
+ const Content$1 = styled.div `
3207
+ display: flex;
3208
+ flex-direction: column;
3209
+ align-items: center;
3210
+ gap: 2px;
3211
3211
  `;
3212
- const Files = styled.div `
3213
- display: flex;
3214
- flex-direction: column;
3215
- align-self: stretch;
3216
- gap: 10px;
3217
- margin: 20px;
3212
+ const Files = styled.div `
3213
+ display: flex;
3214
+ flex-direction: column;
3215
+ align-self: stretch;
3216
+ gap: 10px;
3217
+ margin: 20px;
3218
3218
  `;
3219
- const File = styled.div `
3220
- display: flex;
3221
- padding: 10px;
3222
- align-items: center;
3223
- justify-content: space-between;
3224
- gap: 10px;
3225
- border-radius: 4px;
3226
- border: 1px solid #cccccc;
3227
- background: #ffffff;
3219
+ const File = styled.div `
3220
+ display: flex;
3221
+ padding: 10px;
3222
+ align-items: center;
3223
+ justify-content: space-between;
3224
+ gap: 10px;
3225
+ border-radius: 4px;
3226
+ border: 1px solid #cccccc;
3227
+ background: #ffffff;
3228
3228
  `;
3229
- const Remove$1 = styled(Icon) `
3230
- width: 24px;
3231
- height: 24px;
3232
- cursor: pointer;
3233
-
3234
- > path {
3235
- fill: ${Colors.RED.Hex} !important;
3236
- }
3229
+ const Remove$1 = styled(Icon) `
3230
+ width: 24px;
3231
+ height: 24px;
3232
+ cursor: pointer;
3233
+
3234
+ > path {
3235
+ fill: ${Colors.RED.Hex} !important;
3236
+ }
3237
3237
  `;
3238
3238
  const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, message, validateFile, }) => {
3239
3239
  const inputRef = useRef(null);
@@ -3775,30 +3775,30 @@ const MultiSelect = (_a) => {
3775
3775
  showOptions ? React.createElement(Scrim, { onClick: setShowOptions.bind(null, !showOptions) }) : null));
3776
3776
  };
3777
3777
 
3778
- const Wrapper$5 = styled.div `
3779
- display: flex;
3780
- padding: 16px 30px;
3781
- align-items: center;
3782
- gap: 20px;
3783
- align-self: stretch;
3784
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
3778
+ const Wrapper$5 = styled.div `
3779
+ display: flex;
3780
+ padding: 16px 30px;
3781
+ align-items: center;
3782
+ gap: 20px;
3783
+ align-self: stretch;
3784
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
3785
3785
  `;
3786
- const Info = styled.div `
3787
- display: flex;
3788
- flex-direction: column;
3789
- align-items: flex-start;
3790
- gap: 4px;
3791
- flex: 1 0 0;
3786
+ const Info = styled.div `
3787
+ display: flex;
3788
+ flex-direction: column;
3789
+ align-items: flex-start;
3790
+ gap: 4px;
3791
+ flex: 1 0 0;
3792
3792
  `;
3793
- const Breadcrumbs = styled.div `
3794
- display: flex;
3795
- align-items: center;
3796
- gap: 4px;
3793
+ const Breadcrumbs = styled.div `
3794
+ display: flex;
3795
+ align-items: center;
3796
+ gap: 4px;
3797
3797
  `;
3798
- const Actions = styled.div `
3799
- display: flex;
3800
- align-items: center;
3801
- gap: 8px;
3798
+ const Actions = styled.div `
3799
+ display: flex;
3800
+ align-items: center;
3801
+ gap: 8px;
3802
3802
  `;
3803
3803
  const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
3804
3804
  const { menuItems = [], label = '', } = buttonMenu || {};