@manakind/ui-core 0.11.0 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert/alert.css +1 -2
- package/dist/badge/badge.css +5 -4
- package/dist/button/button.css +2 -0
- package/dist/card/card.css +2 -0
- package/dist/dialog/dialog.css +1 -0
- package/dist/field/field.css +1 -0
- package/dist/field/field.d.ts +5 -4
- package/dist/field/field.d.ts.map +1 -1
- package/dist/field/field.js +8 -4
- package/dist/field/field.js.map +1 -1
- package/dist/field/use-field-control.d.ts +13 -1
- package/dist/field/use-field-control.d.ts.map +1 -1
- package/dist/field/use-field-control.js +29 -5
- package/dist/field/use-field-control.js.map +1 -1
- package/dist/menu/menu.css +9 -1
- package/dist/progress/progress.css +3 -0
- package/dist/progress/progress.d.ts.map +1 -1
- package/dist/progress/progress.js +5 -2
- package/dist/progress/progress.js.map +1 -1
- package/dist/select/select.css +2 -0
- package/dist/switch/switch.css +2 -0
- package/dist/tabs/tabs.css +3 -0
- package/package.json +2 -2
package/dist/alert/alert.css
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
border: 1px solid var(--_alert-border);
|
|
20
20
|
border-radius: var(--ds-alert-radius);
|
|
21
|
+
overflow-wrap: anywhere;
|
|
21
22
|
background-color: var(--_alert-bg);
|
|
22
23
|
color: var(--_alert-text);
|
|
23
24
|
font-size: var(--ds-alert-font-size);
|
|
@@ -52,8 +53,6 @@
|
|
|
52
53
|
flex-direction: column;
|
|
53
54
|
gap: var(--ds-alert-body-gap);
|
|
54
55
|
min-width: 0;
|
|
55
|
-
/* A word longer than the alert is wide (a URL, a quoted title) breaks instead of spilling out. */
|
|
56
|
-
overflow-wrap: anywhere;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
& .ds-alert__title {
|
package/dist/badge/badge.css
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
/*
|
|
14
14
|
* A badge is almost always placed inside a flex row (a tab trigger, a card
|
|
15
15
|
* header). The default `flex-shrink: 1` let it collapse below its own
|
|
16
|
-
* content
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* content — a three-digit count lost its last digit. A badge is a small
|
|
17
|
+
* label; it should never be the thing that gives. It wraps only when its
|
|
18
|
+
* label is wider than the whole container.
|
|
19
19
|
*/
|
|
20
20
|
flex-shrink: 0;
|
|
21
|
+
max-width: 100%;
|
|
21
22
|
gap: var(--ds-badge-gap);
|
|
22
23
|
/*
|
|
23
24
|
* An explicit min-height rather than letting the box fall out of the
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
font-size: var(--ds-badge-font-size);
|
|
46
47
|
font-weight: var(--ds-badge-font-weight);
|
|
47
48
|
line-height: inherit;
|
|
48
|
-
|
|
49
|
+
overflow-wrap: anywhere;
|
|
49
50
|
|
|
50
51
|
/*
|
|
51
52
|
* A circle at one and two digits — the counts this shape is for — and a
|
package/dist/button/button.css
CHANGED
package/dist/card/card.css
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
background-color: var(--ds-card-bg);
|
|
9
9
|
color: var(--ds-card-text);
|
|
10
10
|
border: 1px solid var(--ds-card-border);
|
|
11
|
+
overflow-wrap: anywhere;
|
|
11
12
|
|
|
12
13
|
& .ds-card__header {
|
|
13
14
|
display: flex;
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
|
|
36
37
|
& .ds-card__footer {
|
|
37
38
|
display: flex;
|
|
39
|
+
flex-wrap: wrap;
|
|
38
40
|
align-items: center;
|
|
39
41
|
gap: var(--ds-card-gap);
|
|
40
42
|
}
|
package/dist/dialog/dialog.css
CHANGED
package/dist/field/field.css
CHANGED
package/dist/field/field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './field.css';
|
|
3
3
|
export type FieldProps = {
|
|
4
4
|
/** Visible label. The field's control is named by it, so it is required. */
|
|
@@ -39,9 +39,10 @@ export type FieldProps = {
|
|
|
39
39
|
/**
|
|
40
40
|
* A labelled form control with optional hint and error, built on Ark UI.
|
|
41
41
|
*
|
|
42
|
-
* Ark owns the wiring: the label's `for`,
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* Ark owns most of the wiring: the label's `for`, `aria-invalid`, `required`,
|
|
43
|
+
* `disabled` and `readOnly`. The control's `aria-describedby` is composed
|
|
44
|
+
* here from what the field renders, the error first and then the hint, so it
|
|
45
|
+
* does not depend on which attribute a given Ark version uses for the error. This wrapper decides what renders and contributes the
|
|
45
46
|
* `ds-field` classes and the `--ds-field-*` bindings. The control is whatever
|
|
46
47
|
* you put inside: an `Input`, a `Textarea`, or a future Ark field part.
|
|
47
48
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,aAAa,CAAC;AAGrB,MAAM,MAAM,UAAU,GAAG;IACvB,4EAA4E;IAC5E,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAsBF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,SAAS,GACV,EAAE,UAAU,2CAqBZ"}
|
package/dist/field/field.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Field as ArkField, useFieldContext } from '@ark-ui/react/field';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { FieldPartsContext } from './use-field-control';
|
|
3
5
|
import './field.css';
|
|
4
6
|
import { cx } from '../cx';
|
|
5
7
|
/**
|
|
@@ -20,9 +22,10 @@ function FieldLabel({ children }) {
|
|
|
20
22
|
/**
|
|
21
23
|
* A labelled form control with optional hint and error, built on Ark UI.
|
|
22
24
|
*
|
|
23
|
-
* Ark owns the wiring: the label's `for`,
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* Ark owns most of the wiring: the label's `for`, `aria-invalid`, `required`,
|
|
26
|
+
* `disabled` and `readOnly`. The control's `aria-describedby` is composed
|
|
27
|
+
* here from what the field renders, the error first and then the hint, so it
|
|
28
|
+
* does not depend on which attribute a given Ark version uses for the error. This wrapper decides what renders and contributes the
|
|
26
29
|
* `ds-field` classes and the `--ds-field-*` bindings. The control is whatever
|
|
27
30
|
* you put inside: an `Input`, a `Textarea`, or a future Ark field part.
|
|
28
31
|
*
|
|
@@ -35,6 +38,7 @@ function FieldLabel({ children }) {
|
|
|
35
38
|
export function Field({ label, children, hint, error, invalid, required, disabled, readOnly, id, className, }) {
|
|
36
39
|
const hasHint = Boolean(hint);
|
|
37
40
|
const hasError = Boolean(error);
|
|
38
|
-
|
|
41
|
+
const parts = useMemo(() => ({ hasHint, hasError }), [hasHint, hasError]);
|
|
42
|
+
return (_jsx(FieldPartsContext.Provider, { value: parts, children: _jsxs(ArkField.Root, { id: id, invalid: invalid ?? hasError, required: required, disabled: disabled, readOnly: readOnly, className: cx('ds-field', className), children: [_jsx(FieldLabel, { children: label }), children, hasHint && _jsx(ArkField.HelperText, { className: "ds-field__hint", children: hint }), hasError && _jsx(ArkField.ErrorText, { className: "ds-field__message", children: error })] }) }));
|
|
39
43
|
}
|
|
40
44
|
//# sourceMappingURL=field.js.map
|
package/dist/field/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../src/field/field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../src/field/field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAuC3B;;;;;GAKG;AACH,SAAS,UAAU,CAAC,EAAE,QAAQ,EAA2B;IACvD,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,OAAO,YAAY,WAAW,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC;YAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAChF,CAAC,CAAC;IACF,OAAO,CACL,MAAC,QAAQ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which text parts the `Field` is rendering. Ark decides the control's
|
|
3
|
+
* description from what it finds in the DOM, and which attribute carries
|
|
4
|
+
* the error changed between Ark versions (`aria-describedby` up to 5.36,
|
|
5
|
+
* `aria-errormessage` from 5.39). The field knows what it renders, so the
|
|
6
|
+
* wrapper composes the description from that and stays the same on every
|
|
7
|
+
* Ark version: the error first, then the hint.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FieldPartsContext: import("react").Context<{
|
|
10
|
+
hasHint: boolean;
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
}>;
|
|
1
13
|
type ControlProps = {
|
|
2
14
|
id?: string;
|
|
3
15
|
'aria-describedby'?: string;
|
|
@@ -17,7 +29,7 @@ export type FieldControl = {
|
|
|
17
29
|
id: string;
|
|
18
30
|
/** Id of the field's label, for `aria-labelledby` on an element a `<label for>` cannot name. */
|
|
19
31
|
labelId: string;
|
|
20
|
-
/** Ids of the
|
|
32
|
+
/** Ids of the error, while invalid, and the hint. Put it in `aria-describedby`. */
|
|
21
33
|
describedBy: string | undefined;
|
|
22
34
|
invalid: boolean;
|
|
23
35
|
disabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-control.d.ts","sourceRoot":"","sources":["../../src/field/use-field-control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-field-control.d.ts","sourceRoot":"","sources":["../../src/field/use-field-control.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;aAA4B,OAAO;cAAY,OAAO;EAGlF,CAAC;AAEH,KAAK,YAAY,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAgBF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAKxE;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,gGAAgG;IAChG,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAYrD"}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { useFieldContext } from '@ark-ui/react/field';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Which text parts the `Field` is rendering. Ark decides the control's
|
|
5
|
+
* description from what it finds in the DOM, and which attribute carries
|
|
6
|
+
* the error changed between Ark versions (`aria-describedby` up to 5.36,
|
|
7
|
+
* `aria-errormessage` from 5.39). The field knows what it renders, so the
|
|
8
|
+
* wrapper composes the description from that and stays the same on every
|
|
9
|
+
* Ark version: the error first, then the hint.
|
|
10
|
+
*/
|
|
11
|
+
export const FieldPartsContext = createContext({
|
|
12
|
+
hasHint: false,
|
|
13
|
+
hasError: false,
|
|
14
|
+
});
|
|
15
|
+
function useFieldDescription() {
|
|
16
|
+
const field = useFieldContext();
|
|
17
|
+
const parts = useContext(FieldPartsContext);
|
|
18
|
+
if (!field)
|
|
19
|
+
return { field };
|
|
20
|
+
const ids = [
|
|
21
|
+
field.invalid && parts.hasError ? field.ids.errorText : undefined,
|
|
22
|
+
parts.hasHint ? field.ids.helperText : undefined,
|
|
23
|
+
].filter(Boolean);
|
|
24
|
+
return { field, describedBy: ids.length ? ids.join(' ') : undefined };
|
|
25
|
+
}
|
|
2
26
|
/**
|
|
3
27
|
* Inside a `Field`, the field owns the control's `id` (the label's `for`
|
|
4
28
|
* points at it) and its description (the hint and the error). Ark lets any
|
|
@@ -9,11 +33,11 @@ import { useFieldContext } from '@ark-ui/react/field';
|
|
|
9
33
|
* props pass through untouched.
|
|
10
34
|
*/
|
|
11
35
|
export function useFieldControlProps(props) {
|
|
12
|
-
const field =
|
|
36
|
+
const { field, describedBy } = useFieldDescription();
|
|
13
37
|
if (!field)
|
|
14
38
|
return props;
|
|
15
|
-
const
|
|
16
|
-
return { ...props, id: field.ids.control, 'aria-describedby':
|
|
39
|
+
const merged = [describedBy, props['aria-describedby']].filter(Boolean).join(' ');
|
|
40
|
+
return { ...props, id: field.ids.control, 'aria-describedby': merged || undefined };
|
|
17
41
|
}
|
|
18
42
|
/**
|
|
19
43
|
* The field's wiring for a control that is not an `Input` or a `Textarea`:
|
|
@@ -28,13 +52,13 @@ export function useFieldControlProps(props) {
|
|
|
28
52
|
* ```
|
|
29
53
|
*/
|
|
30
54
|
export function useFieldControl() {
|
|
31
|
-
const field =
|
|
55
|
+
const { field, describedBy } = useFieldDescription();
|
|
32
56
|
if (!field)
|
|
33
57
|
return null;
|
|
34
58
|
return {
|
|
35
59
|
id: field.ids.control,
|
|
36
60
|
labelId: field.ids.label,
|
|
37
|
-
describedBy
|
|
61
|
+
describedBy,
|
|
38
62
|
invalid: field.invalid,
|
|
39
63
|
disabled: field.disabled,
|
|
40
64
|
readOnly: field.readOnly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-control.js","sourceRoot":"","sources":["../../src/field/use-field-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-field-control.js","sourceRoot":"","sources":["../../src/field/use-field-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAA0C;IACtF,OAAO,EAAE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BAAmB,EAAE,CAAC;IACrD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO;QACrB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK;QACxB,WAAW;QACX,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC;AACJ,CAAC"}
|
package/dist/menu/menu.css
CHANGED
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
border: 1px solid var(--ds-menu-content-border);
|
|
9
9
|
border-radius: var(--ds-menu-content-radius);
|
|
10
10
|
background-color: var(--ds-menu-content-bg);
|
|
11
|
+
/*
|
|
12
|
+
* As wide as its longest item, so a short label never wraps early, but no
|
|
13
|
+
* wider than the room Zag measures beside the trigger: past that an item
|
|
14
|
+
* wraps instead of pushing the menu off screen.
|
|
15
|
+
*/
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
inline-size: max-content;
|
|
18
|
+
max-inline-size: var(--available-width);
|
|
19
|
+
overflow-wrap: anywhere;
|
|
11
20
|
/*
|
|
12
21
|
* The `popup` stacking layer (ds-config/scripts/stacking.ts), as Select's
|
|
13
22
|
* listbox: Zag copies this onto the positioner, a sibling of the page in
|
|
@@ -51,7 +60,6 @@
|
|
|
51
60
|
calc(var(--ds-menu-content-radius) - var(--ds-menu-content-padding) - 1px)
|
|
52
61
|
);
|
|
53
62
|
color: var(--ds-menu-item-text);
|
|
54
|
-
white-space: nowrap;
|
|
55
63
|
cursor: pointer;
|
|
56
64
|
|
|
57
65
|
&[data-highlighted] {
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: var(--ds-progress-gap);
|
|
6
6
|
width: 100%;
|
|
7
|
+
overflow-wrap: anywhere;
|
|
7
8
|
|
|
9
|
+
/* Wraps, so a long label takes a line of its own instead of squeezing the value. */
|
|
8
10
|
& .ds-progress__header {
|
|
9
11
|
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
10
13
|
align-items: center;
|
|
11
14
|
justify-content: space-between;
|
|
12
15
|
gap: var(--ds-progress-gap);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AACnE,OAAO,gBAAgB,CAAC;AAGxB,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;;;GAOG;AACH,KAAK,YAAY,GACb;IACE;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;IACtD,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,EACvC,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,SAAS,CAC1D,GACC,YAAY,GAAG;IACb,+EAA+E;IAC/E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEJ;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AACnE,OAAO,gBAAgB,CAAC;AAGxB,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;;;GAOG;AACH,KAAK,YAAY,GACb;IACE;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;IACtD,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,EACvC,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,SAAS,CAC1D,GACC,YAAY,GAAG;IACb,+EAA+E;IAC/E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEJ;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,aAAa,2CA6Bf"}
|
|
@@ -24,7 +24,10 @@ import { cx } from '../cx';
|
|
|
24
24
|
*/
|
|
25
25
|
export function Progress({ size = 'md', label, valueText, className, 'aria-label': ariaLabel, ...props }) {
|
|
26
26
|
const labelId = useId();
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
// Empty strings and numeric zero are supplied labels. An undefined ARIA
|
|
28
|
+
// override would leave Ark's generated percentage name in place.
|
|
29
|
+
const hasLabel = label !== undefined;
|
|
30
|
+
const hasHeader = hasLabel || Boolean(valueText);
|
|
31
|
+
return (_jsxs(ArkProgress.Root, { className: cx('ds-progress', `ds-progress--${size}`, className), ...props, children: [hasHeader && (_jsxs("div", { className: "ds-progress__header", children: [hasLabel ? (_jsx(ArkProgress.Label, { id: labelId, className: "ds-progress__label", children: label })) : (_jsx("span", {})), valueText && _jsx("span", { className: "ds-progress__value-text", children: valueText })] })), _jsx(ArkProgress.Track, { className: "ds-progress__track", ...(hasLabel ? { 'aria-labelledby': labelId } : { 'aria-label': ariaLabel }), children: _jsx(ArkProgress.Range, { className: "ds-progress__range" }) })] }));
|
|
29
32
|
}
|
|
30
33
|
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAuC,KAAK,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAyC3B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,IAAI,GAAG,IAAI,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACM;IACd,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAuC,KAAK,EAAE,MAAM,OAAO,CAAC;AACn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height: 20rem;
|
|
29
29
|
overflow-y: auto;
|
|
30
|
+
overflow-wrap: anywhere;
|
|
30
31
|
/*
|
|
31
32
|
* Zag copies this onto the positioner, which is a sibling of the page in
|
|
32
33
|
* `<body>`. Without it the listbox ranks as `auto` and any positioned page
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
display: flex;
|
|
110
111
|
flex-direction: column;
|
|
111
112
|
gap: var(--ds-select-content-padding);
|
|
113
|
+
overflow-wrap: anywhere;
|
|
112
114
|
|
|
113
115
|
& .ds-select__label {
|
|
114
116
|
color: var(--ds-select-label-text);
|
package/dist/switch/switch.css
CHANGED
package/dist/tabs/tabs.css
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* the chance to scroll.
|
|
10
10
|
*/
|
|
11
11
|
min-inline-size: 0;
|
|
12
|
+
overflow-wrap: anywhere;
|
|
12
13
|
|
|
13
14
|
/*
|
|
14
15
|
* Derived so an inset child never curves more than its container.
|
|
@@ -106,8 +107,10 @@
|
|
|
106
107
|
* list by the ring's overhang, and takes that back with a negative margin
|
|
107
108
|
* to leave the list exactly where it was.
|
|
108
109
|
*/
|
|
110
|
+
/* Sideways only, which is also what tells the long-words test it scrolls. */
|
|
109
111
|
& .ds-tabs__scroller {
|
|
110
112
|
overflow-x: auto;
|
|
113
|
+
overflow-y: hidden;
|
|
111
114
|
margin: calc(-1 * var(--_tabs-ring-overhang));
|
|
112
115
|
padding: var(--_tabs-ring-overhang);
|
|
113
116
|
scroll-padding-inline: var(--_tabs-ring-reach);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manakind/ui-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"typecheck": "tsc --noEmit"
|
|
139
139
|
},
|
|
140
140
|
"dependencies": {
|
|
141
|
-
"@ark-ui/react": "^5.
|
|
141
|
+
"@ark-ui/react": "^5.39.2"
|
|
142
142
|
},
|
|
143
143
|
"peerDependencies": {
|
|
144
144
|
"react": "^19.0.0",
|