@hexure/ui 1.8.13 → 1.8.15

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/cjs/index.js CHANGED
@@ -2116,7 +2116,7 @@ const StyledButton = styled.button `
2116
2116
  opacity: ${props => (props.$disabled ? 0.6 : 1)};
2117
2117
  }
2118
2118
  `;
2119
- const Label$4 = styled.span `
2119
+ const Label$5 = styled.span `
2120
2120
  color: ${props => (props.$format ? button_type_mapping[props.$format].content_color : '#fff')};
2121
2121
  font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
2122
2122
  font-family: ${FontStyles.DEFAULT};
@@ -2151,7 +2151,7 @@ const Button = (_a) => {
2151
2151
  var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format"]);
2152
2152
  const has_children = children && children.length > 0;
2153
2153
  return (React.createElement(StyledButton, Object.assign({ "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
2154
- children ? (React.createElement(Label$4, { "$format": format, "$small": small }, children)) : null,
2154
+ children ? (React.createElement(Label$5, { "$format": format, "$small": small }, children)) : null,
2155
2155
  icon && !badge ? (React.createElement(StyledIcon$3, { "$hasChildren": !!has_children },
2156
2156
  React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2157
2157
  badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
@@ -2227,7 +2227,7 @@ Heading.defaultProps = {
2227
2227
  type: 'primary',
2228
2228
  };
2229
2229
 
2230
- const Wrapper$h = styled.div `
2230
+ const Wrapper$i = styled.div `
2231
2231
  position: fixed;
2232
2232
  top: 0;
2233
2233
  right: 0;
@@ -2263,7 +2263,7 @@ const Buttons = styled.div `
2263
2263
  `;
2264
2264
  const ActionDialog = (_a) => {
2265
2265
  var { description, title, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton"]);
2266
- return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps),
2266
+ return (React.createElement(Wrapper$i, Object.assign({}, accessibleProps),
2267
2267
  React.createElement(Container$3, { open: true },
2268
2268
  title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
2269
2269
  description ? React.createElement(Copy, { align: 'center' }, description) : null,
@@ -2273,7 +2273,7 @@ const ActionDialog = (_a) => {
2273
2273
  primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format === 'red' ? 'red' : 'primary' }))) : null)) : null)));
2274
2274
  };
2275
2275
 
2276
- const Wrapper$g = styled.div `
2276
+ const Wrapper$h = styled.div `
2277
2277
  border: 1px solid #f1f1f1;
2278
2278
  border-radius: 4px;
2279
2279
  border-left-width: 4px;
@@ -2283,7 +2283,7 @@ const Wrapper$g = styled.div `
2283
2283
  padding: 20px;
2284
2284
  box-sizing: border-box;
2285
2285
  `;
2286
- const Content$3 = styled.div `
2286
+ const Content$4 = styled.div `
2287
2287
  margin-left: 20px;
2288
2288
  `;
2289
2289
  const Action$1 = styled.div `
@@ -2314,16 +2314,16 @@ const Alert = (_a) => {
2314
2314
  icon: js.mdiCheckboxMarkedCircleOutline,
2315
2315
  },
2316
2316
  };
2317
- return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2317
+ return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2318
2318
  React.createElement("div", { style: { flexShrink: 0 } },
2319
2319
  React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
2320
- React.createElement(Content$3, null,
2320
+ React.createElement(Content$4, null,
2321
2321
  title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2322
2322
  description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
2323
2323
  action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2324
2324
  };
2325
2325
 
2326
- const Wrapper$f = styled.div `
2326
+ const Wrapper$g = styled.div `
2327
2327
  border: 1px solid ${Colors.PRIMARY.Hex};
2328
2328
  border-radius: 8px;
2329
2329
  box-sizing: border-box;
@@ -2391,7 +2391,7 @@ const ErrorMsg = styled.span `
2391
2391
  `;
2392
2392
  const BulkActionBar = (_a) => {
2393
2393
  var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
2394
- return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps),
2394
+ return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps),
2395
2395
  React.createElement(Left, null,
2396
2396
  React.createElement(Info$1, null,
2397
2397
  React.createElement(Selected, null,
@@ -2404,7 +2404,7 @@ const BulkActionBar = (_a) => {
2404
2404
  React.createElement(ErrorMsg, null, errorMsg))) : null));
2405
2405
  };
2406
2406
 
2407
- const Wrapper$e = styled.div `
2407
+ const Wrapper$f = styled.div `
2408
2408
  background: #fff;
2409
2409
  border-radius: 8px;
2410
2410
  box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
@@ -2444,14 +2444,14 @@ const Title$1 = styled.span `
2444
2444
  `;
2445
2445
  const MoreMenu = (_a) => {
2446
2446
  var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
2447
- return (React.createElement(Wrapper$e, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
2447
+ return (React.createElement(Wrapper$f, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
2448
2448
  return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
2449
2449
  item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
2450
2450
  React.createElement(Title$1, null, item.label)));
2451
2451
  })));
