@omegagrid/core 0.10.9 → 0.10.11

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.
@@ -61,19 +61,19 @@ export default {
61
61
  'bucket-sidebar-background-color': '#272727',
62
62
  'form-background-color': '#323233',
63
63
  'colortype-yellow-background-color': '#e49f30',
64
- 'colortype-yellow-border-color': '#e49f30',
64
+ 'colortype-yellow-border-color': '#b87d1a',
65
65
  'colortype-yellow-text-color': '#ffffff',
66
66
  'colortype-green-background-color': '#2E7D32',
67
- 'colortype-green-border-color': '#2E7D32',
67
+ 'colortype-green-border-color': '#1c5a20',
68
68
  'colortype-green-text-color': '#ffffff',
69
69
  'colortype-red-background-color': '#C62828',
70
- 'colortype-red-border-color': '#C62828',
70
+ 'colortype-red-border-color': '#911a1a',
71
71
  'colortype-red-text-color': '#ffffff',
72
72
  'colortype-blue-background-color': '#1976D2',
73
- 'colortype-blue-border-color': '#1976D2',
73
+ 'colortype-blue-border-color': '#10559e',
74
74
  'colortype-blue-text-color': '#ffffff',
75
75
  'colortype-gray-background-color': '#424242',
76
- 'colortype-gray-border-color': '#424242',
76
+ 'colortype-gray-border-color': '#2e2e2e',
77
77
  'colortype-gray-text-color': '#ffffff',
78
78
  'colortype-accent-text-color': '#ffffff',
79
79
  'switch-background-color': '#474747',
@@ -1 +1 @@
1
- {"version":3,"file":"tmDark.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,4BAA4B;QAC3C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SAAS;QAChC,gCAAgC,EAAE,SAAS;QAC3C,8BAA8B,EAAE,SAAS;QACzC,6BAA6B,EAAE,SAAS;QACxC,iCAAiC,EAAE,SAAS;QAE5C,uBAAuB,EAAE,SAAS;QAElC,mCAAmC,EAAE,SAAS;QAC9C,+BAA+B,EAAE,SAAS;QAC1C,6BAA6B,EAAE,SAAS;QAExC,kCAAkC,EAAE,SAAS;QAC7C,8BAA8B,EAAE,SAAS;QACzC,4BAA4B,EAAE,SAAS;QAEvC,gCAAgC,EAAE,SAAS;QAC3C,4BAA4B,EAAE,SAAS;QACvC,0BAA0B,EAAE,SAAS;QAErC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'dark',\n\ttype: 'dark',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'base-shadow': '0 4px 10px rgba(0,0,0,0.6)',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#1e1e1e',\n\t\t'button-background-color-highlight': '#3a3a3a',\n\t\t//'background': '#1e1e1e',\n\t\t'background-color': '#181818',\n\t\t'background-color-2': '#1f1f1f',\n\t\t'background-color-3': '#292929',\n\t\t'text-highlight-color': '#FFFF00',\n\t\t'text-color': '#b0b0b0',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#ffffff',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#3a3a3a',\n\t\t'border-color': '#3a3a3a',\n\t\t'border-color-2': '#2a2a2a',\n\t\t'border-color-3': '#676767',\n\t\t'cell-background': '#1e1e1e',\n\t\t'cell-border': '1px solid #3a3a3a',\n\t\t'hcell-background': '#2e2e2e',\n\t\t'slider-background-color': '#272727',\n\t\t'slider-background-active': '#313131',\n\t\t'slider-bar-color': '#494949',\n\t\t'slider-bar-active': '#494949',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#3F3F3F',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#000000',\n\t\t'inset-shadow-color': '#000000',\n\t\n\t\t'commands-color': '#ffffff',\n\t\t'commands-background': '#181818',\n\t\t'commands-header-background': '#363636',\n\t\t'commands-input-background': '#1D1D1D',\n\t\t'commands-shadow': '#151515',\n\t\n\t\t'dialog-color': '#ffffff',\n\t\t'dialog-background': '#181818',\n\t\t'dialog-header-background': '#363636',\n\t\t'dialog-shadow': '#151515',\n\t\t\n\t\t'tab-border-color': '#2a2a2a',\n\t\t'tab-background-color': '#181818',\n\t\t'tab-panel-background-color': '#181818',\n\t\t'tab-background-color-active': '#1f1f1f',\n\t\t\n\t\t'bucket-tab-background-color': '#2d2d2d',\n\t\t'bucket-tab-panel-background-color': '#252526',\n\t\t'bucket-tab-background-color-active': '#1f1f1f',\n\t\t'bucket-right-background-color': '#1e1e1e',\n\t\t'bucket-border-color': '#2a2a2a',\n\t\t'bucket-center-background-color': '#181818',\n\t\t'bucket-left-background-color': '#181818',\n\t\t'bucket-top-background-color': '#181818',\n\t\t'bucket-sidebar-background-color': '#272727',\n\t\t\n\t\t'form-background-color': '#323233',\n\t\n\t\t'colortype-yellow-background-color': '#e49f30',\n\t\t'colortype-yellow-border-color': '#e49f30',\n\t\t'colortype-yellow-text-color': '#ffffff',\n\t\n\t\t'colortype-green-background-color': '#2E7D32',\n\t\t'colortype-green-border-color': '#2E7D32',\n\t\t'colortype-green-text-color': '#ffffff',\n\t\n\t\t'colortype-red-background-color': '#C62828',\n\t\t'colortype-red-border-color': '#C62828',\n\t\t'colortype-red-text-color': '#ffffff',\n\t\n\t\t'colortype-blue-background-color': '#1976D2',\n\t\t'colortype-blue-border-color': '#1976D2',\n\t\t'colortype-blue-text-color': '#ffffff',\n\t\n\t\t'colortype-gray-background-color': '#424242',\n\t\t'colortype-gray-border-color': '#424242',\n\t\t'colortype-gray-text-color': '#ffffff',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#474747',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
1
+ {"version":3,"file":"tmDark.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,4BAA4B;QAC3C,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,0BAA0B;QAC1B,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,SAAS;QAC/B,sBAAsB,EAAE,SAAS;QACjC,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;QACzB,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,SAAS;QAC3B,iBAAiB,EAAE,SAAS;QAC5B,aAAa,EAAE,mBAAmB;QAClC,kBAAkB,EAAE,SAAS;QAC7B,yBAAyB,EAA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A6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'dark',\n\ttype: 'dark',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'base-shadow': '0 4px 10px rgba(0,0,0,0.6)',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#1e1e1e',\n\t\t'button-background-color-highlight': '#3a3a3a',\n\t\t//'background': '#1e1e1e',\n\t\t'background-color': '#181818',\n\t\t'background-color-2': '#1f1f1f',\n\t\t'background-color-3': '#292929',\n\t\t'text-highlight-color': '#FFFF00',\n\t\t'text-color': '#b0b0b0',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#ffffff',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#3a3a3a',\n\t\t'border-color': '#3a3a3a',\n\t\t'border-color-2': '#2a2a2a',\n\t\t'border-color-3': '#676767',\n\t\t'cell-background': '#1e1e1e',\n\t\t'cell-border': '1px solid #3a3a3a',\n\t\t'hcell-background': '#2e2e2e',\n\t\t'slider-background-color': '#272727',\n\t\t'slider-background-active': '#313131',\n\t\t'slider-bar-color': '#494949',\n\t\t'slider-bar-active': '#494949',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#3F3F3F',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#000000',\n\t\t'inset-shadow-color': '#000000',\n\t\n\t\t'commands-color': '#ffffff',\n\t\t'commands-background': '#181818',\n\t\t'commands-header-background': '#363636',\n\t\t'commands-input-background': '#1D1D1D',\n\t\t'commands-shadow': '#151515',\n\t\n\t\t'dialog-color': '#ffffff',\n\t\t'dialog-background': '#181818',\n\t\t'dialog-header-background': '#363636',\n\t\t'dialog-shadow': '#151515',\n\t\t\n\t\t'tab-border-color': '#2a2a2a',\n\t\t'tab-background-color': '#181818',\n\t\t'tab-panel-background-color': '#181818',\n\t\t'tab-background-color-active': '#1f1f1f',\n\t\t\n\t\t'bucket-tab-background-color': '#2d2d2d',\n\t\t'bucket-tab-panel-background-color': '#252526',\n\t\t'bucket-tab-background-color-active': '#1f1f1f',\n\t\t'bucket-right-background-color': '#1e1e1e',\n\t\t'bucket-border-color': '#2a2a2a',\n\t\t'bucket-center-background-color': '#181818',\n\t\t'bucket-left-background-color': '#181818',\n\t\t'bucket-top-background-color': '#181818',\n\t\t'bucket-sidebar-background-color': '#272727',\n\t\t\n\t\t'form-background-color': '#323233',\n\t\n\t\t'colortype-yellow-background-color': '#e49f30',\n\t\t'colortype-yellow-border-color': '#b87d1a',\n\t\t'colortype-yellow-text-color': '#ffffff',\n\n\t\t'colortype-green-background-color': '#2E7D32',\n\t\t'colortype-green-border-color': '#1c5a20',\n\t\t'colortype-green-text-color': '#ffffff',\n\n\t\t'colortype-red-background-color': '#C62828',\n\t\t'colortype-red-border-color': '#911a1a',\n\t\t'colortype-red-text-color': '#ffffff',\n\n\t\t'colortype-blue-background-color': '#1976D2',\n\t\t'colortype-blue-border-color': '#10559e',\n\t\t'colortype-blue-text-color': '#ffffff',\n\n\t\t'colortype-gray-background-color': '#424242',\n\t\t'colortype-gray-border-color': '#2e2e2e',\n\t\t'colortype-gray-text-color': '#ffffff',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#474747',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
@@ -61,19 +61,19 @@ export default {
61
61
  'bucket-sidebar-background-color': '#f3f3f3',
62
62
  'form-background-color': '#e5e5e5',
63
63
  'colortype-yellow-background-color': '#e49f30',
64
- 'colortype-yellow-border-color': '#e49f30',
64
+ 'colortype-yellow-border-color': '#b57a15',
65
65
  'colortype-yellow-text-color': '#FFFFFF',
66
66
  'colortype-green-background-color': '#43A047',
67
- 'colortype-green-border-color': '#43A047',
67
+ 'colortype-green-border-color': '#2d7531',
68
68
  'colortype-green-text-color': '#FFFFFF',
69
69
  'colortype-red-background-color': '#EF5350',
70
- 'colortype-red-border-color': '#EF5350',
70
+ 'colortype-red-border-color': '#c43735',
71
71
  'colortype-red-text-color': '#FFFFFF',
72
72
  'colortype-blue-background-color': '#1E88E5',
73
- 'colortype-blue-border-color': '#1E88E5',
73
+ 'colortype-blue-border-color': '#0e64b3',
74
74
  'colortype-blue-text-color': '#FFFFFF',
75
75
  'colortype-gray-background-color': '#D9D9D9',
76
- 'colortype-gray-border-color': '#D9D9D9',
76
+ 'colortype-gray-border-color': '#b0b0b0',
77
77
  'colortype-gray-text-color': '#212121',
78
78
  'colortype-accent-text-color': '#ffffff',
79
79
  'switch-background-color': '#cccccc',
@@ -1 +1 @@
1
- {"version":3,"file":"tmLight.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,gCAAgC;QAC/C,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,YAAY,EAAE,SAAS;QACvB,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,SAAS;QAC/B,sBAAsB,EAAE,SAAS;QACjC,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAA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S;QAC7C,8BAA8B,EAAE,SAAS;QACzC,4BAA4B,EAAE,SAAS;QAEvC,gCAAgC,EAAE,SAAS;QAC3C,4BAA4B,EAAE,SAAS;QACvC,0BAA0B,EAAE,SAAS;QAErC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'light',\n\ttype: 'light',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'base-shadow': '0 4px 12px rgba(0, 0, 0, 0.12)',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#ffffff',\n\t\t'button-background-color-highlight': '#cccccc',\n\t\t'background': '#ffffff',\n\t\t'background-color': '#ffffff',\n\t\t'background-color-2': '#eeeeee',\n\t\t'background-color-3': '#eeeeee',\n\t\t'text-highlight-color': '#9b8400',\n\t\t'text-color': '#000000',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#000000',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#cccccc',\n\t\t'border-color': '#cccccc',\n\t\t'border-color-2': '#939393',\n\t\t'border-color-3': '#939393',\n\t\t'cell-background': '#ffffff',\n\t\t'cell-border': '1px solid #cccccc',\n\t\t'hcell-background': '#ececec',\n\t\t'slider-background-color': '#eeeeee',\n\t\t'slider-background-active': '#e2e2e2',\n\t\t'slider-bar-color': '#aaaaaa',\n\t\t'slider-bar-active': '#aaaaaa',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#dbdbdb',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#b7b7b7',\n\t\t'inset-shadow-color': '#707070',\n\t\t\n\t\t'commands-color': '#000000',\n\t\t'commands-background': '#ffffff',\n\t\t'commands-header-background': '#cdcdcd',\n\t\t'commands-input-background': '#f1f1f1',\n\t\t'commands-shadow': '#7e7e7e',\n\t\n\t\t'dialog-color': '#000000',\n\t\t'dialog-background': '#ffffff',\n\t\t'dialog-header-background': '#cdcdcd',\n\t\t'dialog-shadow': '#7e7e7e',\n\t\t\n\t\t'tab-border-color': '#939393',\n\t\t'tab-background-color': '#f4f4f4',\n\t\t'tab-panel-background-color': '#f4f4f4',\n\t\t'tab-background-color-active': '#ffffff',\n\t\t\n\t\t'bucket-tab-background-color': '#f4f4f4',\n\t\t'bucket-tab-panel-background-color': '#f4f4f4',\n\t\t'bucket-tab-background-color-active': '#ffffff',\n\t\t'bucket-right-background-color': '#ffffff',\n\t\t'bucket-border-color': '#939393',\n\t\t'bucket-center-background-color': '#d8d8d8',\n\t\t'bucket-left-background-color': '#f3f3f3',\n\t\t'bucket-top-background-color': '#e5e5e5',\n\t\t'bucket-sidebar-background-color': '#f3f3f3',\n\t\t\n\t\t'form-background-color': '#e5e5e5',\n\t\n\t\t'colortype-yellow-background-color': '#e49f30',\n\t\t'colortype-yellow-border-color': '#e49f30',\n\t\t'colortype-yellow-text-color': '#FFFFFF',\n\t\n\t\t'colortype-green-background-color': '#43A047',\n\t\t'colortype-green-border-color': '#43A047',\n\t\t'colortype-green-text-color': '#FFFFFF',\n\t\n\t\t'colortype-red-background-color': '#EF5350',\n\t\t'colortype-red-border-color': '#EF5350',\n\t\t'colortype-red-text-color': '#FFFFFF',\n\t\n\t\t'colortype-blue-background-color': '#1E88E5',\n\t\t'colortype-blue-border-color': '#1E88E5',\n\t\t'colortype-blue-text-color': '#FFFFFF',\n\t\n\t\t'colortype-gray-background-color': '#D9D9D9',\n\t\t'colortype-gray-border-color': '#D9D9D9',\n\t\t'colortype-gray-text-color': '#212121',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#cccccc',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
1
+ {"version":3,"file":"tmLight.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,gCAAgC;QAC/C,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,YAAY,EAAE,SAAS;QACvB,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,SAAS;QAC/B,sBAAsB,EAAE,SAAS;QACjC,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;QACzB,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,SAAS;QAC3B,iBAAiB,EAAE,SAAS;QAC5B,aAAa,EAAE,mBAAmB;QAClC,kBAAkB,EAAE,SAAS;QAC7B,yBAAyB,EAAE,SAAS;QACpC,0BAA0B,EAAE,SAAS;QACrC,kBAAkB,EAAE,SAAS;QAC7B,mBAAmB,EAAE,SAAS;QAC9B,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,SAAS;QAC3B,2BAA2B,EAAE,SAAS;QACtC,kBAAk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port { Theme } from '../../types';\n\nexport default {\n\tname: 'light',\n\ttype: 'light',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'base-shadow': '0 4px 12px rgba(0, 0, 0, 0.12)',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#ffffff',\n\t\t'button-background-color-highlight': '#cccccc',\n\t\t'background': '#ffffff',\n\t\t'background-color': '#ffffff',\n\t\t'background-color-2': '#eeeeee',\n\t\t'background-color-3': '#eeeeee',\n\t\t'text-highlight-color': '#9b8400',\n\t\t'text-color': '#000000',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#000000',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#cccccc',\n\t\t'border-color': '#cccccc',\n\t\t'border-color-2': '#939393',\n\t\t'border-color-3': '#939393',\n\t\t'cell-background': '#ffffff',\n\t\t'cell-border': '1px solid #cccccc',\n\t\t'hcell-background': '#ececec',\n\t\t'slider-background-color': '#eeeeee',\n\t\t'slider-background-active': '#e2e2e2',\n\t\t'slider-bar-color': '#aaaaaa',\n\t\t'slider-bar-active': '#aaaaaa',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#dbdbdb',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#b7b7b7',\n\t\t'inset-shadow-color': '#707070',\n\t\t\n\t\t'commands-color': '#000000',\n\t\t'commands-background': '#ffffff',\n\t\t'commands-header-background': '#cdcdcd',\n\t\t'commands-input-background': '#f1f1f1',\n\t\t'commands-shadow': '#7e7e7e',\n\t\n\t\t'dialog-color': '#000000',\n\t\t'dialog-background': '#ffffff',\n\t\t'dialog-header-background': '#cdcdcd',\n\t\t'dialog-shadow': '#7e7e7e',\n\t\t\n\t\t'tab-border-color': '#939393',\n\t\t'tab-background-color': '#f4f4f4',\n\t\t'tab-panel-background-color': '#f4f4f4',\n\t\t'tab-background-color-active': '#ffffff',\n\t\t\n\t\t'bucket-tab-background-color': '#f4f4f4',\n\t\t'bucket-tab-panel-background-color': '#f4f4f4',\n\t\t'bucket-tab-background-color-active': '#ffffff',\n\t\t'bucket-right-background-color': '#ffffff',\n\t\t'bucket-border-color': '#939393',\n\t\t'bucket-center-background-color': '#d8d8d8',\n\t\t'bucket-left-background-color': '#f3f3f3',\n\t\t'bucket-top-background-color': '#e5e5e5',\n\t\t'bucket-sidebar-background-color': '#f3f3f3',\n\t\t\n\t\t'form-background-color': '#e5e5e5',\n\t\n\t\t'colortype-yellow-background-color': '#e49f30',\n\t\t'colortype-yellow-border-color': '#b57a15',\n\t\t'colortype-yellow-text-color': '#FFFFFF',\n\n\t\t'colortype-green-background-color': '#43A047',\n\t\t'colortype-green-border-color': '#2d7531',\n\t\t'colortype-green-text-color': '#FFFFFF',\n\n\t\t'colortype-red-background-color': '#EF5350',\n\t\t'colortype-red-border-color': '#c43735',\n\t\t'colortype-red-text-color': '#FFFFFF',\n\n\t\t'colortype-blue-background-color': '#1E88E5',\n\t\t'colortype-blue-border-color': '#0e64b3',\n\t\t'colortype-blue-text-color': '#FFFFFF',\n\n\t\t'colortype-gray-background-color': '#D9D9D9',\n\t\t'colortype-gray-border-color': '#b0b0b0',\n\t\t'colortype-gray-text-color': '#212121',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#cccccc',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
@@ -8,7 +8,7 @@ const transformations = [{
8
8
  }, {
9
9
  from: `accent-color`,
10
10
  to: `colortype-accent-border-color`,
11
- transform: (v) => v //lighten(v, 0.3)
11
+ transform: (v) => darken(v, 0.25)
12
12
  }, {
13
13
  from: `accent-color`,
14
14
  to: `accent-color-alpha`,
@@ -1 +1 @@
1
- {"version":3,"file":"transformations.js","sourceRoot":"","sources":["../../src/themes/transformations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE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AC,CAAC;AAEN,eAAe,eAAe,CAAC","sourcesContent":["import { alpha, darken, lighten } from \"../common/colors\";\nimport { ColorTypes, Theme } from \"../types\";\n\nconst scale = Array.from({ length: 19 }, (_, i) => (i + 1) * 5);\n\ntype TransformFunction = (v: string, theme: Theme) => string;\n\nconst transformations: {\n\tfrom: string, \n\tto: string, \n\ttransform: TransformFunction\n}[] = [{\n\tfrom: `accent-color`,\n\tto: `colortype-accent-background-color`,\n\ttransform: (v: string) => v\n}, {\n\tfrom: `accent-color`,\n\tto: `colortype-accent-border-color`,\n\ttransform: (v: string) => v //lighten(v, 0.3)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha`,\n\ttransform: (v: string) => alpha(v)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-15`,\n\ttransform: (v: string) => alpha(v, 0.15)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-30`,\n\ttransform: (v: string) => alpha(v, 0.30)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-70`,\n\ttransform: (v: string) => alpha(v, 0.70)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-highlight`,\n\ttransform: (v: string) => darken(v)\n}, ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-dark-${amount}`,\n\ttransform: (v: string) => darken(v, amount / 100)\n}))), ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-light-${amount}`,\n\ttransform: (v: string) => lighten(v, amount / 100)\n}))), ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-soft-${amount}`,\n\ttransform: (v: string, theme: Theme) => theme.type === 'dark' // darker for dark themes, lighter for light themes\n\t\t? darken(v, amount / 100) \n\t\t: lighten(v, amount / 100)\n})))];\n\nexport default transformations;"]}
1
+ {"version":3,"file":"transformations.js","sourceRoot":"","sources":["../../src/themes/transformations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAS,MAAM,UAAU,CAAC;AAE7C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAIhE,MAAM,eAAe,GAIf,CAAC;QACN,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,mCAAmC;QACvC,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;KAC3B,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,+BAA+B;QACnC,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC;KACzC,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,oBAAoB;QACxB,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KAClC,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,uBAAuB;QAC3B,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;KACxC,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,uBAAuB;QAC3B,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;KACxC,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,uBAAuB;QAC3B,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CA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CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;KAC3B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEN,eAAe,eAAe,CAAC","sourcesContent":["import { alpha, darken, lighten } from \"../common/colors\";\nimport { ColorTypes, Theme } from \"../types\";\n\nconst scale = Array.from({ length: 19 }, (_, i) => (i + 1) * 5);\n\ntype TransformFunction = (v: string, theme: Theme) => string;\n\nconst transformations: {\n\tfrom: string, \n\tto: string, \n\ttransform: TransformFunction\n}[] = [{\n\tfrom: `accent-color`,\n\tto: `colortype-accent-background-color`,\n\ttransform: (v: string) => v\n}, {\n\tfrom: `accent-color`,\n\tto: `colortype-accent-border-color`,\n\ttransform: (v: string) => darken(v, 0.25)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha`,\n\ttransform: (v: string) => alpha(v)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-15`,\n\ttransform: (v: string) => alpha(v, 0.15)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-30`,\n\ttransform: (v: string) => alpha(v, 0.30)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-70`,\n\ttransform: (v: string) => alpha(v, 0.70)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-highlight`,\n\ttransform: (v: string) => darken(v)\n}, ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-dark-${amount}`,\n\ttransform: (v: string) => darken(v, amount / 100)\n}))), ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-light-${amount}`,\n\ttransform: (v: string) => lighten(v, amount / 100)\n}))), ...Object.values(ColorTypes).flatMap(clr =>scale.map(amount => ({\n\tfrom: `colortype-${clr}-background-color`,\n\tto: `colortype-${clr}-background-color-soft-${amount}`,\n\ttransform: (v: string, theme: Theme) => theme.type === 'dark' // darker for dark themes, lighter for light themes\n\t\t? darken(v, amount / 100) \n\t\t: lighten(v, amount / 100)\n})))];\n\nexport default transformations;"]}
@@ -1 +1 @@
1
- {"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,yBAwDjB,CAAC"}
1
+ {"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,yBAoEjB,CAAC"}
@@ -12,11 +12,12 @@ export const style = css `
12
12
  outline: none;
13
13
  user-select: none;
14
14
  border-radius: var(--og-base-radius);
15
+ transition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
15
16
  }
16
17
 
17
18
  :host([default]) {
18
19
  font-weight: bold;
19
- text-decoration: underline;
20
+ box-shadow: inset 0 -2px 0 0 currentColor;
20
21
  }
21
22
 
22
23
  :host([state=unchecked]) {
@@ -25,15 +26,26 @@ export const style = css `
25
26
  color: var(--og-text-color);
26
27
  }
27
28
 
28
- :host([disabled]), :host([disabled]:hover) {
29
- background-color: gray;
29
+ :host([disabled]), :host([disabled]:hover), :host([disabled]:active) {
30
+ background-color: var(--og-button-background-color);
30
31
  border-color: var(--og-border-color);
31
32
  cursor: not-allowed;
32
- opacity: 0.5;
33
+ opacity: 0.4;
34
+ filter: saturate(0.3);
35
+ transform: none;
33
36
  }
34
37
 
35
38
  :host(:hover) {
36
- opacity: 0.8;
39
+ filter: brightness(1.2);
40
+ }
41
+
42
+ :host(:active) {
43
+ filter: brightness(0.9);
44
+ transform: scale(0.97);
45
+ }
46
+
47
+ :host(:focus-visible) {
48
+ box-shadow: 0 0 0 2px var(--og-background-color), 0 0 0 4px var(--og-button-color);
37
49
  }
38
50
 
39
51
  div.inner {
@@ -1 +1 @@
1
- {"version":3,"file":"button.style.js","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;YAQZ,SAAS,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDlC,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport const style = css`\n\t:host {\n\t\tbox-sizing: border-box;\n\t\tfont-size: var(--og-font-size);\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t\toverflow: hidden;\n\t\theight: ${constants.BUTTON_HEIGHT}px;\n\t\toutline: none;\n\t\tuser-select: none;\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\n\t:host([default]) {\n\t\tfont-weight: bold;\n\t\ttext-decoration: underline;\n\t}\n\n\t:host([state=unchecked]) {\n\t\tborder-color: var(--og-background-color);\n\t\tbackground-color: var(--og-background-color);\n\t\tcolor: var(--og-text-color);\n\t}\n\n\t:host([disabled]), :host([disabled]:hover) {\n\t\tbackground-color: gray;\n\t\tborder-color: var(--og-border-color);\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n\n\t:host(:hover) {\n\t\topacity: 0.8;\n\t}\n\n\tdiv.inner {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\tdiv.content {\n\t\tflex: 1 0;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\tpadding: 0 4px;\n\t}\n\n\t.has-content og-icon {\n\t\tmargin-left: 2px;\n\t}\n\n`;"]}
1
+ {"version":3,"file":"button.style.js","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;YAQZ,SAAS,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DlC,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport const style = css`\n\t:host {\n\t\tbox-sizing: border-box;\n\t\tfont-size: var(--og-font-size);\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t\toverflow: hidden;\n\t\theight: ${constants.BUTTON_HEIGHT}px;\n\t\toutline: none;\n\t\tuser-select: none;\n\t\tborder-radius: var(--og-base-radius);\n\t\ttransition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.1s ease;\n\t}\n\n\t:host([default]) {\n\t\tfont-weight: bold;\n\t\tbox-shadow: inset 0 -2px 0 0 currentColor;\n\t}\n\n\t:host([state=unchecked]) {\n\t\tborder-color: var(--og-background-color);\n\t\tbackground-color: var(--og-background-color);\n\t\tcolor: var(--og-text-color);\n\t}\n\n\t:host([disabled]), :host([disabled]:hover), :host([disabled]:active) {\n\t\tbackground-color: var(--og-button-background-color);\n\t\tborder-color: var(--og-border-color);\n\t\tcursor: not-allowed;\n\t\topacity: 0.4;\n\t\tfilter: saturate(0.3);\n\t\ttransform: none;\n\t}\n\n\t:host(:hover) {\n\t\tfilter: brightness(1.2);\n\t}\n\n\t:host(:active) {\n\t\tfilter: brightness(0.9);\n\t\ttransform: scale(0.97);\n\t}\n\n\t:host(:focus-visible) {\n\t\tbox-shadow: 0 0 0 2px var(--og-background-color), 0 0 0 4px var(--og-button-color);\n\t}\n\n\tdiv.inner {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\tdiv.content {\n\t\tflex: 1 0;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\tpadding: 0 4px;\n\t}\n\n\t.has-content og-icon {\n\t\tmargin-left: 2px;\n\t}\n\n`;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAe,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK9E,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAKlC,qBAAa,aAAc,SAAQ,KAAK;gBAE3B,KAAK,EAAE,MAAM;CAGzB;AAED,qBAEa,iBAAkB,SAAQ,UAAU;IAEhD,MAAM,CAAC,MAAM,0BAuBX;IAGF,KAAK,aAAqB;;IAO1B,MAAM,0BAA6D;CACnE;AAED,qBAEa,QAAS,SAAQ,UAAW,YAAW,MAAM;IAEzD,MAAM,CAAC,MAAM,4BA4CV;IAGH,SAAS,EAAE,MAAM,GAAC,OAAO,CAAW;IAGpC,aAAa,EAAE,iBAAiB,CAAU;IAG1C,cAAc,SAAK;IAGnB,cAAc,EAAE,WAAW,CAAiB;IAG5C,SAAS,SAAO;IAGhB,KAAK,EAAE,MAAM,GAAC,WAAW,GAAC,cAAc,CAAC;IAGzC,IAAI,EAAE,QAAQ,GAAC,MAAM,CAAC;IAGtB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,aAAqB;IAG1B,OAAO,UAAS;IAGhB,QAAQ,UAAS;IAGjB,QAAQ,EAAE,cAAc,CAAC;IAEzB,OAAO,CAAC,WAAW,CAAc;IAEjC,SAAS,CAAC,WAAW,8DAAkC;IACvD,IAAI,QAAQ,sBAAqC;IAEjD,IAAI,MAAM,YAA2D;IAErE,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,GAAI,GAAG,UAAU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IAEzB,OAAO,CAAC,WAAW,CAAc;IAEjC,SAAS,CAAC,WAAW,8DAAkC;IACvD,IAAI,QAAQ,sBAAqC;IAEjD,IAAI,MAAM,YAA2D;IAErE,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,GAAI,GAAG,UAAU,UAKpC;IAED,eAAe,CAAC,OAAO,EAAE,MAAM;IAYzB,IAAI;IA4BV,KAAK;IAML,MAAM;IAMN,YAAY,sBAA6B;IAEzC,oBAAoB;IAKpB,cAAc,0BAIZ;IAEF,WAAW,2HAMT;IAEF,IAAI,YAAY,YAEf;IAED,IAAI,QAAQ,YAEX;IAED,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAKnC,MAAM,0BAgBJ;IAEF,IAAI,YAAY,YAEf;IAED,MAAM;CA6BN"}
@@ -224,6 +224,7 @@ Dropdown.styles = [css `
224
224
  outline: none;
225
225
  border-radius: var(--og-base-radius);
226
226
  height: ${constants.BUTTON_HEIGHT}px;
227
+ overflow: hidden;
227
228
  }
228
229
 
229
230
  :host(.radiusfix-down) {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAA0C,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACl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AE,CAAC,QAAQ,CAAC,EAAC,CAAC;GAClB,QAAQ,CAgPpB","sourcesContent":["import { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ColorTypes, CssPosition, Layout, VerticalDirection } from '../types';\nimport * as dom from '../common/dom';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { createRef, ref } from 'lit-html/directives/ref.js';\nimport { guard } from 'lit/directives/guard.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\nimport { colorable } from '../themes';\nimport constants from '../constants';\n\nexport class DropdownEvent extends Event {\n\n\tconstructor(event: string) {\n\t\tsuper(`dropdown.${event}`);\n\t}\n}\n\n@customElement('og-dropdown-container')\n@colorable({props: ['border']})\nexport class DropdownContainer extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tposition: absolute;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--og-text-color);\n\t\t\tz-index: 60000;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\tbox-shadow: var(--og-base-shadow);\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t`;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('mousedown', (e: MouseEvent) => e.stopPropagation());\n\t}\n\n\trender = () => html`<div><slot name=\"inner-content\"></slot></div>`;\n}\n\n@customElement('og-dropdown')\n@colorable({props: ['border']})\nexport class Dropdown extends LitElement implements Layout {\n\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tbox-sizing: border-box;\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tflex-direction: row;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\toutline: none;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\theight: ${constants.BUTTON_HEIGHT}px;\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host([disabled]) {\n\t\t\tborder-color: var(--og-colortype-gray-border-color);\n\t\t}\n\n\t\tdiv.text {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--og-text-color-1);\n\t\t\tpadding-left: 2px;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 1;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\theight: 100%;\n\t\t}\n\t`];\n\n\t@property({type: String})\n\talignment: 'left'|'right' = 'right';\n\n\t@property({type: String, reflect: true})\n\topenDirection: VerticalDirection = 'down';\n\n\t@property({type: Number})\n\tpositionOffset = 0;\n\n\t@property({type: Object})\n\tdropdownParent: HTMLElement = document.body;\n\n\t@property({type: Number})\n\tanimation = 0.1;\n\n\t@property()\n\tlabel: string|HTMLElement|TemplateResult;\n\n\t@property()\n\ticon: IconSpec|string;\n\n\t@property({type: Number})\n\twidth: number;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\t@property({type: Boolean})\n\tnoCaret = false;\n\n\t@property({type: Boolean, reflect: true})\n\tdisabled = false;\n\n\t@query('.label')\n\tlabelElm: HTMLDivElement;\n\n\tprivate _contentElm: HTMLElement;\n\n\tprotected dropdownRef = createRef<DropdownContainer>();\n\tget dropdown() { return this.dropdownRef?.value }\n\n\tget isOpen() { return this.dropdown && !dom.isHidden(this.dropdown) }\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 0;\n\t}\n\n\t_onDocumentMouseDown = (e: MouseEvent) => {\n\t\tfor (const elm of e.composedPath()) {\n\t\t\tif (elm == this.dropdown || elm == this) return;\n\t\t}\n\t\tthis.close();\n\t}\n\n\tanimateDropdown(seconds: number) {\n\t\tconst height = this.dropdown.offsetHeight;\n\t\tdom.setSize(this.dropdown, {h: 0});\n\t\tthis.dropdown.style.transition = `height ${seconds}s ease-in-out`;\n\t\tsetTimeout(() => dom.setSize(this.dropdown, {h: height}), 0);\n\t\tsetTimeout(() => {\n\t\t\tthis.dropdown.style.height = 'auto';\n\t\t\tthis.dropdown.style.transition = '';\n\t\t\tthis.layout();\n\t\t}, seconds * 1000);\n\t}\n\n\tasync open() {\n\t\tthis.dispatchEvent(new DropdownEvent('beforeOpen'));\n\t\tawait this.updateComplete;\n\t\t\n\t\tif (this.dropdown.parentElement !== this.dropdownParent) {\n\t\t\tthis.dropdownParent.appendChild(this.dropdown);\n\t\t}\n\n\t\tif (this.children.length > 0 && !this._contentElm) {\n\t\t\tthis._contentElm = [...this.children].find(elm => elm.slot == 'content') as HTMLElement;\n\t\t\tif (this._contentElm) {\n\t\t\t\tthis._contentElm.slot = 'inner-content';\n\t\t\t\tthis.dropdown.appendChild(this._contentElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.width > 0) dom.setSize(this.dropdown, {w: this.width});\n\t\tdom.showElement(this.dropdown);\n\t\tthis.requestUpdate();\n\t\tawait this.dropdown.updateComplete;\n\t\tthis.dispatchEvent(new DropdownEvent('open'));\n\t\tthis.layout();\n\n\t\tif (this.animation > 0) this.animateDropdown(this.animation);\n\n\t\tdocument.body.addEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\tclose() {\n\t\tif (this.dropdown) dom.hideElement(this.dropdown);\n\t\tthis.layout();\n\t\tdocument.body.removeEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\ttoggle() {\n\t\tif (this.disabled) return;\n\t\tif (this.isOpen) this.close();\n\t\telse this.open();\n\t}\n\n\t_onMousedown = async () => this.toggle();\n\n\tdisconnectedCallback() {\n\t\tthis.dropdown?.remove();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\trenderDropdown = () => html`\n\t\t<og-dropdown-container ${ref(this.dropdownRef)}\n\t\t\tstyle=\"display: none\">\n\t\t</og-dropdown-container>\n\t`;\n\n\trenderLabel = () => {\n\t\tif (utils.isString(this.label)) {\n\t\t\treturn this.label === '' ? unsafeHTML('&nbsp;') : html`<div class=\"text\">${this.label}</div>`;\n\t\t} else {\n\t\t\treturn this.label;\n\t\t}\n\t};\n\n\tget hasLabelSlot() {\n\t\treturn this.querySelector('[slot=\"label\"]') != null;\n\t}\n\n\tget hasLabel() {\n\t\treturn this.label !== '' && this.label != null;\n\t}\n\n\tupdated(props: Map<string, unknown>) {\n\t\tsuper.updated(props);\n\t\tif (this.dropdown) this.dropdown.color = this.color == ColorTypes.Transparent ? ColorTypes.Accent : this.color;\n\t}\n\n\trender = () => html`\n\t\t<og-button\n\t\t\t@mousedown=\"${this._onMousedown}\"\n\t\t\tclass=\"main\"\n\t\t\tcolor=\"${this.color}\"\n\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t.icon=\"${this.icon}\"\n\t\t\t.caret=\"${this.noCaret ? 'none' : this.openDirection}\">\n\t\t\t${this.hasLabelSlot ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\"><slot name=\"label\"></slot></div>\n\t\t\t` : guard([this.label], () => (this.hasLabel ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\">${this.renderLabel()}</div>\n\t\t\t` : ''))}\n\t\t</og-button>\n\n\t\t${this.renderDropdown()}\n\t`;\n\n\tget useRadiusFix() {\n\t\treturn this.isOpen && this.color != ColorTypes.Transparent;\n\t}\n\n\tlayout() {\n\t\tthis.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.dropdown) return;\n\t\tthis.dropdown.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.isOpen) return;\n\n\t\tconst offset = dom.getElementOffset(this, this.dropdownParent);\n\t\tdom.setSize(this.dropdown, {w: this.offsetWidth}, true);\n\n\t\tconst pos: CssPosition = {t: 'unset', b: 'unset', l: 'unset', r: 'unset'};\n\n\t\tif (this.openDirection == 'down') {\n\t\t\tpos.t = offset.top + this.offsetHeight - 1;\n\t\t} else {\n\t\t\tpos.t = offset.top - this.dropdown.offsetHeight + 1;\n\t\t}\n\n\t\tif (this.alignment == 'left') {\n\t\t\tthis.dropdown.style.right = 'auto';\n\t\t\tpos.l = this.positionOffset + offset.left;\n\t\t} else {\n\t\t\tthis.dropdown.style.left = 'auto';\n\t\t\tpos.r = this.dropdownParent.clientWidth - this.positionOffset - offset.left - this.offsetWidth;\n\t\t}\n\n\t\tdom.setPosition(this.dropdown, pos);\n\t\tdom.fixElementPosition(this.dropdown);\n\t}\n\n}"]}
1
+ {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAA0C,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAA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AAK,EAAE,CAAC,QAAQ,CAAC,EAAC,CAAC;GAClB,QAAQ,CAiPpB","sourcesContent":["import { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ColorTypes, CssPosition, Layout, VerticalDirection } from '../types';\nimport * as dom from '../common/dom';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { createRef, ref } from 'lit-html/directives/ref.js';\nimport { guard } from 'lit/directives/guard.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\nimport { colorable } from '../themes';\nimport constants from '../constants';\n\nexport class DropdownEvent extends Event {\n\n\tconstructor(event: string) {\n\t\tsuper(`dropdown.${event}`);\n\t}\n}\n\n@customElement('og-dropdown-container')\n@colorable({props: ['border']})\nexport class DropdownContainer extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tposition: absolute;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--og-text-color);\n\t\t\tz-index: 60000;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\tbox-shadow: var(--og-base-shadow);\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t`;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('mousedown', (e: MouseEvent) => e.stopPropagation());\n\t}\n\n\trender = () => html`<div><slot name=\"inner-content\"></slot></div>`;\n}\n\n@customElement('og-dropdown')\n@colorable({props: ['border']})\nexport class Dropdown extends LitElement implements Layout {\n\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tbox-sizing: border-box;\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tflex-direction: row;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\toutline: none;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\theight: ${constants.BUTTON_HEIGHT}px;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host([disabled]) {\n\t\t\tborder-color: var(--og-colortype-gray-border-color);\n\t\t}\n\n\t\tdiv.text {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--og-text-color-1);\n\t\t\tpadding-left: 2px;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 1;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\theight: 100%;\n\t\t}\n\t`];\n\n\t@property({type: String})\n\talignment: 'left'|'right' = 'right';\n\n\t@property({type: String, reflect: true})\n\topenDirection: VerticalDirection = 'down';\n\n\t@property({type: Number})\n\tpositionOffset = 0;\n\n\t@property({type: Object})\n\tdropdownParent: HTMLElement = document.body;\n\n\t@property({type: Number})\n\tanimation = 0.1;\n\n\t@property()\n\tlabel: string|HTMLElement|TemplateResult;\n\n\t@property()\n\ticon: IconSpec|string;\n\n\t@property({type: Number})\n\twidth: number;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\t@property({type: Boolean})\n\tnoCaret = false;\n\n\t@property({type: Boolean, reflect: true})\n\tdisabled = false;\n\n\t@query('.label')\n\tlabelElm: HTMLDivElement;\n\n\tprivate _contentElm: HTMLElement;\n\n\tprotected dropdownRef = createRef<DropdownContainer>();\n\tget dropdown() { return this.dropdownRef?.value }\n\n\tget isOpen() { return this.dropdown && !dom.isHidden(this.dropdown) }\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 0;\n\t}\n\n\t_onDocumentMouseDown = (e: MouseEvent) => {\n\t\tfor (const elm of e.composedPath()) {\n\t\t\tif (elm == this.dropdown || elm == this) return;\n\t\t}\n\t\tthis.close();\n\t}\n\n\tanimateDropdown(seconds: number) {\n\t\tconst height = this.dropdown.offsetHeight;\n\t\tdom.setSize(this.dropdown, {h: 0});\n\t\tthis.dropdown.style.transition = `height ${seconds}s ease-in-out`;\n\t\tsetTimeout(() => dom.setSize(this.dropdown, {h: height}), 0);\n\t\tsetTimeout(() => {\n\t\t\tthis.dropdown.style.height = 'auto';\n\t\t\tthis.dropdown.style.transition = '';\n\t\t\tthis.layout();\n\t\t}, seconds * 1000);\n\t}\n\n\tasync open() {\n\t\tthis.dispatchEvent(new DropdownEvent('beforeOpen'));\n\t\tawait this.updateComplete;\n\n\t\tif (this.dropdown.parentElement !== this.dropdownParent) {\n\t\t\tthis.dropdownParent.appendChild(this.dropdown);\n\t\t}\n\n\t\tif (this.children.length > 0 && !this._contentElm) {\n\t\t\tthis._contentElm = [...this.children].find(elm => elm.slot == 'content') as HTMLElement;\n\t\t\tif (this._contentElm) {\n\t\t\t\tthis._contentElm.slot = 'inner-content';\n\t\t\t\tthis.dropdown.appendChild(this._contentElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.width > 0) dom.setSize(this.dropdown, {w: this.width});\n\t\tdom.showElement(this.dropdown);\n\t\tthis.requestUpdate();\n\t\tawait this.dropdown.updateComplete;\n\t\tthis.dispatchEvent(new DropdownEvent('open'));\n\t\tthis.layout();\n\n\t\tif (this.animation > 0) this.animateDropdown(this.animation);\n\n\t\tdocument.body.addEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\tclose() {\n\t\tif (this.dropdown) dom.hideElement(this.dropdown);\n\t\tthis.layout();\n\t\tdocument.body.removeEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\ttoggle() {\n\t\tif (this.disabled) return;\n\t\tif (this.isOpen) this.close();\n\t\telse this.open();\n\t}\n\n\t_onMousedown = async () => this.toggle();\n\n\tdisconnectedCallback() {\n\t\tthis.dropdown?.remove();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\trenderDropdown = () => html`\n\t\t<og-dropdown-container ${ref(this.dropdownRef)}\n\t\t\tstyle=\"display: none\">\n\t\t</og-dropdown-container>\n\t`;\n\n\trenderLabel = () => {\n\t\tif (utils.isString(this.label)) {\n\t\t\treturn this.label === '' ? unsafeHTML('&nbsp;') : html`<div class=\"text\">${this.label}</div>`;\n\t\t} else {\n\t\t\treturn this.label;\n\t\t}\n\t};\n\n\tget hasLabelSlot() {\n\t\treturn this.querySelector('[slot=\"label\"]') != null;\n\t}\n\n\tget hasLabel() {\n\t\treturn this.label !== '' && this.label != null;\n\t}\n\n\tupdated(props: Map<string, unknown>) {\n\t\tsuper.updated(props);\n\t\tif (this.dropdown) this.dropdown.color = this.color == ColorTypes.Transparent ? ColorTypes.Accent : this.color;\n\t}\n\n\trender = () => html`\n\t\t<og-button\n\t\t\t@mousedown=\"${this._onMousedown}\"\n\t\t\tclass=\"main\"\n\t\t\tcolor=\"${this.color}\"\n\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t.icon=\"${this.icon}\"\n\t\t\t.caret=\"${this.noCaret ? 'none' : this.openDirection}\">\n\t\t\t${this.hasLabelSlot ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\"><slot name=\"label\"></slot></div>\n\t\t\t` : guard([this.label], () => (this.hasLabel ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\">${this.renderLabel()}</div>\n\t\t\t` : ''))}\n\t\t</og-button>\n\n\t\t${this.renderDropdown()}\n\t`;\n\n\tget useRadiusFix() {\n\t\treturn this.isOpen && this.color != ColorTypes.Transparent;\n\t}\n\n\tlayout() {\n\t\tthis.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.dropdown) return;\n\t\tthis.dropdown.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.isOpen) return;\n\n\t\tconst offset = dom.getElementOffset(this, this.dropdownParent);\n\t\tdom.setSize(this.dropdown, {w: this.offsetWidth}, true);\n\n\t\tconst pos: CssPosition = {t: 'unset', b: 'unset', l: 'unset', r: 'unset'};\n\n\t\tif (this.openDirection == 'down') {\n\t\t\tpos.t = offset.top + this.offsetHeight - 1;\n\t\t} else {\n\t\t\tpos.t = offset.top - this.dropdown.offsetHeight + 1;\n\t\t}\n\n\t\tif (this.alignment == 'left') {\n\t\t\tthis.dropdown.style.right = 'auto';\n\t\t\tpos.l = this.positionOffset + offset.left;\n\t\t} else {\n\t\t\tthis.dropdown.style.left = 'auto';\n\t\t\tpos.r = this.dropdownParent.clientWidth - this.positionOffset - offset.left - this.offsetWidth;\n\t\t}\n\n\t\tdom.setPosition(this.dropdown, pos);\n\t\tdom.fixElementPosition(this.dropdown);\n\t}\n\n}\n"]}
@@ -9,7 +9,7 @@ export const style = css `
9
9
  font-size: var(--og-font-size);
10
10
  display: flex;
11
11
  flex-direction: column;
12
- border: 1px solid var(--og-border-color);
12
+ border: 1px solid var(--og-bucket-border-color);
13
13
  }
14
14
 
15
15
  #header {
@@ -17,7 +17,7 @@ export const style = css `
17
17
  color: var(--og-text-color);
18
18
  display: flex;
19
19
  flex-direction: row;
20
- border-bottom: 1px solid var(--og-border-color);
20
+ border-bottom: 1px solid var(--og-bucket-border-color);
21
21
  align-items: center;
22
22
  }
23
23
 
@@ -34,7 +34,7 @@ export const style = css `
34
34
  vertical-align: middle;
35
35
  height: 12px;
36
36
  }
37
-
37
+
38
38
  #icon, #chevron-left {
39
39
  margin-left: 5px;
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"panel.style.js","sourceRoot":"","sources":["../../src/ui/panel.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,GAAG,EAAE,MAAM,KAAK,CAAC;AAE3B,+CAA+C;AAE/C,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEvB,CAAC","sourcesContent":["import { css } from 'lit';\n\n// TODO - remove top/bottom padding from header\n\nexport const style = css`\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t:host {\n\t\tfont-size: var(--og-font-size);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tborder: 1px solid var(--og-border-color);\n\t}\n\n\t#header {\n\t\tflex: 0;\n\t\tcolor: var(--og-text-color);\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tborder-bottom: 1px solid var(--og-border-color);\n\t\talign-items: center;\n\t}\n\n\t#title {\n\t\tflex: 1;\n\t\tmargin-left: 5px;\n\t}\n\n\t#title > * {\n\t\tline-height: 25px;\n\t}\n\n\tog-icon {\n\t\tvertical-align: middle;\n\t\theight: 12px;\n\t}\n\t\n\t#icon, #chevron-left {\n\t\tmargin-left: 5px;\n\t}\n\n\t#chevron-right {\n\t\tmargin-right: 5px;\n\t}\n\n\t#header > og-icon {\n\t\tflex: 0;\n\t\ttext-align: center;\n\t\tmin-width: 12px;\n\t}\n\n\t:host([collapsible]) #header {\n\t\tcursor: pointer;\n\t}\n\n\t:host([collapsible]) #header:hover {\n\t\tbackground-color: var(--og-background-color-2);\n\t}\n\n\t#body {\n\t\tflex: 1;\n\t\tborder-top-width: 0;\n\t\toverflow: hidden;\n\t\tmax-height: 100%;\n\t}\n\n\tog-container {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t}\n`;"]}
1
+ {"version":3,"file":"panel.style.js","sourceRoot":"","sources":["../../src/ui/panel.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,GAAG,EAAE,MAAM,KAAK,CAAC;AAE3B,+CAA+C;AAE/C,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEvB,CAAC","sourcesContent":["import { css } from 'lit';\n\n// TODO - remove top/bottom padding from header\n\nexport const style = css`\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t:host {\n\t\tfont-size: var(--og-font-size);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tborder: 1px solid var(--og-bucket-border-color);\n\t}\n\n\t#header {\n\t\tflex: 0;\n\t\tcolor: var(--og-text-color);\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tborder-bottom: 1px solid var(--og-bucket-border-color);\n\t\talign-items: center;\n\t}\n\n\t#title {\n\t\tflex: 1;\n\t\tmargin-left: 5px;\n\t}\n\n\t#title > * {\n\t\tline-height: 25px;\n\t}\n\n\tog-icon {\n\t\tvertical-align: middle;\n\t\theight: 12px;\n\t}\n\n\t#icon, #chevron-left {\n\t\tmargin-left: 5px;\n\t}\n\n\t#chevron-right {\n\t\tmargin-right: 5px;\n\t}\n\n\t#header > og-icon {\n\t\tflex: 0;\n\t\ttext-align: center;\n\t\tmin-width: 12px;\n\t}\n\n\t:host([collapsible]) #header {\n\t\tcursor: pointer;\n\t}\n\n\t:host([collapsible]) #header:hover {\n\t\tbackground-color: var(--og-background-color-2);\n\t}\n\n\t#body {\n\t\tflex: 1;\n\t\tborder-top-width: 0;\n\t\toverflow: hidden;\n\t\tmax-height: 100%;\n\t}\n\n\tog-container {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t}\n`;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/core",
3
- "version": "0.10.9",
3
+ "version": "0.10.11",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Core components",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@fortawesome/fontawesome-svg-core": "^7.0.1",
39
- "@omegagrid/localize": "^0.10.9",
39
+ "@omegagrid/localize": "^0.10.11",
40
40
  "color": "^4.2.3",
41
41
  "date-fns": "^3.2.0",
42
42
  "lit": "^3.1.1",