@central-ui/react 0.4.0 → 0.5.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.
@@ -1,55 +1,93 @@
1
1
  /* stepper */
2
2
  @layer components {
3
3
  :where(:not([data-style-disabled])) {
4
- &:where([data-component='stepper-list']) {
5
- @apply flex w-full flex-col gap-1.5;
6
- &[data-orientation='horizontal'] {
7
- @apply flex-row;
8
- }
4
+ /* Steps on the left of the current Content */
5
+ &:where([data-component='stepper-container']) {
6
+ @apply flex w-full items-start gap-8;
7
+ }
8
+
9
+ &:where([data-component='stepper-itemslist']) {
10
+ @apply flex w-56 shrink-0 flex-col;
11
+ }
12
+
13
+ &:where([data-component='stepper-body']) {
14
+ @apply flex min-w-0 flex-col gap-3;
9
15
  }
10
16
 
17
+ &:where([data-component='stepper-footer']) {
18
+ @apply flex items-center gap-2;
19
+ }
20
+
21
+ /* Indicator on the left, spanning the meta, title and description stacked beside it */
11
22
  &:where([data-component='stepper-item']) {
12
- @apply relative flex w-full items-stretch gap-3;
13
- &[data-orientation='horizontal'] {
14
- @apply flex-1;
23
+ @apply grid w-full cursor-pointer grid-cols-[auto_1fr] content-start gap-x-3 pb-7 text-left outline-none last:pb-0 focus-visible:rounded-lg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500;
24
+ /* Steps move only with Previous and Next */
25
+ &[data-prevent-clicks] {
26
+ @apply cursor-default;
15
27
  }
16
28
  }
17
29
 
18
30
  &:where([data-component='stepper-indicator']) {
19
- @apply flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-neutral-300;
31
+ @apply row-span-3 flex aspect-square size-6.5 shrink-0 items-center justify-center rounded-full text-xs font-semibold tabular-nums transition-colors duration-200;
32
+ &[data-incomplete] {
33
+ @apply bg-neutral-200 text-neutral-500;
34
+ }
35
+ &[data-current] {
36
+ @apply bg-blue-600 text-white ring-4 ring-blue-200;
37
+ }
38
+ &[data-complete] {
39
+ @apply bg-neutral-800 text-white;
40
+ }
20
41
  }
21
42
 
22
- &:where([data-component='stepper-indicator'])[data-completed] {
23
- @apply bg-neutral-800;
43
+ &:where([data-component='stepper-indicatoricon']) {
44
+ @apply size-3.5 shrink-0;
24
45
  }
25
46
 
26
- &:where([data-component='stepper-indicator'])
27
- &:where([data-component='stepper-indicator-1']) {
28
- @apply h-3.5 w-fit shrink-0 text-white;
47
+ /* Optional small text above the title, centered on the Indicator */
48
+ &:where([data-component='stepper-itemmeta']) {
49
+ @apply col-start-2 text-xs leading-6.5 text-neutral-500;
50
+ &[data-incomplete] {
51
+ @apply text-neutral-400;
52
+ }
29
53
  }
30
54
 
31
- &:where([data-component='stepper-indicator'])
32
- &:where([data-component='stepper-indicator-2']) {
33
- @apply h-2 w-2 rounded-full bg-white;
55
+ &:where([data-component='stepper-itemtitle']) {
56
+ @apply col-start-2 text-[0.95rem] font-semibold leading-5 text-neutral-950;
57
+ /* Centered on the Indicator when no ItemMeta comes first */
58
+ :where([data-component='stepper-indicator']) + & {
59
+ @apply leading-6.5;
60
+ }
61
+ &[data-incomplete] {
62
+ @apply text-neutral-400;
63
+ }
34
64
  }
35
65
 
66
+ &:where([data-component='stepper-itemdescription']) {
67
+ @apply col-start-2 truncate text-sm text-neutral-600;
68
+ &[data-incomplete] {
69
+ @apply text-neutral-400;
70
+ }
71
+ }
72
+
73
+ /* The line from this step's Indicator down to the next one; top and bottom set its gaps from both Indicators */
36
74
  &:where([data-component='stepper-separator']) {
37
- @apply absolute top-7 bottom-0 left-3 w-px bg-neutral-300 data-[complete]:bg-neutral-700;
38
- &[data-orientation='horizontal'] {
39
- @apply top-3 right-0 bottom-auto left-7 h-px w-auto;
75
+ @apply top-8.5 bottom-1 left-3.25 w-px -translate-x-1/2 bg-neutral-300;
76
+ &[data-complete] {
77
+ @apply bg-neutral-800;
40
78
  }
41
79
  }
42
80
 
81
+ /* Body above Footer; only while shown, since its hidden attribute must keep hiding it */
43
82
  &:where([data-component='stepper-content']) {
44
- @apply w-full p-3;
83
+ @apply min-w-0 flex-1;
84
+ &:not([hidden]) {
85
+ @apply flex flex-col gap-4;
86
+ }
45
87
  }
46
88
 
47
89
  &:where([data-component='stepper-completedcontent']) {
48
- @apply w-full rounded-lg bg-green-50 p-3 text-sm leading-relaxed text-green-800;
49
- }
50
-
51
- &:where([data-component='stepper-openbutton']) {
52
- @apply flex w-full cursor-pointer items-start gap-3 pb-5 text-left text-[0.95rem] font-semibold text-neutral-900 outline-none disabled:pointer-events-none disabled:opacity-30;
90
+ @apply min-w-0 flex-1 rounded-xl bg-green-50 p-3 text-sm leading-relaxed text-green-800;
53
91
  }
54
92
  }
55
93
  }
@@ -7,6 +7,7 @@
7
7
  @import './shopify-polaris-legacy-button.css';
8
8
  @import './shopify-polaris-legacy-card.css';
9
9
  @import './shopify-polaris-legacy-carousel.css';
10
+ @import './shopify-polaris-legacy-pagination.css';
10
11
  @import './shopify-polaris-legacy-checkbox.css';
11
12
  @import './shopify-polaris-legacy-combobox.css';
12
13
  @import './shopify-polaris-legacy-datepicker.css';