@omicronenergy/oscd-ui 0.1.1 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"icon-overrides.js","sourceRoot":"","sources":["../../../../utils/storybook/story-overrides/icon-overrides.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,WAAW,EAAE;QACX,QAAQ,EAAE;YACR,WAAW,EAAE;gBACX,IAAI,EAAE,oBAAoB;gBAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzB,WAAW,EAAE,sCAAsC;aACpD;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,MAAM;SACpB;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,IAAI,CAAC,EAAE;gBACb,MAAM,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAAW,WAAW,CAAC,CAAC;gBAChE,OAAO,QAAQ,CACb,IAAI,EACJ,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,SAAS,CAC3D,CAAC;YACJ,CAAC;SACF;KACF;CACF,CAAC","sourcesContent":["import { StorybookOverrides } from './story-overrides.js';\n\nimport { html } from 'lit';\nimport { getStorybookHelpers } from '../getStorybookHelpers.js';\nimport { OscdIcon } from '@/icon/oscd-icon.js';\n\nexport const iconOverrides: StorybookOverrides = {\n 'oscd-icon': {\n argTypes: {\n textContent: {\n name: 'Material Icon Name',\n control: { type: 'text' },\n description: 'Name of the Material icon to display',\n },\n },\n args: {\n textContent: 'edit',\n },\n meta: {\n render: args => {\n const { template } = getStorybookHelpers<OscdIcon>('oscd-icon');\n return template(\n args,\n args.textContent ? html` ${args.textContent} ` : undefined,\n );\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"icon-overrides.js","sourceRoot":"","sources":["../../../../utils/storybook/story-overrides/icon-overrides.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,qBAAqB,CAAC;AAE7B,MAAM,cAAc,GAAG;IACrB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,SAAS;IACT,WAAW;IACX,OAAO;IACP,SAAS;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,WAAW,EAAE;QACX,QAAQ,EAAE;YACR,WAAW,EAAE;gBACX,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzB,WAAW,EACT,6DAA6D;aAChE;YACD,gBAAgB,EAAE;gBAChB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;gBAC5C,WAAW,EACT,4DAA4D;gBAC9D,KAAK,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE;aACrC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC3B,OAAO,EAAE,CAAC,SAAS,EAAE,GAAG,cAAc,CAAC;gBACvC,WAAW,EACT,sEAAsE;gBACxE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;aAC9B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC3B,OAAO,EAAE,CAAC,aAAa,EAAE,GAAG,cAAc,CAAC;gBAC3C,WAAW,EAAE,mDAAmD;gBAChE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;aAC9B;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,MAAM;YACnB,gBAAgB,EAAE,EAAE;YACpB,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,OAAO;SACpB;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,IAAI,CAAC,EAAE;gBACb,OAAO,IAAI,CAAA;;oBAEC,QAAQ,CAAC;oBACf,OAAO,EAAE,MAAM;oBACf,OAAO,EAAE,aAAa;oBACtB,eAAe,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;wBACvD,CAAC,CAAC,oBAAoB,IAAI,CAAC,UAAU,GAAG;wBACxC,CAAC,CAAC,aAAa;iBAClB,CAAC;;;sBAGQ,QAAQ,CAAC;oBACf,gBAAgB,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI;oBAC/C,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;wBACxC,CAAC,CAAC,oBAAoB,IAAI,CAAC,KAAK,GAAG;wBACnC,CAAC,CAAC,SAAS;iBACd,CAAC;iBACC,IAAI,CAAC,WAAW;;;SAGxB,CAAC;YACJ,CAAC;SACF;KACF;CACF,CAAC","sourcesContent":["import { StorybookOverrides } from './story-overrides.js';\n\nimport { html } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport '@/icon/oscd-icon.js';\n\nconst paletteOptions = [\n 'base03',\n 'base02',\n 'base01',\n 'base00',\n 'base0',\n 'base1',\n 'base2',\n 'base3',\n 'primary',\n 'secondary',\n 'error',\n 'warning',\n];\n\nexport const iconOverrides: StorybookOverrides = {\n 'oscd-icon': {\n argTypes: {\n textContent: {\n name: 'Icon name',\n control: { type: 'text' },\n description:\n 'Material Symbols name or an SCL icon name such as gooseIcon',\n },\n '--md-icon-size': {\n control: { type: 'number', min: 1, step: 1 },\n description:\n 'Icon size in pixels, including automatically rendered SVGs',\n table: { category: 'CSS Variables' },\n },\n color: {\n name: 'Foreground',\n control: { type: 'select' },\n options: ['inherit', ...paletteOptions],\n description:\n 'Palette slot used for the icon foreground, or inherit its text color',\n table: { category: 'Styles' },\n },\n background: {\n name: 'Background',\n control: { type: 'select' },\n options: ['transparent', ...paletteOptions],\n description: 'Palette slot used for the icon preview background',\n table: { category: 'Styles' },\n },\n },\n args: {\n textContent: 'edit',\n '--md-icon-size': 24,\n color: 'primary',\n background: 'base3',\n },\n meta: {\n render: args => {\n return html`\n <div\n style=${styleMap({\n padding: '16px',\n display: 'inline-flex',\n backgroundColor: paletteOptions.includes(args.background)\n ? `var(--oscd-theme-${args.background})`\n : 'transparent',\n })}\n >\n <oscd-icon\n style=${styleMap({\n '--md-icon-size': `${args['--md-icon-size']}px`,\n color: paletteOptions.includes(args.color)\n ? `var(--oscd-theme-${args.color})`\n : 'inherit',\n })}\n >${args.textContent}</oscd-icon\n >\n </div>\n `;\n },\n },\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omicronenergy/oscd-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "UI Web Components set for OpenSCD",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -195,7 +195,7 @@
195
195
  "./tree-grid/oscd-tree-grid.js": "./dist/tree-grid/oscd-tree-grid.js"
196
196
  },
197
197
  "dependencies": {
198
- "@omicronenergy/oscd-material-web-base": "^2.4.2",
198
+ "@omicronenergy/oscd-material-web-base": "^2.5.1",
199
199
  "@open-wc/scoped-elements": "^3.0.6",
200
200
  "@openscd/oscd-api": "^0.1.6",
201
201
  "@webcomponents/scoped-custom-element-registry": "^0.0.10",