@hexure/ui 1.8.17 → 1.9.0

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/README.md CHANGED
@@ -15,6 +15,11 @@ InsTech UI is the source repository for the @hexure/ui npm package. This library
15
15
  `npm run rollup` to run rollup and generate a dist folder
16
16
  `npm run storybook` to run storybook server and see components on storybook.
17
17
  `npm run test` to run all test cases.
18
+ 5. Optional: Applying a custom theme:
19
+ 1. Import the `ThemeProvider` from styled-components: `import { ThemeProvider } from 'styled-components'`
20
+ 2. Wrap your top level application with the ThemeProvider: `<ThemeProvider><YourApp /></ThemeProvider>`
21
+ 3. Define your custom theme on the provider: `<ThemeProvider theme={{ PRIMARY_COLOR: { Hex: 'Blue', Rgb: '10,10,10' } }}><YourApp /></ThemeProvider>`
22
+ 4. As of v1.9.0 the only theme option is `PRIMARY_COLOR` and it must be an object with `Hex` and `Rbg` values.
18
23
 
19
24
 
20
25
  # Contribute
@@ -81,5 +86,5 @@ You should release a new version of this package immediately after a Pull Reques
81
86
  12. Go to the Azure DevOps repo and add a new Tag
82
87
  - Tag Name: v1.x.x
83
88
  - Description: Add details around what was added/changed
84
-
89
+
85
90
 
