@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.
- package/dist/components/pagination/index.d.ts +158 -0
- package/dist/components/pagination/index.js +157 -0
- package/dist/components/stepper/index.d.ts +135 -45
- package/dist/components/stepper/index.js +185 -64
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/icons.d.ts +12 -0
- package/dist/utils/icons.js +13 -0
- package/package.json +1 -1
- package/src/presets/shopify-polaris/shopify-polaris-pagination.css +55 -0
- package/src/presets/shopify-polaris/shopify-polaris-stepper.css +63 -27
- package/src/presets/shopify-polaris/shopify-polaris.css +1 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-pagination.css +49 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +64 -26
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +1 -0
|
@@ -1,55 +1,93 @@
|
|
|
1
1
|
/* stepper */
|
|
2
2
|
@layer components {
|
|
3
3
|
:where(:not([data-style-disabled])) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
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-
|
|
23
|
-
@apply
|
|
43
|
+
&:where([data-component='stepper-indicatoricon']) {
|
|
44
|
+
@apply size-3.5 shrink-0;
|
|
24
45
|
}
|
|
25
46
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@apply
|
|
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-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
38
|
-
&[data-
|
|
39
|
-
@apply
|
|
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-
|
|
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-
|
|
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';
|