trepur_components 2.3.4 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/archive/theme.ts +1 -1
  2. package/lib/components/Accordion/index.d.ts +1 -2
  3. package/lib/components/Accordion/index.js +8 -8
  4. package/lib/components/AlertBar/index.d.ts +1 -2
  5. package/lib/components/AlertBar/index.js +13 -13
  6. package/lib/components/index.d.ts +3 -3
  7. package/lib/index.js +4 -4
  8. package/lib/styles/{base.css → global.css} +1 -43
  9. package/lib/styles/themes/local.css +40 -0
  10. package/package.json +1 -1
  11. package/postcss.config.js +8 -0
  12. package/src/components/Accordion/Accordion.stories.tsx +1 -1
  13. package/src/components/Accordion/index.tsx +1 -3
  14. package/src/components/AlertBar/AlertBar.stories.tsx +1 -1
  15. package/src/components/AlertBar/index.tsx +2 -4
  16. package/src/components/index.ts +5 -5
  17. package/src/styles/{base.css → global.css} +1 -43
  18. package/src/styles/themes/local.css +40 -0
  19. package/tsconfig.json +1 -1
  20. package/storybook-build/assets/Accordion.stories-Cn994N1H.js +0 -103
  21. package/storybook-build/assets/AlertBar.stories-BkzNXFBh.js +0 -202
  22. package/storybook-build/assets/Avatar.stories-CpH6xVwM.js +0 -418
  23. package/storybook-build/assets/Color-6VNJS4EI-DQV2onvt.js +0 -1378
  24. package/storybook-build/assets/Colours-r29qjFlW.js +0 -324
  25. package/storybook-build/assets/DocsRenderer-NNNQARDV-OgWasCIs.js +0 -44
  26. package/storybook-build/assets/Introduction-Bs1PgnBZ.js +0 -40
  27. package/storybook-build/assets/WithTooltip-V3YHNWJZ-vi2V5TOO.js +0 -15
  28. package/storybook-build/assets/_commonjsHelpers-LQfde5yM.js +0 -35
  29. package/storybook-build/assets/axe-DnFZVv9V.js +0 -32561
  30. package/storybook-build/assets/chunk-EIRT5I3Z-DFD8udmD.js +0 -480
  31. package/storybook-build/assets/context-CIRBAiUz.js +0 -20
  32. package/storybook-build/assets/controls-DJSGrQKd.js +0 -23
  33. package/storybook-build/assets/entry-preview-DmlPV4-3.js +0 -41
  34. package/storybook-build/assets/entry-preview-docs-D46Drugi.js +0 -11861
  35. package/storybook-build/assets/formatter-SWP5E3XI-BWIasvKP.js +0 -14427
  36. package/storybook-build/assets/iframe-Dzzzanqi.js +0 -144
  37. package/storybook-build/assets/index-0FT4HXk-.js +0 -7222
  38. package/storybook-build/assets/index-B9Tccxv4.js +0 -107
  39. package/storybook-build/assets/index-BdOSk9or.js +0 -41
  40. package/storybook-build/assets/index-CU7cYjZD.js +0 -9604
  41. package/storybook-build/assets/index-Clz-aGG3.js +0 -39
  42. package/storybook-build/assets/index-CpyNLP69.js +0 -63
  43. package/storybook-build/assets/index-DM9bPmif.js +0 -319
  44. package/storybook-build/assets/index-ex9_VrIg.js +0 -3734
  45. package/storybook-build/assets/jsx-runtime-D2-sc1j1.js +0 -35
  46. package/storybook-build/assets/preview-3kSipVgK.js +0 -430
  47. package/storybook-build/assets/preview-B4rAxPmB.js +0 -27
  48. package/storybook-build/assets/preview-BMkwWyrh.js +0 -2920
  49. package/storybook-build/assets/preview-BeQelhbu.js +0 -204
  50. package/storybook-build/assets/preview-BiG-rflf.js +0 -2444
  51. package/storybook-build/assets/preview-BiYUJ7TP.js +0 -22
  52. package/storybook-build/assets/preview-C4ItOQzM.js +0 -34
  53. package/storybook-build/assets/preview-CWyhKACi.css +0 -886
  54. package/storybook-build/assets/preview-CtOV68TG.js +0 -10
  55. package/storybook-build/assets/preview-De9E9xaR.js +0 -140
  56. package/storybook-build/assets/preview-bL4x2zrN.js +0 -99
  57. package/storybook-build/assets/preview-gxqyGMHu.js +0 -323
  58. package/storybook-build/assets/react-18-B-gfo82w.js +0 -29
  59. package/storybook-build/assets/syntaxhighlighter-B5GMVT5T-DrY_Dc6-.js +0 -15
  60. package/storybook-build/favicon.svg +0 -7
  61. package/storybook-build/iframe.html +0 -458
  62. package/storybook-build/index.html +0 -163
  63. package/storybook-build/index.json +0 -1
  64. package/storybook-build/preview-stats.json +0 -172
  65. package/storybook-build/project.json +0 -1
  66. package/storybook-build/sb-addons/a11y-9/manager-bundle.js +0 -3
  67. package/storybook-build/sb-addons/a11y-9/manager-bundle.js.LEGAL.txt +0 -0
  68. package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  69. package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  70. package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  71. package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  72. package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js +0 -63
  73. package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -18
  74. package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  75. package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  76. package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  77. package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  78. package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  79. package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  80. package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  81. package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  82. package/storybook-build/sb-addons/interactions-8/manager-bundle.js +0 -12
  83. package/storybook-build/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
  84. package/storybook-build/sb-addons/links-0/manager-bundle.js +0 -3
  85. package/storybook-build/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
  86. package/storybook-build/sb-addons/storybook-12/manager-bundle.js +0 -151
  87. package/storybook-build/sb-addons/storybook-12/manager-bundle.js.LEGAL.txt +0 -0
  88. package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js +0 -3
  89. package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js.LEGAL.txt +0 -0
  90. package/storybook-build/sb-addons/themes-10/register-bundle.js +0 -5
  91. package/storybook-build/sb-addons/themes-10/register-bundle.js.LEGAL.txt +0 -0
  92. package/storybook-build/sb-common-assets/fonts.css +0 -31
  93. package/storybook-build/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  94. package/storybook-build/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  95. package/storybook-build/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  96. package/storybook-build/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  97. package/storybook-build/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js +0 -1
  98. package/storybook-build/sb-manager/chunk-4IYAVH3S.js +0 -348
  99. package/storybook-build/sb-manager/chunk-CXYKRFSY.js +0 -9
  100. package/storybook-build/sb-manager/chunk-KZYAAUOR.js +0 -406
  101. package/storybook-build/sb-manager/chunk-LVLAH4SI.js +0 -7
  102. package/storybook-build/sb-manager/chunk-ZEU7PDD3.js +0 -1
  103. package/storybook-build/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +0 -156
  104. package/storybook-build/sb-manager/globals-module-info.js +0 -1
  105. package/storybook-build/sb-manager/globals.js +0 -1
  106. package/storybook-build/sb-manager/index.js +0 -1
  107. package/storybook-build/sb-manager/runtime.js +0 -1
  108. package/storybook-build/sb-manager/syntaxhighlighter-B5GMVT5T-EA5ASEYD.js +0 -1
  109. package/storybook-build/sb-preview/globals.js +0 -1
  110. package/storybook-build/sb-preview/runtime.js +0 -112
  111. package/storybook-build/src/components/Accordion/Accordion.stories.d.ts +0 -94
  112. package/storybook-build/src/components/Accordion/index.d.ts +0 -9
  113. package/storybook-build/src/components/AlertBar/AlertBar.stories.d.ts +0 -162
  114. package/storybook-build/src/components/AlertBar/index.d.ts +0 -13
  115. package/storybook-build/src/components/Avatar/Avatar.stories.d.ts +0 -44
  116. package/storybook-build/src/components/Avatar/index.d.ts +0 -4
  117. package/storybook-build/src/components/index.d.ts +0 -7
  118. package/storybook-build/src/index.d.ts +0 -1
  119. package/storybook-build/src/utils/controls.d.ts +0 -36
  120. package/storybook-build/src/utils/matchMedia.d.ts +0 -2
  121. package/storybook-build/src/utils/screens.d.ts +0 -7
  122. package/storybook-build/src/utils/theme.d.ts +0 -3
  123. package/storybook-build/stories.json +0 -1
  124. package/storybook-build/styles/base.css +0 -116
