@xyd-js/atlas 0.1.0-xyd.5 → 0.1.0-xyd.57

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