twntyx-css 1.0.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 +105 -0
- package/llm/CHANGELOG.md +7 -0
- package/llm/components/ai-background.json +90 -0
- package/llm/components/ai-orb.json +91 -0
- package/llm/components/ai-perl.json +91 -0
- package/llm/components/all-components.json +104 -0
- package/llm/components/animation-references.json +84 -0
- package/llm/components/avatar.json +149 -0
- package/llm/components/badge.json +263 -0
- package/llm/components/banner-marketplace.json +81 -0
- package/llm/components/banner.json +120 -0
- package/llm/components/breadcrumb.json +169 -0
- package/llm/components/button-container.json +150 -0
- package/llm/components/button-feedback.json +155 -0
- package/llm/components/button.json +290 -0
- package/llm/components/card-assessment.json +93 -0
- package/llm/components/card-test.json +83 -0
- package/llm/components/card.json +94 -0
- package/llm/components/chat.json +155 -0
- package/llm/components/checkbox.json +186 -0
- package/llm/components/checkmark.json +175 -0
- package/llm/components/collapsible.json +100 -0
- package/llm/components/color-palette.json +79 -0
- package/llm/components/color-usage.json +83 -0
- package/llm/components/combobox.json +143 -0
- package/llm/components/command-palette.json +159 -0
- package/llm/components/countdown.json +113 -0
- package/llm/components/datepicker.json +151 -0
- package/llm/components/divider.json +104 -0
- package/llm/components/empty-state.json +80 -0
- package/llm/components/field.json +123 -0
- package/llm/components/fieldset.json +78 -0
- package/llm/components/file-upload.json +163 -0
- package/llm/components/form-example.json +82 -0
- package/llm/components/getting-started.json +70 -0
- package/llm/components/icons-reference.json +78 -0
- package/llm/components/illustrations-library.json +78 -0
- package/llm/components/input-group.json +94 -0
- package/llm/components/introduction.json +71 -0
- package/llm/components/join.json +105 -0
- package/llm/components/kbd.json +139 -0
- package/llm/components/key-value.json +86 -0
- package/llm/components/link.json +120 -0
- package/llm/components/loader.json +117 -0
- package/llm/components/logotype.json +75 -0
- package/llm/components/menu.json +192 -0
- package/llm/components/modal.json +167 -0
- package/llm/components/navbar.json +158 -0
- package/llm/components/pagination.json +122 -0
- package/llm/components/pie-chart.json +94 -0
- package/llm/components/popover.json +174 -0
- package/llm/components/progress-bullet.json +203 -0
- package/llm/components/progress-linear.json +129 -0
- package/llm/components/progress-radial.json +125 -0
- package/llm/components/radio.json +162 -0
- package/llm/components/range-slider.json +125 -0
- package/llm/components/scrollbar.json +96 -0
- package/llm/components/select-input.json +224 -0
- package/llm/components/shadows.json +107 -0
- package/llm/components/skeleton.json +84 -0
- package/llm/components/stacked-chart.json +100 -0
- package/llm/components/state.json +138 -0
- package/llm/components/stepper.json +95 -0
- package/llm/components/steps.json +177 -0
- package/llm/components/surface.json +181 -0
- package/llm/components/table.json +223 -0
- package/llm/components/tabs.json +147 -0
- package/llm/components/template-ai.json +80 -0
- package/llm/components/template-login.json +88 -0
- package/llm/components/template-stats.json +76 -0
- package/llm/components/text-input.json +275 -0
- package/llm/components/textarea.json +183 -0
- package/llm/components/timeline.json +142 -0
- package/llm/components/toast.json +164 -0
- package/llm/components/toggle.json +158 -0
- package/llm/components/tool-svg-to-base64.json +78 -0
- package/llm/components/tool-svg-to-icon-data.json +81 -0
- package/llm/components/tooltip.json +90 -0
- package/llm/examples/ai-background.html +1 -0
- package/llm/examples/ai-orb.html +1 -0
- package/llm/examples/ai-perl.html +1 -0
- package/llm/examples/all-components.html +1 -0
- package/llm/examples/animation-references.html +1 -0
- package/llm/examples/avatar.html +1 -0
- package/llm/examples/badge.html +1 -0
- package/llm/examples/banner-marketplace.html +1 -0
- package/llm/examples/banner.html +1 -0
- package/llm/examples/breadcrumb.html +1 -0
- package/llm/examples/button-container.html +1 -0
- package/llm/examples/button-feedback.html +1 -0
- package/llm/examples/button.html +3 -0
- package/llm/examples/card-assessment.html +1 -0
- package/llm/examples/card-test.html +1 -0
- package/llm/examples/card.html +1 -0
- package/llm/examples/chat.html +1 -0
- package/llm/examples/checkbox.html +1 -0
- package/llm/examples/checkmark.html +1 -0
- package/llm/examples/collapsible.html +1 -0
- package/llm/examples/color-palette.html +1 -0
- package/llm/examples/color-usage.html +1 -0
- package/llm/examples/combobox.html +1 -0
- package/llm/examples/command-palette.html +1 -0
- package/llm/examples/countdown.html +1 -0
- package/llm/examples/datepicker.html +1 -0
- package/llm/examples/divider.html +1 -0
- package/llm/examples/empty-state.html +1 -0
- package/llm/examples/field.html +1 -0
- package/llm/examples/fieldset.html +1 -0
- package/llm/examples/file-upload.html +1 -0
- package/llm/examples/form-example.html +1 -0
- package/llm/examples/getting-started.html +1 -0
- package/llm/examples/icons-reference.html +1 -0
- package/llm/examples/illustrations-library.html +1 -0
- package/llm/examples/input-group.html +1 -0
- package/llm/examples/introduction.html +1 -0
- package/llm/examples/join.html +1 -0
- package/llm/examples/kbd.html +1 -0
- package/llm/examples/key-value.html +1 -0
- package/llm/examples/link.html +1 -0
- package/llm/examples/loader.html +1 -0
- package/llm/examples/logotype.html +1 -0
- package/llm/examples/menu.html +1 -0
- package/llm/examples/modal.html +16 -0
- package/llm/examples/navbar.html +1 -0
- package/llm/examples/pagination.html +1 -0
- package/llm/examples/pie-chart.html +1 -0
- package/llm/examples/popover.html +1 -0
- package/llm/examples/progress-bullet.html +1 -0
- package/llm/examples/progress-linear.html +1 -0
- package/llm/examples/progress-radial.html +1 -0
- package/llm/examples/radio.html +1 -0
- package/llm/examples/range-slider.html +1 -0
- package/llm/examples/scrollbar.html +1 -0
- package/llm/examples/select-input.html +1 -0
- package/llm/examples/shadows.html +1 -0
- package/llm/examples/skeleton.html +1 -0
- package/llm/examples/stacked-chart.html +1 -0
- package/llm/examples/state.html +1 -0
- package/llm/examples/stepper.html +1 -0
- package/llm/examples/steps.html +1 -0
- package/llm/examples/surface.html +1 -0
- package/llm/examples/table.html +16 -0
- package/llm/examples/tabs.html +1 -0
- package/llm/examples/template-ai.html +1 -0
- package/llm/examples/template-login.html +1 -0
- package/llm/examples/template-stats.html +1 -0
- package/llm/examples/text-input.html +10 -0
- package/llm/examples/textarea.html +1 -0
- package/llm/examples/timeline.html +1 -0
- package/llm/examples/toast.html +5 -0
- package/llm/examples/toggle.html +1 -0
- package/llm/examples/tool-svg-to-base64.html +1 -0
- package/llm/examples/tool-svg-to-icon-data.html +1 -0
- package/llm/examples/tooltip.html +1 -0
- package/llm/index.json +1615 -0
- package/llm/llms.txt +18 -0
- package/llm/patterns.json +111 -0
- package/llm/rules.json +47 -0
- package/llm/schema.json +804 -0
- package/llm/tokens.json +3629 -0
- package/package.json +30 -0
- package/styles/ai.css +114 -0
- package/styles/animation.css +2493 -0
- package/styles/avatar.css +101 -0
- package/styles/background-ai.css +118 -0
- package/styles/badge.css +274 -0
- package/styles/banner.css +98 -0
- package/styles/breadcrumb.css +72 -0
- package/styles/button.css +621 -0
- package/styles/card.css +27 -0
- package/styles/chart-pie.css +39 -0
- package/styles/chart-stacked.css +91 -0
- package/styles/chat.css +506 -0
- package/styles/checkmark.css +105 -0
- package/styles/code.css +264 -0
- package/styles/collapsible.css +93 -0
- package/styles/colors.css +536 -0
- package/styles/combobox.css +66 -0
- package/styles/command.css +81 -0
- package/styles/contest.css +227 -0
- package/styles/countdown.css +65 -0
- package/styles/datepicker.css +124 -0
- package/styles/divider.css +72 -0
- package/styles/drawer.css +142 -0
- package/styles/dropdown.css +22 -0
- package/styles/empty-state.css +48 -0
- package/styles/field.css +47 -0
- package/styles/fieldset.css +24 -0
- package/styles/form-checkbox-radio-toggle.css +233 -0
- package/styles/form-fileupload.css +146 -0
- package/styles/form-rangeslider.css +106 -0
- package/styles/form-shared.css +41 -0
- package/styles/form-text-select.css +411 -0
- package/styles/form.css +86 -0
- package/styles/globals.css +66 -0
- package/styles/input-group.css +63 -0
- package/styles/join.css +141 -0
- package/styles/kbd.css +55 -0
- package/styles/key-value.css +44 -0
- package/styles/link.css +48 -0
- package/styles/loader.css +183 -0
- package/styles/logotype.css +13 -0
- package/styles/menu.css +317 -0
- package/styles/modal.css +172 -0
- package/styles/navbar.css +48 -0
- package/styles/package-quill.css +1001 -0
- package/styles/pagination.css +147 -0
- package/styles/panel.css +113 -0
- package/styles/popover.css +303 -0
- package/styles/prism.css +60 -0
- package/styles/progress.css +209 -0
- package/styles/scrollbar.css +17 -0
- package/styles/shadow.css +25 -0
- package/styles/shared.css +226 -0
- package/styles/skeleton.css +34 -0
- package/styles/state.css +150 -0
- package/styles/stepper.css +72 -0
- package/styles/steps.css +98 -0
- package/styles/surface.css +252 -0
- package/styles/tab.css +286 -0
- package/styles/table.css +243 -0
- package/styles/theme.css +126 -0
- package/styles/timeline.css +193 -0
- package/styles/toast.css +150 -0
- package/styles/tooltip.css +8 -0
- package/styles/typography.css +160 -0
- package/styles/utility.css +20 -0
- package/tailwind.config.cjs +9 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*----------------------------*/
|
|
2
|
+
/* STEPPER */
|
|
3
|
+
/*----------------------------*/
|
|
4
|
+
|
|
5
|
+
.stepper {
|
|
6
|
+
@apply
|
|
7
|
+
leading-[0]
|
|
8
|
+
inline-flex
|
|
9
|
+
items-baseline
|
|
10
|
+
;
|
|
11
|
+
> span {
|
|
12
|
+
@apply
|
|
13
|
+
h-4
|
|
14
|
+
leading-none
|
|
15
|
+
inline-block
|
|
16
|
+
overflow-y-hidden
|
|
17
|
+
mx-auto
|
|
18
|
+
;
|
|
19
|
+
&::before {
|
|
20
|
+
@apply
|
|
21
|
+
relative
|
|
22
|
+
content-["1\a_2\a_3\a_4\a_5\a_6\a_7\a_8\a_9\a_0\a_1\a_2\a_3\a_4\a_5\a_6\a_7\a_8\a_9\a_0\a_1\a_2\a_3\a_4\a_5\a_6\a_7\a_8\a_9\a_0\a_1\a_2\a_3\a_4\a_5\a_6\a_7\a_8\a_9\a_0\a_1\a_2\a_3\a_4\a_5\a_6\a_7\a_8\a_9\a"]
|
|
23
|
+
whitespace-pre
|
|
24
|
+
text-center
|
|
25
|
+
transition-all
|
|
26
|
+
duration-1000
|
|
27
|
+
top-0
|
|
28
|
+
ease-[cubic-bezier(0.9,0,0.1,1)]
|
|
29
|
+
animate-[stepper_5s_cubic-bezier(0.9,0,0.1,1)_both]
|
|
30
|
+
block
|
|
31
|
+
;
|
|
32
|
+
}
|
|
33
|
+
&:nth-last-child(1)::before {
|
|
34
|
+
animation-duration: 2s;
|
|
35
|
+
}
|
|
36
|
+
&:nth-last-child(2)::before {
|
|
37
|
+
animation-duration: 2.5s;
|
|
38
|
+
}
|
|
39
|
+
&:nth-last-child(3)::before {
|
|
40
|
+
animation-duration: 3s;
|
|
41
|
+
}
|
|
42
|
+
&:nth-last-child(4)::before {
|
|
43
|
+
animation-duration: 3.5s;
|
|
44
|
+
}
|
|
45
|
+
&:nth-last-child(5)::before {
|
|
46
|
+
animation-duration: 4s;
|
|
47
|
+
}
|
|
48
|
+
&:nth-last-child(6)::before {
|
|
49
|
+
animation-duration: 4.5s;
|
|
50
|
+
}
|
|
51
|
+
&:nth-last-child(7)::before {
|
|
52
|
+
animation-duration: 5s;
|
|
53
|
+
}
|
|
54
|
+
&:nth-last-child(8)::before {
|
|
55
|
+
animation-duration: 5.5s;
|
|
56
|
+
}
|
|
57
|
+
&:nth-last-child(9)::before {
|
|
58
|
+
animation-duration: 6s;
|
|
59
|
+
}
|
|
60
|
+
&:nth-last-child(10)::before {
|
|
61
|
+
animation-duration: 6.5s;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
@keyframes stepper {
|
|
66
|
+
0% {
|
|
67
|
+
transform: translateY(0);
|
|
68
|
+
}
|
|
69
|
+
100% {
|
|
70
|
+
transform: translateY(calc(-8.95em + (var(--value) * -1em)));
|
|
71
|
+
}
|
|
72
|
+
}
|
package/styles/steps.css
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*----------------------------*/
|
|
2
|
+
/* STEPS */
|
|
3
|
+
/*----------------------------*/
|
|
4
|
+
|
|
5
|
+
@utility steps {
|
|
6
|
+
--size: 2.5rem;
|
|
7
|
+
--width: 2px;
|
|
8
|
+
@apply inline-grid overflow-hidden overflow-x-auto grid-flow-col;
|
|
9
|
+
counter-reset: step;
|
|
10
|
+
grid-auto-columns: 1fr;
|
|
11
|
+
|
|
12
|
+
li {
|
|
13
|
+
@apply grid grid-cols-1 grid-rows-2 place-items-center text-center gap-2 min-w-[4rem] relative text-text-default text-sm;
|
|
14
|
+
|
|
15
|
+
&,
|
|
16
|
+
&::before,
|
|
17
|
+
&::after {
|
|
18
|
+
@apply transition-colors include-transition;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Step number */
|
|
22
|
+
&::before {
|
|
23
|
+
@apply content-[counter(step)] surface-brand grid place-content-center size-(--size) font-bold rounded-full border text-text-inverted text-shadow-xs text-shadow-brand-strong/50;
|
|
24
|
+
counter-increment: step;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Connector line */
|
|
28
|
+
&:not(:last-child)::after {
|
|
29
|
+
@apply content-[''] absolute top-[calc((var(--size)/2)+(var(--width)))] md:top-[calc((var(--size)/2)-(var(--width)/2))] left-[calc(50%+(var(--size)/2))] w-full h-(--width) bg-brand-default;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> span {
|
|
33
|
+
@apply block w-full text-center text-balance;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
li.is-active {
|
|
38
|
+
@apply font-medium text-text-default;
|
|
39
|
+
|
|
40
|
+
&::after {
|
|
41
|
+
@apply bg-line-default;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
~ li {
|
|
45
|
+
@apply text-text-tertiary;
|
|
46
|
+
&::before {
|
|
47
|
+
@apply bg-line-default from-line-default to-line-default shadow-none border-line-default text-text-tertiary;
|
|
48
|
+
}
|
|
49
|
+
&::after {
|
|
50
|
+
@apply bg-line-default;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:not(:has(.is-active)) {
|
|
56
|
+
@apply text-text-tertiary;
|
|
57
|
+
li {
|
|
58
|
+
@apply text-text-tertiary;
|
|
59
|
+
|
|
60
|
+
&::before {
|
|
61
|
+
@apply bg-line-default from-line-default to-line-default shadow-none border-line-default text-text-tertiary;
|
|
62
|
+
}
|
|
63
|
+
&::after {
|
|
64
|
+
@apply bg-line-default;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Vertical variant */
|
|
71
|
+
@utility steps-vertical {
|
|
72
|
+
@apply grid-flow-row gap-8 justify-start;
|
|
73
|
+
grid-auto-rows: auto;
|
|
74
|
+
|
|
75
|
+
li {
|
|
76
|
+
@apply grid-cols-[auto,1fr] grid-rows-1 text-left;
|
|
77
|
+
|
|
78
|
+
&:not(:last-child)::after {
|
|
79
|
+
@apply absolute left-[calc((var(--size)/2)-var(--width)/2)] top-[150%] h-full w-(--width) -translate-y-1/2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
> span {
|
|
83
|
+
@apply text-left;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Size variants */
|
|
89
|
+
@utility steps-sm {
|
|
90
|
+
--size: 2rem;
|
|
91
|
+
--width: 2px;
|
|
92
|
+
@apply text-sm;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@utility steps-lg {
|
|
96
|
+
--size: 4rem;
|
|
97
|
+
--width: 2px;
|
|
98
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/*----------------------------*/
|
|
2
|
+
/* SURFACE */
|
|
3
|
+
/*----------------------------*/
|
|
4
|
+
|
|
5
|
+
/* Base Surface */
|
|
6
|
+
@utility surface {
|
|
7
|
+
@apply
|
|
8
|
+
border
|
|
9
|
+
bg-background-surface
|
|
10
|
+
border-line-default;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Surface Variants */
|
|
14
|
+
@utility surface-placeholder {
|
|
15
|
+
@apply
|
|
16
|
+
border
|
|
17
|
+
border-dashed
|
|
18
|
+
bg-background-page
|
|
19
|
+
border-line-highlight
|
|
20
|
+
text-text-tertiary;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@utility surface-elevated {
|
|
24
|
+
@apply
|
|
25
|
+
border
|
|
26
|
+
bg-background-surface-elevated
|
|
27
|
+
border-line-hover/30
|
|
28
|
+
shadow-[inset_0_-2px_2px_color-mix(in_srgb,var(--tw-inset-shadow-color)_100%,transparent),inset_0_-4px_4px_color-mix(in_srgb,var(--tw-inset-shadow-color)_25%,transparent)]
|
|
29
|
+
inset-shadow-white/80
|
|
30
|
+
dark:inset-shadow-white/5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@utility surface-sunken {
|
|
34
|
+
@apply border
|
|
35
|
+
bg-background-surface-sunken
|
|
36
|
+
border-line-strong/35
|
|
37
|
+
shadow-[inset_0_2px_2px_color-mix(in_srgb,var(--tw-inset-shadow-color)_100%,transparent),inset_0_4px_4px_color-mix(in_srgb,var(--tw-inset-shadow-color)_25%,transparent)]
|
|
38
|
+
inset-shadow-black/5
|
|
39
|
+
dark:inset-shadow-black/40
|
|
40
|
+
;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@utility surface-highlighted {
|
|
44
|
+
@apply border bg-background-surface border-line-strong;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Brand Surfaces */
|
|
48
|
+
@utility surface-brand {
|
|
49
|
+
@apply
|
|
50
|
+
text-text-inverted
|
|
51
|
+
bg-linear-to-b
|
|
52
|
+
via-75%
|
|
53
|
+
from-[0.5rem]
|
|
54
|
+
to-[calc(100%-0.5rem)]
|
|
55
|
+
from-brand-default
|
|
56
|
+
to-brand-moderate
|
|
57
|
+
dark:from-brand-moderate
|
|
58
|
+
dark:to-brand-default
|
|
59
|
+
/* dark:from-brand-default
|
|
60
|
+
dark:via-brand-moderate
|
|
61
|
+
dark:to-brand-default */
|
|
62
|
+
border
|
|
63
|
+
border-brand-default
|
|
64
|
+
/* bg-size-[100%_calc(100%+0.5rem)]
|
|
65
|
+
bg-repeat
|
|
66
|
+
bg-position-[50%_calc(50%-0.5rem)] */
|
|
67
|
+
|
|
68
|
+
/* dark:*:drop-shadow-[0_-1px_0_color-mix(in_srgb,var(--tw-drop-shadow-color)_20%,transparent),0_-1px_1px_var(--tw-drop-shadow-color),0_-1px_2px_color-mix(in_srgb,var(--tw-drop-shadow-color)_20%,transparent)] */
|
|
69
|
+
|
|
70
|
+
/* text-shadow-2xs
|
|
71
|
+
text-shadow-brand-strong/50 */
|
|
72
|
+
transition-[background-position,brightness]
|
|
73
|
+
shadow-[inset_0_1px_0.5px_0_color-mix(in_srgb,var(--color-brand-moderate)_100%,transparent),inset_0_-2px_0.5px_0_color-mix(in_srgb,var(--color-brand-default)_50%,transparent)]
|
|
74
|
+
dark:shadow-[inset_0_1px_0.5px_0_color-mix(in_srgb,var(--color-brand-soft)_100%,transparent),inset_0_-2px_0.5px_0_color-mix(in_srgb,var(--color-white)_50%,transparent)]
|
|
75
|
+
/* dark:shadow-[inset_0_-1px_0.5px_0_color-mix(in_srgb,var(--color-brand-moderate)_100%,transparent),inset_0_-2px_0.5px_0_color-mix(in_srgb,var(--color-brand-default)_50%,transparent)] */
|
|
76
|
+
duration-75
|
|
77
|
+
ease-out-cubic
|
|
78
|
+
;
|
|
79
|
+
|
|
80
|
+
> *, &::before, &::after {
|
|
81
|
+
@apply
|
|
82
|
+
drop-shadow-[0_1px_0_color-mix(in_srgb,var(--tw-drop-shadow-color)_20%,transparent),0_1px_1px_color-mix(in_srgb,var(--tw-drop-shadow-color)_100%,transparent),0_1px_2px_color-mix(in_srgb,var(--tw-drop-shadow-color)_20%,transparent)]
|
|
83
|
+
dark:drop-shadow-[0_-1px_0_color-mix(in_srgb,var(--tw-drop-shadow-color)_10%,transparent)]
|
|
84
|
+
drop-shadow-brand-strong/50
|
|
85
|
+
;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Status Surfaces */
|
|
90
|
+
@utility surface-success {
|
|
91
|
+
@apply border bg-background-success border-line-success text-text-success;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@utility surface-error {
|
|
95
|
+
@apply border bg-background-error border-line-error text-text-error;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@utility surface-warning {
|
|
99
|
+
@apply border bg-background-warning border-line-warning text-text-warning;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@utility surface-attention {
|
|
103
|
+
@apply border bg-background-attention border-line-attention text-text-attention;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@utility surface-info {
|
|
107
|
+
@apply border bg-background-info border-line-info text-text-info;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@utility surface-interactive-neutral {
|
|
111
|
+
@apply hover:bg-core-ui-200 dark:hover:bg-core-ui-600 hover:border-line-focus active:bg-background-surface active:border-line-strong;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@utility surface-interactive-placeholder {
|
|
115
|
+
@apply hover:bg-background-page hover:border-line-focus active:bg-background-page active:border-line-strong text-text-default;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@utility surface-interactive-success {
|
|
119
|
+
@apply hover:bg-background-success-active/20 hover:border-background-success-active/50 active:bg-background-success-active/10 active:border-line-success;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@utility surface-interactive-error {
|
|
123
|
+
@apply hover:bg-background-error-active/20 hover:border-background-error-active/50 active:bg-background-error-active/10 active:border-line-error;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@utility surface-interactive-warning {
|
|
127
|
+
@apply hover:bg-background-warning-active/20 hover:border-background-warning-active/50 active:bg-background-warning-active/10 active:border-line-warning;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@utility surface-interactive-attention {
|
|
131
|
+
@apply hover:bg-background-attention-active/20 hover:border-background-attention-active/50 active:bg-background-attention-active/10 active:border-line-attention;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@utility surface-interactive-info {
|
|
135
|
+
@apply hover:bg-background-info-active/20 hover:border-background-info-active/50 active:bg-background-info-active/10 active:border-line-info;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@utility surface-interactive-brand {
|
|
139
|
+
@apply
|
|
140
|
+
surface-brand
|
|
141
|
+
hover:brightness-105
|
|
142
|
+
hover:border-brand-strong
|
|
143
|
+
active:border-brand-default
|
|
144
|
+
;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@utility surface-interactive {
|
|
148
|
+
@apply cursor-pointer hover:transition-colors include-interactive;
|
|
149
|
+
|
|
150
|
+
/* Interactive states for base surface */
|
|
151
|
+
&.surface {
|
|
152
|
+
@apply surface-interactive-neutral;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Interactive states for placeholder surface */
|
|
156
|
+
&.surface-placeholder {
|
|
157
|
+
@apply surface-interactive-placeholder;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Interactive states for elevated surface */
|
|
161
|
+
&.surface-elevated {
|
|
162
|
+
@apply hover:bg-background-surface-elevated/90 hover:border-line-hover active:bg-background-surface-elevated/75 active:border-line-strong;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Interactive states for sunken surface */
|
|
166
|
+
&.surface-sunken {
|
|
167
|
+
@apply hover:bg-background-surface hover:border-line-hover active:bg-background-page active:border-line-strong;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Interactive states for brand surface */
|
|
171
|
+
&.surface-brand {
|
|
172
|
+
@apply surface-interactive-brand;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Interactive states for success surface */
|
|
176
|
+
&.surface-success {
|
|
177
|
+
@apply surface-interactive-success;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Interactive states for error surface */
|
|
181
|
+
&.surface-error {
|
|
182
|
+
@apply surface-interactive-error;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Interactive states for warning surface */
|
|
186
|
+
&.surface-warning {
|
|
187
|
+
@apply surface-interactive-warning;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Interactive states for attention surface */
|
|
191
|
+
&.surface-attention {
|
|
192
|
+
@apply surface-interactive-attention;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Interactive states for info surface */
|
|
196
|
+
&.surface-info {
|
|
197
|
+
@apply surface-interactive-info;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@utility surface-claim {
|
|
202
|
+
@apply
|
|
203
|
+
relative
|
|
204
|
+
overflow-clip
|
|
205
|
+
rounded-full
|
|
206
|
+
bg-brand-moderate!
|
|
207
|
+
shadow-[inset_0_0_0_1px_var(--color-line-default)];
|
|
208
|
+
|
|
209
|
+
> *:not(.surface-claim_effect) {
|
|
210
|
+
@apply relative z-10;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@utility surface-claim_effect {
|
|
215
|
+
--claim-color-1: var(--color-brand-strong);
|
|
216
|
+
--claim-color-2: var(--color-brand-strong);
|
|
217
|
+
--claim-color-3: var(--color-text-inverted);
|
|
218
|
+
--claim-color-4: var(--color-text-inverted);
|
|
219
|
+
|
|
220
|
+
@apply
|
|
221
|
+
absolute
|
|
222
|
+
z-0
|
|
223
|
+
-inset-1.5
|
|
224
|
+
rounded-full
|
|
225
|
+
bg-white/10
|
|
226
|
+
text-white
|
|
227
|
+
overflow-clip
|
|
228
|
+
pointer-events-none;
|
|
229
|
+
|
|
230
|
+
&::before {
|
|
231
|
+
@apply content-['']
|
|
232
|
+
absolute
|
|
233
|
+
-inset-4
|
|
234
|
+
rounded-full
|
|
235
|
+
blur-[2px]
|
|
236
|
+
opacity-80
|
|
237
|
+
animate-rotate;
|
|
238
|
+
animation-duration: 4s;
|
|
239
|
+
background: conic-gradient(
|
|
240
|
+
from 0deg,
|
|
241
|
+
var(--claim-color-1) 0%,
|
|
242
|
+
var(--claim-color-2) 12.5%,
|
|
243
|
+
var(--claim-color-3) 25%,
|
|
244
|
+
var(--claim-color-4) 37.5%,
|
|
245
|
+
var(--claim-color-3) 50%,
|
|
246
|
+
var(--claim-color-2) 62.5%,
|
|
247
|
+
var(--claim-color-1) 75%,
|
|
248
|
+
transparent 75%,
|
|
249
|
+
transparent 100%
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
}
|
package/styles/tab.css
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/*----------------------------*/
|
|
2
|
+
/* TAB */
|
|
3
|
+
/*----------------------------*/
|
|
4
|
+
|
|
5
|
+
/* Tab list container */
|
|
6
|
+
@utility tab-list {
|
|
7
|
+
@apply flex gap-1 items-center;
|
|
8
|
+
|
|
9
|
+
/* Boxed variant needs a background */
|
|
10
|
+
&.tab-list-boxed {
|
|
11
|
+
@apply inline-flex rounded-xl;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Individual tab item */
|
|
16
|
+
@utility tab-item {
|
|
17
|
+
@apply font-semibold inline-flex relative gap-2 justify-center items-center px-4 py-2 text-sm whitespace-nowrap rounded-lg cursor-pointer select-none hover:transition-colors text-text-tertiary include-focus-visible;
|
|
18
|
+
|
|
19
|
+
> span {
|
|
20
|
+
@apply flex;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Icon styling */
|
|
24
|
+
> svg {
|
|
25
|
+
@apply size-5 shrink-0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Active state */
|
|
29
|
+
&.is-active {
|
|
30
|
+
@apply font-semibold text-text-brand;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:not(.is-disabled),
|
|
34
|
+
&:not([disabled]) {
|
|
35
|
+
&:active {
|
|
36
|
+
> span {
|
|
37
|
+
@apply translate-y-0.5;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Disabled state */
|
|
43
|
+
&.is-disabled {
|
|
44
|
+
@apply opacity-50 cursor-not-allowed active:outline-transparent;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Default underline variant */
|
|
48
|
+
&:not(.tab-boxed) {
|
|
49
|
+
@apply rounded-lg;
|
|
50
|
+
/* Underline indicator */
|
|
51
|
+
&::after {
|
|
52
|
+
@apply content-['']
|
|
53
|
+
absolute
|
|
54
|
+
bottom-0
|
|
55
|
+
inset-x-0
|
|
56
|
+
h-0.5
|
|
57
|
+
bg-brand-default
|
|
58
|
+
rounded-full
|
|
59
|
+
transition-transform
|
|
60
|
+
include-transition
|
|
61
|
+
scale-x-0
|
|
62
|
+
/* origin-right */;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.is-active ~ .tab-item::after {
|
|
66
|
+
@apply origin-left;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.is-active::after {
|
|
70
|
+
@apply scale-x-100;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Boxed variant */
|
|
76
|
+
.tab-list-boxed > .tab-item,
|
|
77
|
+
.tab-item.tab-boxed {
|
|
78
|
+
@apply rounded-full include-hover-primary;
|
|
79
|
+
|
|
80
|
+
&::after {
|
|
81
|
+
@apply hidden;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.is-disabled,
|
|
85
|
+
&[disabled] {
|
|
86
|
+
&::before {
|
|
87
|
+
@apply hidden;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.is-active {
|
|
92
|
+
@apply font-semibold include-hover-primary-active bg-background-surface text-text-brand;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Toggle variant */
|
|
97
|
+
|
|
98
|
+
@utility tab-list-toggle {
|
|
99
|
+
@apply relative gap-0 w-full;
|
|
100
|
+
|
|
101
|
+
&:not([class*="rounded-"]) {
|
|
102
|
+
@apply rounded-md;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& > .tab-item,
|
|
106
|
+
&::after {
|
|
107
|
+
@apply rounded-[inherit];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
& > .tab-item {
|
|
111
|
+
@apply relative z-10 flex-1 px-0 py-2;
|
|
112
|
+
&::after {
|
|
113
|
+
@apply hidden;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&::after {
|
|
118
|
+
@apply content-[''] absolute z-0 surface inset-y-0 transition-[left] duration-300 ease-out-quart shadow-sm;
|
|
119
|
+
width: calc(100% / var(--tab-count));
|
|
120
|
+
left: var(--tab-distance);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Count number of direct tab-item children using :has */
|
|
124
|
+
&:has(> .tab-item:first-child:nth-last-child(1)) {
|
|
125
|
+
--tab-count: 1;
|
|
126
|
+
}
|
|
127
|
+
&:has(> .tab-item:first-child:nth-last-child(2)) {
|
|
128
|
+
--tab-count: 2;
|
|
129
|
+
}
|
|
130
|
+
&:has(> .tab-item:first-child:nth-last-child(3)) {
|
|
131
|
+
--tab-count: 3;
|
|
132
|
+
}
|
|
133
|
+
&:has(> .tab-item:first-child:nth-last-child(4)) {
|
|
134
|
+
--tab-count: 4;
|
|
135
|
+
}
|
|
136
|
+
&:has(> .tab-item:first-child:nth-last-child(5)) {
|
|
137
|
+
--tab-count: 5;
|
|
138
|
+
}
|
|
139
|
+
&:has(> .tab-item:first-child:nth-last-child(6)) {
|
|
140
|
+
--tab-count: 6;
|
|
141
|
+
}
|
|
142
|
+
&:has(> .tab-item:first-child:nth-last-child(7)) {
|
|
143
|
+
--tab-count: 7;
|
|
144
|
+
}
|
|
145
|
+
&:has(> .tab-item:first-child:nth-last-child(8)) {
|
|
146
|
+
--tab-count: 8;
|
|
147
|
+
}
|
|
148
|
+
&:has(> .tab-item:first-child:nth-last-child(9)) {
|
|
149
|
+
--tab-count: 9;
|
|
150
|
+
}
|
|
151
|
+
&:has(> .tab-item:first-child:nth-last-child(10)) {
|
|
152
|
+
--tab-count: 10;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:has(> .tab-item:nth-child(1).is-active) {
|
|
156
|
+
--tab-distance: 0;
|
|
157
|
+
}
|
|
158
|
+
&:has(> .tab-item:nth-child(2).is-active) {
|
|
159
|
+
--tab-distance: calc((100% / var(--tab-count)));
|
|
160
|
+
}
|
|
161
|
+
&:has(> .tab-item:nth-child(3).is-active) {
|
|
162
|
+
--tab-distance: calc((100% / var(--tab-count)) * 2);
|
|
163
|
+
}
|
|
164
|
+
&:has(> .tab-item:nth-child(4).is-active) {
|
|
165
|
+
--tab-distance: calc((100% / var(--tab-count)) * 3);
|
|
166
|
+
}
|
|
167
|
+
&:has(> .tab-item:nth-child(5).is-active) {
|
|
168
|
+
--tab-distance: calc((100% / var(--tab-count)) * 4);
|
|
169
|
+
}
|
|
170
|
+
&:has(> .tab-item:nth-child(6).is-active) {
|
|
171
|
+
--tab-distance: calc((100% / var(--tab-count)) * 5);
|
|
172
|
+
}
|
|
173
|
+
&:has(> .tab-item:nth-child(7).is-active) {
|
|
174
|
+
--tab-distance: calc((100% / var(--tab-count)) * 6);
|
|
175
|
+
}
|
|
176
|
+
&:has(> .tab-item:nth-child(8).is-active) {
|
|
177
|
+
--tab-distance: calc((100% / var(--tab-count)) * 7);
|
|
178
|
+
}
|
|
179
|
+
&:has(> .tab-item:nth-child(9).is-active) {
|
|
180
|
+
--tab-distance: calc((100% / var(--tab-count)) * 8);
|
|
181
|
+
}
|
|
182
|
+
&:has(> .tab-item:nth-child(10).is-active) {
|
|
183
|
+
--tab-distance: calc((100% / var(--tab-count)) * 9);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Size variants */
|
|
188
|
+
@utility tab-xs {
|
|
189
|
+
@apply gap-1 px-2 py-1 text-xs;
|
|
190
|
+
> svg {
|
|
191
|
+
@apply size-4;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@utility tab-sm {
|
|
196
|
+
@apply gap-1.5 px-3 py-1.5 text-sm;
|
|
197
|
+
> svg {
|
|
198
|
+
@apply size-[18px];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@utility tab-lg {
|
|
203
|
+
@apply gap-2 px-5 py-2.5 text-base;
|
|
204
|
+
> svg {
|
|
205
|
+
@apply size-6;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Roundness variants */
|
|
210
|
+
@utility tab-rounded-none {
|
|
211
|
+
&,
|
|
212
|
+
& .tab-item {
|
|
213
|
+
&,
|
|
214
|
+
&::before {
|
|
215
|
+
@apply rounded-none;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@utility tab-rounded-sm {
|
|
221
|
+
&,
|
|
222
|
+
& .tab-item {
|
|
223
|
+
&,
|
|
224
|
+
&::before {
|
|
225
|
+
@apply rounded-sm;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@utility tab-rounded-md {
|
|
231
|
+
&,
|
|
232
|
+
& .tab-item {
|
|
233
|
+
&,
|
|
234
|
+
&::before {
|
|
235
|
+
@apply rounded-md;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@utility tab-rounded-lg {
|
|
241
|
+
&,
|
|
242
|
+
& .tab-item {
|
|
243
|
+
&,
|
|
244
|
+
&::before {
|
|
245
|
+
@apply rounded-lg;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@utility tab-rounded-xl {
|
|
251
|
+
&,
|
|
252
|
+
& .tab-item {
|
|
253
|
+
&,
|
|
254
|
+
&::before {
|
|
255
|
+
@apply rounded-xl;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@utility tab-rounded-2xl {
|
|
261
|
+
&,
|
|
262
|
+
& .tab-item {
|
|
263
|
+
&,
|
|
264
|
+
&::before {
|
|
265
|
+
@apply rounded-2xl;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@utility tab-rounded-full {
|
|
271
|
+
&,
|
|
272
|
+
& .tab-item {
|
|
273
|
+
&,
|
|
274
|
+
&::before {
|
|
275
|
+
@apply rounded-full;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Full width tabs */
|
|
281
|
+
@utility tab-list-full {
|
|
282
|
+
@apply w-full;
|
|
283
|
+
.tab-item {
|
|
284
|
+
@apply flex-1;
|
|
285
|
+
}
|
|
286
|
+
}
|