astralis-ui 0.1.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/LICENSE +21 -0
- package/README.md +89 -0
- package/dist/components/buttons/button/button.js +83 -0
- package/dist/components/buttons/button/button.styles.js +69 -0
- package/dist/components/buttons/button-group/button-group.context.js +10 -0
- package/dist/components/buttons/button-group/button-group.js +42 -0
- package/dist/components/buttons/button-group/button-group.styles.js +39 -0
- package/dist/components/buttons/theme-toggle/theme-toggle.js +53 -0
- package/dist/components/data-display/avatar/avatar.context.js +10 -0
- package/dist/components/data-display/avatar/avatar.styles.js +40 -0
- package/dist/components/data-display/avatar/components/avatar-badge.js +24 -0
- package/dist/components/data-display/avatar/components/avatar-group.js +30 -0
- package/dist/components/data-display/avatar/components/avatar-root.js +57 -0
- package/dist/components/data-display/avatar/index.js +13 -0
- package/dist/components/data-display/badge/badge.js +12 -0
- package/dist/components/data-display/badge/badge.styles.js +25 -0
- package/dist/components/data-display/calendar/calendar.context.js +13 -0
- package/dist/components/data-display/calendar/components/calendar-cell.js +60 -0
- package/dist/components/data-display/calendar/components/calendar-grid.js +106 -0
- package/dist/components/data-display/calendar/components/calendar-header.js +23 -0
- package/dist/components/data-display/calendar/components/calendar-next-trigger.js +34 -0
- package/dist/components/data-display/calendar/components/calendar-prev-trigger.js +34 -0
- package/dist/components/data-display/calendar/components/calendar-root.js +154 -0
- package/dist/components/data-display/calendar/components/calendar-view-trigger.js +28 -0
- package/dist/components/data-display/calendar/components/calendar-weekdays.js +43 -0
- package/dist/components/data-display/calendar/index.js +30 -0
- package/dist/components/data-display/card/card.context.js +10 -0
- package/dist/components/data-display/card/card.styles.js +30 -0
- package/dist/components/data-display/card/components/card-body.js +19 -0
- package/dist/components/data-display/card/components/card-description.js +25 -0
- package/dist/components/data-display/card/components/card-footer.js +32 -0
- package/dist/components/data-display/card/components/card-header.js +37 -0
- package/dist/components/data-display/card/components/card-root.js +30 -0
- package/dist/components/data-display/card/components/card-title.js +25 -0
- package/dist/components/data-display/card/index.js +24 -0
- package/dist/components/data-display/data-list/components/data-list-item.js +20 -0
- package/dist/components/data-display/data-list/components/data-list-label.js +23 -0
- package/dist/components/data-display/data-list/components/data-list-root.js +11 -0
- package/dist/components/data-display/data-list/components/data-list-value.js +12 -0
- package/dist/components/data-display/data-list/data-list.context.js +12 -0
- package/dist/components/data-display/data-list/index.js +16 -0
- package/dist/components/data-display/image/components/image-group.js +79 -0
- package/dist/components/data-display/image/components/image-lightbox.js +188 -0
- package/dist/components/data-display/image/components/image-root.js +98 -0
- package/dist/components/data-display/image/components/image.constants.js +28 -0
- package/dist/components/data-display/image/index.js +11 -0
- package/dist/components/data-display/marquee/components/marquee-item.js +27 -0
- package/dist/components/data-display/marquee/components/marquee-root.js +130 -0
- package/dist/components/data-display/marquee/index.js +11 -0
- package/dist/components/data-display/qr-code/index.js +7 -0
- package/dist/components/data-display/qr-code/qr-code.js +203 -0
- package/dist/components/data-display/stat/components/stat-help-text.js +9 -0
- package/dist/components/data-display/stat/components/stat-indicator.js +23 -0
- package/dist/components/data-display/stat/components/stat-label.js +9 -0
- package/dist/components/data-display/stat/components/stat-root.js +10 -0
- package/dist/components/data-display/stat/components/stat-value.js +9 -0
- package/dist/components/data-display/stat/index.js +19 -0
- package/dist/components/data-display/stat/stat.context.js +6 -0
- package/dist/components/data-display/table/components/table-body.js +9 -0
- package/dist/components/data-display/table/components/table-caption.js +26 -0
- package/dist/components/data-display/table/components/table-cell.js +12 -0
- package/dist/components/data-display/table/components/table-footer.js +9 -0
- package/dist/components/data-display/table/components/table-head.js +20 -0
- package/dist/components/data-display/table/components/table-header.js +22 -0
- package/dist/components/data-display/table/components/table-root.js +20 -0
- package/dist/components/data-display/table/components/table-row.js +23 -0
- package/dist/components/data-display/table/index.js +28 -0
- package/dist/components/data-display/table/table.context.js +12 -0
- package/dist/components/data-display/table/table.styles.js +9 -0
- package/dist/components/data-display/tag/components/checkable-tag-group.js +37 -0
- package/dist/components/data-display/tag/components/checkable-tag.js +45 -0
- package/dist/components/data-display/tag/components/tag-root.js +52 -0
- package/dist/components/data-display/tag/index.js +14 -0
- package/dist/components/data-display/tag/tag.styles.js +27 -0
- package/dist/components/data-display/timeline/components/timeline-content.js +23 -0
- package/dist/components/data-display/timeline/components/timeline-indicator.js +21 -0
- package/dist/components/data-display/timeline/components/timeline-item.js +23 -0
- package/dist/components/data-display/timeline/components/timeline-root.js +12 -0
- package/dist/components/data-display/timeline/index.js +20 -0
- package/dist/components/data-display/timeline/timeline.context.js +18 -0
- package/dist/components/data-display/timeline/timeline.styles.js +33 -0
- package/dist/components/data-entry/checkbox/checkbox.context.js +12 -0
- package/dist/components/data-entry/checkbox/checkbox.styles.js +14 -0
- package/dist/components/data-entry/checkbox/components/checkbox-group.js +38 -0
- package/dist/components/data-entry/checkbox/components/checkbox.js +86 -0
- package/dist/components/data-entry/checkbox/index.js +11 -0
- package/dist/components/data-entry/combobox/combobox.js +178 -0
- package/dist/components/data-entry/field/components/field-error-text.js +47 -0
- package/dist/components/data-entry/field/components/field-help-text.js +30 -0
- package/dist/components/data-entry/field/components/field-label.js +35 -0
- package/dist/components/data-entry/field/components/field-root.js +45 -0
- package/dist/components/data-entry/field/field.context.js +10 -0
- package/dist/components/data-entry/field/index.js +17 -0
- package/dist/components/data-entry/input/components/input-group.js +15 -0
- package/dist/components/data-entry/input/components/input-password.js +42 -0
- package/dist/components/data-entry/input/components/input-search.js +48 -0
- package/dist/components/data-entry/input/components/input-textarea.js +53 -0
- package/dist/components/data-entry/input/components/input.js +44 -0
- package/dist/components/data-entry/input/index.js +18 -0
- package/dist/components/data-entry/input/input.context.js +13 -0
- package/dist/components/data-entry/input/input.styles.js +48 -0
- package/dist/components/data-entry/multi-select/components/multi-select.js +301 -0
- package/dist/components/data-entry/multi-select/multi-select.styles.js +47 -0
- package/dist/components/data-entry/number-input/number-input.js +97 -0
- package/dist/components/data-entry/pin-input/components/pin-input.js +127 -0
- package/dist/components/data-entry/pin-input/pin-input.styles.js +35 -0
- package/dist/components/data-entry/radio/components/radio-group.js +38 -0
- package/dist/components/data-entry/radio/components/radio.js +80 -0
- package/dist/components/data-entry/radio/index.js +11 -0
- package/dist/components/data-entry/radio/radio.context.js +10 -0
- package/dist/components/data-entry/radio/radio.styles.js +14 -0
- package/dist/components/data-entry/select/components/select.js +208 -0
- package/dist/components/data-entry/select/select.styles.js +35 -0
- package/dist/components/data-entry/shared/options.js +49 -0
- package/dist/components/data-entry/slider/components/slider.js +395 -0
- package/dist/components/data-entry/slider/slider.styles.js +15 -0
- package/dist/components/data-entry/switch/components/switch.js +86 -0
- package/dist/components/data-entry/switch/switch.styles.js +14 -0
- package/dist/components/disclosure/accordion/accordion.context.js +20 -0
- package/dist/components/disclosure/accordion/accordion.styles.js +84 -0
- package/dist/components/disclosure/accordion/components/accordion-content.js +26 -0
- package/dist/components/disclosure/accordion/components/accordion-item.js +30 -0
- package/dist/components/disclosure/accordion/components/accordion-root.js +80 -0
- package/dist/components/disclosure/accordion/components/accordion-trigger.js +49 -0
- package/dist/components/disclosure/accordion/index.js +16 -0
- package/dist/components/disclosure/carousel/carousel.context.js +18 -0
- package/dist/components/disclosure/carousel/carousel.styles.js +77 -0
- package/dist/components/disclosure/carousel/components/carousel-autoplay-trigger.js +25 -0
- package/dist/components/disclosure/carousel/components/carousel-control.js +12 -0
- package/dist/components/disclosure/carousel/components/carousel-indicator.js +22 -0
- package/dist/components/disclosure/carousel/components/carousel-indicators.js +32 -0
- package/dist/components/disclosure/carousel/components/carousel-next.js +24 -0
- package/dist/components/disclosure/carousel/components/carousel-prev.js +24 -0
- package/dist/components/disclosure/carousel/components/carousel-progress-text.js +21 -0
- package/dist/components/disclosure/carousel/components/carousel-root.js +129 -0
- package/dist/components/disclosure/carousel/components/carousel-slide.js +49 -0
- package/dist/components/disclosure/carousel/components/carousel-track.js +74 -0
- package/dist/components/disclosure/carousel/index.js +34 -0
- package/dist/components/disclosure/pagination/components/pagination-controls.js +79 -0
- package/dist/components/disclosure/pagination/components/pagination-ellipsis.js +11 -0
- package/dist/components/disclosure/pagination/components/pagination-item.js +24 -0
- package/dist/components/disclosure/pagination/components/pagination-jumper.js +35 -0
- package/dist/components/disclosure/pagination/components/pagination-list.js +9 -0
- package/dist/components/disclosure/pagination/components/pagination-page-text.js +18 -0
- package/dist/components/disclosure/pagination/components/pagination-pages.js +24 -0
- package/dist/components/disclosure/pagination/components/pagination-root.js +44 -0
- package/dist/components/disclosure/pagination/index.js +34 -0
- package/dist/components/disclosure/pagination/pagination.context.js +12 -0
- package/dist/components/disclosure/pagination/pagination.styles.js +84 -0
- package/dist/components/feedback/alert/alert.js +55 -0
- package/dist/components/feedback/alert/alert.styles.js +23 -0
- package/dist/components/feedback/progress/progress.js +112 -0
- package/dist/components/feedback/progress/progress.styles.js +25 -0
- package/dist/components/feedback/skeleton/skeleton.js +27 -0
- package/dist/components/feedback/skeleton/skeleton.styles.js +20 -0
- package/dist/components/feedback/spinner/spinner.js +32 -0
- package/dist/components/feedback/spinner/spinner.styles.js +17 -0
- package/dist/components/feedback/status.js +18 -0
- package/dist/components/feedback/toast/toast-store.js +35 -0
- package/dist/components/feedback/toast/toast.styles.js +20 -0
- package/dist/components/feedback/toast/toaster.js +65 -0
- package/dist/components/icon/icon.js +47 -0
- package/dist/components/icon/icon.styles.js +20 -0
- package/dist/components/icon/internal-icons.js +143 -0
- package/dist/components/layout/aspect-ratio/aspect-ratio.js +32 -0
- package/dist/components/layout/aspect-ratio/aspect-ratio.styles.js +18 -0
- package/dist/components/layout/box/box.js +30 -0
- package/dist/components/layout/box/box.styles.js +76 -0
- package/dist/components/layout/center/center.js +31 -0
- package/dist/components/layout/container/container.js +40 -0
- package/dist/components/layout/flex/flex-item.js +35 -0
- package/dist/components/layout/flex/flex.js +32 -0
- package/dist/components/layout/flex/flex.style.js +42 -0
- package/dist/components/layout/flex/index.js +11 -0
- package/dist/components/layout/float/float.js +32 -0
- package/dist/components/layout/float/float.styles.js +29 -0
- package/dist/components/layout/grid/grid-item.js +36 -0
- package/dist/components/layout/grid/grid.js +47 -0
- package/dist/components/layout/grid/grid.styles.js +43 -0
- package/dist/components/layout/grid/index.js +10 -0
- package/dist/components/layout/separator/separator.js +33 -0
- package/dist/components/layout/separator/separator.styles.js +29 -0
- package/dist/components/layout/stack/stack.js +24 -0
- package/dist/components/menu/components/menu-content.js +62 -0
- package/dist/components/menu/components/menu-parts.js +81 -0
- package/dist/components/menu/components/menu-root.js +36 -0
- package/dist/components/menu/index.js +15 -0
- package/dist/components/menu/menu.context.js +12 -0
- package/dist/components/menu/menu.styles.js +12 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.js +50 -0
- package/dist/components/navigation/steps/components/steps-completed.js +12 -0
- package/dist/components/navigation/steps/components/steps-content.js +12 -0
- package/dist/components/navigation/steps/components/steps-description.js +13 -0
- package/dist/components/navigation/steps/components/steps-indicator.js +34 -0
- package/dist/components/navigation/steps/components/steps-item.js +112 -0
- package/dist/components/navigation/steps/components/steps-list.js +21 -0
- package/dist/components/navigation/steps/components/steps-next.js +25 -0
- package/dist/components/navigation/steps/components/steps-prev.js +25 -0
- package/dist/components/navigation/steps/components/steps-root.js +61 -0
- package/dist/components/navigation/steps/components/steps-title.js +13 -0
- package/dist/components/navigation/steps/index.js +34 -0
- package/dist/components/navigation/steps/steps.context.js +20 -0
- package/dist/components/navigation/steps/steps.styles.js +97 -0
- package/dist/components/navigation/tabs/components/tabs-content.js +26 -0
- package/dist/components/navigation/tabs/components/tabs-list.js +45 -0
- package/dist/components/navigation/tabs/components/tabs-root.js +54 -0
- package/dist/components/navigation/tabs/components/tabs-trigger.js +54 -0
- package/dist/components/navigation/tabs/index.js +16 -0
- package/dist/components/navigation/tabs/tabs.context.js +12 -0
- package/dist/components/navigation/tabs/tabs.styles.js +80 -0
- package/dist/components/overlay/drawer/components/drawer-content.js +48 -0
- package/dist/components/overlay/drawer/components/drawer-parts.js +48 -0
- package/dist/components/overlay/drawer/components/drawer-root.js +58 -0
- package/dist/components/overlay/drawer/drawer.context.js +12 -0
- package/dist/components/overlay/drawer/drawer.styles.js +32 -0
- package/dist/components/overlay/drawer/index.js +27 -0
- package/dist/components/overlay/modal/components/modal-content.js +48 -0
- package/dist/components/overlay/modal/components/modal-parts.js +48 -0
- package/dist/components/overlay/modal/components/modal-root.js +58 -0
- package/dist/components/overlay/modal/index.js +27 -0
- package/dist/components/overlay/modal/modal.context.js +12 -0
- package/dist/components/overlay/modal/modal.styles.js +31 -0
- package/dist/components/overlay/popover/components/popover-content.js +76 -0
- package/dist/components/overlay/popover/components/popover-parts.js +17 -0
- package/dist/components/overlay/popover/components/popover-root.js +71 -0
- package/dist/components/overlay/popover/index.js +19 -0
- package/dist/components/overlay/popover/popover.context.js +12 -0
- package/dist/components/overlay/popover/popover.styles.js +6 -0
- package/dist/components/overlay/portal.js +10 -0
- package/dist/components/overlay/tooltip/components/tooltip-content.js +52 -0
- package/dist/components/overlay/tooltip/components/tooltip-root.js +53 -0
- package/dist/components/overlay/tooltip/index.js +12 -0
- package/dist/components/overlay/tooltip/tooltip.context.js +12 -0
- package/dist/components/overlay/tooltip/tooltip.styles.js +6 -0
- package/dist/components/typography/blockquote/blockquote.js +39 -0
- package/dist/components/typography/blockquote/blockquote.styles.js +21 -0
- package/dist/components/typography/code/code.js +35 -0
- package/dist/components/typography/code/code.styles.js +26 -0
- package/dist/components/typography/code-block/code-block.js +57 -0
- package/dist/components/typography/code-block/code-block.styles.js +36 -0
- package/dist/components/typography/heading/heading.js +21 -0
- package/dist/components/typography/highlight/highlight.js +30 -0
- package/dist/components/typography/highlight/highlight.styles.js +18 -0
- package/dist/components/typography/kbd/kbd.js +26 -0
- package/dist/components/typography/link/link.js +48 -0
- package/dist/components/typography/list/index.js +10 -0
- package/dist/components/typography/list/list-item.js +37 -0
- package/dist/components/typography/list/list.js +35 -0
- package/dist/components/typography/list/list.styles.js +35 -0
- package/dist/components/typography/text/text.js +80 -0
- package/dist/components/typography/text/text.styles.js +110 -0
- package/dist/const/color-mappings.js +541 -0
- package/dist/const/color-schemes.js +5 -0
- package/dist/const/common-mappings.js +127 -0
- package/dist/const/layout-mappings.js +446 -0
- package/dist/const/positioning-mappings.js +164 -0
- package/dist/const/rounded-mappings.js +121 -0
- package/dist/const/sizing-mappings.js +1113 -0
- package/dist/const/spacing-mappings.js +508 -0
- package/dist/hooks/use-anchor-position.js +39 -0
- package/dist/hooks/use-controllable-state.js +18 -0
- package/dist/hooks/use-dismiss.js +23 -0
- package/dist/hooks/use-overlay-behavior.js +42 -0
- package/dist/hooks/use-prefers-reduced-motion.js +15 -0
- package/dist/hooks/use-presence.js +18 -0
- package/dist/hooks/use-roving-focus.js +51 -0
- package/dist/index.d.ts +3533 -0
- package/dist/index.js +359 -0
- package/dist/styles.css +2 -0
- package/dist/theme/provider.js +130 -0
- package/dist/utils/astralis-merge.js +31 -0
- package/dist/utils/overlay-stack.js +27 -0
- package/dist/utils/responsive.js +32 -0
- package/dist/utils/split-variant-props.js +13 -0
- package/package.json +107 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { CardContext as s } from "../card.context.js";
|
|
4
|
+
import { cardRootVariants as n } from "../card.styles.js";
|
|
5
|
+
import { astralisMerge as f } from "../../../../utils/astralis-merge.js";
|
|
6
|
+
function p({
|
|
7
|
+
variant: t = "elevated",
|
|
8
|
+
size: r = "md",
|
|
9
|
+
hoverable: a = !1,
|
|
10
|
+
className: e = "",
|
|
11
|
+
style: i,
|
|
12
|
+
children: m,
|
|
13
|
+
ref: d,
|
|
14
|
+
...l
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ o(s.Provider, { value: { size: r }, children: /* @__PURE__ */ o(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
ref: d,
|
|
20
|
+
className: f(n({ variant: t, size: r, hoverable: a }), e),
|
|
21
|
+
style: i,
|
|
22
|
+
...l,
|
|
23
|
+
children: m
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
p.displayName = "Card.Root";
|
|
28
|
+
export {
|
|
29
|
+
p as CardRoot
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { astralisMerge as l } from "../../../../utils/astralis-merge.js";
|
|
4
|
+
function o({
|
|
5
|
+
className: a = "",
|
|
6
|
+
style: s,
|
|
7
|
+
children: t,
|
|
8
|
+
ref: e,
|
|
9
|
+
...r
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ i(
|
|
12
|
+
"h3",
|
|
13
|
+
{
|
|
14
|
+
ref: e,
|
|
15
|
+
className: l("astralis:text-base astralis:font-semibold astralis:leading-snug astralis:text-label-base", a),
|
|
16
|
+
style: s,
|
|
17
|
+
...r,
|
|
18
|
+
children: t
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
o.displayName = "Card.Title";
|
|
23
|
+
export {
|
|
24
|
+
o as CardTitle
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CardBody as r } from "./components/card-body.js";
|
|
3
|
+
import { CardDescription as t } from "./components/card-description.js";
|
|
4
|
+
import { CardFooter as e } from "./components/card-footer.js";
|
|
5
|
+
import { CardHeader as i } from "./components/card-header.js";
|
|
6
|
+
import { CardRoot as o } from "./components/card-root.js";
|
|
7
|
+
import { CardTitle as m } from "./components/card-title.js";
|
|
8
|
+
const c = Object.assign(o, {
|
|
9
|
+
Root: o,
|
|
10
|
+
Header: i,
|
|
11
|
+
Title: m,
|
|
12
|
+
Description: t,
|
|
13
|
+
Body: r,
|
|
14
|
+
Footer: e
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
c as Card,
|
|
18
|
+
r as CardBody,
|
|
19
|
+
t as CardDescription,
|
|
20
|
+
e as CardFooter,
|
|
21
|
+
i as CardHeader,
|
|
22
|
+
o as CardRoot,
|
|
23
|
+
m as CardTitle
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useDataList as i } from "../data-list.context.js";
|
|
4
|
+
import { astralisMerge as o } from "../../../../utils/astralis-merge.js";
|
|
5
|
+
function n({ children: a, className: t = "" }) {
|
|
6
|
+
const { orientation: s } = i();
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: o(
|
|
11
|
+
s === "horizontal" ? "astralis:flex astralis:gap-4" : "astralis:flex astralis:flex-col astralis:gap-0.5",
|
|
12
|
+
t
|
|
13
|
+
),
|
|
14
|
+
children: a
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
n as DataListItem
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useDataList as e } from "../data-list.context.js";
|
|
4
|
+
import { astralisMerge as o } from "../../../../utils/astralis-merge.js";
|
|
5
|
+
const l = { sm: "astralis:text-xs", md: "astralis:text-sm", lg: "astralis:text-base" };
|
|
6
|
+
function u({ children: t, className: s = "" }) {
|
|
7
|
+
const { orientation: a, size: i } = e();
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
"dt",
|
|
10
|
+
{
|
|
11
|
+
className: o(
|
|
12
|
+
"astralis:font-medium astralis:text-label-muted",
|
|
13
|
+
l[i],
|
|
14
|
+
a === "horizontal" ? "astralis:w-40 astralis:shrink-0" : "",
|
|
15
|
+
s
|
|
16
|
+
),
|
|
17
|
+
children: t
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
u as DataListLabel
|
|
23
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { DataListContext as i } from "../data-list.context.js";
|
|
4
|
+
import { astralisMerge as l } from "../../../../utils/astralis-merge.js";
|
|
5
|
+
const e = { sm: "astralis:gap-2", md: "astralis:gap-3", lg: "astralis:gap-4" };
|
|
6
|
+
function c({ children: r, orientation: s = "horizontal", size: a = "md", className: o = "" }) {
|
|
7
|
+
return /* @__PURE__ */ t(i.Provider, { value: { orientation: s, size: a }, children: /* @__PURE__ */ t("dl", { className: l("astralis:flex astralis:flex-col", e[a], o), children: r }) });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as DataListRoot
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useDataList as r } from "../data-list.context.js";
|
|
4
|
+
import { astralisMerge as i } from "../../../../utils/astralis-merge.js";
|
|
5
|
+
const l = { sm: "astralis:text-xs", md: "astralis:text-sm", lg: "astralis:text-base" };
|
|
6
|
+
function n({ children: t, className: s = "" }) {
|
|
7
|
+
const { size: a } = r();
|
|
8
|
+
return /* @__PURE__ */ e("dd", { className: i("astralis:flex-1 astralis:min-w-0 astralis:text-label-base", l[a], s), children: t });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
n as DataListValue
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext as e, createContext as n } from "react";
|
|
3
|
+
const o = n(null);
|
|
4
|
+
function i() {
|
|
5
|
+
const t = e(o);
|
|
6
|
+
if (!t) throw new Error("DataList sub-components must be used within <DataList>");
|
|
7
|
+
return t;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
o as DataListContext,
|
|
11
|
+
i as useDataList
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DataListRoot as t } from "./components/data-list-root.js";
|
|
3
|
+
import { DataListItem as a } from "./components/data-list-item.js";
|
|
4
|
+
import { DataListLabel as o } from "./components/data-list-label.js";
|
|
5
|
+
import { DataListValue as i } from "./components/data-list-value.js";
|
|
6
|
+
const L = Object.assign(t, {
|
|
7
|
+
Item: a,
|
|
8
|
+
Label: o,
|
|
9
|
+
Value: i
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
L as DataList,
|
|
13
|
+
a as DataListItem,
|
|
14
|
+
o as DataListLabel,
|
|
15
|
+
i as DataListValue
|
|
16
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as f, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as u, useCallback as p, useEffect as w } from "react";
|
|
4
|
+
import { FIT_MAP as x, ROUNDED_MAP as P } from "./image.constants.js";
|
|
5
|
+
import { ImageLightbox as k } from "./image-lightbox.js";
|
|
6
|
+
const y = {
|
|
7
|
+
sm: "astralis:gap-2",
|
|
8
|
+
md: "astralis:gap-3",
|
|
9
|
+
lg: "astralis:gap-4"
|
|
10
|
+
}, A = {
|
|
11
|
+
2: "astralis:grid-cols-2",
|
|
12
|
+
3: "astralis:grid-cols-3",
|
|
13
|
+
4: "astralis:grid-cols-4"
|
|
14
|
+
};
|
|
15
|
+
function N({
|
|
16
|
+
items: s,
|
|
17
|
+
columns: o = 3,
|
|
18
|
+
gap: n = "md",
|
|
19
|
+
rounded: c = "md",
|
|
20
|
+
objectFit: d = "cover",
|
|
21
|
+
className: m = "",
|
|
22
|
+
style: g
|
|
23
|
+
}) {
|
|
24
|
+
const [l, t] = u(null), i = p(
|
|
25
|
+
(r) => {
|
|
26
|
+
l !== null && (r.key === "Escape" && t(null), r.key === "ArrowLeft" && t((a) => a > 0 ? a - 1 : a), r.key === "ArrowRight" && t(
|
|
27
|
+
(a) => a < s.length - 1 ? a + 1 : a
|
|
28
|
+
));
|
|
29
|
+
},
|
|
30
|
+
[l, s.length]
|
|
31
|
+
);
|
|
32
|
+
return w(() => (window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i)), [i]), /* @__PURE__ */ f(h, { children: [
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: ["astralis:grid", A[o], y[n], m].filter(Boolean).join(" "),
|
|
37
|
+
style: g,
|
|
38
|
+
children: s.map((r, a) => /* @__PURE__ */ e(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: [
|
|
42
|
+
"astralis:overflow-hidden astralis:cursor-zoom-in astralis:aspect-square",
|
|
43
|
+
P[c]
|
|
44
|
+
].join(" "),
|
|
45
|
+
onClick: () => t(a),
|
|
46
|
+
children: /* @__PURE__ */ e(
|
|
47
|
+
"img",
|
|
48
|
+
{
|
|
49
|
+
src: r.src,
|
|
50
|
+
alt: r.alt,
|
|
51
|
+
className: [
|
|
52
|
+
"astralis:h-full astralis:w-full astralis:transition-transform astralis:duration-200 astralis:hover:scale-105",
|
|
53
|
+
x[d]
|
|
54
|
+
].join(" ")
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
},
|
|
58
|
+
a
|
|
59
|
+
))
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
l !== null && /* @__PURE__ */ e(
|
|
63
|
+
k,
|
|
64
|
+
{
|
|
65
|
+
src: s[l].src,
|
|
66
|
+
alt: s[l].alt,
|
|
67
|
+
onClose: () => t(null),
|
|
68
|
+
hasPrev: l > 0,
|
|
69
|
+
hasNext: l < s.length - 1,
|
|
70
|
+
onPrev: () => t((r) => Math.max(0, r - 1)),
|
|
71
|
+
onNext: () => t((r) => Math.min(s.length - 1, r + 1))
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
N.displayName = "ImageGroup";
|
|
77
|
+
export {
|
|
78
|
+
N as ImageGroup
|
|
79
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as n, useEffect as g } from "react";
|
|
4
|
+
function v({
|
|
5
|
+
src: c,
|
|
6
|
+
alt: h,
|
|
7
|
+
onClose: i,
|
|
8
|
+
onPrev: l,
|
|
9
|
+
onNext: r,
|
|
10
|
+
hasPrev: d,
|
|
11
|
+
hasNext: u
|
|
12
|
+
}) {
|
|
13
|
+
const [w, o] = n(1), [f, m] = n(0);
|
|
14
|
+
return g(() => {
|
|
15
|
+
const s = (e) => {
|
|
16
|
+
e.key === "Escape" && i(), e.key === "ArrowLeft" && l && l(), e.key === "ArrowRight" && r && r();
|
|
17
|
+
};
|
|
18
|
+
return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
|
|
19
|
+
}, [i, l, r]), /* @__PURE__ */ t(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: "astralis:fixed astralis:inset-0 astralis:z-50 astralis:flex astralis:flex-col astralis:items-center astralis:justify-center",
|
|
23
|
+
style: { background: "rgba(0,0,0,0.85)" },
|
|
24
|
+
onClick: i,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ t(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: "astralis:absolute astralis:top-4 astralis:right-4 astralis:flex astralis:items-center astralis:gap-2",
|
|
30
|
+
onClick: (s) => s.stopPropagation(),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ a(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
className: "astralis:h-9 astralis:w-9 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
36
|
+
onClick: () => o((s) => Math.max(0.5, s - 0.25)),
|
|
37
|
+
title: "Zoom out",
|
|
38
|
+
children: /* @__PURE__ */ t(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
viewBox: "0 0 16 16",
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
className: "astralis:h-4 astralis:w-4",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ a("path", { d: "M3.5 7.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.5-.5zM11.354 11.354a1 1 0 0 0 1.415-1.414l-4-4a1 1 0 0 0-1.414 1.414l4 4z" }),
|
|
46
|
+
/* @__PURE__ */ a("path", { d: "M6.5 11a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z" })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ a(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
className: "astralis:h-9 astralis:w-9 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
56
|
+
onClick: () => o((s) => Math.min(3, s + 0.25)),
|
|
57
|
+
title: "Zoom in",
|
|
58
|
+
children: /* @__PURE__ */ t(
|
|
59
|
+
"svg",
|
|
60
|
+
{
|
|
61
|
+
viewBox: "0 0 16 16",
|
|
62
|
+
fill: "currentColor",
|
|
63
|
+
className: "astralis:h-4 astralis:w-4",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ a("path", { d: "M6.5 11a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z" }),
|
|
66
|
+
/* @__PURE__ */ a("path", { d: "M10.344 11.742c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1A6.538 6.538 0 0 1 10.343 11.742zM6.5 13a.5.5 0 0 1-.5-.5V8H2.5a.5.5 0 0 1 0-1H6V3.5a.5.5 0 0 1 1 0V7h3.5a.5.5 0 0 1 0 1H7v3.5a.5.5 0 0 1-.5.5z" })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ a(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
className: "astralis:h-9 astralis:w-9 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
76
|
+
onClick: () => m((s) => s + 90),
|
|
77
|
+
title: "Rotate",
|
|
78
|
+
children: /* @__PURE__ */ t(
|
|
79
|
+
"svg",
|
|
80
|
+
{
|
|
81
|
+
viewBox: "0 0 16 16",
|
|
82
|
+
fill: "currentColor",
|
|
83
|
+
className: "astralis:h-4 astralis:w-4",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ a(
|
|
86
|
+
"path",
|
|
87
|
+
{
|
|
88
|
+
fillRule: "evenodd",
|
|
89
|
+
d: "M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ a("path", { d: "M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ a(
|
|
99
|
+
"button",
|
|
100
|
+
{
|
|
101
|
+
className: "astralis:h-9 astralis:w-9 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
102
|
+
onClick: i,
|
|
103
|
+
title: "Close",
|
|
104
|
+
children: /* @__PURE__ */ a(
|
|
105
|
+
"svg",
|
|
106
|
+
{
|
|
107
|
+
viewBox: "0 0 16 16",
|
|
108
|
+
fill: "currentColor",
|
|
109
|
+
className: "astralis:h-4 astralis:w-4",
|
|
110
|
+
children: /* @__PURE__ */ a("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" })
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
d && /* @__PURE__ */ a(
|
|
119
|
+
"button",
|
|
120
|
+
{
|
|
121
|
+
className: "astralis:absolute astralis:left-4 astralis:h-10 astralis:w-10 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
122
|
+
onClick: (s) => {
|
|
123
|
+
s.stopPropagation(), l?.();
|
|
124
|
+
},
|
|
125
|
+
children: /* @__PURE__ */ a(
|
|
126
|
+
"svg",
|
|
127
|
+
{
|
|
128
|
+
viewBox: "0 0 16 16",
|
|
129
|
+
fill: "currentColor",
|
|
130
|
+
className: "astralis:h-5 astralis:w-5",
|
|
131
|
+
children: /* @__PURE__ */ a(
|
|
132
|
+
"path",
|
|
133
|
+
{
|
|
134
|
+
fillRule: "evenodd",
|
|
135
|
+
d: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ a(
|
|
143
|
+
"img",
|
|
144
|
+
{
|
|
145
|
+
src: c,
|
|
146
|
+
alt: h,
|
|
147
|
+
onClick: (s) => s.stopPropagation(),
|
|
148
|
+
style: {
|
|
149
|
+
maxWidth: "90vw",
|
|
150
|
+
maxHeight: "85vh",
|
|
151
|
+
transform: `scale(${w}) rotate(${f}deg)`,
|
|
152
|
+
transition: "transform 0.2s ease",
|
|
153
|
+
borderRadius: 8,
|
|
154
|
+
objectFit: "contain"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
u && /* @__PURE__ */ a(
|
|
159
|
+
"button",
|
|
160
|
+
{
|
|
161
|
+
className: "astralis:absolute astralis:right-4 astralis:h-10 astralis:w-10 astralis:rounded-full astralis:flex astralis:items-center astralis:justify-center astralis:bg-white/10 astralis:hover:bg-white/20 astralis:text-white astralis:transition-colors",
|
|
162
|
+
onClick: (s) => {
|
|
163
|
+
s.stopPropagation(), r?.();
|
|
164
|
+
},
|
|
165
|
+
children: /* @__PURE__ */ a(
|
|
166
|
+
"svg",
|
|
167
|
+
{
|
|
168
|
+
viewBox: "0 0 16 16",
|
|
169
|
+
fill: "currentColor",
|
|
170
|
+
className: "astralis:h-5 astralis:w-5",
|
|
171
|
+
children: /* @__PURE__ */ a(
|
|
172
|
+
"path",
|
|
173
|
+
{
|
|
174
|
+
fillRule: "evenodd",
|
|
175
|
+
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
export {
|
|
187
|
+
v as ImageLightbox
|
|
188
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a, Fragment as y, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { ImageLightbox as H } from "./image-lightbox.js";
|
|
5
|
+
import { ROUNDED_MAP as U, DEFAULT_PLACEHOLDER as k, FIT_MAP as V, ASPECT_RATIO_MAP as q } from "./image.constants.js";
|
|
6
|
+
function w({
|
|
7
|
+
src: c,
|
|
8
|
+
alt: m,
|
|
9
|
+
className: p = "",
|
|
10
|
+
style: u,
|
|
11
|
+
width: l,
|
|
12
|
+
height: t,
|
|
13
|
+
objectFit: I = "cover",
|
|
14
|
+
loading: N = "lazy",
|
|
15
|
+
srcset: v,
|
|
16
|
+
sizes: A,
|
|
17
|
+
placeholder: r = "empty",
|
|
18
|
+
rounded: C = "none",
|
|
19
|
+
aspectRatio: s,
|
|
20
|
+
fallback: d,
|
|
21
|
+
caption: f,
|
|
22
|
+
preview: e = !1,
|
|
23
|
+
onLoad: j,
|
|
24
|
+
onError: z,
|
|
25
|
+
ariaLabel: M,
|
|
26
|
+
ref: O
|
|
27
|
+
}) {
|
|
28
|
+
const [i, g] = n(!0), [x, P] = n(!1), [S, b] = n(!1), _ = () => {
|
|
29
|
+
g(!1), j?.();
|
|
30
|
+
}, D = () => {
|
|
31
|
+
g(!1), P(!0), z?.();
|
|
32
|
+
}, F = r !== "empty" && r !== "blur" ? r : k, L = U[C] ?? "", T = V[I] ?? "", B = s ? {
|
|
33
|
+
aspectRatio: q[s] ?? s,
|
|
34
|
+
position: "relative",
|
|
35
|
+
overflow: "hidden"
|
|
36
|
+
} : {}, h = x ? d ? /* @__PURE__ */ a(y, { children: d }) : /* @__PURE__ */ o(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: [
|
|
40
|
+
"astralis:flex astralis:flex-col astralis:items-center astralis:justify-center astralis:gap-2",
|
|
41
|
+
"astralis:bg-surface-muted astralis:text-label-subtle",
|
|
42
|
+
L,
|
|
43
|
+
s ? "astralis:absolute astralis:inset-0" : ""
|
|
44
|
+
].filter(Boolean).join(" "),
|
|
45
|
+
style: s ? {} : { width: l, height: t ?? 160 },
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
"svg",
|
|
49
|
+
{
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
fill: "currentColor",
|
|
52
|
+
className: "astralis:h-8 astralis:w-8",
|
|
53
|
+
children: /* @__PURE__ */ a("path", { d: "M21.9 21.9l-8.49-8.49-9.82-9.82L2.1 2.1.69 3.51 3 5.83V19c0 1.1.9 2 2 2h13.17l2.31 2.31 1.42-1.41zM5 18l3.5-4.5 2.5 3.01L12.17 15l3 3H5zm16 .17L6.83 5H19c1.1 0 2 .9 2 2v11.17z" })
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ a("span", { className: "astralis:text-xs", children: "Failed to load" })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
) : /* @__PURE__ */ a(
|
|
60
|
+
"img",
|
|
61
|
+
{
|
|
62
|
+
ref: O,
|
|
63
|
+
src: i ? F : c,
|
|
64
|
+
alt: m,
|
|
65
|
+
"aria-label": M,
|
|
66
|
+
width: l,
|
|
67
|
+
height: t,
|
|
68
|
+
loading: N,
|
|
69
|
+
srcSet: v,
|
|
70
|
+
sizes: A,
|
|
71
|
+
onLoad: _,
|
|
72
|
+
onError: D,
|
|
73
|
+
onClick: e ? () => b(!0) : void 0,
|
|
74
|
+
className: [
|
|
75
|
+
"astralis:transition-opacity astralis:duration-200",
|
|
76
|
+
T,
|
|
77
|
+
L,
|
|
78
|
+
i ? "astralis:animate-pulse astralis:bg-surface-muted" : "",
|
|
79
|
+
r === "blur" && i ? "astralis:blur-sm" : "",
|
|
80
|
+
e ? "astralis:cursor-zoom-in" : "",
|
|
81
|
+
s ? "astralis:absolute astralis:inset-0 astralis:h-full astralis:w-full" : "",
|
|
82
|
+
p
|
|
83
|
+
].filter(Boolean).join(" "),
|
|
84
|
+
style: s ? {} : { width: l, height: t, ...u }
|
|
85
|
+
}
|
|
86
|
+
), E = s ? /* @__PURE__ */ a("div", { style: { ...B, width: l, ...u }, children: h }) : h;
|
|
87
|
+
return /* @__PURE__ */ o(y, { children: [
|
|
88
|
+
f ? /* @__PURE__ */ o("figure", { className: "astralis:inline-block", children: [
|
|
89
|
+
E,
|
|
90
|
+
/* @__PURE__ */ a("figcaption", { className: "astralis:mt-1.5 astralis:text-xs astralis:text-center astralis:text-label-muted", children: f })
|
|
91
|
+
] }) : E,
|
|
92
|
+
e && S && !x && /* @__PURE__ */ a(H, { src: c, alt: m, onClose: () => b(!1) })
|
|
93
|
+
] });
|
|
94
|
+
}
|
|
95
|
+
w.displayName = "Image";
|
|
96
|
+
export {
|
|
97
|
+
w as ImageRoot
|
|
98
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const s = {
|
|
3
|
+
square: "1 / 1",
|
|
4
|
+
video: "16 / 9",
|
|
5
|
+
portrait: "3 / 4",
|
|
6
|
+
wide: "21 / 9"
|
|
7
|
+
}, M = {
|
|
8
|
+
none: "astralis:rounded-none",
|
|
9
|
+
sm: "astralis:rounded-sm",
|
|
10
|
+
md: "astralis:rounded-md",
|
|
11
|
+
lg: "astralis:rounded-lg",
|
|
12
|
+
xl: "astralis:rounded-xl",
|
|
13
|
+
"2xl": "astralis:rounded-2xl",
|
|
14
|
+
"3xl": "astralis:rounded-3xl",
|
|
15
|
+
full: "astralis:rounded-full"
|
|
16
|
+
}, w = {
|
|
17
|
+
contain: "astralis:object-contain",
|
|
18
|
+
cover: "astralis:object-cover",
|
|
19
|
+
fill: "astralis:object-fill",
|
|
20
|
+
none: "astralis:object-none",
|
|
21
|
+
"scale-down": "astralis:object-scale-down"
|
|
22
|
+
}, N = "data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNkI3MjgwIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNDE2LDY0SDk2YTY0LjA3LDY0LjA3LDAsMCwwLTY0LDY0VjM4NGE2NC4wNyw2NC4wNywwLDAsMCw2NCw2NEg0MTZhNjQuMDcsNjQuMDcsMCwwLDAsNjQtNjRWMTI4QTY0LjA3LDY0LjA3LDAsMCwwLDQxNiw2NFpNMzM2LDEyOGE0OCw0OCwwLDEsMSw0OCw0OEE0OC4wNSw0OC4wNSwwLDAsMSwzMzYsMTI4Wk05Niw0MTZhMzIsMzIsMCwwLDEtMzItMzJWMzE2LjM3bDk0Ljg0LTg0LjNhNDguMDYsNDguMDYsMCwwLDEsNjUuOCwxLjlsNjQuOTUsNjQuODFMMTcyLjM3LDQxNlpNNDQ4LDM4NGEzMiwzMiwwLDAsMSczMiwzMkgyMTcuNjNMMzM5LjA1LDI5NC41OGE0Ny43Miw0Ny43MiwwLDAsMSw2MS42NC0uMTZMNDQ4LDMzMy44NFoiLz48L3N2Zz4=";
|
|
23
|
+
export {
|
|
24
|
+
s as ASPECT_RATIO_MAP,
|
|
25
|
+
N as DEFAULT_PLACEHOLDER,
|
|
26
|
+
w as FIT_MAP,
|
|
27
|
+
M as ROUNDED_MAP
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
function l({
|
|
4
|
+
className: e = "",
|
|
5
|
+
style: i,
|
|
6
|
+
children: a,
|
|
7
|
+
ref: r,
|
|
8
|
+
...s
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ t(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
ref: r,
|
|
14
|
+
className: [
|
|
15
|
+
"astralis:inline-flex astralis:shrink-0 astralis:items-center",
|
|
16
|
+
e
|
|
17
|
+
].filter(Boolean).join(" "),
|
|
18
|
+
style: i,
|
|
19
|
+
...s,
|
|
20
|
+
children: a
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
l.displayName = "Marquee.Item";
|
|
25
|
+
export {
|
|
26
|
+
l as MarqueeItem
|
|
27
|
+
};
|