@xyd-js/atlas 0.1.0-xyd.16 → 0.1.0-xyd.18

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 (65) hide show
  1. package/.storybook/index.css +1 -2
  2. package/.storybook/preview.ts +1 -2
  3. package/CHANGELOG.md +22 -0
  4. package/dist/Update-BlhP2VFR-COLbZvRj.js +4 -0
  5. package/dist/Update-BlhP2VFR-COLbZvRj.js.map +1 -0
  6. package/dist/Update-CMM38Snc-COLbZvRj.js +4 -0
  7. package/dist/Update-CMM38Snc-COLbZvRj.js.map +1 -0
  8. package/dist/Update-D5e_yqty-COLbZvRj.js +4 -0
  9. package/dist/Update-D5e_yqty-COLbZvRj.js.map +1 -0
  10. package/dist/index.css +47 -58
  11. package/dist/index.d.ts +30 -11
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/styles.css +89 -0
  15. package/dist/tokens.css +5 -2
  16. package/dist/xydPlugin.d.ts +5 -0
  17. package/dist/xydPlugin.js +2 -0
  18. package/dist/xydPlugin.js.map +1 -0
  19. package/index.ts +2 -1
  20. package/package.json +12 -9
  21. package/packages/xyd-plugin/SidebarItem.tsx +27 -0
  22. package/packages/xyd-plugin/index.ts +19 -0
  23. package/rollup.config.js +27 -25
  24. package/src/components/ApiRef/ApiRefItem/ApiRefItem.styles.tsx +60 -17
  25. package/src/components/ApiRef/ApiRefItem/ApiRefItem.tsx +508 -49
  26. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.styles.tsx +73 -16
  27. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.tsx +574 -56
  28. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.styles.tsx +2 -1
  29. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.tsx +37 -19
  30. package/src/components/Atlas/Atlas.styles.tsx +1 -1
  31. package/src/components/Atlas/Atlas.tsx +35 -19
  32. package/src/components/Atlas/AtlasContext.tsx +47 -0
  33. package/src/components/Atlas/AtlasDecorator.styles.ts +22 -0
  34. package/src/components/Atlas/AtlasDecorator.tsx +15 -0
  35. package/src/components/Atlas/AtlasLazy/AtlasLazy.tsx +2 -2
  36. package/src/components/Atlas/AtlasPrimary.tsx +21 -0
  37. package/src/components/Atlas/AtlasSecondary.tsx +148 -0
  38. package/src/components/Atlas/index.ts +6 -2
  39. package/src/components/Atlas/types.ts +11 -0
  40. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.styles.tsx +4 -5
  41. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.tsx +6 -8
  42. package/src/components/Code/index.ts +0 -4
  43. package/src/components/Icon/index.tsx +384 -0
  44. package/src/styles/styles.css +89 -0
  45. package/src/styles/tokens.css +5 -2
  46. package/src/utils/mdx.ts +0 -29
  47. package/tsconfig.json +6 -2
  48. package/types.d.ts +22 -0
  49. package/dist/CodeSample-CVki5fdQ-CI-Jdg_T.js +0 -2
  50. package/dist/CodeSample-CVki5fdQ-CI-Jdg_T.js.map +0 -1
  51. package/dist/CodeSample-Dkob5gWa-CI-Jdg_T.js +0 -2
  52. package/dist/CodeSample-Dkob5gWa-CI-Jdg_T.js.map +0 -1
  53. package/dist/atlas-index.d.ts +0 -15
  54. package/dist/atlas-index.js +0 -2
  55. package/dist/atlas-index.js.map +0 -1
  56. package/packages/atlas-index/AtlasIndex.tsx +0 -79
  57. package/packages/atlas-index/index.ts +0 -3
  58. package/src/components/Code/CodeCopy/CodeCopy.styles.tsx +0 -17
  59. package/src/components/Code/CodeCopy/CodeCopy.tsx +0 -30
  60. package/src/components/Code/CodeCopy/index.ts +0 -7
  61. package/src/components/Code/CodeSample/CodeSample.styles.tsx +0 -131
  62. package/src/components/Code/CodeSample/CodeSample.tsx +0 -143
  63. package/src/components/Code/CodeSample/index.ts +0 -8
  64. package/src/components/Code/CodeSample/withLocalStored.tsx +0 -52
  65. package/src/components/Code/default-theme.ts +0 -266
@@ -1,22 +1,18 @@
1
- import {css} from "@linaria/core";
1
+ import { css } from "@linaria/core";
2
2
 
3
3
  export const ApiRefPropertiesUlHost = css`
4
4
  display: flex;
5
5
  flex-wrap: wrap;
6
6
  flex-direction: column;
7
- gap: 16px;
8
-
9
- padding: 0;
10
- margin: 0;
11
7
 
12
8
  list-style: none;
13
-
14
9
  border: none;
15
10
  `;
