@tale-ui/react-styles 0.0.3

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.
@@ -0,0 +1,104 @@
1
+ /*
2
+ * Popover — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui Popover exposes:
6
+ * Popup: [data-open] [data-closed] [data-starting-style] [data-ending-style]
7
+ * [data-side] [data-align] [data-instant]
8
+ *
9
+ * Usage:
10
+ * <Popover.Root>
11
+ * <Popover.Trigger className="tale-button tale-button--neutral">Open</Popover.Trigger>
12
+ * <Popover.Portal>
13
+ * <Popover.Positioner>
14
+ * <Popover.Popup className="tale-popover__popup">
15
+ * <Popover.Title className="tale-popover__title">Title</Popover.Title>
16
+ * <Popover.Description className="tale-popover__description">…</Popover.Description>
17
+ * <Popover.Close className="tale-popover__close">✕</Popover.Close>
18
+ * </Popover.Popup>
19
+ * </Popover.Positioner>
20
+ * </Popover.Portal>
21
+ * </Popover.Root>
22
+ */
23
+
24
+ /* ─── Popup ────────────────────────────────────────────────────────────────── */
25
+
26
+ .tale-popover__popup {
27
+ 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);
35
+ 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
+ }
45
+
46
+ /* ─── Title ────────────────────────────────────────────────────────────────── */
47
+
48
+ .tale-popover__title {
49
+ margin: 0 0 var(--space-2xs);
50
+ color: var(--neutral-90);
51
+ font-family: var(--label-font-family);
52
+ font-size: var(--label-m-font-size);
53
+ font-weight: var(--label-font-weight);
54
+ line-height: 1.3;
55
+ }
56
+
57
+ /* ─── Description ──────────────────────────────────────────────────────────── */
58
+
59
+ .tale-popover__description {
60
+ margin: 0;
61
+ color: var(--neutral-70);
62
+ font-family: var(--body-font-family);
63
+ font-size: var(--text-s-font-size);
64
+ line-height: 1.5;
65
+ }
66
+
67
+ /* ─── Close button ─────────────────────────────────────────────────────────── */
68
+
69
+ .tale-popover__close {
70
+ position: absolute;
71
+ top: var(--space-2xs);
72
+ right: var(--space-2xs);
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ width: 2.8rem;
77
+ height: 2.8rem;
78
+ border: none;
79
+ border-radius: 0.4rem;
80
+ background-color: transparent;
81
+ color: var(--neutral-60);
82
+ cursor: pointer;
83
+ outline: none;
84
+ transition: background-color 0.15s ease, color 0.15s ease;
85
+ }
86
+
87
+ .tale-popover__close:hover {
88
+ background-color: var(--neutral-14);
89
+ color: var(--neutral-90);
90
+ }
91
+
92
+ .tale-popover__close:focus-visible {
93
+ box-shadow: 0 0 0 2px var(--color-60);
94
+ }
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
+ }
@@ -0,0 +1,51 @@
1
+ /*
2
+ * PreviewCard — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui PreviewCard exposes:
6
+ * Popup: [data-open] [data-closed] [data-starting-style] [data-ending-style]
7
+ * [data-side] [data-align]
8
+ *
9
+ * Usage:
10
+ * <PreviewCard.Root>
11
+ * <PreviewCard.Trigger>Hover link</PreviewCard.Trigger>
12
+ * <PreviewCard.Portal>
13
+ * <PreviewCard.Positioner>
14
+ * <PreviewCard.Popup className="tale-preview-card__popup">
15
+ * Card content
16
+ * </PreviewCard.Popup>
17
+ * </PreviewCard.Positioner>
18
+ * </PreviewCard.Portal>
19
+ * </PreviewCard.Root>
20
+ */
21
+
22
+ /* ─── Popup ────────────────────────────────────────────────────────────────── */
23
+
24
+ .tale-preview-card__popup {
25
+ background-color: var(--neutral-10);
26
+ border: 1px solid var(--neutral-20);
27
+ border-radius: 1rem;
28
+ box-shadow:
29
+ 0 2px 4px rgba(0, 0, 0, 0.06),
30
+ 0 12px 32px rgba(0, 0, 0, 0.1);
31
+ padding: var(--space-m);
32
+ max-width: 32rem;
33
+ outline: none;
34
+ transition: opacity 0.15s ease, transform 0.15s ease;
35
+ }
36
+
37
+ .tale-preview-card__popup[data-starting-style],
38
+ .tale-preview-card__popup[data-ending-style] {
39
+ opacity: 0;
40
+ transform: scale(0.97);
41
+ }
42
+
43
+ /* ─── Arrow ────────────────────────────────────────────────────────────────── */
44
+
45
+ .tale-preview-card__arrow {
46
+ width: 1rem;
47
+ height: 0.5rem;
48
+ fill: var(--neutral-10);
49
+ stroke: var(--neutral-20);
50
+ stroke-width: 1;
51
+ }
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Progress — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui Progress exposes:
6
+ * Root: [data-complete] [data-indeterminate] [data-progressing]
7
+ * Indicator: [data-complete] [data-indeterminate] [data-progressing]
8
+ * Value: [data-complete] [data-indeterminate] [data-progressing]
9
+ *
10
+ * Usage:
11
+ * <Progress.Root className="tale-progress" value={60}>
12
+ * <Progress.Track className="tale-progress__track">
13
+ * <Progress.Indicator className="tale-progress__indicator" />
14
+ * </Progress.Track>
15
+ * </Progress.Root>
16
+ */
17
+
18
+ /* ─── Root ─────────────────────────────────────────────────────────────────── */
19
+
20
+ .tale-progress {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: var(--space-4xs);
24
+ width: 100%;
25
+ }
26
+
27
+ /* ─── Label ────────────────────────────────────────────────────────────────── */
28
+
29
+ .tale-progress__label {
30
+ color: var(--neutral-80);
31
+ font-family: var(--label-font-family);
32
+ font-size: var(--label-m-font-size);
33
+ font-weight: var(--label-font-weight);
34
+ }
35
+
36
+ /* ─── Track ────────────────────────────────────────────────────────────────── */
37
+
38
+ .tale-progress__track {
39
+ position: relative;
40
+ width: 100%;
41
+ height: 0.8rem;
42
+ border-radius: 9999px;
43
+ background-color: var(--neutral-20);
44
+ overflow: hidden;
45
+ }
46
+
47
+ /* ─── Indicator — the filled portion ─────────────────────────────────────── */
48
+
49
+ .tale-progress__indicator {
50
+ height: 100%;
51
+ background-color: var(--color-60);
52
+ border-radius: 9999px;
53
+ transition: width 0.3s ease;
54
+ }
55
+
56
+ /* ─── Complete state ──────────────────────────────────────────────────────── */
57
+
58
+ .tale-progress[data-complete] .tale-progress__indicator {
59
+ background-color: var(--green-60, var(--color-60));
60
+ }
61
+
62
+ /* ─── Indeterminate state ─────────────────────────────────────────────────── */
63
+
64
+ @keyframes tale-progress-indeterminate {
65
+ 0% { transform: translateX(-100%); }
66
+ 100% { transform: translateX(300%); }
67
+ }
68
+
69
+ .tale-progress[data-indeterminate] .tale-progress__indicator {
70
+ width: 40% !important;
71
+ animation: tale-progress-indeterminate 1.5s ease-in-out infinite;
72
+ }
73
+
74
+ /* ─── Value label ──────────────────────────────────────────────────────────── */
75
+
76
+ .tale-progress__value {
77
+ color: var(--neutral-60);
78
+ font-family: var(--label-font-family);
79
+ font-size: var(--label-s-font-size);
80
+ text-align: right;
81
+ }
package/src/radio.css ADDED
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Radio — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui Radio exposes:
6
+ * Root: [data-checked] [data-unchecked] [data-disabled]
7
+ * [data-readonly] [data-required] [data-valid] [data-invalid]
8
+ * [data-focused]
9
+ * Indicator: [data-checked] [data-unchecked] [data-disabled]
10
+ *
11
+ * Usage:
12
+ * <Radio.Root className="tale-radio">
13
+ * <Radio.Indicator className="tale-radio__indicator" />
14
+ * </Radio.Root>
15
+ */
16
+
17
+ /* ─── Root — circular hit area ────────────────────────────────────────────── */
18
+
19
+ .tale-radio {
20
+ display: inline-flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ width: 1.8rem;
24
+ height: 1.8rem;
25
+ border-radius: 50%;
26
+ border: 1.5px solid var(--neutral-40);
27
+ background-color: var(--neutral-10);
28
+ cursor: pointer;
29
+ outline: none;
30
+ transition:
31
+ background-color 0.15s ease,
32
+ border-color 0.15s ease,
33
+ box-shadow 0.15s ease;
34
+ flex-shrink: 0;
35
+ }
36
+
37
+ .tale-radio:focus-visible {
38
+ box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--color-60);
39
+ }
40
+
41
+ /* ─── Checked state ───────────────────────────────────────────────────────── */
42
+
43
+ .tale-radio[data-checked] {
44
+ border-color: var(--color-60);
45
+ background-color: var(--neutral-10);
46
+ }
47
+
48
+ .tale-radio[data-checked]:hover:not([data-disabled]) {
49
+ border-color: var(--color-50);
50
+ }
51
+
52
+ /* ─── Hover (unchecked) ───────────────────────────────────────────────────── */
53
+
54
+ .tale-radio:hover:not([data-disabled]):not([data-checked]) {
55
+ border-color: var(--neutral-60);
56
+ background-color: var(--neutral-14);
57
+ }
58
+
59
+ /* ─── Invalid state ───────────────────────────────────────────────────────── */
60
+
61
+ .tale-radio[data-invalid] {
62
+ border-color: var(--red-60);
63
+ }
64
+
65
+ /* ─── Disabled state ──────────────────────────────────────────────────────── */
66
+
67
+ .tale-radio[data-disabled] {
68
+ opacity: 0.45;
69
+ cursor: not-allowed;
70
+ pointer-events: none;
71
+ }
72
+
73
+ /* ─── Size modifiers ──────────────────────────────────────────────────────── */
74
+
75
+ .tale-radio--sm {
76
+ width: 1.4rem;
77
+ height: 1.4rem;
78
+ }
79
+
80
+ .tale-radio--lg {
81
+ width: 2.2rem;
82
+ height: 2.2rem;
83
+ }
84
+
85
+ /* ─── Indicator — filled dot shown when checked ───────────────────────────── */
86
+
87
+ .tale-radio__indicator {
88
+ width: 0.8rem;
89
+ height: 0.8rem;
90
+ border-radius: 50%;
91
+ background-color: var(--color-60);
92
+ transition: transform 0.15s ease, opacity 0.15s ease;
93
+ transform: scale(0);
94
+ opacity: 0;
95
+ }
96
+
97
+ .tale-radio--sm .tale-radio__indicator {
98
+ width: 0.6rem;
99
+ height: 0.6rem;
100
+ }
101
+
102
+ .tale-radio--lg .tale-radio__indicator {
103
+ width: 1rem;
104
+ height: 1rem;
105
+ }
106
+
107
+ .tale-radio__indicator[data-checked] {
108
+ transform: scale(1);
109
+ opacity: 1;
110
+ }
@@ -0,0 +1,92 @@
1
+ /*
2
+ * ScrollArea — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui ScrollArea has no data attributes on Root.
6
+ * Scrollbar: orientation (horizontal/vertical)
7
+ *
8
+ * Usage:
9
+ * <ScrollArea.Root className="tale-scroll-area">
10
+ * <ScrollArea.Viewport className="tale-scroll-area__viewport">
11
+ * {content}
12
+ * </ScrollArea.Viewport>
13
+ * <ScrollArea.Scrollbar className="tale-scroll-area__scrollbar" orientation="vertical">
14
+ * <ScrollArea.Thumb className="tale-scroll-area__thumb" />
15
+ * </ScrollArea.Scrollbar>
16
+ * <ScrollArea.Corner className="tale-scroll-area__corner" />
17
+ * </ScrollArea.Root>
18
+ */
19
+
20
+ /* ─── Root ─────────────────────────────────────────────────────────────────── */
21
+
22
+ .tale-scroll-area {
23
+ position: relative;
24
+ overflow: hidden;
25
+ }
26
+
27
+ /* ─── Viewport ─────────────────────────────────────────────────────────────── */
28
+
29
+ .tale-scroll-area__viewport {
30
+ width: 100%;
31
+ height: 100%;
32
+ overflow: scroll;
33
+ scrollbar-width: none;
34
+ }
35
+
36
+ .tale-scroll-area__viewport::-webkit-scrollbar {
37
+ display: none;
38
+ }
39
+
40
+ /* ─── Scrollbar ────────────────────────────────────────────────────────────── */
41
+
42
+ .tale-scroll-area__scrollbar {
43
+ display: flex;
44
+ touch-action: none;
45
+ user-select: none;
46
+ padding: 0.2rem;
47
+ background-color: transparent;
48
+ transition: background-color 0.15s ease;
49
+ }
50
+
51
+ .tale-scroll-area__scrollbar[data-orientation="vertical"] {
52
+ flex-direction: column;
53
+ width: 1rem;
54
+ position: absolute;
55
+ top: 0;
56
+ right: 0;
57
+ bottom: 0;
58
+ }
59
+
60
+ .tale-scroll-area__scrollbar[data-orientation="horizontal"] {
61
+ flex-direction: row;
62
+ height: 1rem;
63
+ position: absolute;
64
+ left: 0;
65
+ right: 0;
66
+ bottom: 0;
67
+ }
68
+
69
+ .tale-scroll-area__scrollbar:hover {
70
+ background-color: var(--neutral-14);
71
+ }
72
+
73
+ /* ─── Thumb ────────────────────────────────────────────────────────────────── */
74
+
75
+ .tale-scroll-area__thumb {
76
+ flex: 1;
77
+ border-radius: 9999px;
78
+ background-color: var(--neutral-40);
79
+ position: relative;
80
+ transition: background-color 0.15s ease;
81
+ }
82
+
83
+ .tale-scroll-area__thumb:hover,
84
+ .tale-scroll-area__scrollbar:hover .tale-scroll-area__thumb {
85
+ background-color: var(--neutral-55);
86
+ }
87
+
88
+ /* ─── Corner ───────────────────────────────────────────────────────────────── */
89
+
90
+ .tale-scroll-area__corner {
91
+ background-color: var(--neutral-14);
92
+ }
package/src/select.css ADDED
@@ -0,0 +1,187 @@
1
+ /*
2
+ * Select — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui Select exposes:
6
+ * Trigger: (standard button-like)
7
+ * Popup: [data-open] [data-closed] [data-starting-style] [data-ending-style]
8
+ * [data-side] [data-align]
9
+ * Item: [data-selected] [data-highlighted] [data-disabled]
10
+ *
11
+ * Usage:
12
+ * <Select.Root>
13
+ * <Select.Trigger className="tale-select__trigger">
14
+ * <Select.Value placeholder="Pick one" />
15
+ * <Select.Icon className="tale-select__icon">▾</Select.Icon>
16
+ * </Select.Trigger>
17
+ * <Select.Portal>
18
+ * <Select.Positioner>
19
+ * <Select.Popup className="tale-select__popup">
20
+ * <Select.Item className="tale-select__item" value="a">
21
+ * <Select.ItemText className="tale-select__item-text">Option A</Select.ItemText>
22
+ * <Select.ItemIndicator className="tale-select__item-indicator">✓</Select.ItemIndicator>
23
+ * </Select.Item>
24
+ * </Select.Popup>
25
+ * </Select.Positioner>
26
+ * </Select.Portal>
27
+ * </Select.Root>
28
+ */
29
+
30
+ /* ─── Trigger ──────────────────────────────────────────────────────────────── */
31
+
32
+ .tale-select__trigger {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ justify-content: space-between;
36
+ gap: var(--space-xs);
37
+ 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
+ cursor: pointer;
47
+ outline: none;
48
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
49
+ }
50
+
51
+ .tale-select__trigger:hover {
52
+ border-color: var(--neutral-40);
53
+ }
54
+
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
+ .tale-select__trigger[data-disabled] {
62
+ opacity: 0.45;
63
+ cursor: not-allowed;
64
+ pointer-events: none;
65
+ }
66
+
67
+ /* ─── Value / placeholder ──────────────────────────────────────────────────── */
68
+
69
+ .tale-select__value[data-placeholder] {
70
+ color: var(--neutral-50);
71
+ }
72
+
73
+ /* ─── Icon ─────────────────────────────────────────────────────────────────── */
74
+
75
+ .tale-select__icon {
76
+ width: 1.6rem;
77
+ height: 1.6rem;
78
+ color: var(--neutral-60);
79
+ flex-shrink: 0;
80
+ transition: transform 0.2s ease;
81
+ }
82
+
83
+ .tale-select__trigger[data-popup-open] .tale-select__icon {
84
+ transform: rotate(180deg);
85
+ }
86
+
87
+ /* ─── Popup ────────────────────────────────────────────────────────────────── */
88
+
89
+ .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);
99
+ max-height: 28rem;
100
+ 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);
109
+ }
110
+
111
+ /* ─── List ─────────────────────────────────────────────────────────────────── */
112
+
113
+ .tale-select__list {
114
+ display: flex;
115
+ flex-direction: column;
116
+ gap: 0;
117
+ }
118
+
119
+ /* ─── Item ─────────────────────────────────────────────────────────────────── */
120
+
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
+ .tale-select__item[data-selected] {
142
+ color: var(--color-60);
143
+ font-weight: var(--label-font-weight);
144
+ }
145
+
146
+ .tale-select__item[data-disabled] {
147
+ opacity: 0.45;
148
+ cursor: not-allowed;
149
+ pointer-events: none;
150
+ }
151
+
152
+ /* ─── Item text ────────────────────────────────────────────────────────────── */
153
+
154
+ .tale-select__item-text {
155
+ flex: 1;
156
+ }
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
+ }
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Separator — @tale-ui/react
3
+ *
4
+ * Styled with @tale-ui/core design tokens.
5
+ * Base-ui Separator has no data attributes.
6
+ *
7
+ * Orientation modifier: .tale-separator--vertical
8
+ *
9
+ * Usage:
10
+ * <Separator className="tale-separator" />
11
+ * <Separator className="tale-separator tale-separator--vertical" />
12
+ */
13
+
14
+ /* ─── Base ─────────────────────────────────────────────────────────────────── */
15
+
16
+ .tale-separator {
17
+ display: block;
18
+ border: none;
19
+ background-color: var(--neutral-20);
20
+ width: 100%;
21
+ height: 1px;
22
+ flex-shrink: 0;
23
+ }
24
+
25
+ /* ─── Vertical orientation ────────────────────────────────────────────────── */
26
+
27
+ .tale-separator--vertical,
28
+ .tale-separator[aria-orientation="vertical"] {
29
+ width: 1px;
30
+ height: auto;
31
+ align-self: stretch;
32
+ }