@oxide/design-system 1.8.0--canary.7d8d904.0 → 1.8.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.
- package/README.md +1 -3
- package/components/dist/asciidoc.css +73 -43
- package/components/dist/index.d.ts +52 -1
- package/components/dist/index.js +2230 -226
- package/components/dist/index.js.map +1 -1
- package/package.json +11 -3
- package/styles/dist/{tailwind-tokens.js → tailwind-tokens.ts} +19 -19
package/README.md
CHANGED
|
@@ -35,9 +35,7 @@ back with figma.
|
|
|
35
35
|
## Exporting Icons
|
|
36
36
|
|
|
37
37
|
Icons are also exported from figma using
|
|
38
|
-
[figma export cli](https://figma-export.marcomontalbano.com/).
|
|
39
|
-
automatically for updating icons via the
|
|
40
|
-
[update-icons workflow](.github/workflows/update-icons.yaml).
|
|
38
|
+
[figma export cli](https://figma-export.marcomontalbano.com/).
|
|
41
39
|
|
|
42
40
|
Icons are processed and exported as SVGs for direct use in environments where SVGR is
|
|
43
41
|
supported (like our web console). However, for other internal sites such as the marketing
|
|
@@ -7,20 +7,26 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
@layer components {
|
|
10
|
+
.accent-link {
|
|
11
|
+
@apply text-accent-secondary hover:text-accent;
|
|
12
|
+
text-decoration: underline;
|
|
13
|
+
text-decoration-color: var(--content-accent-tertiary);
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
.asciidoc-body .line-through {
|
|
11
17
|
text-decoration: line-through;
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
.asciidoc-body .quoteblock {
|
|
15
|
-
@apply mb-8 mt-8 border-l pl-[1.6rem] text-
|
|
21
|
+
@apply mb-8 mt-8 border-l pl-[1.6rem] text-secondary border-default;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
.asciidoc-body .quoteblock p {
|
|
19
|
-
@apply text-
|
|
25
|
+
@apply text-secondary;
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
.asciidoc-body .quoteblock .attribution {
|
|
23
|
-
@apply mt-8 text-
|
|
29
|
+
@apply mt-8 text-raise;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
.asciidoc-body .attribution cite {
|
|
@@ -68,7 +74,7 @@
|
|
|
68
74
|
|
|
69
75
|
/* Use semi-bold for strong */
|
|
70
76
|
.asciidoc-body strong {
|
|
71
|
-
@apply font-[500] text-
|
|
77
|
+
@apply font-[500] text-raise;
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
.asciidoc-body a strong {
|
|
@@ -79,7 +85,7 @@
|
|
|
79
85
|
.asciidoc-body h3,
|
|
80
86
|
.asciidoc-body h4,
|
|
81
87
|
.asciidoc-body h5 {
|
|
82
|
-
@apply relative mb-3 mt-10 text-
|
|
88
|
+
@apply relative mb-3 mt-10 text-raise;
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
/* Removes top spacing from header if it is the first element */
|
|
@@ -96,7 +102,7 @@
|
|
|
96
102
|
.asciidoc-body h3 a,
|
|
97
103
|
.asciidoc-body h4 a,
|
|
98
104
|
.asciidoc-body h5 a {
|
|
99
|
-
@apply flex items-center text-
|
|
105
|
+
@apply flex items-center text-raise;
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
.asciidoc-body h1[data-sectnum]:before,
|
|
@@ -104,7 +110,7 @@
|
|
|
104
110
|
.asciidoc-body h3[data-sectnum]:before,
|
|
105
111
|
.asciidoc-body h4[data-sectnum]:before,
|
|
106
112
|
.asciidoc-body h5[data-sectnum]:before {
|
|
107
|
-
@apply bottom-0 mr-2 inline-block text-
|
|
113
|
+
@apply bottom-0 mr-2 inline-block text-tertiary 800:absolute 800:-left-[72px] 800:mr-0 800:w-[60px] 800:text-right 800:text-sans-lg;
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
.asciidoc-body h3[data-sectnum]:before,
|
|
@@ -122,7 +128,7 @@
|
|
|
122
128
|
|
|
123
129
|
.asciidoc-body h4,
|
|
124
130
|
.asciidoc-body h5 {
|
|
125
|
-
@apply mb-2 mt-8 text-sans-lg text-
|
|
131
|
+
@apply mb-2 mt-8 text-sans-lg text-raise;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
.asciidoc-body .anchor {
|
|
@@ -133,12 +139,12 @@
|
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
.asciidoc-body .dlist dt {
|
|
136
|
-
@apply text-sans-lg text-
|
|
142
|
+
@apply text-sans-lg text-raise;
|
|
137
143
|
}
|
|
138
144
|
|
|
139
145
|
.asciidoc-body .dlist dt:after {
|
|
140
146
|
content: ':';
|
|
141
|
-
@apply text-sans-lg text-
|
|
147
|
+
@apply text-sans-lg text-tertiary;
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
.asciidoc-body {
|
|
@@ -161,7 +167,7 @@
|
|
|
161
167
|
|
|
162
168
|
.asciidoc-body ul,
|
|
163
169
|
.asciidoc-body ol {
|
|
164
|
-
@apply mb-4 list-disc text-mono-sm text-
|
|
170
|
+
@apply mb-4 list-disc text-mono-sm text-secondary;
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
.asciidoc-body ul p,
|
|
@@ -239,7 +245,7 @@
|
|
|
239
245
|
}
|
|
240
246
|
|
|
241
247
|
.asciidoc-body p {
|
|
242
|
-
@apply text-
|
|
248
|
+
@apply text-default;
|
|
243
249
|
}
|
|
244
250
|
|
|
245
251
|
.asciidoc-body .arabic {
|
|
@@ -263,7 +269,7 @@
|
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
.asciidoc-body ol p {
|
|
266
|
-
@apply normal-case text-
|
|
272
|
+
@apply normal-case text-default;
|
|
267
273
|
}
|
|
268
274
|
|
|
269
275
|
.text-mono-code {
|
|
@@ -278,8 +284,8 @@
|
|
|
278
284
|
.asciidoc-body h3 code,
|
|
279
285
|
.asciidoc-body h4 code,
|
|
280
286
|
.asciidoc-body h5 code,
|
|
281
|
-
.asciidoc-body table code {
|
|
282
|
-
@apply text-
|
|
287
|
+
.asciidoc-body table code .inline-code {
|
|
288
|
+
@apply text-[0.825rem] text-default;
|
|
283
289
|
@apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] bg-raise border-secondary;
|
|
284
290
|
}
|
|
285
291
|
|
|
@@ -300,19 +306,6 @@
|
|
|
300
306
|
@apply overflow-x-auto !text-[13px] text-mono-code;
|
|
301
307
|
}
|
|
302
308
|
|
|
303
|
-
.asciidoc-body h1 code,
|
|
304
|
-
.asciidoc-body h2 code,
|
|
305
|
-
.asciidoc-body h3 code,
|
|
306
|
-
.asciidoc-body h4 code,
|
|
307
|
-
.asciidoc-body h5 code {
|
|
308
|
-
@apply text-[0.825em];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.asciidoc-body .paragraph > code,
|
|
312
|
-
.asciidoc-body p code {
|
|
313
|
-
@apply text-[0.825rem];
|
|
314
|
-
}
|
|
315
|
-
|
|
316
309
|
.asciidoc-body code {
|
|
317
310
|
font-feature-settings: 'calt' 0;
|
|
318
311
|
}
|
|
@@ -322,16 +315,16 @@
|
|
|
322
315
|
}
|
|
323
316
|
|
|
324
317
|
.asciidoc-body .listingblock pre:not(.highlight) {
|
|
325
|
-
@apply text-
|
|
318
|
+
@apply text-default;
|
|
326
319
|
}
|
|
327
320
|
|
|
328
321
|
.asciidoc-body .listingblock code[data-lang]:before {
|
|
329
|
-
@apply absolute right-2 top-2 block text-mono-xs text-
|
|
322
|
+
@apply absolute right-2 top-2 block text-mono-xs text-secondary;
|
|
330
323
|
content: attr(data-lang);
|
|
331
324
|
}
|
|
332
325
|
|
|
333
326
|
.asciidoc-body pre .conum[data-value] {
|
|
334
|
-
@apply relative -top-[0.125rem] inline-block h-[1rem] min-w-[1rem] rounded-full text-center not-italic text-mono-xs text-
|
|
327
|
+
@apply relative -top-[0.125rem] inline-block h-[1rem] min-w-[1rem] rounded-full text-center not-italic text-mono-xs text-secondary bg-raise;
|
|
335
328
|
}
|
|
336
329
|
|
|
337
330
|
.asciidoc-body pre .conum[data-value]:after {
|
|
@@ -503,7 +496,7 @@
|
|
|
503
496
|
}
|
|
504
497
|
|
|
505
498
|
.asciidoc-body .imageblock .title {
|
|
506
|
-
@apply mt-3 max-w-full text-center not-italic text-mono-xs text-
|
|
499
|
+
@apply mt-3 max-w-full text-center not-italic text-mono-xs text-secondary;
|
|
507
500
|
}
|
|
508
501
|
|
|
509
502
|
.asciidoc-body img.wide {
|
|
@@ -513,7 +506,7 @@
|
|
|
513
506
|
}
|
|
514
507
|
|
|
515
508
|
.asciidoc-body sup.footnote {
|
|
516
|
-
@apply text-mono-xs text-
|
|
509
|
+
@apply text-mono-xs text-secondary;
|
|
517
510
|
}
|
|
518
511
|
|
|
519
512
|
.asciidoc-body sup.footnote a {
|
|
@@ -531,11 +524,11 @@
|
|
|
531
524
|
}
|
|
532
525
|
|
|
533
526
|
.asciidoc-body .title {
|
|
534
|
-
@apply mb-2 max-w-[40rem] text-left italic text-sans-lg text-
|
|
527
|
+
@apply mb-2 max-w-[40rem] text-left italic text-sans-lg text-secondary;
|
|
535
528
|
}
|
|
536
529
|
|
|
537
530
|
.asciidoc-body summary.title {
|
|
538
|
-
@apply not-italic;
|
|
531
|
+
@apply not-italic text-raise;
|
|
539
532
|
}
|
|
540
533
|
|
|
541
534
|
.asciidoc-body .conum {
|
|
@@ -590,7 +583,7 @@
|
|
|
590
583
|
}
|
|
591
584
|
|
|
592
585
|
.asciidoc-body table th {
|
|
593
|
-
@apply text-left text-mono-xs text-
|
|
586
|
+
@apply text-left text-mono-xs text-secondary bg-raise;
|
|
594
587
|
}
|
|
595
588
|
|
|
596
589
|
.asciidoc-body table th p {
|
|
@@ -618,7 +611,7 @@
|
|
|
618
611
|
}
|
|
619
612
|
|
|
620
613
|
.asciidoc-body .colist table tr td:first-of-type {
|
|
621
|
-
@apply w-[1%] whitespace-nowrap text-
|
|
614
|
+
@apply w-[1%] whitespace-nowrap text-tertiary;
|
|
622
615
|
}
|
|
623
616
|
|
|
624
617
|
.asciidoc-body .colist table b {
|
|
@@ -650,11 +643,6 @@
|
|
|
650
643
|
@apply bg-raise p-4 rounded-lg my-8 px-6 py-5;
|
|
651
644
|
}
|
|
652
645
|
|
|
653
|
-
/* Boosting body text for long text readability */
|
|
654
|
-
.asciidoc-body p {
|
|
655
|
-
color: #c8cacb;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
646
|
@media print {
|
|
659
647
|
html {
|
|
660
648
|
font-size: 14px !important;
|
|
@@ -736,8 +724,50 @@
|
|
|
736
724
|
}
|
|
737
725
|
|
|
738
726
|
.asciidoc-body .admonitionblock {
|
|
739
|
-
color: var(--content-
|
|
727
|
+
color: var(--content-raise) !important;
|
|
740
728
|
background-color: var(--surface-raise) !important;
|
|
741
729
|
}
|
|
742
730
|
}
|
|
731
|
+
|
|
732
|
+
@media screen and (min-width: 720px) {
|
|
733
|
+
.animated-accordion[data-state='open'].hydrated {
|
|
734
|
+
animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
735
|
+
}
|
|
736
|
+
.animated-accordion[data-state='closed'].hydrated {
|
|
737
|
+
animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
@media screen and (min-width: 720px) {
|
|
742
|
+
.animated-accordion {
|
|
743
|
+
overflow: hidden;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
@media screen and (prefers-reduced-motion) {
|
|
748
|
+
.animated-accordion[data-state='open'] {
|
|
749
|
+
animation-name: none;
|
|
750
|
+
}
|
|
751
|
+
.animated-accordion[data-state='closed'] {
|
|
752
|
+
animation-name: none;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
@keyframes accordionSlideDown {
|
|
757
|
+
from {
|
|
758
|
+
height: 0;
|
|
759
|
+
}
|
|
760
|
+
to {
|
|
761
|
+
height: var(--radix-accordion-content-height);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
@keyframes accordionSlideUp {
|
|
766
|
+
from {
|
|
767
|
+
height: var(--radix-accordion-content-height);
|
|
768
|
+
}
|
|
769
|
+
to {
|
|
770
|
+
height: 0;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
743
773
|
}
|
|
@@ -1,10 +1,42 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _oxide_react_asciidoc from '@oxide/react-asciidoc';
|
|
3
|
+
import { DocumentSection, Block, DocumentBlock } from '@oxide/react-asciidoc';
|
|
4
|
+
import * as _asciidoctor_core from '@asciidoctor/core';
|
|
5
|
+
import { Registry, Document, Html5Converter, Block as Block$1 } from '@asciidoctor/core';
|
|
3
6
|
import * as react from 'react';
|
|
4
7
|
import { ReactNode } from 'react';
|
|
5
8
|
import { TabsProps, TabsTriggerProps, TabsListProps, TabsContentProps } from '@radix-ui/react-tabs';
|
|
6
9
|
import { SetRequired } from 'type-fest';
|
|
7
10
|
|
|
11
|
+
declare function useIntersectionObserver(elements: Element[], callback: IntersectionObserverCallback, options: IntersectionObserverInit): IntersectionObserver | null;
|
|
12
|
+
declare function useActiveSectionTracking(initialSections: Element[], onSectionChange: (element: Element) => void, debug?: boolean): {
|
|
13
|
+
setSections: (sections: Element[]) => void;
|
|
14
|
+
debugNode: react_jsx_runtime.JSX.Element | null;
|
|
15
|
+
};
|
|
16
|
+
declare const DesktopOutline: ({ toc, activeItem, className, }: {
|
|
17
|
+
toc: DocumentSection[];
|
|
18
|
+
activeItem: string;
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
21
|
+
declare const SmallScreenOutline: ({ toc, activeItem, className, }: {
|
|
22
|
+
toc: DocumentSection[];
|
|
23
|
+
activeItem: string;
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
26
|
+
|
|
27
|
+
declare function useDelegatedReactRouterLinks(nodeRef: React.RefObject<HTMLElement>, key: string): void;
|
|
28
|
+
|
|
29
|
+
declare const highlight: (block: Block) => Promise<Block>;
|
|
30
|
+
declare const attrs: {
|
|
31
|
+
sectlinks: string;
|
|
32
|
+
stem: string;
|
|
33
|
+
stylesheet: boolean;
|
|
34
|
+
};
|
|
35
|
+
declare const loadAsciidoctor: ({ extensions, }: {
|
|
36
|
+
extensions?: ((this: Registry) => void)[] | undefined;
|
|
37
|
+
}) => _asciidoctor_core.Asciidoctor;
|
|
38
|
+
declare const handleDocument: (document: Document) => Promise<_oxide_react_asciidoc.DocumentBlock>;
|
|
39
|
+
|
|
8
40
|
declare const AsciiDocBlocks: {
|
|
9
41
|
Admonition: ({ node }: {
|
|
10
42
|
node: _oxide_react_asciidoc.AdmonitionBlock;
|
|
@@ -12,7 +44,26 @@ declare const AsciiDocBlocks: {
|
|
|
12
44
|
Table: ({ node }: {
|
|
13
45
|
node: _oxide_react_asciidoc.TableBlock;
|
|
14
46
|
}) => react_jsx_runtime.JSX.Element;
|
|
47
|
+
Section: ({ node }: {
|
|
48
|
+
node: _oxide_react_asciidoc.SectionBlock;
|
|
49
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
50
|
+
MinimalDocument: ({ document }: {
|
|
51
|
+
document: DocumentBlock;
|
|
52
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Adds word break opportunities (<wbr/>) after slashes in text, except within HTML tags.
|
|
56
|
+
* This function is used to improve line breaks for long paths or URLs in rendered content.
|
|
57
|
+
* *
|
|
58
|
+
* renderWithBreaks('/path/to/long/file.txt')
|
|
59
|
+
* '/<wbr/>path/<wbr/>to/<wbr/>long/<wbr/>file.txt'
|
|
60
|
+
*/
|
|
61
|
+
declare const renderWithBreaks: (text: string) => string;
|
|
62
|
+
declare class InlineConverter {
|
|
63
|
+
baseConverter: Html5Converter;
|
|
64
|
+
constructor();
|
|
65
|
+
convert(node: Block$1, transform: string): string;
|
|
66
|
+
}
|
|
16
67
|
|
|
17
68
|
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue';
|
|
18
69
|
type BadgeVariant = 'default' | 'solid';
|
|
@@ -96,4 +147,4 @@ interface ListboxProps<Value extends string = string> {
|
|
|
96
147
|
}
|
|
97
148
|
declare const Listbox: <Value extends string = string>({ name, selected, items, placeholder, className, onChange, hasError, disabled, isLoading, ...props }: ListboxProps<Value>) => react_jsx_runtime.JSX.Element;
|
|
98
149
|
|
|
99
|
-
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, Listbox, ListboxItem, ListboxProps, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, badgeColors, buttonSizes, buttonStyle, spinnerSizes, spinnerVariants, variants };
|
|
150
|
+
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, DesktopOutline, InlineConverter, Listbox, ListboxItem, ListboxProps, SmallScreenOutline, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, attrs, badgeColors, buttonSizes, buttonStyle, handleDocument, highlight, loadAsciidoctor, renderWithBreaks, spinnerSizes, spinnerVariants, useActiveSectionTracking, useDelegatedReactRouterLinks, useIntersectionObserver, variants };
|