@omegagrid/core 0.10.16 → 0.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/themes/transformations.d.ts.map +1 -1
- package/dist/themes/transformations.js +9 -13
- package/dist/themes/transformations.js.map +1 -1
- package/dist/ui/button.style.js +2 -2
- package/dist/ui/button.style.js.map +1 -1
- package/dist/ui/dropdownMenu.d.ts.map +1 -1
- package/dist/ui/dropdownMenu.js +1 -0
- package/dist/ui/dropdownMenu.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformations.d.ts","sourceRoot":"","sources":["../../src/themes/transformations.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,EAAE,MAAM,UAAU,CAAC;AAI7C,KAAK,iBAAiB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE7D,QAAA,MAAM,eAAe,EAAE;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,iBAAiB,CAAA;CAC5B,
|
|
1
|
+
{"version":3,"file":"transformations.d.ts","sourceRoot":"","sources":["../../src/themes/transformations.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,EAAE,MAAM,UAAU,CAAC;AAI7C,KAAK,iBAAiB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE7D,QAAA,MAAM,eAAe,EAAE;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,iBAAiB,CAAA;CAC5B,EAsCI,CAAC;AAEN,eAAe,eAAe,CAAC"}
|
|
@@ -9,22 +9,18 @@ const transformations = [{
|
|
|
9
9
|
from: `accent-color`,
|
|
10
10
|
to: `colortype-accent-border-color`,
|
|
11
11
|
transform: (v) => darken(v, 0.25)
|
|
12
|
-
}, {
|
|
12
|
+
}, ...scale.flatMap(amount => ([{
|
|
13
|
+
from: `accent-color`,
|
|
14
|
+
to: `accent-color-alpha-${amount}`,
|
|
15
|
+
transform: (v) => alpha(v, amount / 100)
|
|
16
|
+
}, {
|
|
17
|
+
from: `accent-color`,
|
|
18
|
+
to: `accent-color-alpha-soft-${amount}`,
|
|
19
|
+
transform: (v, theme) => alpha(v, theme.type === 'dark' ? (amount / 100) : (100 - (amount / 100)))
|
|
20
|
+
}])), {
|
|
13
21
|
from: `accent-color`,
|
|
14
22
|
to: `accent-color-alpha`,
|
|
15
23
|
transform: (v) => alpha(v)
|
|
16
|
-
}, {
|
|
17
|
-
from: `accent-color`,
|
|
18
|
-
to: `accent-color-alpha-15`,
|
|
19
|
-
transform: (v) => alpha(v, 0.15)
|
|
20
|
-
}, {
|
|
21
|
-
from: `accent-color`,
|
|
22
|
-
to: `accent-color-alpha-30`,
|
|
23
|
-
transform: (v) => alpha(v, 0.30)
|
|
24
|
-
}, {
|
|
25
|
-
from: `accent-color`,
|
|
26
|
-
to: `accent-color-alpha-70`,
|
|
27
|
-
transform: (v) => alpha(v, 0.70)
|
|
28
24
|
}, {
|
|
29
25
|
from: `accent-color`,
|
|
30
26
|
to: `accent-color-highlight`,
|
|
@@ -1 +1 @@
|
|
|
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;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AAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAA,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrE,IAAI,EAAE,aAAa,GAAG,mBAAmB;QACzC,EAAE,EAAE,aAAa,GAAG,0BAA0B,MAAM,EAAE;QACtD,SAAS,EAAE,CAAC,CAAS,EAAE,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,mDAAmD;YAChH,CAAC,CAAC,MAAM,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}, ...scale.flatMap(amount => ([{\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-${amount}`,\n\ttransform: (v: string) => alpha(v, amount / 100)\n}, {\n\tfrom: `accent-color`,\n\tto: `accent-color-alpha-soft-${amount}`,\n\ttransform: (v: string, theme: Theme) => alpha(v, theme.type === 'dark' ? (amount / 100) : (100 - (amount / 100)))\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-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;\n"]}
|
package/dist/ui/button.style.js
CHANGED
|
@@ -15,10 +15,10 @@ export const style = css `
|
|
|
15
15
|
transition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
/*:host([default]) {
|
|
19
19
|
font-weight: bold;
|
|
20
20
|
box-shadow: inset 0 -2px 0 0 currentColor;
|
|
21
|
-
}
|
|
21
|
+
}*/
|
|
22
22
|
|
|
23
23
|
:host([state=unchecked]) {
|
|
24
24
|
border-color: var(--og-background-color);
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
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":"dropdownMenu.d.ts","sourceRoot":"","sources":["../../src/ui/dropdownMenu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAa,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,qBACa,YAAa,SAAQ,QAAQ;IAGzC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAGlB,YAAY,UAAS;IAErB,OAAO,CAAC,KAAK,CAAO;IAEpB,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"dropdownMenu.d.ts","sourceRoot":"","sources":["../../src/ui/dropdownMenu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAa,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,qBACa,YAAa,SAAQ,QAAQ;IAGzC,KAAK,EAAE,QAAQ,EAAE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;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;QACC,KAAK,EAAE,CAAC;QA5BT,iBAAY,GAAG,KAAK,CAAC;QA6BpB,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE;YAC3C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAClB,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,KAA2B;QAClC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YAC5C,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,CAAC;IACF,CAAC;CAED,CAAA;AA/CA;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;2CACN;AAGlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;kDACL;AANT,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAkDxB","sourcesContent":["import { dom } from '../common';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Dropdown } from './dropdown';\nimport { Menu, MenuEvent, MenuItem } from './menu';\n\n@customElement(`og-dropdown-menu`)\nexport class DropdownMenu extends Dropdown {\n\n\t@property({type: Array})\n\titems: MenuItem[];\n\n\t@property({type: Boolean})\n\tdynamicWidth = false;\n\n\tprivate _menu: Menu;\n\n\tget menu() {\n\t\tif (this._menu) return this._menu;\n\t\tthis._menu = dom.createElement<Menu>('og-menu', {\n\t\t\tslot: 'inner-content',\n\t\t\tdynamicWidth: this.dynamicWidth,\n\t\t\titems: this.items,\n\t\t\tcolor: this.color,\n\t\t\tstyle: {\n\t\t\t\tborder: 'none',\n\t\t\t\tminWidth: '100%'\n\t\t\t},\n\t\t\tlisteners: [\n\t\t\t\t['render', () => this.layout()],\n\t\t\t\t['menu.select', (e: MenuEvent) => {\n\t\t\t\t\tthis.close();\n\t\t\t\t\tthis.dispatchEvent(new MenuEvent('select', e.item));\n\t\t\t\t}]\n\t\t\t]\n\t\t});\n\t\tthis.dropdown.appendChild(this._menu);\n\t\treturn this._menu;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('dropdown.beforeOpen', () => this.menu);\n\t\tthis.addEventListener('dropdown.open', () => {\n\t\t\tthis.menu.focus();\n\t\t\tsetTimeout(() => this.layout(), 0);\n\t\t});\n\t}\n\n\tupdated(props: Map<string, unknown>) {\n\t\tsuper.updated(props);\n\t\tif (this._menu) {\n\t\t\tthis._menu.dynamicWidth = this.dynamicWidth;\n\t\t\tthis._menu.items = this.items;\n\t\t}\n\t}\n\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/core",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.17",
|
|
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.
|
|
39
|
+
"@omegagrid/localize": "^0.10.17",
|
|
40
40
|
"color": "^4.2.3",
|
|
41
41
|
"date-fns": "^3.2.0",
|
|
42
42
|
"lit": "^3.1.1",
|