@hexure/ui 1.8.17 → 1.9.1

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/esm/index.js CHANGED
@@ -2014,6 +2014,9 @@ const FontStyles = {
2014
2014
  const FontSizes = {
2015
2015
  DEFAULT: '14px',
2016
2016
  SMALL: '13px',
2017
+ };
2018
+ const EditableTheme = {
2019
+ PRIMARY_COLOR: Colors.PRIMARY,
2017
2020
  };
2018
2021
 
2019
2022
  const Header$3 = styled.div `
@@ -2044,36 +2047,6 @@ const Accordion = (_a) => {
2044
2047
  open ? children : null));
2045
2048
  };
2046
2049
 
2047
- const button_type_mapping = {
2048
- primary: {
2049
- background_color: Colors.PRIMARY.Hex,
2050
- border_color: Colors.PRIMARY.Hex,
2051
- content_color: '#fff',
2052
- badge_bg_color: '#fff',
2053
- badge_content_color: Colors.PRIMARY.Hex,
2054
- },
2055
- secondary: {
2056
- background_color: 'transparent',
2057
- border_color: Colors.PRIMARY.Hex,
2058
- content_color: Colors.PRIMARY.Hex,
2059
- badge_bg_color: Colors.PRIMARY.Hex,
2060
- badge_content_color: '#fff',
2061
- },
2062
- red: {
2063
- background_color: Colors.RED.Hex,
2064
- border_color: Colors.RED.Hex,
2065
- content_color: '#fff',
2066
- badge_bg_color: '#fff',
2067
- badge_content_color: Colors.RED.Hex,
2068
- },
2069
- green: {
2070
- background_color: Colors.GREEN.Hex,
2071
- border_color: Colors.GREEN.Hex,
2072
- content_color: '#fff',
2073
- badge_bg_color: '#fff',
2074
- badge_content_color: Colors.GREEN.Hex,
2075
- },
2076
- };
2077
2050
  const StyledButton = styled.button `
2078
2051
  height: ${props => (props.$small ? '30px' : '40px')};
2079
2052
  line-height: 1em;
@@ -2091,7 +2064,7 @@ const StyledButton = styled.button `
2091
2064
  return '0px';
2092
2065
  }};
2093
2066
  outline: none;
2094
- background: ${props => props.$format ? button_type_mapping[props.$format].background_color : Colors.PRIMARY.Hex};
2067
+ background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
2095
2068
  width: ${props => {
2096
2069
  if (props.$hasChildren) {
2097
2070
  return 'auto';
@@ -2108,20 +2081,20 @@ const StyledButton = styled.button `
2108
2081
  opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
2109
2082
  border-width: 1px;
2110
2083
  border-style: solid;
2111
- border-color: ${props => props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex};
2084
+ border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
2112
2085
  box-sizing: border-box;
2113
2086
  &:hover {
2114
2087
  opacity: ${props => (props.$disabled ? 0.6 : 1)};
2115
2088
  }
2116
2089
  `;
2117
2090
  const Label$5 = styled.span `
2118
- color: ${props => (props.$format ? button_type_mapping[props.$format].content_color : '#fff')};
2091
+ color: ${props => props.$content_color || '#fff'};
2119
2092
  font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
2120
2093
  font-family: ${FontStyles.DEFAULT};
2121
2094
  font-weight: 500;
2122
2095
  line-height: 1;
2123
2096
  `;
2124
- const StyledIcon$4 = styled.span `
2097
+ const StyledIcon$6 = styled.span `
2125
2098
  margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
2126
2099
  margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
2127
2100
  display: flex;
@@ -2136,8 +2109,8 @@ const Badge$1 = styled.span `
2136
2109
  align-items: center;
2137
2110
  justify-content: center;
2138
2111
  border-radius: 100%;
2139
- background-color: ${props => props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff'};
2140
- color: ${props => props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex};
2112
+ background-color: ${props => props.$bg_color || '#fff'};
2113
+ color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
2141
2114
  font-size: ${props => (props.$small ? '10px' : '12px')};
2142
2115
  font-weight: 600;
2143
2116
  font-family: ${FontStyles.DEFAULT};
@@ -2147,12 +2120,44 @@ const Badge$1 = styled.span `
2147
2120
  `;
2148
2121
  const Button = (_a) => {
2149
2122
  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"]);
2123
+ const theme = useContext(Me) || EditableTheme;
2150
2124
  const has_children = children && children.length > 0;
2151
- 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),
2152
- children ? (React.createElement(Label$5, { "$format": format, "$small": small }, children)) : null,
2153
- icon && !badge ? (React.createElement(StyledIcon$4, { "$hasChildren": !!has_children },
2154
- React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2155
- badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
2125
+ const button_type_mapping = {
2126
+ primary: {
2127
+ background_color: theme.PRIMARY_COLOR.Hex,
2128
+ border_color: theme.PRIMARY_COLOR.Hex,
2129
+ content_color: '#fff',
2130
+ badge_bg_color: '#fff',
2131
+ badge_content_color: theme.PRIMARY_COLOR.Hex,
2132
+ },
2133
+ secondary: {
2134
+ background_color: 'transparent',
2135
+ border_color: theme.PRIMARY_COLOR.Hex,
2136
+ content_color: theme.PRIMARY_COLOR.Hex,
2137
+ badge_bg_color: theme.PRIMARY_COLOR.Hex,
2138
+ badge_content_color: '#fff',
2139
+ },
2140
+ red: {
2141
+ background_color: Colors.RED.Hex,
2142
+ border_color: Colors.RED.Hex,
2143
+ content_color: '#fff',
2144
+ badge_bg_color: '#fff',
2145
+ badge_content_color: Colors.RED.Hex,
2146
+ },
2147
+ green: {
2148
+ background_color: Colors.GREEN.Hex,
2149
+ border_color: Colors.GREEN.Hex,
2150
+ content_color: '#fff',
2151
+ badge_bg_color: '#fff',
2152
+ badge_content_color: Colors.GREEN.Hex,
2153
+ },
2154
+ };
2155
+ const format_styles = button_type_mapping[format];
2156
+ return (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
2157
+ children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small }, children)) : null,
2158
+ icon && !badge ? (React.createElement(StyledIcon$6, { "$hasChildren": !!has_children },
2159
+ React.createElement(Icon, { color: format ? format_styles.content_color : '#fff', path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2160
+ badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small }, badge)) : null));
2156
2161
  };
