@ncino/styles 10.1.0 → 10.2.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.
@@ -4,8 +4,8 @@ import * as s from "./components/autocomplete.js";
4
4
  import * as l from "./components/avatar.js";
5
5
  import * as m from "./components/badge.js";
6
6
  import * as g from "./components/button.js";
7
- import * as h from "./components/card.js";
8
- import * as c from "./components/checkbox.js";
7
+ import * as c from "./components/card.js";
8
+ import * as h from "./components/checkbox.js";
9
9
  import * as f from "./components/chip.js";
10
10
  import * as p from "./components/dialog.js";
11
11
  import * as d from "./components/fab.js";
@@ -17,13 +17,14 @@ import * as v from "./components/switch.js";
17
17
  import * as F from "./components/table.js";
18
18
  import * as W from "./components/tabs.js";
19
19
  import * as S from "./components/text-field.js";
20
- import { createTheme as z } from "@mui/material/styles";
20
+ import * as z from "./components/toggle-button.js";
21
+ import { createTheme as O } from "@mui/material/styles";
21
22
  /* empty css */
22
23
  /* empty css */
23
- import { gatorShadows as O, gatorBorderRadius as x, gatorSpacing as H, gatorTypography as t, gatorColorValues as e } from "./utils/themeConfig.js";
24
- const B = /* @__PURE__ */ Object.assign({ "./components/accordion.ts": a, "./components/alert.ts": r, "./components/autocomplete.ts": s, "./components/avatar.ts": l, "./components/badge.ts": m, "./components/button.ts": g, "./components/card.ts": h, "./components/checkbox.ts": c, "./components/chip.ts": f, "./components/dialog.ts": p, "./components/fab.ts": d, "./components/form-control.ts": y, "./components/menu.ts": u, "./components/radio.ts": _, "./components/select.ts": b, "./components/switch.ts": v, "./components/table.ts": F, "./components/tabs.ts": W, "./components/text-field.ts": S }), k = Object.values(B).reduce((n, i) => (Object.keys(i).forEach((o) => {
24
+ import { gatorShadows as x, gatorBorderRadius as B, gatorSpacing as H, gatorTypography as t, gatorColorValues as e } from "./utils/themeConfig.js";
25
+ const k = /* @__PURE__ */ Object.assign({ "./components/accordion.ts": a, "./components/alert.ts": r, "./components/autocomplete.ts": s, "./components/avatar.ts": l, "./components/badge.ts": m, "./components/button.ts": g, "./components/card.ts": c, "./components/checkbox.ts": h, "./components/chip.ts": f, "./components/dialog.ts": p, "./components/fab.ts": d, "./components/form-control.ts": y, "./components/menu.ts": u, "./components/radio.ts": _, "./components/select.ts": b, "./components/switch.ts": v, "./components/table.ts": F, "./components/tabs.ts": W, "./components/text-field.ts": S, "./components/toggle-button.ts": z }), w = Object.values(k).reduce((n, i) => (Object.keys(i).forEach((o) => {
25
26
  o.startsWith("MUIGator") && o.includes("Override") && Object.assign(n, i[o]);
26
- }), n), {}), w = {
27
+ }), n), {}), M = {
27
28
  palette: {
28
29
  mode: "light",
29
30
  primary: e.brand,
@@ -156,13 +157,13 @@ const B = /* @__PURE__ */ Object.assign({ "./components/accordion.ts": a, "./com
156
157
  },
157
158
  spacing: H,
158
159
  shape: {
159
- borderRadius: x.xsmall
160
+ borderRadius: B.xsmall
160
161
  },
161
- shadows: O,
162
+ shadows: x,
162
163
  // Component-specific default props
163
164
  components: {
164
165
  // Component overrides
165
- ...k,
166
+ ...w,
166
167
  // Additional component overrides not in separate files
167
168
  MuiLink: {
168
169
  styleOverrides: {
@@ -177,8 +178,8 @@ const B = /* @__PURE__ */ Object.assign({ "./components/accordion.ts": a, "./com
177
178
  }
178
179
  }
179
180
  }
180
- }, R = z(w);
181
+ }, D = O(M);
181
182
  export {
182
- R as default,
183
- R as gatorMUITheme
183
+ D as default,
184
+ D as gatorMUITheme
184
185
  };
@@ -8,7 +8,6 @@ const r = {
8
8
  root: {
9
9
  textTransform: "none",
10
10
  fontWeight: o.fontWeight.semiBold,
11
- height: "fit-content",
12
11
  "&.Mui-focusVisible": {
13
12
  boxShadow: "none",
14
13
  outline: "2px solid var(--color-border-focus)",
@@ -19,17 +18,23 @@ const r = {
19
18
  }
20
19
  },
21
20
  sizeLarge: {
22
- padding: "var(--spacing-7) var(--spacing-8)",
21
+ height: "3rem",
22
+ minWidth: "6rem",
23
+ padding: "0 var(--spacing-8)",
23
24
  fontSize: "var(--font-size-body-1)",
24
25
  lineHeight: "var(--line-height-body-1)"
25
26
  },
26
27
  sizeMedium: {
27
- padding: "var(--spacing-6) var(--spacing-8)",
28
+ height: "2.25rem",
29
+ minWidth: "4rem",
30
+ padding: "0 var(--spacing-8)",
28
31
  fontSize: "var(--font-size-body-2)",
29
32
  lineHeight: "var(--line-height-body-2)"
30
33
  },
31
34
  sizeSmall: {
32
- padding: "var(--spacing-4) var(--spacing-7)",
35
+ height: "1.75rem",
36
+ minWidth: "3.5rem",
37
+ padding: "0 var(--spacing-7)",
33
38
  fontSize: "var(--font-size-body-3)",
34
39
  lineHeight: "var(--line-height-body-3)"
35
40
  },
@@ -0,0 +1,90 @@
1
+ import { gatorBorderRadius as r, gatorTypography as a } from "../utils/themeConfig.js";
2
+ const t = {
3
+ MuiToggleButtonGroup: {
4
+ styleOverrides: {
5
+ grouped: ({ theme: o }) => ({
6
+ "&:not(:first-of-type)": {
7
+ marginLeft: 0,
8
+ borderLeft: "none",
9
+ borderRadius: 0
10
+ },
11
+ "&:first-of-type": {
12
+ borderRadius: `${r.xsmall}px 0 0 ${r.xsmall}px`
13
+ },
14
+ "&:last-of-type": {
15
+ borderRadius: `0 ${r.xsmall}px ${r.xsmall}px 0`
16
+ },
17
+ "&:only-child": {
18
+ borderRadius: `${r.xsmall}px`
19
+ }
20
+ })
21
+ }
22
+ }
23
+ }, e = {
24
+ MuiToggleButton: {
25
+ defaultProps: {
26
+ disableRipple: !0
27
+ },
28
+ styleOverrides: {
29
+ root: ({ theme: o }) => ({
30
+ textTransform: "none",
31
+ fontWeight: a.fontWeight.semiBold,
32
+ border: `1px solid ${o.palette.primary.main}`,
33
+ borderRadius: `${r.xsmall}px`,
34
+ color: o.palette.primary.main,
35
+ backgroundColor: "transparent",
36
+ whiteSpace: "nowrap",
37
+ "&.Mui-focusVisible": {
38
+ boxShadow: "none",
39
+ outline: `2px solid ${o.palette.primary.main}`,
40
+ outlineOffset: "2px"
41
+ },
42
+ "&:hover": {
43
+ boxShadow: o.shadows[2],
44
+ backgroundColor: "transparent"
45
+ },
46
+ "&.Mui-selected": {
47
+ color: o.palette.primary.contrastText,
48
+ backgroundColor: o.palette.primary.main,
49
+ borderColor: o.palette.primary.main,
50
+ "&:hover": {
51
+ boxShadow: o.shadows[2],
52
+ backgroundColor: o.palette.primary.main
53
+ }
54
+ },
55
+ "&.Mui-disabled": {
56
+ color: o.palette.text.disabled,
57
+ backgroundColor: "transparent",
58
+ borderColor: o.palette.divider
59
+ },
60
+ "&.Mui-disabled.Mui-selected": {
61
+ color: o.palette.text.disabled,
62
+ backgroundColor: o.palette.action.disabledBackground,
63
+ borderColor: o.palette.action.disabledBackground
64
+ }
65
+ }),
66
+ sizeLarge: ({ theme: o }) => ({
67
+ height: "3rem",
68
+ padding: `${o.spacing(1.5)} ${o.spacing(2)}`,
69
+ fontSize: o.typography.body1.fontSize,
70
+ lineHeight: o.typography.body1.lineHeight
71
+ }),
72
+ sizeMedium: ({ theme: o }) => ({
73
+ height: "2.25rem",
74
+ padding: `${o.spacing(1.125)} ${o.spacing(2)}`,
75
+ fontSize: o.typography.body2.fontSize,
76
+ lineHeight: o.typography.body2.lineHeight
77
+ }),
78
+ sizeSmall: ({ theme: o }) => ({
79
+ height: "1.75rem",
80
+ padding: `${o.spacing(0.625)} ${o.spacing(1.5)}`,
81
+ fontSize: o.typography.caption.fontSize,
82
+ lineHeight: o.typography.caption.lineHeight
83
+ })
84
+ }
85
+ }
86
+ };
87
+ export {
88
+ t as MUIGatorToggleButtonGroupOverrides,
89
+ e as MUIGatorToggleButtonOverrides
90
+ };
@@ -7,7 +7,6 @@ export declare const MUIGatorButtonOverrides: {
7
7
  root: {
8
8
  textTransform: string;
9
9
  fontWeight: number;
10
- height: string;
11
10
  '&.Mui-focusVisible': {
12
11
  boxShadow: string;
13
12
  outline: string;
@@ -18,16 +17,22 @@ export declare const MUIGatorButtonOverrides: {
18
17
  };
19
18
  };
20
19
  sizeLarge: {
20
+ height: string;
21
+ minWidth: string;
21
22
  padding: string;
22
23
  fontSize: string;
23
24
  lineHeight: string;
24
25
  };
25
26
  sizeMedium: {
27
+ height: string;
28
+ minWidth: string;
26
29
  padding: string;
27
30
  fontSize: string;
28
31
  lineHeight: string;
29
32
  };
30
33
  sizeSmall: {
34
+ height: string;
35
+ minWidth: string;
31
36
  padding: string;
32
37
  fontSize: string;
33
38
  lineHeight: string;
@@ -0,0 +1,86 @@
1
+ export declare const MUIGatorToggleButtonGroupOverrides: {
2
+ MuiToggleButtonGroup: {
3
+ styleOverrides: {
4
+ grouped: ({ theme }: any) => {
5
+ '&:not(:first-of-type)': {
6
+ marginLeft: number;
7
+ borderLeft: string;
8
+ borderRadius: number;
9
+ };
10
+ '&:first-of-type': {
11
+ borderRadius: string;
12
+ };
13
+ '&:last-of-type': {
14
+ borderRadius: string;
15
+ };
16
+ '&:only-child': {
17
+ borderRadius: string;
18
+ };
19
+ };
20
+ };
21
+ };
22
+ };
23
+ export declare const MUIGatorToggleButtonOverrides: {
24
+ MuiToggleButton: {
25
+ defaultProps: {
26
+ disableRipple: boolean;
27
+ };
28
+ styleOverrides: {
29
+ root: ({ theme }: any) => {
30
+ textTransform: string;
31
+ fontWeight: number;
32
+ border: string;
33
+ borderRadius: string;
34
+ color: any;
35
+ backgroundColor: string;
36
+ whiteSpace: string;
37
+ '&.Mui-focusVisible': {
38
+ boxShadow: string;
39
+ outline: string;
40
+ outlineOffset: string;
41
+ };
42
+ '&:hover': {
43
+ boxShadow: any;
44
+ backgroundColor: string;
45
+ };
46
+ '&.Mui-selected': {
47
+ color: any;
48
+ backgroundColor: any;
49
+ borderColor: any;
50
+ '&:hover': {
51
+ boxShadow: any;
52
+ backgroundColor: any;
53
+ };
54
+ };
55
+ '&.Mui-disabled': {
56
+ color: any;
57
+ backgroundColor: string;
58
+ borderColor: any;
59
+ };
60
+ '&.Mui-disabled.Mui-selected': {
61
+ color: any;
62
+ backgroundColor: any;
63
+ borderColor: any;
64
+ };
65
+ };
66
+ sizeLarge: ({ theme }: any) => {
67
+ height: string;
68
+ padding: string;
69
+ fontSize: any;
70
+ lineHeight: any;
71
+ };
72
+ sizeMedium: ({ theme }: any) => {
73
+ height: string;
74
+ padding: string;
75
+ fontSize: any;
76
+ lineHeight: any;
77
+ };
78
+ sizeSmall: ({ theme }: any) => {
79
+ height: string;
80
+ padding: string;
81
+ fontSize: any;
82
+ lineHeight: any;
83
+ };
84
+ };
85
+ };
86
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/styles",
3
3
  "author": "nCino",
4
- "version": "10.1.0",
4
+ "version": "10.2.0",
5
5
  "description": "nCino Shared Web Component Styling",
6
6
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
7
7
  "publishConfig": {
@@ -66,7 +66,7 @@
66
66
  "glob": "^13.0.0",
67
67
  "rimraf": "^6.1.2",
68
68
  "typescript": "^5.9.3",
69
- "vite": "7.3.0",
69
+ "vite": "7.3.2",
70
70
  "vite-plugin-dts": "4.5.4",
71
71
  "vite-plugin-static-copy": "^3.3.0"
72
72
  },