package/dist/cjs/index.js CHANGED
@@ -2016,6 +2016,9 @@ const FontStyles = {
2016
2016
  const FontSizes = {
2017
2017
  DEFAULT: '14px',
2018
2018
  SMALL: '13px',
2019
+ };
2020
+ const EditableTheme = {
2021
+ PRIMARY_COLOR: Colors.PRIMARY,
2019
2022
  };
2020
2023
 
2021
2024
  const Header$3 = styled.div `
@@ -2046,36 +2049,6 @@ const Accordion = (_a) => {
2046
2049
  open ? children : null));
2047
2050
  };
2048
2051
 
2049
- const button_type_mapping = {
2050
- primary: {
2051
- background_color: Colors.PRIMARY.Hex,
2052
- border_color: Colors.PRIMARY.Hex,
2053
- content_color: '#fff',
2054
- badge_bg_color: '#fff',
2055
- badge_content_color: Colors.PRIMARY.Hex,
2056
- },
2057
- secondary: {
2058
- background_color: 'transparent',
2059
- border_color: Colors.PRIMARY.Hex,
2060
- content_color: Colors.PRIMARY.Hex,
2061
- badge_bg_color: Colors.PRIMARY.Hex,
2062
- badge_content_color: '#fff',
2063
- },
2064
- red: {
2065
- background_color: Colors.RED.Hex,
2066
- border_color: Colors.RED.Hex,
2067
- content_color: '#fff',
2068
- badge_bg_color: '#fff',
2069
- badge_content_color: Colors.RED.Hex,
2070
- },
2071
- green: {
2072
- background_color: Colors.GREEN.Hex,
2073
- border_color: Colors.GREEN.Hex,
2074
- content_color: '#fff',
2075
- badge_bg_color: '#fff',
2076
- badge_content_color: Colors.GREEN.Hex,
2077
- },
2078
- };
2079
2052
  const StyledButton = styled.button `
2080
2053
  height: ${props => (props.$small ? '30px' : '40px')};
2081
2054
  line-height: 1em;
@@ -2093,7 +2066,7 @@ const StyledButton = styled.button `
2093
2066
  return '0px';
2094
2067
  }};
2095
2068
  outline: none;
2096
- background: ${props => props.$format ? button_type_mapping[props.$format].background_color : Colors.PRIMARY.Hex};
2069
+ background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
2097
2070
  width: ${props => {
2098
2071
  if (props.$hasChildren) {
2099
2072
  return 'auto';
@@ -2110,20 +2083,20 @@ const StyledButton = styled.button `
2110
2083
  opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
2111
2084
  border-width: 1px;
2112
2085
  border-style: solid;
2113
- border-color: ${props => props.$format ? button_type_mapping[props.$format].border_color : Colors.PRIMARY.Hex};
2086
+ border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
2114
2087
  box-sizing: border-box;
2115
2088
  &:hover {
2116
2089
  opacity: ${props => (props.$disabled ? 0.6 : 1)};
2117
2090
  }
2118
2091
  `;
2119
2092
  const Label$5 = styled.span `
2120
- color: ${props => (props.$format ? button_type_mapping[props.$format].content_color : '#fff')};
2093
+ color: ${props => props.$content_color || '#fff'};
2121
2094
  font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
2122
2095
  font-family: ${FontStyles.DEFAULT};
2123
2096
  font-weight: 500;
2124
2097
  line-height: 1;
2125
2098
  `;
2126
- const StyledIcon$4 = styled.span `
2099
+ const StyledIcon$6 = styled.span `
2127
2100
  margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
2128
2101
  margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
2129
2102
  display: flex;
@@ -2138,8 +2111,8 @@ const Badge$1 = styled.span `
2138
2111
  align-items: center;
2139
2112
  justify-content: center;
2140
2113
  border-radius: 100%;
2141
- background-color: ${props => props.$format ? button_type_mapping[props.$format].badge_bg_color : '#fff'};
2142
- color: ${props => props.$format ? button_type_mapping[props.$format].badge_content_color : Colors.PRIMARY.Hex};
2114
+ background-color: ${props => props.$bg_color || '#fff'};
2115
+ color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
2143
2116
  font-size: ${props => (props.$small ? '10px' : '12px')};
2144
2117
  font-weight: 600;
2145
2118
  font-family: ${FontStyles.DEFAULT};
@@ -2149,12 +2122,44 @@ const Badge$1 = styled.span `
2149
2122
  `;
2150
2123
  const Button = (_a) => {
2151
2124
  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"]);
2125
+ const theme = React.useContext(Me) || EditableTheme;
2152
2126
  const has_children = children && children.length > 0;
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$5, { "$format": format, "$small": small }, children)) : null,
2155
- icon && !badge ? (React.createElement(StyledIcon$4, { "$hasChildren": !!has_children },
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
- badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
2127
+ const button_type_mapping = {
2128
+ primary: {
2129
+ background_color: theme.PRIMARY_COLOR.Hex,
2130
+ border_color: theme.PRIMARY_COLOR.Hex,
2131
+ content_color: '#fff',
2132
+ badge_bg_color: '#fff',
2133
+ badge_content_color: theme.PRIMARY_COLOR.Hex,
2134
+ },
2135
+ secondary: {
2136
+ background_color: 'transparent',
2137
+ border_color: theme.PRIMARY_COLOR.Hex,
2138
+ content_color: theme.PRIMARY_COLOR.Hex,
2139
+ badge_bg_color: theme.PRIMARY_COLOR.Hex,
2140
+ badge_content_color: '#fff',
2141
+ },
2142
+ red: {
2143
+ background_color: Colors.RED.Hex,
2144
+ border_color: Colors.RED.Hex,
2145
+ content_color: '#fff',
2146
+ badge_bg_color: '#fff',
2147
+ badge_content_color: Colors.RED.Hex,
2148
+ },
2149
+ green: {
2150
+ background_color: Colors.GREEN.Hex,
2151
+ border_color: Colors.GREEN.Hex,
2152
+ content_color: '#fff',
2153
+ badge_bg_color: '#fff',
2154
+ badge_content_color: Colors.GREEN.Hex,
2155
+ },
2156
+ };
2157
+ const format_styles = button_type_mapping[format];
2158
+ 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),
2159
+ children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small }, children)) : null,
2160
+ icon && !badge ? (React.createElement(StyledIcon$6, { "$hasChildren": !!has_children },
2161
+ React.createElement(Icon, { color: format ? format_styles.content_color : '#fff', path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2162
+ badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small }, badge)) : null));
2158
2163
  };
2159
2164
 
2160
2165
  const StyledComponent = styled.p `
@@ -2284,22 +2289,24 @@ const Wrapper$h = styled.div `
2284
2289
  padding: ${({ $small }) => ($small ? '11px' : '20px')};
2285
2290
  box-sizing: border-box;
2286
2291
  `;
2287
- const StyledIcon$3 = styled(Icon) `
2292
+ const StyledIcon$5 = styled(Icon) `
2288
2293
  flex-shrink: 0;
2289
2294
  `;
