@oxide/design-system 1.8.0--canary.4f06403.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 +66 -29
- 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
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.asciidoc-body .quoteblock {
|
|
21
|
-
@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;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.asciidoc-body .quoteblock p {
|
|
25
|
-
@apply text-
|
|
25
|
+
@apply text-secondary;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.asciidoc-body .quoteblock .attribution {
|
|
29
|
-
@apply mt-8 text-
|
|
29
|
+
@apply mt-8 text-raise;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.asciidoc-body .attribution cite {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
/* Use semi-bold for strong */
|
|
76
76
|
.asciidoc-body strong {
|
|
77
|
-
@apply font-[500] text-
|
|
77
|
+
@apply font-[500] text-raise;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.asciidoc-body a strong {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
.asciidoc-body h3,
|
|
86
86
|
.asciidoc-body h4,
|
|
87
87
|
.asciidoc-body h5 {
|
|
88
|
-
@apply relative mb-3 mt-10 text-
|
|
88
|
+
@apply relative mb-3 mt-10 text-raise;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/* Removes top spacing from header if it is the first element */
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
.asciidoc-body h3 a,
|
|
103
103
|
.asciidoc-body h4 a,
|
|
104
104
|
.asciidoc-body h5 a {
|
|
105
|
-
@apply flex items-center text-
|
|
105
|
+
@apply flex items-center text-raise;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.asciidoc-body h1[data-sectnum]:before,
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
.asciidoc-body h3[data-sectnum]:before,
|
|
111
111
|
.asciidoc-body h4[data-sectnum]:before,
|
|
112
112
|
.asciidoc-body h5[data-sectnum]:before {
|
|
113
|
-
@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;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.asciidoc-body h3[data-sectnum]:before,
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
|
|
129
129
|
.asciidoc-body h4,
|
|
130
130
|
.asciidoc-body h5 {
|
|
131
|
-
@apply mb-2 mt-8 text-sans-lg text-
|
|
131
|
+
@apply mb-2 mt-8 text-sans-lg text-raise;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.asciidoc-body .anchor {
|
|
@@ -139,12 +139,12 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.asciidoc-body .dlist dt {
|
|
142
|
-
@apply text-sans-lg text-
|
|
142
|
+
@apply text-sans-lg text-raise;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.asciidoc-body .dlist dt:after {
|
|
146
146
|
content: ':';
|
|
147
|
-
@apply text-sans-lg text-
|
|
147
|
+
@apply text-sans-lg text-tertiary;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.asciidoc-body {
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
.asciidoc-body ul,
|
|
169
169
|
.asciidoc-body ol {
|
|
170
|
-
@apply mb-4 list-disc text-mono-sm text-
|
|
170
|
+
@apply mb-4 list-disc text-mono-sm text-secondary;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
.asciidoc-body ul p,
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.asciidoc-body p {
|
|
248
|
-
@apply text-
|
|
248
|
+
@apply text-default;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
.asciidoc-body .arabic {
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.asciidoc-body ol p {
|
|
272
|
-
@apply normal-case text-
|
|
272
|
+
@apply normal-case text-default;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.text-mono-code {
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
.asciidoc-body h4 code,
|
|
286
286
|
.asciidoc-body h5 code,
|
|
287
287
|
.asciidoc-body table code .inline-code {
|
|
288
|
-
@apply text-[0.825rem] text-
|
|
288
|
+
@apply text-[0.825rem] text-default;
|
|
289
289
|
@apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] bg-raise border-secondary;
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -315,16 +315,16 @@
|
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
.asciidoc-body .listingblock pre:not(.highlight) {
|
|
318
|
-
@apply text-
|
|
318
|
+
@apply text-default;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.asciidoc-body .listingblock code[data-lang]:before {
|
|
322
|
-
@apply absolute right-2 top-2 block text-mono-xs text-
|
|
322
|
+
@apply absolute right-2 top-2 block text-mono-xs text-secondary;
|
|
323
323
|
content: attr(data-lang);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
.asciidoc-body pre .conum[data-value] {
|
|
327
|
-
@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;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.asciidoc-body pre .conum[data-value]:after {
|
|
@@ -496,7 +496,7 @@
|
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
.asciidoc-body .imageblock .title {
|
|
499
|
-
@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;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
.asciidoc-body img.wide {
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.asciidoc-body sup.footnote {
|
|
509
|
-
@apply text-mono-xs text-
|
|
509
|
+
@apply text-mono-xs text-secondary;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
.asciidoc-body sup.footnote a {
|
|
@@ -524,11 +524,11 @@
|
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
.asciidoc-body .title {
|
|
527
|
-
@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;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
.asciidoc-body summary.title {
|
|
531
|
-
@apply not-italic;
|
|
531
|
+
@apply not-italic text-raise;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
.asciidoc-body .conum {
|
|
@@ -583,7 +583,7 @@
|
|
|
583
583
|
}
|
|
584
584
|
|
|
585
585
|
.asciidoc-body table th {
|
|
586
|
-
@apply text-left text-mono-xs text-
|
|
586
|
+
@apply text-left text-mono-xs text-secondary bg-raise;
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
.asciidoc-body table th p {
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
.asciidoc-body .colist table tr td:first-of-type {
|
|
614
|
-
@apply w-[1%] whitespace-nowrap text-
|
|
614
|
+
@apply w-[1%] whitespace-nowrap text-tertiary;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
.asciidoc-body .colist table b {
|
|
@@ -643,11 +643,6 @@
|
|
|
643
643
|
@apply bg-raise p-4 rounded-lg my-8 px-6 py-5;
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
/* Boosting body text for long text readability */
|
|
647
|
-
.asciidoc-body p {
|
|
648
|
-
color: #c8cacb;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
646
|
@media print {
|
|
652
647
|
html {
|
|
653
648
|
font-size: 14px !important;
|
|
@@ -729,8 +724,50 @@
|
|
|
729
724
|
}
|
|
730
725
|
|
|
731
726
|
.asciidoc-body .admonitionblock {
|
|
732
|
-
color: var(--content-
|
|
727
|
+
color: var(--content-raise) !important;
|
|
733
728
|
background-color: var(--surface-raise) !important;
|
|
734
729
|
}
|
|
735
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
|
+
}
|
|
736
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 };
|