@carbon/storybook-addon-theme 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -148,3 +148,12 @@ $feature-flags: (
148
148
  );
149
149
  }
150
150
  ```
151
+
152
+ ## <picture><source height="20" width="20" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-dark.svg"><source height="20" width="20" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"><img height="20" width="20" alt="IBM Telemetry" src="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"></picture> IBM Telemetry
153
+
154
+ This package uses IBM Telemetry to collect de-identified and anonymized metrics
155
+ data. By installing this package as a dependency you are agreeing to telemetry
156
+ collection. To opt out, see
157
+ [Opting out of IBM Telemetry data collection](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection).
158
+ For more information on the data being collected, please see the
159
+ [IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics).
package/dist/Panel.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","names":["_react","_interopRequireDefault","require","_managerApi","_components","_constants","_PanelContent","obj","__esModule","default","Panel","props","globals","updateGlobals","useGlobals","globalCarbonTheme","PARAM_KEY","createElement","AddonPanel","PanelContent","theme","onChange","value","exports"],"sources":["../src/Panel.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { useGlobals } from '@storybook/manager-api';\n\nimport { AddonPanel } from '@storybook/components';\nimport { PARAM_KEY } from './constants';\nimport { PanelContent } from './components/PanelContent';\n\nexport const Panel = (props) => {\n const [globals, updateGlobals] = useGlobals();\n const globalCarbonTheme = globals[PARAM_KEY];\n\n return (\n <AddonPanel {...props}>\n <PanelContent\n theme={globalCarbonTheme}\n onChange={(value) => {\n updateGlobals({ [PARAM_KEY]: value });\n }}\n />\n </AddonPanel>\n );\n};\n"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAAyD,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAXzD;AACA;AACA;AACA;AACA;AACA;;AAQO,MAAMG,KAAK,GAAIC,KAAK,IAAK;EAC9B,MAAM,CAACC,OAAO,EAAEC,aAAa,CAAC,GAAG,IAAAC,sBAAU,EAAC,CAAC;EAC7C,MAAMC,iBAAiB,GAAGH,OAAO,CAACI,oBAAS,CAAC;EAE5C,oBACEhB,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,UAAU,EAAKP,KAAK,eACnBX,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACX,aAAA,CAAAa,YAAY;IACXC,KAAK,EAAEL,iBAAkB;IACzBM,QAAQ,EAAGC,KAAK,IAAK;MACnBT,aAAa,CAAC;QAAE,CAACG,oBAAS,GAAGM;MAAM,CAAC,CAAC;IACvC;EAAE,CACH,CACS,CAAC;AAEjB,CAAC;AAACC,OAAA,CAAAb,KAAA,GAAAA,KAAA"}
1
+ {"version":3,"file":"Panel.js","names":["_react","_interopRequireDefault","require","_managerApi","_components","_constants","_PanelContent","obj","__esModule","default","Panel","props","globals","updateGlobals","useGlobals","globalCarbonTheme","PARAM_KEY","createElement","AddonPanel","PanelContent","theme","onChange","value","exports"],"sources":["../src/Panel.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { useGlobals } from '@storybook/manager-api';\n\nimport { AddonPanel } from '@storybook/components';\nimport { PARAM_KEY } from './constants';\nimport { PanelContent } from './components/PanelContent';\n\nexport const Panel = (props) => {\n const [globals, updateGlobals] = useGlobals();\n const globalCarbonTheme = globals[PARAM_KEY];\n\n return (\n <AddonPanel {...props}>\n <PanelContent\n theme={globalCarbonTheme}\n onChange={(value) => {\n updateGlobals({ [PARAM_KEY]: value });\n }}\n />\n </AddonPanel>\n );\n};\n"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAAyD,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAXzD;AACA;AACA;AACA;AACA;AACA;;AAQO,MAAMG,KAAK,GAAIC,KAAK,IAAK;EAC9B,MAAM,CAACC,OAAO,EAAEC,aAAa,CAAC,GAAG,IAAAC,sBAAU,EAAC,CAAC;EAC7C,MAAMC,iBAAiB,GAAGH,OAAO,CAACI,oBAAS,CAAC;EAE5C,oBACEhB,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,UAAU,EAAKP,KAAK,eACnBX,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACX,aAAA,CAAAa,YAAY;IACXC,KAAK,EAAEL,iBAAkB;IACzBM,QAAQ,EAAGC,KAAK,IAAK;MACnBT,aAAa,CAAC;QAAE,CAACG,oBAAS,GAAGM;MAAM,CAAC,CAAC;IACvC;EAAE,CACH,CACS,CAAC;AAEjB,CAAC;AAACC,OAAA,CAAAb,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PanelContent.js","names":["_react","_interopRequireDefault","require","_components","_propTypes","_constants","obj","__esModule","default","PanelContent","theme","onChange","themes","Object","values","CARBON_THEMES","createElement","Form","Field","label","Select","name","value","ev","target","size","map","option","key","exports","propTypes","PropTypes","func","string"],"sources":["../../src/components/PanelContent.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { Form } from '@storybook/components';\nimport PropTypes from 'prop-types';\nimport { CARBON_THEMES } from '../constants';\n\nexport const PanelContent = ({ theme, onChange }) => {\n const themes = Object.values(CARBON_THEMES);\n\n return (\n <div>\n <Form>\n <Form.Field label=\"Select Carbon theme:\">\n <Form.Select\n name=\"carbon-theme\"\n value={theme}\n onChange={(ev) => {\n onChange && onChange(ev.target.value);\n }}\n size=\"flex\"\n >\n {themes.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </Form.Select>\n </Form.Field>\n </Form>\n </div>\n );\n};\n\nPanelContent.propTypes = {\n onChange: PropTypes.func,\n theme: PropTypes.string,\n};\n"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA6C,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAT7C;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAMG,YAAY,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAS,CAAC,KAAK;EACnD,MAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACC,wBAAa,CAAC;EAE3C,oBACEf,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,2BACEhB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,qBACHjB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,CAACC,KAAK;IAACC,KAAK,EAAC;EAAsB,gBACtCnB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,CAACG,MAAM;IACVC,IAAI,EAAC,cAAc;IACnBC,KAAK,EAAEZ,KAAM;IACbC,QAAQ,EAAGY,EAAE,IAAK;MAChBZ,QAAQ,IAAIA,QAAQ,CAACY,EAAE,CAACC,MAAM,CAACF,KAAK,CAAC;IACvC,CAAE;IACFG,IAAI,EAAC;EAAM,GAEVb,MAAM,CAACc,GAAG,CAAEC,MAAM,iBACjB3B,MAAA,CAAAQ,OAAA,CAAAQ,aAAA;IAAQY,GAAG,EAAED,MAAO;IAACL,KAAK,EAAEK;EAAO,GAChCA,MACK,CACT,CACU,CACH,CACR,CACH,CAAC;AAEV,CAAC;AAACE,OAAA,CAAApB,YAAA,GAAAA,YAAA;AAEFA,YAAY,CAACqB,SAAS,GAAG;EACvBnB,QAAQ,EAAEoB,kBAAS,CAACC,IAAI;EACxBtB,KAAK,EAAEqB,kBAAS,CAACE;AACnB,CAAC"}
1
+ {"version":3,"file":"PanelContent.js","names":["_react","_interopRequireDefault","require","_components","_propTypes","_constants","obj","__esModule","default","PanelContent","theme","onChange","themes","Object","values","CARBON_THEMES","createElement","Form","Field","label","Select","name","value","ev","target","size","map","option","key","exports","propTypes","PropTypes","func","string"],"sources":["../../src/components/PanelContent.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { Form } from '@storybook/components';\nimport PropTypes from 'prop-types';\nimport { CARBON_THEMES } from '../constants';\n\nexport const PanelContent = ({ theme, onChange }) => {\n const themes = Object.values(CARBON_THEMES);\n\n return (\n <div>\n <Form>\n <Form.Field label=\"Select Carbon theme:\">\n <Form.Select\n name=\"carbon-theme\"\n value={theme}\n onChange={(ev) => {\n onChange && onChange(ev.target.value);\n }}\n size=\"flex\"\n >\n {themes.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </Form.Select>\n </Form.Field>\n </Form>\n </div>\n );\n};\n\nPanelContent.propTypes = {\n onChange: PropTypes.func,\n theme: PropTypes.string,\n};\n"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA6C,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAT7C;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAMG,YAAY,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAS,CAAC,KAAK;EACnD,MAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACC,wBAAa,CAAC;EAE3C,oBACEf,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,2BACEhB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,qBACHjB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,CAACC,KAAK;IAACC,KAAK,EAAC;EAAsB,gBACtCnB,MAAA,CAAAQ,OAAA,CAAAQ,aAAA,CAACb,WAAA,CAAAc,IAAI,CAACG,MAAM;IACVC,IAAI,EAAC,cAAc;IACnBC,KAAK,EAAEZ,KAAM;IACbC,QAAQ,EAAGY,EAAE,IAAK;MAChBZ,QAAQ,IAAIA,QAAQ,CAACY,EAAE,CAACC,MAAM,CAACF,KAAK,CAAC;IACvC,CAAE;IACFG,IAAI,EAAC;EAAM,GAEVb,MAAM,CAACc,GAAG,CAAEC,MAAM,iBACjB3B,MAAA,CAAAQ,OAAA,CAAAQ,aAAA;IAAQY,GAAG,EAAED,MAAO;IAACL,KAAK,EAAEK;EAAO,GAChCA,MACK,CACT,CACU,CACH,CACR,CACH,CAAC;AAEV,CAAC;AAACE,OAAA,CAAApB,YAAA,GAAAA,YAAA;AAEFA,YAAY,CAACqB,SAAS,GAAG;EACvBnB,QAAQ,EAAEoB,kBAAS,CAACC,IAAI;EACxBtB,KAAK,EAAEqB,kBAAS,CAACE;AACnB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":["ADDON_ID","exports","PANEL_ID","TOOL_ID","PARAM_KEY","CARBON_THEMES","white","g10","g90","g100"],"sources":["../src/constants.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport const ADDON_ID = '@carbon/theme';\nexport const PANEL_ID = `${ADDON_ID}/panel`;\nexport const TOOL_ID = `${ADDON_ID}/tool`;\nexport const PARAM_KEY = 'carbonTheme';\nexport const CARBON_THEMES = {\n white: 'white',\n g10: 'g10',\n g90: 'g90',\n g100: 'g100',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,eAAe;AAChC,MAAME,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAAI,GAAEF,QAAS,QAAO;AACpC,MAAMG,OAAO,GAAAF,OAAA,CAAAE,OAAA,GAAI,GAAEH,QAAS,OAAM;AAClC,MAAMI,SAAS,GAAAH,OAAA,CAAAG,SAAA,GAAG,aAAa;AAC/B,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAAG;EAC3BC,KAAK,EAAE,OAAO;EACdC,GAAG,EAAE,KAAK;EACVC,GAAG,EAAE,KAAK;EACVC,IAAI,EAAE;AACR,CAAC"}
1
+ {"version":3,"file":"constants.js","names":["ADDON_ID","exports","PANEL_ID","TOOL_ID","PARAM_KEY","CARBON_THEMES","white","g10","g90","g100"],"sources":["../src/constants.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport const ADDON_ID = '@carbon/theme';\nexport const PANEL_ID = `${ADDON_ID}/panel`;\nexport const TOOL_ID = `${ADDON_ID}/tool`;\nexport const PARAM_KEY = 'carbonTheme';\nexport const CARBON_THEMES = {\n white: 'white',\n g10: 'g10',\n g90: 'g90',\n g100: 'g100',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,eAAe;AAChC,MAAME,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAAI,GAAEF,QAAS,QAAO;AACpC,MAAMG,OAAO,GAAAF,OAAA,CAAAE,OAAA,GAAI,GAAEH,QAAS,OAAM;AAClC,MAAMI,SAAS,GAAAH,OAAA,CAAAG,SAAA,GAAG,aAAa;AAC/B,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAAG;EAC3BC,KAAK,EAAE,OAAO;EACdC,GAAG,EAAE,KAAK;EACVC,GAAG,EAAE,KAAK;EACVC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"withCarbonTheme.js","names":["_previewApi","require","_constants","withCarbonTheme","StoryFn","context","globals","parameters","globalCarbonTheme","PARAM_KEY","storyCarbonTheme","useEffect","selector","viewMode","rootElements","document","querySelectorAll","forEach","rootElement","setAttribute","id","exports"],"sources":["../../src/decorators/withCarbonTheme.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { useEffect } from '@storybook/preview-api';\nimport { PARAM_KEY } from '../constants';\n\nexport const withCarbonTheme = (StoryFn, context) => {\n const { globals, parameters } = context;\n\n const globalCarbonTheme = globals[PARAM_KEY];\n const storyCarbonTheme = parameters[PARAM_KEY];\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const selector =\n context.viewMode === 'docs'\n ? `.sbdocs-preview .docs-story`\n : '.sb-show-main';\n\n const rootElements = document.querySelectorAll(selector);\n rootElements.forEach((rootElement) => {\n rootElement.setAttribute(\n 'storybook-carbon-theme',\n globalCarbonTheme ?? storyCarbonTheme\n );\n });\n }, [context.id, context.viewMode, globalCarbonTheme, storyCarbonTheme]);\n\n return StoryFn();\n};\n"],"mappings":";;;;;;AAMA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAME,eAAe,GAAGA,CAACC,OAAO,EAAEC,OAAO,KAAK;EACnD,MAAM;IAAEC,OAAO;IAAEC;EAAW,CAAC,GAAGF,OAAO;EAEvC,MAAMG,iBAAiB,GAAGF,OAAO,CAACG,oBAAS,CAAC;EAC5C,MAAMC,gBAAgB,GAAGH,UAAU,CAACE,oBAAS,CAAC;;EAE9C;EACA,IAAAE,qBAAS,EAAC,MAAM;IACd,MAAMC,QAAQ,GACZP,OAAO,CAACQ,QAAQ,KAAK,MAAM,GACtB,6BAA4B,GAC7B,eAAe;IAErB,MAAMC,YAAY,GAAGC,QAAQ,CAACC,gBAAgB,CAACJ,QAAQ,CAAC;IACxDE,YAAY,CAACG,OAAO,CAAEC,WAAW,IAAK;MACpCA,WAAW,CAACC,YAAY,CACtB,wBAAwB,EACxBX,iBAAiB,IAAIE,gBACvB,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,EAAE,CAACL,OAAO,CAACe,EAAE,EAAEf,OAAO,CAACQ,QAAQ,EAAEL,iBAAiB,EAAEE,gBAAgB,CAAC,CAAC;EAEvE,OAAON,OAAO,CAAC,CAAC;AAClB,CAAC;AAACiB,OAAA,CAAAlB,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"withCarbonTheme.js","names":["_previewApi","require","_constants","withCarbonTheme","StoryFn","context","globals","parameters","globalCarbonTheme","PARAM_KEY","storyCarbonTheme","useEffect","selector","viewMode","rootElements","document","querySelectorAll","forEach","rootElement","setAttribute","id","exports"],"sources":["../../src/decorators/withCarbonTheme.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { useEffect } from '@storybook/preview-api';\nimport { PARAM_KEY } from '../constants';\n\nexport const withCarbonTheme = (StoryFn, context) => {\n const { globals, parameters } = context;\n\n const globalCarbonTheme = globals[PARAM_KEY];\n const storyCarbonTheme = parameters[PARAM_KEY];\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const selector =\n context.viewMode === 'docs'\n ? `.sbdocs-preview .docs-story`\n : '.sb-show-main';\n\n const rootElements = document.querySelectorAll(selector);\n rootElements.forEach((rootElement) => {\n rootElement.setAttribute(\n 'storybook-carbon-theme',\n globalCarbonTheme ?? storyCarbonTheme\n );\n });\n }, [context.id, context.viewMode, globalCarbonTheme, storyCarbonTheme]);\n\n return StoryFn();\n};\n"],"mappings":";;;;;;AAMA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAME,eAAe,GAAGA,CAACC,OAAO,EAAEC,OAAO,KAAK;EACnD,MAAM;IAAEC,OAAO;IAAEC;EAAW,CAAC,GAAGF,OAAO;EAEvC,MAAMG,iBAAiB,GAAGF,OAAO,CAACG,oBAAS,CAAC;EAC5C,MAAMC,gBAAgB,GAAGH,UAAU,CAACE,oBAAS,CAAC;;EAE9C;EACA,IAAAE,qBAAS,EAAC,MAAM;IACd,MAAMC,QAAQ,GACZP,OAAO,CAACQ,QAAQ,KAAK,MAAM,GACtB,6BAA4B,GAC7B,eAAe;IAErB,MAAMC,YAAY,GAAGC,QAAQ,CAACC,gBAAgB,CAACJ,QAAQ,CAAC;IACxDE,YAAY,CAACG,OAAO,CAAEC,WAAW,IAAK;MACpCA,WAAW,CAACC,YAAY,CACtB,wBAAwB,EACxBX,iBAAiB,IAAIE,gBACvB,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,EAAE,CAACL,OAAO,CAACe,EAAE,EAAEf,OAAO,CAACQ,QAAQ,EAAEL,iBAAiB,EAAEE,gBAAgB,CAAC,CAAC;EAEvE,OAAON,OAAO,CAAC,CAAC;AAClB,CAAC;AAACiB,OAAA,CAAAlB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"manager.js","names":["_managerApi","require","_Panel","ADDON_ID","PANEL_ID","addons","register","add","type","types","PANEL","title","render","Panel"],"sources":["../src/manager.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { addons, types } from '@storybook/manager-api';\n\nimport { Panel } from './Panel';\n\nconst ADDON_ID = 'carbonTheme';\nconst PANEL_ID = `${ADDON_ID}/panel`;\n\naddons.register(ADDON_ID, () => {\n addons.add(PANEL_ID, {\n type: types.PANEL,\n title: 'Carbon Theme',\n render: Panel,\n });\n});\n"],"mappings":";;AAMA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAME,QAAQ,GAAG,aAAa;AAC9B,MAAMC,QAAQ,GAAI,GAAED,QAAS,QAAO;AAEpCE,kBAAM,CAACC,QAAQ,CAACH,QAAQ,EAAE,MAAM;EAC9BE,kBAAM,CAACE,GAAG,CAACH,QAAQ,EAAE;IACnBI,IAAI,EAAEC,iBAAK,CAACC,KAAK;IACjBC,KAAK,EAAE,cAAc;IACrBC,MAAM,EAAEC;EACV,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"manager.js","names":["_managerApi","require","_Panel","ADDON_ID","PANEL_ID","addons","register","add","type","types","PANEL","title","render","Panel"],"sources":["../src/manager.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { addons, types } from '@storybook/manager-api';\n\nimport { Panel } from './Panel';\n\nconst ADDON_ID = 'carbonTheme';\nconst PANEL_ID = `${ADDON_ID}/panel`;\n\naddons.register(ADDON_ID, () => {\n addons.add(PANEL_ID, {\n type: types.PANEL,\n title: 'Carbon Theme',\n render: Panel,\n });\n});\n"],"mappings":";;AAMA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAME,QAAQ,GAAG,aAAa;AAC9B,MAAMC,QAAQ,GAAI,GAAED,QAAS,QAAO;AAEpCE,kBAAM,CAACC,QAAQ,CAACH,QAAQ,EAAE,MAAM;EAC9BE,kBAAM,CAACE,GAAG,CAACH,QAAQ,EAAE;IACnBI,IAAI,EAAEC,iBAAK,CAACC,KAAK;IACjBC,KAAK,EAAE,cAAc;IACrBC,MAAM,EAAEC;EACV,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"preset.js","names":["managerEntries","entry","require","resolve","_default","exports","default"],"sources":["../src/preset.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction managerEntries(entry = []) {\n return [...entry, require.resolve('./manager')]; //👈 Addon implementation\n}\n\nexport default { managerEntries };\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,cAAcA,CAACC,KAAK,GAAG,EAAE,EAAE;EAClC,OAAO,CAAC,GAAGA,KAAK,EAAEC,OAAO,CAACC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACnD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc;EAAEN;AAAe,CAAC"}
1
+ {"version":3,"file":"preset.js","names":["managerEntries","entry","require","resolve","_default","exports","default"],"sources":["../src/preset.js"],"sourcesContent":["/**\n * Copyright IBM Corp. 2023, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction managerEntries(entry = []) {\n return [...entry, require.resolve('./manager')]; //👈 Addon implementation\n}\n\nexport default { managerEntries };\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,cAAcA,CAACC,KAAK,GAAG,EAAE,EAAE;EAClC,OAAO,CAAC,GAAGA,KAAK,EAAEC,OAAO,CAACC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACnD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc;EAAEN;AAAe,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/storybook-addon-theme",
3
3
  "description": "Carbon theme switcher for Storybook",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/react.js",
7
7
  "repository": {
@@ -64,5 +64,5 @@
64
64
  "npm-run-all": "^4.1.5",
65
65
  "rimraf": "^5.0.5"
66
66
  },
67
- "gitHead": "b1783b0aa7a0fbfbc120c3b47ecfb6855983a37d"
67
+ "gitHead": "635be50b8af9c396162a3e4b48f947b17408e466"
68
68
  }
package/telemetry.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  # yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json
2
2
  version: 1
3
3
  projectId: '55e814ff-85db-406f-9e37-2d0c92a753b0'
4
- endpoint: 'https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics'
4
+ endpoint: 'https://www-api.ibm.com/ibm-telemetry/v1/metrics'
5
5
  collect:
6
6
  npm:
7
7
  dependencies: null