@mindlogic-ai/logician-ui 5.0.0-alpha.23 → 5.0.0-alpha.25

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchControl.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/SwitchControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAsB,MAAM,kBAAkB,CAAC;AAK9E,eAAO,MAAM,aAAa,uHAkCzB,CAAC"}
1
+ {"version":3,"file":"SwitchControl.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/SwitchControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAsB,MAAM,kBAAkB,CAAC;AAS9E,eAAO,MAAM,aAAa,uHA4CzB,CAAC"}
@@ -7,13 +7,26 @@ var react = require('@chakra-ui/react');
7
7
  var disabledControl = require('../../utils/disabledControl.js');
8
8
  var focusRing = require('../../utils/focusRing.js');
9
9
 
10
+ // Drawn as an inset shadow, not a border, so the thumb's travel and the
11
+ // track's size stay exactly what Chakra's recipe computes.
12
+ const OFF_OUTLINE = 'inset 0 0 0 1px var(--chakra-colors-border-control)';
10
13
  const SwitchControl = React.forwardRef((props, ref) => (jsxRuntime.jsx(react.Switch.Control, { ref: ref,
11
- // The off-state track is a meter surface — its extent is the information —
12
- // so it needs a visible fill, not just an edge. bg.muted (gray.100) is
13
- // only ~1.03:1 against the bg.sunken page wash (gray.50) and vanishes
14
- // there; bg.track (gray.300) reads as a filled track on any background.
15
- // The checked state is the self-defining primary.main fill.
16
- bg: "bg.track", _checked: { bg: 'primary.main' }, animationStyle: "feedback", transitionProperty: "background-color", _disabled: { ...disabledControl.disabledControl, cursor: 'not-allowed' }, ...focusRing.focusRing, ...props, children: jsxRuntime.jsx(react.Switch.Thumb
14
+ // Off is drawn the way an unchecked Checkbox is: a bg.surface track with a
15
+ // border.control outline and a border.control thumb, each at least 3:1
16
+ // against what it sits on (WCAG 1.4.11). The previous off state, a
17
+ // bg.track fill with a bg.surface thumb, measured 1.3:1 (light) and
18
+ // 1.4:1 (dark) between thumb and track, so the thumb's position, the only
19
+ // thing that tells off from on, could not be seen.
20
+ // On is success.solid with a success.onSolid thumb. With a black (light) or
21
+ // pale (dark) primary fill, neither state carried colour, and dark-mode
22
+ // "on" read as light-mode "off"; green gives both modes one meaning.
23
+ bg: "bg.surface", boxShadow: OFF_OUTLINE, _checked: { bg: 'success.solid', boxShadow: 'none' }, animationStyle: "feedback", transitionProperty: "background-color, box-shadow", _disabled: { ...disabledControl.disabledControl, cursor: 'not-allowed' }, ...focusRing.focusRing,
24
+ // focusRing's shadow would replace the outline; keep both while off.
25
+ _focusVisible: {
26
+ ...focusRing.focusRing._focusVisible,
27
+ boxShadow: `${OFF_OUTLINE}, ${focusRing.FOCUS_RING_SHADOW}`,
28
+ _checked: { boxShadow: focusRing.FOCUS_RING_SHADOW },
29
+ }, ...props, children: jsxRuntime.jsx(react.Switch.Thumb
17
30
  // A toggle is the metaphor of a physical switch, so the thumb settles
18
31
  // slightly past its stop rather than easing to a halt. Chakra's default
19
32
  // is `translate` over `fast` on a plain curve; `overshoot` is the one
@@ -26,11 +39,10 @@ const SwitchControl = React.forwardRef((props, ref) => (jsxRuntime.jsx(react.Swi
26
39
  // curve that stays legible over the thumb's ~16px of travel, because it
27
40
  // reverses direction — `standard` vs `emphasized` would not.
28
41
  animationStyle: "spring", transitionProperty: "translate",
29
- // Chakra's default is a raw `white` thumb that stays `white` when
30
- // checked via an undefined `colorPalette.contrast`. bg.surface reads
31
- // as the same near-white in light and flips correctly in dark; the
32
- // checked thumb is fg.onPrimary (cream) to match Checkbox/Radio.
33
- bg: "bg.surface", _checked: { bg: 'fg.onPrimary' } }) })));
42
+ // Off: border.control, the same 3:1 control token as the outline.
43
+ // On: success.onSolid, the text colour success buttons put on the same
44
+ // fill (white in light, ink in dark).
45
+ bg: "border.control", _checked: { bg: 'success.onSolid' } }) })));
34
46
  SwitchControl.displayName = 'Switch.Control';
35
47
 
