@chassis-ui/docs 0.1.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.
Files changed (63) hide show
  1. package/README.md +98 -0
  2. package/index.ts +7 -0
  3. package/package.json +66 -0
  4. package/src/components/DocsSidebar.astro +89 -0
  5. package/src/components/NavDocsMenu.astro +26 -0
  6. package/src/components/NavLink.astro +24 -0
  7. package/src/components/ResponsiveImage.astro +31 -0
  8. package/src/components/TableOfContents.astro +31 -0
  9. package/src/components/ThemeToggler.astro +70 -0
  10. package/src/components/shortcodes/AddedIn.astro +13 -0
  11. package/src/components/shortcodes/Callout.astro +37 -0
  12. package/src/components/shortcodes/CxTable.astro +16 -0
  13. package/src/js/color-modes.js +82 -0
  14. package/src/js/icon-loader.js +220 -0
  15. package/src/js/search.js +58 -0
  16. package/src/js/sidebar.js +30 -0
  17. package/src/js/theme-color.js +126 -0
  18. package/src/layouts/BaseLayout.astro +94 -0
  19. package/src/layouts/DocsLayout.astro +147 -0
  20. package/src/layouts/IconsLayout.astro +19 -0
  21. package/src/layouts/RedirectLayout.astro +23 -0
  22. package/src/layouts/SingleLayout.astro +33 -0
  23. package/src/layouts/footer/Footer.astro +56 -0
  24. package/src/layouts/footer/Scripts.astro +22 -0
  25. package/src/layouts/head/Analytics.astro +22 -0
  26. package/src/layouts/head/Favicons.astro +11 -0
  27. package/src/layouts/head/Head.astro +54 -0
  28. package/src/layouts/head/Scss.astro +9 -0
  29. package/src/layouts/head/Social.astro +38 -0
  30. package/src/layouts/head/Stylesheet.astro +15 -0
  31. package/src/layouts/header/Header.astro +19 -0
  32. package/src/layouts/header/Navigation.astro +121 -0
  33. package/src/layouts/header/Skippy.astro +22 -0
  34. package/src/libs/image.ts +13 -0
  35. package/src/libs/layout.ts +7 -0
  36. package/src/libs/rehype.ts +38 -0
  37. package/src/libs/remark.ts +205 -0
  38. package/src/libs/toc.ts +44 -0
  39. package/src/libs/utils.ts +122 -0
  40. package/src/scss/_anchor.scss +21 -0
  41. package/src/scss/_brand.scss +59 -0
  42. package/src/scss/_buttons.scss +36 -0
  43. package/src/scss/_callouts.scss +40 -0
  44. package/src/scss/_clipboard-js.scss +63 -0
  45. package/src/scss/_code.scss +116 -0
  46. package/src/scss/_colors.scss +140 -0
  47. package/src/scss/_content.scss +141 -0
  48. package/src/scss/_docsearch.scss +174 -0
  49. package/src/scss/_footer.scss +29 -0
  50. package/src/scss/_layout.scss +72 -0
  51. package/src/scss/_masthead.scss +124 -0
  52. package/src/scss/_navbar.scss +138 -0
  53. package/src/scss/_placeholder-img.scss +15 -0
  54. package/src/scss/_scrolling.scss +16 -0
  55. package/src/scss/_settings.scss +37 -0
  56. package/src/scss/_sidebar.scss +161 -0
  57. package/src/scss/_skippy.scss +7 -0
  58. package/src/scss/_syntax.scss +158 -0
  59. package/src/scss/_toc.scss +117 -0
  60. package/src/scss/_variables.scss +78 -0
  61. package/src/scss/fonts.scss +1 -0
  62. package/src/scss/main.scss +90 -0
  63. package/src/scss/search.scss +26 -0
