@oxide/design-system 1.8.0--canary.4f06403.0 → 1.8.1--canary.8c893b2.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 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/). A PR should be opened
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-tertiary border-default;
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-tertiary;
25
+ @apply text-secondary;
26
26
  }
27
27
 
28
28
  .asciidoc-body .quoteblock .attribution {
29
- @apply mt-8 text-default;
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-default;
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-default;
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-default;
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-quaternary 800:absolute 800:-left-[72px] 800:mr-0 800:w-[60px] 800:text-right 800:text-sans-lg;
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-default;
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-default;
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-quaternary;
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-tertiary;
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-secondary;
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-secondary;
272
+ @apply normal-case text-default;
273
273
  }
274
274
 
275
275
  .text-mono-code {
@@ -278,14 +278,18 @@
278
278
  letter-spacing: 0;
279
279
  }
280
280
 
281
+ .inline-code {
282
+ @apply text-secondary;
283
+ @apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] text-[0.825rem] bg-raise border-secondary;
284
+ }
285
+
281
286
  .asciidoc-body p code,
282
287
  .asciidoc-body h1 code,
283
288
  .asciidoc-body h2 code,
284
289
  .asciidoc-body h3 code,
285
290
  .asciidoc-body h4 code,
286
- .asciidoc-body h5 code,
287
- .asciidoc-body table code .inline-code {
288
- @apply text-[0.825rem] text-secondary;
291
+ .asciidoc-body h5 code {
292
+ @apply text-[0.825rem] text-default;
289
293
  @apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] bg-raise border-secondary;
290
294
  }
291
295
 
@@ -315,16 +319,16 @@
315
319
  }
316
320
 
317
321
  .asciidoc-body .listingblock pre:not(.highlight) {
318
- @apply text-secondary;
322
+ @apply text-default;
319
323
  }
320
324
 
321
325
  .asciidoc-body .listingblock code[data-lang]:before {
322
- @apply absolute right-2 top-2 block text-mono-xs text-tertiary;
326
+ @apply absolute right-2 top-2 block text-mono-xs text-secondary;
323
327
  content: attr(data-lang);
324
328
  }
325
329
 
326
330
  .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-tertiary bg-raise;
331
+ @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
332
  }
329
333
 
330
334
  .asciidoc-body pre .conum[data-value]:after {
@@ -496,7 +500,7 @@
496
500
  }
497
501
 
498
502
  .asciidoc-body .imageblock .title {
499
- @apply mt-3 max-w-full text-center not-italic text-mono-xs text-tertiary;
503
+ @apply mt-3 max-w-full text-center not-italic text-mono-xs text-secondary;
500
504
  }
501
505
 
502
506
  .asciidoc-body img.wide {
@@ -506,7 +510,7 @@
506
510
  }
507
511
 
508
512
  .asciidoc-body sup.footnote {
509
- @apply text-mono-xs text-tertiary;
513
+ @apply text-mono-xs text-secondary;
510
514
  }
511
515
 
512
516
  .asciidoc-body sup.footnote a {
@@ -524,11 +528,11 @@
524
528
  }
525
529
 
526
530
  .asciidoc-body .title {
527
- @apply mb-2 max-w-[40rem] text-left italic text-sans-lg text-tertiary;
531
+ @apply mb-2 max-w-[40rem] text-left italic text-sans-lg text-secondary;
528
532
  }
529
533
 
530
534
  .asciidoc-body summary.title {
531
- @apply not-italic;
535
+ @apply not-italic text-raise;
532
536
  }
533
537
 
534
538
  .asciidoc-body .conum {
@@ -583,7 +587,7 @@
583
587
  }
584
588
 
585
589
  .asciidoc-body table th {
586
- @apply text-left text-mono-xs text-tertiary bg-raise;
590
+ @apply text-left text-mono-xs text-secondary bg-raise;
587
591
  }
588
592
 
589
593
  .asciidoc-body table th p {
@@ -611,7 +615,7 @@
611
615
  }
612
616
 
613
617
  .asciidoc-body .colist table tr td:first-of-type {
614
- @apply w-[1%] whitespace-nowrap text-quaternary;
618
+ @apply w-[1%] whitespace-nowrap text-tertiary;
615
619
  }
616
620
 
617
621
  .asciidoc-body .colist table b {
@@ -643,9 +647,67 @@
643
647
  @apply bg-raise p-4 rounded-lg my-8 px-6 py-5;
644
648
  }
645
649
 
646
- /* Boosting body text for long text readability */
647
- .asciidoc-body p {
648
- color: #c8cacb;
650
+ #footnotes p a {
651
+ @apply accent-link;
652
+ }
653
+
654
+ #footnotes p code {
655
+ @apply inline-code;
656
+ }
657
+
658
+ .toc .active code {
659
+ @apply border-accent-tertiary;
660
+ }
661
+
662
+ .toc code {
663
+ @apply ml-[1px] mr-[1px] rounded border px-[3px] align-[1px] border-secondary;
664
+ }
665
+
666
+ .asciidoc-body a:not(:is(h1, h2, h3, h4, h5, h6) a) {
667
+ text-decoration-color: rgba(var(--content-accent-tertiary-rgb), 0.8);
668
+ @apply underline text-accent-secondary;
669
+ }
670
+
671
+ @media screen and (min-width: 720px) {
672
+ .animated-accordion[data-state='open'].hydrated {
673
+ animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
674
+ }
675
+ .animated-accordion[data-state='closed'].hydrated {
676
+ animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
677
+ }
678
+ }
679
+
680
+ @media screen and (min-width: 720px) {
681
+ .animated-accordion {
682
+ overflow: hidden;
683
+ }
684
+ }
685
+
686
+ @media screen and (prefers-reduced-motion) {
687
+ .animated-accordion[data-state='open'] {
688
+ animation-name: none;
689
+ }
690
+ .animated-accordion[data-state='closed'] {
691
+ animation-name: none;
692
+ }
693
+ }
694
+
695
+ @keyframes accordionSlideDown {
696
+ from {
697
+ height: 0;
698
+ }
699
+ to {
700
+ height: var(--radix-accordion-content-height);
701
+ }
702
+ }
703
+
704
+ @keyframes accordionSlideUp {
705
+ from {
706
+ height: var(--radix-accordion-content-height);
707
+ }
708
+ to {
709
+ height: 0;
710
+ }
649
711
  }
650
712
 
651
713
  @media print {
@@ -729,7 +791,7 @@
729
791
  }
730
792
 
731
793
  .asciidoc-body .admonitionblock {
732
- color: var(--content-default) !important;
794
+ color: var(--content-raise) !important;
733
795
  background-color: var(--surface-raise) !important;
734
796
  }
735
797
  }
@@ -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 };