@brightlocal/ui-components 2.25.0 → 2.27.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.
Files changed (98) hide show
  1. package/README.md +4 -2
  2. package/component-meta.json +3809 -182
  3. package/dist/alert.cjs +1 -1
  4. package/dist/alert.d.ts +23 -9
  5. package/dist/alert.d.ts.map +1 -1
  6. package/dist/alert.js +95 -87
  7. package/dist/blocks/progress-screen.cjs +1 -0
  8. package/dist/blocks/progress-screen.d.ts +109 -0
  9. package/dist/blocks/progress-screen.d.ts.map +1 -0
  10. package/dist/blocks/progress-screen.js +339 -0
  11. package/dist/blocks/sidebar.cjs +1 -1
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +155 -153
  14. package/dist/brand-illustration-motif.d.ts +1 -1
  15. package/dist/breadcrumb.cjs +1 -1
  16. package/dist/breadcrumb.d.ts.map +1 -1
  17. package/dist/breadcrumb.js +44 -40
  18. package/dist/button.cjs +1 -1
  19. package/dist/button.d.ts.map +1 -1
  20. package/dist/button.js +28 -28
  21. package/dist/chip.cjs +1 -1
  22. package/dist/chip.d.ts +1 -1
  23. package/dist/chip.d.ts.map +1 -1
  24. package/dist/chip.js +42 -41
  25. package/dist/combobox.cjs +3 -3
  26. package/dist/combobox.d.ts +4 -2
  27. package/dist/combobox.d.ts.map +1 -1
  28. package/dist/combobox.js +161 -161
  29. package/dist/data-table.cjs +1 -1
  30. package/dist/data-table.d.ts +155 -4
  31. package/dist/data-table.d.ts.map +1 -1
  32. package/dist/data-table.js +462 -309
  33. package/dist/global-layout.cjs +1 -1
  34. package/dist/global-layout.d.ts +31 -5
  35. package/dist/global-layout.d.ts.map +1 -1
  36. package/dist/global-layout.js +276 -194
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.ts +3 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +462 -451
  41. package/dist/lib/motion.cjs +1 -1
  42. package/dist/lib/motion.js +10 -8
  43. package/dist/link.cjs +1 -1
  44. package/dist/link.d.ts +5 -2
  45. package/dist/link.d.ts.map +1 -1
  46. package/dist/link.js +97 -91
  47. package/dist/list.cjs +1 -1
  48. package/dist/list.js +65 -63
  49. package/dist/progress.cjs +1 -1
  50. package/dist/progress.d.ts +61 -3
  51. package/dist/progress.d.ts.map +1 -1
  52. package/dist/progress.js +142 -65
  53. package/dist/route-progress.cjs +1 -0
  54. package/dist/route-progress.d.ts +103 -0
  55. package/dist/route-progress.d.ts.map +1 -0
  56. package/dist/route-progress.js +106 -0
  57. package/dist/sheet.cjs +1 -1
  58. package/dist/sheet.d.ts +35 -2
  59. package/dist/sheet.d.ts.map +1 -1
  60. package/dist/sheet.js +102 -65
  61. package/dist/sonner.cjs +1 -1
  62. package/dist/sonner.d.ts.map +1 -1
  63. package/dist/sonner.js +11 -15
  64. package/dist/spinner.cjs +1 -0
  65. package/dist/spinner.d.ts +57 -0
  66. package/dist/spinner.d.ts.map +1 -0
  67. package/dist/spinner.js +35 -0
  68. package/dist/stepper.cjs +1 -1
  69. package/dist/stepper.d.ts.map +1 -1
  70. package/dist/stepper.js +26 -25
  71. package/dist/table.cjs +1 -1
  72. package/dist/table.d.ts +1 -1
  73. package/dist/table.d.ts.map +1 -1
  74. package/dist/table.js +6 -2
  75. package/package.json +15 -6
  76. package/src/blocks/progress-screen.tsx +481 -0
  77. package/src/blocks/sidebar.tsx +22 -15
  78. package/src/components/alert.tsx +68 -33
  79. package/src/components/breadcrumb.tsx +9 -4
  80. package/src/components/button.tsx +2 -5
  81. package/src/components/chip.tsx +4 -3
  82. package/src/components/combobox.tsx +15 -8
  83. package/src/components/data-table.tsx +358 -16
  84. package/src/components/global-layout.tsx +228 -62
  85. package/src/components/link.tsx +88 -63
  86. package/src/components/list.tsx +5 -5
  87. package/src/components/progress.tsx +217 -30
  88. package/src/components/route-progress.tsx +354 -0
  89. package/src/components/sheet.tsx +87 -5
  90. package/src/components/sonner.tsx +3 -12
  91. package/src/components/spinner.tsx +94 -0
  92. package/src/components/stepper.tsx +3 -4
  93. package/src/components/table.tsx +6 -2
  94. package/src/index.ts +3 -0
  95. package/dist/browser-entry.d.ts +0 -19
  96. package/dist/browser-entry.d.ts.map +0 -1
  97. package/src/browser-entry.ts +0 -99
  98. package/src/browser-tokens.css +0 -1
