@manakind/ui-core 0.6.0 → 0.7.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 +4 -2
- package/dist/card/card.css +41 -10
- package/dist/card/card.d.ts +41 -5
- package/dist/card/card.d.ts.map +1 -1
- package/dist/card/card.js +39 -2
- package/dist/card/card.js.map +1 -1
- package/dist/card/index.d.ts +2 -2
- package/dist/card/index.d.ts.map +1 -1
- package/dist/card/index.js +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/dialog/dialog.css +2 -1
- package/dist/dialog/dialog.d.ts +3 -3
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +4 -10
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/fallback-glyphs.d.ts +5 -0
- package/dist/fallback-glyphs.d.ts.map +1 -0
- package/dist/fallback-glyphs.js +28 -0
- package/dist/fallback-glyphs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/menu/index.d.ts +3 -0
- package/dist/menu/index.d.ts.map +1 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/index.js.map +1 -0
- package/dist/menu/menu.css +82 -0
- package/dist/menu/menu.css.d.ts +2 -0
- package/dist/menu/menu.d.ts +93 -0
- package/dist/menu/menu.d.ts.map +1 -0
- package/dist/menu/menu.js +57 -0
- package/dist/menu/menu.js.map +1 -0
- package/dist/select/select.css +1 -0
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +1 -20
- package/dist/select/select.js.map +1 -1
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -56,14 +56,15 @@ separately, so an app can load only what it renders.
|
|
|
56
56
|
|
|
57
57
|
| Entry | Contents |
|
|
58
58
|
|---|---|
|
|
59
|
-
| `@manakind/ui-core` | Everything below, plus every prop type
|
|
59
|
+
| `@manakind/ui-core` | Everything below, plus every prop type, the `cx` helper, and the built-in fallback glyphs (`FallbackChevronRight`, `FallbackCheck`, `FallbackCross`) for compositions that want the same defaults |
|
|
60
60
|
| `@manakind/ui-core/alert` | `Alert` |
|
|
61
61
|
| `@manakind/ui-core/badge` | `Badge` |
|
|
62
62
|
| `@manakind/ui-core/button` | `Button` + `IconButton` |
|
|
63
|
-
| `@manakind/ui-core/card` | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter` |
|
|
63
|
+
| `@manakind/ui-core/card` | `Card`, `CardHeader`, `CardTitle`, `CardLink`, `CardDescription`, `CardContent`, `CardFooter` |
|
|
64
64
|
| `@manakind/ui-core/dialog` | `Dialog` + `DialogClose` |
|
|
65
65
|
| `@manakind/ui-core/icon` | `Icon` |
|
|
66
66
|
| `@manakind/ui-core/illustration` | `Illustration` + `illustrationPaint` |
|
|
67
|
+
| `@manakind/ui-core/menu` | `Menu` |
|
|
67
68
|
| `@manakind/ui-core/progress` | `Progress` |
|
|
68
69
|
| `@manakind/ui-core/select` | `Select` |
|
|
69
70
|
| `@manakind/ui-core/switch` | `Switch` |
|
|
@@ -75,6 +76,7 @@ separately, so an app can load only what it renders.
|
|
|
75
76
|
| `@manakind/ui-core/css/dialog` | Dialog structural CSS; its close button also needs `css/button` and `css/icon` |
|
|
76
77
|
| `@manakind/ui-core/css/icon` | Icon structural CSS |
|
|
77
78
|
| `@manakind/ui-core/css/illustration` | Illustration structural CSS, including the paint roles |
|
|
79
|
+
| `@manakind/ui-core/css/menu` | Menu structural CSS |
|
|
78
80
|
| `@manakind/ui-core/css/progress` | Progress structural CSS |
|
|
79
81
|
| `@manakind/ui-core/css/select` | Select structural CSS |
|
|
80
82
|
| `@manakind/ui-core/css/switch` | Switch structural CSS |
|
package/dist/card/card.css
CHANGED
|
@@ -49,11 +49,6 @@
|
|
|
49
49
|
&:hover {
|
|
50
50
|
border-color: var(--ds-card-border-hover);
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
&:focus-visible {
|
|
54
|
-
outline: 2px solid var(--ds-card-focus-ring);
|
|
55
|
-
outline-offset: 3px;
|
|
56
|
-
}
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
/*
|
|
@@ -63,16 +58,52 @@
|
|
|
63
58
|
* drew its ring as a rectangle flush around a 12px-rounded card: wrong
|
|
64
59
|
* shape, and touching the border.
|
|
65
60
|
*
|
|
66
|
-
* Move the ring onto the card, where it picks up
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
61
|
+
* Move the ring onto the card (the shared ring below), where it picks up
|
|
62
|
+
* the card's own radius. Scoped by the child combinator, so it applies only
|
|
63
|
+
* to a wrapper that exists to make a card operable and cannot leak onto
|
|
64
|
+
* unrelated links.
|
|
70
65
|
*/
|
|
71
66
|
:where(a, button):has(> .ds-card--interactive):focus-visible {
|
|
72
67
|
outline: none;
|
|
73
68
|
}
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
/*
|
|
71
|
+
* CardLink: the card's one destination, its hit area stretched over the
|
|
72
|
+
* card by a transparent `::after`, so the card is the box that overlay is
|
|
73
|
+
* positioned against.
|
|
74
|
+
*/
|
|
75
|
+
.ds-card:has(.ds-card__link) {
|
|
76
|
+
position: relative;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ds-card__link {
|
|
80
|
+
color: inherit;
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
|
|
83
|
+
&::after {
|
|
84
|
+
content: "";
|
|
85
|
+
position: absolute;
|
|
86
|
+
inset: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* The link is the title text, a fragment of the card. Its own ring would
|
|
91
|
+
* outline one line of a heading while the whole card is the target, so
|
|
92
|
+
* the ring moves to the card.
|
|
93
|
+
*/
|
|
94
|
+
&:focus-visible {
|
|
95
|
+
outline: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
* The card's ring, declared once for the three ways a card takes keyboard
|
|
101
|
+
* focus: focusable itself, wrapped in a link or button, or holding a
|
|
102
|
+
* CardLink.
|
|
103
|
+
*/
|
|
104
|
+
.ds-card:where([data-interactive]):focus-visible,
|
|
105
|
+
:where(a, button):focus-visible > .ds-card--interactive,
|
|
106
|
+
.ds-card:has(.ds-card__link:focus-visible) {
|
|
76
107
|
outline: 2px solid var(--ds-card-focus-ring);
|
|
77
108
|
outline-offset: 3px;
|
|
78
109
|
}
|
package/dist/card/card.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface CardProps extends ComponentProps<typeof ark.div> {
|
|
|
7
7
|
* click target (a link wrapping the whole card, for example).
|
|
8
8
|
*
|
|
9
9
|
* This only applies styling. The consumer is still responsible for making
|
|
10
|
-
* the card actually operable —
|
|
11
|
-
* appropriate role and key handling. A
|
|
12
|
-
* of this prop.
|
|
10
|
+
* the card actually operable — put a {@link CardLink} in its title, wrap it
|
|
11
|
+
* in a link or button, or supply the appropriate role and key handling. A
|
|
12
|
+
* card is not interactive by virtue of this prop.
|
|
13
13
|
*
|
|
14
14
|
* The component reflects this state as `[data-interactive]`, a stable hook
|
|
15
15
|
* for compositions that need to extend the interactive treatment without
|
|
@@ -24,8 +24,8 @@ export interface CardProps extends ComponentProps<typeof ark.div> {
|
|
|
24
24
|
* no interaction model of their own. Styled exclusively against the
|
|
25
25
|
* `--ds-card-*` token contract.
|
|
26
26
|
*
|
|
27
|
-
* Compose with {@link CardHeader}, {@link CardTitle}, {@link
|
|
28
|
-
* {@link CardContent}, and {@link CardFooter}. Each sub-part is optional and
|
|
27
|
+
* Compose with {@link CardHeader}, {@link CardTitle}, {@link CardLink},
|
|
28
|
+
* {@link CardDescription}, {@link CardContent}, and {@link CardFooter}. Each sub-part is optional and
|
|
29
29
|
* carries only layout; none of them impose semantics beyond `CardTitle`,
|
|
30
30
|
* which renders a real heading.
|
|
31
31
|
*
|
|
@@ -60,6 +60,42 @@ export interface CardTitleProps extends ComponentProps<typeof ark.h3> {
|
|
|
60
60
|
}
|
|
61
61
|
/** Accessible heading for a card. Renders `h3` unless `as` overrides it. */
|
|
62
62
|
export declare function CardTitle({ as, className, children, ...props }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export type CardLinkProps = ComponentProps<typeof ark.a>;
|
|
64
|
+
/**
|
|
65
|
+
* The card's one destination: a link whose hit area stretches over the whole
|
|
66
|
+
* card, so a click anywhere on it opens the destination while other controls
|
|
67
|
+
* inside the card stay separately operable.
|
|
68
|
+
*
|
|
69
|
+
* Wrapping a card in a link can't do that: any button or menu inside the
|
|
70
|
+
* link is interactive content nested in interactive content, which is invalid
|
|
71
|
+
* HTML, gives an unpredictable tab order, and swallows the inner control's
|
|
72
|
+
* clicks. Here the link wraps only the title text, so it is named by the title
|
|
73
|
+
* and sits in the tab order once. A transparent `::after` stretches it over
|
|
74
|
+
* the card.
|
|
75
|
+
*
|
|
76
|
+
* ```tsx
|
|
77
|
+
* <Card interactive>
|
|
78
|
+
* <CardTitle>
|
|
79
|
+
* <CardLink href="/goals/123">Run a half marathon</CardLink>
|
|
80
|
+
* </CardTitle>
|
|
81
|
+
* <button type="button" className="raised">…</button>
|
|
82
|
+
* </Card>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* - Pass `interactive` to the card for its hover affordance. The focus ring is
|
|
86
|
+
* drawn on the card whenever this link has keyboard focus.
|
|
87
|
+
* - Every other control in the card has to paint above the stretched area:
|
|
88
|
+
* give it `position: relative` and `z-index: 1` (the `raised` stacking
|
|
89
|
+
* layer) on your own class, or the link takes its clicks.
|
|
90
|
+
* - Text under the stretched area can't be selected with a pointer drag.
|
|
91
|
+
* Keep the card to content that is read rather than copied.
|
|
92
|
+
* - Use one per card. A second one would cover the first.
|
|
93
|
+
*
|
|
94
|
+
* For a router's link, pass `asChild` and the link as the only child; it
|
|
95
|
+
* receives this part's class and keeps its own `href` and behaviour:
|
|
96
|
+
* `<CardLink asChild><Link href="/goals/123">Run a half marathon</Link></CardLink>`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function CardLink({ className, children, ...props }: CardLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
63
99
|
export type CardDescriptionProps = ComponentProps<typeof ark.p>;
|
|
64
100
|
/** Muted supporting copy, typically directly under {@link CardTitle}. */
|
|
65
101
|
export declare function CardDescription({ className, children, ...props }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/card/card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,YAAY,CAAC;AAGpB,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;IAC/D;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,EAAE,WAAmB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAUrF;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7D,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErE,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;IACnE;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;CACrB;AAED,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BAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E"}
|
package/dist/card/card.js
CHANGED
|
@@ -9,8 +9,8 @@ import { cx } from '../cx';
|
|
|
9
9
|
* no interaction model of their own. Styled exclusively against the
|
|
10
10
|
* `--ds-card-*` token contract.
|
|
11
11
|
*
|
|
12
|
-
* Compose with {@link CardHeader}, {@link CardTitle}, {@link
|
|
13
|
-
* {@link CardContent}, and {@link CardFooter}. Each sub-part is optional and
|
|
12
|
+
* Compose with {@link CardHeader}, {@link CardTitle}, {@link CardLink},
|
|
13
|
+
* {@link CardDescription}, {@link CardContent}, and {@link CardFooter}. Each sub-part is optional and
|
|
14
14
|
* carries only layout; none of them impose semantics beyond `CardTitle`,
|
|
15
15
|
* which renders a real heading.
|
|
16
16
|
*
|
|
@@ -30,6 +30,43 @@ export function CardTitle({ as, className, children, ...props }) {
|
|
|
30
30
|
const Component = as ? ark[as] : ark.h3;
|
|
31
31
|
return (_jsx(Component, { className: cx('ds-card__title', className), ...props, children: children }));
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The card's one destination: a link whose hit area stretches over the whole
|
|
35
|
+
* card, so a click anywhere on it opens the destination while other controls
|
|
36
|
+
* inside the card stay separately operable.
|
|
37
|
+
*
|
|
38
|
+
* Wrapping a card in a link can't do that: any button or menu inside the
|
|
39
|
+
* link is interactive content nested in interactive content, which is invalid
|
|
40
|
+
* HTML, gives an unpredictable tab order, and swallows the inner control's
|
|
41
|
+
* clicks. Here the link wraps only the title text, so it is named by the title
|
|
42
|
+
* and sits in the tab order once. A transparent `::after` stretches it over
|
|
43
|
+
* the card.
|
|
44
|
+
*
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <Card interactive>
|
|
47
|
+
* <CardTitle>
|
|
48
|
+
* <CardLink href="/goals/123">Run a half marathon</CardLink>
|
|
49
|
+
* </CardTitle>
|
|
50
|
+
* <button type="button" className="raised">…</button>
|
|
51
|
+
* </Card>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* - Pass `interactive` to the card for its hover affordance. The focus ring is
|
|
55
|
+
* drawn on the card whenever this link has keyboard focus.
|
|
56
|
+
* - Every other control in the card has to paint above the stretched area:
|
|
57
|
+
* give it `position: relative` and `z-index: 1` (the `raised` stacking
|
|
58
|
+
* layer) on your own class, or the link takes its clicks.
|
|
59
|
+
* - Text under the stretched area can't be selected with a pointer drag.
|
|
60
|
+
* Keep the card to content that is read rather than copied.
|
|
61
|
+
* - Use one per card. A second one would cover the first.
|
|
62
|
+
*
|
|
63
|
+
* For a router's link, pass `asChild` and the link as the only child; it
|
|
64
|
+
* receives this part's class and keeps its own `href` and behaviour:
|
|
65
|
+
* `<CardLink asChild><Link href="/goals/123">Run a half marathon</Link></CardLink>`.
|
|
66
|
+
*/
|
|
67
|
+
export function CardLink({ className, children, ...props }) {
|
|
68
|
+
return (_jsx(ark.a, { className: cx('ds-card__link', className), ...props, children: children }));
|
|
69
|
+
}
|
|
33
70
|
/** Muted supporting copy, typically directly under {@link CardTitle}. */
|
|
34
71
|
export function CardDescription({ className, children, ...props }) {
|
|
35
72
|
return (_jsx(ark.p, { className: cx('ds-card__description', className), ...props, children: children }));
|
package/dist/card/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAmB3B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IACpF,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,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CAAC"}
|
package/dist/card/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardHeadingTag, CardProps, CardTitleProps, } from './card';
|
|
2
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './card';
|
|
1
|
+
export type { CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardHeadingTag, CardLinkProps, CardProps, CardTitleProps, } from './card';
|
|
2
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardLink, CardTitle, } from './card';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/card/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,cAAc,EACd,SAAS,EACT,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,QAAQ,CAAC"}
|
package/dist/card/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './card';
|
|
1
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardLink, CardTitle, } from './card';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/card/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/card/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,GACV,MAAM,QAAQ,CAAC"}
|
package/dist/dialog/dialog.css
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Both sit at 50, the layer the product apps give their own popovers,
|
|
7
7
|
* dialogs and sticky headers, so the dialog covers all of the page. The
|
|
8
8
|
* positioner comes after the backdrop in the DOM and so paints above it at
|
|
9
|
-
* the same index. Select's listbox
|
|
9
|
+
* the same index. Select's listbox and Menu's popup sit at 60 and open
|
|
10
|
+
* above a dialog.
|
|
10
11
|
*/
|
|
11
12
|
.ds-dialog__backdrop {
|
|
12
13
|
position: fixed;
|
package/dist/dialog/dialog.d.ts
CHANGED
|
@@ -96,9 +96,9 @@ export interface DialogProps {
|
|
|
96
96
|
* wrap the button in `DialogClose` when closing at once is right.
|
|
97
97
|
*
|
|
98
98
|
* The backdrop and panel portal into `<body>` at `z-index: 50`, the layer
|
|
99
|
-
* the product apps use for their own overlays. A Select inside the
|
|
100
|
-
* portals into its panel (see `PortalContainerContext`) and opens at
|
|
101
|
-
* above it. Nothing is mounted while the dialog is closed.
|
|
99
|
+
* the product apps use for their own overlays. A Select or Menu inside the
|
|
100
|
+
* dialog portals into its panel (see `PortalContainerContext`) and opens at
|
|
101
|
+
* 60, above it. Nothing is mounted while the dialog is closed.
|
|
102
102
|
*/
|
|
103
103
|
export declare function Dialog({ title, description, children, actions, trigger, open, defaultOpen, onOpenChange, role, initialFocusRef, closeLabel, closeIcon, className, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
104
104
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,cAAc,CAAC;AAItB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChD,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,OAAO,EACP,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,IAAe,EACf,eAAe,EACf,UAAoB,EACpB,SAAiB,EACjB,SAAS,GACV,EAAE,WAAW,2CAuDb"}
|
package/dist/dialog/dialog.js
CHANGED
|
@@ -6,6 +6,7 @@ import { IconButton } from '../button/icon-button';
|
|
|
6
6
|
import { PortalContainerContext } from '../portal-container';
|
|
7
7
|
import './dialog.css';
|
|
8
8
|
import { cx } from '../cx';
|
|
9
|
+
import { Cross } from '../fallback-glyphs';
|
|
9
10
|
/**
|
|
10
11
|
* A modal dialog: a raised panel over a dimmed page, built on Ark UI.
|
|
11
12
|
*
|
|
@@ -37,9 +38,9 @@ import { cx } from '../cx';
|
|
|
37
38
|
* wrap the button in `DialogClose` when closing at once is right.
|
|
38
39
|
*
|
|
39
40
|
* The backdrop and panel portal into `<body>` at `z-index: 50`, the layer
|
|
40
|
-
* the product apps use for their own overlays. A Select inside the
|
|
41
|
-
* portals into its panel (see `PortalContainerContext`) and opens at
|
|
42
|
-
* above it. Nothing is mounted while the dialog is closed.
|
|
41
|
+
* the product apps use for their own overlays. A Select or Menu inside the
|
|
42
|
+
* dialog portals into its panel (see `PortalContainerContext`) and opens at
|
|
43
|
+
* 60, above it. Nothing is mounted while the dialog is closed.
|
|
43
44
|
*/
|
|
44
45
|
export function Dialog({ title, description, children, actions, trigger, open, defaultOpen, onOpenChange, role = 'dialog', initialFocusRef, closeLabel = 'Close', closeIcon = Cross, className, }) {
|
|
45
46
|
const dismissible = role === 'dialog';
|
|
@@ -72,11 +73,4 @@ function DialogBody({ children }) {
|
|
|
72
73
|
}, []);
|
|
73
74
|
return (_jsx("div", { ref: observe, className: "ds-dialog__body", tabIndex: scrollable ? 0 : undefined, children: _jsx("div", { className: "ds-dialog__body-content", children: children }) }));
|
|
74
75
|
}
|
|
75
|
-
/*
|
|
76
|
-
* Fallback glyph, inlined for the reason Select's are: ui-core is public and
|
|
77
|
-
* may not reference the private icon package, so a default that ships inside
|
|
78
|
-
* it cannot be a licensed icon. Products override it via `closeIcon`.
|
|
79
|
-
*/
|
|
80
|
-
const Cross = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m4 4 8 8m0-8-8 8", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }));
|
|
81
|
-
Cross.displayName = 'DialogCross';
|
|
82
76
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/dialog/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAIL,WAAW,EACX,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/dialog/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;A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AQ,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE,CACvC,aAAa,CAAC,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,CAC7D,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC3B,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,cAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAC,iBAAiB,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,YACjF,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,GACrD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback-glyphs.d.ts","sourceRoot":"","sources":["../src/fallback-glyphs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAsB9C,eAAO,MAAM,YAAY,EAAE,UAW1B,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAWnB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,UAUnB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Fallback glyphs for the components whose icon slots default to something
|
|
4
|
+
* (Select's indicators, Menu's check, Dialog's close button), inlined on
|
|
5
|
+
* purpose and kept in one place. The package root exports them as
|
|
6
|
+
* `Fallback*`, so a product composition with the same default reuses these
|
|
7
|
+
* rather than copying the path data.
|
|
8
|
+
*
|
|
9
|
+
* ui-core is public and MIT; the Lineicons Pro icon package is private and
|
|
10
|
+
* carries proprietary payloads, so a public package must not reference it —
|
|
11
|
+
* `check:tarballs` enforces that. A default that ships inside ui-core's own
|
|
12
|
+
* runtime therefore cannot be a licensed icon.
|
|
13
|
+
*
|
|
14
|
+
* These exist only so the package works standalone. Products override them
|
|
15
|
+
* via `indicator` / `itemIndicator`, which is how the Humanity Plus apps
|
|
16
|
+
* render Lineicons here.
|
|
17
|
+
*
|
|
18
|
+
* Note: that audit is a plain string scan over the built output, and tsc
|
|
19
|
+
* keeps comments, so naming the private package here — even in prose —
|
|
20
|
+
* would fail CI. Describe it, do not spell it.
|
|
21
|
+
*/
|
|
22
|
+
export const ChevronRight = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m6 4 4 4-4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
23
|
+
ChevronRight.displayName = 'FallbackChevronRight';
|
|
24
|
+
export const Check = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m3.5 8.5 3 3 6-6", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
25
|
+
Check.displayName = 'FallbackCheck';
|
|
26
|
+
export const Cross = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m4 4 8 8m0-8-8 8", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }));
|
|
27
|
+
Cross.displayName = 'FallbackCross';
|
|
28
|
+
//# sourceMappingURL=fallback-glyphs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback-glyphs.js","sourceRoot":"","sources":["../src/fallback-glyphs.tsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CACjD,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,cAAc,EAChB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,KAAK,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1C,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,kBAAkB,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1C,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,kBAAkB,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,GACE,CACP,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,eAAe,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ export * from './button';
|
|
|
4
4
|
export * from './card';
|
|
5
5
|
export { cx } from './cx';
|
|
6
6
|
export * from './dialog';
|
|
7
|
+
export { Check as FallbackCheck, ChevronRight as FallbackChevronRight, Cross as FallbackCross, } from './fallback-glyphs';
|
|
7
8
|
export * from './icon';
|
|
8
9
|
export * from './illustration';
|
|
10
|
+
export * from './menu';
|
|
9
11
|
export * from './progress';
|
|
10
12
|
export * from './select';
|
|
11
13
|
export * from './switch';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,KAAK,IAAI,aAAa,EACtB,YAAY,IAAI,oBAAoB,EACpC,KAAK,IAAI,aAAa,GACvB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,10 @@ export * from './button';
|
|
|
4
4
|
export * from './card';
|
|
5
5
|
export { cx } from './cx';
|
|
6
6
|
export * from './dialog';
|
|
7
|
+
export { Check as FallbackCheck, ChevronRight as FallbackChevronRight, Cross as FallbackCross, } from './fallback-glyphs';
|
|
7
8
|
export * from './icon';
|
|
8
9
|
export * from './illustration';
|
|
10
|
+
export * from './menu';
|
|
9
11
|
export * from './progress';
|
|
10
12
|
export * from './select';
|
|
11
13
|
export * from './switch';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,KAAK,IAAI,aAAa,EACtB,YAAY,IAAI,oBAAoB,EACpC,KAAK,IAAI,aAAa,GACvB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/*
|
|
3
|
+
* The popup renders in a portal, so it is not a descendant of the trigger
|
|
4
|
+
* in the DOM and is styled at the top level, as Select's listbox is.
|
|
5
|
+
*/
|
|
6
|
+
.ds-menu__content {
|
|
7
|
+
padding: var(--ds-menu-content-padding);
|
|
8
|
+
border: 1px solid var(--ds-menu-content-border);
|
|
9
|
+
border-radius: var(--ds-menu-content-radius);
|
|
10
|
+
background-color: var(--ds-menu-content-bg);
|
|
11
|
+
/*
|
|
12
|
+
* The `popup` stacking layer (ds-config/scripts/stacking.ts), as Select's
|
|
13
|
+
* listbox: Zag copies this onto the positioner, a sibling of the page in
|
|
14
|
+
* `<body>`, so the menu paints above the products' overlay layer and the
|
|
15
|
+
* page content positioned under it.
|
|
16
|
+
*/
|
|
17
|
+
z-index: 60;
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Inset like Select's listbox ring: an outer ring on a portalled popup is
|
|
21
|
+
* cropped by anything that sizes to it and can clip against the viewport.
|
|
22
|
+
*/
|
|
23
|
+
&:focus-visible {
|
|
24
|
+
outline: 2px solid var(--ds-menu-focus-ring);
|
|
25
|
+
outline-offset: -2px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Names the group of choices for assistive technology only. The trigger
|
|
31
|
+
* already says what the menu chooses, so showing it again would repeat it.
|
|
32
|
+
*/
|
|
33
|
+
.ds-menu__label {
|
|
34
|
+
position: absolute;
|
|
35
|
+
width: 1px;
|
|
36
|
+
height: 1px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
clip-path: inset(50%);
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ds-menu__item {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
gap: var(--ds-menu-item-gap);
|
|
47
|
+
padding: var(--ds-menu-item-padding-block) var(--ds-menu-item-padding-inline);
|
|
48
|
+
/* Nested radius, derived from the popup's as Select's items derive theirs. */
|
|
49
|
+
border-radius: max(
|
|
50
|
+
0px,
|
|
51
|
+
calc(var(--ds-menu-content-radius) - var(--ds-menu-content-padding) - 1px)
|
|
52
|
+
);
|
|
53
|
+
color: var(--ds-menu-item-text);
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
|
|
57
|
+
&[data-highlighted] {
|
|
58
|
+
background-color: var(--ds-menu-item-bg-highlighted);
|
|
59
|
+
color: var(--ds-menu-item-text-highlighted);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&[data-disabled] {
|
|
63
|
+
opacity: var(--ds-opacity-disabled);
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Ark hides the indicator of every unchecked item with the `hidden`
|
|
70
|
+
* attribute, which only the UA's `[hidden] { display: none }` acts on. An
|
|
71
|
+
* author `display` beats that rule, so the pair stays together or every
|
|
72
|
+
* item shows a check.
|
|
73
|
+
*/
|
|
74
|
+
.ds-menu__item-indicator {
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
|
|
78
|
+
&[hidden] {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import { type IconSource } from '../icon/icon';
|
|
3
|
+
import './menu.css';
|
|
4
|
+
export interface MenuItem<V extends string = string> {
|
|
5
|
+
/** Stable value reported by `onValueChange` and compared with `value`. */
|
|
6
|
+
value: V;
|
|
7
|
+
/** Text shown in the menu. Also what typeahead matches against. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Individually disable this choice without removing it. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic over the value type, so a union of choices (`'draft' | 'live'`)
|
|
14
|
+
* comes back out of `onValueChange` as that union rather than as `string`.
|
|
15
|
+
*/
|
|
16
|
+
export interface MenuProps<V extends string = string> {
|
|
17
|
+
/**
|
|
18
|
+
* The element that opens the menu: a `<button>`, or a component that
|
|
19
|
+
* passes its props and `ref` on to one.
|
|
20
|
+
*
|
|
21
|
+
* Ark renders it as the trigger, adding `aria-haspopup`, `aria-expanded`,
|
|
22
|
+
* `aria-controls`, the open/close handlers and `data-state` (`open` or
|
|
23
|
+
* `closed`, for a product's own indicator). Its own handlers still run.
|
|
24
|
+
* Give it an accessible name that says what is chosen and what pressing
|
|
25
|
+
* it does, such as "Status: In progress. Change status": the menu takes
|
|
26
|
+
* its name from the trigger.
|
|
27
|
+
*/
|
|
28
|
+
trigger: ReactElement;
|
|
29
|
+
/**
|
|
30
|
+
* What the items choose between, such as "Status". Names the group of
|
|
31
|
+
* choices for assistive technology; it is not shown.
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/** The choices, in order. Exactly one is checked: the one matching `value`. */
|
|
35
|
+
items: MenuItem<V>[];
|
|
36
|
+
/**
|
|
37
|
+
* The checked choice. Controlled only: the menu reports a choice through
|
|
38
|
+
* `onValueChange` and shows whatever `value` says next. A value matching
|
|
39
|
+
* no item leaves nothing checked.
|
|
40
|
+
*/
|
|
41
|
+
value: V;
|
|
42
|
+
/**
|
|
43
|
+
* Fired when a different choice is made. Choosing the item that is already
|
|
44
|
+
* checked closes the menu without firing, so a consumer that saves on
|
|
45
|
+
* change never writes the same value twice.
|
|
46
|
+
*/
|
|
47
|
+
onValueChange: (value: V) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Glyph marking the checked choice.
|
|
50
|
+
*
|
|
51
|
+
* Defaults to a plain built-in check so `@manakind/ui-core` installs and
|
|
52
|
+
* renders on its own. Products override it with their own icon set, as
|
|
53
|
+
* they do Select's `itemIndicator`.
|
|
54
|
+
*/
|
|
55
|
+
itemIndicator?: IconSource;
|
|
56
|
+
/** Extra class names on the menu's popup. */
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A menu of mutually exclusive choices, opened from a trigger and applied
|
|
61
|
+
* at once, built on Ark UI's Menu.
|
|
62
|
+
*
|
|
63
|
+
* Ark owns the hard parts: `menu` / `menuitemradio` semantics, roving
|
|
64
|
+
* highlight with the arrow keys, Home/End, typeahead, Escape and click
|
|
65
|
+
* outside to dismiss, and focus returning to the trigger on close. This
|
|
66
|
+
* wrapper contributes `ds-` classes, the `--ds-menu-*` bindings, and a flat
|
|
67
|
+
* `items` API in place of Ark's anatomy.
|
|
68
|
+
*
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <Menu
|
|
71
|
+
* trigger={<button type="button" aria-label="Status: In Progress. Change status">…</button>}
|
|
72
|
+
* label="Status"
|
|
73
|
+
* items={[
|
|
74
|
+
* { value: 'Not Started', label: 'Not Started' },
|
|
75
|
+
* { value: 'In Progress', label: 'In Progress' },
|
|
76
|
+
* { value: 'Completed', label: 'Completed' },
|
|
77
|
+
* ]}
|
|
78
|
+
* value={status}
|
|
79
|
+
* onValueChange={setStatus}
|
|
80
|
+
* />
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* Reach for this when the choice takes effect immediately, from a control
|
|
84
|
+
* that is not a form field — a status badge, a sort order. A form field
|
|
85
|
+
* whose value is submitted later is a `Select`.
|
|
86
|
+
*
|
|
87
|
+
* The popup renders in a portal, at the same `z-index: 60` as Select's
|
|
88
|
+
* listbox, a step above the products' overlay layer (50), so it paints above
|
|
89
|
+
* the page or dialog it opens from. It is mounted only while open, so a list
|
|
90
|
+
* of a hundred menus adds nothing to the page until one is opened.
|
|
91
|
+
*/
|
|
92
|
+
export declare function Menu<V extends string = string>({ trigger, label, items, value, onValueChange, itemIndicator, className, }: MenuProps<V>): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/menu/menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,YAAY,CAAC;AAEpB,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACjD,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC;IACT,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAClD;;;;;;;;;;OAUG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,CAAC,CAAC;IACT;;;;OAIG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAC9C,OAAO,EACP,KAAK,EACL,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAqB,EACrB,SAAS,GACV,EAAE,SAAS,CAAC,CAAC,CAAC,2CA6Cd"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as ArkMenu } from '@ark-ui/react/menu';
|
|
3
|
+
import { Portal } from '@ark-ui/react/portal';
|
|
4
|
+
import { useCallback, useContext } from 'react';
|
|
5
|
+
import { cx } from '../cx';
|
|
6
|
+
import { Check } from '../fallback-glyphs';
|
|
7
|
+
import { Icon } from '../icon/icon';
|
|
8
|
+
import { PortalContainerContext } from '../portal-container';
|
|
9
|
+
import './menu.css';
|
|
10
|
+
/**
|
|
11
|
+
* A menu of mutually exclusive choices, opened from a trigger and applied
|
|
12
|
+
* at once, built on Ark UI's Menu.
|
|
13
|
+
*
|
|
14
|
+
* Ark owns the hard parts: `menu` / `menuitemradio` semantics, roving
|
|
15
|
+
* highlight with the arrow keys, Home/End, typeahead, Escape and click
|
|
16
|
+
* outside to dismiss, and focus returning to the trigger on close. This
|
|
17
|
+
* wrapper contributes `ds-` classes, the `--ds-menu-*` bindings, and a flat
|
|
18
|
+
* `items` API in place of Ark's anatomy.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Menu
|
|
22
|
+
* trigger={<button type="button" aria-label="Status: In Progress. Change status">…</button>}
|
|
23
|
+
* label="Status"
|
|
24
|
+
* items={[
|
|
25
|
+
* { value: 'Not Started', label: 'Not Started' },
|
|
26
|
+
* { value: 'In Progress', label: 'In Progress' },
|
|
27
|
+
* { value: 'Completed', label: 'Completed' },
|
|
28
|
+
* ]}
|
|
29
|
+
* value={status}
|
|
30
|
+
* onValueChange={setStatus}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Reach for this when the choice takes effect immediately, from a control
|
|
35
|
+
* that is not a form field — a status badge, a sort order. A form field
|
|
36
|
+
* whose value is submitted later is a `Select`.
|
|
37
|
+
*
|
|
38
|
+
* The popup renders in a portal, at the same `z-index: 60` as Select's
|
|
39
|
+
* listbox, a step above the products' overlay layer (50), so it paints above
|
|
40
|
+
* the page or dialog it opens from. It is mounted only while open, so a list
|
|
41
|
+
* of a hundred menus adds nothing to the page until one is opened.
|
|
42
|
+
*/
|
|
43
|
+
export function Menu({ trigger, label, items, value, onValueChange, itemIndicator = Check, className, }) {
|
|
44
|
+
/*
|
|
45
|
+
* Ark reports the value as a string; mapping it back through `items`
|
|
46
|
+
* returns the caller's own type without a cast, and drops anything that is
|
|
47
|
+
* not one of the choices.
|
|
48
|
+
*/
|
|
49
|
+
const handleValueChange = useCallback((details) => {
|
|
50
|
+
const chosen = items.find((item) => item.value === details.value);
|
|
51
|
+
if (chosen && chosen.value !== value)
|
|
52
|
+
onValueChange(chosen.value);
|
|
53
|
+
}, [items, value, onValueChange]);
|
|
54
|
+
const portalContainer = useContext(PortalContainerContext);
|
|
55
|
+
return (_jsxs(ArkMenu.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(ArkMenu.Trigger, { asChild: true, children: trigger }), _jsx(Portal, { container: portalContainer, children: _jsx(ArkMenu.Positioner, { children: _jsx(ArkMenu.Content, { className: cx('ds-menu__content', className), children: _jsxs(ArkMenu.RadioItemGroup, { value: value, onValueChange: handleValueChange, children: [_jsx(ArkMenu.ItemGroupLabel, { className: "ds-menu__label", children: label }), items.map((item) => (_jsxs(ArkMenu.RadioItem, { value: item.value, valueText: item.label, disabled: item.disabled, className: "ds-menu__item", children: [_jsx(ArkMenu.ItemText, { children: item.label }), _jsx(ArkMenu.ItemIndicator, { className: "ds-menu__item-indicator", children: _jsx(Icon, { source: itemIndicator, size: "sm", decorative: true }) })] }, item.value)))] }) }) }) })] }));
|
|
56
|
+
}
|
|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AC,OAAO,CAAC,OAAO,IAAC,OAAO,kBAAE,OAAO,GAAmB,EAEpD,KAAC,MAAM,IAAC,SAAS,EAAE,eAAe,YAChC,KAAC,OAAO,CAAC,UAAU,cACjB,KAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC,YAC3D,MAAC,OAAO,CAAC,cAAc,IAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,iBAAiB,aACpE,KAAC,OAAO,CAAC,cAAc,IAAC,SAAS,EAAC,gBAAgB,YAAE,KAAK,GAA0B,EAClF,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,MAAC,OAAO,CAAC,SAAS,IAEhB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,KAAK,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAC,eAAe,aAEzB,KAAC,OAAO,CAAC,QAAQ,cAAE,IAAI,CAAC,KAAK,GAAoB,EACjD,KAAC,OAAO,CAAC,aAAa,IAAC,SAAS,EAAC,yBAAyB,YACxD,KAAC,IAAI,IAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC9B,KATnB,IAAI,CAAC,KAAK,CAUG,CACrB,CAAC,IACqB,GACT,GACC,GACd,IACI,CAChB,CAAC;AACJ,CAAC"}
|
package/dist/select/select.css
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
* listbox opens from one of those, so it sits a step above them: at an
|
|
36
36
|
* equal 50 the tie goes to DOM order, and React inserts a Select's portal
|
|
37
37
|
* before the dialog that contains it, so the dialog covered its options.
|
|
38
|
+
* 60 is the `popup` layer in ds-config/scripts/stacking.ts.
|
|
38
39
|
*/
|
|
39
40
|
z-index: 60;
|
|
40
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AACzE,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AACzE,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,cAAc,CAAC;AAItB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,qCAAqC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,gGAAgG;IAChG,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,YAAY,EACZ,aAAa,EACb,IAAW,EACX,QAAQ,EACR,OAAe,EACf,WAAwB,EACxB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,UAAU,EACV,SAAwB,EACxB,aAAqB,EACrB,YAAY,EAAE,SAAS,GACxB,EAAE,WAAW,2CA8Fb"}
|
package/dist/select/select.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Icon } from '../icon/icon';
|
|
|
6
6
|
import { PortalContainerContext } from '../portal-container';
|
|
7
7
|
import './select.css';
|
|
8
8
|
import { cx } from '../cx';
|
|
9
|
+
import { Check, ChevronRight } from '../fallback-glyphs';
|
|
9
10
|
/**
|
|
10
11
|
* Single-select dropdown, built on Ark UI.
|
|
11
12
|
*
|
|
@@ -72,24 +73,4 @@ export function Select({ items, label, placeholder, value, defaultValue, onValue
|
|
|
72
73
|
const handleValueChange = useCallback((details) => onValueChange?.(details.value[0]), [onValueChange]);
|
|
73
74
|
return (_jsxs(ArkSelect.Root, { collection: collection, className: cx('ds-select', `ds-select--${size}`, className), value: controlledValue, defaultValue: initialValue, onValueChange: handleValueChange, disabled: disabled || loading, invalid: invalid, name: name, positioning: { sameWidth: true }, children: [label && _jsx(ArkSelect.Label, { className: "ds-select__label", children: label }), _jsx(ArkSelect.Control, { children: _jsxs(ArkSelect.Trigger, { className: "ds-select__trigger", "aria-label": ariaLabel, "aria-busy": loading || undefined, children: [_jsx(ArkSelect.ValueText, { placeholder: loading ? loadingText : placeholder, className: "ds-select__value-text" }), _jsx(ArkSelect.Indicator, { className: "ds-select__indicator", children: _jsx(Icon, { source: indicator, size: "sm", decorative: true }) })] }) }), _jsx(Portal, { container: portalContainer, children: _jsx(ArkSelect.Positioner, { children: _jsx(ArkSelect.Content, { className: "ds-select__content", children: items.map((item) => (_jsxs(ArkSelect.Item, { item: item, className: "ds-select__item", children: [_jsx(ArkSelect.ItemText, { children: renderItem ? renderItem(item) : item.label }), _jsx(ArkSelect.ItemIndicator, { className: "ds-select__item-indicator", children: _jsx(Icon, { source: itemIndicator, size: "sm", decorative: true }) })] }, item.value))) }) }) }), _jsx(ArkSelect.HiddenSelect, {})] }));
|
|
74
75
|
}
|
|
75
|
-
/*
|
|
76
|
-
* Fallback glyphs, inlined on purpose.
|
|
77
|
-
*
|
|
78
|
-
* ui-core is public and MIT; the Lineicons Pro icon package is private and
|
|
79
|
-
* carries proprietary payloads, so a public package must not reference it —
|
|
80
|
-
* `check:tarballs` enforces that. A default that ships inside ui-core's own
|
|
81
|
-
* runtime therefore cannot be a licensed icon.
|
|
82
|
-
*
|
|
83
|
-
* These exist only so the package works standalone. Products override them
|
|
84
|
-
* via `indicator` / `itemIndicator`, which is how the Humanity Plus apps
|
|
85
|
-
* render Lineicons here.
|
|
86
|
-
*
|
|
87
|
-
* Note: that audit is a plain string scan over the built output, and tsc
|
|
88
|
-
* keeps comments, so naming the private package here — even in prose —
|
|
89
|
-
* would fail CI. Describe it, do not spell it.
|
|
90
|
-
*/
|
|
91
|
-
const ChevronRight = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m6 4 4 4-4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
92
|
-
ChevronRight.displayName = 'SelectChevronRight';
|
|
93
|
-
const Check = (props) => (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", ...props, children: _jsx("path", { d: "m3.5 8.5 3 3 6-6", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
94
|
-
Check.displayName = 'SelectCheck';
|
|
95
76
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAkB,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAkB,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,cAAc,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WAAW,EAChD,SAAS,EAAC,uBAAuB,GACjC,EACF,KAAC,SAAS,CAAC,SAAS,IAAC,SAAS,EAAC,sBAAsB,YACnD,KAAC,IAAI,IAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC5B,IACJ,GACF,EAEpB,KAAC,MAAM,IAAC,SAAS,EAAE,eAAe,YAChC,KAAC,SAAS,CAAC,UAAU,cACnB,KAAC,SAAS,CAAC,OAAO,IAAC,SAAS,EAAC,oBAAoB,YAC9C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,MAAC,SAAS,CAAC,IAAI,IAAkB,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,iBAAiB,aACtE,KAAC,SAAS,CAAC,QAAQ,cAChB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GACxB,EACrB,KAAC,SAAS,CAAC,aAAa,IAAC,SAAS,EAAC,2BAA2B,YAC5D,KAAC,IAAI,IAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC5B,KANP,IAAI,CAAC,KAAK,CAOd,CAClB,CAAC,GACgB,GACC,GAChB,EAET,KAAC,SAAS,CAAC,YAAY,KAAG,IACX,CAClB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manakind/ui-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
"types": "./dist/illustration/illustration.css.d.ts",
|
|
73
73
|
"default": "./dist/illustration/illustration.css"
|
|
74
74
|
},
|
|
75
|
+
"./css/menu": {
|
|
76
|
+
"types": "./dist/menu/menu.css.d.ts",
|
|
77
|
+
"default": "./dist/menu/menu.css"
|
|
78
|
+
},
|
|
75
79
|
"./css/progress": {
|
|
76
80
|
"types": "./dist/progress/progress.css.d.ts",
|
|
77
81
|
"default": "./dist/progress/progress.css"
|
|
@@ -96,6 +100,10 @@
|
|
|
96
100
|
"types": "./dist/illustration/index.d.ts",
|
|
97
101
|
"import": "./dist/illustration/index.js"
|
|
98
102
|
},
|
|
103
|
+
"./menu": {
|
|
104
|
+
"types": "./dist/menu/index.d.ts",
|
|
105
|
+
"import": "./dist/menu/index.js"
|
|
106
|
+
},
|
|
99
107
|
"./progress": {
|
|
100
108
|
"types": "./dist/progress/index.d.ts",
|
|
101
109
|
"import": "./dist/progress/index.js"
|
|
@@ -130,7 +138,7 @@
|
|
|
130
138
|
},
|
|
131
139
|
"devDependencies": {
|
|
132
140
|
"@manakind/ds-config": "*",
|
|
133
|
-
"@manakind/manuia-tokens": "0.
|
|
141
|
+
"@manakind/manuia-tokens": "0.7.0",
|
|
134
142
|
"@testing-library/jest-dom": "^6.9.1",
|
|
135
143
|
"@testing-library/react": "^16.3.2",
|
|
136
144
|
"@testing-library/user-event": "^14.6.1",
|