asheeui 0.6.0 → 0.6.2

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.
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ExternalConfig } from './config/config';
3
- export interface AsheeProviderProps {
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 AsheeProviderProps.config} against the library
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 { AsheeProvider } from "asheeui";
24
+ * import { AsheeUIProvider } from "asheeui";
25
25
  * import config from "./asheeui.config";
26
26
  *
27
27
  * export function Providers({ children }) {
28
- * return <AsheeProvider config={config}>{children}</AsheeProvider>;
28
+ * return <AsheeUIProvider config={config}>{children}</AsheeUIProvider>;
29
29
  * }
30
30
  * ```
31
31
  */
32
- export declare function AsheeProvider({ config, children }: AsheeProviderProps): import("react").JSX.Element;
33
- //# sourceMappingURL=provider.d.ts.map
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({ config: o = {}, children: r }) {
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 AsheeProvider
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":"AACA,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"}
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"}
@@ -53,7 +53,7 @@ const G = ({
53
53
  "div",
54
54
  {
55
55
  ref: b,
56
- style: { ...p, zIndex: 99999 },
56
+ style: { ...p, zIndex: 9998 },
57
57
  className: "w-full min-w-55 outline-none",
58
58
  ...h(),
59
59
  children: /* @__PURE__ */ d(
@@ -115,7 +115,7 @@ function Je({
115
115
  be
116
116
  ), Ae = j(
117
117
  "ghost",
118
- "default"
118
+ "none"
119
119
  ), Ie = s(
120
120
  q,
121
121
  e == null ? void 0 : e.backButtonVariant,
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';
@@ -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,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE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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 { AsheeProvider as r } from "./provider.js";
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 w, defaultCarouselConfig as y } from "./components/carousel/carousel-config.js";
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 yo, defaultTextAreaConfig as Uo } from "./components/textarea/textarea-config.js";
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 ye } from "./components/toast/ToastItem.js";
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 AsheeProvider,
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
- w as FALLBACK_CAROUSEL_CONFIG,
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
- yo as FALLBACK_TEXTAREA_CONFIG,
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
- ye as ToastItem,
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
- y as defaultCarouselConfig,
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
- Uo as defaultTextAreaConfig,
148
+ yo as defaultTextAreaConfig,
149
149
  Ho as defaultToastConfig,
150
150
  Wo as defaultTooltipConfig,
151
151
  C as themeController,
@@ -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 AsheeProvider - wrap your app root with <AsheeProvider>."
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 { useEffect } from 'react';
2
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
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,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,yBAAyB,kBACuB,CAAC"}
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.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,6 @@
28
28
  "./styles.css": "./dist/index.css"
29
29
  },
30
30
  "publishConfig": {
31
- "access": "public",
32
31
  "style": "./dist/index.css"
33
32
  },
34
33
  "files": [
@@ -49,22 +48,28 @@
49
48
  },
50
49
  "devDependencies": {
51
50
  "@floating-ui/react": "^0.27.20",
51
+ "@testing-library/jest-dom": "^6.6.3",
52
+ "@testing-library/react": "^16.1.0",
53
+ "@testing-library/user-event": "^14.5.2",
52
54
  "@types/node": "^26.1.2",
53
55
  "@types/react": "^19.0.0",
54
56
  "@types/react-dom": "^19.0.0",
55
57
  "@vitejs/plugin-react": "^4.0.0",
58
+ "happy-dom": "^15.11.7",
56
59
  "react": "^19.0.0",
57
60
  "react-dom": "^19.0.0",
58
61
  "ts-node": "^10.9.2",
59
62
  "tsx": "^4.23.12",
60
63
  "typescript": "^5.0.0",
61
64
  "vite": "^6.0.0",
62
- "vite-plugin-dts": "^4.0.0"
65
+ "vite-plugin-dts": "^4.0.0",
66
+ "vitest": "^3.2.7"
63
67
  },
64
68
  "module": "./dist/index.js",
65
69
  "license": "MIT",
66
70
  "scripts": {
67
71
  "build:registry": "tsx src/scripts/build-registry.ts",
68
- "build": "vite build"
72
+ "build": "vite build",
73
+ "test": "vitest run"
69
74
  }
70
75
  }
@@ -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"}