@@ -1,10 +0,0 @@
1
- const __vite__fileDeps=["./DocsRenderer-NNNQARDV-OgWasCIs.js","./iframe-Dzzzanqi.js","./index-DM9bPmif.js","./_commonjsHelpers-LQfde5yM.js","./react-18-B-gfo82w.js","./index-0FT4HXk-.js","./index-CU7cYjZD.js","./chunk-EIRT5I3Z-DFD8udmD.js","./index-B9Tccxv4.js","./index-ex9_VrIg.js","./index-BdOSk9or.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import { _ as __vitePreload } from "./iframe-Dzzzanqi.js";
3
- import "../sb-preview/runtime.js";
4
- var parameters = { docs: { renderer: async () => {
5
- let { DocsRenderer } = await __vitePreload(() => import("./DocsRenderer-NNNQARDV-OgWasCIs.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]) : void 0, import.meta.url);
6
- return new DocsRenderer();
7
- } } };
8
- export {
9
- parameters
10
- };
@@ -1,140 +0,0 @@
1
- import { d as dedent } from "./index-BdOSk9or.js";
2
- let getRandomValues;
3
- const rnds8 = new Uint8Array(16);
4
- function rng() {
5
- if (!getRandomValues) {
6
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
7
- if (!getRandomValues) {
8
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
9
- }
10
- }
11
- return getRandomValues(rnds8);
12
- }
13
- const byteToHex = [];
14
- for (let i = 0; i < 256; ++i) {
15
- byteToHex.push((i + 256).toString(16).slice(1));
16
- }
17
- function unsafeStringify(arr, offset = 0) {
18
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
19
- }
20
- const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
21
- const native = {
22
- randomUUID
23
- };
24
- function v4(options, buf, offset) {
25
- if (native.randomUUID && !buf && !options) {
26
- return native.randomUUID();
27
- }
28
- options = options || {};
29
- const rnds = options.random || (options.rng || rng)();
30
- rnds[6] = rnds[6] & 15 | 64;
31
- rnds[8] = rnds[8] & 63 | 128;
32
- return unsafeStringify(rnds);
33
- }
34
- var StorybookError = class extends Error {
35
- constructor() {
36
- super(...arguments);
37
- this.data = {};
38
- this.documentation = false;
39
- this.fromStorybook = true;
40
- }
41
- get fullErrorCode() {
42
- let paddedCode = String(this.code).padStart(4, "0");
43
- return `SB_${this.category}_${paddedCode}`;
44
- }
45
- get name() {
46
- let errorName = this.constructor.name;
47
- return `${this.fullErrorCode} (${errorName})`;
48
- }
49
- get message() {
50
- let page;
51
- return this.documentation === true ? page = `https://storybook.js.org/error/${this.fullErrorCode}` : typeof this.documentation == "string" ? page = this.documentation : Array.isArray(this.documentation) && (page = `
52
- ${this.documentation.map((doc) => ` - ${doc}`).join(`
53
- `)}`), `${this.template()}${page != null ? `
54
-
55
- More info: ${page}
56
- ` : ""}`;
57
- }
58
- };
59
- var Category = ((Category2) => (Category2.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", Category2.PREVIEW_CHANNELS = "PREVIEW_CHANNELS", Category2.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", Category2.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", Category2.PREVIEW_API = "PREVIEW_API", Category2.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", Category2.PREVIEW_ROUTER = "PREVIEW_ROUTER", Category2.PREVIEW_THEMING = "PREVIEW_THEMING", Category2.RENDERER_HTML = "RENDERER_HTML", Category2.RENDERER_PREACT = "RENDERER_PREACT", Category2.RENDERER_REACT = "RENDERER_REACT", Category2.RENDERER_SERVER = "RENDERER_SERVER", Category2.RENDERER_SVELTE = "RENDERER_SVELTE", Category2.RENDERER_VUE = "RENDERER_VUE", Category2.RENDERER_VUE3 = "RENDERER_VUE3", Category2.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS", Category2))(Category || {}), ImplicitActionsDuringRendering = class extends StorybookError {
60
- constructor(data) {
61
- super();
62
- this.data = data;
63
- this.category = "PREVIEW_API";
64
- this.code = 2;
65
- this.documentation = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function";
66
- }
67
- template() {
68
- return dedent`
69
- We detected that you use an implicit action arg during ${this.data.phase} of your story.
70
- ${this.data.deprecated ? `
71
- This is deprecated and won't work in Storybook 8 anymore.
72
- ` : ""}
73
- Please provide an explicit spy to your args like this:
74
- import { fn } from '@storybook/test';
75
- ...
76
- args: {
77
- ${this.data.name}: fn()
78
- }
79
- `;
80
- }
81
- };
82
- const { addons } = __STORYBOOK_MODULE_PREVIEW_API__;
83
- const { global } = __STORYBOOK_MODULE_GLOBAL__;
84
- var ADDON_ID = "storybook/actions", EVENT_ID = `${ADDON_ID}/action-event`;
85
- var config = { depth: 10, clearOnStoryChange: true, limit: 50 };
86
- var findProto = (obj, callback) => {
87
- let proto = Object.getPrototypeOf(obj);
88
- return !proto || callback(proto) ? proto : findProto(proto, callback);
89
- }, isReactSyntheticEvent = (e) => !!(typeof e == "object" && e && findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) && typeof e.persist == "function"), serializeArg = (a) => {
90
- if (isReactSyntheticEvent(a)) {
91
- let e = Object.create(a.constructor.prototype, Object.getOwnPropertyDescriptors(a));
92
- e.persist();
93
- let viewDescriptor = Object.getOwnPropertyDescriptor(e, "view"), view = viewDescriptor == null ? void 0 : viewDescriptor.value;
94
- return typeof view == "object" && (view == null ? void 0 : view.constructor.name) === "Window" && Object.defineProperty(e, "view", { ...viewDescriptor, value: Object.create(view.constructor.prototype) }), e;
95
- }
96
- return a;
97
- }, generateId = () => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? v4() : Date.now().toString(36) + Math.random().toString(36).substring(2);
98
- function action(name, options = {}) {
99
- let actionOptions = { ...config, ...options }, handler = function(...args) {
100
- var _a, _b;
101
- if (options.implicit) {
102
- let storyRenderer = (_a = "__STORYBOOK_PREVIEW__" in global ? global.__STORYBOOK_PREVIEW__ : void 0) == null ? void 0 : _a.storyRenders.find((render) => render.phase === "playing" || render.phase === "rendering");
103
- if (storyRenderer) {
104
- let deprecated = !((_b = window == null ? void 0 : window.FEATURES) == null ? void 0 : _b.disallowImplicitActionsInRenderV8), error = new ImplicitActionsDuringRendering({ phase: storyRenderer.phase, name, deprecated });
105
- if (deprecated)
106
- console.warn(error);
107
- else
108
- throw error;
109
- }
110
- }
111
- let channel = addons.getChannel(), id = generateId(), minDepth = 5, serializedArgs = args.map(serializeArg), normalizedArgs = args.length > 1 ? serializedArgs : serializedArgs[0], actionDisplayToEmit = { id, count: 0, data: { name, args: normalizedArgs }, options: { ...actionOptions, maxDepth: minDepth + (actionOptions.depth || 3), allowFunction: actionOptions.allowFunction || false } };
112
- channel.emit(EVENT_ID, actionDisplayToEmit);
113
- };
114
- return handler.isAction = true, handler;
115
- }
116
- var isInInitialArgs = (name, initialArgs) => typeof initialArgs[name] > "u" && !(name in initialArgs), inferActionsFromArgTypesRegex = (context) => {
117
- let { initialArgs, argTypes, id, parameters: { actions } } = context;
118
- if (!actions || actions.disable || !actions.argTypesRegex || !argTypes)
119
- return {};
120
- let argTypesRegex = new RegExp(actions.argTypesRegex);
121
- return Object.entries(argTypes).filter(([name]) => !!argTypesRegex.test(name)).reduce((acc, [name, argType]) => (isInInitialArgs(name, initialArgs) && (acc[name] = action(name, { implicit: true, id })), acc), {});
122
- }, addActionsFromArgTypes = (context) => {
123
- let { initialArgs, argTypes, parameters: { actions } } = context;
124
- return (actions == null ? void 0 : actions.disable) || !argTypes ? {} : Object.entries(argTypes).filter(([name, argType]) => !!argType.action).reduce((acc, [name, argType]) => (isInInitialArgs(name, initialArgs) && (acc[name] = action(typeof argType.action == "string" ? argType.action : name)), acc), {});
125
- };
126
- var argsEnhancers = [addActionsFromArgTypes, inferActionsFromArgTypesRegex];
127
- var attachActionsToFunctionMocks = (context) => {
128
- let { args, parameters: { actions } } = context;
129
- (actions == null ? void 0 : actions.disable) || Object.entries(args).filter(([, value]) => typeof value == "function" && "_isMockFunction" in value && value._isMockFunction).forEach(([key, value]) => {
130
- let previous = value.getMockImplementation();
131
- if ((previous == null ? void 0 : previous._actionAttached) !== true && (previous == null ? void 0 : previous.isAction) !== true) {
132
- let implementation = (...params) => (action(key)(...params), previous == null ? void 0 : previous(...params));
133
- implementation._actionAttached = true, value.mockImplementation(implementation);
134
- }
135
- });
136
- }, loaders = [attachActionsToFunctionMocks];
137
- export {
138
- argsEnhancers,
139
- loaders
140
- };
@@ -1,99 +0,0 @@
1
- import { d as dedent } from "./index-BdOSk9or.js";
2
- const { useMemo, useEffect } = __STORYBOOK_MODULE_PREVIEW_API__;
3
- const { global } = __STORYBOOK_MODULE_GLOBAL__;
4
- const { logger } = __STORYBOOK_MODULE_CLIENT_LOGGER__;
5
- var PARAM_KEY = "backgrounds";
6
- var { document, window } = global, isReduceMotionEnabled = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, getBackgroundColorByName = (currentSelectedValue, backgrounds = [], defaultName) => {
7
- if (currentSelectedValue === "transparent")
8
- return "transparent";
9
- if (backgrounds.find((background) => background.value === currentSelectedValue))
10
- return currentSelectedValue;
11
- let defaultBackground = backgrounds.find((background) => background.name === defaultName);
12
- if (defaultBackground)
13
- return defaultBackground.value;
14
- if (defaultName) {
15
- let availableColors = backgrounds.map((background) => background.name).join(", ");
16
- logger.warn(dedent`
17
- Backgrounds Addon: could not find the default color "${defaultName}".
18
- These are the available colors for your story based on your configuration:
19
- ${availableColors}.
20
- `);
21
- }
22
- return "transparent";
23
- }, clearStyles = (selector) => {
24
- (Array.isArray(selector) ? selector : [selector]).forEach(clearStyle);
25
- }, clearStyle = (selector) => {
26
- var _a;
27
- let element = document.getElementById(selector);
28
- element && ((_a = element.parentElement) == null ? void 0 : _a.removeChild(element));
29
- }, addGridStyle = (selector, css) => {
30
- let existingStyle = document.getElementById(selector);
31
- if (existingStyle)
32
- existingStyle.innerHTML !== css && (existingStyle.innerHTML = css);
33
- else {
34
- let style = document.createElement("style");
35
- style.setAttribute("id", selector), style.innerHTML = css, document.head.appendChild(style);
36
- }
37
- }, addBackgroundStyle = (selector, css, storyId) => {
38
- var _a;
39
- let existingStyle = document.getElementById(selector);
40
- if (existingStyle)
41
- existingStyle.innerHTML !== css && (existingStyle.innerHTML = css);
42
- else {
43
- let style = document.createElement("style");
44
- style.setAttribute("id", selector), style.innerHTML = css;
45
- let gridStyleSelector = `addon-backgrounds-grid${storyId ? `-docs-${storyId}` : ""}`, existingGridStyle = document.getElementById(gridStyleSelector);
46
- existingGridStyle ? (_a = existingGridStyle.parentElement) == null ? void 0 : _a.insertBefore(style, existingGridStyle) : document.head.appendChild(style);
47
- }
48
- };
49
- var withBackground = (StoryFn, context) => {
50
- var _a;
51
- let { globals: globals2, parameters: parameters2 } = context, globalsBackgroundColor = (_a = globals2[PARAM_KEY]) == null ? void 0 : _a.value, backgroundsConfig = parameters2[PARAM_KEY], selectedBackgroundColor = useMemo(() => backgroundsConfig.disable ? "transparent" : getBackgroundColorByName(globalsBackgroundColor, backgroundsConfig.values, backgroundsConfig.default), [backgroundsConfig, globalsBackgroundColor]), isActive = useMemo(() => selectedBackgroundColor && selectedBackgroundColor !== "transparent", [selectedBackgroundColor]), selector = context.viewMode === "docs" ? `#anchor--${context.id} .docs-story` : ".sb-show-main", backgroundStyles = useMemo(() => {
52
- let transitionStyle = "transition: background-color 0.3s;";
53
- return `
54
- ${selector} {
55
- background: ${selectedBackgroundColor} !important;
56
- ${isReduceMotionEnabled() ? "" : transitionStyle}
57
- }
58
- `;
59
- }, [selectedBackgroundColor, selector]);
60
- return useEffect(() => {
61
- let selectorId = context.viewMode === "docs" ? `addon-backgrounds-docs-${context.id}` : "addon-backgrounds-color";
62
- if (!isActive) {
63
- clearStyles(selectorId);
64
- return;
65
- }
66
- addBackgroundStyle(selectorId, backgroundStyles, context.viewMode === "docs" ? context.id : null);
67
- }, [isActive, backgroundStyles, context]), StoryFn();
68
- };
69
- var withGrid = (StoryFn, context) => {
70
- var _a;
71
- let { globals: globals2, parameters: parameters2 } = context, gridParameters = parameters2[PARAM_KEY].grid, isActive = ((_a = globals2[PARAM_KEY]) == null ? void 0 : _a.grid) === true && gridParameters.disable !== true, { cellAmount, cellSize, opacity } = gridParameters, isInDocs = context.viewMode === "docs", defaultOffset = parameters2.layout === void 0 || parameters2.layout === "padded" ? 16 : 0, offsetX = gridParameters.offsetX ?? (isInDocs ? 20 : defaultOffset), offsetY = gridParameters.offsetY ?? (isInDocs ? 20 : defaultOffset), gridStyles = useMemo(() => {
72
- let selector = context.viewMode === "docs" ? `#anchor--${context.id} .docs-story` : ".sb-show-main", backgroundSize = [`${cellSize * cellAmount}px ${cellSize * cellAmount}px`, `${cellSize * cellAmount}px ${cellSize * cellAmount}px`, `${cellSize}px ${cellSize}px`, `${cellSize}px ${cellSize}px`].join(", ");
73
- return `
74
- ${selector} {
75
- background-size: ${backgroundSize} !important;
76
- background-position: ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px !important;
77
- background-blend-mode: difference !important;
78
- background-image: linear-gradient(rgba(130, 130, 130, ${opacity}) 1px, transparent 1px),
79
- linear-gradient(90deg, rgba(130, 130, 130, ${opacity}) 1px, transparent 1px),
80
- linear-gradient(rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px),
81
- linear-gradient(90deg, rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px) !important;
82
- }
83
- `;
84
- }, [cellSize]);
85
- return useEffect(() => {
86
- let selectorId = context.viewMode === "docs" ? `addon-backgrounds-grid-docs-${context.id}` : "addon-backgrounds-grid";
87
- if (!isActive) {
88
- clearStyles(selectorId);
89
- return;
90
- }
91
- addGridStyle(selectorId, gridStyles);
92
- }, [isActive, gridStyles, context]), StoryFn();
93
- };
94
- var decorators = [withGrid, withBackground], parameters = { [PARAM_KEY]: { grid: { cellSize: 20, opacity: 0.5, cellAmount: 5 }, values: [{ name: "light", value: "#F8F8F8" }, { name: "dark", value: "#333333" }] } }, globals = { [PARAM_KEY]: null };
95
- export {
96
- decorators,
97
- globals,
98
- parameters
99
- };
@@ -1,323 +0,0 @@
1
- import { r as reactExports } from "./index-DM9bPmif.js";
2
- import { I as I18nContext } from "./context-CIRBAiUz.js";
3
- import "./_commonjsHelpers-LQfde5yM.js";
4
- const { useGlobals: useGlobals$1, useEffect: useEffect$1 } = __STORYBOOK_MODULE_PREVIEW_API__;
5
- var e = (r, o) => {
6
- let [c, n] = useGlobals$1();
7
- return useEffect$1(() => {
8
- let { parameters: { locale: t } } = o;
9
- t && n({ locale: t });
10
- }, []), r(o);
11
- };
12
- var l = { decorators: [e], globals: { locale: "", locales: {} } }, f = l;
13
- function I18nextProvider(_ref) {
14
- let {
15
- i18n,
16
- defaultNS,
17
- children
18
- } = _ref;
19
- const value = reactExports.useMemo(() => ({
20
- i18n,
21
- defaultNS
22
- }), [i18n, defaultNS]);
23
- return reactExports.createElement(I18nContext.Provider, {
24
- value
25
- }, children);
26
- }
27
- const { useGlobals, useState, useEffect } = __STORYBOOK_MODULE_PREVIEW_API__;
28
- var U = Object.create;
29
- var E = Object.defineProperty;
30
- var M = Object.getOwnPropertyDescriptor;
31
- var z = Object.getOwnPropertyNames;
32
- var B = Object.getPrototypeOf, H = Object.prototype.hasOwnProperty;
33
- var w = (e2, t) => () => (t || e2((t = { exports: {} }).exports, t), t.exports);
34
- var G = (e2, t, r, u) => {
35
- if (t && typeof t == "object" || typeof t == "function")
36
- for (let n of z(t))
37
- !H.call(e2, n) && n !== r && E(e2, n, { get: () => t[n], enumerable: !(u = M(t, n)) || u.enumerable });
38
- return e2;
39
- };
40
- var K = (e2, t, r) => (r = e2 != null ? U(B(e2)) : {}, G(!e2 || !e2.__esModule ? E(r, "default", { value: e2, enumerable: true }) : r, e2));
41
- var D = w((o) => {
42
- var y = Symbol.for("react.element"), W = Symbol.for("react.portal"), J = Symbol.for("react.fragment"), Q = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), X = Symbol.for("react.provider"), Z = Symbol.for("react.context"), ee = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), re = Symbol.for("react.memo"), ne = Symbol.for("react.lazy"), C = Symbol.iterator;
43
- function oe(e2) {
44
- return e2 === null || typeof e2 != "object" ? null : (e2 = C && e2[C] || e2["@@iterator"], typeof e2 == "function" ? e2 : null);
45
- }
46
- var x = { isMounted: function() {
47
- return false;
48
- }, enqueueForceUpdate: function() {
49
- }, enqueueReplaceState: function() {
50
- }, enqueueSetState: function() {
51
- } }, j = Object.assign, P = {};
52
- function p(e2, t, r) {
53
- this.props = e2, this.context = t, this.refs = P, this.updater = r || x;
54
- }
55
- p.prototype.isReactComponent = {};
56
- p.prototype.setState = function(e2, t) {
57
- if (typeof e2 != "object" && typeof e2 != "function" && e2 != null)
58
- throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
59
- this.updater.enqueueSetState(this, e2, t, "setState");
60
- };
61
- p.prototype.forceUpdate = function(e2) {
62
- this.updater.enqueueForceUpdate(this, e2, "forceUpdate");
63
- };
64
- function I() {
65
- }
66
- I.prototype = p.prototype;
67
- function S(e2, t, r) {
68
- this.props = e2, this.context = t, this.refs = P, this.updater = r || x;
69
- }
70
- var R = S.prototype = new I();
71
- R.constructor = S;
72
- j(R, p.prototype);
73
- R.isPureReactComponent = true;
74
- var b = Array.isArray, O = Object.prototype.hasOwnProperty, g = { current: null }, F = { key: true, ref: true, __self: true, __source: true };
75
- function N(e2, t, r) {
76
- var u, n = {}, i = null, c = null;
77
- if (t != null)
78
- for (u in t.ref !== void 0 && (c = t.ref), t.key !== void 0 && (i = "" + t.key), t)
79
- O.call(t, u) && !F.hasOwnProperty(u) && (n[u] = t[u]);
80
- var f2 = arguments.length - 2;
81
- if (f2 === 1)
82
- n.children = r;
83
- else if (1 < f2) {
84
- for (var s = Array(f2), a = 0; a < f2; a++)
85
- s[a] = arguments[a + 2];
86
- n.children = s;
87
- }
88
- if (e2 && e2.defaultProps)
89
- for (u in f2 = e2.defaultProps, f2)
90
- n[u] === void 0 && (n[u] = f2[u]);
91
- return { $$typeof: y, type: e2, key: i, ref: c, props: n, _owner: g.current };
92
- }
93
- function ue(e2, t) {
94
- return { $$typeof: y, type: e2.type, key: t, ref: e2.ref, props: e2.props, _owner: e2._owner };
95
- }
96
- function k(e2) {
97
- return typeof e2 == "object" && e2 !== null && e2.$$typeof === y;
98
- }
99
- function ie(e2) {
100
- var t = { "=": "=0", ":": "=2" };
101
- return "$" + e2.replace(/[=:]/g, function(r) {
102
- return t[r];
103
- });
104
- }
105
- var $ = /\/+/g;
106
- function v(e2, t) {
107
- return typeof e2 == "object" && e2 !== null && e2.key != null ? ie("" + e2.key) : t.toString(36);
108
- }
109
- function h(e2, t, r, u, n) {
110
- var i = typeof e2;
111
- (i === "undefined" || i === "boolean") && (e2 = null);
112
- var c = false;
113
- if (e2 === null)
114
- c = true;
115
- else
116
- switch (i) {
117
- case "string":
118
- case "number":
119
- c = true;
120
- break;
121
- case "object":
122
- switch (e2.$$typeof) {
123
- case y:
124
- case W:
125
- c = true;
126
- }
127
- }
128
- if (c)
129
- return c = e2, n = n(c), e2 = u === "" ? "." + v(c, 0) : u, b(n) ? (r = "", e2 != null && (r = e2.replace($, "$&/") + "/"), h(n, t, r, "", function(a) {
130
- return a;
131
- })) : n != null && (k(n) && (n = ue(n, r + (!n.key || c && c.key === n.key ? "" : ("" + n.key).replace($, "$&/") + "/") + e2)), t.push(n)), 1;
132
- if (c = 0, u = u === "" ? "." : u + ":", b(e2))
133
- for (var f2 = 0; f2 < e2.length; f2++) {
134
- i = e2[f2];
135
- var s = u + v(i, f2);
136
- c += h(i, t, r, s, n);
137
- }
138
- else if (s = oe(e2), typeof s == "function")
139
- for (e2 = s.call(e2), f2 = 0; !(i = e2.next()).done; )
140
- i = i.value, s = u + v(i, f2++), c += h(i, t, r, s, n);
141
- else if (i === "object")
142
- throw t = String(e2), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e2).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
143
- return c;
144
- }
145
- function m(e2, t, r) {
146
- if (e2 == null)
147
- return e2;
148
- var u = [], n = 0;
149
- return h(e2, u, "", "", function(i) {
150
- return t.call(r, i, n++);
151
- }), u;
152
- }
153
- function ce(e2) {
154
- if (e2._status === -1) {
155
- var t = e2._result;
156
- t = t(), t.then(function(r) {
157
- (e2._status === 0 || e2._status === -1) && (e2._status = 1, e2._result = r);
158
- }, function(r) {
159
- (e2._status === 0 || e2._status === -1) && (e2._status = 2, e2._result = r);
160
- }), e2._status === -1 && (e2._status = 0, e2._result = t);
161
- }
162
- if (e2._status === 1)
163
- return e2._result.default;
164
- throw e2._result;
165
- }
166
- var l2 = { current: null }, _ = { transition: null }, se = { ReactCurrentDispatcher: l2, ReactCurrentBatchConfig: _, ReactCurrentOwner: g };
167
- o.Children = { map: m, forEach: function(e2, t, r) {
168
- m(e2, function() {
169
- t.apply(this, arguments);
170
- }, r);
171
- }, count: function(e2) {
172
- var t = 0;
173
- return m(e2, function() {
174
- t++;
175
- }), t;
176
- }, toArray: function(e2) {
177
- return m(e2, function(t) {
178
- return t;
179
- }) || [];
180
- }, only: function(e2) {
181
- if (!k(e2))
182
- throw Error("React.Children.only expected to receive a single React element child.");
183
- return e2;
184
- } };
185
- o.Component = p;
186
- o.Fragment = J;
187
- o.Profiler = Y;
188
- o.PureComponent = S;
189
- o.StrictMode = Q;
190
- o.Suspense = te;
191
- o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = se;
192
- o.cloneElement = function(e2, t, r) {
193
- if (e2 == null)
194
- throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e2 + ".");
195
- var u = j({}, e2.props), n = e2.key, i = e2.ref, c = e2._owner;
196
- if (t != null) {
197
- if (t.ref !== void 0 && (i = t.ref, c = g.current), t.key !== void 0 && (n = "" + t.key), e2.type && e2.type.defaultProps)
198
- var f2 = e2.type.defaultProps;
199
- for (s in t)
200
- O.call(t, s) && !F.hasOwnProperty(s) && (u[s] = t[s] === void 0 && f2 !== void 0 ? f2[s] : t[s]);
201
- }
202
- var s = arguments.length - 2;
203
- if (s === 1)
204
- u.children = r;
205
- else if (1 < s) {
206
- f2 = Array(s);
207
- for (var a = 0; a < s; a++)
208
- f2[a] = arguments[a + 2];
209
- u.children = f2;
210
- }
211
- return { $$typeof: y, type: e2.type, key: n, ref: i, props: u, _owner: c };
212
- };
213
- o.createContext = function(e2) {
214
- return e2 = { $$typeof: Z, _currentValue: e2, _currentValue2: e2, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e2.Provider = { $$typeof: X, _context: e2 }, e2.Consumer = e2;
215
- };
216
- o.createElement = N;
217
- o.createFactory = function(e2) {
218
- var t = N.bind(null, e2);
219
- return t.type = e2, t;
220
- };
221
- o.createRef = function() {
222
- return { current: null };
223
- };
224
- o.forwardRef = function(e2) {
225
- return { $$typeof: ee, render: e2 };
226
- };
227
- o.isValidElement = k;
228
- o.lazy = function(e2) {
229
- return { $$typeof: ne, _payload: { _status: -1, _result: e2 }, _init: ce };
230
- };
231
- o.memo = function(e2, t) {
232
- return { $$typeof: re, type: e2, compare: t === void 0 ? null : t };
233
- };
234
- o.startTransition = function(e2) {
235
- var t = _.transition;
236
- _.transition = {};
237
- try {
238
- e2();
239
- } finally {
240
- _.transition = t;
241
- }
242
- };
243
- o.unstable_act = function() {
244
- throw Error("act(...) is not supported in production builds of React.");
245
- };
246
- o.useCallback = function(e2, t) {
247
- return l2.current.useCallback(e2, t);
248
- };
249
- o.useContext = function(e2) {
250
- return l2.current.useContext(e2);
251
- };
252
- o.useDebugValue = function() {
253
- };
254
- o.useDeferredValue = function(e2) {
255
- return l2.current.useDeferredValue(e2);
256
- };
257
- o.useEffect = function(e2, t) {
258
- return l2.current.useEffect(e2, t);
259
- };
260
- o.useId = function() {
261
- return l2.current.useId();
262
- };
263
- o.useImperativeHandle = function(e2, t, r) {
264
- return l2.current.useImperativeHandle(e2, t, r);
265
- };
266
- o.useInsertionEffect = function(e2, t) {
267
- return l2.current.useInsertionEffect(e2, t);
268
- };
269
- o.useLayoutEffect = function(e2, t) {
270
- return l2.current.useLayoutEffect(e2, t);
271
- };
272
- o.useMemo = function(e2, t) {
273
- return l2.current.useMemo(e2, t);
274
- };
275
- o.useReducer = function(e2, t, r) {
276
- return l2.current.useReducer(e2, t, r);
277
- };
278
- o.useRef = function(e2) {
279
- return l2.current.useRef(e2);
280
- };
281
- o.useState = function(e2) {
282
- return l2.current.useState(e2);
283
- };
284
- o.useSyncExternalStore = function(e2, t, r) {
285
- return l2.current.useSyncExternalStore(e2, t, r);
286
- };
287
- o.useTransition = function() {
288
- return l2.current.useTransition();
289
- };
290
- o.version = "18.2.0";
291
- });
292
- var V = w((he, A) => {
293
- A.exports = D();
294
- });
295
- var d = K(V());
296
- var T = (e2, t) => {
297
- let { parameters: { i18n: r } } = t, u = r == null ? void 0 : r.language, [{ locale: n }] = useGlobals(), [i, c] = useState(0);
298
- return useEffect(() => {
299
- if (r)
300
- return r.on("languageChanged", () => {
301
- c(Date.now());
302
- }), () => r.off("languageChanged");
303
- }, [r]), useEffect(() => {
304
- r && n && u && n !== u && r.changeLanguage(n);
305
- }, [u, n, r]), d.default.createElement(d.Fragment, { key: i }, d.default.createElement(I18nextProvider, { i18n: r }, e2(t)));
306
- };
307
- var pe = f.decorators || [], ye = { ...f, decorators: [...pe, T] }, Ee = ye;
308
- /*! Bundled license information:
309
-
310
- react/cjs/react.production.min.js:
311
- (**
312
- * @license React
313
- * react.production.min.js
314
- *
315
- * Copyright (c) Facebook, Inc. and its affiliates.
316
- *
317
- * This source code is licensed under the MIT license found in the
318
- * LICENSE file in the root directory of this source tree.
319
- *)
320
- */
321
- export {
322
- Ee as default
323
- };
@@ -1,29 +0,0 @@
1
- import { R as React, r as reactExports } from "./index-DM9bPmif.js";
2
- import { r as reactDomExports } from "./index-0FT4HXk-.js";
3
- var client = {};
4
- var m = reactDomExports;
5
- {
6
- client.createRoot = m.createRoot;
7
- client.hydrateRoot = m.hydrateRoot;
8
- }
9
- var nodes = /* @__PURE__ */ new Map(), WithCallback = ({ callback, children }) => {
10
- let once = reactExports.useRef();
11
- return reactExports.useLayoutEffect(() => {
12
- once.current !== callback && (once.current = callback, callback());
13
- }, [callback]), children;
14
- }, renderElement = async (node, el) => {
15
- let root = await getReactRoot(el);
16
- return new Promise((resolve) => {
17
- root.render(React.createElement(WithCallback, { callback: () => resolve(null) }, node));
18
- });
19
- }, unmountElement = (el, shouldUseNewRootApi) => {
20
- let root = nodes.get(el);
21
- root && (root.unmount(), nodes.delete(el));
22
- }, getReactRoot = async (el) => {
23
- let root = nodes.get(el);
24
- return root || (root = client.createRoot(el), nodes.set(el, root)), root;
25
- };
26
- export {
27
- renderElement as r,
28
- unmountElement as u
29
- };
@@ -1,15 +0,0 @@
1
- import { S, c, s } from "./index-CU7cYjZD.js";
2
- import "./iframe-Dzzzanqi.js";
3
- import "../sb-preview/runtime.js";
4
- import "./chunk-EIRT5I3Z-DFD8udmD.js";
5
- import "./index-DM9bPmif.js";
6
- import "./_commonjsHelpers-LQfde5yM.js";
7
- import "./index-0FT4HXk-.js";
8
- import "./index-B9Tccxv4.js";
9
- import "./index-ex9_VrIg.js";
10
- import "./index-BdOSk9or.js";
11
- export {
12
- S as SyntaxHighlighter,
13
- c as createCopyToClipboardFunction,
14
- s as default
15
- };
@@ -1,7 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="164" height="164">
2
- <svg width="164" height="164" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
3
- <path d="M22.467 147.762 17.5 15.402a8.062 8.062 0 0 1 7.553-8.35L137.637.016a8.061 8.061 0 0 1 8.565 8.047v144.23a8.063 8.063 0 0 1-8.424 8.054l-107.615-4.833a8.062 8.062 0 0 1-7.695-7.752Z" fill="#FF4785"></path>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="m128.785.57-15.495.968-.755 18.172a1.203 1.203 0 0 0 1.928 1.008l7.06-5.354 5.962 4.697a1.202 1.202 0 0 0 1.946-.987L128.785.569Zm-12.059 60.856c-2.836 2.203-23.965 3.707-23.965.57.447-11.969-4.912-12.494-7.889-12.494-2.828 0-7.59.855-7.59 7.267 0 6.534 6.96 10.223 15.13 14.553 11.607 6.15 25.654 13.594 25.654 32.326 0 17.953-14.588 27.871-33.194 27.871-19.201 0-35.981-7.769-34.086-34.702.744-3.163 25.156-2.411 25.156 0-.298 11.114 2.232 14.383 8.633 14.383 4.912 0 7.144-2.708 7.144-7.267 0-6.9-7.252-10.973-15.595-15.657C64.827 81.933 51.53 74.468 51.53 57.34c0-17.098 11.76-28.497 32.747-28.497 20.988 0 32.449 11.224 32.449 32.584Z" fill="#fff"></path>
5
- </svg>
6
- <style>@media (prefers-color-scheme: light) { :root { filter: none; } }</style>
7
- </svg>