2157
2162
 
2158
2163
  const StyledComponent = styled.p `
@@ -2282,22 +2287,24 @@ const Wrapper$h = styled.div `
2282
2287
  padding: ${({ $small }) => ($small ? '11px' : '20px')};
2283
2288
  box-sizing: border-box;
2284
2289
  `;
2285
- const StyledIcon$3 = styled(Icon) `
2290
+ const StyledIcon$5 = styled(Icon) `
2286
2291
  flex-shrink: 0;
2287
2292
  `;
2288
2293
  const Action$1 = styled.div `
2289
- color: ${Colors.PRIMARY.Hex};
2294
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
2290
2295
  font-size: ${FontSizes.DEFAULT};
2291
2296
  font-family: ${FontStyles.DEFAULT};
2292
2297
  font-weight: 500;
2293
2298
  cursor: pointer;
2294
2299
  margin-top: 6px;
2295
2300
  `;
2301
+ Action$1.defaultProps = { theme: EditableTheme };
2296
2302
  const Alert = (_a) => {
2297
2303
  var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
2304
+ const theme = useContext(Me) || EditableTheme;
2298
2305
  const type_mapping = {
2299
2306
  info: {
2300
- color: Colors.PRIMARY.Hex,
2307
+ color: theme.PRIMARY_COLOR.Hex,
2301
2308
  icon: mdiInformationOutline,
2302
2309
  },
2303
2310
  error: {
@@ -2314,7 +2321,7 @@ const Alert = (_a) => {
2314
2321
  },
2315
2322
  };
2316
2323
  return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
2317
- React.createElement(StyledIcon$3, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2324
+ React.createElement(StyledIcon$5, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2318
2325
  React.createElement("div", null,
2319
2326
  title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2320
2327
  description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
@@ -2322,7 +2329,7 @@ const Alert = (_a) => {
2322
2329
  };
2323
2330
 
2324
2331
  const Wrapper$g = styled.div `
2325
- border: 1px solid ${Colors.PRIMARY.Hex};
2332
+ border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
2326
2333
  border-radius: 8px;
2327
2334
  box-sizing: border-box;
2328
2335
  display: flex;
@@ -2330,6 +2337,7 @@ const Wrapper$g = styled.div `
2330
2337
  justify-content: space-between;
2331
2338
  padding: 16px 20px;
2332
2339
  `;
2340
+ Wrapper$g.defaultProps = { theme: EditableTheme };
2333
2341
  const Left = styled.div `
2334
2342
  box-sizing: border-box;
2335
2343
  display: flex;
@@ -2354,13 +2362,14 @@ const Clear = styled.span `
2354
2362
  font-size: 14px;
2355
2363
  font-weight: 400;
2356
2364
  font-family: ${FontStyles.DEFAULT};
2357
- color: ${Colors.PRIMARY.Hex};
2365
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
2358
2366
  line-height: 1;
2359
2367
  cursor: pointer;
2360
2368
  padding-left: 10px;
2361
2369
  margin-left: 10px;
2362
2370
  border-left: 1px solid #ccc;
2363
2371
  `;
2372
+ Clear.defaultProps = { theme: EditableTheme };
2364
2373
  const Actions$1 = styled.div `
2365
2374
  box-sizing: border-box;
2366
2375
  display: flex;
@@ -2427,10 +2436,11 @@ const MenuItem = styled.div `
2427
2436
 
2428
2437
  svg,
2429
2438
  path {
2430
- fill: ${Colors.PRIMARY.Hex} !important;
2439
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2431
2440
  }
2432
2441
  }
2433
2442
  `;
2443
+ MenuItem.defaultProps = { theme: EditableTheme };
2434
2444
  const Title$1 = styled.span `
2435
2445
  font-family: Roboto;
2436
2446
  font-size: 14px;
@@ -2960,12 +2970,15 @@ const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate
2960
2970
  setDayOptions(Array.from({ length: dDate.daysInMonth() }, (_, i) => ({
2961
2971
  value: i + 1,
2962
2972
  })));
2963
- // Mimicing browser event structure
2964
- onChange({
2965
- target: {
2966
- value: dDate.format('YYYY-MM-DD'),
2967
- },
2968
- });
2973
+ // Only fire the onChange event if the date has changed
2974
+ if (dDate.format('YYYY-MM-DD') !== date) {
2975
+ // Copying the browser event structure
2976
+ onChange({
2977
+ target: {
2978
+ value: dDate.format('YYYY-MM-DD'),
2979
+ },
2980
+ });
2981
+ }
2969
2982
  }, [dDate]);
2970
2983
  const handleDayChange = (e) => {
2971
2984
  const date = parseInt(e.target.value, 10);
@@ -3082,13 +3095,14 @@ const Wrapper$b = styled.div `
3082
3095
  position: relative;
3083
3096
  height: 16px;
3084
3097
  `;
3085
- const StyledIcon$2 = styled(Icon) `
3098
+ const StyledIcon$4 = styled(Icon) `
3086
3099
  width: 16px;
3087
3100
  height: 16px;
3088
3101
  padding: 0px 6px;
3089
- color: ${Colors.PRIMARY.Hex};
3102
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3090
3103
  cursor: pointer;
3091
3104
  `;
3105
+ StyledIcon$4.defaultProps = { theme: EditableTheme };
3092
3106
  const positions = {
3093
3107
  'right-top': {
3094
3108
  top: '0px',
@@ -3117,11 +3131,12 @@ const positions = {
3117
3131
  transform: 'translateY(-50%)',
3118
3132
  },
3119
3133
  };
3120
- 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])));
3134
+ const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.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])));
3135
+ Content$3.defaultProps = { theme: EditableTheme };
3121
3136
  const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
3122
3137
  const [show_content, toggleContent] = useState(false);
3123
3138
  return (React.createElement(Wrapper$b, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
3124
- trigger || React.createElement(StyledIcon$2, { path: mdiInformationOutline }),
3139
+ trigger || React.createElement(StyledIcon$4, { path: mdiInformationOutline }),
3125
3140
  show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
3126
3141
  };
3127
3142
 
@@ -3151,9 +3166,10 @@ const Action = styled.span `
3151
3166
  font-weight: 500;
3152
3167
  line-height: 1em;
3153
3168
  font-family: ${FontStyles.DEFAULT};
3154
- color: ${Colors.PRIMARY.Hex};
3169
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3155
3170
  cursor: pointer;
3156
3171
  `;
3172
+ Action.defaultProps = { theme: EditableTheme };
3157
3173
  const Description = styled.div `
3158
3174
  font-size: ${FontSizes.SMALL};
3159
3175
  font-weight: 400;
@@ -3225,10 +3241,11 @@ const Dropzone = styled.div `
3225
3241
  border-radius: 8px;
3226
3242
  border-width: 1px;
3227
3243
  border-style: dashed;
3228
- border-color: ${props => (props.$dragging ? Colors.PRIMARY.Hex : '#cccccc')};
3229
- background: ${props => (props.$dragging ? `rgba(${Colors.PRIMARY.Rgb}, 0.05)` : '#ffffff')};
3244
+ border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
3245
+ background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
3230
3246
  cursor: copy;
3231
3247
  `;
3248
+ Dropzone.defaultProps = { theme: EditableTheme };
3232
3249
  const IconWrapper$1 = styled.div `
3233
3250
  width: 80px;
3234
3251
  height: 80px;
@@ -3238,7 +3255,7 @@ const IconWrapper$1 = styled.div `
3238
3255
  align-items: center;
3239
3256
  justify-content: center;
3240
3257
  `;
3241
- const StyledIcon$1 = styled(Icon) `
3258
+ const StyledIcon$3 = styled(Icon) `
3242
3259
  width: 40px !important;
3243
3260
  height: 40px !important;
3244
3261
 
@@ -3390,7 +3407,7 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, mes
3390
3407
  }))) : null,
3391
3408
  allowMoreFiles ? (React.createElement(ClickZone, { onClick: triggerFileExplorer },
3392
3409
  files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging },
3393
- React.createElement(StyledIcon$1, { path: mdiFolderPlusOutline }))),
3410
+ React.createElement(StyledIcon$3, { path: mdiFolderPlusOutline }))),
3394
3411
  React.createElement(Content$1, null,
3395
3412
  React.createElement(Copy, { align: 'center', type: 'bold' }, "Drag & drop files here or click to select files"),
3396
3413
  message ? (React.createElement(Copy, { align: 'center', color: 'GRAY' }, message)) : null))) : null)));
@@ -3424,11 +3441,8 @@ const formatAsSsn = (number) => {
3424
3441
  };
3425
3442
 
3426
3443
  const StyledInput = styled.input `
3427
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3428
- border-radius: ${props => (props.$suffix ? '4px 0px 0px 4px' : '4px')};
3429
- border-width: 1px;
3430
- border-style: solid;
3431
- border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3444
+ border: none !important;
3445
+ background: none !important;
3432
3446
  font-size: ${FontSizes.DEFAULT};
3433
3447
  font-weight: 400;
3434
3448
  font-family: ${FontStyles.DEFAULT};
@@ -3446,22 +3460,19 @@ const StyledInput = styled.input `
3446
3460
  box-sizing: border-box;
3447
3461
  display: block;
3448
3462
  width: 100%;
3449
- &:focus {
3450
- border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3451
- }
3452
3463
  `;
3453
3464
  const StyledSuffix = styled.div `
3454
3465
  box-sizing: border-box;
3466
+ border-radius: 0px 4px 4px 0px;
3455
3467
  display: flex;
3456
3468
  justify-content: center;
3457
3469
  align-items: center;
3458
3470
  padding: 10px;
3459
3471
  height: auto;
3460
3472
  background: #f5f5f5;
3461
- border-width: 1px 1px 1px 0px;
3473
+ border-width: 0px 0px 0px 1px;
3462
3474
  border-style: solid;
3463
3475
  border-color: #cccccc;
3464
- border-radius: 0px 4px 4px 0px;
3465
3476
  font-family: ${FontStyles.DEFAULT};
3466
3477
  font-style: normal;
3467
3478
  font-weight: 400;
@@ -3471,7 +3482,18 @@ const StyledSuffix = styled.div `
3471
3482
  const StyledWrapper = styled.div `
3472
3483
  display: flex;
3473
3484
  width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3485
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3486
+ position: relative;
3487
+ border-width: 1px;
3488
+ border-style: solid;
3489
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3490
+ border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
3491
+
3492
+ &:focus-within {
3493
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
3494
+ }
3474
3495
  `;
3496
+ StyledWrapper.defaultProps = { theme: EditableTheme };
3475
3497
  const StyledTextarea = styled.textarea `
3476
3498
  background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3477
3499
  border-radius: 4px;
@@ -3497,11 +3519,56 @@ const StyledTextarea = styled.textarea `
3497
3519
  display: block;
3498
3520
  width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3499
3521
  &:focus {
3500
- border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3522
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
3501
3523
  }
3502
3524
  `;
3525
+ StyledTextarea.defaultProps = { theme: EditableTheme };
3526
+ const SuggestedValues = styled.div `
3527
+ background: #fff;
3528
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
3529
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
3530
+ border-radius: 0px 0px 4px 4px;
3531
+ border-style: solid;
3532
+ border-top: none;
3533
+ border-width: 1px;
3534
+ left: -1px;
3535
+ position: absolute;
3536
+ right: -1px;
3537
+ top: 39px;
3538
+ z-index: 10;
3539
+ max-height: 220px;
3540
+ overflow: auto;
3541
+ `;
3542
+ SuggestedValues.defaultProps = { theme: EditableTheme };
3543
+ const SuggestedSummary = styled.div `
3544
+ color: ${Colors.MEDIUM_GRAY.Hex};
3545
+ font-size: 12px;
3546
+ font-family: ${FontStyles.DEFAULT};
3547
+ font-weight: 500;
3548
+ line-height: 18px;
3549
+ padding: 10px 12px;
3550
+ border-bottom: 1px solid #e5e5e5;
3551
+ background: #fff;
3552
+ z-index: 1;
3553
+ position: sticky;
3554
+ top: 0px;
3555
+ `;
3556
+ const SuggestedValue = styled.div `
3557
+ cursor: pointer;
3558
+ padding: 8px 12px;
3559
+ font-size: ${FontSizes.DEFAULT};
3560
+ font-family: ${FontStyles.DEFAULT};
3561
+ font-weight: 400;
3562
+ line-height: 1.6em;
3563
+ color: ${Colors.BLACK.Hex};
3564
+
3565
+ &:hover {
3566
+ background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
3567
+ }
3568
+ `;
3569
+ SuggestedValue.defaultProps = { theme: EditableTheme };
3503
3570
  const Input$1 = (_a) => {
3504
- var { format, suffix, height, invalid, max, maxLength, min, onBlur, onChange, onKeyDown, placeholder, readOnly, step, style, type = 'text', value = '' } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "max", "maxLength", "min", "onBlur", "onChange", "onKeyDown", "placeholder", "readOnly", "step", "style", "type", "value"]);
3571
+ var { format, suffix, height, invalid, max, maxLength, min, onBlur, onChange, onKeyDown, onSuggestedSelect, placeholder, readOnly, step, style, suggestedValues, type = 'text', value = '' } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "max", "maxLength", "min", "onBlur", "onChange", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "step", "style", "suggestedValues", "type", "value"]);
3505
3572
  const handleInputChange = (e) => {
3506
3573
  if (format === 'currency' || format === 'currency_decimal') {
3507
3574
  e.target.value = e.target.value.replace(/[^0-9.]/g, '');
@@ -3540,13 +3607,27 @@ const Input$1 = (_a) => {
3540
3607
  if (format === 'ssn' && type !== 'password') {
3541
3608
  formatted_value = formatAsSsn(value);
3542
3609
  }
3543
- return type === 'textarea' ? (React.createElement(StyledTextarea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$style": style, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(StyledWrapper, { "$style": style },
3544
- React.createElement(StyledInput, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$suffix": suffix, max: max, maxLength: maxLength, min: min, onBlur: onBlur, onChange: handleInputChange, onKeyDown: onKeyDown, placeholder: placeholder, step: step, type: type, value: formatted_value }, accessibleProps)),
3545
- suffix && React.createElement(StyledSuffix, null, suffix)));
3610
+ return type === 'textarea' ? (React.createElement(StyledTextarea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$style": style, maxLength: maxLength, onBlur: onBlur, onChange: handleTextareaChange, placeholder: placeholder, value: value }, accessibleProps))) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": !!(suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) },
3611
+ React.createElement(StyledInput, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, max: max, maxLength: maxLength, min: min, onBlur: onBlur, onChange: handleInputChange, onKeyDown: onKeyDown, placeholder: placeholder, step: step, type: type, value: formatted_value }, accessibleProps)),
3612
+ suffix && React.createElement(StyledSuffix, null, suffix),
3613
+ (suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) ? (React.createElement(SuggestedValues, null,
3614
+ React.createElement(SuggestedSummary, null,
3615
+ suggestedValues.length,
3616
+ " Results Match \"",
3617
+ value,
3618
+ "\""),
3619
+ suggestedValues.map(s_value => {
3620
+ return (React.createElement(SuggestedValue, { onClick: () => {
3621
+ handleInputChange({ target: { value: s_value } });
3622
+ if (onSuggestedSelect) {
3623
+ onSuggestedSelect();
3624
+ }
3625
+ } }, s_value));
3626
+ }))) : null));
3546
3627
  };
3547
3628
 
3548
3629
  const Wrapper$8 = styled.a `
3549
- color: ${Colors.PRIMARY.Hex};
3630
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3550
3631
  font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
3551
3632
  line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
3552
3633
  letter-spacing: ${props => (props.$small ? '1px' : '0px')};
@@ -3559,6 +3640,7 @@ const Wrapper$8 = styled.a `
3559
3640
  box-sizing: border-box;
3560
3641
  cursor: pointer;
3561
3642
  `;
3643
+ Wrapper$8.defaultProps = { theme: EditableTheme };
3562
3644
  const Link = (_a) => {
3563
3645
  var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
3564
3646
  return (React.createElement(Wrapper$8, Object.assign({ "$small": small, onClick: onClick }, accessibleProps), children));
@@ -3653,11 +3735,17 @@ const Step = styled.div `
3653
3735
  align-items: center;
3654
3736
  gap: 8px;
3655
3737
  `;
3738
+ const StyledIcon$2 = styled(Icon) `
3739
+ > path {
3740
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
3741
+ }
3742
+ `;
3743
+ StyledIcon$2.defaultProps = { theme: EditableTheme };
3656
3744
  const StepIndicator = styled.div `
3657
3745
  width: 30px;
3658
3746
  height: 30px;
3659
3747
  border-radius: 15px;
3660
- background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
3748
+ background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
3661
3749
  color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
3662
3750
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
3663
3751
  font-size: 14px;
@@ -3668,6 +3756,7 @@ const StepIndicator = styled.div `
3668
3756
  justify-content: center;
3669
3757
  flex-shrink: 0;
3670
3758
  `;
3759
+ StepIndicator.defaultProps = { theme: EditableTheme };
3671
3760
  const StepLabel = styled.div `
3672
3761
  color: #000;
3673
3762
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
@@ -3678,7 +3767,7 @@ const StepLabel = styled.div `
3678
3767
  const ProgressBar = ({ steps }) => {
3679
3768
  return (React.createElement(Steps, null, steps.map((step, i) => {
3680
3769
  return (React.createElement(Step, { key: i },
3681
- step.complete ? (React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3770
+ step.complete ? (React.createElement(StyledIcon$2, { path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3682
3771
  React.createElement(StepLabel, null, step.label)));
3683
3772
  })));
3684
3773
  };
@@ -3696,8 +3785,10 @@ const Wrapper$7 = styled.div `
3696
3785
  justify-content: center;
3697
3786
  `;
3698
3787
  const Container$1 = styled.dialog `
3699
- max-width: ${props => props.$maxWidth || '90vw'};
3700
- width: auto;
3788
+ width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
3789
+ max-width: calc(100vw - 80px);
3790
+ height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
3791
+ max-height: calc(100vh - 80px);
3701
3792
  border-radius: 8px;
3702
3793
  overflow: hidden;
3703
3794
  box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
@@ -3706,10 +3797,11 @@ const Container$1 = styled.dialog `
3706
3797
  position: relative;
3707
3798
  padding: 0px;
3708
3799
  box-sizing: border-box;
3800
+ display: flex;
3801
+ flex-direction: column;
3709
3802
  `;
3710
3803
  const Header$1 = styled.div `
3711
- position: sticky;
3712
- top: 0;
3804
+ flex-shrink: 0;
3713
3805
  padding: 20px;
3714
3806
  border-bottom: 1px solid #e7e6e6;
3715
3807
  display: flex;
@@ -3735,12 +3827,11 @@ const ContentWrapper = styled.div `
3735
3827
  overflow-x: hidden;
3736
3828
  overflow-y: auto;
3737
3829
  background: #ffffff;
3738
- max-height: calc(100vh - 260px);
3830
+ flex: 1;
3739
3831
  box-sizing: border-box;
3740
3832
  `;
3741
3833
  const ButtonBar = styled.div `
3742
- position: sticky;
3743
- bottom: 0;
3834
+ flex-shrink: 0;
3744
3835
  background: #ffffff;
3745
3836
  padding: 20px;
3746
3837
  border-top: 1px solid #e7e6e6;
@@ -3750,7 +3841,7 @@ const ButtonBar = styled.div `
3750
3841
  box-sizing: border-box;
3751
3842
  `;
3752
3843
  const Modal = (_a) => {
3753
- var { children, title, onClose, maxWidth, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
3844
+ var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
3754
3845
  useEffect(() => {
3755
3846
  document.onkeydown = e => {
3756
3847
  if (e.key === 'Escape') {
@@ -3762,7 +3853,7 @@ const Modal = (_a) => {
3762
3853
  };
3763
3854
  }, []);
3764
3855
  return (React.createElement(Wrapper$7, null,
3765
- React.createElement(Container$1, Object.assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
3856
+ React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps),
3766
3857
  React.createElement(Header$1, null,
3767
3858
  title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
3768
3859
  React.createElement(Close, { onClick: onClose },
@@ -3800,7 +3891,7 @@ const Trigger = styled.div `
3800
3891
  return Colors.RED.Hex;
3801
3892
  }
3802
3893
  else if (props.$showOptions) {
3803
- return Colors.PRIMARY.Hex;
3894
+ return props.theme.PRIMARY_COLOR.Hex;
3804
3895
  }
3805
3896
  else {
3806
3897
  return '#cccccc';
@@ -3814,6 +3905,7 @@ const Trigger = styled.div `
3814
3905
  justify-content: space-between;
3815
3906
  z-index: 1;
3816
3907
  `;
3908
+ Trigger.defaultProps = { theme: EditableTheme };
3817
3909
  const Value = styled.div `
3818
3910
  color: ${Colors.BLACK.Hex};
3819
3911
  font-family: ${FontStyles.DEFAULT};
@@ -3828,7 +3920,7 @@ const Value = styled.div `
3828
3920
  const Options = styled.div `
3829
3921
  background: #fff;
3830
3922
  box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
3831
- border-color: ${Colors.PRIMARY.Hex};
3923
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
3832
3924
  border-radius: 0px 0px 4px 4px;
3833
3925
  border-style: solid;
3834
3926
  border-top: none;
@@ -3840,6 +3932,7 @@ const Options = styled.div `
3840
3932
  max-height: 220px;
3841
3933
  overflow: auto;
3842
3934
  `;
3935
+ Options.defaultProps = { theme: EditableTheme };
3843
3936
  const Scrim = styled.div `
3844
3937
  bottom: 0;
3845
3938
  left: 0;
@@ -4045,17 +4138,19 @@ const Header = styled.th `
4045
4138
  box-sizing: border-box;
4046
4139
  width: ${props => props.$width || 'auto'};
4047
4140
  cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
4048
- color: ${props => (props.$isSortable ? Colors.PRIMARY.Hex : Colors.BLACK.Hex)};
4141
+ color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
4049
4142
  `;
4143
+ Header.defaultProps = { theme: EditableTheme };
4050
4144
  const Row = styled.tr `
4051
4145
  cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
4052
4146
  transition: all 0.2s;
4053
4147
  background-color: ${props => props.$bgColor};
4054
4148
  box-sizing: border-box;
4055
4149
  &:hover {
4056
- background-color: ${props => props.$isClickable ? `rgba(${Colors.PRIMARY.Rgb}, 0.1)` : props.$bgColor};
4150
+ background-color: ${props => props.$isClickable ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.1)` : props.$bgColor};
4057
4151
  }
4058
4152
  `;
4153
+ Row.defaultProps = { theme: EditableTheme };
4059
4154
  const Column = styled.td `
4060
4155
  padding: 16px 12px !important;
4061
4156
  font-size: ${FontSizes.DEFAULT} !important;
@@ -4073,6 +4168,12 @@ const IconWrapper = styled.span `
4073
4168
  transform: translateY(-50%);
4074
4169
  margin-left: 2px;
4075
4170
  `;
4171
+ const StyledIcon$1 = styled(Icon) `
4172
+ > path {
4173
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
4174
+ }
4175
+ `;
4176
+ StyledIcon$1.defaultProps = { theme: EditableTheme };
4076
4177
  const Table = (_a) => {
4077
4178
  var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
4078
4179
  return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps),
@@ -4081,7 +4182,7 @@ const Table = (_a) => {
4081
4182
  return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width, key: i, onClick: onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange.bind(null, column.id) },
4082
4183
  column.label,
4083
4184
  column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, null,
4084
- React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: sortDirection === 'asc' ? mdiChevronUp : mdiChevronDown, size: '20px' }))) : null));
4185
+ React.createElement(StyledIcon$1, { path: sortDirection === 'asc' ? mdiChevronUp : mdiChevronDown, size: '20px' }))) : null));
4085
4186
  })))),
4086
4187
  data.length ? (React.createElement("tbody", null, data.map((row, i) => {
4087
4188
  return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map((column, i) => {
@@ -4114,14 +4215,15 @@ const Tab = styled.div `
4114
4215
  margin: 0 0 -1px 0;
4115
4216
  border-bottom-width: 4px;
4116
4217
  border-bottom-style: solid;
4117
- border-bottom-color: ${props => (props.$isActive ? Colors.PRIMARY.Hex : 'transparent')};
4218
+ border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
4118
4219
  cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
4119
4220
  box-sizing: border-box;
4120
4221
  &:hover {
4121
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.PRIMARY.Hex)};
4222
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
4122
4223
  font-weight: 500;
4123
4224
  }
4124
4225
  `;
4226
+ Tab.defaultProps = { theme: EditableTheme };
4125
4227
  const Badge = styled.div `
4126
4228
  display: flex;
4127
4229
  width: 18px;
@@ -4129,7 +4231,7 @@ const Badge = styled.div `
4129
4231
  justify-content: center;
4130
4232
  align-items: center;
4131
4233
  border-radius: 9px;
4132
- background: ${props => (props.$isError ? Colors.RED.Hex : Colors.PRIMARY.Hex)};
4234
+ background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
4133
4235
  color: #fff;
4134
4236
  font-family: ${FontStyles.DEFAULT};
4135
4237
  font-size: 12px;
@@ -4137,6 +4239,7 @@ const Badge = styled.div `
4137
4239
  line-height: 1;
4138
4240
  letter-spacing: 1px;
4139
4241
  `;
4242
+ Badge.defaultProps = { theme: EditableTheme };
4140
4243
  const Tabs = (_a) => {
4141
4244
  var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
4142
4245
  return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps), tabs.map((_a, i) => {