@descope/web-components-ui 1.0.273 → 1.0.275

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.
Files changed (32) hide show
  1. package/dist/cjs/index.cjs.js +202 -101
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.esm.js +247 -112
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/2481.js +1 -1
  7. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  8. package/dist/umd/descope-grid-index-js.js +1 -1
  9. package/package.json +1 -1
  10. package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +5 -0
  11. package/src/components/descope-grid/GridClass.js +7 -5
  12. package/src/components/descope-password/PasswordClass.js +2 -4
  13. package/src/darkTheme.js +48 -0
  14. package/src/helpers/themeHelpers/colorsHelpers.js +77 -9
  15. package/src/index.d.ts +2 -2
  16. package/src/index.js +1 -0
  17. package/src/theme/components/badge.js +1 -1
  18. package/src/theme/components/button.js +7 -5
  19. package/src/theme/components/buttonSelectionGroup/buttonSelectionGroupItem.js +9 -4
  20. package/src/theme/components/comboBox.js +1 -1
  21. package/src/theme/components/container.js +1 -1
  22. package/src/theme/components/divider.js +1 -1
  23. package/src/theme/components/grid.js +10 -10
  24. package/src/theme/components/inputWrapper.js +10 -10
  25. package/src/theme/components/loader/loaderLinear.js +1 -1
  26. package/src/theme/components/modal.js +1 -1
  27. package/src/theme/components/multiSelectComboBox.js +2 -2
  28. package/src/theme/components/password.js +1 -0
  29. package/src/theme/components/switchToggle.js +3 -4
  30. package/src/theme/components/text.js +2 -2
  31. package/src/theme/components/textArea.js +0 -7
  32. package/src/theme/globals.js +36 -11
package/dist/index.d.ts CHANGED
@@ -7,8 +7,8 @@ export {
7
7
  componentsThemeManager,
8
8
  } from './helpers/themeHelpers';
9
9
  export { genColor } from './helpers/themeHelpers/colorsHelpers';
10
- export { defaultTheme, themeVars } from './theme';
11
-
10
+ export { defaultTheme, themeVars } from './defaultTheme';
11
+ export { default as darkTheme } from './darkTheme';
12
12
  export { ButtonClass } from './components/descope-button';
13
13
  export { CheckboxClass } from './components/boolean-fields/descope-checkbox';
14
14
  export { SwitchToggleClass } from './components/boolean-fields/descope-switch-toggle';
package/dist/index.esm.js CHANGED
@@ -3173,10 +3173,7 @@ const PasswordClass = compose(
3173
3173
  labelRequiredIndicator: { ...requiredIndicator$7, property: 'content' },
3174
3174
  errorMessageTextColor: { ...errorMessage$7, property: 'color' },
3175
3175
 
3176
- inputValueTextColor: [
3177
- { ...inputElement$2, property: 'color' },
3178
- { ...revealButtonIcon, property: 'color' },
3179
- ],
3176
+ inputValueTextColor: { ...inputElement$2, property: 'color' },
3180
3177
  inputPlaceholderTextColor: { ...inputElementPlaceholder, property: 'color' },
3181
3178
 
3182
3179
  revealButtonOffset: [
@@ -3184,6 +3181,7 @@ const PasswordClass = compose(
3184
3181
  { ...revealButtonContainer, property: 'margin-left' },
3185
3182
  ],
3186
3183
  revealButtonSize: { ...revealButtonContainer, property: 'font-size' },
3184
+ revealButtonColor: { ...revealButtonIcon, property: 'color' },
3187
3185
  },
3188
3186
  }),
3189
3187
  draggableMixin,