36
48
  exports.SwitchControl = SwitchControl;
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchControl.js","sources":["../../../src/components/Switch/SwitchControl.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraSwitch","disabledControl","focusRing"],"mappings":";;;;;;;;;MAMa,aAAa,GAAGA,gBAAU,CACrC,CAAC,KAAK,EAAE,GAAG,MACTC,cAAA,CAACC,YAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG;;;;;;AAMR,IAAA,EAAE,EAAC,UAAU,EACb,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAChC,cAAc,EAAC,UAAU,EACzB,kBAAkB,EAAC,kBAAkB,EACrC,SAAS,EAAE,EAAE,GAAGC,+BAAe,EAAE,MAAM,EAAE,aAAa,EAAE,EAAA,GACpDC,mBAAS,EAAA,GACT,KAAK,YAETH,cAAA,CAACC,YAAY,CAAC;;;;;;;;;;;;AAMZ,QAAA,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,WAAW;;;;;AAK9B,QAAA,EAAE,EAAC,YAAY,EACf,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAAA,CAChC,EAAA,CACmB,CACxB;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB;;;;"}
1
+ {"version":3,"file":"SwitchControl.js","sources":["../../../src/components/Switch/SwitchControl.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraSwitch","disabledControl","focusRing","FOCUS_RING_SHADOW"],"mappings":";;;;;;;;;AAMA;AACA;AACA,MAAM,WAAW,GAAG,qDAAqD;MAE5D,aAAa,GAAGA,gBAAU,CACrC,CAAC,KAAK,EAAE,GAAG,MACTC,cAAA,CAACC,YAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG;;;;;;;;;;AAUR,IAAA,EAAE,EAAC,YAAY,EACf,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,EACpD,cAAc,EAAC,UAAU,EACzB,kBAAkB,EAAC,8BAA8B,EACjD,SAAS,EAAE,EAAE,GAAGC,+BAAe,EAAE,MAAM,EAAE,aAAa,EAAE,KACpDC,mBAAS;;AAEb,IAAA,aAAa,EAAE;QACb,GAAGA,mBAAS,CAAC,aAAa;AAC1B,QAAA,SAAS,EAAE,CAAA,EAAG,WAAW,CAAA,EAAA,EAAKC,2BAAiB,CAAA,CAAE;AACjD,QAAA,QAAQ,EAAE,EAAE,SAAS,EAAEA,2BAAiB,EAAE;AAC3C,KAAA,EAAA,GACG,KAAK,EAAA,QAAA,EAETJ,cAAA,CAACC,YAAY,CAAC;;;;;;;;;;;;AAMZ,QAAA,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,WAAW;;;;AAI9B,QAAA,EAAE,EAAC,gBAAgB,EACnB,QAAQ,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAA,CACnC,EAAA,CACmB,CACxB;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB;;;;"}
@@ -3,15 +3,28 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { Switch } from '@chakra-ui/react';
5
5
  import { disabledControl } from '../../utils/disabledControl.mjs';
6
- import { focusRing } from '../../utils/focusRing.mjs';
6
+ import { FOCUS_RING_SHADOW, focusRing } from '../../utils/focusRing.mjs';
7
7
 
8
+ // Drawn as an inset shadow, not a border, so the thumb's travel and the
9
+ // track's size stay exactly what Chakra's recipe computes.
10
+ const OFF_OUTLINE = 'inset 0 0 0 1px var(--chakra-colors-border-control)';
8
11
  const SwitchControl = forwardRef((props, ref) => (jsx(Switch.Control, { ref: ref,
9
- // The off-state track is a meter surface — its extent is the information —
10
- // so it needs a visible fill, not just an edge. bg.muted (gray.100) is
11
- // only ~1.03:1 against the bg.sunken page wash (gray.50) and vanishes
12
- // there; bg.track (gray.300) reads as a filled track on any background.
13
- // The checked state is the self-defining primary.main fill.
14
- bg: "bg.track", _checked: { bg: 'primary.main' }, animationStyle: "feedback", transitionProperty: "background-color", _disabled: { ...disabledControl, cursor: 'not-allowed' }, ...focusRing, ...props, children: jsx(Switch.Thumb
12
+ // Off is drawn the way an unchecked Checkbox is: a bg.surface track with a
13
+ // border.control outline and a border.control thumb, each at least 3:1
14
+ // against what it sits on (WCAG 1.4.11). The previous off state, a
15
+ // bg.track fill with a bg.surface thumb, measured 1.3:1 (light) and
16
+ // 1.4:1 (dark) between thumb and track, so the thumb's position, the only
17
+ // thing that tells off from on, could not be seen.
18
+ // On is success.solid with a success.onSolid thumb. With a black (light) or
19
+ // pale (dark) primary fill, neither state carried colour, and dark-mode
20
+ // "on" read as light-mode "off"; green gives both modes one meaning.
21
+ bg: "bg.surface", boxShadow: OFF_OUTLINE, _checked: { bg: 'success.solid', boxShadow: 'none' }, animationStyle: "feedback", transitionProperty: "background-color, box-shadow", _disabled: { ...disabledControl, cursor: 'not-allowed' }, ...focusRing,
22
+ // focusRing's shadow would replace the outline; keep both while off.
23
+ _focusVisible: {
24
+ ...focusRing._focusVisible,
25
+ boxShadow: `${OFF_OUTLINE}, ${FOCUS_RING_SHADOW}`,
26
+ _checked: { boxShadow: FOCUS_RING_SHADOW },
27
+ }, ...props, children: jsx(Switch.Thumb
15
28
  // A toggle is the metaphor of a physical switch, so the thumb settles
16
29
  // slightly past its stop rather than easing to a halt. Chakra's default
17
30
  // is `translate` over `fast` on a plain curve; `overshoot` is the one
@@ -24,11 +37,10 @@ const SwitchControl = forwardRef((props, ref) => (jsx(Switch.Control, { ref: ref
24
37
  // curve that stays legible over the thumb's ~16px of travel, because it
25
38
  // reverses direction — `standard` vs `emphasized` would not.
26
39
  animationStyle: "spring", transitionProperty: "translate",
27
- // Chakra's default is a raw `white` thumb that stays `white` when
28
- // checked via an undefined `colorPalette.contrast`. bg.surface reads
29
- // as the same near-white in light and flips correctly in dark; the
30
- // checked thumb is fg.onPrimary (cream) to match Checkbox/Radio.
31
- bg: "bg.surface", _checked: { bg: 'fg.onPrimary' } }) })));
40
+ // Off: border.control, the same 3:1 control token as the outline.
41
+ // On: success.onSolid, the text colour success buttons put on the same
42
+ // fill (white in light, ink in dark).
43
+ bg: "border.control", _checked: { bg: 'success.onSolid' } }) })));
32
44
  SwitchControl.displayName = 'Switch.Control';
