@atom63/ui-react 0.2.0-beta.14 → 0.2.0-beta.16

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 (92) hide show
  1. package/dist/chart/index.d.ts +48 -0
  2. package/dist/chart/index.js +309 -0
  3. package/dist/chart/index.js.map +1 -0
  4. package/dist/chunk-3LGXD3HE.js +450 -0
  5. package/dist/chunk-3LGXD3HE.js.map +1 -0
  6. package/dist/{chunk-ASV4A4YB.js → chunk-4HE5IB6K.js} +4 -12
  7. package/dist/chunk-4HE5IB6K.js.map +1 -0
  8. package/dist/chunk-6HKGC3HE.js +3 -0
  9. package/dist/chunk-6HKGC3HE.js.map +1 -0
  10. package/dist/chunk-6VV4EBOO.js +25 -0
  11. package/dist/chunk-6VV4EBOO.js.map +1 -0
  12. package/dist/{chunk-GRRWPMZI.js → chunk-77CBRRVT.js} +47 -7
  13. package/dist/chunk-77CBRRVT.js.map +1 -0
  14. package/dist/{chunk-IXWOWQBP.js → chunk-ALARPBUL.js} +5 -22
  15. package/dist/chunk-ALARPBUL.js.map +1 -0
  16. package/dist/{chunk-L5KFLZUC.js → chunk-BQONJKNA.js} +4 -4
  17. package/dist/{chunk-L5KFLZUC.js.map → chunk-BQONJKNA.js.map} +1 -1
  18. package/dist/{chunk-CFFGYLY3.js → chunk-CO6KHYO5.js} +26 -4
  19. package/dist/chunk-CO6KHYO5.js.map +1 -0
  20. package/dist/chunk-FHL2NLXP.js +101 -0
  21. package/dist/chunk-FHL2NLXP.js.map +1 -0
  22. package/dist/chunk-HPUHI2YJ.js +69 -0
  23. package/dist/chunk-HPUHI2YJ.js.map +1 -0
  24. package/dist/{chunk-BSDSLG3L.js → chunk-IEHYTNLS.js} +7 -4
  25. package/dist/chunk-IEHYTNLS.js.map +1 -0
  26. package/dist/{chunk-TAXYD4I4.js → chunk-IPUBANIB.js} +3 -2
  27. package/dist/chunk-IPUBANIB.js.map +1 -0
  28. package/dist/chunk-QU33S646.js +118 -0
  29. package/dist/chunk-QU33S646.js.map +1 -0
  30. package/dist/{chunk-WLLPGOQ7.js → chunk-SL6J2Y6I.js} +18 -6
  31. package/dist/chunk-SL6J2Y6I.js.map +1 -0
  32. package/dist/{chunk-3R74FOXV.js → chunk-VUUSD5AG.js} +3 -3
  33. package/dist/{chunk-3R74FOXV.js.map → chunk-VUUSD5AG.js.map} +1 -1
  34. package/dist/{chunk-CJAWGKA5.js → chunk-Y52BV635.js} +16 -4
  35. package/dist/chunk-Y52BV635.js.map +1 -0
  36. package/dist/components/art-plate/index.js +7 -0
  37. package/dist/components/art-plate/index.js.map +1 -0
  38. package/dist/components/command/index.js +1 -1
  39. package/dist/components/drawer/index.js +1 -1
  40. package/dist/components/feedback-state/index.js +1 -1
  41. package/dist/components/form/index.js +1 -1
  42. package/dist/components/layered-scene/index.js +7 -0
  43. package/dist/components/layered-scene/index.js.map +1 -0
  44. package/dist/components/pagination/index.js +1 -1
  45. package/dist/components/segmented-control/index.js +1 -1
  46. package/dist/components/sheet/index.js +1 -1
  47. package/dist/components/sidebar/index.js +3 -3
  48. package/dist/components/sidebar-nav-tree/index.js +4 -4
  49. package/dist/components/table/index.js +2 -1
  50. package/dist/{index-DlcaeyJS.d.ts → index-B0PHovoW.d.ts} +10 -3
  51. package/dist/index.d.ts +123 -11
  52. package/dist/index.js +35 -30
  53. package/dist/media/index.d.ts +24 -3
  54. package/dist/media/index.js +9 -361
  55. package/dist/media/index.js.map +1 -1
  56. package/dist/media/media-lightbox/parts/index.js +2 -1
  57. package/dist/preview/index.d.ts +1 -1
  58. package/dist/preview/index.js +7 -7
  59. package/dist/theme/index.d.ts +6 -2
  60. package/dist/theme/index.js +10 -1
  61. package/dist/theme/index.js.map +1 -1
  62. package/package.json +11 -3
  63. package/src/components/alert-dialog/alert-dialog.css +1 -1
  64. package/src/components/art-plate/art-plate.css +172 -0
  65. package/src/components/autocomplete/autocomplete.css +21 -11
  66. package/src/components/chart/chart.css +316 -0
  67. package/src/components/checkbox/checkbox.css +1 -1
  68. package/src/components/command/command.css +13 -0
  69. package/src/components/feedback-state/feedback-state.css +2 -1
  70. package/src/components/field/field.css +1 -1
  71. package/src/components/form/form.css +1 -1
  72. package/src/components/input/input.css +3 -3
  73. package/src/components/input-otp/input-otp.css +3 -3
  74. package/src/components/layered-scene/layered-scene.css +117 -0
  75. package/src/components/load-more-trigger/load-more-trigger.css +4 -2
  76. package/src/components/radio/radio.css +1 -1
  77. package/src/components/rating/rating.css +18 -17
  78. package/src/components/segmented-control/segmented-control.css +11 -11
  79. package/src/components/select/select.css +3 -3
  80. package/src/components/table/table.css +5 -0
  81. package/src/components/textarea/textarea.css +3 -3
  82. package/src/styles/recipes.css +3 -0
  83. package/dist/chunk-ASV4A4YB.js.map +0 -1
  84. package/dist/chunk-BSDSLG3L.js.map +0 -1
  85. package/dist/chunk-CFFGYLY3.js.map +0 -1
  86. package/dist/chunk-CJAWGKA5.js.map +0 -1
  87. package/dist/chunk-GRRWPMZI.js.map +0 -1
  88. package/dist/chunk-IXWOWQBP.js.map +0 -1
  89. package/dist/chunk-T7FUZUZO.js +0 -70
  90. package/dist/chunk-T7FUZUZO.js.map +0 -1
  91. package/dist/chunk-TAXYD4I4.js.map +0 -1
  92. package/dist/chunk-WLLPGOQ7.js.map +0 -1
