@tale-ui/react-styles 0.1.1 → 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 CHANGED
@@ -1,6 +1,8 @@
1
1
  # @tale-ui/react-styles
2
2
 
3
- Opinionated CSS for `@tale-ui/react` components. Built entirely on `@tale-ui/core` design tokens (`--neutral-*`, `--color-*`, `--space-*`, `--text-*`).
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.
4
6
 
5
7
  ## Installation
6
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tale-ui/react-styles",
3
- "version": "0.1.1",
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.7"
49
+ "@tale-ui/core": "1.1.8"
50
50
  },
51
51
  "sideEffects": [
52
52
  "**/*.css"
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
  }
@@ -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/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>
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 ──────────────────────────────────────────────────────── */