2290
2295
  const Action$1 = styled.div `
2291
- color: ${Colors.PRIMARY.Hex};
2296
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
2292
2297
  font-size: ${FontSizes.DEFAULT};
2293
2298
  font-family: ${FontStyles.DEFAULT};
2294
2299
  font-weight: 500;
2295
2300
  cursor: pointer;
2296
2301
  margin-top: 6px;
2297
2302
  `;
2303
+ Action$1.defaultProps = { theme: EditableTheme };
2298
2304
  const Alert = (_a) => {
2299
2305
  var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
2306
+ const theme = React.useContext(Me) || EditableTheme;
2300
2307
  const type_mapping = {
2301
2308
  info: {
2302
- color: Colors.PRIMARY.Hex,
2309
+ color: theme.PRIMARY_COLOR.Hex,
2303
2310
  icon: js.mdiInformationOutline,
2304
2311
  },
2305
2312
  error: {
@@ -2316,7 +2323,7 @@ const Alert = (_a) => {
2316
2323
  },
2317
2324
  };
2318
2325
  return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
2319
- React.createElement(StyledIcon$3, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2326
+ React.createElement(StyledIcon$5, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2320
2327
  React.createElement("div", null,
2321
2328
  title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2322
2329
  description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
@@ -2324,7 +2331,7 @@ const Alert = (_a) => {
2324
2331
  };
2325
2332
 
2326
2333
  const Wrapper$g = styled.div `
2327
- border: 1px solid ${Colors.PRIMARY.Hex};
2334
+ border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
2328
2335
  border-radius: 8px;
2329
2336
  box-sizing: border-box;
2330
2337
  display: flex;
@@ -2332,6 +2339,7 @@ const Wrapper$g = styled.div `
2332
2339
  justify-content: space-between;
2333
2340
  padding: 16px 20px;
2334
2341
  `;
2342
+ Wrapper$g.defaultProps = { theme: EditableTheme };
2335
2343
  const Left = styled.div `
2336
2344
  box-sizing: border-box;
2337
2345
  display: flex;
@@ -2356,13 +2364,14 @@ const Clear = styled.span `
2356
2364
  font-size: 14px;
2357
2365
  font-weight: 400;
2358
2366
  font-family: ${FontStyles.DEFAULT};
2359
- color: ${Colors.PRIMARY.Hex};
2367
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
2360
2368
  line-height: 1;
2361
2369
  cursor: pointer;
2362
2370
  padding-left: 10px;
2363
2371
  margin-left: 10px;
2364
2372
  border-left: 1px solid #ccc;
2365
2373
  `;
2374
+ Clear.defaultProps = { theme: EditableTheme };
2366
2375
  const Actions$1 = styled.div `
2367
2376
  box-sizing: border-box;
2368
2377
  display: flex;
@@ -2429,10 +2438,11 @@ const MenuItem = styled.div `
2429
2438
 
2430
2439
  svg,
2431
2440
  path {
2432
- fill: ${Colors.PRIMARY.Hex} !important;
2441
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2433
2442
  }
2434
2443
  }
2435
2444
  `;
2445
+ MenuItem.defaultProps = { theme: EditableTheme };
2436
2446
  const Title$1 = styled.span `
2437
2447
  font-family: Roboto;
2438
2448
  font-size: 14px;
@@ -2962,12 +2972,15 @@ const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate
2962
2972
  setDayOptions(Array.from({ length: dDate.daysInMonth() }, (_, i) => ({
2963
2973
  value: i + 1,
2964
2974
  })));
2965
- // Mimicing browser event structure
2966
- onChange({
2967
- target: {
2968
- value: dDate.format('YYYY-MM-DD'),
2969
- },
2970
- });
2975
+ // Only fire the onChange event if the date has changed
2976
+ if (dDate.format('YYYY-MM-DD') !== date) {
2977
+ // Copying the browser event structure
2978
+ onChange({
2979
+ target: {
2980
+ value: dDate.format('YYYY-MM-DD'),
2981
+ },
2982
+ });
2983
+ }
2971
2984
  }, [dDate]);
2972
2985
  const handleDayChange = (e) => {
2973
2986
  const date = parseInt(e.target.value, 10);
@@ -3084,13 +3097,14 @@ const Wrapper$b = styled.div `
3084
3097
  position: relative;
3085
3098
  height: 16px;
3086
3099
  `;
3087
- const StyledIcon$2 = styled(Icon) `
3100
+ const StyledIcon$4 = styled(Icon) `
3088
3101
  width: 16px;
3089
3102
  height: 16px;
3090
3103
  padding: 0px 6px;
3091
- color: ${Colors.PRIMARY.Hex};
3104
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3092
3105
  cursor: pointer;
3093
3106
  `;
3107
+ StyledIcon$4.defaultProps = { theme: EditableTheme };
3094
3108
  const positions = {
3095
3109
  'right-top': {
3096
3110
  top: '0px',
@@ -3119,11 +3133,12 @@ const positions = {
3119
3133
  transform: 'translateY(-50%)',
3120
3134
  },
3121
3135
  };
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])));
3136
+ 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])));
3137
+ Content$3.defaultProps = { theme: EditableTheme };
3123
3138
  const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
3124
3139
  const [show_content, toggleContent] = React.useState(false);
3125
3140
  return (React.createElement(Wrapper$b, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
3126
- trigger || React.createElement(StyledIcon$2, { path: js.mdiInformationOutline }),
3141
+ trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
3127
3142
  show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
3128
3143
  };
3129
3144
 
@@ -3153,9 +3168,10 @@ const Action = styled.span `
3153
3168
  font-weight: 500;
3154
3169
  line-height: 1em;
3155
3170
  font-family: ${FontStyles.DEFAULT};
3156
- color: ${Colors.PRIMARY.Hex};
3171
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3157
3172
  cursor: pointer;
3158
3173
  `;
3174
+ Action.defaultProps = { theme: EditableTheme };
3159
3175
  const Description = styled.div `
3160
3176
  font-size: ${FontSizes.SMALL};
3161
3177
  font-weight: 400;
@@ -3227,10 +3243,11 @@ const Dropzone = styled.div `
3227
3243
  border-radius: 8px;
3228
3244
  border-width: 1px;
3229
3245
  border-style: dashed;
3230
- border-color: ${props => (props.$dragging ? Colors.PRIMARY.Hex : '#cccccc')};
3231
- background: ${props => (props.$dragging ? `rgba(${Colors.PRIMARY.Rgb}, 0.05)` : '#ffffff')};
3246
+ border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
3247
+ background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
3232
3248
  cursor: copy;
3233
3249
  `;
3250
+ Dropzone.defaultProps = { theme: EditableTheme };
3234
3251
  const IconWrapper$1 = styled.div `
3235
3252
  width: 80px;
3236
3253
  height: 80px;
@@ -3240,7 +3257,7 @@ const IconWrapper$1 = styled.div `
3240
3257
  align-items: center;
3241
3258
  justify-content: center;
3242
3259
  `;
3243
- const StyledIcon$1 = styled(Icon) `
3260
+ const StyledIcon$3 = styled(Icon) `
3244
3261
  width: 40px !important;
3245
3262
  height: 40px !important;
3246
3263
 
@@ -3392,7 +3409,7 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, mes
3392
3409
  }))) : null,
3393
3410
  allowMoreFiles ? (React.createElement(ClickZone, { onClick: triggerFileExplorer },
3394
3411
  files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging },
3395
- React.createElement(StyledIcon$1, { path: js.mdiFolderPlusOutline }))),
3412
+ React.createElement(StyledIcon$3, { path: js.mdiFolderPlusOutline }))),
3396
3413
  React.createElement(Content$1, null,
3397
3414
  React.createElement(Copy, { align: 'center', type: 'bold' }, "Drag & drop files here or click to select files"),
3398
3415
  message ? (React.createElement(Copy, { align: 'center', color: 'GRAY' }, message)) : null))) : null)));
@@ -3426,11 +3443,8 @@ const formatAsSsn = (number) => {
3426
3443
  };
3427
3444
 
3428
3445
  const StyledInput = styled.input `
3429
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3430
- border-radius: ${props => (props.$suffix ? '4px 0px 0px 4px' : '4px')};
3431
- border-width: 1px;
3432
- border-style: solid;
3433
- border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3446
+ border: none !important;
3447
+ background: none !important;
3434
3448
  font-size: ${FontSizes.DEFAULT};
3435
3449
  font-weight: 400;
3436
3450
  font-family: ${FontStyles.DEFAULT};
@@ -3448,22 +3462,19 @@ const StyledInput = styled.input `
3448
3462
  box-sizing: border-box;
3449
3463
  display: block;
3450
3464
  width: 100%;
3451
- &:focus {
3452
- border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3453
- }
3454
3465
  `;
3455
3466
  const StyledSuffix = styled.div `
3456
3467
  box-sizing: border-box;
3468
+ border-radius: 0px 4px 4px 0px;
3457
3469
  display: flex;
3458
3470
  justify-content: center;
3459
3471
  align-items: center;
3460
3472
  padding: 10px;
3461
3473
  height: auto;
3462
3474
  background: #f5f5f5;
3463
- border-width: 1px 1px 1px 0px;
3475
+ border-width: 0px 0px 0px 1px;
3464
3476
  border-style: solid;
3465
3477
  border-color: #cccccc;
3466
- border-radius: 0px 4px 4px 0px;
3467
3478
  font-family: ${FontStyles.DEFAULT};
3468
3479
  font-style: normal;
3469
3480
  font-weight: 400;
@@ -3473,7 +3484,18 @@ const StyledSuffix = styled.div `
3473
3484
  const StyledWrapper = styled.div `
3474
3485
  display: flex;
3475
3486
  width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3487
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3488
+ position: relative;
3489
+ border-width: 1px;
3490
+ border-style: solid;
3491
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
3492
+ border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
3493
+
3494
+ &:focus-within {
3495
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
3496
+ }
3476
3497
  `;
3498
+ StyledWrapper.defaultProps = { theme: EditableTheme };
3477
3499
  const StyledTextarea = styled.textarea `
3478
3500
  background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
3479
3501
  border-radius: 4px;
@@ -3499,11 +3521,56 @@ const StyledTextarea = styled.textarea `
3499
3521
  display: block;
3500
3522
  width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
3501
3523
  &:focus {
3502
- border-color: ${props => (props.$readOnly ? '#cccccc' : Colors.PRIMARY.Hex)};
3524
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
3503
3525
  }
3504
3526
  `;
3527
+ StyledTextarea.defaultProps = { theme: EditableTheme };
3528
+ const SuggestedValues = styled.div `
3529
+ background: #fff;
3530
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
3531
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
3532
+ border-radius: 0px 0px 4px 4px;
3533
+ border-style: solid;
3534
+ border-top: none;
3535
+ border-width: 1px;
3536
+ left: -1px;
3537
+ position: absolute;
3538
+ right: -1px;
3539
+ top: 39px;
3540
+ z-index: 10;
3541
+ max-height: 220px;
3542
+ overflow: auto;
3543
+ `;
3544
+ SuggestedValues.defaultProps = { theme: EditableTheme };
3545
+ const SuggestedSummary = styled.div `
3546
+ color: ${Colors.MEDIUM_GRAY.Hex};
3547
+ font-size: 12px;
3548
+ font-family: ${FontStyles.DEFAULT};
3549
+ font-weight: 500;
3550
+ line-height: 18px;
3551
+ padding: 10px 12px;
3552
+ border-bottom: 1px solid #e5e5e5;
3553
+ background: #fff;
3554
+ z-index: 1;
3555
+ position: sticky;
3556
+ top: 0px;
3557
+ `;
3558
+ const SuggestedValue = styled.div `
3559
+ cursor: pointer;
3560
+ padding: 8px 12px;
3561
+ font-size: ${FontSizes.DEFAULT};
3562
+ font-family: ${FontStyles.DEFAULT};
3563
+ font-weight: 400;
3564
+ line-height: 1.6em;
3565
+ color: ${Colors.BLACK.Hex};
3566
+
3567
+ &:hover {
3568
+ background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
3569
+ }
3570
+ `;
3571
+ SuggestedValue.defaultProps = { theme: EditableTheme };
3505
3572
  const Input$1 = (_a) => {
3506
- 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"]);
3573
+ 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"]);
3507
3574
  const handleInputChange = (e) => {
3508
3575
  if (format === 'currency' || format === 'currency_decimal') {
3509
3576
  e.target.value = e.target.value.replace(/[^0-9.]/g, '');
@@ -3542,13 +3609,27 @@ const Input$1 = (_a) => {
3542
3609
  if (format === 'ssn' && type !== 'password') {
3543
3610
  formatted_value = formatAsSsn(value);
3544
3611
  }
3545
- 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 },
3546
- 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)),
3547
- suffix && React.createElement(StyledSuffix, null, suffix)));
3612
+ 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) },
3613
+ 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)),
3614
+ suffix && React.createElement(StyledSuffix, null, suffix),
3615
+ (suggestedValues === null || suggestedValues === void 0 ? void 0 : suggestedValues.length) ? (React.createElement(SuggestedValues, null,
3616
+ React.createElement(SuggestedSummary, null,
3617
+ suggestedValues.length,
3618
+ " Results Match \"",
3619
+ value,
3620
+ "\""),
3621
+ suggestedValues.map(s_value => {
3622
+ return (React.createElement(SuggestedValue, { onClick: () => {
3623
+ handleInputChange({ target: { value: s_value } });
3624
+ if (onSuggestedSelect) {
3625
+ onSuggestedSelect();
3626
+ }
3627
+ } }, s_value));
3628
+ }))) : null));
3548
3629
  };
3549
3630
 
3550
3631
  const Wrapper$8 = styled.a `
3551
- color: ${Colors.PRIMARY.Hex};
3632
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
3552
3633
  font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
3553
3634
  line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
3554
3635
  letter-spacing: ${props => (props.$small ? '1px' : '0px')};
@@ -3561,6 +3642,7 @@ const Wrapper$8 = styled.a `
3561
3642
  box-sizing: border-box;
3562
3643
  cursor: pointer;
3563
3644
  `;
3645
+ Wrapper$8.defaultProps = { theme: EditableTheme };
3564
3646
  const Link = (_a) => {
3565
3647
  var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
3566
3648
  return (React.createElement(Wrapper$8, Object.assign({ "$small": small, onClick: onClick }, accessibleProps), children));
@@ -3655,11 +3737,17 @@ const Step = styled.div `
3655
3737
  align-items: center;
3656
3738
  gap: 8px;
3657
3739
  `;
3740
+ const StyledIcon$2 = styled(Icon) `
3741
+ > path {
3742
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
3743
+ }
3744
+ `;
3745
+ StyledIcon$2.defaultProps = { theme: EditableTheme };
3658
3746
  const StepIndicator = styled.div `
3659
3747
  width: 30px;
3660
3748
  height: 30px;
3661
3749
  border-radius: 15px;
3662
- background: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.LIGHT_GRAY.Hex)};
3750
+ background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
3663
3751
  color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
3664
3752
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
3665
3753
  font-size: 14px;
@@ -3670,6 +3758,7 @@ const StepIndicator = styled.div `
3670
3758
  justify-content: center;
3671
3759
  flex-shrink: 0;
3672
3760
  `;
3761
+ StepIndicator.defaultProps = { theme: EditableTheme };
3673
3762
  const StepLabel = styled.div `
3674
3763
  color: #000;
3675
3764
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
@@ -3680,7 +3769,7 @@ const StepLabel = styled.div `
3680
3769
  const ProgressBar = ({ steps }) => {
3681
3770
  return (React.createElement(Steps, null, steps.map((step, i) => {
3682
3771
  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)),
3772
+ step.complete ? (React.createElement(StyledIcon$2, { path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
3684
3773
  React.createElement(StepLabel, null, step.label)));
3685
3774
  })));
3686
3775
  };
@@ -3802,7 +3891,7 @@ const Trigger = styled.div `
3802
3891
  return Colors.RED.Hex;
3803
3892
  }
3804
3893
  else if (props.$showOptions) {
3805
- return Colors.PRIMARY.Hex;
3894
+ return props.theme.PRIMARY_COLOR.Hex;
3806
3895
  }
3807
3896
  else {
3808
3897
  return '#cccccc';
@@ -3816,6 +3905,7 @@ const Trigger = styled.div `
3816
3905
  justify-content: space-between;
3817
3906
  z-index: 1;
3818
3907
  `;
3908
+ Trigger.defaultProps = { theme: EditableTheme };
3819
3909
  const Value = styled.div `
3820
3910
  color: ${Colors.BLACK.Hex};
3821
3911
  font-family: ${FontStyles.DEFAULT};
@@ -3830,7 +3920,7 @@ const Value = styled.div `
3830
3920
  const Options = styled.div `
3831
3921
  background: #fff;
3832
3922
  box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
3833
- border-color: ${Colors.PRIMARY.Hex};
3923
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
3834
3924
  border-radius: 0px 0px 4px 4px;
3835
3925
  border-style: solid;
3836
3926
  border-top: none;
@@ -3842,6 +3932,7 @@ const Options = styled.div `
3842
3932
  max-height: 220px;
3843
3933
  overflow: auto;
3844
3934
  `;
3935
+ Options.defaultProps = { theme: EditableTheme };
3845
3936
  const Scrim = styled.div `
3846
3937
  bottom: 0;
3847
3938
  left: 0;
@@ -4047,17 +4138,19 @@ const Header = styled.th `
4047
4138
  box-sizing: border-box;
4048
4139
  width: ${props => props.$width || 'auto'};
4049
4140
  cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
4050
- color: ${props => (props.$isSortable ? Colors.PRIMARY.Hex : Colors.BLACK.Hex)};
4141
+ color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
4051
4142
  `;
4143
+ Header.defaultProps = { theme: EditableTheme };
4052
4144
  const Row = styled.tr `
4053
4145
  cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
4054
4146
  transition: all 0.2s;
4055
4147
  background-color: ${props => props.$bgColor};
4056
4148
  box-sizing: border-box;
4057
4149
  &:hover {
4058
- 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};
4059
4151
  }
4060
4152
  `;
4153
+ Row.defaultProps = { theme: EditableTheme };
4061
4154
  const Column = styled.td `
4062
4155
  padding: 16px 12px !important;
4063
4156
  font-size: ${FontSizes.DEFAULT} !important;
@@ -4075,6 +4168,12 @@ const IconWrapper = styled.span `
4075
4168
  transform: translateY(-50%);
4076
4169
  margin-left: 2px;
4077
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 };
4078
4177
  const Table = (_a) => {
4079
4178
  var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
4080
4179
  return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps),
@@ -4083,7 +4182,7 @@ const Table = (_a) => {
4083
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) },
4084
4183
  column.label,
4085
4184
  column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, null,
4086
- React.createElement(Icon, { color: Colors.PRIMARY.Hex, path: sortDirection === 'asc' ? js.mdiChevronUp : js.mdiChevronDown, size: '20px' }))) : null));
4185
+ React.createElement(StyledIcon$1, { path: sortDirection === 'asc' ? js.mdiChevronUp : js.mdiChevronDown, size: '20px' }))) : null));
4087
4186
  })))),
