@aortl/admin-react 0.1.0 → 0.3.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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @aortl/admin-react
2
2
 
3
- React component library for the admin design system. Renders the same class names as `@aortl/admin-css`, so vanilla HTML and React look identical.
3
+ React component library for the admin design system. Renders the same class names as [`@aortl/admin-css`](https://www.npmjs.com/package/@aortl/admin-css), so vanilla HTML and React look identical.
4
+
5
+ [View on npm](https://www.npmjs.com/package/@aortl/admin-react) · [Docs](https://digital-udvikling.github.io/admin-design-system/)
4
6
 
5
7
  ## Install
6
8
 
@@ -0,0 +1,73 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { IconProp } from './icon';
3
+ export type DialogSize = "sm" | "md" | "lg";
4
+ export type DialogClosedBy = "any" | "closerequest" | "none";
5
+ export interface DialogContainerProps extends Omit<ComponentProps<"dialog">, "open"> {
6
+ /** Controlled open state. Omit for uncontrolled (e.g. driven by Invoker Commands). */
7
+ open?: boolean;
8
+ /** Fires when the dialog closes (Esc, backdrop, close button, form method="dialog"). */
9
+ onOpenChange?: (open: boolean) => void;
10
+ /** Width preset. Default: `"md"`. */
11
+ size?: DialogSize;
12
+ /**
13
+ * Native `closedby` attribute. `"any"` allows Esc + backdrop click,
14
+ * `"closerequest"` only Esc, `"none"` neither. Default: `"any"`.
15
+ */
16
+ closedby?: DialogClosedBy;
17
+ }
18
+ /**
19
+ * The bare `<dialog>` primitive — no opinions about header, body, or footer.
20
+ * Use this when the default `<Dialog>` layout doesn't fit (custom header,
21
+ * media block, multi-step content).
22
+ */
23
+ declare function DialogContainer({ open, onOpenChange, size, closedby, className, children, ...rest }: DialogContainerProps): import("react/jsx-runtime").JSX.Element;
24
+ export type DialogHeaderProps = ComponentProps<"div">;
25
+ declare function DialogHeader({ className, ...rest }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
26
+ export interface DialogTitleProps extends ComponentProps<"h2"> {
27
+ /** Leading icon. */
28
+ icon?: IconProp;
29
+ }
30
+ declare function DialogTitle({ icon, className, children, ...rest }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
31
+ export type DialogDescriptionProps = ComponentProps<"p">;
32
+ declare function DialogDescription({ className, ...rest }: DialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
33
+ export type DialogBodyProps = ComponentProps<"div">;
34
+ declare function DialogBody({ className, ...rest }: DialogBodyProps): import("react/jsx-runtime").JSX.Element;
35
+ export type DialogFooterProps = ComponentProps<"div">;
36
+ declare function DialogFooter({ className, ...rest }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
37
+ export interface DialogCloseButtonProps extends ComponentProps<"button"> {
38
+ /** Override the default X icon. */
39
+ icon?: IconProp;
40
+ }
41
+ declare function DialogCloseButton({ icon, className, children, onClick, type, "aria-label": ariaLabel, ...rest }: DialogCloseButtonProps): import("react/jsx-runtime").JSX.Element;
42
+ export interface DialogProps extends Omit<DialogContainerProps, "title" | "children"> {
43
+ /** Leading icon for the title row. */
44
+ icon?: IconProp;
45
+ /** Renders as `<Dialog.Title>`. */
46
+ title?: ReactNode;
47
+ /** Renders as `<Dialog.Description>`. */
48
+ description?: ReactNode;
49
+ /** Renders as `<Dialog.Footer>`. */
50
+ actions?: ReactNode;
51
+ /** Show the X close button in the header. Default: `true`. */
52
+ dismissible?: boolean;
53
+ /** aria-label for the close button. Default: `"Close"`. */
54
+ closeLabel?: string;
55
+ children?: ReactNode;
56
+ }
57
+ /**
58
+ * Standard modal: a `<dialog>` with an opinionated header / body / footer
59
+ * layout driven by shorthand props. For anything outside that shape, use
60
+ * `<Dialog.Container>` and compose by hand.
61
+ */
62
+ declare function DialogRoot({ icon, title, description, actions, dismissible, closeLabel, children, ...containerProps }: DialogProps): import("react/jsx-runtime").JSX.Element;
63
+ export declare const Dialog: typeof DialogRoot & {
64
+ Container: typeof DialogContainer;
65
+ Header: typeof DialogHeader;
66
+ Title: typeof DialogTitle;
67
+ Description: typeof DialogDescription;
68
+ Body: typeof DialogBody;
69
+ Footer: typeof DialogFooter;
70
+ CloseButton: typeof DialogCloseButton;
71
+ };
72
+ export {};
73
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,36 @@
1
+ import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
2
+ import { ComponentProps, ReactElement, ReactNode } from 'react';
3
+ export type TooltipProviderProps = ComponentProps<typeof BaseTooltip.Provider>;
4
+ declare function TooltipProvider(props: TooltipProviderProps): import("react/jsx-runtime").JSX.Element;
5
+ export type TooltipRootProps = ComponentProps<typeof BaseTooltip.Root>;
6
+ declare function TooltipRoot(props: TooltipRootProps): import("react/jsx-runtime").JSX.Element;
7
+ export type TooltipTriggerProps = ComponentProps<typeof BaseTooltip.Trigger>;
8
+ declare function TooltipTrigger(props: TooltipTriggerProps): import("react/jsx-runtime").JSX.Element;
9
+ export type TooltipSize = "sm" | "md";
10
+ type TooltipPositionerProps = ComponentProps<typeof BaseTooltip.Positioner>;
11
+ export interface TooltipPopupProps extends ComponentProps<typeof BaseTooltip.Popup> {
12
+ size?: TooltipSize;
13
+ side?: TooltipPositionerProps["side"];
14
+ align?: TooltipPositionerProps["align"];
15
+ sideOffset?: TooltipPositionerProps["sideOffset"];
16
+ }
17
+ declare function TooltipPopup({ size, side, align, sideOffset, role, className, children, ...rest }: TooltipPopupProps): import("react/jsx-runtime").JSX.Element;
18
+ export interface TooltipProps extends Omit<TooltipRootProps, "children"> {
19
+ /** Tooltip body — string or rich node. */
20
+ content: ReactNode;
21
+ side?: TooltipPopupProps["side"];
22
+ align?: TooltipPopupProps["align"];
23
+ sideOffset?: TooltipPopupProps["sideOffset"];
24
+ size?: TooltipSize;
25
+ /** The trigger element. Must be a single React element so Base UI can merge trigger props/refs into it. */
26
+ children: ReactElement;
27
+ }
28
+ declare function TooltipShorthand({ content, side, align, sideOffset, size, children, ...rootProps }: TooltipProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare const Tooltip: typeof TooltipShorthand & {
30
+ Provider: typeof TooltipProvider;
31
+ Root: typeof TooltipRoot;
32
+ Trigger: typeof TooltipTrigger;
33
+ Popup: typeof TooltipPopup;
34
+ };
35
+ export {};
36
+ //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAE/E,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAEnD;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAEvE,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAE3C;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAE7E,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAEjD;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,KAAK,sBAAsB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5E,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,OAAO,WAAW,CAAC,KAAK,CAAC;IACjF,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED,iBAAS,YAAY,CAAC,EACpB,IAAW,EACX,IAAY,EACZ,KAAgB,EAChB,UAAc,EACd,IAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,iBAAiB,2CAcnB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IACtE,0CAA0C;IAC1C,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,2GAA2G;IAC3G,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,iBAAS,gBAAgB,CAAC,EACxB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,YAAY,2CASd;AAED,eAAO,MAAM,OAAO;;;;;CAKlB,CAAC"}
package/dist/admin.css CHANGED
@@ -7,6 +7,7 @@
7
7
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
8
8
  monospace;
9
9
  --spacing: 0.25rem;
10
+ --container-xs: 20rem;
10
11
  --text-xs: 0.75rem;
11
12
  --text-xs--line-height: calc(1 / 0.75);
12
13
  --text-sm: 0.875rem;
@@ -1908,6 +1909,137 @@
1908
1909
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1909
1910
  }
1910
1911
  }
1912
+ @layer components {
1913
+ .dialog {
1914
+ margin: auto;
1915
+ flex-direction: column;
1916
+ overflow: hidden;
1917
+ border-radius: var(--radius-xl);
1918
+ border-style: var(--tw-border-style);
1919
+ border-width: 1px;
1920
+ border-color: var(--color-border);
1921
+ background-color: var(--color-surface);
1922
+ padding: calc(var(--spacing) * 0);
1923
+ color: var(--color-text);
1924
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1925
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1926
+ width: calc(100% - 2rem);
1927
+ max-width: 32rem;
1928
+ max-height: calc(100dvh - 2rem);
1929
+ opacity: 1;
1930
+ transform: translateY(0) scale(1);
1931
+ transition: display 150ms allow-discrete, overlay 150ms allow-discrete, opacity 150ms ease-out, transform 150ms ease-out;
1932
+ }
1933
+ .dialog[open] {
1934
+ display: flex;
1935
+ }
1936
+ .dialog::backdrop {
1937
+ background: rgb(0 0 0 / 0.4);
1938
+ transition: display 150ms allow-discrete, overlay 150ms allow-discrete, background 150ms ease-out;
1939
+ }
1940
+ @starting-style {
1941
+ .dialog[open] {
1942
+ opacity: 0;
1943
+ transform: translateY(-0.5rem) scale(0.98);
1944
+ }
1945
+ .dialog[open]::backdrop {
1946
+ background: rgb(0 0 0 / 0);
1947
+ }
1948
+ }
1949
+ .dialog-sm {
1950
+ max-width: 24rem;
1951
+ }
1952
+ .dialog-lg {
1953
+ max-width: 48rem;
1954
+ }
1955
+ .dialog-header {
1956
+ display: flex;
1957
+ align-items: flex-start;
1958
+ gap: calc(var(--spacing) * 3);
1959
+ padding-inline: calc(var(--spacing) * 5);
1960
+ padding-top: calc(var(--spacing) * 5);
1961
+ padding-bottom: calc(var(--spacing) * 3);
1962
+ }
1963
+ .dialog-title {
1964
+ margin: calc(var(--spacing) * 0);
1965
+ display: flex;
1966
+ flex: 1;
1967
+ align-items: center;
1968
+ gap: calc(var(--spacing) * 2);
1969
+ font-size: var(--text-lg);
1970
+ line-height: var(--tw-leading, var(--text-lg--line-height));
1971
+ --tw-leading: var(--leading-tight);
1972
+ line-height: var(--leading-tight);
1973
+ --tw-font-weight: var(--font-weight-semibold);
1974
+ font-weight: var(--font-weight-semibold);
1975
+ }
1976
+ .dialog-description {
1977
+ margin-top: calc(var(--spacing) * -2);
1978
+ margin-bottom: calc(var(--spacing) * 3);
1979
+ padding-inline: calc(var(--spacing) * 5);
1980
+ font-size: var(--text-sm);
1981
+ line-height: var(--tw-leading, var(--text-sm--line-height));
1982
+ color: var(--color-text-muted);
1983
+ }
1984
+ .dialog-body {
1985
+ display: flex;
1986
+ flex-direction: column;
1987
+ gap: calc(var(--spacing) * 3);
1988
+ overflow-y: auto;
1989
+ padding-inline: calc(var(--spacing) * 5);
1990
+ padding-block: calc(var(--spacing) * 3);
1991
+ }
1992
+ .dialog-footer {
1993
+ display: flex;
1994
+ flex-wrap: wrap;
1995
+ align-items: center;
1996
+ justify-content: flex-end;
1997
+ gap: calc(var(--spacing) * 2);
1998
+ border-top-style: var(--tw-border-style);
1999
+ border-top-width: 1px;
2000
+ border-color: var(--color-border);
2001
+ background-color: var(--color-surface-muted);
2002
+ padding-inline: calc(var(--spacing) * 5);
2003
+ padding-block: calc(var(--spacing) * 3);
2004
+ }
2005
+ .dialog-close {
2006
+ display: inline-flex;
2007
+ width: calc(var(--spacing) * 7);
2008
+ height: calc(var(--spacing) * 7);
2009
+ flex-shrink: 0;
2010
+ cursor: pointer;
2011
+ align-items: center;
2012
+ justify-content: center;
2013
+ border-radius: var(--radius-md);
2014
+ background-color: transparent;
2015
+ color: var(--color-text-muted);
2016
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
2017
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2018
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
2019
+ --tw-duration: 150ms;
2020
+ transition-duration: 150ms;
2021
+ &:hover {
2022
+ @media (hover: hover) {
2023
+ background-color: var(--color-surface-strong);
2024
+ }
2025
+ }
2026
+ &:hover {
2027
+ @media (hover: hover) {
2028
+ color: var(--color-text);
2029
+ }
2030
+ }
2031
+ &:focus-visible {
2032
+ outline-style: var(--tw-outline-style);
2033
+ outline-width: 2px;
2034
+ }
2035
+ &:focus-visible {
2036
+ outline-offset: 2px;
2037
+ }
2038
+ &:focus-visible {
2039
+ outline-color: var(--color-primary);
2040
+ }
2041
+ }
2042
+ }
1911
2043
  @layer components {
1912
2044
  .field {
1913
2045
  display: flex;
@@ -3087,6 +3219,102 @@
3087
3219
  outline-color: var(--color-primary);
3088
3220
  }
3089
3221
  }
3222
+ @layer components {
3223
+ .tooltip {
3224
+ pointer-events: none;
3225
+ display: inline-block;
3226
+ max-width: var(--container-xs);
3227
+ border-radius: var(--radius-md);
3228
+ background-color: var(--color-text);
3229
+ padding-inline: calc(var(--spacing) * 2);
3230
+ padding-block: calc(var(--spacing) * 1);
3231
+ font-size: var(--text-xs);
3232
+ line-height: var(--tw-leading, var(--text-xs--line-height));
3233
+ --tw-leading: var(--leading-snug);
3234
+ line-height: var(--leading-snug);
3235
+ --tw-font-weight: var(--font-weight-medium);
3236
+ font-weight: var(--font-weight-medium);
3237
+ color: var(--color-surface);
3238
+ --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
3239
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3240
+ text-wrap: balance;
3241
+ }
3242
+ .tooltip-sm {
3243
+ padding-inline: calc(var(--spacing) * 1.5);
3244
+ padding-block: calc(var(--spacing) * 0.5);
3245
+ }
3246
+ .tooltip {
3247
+ transition: opacity 150ms ease-out, transform 150ms ease-out;
3248
+ }
3249
+ .tooltip[data-starting-style], .tooltip[data-ending-style] {
3250
+ opacity: 0;
3251
+ }
3252
+ .tooltip[data-side="top"][data-starting-style], .tooltip[data-side="top"][data-ending-style] {
3253
+ transform: translateY(0.25rem);
3254
+ }
3255
+ .tooltip[data-side="bottom"][data-starting-style], .tooltip[data-side="bottom"][data-ending-style] {
3256
+ transform: translateY(-0.25rem);
3257
+ }
3258
+ .tooltip[data-side="left"][data-starting-style], .tooltip[data-side="left"][data-ending-style] {
3259
+ transform: translateX(0.25rem);
3260
+ }
3261
+ .tooltip[data-side="right"][data-starting-style], .tooltip[data-side="right"][data-ending-style] {
3262
+ transform: translateX(-0.25rem);
3263
+ }
3264
+ .tooltip-wrap {
3265
+ position: relative;
3266
+ display: inline-flex;
3267
+ align-items: center;
3268
+ }
3269
+ .tooltip-wrap > .tooltip {
3270
+ visibility: hidden;
3271
+ position: absolute;
3272
+ opacity: 0%;
3273
+ left: 50%;
3274
+ bottom: 100%;
3275
+ margin-bottom: calc(var(--spacing) * 1.5);
3276
+ transform: translateX(-50%);
3277
+ transition: opacity 150ms ease-out 0ms, visibility 0s linear 150ms;
3278
+ }
3279
+ .tooltip-wrap-bottom > .tooltip {
3280
+ top: 100%;
3281
+ right: auto;
3282
+ bottom: auto;
3283
+ left: 50%;
3284
+ margin-top: calc(var(--spacing) * 1.5);
3285
+ margin-right: 0;
3286
+ margin-bottom: 0;
3287
+ margin-left: 0;
3288
+ transform: translateX(-50%);
3289
+ }
3290
+ .tooltip-wrap-left > .tooltip {
3291
+ top: 50%;
3292
+ right: 100%;
3293
+ bottom: auto;
3294
+ left: auto;
3295
+ margin-top: 0;
3296
+ margin-right: calc(var(--spacing) * 1.5);
3297
+ margin-bottom: 0;
3298
+ margin-left: 0;
3299
+ transform: translateY(-50%);
3300
+ }
3301
+ .tooltip-wrap-right > .tooltip {
3302
+ top: 50%;
3303
+ right: auto;
3304
+ bottom: auto;
3305
+ left: 100%;
3306
+ margin-top: 0;
3307
+ margin-right: 0;
3308
+ margin-bottom: 0;
3309
+ margin-left: calc(var(--spacing) * 1.5);
3310
+ transform: translateY(-50%);
3311
+ }
3312
+ .tooltip-wrap:hover > .tooltip, .tooltip-wrap:focus-within > .tooltip {
3313
+ visibility: visible;
3314
+ opacity: 100%;
3315
+ transition: opacity 150ms ease-out 200ms, visibility 0s linear 200ms;
3316
+ }
3317
+ }
3090
3318
  @property --tw-shadow {
3091
3319
  syntax: "*";
3092
3320
  inherits: false;
@@ -177,12 +177,16 @@
177
177
  inherits: false;
178
178
  }
179
179
  @scope (.admin-root) {
180
+ :scope, :scope * {
181
+ all: revert-layer;
182
+ }
180
183
  @layer theme {
181
184
  :scope, :host {
182
185
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
183
186
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
184
187
  monospace;
185
188
  --spacing: 0.25rem;
189
+ --container-xs: 20rem;
186
190
  --text-xs: 0.75rem;
187
191
  --text-xs--line-height: calc(1 / 0.75);
188
192
  --text-sm: 0.875rem;
@@ -2036,6 +2040,137 @@
2036
2040
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2037
2041
  }
2038
2042
  }
2043
+ @layer components {
2044
+ .dialog {
2045
+ margin: auto;
2046
+ flex-direction: column;
2047
+ overflow: hidden;
2048
+ border-radius: var(--radius-xl);
2049
+ border-style: var(--tw-border-style);
2050
+ border-width: 1px;
2051
+ border-color: var(--color-border);
2052
+ background-color: var(--color-surface);
2053
+ padding: calc(var(--spacing) * 0);
2054
+ color: var(--color-text);
2055
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
2056
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2057
+ width: calc(100% - 2rem);
2058
+ max-width: 32rem;
2059
+ max-height: calc(100dvh - 2rem);
2060
+ opacity: 1;
2061
+ transform: translateY(0) scale(1);
2062
+ transition: display 150ms allow-discrete, overlay 150ms allow-discrete, opacity 150ms ease-out, transform 150ms ease-out;
2063
+ }
2064
+ .dialog[open] {
2065
+ display: flex;
2066
+ }
2067
+ .dialog::backdrop {
2068
+ background: rgb(0 0 0 / 0.4);
2069
+ transition: display 150ms allow-discrete, overlay 150ms allow-discrete, background 150ms ease-out;
2070
+ }
2071
+ @starting-style {
2072
+ .dialog[open] {
2073
+ opacity: 0;
2074
+ transform: translateY(-0.5rem) scale(0.98);
2075
+ }
2076
+ .dialog[open]::backdrop {
2077
+ background: rgb(0 0 0 / 0);
2078
+ }
2079
+ }
2080
+ .dialog-sm {
2081
+ max-width: 24rem;
2082
+ }
2083
+ .dialog-lg {
2084
+ max-width: 48rem;
2085
+ }
2086
+ .dialog-header {
2087
+ display: flex;
2088
+ align-items: flex-start;
2089
+ gap: calc(var(--spacing) * 3);
2090
+ padding-inline: calc(var(--spacing) * 5);
2091
+ padding-top: calc(var(--spacing) * 5);
2092
+ padding-bottom: calc(var(--spacing) * 3);
2093
+ }
2094
+ .dialog-title {
2095
+ margin: calc(var(--spacing) * 0);
2096
+ display: flex;
2097
+ flex: 1;
2098
+ align-items: center;
2099
+ gap: calc(var(--spacing) * 2);
2100
+ font-size: var(--text-lg);
2101
+ line-height: var(--tw-leading, var(--text-lg--line-height));
2102
+ --tw-leading: var(--leading-tight);
2103
+ line-height: var(--leading-tight);
2104
+ --tw-font-weight: var(--font-weight-semibold);
2105
+ font-weight: var(--font-weight-semibold);
2106
+ }
2107
+ .dialog-description {
2108
+ margin-top: calc(var(--spacing) * -2);
2109
+ margin-bottom: calc(var(--spacing) * 3);
2110
+ padding-inline: calc(var(--spacing) * 5);
2111
+ font-size: var(--text-sm);
2112
+ line-height: var(--tw-leading, var(--text-sm--line-height));
2113
+ color: var(--color-text-muted);
2114
+ }
2115
+ .dialog-body {
2116
+ display: flex;
2117
+ flex-direction: column;
2118
+ gap: calc(var(--spacing) * 3);
2119
+ overflow-y: auto;
2120
+ padding-inline: calc(var(--spacing) * 5);
2121
+ padding-block: calc(var(--spacing) * 3);
2122
+ }
2123
+ .dialog-footer {
2124
+ display: flex;
2125
+ flex-wrap: wrap;
2126
+ align-items: center;
2127
+ justify-content: flex-end;
2128
+ gap: calc(var(--spacing) * 2);
2129
+ border-top-style: var(--tw-border-style);
2130
+ border-top-width: 1px;
2131
+ border-color: var(--color-border);
2132
+ background-color: var(--color-surface-muted);
2133
+ padding-inline: calc(var(--spacing) * 5);
2134
+ padding-block: calc(var(--spacing) * 3);
2135
+ }
2136
+ .dialog-close {
2137
+ display: inline-flex;
2138
+ width: calc(var(--spacing) * 7);
2139
+ height: calc(var(--spacing) * 7);
2140
+ flex-shrink: 0;
2141
+ cursor: pointer;
2142
+ align-items: center;
2143
+ justify-content: center;
2144
+ border-radius: var(--radius-md);
2145
+ background-color: transparent;
2146
+ color: var(--color-text-muted);
2147
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
2148
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2149
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
2150
+ --tw-duration: 150ms;
2151
+ transition-duration: 150ms;
2152
+ &:hover {
2153
+ @media (hover: hover) {
2154
+ background-color: var(--color-surface-strong);
2155
+ }
2156
+ }
2157
+ &:hover {
2158
+ @media (hover: hover) {
2159
+ color: var(--color-text);
2160
+ }
2161
+ }
2162
+ &:focus-visible {
2163
+ outline-style: var(--tw-outline-style);
2164
+ outline-width: 2px;
2165
+ }
2166
+ &:focus-visible {
2167
+ outline-offset: 2px;
2168
+ }
2169
+ &:focus-visible {
2170
+ outline-color: var(--color-primary);
2171
+ }
2172
+ }
2173
+ }
2039
2174
  @layer components {
2040
2175
  .field {
2041
2176
  display: flex;
@@ -3215,6 +3350,102 @@
3215
3350
  outline-color: var(--color-primary);
3216
3351
  }
3217
3352
  }
3353
+ @layer components {
3354
+ .tooltip {
3355
+ pointer-events: none;
3356
+ display: inline-block;
3357
+ max-width: var(--container-xs);
3358
+ border-radius: var(--radius-md);
3359
+ background-color: var(--color-text);
3360
+ padding-inline: calc(var(--spacing) * 2);
3361
+ padding-block: calc(var(--spacing) * 1);
3362
+ font-size: var(--text-xs);
3363
+ line-height: var(--tw-leading, var(--text-xs--line-height));
3364
+ --tw-leading: var(--leading-snug);
3365
+ line-height: var(--leading-snug);
3366
+ --tw-font-weight: var(--font-weight-medium);
3367
+ font-weight: var(--font-weight-medium);
3368
+ color: var(--color-surface);
3369
+ --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
3370
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3371
+ text-wrap: balance;
3372
+ }
3373
+ .tooltip-sm {
3374
+ padding-inline: calc(var(--spacing) * 1.5);
3375
+ padding-block: calc(var(--spacing) * 0.5);
3376
+ }
3377
+ .tooltip {
3378
+ transition: opacity 150ms ease-out, transform 150ms ease-out;
3379
+ }
3380
+ .tooltip[data-starting-style], .tooltip[data-ending-style] {
3381
+ opacity: 0;
3382
+ }
3383
+ .tooltip[data-side="top"][data-starting-style], .tooltip[data-side="top"][data-ending-style] {
3384
+ transform: translateY(0.25rem);
3385
+ }
3386
+ .tooltip[data-side="bottom"][data-starting-style], .tooltip[data-side="bottom"][data-ending-style] {
3387
+ transform: translateY(-0.25rem);
3388
+ }
3389
+ .tooltip[data-side="left"][data-starting-style], .tooltip[data-side="left"][data-ending-style] {
3390
+ transform: translateX(0.25rem);
3391
+ }
3392
+ .tooltip[data-side="right"][data-starting-style], .tooltip[data-side="right"][data-ending-style] {
3393
+ transform: translateX(-0.25rem);
3394
+ }
3395
+ .tooltip-wrap {
3396
+ position: relative;
3397
+ display: inline-flex;
3398
+ align-items: center;
3399
+ }
3400
+ .tooltip-wrap > .tooltip {
3401
+ visibility: hidden;
3402
+ position: absolute;
3403
+ opacity: 0%;
3404
+ left: 50%;
3405
+ bottom: 100%;
3406
+ margin-bottom: calc(var(--spacing) * 1.5);
3407
+ transform: translateX(-50%);
3408
+ transition: opacity 150ms ease-out 0ms, visibility 0s linear 150ms;
3409
+ }
3410
+ .tooltip-wrap-bottom > .tooltip {
3411
+ top: 100%;
3412
+ right: auto;
3413
+ bottom: auto;
3414
+ left: 50%;
3415
+ margin-top: calc(var(--spacing) * 1.5);
3416
+ margin-right: 0;
3417
+ margin-bottom: 0;
3418
+ margin-left: 0;
3419
+ transform: translateX(-50%);
3420
+ }
3421
+ .tooltip-wrap-left > .tooltip {
3422
+ top: 50%;
3423
+ right: 100%;
3424
+ bottom: auto;
3425
+ left: auto;
3426
+ margin-top: 0;
3427
+ margin-right: calc(var(--spacing) * 1.5);
3428
+ margin-bottom: 0;
3429
+ margin-left: 0;
3430
+ transform: translateY(-50%);
3431
+ }
3432
+ .tooltip-wrap-right > .tooltip {
3433
+ top: 50%;
3434
+ right: auto;
3435
+ bottom: auto;
3436
+ left: 100%;
3437
+ margin-top: 0;
3438
+ margin-right: 0;
3439
+ margin-bottom: 0;
3440
+ margin-left: calc(var(--spacing) * 1.5);
3441
+ transform: translateY(-50%);
3442
+ }
3443
+ .tooltip-wrap:hover > .tooltip, .tooltip-wrap:focus-within > .tooltip {
3444
+ visibility: visible;
3445
+ opacity: 100%;
3446
+ transition: opacity 150ms ease-out 200ms, visibility 0s linear 200ms;
3447
+ }
3448
+ }
3218
3449
  @layer properties {
3219
3450
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
3220
3451
  *, ::before, ::after, ::backdrop {