2452
2452
  };
2453
2453
 
2454
- const Wrapper$d = styled.div `
2454
+ const Wrapper$e = styled.div `
2455
2455
  position: relative;
2456
2456
  display: inline-block;
2457
2457
  `;
@@ -2465,12 +2465,12 @@ const StyledMoreMenu = styled(MoreMenu) `
2465
2465
  `;
2466
2466
  const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', menuWidth = '200px', }) => {
2467
2467
  const [show_menu, toggleMenu] = React.useState(false);
2468
- return (React.createElement(Wrapper$d, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
2468
+ return (React.createElement(Wrapper$e, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
2469
2469
  React.createElement(Button, { disabled: disabled, format: format, icon: js.mdiDotsHorizontal, small: small }, label),
2470
2470
  show_menu ? (React.createElement(StyledMoreMenu, { "$menuWidth": menuWidth, "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
2471
2471
  };
2472
2472
 
2473
- const Wrapper$c = styled.label `
2473
+ const Wrapper$d = styled.label `
2474
2474
  padding: 4px 0;
2475
2475
  cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2476
2476
  display: flex;
@@ -2485,7 +2485,7 @@ const Input$2 = styled.input `
2485
2485
  line-height: 1.1em;
2486
2486
  box-sizing: border-box;
2487
2487
  `;
2488
- const Label$3 = styled.span `
2488
+ const Label$4 = styled.span `
2489
2489
  font-family: ${FontStyles.DEFAULT};
2490
2490
  font-size: ${FontSizes.DEFAULT};
2491
2491
  font-weight: 400;
@@ -2496,9 +2496,9 @@ const Label$3 = styled.span `
2496
2496
  `;
2497
2497
  const Checkbox = (_a) => {
2498
2498
  var { children, disabled, checked, onChange } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
2499
- return (React.createElement(Wrapper$c, Object.assign({}, accessibleProps),
2499
+ return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps),
2500
2500
  React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
2501
- children ? React.createElement(Label$3, null, children) : null));
2501
+ children ? React.createElement(Label$4, null, children) : null));
2502
2502
  };
2503
2503
 
2504
2504
  const SelectAll = styled.div `
@@ -2865,7 +2865,7 @@ var dayjs_min = {exports: {}};
2865
2865
  var dayjs_minExports = dayjs_min.exports;
2866
2866
  var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
2867
2867
 
2868
- const Wrapper$b = styled.div `
2868
+ const Wrapper$c = styled.div `
2869
2869
  border-radius: 4px;
2870
2870
  height: 40px;
2871
2871
  background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
@@ -2909,7 +2909,7 @@ const IconWrapper$2 = styled(Icon) `
2909
2909
  `;