16
11
 
17
12
  export const ApiRefPropertiesLiHost = css`
18
13
  margin: 0;
19
- padding: 0;
14
+ padding: 20px 0px;
15
+ border-bottom: 1px solid var(--dark32);
20
16
 
21
17
  &:first-child {
22
18
  padding-top: 0;
@@ -24,13 +20,20 @@ export const ApiRefPropertiesLiHost = css`
24
20
 
25
21
  &:last-child {
26
22
  padding-bottom: 0;
23
+ border-bottom: none;
27
24
  }
28
25
  `;
29
26
 
30
27
  export const ApiRefPropertiesDescriptionHost = css`
31
- font-size: 14px;
32
- line-height: 22px;
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 15px;
31
+
33
32
  color: var(--XydAtlas-Component-ApiRef-Properties__color-description);
33
+
34
+ p {
35
+ color: var(--XydAtlas-Component-ApiRef-Properties__color-description);
36
+ }
34
37
  `;
35
38
 
36
39
  export const ApiRefPropertiesDlHost = css`
@@ -41,7 +44,7 @@ export const ApiRefPropertiesDlHost = css`
41
44
  flex-wrap: wrap;
42
45
  gap: 10px;
43
46
 
44
- margin: 8px 0;
47
+ margin: 4px 0;
45
48
 
46
49
  dd {
47
50
  margin-inline-start: 0px;
@@ -51,16 +54,18 @@ export const ApiRefPropertiesDlHost = css`
51
54
  export const ApiRefPropertiesPropNameCodeHost = css`
52
55
  display: inline-flex;
53
56
  padding: 4px 0;
54
- font-weight: 600;
55
- font-size: 13px;
57
+ font-weight: var(--xyd-font-weight-semibold);
56
58
  color: var(--XydAtlas-Component-ApiRef-Properties__color-propName);
59
+
60
+ &[data-parent-choice-type="true"] {
61
+ font-weight: var(--xyd-font-weight-normal);
62
+ }
57
63
  `;
58
64
 
59
65
  export const ApiRefPropertiesPropTypeCodeHost = css`
60
66
  display: inline-flex;
61
67
  padding: 4px 0;
62
68
  border-radius: 4px;
63
- font-size: 10px;
64
69
  color: var(--XydAtlas-Component-ApiRef-Properties__color-propType);
65
70
  `;
66
71
 
@@ -119,10 +124,8 @@ export const ApiRefPropertiesPropToggleHost = css`
119
124
  cursor: pointer;
120
125
  color: inherit;
121
126
 
122
- font-size: 13px;
123
-
124
127
  svg {
125
- font-size: 13px;
128
+ font-size: var(--xyd-font-size-small);
126
129
  }
127
130
 
128
131
  &:hover {
@@ -142,4 +145,58 @@ export const ApiRefPropertiesPropToggleLink = css`
142
145
  transition: all ease-in .1s;
143
146
  color: var(--XydAtlas-Component-ApiRef-Properties__color--active);
144
147
  }
148
+ `;
149
+
150
+ export const globals = css`
151
+ :global() {
152
+ atlas-apiref-propmeta { // TODO: !!! BETTER API !!! - FOR CUSTOM COMPONENTS
153
+ font-size: var(--xyd-font-size-xsmall);
154
+ line-height: var(--xyd-line-height-xsmall);
155
+
156
+
157
+ code {
158
+ display: inline-flex;
159
+ padding: 4px 0;
160
+ border-radius: 4px;
161
+ color: var(--XydAtlas-Component-ApiRef-Properties__color-propType);
162
+ }
163
+ &[data-name="required"] {
164
+ code {
165
+ color: var(--xyd-text-color--error);
166
+ }
167
+ }
168
+
169
+ a {
170
+ color: var(--XydAtlas-Component-ApiRef-Properties__color--active);
171
+ text-decoration: underline;
172
+
173
+ &:hover {
174
+ text-decoration: none;
175
+ color: var(--XydAtlas-Sys-Color-Primary--hover);
176
+ }
177
+ }
178
+ }
179
+ }
180
+ `;
181
+
182
+ export const ApiRefPropertiesMetaInfoHost = css`
183
+ display: flex;
184
+ flex-direction: column;
185
+ gap: 4px;
186
+
187
+ [part="examples"] {
188
+ display: inline;
189
+
190
+ span {
191
+ margin-right: 2px;
192
+ }
193
+ }
194
+
195
+ [part="examples-list"] {
196
+ display: inline;
197
+
198
+ xyd-badge {
199
+ margin-right: 2px;
200
+ }
201
+ }
145
202
  `;