@oxide/design-system 3.0.3--canary.148.17948310749.0 → 3.0.3--canary.148.17952731885.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
@@ -24,10 +24,7 @@ For more information checkout [auto's docs](https://intuit.github.io/auto/docs).
24
24
 
25
25
  To ensure consistency between our designs and implementation we use the
26
26
  [Design Tokens Plugin](https://www.figma.com/community/plugin/888356646278934516/Design-Tokens)
27
- inside of figma to export a [json tokens file](styles/src/tokens.json) to the repo. When
28
- that file is changed the [build-themes](.github/workflows/build-themes.yaml) workflow runs
29
- to generate theme stylesheets, a tailwind token file, and other artifacts in
30
- [dist](styles/dist/).
27
+ inside of figma to export a [json tokens file](styles/src/tokens.json) to the repo. The user can then run `npm run build` to generate theme files. This is not automatic, the user should then commit the changes.
31
28
 
32
29
  The design tokens plugin is two way so token changes made in the json file can be synced
33
30
  back with figma.
@@ -46,7 +43,6 @@ icon component as shown below:
46
43
 
47
44
  ```tsx
48
45
  import { type Icon as IconType } from '@oxide/design-system/icons'
49
-
50
46
  // Cannot be imported through '@oxide/design-system'
51
47
  import sprite from '../../node_modules/@oxide/design-system/icons/sprite.svg'
52
48
 
package/dist/button.css CHANGED
@@ -41,14 +41,14 @@ label {
41
41
  }
42
42
 
43
43
  &.btn-ghost {
44
- @apply text-secondary hover:bg-hover disabled:bg-transparent disabled:text-disabled;
44
+ @apply text-secondary hover:bg-hover disabled:text-disabled disabled:bg-transparent;
45
45
  }
46
46
  &.btn-ghost:after {
47
47
  @apply text-neutral-300 opacity-100;
48
48
  }
49
49
 
50
50
  &.btn-accent-ghost {
51
- @apply border text-accent border-accent-secondary hover:bg-accent-secondary-hover;
51
+ @apply text-accent border-accent-secondary hover:bg-accent-secondary-hover border;
52
52
  }
53
53
 
54
54
  &.btn-accent-ghost:after {
@@ -16,12 +16,12 @@ declare function useActiveSectionTracking(initialSections: Element[], onSectionC
16
16
  declare const DesktopOutline: ({ toc, activeItem, className, }: {
17
17
  toc: DocumentSection[];
18
18
  activeItem: string;
19
- className?: string | undefined;
19
+ className?: string;
20
20
  }) => react_jsx_runtime.JSX.Element | null;
21
21
  declare const SmallScreenOutline: ({ toc, activeItem, className, }: {
22
22
  toc: DocumentSection[];
23
23
  activeItem: string;
24
- className?: string | undefined;
24
+ className?: string;
25
25
  }) => react_jsx_runtime.JSX.Element | null;
26
26
 
27
27
  interface Path {
@@ -41,7 +41,7 @@ declare const attrs: {
41
41
  stylesheet: boolean;
42
42
  };
43
43
  declare const loadAsciidoctor: ({ extensions, }: {
44
- extensions?: ((this: Registry) => void)[] | undefined;
44
+ extensions?: ((this: Registry) => void)[];
45
45
  }) => _asciidoctor_core.Asciidoctor;
46
46
  declare const handleDocument: (document: Document) => Promise<_oxide_react_asciidoc.DocumentBlock>;
47
47
 
@@ -10,7 +10,7 @@ import asciidoctor2 from "@asciidoctor/core";
10
10
  import { Content as Content4 } from "@oxide/react-asciidoc";
11
11
 
12
12
  // components/src/asciidoc/Admonition.tsx
13
- import { Content, Title, parse } from "@oxide/react-asciidoc";
13
+ import { Content, parse, Title } from "@oxide/react-asciidoc";
14
14
 
15
15
  // components/src/utils.ts
16
16
  import cn from "classnames";
@@ -132,7 +132,7 @@ var Section = ({ node }) => {
132
132
  /* @__PURE__ */ jsx2("span", { className: "anchor", id: node.id || "", "aria-hidden": "true" }),
133
133
  /* @__PURE__ */ jsxs2("a", { className: "link group", href: `#${node.id}`, children: [
134
134
  parse2(stripAnchors(node.title)),
135
- /* @__PURE__ */ jsx2(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
135
+ /* @__PURE__ */ jsx2(Link16Icon_default, { className: "text-accent-secondary ml-2 hidden group-hover:inline-block" })
136
136
  ] })
