@tale-ui/react-styles 0.1.0 → 0.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.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @tale-ui/react-styles
2
+
3
+ CSS rules for `@tale-ui/react` components. Built entirely on `@tale-ui/core` design tokens (`--neutral-*`, `--color-*`, `--space-*`, `--text-*`).
4
+
5
+ `@tale-ui/react` components apply BEM class names automatically (e.g. `tale-button`, `tale-select__popup`). This package provides the CSS rules for those classes.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pnpm add @tale-ui/react-styles
11
+ ```
12
+
13
+ This automatically pulls in `@tale-ui/core` (the design-token layer).
14
+
15
+ ## Usage
16
+
17
+ ### All components (recommended)
18
+
19
+ ```ts
20
+ import '@tale-ui/react-styles'; // tokens + every component stylesheet
21
+ ```
22
+
23
+ ### Per-component (tree-shakeable CSS)
24
+
25
+ ```ts
26
+ import '@tale-ui/core'; // tokens — required when using per-component imports
27
+ import '@tale-ui/react-styles/button';
28
+ import '@tale-ui/react-styles/dialog';
29
+ ```
30
+
31
+ ### Available per-component exports
32
+
33
+ `accordion` · `alert-dialog` · `autocomplete` · `avatar` · `button` · `checkbox` · `collapsible` · `combobox` · `dialog` · `drawer` · `field` · `fieldset` · `form` · `input` · `menu` · `meter` · `navigation-menu` · `number-field` · `popover` · `preview-card` · `progress` · `radio` · `scroll-area` · `select` · `separator` · `slider` · `switch` · `tabs` · `toast` · `toggle` · `toolbar` · `tooltip`
34
+
35
+ ## Architecture
36
+
37
+ ```
38
+ @tale-ui/core (tokens, foundations, layout, themes)
39
+
40
+ _primitives.css (shared declarations for field controls, popups, items, etc.)
41
+
42
+ {component}.css (only the differentiating styles for each component)
43
+ ```
44
+
45
+ ### `_primitives.css`
46
+
47
+ Grouped selectors for declarations that are byte-for-byte identical across multiple components. Five groups:
48
+
49
+ 1. **Field controls** — `.tale-input`, `.tale-select__trigger`, `.tale-combobox__input`, `.tale-autocomplete__input` (shared border, padding, font, focus ring)
50
+ 2. **Dropdown popups** — `.tale-select__popup`, `.tale-combobox__popup`, `.tale-menu__popup`, etc. (shared background, border-radius, shadow, animation)
51
+ 3. **Dropdown items** — `.tale-select__item`, `.tale-menu__item`, etc. (shared layout, hover, disabled states)
52
+ 4. **Group labels** — `.tale-select__group-label`, `.tale-menu__group-label`, etc.
53
+ 5. **Misc** — separators, popup arrows, item indicators
54
+
55
+ ### Individual component files
56
+
57
+ Each file contains only the styles that differ from the shared primitives. For example, `menu.css` adds menu-specific padding and submenu trigger arrow, but inherits popup background, border-radius, and shadow from `_primitives.css`.
58
+
59
+ ## CSS Class Naming
60
+
61
+ ```
62
+ .tale-{component} — root element
63
+ .tale-{component}--{variant} — variant modifier
64
+ .tale-{component}__{element} — child element (BEM)
65
+ .tale-{component}[data-disabled] — state via data attribute
66
+ ```
67
+
68
+ Examples:
69
+ ```css
70
+ .tale-button /* root */
71
+ .tale-button--primary /* variant */
72
+ .tale-button--sm /* size */
73
+ .tale-select__trigger /* child element */
74
+ .tale-select__item[data-highlighted] /* state */
75
+ ```
76
+
77
+ ## Contributing a New Component Style
78
+
79
+ 1. Create `src/{component}.css` with a header comment documenting the component's data attributes and usage
80
+ 2. Check `_primitives.css` — if your component shares declarations with existing groups (field controls, popups, items), add its selector to the relevant group instead of duplicating
81
+ 3. Add `@import './{component}.css'` to `src/index.css` in the appropriate category section
82
+ 4. Add `"./{component}": "./src/{component}.css"` to `package.json` exports
83
+
84
+ ## License
85
+
86
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tale-ui/react-styles",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "CSS styles for @tale-ui/react components, built on @tale-ui/core design tokens.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,7 +46,7 @@
46
46
  "./toolbar": "./src/toolbar.css"
47
47
  },
48
48
  "dependencies": {
49
- "@tale-ui/core": "1.1.6"
49
+ "@tale-ui/core": "1.1.8"
50
50
  },
51
51
  "sideEffects": [
52
52
  "**/*.css"
@@ -0,0 +1,199 @@
1
+ /*
2
+ * _primitives.css — Shared style primitives for @tale-ui/react-styles
3
+ *
4
+ * Grouped selectors for declarations that are byte-for-byte identical across
5
+ * multiple components. Component files retain only their differentiating styles.
6
+ *
7
+ * Imported first in index.css so component files can override via cascade.
8
+ *
9
+ * Groups:
10
+ * 1. Field control — Input, Select trigger, Combobox input, Autocomplete input
11
+ * 2. Dropdown popup — Select, Combobox, Autocomplete, Menu, Popover
12
+ * 3. Dropdown item — Select, Combobox, Autocomplete, Menu (all item variants)
13
+ * 4. Group label — Select, Combobox, Autocomplete, Menu
14
+ * 5. Misc — Separator, Popup arrow, Item indicator
15
+ */
16
+
17
+ /* ─── Focus ring tokens ────────────────────────────────────────────────────── */
18
+
19
+ :root {
20
+ --focus-ring-color: var(--neutral-50);
21
+ --focus-ring-glow: color-mix(in srgb, var(--neutral-60) 15%, transparent);
22
+ }
23
+
24
+ /* ═══════════════════════════════════════════════════════════════════════════
25
+ 1. FIELD CONTROL
26
+ ══════════════════════════════════════════════════════════════════════════ */
27
+
28
+ .tale-input,
29
+ .tale-select__trigger,
30
+ .tale-combobox__input,
31
+ .tale-autocomplete__input {
32
+ min-height: 3.6rem;
33
+ padding: var(--space-3xs) var(--space-xs);
34
+ border: 1px solid var(--neutral-26);
35
+ border-radius: 0.6rem;
36
+ background-color: var(--neutral-10);
37
+ color: var(--neutral-90);
38
+ font-family: var(--body-font-family);
39
+ font-size: var(--text-m-font-size);
40
+ outline: none;
41
+ }
42
+
43
+ /* Focus ring */
44
+ .tale-input:focus,
45
+ .tale-input[data-focused],
46
+ .tale-select__trigger:focus-visible,
47
+ .tale-select__trigger[data-popup-open],
48
+ .tale-combobox__input:focus,
49
+ .tale-combobox__input[data-popup-open],
50
+ .tale-autocomplete__input:focus {
51
+ border-color: var(--focus-ring-color);
52
+ box-shadow: 0 0 0 3px var(--focus-ring-glow);
53
+ }
54
+
55
+ /* Placeholder (select uses .tale-select__value[data-placeholder] instead) */
56
+ .tale-input::placeholder,
57
+ .tale-combobox__input::placeholder,
58
+ .tale-autocomplete__input::placeholder {
59
+ color: var(--neutral-50);
60
+ }
61
+
62
+ /* ═══════════════════════════════════════════════════════════════════════════
63
+ 2. DROPDOWN POPUP
64
+ ══════════════════════════════════════════════════════════════════════════ */
65
+
66
+ .tale-select__popup,
67
+ .tale-combobox__popup,
68
+ .tale-autocomplete__popup,
69
+ .tale-menu__popup,
70
+ .tale-popover__popup {
71
+ background-color: var(--neutral-10);
72
+ border: 1px solid var(--neutral-20);
73
+ border-radius: 0.8rem;
74
+ box-shadow:
75
+ 0 2px 4px rgba(0, 0, 0, 0.06),
76
+ 0 8px 24px rgba(0, 0, 0, 0.08);
77
+ outline: none;
78
+ overflow: hidden;
79
+ transition: opacity 0.15s ease, transform 0.15s ease;
80
+ }
81
+
82
+ /* Enter/leave animation */
83
+ .tale-select__popup[data-starting-style],
84
+ .tale-select__popup[data-ending-style],
85
+ .tale-combobox__popup[data-starting-style],
86
+ .tale-combobox__popup[data-ending-style],
87
+ .tale-autocomplete__popup[data-starting-style],
88
+ .tale-autocomplete__popup[data-ending-style],
89
+ .tale-menu__popup[data-starting-style],
90
+ .tale-menu__popup[data-ending-style],
91
+ .tale-popover__popup[data-starting-style],
92
+ .tale-popover__popup[data-ending-style] {
93
+ opacity: 0;
94
+ transform: scale(0.97);
95
+ }
96
+
97
+ /* ═══════════════════════════════════════════════════════════════════════════
98
+ 3. DROPDOWN ITEM
99
+ ══════════════════════════════════════════════════════════════════════════ */
100
+
101
+ .tale-select__item,
102
+ .tale-combobox__item,
103
+ .tale-autocomplete__item,
104
+ .tale-menu__item,
105
+ .tale-menu__checkbox-item,
106
+ .tale-menu__radio-item,
107
+ .tale-menu__link-item,
108
+ .tale-menu__submenu-trigger {
109
+ box-sizing: border-box;
110
+ display: flex;
111
+ align-items: center;
112
+ gap: var(--space-2xs);
113
+ padding: var(--space-2xs) var(--space-xs);
114
+ border-radius: 0.5rem;
115
+ color: var(--neutral-80);
116
+ font-family: var(--body-font-family);
117
+ font-size: var(--text-m-font-size);
118
+ cursor: pointer;
119
+ outline: none;
120
+ transition: background-color 0.1s ease, color 0.1s ease;
121
+ user-select: none;
122
+ }
123
+
124
+ /* Highlighted */
125
+ .tale-select__item[data-highlighted],
126
+ .tale-combobox__item[data-highlighted],
127
+ .tale-autocomplete__item[data-highlighted],
128
+ .tale-menu__item[data-highlighted],
129
+ .tale-menu__checkbox-item[data-highlighted],
130
+ .tale-menu__radio-item[data-highlighted],
131
+ .tale-menu__link-item[data-highlighted],
132
+ .tale-menu__submenu-trigger[data-highlighted] {
133
+ background-color: var(--neutral-14);
134
+ color: var(--neutral-90);
135
+ }
136
+
137
+ /* Disabled */
138
+ .tale-select__item[data-disabled],
139
+ .tale-combobox__item[data-disabled],
140
+ .tale-autocomplete__item[data-disabled],
141
+ .tale-menu__item[data-disabled],
142
+ .tale-menu__checkbox-item[data-disabled],
143
+ .tale-menu__radio-item[data-disabled],
144
+ .tale-menu__link-item[data-disabled],
145
+ .tale-menu__submenu-trigger[data-disabled] {
146
+ opacity: 0.45;
147
+ cursor: not-allowed;
148
+ pointer-events: none;
149
+ }
150
+
151
+ /* ═══════════════════════════════════════════════════════════════════════════
152
+ 4. GROUP LABEL
153
+ ══════════════════════════════════════════════════════════════════════════ */
154
+
155
+ .tale-select__group-label,
156
+ .tale-combobox__group-label,
157
+ .tale-autocomplete__group-label,
158
+ .tale-menu__group-label {
159
+ padding: var(--space-4xs) var(--space-xs);
160
+ color: var(--neutral-50);
161
+ font-family: var(--label-font-family);
162
+ font-size: var(--label-s-font-size);
163
+ font-weight: var(--label-font-weight);
164
+ text-transform: uppercase;
165
+ letter-spacing: 0.05em;
166
+ cursor: default;
167
+ }
168
+
169
+ /* ═══════════════════════════════════════════════════════════════════════════
170
+ 5. MISC
171
+ ══════════════════════════════════════════════════════════════════════════ */
172
+
173
+ /* Separator */
174
+ .tale-select__separator,
175
+ .tale-menu__separator {
176
+ height: 1px;
177
+ background-color: var(--neutral-18);
178
+ margin: var(--space-4xs) 0;
179
+ }
180
+
181
+ /* Popup arrow */
182
+ .tale-menu__arrow,
183
+ .tale-popover__arrow {
184
+ width: 1rem;
185
+ height: 0.5rem;
186
+ fill: var(--neutral-10);
187
+ stroke: var(--neutral-20);
188
+ stroke-width: 1;
189
+ }
190
+
191
+ /* Item indicator (select + combobox — menu's indicator omits margin-left: auto) */
192
+ .tale-select__item-indicator,
193
+ .tale-combobox__item-indicator {
194
+ width: 1.4rem;
195
+ height: 1.4rem;
196
+ flex-shrink: 0;
197
+ color: var(--color-60);
198
+ margin-left: auto;
199
+ }
package/src/accordion.css CHANGED
@@ -3,13 +3,14 @@
3
3
  *
4
4
  * Styled with @tale-ui/core design tokens.
5
5
  * Base-ui Accordion exposes:
6
- * Root: [data-disabled] [data-orientation]
7
- * Item: [data-index] [data-disabled] [data-open]
6
+ * Root: [data-disabled] [data-orientation]
7
+ * Item: [data-index] [data-disabled] [data-open]
8
+ * Panel: [data-open] [data-closed] [data-starting-style] [data-ending-style]
8
9
  *
9
10
  * Usage:
10
11
  * <Accordion.Root className="tale-accordion">
11
12
  * <Accordion.Item className="tale-accordion__item">
12
- * <Accordion.Header>
13
+ * <Accordion.Header className="tale-accordion__header">
13
14
  * <Accordion.Trigger className="tale-accordion__trigger">Title</Accordion.Trigger>
14
15
  * </Accordion.Header>
15
16
  * <Accordion.Panel className="tale-accordion__panel">Content</Accordion.Panel>
@@ -36,6 +37,12 @@
36
37
  border-bottom: none;
37
38
  }
38
39
 
40
+ /* ─── Header ──────────────────────────────────────────────────────────────── */
41
+
42
+ .tale-accordion__header {
43
+ margin: 0;
44
+ }
45
+
39
46
  /* ─── Trigger ──────────────────────────────────────────────────────────────── */
40
47
 
41
48
  .tale-accordion__trigger {
@@ -43,7 +50,7 @@
43
50
  align-items: center;
44
51
  justify-content: space-between;
45
52
  width: 100%;
46
- padding: var(--space-s) var(--space-m);
53
+ padding: var(--space-xs) var(--space-m);
47
54
  background-color: transparent;
48
55
  border: none;
49
56
  color: var(--neutral-90);
@@ -89,13 +96,22 @@
89
96
 
90
97
  .tale-accordion__panel {
91
98
  overflow: hidden;
92
- padding: 0 var(--space-m) var(--space-s);
99
+ height: var(--accordion-panel-height);
100
+ padding: 0 var(--space-m);
93
101
  color: var(--neutral-80);
94
- font-family: var(--body-font-family);
102
+ font-family: var(--text-font-family);
95
103
  font-size: var(--text-m-font-size);
96
104
  line-height: 1.6;
105
+ transition: height 0.6s ease;
106
+ }
107
+
108
+ .tale-accordion__panel::after {
109
+ content: '';
110
+ display: block;
111
+ height: var(--space-xs);
97
112
  }
98
113
 
99
- .tale-accordion__panel:not([data-open]) {
100
- display: none;
114
+ .tale-accordion__panel[data-starting-style],
115
+ .tale-accordion__panel[data-ending-style] {
116
+ height: 0;
101
117
  }
@@ -56,10 +56,10 @@
56
56
  box-shadow:
57
57
  0 4px 6px -1px rgba(0, 0, 0, 0.1),
58
58
  0 20px 40px -4px rgba(0, 0, 0, 0.15);
59
- padding: var(--space-xl);
59
+ padding: var(--space-s);
60
60
  display: flex;
61
61
  flex-direction: column;
62
- gap: var(--space-m);
62
+ gap: var(--space-xs);
63
63
  outline: none;
64
64
  transition: opacity 0.2s ease, transform 0.2s ease;
65
65
  }
@@ -16,6 +16,9 @@
16
16
  * </Autocomplete.Positioner>
17
17
  * </Autocomplete.Portal>
18
18
  * </Autocomplete.Root>
19
+ *
20
+ * Shared field-control, popup, item, group-label primitives
21
+ * are defined in _primitives.css.
19
22
  */
20
23
 
21
24
  /* ─── Input ────────────────────────────────────────────────────────────────── */
@@ -23,86 +26,29 @@
23
26
  .tale-autocomplete__input {
24
27
  display: block;
25
28
  width: 100%;
26
- min-height: 3.6rem;
27
- padding: var(--space-3xs) var(--space-xs);
28
- border: 1px solid var(--neutral-26);
29
- border-radius: 0.6rem;
30
- background-color: var(--neutral-10);
31
- color: var(--neutral-90);
32
- font-family: var(--body-font-family);
33
- font-size: var(--text-m-font-size);
34
- outline: none;
35
29
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
36
30
  }
37
31
 
38
- .tale-autocomplete__input::placeholder {
39
- color: var(--neutral-50);
40
- }
41
-
42
32
  .tale-autocomplete__input:hover {
43
33
  border-color: var(--neutral-40);
44
34
  }
45
35
 
46
- .tale-autocomplete__input:focus {
47
- border-color: var(--color-60);
48
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-60) 20%, transparent);
49
- }
50
-
51
36
  /* ─── Popup ────────────────────────────────────────────────────────────────── */
52
37
 
53
38
  .tale-autocomplete__popup {
54
- background-color: var(--neutral-10);
55
- border: 1px solid var(--neutral-20);
56
- border-radius: 0.8rem;
57
- box-shadow:
58
- 0 2px 4px rgba(0, 0, 0, 0.06),
59
- 0 8px 24px rgba(0, 0, 0, 0.08);
60
39
  padding: var(--space-4xs);
61
- outline: none;
40
+ min-width: var(--anchor-width);
62
41
  max-height: 28rem;
63
42
  overflow-y: auto;
64
- transition: opacity 0.15s ease, transform 0.15s ease;
65
- }
66
-
67
- .tale-autocomplete__popup[data-starting-style],
68
- .tale-autocomplete__popup[data-ending-style] {
69
- opacity: 0;
70
- transform: scale(0.97);
71
43
  }
72
44
 
73
45
  /* ─── Item ─────────────────────────────────────────────────────────────────── */
74
46
 
75
- .tale-autocomplete__item {
76
- display: flex;
77
- align-items: center;
78
- gap: var(--space-2xs);
79
- padding: var(--space-2xs) var(--space-xs);
80
- border-radius: 0.5rem;
81
- color: var(--neutral-80);
82
- font-family: var(--body-font-family);
83
- font-size: var(--text-m-font-size);
84
- cursor: pointer;
85
- outline: none;
86
- transition: background-color 0.1s ease, color 0.1s ease;
87
- user-select: none;
88
- }
89
-
90
- .tale-autocomplete__item[data-highlighted] {
91
- background-color: var(--neutral-14);
92
- color: var(--neutral-90);
93
- }
94
-
95
47
  .tale-autocomplete__item[data-selected] {
96
48
  color: var(--color-60);
97
49
  font-weight: var(--label-font-weight);
98
50
  }
99
51
 
100
- .tale-autocomplete__item[data-disabled] {
101
- opacity: 0.45;
102
- cursor: not-allowed;
103
- pointer-events: none;
104
- }
105
-
106
52
  /* ─── Empty state ──────────────────────────────────────────────────────────── */
107
53
 
108
54
  .tale-autocomplete__empty {
@@ -113,16 +59,3 @@
113
59
  font-size: var(--text-m-font-size);
114
60
  cursor: default;
115
61
  }
116
-
117
- /* ─── Group label ──────────────────────────────────────────────────────────── */
118
-
119
- .tale-autocomplete__group-label {
120
- padding: var(--space-4xs) var(--space-xs);
121
- color: var(--neutral-50);
122
- font-family: var(--label-font-family);
123
- font-size: var(--label-s-font-size);
124
- font-weight: var(--label-font-weight);
125
- text-transform: uppercase;
126
- letter-spacing: 0.05em;
127
- cursor: default;
128
- }
package/src/button.css CHANGED
@@ -62,7 +62,7 @@
62
62
 
63
63
  .tale-button--primary {
64
64
  background-color: var(--color-60);
65
- color: var(--neutral-100);
65
+ color: var(--color-60-fg);
66
66
  border-color: transparent;
67
67
  }
68
68
 
@@ -111,17 +111,17 @@
111
111
  /* ─── Danger variant — destructive actions ────────────────────────────────── */
112
112
 
113
113
  .tale-button--danger {
114
- background-color: var(--red-60);
115
- color: #fff;
114
+ background-color: var(--error-60);
115
+ color: var(--error-60-fg);
116
116
  border-color: transparent;
117
117
  }
118
118
 
119
119
  .tale-button--danger:hover:not([data-disabled]) {
120
- background-color: var(--red-50);
120
+ background-color: var(--error-50);
121
121
  }
122
122
 
123
123
  .tale-button--danger:active:not([data-disabled]) {
124
- background-color: var(--red-40);
124
+ background-color: var(--error-40);
125
125
  }
126
126
 
127
127
  /* ─── Size modifiers ──────────────────────────────────────────────────────── */
package/src/checkbox.css CHANGED
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .tale-checkbox:focus-visible {
40
- box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--color-60);
40
+ box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--focus-ring-color);
41
41
  }
42
42
 
43
43
  /* ─── Checked state ───────────────────────────────────────────────────────── */
@@ -88,7 +88,7 @@
88
88
  justify-content: center;
89
89
  width: 1.2rem;
90
90
  height: 1.2rem;
91
- color: var(--neutral-100);
91
+ color: var(--color-60-fg);
92
92
  pointer-events: none;
93
93
  }
94
94
 
@@ -52,13 +52,17 @@
52
52
 
53
53
  .tale-collapsible__panel {
54
54
  overflow: hidden;
55
+ height: var(--collapsible-panel-height);
55
56
  color: var(--neutral-80);
56
- font-family: var(--body-font-family);
57
+ font-family: var(--text-font-family);
57
58
  font-size: var(--text-m-font-size);
58
59
  line-height: 1.6;
59
60
  margin-top: var(--space-3xs);
61
+ transition: height 0.6s ease, opacity 0.2s ease;
60
62
  }
61
63
 
62
- .tale-collapsible__panel[data-closed]:not([data-starting-style]) {
63
- display: none;
64
+ .tale-collapsible__panel[data-starting-style],
65
+ .tale-collapsible__panel[data-ending-style] {
66
+ height: 0;
67
+ opacity: 0;
64
68
  }
package/src/combobox.css CHANGED
@@ -23,6 +23,9 @@
23
23
  * </Combobox.Positioner>
24
24
  * </Combobox.Portal>
25
25
  * </Combobox.Root>
26
+ *
27
+ * Shared field-control, popup, item, group-label, item-indicator primitives
28
+ * are defined in _primitives.css.
26
29
  */
27
30
 
28
31
  /* ─── Input ────────────────────────────────────────────────────────────────── */
@@ -30,97 +33,29 @@
30
33
  .tale-combobox__input {
31
34
  display: block;
32
35
  width: 100%;
33
- min-height: 3.6rem;
34
- padding: var(--space-3xs) var(--space-xs);
35
- border: 1px solid var(--neutral-26);
36
- border-radius: 0.6rem;
37
- background-color: var(--neutral-10);
38
- color: var(--neutral-90);
39
- font-family: var(--body-font-family);
40
- font-size: var(--text-m-font-size);
41
- outline: none;
42
36
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
43
37
  }
44
38
 
45
- .tale-combobox__input::placeholder {
46
- color: var(--neutral-50);
47
- }
48
-
49
39
  .tale-combobox__input:hover {
50
40
  border-color: var(--neutral-40);
51
41
  }
52
42
 
53
- .tale-combobox__input:focus,
54
- .tale-combobox__input[data-popup-open] {
55
- border-color: var(--color-60);
56
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-60) 20%, transparent);
57
- }
58
-
59
43
  /* ─── Popup ────────────────────────────────────────────────────────────────── */
60
44
 
61
45
  .tale-combobox__popup {
62
- background-color: var(--neutral-10);
63
- border: 1px solid var(--neutral-20);
64
- border-radius: 0.8rem;
65
- box-shadow:
66
- 0 2px 4px rgba(0, 0, 0, 0.06),
67
- 0 8px 24px rgba(0, 0, 0, 0.08);
68
46
  padding: var(--space-4xs);
69
- outline: none;
47
+ min-width: var(--anchor-width);
70
48
  max-height: 28rem;
71
49
  overflow-y: auto;
72
- transition: opacity 0.15s ease, transform 0.15s ease;
73
- }
74
-
75
- .tale-combobox__popup[data-starting-style],
76
- .tale-combobox__popup[data-ending-style] {
77
- opacity: 0;
78
- transform: scale(0.97);
79
50
  }
80
51
 
81
52
  /* ─── Item ─────────────────────────────────────────────────────────────────── */
82
53
 
83
- .tale-combobox__item {
84
- display: flex;
85
- align-items: center;
86
- gap: var(--space-2xs);
87
- padding: var(--space-2xs) var(--space-xs);
88
- border-radius: 0.5rem;
89
- color: var(--neutral-80);
90
- font-family: var(--body-font-family);
91
- font-size: var(--text-m-font-size);
92
- cursor: pointer;
93
- outline: none;
94
- transition: background-color 0.1s ease, color 0.1s ease;
95
- user-select: none;
96
- }
97
-
98
- .tale-combobox__item[data-highlighted] {
99
- background-color: var(--neutral-14);
100
- color: var(--neutral-90);
101
- }
102
-
103
54
  .tale-combobox__item[data-selected] {
104
55
  color: var(--color-60);
105
56
  font-weight: var(--label-font-weight);
106
57
  }
107
58
 
108
- .tale-combobox__item[data-disabled] {
109
- opacity: 0.45;
110
- cursor: not-allowed;
111
- pointer-events: none;
112
- }
113
-
114
- /* ─── Item indicator ───────────────────────────────────────────────────────── */
115
-
116
- .tale-combobox__item-indicator {
117
- width: 1.4rem;
118
- height: 1.4rem;
119
- flex-shrink: 0;
120
- color: var(--color-60);
121
- margin-left: auto;
122
- }
123
-
124
59
  /* ─── Empty state ──────────────────────────────────────────────────────────── */
125
60
 
126
61
  .tale-combobox__empty {
@@ -132,19 +67,6 @@
132
67
  cursor: default;
133
68
  }
134
69
 
135
- /* ─── Group label ──────────────────────────────────────────────────────────── */
136
-
137
- .tale-combobox__group-label {
138
- padding: var(--space-4xs) var(--space-xs);
139
- color: var(--neutral-50);
140
- font-family: var(--label-font-family);
141
- font-size: var(--label-s-font-size);
142
- font-weight: var(--label-font-weight);
143
- text-transform: uppercase;
144
- letter-spacing: 0.05em;
145
- cursor: default;
146
- }
147
-
148
70
  /* ─── Chips (multi-select) ─────────────────────────────────────────────────── */
149
71
 
150
72
  .tale-combobox__chips {
package/src/dialog.css CHANGED
@@ -9,13 +9,17 @@
9
9
  *
10
10
  * Usage:
11
11
  * <Dialog.Root>
12
- * <Dialog.Trigger className="tale-button tale-button--primary">Open</Dialog.Trigger>
12
+ * <Dialog.Trigger render={<Button variant="primary">Open</Button>} />
13
13
  * <Dialog.Portal>
14
- * <Dialog.Backdrop className="tale-dialog__backdrop" />
15
- * <Dialog.Popup className="tale-dialog__popup">
16
- * <Dialog.Title className="tale-dialog__title">Title</Dialog.Title>
17
- * <Dialog.Description className="tale-dialog__description">…</Dialog.Description>
18
- * <Dialog.Close className="tale-button tale-button--neutral">Close</Dialog.Close>
14
+ * <Dialog.Backdrop />
15
+ * <Dialog.Popup>
16
+ * <Dialog.Close className="tale-dialog__close" aria-label="Close"><XIcon /></Dialog.Close>
17
+ * <Dialog.Title>Title</Dialog.Title>
18
+ * <Dialog.Description>…</Dialog.Description>
19
+ * <div className="tale-dialog__actions">
20
+ * <Dialog.Close render={<Button variant="neutral">Cancel</Button>} />
21
+ * <Dialog.Close render={<Button variant="primary">Confirm</Button>} />
22
+ * </div>
19
23
  * </Dialog.Popup>
20
24
  * </Dialog.Portal>
21
25
  * </Dialog.Root>
@@ -53,10 +57,10 @@
53
57
  box-shadow:
54
58
  0 4px 6px -1px rgba(0, 0, 0, 0.1),
55
59
  0 20px 40px -4px rgba(0, 0, 0, 0.15);
56
- padding: var(--space-xl);
60
+ padding: var(--space-s);
57
61
  display: flex;
58
62
  flex-direction: column;
59
- gap: var(--space-m);
63
+ gap: var(--space-xs);
60
64
  outline: none;
61
65
  transition: opacity 0.2s ease, transform 0.2s ease;
62
66
  }
package/src/index.css CHANGED
@@ -14,6 +14,7 @@
14
14
  */
15
15
 
16
16
  @import '@tale-ui/core';
17
+ @import './_primitives.css';
17
18
 
18
19
  /* ─── Form controls ─────────────────────────────────────────────────────────── */
19
20
  @import './button.css';
package/src/input.css CHANGED
@@ -8,6 +8,9 @@
8
8
  *
9
9
  * Usage:
10
10
  * <Input className="tale-input" />
11
+ *
12
+ * Shared field-control base (border, bg, font, focus ring, placeholder)
13
+ * is defined in _primitives.css.
11
14
  */
12
15
 
13
16
  /* ─── Base ─────────────────────────────────────────────────────────────────── */
@@ -15,34 +18,13 @@
15
18
  .tale-input {
16
19
  display: block;
17
20
  width: 100%;
18
- min-height: 3.6rem;
19
- padding: var(--space-3xs) var(--space-xs);
20
- border: 1px solid var(--neutral-26);
21
- border-radius: 0.6rem;
22
- background-color: var(--neutral-10);
23
- color: var(--neutral-90);
24
- font-family: var(--body-font-family);
25
- font-size: var(--text-m-font-size);
26
21
  line-height: 1.5;
27
- outline: none;
28
22
  transition:
29
23
  border-color 0.15s ease,
30
24
  box-shadow 0.15s ease,
31
25
  background-color 0.15s ease;
32
26
  }
33
27
 
34
- .tale-input::placeholder {
35
- color: var(--neutral-50);
36
- }
37
-
38
- /* ─── Focus ───────────────────────────────────────────────────────────────── */
39
-
40
- .tale-input:focus,
41
- .tale-input[data-focused] {
42
- border-color: var(--color-60);
43
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-60) 20%, transparent);
44
- }
45
-
46
28
  /* ─── Hover ───────────────────────────────────────────────────────────────── */
47
29
 
48
30
  .tale-input:hover:not(:focus):not([data-disabled]):not([data-invalid]) {
package/src/menu.css CHANGED
@@ -23,49 +23,27 @@
23
23
  * </Menu.Positioner>
24
24
  * </Menu.Portal>
25
25
  * </Menu.Root>
26
+ *
27
+ * Shared popup, item, group-label, separator, arrow primitives
28
+ * are defined in _primitives.css.
26
29
  */
27
30
 
28
31
  /* ─── Popup ────────────────────────────────────────────────────────────────── */
29
32
 
30
33
  .tale-menu__popup {
31
- background-color: var(--neutral-10);
32
- border: 1px solid var(--neutral-20);
33
- border-radius: 0.8rem;
34
- box-shadow:
35
- 0 2px 4px rgba(0, 0, 0, 0.06),
36
- 0 8px 24px rgba(0, 0, 0, 0.08);
37
34
  padding: var(--space-4xs);
38
- outline: none;
39
35
  min-width: 16rem;
40
- max-width: 28rem;
41
- transition: opacity 0.15s ease, transform 0.15s ease;
36
+ max-width: 32rem;
37
+ width: max-content;
42
38
  }
43
39
 
44
- .tale-menu__popup[data-starting-style],
45
- .tale-menu__popup[data-ending-style] {
46
- opacity: 0;
47
- transform: scale(0.97);
48
- }
49
-
50
- /* ─── Item (base styles shared by Item, CheckboxItem, RadioItem) ────────────── */
40
+ /* ─── Item (button/anchor resets not shared with select/combobox items) ─────── */
51
41
 
52
42
  .tale-menu__item,
53
43
  .tale-menu__checkbox-item,
54
44
  .tale-menu__radio-item,
55
45
  .tale-menu__link-item,
56
46
  .tale-menu__submenu-trigger {
57
- display: flex;
58
- align-items: center;
59
- gap: var(--space-2xs);
60
- padding: var(--space-2xs) var(--space-xs);
61
- border-radius: 0.5rem;
62
- color: var(--neutral-80);
63
- font-family: var(--body-font-family);
64
- font-size: var(--text-m-font-size);
65
- cursor: pointer;
66
- outline: none;
67
- transition: background-color 0.1s ease, color 0.1s ease;
68
- user-select: none;
69
47
  border: none;
70
48
  background: none;
71
49
  width: 100%;
@@ -73,25 +51,6 @@
73
51
  text-decoration: none;
74
52
  }
75
53
 
76
- .tale-menu__item[data-highlighted],
77
- .tale-menu__checkbox-item[data-highlighted],
78
- .tale-menu__radio-item[data-highlighted],
79
- .tale-menu__link-item[data-highlighted],
80
- .tale-menu__submenu-trigger[data-highlighted] {
81
- background-color: var(--neutral-14);
82
- color: var(--neutral-90);
83
- }
84
-
85
- .tale-menu__item[data-disabled],
86
- .tale-menu__checkbox-item[data-disabled],
87
- .tale-menu__radio-item[data-disabled],
88
- .tale-menu__link-item[data-disabled],
89
- .tale-menu__submenu-trigger[data-disabled] {
90
- opacity: 0.45;
91
- cursor: not-allowed;
92
- pointer-events: none;
93
- }
94
-
95
54
  /* ─── Checkbox/Radio item indicator ────────────────────────────────────────── */
96
55
 
97
56
  .tale-menu__item-indicator {
@@ -109,37 +68,6 @@
109
68
  color: var(--neutral-50);
110
69
  }
111
70
 
112
- /* ─── Group label ──────────────────────────────────────────────────────────── */
113
-
114
- .tale-menu__group-label {
115
- padding: var(--space-4xs) var(--space-xs);
116
- color: var(--neutral-50);
117
- font-family: var(--label-font-family);
118
- font-size: var(--label-s-font-size);
119
- font-weight: var(--label-font-weight);
120
- text-transform: uppercase;
121
- letter-spacing: 0.05em;
122
- cursor: default;
123
- }
124
-
125
- /* ─── Separator ────────────────────────────────────────────────────────────── */
126
-
127
- .tale-menu__separator {
128
- height: 1px;
129
- background-color: var(--neutral-18);
130
- margin: var(--space-4xs) 0;
131
- }
132
-
133
- /* ─── Arrow ────────────────────────────────────────────────────────────────── */
134
-
135
- .tale-menu__arrow {
136
- width: 1rem;
137
- height: 0.5rem;
138
- fill: var(--neutral-10);
139
- stroke: var(--neutral-20);
140
- stroke-width: 1;
141
- }
142
-
143
71
  /* ─── Menubar — horizontal trigger bar ─────────────────────────────────────── */
144
72
 
145
73
  .tale-menubar {
@@ -37,8 +37,8 @@
37
37
  }
38
38
 
39
39
  .tale-number-field__group:focus-within {
40
- border-color: var(--color-60);
41
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-60) 20%, transparent);
40
+ border-color: var(--focus-ring-color);
41
+ box-shadow: 0 0 0 3px var(--focus-ring-glow);
42
42
  }
43
43
 
44
44
  .tale-number-field__group:hover:not(:focus-within) {
@@ -106,7 +106,7 @@
106
106
 
107
107
  .tale-number-field__decrement:focus-visible,
108
108
  .tale-number-field__increment:focus-visible {
109
- box-shadow: inset 0 0 0 2px var(--color-60);
109
+ box-shadow: inset 0 0 0 2px var(--focus-ring-color);
110
110
  }
111
111
 
112
112
  /* ─── Disabled state ──────────────────────────────────────────────────────── */
package/src/popover.css CHANGED
@@ -19,28 +19,16 @@
19
19
  * </Popover.Positioner>
20
20
  * </Popover.Portal>
21
21
  * </Popover.Root>
22
+ *
23
+ * Shared popup base, popup animation, and arrow are defined in _primitives.css.
22
24
  */
23
25
 
24
26
  /* ─── Popup ────────────────────────────────────────────────────────────────── */
25
27
 
26
28
  .tale-popover__popup {
27
29
  position: relative;
28
- background-color: var(--neutral-10);
29
- border: 1px solid var(--neutral-20);
30
- border-radius: 0.8rem;
31
- box-shadow:
32
- 0 2px 4px rgba(0, 0, 0, 0.06),
33
- 0 8px 24px rgba(0, 0, 0, 0.08);
34
- padding: var(--space-m);
30
+ padding: var(--space-xs);
35
31
  max-width: 32rem;
36
- outline: none;
37
- transition: opacity 0.15s ease, transform 0.15s ease;
38
- }
39
-
40
- .tale-popover__popup[data-starting-style],
41
- .tale-popover__popup[data-ending-style] {
42
- opacity: 0;
43
- transform: scale(0.97);
44
32
  }
45
33
 
46
34
  /* ─── Title ────────────────────────────────────────────────────────────────── */
@@ -92,13 +80,3 @@
92
80
  .tale-popover__close:focus-visible {
93
81
  box-shadow: 0 0 0 2px var(--color-60);
94
82
  }
95
-
96
- /* ─── Arrow ────────────────────────────────────────────────────────────────── */
97
-
98
- .tale-popover__arrow {
99
- width: 1rem;
100
- height: 0.5rem;
101
- fill: var(--neutral-10);
102
- stroke: var(--neutral-20);
103
- stroke-width: 1;
104
- }
package/src/radio.css CHANGED
@@ -35,7 +35,7 @@
35
35
  }
36
36
 
37
37
  .tale-radio:focus-visible {
38
- box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--color-60);
38
+ box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--focus-ring-color);
39
39
  }
40
40
 
41
41
  /* ─── Checked state ───────────────────────────────────────────────────────── */
package/src/select.css CHANGED
@@ -25,6 +25,9 @@
25
25
  * </Select.Positioner>
26
26
  * </Select.Portal>
27
27
  * </Select.Root>
28
+ *
29
+ * Shared field-control, popup, item, group-label, separator, item-indicator
30
+ * primitives are defined in _primitives.css.
28
31
  */
29
32
 
30
33
  /* ─── Trigger ──────────────────────────────────────────────────────────────── */
@@ -35,16 +38,7 @@
35
38
  justify-content: space-between;
36
39
  gap: var(--space-xs);
37
40
  min-width: 16rem;
38
- min-height: 3.6rem;
39
- padding: var(--space-3xs) var(--space-xs);
40
- border: 1px solid var(--neutral-26);
41
- border-radius: 0.6rem;
42
- background-color: var(--neutral-10);
43
- color: var(--neutral-90);
44
- font-family: var(--body-font-family);
45
- font-size: var(--text-m-font-size);
46
41
  cursor: pointer;
47
- outline: none;
48
42
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
49
43
  }
50
44
 
@@ -52,12 +46,6 @@
52
46
  border-color: var(--neutral-40);
53
47
  }
54
48
 
55
- .tale-select__trigger:focus-visible,
56
- .tale-select__trigger[data-popup-open] {
57
- border-color: var(--color-60);
58
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-60) 20%, transparent);
59
- }
60
-
61
49
  .tale-select__trigger[data-disabled] {
62
50
  opacity: 0.45;
63
51
  cursor: not-allowed;
@@ -87,25 +75,11 @@
87
75
  /* ─── Popup ────────────────────────────────────────────────────────────────── */
88
76
 
89
77
  .tale-select__popup {
90
- background-color: var(--neutral-10);
91
- border: 1px solid var(--neutral-20);
92
- border-radius: 0.8rem;
93
- box-shadow:
94
- 0 2px 4px rgba(0, 0, 0, 0.06),
95
- 0 8px 24px rgba(0, 0, 0, 0.08);
96
- outline: none;
97
- overflow: hidden;
98
- min-width: var(--available-width, 16rem);
78
+ padding: var(--space-4xs);
79
+ min-width: var(--anchor-width, 16rem);
99
80
  max-height: 28rem;
100
81
  overflow-y: auto;
101
- padding: var(--space-4xs);
102
- transition: opacity 0.15s ease, transform 0.15s ease;
103
- }
104
-
105
- .tale-select__popup[data-starting-style],
106
- .tale-select__popup[data-ending-style] {
107
- opacity: 0;
108
- transform: scale(0.97);
82
+ overflow: hidden;
109
83
  }
110
84
 
111
85
  /* ─── List ─────────────────────────────────────────────────────────────────── */
@@ -118,70 +92,13 @@
118
92
 
119
93
  /* ─── Item ─────────────────────────────────────────────────────────────────── */
120
94
 
121
- .tale-select__item {
122
- display: flex;
123
- align-items: center;
124
- gap: var(--space-2xs);
125
- padding: var(--space-2xs) var(--space-xs);
126
- border-radius: 0.5rem;
127
- color: var(--neutral-80);
128
- font-family: var(--body-font-family);
129
- font-size: var(--text-m-font-size);
130
- cursor: pointer;
131
- outline: none;
132
- transition: background-color 0.1s ease, color 0.1s ease;
133
- user-select: none;
134
- }
135
-
136
- .tale-select__item[data-highlighted] {
137
- background-color: var(--neutral-14);
138
- color: var(--neutral-90);
139
- }
140
-
141
95
  .tale-select__item[data-selected] {
142
96
  color: var(--color-60);
143
97
  font-weight: var(--label-font-weight);
144
98
  }
145
99
 
146
- .tale-select__item[data-disabled] {
147
- opacity: 0.45;
148
- cursor: not-allowed;
149
- pointer-events: none;
150
- }
151
-
152
100
  /* ─── Item text ────────────────────────────────────────────────────────────── */
153
101
 
154
102
  .tale-select__item-text {
155
103
  flex: 1;
156
104
  }
157
-
158
- /* ─── Item indicator (checkmark) ───────────────────────────────────────────── */
159
-
160
- .tale-select__item-indicator {
161
- width: 1.4rem;
162
- height: 1.4rem;
163
- flex-shrink: 0;
164
- color: var(--color-60);
165
- margin-left: auto;
166
- }
167
-
168
- /* ─── Group label ──────────────────────────────────────────────────────────── */
169
-
170
- .tale-select__group-label {
171
- padding: var(--space-4xs) var(--space-xs);
172
- color: var(--neutral-50);
173
- font-family: var(--label-font-family);
174
- font-size: var(--label-s-font-size);
175
- font-weight: var(--label-font-weight);
176
- text-transform: uppercase;
177
- letter-spacing: 0.05em;
178
- cursor: default;
179
- }
180
-
181
- /* ─── Separator ────────────────────────────────────────────────────────────── */
182
-
183
- .tale-select__separator {
184
- height: 1px;
185
- background-color: var(--neutral-18);
186
- margin: var(--space-4xs) 0;
187
- }
package/src/slider.css CHANGED
@@ -59,7 +59,6 @@
59
59
  height: 0.4rem;
60
60
  border-radius: 9999px;
61
61
  background-color: var(--neutral-22);
62
- overflow: hidden;
63
62
  }
64
63
 
65
64
  .tale-slider[data-orientation="vertical"] .tale-slider__track {
@@ -98,33 +97,21 @@
98
97
  width: 1.8rem;
99
98
  height: 1.8rem;
100
99
  border-radius: 50%;
101
- background-color: var(--neutral-100);
100
+ background-color: var(--neutral-10);
102
101
  border: 2px solid var(--color-60);
103
102
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
104
- top: 50%;
105
- transform: translateY(-50%);
106
103
  outline: none;
107
- transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
104
+ transition: box-shadow 0.15s ease, border-color 0.15s ease, scale 0.1s ease;
108
105
  cursor: grab;
109
106
  }
110
107
 
111
108
  .tale-slider__thumb:focus-visible {
112
- box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--color-60);
109
+ box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--focus-ring-color);
113
110
  }
114
111
 
115
112
  .tale-slider__thumb[data-dragging] {
116
113
  cursor: grabbing;
117
- transform: translateY(-50%) scale(1.15);
118
- }
119
-
120
- .tale-slider[data-orientation="vertical"] .tale-slider__thumb {
121
- left: 50%;
122
- top: auto;
123
- transform: translateX(-50%);
124
- }
125
-
126
- .tale-slider[data-orientation="vertical"] .tale-slider__thumb[data-dragging] {
127
- transform: translateX(-50%) scale(1.15);
114
+ scale: 1.15;
128
115
  }
129
116
 
130
117
  /* ─── Disabled state ──────────────────────────────────────────────────────── */
package/src/switch.css CHANGED
@@ -17,14 +17,19 @@
17
17
  /* ─── Root — pill-shaped track ────────────────────────────────────────────── */
18
18
 
19
19
  .tale-switch {
20
+ --tale-switch-track-width: 4rem;
21
+ --tale-switch-track-height: 2.2rem;
22
+ --tale-switch-thumb-size: 1.4rem;
23
+ --tale-switch-thumb-offset: 0.2rem;
24
+
25
+ position: relative;
20
26
  display: inline-flex;
21
- align-items: center;
22
- width: 4rem;
23
- height: 2.2rem;
27
+ width: var(--tale-switch-track-width);
28
+ height: var(--tale-switch-track-height);
24
29
  border-radius: 9999px;
25
30
  border: 1.5px solid var(--neutral-30);
26
31
  background-color: var(--neutral-20);
27
- padding: 0 0.2rem;
32
+ padding: 0;
28
33
  cursor: pointer;
29
34
  outline: none;
30
35
  transition:
@@ -35,7 +40,7 @@
35
40
  }
36
41
 
37
42
  .tale-switch:focus-visible {
38
- box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--color-60);
43
+ box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--focus-ring-color);
39
44
  }
40
45
 
41
46
  /* ─── Checked (on) state ──────────────────────────────────────────────────── */
@@ -74,17 +79,26 @@
74
79
  /* ─── Thumb — sliding circle ──────────────────────────────────────────────── */
75
80
 
76
81
  .tale-switch__thumb {
77
- width: 1.4rem;
78
- height: 1.4rem;
82
+ position: absolute;
83
+ inset-inline-start: var(--tale-switch-thumb-offset);
84
+ inset-block-start: 50%;
85
+ width: var(--tale-switch-thumb-size);
86
+ height: var(--tale-switch-thumb-size);
79
87
  border-radius: 50%;
80
88
  background-color: var(--neutral-80);
81
89
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
82
90
  transition: transform 0.2s ease, background-color 0.2s ease;
83
- transform: translateX(0);
91
+ transform: translate(0, -50%);
84
92
  flex-shrink: 0;
85
93
  }
86
94
 
87
95
  .tale-switch__thumb[data-checked] {
88
- transform: translateX(1.6rem);
89
- background-color: var(--neutral-100);
96
+ transform: translate(
97
+ calc(
98
+ var(--tale-switch-track-width) - (var(--tale-switch-thumb-offset) * 2) -
99
+ var(--tale-switch-thumb-size)
100
+ ),
101
+ -50%
102
+ );
103
+ background-color: var(--color-60-fg);
90
104
  }
package/src/toast.css CHANGED
@@ -25,7 +25,7 @@
25
25
  display: flex;
26
26
  flex-direction: column-reverse;
27
27
  gap: var(--space-2xs);
28
- padding: var(--space-m);
28
+ padding: var(--space-xs);
29
29
  pointer-events: none;
30
30
 
31
31
  /* Default: bottom-right */
@@ -42,7 +42,7 @@
42
42
  display: flex;
43
43
  align-items: flex-start;
44
44
  gap: var(--space-xs);
45
- padding: var(--space-s) var(--space-m);
45
+ padding: var(--space-2xs) var(--space-s);
46
46
  background-color: var(--neutral-14);
47
47
  border: 1px solid var(--neutral-22);
48
48
  border-radius: 1rem;
@@ -65,18 +65,18 @@
65
65
  /* ─── Type variants ───────────────────────────────────────────────────────── */
66
66
 
67
67
  .tale-toast__root[data-type="success"] {
68
- border-color: var(--green-60, #22c55e);
69
- border-left: 4px solid var(--green-60, #22c55e);
68
+ border-color: var(--success-60);
69
+ border-left: 4px solid var(--success-60);
70
70
  }
71
71
 
72
72
  .tale-toast__root[data-type="error"] {
73
- border-color: var(--red-60);
74
- border-left: 4px solid var(--red-60);
73
+ border-color: var(--error-60);
74
+ border-left: 4px solid var(--error-60);
75
75
  }
76
76
 
77
77
  .tale-toast__root[data-type="warning"] {
78
- border-color: var(--yellow-60, #f59e0b);
79
- border-left: 4px solid var(--yellow-60, #f59e0b);
78
+ border-color: var(--warning-60);
79
+ border-left: 4px solid var(--warning-60);
80
80
  }
81
81
 
82
82
  /* ─── Title ────────────────────────────────────────────────────────────────── */
package/src/toggle.css CHANGED
@@ -57,13 +57,14 @@
57
57
  /* ─── Pressed (active/on) state ───────────────────────────────────────────── */
58
58
 
59
59
  .tale-toggle[data-pressed] {
60
- background-color: var(--neutral-18);
61
- border-color: var(--neutral-30);
62
- color: var(--neutral-90);
60
+ background-color: var(--neutral-80);
61
+ border-color: var(--neutral-80);
62
+ color: var(--neutral-80-fg);
63
63
  }
64
64
 
65
65
  .tale-toggle[data-pressed]:hover:not([data-disabled]) {
66
- background-color: var(--neutral-22);
66
+ background-color: var(--neutral-90);
67
+ border-color: var(--neutral-90);
67
68
  }
68
69
 
69
70
  /* ─── Disabled state ──────────────────────────────────────────────────────── */
package/src/tooltip.css CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  .tale-tooltip__popup {
26
26
  background-color: var(--neutral-80);
27
- color: var(--neutral-10);
27
+ color: var(--neutral-80-fg);
28
28
  font-family: var(--label-font-family);
29
29
  font-size: var(--label-s-font-size);
30
30
  font-weight: var(--label-font-weight);