@gnome-ui/react 1.16.0 → 1.17.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/dist/components/ProgressBar/ProgressBar.d.ts +10 -1
- package/dist/components/ProgressBar/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -15
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type { TextFieldProps } from './components/TextField';
|
|
|
21
21
|
export { RadioButton } from './components/RadioButton';
|
|
22
22
|
export type { RadioButtonProps } from './components/RadioButton';
|
|
23
23
|
export { ProgressBar } from './components/ProgressBar';
|
|
24
|
-
export type { ProgressBarProps } from './components/ProgressBar';
|
|
24
|
+
export type { ProgressBarProps, ProgressBarVariant } from './components/ProgressBar';
|
|
25
25
|
export { Banner } from './components/Banner';
|
|
26
26
|
export type { BannerProps, BannerVariant } from './components/Banner';
|
|
27
27
|
export { HeaderBar } from './components/HeaderBar';
|
package/dist/index.js
CHANGED
|
@@ -334,27 +334,35 @@ function fe({ className: e, ...n }) {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
var pe = {
|
|
337
|
-
track: "
|
|
338
|
-
fill: "
|
|
339
|
-
|
|
340
|
-
|
|
337
|
+
track: "_track_endpr_3",
|
|
338
|
+
fill: "_fill_endpr_14",
|
|
339
|
+
accent: "_accent_endpr_23",
|
|
340
|
+
success: "_success_endpr_24",
|
|
341
|
+
warning: "_warning_endpr_25",
|
|
342
|
+
error: "_error_endpr_26",
|
|
343
|
+
indeterminate: "_indeterminate_endpr_30",
|
|
344
|
+
pulse: "_pulse_endpr_1"
|
|
341
345
|
};
|
|
342
346
|
//#endregion
|
|
343
347
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
344
|
-
function me({ value: e,
|
|
345
|
-
let
|
|
348
|
+
function me({ value: e, variant: n = "accent", className: r, "aria-label": i, "aria-labelledby": a, ...o }) {
|
|
349
|
+
let s = e == null, c = s ? void 0 : Math.min(1, Math.max(0, e)), l = c === void 0 ? void 0 : c * 100;
|
|
346
350
|
return /* @__PURE__ */ t("div", {
|
|
347
351
|
role: "progressbar",
|
|
348
|
-
"aria-label":
|
|
349
|
-
"aria-labelledby":
|
|
350
|
-
"aria-valuenow":
|
|
351
|
-
"aria-valuemin":
|
|
352
|
-
"aria-valuemax":
|
|
353
|
-
className: [pe.track,
|
|
354
|
-
...
|
|
352
|
+
"aria-label": i,
|
|
353
|
+
"aria-labelledby": a,
|
|
354
|
+
"aria-valuenow": c === void 0 ? void 0 : Math.round(l),
|
|
355
|
+
"aria-valuemin": s ? void 0 : 0,
|
|
356
|
+
"aria-valuemax": s ? void 0 : 100,
|
|
357
|
+
className: [pe.track, r].filter(Boolean).join(" "),
|
|
358
|
+
...o,
|
|
355
359
|
children: /* @__PURE__ */ t("div", {
|
|
356
|
-
className: [
|
|
357
|
-
|
|
360
|
+
className: [
|
|
361
|
+
pe.fill,
|
|
362
|
+
pe[n],
|
|
363
|
+
s ? pe.indeterminate : null
|
|
364
|
+
].filter(Boolean).join(" "),
|
|
365
|
+
style: s ? void 0 : { width: `${l}%` }
|
|
358
366
|
})
|
|
359
367
|
});
|
|
360
368
|
}
|