2910
2910
  const Select = (_a) => {
2911
2911
  var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
2912
- return (React.createElement(Wrapper$b, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
2912
+ return (React.createElement(Wrapper$c, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
2913
2913
  React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
2914
2914
  placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
2915
2915
  optionGroups &&
@@ -3079,7 +3079,7 @@ const Drawer = (_a) => {
3079
3079
  scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
3080
3080
  };
3081
3081
 
3082
- const Wrapper$a = styled.div `
3082
+ const Wrapper$b = styled.div `
3083
3083
  display: inline-block;
3084
3084
  position: relative;
3085
3085
  height: 16px;
@@ -3119,15 +3119,15 @@ const positions = {
3119
3119
  transform: 'translateY(-50%)',
3120
3120
  },
3121
3121
  };
3122
- const Content$2 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
3122
+ const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
3123
3123
  const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
3124
3124
  const [show_content, toggleContent] = React.useState(false);
3125
- return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
3125
+ return (React.createElement(Wrapper$b, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
3126
3126
  trigger || React.createElement(StyledIcon$2, { path: js.mdiInformationOutline }),
3127
- show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
3127
+ show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
3128
3128
  };
3129
3129
 
3130
- const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
3130
+ const Wrapper$a = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
3131
3131
  const LabelRow = styled.div `
3132
3132
  display: flex;
3133
3133
  align-items: center;
@@ -3135,7 +3135,7 @@ const LabelRow = styled.div `
3135
3135
  margin: 0 0 4px 0;
3136
3136
  box-sizing: border-box;
3137
3137
  `;
3138
- const Label$2 = styled.label `
3138
+ const Label$3 = styled.label `
3139
3139
  font-size: ${FontSizes.DEFAULT};
3140
3140
  font-weight: 500;
3141
3141
  line-height: 1em;
@@ -3176,9 +3176,9 @@ const Validation = styled.div `
3176
3176
  `;
3177
3177
  const Field = (_a) => {
3178
3178
  var { action, children, validationText, label, description, required, htmlFor, style, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
3179
- return (React.createElement(Wrapper$9, Object.assign({ style: style }, accessibleProps),
3179
+ return (React.createElement(Wrapper$a, Object.assign({ style: style }, accessibleProps),
3180
3180
  React.createElement(LabelRow, null,
3181
- React.createElement(Label$2, { htmlFor: htmlFor },
3181
+ React.createElement(Label$3, { htmlFor: htmlFor },
3182
3182
  label,
3183
3183
  required ? React.createElement(Required, null, "*") : null,
3184
3184
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null),
@@ -3188,6 +3188,41 @@ const Field = (_a) => {
3188
3188
  validationText ? React.createElement(Validation, null, validationText) : null));
3189
3189
  };
3190
3190
 
3191
+ const Wrapper$9 = styled.fieldset `
3192
+ margin-inline-start: 0px;
3193
+ margin-inline-end: 0px;
3194
+ padding-block-start: 0px;
3195
+ padding-inline-start: 0px;
3196
+ padding-inline-end: 0px;
3197
+ padding-block-end: 0px;
3198
+ min-inline-size: min-content;
3199
+ border-width: 0px;
3200
+ border-style: none;
3201
+ border-color: transparent;
3202
+ border-image: none;
3203
+ `;
3204
+ const Label$2 = styled.legend `
3205
+ padding-inline-start: 0px;
3206
+ padding-inline-end: 0px;
3207
+
3208
+ color: ${Colors.BLACK.Hex};
3209
+ font-family: ${FontStyles.DEFAULT};
3210
+ font-size: ${FontSizes.DEFAULT};
3211
+ font-weight: 500;
3212
+ line-height: 22px;
3213
+ margin-bottom: 6px;
3214
+ `;
3215
+ const Content$2 = styled.div `
3216
+ padding: 20px;
3217
+ border-radius: 8px;
3218
+ background: #fcfcfc;
3219
+ `;
3220
+ const FieldGroup = ({ children, label }) => {
3221
+ return (React.createElement(Wrapper$9, null,
3222
+ React.createElement(Label$2, null, label),
3223
+ React.createElement(Content$2, null, children)));
3224
+ };
3225
+
3191
3226
  const Dropzone = styled.div `
3192
3227
  border-radius: 8px;
3193
3228
  border-width: 1px;
@@ -3607,6 +3642,49 @@ const Logo = (_a) => {
3607
3642
  }
3608
3643
  };
3609
3644
 
3645
+ const Steps = styled.div `
3646
+ padding: 20px;
3647
+ border-bottom: 1px solid #e7e6e6;
3648
+ background: #f5f5f5;
3649
+ display: flex;
3650
+ gap: 30px;
3651
+ align-items: center;
3652
+ `;
3653
+ const Step = styled.div `
3654
+ display: flex;
3655
+ align-items: center;
3656
+ gap: 8px;
3657
+ `;
3658
+ const StepIndicator = styled.div `
3659
+ width: 30px;
3660
+ height: 30px;
3661
+ border-radius: 15px;
3662
+ background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
3663
+ color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
3664
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
3665
+ font-size: 14px;
3666
+ font-weight: 500;
3667
+ line-height: 1;
3668
+ display: flex;
3669
+ align-items: center;
3670
+ justify-content: center;
3671
+ flex-shrink: 0;
3672
+ `;
3673
+ const StepLabel = styled.div `
3674
+ color: #000;
3675
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
3676
+ font-size: 14px;
3677
+ font-weight: 500;
3678
+ line-height: 1;
3679
+ `;
3680
+ const ProgressBar = ({ steps }) => {
3681
+ return (React.createElement(Steps, null, steps.map((step, i) => {
3682
+ return (React.createElement(Step, { key: i },
3683
+ step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3684
+ React.createElement(StepLabel, null, step.label)));
3685
+ })));
3686
+ };
3687
+
3610
3688
  const Wrapper$7 = styled.div `
3611
3689
  position: fixed;
3612
3690
  top: 0;
@@ -3655,41 +3733,6 @@ const CloseMsg = styled.span `
3655
3733
  line-height: 1em;
3656
3734
  color: ${Colors.MEDIUM_GRAY.Hex};
3657
3735
  `;
3658
- const Steps = styled.div `
3659
- padding: 20px;
3660
- border-bottom: 1px solid #e7e6e6;
3661
- background: #f5f5f5;
3662
- display: flex;
3663
- gap: 30px;
3664
- align-items: center;
3665
- `;
3666
- const Step = styled.div `
3667
- display: flex;
3668
- align-items: center;
3669
- gap: 8px;
3670
- `;
3671
- const StepIndicator = styled.div `
3672
- width: 30px;
3673
- height: 30px;
3674
- border-radius: 15px;
3675
- background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
3676
- color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
3677
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
3678
- font-size: 14px;
3679
- font-weight: 500;
3680
- line-height: 1;
3681
- display: flex;
3682
- align-items: center;
3683
- justify-content: center;
3684
- flex-shrink: 0;
3685
- `;
3686
- const StepLabel = styled.div `
3687
- color: #000;
3688
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
3689
- font-size: 14px;
3690
- font-weight: 500;
3691
- line-height: 1;
3692
- `;
3693
3736
  const ContentWrapper = styled.div `
3694
3737
  overflow-x: hidden;
3695
3738
  overflow-y: auto;
@@ -3727,11 +3770,7 @@ const Modal = (_a) => {
3727
3770
  React.createElement(Close, { onClick: onClose },
3728
3771
  React.createElement(CloseMsg, null, "(Esc)"),
3729
3772
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: js.mdiClose, size: '24px' }))),
3730
- steps ? (React.createElement(Steps, null, steps.map((step, i) => {
3731
- return (React.createElement(Step, { key: i },
3732
- step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3733
- React.createElement(StepLabel, null, step.label)));
3734
- }))) : null,
3773
+ steps ? React.createElement(ProgressBar, { steps: steps }) : null,
3735
3774
  React.createElement(ContentWrapper, null, children),
3736
3775
  primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar, null,
3737
3776
  tertiaryButton ? React.createElement(Button, Object.assign({}, tertiaryButton, { format: 'secondary' })) : null,
@@ -4190,6 +4229,7 @@ exports.Copy = Copy;
4190
4229
  exports.DatePicker = DatePicker;
4191
4230
  exports.Drawer = Drawer;
4192
4231
  exports.Field = Field;
4232
+ exports.FieldGroup = FieldGroup;
4193
4233
  exports.FileUpload = FileUpload;
4194
4234
  exports.Heading = Heading;
4195
4235
  exports.Input = Input$1;
@@ -4201,6 +4241,7 @@ exports.MoreMenu = MoreMenu;
4201
4241
  exports.MultiSelect = MultiSelect;
4202
4242
  exports.PageHeader = PageHeader;
4203
4243
  exports.Pagination = Pagination;
4244
+ exports.ProgressBar = ProgressBar;
4204
4245
  exports.Radio = Radio;
4205
4246
  exports.RadioList = RadioList;
4206
4247
  exports.Select = Select;