asheeui 0.7.0 → 1.0.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/dist/AsheeUIProvider.d.ts.map +1 -1
- package/dist/AsheeUIProvider.js +22 -15
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +9 -7
- package/dist/components/alert/Alert.d.ts +88 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +61 -0
- package/dist/components/alert/alert-config.d.ts +56 -0
- package/dist/components/alert/alert-config.d.ts.map +1 -0
- package/dist/components/alert/alert-config.js +14 -0
- package/dist/components/alert/alert-styles.d.ts +32 -0
- package/dist/components/alert/alert-styles.d.ts.map +1 -0
- package/dist/components/alert/alert-styles.js +20 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +6 -6
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +94 -58
- package/dist/components/autocomplete/autocomplete-config.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +87 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +43 -0
- package/dist/components/avatar/avatar-config.d.ts +48 -0
- package/dist/components/avatar/avatar-config.d.ts.map +1 -0
- package/dist/components/avatar/avatar-config.js +14 -0
- package/dist/components/avatar/avatar-styles.d.ts +21 -0
- package/dist/components/avatar/avatar-styles.d.ts.map +1 -0
- package/dist/components/avatar/avatar-styles.js +13 -0
- package/dist/components/avatar/avatar.helpers.d.ts +19 -0
- package/dist/components/avatar/avatar.helpers.d.ts.map +1 -0
- package/dist/components/avatar/avatar.helpers.js +11 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/badge/Badge.d.ts +69 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +39 -0
- package/dist/components/badge/badge-config.d.ts +63 -0
- package/dist/components/badge/badge-config.d.ts.map +1 -0
- package/dist/components/badge/badge-config.js +15 -0
- package/dist/components/badge/badge-styles.d.ts +27 -0
- package/dist/components/badge/badge-styles.d.ts.map +1 -0
- package/dist/components/badge/badge-styles.js +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +106 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +52 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-config.js +10 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-styles.js +17 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +3 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +10 -7
- package/dist/components/{date-picker/DatePicker.d.ts → calendar/Calendar.d.ts} +21 -21
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/{date-picker/DatePicker.js → calendar/Calendar.js} +11 -11
- package/dist/components/{date-picker/Calendar.d.ts → calendar/DateGrid.d.ts} +7 -7
- package/dist/components/calendar/DateGrid.d.ts.map +1 -0
- package/dist/components/calendar/DateGrid.js +194 -0
- package/dist/components/calendar/TimeSpinner.d.ts.map +1 -0
- package/dist/components/{date-picker → calendar}/TimeSpinner.js +3 -3
- package/dist/components/{date-picker/date-picker-config.d.ts → calendar/calendar-config.d.ts} +17 -17
- package/dist/components/calendar/calendar-config.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-config.js → calendar/calendar-config.js} +3 -3
- package/dist/components/{date-picker/date-picker-styles.d.ts → calendar/calendar-styles.d.ts} +1 -1
- package/dist/components/calendar/calendar-styles.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-styles.js → calendar/calendar-styles.js} +1 -1
- package/dist/components/{date-picker/date-picker.helpers.d.ts → calendar/calendar.helpers.d.ts} +9 -9
- package/dist/components/calendar/calendar.helpers.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker.helpers.js → calendar/calendar.helpers.js} +4 -4
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +6 -0
- package/dist/components/card/Card.d.ts +6 -6
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +8 -8
- package/dist/components/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.js +85 -83
- package/dist/components/carousel/carousel-styles.d.ts +1 -20
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +5 -5
- package/dist/components/drawer/Drawer.d.ts +8 -4
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +54 -38
- package/dist/components/{select/Select.d.ts → dropmenu/Dropmenu.d.ts} +21 -21
- package/dist/components/{select/Select.d.ts.map → dropmenu/Dropmenu.d.ts.map} +1 -1
- package/dist/components/dropmenu/Dropmenu.js +102 -0
- package/dist/components/{select/select-config.d.ts → dropmenu/dropmenu-config.d.ts} +8 -8
- package/dist/components/dropmenu/dropmenu-config.d.ts.map +1 -0
- package/dist/components/{select/select-config.js → dropmenu/dropmenu-config.js} +3 -3
- package/dist/components/{select/select-styles.d.ts → dropmenu/dropmenu-styles.d.ts} +1 -1
- package/dist/components/dropmenu/dropmenu-styles.d.ts.map +1 -0
- package/dist/components/{select/select-styles.js → dropmenu/dropmenu-styles.js} +1 -1
- package/dist/components/dropmenu/index.d.ts +3 -0
- package/dist/components/dropmenu/index.d.ts.map +1 -0
- package/dist/components/dropmenu/index.js +3 -0
- package/dist/components/field/FieldShell.d.ts +13 -1
- package/dist/components/field/FieldShell.d.ts.map +1 -1
- package/dist/components/field/FieldShell.js +16 -15
- package/dist/components/form/Form.d.ts +109 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +42 -0
- package/dist/components/form/form-config.d.ts +57 -0
- package/dist/components/form/form-config.d.ts.map +1 -0
- package/dist/components/form/form-config.js +12 -0
- package/dist/components/form/form-styles.d.ts +27 -0
- package/dist/components/form/form-styles.d.ts.map +1 -0
- package/dist/components/form/form-styles.js +5 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/image/Image.d.ts +4 -5
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +5 -5
- package/dist/components/input/Input.js +5 -5
- package/dist/components/link/Link.d.ts +12 -10
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/marquee/Marquee.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.js +36 -33
- package/dist/components/{select-menu/SelectMenu.d.ts → menu/Menu.d.ts} +52 -19
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/Menu.js +161 -0
- package/dist/components/menu/index.d.ts +5 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +4 -0
- package/dist/components/{select-menu/select-menu-config.d.ts → menu/menu-config.d.ts} +5 -5
- package/dist/components/menu/menu-config.d.ts.map +1 -0
- package/dist/components/{select-menu/select-menu-config.js → menu/menu-config.js} +2 -2
- package/dist/components/menu/menu-navigation.d.ts +38 -0
- package/dist/components/menu/menu-navigation.d.ts.map +1 -0
- package/dist/components/menu/menu-navigation.js +20 -0
- package/dist/components/{select-menu/use-select-floating.d.ts → menu/use-menu-floating.d.ts} +10 -10
- package/dist/components/menu/use-menu-floating.d.ts.map +1 -0
- package/dist/components/{select-menu/use-select-floating.js → menu/use-menu-floating.js} +2 -2
- package/dist/components/modal/Modal.d.ts +6 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +62 -45
- package/dist/components/multi-select/MultiSelect.d.ts +11 -10
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +99 -86
- package/dist/components/multi-select/multi-select-config.d.ts +1 -1
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +91 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +66 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/pagination/pagination-config.d.ts +66 -0
- package/dist/components/pagination/pagination-config.d.ts.map +1 -0
- package/dist/components/pagination/pagination-config.js +19 -0
- package/dist/components/pagination/pagination-styles.d.ts +19 -0
- package/dist/components/pagination/pagination-styles.d.ts.map +1 -0
- package/dist/components/pagination/pagination-styles.js +5 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.d.ts.map +1 -0
- package/dist/components/pagination/pagination.helpers.js +12 -0
- package/dist/components/radio/Radio.d.ts +53 -107
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +50 -36
- package/dist/components/radio/RadioGroup.d.ts +107 -53
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +43 -49
- package/dist/components/radio/index.d.ts +0 -1
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/resizable-screen/ResizableScreen.d.ts +4 -4
- package/dist/components/scrollbar/index.js +1 -0
- package/dist/components/scrollbar/scrollbar-config.js +13 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +92 -90
- package/dist/components/skeleton/Skeleton.d.ts +65 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +29 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/skeleton-config.d.ts +40 -0
- package/dist/components/skeleton/skeleton-config.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-config.js +13 -0
- package/dist/components/skeleton/skeleton-styles.d.ts +19 -0
- package/dist/components/skeleton/skeleton-styles.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-styles.js +5 -0
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +7 -5
- package/dist/components/table/Table.js +3 -3
- package/dist/components/tabs/Tabs.js +3 -3
- package/dist/components/textarea/Textarea.d.ts +10 -10
- package/dist/components/textarea/Textarea.js +7 -7
- package/dist/components/textarea/textarea-config.d.ts +2 -2
- package/dist/components/toast/ToastItem.d.ts.map +1 -1
- package/dist/components/toast/ToastItem.js +8 -7
- package/dist/components/tooltip/Tooltip.js +5 -5
- package/dist/components/typography/Typography.d.ts +60 -0
- package/dist/components/typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/Typography.js +28 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/typography-config.d.ts +54 -0
- package/dist/components/typography/typography-config.d.ts.map +1 -0
- package/dist/components/typography/typography-config.js +12 -0
- package/dist/components/typography/typography-styles.d.ts +21 -0
- package/dist/components/typography/typography-styles.d.ts.map +1 -0
- package/dist/components/typography/typography-styles.js +19 -0
- package/dist/config/default-config.d.ts.map +1 -1
- package/dist/config/default-config.js +2 -2
- package/dist/config/index.js +1 -0
- package/dist/config/validate-config.d.ts +34 -0
- package/dist/config/validate-config.d.ts.map +1 -0
- package/dist/config/validate-config.js +190 -0
- package/dist/index.d.ts +15 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -47
- package/dist/libs/index.js +3 -0
- package/dist/libs/use-body-scroll-lock.d.ts +21 -0
- package/dist/libs/use-body-scroll-lock.d.ts.map +1 -0
- package/dist/libs/use-body-scroll-lock.js +27 -0
- package/dist/libs/use-dialog-overlay.d.ts +21 -0
- package/dist/libs/use-dialog-overlay.d.ts.map +1 -0
- package/dist/libs/use-dialog-overlay.js +21 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts +23 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/libs/use-prefers-reduced-motion.js +19 -0
- package/dist/scripts/AsheeThemeScript.js +43 -8
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/typography.d.ts +81 -0
- package/dist/shared/typography.d.ts.map +1 -0
- package/dist/shared/typography.js +137 -0
- package/dist/utils/stacking.d.ts +2 -2
- package/dist/utils/stacking.d.ts.map +1 -1
- package/package.json +13 -6
- package/dist/components/date-picker/Calendar.d.ts.map +0 -1
- package/dist/components/date-picker/Calendar.js +0 -143
- package/dist/components/date-picker/DatePicker.d.ts.map +0 -1
- package/dist/components/date-picker/TimeSpinner.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-config.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-styles.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +0 -1
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js +0 -6
- package/dist/components/select/Select.js +0 -98
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js +0 -3
- package/dist/components/select/select-config.d.ts.map +0 -1
- package/dist/components/select/select-styles.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.js +0 -104
- package/dist/components/select-menu/index.d.ts +0 -4
- package/dist/components/select-menu/index.d.ts.map +0 -1
- package/dist/components/select-menu/index.js +0 -3
- package/dist/components/select-menu/select-menu-config.d.ts.map +0 -1
- package/dist/components/select-menu/use-select-floating.d.ts.map +0 -1
- /package/dist/components/{date-picker → calendar}/TimeSpinner.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,+BAiCtB"}
|
package/dist/AsheeUIProvider.js
CHANGED
|
@@ -2,23 +2,30 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { themeController as e } from "./theme/controller.js";
|
|
4
4
|
import { resolveConfig as t } from "./config/resolve-config.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { assertValidConfig as n } from "./config/validate-config.js";
|
|
6
|
+
import { AsheeConfigContext as r } from "./libs/context.js";
|
|
7
|
+
import { useIsomorphicLayoutEffect as i } from "./libs/use-isomorphic-layout-effect.js";
|
|
8
|
+
import { AsheeThemeScript as a, ensureThemeVarsStyle as o } from "./scripts/AsheeThemeScript.js";
|
|
9
|
+
import { useMemo as s, useSyncExternalStore as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
11
|
//#region src/AsheeUIProvider.tsx
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
12
|
+
var d = () => () => {};
|
|
13
|
+
function f() {
|
|
14
|
+
return c(d, () => !1, () => !0);
|
|
15
|
+
}
|
|
16
|
+
function p({ config: c = {}, children: d }) {
|
|
17
|
+
let p = s(() => (n(c), t(c)), [c]);
|
|
18
|
+
i(() => {
|
|
14
19
|
e.configure({
|
|
15
|
-
defaultTheme:
|
|
16
|
-
themes: Object.keys(
|
|
17
|
-
});
|
|
18
|
-
}, [
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
defaultTheme: p.defaultTheme ?? "system",
|
|
21
|
+
themes: Object.keys(p.color)
|
|
22
|
+
}), o(p);
|
|
23
|
+
}, [p]);
|
|
24
|
+
let m = f();
|
|
25
|
+
return /* @__PURE__ */ u(r.Provider, {
|
|
26
|
+
value: p,
|
|
27
|
+
children: [m && /* @__PURE__ */ l(a, { config: p }), d]
|
|
21
28
|
});
|
|
22
29
|
}
|
|
23
30
|
//#endregion
|
|
24
|
-
export {
|
|
31
|
+
export { p as AsheeUIProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,2GAyOrB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { ChevronDownIcon as r } from "../../icons/ChevronDownIcon.js";
|
|
7
7
|
import { resolveCascade as i, resolveClassKey as a, resolveRadiusKey as o } from "../../utils/resolve-token.js";
|
|
8
8
|
import { FALLBACK_ACCORDION_CONFIG as s } from "./accordion-config.js";
|
|
9
9
|
import { ACCORDION_CONTENT_SIZE_CLASS as c, ACCORDION_HEADER_SIZE_CLASS as l, ACCORDION_VARIANT_CONTAINER_CLASS as u, ACCORDION_VARIANT_ITEM_CLASS as d } from "./accordion-styles.js";
|
|
@@ -11,7 +11,7 @@ import { forwardRef as f, useCallback as p, useId as m, useState as h } from "re
|
|
|
11
11
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/accordion/Accordion.tsx
|
|
13
13
|
var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, defaultValue: S, value: C, onValueChange: w, expandIcon: T, disableAnimation: E = !1, itemClassName: D, headerClassName: O, contentClassName: k, className: A, style: j, id: M, ...N }, P) => {
|
|
14
|
-
let F =
|
|
14
|
+
let F = n(), I = F.components?.accordion, L = m(), R = M ?? L, z = i(y, I?.size, void 0, s.size), B = i(v, I?.variant, F.defaultVariant, s.variant), V = i(x, I?.allowMultiple, void 0, s.allowMultiple), H = o(b, I?.radius, F.defaultRadius, s.radius), U = u[B] ?? u.separated, W = d[B] ?? d.separated, G = a(z, l, s.size), K = a(z, c, s.size), q = a(H, t, s.radius), J = C !== void 0, Y = p((e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], []), [X, Z] = h(() => Y(S)), Q = J ? Y(C) : X, $ = p((e, t) => {
|
|
15
15
|
if (t) return;
|
|
16
16
|
let n;
|
|
17
17
|
n = Q.includes(e) ? Q.filter((t) => t !== e) : V ? [...Q, e] : [e], J || Z(n), w?.(n);
|
|
@@ -27,8 +27,8 @@ var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, de
|
|
|
27
27
|
className: e("w-full", U, B !== "ghost" && B !== "flush" && q, A),
|
|
28
28
|
style: j,
|
|
29
29
|
...N,
|
|
30
|
-
children: f.map((t,
|
|
31
|
-
let i = t.id || `item-${
|
|
30
|
+
children: f.map((t, n) => {
|
|
31
|
+
let i = t.id || `item-${n}`, a = Q.includes(i), o = `${R}-header-${i}`, s = `${R}-content-${i}`;
|
|
32
32
|
return /* @__PURE__ */ _("div", {
|
|
33
33
|
className: e("w-full transition-colors box-border", W, (B === "separated" || B === "ghost") && q, D),
|
|
34
34
|
children: [/* @__PURE__ */ _("button", {
|
|
@@ -56,12 +56,14 @@ var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, de
|
|
|
56
56
|
})]
|
|
57
57
|
}), /* @__PURE__ */ g("div", {
|
|
58
58
|
className: e("text-foreground/70 shrink-0 ml-2 transition-transform duration-200 ease-in-out", E ? "transition-none" : "", a && "rotate-180"),
|
|
59
|
-
children: T || /* @__PURE__ */ g(
|
|
59
|
+
children: T || /* @__PURE__ */ g(r, { className: "w-4 h-4" })
|
|
60
60
|
})]
|
|
61
61
|
}), /* @__PURE__ */ g("section", {
|
|
62
62
|
id: s,
|
|
63
63
|
"aria-labelledby": o,
|
|
64
64
|
"data-state": a ? "open" : "closed",
|
|
65
|
+
"aria-hidden": !a || void 0,
|
|
66
|
+
inert: !a,
|
|
65
67
|
className: e("w-full grid transition-[grid-template-rows,opacity] duration-250 ease-[cubic-bezier(0.16,1,0.3,1)]", E ? "transition-none" : "", a ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
|
|
66
68
|
children: /* @__PURE__ */ g("div", {
|
|
67
69
|
className: "scrollbar-hide overflow-hidden w-full",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { AlertConfig, AlertType } from './alert-config';
|
|
3
|
+
type BaseAlertProps = AlertConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title" | "content">;
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the Alert component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AlertProps extends BaseAlertProps {
|
|
8
|
+
/**
|
|
9
|
+
* Intent of the alert.
|
|
10
|
+
* Selects the colour and the urgency of the announcement.
|
|
11
|
+
*
|
|
12
|
+
* @default "info"
|
|
13
|
+
*/
|
|
14
|
+
type?: AlertType;
|
|
15
|
+
/**
|
|
16
|
+
* Short heading for the message.
|
|
17
|
+
*/
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Message body.
|
|
21
|
+
*/
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Leading content, shown in place of the intent's default icon.
|
|
25
|
+
*/
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the alert can be dismissed by the consumer.
|
|
29
|
+
* The dismiss control appears only when this is true and `onClose` is given.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
isClosable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Called when the dismiss control is used.
|
|
36
|
+
*/
|
|
37
|
+
onClose?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Name of the dismiss control, for assistive technology.
|
|
40
|
+
*
|
|
41
|
+
* @default "Dismiss alert"
|
|
42
|
+
*/
|
|
43
|
+
closeLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* An inline message or validation summary.
|
|
47
|
+
*
|
|
48
|
+
* Alert presents a message next to the surface it relates to: a form summary,
|
|
49
|
+
* a failed step, or a statement the consumer should not miss. Its colour,
|
|
50
|
+
* variant and radius resolve through the standard AsheeUI cascade: prop,
|
|
51
|
+
* component config, global theme defaults, and the built-in fallback.
|
|
52
|
+
*
|
|
53
|
+
* The intent decides how urgently the message is announced. `error` and
|
|
54
|
+
* `warning` are exposed as an alert, which interrupts assistive technology;
|
|
55
|
+
* `info` and `success` are exposed as a status, which waits for a pause. Pass
|
|
56
|
+
* `role` to override that choice.
|
|
57
|
+
*
|
|
58
|
+
* An alert never moves focus, never takes focus, and never appears above the
|
|
59
|
+
* page: when a message has to interrupt with a modal surface, use `Modal`
|
|
60
|
+
* instead. The dismiss control carries an accessible name and is the only
|
|
61
|
+
* focusable element the component adds.
|
|
62
|
+
*
|
|
63
|
+
* @param props - Alert configuration options and div attributes.
|
|
64
|
+
* @param props.type - Intent. Defaults to "info".
|
|
65
|
+
* @param props.title - Short heading for the message.
|
|
66
|
+
* @param props.children - Message body.
|
|
67
|
+
* @param props.icon - Leading content, in place of the default icon.
|
|
68
|
+
* @param props.isClosable - Whether a dismiss control is shown. Defaults to false.
|
|
69
|
+
* @param props.onClose - Called when the dismiss control is used.
|
|
70
|
+
* @param props.closeLabel - Name of the dismiss control. Defaults to "Dismiss alert".
|
|
71
|
+
* @param props.variant - Visual style variant. Defaults to the configured value.
|
|
72
|
+
* @param props.radius - Corner rounding. Defaults to "md".
|
|
73
|
+
* @param props.role - Announcement role, overriding the intent's default.
|
|
74
|
+
* @param props.className - Extra classes applied last.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Alert type="error" title="Payment failed">
|
|
79
|
+
* The card was declined. Check the details and try again.
|
|
80
|
+
* </Alert>
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @see AlertConfig - The configuration type for component defaults.
|
|
84
|
+
* @see ToastProvider - For messages that appear above the page instead of inline.
|
|
85
|
+
*/
|
|
86
|
+
export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBxE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AAExB,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,uGAwFjB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { resolveVariantClass as n } from "../../shared/variant.js";
|
|
6
|
+
import { useAsheeConfig as r } from "../../libs/context.js";
|
|
7
|
+
import { resolveCascade as i, resolveClassKey as a } from "../../utils/resolve-token.js";
|
|
8
|
+
import { CheckIcon as o } from "../../icons/CheckIcon.js";
|
|
9
|
+
import { CloseIcon as s } from "../../icons/CloseIcon.js";
|
|
10
|
+
import { ErrorIcon as c } from "../../icons/ErrorIcon.js";
|
|
11
|
+
import { InfoIcon as l } from "../../icons/InfoIcon.js";
|
|
12
|
+
import { WarningIcon as u } from "../../icons/WarningIcon.js";
|
|
13
|
+
import { ALERT_BASE_CLASS as d, ALERT_ICON_CLASS as f, ALERT_TYPE_COLOR as p, ALERT_TYPE_ICON_CLASS as m, ALERT_TYPE_ROLE as h } from "./alert-styles.js";
|
|
14
|
+
import { FALLBACK_ALERT_CONFIG as g } from "./alert-config.js";
|
|
15
|
+
import { forwardRef as _ } from "react";
|
|
16
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
|
+
//#region src/components/alert/Alert.tsx
|
|
18
|
+
function b(e) {
|
|
19
|
+
switch (e) {
|
|
20
|
+
case "success": return /* @__PURE__ */ v(o, {});
|
|
21
|
+
case "error": return /* @__PURE__ */ v(c, {});
|
|
22
|
+
case "warning": return /* @__PURE__ */ v(u, {});
|
|
23
|
+
default: return /* @__PURE__ */ v(l, {});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var x = _(({ type: o, variant: c, radius: l, title: u, children: _, icon: x, isClosable: S = !1, onClose: C, closeLabel: w = "Dismiss alert", role: T, className: E, ...D }, O) => {
|
|
27
|
+
let k = r(), A = k.components?.alert, j = i(o, A?.type, void 0, g.type), M = i(c, A?.variant, k.defaultVariant, g.variant), N = M === "underlined" ? "bordered" : M, P = i(l, A?.radius, k.defaultRadius, g.radius), F = a(P, t, g.radius);
|
|
28
|
+
return /* @__PURE__ */ y("div", {
|
|
29
|
+
ref: O,
|
|
30
|
+
role: T ?? h[j],
|
|
31
|
+
className: e(d, F, n(N, p[j]), E),
|
|
32
|
+
...D,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ v("span", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: e(f, m[j]),
|
|
37
|
+
children: x ?? b(j)
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ y("div", {
|
|
40
|
+
className: "flex-1 min-w-0 flex flex-col gap-0.5",
|
|
41
|
+
children: [u && /* @__PURE__ */ v("span", {
|
|
42
|
+
className: "font-medium",
|
|
43
|
+
children: u
|
|
44
|
+
}), _ && /* @__PURE__ */ v("div", {
|
|
45
|
+
className: "text-current/80",
|
|
46
|
+
children: _
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
S && C && /* @__PURE__ */ v("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
"aria-label": w,
|
|
52
|
+
onClick: C,
|
|
53
|
+
className: "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
54
|
+
children: /* @__PURE__ */ v(s, { className: "size-3.5" })
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
x.displayName = "Alert";
|
|
60
|
+
//#endregion
|
|
61
|
+
export { x as Alert };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Radius, Variant } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Intent of an alert.
|
|
4
|
+
* Selects the colour an alert is presented in and how urgently it is
|
|
5
|
+
* announced: `error` and `warning` interrupt, `info` and `success` wait for a
|
|
6
|
+
* pause in what assistive technology is reading.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertType = "success" | "error" | "info" | "warning";
|
|
9
|
+
/**
|
|
10
|
+
* Theme configuration options for the Alert component.
|
|
11
|
+
*
|
|
12
|
+
* Set under `components.alert` in the AsheeUI config. Values feed the
|
|
13
|
+
* component-level fallback tier of the theme cascade.
|
|
14
|
+
*/
|
|
15
|
+
export interface AlertConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Intent of the alert.
|
|
18
|
+
* Controls its colour and how urgently its message is announced.
|
|
19
|
+
*
|
|
20
|
+
* @default "info"
|
|
21
|
+
*/
|
|
22
|
+
type?: AlertType;
|
|
23
|
+
/**
|
|
24
|
+
* Visual style variant.
|
|
25
|
+
* Controls the alert's background, border, and text treatment.
|
|
26
|
+
*
|
|
27
|
+
* @default "faded"
|
|
28
|
+
*/
|
|
29
|
+
variant?: Exclude<Variant, "underlined">;
|
|
30
|
+
/**
|
|
31
|
+
* Corner rounding.
|
|
32
|
+
* Controls the border-radius of the alert.
|
|
33
|
+
*
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
36
|
+
radius?: Radius;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default config values registered for the Alert component.
|
|
40
|
+
*
|
|
41
|
+
* `variant` is intentionally absent so it inherits from the global
|
|
42
|
+
* `defaultVariant`.
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultAlertConfig: AlertConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Hard fallback values used when no config tier provides a value.
|
|
47
|
+
* These values are used when instance props, component config,
|
|
48
|
+
* and global defaults are all undefined.
|
|
49
|
+
*/
|
|
50
|
+
export declare const FALLBACK_ALERT_CONFIG: Required<AlertConfig>;
|
|
51
|
+
declare module "../../libs/registry" {
|
|
52
|
+
interface ComponentTypeConfigRegistry {
|
|
53
|
+
alert: AlertConfig;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=alert-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-config.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEzC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAGhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAI9C,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/alert/alert-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
type: "info",
|
|
6
|
+
radius: "md"
|
|
7
|
+
}, n = {
|
|
8
|
+
type: "info",
|
|
9
|
+
variant: "faded",
|
|
10
|
+
radius: "md"
|
|
11
|
+
};
|
|
12
|
+
e("alert", t);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as FALLBACK_ALERT_CONFIG, t as defaultAlertConfig };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Color } from '../../shared';
|
|
2
|
+
import { AlertType } from './alert-config';
|
|
3
|
+
/**
|
|
4
|
+
* Colour each intent is presented in.
|
|
5
|
+
* The colour resolves through the framework's colour engine, so an alert has
|
|
6
|
+
* no palette colour of its own.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ALERT_TYPE_COLOR: Record<AlertType, Color>;
|
|
9
|
+
/**
|
|
10
|
+
* How urgently each intent is announced.
|
|
11
|
+
* `alert` interrupts what assistive technology is reading, so it is reserved
|
|
12
|
+
* for the two intents that need attention now.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ALERT_TYPE_ROLE: Record<AlertType, "alert" | "status">;
|
|
15
|
+
/**
|
|
16
|
+
* Colour of the leading icon for each intent.
|
|
17
|
+
* The icon is decoration: the message text carries the information.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ALERT_TYPE_ICON_CLASS: Record<AlertType, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Base classes for the alert surface and its content layout.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ALERT_BASE_CLASS = "relative flex items-start gap-3 w-full p-3 text-sm transition-colors";
|
|
24
|
+
/**
|
|
25
|
+
* Classes for the icon slot.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ALERT_ICON_CLASS = "shrink-0 mt-0.5 [&_svg]:size-5";
|
|
28
|
+
/**
|
|
29
|
+
* Classes for the dismiss control.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ALERT_DISMISS_CLASS = "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current";
|
|
32
|
+
//# sourceMappingURL=alert-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-styles.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAKrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,CAKjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAK3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,yEAC2C,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,gBAAgB,mCAAmC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,mBAAmB,+LAC8J,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/alert/alert-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
info: "primary",
|
|
5
|
+
success: "success",
|
|
6
|
+
warning: "warning",
|
|
7
|
+
error: "danger"
|
|
8
|
+
}, t = {
|
|
9
|
+
info: "status",
|
|
10
|
+
success: "status",
|
|
11
|
+
warning: "alert",
|
|
12
|
+
error: "alert"
|
|
13
|
+
}, n = {
|
|
14
|
+
info: "text-primary",
|
|
15
|
+
success: "text-success",
|
|
16
|
+
warning: "text-warning",
|
|
17
|
+
error: "text-danger"
|
|
18
|
+
}, r = "relative flex items-start gap-3 w-full p-3 text-sm transition-colors", i = "shrink-0 mt-0.5 [&_svg]:size-5", a = "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { r as ALERT_BASE_CLASS, a as ALERT_DISMISS_CLASS, i as ALERT_ICON_CLASS, e as ALERT_TYPE_COLOR, n as ALERT_TYPE_ICON_CLASS, t as ALERT_TYPE_ROLE };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/alert/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { InputProps } from '../input/Input';
|
|
3
|
-
import {
|
|
4
|
-
import { MenuProps } from '../
|
|
3
|
+
import { MenuOption } from '../menu';
|
|
4
|
+
import { MenuProps } from '../menu/Menu';
|
|
5
5
|
import { AutocompleteConfig } from './autocomplete-config';
|
|
6
6
|
/**
|
|
7
7
|
* Configuration options for the Autocomplete component.
|
|
@@ -15,7 +15,7 @@ export interface AutocompleteProps extends Omit<InputProps, "value" | "onChange"
|
|
|
15
15
|
*
|
|
16
16
|
* @default []
|
|
17
17
|
*/
|
|
18
|
-
options:
|
|
18
|
+
options: MenuOption[];
|
|
19
19
|
/**
|
|
20
20
|
* Controlled selected value, shown as its option label.
|
|
21
21
|
* When allowCustomValue is true, this can be a free-form string.
|
|
@@ -25,7 +25,7 @@ export interface AutocompleteProps extends Omit<InputProps, "value" | "onChange"
|
|
|
25
25
|
* Callback fired with the selected value and option.
|
|
26
26
|
* Called when a suggestion is selected from the dropdown.
|
|
27
27
|
*/
|
|
28
|
-
onValueChange?: (value: string | number, option?:
|
|
28
|
+
onValueChange?: (value: string | number, option?: MenuOption) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Callback fired whenever the raw input text changes.
|
|
31
31
|
* Called on every keystroke, providing the current input value.
|
|
@@ -56,7 +56,7 @@ export interface AutocompleteProps extends Omit<InputProps, "value" | "onChange"
|
|
|
56
56
|
* A text input with a filterable suggestion dropdown.
|
|
57
57
|
*
|
|
58
58
|
* Autocomplete combines an {@link Input} trigger with a floating
|
|
59
|
-
* {@link
|
|
59
|
+
* {@link Menu}. Suggestions are filtered as the user types, the
|
|
60
60
|
* selected value is reported through `onValueChange`, and free-form
|
|
61
61
|
* values are supported via `allowCustomValue`. Menu tokens resolve
|
|
62
62
|
* through the standard AsheeUI cascade.
|
|
@@ -134,7 +134,7 @@ export interface AutocompleteProps extends Omit<InputProps, "value" | "onChange"
|
|
|
134
134
|
*
|
|
135
135
|
* @see AutocompleteConfig - The configuration type for component defaults.
|
|
136
136
|
* @see Input - The underlying input component for the trigger.
|
|
137
|
-
* @see
|
|
137
|
+
* @see Menu - The dropdown component used for suggestions.
|
|
138
138
|
* @see useAsheeConfig - Hook for accessing the global configuration.
|
|
139
139
|
*/
|
|
140
140
|
export declare const Autocomplete: import('react').ForwardRefExoticComponent<AutocompleteProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAI/B;;;;GAIG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,EACzD,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAEtE;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,eAAO,MAAM,YAAY,gHA2RxB,CAAC"}
|