@mond-design-system/react 1.1.0 → 2.0.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/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +78 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -130,8 +130,8 @@ function Icon({ name, size = "md", label, className, ...rest }) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Button/Button.module.css?mds-scoped
|
|
133
|
-
var Button_module_default = { "button": "mds-Button__button", "size-sm": "mds-Button__size-sm", "size-md": "mds-Button__size-md", "size-lg": "mds-Button__size-lg", "variant-primary": "mds-Button__variant-primary", "variant-secondary": "mds-Button__variant-secondary", "variant-ghost": "mds-Button__variant-ghost", "variant-highlight": "mds-Button__variant-highlight", "variant-danger": "mds-Button__variant-danger", "variant-warning": "mds-Button__variant-warning", "fullWidth": "mds-Button__fullWidth", "icon-only": "mds-Button__icon-only" };
|
|
134
|
-
var
|
|
133
|
+
var Button_module_default = { "button": "mds-Button__button", "size-sm": "mds-Button__size-sm", "size-md": "mds-Button__size-md", "size-lg": "mds-Button__size-lg", "slot": "mds-Button__slot", "variant-primary": "mds-Button__variant-primary", "variant-secondary": "mds-Button__variant-secondary", "variant-ghost": "mds-Button__variant-ghost", "variant-highlight": "mds-Button__variant-highlight", "variant-danger": "mds-Button__variant-danger", "variant-warning": "mds-Button__variant-warning", "fullWidth": "mds-Button__fullWidth", "icon-only": "mds-Button__icon-only" };
|
|
134
|
+
var ICON_PX = { sm: 16, md: 20, lg: 24 };
|
|
135
135
|
function Button({
|
|
136
136
|
variant = "primary",
|
|
137
137
|
size = "md",
|
|
@@ -166,9 +166,9 @@ function Button({
|
|
|
166
166
|
...own,
|
|
167
167
|
...rest,
|
|
168
168
|
children: [
|
|
169
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size:
|
|
169
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: Button_module_default.slot, children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: ICON_PX[size], label: "", "aria-hidden": "true" }) }) : iconLeft ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: Button_module_default.slot, children: iconLeft }) : null,
|
|
170
170
|
children,
|
|
171
|
-
!loading && iconRight
|
|
171
|
+
!loading && iconRight ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: Button_module_default.slot, children: iconRight }) : null
|
|
172
172
|
]
|
|
173
173
|
}
|
|
174
174
|
);
|
|
@@ -279,7 +279,7 @@ function Badge({ tone = "neutral", className, ...rest }) {
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Chip/Chip.module.css?mds-scoped
|
|
282
|
-
var Chip_module_default = { "chip": "mds-Chip__chip", "variant-soft": "mds-Chip__variant-soft", "variant-outline": "mds-Chip__variant-outline", "variant-highlight": "mds-Chip__variant-highlight", "selected": "mds-Chip__selected", "interactive": "mds-Chip__interactive", "disabled": "mds-Chip__disabled" };
|
|
282
|
+
var Chip_module_default = { "chip": "mds-Chip__chip", "icon": "mds-Chip__icon", "variant-soft": "mds-Chip__variant-soft", "variant-outline": "mds-Chip__variant-outline", "variant-highlight": "mds-Chip__variant-highlight", "selected": "mds-Chip__selected", "interactive": "mds-Chip__interactive", "disabled": "mds-Chip__disabled" };
|
|
283
283
|
function Chip({
|
|
284
284
|
children,
|
|
285
285
|
variant = "soft",
|
|
@@ -303,7 +303,7 @@ function Chip({
|
|
|
303
303
|
...rest
|
|
304
304
|
};
|
|
305
305
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
306
|
-
icon,
|
|
306
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: Chip_module_default.icon, children: icon }) : null,
|
|
307
307
|
children
|
|
308
308
|
] });
|
|
309
309
|
return interactive ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -347,7 +347,7 @@ function ChipBar({
|
|
|
347
347
|
|
|
348
348
|
// mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/CountButton/CountButton.module.css?mds-scoped
|
|
349
349
|
var CountButton_module_default = { "button": "mds-CountButton__button", "tone-accent": "mds-CountButton__tone-accent", "tone-danger": "mds-CountButton__tone-danger", "glyph": "mds-CountButton__glyph" };
|
|
350
|
-
var
|
|
350
|
+
var SPINNER_PX = 20;
|
|
351
351
|
function CountButton({
|
|
352
352
|
icon,
|
|
353
353
|
label,
|
|
@@ -371,7 +371,7 @@ function CountButton({
|
|
|
371
371
|
className: cx(CountButton_module_default.button, active && CountButton_module_default[`tone-${tone}`], className),
|
|
372
372
|
...rest,
|
|
373
373
|
children: [
|
|
374
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size:
|
|
374
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: SPINNER_PX, label: "", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: CountButton_module_default.glyph, children: icon }),
|
|
375
375
|
children != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { children }) : null
|
|
376
376
|
]
|
|
377
377
|
}
|