asheeui 0.6.0 → 0.6.1
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/dist/{provider.d.ts → AsheeUIProvider.d.ts} +6 -6
- package/dist/AsheeUIProvider.d.ts.map +1 -0
- package/dist/{provider.js → AsheeUIProvider.js} +5 -2
- package/dist/components/radio/radio-context.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/libs/context.js +1 -1
- package/dist/libs/use-isomorphic-layout-effect.d.ts +2 -2
- package/dist/libs/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/package.json +9 -3
- package/dist/provider.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ExternalConfig } from './config/config';
|
|
3
|
-
export interface
|
|
3
|
+
export interface AsheeUIProviderProps {
|
|
4
4
|
/**
|
|
5
5
|
* Optional partial runtime config merged over the library defaults.
|
|
6
6
|
*
|
|
@@ -14,20 +14,20 @@ export interface AsheeProviderProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* Runtime configuration provider.
|
|
16
16
|
*
|
|
17
|
-
* Resolves {@link
|
|
17
|
+
* Resolves {@link AsheeUIProviderProps.config} against the library
|
|
18
18
|
* defaults and exposes the resulting config through React context
|
|
19
19
|
* (consumed via `useAsheeConfig` / `useAshee`). Theme controller
|
|
20
20
|
* setup and the pre-paint theme script are wired automatically.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```tsx
|
|
24
|
-
* import {
|
|
24
|
+
* import { AsheeUIProvider } from "asheeui";
|
|
25
25
|
* import config from "./asheeui.config";
|
|
26
26
|
*
|
|
27
27
|
* export function Providers({ children }) {
|
|
28
|
-
* return <
|
|
28
|
+
* return <AsheeUIProvider config={config}>{children}</AsheeUIProvider>;
|
|
29
29
|
* }
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export declare function
|
|
33
|
-
//# sourceMappingURL=
|
|
32
|
+
export declare function AsheeUIProvider({ config, children, }: AsheeUIProviderProps): import("react").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=AsheeUIProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOtD,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,+BAgBtB"}
|
|
@@ -6,7 +6,10 @@ import { AsheeConfigContext as f } from "./libs/context.js";
|
|
|
6
6
|
import { useIsomorphicLayoutEffect as n } from "./libs/use-isomorphic-layout-effect.js";
|
|
7
7
|
import { AsheeThemeScript as c } from "./scripts/AsheeThemeScript.js";
|
|
8
8
|
import { themeController as h } from "./theme/controller.js";
|
|
9
|
-
function g({
|
|
9
|
+
function g({
|
|
10
|
+
config: o = {},
|
|
11
|
+
children: r
|
|
12
|
+
}) {
|
|
10
13
|
const e = i(() => s(o), [o]);
|
|
11
14
|
return n(() => {
|
|
12
15
|
h.configure({
|
|
@@ -19,5 +22,5 @@ function g({ config: o = {}, children: r }) {
|
|
|
19
22
|
] });
|
|
20
23
|
}
|
|
21
24
|
export {
|
|
22
|
-
g as
|
|
25
|
+
g as AsheeUIProvider
|
|
23
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-context.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-context.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,eAAO,MAAM,oBAAoB,gCAAiC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { AsheeUIProviderProps } from './AsheeUIProvider';
|
|
2
|
+
export { AsheeUIProvider } from './AsheeUIProvider';
|
|
1
3
|
export * from './components/accordion';
|
|
2
4
|
export * from './components/autocomplete';
|
|
3
5
|
export * from './components/button';
|
|
@@ -25,8 +27,6 @@ export * from './components/tabs';
|
|
|
25
27
|
export * from './components/textarea';
|
|
26
28
|
export * from './components/toast';
|
|
27
29
|
export * from './components/tooltip';
|
|
28
|
-
export type { AsheeProviderProps } from './provider';
|
|
29
|
-
export { AsheeProvider } from './provider';
|
|
30
30
|
export type { Radius } from './shared/radius';
|
|
31
31
|
export type { Size } from './shared/size';
|
|
32
32
|
export type { AsheeColorRegistry, ColorConfig, ColorVariant, DefaultColorConfig, ThemeName, } from './theme/color';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { AsheeUIProvider as r } from "./AsheeUIProvider.js";
|
|
3
3
|
import { THEME_STORAGE_KEY as f, themeController as C } from "./theme/controller.js";
|
|
4
4
|
import { useTheme as A } from "./theme/useTheme.js";
|
|
5
5
|
import { Accordion as x } from "./components/accordion/Accordion.js";
|
|
@@ -14,7 +14,7 @@ import { FALLBACK_ACCORDION_CONFIG as G, defaultAccordionConfig as g } from "./c
|
|
|
14
14
|
import { FALLBACK_AUTOCOMPLETE_CONFIG as S, defaultAutocompleteConfig as R } from "./components/autocomplete/autocomplete-config.js";
|
|
15
15
|
import { FALLBACK_BUTTON_CONFIG as c, defaultButtonConfig as b } from "./components/button/button-config.js";
|
|
16
16
|
import { FALLBACK_CARD_CONFIG as M, defaultCardConfig as P } from "./components/card/card-config.js";
|
|
17
|
-
import { FALLBACK_CAROUSEL_CONFIG as
|
|
17
|
+
import { FALLBACK_CAROUSEL_CONFIG as U, defaultCarouselConfig as w } from "./components/carousel/carousel-config.js";
|
|
18
18
|
import { FALLBACK_CHIP_CONFIG as k, defaultChipConfig as v } from "./components/chip/chip-config.js";
|
|
19
19
|
import { FALLBACK_DATE_PICKER_CONFIG as q, defaultDatePickerConfig as z } from "./components/date-picker/date-picker-config.js";
|
|
20
20
|
import { FALLBACK_DRAWER_CONFIG as Q, defaultDrawerConfig as X } from "./components/drawer/drawer-config.js";
|
|
@@ -32,7 +32,7 @@ import { FALLBACK_SPINNER_CONFIG as go, defaultSpinnerConfig as Eo } from "./com
|
|
|
32
32
|
import { FALLBACK_SWITCH_CONFIG as Ro, defaultSwitchConfig as so } from "./components/switch/switch-config.js";
|
|
33
33
|
import { FALLBACK_TABLE_CONFIG as bo, defaultTableConfig as Do } from "./components/table/table-config.js";
|
|
34
34
|
import { FALLBACK_TABS_CONFIG as Po, defaultTabsConfig as ho } from "./components/tabs/tabs-config.js";
|
|
35
|
-
import { FALLBACK_TEXTAREA_CONFIG as
|
|
35
|
+
import { FALLBACK_TEXTAREA_CONFIG as wo, defaultTextAreaConfig as yo } from "./components/textarea/textarea-config.js";
|
|
36
36
|
import { FALLBACK_TOAST_CONFIG as vo, defaultToastConfig as Ho } from "./components/toast/toast-config.js";
|
|
37
37
|
import { FALLBACK_TOOLTIP_CONFIG as zo, defaultTooltipConfig as Wo } from "./components/tooltip/tooltip-config.js";
|
|
38
38
|
import { FieldShell as Xo } from "./components/field/FieldShell.js";
|
|
@@ -56,14 +56,14 @@ import { Switch as se } from "./components/switch/Switch.js";
|
|
|
56
56
|
import { Table as be } from "./components/table/Table.js";
|
|
57
57
|
import { Tabs as Me } from "./components/tabs/Tabs.js";
|
|
58
58
|
import { TextArea as he } from "./components/textarea/Textarea.js";
|
|
59
|
-
import { ToastItem as
|
|
59
|
+
import { ToastItem as we } from "./components/toast/ToastItem.js";
|
|
60
60
|
import { ToastProvider as ke, useToast as ve } from "./components/toast/toast-context.js";
|
|
61
61
|
import { Tooltip as qe } from "./components/tooltip/Tooltip.js";
|
|
62
62
|
import { defaultInputConfig as We } from "./components/input/input-config.js";
|
|
63
63
|
import { useKeyboardField as Xe } from "./components/keyboard/use-keyboard-field.js";
|
|
64
64
|
export {
|
|
65
65
|
x as Accordion,
|
|
66
|
-
r as
|
|
66
|
+
r as AsheeUIProvider,
|
|
67
67
|
L as Autocomplete,
|
|
68
68
|
_ as Button,
|
|
69
69
|
l as Card,
|
|
@@ -75,7 +75,7 @@ export {
|
|
|
75
75
|
S as FALLBACK_AUTOCOMPLETE_CONFIG,
|
|
76
76
|
c as FALLBACK_BUTTON_CONFIG,
|
|
77
77
|
M as FALLBACK_CARD_CONFIG,
|
|
78
|
-
|
|
78
|
+
U as FALLBACK_CAROUSEL_CONFIG,
|
|
79
79
|
k as FALLBACK_CHIP_CONFIG,
|
|
80
80
|
q as FALLBACK_DATE_PICKER_CONFIG,
|
|
81
81
|
Q as FALLBACK_DRAWER_CONFIG,
|
|
@@ -93,7 +93,7 @@ export {
|
|
|
93
93
|
Ro as FALLBACK_SWITCH_CONFIG,
|
|
94
94
|
bo as FALLBACK_TABLE_CONFIG,
|
|
95
95
|
Po as FALLBACK_TABS_CONFIG,
|
|
96
|
-
|
|
96
|
+
wo as FALLBACK_TEXTAREA_CONFIG,
|
|
97
97
|
vo as FALLBACK_TOAST_CONFIG,
|
|
98
98
|
zo as FALLBACK_TOOLTIP_CONFIG,
|
|
99
99
|
Xo as FieldShell,
|
|
@@ -119,14 +119,14 @@ export {
|
|
|
119
119
|
be as Table,
|
|
120
120
|
Me as Tabs,
|
|
121
121
|
he as TextArea,
|
|
122
|
-
|
|
122
|
+
we as ToastItem,
|
|
123
123
|
ke as ToastProvider,
|
|
124
124
|
qe as Tooltip,
|
|
125
125
|
g as defaultAccordionConfig,
|
|
126
126
|
R as defaultAutocompleteConfig,
|
|
127
127
|
b as defaultButtonConfig,
|
|
128
128
|
P as defaultCardConfig,
|
|
129
|
-
|
|
129
|
+
w as defaultCarouselConfig,
|
|
130
130
|
v as defaultChipConfig,
|
|
131
131
|
z as defaultDatePickerConfig,
|
|
132
132
|
X as defaultDrawerConfig,
|
|
@@ -145,7 +145,7 @@ export {
|
|
|
145
145
|
so as defaultSwitchConfig,
|
|
146
146
|
Do as defaultTableConfig,
|
|
147
147
|
ho as defaultTabsConfig,
|
|
148
|
-
|
|
148
|
+
yo as defaultTextAreaConfig,
|
|
149
149
|
Ho as defaultToastConfig,
|
|
150
150
|
Wo as defaultTooltipConfig,
|
|
151
151
|
C as themeController,
|
package/dist/libs/context.js
CHANGED
|
@@ -5,7 +5,7 @@ function i() {
|
|
|
5
5
|
const e = o(n);
|
|
6
6
|
if (!e)
|
|
7
7
|
throw new Error(
|
|
8
|
-
"useAsheeConfig must be used within an
|
|
8
|
+
"useAsheeConfig must be used within an AsheeUIProvider - wrap your app root with <AsheeUIProvider>."
|
|
9
9
|
);
|
|
10
10
|
return e;
|
|
11
11
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
3
3
|
//# sourceMappingURL=use-isomorphic-layout-effect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-isomorphic-layout-effect.d.ts","sourceRoot":"","sources":["../../src/libs/use-isomorphic-layout-effect.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-isomorphic-layout-effect.d.ts","sourceRoot":"","sources":["../../src/libs/use-isomorphic-layout-effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,yBAAyB,wBACuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asheeui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -49,22 +49,28 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@floating-ui/react": "^0.27.20",
|
|
52
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
53
|
+
"@testing-library/react": "^16.1.0",
|
|
54
|
+
"@testing-library/user-event": "^14.5.2",
|
|
52
55
|
"@types/node": "^26.1.2",
|
|
53
56
|
"@types/react": "^19.0.0",
|
|
54
57
|
"@types/react-dom": "^19.0.0",
|
|
55
58
|
"@vitejs/plugin-react": "^4.0.0",
|
|
59
|
+
"happy-dom": "^15.11.7",
|
|
56
60
|
"react": "^19.0.0",
|
|
57
61
|
"react-dom": "^19.0.0",
|
|
58
62
|
"ts-node": "^10.9.2",
|
|
59
63
|
"tsx": "^4.23.12",
|
|
60
64
|
"typescript": "^5.0.0",
|
|
61
65
|
"vite": "^6.0.0",
|
|
62
|
-
"vite-plugin-dts": "^4.0.0"
|
|
66
|
+
"vite-plugin-dts": "^4.0.0",
|
|
67
|
+
"vitest": "^3.2.7"
|
|
63
68
|
},
|
|
64
69
|
"module": "./dist/index.js",
|
|
65
70
|
"license": "MIT",
|
|
66
71
|
"scripts": {
|
|
67
72
|
"build:registry": "tsx src/scripts/build-registry.ts",
|
|
68
|
-
"build": "vite build"
|
|
73
|
+
"build": "vite build",
|
|
74
|
+
"test": "vitest run"
|
|
69
75
|
}
|
|
70
76
|
}
|
package/dist/provider.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOtD,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAW,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAgB1E"}
|