33
45
 
34
46
  export { SwitchControl };
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchControl.mjs","sources":["../../../src/components/Switch/SwitchControl.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraSwitch"],"mappings":";;;;;;;MAMa,aAAa,GAAG,UAAU,CACrC,CAAC,KAAK,EAAE,GAAG,MACTA,GAAA,CAACC,MAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG;;;;;;AAMR,IAAA,EAAE,EAAC,UAAU,EACb,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAChC,cAAc,EAAC,UAAU,EACzB,kBAAkB,EAAC,kBAAkB,EACrC,SAAS,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,EAAA,GACpD,SAAS,EAAA,GACT,KAAK,YAETD,GAAA,CAACC,MAAY,CAAC;;;;;;;;;;;;AAMZ,QAAA,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,WAAW;;;;;AAK9B,QAAA,EAAE,EAAC,YAAY,EACf,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,EAAA,CAChC,EAAA,CACmB,CACxB;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB;;;;"}
1
+ {"version":3,"file":"SwitchControl.mjs","sources":["../../../src/components/Switch/SwitchControl.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraSwitch"],"mappings":";;;;;;;AAMA;AACA;AACA,MAAM,WAAW,GAAG,qDAAqD;MAE5D,aAAa,GAAG,UAAU,CACrC,CAAC,KAAK,EAAE,GAAG,MACTA,GAAA,CAACC,MAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG;;;;;;;;;;AAUR,IAAA,EAAE,EAAC,YAAY,EACf,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,EACpD,cAAc,EAAC,UAAU,EACzB,kBAAkB,EAAC,8BAA8B,EACjD,SAAS,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,KACpD,SAAS;;AAEb,IAAA,aAAa,EAAE;QACb,GAAG,SAAS,CAAC,aAAa;AAC1B,QAAA,SAAS,EAAE,CAAA,EAAG,WAAW,CAAA,EAAA,EAAK,iBAAiB,CAAA,CAAE;AACjD,QAAA,QAAQ,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE;AAC3C,KAAA,EAAA,GACG,KAAK,EAAA,QAAA,EAETD,GAAA,CAACC,MAAY,CAAC;;;;;;;;;;;;AAMZ,QAAA,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,WAAW;;;;AAI9B,QAAA,EAAE,EAAC,gBAAgB,EACnB,QAAQ,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAA,CACnC,EAAA,CACmB,CACxB;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB;;;;"}
@@ -5,12 +5,15 @@ import type { ToastStatus } from './Toast.types';
5
5
  *
6
6
  * Each status is bg `{s}.bg` + text `{s}.fg` + a 1px `{s}.border` outline —
7
7
  * `info` reads its own `info.*` family instead of borrowing `primary.*`.