package/src/index.ts CHANGED
@@ -50,6 +50,7 @@ export * from "./components/progress";
50
50
  export * from "./components/radio-group";
51
51
  export * from "./components/rating";
52
52
  export * from "./components/resizable";
53
+ export * from "./components/route-progress";
53
54
  export * from "./components/scroll-area";
54
55
  export * from "./components/select";
55
56
  export * from "./components/separator";
@@ -57,6 +58,7 @@ export * from "./components/sheet";
57
58
  export * from "./components/skeleton";
58
59
  export * from "./components/slider";
59
60
  export * from "./components/sonner";
61
+ export * from "./components/spinner";
60
62
  export * from "./components/split-layout";
61
63
  export * from "./components/stepper";
62
64
  export * from "./components/switch";
@@ -70,6 +72,7 @@ export * from "./components/tooltip";
70
72
  export * from "./components/typography";
71
73
 
72
74
  // Blocks
75
+ export * from "./blocks/progress-screen";
73
76
  export * from "./blocks/input-list";
74
77
  export * from "./blocks/sidebar";
75
78
 
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import * as ReactDOM from "react-dom";
3
- export * from './index';
4
- export { React, ReactDOM };
5
- export declare const h: typeof React.createElement;
6
- export declare const useState: typeof React.useState;
7
- export declare const useEffect: typeof React.useEffect;
8
- export declare const useMemo: typeof React.useMemo;
9
- export declare const useCallback: typeof React.useCallback;
10
- export declare const useRef: typeof React.useRef;
11
- export declare const useContext: typeof React.useContext;
12
- export declare const useReducer: typeof React.useReducer;
13
- export declare const useLayoutEffect: typeof React.useLayoutEffect;
14
- export declare const Fragment: React.ExoticComponent<React.FragmentProps>;
15
- export declare const version: string;
16
- export declare const buildTime: string;
17
- export declare function mount(name: string, container: HTMLElement, props?: Record<string, unknown>): () => void;
18
- export declare function render(element: React.ReactNode, container: HTMLElement): () => void;
19
- //# sourceMappingURL=browser-entry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-entry.d.ts","sourceRoot":"","sources":["../src/browser-entry.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAKtC,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAE3B,eAAO,MAAM,CAAC,4BAAsB,CAAC;AACrC,eAAO,MAAM,QAAQ,uBAAiB,CAAC;AACvC,eAAO,MAAM,SAAS,wBAAkB,CAAC;AACzC,eAAO,MAAM,OAAO,sBAAgB,CAAC;AACrC,eAAO,MAAM,WAAW,0BAAoB,CAAC;AAC7C,eAAO,MAAM,MAAM,qBAAe,CAAC;AACnC,eAAO,MAAM,UAAU,yBAAmB,CAAC;AAC3C,eAAO,MAAM,UAAU,yBAAmB,CAAC;AAC3C,eAAO,MAAM,eAAe,8BAAwB,CAAC;AACrD,eAAO,MAAM,QAAQ,4CAAiB,CAAC;AAOvC,eAAO,MAAM,OAAO,QAC+C,CAAC;AACpE,eAAO,MAAM,SAAS,QAC0C,CAAC;AAmBjE,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,WAAW,EACtB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,MAAM,IAAI,CA0BZ;AAED,wBAAgB,MAAM,CACpB,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,SAAS,EAAE,WAAW,GACrB,MAAM,IAAI,CAaZ"}
@@ -1,99 +0,0 @@
1
- import "./browser-tokens.css";
2
-
3
- import * as React from "react";
4
- import * as ReactDOM from "react-dom";
5
- import { createRoot, type Root } from "react-dom/client";
6
- import * as allExports from "./index";
7
-
8
- // Re-export everything from the barrel
9
- export * from "./index";
10
-
11
- export { React, ReactDOM };
12
-
13
- export const h = React.createElement;
14
- export const useState = React.useState;
15
- export const useEffect = React.useEffect;
16
- export const useMemo = React.useMemo;
17
- export const useCallback = React.useCallback;
18
- export const useRef = React.useRef;
19
- export const useContext = React.useContext;
20
- export const useReducer = React.useReducer;
21
- export const useLayoutEffect = React.useLayoutEffect;
22
- export const Fragment = React.Fragment;
23
-
24
- // --- Build metadata ---
25
- // Injected by vite.config.browser.ts at build time. Lets consumers read
26
- // window.BrightLocalDS.version to verify which release a bundle was built from.
27
- declare const __DS_VERSION__: string;
28
- declare const __DS_BUILD_TIME__: string;
29
- export const version =
30
- typeof __DS_VERSION__ === "string" ? __DS_VERSION__ : "0.0.0-dev";
31
- export const buildTime =
32
- typeof __DS_BUILD_TIME__ === "string" ? __DS_BUILD_TIME__ : "";
33
-
34
- // --- Mount API for IIFE consumers ---
35
-
36
- const roots = new WeakMap<HTMLElement, Root>();
37
-
38
- const PASCAL_CASE = /^[A-Z][a-zA-Z0-9]+$/;
39
-
40
- function isComponent(
41
- key: string,
42
- value: unknown
43
- ): value is React.ComponentType<Record<string, unknown>> {
44
- if (!PASCAL_CASE.test(key)) return false;
45
- if (typeof value === "function") return true;
46
- if (typeof value === "object" && value !== null && "$$typeof" in value)
47
- return true;
48
- return false;
49
- }
50
-
51
- export function mount(
52
- name: string,
53
- container: HTMLElement,
54
- props: Record<string, unknown> = {}
55
- ): () => void {
56
- const Component = (allExports as Record<string, unknown>)[name] as
57
- | React.ComponentType<Record<string, unknown>>
58
- | undefined;
59
-
60
- if (!Component || !isComponent(name, Component)) {
61
- const available = Object.keys(allExports)
62
- .filter((k) => isComponent(k, (allExports as Record<string, unknown>)[k]))
63
- .join(", ");
64
- throw new Error(
65
- `BrightLocalDS: Unknown component "${name}". Available: ${available}`
66
- );
67
- }
68
-
69
- let root = roots.get(container);
70
- if (!root) {
71
- root = createRoot(container);
72
- roots.set(container, root);
73
- }
74
-
75
- root.render(React.createElement(Component, props));
76
-
77
- return () => {
78
- root!.unmount();
79
- roots.delete(container);
80
- };
81
- }
82
-
83
- export function render(
84
- element: React.ReactNode,
85
- container: HTMLElement
86
- ): () => void {
87
- let root = roots.get(container);
88
- if (!root) {
89
- root = createRoot(container);
90
- roots.set(container, root);
91
- }
92
-
93
- root.render(element);
94
-
95
- return () => {
96
- root!.unmount();
97
- roots.delete(container);
98
- };
99
- }
@@ -1 +0,0 @@
1
- @import "../../../packages/tokens/src/styles/tailwind-preset.css";