@@ -1,15 +1,21 @@
1
+ import { Button } from './chunk-CYWNKIIJ.js';
1
2
  import { cn } from './chunk-AJLHJRK6.js';
2
3
  import { tableContract } from '@atom63/ui-foundation';
3
- import { jsx } from 'react/jsx-runtime';
4
+ import { ArrowUp, ArrowDown, ArrowUpDown } from 'lucide-react';
5
+ import { createContext, useContext } from 'react';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
7
 
8
+ var TableSortContext = createContext({});
5
9
  function Table({
6
10
  className,
11
+ onSortChange,
7
12
  size = tableContract.defaultSize,
13
+ sort,
8
14
  tone = tableContract.defaultTone,
9
15
  variant = tableContract.defaultVariant,
10
16
  ...props
11
17
  }) {
12
- return /* @__PURE__ */ jsx(
18
+ return /* @__PURE__ */ jsx(TableSortContext.Provider, { value: { onSortChange, sort }, children: /* @__PURE__ */ jsx(
13
19
  "div",
14
20
  {
15
21
  className: "a63-Table-container",
@@ -19,7 +25,7 @@ function Table({
19
25
  "data-variant": variant,
20
26
  children: /* @__PURE__ */ jsx("table", { className: cn("a63-Table", className), "data-slot": "table", ...props })
21
27
  }
22
- );
28
+ ) });
23
29
  }
24
30
  function TableHeader({ className, ...props }) {
25
31
  return /* @__PURE__ */ jsx("thead", { className: cn("a63-Table-header", className), "data-slot": "table-header", ...props });
@@ -33,14 +39,48 @@ function TableFooter({ className, ...props }) {
33
39
  function TableRow({ className, ...props }) {
34
40
  return /* @__PURE__ */ jsx("tr", { className: cn("a63-Table-row", className), "data-slot": "table-row", ...props });
35
41
  }
36
- function TableHead({ className, sticky, ...props }) {
42
+ function defaultSortIcon(direction) {
43
+ if (direction === "ascending") return /* @__PURE__ */ jsx(ArrowUp, { "aria-hidden": true });
44
+ if (direction === "descending") return /* @__PURE__ */ jsx(ArrowDown, { "aria-hidden": true });
45
+ return /* @__PURE__ */ jsx(ArrowUpDown, { "aria-hidden": true });
46
+ }
47
+ function TableHead({
48
+ children,
49
+ className,
50
+ firstSortDirection = "ascending",
51
+ sortIcon = defaultSortIcon,
52
+ sortKey,
53
+ sticky,
54
+ ...props
55
+ }) {
56
+ const { onSortChange, sort } = useContext(TableSortContext);
57
+ const direction = sortKey !== void 0 && sort?.column === sortKey ? sort.direction : void 0;
37
58
  return /* @__PURE__ */ jsx(
38
59
  "th",
39
60
  {
61
+ "aria-sort": direction,
40
62
  className: cn("a63-Table-head", className),
41
63
  "data-slot": "table-head",
42
64
  "data-sticky": sticky,
43
- ...props
65
+ ...props,
66
+ children: sortKey === void 0 ? children : /* @__PURE__ */ jsxs(
67
+ Button,
68
+ {
69
+ className: "a63-Table-sort-button",
70
+ "data-slot": "table-sort-button",
71
+ onClick: () => onSortChange?.({
72
+ column: sortKey,
73
+ direction: direction === void 0 ? firstSortDirection : direction === "ascending" ? "descending" : "ascending"
74
+ }),
75
+ size: "xs",
76
+ tone: "muted",
77
+ variant: "ghost",
78
+ children: [
79
+ children,
80
+ sortIcon(direction ?? "none")
81
+ ]
82
+ }
83
+ )
44
84
  }
45
85
  );
46
86
  }
@@ -60,5 +100,5 @@ function TableCaption({ className, ...props }) {
60
100
  }
61
101
 
62
102
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
63
- //# sourceMappingURL=chunk-GRRWPMZI.js.map
64
- //# sourceMappingURL=chunk-GRRWPMZI.js.map
103
+ //# sourceMappingURL=chunk-77CBRRVT.js.map
104
+ //# sourceMappingURL=chunk-77CBRRVT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/table/table.tsx"],"names":[],"mappings":";;;;;;;AA+BA,IAAM,gBAAA,GAAmB,aAAA,CAAqC,EAAE,CAAA;AA4BzD,SAAS,KAAA,CAAM;AAAA,EACpB,SAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAO,aAAA,CAAc,WAAA;AAAA,EACrB,IAAA;AAAA,EACA,OAAO,aAAA,CAAc,WAAA;AAAA,EACrB,UAAU,aAAA,CAAc,cAAA;AAAA,EACxB,GAAG;AACL,CAAA,EAAmC;AACjC,EAAA,uBACE,GAAA,CAAC,iBAAiB,QAAA,EAAjB,EAA0B,OAAO,EAAE,YAAA,EAAc,MAAK,EACrD,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,qBAAA;AAAA,MACV,WAAA,EAAW,IAAA,KAAS,SAAA,GAAY,IAAA,GAAO,IAAA;AAAA,MACvC,WAAA,EAAU,iBAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,cAAA,EAAc,OAAA;AAAA,MAEd,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAW,EAAA,CAAG,WAAA,EAAa,SAAS,CAAA,EAAG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OAAM,EAAuC;AAC7F,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,gBAAA,EAAkB,SAAS,CAAA;AAAA,MACzC,WAAA,EAAU,YAAA;AAAA,MACV,aAAA,EAAa,MAAA;AAAA,MACZ,GAAG;AAAA;AAAA,GACN;AAEJ;AAIO,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAA0C;AAC3F,EAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EAAQ,SAAA,EAAW,EAAA,CAAG,mBAAA,EAAqB,SAAS,CAAA,EAAG,WAAA,EAAU,eAAA,EAAiB,GAAG,KAAA,EAAO,CAAA;AAEjG","file":"chunk-77CBRRVT.js","sourcesContent":["'use client'\n\nimport {\n type TableSize,\n type TableSizeAlias,\n type TableStickyEdge,\n type TableTone,\n type TableVariant,\n tableContract,\n} from '@atom63/ui-foundation'\nimport { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-react'\nimport { createContext, useContext } from 'react'\nimport type * as React from 'react'\n\nimport { cn } from '../../lib/cn'\nimport { Button } from '../button'\n\n/** The direction a sorted column is in, named as `aria-sort` names it. */\nexport type TableSortDirection = 'ascending' | 'descending'\n\n/** The column the table is sorted by. The caller sorts the rows; the table only shows it. */\nexport interface TableSort {\n column: string\n direction: TableSortDirection\n}\n\ninterface TableSortContextValue {\n onSortChange?: (sort: TableSort) => void\n sort?: TableSort | null\n}\n\nconst TableSortContext = createContext<TableSortContextValue>({})\n\n/* Table — the tabular-data set. Faithful port of prod @atom63/ui Table: a\n horizontally scrollable container wrapping a semantic <table> with header /\n body / footer / row / head / cell / caption parts. Each part carries its\n data-slot; the base look is DS-tokenized, and a `frame` ancestor\n (data-slot=\"frame\") switches on the bordered-card treatment. `size`, `tone`\n and `variant` sit on the container; `sticky` pins a head or body cell to an\n inline edge while the container scrolls. */\n\nexport type TableProps = React.ComponentProps<'table'> & {\n /** `'default'` is a deprecated alias of `'md'`. */\n size?: TableSize | TableSizeAlias\n /**\n * How selected rows (`data-state=\"selected\"`) are coloured. `neutral` (the\n * default) is a muted fill with primary text; `accent` is a light primary wash\n * with accent text.\n */\n tone?: TableTone\n variant?: TableVariant\n /** The column the rows are sorted by (controlled), shown by the `TableHead` whose `sortKey`\n * matches. `null` or omitted: no column is sorted. */\n sort?: TableSort | null\n /** Called when a sortable `TableHead` is pressed, with the sort to apply. Sort the rows and\n * pass the new value back as `sort`. */\n onSortChange?: (sort: TableSort) => void\n}\n\nexport function Table({\n className,\n onSortChange,\n size = tableContract.defaultSize,\n sort,\n tone = tableContract.defaultTone,\n variant = tableContract.defaultVariant,\n ...props\n}: TableProps): React.ReactElement {\n return (\n <TableSortContext.Provider value={{ onSortChange, sort }}>\n <div\n className=\"a63-Table-container\"\n data-size={size === 'default' ? 'md' : size}\n data-slot=\"table-container\"\n data-tone={tone}\n data-variant={variant}\n >\n <table className={cn('a63-Table', className)} data-slot=\"table\" {...props} />\n </div>\n </TableSortContext.Provider>\n )\n}\n\nexport type TableHeaderProps = React.ComponentProps<'thead'>\n\nexport function TableHeader({ className, ...props }: TableHeaderProps): React.ReactElement {\n return <thead className={cn('a63-Table-header', className)} data-slot=\"table-header\" {...props} />\n}\n\nexport type TableBodyProps = React.ComponentProps<'tbody'>\n\nexport function TableBody({ className, ...props }: TableBodyProps): React.ReactElement {\n return <tbody className={cn('a63-Table-body', className)} data-slot=\"table-body\" {...props} />\n}\n\nexport type TableFooterProps = React.ComponentProps<'tfoot'>\n\nexport function TableFooter({ className, ...props }: TableFooterProps): React.ReactElement {\n return <tfoot className={cn('a63-Table-footer', className)} data-slot=\"table-footer\" {...props} />\n}\n\nexport type TableRowProps = React.ComponentProps<'tr'>\n\nexport function TableRow({ className, ...props }: TableRowProps): React.ReactElement {\n return <tr className={cn('a63-Table-row', className)} data-slot=\"table-row\" {...props} />\n}\n\nexport type TableHeadProps = React.ComponentProps<'th'> & {\n sticky?: TableStickyEdge\n /** Makes the column sortable: the header becomes a button that calls the Table's\n * `onSortChange` with this key, and the cell carries `aria-sort` while the Table's\n * `sort.column` is this key. */\n sortKey?: string\n /** The direction a first press sorts in. Later presses flip it. */\n firstSortDirection?: TableSortDirection\n /** Replaces the sort icon. Receives the column's direction, or `none` while it is not sorted. */\n sortIcon?: (direction: TableSortDirection | 'none') => React.ReactNode\n}\n\nfunction defaultSortIcon(direction: TableSortDirection | 'none'): React.ReactNode {\n if (direction === 'ascending') return <ArrowUp aria-hidden />\n if (direction === 'descending') return <ArrowDown aria-hidden />\n return <ArrowUpDown aria-hidden />\n}\n\nexport function TableHead({\n children,\n className,\n firstSortDirection = 'ascending',\n sortIcon = defaultSortIcon,\n sortKey,\n sticky,\n ...props\n}: TableHeadProps): React.ReactElement {\n const { onSortChange, sort } = useContext(TableSortContext)\n const direction = sortKey !== undefined && sort?.column === sortKey ? sort.direction : undefined\n return (\n <th\n aria-sort={direction}\n className={cn('a63-Table-head', className)}\n data-slot=\"table-head\"\n data-sticky={sticky}\n {...props}\n >\n {sortKey === undefined ? (\n children\n ) : (\n <Button\n className=\"a63-Table-sort-button\"\n data-slot=\"table-sort-button\"\n onClick={() =>\n onSortChange?.({\n column: sortKey,\n direction:\n direction === undefined\n ? firstSortDirection\n : direction === 'ascending'\n ? 'descending'\n : 'ascending',\n })\n }\n size=\"xs\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n {children}\n {sortIcon(direction ?? 'none')}\n </Button>\n )}\n </th>\n )\n}\n\nexport type TableCellProps = React.ComponentProps<'td'> & {\n sticky?: TableStickyEdge\n}\n\nexport function TableCell({ className, sticky, ...props }: TableCellProps): React.ReactElement {\n return (\n <td\n className={cn('a63-Table-cell', className)}\n data-slot=\"table-cell\"\n data-sticky={sticky}\n {...props}\n />\n )\n}\n\nexport type TableCaptionProps = React.ComponentProps<'caption'>\n\nexport function TableCaption({ className, ...props }: TableCaptionProps): React.ReactElement {\n return (\n <caption className={cn('a63-Table-caption', className)} data-slot=\"table-caption\" {...props} />\n )\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import { DestinationLink, DestinationIndicator } from './chunk-IPU75YIQ.js';
2
+ import { useReducedMotion } from './chunk-6VV4EBOO.js';
2
3
  import { usePortalContainer } from './chunk-WKORZULQ.js';
3
4
  import { cn } from './chunk-AJLHJRK6.js';
4
- import { createContext, useContext, useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, createElement } from 'react';
5
+ import { createContext, useContext, useState, useMemo, useRef, useCallback, useEffect, Children, useLayoutEffect, createElement } from 'react';
5
6
  import { flushSync, createPortal } from 'react-dom';
6
7
  import { AnimatePresence, motion, motionValue, usePresence, animate } from 'motion/react';
7
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -38,24 +39,6 @@ function useLightboxRefs() {
38
39
  }
39
40
  return refs;
40
41
  }
41
- function useReducedMotion() {
42
- const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
43
- useEffect(() => {
44
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
45
- return;
46
- }
47
- const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
48
- setPrefersReducedMotion(mediaQuery.matches);
49
- const handleChange = (event) => {
50
- setPrefersReducedMotion(event.matches);
51
- };
52
- mediaQuery.addEventListener("change", handleChange);
53
- return () => {
54
- mediaQuery.removeEventListener("change", handleChange);
55
- };
56
- }, []);
57
- return prefersReducedMotion;
58
- }
59
42
 
60
43
  // src/media/media-lightbox/labels.ts
61
44
  var DEFAULT_MEDIA_LIGHTBOX_LABELS = {
@@ -3047,6 +3030,6 @@ var Lightbox = {
3047
3030
  ZoomOut: LightboxZoomOut
3048
3031
  };
3049
3032
 
3050
- export { AXIS_LOCK_THRESHOLD, CHROME_EXIT_OFFSET, CHROME_IN, CHROME_OUT, DEFAULT_MEDIA_LIGHTBOX_LABELS, Lightbox, LightboxAppearanceToggle, LightboxBackdrop, LightboxCaption, LightboxClose, LightboxContent, LightboxCounter, LightboxDestination, LightboxFrame, LightboxMedia, LightboxNext, LightboxPortal, LightboxPrevious, LightboxRoot, LightboxSlide, LightboxSlides, LightboxStatus, LightboxThumbnail, LightboxThumbnails, LightboxViewport, LightboxZoom, LightboxZoomIn, LightboxZoomOut, preferCheapMediaTransition, revealOrigin, runMediaViewTransition, supportsViewTransitions, useLightboxConfig, useLightboxRefs, useLightboxSlide, useLightboxState, useOptionalLightboxConfig, useReducedMotion };
3051
- //# sourceMappingURL=chunk-IXWOWQBP.js.map
3052
- //# sourceMappingURL=chunk-IXWOWQBP.js.map
3033
+ export { AXIS_LOCK_THRESHOLD, CHROME_EXIT_OFFSET, CHROME_IN, CHROME_OUT, DEFAULT_MEDIA_LIGHTBOX_LABELS, Lightbox, LightboxAppearanceToggle, LightboxBackdrop, LightboxCaption, LightboxClose, LightboxContent, LightboxCounter, LightboxDestination, LightboxFrame, LightboxMedia, LightboxNext, LightboxPortal, LightboxPrevious, LightboxRoot, LightboxSlide, LightboxSlides, LightboxStatus, LightboxThumbnail, LightboxThumbnails, LightboxViewport, LightboxZoom, LightboxZoomIn, LightboxZoomOut, preferCheapMediaTransition, revealOrigin, runMediaViewTransition, supportsViewTransitions, useLightboxConfig, useLightboxRefs, useLightboxSlide, useLightboxState, useOptionalLightboxConfig };
3034
+ //# sourceMappingURL=chunk-ALARPBUL.js.map
3035
+ //# sourceMappingURL=chunk-ALARPBUL.js.map