achery-ui 0.9.2 → 0.10.2
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/index.cjs +173 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +198 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +106 -1
- package/dist/index.d.ts +106 -1
- package/dist/index.js +171 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/native/components/Badge.tsx +6 -2
- package/src/native/components/Button.tsx +18 -11
- package/src/native/components/Input.tsx +42 -1
- package/src/native/components/ScreenNav.tsx +111 -0
- package/src/native/components/SegmentedControl.tsx +81 -0
- package/src/native/components/Skeleton.tsx +1 -1
- package/src/native/components/StatusDot.tsx +53 -0
- package/src/native/components/Tabs.tsx +2 -2
- package/src/native/components/index.ts +11 -2
- package/src/native/index.ts +6 -2
package/dist/index.cjs
CHANGED
|
@@ -1713,7 +1713,7 @@ function Modal({
|
|
|
1713
1713
|
title: title2,
|
|
1714
1714
|
description: description2,
|
|
1715
1715
|
children,
|
|
1716
|
-
footer:
|
|
1716
|
+
footer: footer4,
|
|
1717
1717
|
trigger: trigger3,
|
|
1718
1718
|
size = "sm",
|
|
1719
1719
|
scrollable = false,
|
|
@@ -1743,7 +1743,7 @@ function Modal({
|
|
|
1743
1743
|
/* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { className: closeButton, "aria-label": "Close", children: /* @__PURE__ */ jsxRuntime.jsx(Glyph, { name: "cross", size: 14, "aria-hidden": "true" }) })
|
|
1744
1744
|
] }),
|
|
1745
1745
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: scrollable ? bodyScrollable : body2, children }),
|
|
1746
|
-
|
|
1746
|
+
footer4 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer, children: footer4 })
|
|
1747
1747
|
]
|
|
1748
1748
|
}
|
|
1749
1749
|
)
|
|
@@ -1981,7 +1981,7 @@ var cardHeader = "Card_cardHeader__1uprgrr8";
|
|
|
1981
1981
|
function Card({
|
|
1982
1982
|
variant = "flat",
|
|
1983
1983
|
padding = "md",
|
|
1984
|
-
header:
|
|
1984
|
+
header: header3,
|
|
1985
1985
|
marginalia: marginalia2,
|
|
1986
1986
|
marginaliaSize = 80,
|
|
1987
1987
|
children,
|
|
@@ -1994,7 +1994,7 @@ function Card({
|
|
|
1994
1994
|
className: [card({ variant, padding }), className].filter(Boolean).join(" "),
|
|
1995
1995
|
...props,
|
|
1996
1996
|
children: [
|
|
1997
|
-
|
|
1997
|
+
header3 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardHeader, children: header3 }),
|
|
1998
1998
|
children,
|
|
1999
1999
|
marginalia2 && /* @__PURE__ */ jsxRuntime.jsx(Marginalia, { glyph: marginalia2, size: marginaliaSize })
|
|
2000
2000
|
]
|
|
@@ -2092,7 +2092,7 @@ function Sidebar({
|
|
|
2092
2092
|
activeId,
|
|
2093
2093
|
onItemClick,
|
|
2094
2094
|
renderLink,
|
|
2095
|
-
footer:
|
|
2095
|
+
footer: footer4,
|
|
2096
2096
|
collapsed,
|
|
2097
2097
|
onCollapsedChange,
|
|
2098
2098
|
mobileOpen,
|
|
@@ -2153,7 +2153,7 @@ function Sidebar({
|
|
|
2153
2153
|
),
|
|
2154
2154
|
searchConfig.kbd && /* @__PURE__ */ jsxRuntime.jsx("span", { children: searchConfig.kbd })
|
|
2155
2155
|
] }),
|
|
2156
|
-
|
|
2156
|
+
footer4 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer2, children: footer4 })
|
|
2157
2157
|
] })
|
|
2158
2158
|
]
|
|
2159
2159
|
}
|
|
@@ -3275,23 +3275,182 @@ function TypeTag({ type, className }) {
|
|
|
3275
3275
|
}
|
|
3276
3276
|
function MaterialCard({
|
|
3277
3277
|
intensity = "chrome",
|
|
3278
|
-
header:
|
|
3279
|
-
footer:
|
|
3278
|
+
header: header3,
|
|
3279
|
+
footer: footer4,
|
|
3280
3280
|
children,
|
|
3281
3281
|
className,
|
|
3282
3282
|
...props
|
|
3283
3283
|
}) {
|
|
3284
3284
|
const classes = ["material", `m-${intensity}`, className].filter(Boolean).join(" ");
|
|
3285
3285
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, ...props, children: [
|
|
3286
|
-
|
|
3286
|
+
header3 !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "material__bar", children: [
|
|
3287
3287
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "material__mark", "aria-hidden": true }),
|
|
3288
|
-
typeof
|
|
3288
|
+
typeof header3 === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "material__title", children: header3 }) : header3
|
|
3289
3289
|
] }),
|
|
3290
3290
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "material__body", children }),
|
|
3291
|
-
|
|
3291
|
+
footer4 !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "material__foot", children: footer4 })
|
|
3292
3292
|
] });
|
|
3293
3293
|
}
|
|
3294
3294
|
|
|
3295
|
+
// src/components/DetailRail/DetailRail.css.ts
|
|
3296
|
+
var backdrop2 = "DetailRail_backdrop__1hfojcp3";
|
|
3297
|
+
var body3 = "DetailRail_body__1hfojcp8";
|
|
3298
|
+
var footer3 = "DetailRail_footer__1hfojcp9";
|
|
3299
|
+
var header2 = "DetailRail_header__1hfojcp6";
|
|
3300
|
+
var headerText = "DetailRail_headerText__1hfojcp7";
|
|
3301
|
+
var rail = "DetailRail_rail__1hfojcp4";
|
|
3302
|
+
var DetailRail = ({
|
|
3303
|
+
open,
|
|
3304
|
+
onClose,
|
|
3305
|
+
title: title2,
|
|
3306
|
+
eyebrow: eyebrow2,
|
|
3307
|
+
children,
|
|
3308
|
+
footer: footer4,
|
|
3309
|
+
width = 360,
|
|
3310
|
+
className
|
|
3311
|
+
}) => {
|
|
3312
|
+
if (!open) return null;
|
|
3313
|
+
const railStyle = { width };
|
|
3314
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3315
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: backdrop2, onClick: onClose, "aria-hidden": "true" }),
|
|
3316
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3317
|
+
"div",
|
|
3318
|
+
{
|
|
3319
|
+
className: [rail, className].filter(Boolean).join(" "),
|
|
3320
|
+
style: railStyle,
|
|
3321
|
+
role: "complementary",
|
|
3322
|
+
"aria-label": title2,
|
|
3323
|
+
children: [
|
|
3324
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: header2, children: [
|
|
3325
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: headerText, children: [
|
|
3326
|
+
eyebrow2 && /* @__PURE__ */ jsxRuntime.jsx(Eyebrow, { children: eyebrow2 }),
|
|
3327
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, children: title2 })
|
|
3328
|
+
] }),
|
|
3329
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", glyph: "cross", onClick: onClose, "aria-label": "Close" })
|
|
3330
|
+
] }),
|
|
3331
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: body3, children }),
|
|
3332
|
+
footer4 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer3, children: footer4 })
|
|
3333
|
+
]
|
|
3334
|
+
}
|
|
3335
|
+
)
|
|
3336
|
+
] });
|
|
3337
|
+
};
|
|
3338
|
+
|
|
3339
|
+
// src/components/ColourInput/ColourInput.css.ts
|
|
3340
|
+
var prefix = "ColourInput_prefix__1pnau5c4";
|
|
3341
|
+
var root3 = "ColourInput_root__1pnau5c0";
|
|
3342
|
+
var swatch = "ColourInput_swatch__1pnau5c1";
|
|
3343
|
+
var textInput = "ColourInput_textInput__1pnau5c5";
|
|
3344
|
+
var textWrapper = "ColourInput_textWrapper__1pnau5c2";
|
|
3345
|
+
var textWrapperError = "ColourInput_textWrapperError__1pnau5c3";
|
|
3346
|
+
function normalizeHex(raw) {
|
|
3347
|
+
const stripped = raw.replace(/^#+/, "").toLowerCase();
|
|
3348
|
+
if (/^[0-9a-f]{3}$/.test(stripped)) {
|
|
3349
|
+
const [r, g, b] = stripped;
|
|
3350
|
+
return `#${r}${r}${g}${g}${b}${b}`;
|
|
3351
|
+
}
|
|
3352
|
+
if (/^[0-9a-f]{6}$/.test(stripped)) return `#${stripped}`;
|
|
3353
|
+
return null;
|
|
3354
|
+
}
|
|
3355
|
+
var ColourInput = ({
|
|
3356
|
+
value: value2 = "#000000",
|
|
3357
|
+
onChange,
|
|
3358
|
+
error = false,
|
|
3359
|
+
placeholder = "000000",
|
|
3360
|
+
disabled = false,
|
|
3361
|
+
className,
|
|
3362
|
+
style
|
|
3363
|
+
}) => {
|
|
3364
|
+
const [textValue, setTextValue] = react.useState(value2.replace(/^#/, ""));
|
|
3365
|
+
react.useEffect(() => {
|
|
3366
|
+
setTextValue(value2.replace(/^#/, ""));
|
|
3367
|
+
}, [value2]);
|
|
3368
|
+
const handleTextChange = (raw) => {
|
|
3369
|
+
const stripped = raw.replace(/^#+/, "");
|
|
3370
|
+
setTextValue(stripped);
|
|
3371
|
+
if (/^[0-9a-fA-F]{6}$/.test(stripped)) {
|
|
3372
|
+
onChange?.(`#${stripped.toLowerCase()}`);
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
const handleTextBlur = () => {
|
|
3376
|
+
const normalized = normalizeHex(textValue);
|
|
3377
|
+
if (normalized) {
|
|
3378
|
+
onChange?.(normalized);
|
|
3379
|
+
} else {
|
|
3380
|
+
setTextValue(value2.replace(/^#/, ""));
|
|
3381
|
+
}
|
|
3382
|
+
};
|
|
3383
|
+
const handleSwatchChange = (hex) => {
|
|
3384
|
+
onChange?.(hex);
|
|
3385
|
+
setTextValue(hex.replace(/^#/, ""));
|
|
3386
|
+
};
|
|
3387
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [root3, className].filter(Boolean).join(" "), style, children: [
|
|
3388
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3389
|
+
"input",
|
|
3390
|
+
{
|
|
3391
|
+
type: "color",
|
|
3392
|
+
value: value2,
|
|
3393
|
+
disabled,
|
|
3394
|
+
onChange: (e) => handleSwatchChange(e.target.value),
|
|
3395
|
+
className: swatch
|
|
3396
|
+
}
|
|
3397
|
+
),
|
|
3398
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: [textWrapper, error && textWrapperError].filter(Boolean).join(" "), children: [
|
|
3399
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: prefix, "aria-hidden": "true", children: "#" }),
|
|
3400
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3401
|
+
"input",
|
|
3402
|
+
{
|
|
3403
|
+
type: "text",
|
|
3404
|
+
value: textValue,
|
|
3405
|
+
disabled,
|
|
3406
|
+
onChange: (e) => handleTextChange(e.target.value),
|
|
3407
|
+
onBlur: handleTextBlur,
|
|
3408
|
+
placeholder: placeholder.replace(/^#/, ""),
|
|
3409
|
+
maxLength: 7,
|
|
3410
|
+
className: textInput,
|
|
3411
|
+
"aria-label": "Hex colour",
|
|
3412
|
+
spellCheck: false,
|
|
3413
|
+
autoComplete: "off"
|
|
3414
|
+
}
|
|
3415
|
+
)
|
|
3416
|
+
] })
|
|
3417
|
+
] });
|
|
3418
|
+
};
|
|
3419
|
+
|
|
3420
|
+
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
3421
|
+
var root4 = "SegmentedControl_root__7mno8a0";
|
|
3422
|
+
var segment = "SegmentedControl_segment__7mno8a1";
|
|
3423
|
+
var segmentActive = "SegmentedControl_segmentActive__7mno8a2";
|
|
3424
|
+
var segmentLg = "SegmentedControl_segmentLg__7mno8a4";
|
|
3425
|
+
var segmentSm = "SegmentedControl_segmentSm__7mno8a3";
|
|
3426
|
+
var SegmentedControl = ({
|
|
3427
|
+
options,
|
|
3428
|
+
value: value2,
|
|
3429
|
+
onChange,
|
|
3430
|
+
size = "md",
|
|
3431
|
+
disabled = false,
|
|
3432
|
+
className
|
|
3433
|
+
}) => {
|
|
3434
|
+
const sizeClass = size === "sm" ? segmentSm : size === "lg" ? segmentLg : void 0;
|
|
3435
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: [root4, className].filter(Boolean).join(" "), role: "group", children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3436
|
+
"button",
|
|
3437
|
+
{
|
|
3438
|
+
type: "button",
|
|
3439
|
+
role: "radio",
|
|
3440
|
+
"aria-checked": opt.value === value2,
|
|
3441
|
+
disabled,
|
|
3442
|
+
onClick: () => onChange(opt.value),
|
|
3443
|
+
className: [
|
|
3444
|
+
segment,
|
|
3445
|
+
sizeClass,
|
|
3446
|
+
opt.value === value2 && segmentActive
|
|
3447
|
+
].filter(Boolean).join(" "),
|
|
3448
|
+
children: opt.label
|
|
3449
|
+
},
|
|
3450
|
+
opt.value
|
|
3451
|
+
)) });
|
|
3452
|
+
};
|
|
3453
|
+
|
|
3295
3454
|
exports.AcheryProvider = AcheryProvider;
|
|
3296
3455
|
exports.AppBar = AppBar;
|
|
3297
3456
|
exports.Avatar = Avatar;
|
|
@@ -3300,9 +3459,11 @@ exports.Body = Body;
|
|
|
3300
3459
|
exports.Button = Button;
|
|
3301
3460
|
exports.Card = Card;
|
|
3302
3461
|
exports.Checkbox = Checkbox;
|
|
3462
|
+
exports.ColourInput = ColourInput;
|
|
3303
3463
|
exports.Combobox = Combobox;
|
|
3304
3464
|
exports.ConfirmDialogProvider = ConfirmDialogProvider;
|
|
3305
3465
|
exports.DatePicker = DatePicker;
|
|
3466
|
+
exports.DetailRail = DetailRail;
|
|
3306
3467
|
exports.Display = Display;
|
|
3307
3468
|
exports.EntityPill = EntityPill;
|
|
3308
3469
|
exports.Eyebrow = Eyebrow;
|
|
@@ -3322,6 +3483,7 @@ exports.Modal = Modal;
|
|
|
3322
3483
|
exports.Mono = Mono;
|
|
3323
3484
|
exports.ProgressBar = ProgressBar;
|
|
3324
3485
|
exports.SearchInput = SearchInput;
|
|
3486
|
+
exports.SegmentedControl = SegmentedControl;
|
|
3325
3487
|
exports.Select = Select;
|
|
3326
3488
|
exports.Sidebar = Sidebar;
|
|
3327
3489
|
exports.SingleCombobox = SingleCombobox;
|