@@ -6894,6 +6892,7 @@ class RawSelectItem extends createBaseClass({
6894
6892
  `;
6895
6893
 
6896
6894
  forwardAttrs(this, this.baseElement, { includeAttrs: ['size', 'variant'] });
6895
+ forwardAttrs(this.baseElement, this, { includeAttrs: ['focused', 'active'] });
6897
6896
  }
6898
6897
 
6899
6898
  handleFocus() {
@@ -6942,6 +6941,10 @@ const ButtonSelectionGroupItemClass = compose(
6942
6941
  selector: () => ButtonClass.componentName,
6943
6942
  property: ButtonClass.cssVarList.borderRadius,
6944
6943
  },
6944
+ outlineColor: {
6945
+ selector: () => ButtonClass.componentName,
6946
+ property: ButtonClass.cssVarList.outlineColor,
6947
+ },
6945
6948
  },
6946
6949
  }),
6947
6950
  draggableMixin,
@@ -7452,12 +7455,11 @@ const GridClass = compose(
7452
7455
  ],
7453
7456
  sortIndicatorsColor: { ...sortIndicators, property: 'color' },
7454
7457
  activeSortIndicator: { ...activeSortIndicator, property: 'color' },
7455
- inputBorderColor: { ...host$1, property: 'border-color' },
7456
- inputBorderWidth: { ...host$1, property: 'border-width' },
7457
- inputBorderStyle: { ...host$1, property: 'border-style' },
7458
- inputBorderRadius: { ...host$1, property: 'border-radius' },
7458
+ borderColor: { ...host$1, property: 'border-color' },
7459
+ borderWidth: { ...host$1, property: 'border-width' },
7460
+ borderStyle: { ...host$1, property: 'border-style' },
7461
+ borderRadius: { ...host$1, property: 'border-radius' },
7459
7462
  selectedBackgroundColor: { ...selectedRow, property: 'background-color' },
7460
- selectedTextColor: { ...selectedRow, property: 'color' },
7461
7463
  headerRowTextColor: { ...headerRowCell, property: 'color' },
7462
7464
  separatorColor: [
7463
7465
  { ...firstRow, property: 'border-bottom-color' },
@@ -7482,6 +7484,9 @@ const GridClass = compose(
7482
7484
  }
7483
7485
  vaadin-grid-cell-content {
7484
7486
  display: flex;
7487
+ }
7488
+ vaadin-grid::part(selected-row-cell) {
7489
+ background-image: none;
7485
7490
  }
7486
7491
  `,
7487
7492
  excludeAttrsSync: ['columns', 'tabindex'],
@@ -8645,50 +8650,134 @@ const createHelperVars = (theme, prefix) => {
8645
8650
  return [res.theme, res.useVars, res.vars];
8646
8651
  };
8647
8652
 
8648
- const genDark = (c, percentage = 0.5) => c.darken(percentage).hex();
8649
- const genLight = (c, percentage = 0.5) => c.lighten(percentage).hex();
8650
- const genContrast = (c, percentage = 0.9) => {
8653
+ const colorGaps = {
8654
+ darkLight: 0.4,
8655
+ highlight: 0.8,
8656
+ contrast: 1,
8657
+ edgeColor: {
8658
+ darkLight: 0.25,
8659
+ highlight: 0.1,
8660
+ },
8661
+ };
8662
+
8663
+ const darken = (c, percentage) => c.darken(percentage).hex();
8664
+
8665
+ const contrast = (c) => {
8651
8666
  const isDark = c.isDark();
8652
8667
  return c
8653
- .mix(Color(isDark ? 'white' : 'black'), percentage)
8668
+ .mix(Color(isDark ? 'white' : 'black'), colorGaps.contrast)
8654
8669
  .saturate(1)
8655
8670
  .hex();
8656
8671
  };
8657
8672
 
8658
- const genColor = (color) => {
8673
+ const lighten = (c, percentage) => {
8674
+ const isDark = c.lightness() < 0.5;
8675
+
8676
+ if (isDark) {
8677
+ return c.lightness(percentage * 100).hex();
8678
+ }
8679
+
8680
+ return c.lighten(percentage).hex();
8681
+ };
8682
+
8683
+ const isNearBlack = (color) => color.luminosity() < 0.01;
8684
+ const isNearWhite = (color) => color.luminosity() > 0.99;
8685
+
8686
+ const generateDarkColor = (color, theme) => {
8687
+ if (color.dark) return color.dark;
8688
+
8689
+ if (theme === 'dark') {
8690
+ return isNearWhite(color)
8691
+ ? darken(color, colorGaps.edgeColor.darkLight)
8692
+ : lighten(color, colorGaps.darkLight);
8693
+ }
8694
+
8695
+ return isNearBlack(color)
8696
+ ? lighten(color, colorGaps.edgeColor.darkLight)
8697
+ : darken(color, colorGaps.darkLight);
8698
+ };
8699
+
8700
+ const generateLightColor = (color, theme) => {
8701
+ if (color.light) return color.light;
8702
+
8703
+ if (theme === 'dark') {
8704
+ return isNearBlack(color)
8705
+ ? lighten(color, colorGaps.edgeColor.darkLight)
8706
+ : darken(color, colorGaps.darkLight);
8707
+ }
8708
+
8709
+ return isNearWhite(color)
8710
+ ? darken(color, colorGaps.edgeColor.darkLight)
8711
+ : lighten(color, colorGaps.darkLight);
8712
+ };
8713
+
8714
+ const generateHighlightColor = (color, theme) => {
8715
+ if (color.highlight) return color.highlight;
8716
+
8717
+ if (theme === 'dark') {
8718
+ return isNearBlack(color)
8719
+ ? lighten(color, colorGaps.edgeColor.highlight)
8720
+ : darken(color, colorGaps.highlight);
8721
+ }
8722
+
8723
+ return isNearWhite(color)
8724
+ ? darken(color, colorGaps.edgeColor.highlight)
8725
+ : lighten(color, colorGaps.highlight);
8726
+ };
8727
+
8728
+ const genColor = (color, theme) => {
8659
8729
  const mainColor = new Color(color.main || color);
8660
8730
 
8661
- return {
8731
+ const res = {
8662
8732
  main: mainColor.hex(),
8663
- dark: color.dark || genDark(mainColor),
8664
- light: color.light || genLight(mainColor),
8665
- contrast: color.contrast || genContrast(mainColor),
8733
+ dark: generateDarkColor(mainColor, theme),
8734
+ light: generateLightColor(mainColor, theme),
8735
+ highlight: generateHighlightColor(mainColor, theme),
8736
+ contrast: color.contrast || contrast(mainColor),
8666
8737
  };
8667
- };
8668
-
8669
- const genColors = (colors) => {
8670
- return Object.keys(colors).reduce((acc, colorName) => {
8671
- const currentColor = colors[colorName];
8672
8738
 
8673
- return Object.assign(acc, {
8674
- [colorName]: genColor(currentColor),
8675
- });
8676
- }, {});
8739
+ return res;
8677
8740
  };
8678
8741
 
8679
8742
  const direction = 'ltr';
8680
8743
 
8681
- const colors = genColors({
8744
+ const colors$1 = {
8682
8745
  surface: {
8683
- main: 'lightgray',
8684
- light: '#fff',
8685
- dark: '#000',
8686
- },
8687
- primary: '#006af5',
8688
- secondary: '#7D14EB',
8689
- success: 'green',
8690
- error: '#e21d12',
8691
- });
8746
+ dark: '#636c74',
8747
+ main: '#ffffff',
8748
+ light: '#cfd3d7',
8749
+ highlight: '#f4f5f6',
8750
+ contrast: '#181a1c',
8751
+ },
8752
+ primary: {
8753
+ main: '#006af5',
8754
+ dark: '#004094',
8755
+ light: '#71aeff',
8756
+ highlight: '#f0f6ff',
8757
+ contrast: '#ffffff',
8758
+ },
8759
+ secondary: {
8760
+ dark: '#6410bc',
8761
+ main: '#802ed6',
8762
+ light: '#be89f5',
8763
+ highlight: '#ede7f6',
8764
+ contrast: '#ffffff',
8765
+ },
8766
+ success: {
8767
+ main: '#008000',
8768
+ dark: '#005700',
8769
+ light: '#8bc38b',
8770
+ highlight: '#f5faf5',
8771
+ contrast: '#ffffff',
8772
+ },
8773
+ error: {
8774
+ main: '#e21d12',
8775
+ dark: '#b3170f',
8776
+ light: '#f4807a',
8777
+ highlight: '#fef1f1',
8778
+ contrast: '#ffffff',
8779
+ },
8780
+ };
8692
8781
 
8693
8782
  const fonts = {
8694
8783
  font1: {
@@ -8816,7 +8905,7 @@ const shadow = {
8816
8905
  };
8817
8906
 
8818
8907
  const globals = {
8819
- colors,
8908
+ colors: colors$1,
8820
8909
  typography,
8821
8910
  spacing,
8822
8911
  border,
@@ -8827,15 +8916,15 @@ const globals = {
8827
8916
  };
8828
8917
  const vars$y = getThemeVars(globals);
8829
8918
 
8830
- const globalRefs$i = getThemeRefs(globals);
8919
+ const globalRefs$h = getThemeRefs(globals);
8831
8920
  const compVars$4 = ButtonClass.cssVarList;
8832
8921
 
8833
8922
  const mode = {
8834
- primary: globalRefs$i.colors.primary,
8835
- secondary: globalRefs$i.colors.secondary,
8836
- success: globalRefs$i.colors.success,
8837
- error: globalRefs$i.colors.error,
8838
- surface: globalRefs$i.colors.surface,
8923
+ primary: globalRefs$h.colors.primary,
8924
+ secondary: globalRefs$h.colors.secondary,
8925
+ success: globalRefs$h.colors.success,
8926
+ error: globalRefs$h.colors.error,
8927
+ surface: globalRefs$h.colors.surface,
8839
8928
  };
8840
8929
 
8841
8930
  const [helperTheme$3, helperRefs$3, helperVars$3] = createHelperVars({ mode }, componentName$I);
@@ -8843,15 +8932,15 @@ const [helperTheme$3, helperRefs$3, helperVars$3] = createHelperVars({ mode }, c
8843
8932
  const button = {
8844
8933
  ...helperTheme$3,
8845
8934
 
8846
- [compVars$4.fontFamily]: globalRefs$i.fonts.font1.family,
8935
+ [compVars$4.fontFamily]: globalRefs$h.fonts.font1.family,
8847
8936
 
8848
8937
  [compVars$4.cursor]: 'pointer',
8849
8938
  [compVars$4.hostHeight]: '3em',
8850
8939
  [compVars$4.hostWidth]: 'auto',
8851
- [compVars$4.hostDirection]: globalRefs$i.direction,
8940
+ [compVars$4.hostDirection]: globalRefs$h.direction,
8852
8941
 
8853
- [compVars$4.borderRadius]: globalRefs$i.radius.sm,
8854
- [compVars$4.borderWidth]: globalRefs$i.border.xs,
8942
+ [compVars$4.borderRadius]: globalRefs$h.radius.sm,
8943
+ [compVars$4.borderWidth]: globalRefs$h.border.xs,
8855
8944
  [compVars$4.borderStyle]: 'solid',
8856
8945
  [compVars$4.borderColor]: 'transparent',
8857
8946
 
@@ -8894,10 +8983,10 @@ const button = {
8894
8983
  },
8895
8984
 
8896
8985
  _disabled: {
8897
- [helperVars$3.main]: globalRefs$i.colors.surface.main,
8898
- [helperVars$3.dark]: globalRefs$i.colors.surface.dark,
8899
- [helperVars$3.light]: globalRefs$i.colors.surface.light,
8900
- [helperVars$3.contrast]: globalRefs$i.colors.surface.light,
8986
+ [helperVars$3.main]: globalRefs$h.colors.surface.light,
8987
+ [helperVars$3.dark]: globalRefs$h.colors.surface.dark,
8988
+ [helperVars$3.light]: globalRefs$h.colors.surface.light,
8989
+ [helperVars$3.contrast]: globalRefs$h.colors.surface.main,
8901
8990
  },
8902
8991
 
8903
8992
  variant: {
@@ -8917,12 +9006,14 @@ const button = {
8917
9006
 
8918
9007
  outline: {
8919
9008
  [compVars$4.labelTextColor]: helperRefs$3.main,
8920
- [compVars$4.borderColor]: 'currentColor',
9009
+ [compVars$4.borderColor]: helperRefs$3.main,
8921
9010
  _hover: {
8922
9011
  [compVars$4.labelTextColor]: helperRefs$3.dark,
9012
+ [compVars$4.borderColor]: helperRefs$3.dark,
8923
9013
  },
8924
9014
  _active: {
8925
9015
  [compVars$4.labelTextColor]: helperRefs$3.main,
9016
+ [compVars$4.borderColor]: helperRefs$3.main,
8926
9017
  },
8927
9018
  },
8928
9019
 
@@ -8933,13 +9024,13 @@ const button = {
8933
9024
  [compVars$4.labelTextDecoration]: 'underline',
8934
9025
  },
8935
9026
  _active: {
8936
- [compVars$4.labelTextColor]: helperRefs$3.dark,
9027
+ [compVars$4.labelTextColor]: helperRefs$3.main,
8937
9028
  },
8938
9029
  },
8939
9030
  },
8940
9031
 
8941
9032
  _focused: {
8942
- [compVars$4.outlineColor]: globalRefs$i.colors.surface.main,
9033
+ [compVars$4.outlineColor]: helperRefs$3.light,
8943
9034
  },
8944
9035
  };
8945
9036
 
@@ -8955,21 +9046,21 @@ var button$1 = /*#__PURE__*/Object.freeze({
8955
9046
  });
8956
9047
 
8957
9048
  const componentName = getComponentName('input-wrapper');
8958
- const globalRefs$h = getThemeRefs(globals);
9049
+ const globalRefs$g = getThemeRefs(globals);
8959
9050
 
8960
9051
  const [theme$1, refs, vars$w] = createHelperVars(
8961
9052
  {
8962
- labelTextColor: globalRefs$h.colors.surface.contrast,
8963
- valueTextColor: globalRefs$h.colors.surface.contrast,
8964
- placeholderTextColor: globalRefs$h.colors.surface.main,
9053
+ labelTextColor: globalRefs$g.colors.surface.dark,
9054
+ valueTextColor: globalRefs$g.colors.surface.contrast,
9055
+ placeholderTextColor: globalRefs$g.colors.surface.dark,
8965
9056
  requiredIndicator: "'*'",
8966
- errorMessageTextColor: globalRefs$h.colors.error.main,
9057
+ errorMessageTextColor: globalRefs$g.colors.error.main,
8967
9058
 
8968
- borderWidth: globalRefs$h.border.xs,
8969
- borderRadius: globalRefs$h.radius.xs,
9059
+ borderWidth: globalRefs$g.border.xs,
9060
+ borderRadius: globalRefs$g.radius.xs,
8970
9061
  borderColor: 'transparent',
8971
9062
 
8972
- outlineWidth: globalRefs$h.border.sm,
9063
+ outlineWidth: globalRefs$g.border.sm,
8973
9064
  outlineStyle: 'solid',
8974
9065
  outlineColor: 'transparent',
8975
9066
  outlineOffset: '0px', // we need to keep the px unit even for 0 value, as this var is used for calc in different component classes
@@ -8980,11 +9071,11 @@ const [theme$1, refs, vars$w] = createHelperVars(
8980
9071
  horizontalPadding: '0.5em',
8981
9072
  verticalPadding: '0.5em',
8982
9073
 
8983
- backgroundColor: globalRefs$h.colors.surface.light,
9074
+ backgroundColor: globalRefs$g.colors.surface.main,
8984
9075
 
8985
- fontFamily: globalRefs$h.fonts.font1.family,
9076
+ fontFamily: globalRefs$g.fonts.font1.family,
8986
9077
 
8987
- direction: globalRefs$h.direction,
9078
+ direction: globalRefs$g.direction,
8988
9079
 
8989
9080
  overlayOpacity: '0.3',
8990
9081
 
@@ -9000,27 +9091,27 @@ const [theme$1, refs, vars$w] = createHelperVars(
9000
9091
  },
9001
9092
 
9002
9093
  _focused: {
9003
- outlineColor: globalRefs$h.colors.surface.main,
9094
+ outlineColor: globalRefs$g.colors.surface.light,
9004
9095
  _invalid: {
9005
- outlineColor: globalRefs$h.colors.error.main,
9096
+ outlineColor: globalRefs$g.colors.error.main,
9006
9097
  },
9007
9098
  },
9008
9099
 
9009
9100
  _bordered: {
9010
- outlineWidth: globalRefs$h.border.xs,
9011
- borderColor: globalRefs$h.colors.surface.main,
9101
+ outlineWidth: globalRefs$g.border.xs,
9102
+ borderColor: globalRefs$g.colors.surface.light,
9012
9103
  borderStyle: 'solid',
9013
9104
  _invalid: {
9014
- borderColor: globalRefs$h.colors.error.main,
9105
+ borderColor: globalRefs$g.colors.error.main,
9015
9106
  },
9016
9107
  },
9017
9108
 
9018
9109
  _disabled: {
9019
- labelTextColor: globalRefs$h.colors.surface.main,
9020
- borderColor: globalRefs$h.colors.surface.main,
9021
- valueTextColor: globalRefs$h.colors.surface.dark,
9022
- placeholderTextColor: globalRefs$h.colors.surface.dark,
9023
- backgroundColor: globalRefs$h.colors.surface.light,
9110
+ labelTextColor: globalRefs$g.colors.surface.light,
9111
+ borderColor: globalRefs$g.colors.surface.light,
9112
+ valueTextColor: globalRefs$g.colors.surface.light,
9113
+ placeholderTextColor: globalRefs$g.colors.surface.light,
9114
+ backgroundColor: globalRefs$g.colors.surface.main,
9024
9115
  },
9025
9116
  },
9026
9117
  componentName
@@ -9071,7 +9162,7 @@ var textField$1 = /*#__PURE__*/Object.freeze({
9071
9162
  vars: vars$v
9072
9163
  });
9073
9164
 
9074
- const globalRefs$g = getThemeRefs(globals);
9165
+ const globalRefs$f = getThemeRefs(globals);
9075
9166
  const vars$u = PasswordClass.cssVarList;
9076
9167
 
9077
9168
  const password = {
@@ -9095,8 +9186,9 @@ const password = {
9095
9186
  [vars$u.inputOutlineStyle]: refs.outlineStyle,
9096
9187
  [vars$u.inputOutlineColor]: refs.outlineColor,
9097
9188
  [vars$u.inputOutlineOffset]: refs.outlineOffset,
9098
- [vars$u.revealButtonOffset]: globalRefs$g.spacing.md,
9189
+ [vars$u.revealButtonOffset]: globalRefs$f.spacing.md,
9099
9190
  [vars$u.revealButtonSize]: refs.toggleButtonSize,
9191
+ [vars$u.revealButtonColor]: refs.placeholderTextColor,
9100
9192
  };
9101
9193
 
9102
9194
  var password$1 = /*#__PURE__*/Object.freeze({
@@ -9169,7 +9261,6 @@ var emailField$1 = /*#__PURE__*/Object.freeze({
9169
9261
  vars: vars$s
9170
9262
  });
9171
9263
 
9172
- const globalRefs$f = getThemeRefs(globals);
9173
9264
  const vars$r = TextAreaClass.cssVarList;
9174
9265
 
9175
9266
  const textArea = {
@@ -9200,10 +9291,6 @@ const textArea = {
9200
9291
  center: { [vars$r.inputTextAlign]: 'center' },
9201
9292
  },
9202
9293
 
9203
- _disabled: {
9204
- [vars$r.inputBackgroundColor]: globalRefs$f.colors.surface.light,
9205
- },
9206
-
9207
9294
  _readonly: {
9208
9295
  [vars$r.inputResizeType]: 'none',
9209
9296
  },
@@ -9275,7 +9362,7 @@ const switchToggle = {
9275
9362
  [vars$p.trackBorderStyle]: refs.borderStyle,
9276
9363
  [vars$p.trackBorderWidth]: refs.borderWidth, // var `trackBorderWidth` used outside the theme for `left` margin calculation
9277
9364
  [vars$p.trackBorderColor]: refs.borderColor,
9278
- [vars$p.trackBackgroundColor]: 'none',
9365
+ [vars$p.trackBackgroundColor]: refs.backgroundColor,
9279
9366
  [vars$p.trackBorderRadius]: globalRefs$e.radius.md,
9280
9367
  [vars$p.trackWidth]: '2.5em', // var `trackWidth` used outside the theme for `left` margin calculation
9281
9368
  [vars$p.trackHeight]: checkboxHeight,
@@ -9284,7 +9371,7 @@ const switchToggle = {
9284
9371
  [vars$p.knobRadius]: '50%',
9285
9372
  [vars$p.knobTopOffset]: '1px',
9286
9373
  [vars$p.knobLeftOffset]: knobMargin,
9287
- [vars$p.knobColor]: refs.valueTextColor,
9374
+ [vars$p.knobColor]: refs.labelTextColor,
9288
9375
  [vars$p.knobTransitionDuration]: '0.3s',
9289
9376
 
9290
9377
  [vars$p.labelTextColor]: refs.labelTextColor,
@@ -9296,7 +9383,6 @@ const switchToggle = {
9296
9383
 
9297
9384
  _checked: {
9298
9385
  [vars$p.trackBorderColor]: refs.borderColor,
9299
- [vars$p.trackBackgroundColor]: refs.backgroundColor,
9300
9386
  [vars$p.knobLeftOffset]: `calc(100% - var(${vars$p.knobSize}) - ${knobMargin})`,
9301
9387
  [vars$p.knobColor]: refs.valueTextColor,
9302
9388
  [vars$p.knobTextColor]: refs.valueTextColor,
@@ -9304,7 +9390,7 @@ const switchToggle = {
9304
9390
 
9305
9391
  _disabled: {
9306
9392
  [vars$p.knobColor]: globalRefs$e.colors.surface.light,
9307
- [vars$p.trackBorderColor]: globalRefs$e.colors.surface.main,
9393
+ [vars$p.trackBorderColor]: globalRefs$e.colors.surface.light,
9308
9394
  [vars$p.trackBackgroundColor]: globalRefs$e.colors.surface.main,
9309
9395
  [vars$p.labelTextColor]: refs.labelTextColor,
9310
9396
  _checked: {
@@ -9357,7 +9443,7 @@ const container = {
9357
9443
 
9358
9444
  [compVars$3.hostWidth]: '100%',
9359
9445
  [compVars$3.boxShadow]: 'none',
9360
- [compVars$3.backgroundColor]: globalRefs$d.colors.surface.light,
9446
+ [compVars$3.backgroundColor]: globalRefs$d.colors.surface.main,
9361
9447
  [compVars$3.color]: globalRefs$d.colors.surface.contrast,
9362
9448
  [compVars$3.borderRadius]: '0px',
9363
9449
  [compVars$3.hostDirection]: globalRefs$d.direction,
@@ -9528,10 +9614,10 @@ const text = {
9528
9614
 
9529
9615
  mode: {
9530
9616
  primary: {
9531
- [vars$k.textColor]: globalRefs$c.colors.primary.main,
9617
+ [vars$k.textColor]: globalRefs$c.colors.surface.contrast,
9532
9618
  },
9533
9619
  secondary: {
9534
- [vars$k.textColor]: globalRefs$c.colors.secondary.main,
9620
+ [vars$k.textColor]: globalRefs$c.colors.surface.dark,
9535
9621
  },
9536
9622
  error: {
9537
9623
  [vars$k.textColor]: globalRefs$c.colors.error.main,
@@ -9630,7 +9716,7 @@ const divider = {
9630
9716
  [compVars$2.flexDirection]: 'row',
9631
9717
  [compVars$2.alignSelf]: 'stretch',
9632
9718
  [compVars$2.hostWidth]: '100%',
9633
- [compVars$2.stripeColor]: globalRefs$a.colors.surface.main,
9719
+ [compVars$2.stripeColor]: globalRefs$a.colors.surface.light,
9634
9720
  [compVars$2.stripeColorOpacity]: '0.5',
9635
9721
  [compVars$2.stripeHorizontalThickness]: helperRefs$1.thickness,
9636
9722
  [compVars$2.labelTextWidth]: 'fit-content',
@@ -9712,7 +9798,7 @@ const loaderLinear = {
9712
9798
  [vars$g.barColor]: globalRefs$9.colors.surface.contrast,
9713
9799
  [vars$g.barWidth]: '20%',
9714
9800
 
9715
- [vars$g.barBackgroundColor]: globalRefs$9.colors.surface.main,
9801
+ [vars$g.barBackgroundColor]: globalRefs$9.colors.surface.light,
9716
9802
  [vars$g.barBorderRadius]: '4px',
9717
9803
 
9718
9804
  [vars$g.animationDuration]: '2s',
@@ -9826,7 +9912,7 @@ const comboBox = {
9826
9912
  [vars$e.inputBackgroundColor]: refs.backgroundColor,
9827
9913
  [vars$e.inputHorizontalPadding]: refs.horizontalPadding,
9828
9914
  [vars$e.inputHeight]: refs.inputHeight,
9829
- [vars$e.inputDropdownButtonColor]: globalRefs$7.colors.surface.main,
9915
+ [vars$e.inputDropdownButtonColor]: globalRefs$7.colors.surface.dark,
9830
9916
  [vars$e.inputDropdownButtonCursor]: 'pointer',
9831
9917
  [vars$e.inputDropdownButtonSize]: refs.toggleButtonSize,
9832
9918
  [vars$e.inputDropdownButtonOffset]: globalRefs$7.spacing.xs,
@@ -10032,20 +10118,25 @@ const vars$8 = ButtonSelectionGroupItemClass.cssVarList;
10032
10118
 
10033
10119
  const buttonSelectionGroupItem = {
10034
10120
  [vars$8.hostDirection]: 'inherit',
10035
- [vars$8.backgroundColor]: globalRefs$6.colors.surface.light,
10121
+ [vars$8.backgroundColor]: globalRefs$6.colors.surface.main,
10036
10122
  [vars$8.labelTextColor]: globalRefs$6.colors.surface.contrast,
10037
- [vars$8.borderColor]: globalRefs$6.colors.surface.main,
10123
+ [vars$8.borderColor]: globalRefs$6.colors.surface.light,
10038
10124
  [vars$8.borderStyle]: 'solid',
10039
10125
  [vars$8.borderRadius]: globalRefs$6.radius.sm,
10126
+ [vars$8.outlineColor]: 'transparent',
10040
10127
 
10041
10128
  _hover: {
10042
- [vars$8.backgroundColor]: '#f4f5f5', // can we take it from the palette?
10129
+ [vars$8.backgroundColor]: globalRefs$6.colors.surface.highlight,
10130
+ },
10131
+
10132
+ _focused: {
10133
+ [vars$8.outlineColor]: globalRefs$6.colors.surface.light,
10043
10134
  },
10044
10135
 
10045
10136
  _selected: {
10046
10137
  [vars$8.borderColor]: globalRefs$6.colors.surface.contrast,
10047
10138
  [vars$8.backgroundColor]: globalRefs$6.colors.surface.contrast,
10048
- [vars$8.labelTextColor]: globalRefs$6.colors.surface.light,
10139
+ [vars$8.labelTextColor]: globalRefs$6.colors.surface.main,
10049
10140
  },
10050
10141
  };
10051
10142
 
@@ -10096,7 +10187,7 @@ const globalRefs$4 = getThemeRefs(globals);
10096
10187
  const compVars = ModalClass.cssVarList;
10097
10188
 
10098
10189
  const modal = {
10099
- [compVars.overlayBackgroundColor]: globalRefs$4.colors.surface.light,
10190
+ [compVars.overlayBackgroundColor]: globalRefs$4.colors.surface.main,
10100
10191
  [compVars.overlayShadow]: globalRefs$4.shadow.wide['2xl'],
10101
10192
  [compVars.overlayWidth]: '540px',
10102
10193
  };
@@ -10119,28 +10210,28 @@ const grid = {
10119
10210
  [vars$4.hostHeight]: '100%',
10120
10211
  [vars$4.hostMinHeight]: '400px',
10121
10212
  [vars$4.fontWeight]: '400',
10122
- [vars$4.backgroundColor]: globalRefs$3.colors.surface.light,
10213
+ [vars$4.backgroundColor]: globalRefs$3.colors.surface.main,
10123
10214
 
10124
10215
  [vars$4.fontSize]: refs.fontSize,
10125
10216
  [vars$4.fontFamily]: refs.fontFamily,
10126
10217
 
10127
- [vars$4.sortIndicatorsColor]: globalRefs$3.colors.surface.main,
10218
+ [vars$4.sortIndicatorsColor]: globalRefs$3.colors.surface.light,
10128
10219
  [vars$4.activeSortIndicator]: globalRefs$3.colors.surface.dark,
10129
- [vars$4.resizeHandleColor]: globalRefs$3.colors.surface.main,
10220
+ [vars$4.resizeHandleColor]: globalRefs$3.colors.surface.light,
10130
10221
 
10131
- [vars$4.inputBorderWidth]: refs.borderWidth,
10132
- [vars$4.inputBorderStyle]: refs.borderStyle,
10133
- [vars$4.inputBorderRadius]: refs.borderRadius,
10134
- [vars$4.inputBorderColor]: 'transparent',
10222
+ [vars$4.borderWidth]: refs.borderWidth,
10223
+ [vars$4.borderStyle]: refs.borderStyle,
10224
+ [vars$4.borderRadius]: refs.borderRadius,
10225
+ [vars$4.borderColor]: 'transparent',
10135
10226
 
10136
10227
  [vars$4.headerRowTextColor]: globalRefs$3.colors.surface.dark,
10137
- [vars$4.separatorColor]: globalRefs$3.colors.surface.main,
10228
+ [vars$4.separatorColor]: globalRefs$3.colors.surface.light,
10138
10229
 
10139
10230
  [vars$4.valueTextColor]: globalRefs$3.colors.surface.contrast,
10140
- [vars$4.selectedBackgroundColor]: globalRefs$3.colors.primary.contrast,
10231
+ [vars$4.selectedBackgroundColor]: globalRefs$3.colors.surface.highlight,
10141
10232
 
10142
10233
  _bordered: {
10143
- [vars$4.inputBorderColor]: refs.borderColor,
10234
+ [vars$4.borderColor]: refs.borderColor,
10144
10235
  },
10145
10236
  };
10146
10237
 
@@ -10230,7 +10321,7 @@ const multiSelectComboBox = {
10230
10321
  [vars$2.inputHorizontalPadding]: refs.horizontalPadding,
10231
10322
  [vars$2.inputVerticalPadding]: refs.verticalPadding,
10232
10323
  [vars$2.inputHeight]: refs.inputHeight,
10233
- [vars$2.inputDropdownButtonColor]: globalRefs$1.colors.surface.main,
10324
+ [vars$2.inputDropdownButtonColor]: globalRefs$1.colors.surface.dark,
10234
10325
  [vars$2.inputDropdownButtonCursor]: 'pointer',
10235
10326
  [vars$2.inputDropdownButtonSize]: refs.toggleButtonSize,
10236
10327
  [vars$2.inputDropdownButtonOffset]: globalRefs$1.spacing.xs,
@@ -10238,7 +10329,7 @@ const multiSelectComboBox = {
10238
10329
  [vars$2.overlayItemPaddingInlineEnd]: globalRefs$1.spacing.lg,
10239
10330
  [vars$2.chipFontSize]: refs.chipFontSize,
10240
10331
  [vars$2.chipTextColor]: globalRefs$1.colors.surface.contrast,
10241
- [vars$2.chipBackgroundColor]: globalRefs$1.colors.surface.main,
10332
+ [vars$2.chipBackgroundColor]: globalRefs$1.colors.surface.light,
10242
10333
 
10243
10334
  _readonly: {
10244
10335
  [vars$2.inputDropdownButtonCursor]: 'default',
@@ -10299,7 +10390,7 @@ const badge = {
10299
10390
  default: {
10300
10391
  [vars$1.textColor]: globalRefs.colors.surface.dark,
10301
10392
  _bordered: {
10302
- [vars$1.borderColor]: globalRefs.colors.surface.main,
10393
+ [vars$1.borderColor]: globalRefs.colors.surface.light,
10303
10394
  },
10304
10395
  },
10305
10396
  primary: {
@@ -10383,5 +10474,49 @@ const vars = Object.keys(components).reduce(
10383
10474
  const defaultTheme = { globals, components: theme };
10384
10475
  const themeVars = { globals: vars$y, components: vars };
10385
10476
 
10386
- export { BadgeClass, ButtonClass, ButtonMultiSelectionGroupClass, ButtonSelectionGroupClass, CheckboxClass, ComboBoxClass, ContainerClass, DividerClass, EmailFieldClass, GridClass, ImageClass, LinkClass, LoaderLinearClass, LoaderRadialClass, LogoClass, ModalClass, MultiSelectComboBoxClass, NewPasswordClass, NotificationClass, NotpImageClass, NumberFieldClass, PasscodeClass, PasswordClass, PhoneFieldClass, PhoneFieldInputBoxClass, RecaptchaClass, SwitchToggleClass, TextAreaClass, TextClass, TextFieldClass, TotpImageClass, UploadFileClass, componentsThemeManager, createComponentsTheme, defaultTheme, genColor, globalsThemeToStyle, themeToStyle, themeVars };
10477
+ const colors = {
10478
+ surface: {
10479
+ main: '#181a1c',
10480
+ dark: '#bec4ca',
10481
+ light: '#555f68',
10482
+ highlight: '#22262a',
10483
+ contrast: '#f5f6f7',
10484
+ },
10485
+ primary: {
10486
+ main: '#1f80ff',
10487
+ dark: '#71aeff',
10488
+ light: '#004094',
10489
+ highlight: '#00214d',
10490
+ contrast: '#000000',
10491
+ },
10492
+ secondary: {
10493
+ main: '#a665eb',
10494
+ dark: '#b9a0f3',
10495
+ light: '#683ae6',
10496
+ highlight: '#361299',
10497
+ contrast: '#000000',
10498
+ },
10499
+ success: {
10500
+ main: '#27963c',
10501
+ dark: '#8bc3a2',
10502
+ light: '#004d0f',
10503
+ highlight: '#001f00',
10504
+ contrast: '#000000',
10505
+ },
10506
+ error: {
10507
+ main: '#f85249',
10508
+ dark: '#fa7c75',
10509
+ light: '#c51107',
10510
+ highlight: '#4a0603',
10511
+ contrast: '#000000',
10512
+ },
10513
+ };
10514
+
10515
+ const darkTheme = merge({}, defaultTheme, {
10516
+ globals: {
10517
+ colors,
10518
+ },
10519
+ });
10520
+
10521
+ export { BadgeClass, ButtonClass, ButtonMultiSelectionGroupClass, ButtonSelectionGroupClass, CheckboxClass, ComboBoxClass, ContainerClass, DividerClass, EmailFieldClass, GridClass, ImageClass, LinkClass, LoaderLinearClass, LoaderRadialClass, LogoClass, ModalClass, MultiSelectComboBoxClass, NewPasswordClass, NotificationClass, NotpImageClass, NumberFieldClass, PasscodeClass, PasswordClass, PhoneFieldClass, PhoneFieldInputBoxClass, RecaptchaClass, SwitchToggleClass, TextAreaClass, TextClass, TextFieldClass, TotpImageClass, UploadFileClass, componentsThemeManager, createComponentsTheme, darkTheme, defaultTheme, genColor, globalsThemeToStyle, themeToStyle, themeVars };
10387
10522
  //# sourceMappingURL=index.esm.js.map