@xyd-js/atlas 0.1.0-xyd.8 → 0.1.0-xyd.99

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 (56) hide show
  1. package/.storybook/index.css +1 -27
  2. package/.storybook/preview.ts +1 -2
  3. package/CHANGELOG.md +1057 -0
  4. package/LICENSE +21 -0
  5. package/dist/Update-0XruJHjj-COLbZvRj.js +4 -0
  6. package/dist/Update-0XruJHjj-COLbZvRj.js.map +1 -0
  7. package/dist/Update-DKOAw8p9-COLbZvRj.js +4 -0
  8. package/dist/Update-DKOAw8p9-COLbZvRj.js.map +1 -0
  9. package/dist/index.css +43 -54
  10. package/dist/index.d.ts +30 -11
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/styles.css +89 -0
  14. package/dist/tokens.css +60 -0
  15. package/dist/xydPlugin.d.ts +5 -0
  16. package/dist/xydPlugin.js +2 -0
  17. package/dist/xydPlugin.js.map +1 -0
  18. package/index.ts +1 -1
  19. package/package.json +20 -21
  20. package/packages/xyd-plugin/SidebarItem.tsx +27 -0
  21. package/packages/xyd-plugin/index.ts +20 -0
  22. package/rollup.config.js +56 -12
  23. package/src/components/ApiRef/ApiRefItem/ApiRefItem.styles.tsx +95 -63
  24. package/src/components/ApiRef/ApiRefItem/ApiRefItem.tsx +507 -55
  25. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.styles.tsx +186 -143
  26. package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.tsx +584 -76
  27. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.styles.tsx +19 -23
  28. package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.tsx +39 -24
  29. package/src/components/Atlas/Atlas.styles.tsx +3 -5
  30. package/src/components/Atlas/Atlas.tsx +34 -21
  31. package/src/components/Atlas/AtlasContext.tsx +47 -0
  32. package/src/components/Atlas/AtlasDecorator.styles.ts +22 -0
  33. package/src/components/Atlas/AtlasDecorator.tsx +15 -0
  34. package/src/components/Atlas/AtlasLazy/AtlasLazy.styles.tsx +7 -8
  35. package/src/components/Atlas/AtlasLazy/AtlasLazy.tsx +4 -6
  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 +56 -141
  41. package/src/components/Code/CodeSampleButtons/CodeSampleButtons.tsx +19 -28
  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 +60 -0
  46. package/src/utils/mdx.ts +0 -29
  47. package/tsconfig.json +9 -2
  48. package/types.d.ts +22 -0
  49. package/src/components/Code/CodeCopy/CodeCopy.style.tsx +0 -21
  50. package/src/components/Code/CodeCopy/CodeCopy.tsx +0 -32
  51. package/src/components/Code/CodeCopy/index.ts +0 -7
  52. package/src/components/Code/CodeSample/CodeSample.styles.tsx +0 -134
  53. package/src/components/Code/CodeSample/CodeSample.tsx +0 -149
  54. package/src/components/Code/CodeSample/index.ts +0 -8
  55. package/src/components/Code/CodeSample/withLocalStored.tsx +0 -52
  56. package/src/components/Code/default-theme.ts +0 -266
@@ -1,159 +1,202 @@
1
- import {css} from "@linaria/core";
1
+ import { css } from "@linaria/core";
2
+
3
+ export const ApiRefPropertiesUlHost = css`
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ flex-direction: column;
7
+
8
+ list-style: none;
9
+ border: none;
10
+ `;
11
+
12
+ export const ApiRefPropertiesLiHost = css`
13
+ margin: 0;
14
+ padding: 20px 0px;
15
+ border-bottom: 1px solid var(--dark32);
16
+
17
+ &:first-child {
18
+ padding-top: 0;
19
+ }
20
+
21
+ &:last-child {
22
+ padding-bottom: 0;
23
+ border-bottom: none;
24
+ }
25
+ `;
26
+
27
+ export const ApiRefPropertiesDescriptionHost = css`
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 15px;
31
+
32
+ color: var(--XydAtlas-Component-ApiRef-Properties__color-description);
33
+
34
+ p {
35
+ color: var(--XydAtlas-Component-ApiRef-Properties__color-description);
36
+ }
37
+ `;
38
+
39
+ export const ApiRefPropertiesDlHost = css`
40
+ position: relative;
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: flex-start;
44
+ flex-wrap: wrap;
45
+ gap: 10px;
46
+
47
+ margin: 4px 0;
48
+
49
+ dd {
50
+ margin-inline-start: 0px;
51
+ }
52
+ `;
53
+
54
+ export const ApiRefPropertiesPropNameCodeHost = css`
55
+ display: inline-flex;
56
+ padding: 4px 0;
57
+ font-weight: var(--xyd-font-weight-semibold);
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
+ }
63
+ `;
64
+
65
+ export const ApiRefPropertiesPropTypeCodeHost = css`
66
+ display: inline-flex;
67
+ padding: 4px 0;
68
+ border-radius: 4px;
69
+ color: var(--XydAtlas-Component-ApiRef-Properties__color-propType);
70
+ `;
71
+
72
+ export const ApiRefPropertiesPropTypeCodeLink = css`
73
+ color: var(--XydAtlas-Component-ApiRef-Properties__color--active);
74
+ text-decoration: underline;
75
+
76
+ &:hover {
77
+ text-decoration: none;
78
+ color: var(--XydAtlas-Sys-Color-Primary--hover);
79
+ }
80
+ `;
2
81
 