137
137
  ] });
138
138
  if (level === 0) {
@@ -322,7 +322,7 @@ var DesktopOutline = ({
322
322
  "li",
323
323
  {
324
324
  "data-level": item.level,
325
- className: cn3("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
325
+ className: cn3("text-sans-sm mb-0 list-none", item.level > 2 && "hidden"),
326
326
  children: /* @__PURE__ */ jsx4(
327
327
  "a",
328
328
  {
@@ -359,7 +359,7 @@ var SmallScreenOutline = ({
359
359
  "li",
360
360
  {
361
361
  "data-level": item.level,
362
- className: cn3("list-none text-sans-sm", item.level > 2 && "hidden"),
362
+ className: cn3("text-sans-sm list-none", item.level > 2 && "hidden"),
363
363
  children: /* @__PURE__ */ jsx4(
364
364
  "a",
365
365
  {
@@ -386,19 +386,19 @@ var SmallScreenOutline = ({
386
386
  {
387
387
  type: "single",
388
388
  className: cn3(
389
- "toc sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block w-full border-b border-t bg-default border-secondary print:hidden",
389
+ "toc bg-default border-secondary sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block w-full border-b border-t print:hidden",
390
390
  className
391
391
  ),
392
392
  collapsible: true,
393
393
  value,
394
394
  onValueChange: setValue,
395
395
  children: /* @__PURE__ */ jsxs3(Accordion.Item, { value: "toc", children: [
396
- /* @__PURE__ */ jsx4(Accordion.Header, { children: /* @__PURE__ */ jsxs3(Accordion.Trigger, { className: "flex h-12 w-full items-center justify-between text-sans-md text-default hover:bg-hover px-(--container-px) [&>svg]:data-[state=open]:rotate-90", children: [
396
+ /* @__PURE__ */ jsx4(Accordion.Header, { children: /* @__PURE__ */ jsxs3(Accordion.Trigger, { className: "text-sans-md text-default hover:bg-hover px-(--container-px) flex h-12 w-full items-center justify-between [&>svg]:data-[state=open]:rotate-90", children: [
397
397
  "Table of Contents",
398
398
  " ",
399
- /* @__PURE__ */ jsx4(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
399
+ /* @__PURE__ */ jsx4(DirectionRightIcon_default, { className: "text-tertiary transition-all" })
400
400
  ] }) }),
401
- /* @__PURE__ */ jsx4(Accordion.Content, { className: "animated-accordion hydrated max-h-[60vh] overflow-y-scroll w-full border-t border-secondary px-(--container-px)", children: /* @__PURE__ */ jsx4("div", { className: "py-4", children: renderToc(toc) }) })
401
+ /* @__PURE__ */ jsx4(Accordion.Content, { className: "animated-accordion hydrated border-secondary px-(--container-px) max-h-[60vh] w-full overflow-y-scroll border-t", children: /* @__PURE__ */ jsx4("div", { className: "py-4", children: renderToc(toc) }) })
402
402
  ] })
403
403
  }
404
404
  );
@@ -442,7 +442,7 @@ import {
442
442
  } from "@oxide/react-asciidoc";
443
443
  import {
444
444
  bundledLanguages,
445
- getHighlighter
445
+ createHighlighter
446
446
  } from "shiki";
447
447
 
448
448
  // components/src/asciidoc/langs/oxql.tmLanguage.json
@@ -1895,7 +1895,7 @@ async function getOrCreateHighlighter() {
1895
1895
  langs.push({
1896
1896
  ...oxql_tmLanguage_default
1897
1897
  });
1898
- highlighter = await getHighlighter({
1898
+ highlighter = await createHighlighter({
1899
1899
  themes: [oxide_dark_default],
1900
1900
  langs
1901
1901
  });
@@ -2096,7 +2096,7 @@ var Badge = ({
2096
2096
  className: cn4(
2097
2097
  "ox-badge ring ring-inset",
2098
2098
  `variant-${variant}`,
2099
- "inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",
2099
+ "text-mono-sm inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase",
2100
2100
  badgeColors[variant][color],
2101
2101
  className
2102
2102
  ),
@@ -2264,7 +2264,7 @@ var Tabs = {
2264
2264
  // components/src/ui/checkbox/Checkbox.tsx
2265
2265
  import cn8 from "classnames";
2266
2266
  import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
2267
- var Check = () => /* @__PURE__ */ jsx10(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
2267
+ var Check = () => /* @__PURE__ */ jsx10(Checkmark12Icon_default, { className: "text-accent pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current" });
2268
2268
  var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
2269
2269
  var inputStyle = `
2270
2270
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
@@ -2294,11 +2294,11 @@ var Checkbox = ({
2294
2294
  inputProps.checked && !indeterminate && /* @__PURE__ */ jsx10(Check, {}),
2295
2295
  indeterminate && /* @__PURE__ */ jsx10(Indeterminate, {})
2296
2296
  ] }),
2297
- children && /* @__PURE__ */ jsx10("span", { className: "ml-2.5 text-sans-md text-secondary", children })
2297
+ children && /* @__PURE__ */ jsx10("span", { className: "text-sans-md text-secondary ml-2.5", children })
2298
2298
  ] });
2299
2299
 
2300
2300
  // components/src/ui/listbox/Listbox.tsx
2301
- import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
2301
+ import { flip, FloatingPortal, offset, size, useFloating } from "@floating-ui/react";
2302
2302
  import { Listbox as Select } from "@headlessui/react";
2303
2303
  import cn9 from "classnames";
2304
2304
  import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
@@ -2343,12 +2343,11 @@ var Listbox = ({
2343
2343
  name,
2344
2344
  ref: refs.setReference,
2345
2345
  className: cn9(
2346
- `flex h-10 w-full items-center justify-between
2347
- rounded border text-sans-md`,
2346
+ `text-sans-md flex h-10 w-full items-center justify-between rounded border`,
2348
2347
  hasError ? "focus-error border-error-secondary hover:border-error" : "border-default hover:border-hover",
2349
- open && "ring-2 ring-accent-secondary",
2348
+ open && "ring-accent-secondary ring-2",
2350
2349
  open && hasError && "ring-error-secondary",
2351
- isDisabled ? "cursor-not-allowed text-disabled bg-disabled !border-default" : "bg-default",
2350
+ isDisabled ? "text-disabled bg-disabled !border-default cursor-not-allowed" : "bg-default",
2352
2351
  isDisabled && hasError && "!border-error-secondary"
2353
2352
  ),
2354
2353
  ...props,
@@ -2361,9 +2360,9 @@ var Listbox = ({
2361
2360
  /* @__PURE__ */ jsx11(
2362
2361
  "div",
2363
2362
  {
2364
- className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
2363
+ className: "border-secondary ml-3 flex h-[calc(100%-12px)] items-center border-l px-3",
2365
2364
  "aria-hidden": true,
2366
- children: /* @__PURE__ */ jsx11(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
2365
+ children: /* @__PURE__ */ jsx11(SelectArrows6Icon_default, { className: "text-tertiary h-[14px] w-2" })
2367
2366
  }
2368
2367
  )
2369
2368
  ]
@@ -2379,7 +2378,7 @@ var Listbox = ({
2379
2378
  Select.Option,
2380
2379
  {
2381
2380
  value: item.value,
2382
- className: "relative border-b border-secondary last:border-0",
2381
+ className: "border-secondary relative border-b last:border-0",
2383
2382
  children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx11(
2384
2383
  "div",
2385
2384
  {