@@ -0,0 +1,78 @@
1
+ // Local docs variables
2
+ // $cxd-main: $primary-base-color;
3
+ // $cxd-subtle: lighten(saturate($cxd-main, 5%), 15%); // stylelint-disable-line function-disallowed-list
4
+ // $cxd-main-light: lighten(saturate($cxd-main, 5%), 45%); // stylelint-disable-line function-disallowed-list
5
+ // $cxd-accent: $secondary-base-color;
6
+ $cxd-main: var(--cx-primary-base-color);
7
+ $cxd-subtle: var(--cx-primary-bg-evident);
8
+ $cxd-main-light: var(--cx-primary-fg-main);
9
+ $cxd-accent: var(--cx-primary-base-color);
10
+
11
+ $cxd-gutter-x: 2rem;
12
+ $cxd-callout-variants: info, warning, danger, default !default;
13
+
14
+ :root,
15
+ [data-cx-theme="light"] {
16
+ --cxd-main: #{$cxd-main};
17
+ --cxd-subtle: #{$cxd-subtle};
18
+ --cxd-accent: #{$cxd-accent};
19
+ --cxd-main-rgb: var(--cx-primary-base-color-rgb);
20
+ --cxd-subtle-rgb: var(--cx-primary-40-rgb);
21
+ --cxd-accent-rgb: var(--cx-secondary-base-color-rgb);
22
+ --cxd-pink-rgb: #{to-rgb($pink-500)};
23
+ --cxd-teal-rgb: #{to-rgb($teal-500)};
24
+ --cxd-main-bg: var(--cxd-main);
25
+ --cxd-subtle-bg: var(--cxd-subtle);
26
+ --cxd-toc-color: var(--cxd-main);
27
+ --cxd-sidebar-link-bg: var(--cx-bg-highlight);
28
+ --cxd-callout-link: #{to-rgb($blue-600)};
29
+ --cxd-callout-code-color: #{$pink-600};
30
+ // --cxd-pre-bg: var(--cx-bg-even);
31
+ }
32
+
33
+ @if $enable-dark-mode {
34
+ @include color-mode(dark, true) {
35
+ color-scheme: dark;
36
+ --cxd-subtle: var(--cx-primary-60-rgb);
37
+ --cxd-subtle-bg: #{$cxd-subtle};
38
+ // --cxd-toc-color: var(--#{$prefix}fg-subtle);
39
+ --cxd-sidebar-link-bg: var(--cx-primary-40);
40
+ --cxd-callout-link: #{to-rgb($blue-300)};
41
+ --cxd-callout-code-color: #{$pink-300};
42
+ //--cxd-pre-bg: #{adjust-color($gray-900, $lightness: -2.5%)}; // stylelint-disable-line scss/at-function-named-arguments
43
+ --cxd-pre-bg: var(--cx-bg-evident);
44
+ }
45
+ }
46
+
47
+ // @import "../../../tokens/default.scss";
48
+ // h1:not(.cxd-example h1),
49
+ // h2:not(.cxd-example h2),
50
+ // h3:not(.cxd-example h3),
51
+ // h4:not(.cxd-example h4),
52
+ // h5:not(.cxd-example h5),
53
+ // h6:not(.cxd-example h6) {
54
+ // & ~ p,
55
+ // & ~ ol,
56
+ // & ~ ul {
57
+ // font-family: var(--cx-font-family-display) !important;
58
+ // }
59
+ // }
60
+
61
+ // .cxd-intro h1 {
62
+ // line-height: 1.25em;
63
+ // }
64
+ // .cxd-intro h1,
65
+ // .cxd-content > h1,
66
+ // .cxd-content > h2,
67
+ // .cxd-content > h3,
68
+ // .cxd-content > h4 {
69
+ // font-family: var(--cx-font-family-display) !important;
70
+ // font-weight: var(--cx-font-weight-display-strong) !important;
71
+ // }
72
+ //
73
+ // .cxd-playground textarea {
74
+ // font-family: var(--cx-font-family-code) !important;
75
+ // //font-size: var(--cx-font-small) !important;
76
+ // background-color: var(--cx-default-bg-even) !important;
77
+ // border-color: var(--cx-default-border-subtle);
78
+ // }
@@ -0,0 +1 @@
1
+ @import "https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Inter:wght@100..900&family=Archivo+Narrow:ital,wght@0,400..700;1,400..700&display=swap";
@@ -0,0 +1,90 @@
1
+ @use "@chassis-ui/tokens/dist/web/chassis-docs/number-large" as large;
2
+ @use "@chassis-ui/tokens/dist/web/chassis-docs/number-medium" as medium;
3
+ @use "@chassis-ui/tokens/dist/web/chassis-docs/number-small" as small;
4
+ // $prefix: cx- !default;
5
+
6
+ /*!
7
+ * Chassis - CSS Docs (https://ozgurgunes.github.io/chassis-css//)
8
+ * Copyright 2025 Chassis
9
+ * Licensed under the Creative Commons Attribution 3.0 Unported License.
10
+ * For details, see https://creativecommons.org/licenses/by/3.0/.
11
+ */
12
+
13
+ // Dev notes
14
+ //
15
+ // Background information on nomenclature and architecture decisions here.
16
+ //
17
+ // - Chassis - CSS functions, variables, and mixins are included for easy reuse.
18
+ // Doing so gives us access to the same core utilities provided by Chassis - CSS.
19
+ // For example, consistent media queries through those mixins.
20
+ //
21
+ // - Chassis - CSS's **docs variables** are prefixed with `$cxd-`.
22
+ // These custom colors avoid collision with the components Chassis - CSS provides.
23
+ //
24
+ // - Classes are prefixed with `.cxd-`.
25
+ // These classes indicate custom-built or modified components for the design
26
+ // and layout of the Chassis - CSS docs. They are not included in our builds.
27
+ //
28
+ // Happy Chassis - CSSing!
29
+
30
+ // Load Chassis - CSS variables and mixins
31
+ //@import "chassis-css/scss/functions";
32
+ // fusv-disable
33
+ $enable-grid-classes: true;
34
+ $enable-cssgrid: true;
35
+ //@import "colors";
36
+ // @import "../../../chassis-tokens/dist/tokens/web/chassis_docs_light";
37
+
38
+ @import "settings";
39
+ @import "@chassis-ui/tokens/dist/web/chassis-docs/main";
40
+
41
+ @import "@chassis-ui/css/scss/functions";
42
+ @import "@chassis-ui/css/scss/tokens";
43
+ @import "@chassis-ui/css/scss/variables";
44
+ @import "@chassis-ui/css/scss/rfs";
45
+ @import "@chassis-ui/css/scss/maps";
46
+ @import "@chassis-ui/css/scss/mixins";
47
+ @import "@chassis-ui/css/scss/grid";
48
+
49
+
50
+ // fusv-enable
51
+
52
+
53
+ @import "colors";
54
+ @import "variables";
55
+ @import "fonts";
56
+
57
+ // @import "@chassis-ui/css/scss/core";
58
+
59
+ // Load docs components
60
+ //@import "colors";
61
+ @import "navbar";
62
+ @import "masthead";
63
+ @import "content";
64
+ @import "skippy";
65
+ @import "sidebar";
66
+ @import "layout";
67
+ @import "toc";
68
+ @import "footer";
69
+ @import "buttons";
70
+ @import "code";
71
+ @import "callouts";
72
+ @import "brand";
73
+ @import "clipboard-js";
74
+ @import "placeholder-img";
75
+ @import "scrolling";
76
+
77
+ // Load docs dependencies
78
+ @import "syntax";
79
+ @import "anchor";
80
+
81
+
82
+ /* Hide light-mode things when in dark mode */
83
+ [data-cx-theme="dark"] .display-light {
84
+ display: none;
85
+ }
86
+
87
+ /* Hide dark-mode things when in light mode */
88
+ [data-cx-theme="light"] .display-dark {
89
+ display: none;
90
+ }
@@ -0,0 +1,26 @@
1
+ $prefix: cx- !default;
2
+
3
+ /*!
4
+ * Chassis - CSS Docs (https://ozgurgunes.github.io/chassis-css//)
5
+ * Copyright 2025 Chassis
6
+ * Licensed under the Creative Commons Attribution 3.0 Unported License.
7
+ * For details, see https://creativecommons.org/licenses/by/3.0/.
8
+ */
9
+
10
+ //@import "../../../chassis-tokens/dist/tokens/web/chassis_docs_light";
11
+
12
+ @import "settings";
13
+ @import "@chassis-ui/tokens/dist/web/chassis-docs/main";
14
+
15
+ @import "@chassis-ui/css/scss/functions";
16
+ @import "@chassis-ui/css/scss/tokens";
17
+ @import "@chassis-ui/css/scss/variables";
18
+ @import "@chassis-ui/css/scss/rfs";
19
+ @import "@chassis-ui/css/scss/maps";
20
+ @import "@chassis-ui/css/scss/mixins";
21
+ @import "@chassis-ui/css/scss/grid";
22
+
23
+ @import "variables";
24
+
25
+ @import "@docsearch/css/dist/style";
26
+ @import "docsearch";