3
- export const $ul = {
4
- host: css`
5
- display: flex;
6
- flex-wrap: wrap;
7
- flex-direction: column;
8
- gap: 16px;
82
+ export const ApiRefPropertiesSubPropsHost = css`
83
+ padding: 8px;
84
+ border-style: none;
85
+ display: none;
86
+ `;
9
87
 
10
- padding: 0;
11
- margin: 0;
88
+ export const ApiRefPropertiesSubPropsHostExpanded = css`
89
+ display: unset;
90
+ `;
12
91
 
13
- list-style: none;
92
+ export const ApiRefPropertiesSubPropsBox = css`
93
+ `;
14
94
 
15
- border: none;
16
- `,
17
- }
95
+ export const ApiRefPropertiesSubPropsUl = css`
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ flex-direction: column;
99
+ gap: 16px;
18
100
 
19
- export const $li = {
20
- host: css`
21
- margin: 0;
22
- padding: 0;
101
+ padding: 0;
102
+ margin: 0;
23
103
 
24
- &:first-child {
25
- padding-top: 0;
26
- }
104
+ list-style: none;
105
+
106
+ border: none;
107
+ border-left: 1px solid var(--XydAtlas-Component-ApiRef-Properties__color-border);
108
+ `;
109
+
110
+ export const ApiRefPropertiesSubPropsLi = css`
111
+ padding: 0 16px;
112
+ `;
113
+
114
+ export const ApiRefPropertiesPropToggleHost = css`
115
+ display: flex;
116
+ align-items: center;
117
+ padding: 0;
118
+ margin-top: 16px;
27
119
 
28
- &:last-child {
29
- padding-bottom: 0;
120
+ background: none;
121
+ outline: inherit;
122
+ border: none;
123
+
124
+ cursor: pointer;
125
+ color: inherit;
126
+
127
+ svg {
128
+ font-size: var(--xyd-font-size-small);
129
+ }
130
+
131
+ &:hover {
132
+ svg {
133
+ transition: all ease-in .1s;
134
+ color: var(--XydAtlas-Component-ApiRef-Properties__color--active);
30
135
  }
31
- `,
32
- }
33
-
34
- export const $description = {
35
- host: css`
36
- font-size: 14px;
37
- line-height: 22px;
38
- color: var(--atlas-comp-apiref-properties-description-color);
39
- `
40
- }
41
-
42
- export const $dl = {
43
- host: css`
44
- position: relative;
45
- display: flex;
46
- align-items: center;
47
- justify-content: flex-start;
48
- flex-wrap: wrap;
49
- gap: 10px;
50
-
51
- margin: 8px 0;
52
-
53
- dd {
54
- margin-inline-start: 0px;
136
+ }
137
+ `;
138
+
139
+ export const ApiRefPropertiesPropToggleLink = css`
140
+ text-decoration: none;
141
+ cursor: pointer;
142
+ margin-left: 4px;
143
+
144
+ &:hover {
145
+ transition: all ease-in .1s;
146
+ color: var(--XydAtlas-Component-ApiRef-Properties__color--active);
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);
55
162
  }
56
- `,
57
- }
58
-
59
- export const $propNameCode = {
60
- host: css`
61
- display: inline-flex;
62
-
63
- padding: 4px 0;
64
-
65
- font-weight: 600;
66
- font-size: 13px;
67
- color: var(--atlas-comp-apiref-properties-prop__name-color);
68
- `,
69
- }
70
-
71
- export const $propTypeCode = {
72
- host: css`
73
- display: inline-flex;
74
-
75
- padding: 4px 0;
76
-
77
- border-radius: 4px;
78
-
79
- font-size: 10px;
80
- color: var(--atlas-comp-apiref-properties-prop__type-color);
81
- `,
82
- link: css`
83
- color: var(--atlas-comp-apiref-properties-color--active);
84
- text-decoration: underline;
85
-
86
- &:hover {
87
- text-decoration: none;
163
+ &[data-name="required"] {
164
+ code {
165
+ color: var(--xyd-text-color--error);
166
+ }
88
167
  }
89
- `
90
- }
91
-
92
- export const $subProps = {
93
- host: css`
94
- padding: 8px;
95
- border-style: none;
96
- display: none;
97
- `,
98
- host$$expanded: css`
99
- display: unset;
100
- `,
101
- box: css`
102
- `,
103
- ul: css`
104
- display: flex;
105
- flex-wrap: wrap;
106
- flex-direction: column;
107
- gap: 16px;
108
-
109
- padding: 0;
110
- margin: 0;
111
-
112
- list-style: none;
113
-
114
- border: none;
115
- border-left: 1px solid var(--atlas-comp-apiref-properties-border-color);
116
- `,
117
- li: css`
118
- padding: 0 16px;
119
- `,
120
- }
121
-
122
- export const $propToggle = {
123
- host: css`
124
- display: flex;
125
- align-items: center;
126
- padding: 0;
127
- margin-top: 16px;
128
-
129
- background: none;
130
- outline: inherit;
131
- border: none;
132
-
133
- cursor: pointer;
134
- color: inherit;
135
-
136
- font-size: 13px;
137
168
 
138
- svg {
139
- font-size: 13px;
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
+ }
140
177
  }
178
+ }
179
+ }
180
+ `;
141
181
 
142
- &:hover {
143
- svg { // in the future it should be deprecated
144
- transition: all ease-in .1s;
145
- color: var(--atlas-comp-apiref-properties-color--active);
146
- }
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;
147
192
  }
148
- `,
149
- link: css`
150
- text-decoration: none;
151
- cursor: pointer;
152
- margin-left: 4px;
193
+ }
153
194
 
154
- &:hover {
155
- transition: all ease-in .1s;
156
- color: var(--atlas-comp-apiref-properties-color--active);
195
+ [part="examples-list"] {
196
+ display: inline;
197
+
198
+ xyd-badge {
199
+ margin-right: 2px;
157
200
  }
158
- `
159
- }
201
+ }
202
+ `;