4088
4187
  data.length ? (React.createElement("tbody", null, data.map((row, i) => {
4089
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) => {
@@ -4116,14 +4215,15 @@ const Tab = styled.div `
4116
4215
  margin: 0 0 -1px 0;
4117
4216
  border-bottom-width: 4px;
4118
4217
  border-bottom-style: solid;
4119
- border-bottom-color: ${props => (props.$isActive ? Colors.PRIMARY.Hex : 'transparent')};
4218
+ border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
4120
4219
  cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
4121
4220
  box-sizing: border-box;
4122
4221
  &:hover {
4123
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.PRIMARY.Hex)};
4222
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
4124
4223
  font-weight: 500;
4125
4224
  }
4126
4225
  `;
4226
+ Tab.defaultProps = { theme: EditableTheme };
4127
4227
  const Badge = styled.div `
4128
4228
  display: flex;
4129
4229
  width: 18px;
@@ -4131,7 +4231,7 @@ const Badge = styled.div `
4131
4231
  justify-content: center;
4132
4232
  align-items: center;
4133
4233
  border-radius: 9px;
4134
- background: ${props => (props.$isError ? Colors.RED.Hex : Colors.PRIMARY.Hex)};
4234
+ background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
4135
4235
  color: #fff;
4136
4236
  font-family: ${FontStyles.DEFAULT};
4137
4237
  font-size: 12px;
@@ -4139,6 +4239,7 @@ const Badge = styled.div `
4139
4239
  line-height: 1;
4140
4240
  letter-spacing: 1px;
4141
4241
  `;
4242
+ Badge.defaultProps = { theme: EditableTheme };
4142
4243
  const Tabs = (_a) => {
4143
4244
  var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
4144
4245
  return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps), tabs.map((_a, i) => {