8
- * `neutral` carries no status (it is the default when none is given) and is
9
- * inverted: the tooltip pair `tooltip.bg` / `tooltip.fg`. A `bg.surface` toast
10
- * was white on a white canvas in light mode, set apart only by a 1px border
11
- * and the shadow — a "링크를 복사했어요" confirmation was easy to miss. The
12
- * tooltip pair already flips per mode (ink in light, off-white in dark), so the
13
- * toast stays the highest-contrast thing on the page in both.
8
+ * `neutral` carries no status (it is the default when none is given) and sits
9
+ * on the muted ground: `bg.muted` + `fg.default` + a `border.default` outline.
10
+ * Not `bg.surface` — that was white on a white canvas in light mode, set apart
11
+ * only by a 1px border and the shadow, so a "링크를 복사했어요" confirmation was
12
+ * easy to miss. Not the inverted tooltip pair either — ink (#252525) is
13
+ * `primary.main`, the user's own chat bubble, so a plain "복사 완료" read as
14
+ * the heaviest thing on the page, louder than an error toast. `bg.muted` is
15
+ * already a registered separation from `bg.canvas` (see `contrast.test.ts`)
16
+ * and flips per mode with the rest of the neutral ramp.
14
17
  */
15
18
  export declare const toastStyles: Record<ToastStatus, BoxProps>;
16
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CA0BrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAiC3D,CAAC;AA0BF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAiCtD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAC"}
1
+ {"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CA0BrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CA+B3D,CAAC;AA0BF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CA+BtD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAC"}
@@ -6,12 +6,15 @@
6
6
  *
7
7
  * Each status is bg `{s}.bg` + text `{s}.fg` + a 1px `{s}.border` outline —
8
8
  * `info` reads its own `info.*` family instead of borrowing `primary.*`.
9
- * `neutral` carries no status (it is the default when none is given) and is
10
- * inverted: the tooltip pair `tooltip.bg` / `tooltip.fg`. A `bg.surface` toast
11
- * was white on a white canvas in light mode, set apart only by a 1px border
12
- * and the shadow — a "링크를 복사했어요" confirmation was easy to miss. The
13
- * tooltip pair already flips per mode (ink in light, off-white in dark), so the
14
- * toast stays the highest-contrast thing on the page in both.
9
+ * `neutral` carries no status (it is the default when none is given) and sits
10
+ * on the muted ground: `bg.muted` + `fg.default` + a `border.default` outline.
11
+ * Not `bg.surface` — that was white on a white canvas in light mode, set apart
12
+ * only by a 1px border and the shadow, so a "링크를 복사했어요" confirmation was
13
+ * easy to miss. Not the inverted tooltip pair either — ink (#252525) is
14
+ * `primary.main`, the user's own chat bubble, so a plain "복사 완료" read as
15
+ * the heaviest thing on the page, louder than an error toast. `bg.muted` is
16
+ * already a registered separation from `bg.canvas` (see `contrast.test.ts`)
17
+ * and flips per mode with the rest of the neutral ramp.
15
18
  */
16
19
  const toastStyles = {
17
20
  info: {
@@ -35,9 +38,9 @@ const toastStyles = {
35
38
  borderColor: 'danger.border',
36
39
  },
37
40
  neutral: {
38
- bg: 'tooltip.bg',
39
- color: 'tooltip.fg',
40
- borderColor: 'tooltip.bg',
41
+ bg: 'bg.muted',
42
+ color: 'fg.default',
43
+ borderColor: 'border.default',
41
44
  },
42
45
  };
43
46
  /**
@@ -71,11 +74,9 @@ const closeButtonStyles = {
71
74
  },
72
75
  },
73
76
  neutral: {
74
- color: 'tooltip.fg',
77
+ color: 'fg.muted',
75
78
  _hover: {
76
- // A tint of the toast's own text colour: no surface token sits on the
77
- // inverted ground in both modes.
78
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
79
+ bg: 'layer.1.active',
79
80
  },
80
81
  },
81
82
  };
@@ -129,11 +130,9 @@ const actionStyles = {
129
130
  },
130
131
  neutral: {
131
132
  ...actionBase,
132
- color: 'tooltip.fg',
133
- _hover: {
134
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
135
- },
136
- _focusVisible: { outline: '2px solid', outlineColor: 'tooltip.fg' },
133
+ color: 'fg.default',
134
+ _hover: { bg: 'layer.1.active' },
135
+ _focusVisible: { outline: '2px solid', outlineColor: 'fg.default' },
137
136
  },
138
137
  };
139
138
  /** Default duration (ms) of a toast without an action, when none is given */
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.styles.js","sources":["../../../src/components/Toast/Toast.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;;;;;;;AAWG;AACI,MAAM,WAAW,GAAkC;AACxD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,SAAS;AACb,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,WAAW,EAAE,aAAa;AAC3B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,KAAK,EAAE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
1
+ {"version":3,"file":"Toast.styles.js","sources":["../../../src/components/Toast/Toast.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;AAcG;AACI,MAAM,WAAW,GAAkC;AACxD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,SAAS;AACb,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,WAAW,EAAE,aAAa;AAC3B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,WAAW,EAAE,eAAe;AAC7B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,UAAU;AACd,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;;AAGH;;;;AAIG;AACI,MAAM,iBAAiB,GAAkC;AAC9D,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,EAAE,aAAa;AAClB,SAAA;AACF,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,EAAE,gBAAgB;AACrB,SAAA;AACF,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,EAAE,gBAAgB;AACrB,SAAA;AACF,KAAA;AACD,IAAA,KAAK,EAAE;AAC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AE;AACpE,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,UAAU;AACb,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,MAAM,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE;QAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE;AACnE,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,GAAG,UAAU;AACb,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE;QAChC,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE;AACpE,KAAA;;AAGH;AACO,MAAM,sBAAsB,GAAG;AAEtC;;;AAGG;AACI,MAAM,qBAAqB,GAAG;;;;;;;;"}
@@ -4,12 +4,15 @@
4
4
  *
5
5
  * Each status is bg `{s}.bg` + text `{s}.fg` + a 1px `{s}.border` outline —
6
6
  * `info` reads its own `info.*` family instead of borrowing `primary.*`.
7
- * `neutral` carries no status (it is the default when none is given) and is
8
- * inverted: the tooltip pair `tooltip.bg` / `tooltip.fg`. A `bg.surface` toast
9
- * was white on a white canvas in light mode, set apart only by a 1px border
10
- * and the shadow — a "링크를 복사했어요" confirmation was easy to miss. The
11
- * tooltip pair already flips per mode (ink in light, off-white in dark), so the
12
- * toast stays the highest-contrast thing on the page in both.
7
+ * `neutral` carries no status (it is the default when none is given) and sits
8
+ * on the muted ground: `bg.muted` + `fg.default` + a `border.default` outline.
9
+ * Not `bg.surface` — that was white on a white canvas in light mode, set apart
10
+ * only by a 1px border and the shadow, so a "링크를 복사했어요" confirmation was
11
+ * easy to miss. Not the inverted tooltip pair either — ink (#252525) is
12
+ * `primary.main`, the user's own chat bubble, so a plain "복사 완료" read as
13
+ * the heaviest thing on the page, louder than an error toast. `bg.muted` is
14
+ * already a registered separation from `bg.canvas` (see `contrast.test.ts`)
15
+ * and flips per mode with the rest of the neutral ramp.
13
16
  */
14
17
  const toastStyles = {
15
18
  info: {
@@ -33,9 +36,9 @@ const toastStyles = {
33
36
  borderColor: 'danger.border',
34
37
  },
35
38
  neutral: {
36
- bg: 'tooltip.bg',
37
- color: 'tooltip.fg',
38
- borderColor: 'tooltip.bg',
39
+ bg: 'bg.muted',
40
+ color: 'fg.default',
41
+ borderColor: 'border.default',
39
42
  },
40
43
  };
41
44
  /**
@@ -69,11 +72,9 @@ const closeButtonStyles = {
69
72
  },
70
73
  },
71
74
  neutral: {
72
- color: 'tooltip.fg',
75
+ color: 'fg.muted',
73
76
  _hover: {
74
- // A tint of the toast's own text colour: no surface token sits on the
75
- // inverted ground in both modes.
76
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
77
+ bg: 'layer.1.active',
77
78
  },
78
79
  },
79
80
  };
@@ -127,11 +128,9 @@ const actionStyles = {
127
128
  },
128
129
  neutral: {
129
130
  ...actionBase,
130
- color: 'tooltip.fg',
131
- _hover: {
132
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
133
- },
134
- _focusVisible: { outline: '2px solid', outlineColor: 'tooltip.fg' },
131
+ color: 'fg.default',
132
+ _hover: { bg: 'layer.1.active' },
133
+ _focusVisible: { outline: '2px solid', outlineColor: 'fg.default' },
135
134
  },
136
135
  };
137
136
  /** Default duration (ms) of a toast without an action, when none is given */
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.styles.mjs","sources":["../../../src/components/Toast/Toast.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";AAIA;;;;;;;;;;;AAWG;AACI,MAAM,WAAW,GAAkC;AACxD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,SAAS;AACb,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,WAAW,EAAE,aAAa;AAC3B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AAC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AE,sEAAsE;AAC3E,SAAA;QACD,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE;AACpE,KAAA;;AAGH;AACO,MAAM,sBAAsB,GAAG;AAEtC;;;AAGG;AACI,MAAM,qBAAqB,GAAG;;;;"}
1
+ {"version":3,"file":"Toast.styles.mjs","sources":["../../../src/components/Toast/Toast.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;AAcG;AACI,MAAM,WAAW,GAAkC;AACxD,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,SAAS;AACb,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,WAAW,EAAE,aAAa;AAC3B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,YAAY;AAChB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,WAAW,EAAE,eAAe;AAC7B,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE,UAAU;AACd,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,WAAW,EAAE,gBAAgB;AAC9B,KAAA;;AAGH;;;;AAIG;AACI,MAAM,iBAAiB,GAAkC;AAC9D,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,EAAE,aAAa;AAClB,SAAA;AACF,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,EAAE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AAO,EAAE;AACP,QAAA,GAAG,UAAU;AACb,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE;QAChC,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE;AACpE,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,UAAU;AACb,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,MAAM,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE;QAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE;AACnE,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,GAAG,UAAU;AACb,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE;QAChC,aAAa,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE;AACpE,KAAA;;AAGH;AACO,MAAM,sBAAsB,GAAG;AAEtC;;;AAGG;AACI,MAAM,qBAAqB,GAAG;;;;"}
@@ -324,7 +324,7 @@ export declare const SCHEMES: {
324
324
  readonly "success-bg": "#E5EDDD";
325
325
  readonly "success-border": "#C5D4B5";
326
326
  readonly "success-fg": "#556344";
327
- readonly "success-solid": "#5E7A37";
327
+ readonly "success-solid": "#30862D";
328
328
  readonly "success-onSolid": "#FFFFFF";
329
329
  readonly "warning-bg": "#FEE9BC";
330
330
  readonly "warning-border": "#F0CF83";
@@ -506,7 +506,7 @@ export declare const SCHEMES: {
506
506
  readonly "success-bg": "#E5EDDD";
507
507
  readonly "success-border": "#7D8B6E";
508
508
  readonly "success-fg": "#445133";
509
- readonly "success-solid": "#47611D";
509
+ readonly "success-solid": "#036805";
510
510
  readonly "success-onSolid": "#FFFFFF";
511
511
  readonly "warning-bg": "#FEE9BC";
512
512
  readonly "warning-border": "#A28336";
@@ -690,7 +690,7 @@ export declare const SCHEMES: {
690
690
  readonly "success-bg": "#E5EDDD";
691
691
  readonly "success-border": "#C5D4B5";
692
692
  readonly "success-fg": "#556344";
693
- readonly "success-solid": "#5E7A37";
693
+ readonly "success-solid": "#30862D";
694
694
  readonly "success-onSolid": "#FFFFFF";
695
695
  readonly "warning-bg": "#FEE9BC";
696
696
  readonly "warning-border": "#F0CF83";
@@ -872,7 +872,7 @@ export declare const SCHEMES: {
872
872
  readonly "success-bg": "#E5EDDD";
873
873
  readonly "success-border": "#7D8B6E";
874
874
  readonly "success-fg": "#445133";
875
- readonly "success-solid": "#47611D";
875
+ readonly "success-solid": "#036805";
876
876
  readonly "success-onSolid": "#FFFFFF";
877
877
  readonly "warning-bg": "#FEE9BC";
878
878
  readonly "warning-border": "#A28336";
@@ -330,7 +330,7 @@ const SCHEMES = {
330
330
  "success-bg": "#E5EDDD",
331
331
  "success-border": "#C5D4B5",
332
332
  "success-fg": "#556344",
333
- "success-solid": "#5E7A37",
333
+ "success-solid": "#30862D",
334
334
  "success-onSolid": "#FFFFFF",
335
335
  "warning-bg": "#FEE9BC",
336
336
  "warning-border": "#F0CF83",
@@ -512,7 +512,7 @@ const SCHEMES = {
512
512
  "success-bg": "#E5EDDD",
513
513
  "success-border": "#7D8B6E",
514
514
  "success-fg": "#445133",
515
- "success-solid": "#47611D",
515
+ "success-solid": "#036805",
516
516
  "success-onSolid": "#FFFFFF",
517
517
  "warning-bg": "#FEE9BC",
518
518
  "warning-border": "#A28336",
@@ -696,7 +696,7 @@ const SCHEMES = {
696
696
  "success-bg": "#E5EDDD",
697
697
  "success-border": "#C5D4B5",
698
698
  "success-fg": "#556344",
699
- "success-solid": "#5E7A37",
699
+ "success-solid": "#30862D",
700
700
  "success-onSolid": "#FFFFFF",
701
701
  "warning-bg": "#FEE9BC",
702
702
  "warning-border": "#F0CF83",
@@ -878,7 +878,7 @@ const SCHEMES = {
878
878
  "success-bg": "#E5EDDD",
879
879
  "success-border": "#7D8B6E",
880
880
  "success-fg": "#445133",
881
- "success-solid": "#47611D",
881
+ "success-solid": "#036805",
882
882
  "success-onSolid": "#FFFFFF",
883
883
  "warning-bg": "#FEE9BC",
884
884
  "warning-border": "#A28336",
@@ -328,7 +328,7 @@ const SCHEMES = {
328
328
  "success-bg": "#E5EDDD",
329
329
  "success-border": "#C5D4B5",
330
330
  "success-fg": "#556344",
331
- "success-solid": "#5E7A37",
331
+ "success-solid": "#30862D",
332
332
  "success-onSolid": "#FFFFFF",
333
333
  "warning-bg": "#FEE9BC",
334
334
  "warning-border": "#F0CF83",
@@ -510,7 +510,7 @@ const SCHEMES = {
510
510
  "success-bg": "#E5EDDD",
511
511
  "success-border": "#7D8B6E",
512
512
  "success-fg": "#445133",
513
- "success-solid": "#47611D",
513
+ "success-solid": "#036805",
514
514
  "success-onSolid": "#FFFFFF",
515
515
  "warning-bg": "#FEE9BC",
516
516
  "warning-border": "#A28336",
@@ -694,7 +694,7 @@ const SCHEMES = {
694
694
  "success-bg": "#E5EDDD",
695
695
  "success-border": "#C5D4B5",
696
696
  "success-fg": "#556344",
697
- "success-solid": "#5E7A37",
697
+ "success-solid": "#30862D",
698
698
  "success-onSolid": "#FFFFFF",
699
699
  "warning-bg": "#FEE9BC",
700
700
  "warning-border": "#F0CF83",
@@ -876,7 +876,7 @@ const SCHEMES = {
876
876
  "success-bg": "#E5EDDD",
877
877
  "success-border": "#7D8B6E",
878
878
  "success-fg": "#445133",
879
- "success-solid": "#47611D",
879
+ "success-solid": "#036805",
880
880
  "success-onSolid": "#FFFFFF",
881
881
  "warning-bg": "#FEE9BC",
882
882
  "warning-border": "#A28336",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindlogic-ai/logician-ui",
3
- "version": "5.0.0-alpha.23",
3
+ "version": "5.0.0-alpha.25",
4
4
  "description": "A comprehensive React design system built on Chakra UI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -179,14 +179,22 @@ export const UsageTokens: Story = {
179
179
  render: () => (
180
180
  <TokenTable
181
181
  rows={[
182
- { token: 'bg.track', use: <T en="Track when off" ko="꺼짐 트랙" /> },
183
- { token: 'primary.main', use: <T en="Track when on" ko="켜짐 트랙" /> },
182
+ { token: 'bg.surface', use: <T en="Track when off" ko="꺼짐 트랙" /> },
184
183
  {
185
- token: 'bg.surface',
186
- use: <T en="Thumb when off" ko="꺼짐 손잡이" />,
184
+ token: 'border.control',
185
+ use: (
186
+ <T
187
+ en="Track outline and thumb when off"
188
+ ko="꺼짐 트랙 테두리·손잡이"
189
+ />
190
+ ),
187
191
  },
188
192
  {
189
- token: 'fg.onPrimary',
193
+ token: 'success.solid',
194
+ use: <T en="Track when on" ko="켜짐 트랙" />,
195
+ },
196
+ {
197
+ token: 'success.onSolid',
190
198
  use: <T en="Thumb when on" ko="켜짐 손잡이" />,
191
199
  },
192
200
  {
@@ -128,8 +128,9 @@ What Switch does for you:
128
128
 
129
129
  - A native checkbox input carries the state, so Tab focuses it and Space
130
130
  toggles it.
131
- - The keyboard focus ring shows on the track (WCAG 2.4.7). The off track is
132
- `bg.track`, a filled track that stays visible on any surface (WCAG 1.4.11).
131
+ - The keyboard focus ring shows on the track (WCAG 2.4.7). Off is drawn like an
132
+ unchecked Checkbox: a `border.control` outline and thumb, at least 3:1 on any
133
+ surface (WCAG 1.4.11).
133
134
 
134
135
  What you still have to do:
135
136
 
@@ -160,8 +161,8 @@ Switch가 알아서 하는 일
160
161
 
161
162
  - 상태는 네이티브 체크박스 입력이 가지고 있어서 Tab으로 초점을 옮기고 Space로 바꿀 수
162
163
  있습니다.
163
- - 키보드 초점 링이 트랙에 보입니다(WCAG 2.4.7). 꺼짐 트랙은 어떤 면 위에서도 보이도록
164
- 채워진 `bg.track`을 씁니다(WCAG 1.4.11).
164
+ - 키보드 초점 링이 트랙에 보입니다(WCAG 2.4.7). 꺼짐은 체크하지 않은 Checkbox처럼
165
+ `border.control` 테두리와 손잡이로 그려, 어떤 면 위에서도 3:1 이상입니다(WCAG 1.4.11).
165
166
 
166
167
  직접 챙겨야 하는 일
167
168
 
@@ -2,23 +2,38 @@ import { forwardRef } from 'react';
2
2
  import { Switch as ChakraSwitch, SwitchControlProps } from '@chakra-ui/react';
3
3
 
4
4
  import { disabledControl } from '@/utils/disabledControl';
5
- import { focusRing } from '@/utils/focusRing';
5
+ import { FOCUS_RING_SHADOW, focusRing } from '@/utils/focusRing';
6
+
7
+ // Drawn as an inset shadow, not a border, so the thumb's travel and the
8
+ // track's size stay exactly what Chakra's recipe computes.
9
+ const OFF_OUTLINE = 'inset 0 0 0 1px var(--chakra-colors-border-control)';
6
10
 
7
11
  export const SwitchControl = forwardRef<HTMLSpanElement, SwitchControlProps>(
8
12
  (props, ref) => (
9
13
  <ChakraSwitch.Control
10
14
  ref={ref}
11
- // The off-state track is a meter surface — its extent is the information —
12
- // so it needs a visible fill, not just an edge. bg.muted (gray.100) is
13
- // only ~1.03:1 against the bg.sunken page wash (gray.50) and vanishes
14
- // there; bg.track (gray.300) reads as a filled track on any background.
15
- // The checked state is the self-defining primary.main fill.
16
- bg="bg.track"
17
- _checked={{ bg: 'primary.main' }}
15
+ // Off is drawn the way an unchecked Checkbox is: a bg.surface track with a
16
+ // border.control outline and a border.control thumb, each at least 3:1
17
+ // against what it sits on (WCAG 1.4.11). The previous off state, a
18
+ // bg.track fill with a bg.surface thumb, measured 1.3:1 (light) and
19
+ // 1.4:1 (dark) between thumb and track, so the thumb's position, the only
20
+ // thing that tells off from on, could not be seen.
21
+ // On is success.solid with a success.onSolid thumb. With a black (light) or
22
+ // pale (dark) primary fill, neither state carried colour, and dark-mode
23
+ // "on" read as light-mode "off"; green gives both modes one meaning.
24
+ bg="bg.surface"
25
+ boxShadow={OFF_OUTLINE}
26
+ _checked={{ bg: 'success.solid', boxShadow: 'none' }}
18
27
  animationStyle="feedback"
19
- transitionProperty="background-color"
28
+ transitionProperty="background-color, box-shadow"
20
29
  _disabled={{ ...disabledControl, cursor: 'not-allowed' }}
21
30
  {...focusRing}
31
+ // focusRing's shadow would replace the outline; keep both while off.
32
+ _focusVisible={{
33
+ ...focusRing._focusVisible,
34
+ boxShadow: `${OFF_OUTLINE}, ${FOCUS_RING_SHADOW}`,
35
+ _checked: { boxShadow: FOCUS_RING_SHADOW },
36
+ }}
22
37
  {...props}
23
38
  >
24
39
  <ChakraSwitch.Thumb
@@ -29,12 +44,11 @@ export const SwitchControl = forwardRef<HTMLSpanElement, SwitchControlProps>(
29
44
  // reverses direction — `standard` vs `emphasized` would not.
30
45
  animationStyle="spring"
31
46
  transitionProperty="translate"
32
- // Chakra's default is a raw `white` thumb that stays `white` when
33
- // checked via an undefined `colorPalette.contrast`. bg.surface reads
34
- // as the same near-white in light and flips correctly in dark; the
35
- // checked thumb is fg.onPrimary (cream) to match Checkbox/Radio.
36
- bg="bg.surface"
37
- _checked={{ bg: 'fg.onPrimary' }}
47
+ // Off: border.control, the same 3:1 control token as the outline.
48
+ // On: success.onSolid, the text colour success buttons put on the same
49
+ // fill (white in light, ink in dark).
50
+ bg="border.control"
51
+ _checked={{ bg: 'success.onSolid' }}
38
52
  />
39
53
  </ChakraSwitch.Control>
40
54
  )
@@ -7,12 +7,15 @@ import type { ToastStatus } from './Toast.types';
7
7
  *
8
8
  * Each status is bg `{s}.bg` + text `{s}.fg` + a 1px `{s}.border` outline —
9
9
  * `info` reads its own `info.*` family instead of borrowing `primary.*`.
10
- * `neutral` carries no status (it is the default when none is given) and is
11
- * inverted: the tooltip pair `tooltip.bg` / `tooltip.fg`. A `bg.surface` toast
12
- * was white on a white canvas in light mode, set apart only by a 1px border
13
- * and the shadow — a "링크를 복사했어요" confirmation was easy to miss. The
14
- * tooltip pair already flips per mode (ink in light, off-white in dark), so the
15
- * toast stays the highest-contrast thing on the page in both.
10
+ * `neutral` carries no status (it is the default when none is given) and sits
11
+ * on the muted ground: `bg.muted` + `fg.default` + a `border.default` outline.
12
+ * Not `bg.surface` — that was white on a white canvas in light mode, set apart
13
+ * only by a 1px border and the shadow, so a "링크를 복사했어요" confirmation was
14
+ * easy to miss. Not the inverted tooltip pair either — ink (#252525) is
15
+ * `primary.main`, the user's own chat bubble, so a plain "복사 완료" read as
16
+ * the heaviest thing on the page, louder than an error toast. `bg.muted` is
17
+ * already a registered separation from `bg.canvas` (see `contrast.test.ts`)
18
+ * and flips per mode with the rest of the neutral ramp.
16
19
  */
17
20
  export const toastStyles: Record<ToastStatus, BoxProps> = {
18
21
  info: {
@@ -36,9 +39,9 @@ export const toastStyles: Record<ToastStatus, BoxProps> = {
36
39
  borderColor: 'danger.border',
37
40
  },
38
41
  neutral: {
39
- bg: 'tooltip.bg',
40
- color: 'tooltip.fg',
41
- borderColor: 'tooltip.bg',
42
+ bg: 'bg.muted',
43
+ color: 'fg.default',
44
+ borderColor: 'border.default',
42
45
  },
43
46
  };
44
47
 
@@ -73,11 +76,9 @@ export const closeButtonStyles: Record<ToastStatus, BoxProps> = {
73
76
  },
74
77
  },
75
78
  neutral: {
76
- color: 'tooltip.fg',
79
+ color: 'fg.muted',
77
80
  _hover: {
78
- // A tint of the toast's own text colour: no surface token sits on the
79
- // inverted ground in both modes.
80
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
81
+ bg: 'layer.1.active',
81
82
  },
82
83
  },
83
84
  };
@@ -133,11 +134,9 @@ export const actionStyles: Record<ToastStatus, BoxProps> = {
133
134
  },
134
135
  neutral: {
135
136
  ...actionBase,
136
- color: 'tooltip.fg',
137
- _hover: {
138
- bg: 'color-mix(in srgb, var(--chakra-colors-tooltip-fg) 16%, transparent)',
139
- },
140
- _focusVisible: { outline: '2px solid', outlineColor: 'tooltip.fg' },
137
+ color: 'fg.default',
138
+ _hover: { bg: 'layer.1.active' },
139
+ _focusVisible: { outline: '2px solid', outlineColor: 'fg.default' },
141
140
  },
142
141
  };
143
142
 
@@ -97,7 +97,7 @@ then goes away on its own.
97
97
 
98
98
  | Status | Means | Use for |
99
99
  | --- | --- | --- |
100
- | `neutral` (default) | A plain result with no status; no icon. Inverted (`tooltip.bg` / `tooltip.fg`) so it stands out on a white page | Copied, moved, sent |
100
+ | `neutral` (default) | A plain result with no status; no icon. Muted ground (`bg.muted` / `fg.default`, `border.default` outline): visible on a white page without outweighing a status toast | Copied, moved, sent |
101
101
  | `success` | Done as asked | Saved, uploaded, deleted |
102
102
  | `info` | A fact about what just happened; nothing is wrong | Export ready, model switched for you |
103
103
  | `warning` | Done, but not quite as expected | Some files skipped |
@@ -111,7 +111,7 @@ then goes away on its own.
111
111
 
112
112
  | 상태 | 뜻 | 예 |
113
113
  | --- | --- | --- |
114
- | `neutral` (기본) | 상태가 없는 단순한 결과이며 아이콘도 없음. 흰 화면에서도 잘 보이도록 반전색(`tooltip.bg` / `tooltip.fg`)을 씀 | 복사, 이동, 전송 |
114
+ | `neutral` (기본) | 상태가 없는 단순한 결과이며 아이콘도 없음. 흰 화면에서 보이되 상태 토스트보다 튀지 않도록 은은한 바탕(`bg.muted` / `fg.default`, `border.default` 테두리)을 씀 | 복사, 이동, 전송 |
115
115
  | `success` | 요청한 대로 끝남 | 저장, 업로드, 삭제 |
116
116
  | `info` | 방금 일어난 일에 대한 사실이며, 문제가 있다는 뜻은 아님 | 내보내기 완료, 모델 자동 변경 |
117
117
  | `warning` | 끝났지만 예상과 조금 다름 | 일부 파일 건너뜀 |
@@ -332,7 +332,7 @@ export const SCHEMES = {
332
332
  "success-bg": "#E5EDDD",
333
333
  "success-border": "#C5D4B5",
334
334
  "success-fg": "#556344",
335
- "success-solid": "#5E7A37",
335
+ "success-solid": "#30862D",
336
336
  "success-onSolid": "#FFFFFF",
337
337
  "warning-bg": "#FEE9BC",
338
338
  "warning-border": "#F0CF83",
@@ -514,7 +514,7 @@ export const SCHEMES = {
514
514
  "success-bg": "#E5EDDD",
515
515
  "success-border": "#7D8B6E",
516
516
  "success-fg": "#445133",
517
- "success-solid": "#47611D",
517
+ "success-solid": "#036805",
518
518
  "success-onSolid": "#FFFFFF",
519
519
  "warning-bg": "#FEE9BC",
520
520
  "warning-border": "#A28336",
@@ -698,7 +698,7 @@ export const SCHEMES = {
698
698
  "success-bg": "#E5EDDD",
699
699
  "success-border": "#C5D4B5",
700
700
  "success-fg": "#556344",
701
- "success-solid": "#5E7A37",
701
+ "success-solid": "#30862D",
702
702
  "success-onSolid": "#FFFFFF",
703
703
  "warning-bg": "#FEE9BC",
704
704
  "warning-border": "#F0CF83",
@@ -880,7 +880,7 @@ export const SCHEMES = {
880
880
  "success-bg": "#E5EDDD",
881
881
  "success-border": "#7D8B6E",
882
882
  "success-fg": "#445133",
883
- "success-solid": "#47611D",
883
+ "success-solid": "#036805",
884
884
  "success-onSolid": "#FFFFFF",
885
885
  "warning-bg": "#FEE9BC",
886
886
  "warning-border": "#A28336",