@matteoaliano/forest-ui 0.3.3 → 0.3.5

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.js CHANGED
@@ -674,15 +674,15 @@ function buildPalette(tokens) {
674
674
  const { base: base2, error: error2, warning: warning2, success: success2, info: info2, text: text5, bg: bg5, fg: fg5, border: border5 } = tokens;
675
675
  return {
676
676
  primary: {
677
- main: violet[600],
678
- light: violet[400],
679
- dark: violet[700],
677
+ main: tokens.bg.brandSolid,
678
+ light: tokens.fg.brandPrimary,
679
+ dark: tokens.bg.brandSolidHover,
680
680
  contrastText: tokens.base.white
681
681
  },
682
682
  secondary: {
683
- main: gray[600],
684
- light: gray[400],
685
- dark: gray[700],
683
+ main: tokens.bg.secondarySolid,
684
+ light: tokens.fg.secondary,
685
+ dark: tokens.text.secondaryHover,
686
686
  contrastText: tokens.base.white
687
687
  },
688
688
  error: {
@@ -1542,16 +1542,16 @@ function buildComponents(tokens) {
1542
1542
  },
1543
1543
  colorPrimary: {
1544
1544
  "&.MuiChip-filled": {
1545
- backgroundColor: violet[50],
1546
- color: violet[700],
1547
- "& .MuiChip-deleteIcon": { color: violet[400] }
1545
+ backgroundColor: tokens.bg.brandPrimary,
1546
+ color: tokens.text.brandPrimary,
1547
+ "& .MuiChip-deleteIcon": { color: tokens.fg.brandPrimary }
1548
1548
  }
1549
1549
  },
1550
1550
  colorSecondary: {
1551
1551
  "&.MuiChip-filled": {
1552
- backgroundColor: gray[50],
1553
- color: gray[700],
1554
- "& .MuiChip-deleteIcon": { color: gray[400] }
1552
+ backgroundColor: tokens.bg.secondarySubtle,
1553
+ color: tokens.text.secondary,
1554
+ "& .MuiChip-deleteIcon": { color: tokens.fg.secondary }
1555
1555
  }
1556
1556
  },
1557
1557
  colorError: {
@@ -3193,40 +3193,51 @@ function MultiSelect({
3193
3193
  return (_a = labelMap.get(v)) != null ? _a : v;
3194
3194
  }).join(", ");
3195
3195
  const labelId = label ? `forest-multiselect-${String(label).replace(/\s+/g, "-").toLowerCase()}` : void 0;
3196
- return /* @__PURE__ */ jsxRuntime.jsxs(MuiFormControl__default.default, { fullWidth: true, children: [
3197
- label && /* @__PURE__ */ jsxRuntime.jsx(MuiInputLabel__default.default, { id: labelId, shrink: value.length > 0, children: label }),
3198
- /* @__PURE__ */ jsxRuntime.jsxs(
3199
- MuiSelect__default.default,
3200
- {
3201
- labelId,
3202
- label,
3203
- multiple: true,
3204
- notched: value.length > 0,
3205
- value,
3206
- onChange: handleChange,
3207
- displayEmpty: true,
3208
- renderValue: renderValue2,
3209
- ...rest,
3210
- children: [
3211
- selectAll && /* @__PURE__ */ jsxRuntime.jsx(
3212
- "li",
3213
- {
3214
- onMouseDown: (e) => e.preventDefault(),
3215
- onClick: (e) => {
3216
- e.stopPropagation();
3217
- handleSelectAll();
3218
- },
3219
- children: /* @__PURE__ */ jsxRuntime.jsx(MuiButton__default.default, { size: "small", variant: "text", children: allSelected ? "Deselect All" : selectAllLabel })
3220
- }
3221
- ),
3222
- options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(MuiMenuItem__default.default, { value: option.value, children: [
3223
- /* @__PURE__ */ jsxRuntime.jsx(MuiCheckbox__default.default, { checked: value.includes(option.value) }),
3224
- /* @__PURE__ */ jsxRuntime.jsx(MuiListItemText__default.default, { primary: option.label })
3225
- ] }, option.value))
3226
- ]
3227
- }
3228
- )
3229
- ] });
3196
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3197
+ MuiFormControl__default.default,
3198
+ {
3199
+ fullWidth: rest.fullWidth,
3200
+ disabled: rest.disabled,
3201
+ error: rest.error,
3202
+ size: rest.size,
3203
+ color: rest.color,
3204
+ variant: rest.variant,
3205
+ children: [
3206
+ label && /* @__PURE__ */ jsxRuntime.jsx(MuiInputLabel__default.default, { id: labelId, shrink: value.length > 0, children: label }),
3207
+ /* @__PURE__ */ jsxRuntime.jsxs(
3208
+ MuiSelect__default.default,
3209
+ {
3210
+ labelId,
3211
+ label,
3212
+ multiple: true,
3213
+ notched: value.length > 0,
3214
+ value,
3215
+ onChange: handleChange,
3216
+ displayEmpty: true,
3217
+ renderValue: renderValue2,
3218
+ ...rest,
3219
+ children: [
3220
+ selectAll && /* @__PURE__ */ jsxRuntime.jsx(
3221
+ "li",
3222
+ {
3223
+ onMouseDown: (e) => e.preventDefault(),
3224
+ onClick: (e) => {
3225
+ e.stopPropagation();
3226
+ handleSelectAll();
3227
+ },
3228
+ children: /* @__PURE__ */ jsxRuntime.jsx(MuiButton__default.default, { size: "small", variant: "text", children: allSelected ? "Deselect All" : selectAllLabel })
3229
+ }
3230
+ ),
3231
+ options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(MuiMenuItem__default.default, { value: option.value, children: [
3232
+ /* @__PURE__ */ jsxRuntime.jsx(MuiCheckbox__default.default, { checked: value.includes(option.value) }),
3233
+ /* @__PURE__ */ jsxRuntime.jsx(MuiListItemText__default.default, { primary: option.label })
3234
+ ] }, option.value))
3235
+ ]
3236
+ }
3237
+ )
3238
+ ]
3239
+ }
3240
+ );
3230
3241
  }
3231
3242
  function Switch(props) {
3232
3243
  return /* @__PURE__ */ jsxRuntime.jsx(MuiSwitch__default.default, { ...props });
@@ -3295,6 +3306,9 @@ function Search({
3295
3306
  function Input({ ...props }) {
3296
3307
  return /* @__PURE__ */ jsxRuntime.jsx(MuiInputBase__default.default, { ...props });
3297
3308
  }
3309
+ function IconButton2(props) {
3310
+ return /* @__PURE__ */ jsxRuntime.jsx(IconButton__default.default, { ...props });
3311
+ }
3298
3312
  var svgPaths = {
3299
3313
  wsuite: {
3300
3314
  logo: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -4085,6 +4099,7 @@ exports.DialogTitle = DialogTitle;
4085
4099
  exports.Divider = Divider;
4086
4100
  exports.Fab = Fab;
4087
4101
  exports.ForestProvider = ForestProvider;
4102
+ exports.IconButton = IconButton2;
4088
4103
  exports.Input = Input;
4089
4104
  exports.LineChart = LineChart;
4090
4105
  exports.LinearProgress = LinearProgress;