storybook-addon-design-system-docs 1.0.1 → 1.0.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.
- package/README.md +143 -15
- package/dist/components/assets/index.cjs +2 -2
- package/dist/components/assets/index.cjs.map +1 -1
- package/dist/components/assets/index.js +2 -2
- package/dist/components/assets/index.js.map +1 -1
- package/dist/components/primitives/index.cjs +2 -2
- package/dist/components/primitives/index.cjs.map +1 -1
- package/dist/components/primitives/index.js +2 -2
- package/dist/components/primitives/index.js.map +1 -1
- package/dist/index.cjs +29 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -23
- package/dist/index.js.map +1 -1
- package/dist/preset.cjs +215 -81
- package/dist/preset.cjs.map +1 -1
- package/dist/preset.js +215 -81
- package/dist/preset.js.map +1 -1
- package/package.json +141 -141
- package/templates/spacing.mdx +1 -1
package/dist/index.js
CHANGED
|
@@ -253,7 +253,7 @@ var Wrapper = styled.div(({ theme }) => ({
|
|
|
253
253
|
minHeight: "100vh",
|
|
254
254
|
boxSizing: "border-box",
|
|
255
255
|
gap: "3rem",
|
|
256
|
-
|
|
256
|
+
"@media (min-width: 600px)": {}
|
|
257
257
|
}));
|
|
258
258
|
var Container = styled.div(() => ({
|
|
259
259
|
maxWidth: "1000px",
|
|
@@ -766,7 +766,7 @@ function ShadowsSection({ entries }) {
|
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
768
|
/* @__PURE__ */ jsx(ShadowLabel, { children: label === "DEFAULT" ? "shadow" : `shadow-${label}` }),
|
|
769
|
-
/* @__PURE__ */ jsx(ShadowValue, { title: value, children: value === "none" ? "none" : value.length > 50 ? value.substring(0, 47)
|
|
769
|
+
/* @__PURE__ */ jsx(ShadowValue, { title: value, children: value === "none" ? "none" : value.length > 50 ? `${value.substring(0, 47)}...` : value })
|
|
770
770
|
] }, label)) });
|
|
771
771
|
}
|
|
772
772
|
function ShadowsPage(props) {
|
|
@@ -1173,10 +1173,19 @@ function validateAssetConfig(configs) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
function normalizeAssetGroup(config, sidebarGroup = "Assets/", configDir) {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1176
|
+
const rawPath = config.path;
|
|
1177
|
+
let titlePrefix;
|
|
1178
|
+
if (rawPath?.startsWith("/")) {
|
|
1179
|
+
titlePrefix = rawPath.slice(1);
|
|
1180
|
+
} else if (rawPath) {
|
|
1181
|
+
titlePrefix = sidebarGroup ? `${sidebarGroup}/${rawPath}` : rawPath;
|
|
1182
|
+
} else {
|
|
1183
|
+
titlePrefix = sidebarGroup;
|
|
1184
|
+
}
|
|
1185
|
+
if (titlePrefix && !titlePrefix.endsWith("/")) {
|
|
1186
|
+
titlePrefix += "/";
|
|
1179
1187
|
}
|
|
1188
|
+
const storyPath = titlePrefix ? `${titlePrefix}${config.name}` : config.name;
|
|
1180
1189
|
const source = path3.isAbsolute(config.source) ? config.source : configDir ? path3.resolve(configDir, config.source) : config.source;
|
|
1181
1190
|
const variants = {
|
|
1182
1191
|
...DEFAULT_VARIANT_CONFIG,
|
|
@@ -7817,8 +7826,8 @@ function normalizeAddonOptions(options) {
|
|
|
7817
7826
|
};
|
|
7818
7827
|
}
|
|
7819
7828
|
function validateSidebarGroup(sidebarGroup) {
|
|
7820
|
-
if (typeof sidebarGroup !== "string"
|
|
7821
|
-
throw new Error("sidebarGroup must be a
|
|
7829
|
+
if (typeof sidebarGroup !== "string") {
|
|
7830
|
+
throw new Error("sidebarGroup must be a string");
|
|
7822
7831
|
}
|
|
7823
7832
|
}
|
|
7824
7833
|
function validateSections(sections) {
|
|
@@ -7841,27 +7850,24 @@ function isValidSectionName(name) {
|
|
|
7841
7850
|
return typeof name === "string" && VALID_SECTIONS.includes(name);
|
|
7842
7851
|
}
|
|
7843
7852
|
function isValidSectionObject(section) {
|
|
7844
|
-
return typeof section === "object" && section !== null && isValidSectionName(section.name) && (section.path === void 0 || typeof section.path === "string"
|
|
7853
|
+
return typeof section === "object" && section !== null && isValidSectionName(section.name) && (section.path === void 0 || typeof section.path === "string");
|
|
7845
7854
|
}
|
|
7846
7855
|
function normalizeSection(section, sidebarGroup) {
|
|
7847
7856
|
const name = typeof section === "string" ? section : section.name;
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
if (
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
if (!path5.endsWith("/")) {
|
|
7857
|
-
return { name, path: `${path5}/${name}` };
|
|
7858
|
-
}
|
|
7859
|
-
return { name, path: `${path5}${name}` };
|
|
7857
|
+
const rawPath = typeof section === "string" ? void 0 : section.path;
|
|
7858
|
+
let titlePrefix;
|
|
7859
|
+
if (rawPath?.startsWith("/")) {
|
|
7860
|
+
titlePrefix = rawPath.slice(1);
|
|
7861
|
+
} else if (rawPath) {
|
|
7862
|
+
titlePrefix = sidebarGroup ? `${sidebarGroup}/${rawPath}` : rawPath;
|
|
7863
|
+
} else {
|
|
7864
|
+
titlePrefix = sidebarGroup;
|
|
7860
7865
|
}
|
|
7861
|
-
if (!
|
|
7862
|
-
|
|
7866
|
+
if (titlePrefix && !titlePrefix.endsWith("/")) {
|
|
7867
|
+
titlePrefix += "/";
|
|
7863
7868
|
}
|
|
7864
|
-
|
|
7869
|
+
const path5 = titlePrefix ? `${titlePrefix}${name}` : name;
|
|
7870
|
+
return { name, path: path5 };
|
|
7865
7871
|
}
|
|
7866
7872
|
function normalizeSections(sections, sidebarGroup) {
|
|
7867
7873
|
return sections.map((section) => normalizeSection(section, sidebarGroup));
|