@central-ui/react 0.1.0 → 0.1.2
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 +6 -4
- package/dist/components/accordion/index.d.ts +3 -3
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/accordion/index.js +7 -7
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/autocomplete/index.d.ts +8 -8
- package/dist/components/autocomplete/index.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +29 -28
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.js +6 -5
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/banner/index.d.ts.map +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/banner/index.js.map +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/checkbox/index.js +10 -10
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/combobox/index.d.ts +15 -15
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/index.js +36 -35
- package/dist/components/combobox/index.js.map +1 -1
- package/dist/components/datepicker/index.d.ts +36 -24
- package/dist/components/datepicker/index.d.ts.map +1 -1
- package/dist/components/datepicker/index.js +33 -10
- package/dist/components/datepicker/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/index.js +11 -11
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/drawer/index.d.ts +3 -3
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +14 -14
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/fileupload/index.js +1 -1
- package/dist/components/fileupload/index.js.map +1 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +13 -13
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +5 -5
- package/dist/components/menu/index.d.ts.map +1 -1
- package/dist/components/menu/index.js +22 -22
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/numberinput/index.d.ts +2 -2
- package/dist/components/numberinput/index.d.ts.map +1 -1
- package/dist/components/numberinput/index.js +19 -19
- package/dist/components/numberinput/index.js.map +1 -1
- package/dist/components/otpinput/index.d.ts.map +1 -1
- package/dist/components/otpinput/index.js +10 -10
- package/dist/components/otpinput/index.js.map +1 -1
- package/dist/components/page/index.js +1 -1
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/passwordinput/index.d.ts +2 -2
- package/dist/components/passwordinput/index.d.ts.map +1 -1
- package/dist/components/passwordinput/index.js +13 -13
- package/dist/components/passwordinput/index.js.map +1 -1
- package/dist/components/popover/index.js +8 -8
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/radio/index.js +13 -13
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/ratinginput/index.d.ts +2 -2
- package/dist/components/ratinginput/index.d.ts.map +1 -1
- package/dist/components/ratinginput/index.js +1 -1
- package/dist/components/ratinginput/index.js.map +1 -1
- package/dist/components/select/index.d.ts +4 -4
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +18 -18
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/slider/index.js +13 -13
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/spinner/index.d.ts +2 -2
- package/dist/components/spinner/index.d.ts.map +1 -1
- package/dist/components/spinner/index.js.map +1 -1
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.js.map +1 -1
- package/dist/components/switch/index.js +8 -8
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/table/index.js +3 -3
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/tabs/index.d.ts.map +1 -1
- package/dist/components/tabs/index.js +5 -5
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/textarea/index.d.ts +2 -2
- package/dist/components/textarea/index.d.ts.map +1 -1
- package/dist/components/textarea/index.js +12 -12
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/toast/index.d.ts.map +1 -1
- package/dist/components/toast/index.js +10 -10
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toggle/index.d.ts +5 -5
- package/dist/components/toggle/index.d.ts.map +1 -1
- package/dist/components/toggle/index.js +4 -4
- package/dist/components/toggle/index.js.map +1 -1
- package/dist/components/tooltip/index.js +3 -3
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/types/Icon.d.ts +11 -0
- package/dist/types/Icon.d.ts.map +1 -0
- package/dist/types/Icon.js +2 -0
- package/dist/types/Icon.js.map +1 -0
- package/dist/utils/ArkStateToDataAttributes.d.ts.map +1 -1
- package/dist/utils/ArkStateToDataAttributes.js +3 -1
- package/dist/utils/ArkStateToDataAttributes.js.map +1 -1
- package/dist/utils/Tone.js +1 -1
- package/dist/utils/Tone.js.map +1 -1
- package/dist/utils/useForwardClickToInput.d.ts.map +1 -1
- package/dist/utils/useForwardClickToInput.js +4 -2
- package/dist/utils/useForwardClickToInput.js.map +1 -1
- package/package.json +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-autocomplete.css +13 -4
- package/src/presets/shopify-polaris/shopify-polaris-badge.css +1 -1
- package/src/presets/shopify-polaris/shopify-polaris-chip.css +3 -3
- package/src/presets/shopify-polaris/shopify-polaris-combobox.css +17 -8
- package/src/presets/shopify-polaris/shopify-polaris-datepicker.css +16 -7
- package/src/presets/shopify-polaris/shopify-polaris-input.css +12 -3
- package/src/presets/shopify-polaris/shopify-polaris-menu.css +31 -6
- package/src/presets/shopify-polaris/shopify-polaris-numberinput.css +14 -5
- package/src/presets/shopify-polaris/shopify-polaris-otpinput.css +1 -1
- package/src/presets/shopify-polaris/shopify-polaris-passwordinput.css +12 -3
- package/src/presets/shopify-polaris/shopify-polaris-select.css +13 -4
- package/src/presets/shopify-polaris/shopify-polaris-textarea.css +11 -2
- package/src/presets/shopify-polaris/shopify-polaris-toast.css +43 -0
- package/src/presets/shopify-polaris/shopify-polaris.css +1 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@layer components {
|
|
3
3
|
:where(:not([data-style-disabled])) {
|
|
4
4
|
&:where([data-component='otpinput-input']) {
|
|
5
|
-
@apply m-0 h-
|
|
5
|
+
@apply m-0 h-9.5 aspect-square w-9.5 rounded-xl border border-neutral-300 bg-white p-0 text-center text-base text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus:border-blue-500 focus:ring-2 focus:ring-blue-500/10 focus:shadow-sm data-disabled:cursor-not-allowed data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:bg-neutral-50 placeholder:text-neutral-600;
|
|
6
6
|
&[data-tone='invalid'] {
|
|
7
7
|
@apply border-red-500 focus:border-red-500 focus:ring-red-500/10;
|
|
8
8
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
@layer components {
|
|
3
3
|
:where(:not([data-style-disabled])) {
|
|
4
4
|
&:where([data-component='passwordinput-input']) {
|
|
5
|
-
@apply min-w-12 flex-1 h-
|
|
5
|
+
@apply min-w-12 flex-1 h-8 rounded-none border-0 bg-transparent px-2.5 py-0 text-sm text-neutral-950 shadow-none outline-none placeholder:text-sm placeholder:text-neutral-600 hover:bg-transparent focus:outline-none disabled:cursor-not-allowed disabled:text-neutral-400;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&:where([data-component='passwordinput-inputgroup']) {
|
|
9
|
-
@apply p-0 flex w-full min-w-0 items-center overflow-hidden rounded-xl border border-neutral-
|
|
9
|
+
@apply p-0 flex w-full min-w-0 items-center overflow-hidden rounded-xl border border-neutral-300 bg-white text-[0.8rem] text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-within:border-blue-500 focus-within:ring-2 focus-within:ring-blue-500/10 focus-within:shadow-sm data-disabled:cursor-not-allowed data-disabled:border-neutral-200 data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:cursor-not-allowed data-readonly:border-neutral-200 data-readonly:bg-neutral-50 data-readonly:hover:bg-neutral-50 data-readonly:shadow-none;
|
|
10
10
|
&[data-tone='invalid'] {
|
|
11
11
|
@apply border-red-500 focus-within:border-red-500 focus-within:ring-red-500/10;
|
|
12
12
|
}
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
&:where([data-component='passwordinput-inputgroup'])
|
|
19
|
+
:where(
|
|
20
|
+
svg:not([data-style-disabled]):not(
|
|
21
|
+
[data-component='combobox-chipremovebuttonicon']
|
|
22
|
+
):not([data-component='chip-closebuttonicon'])
|
|
23
|
+
) {
|
|
24
|
+
@apply text-neutral-600;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
&:where([data-component='passwordinput-container']) {
|
|
19
28
|
@apply flex flex-col gap-1.5 w-full;
|
|
20
29
|
}
|
|
@@ -36,7 +45,7 @@
|
|
|
36
45
|
}
|
|
37
46
|
|
|
38
47
|
&:where([data-component='passwordinput-addon']) {
|
|
39
|
-
@apply inline-flex h-
|
|
48
|
+
@apply inline-flex h-8 shrink-0 items-center gap-2 empty:hidden px-2 py-1;
|
|
40
49
|
&[data-variant='emphasized'] {
|
|
41
50
|
@apply bg-neutral-200/60;
|
|
42
51
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&:where([data-component='select-openbuttonvalue']) {
|
|
13
|
-
@apply min-w-0 shrink-0 truncate text-left text-inherit data-placeholder:text-neutral-
|
|
13
|
+
@apply min-w-0 shrink-0 truncate text-left text-inherit data-placeholder:text-neutral-600 data-disabled:text-neutral-400;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&:where([data-component='select-scrollarea']) {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&:where([data-component='select-item']) {
|
|
33
|
-
@apply flex h-
|
|
33
|
+
@apply flex h-7 w-full shrink-0 cursor-pointer items-center justify-between gap-2 rounded-xl px-2 text-sm font-normal text-nowrap text-neutral-950 outline-none data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-30 data-highlighted:bg-neutral-100 active:bg-neutral-200;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&:where([data-component='select-popup']) {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&:where([data-component='select-openbutton']) {
|
|
60
|
-
@apply flex h-
|
|
60
|
+
@apply flex h-8.5 w-fit shrink-0 cursor-pointer items-center justify-center gap-0 overflow-hidden rounded-xl border border-neutral-300 bg-white px-2.5 text-sm font-normal text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-visible:border-blue-500 focus-visible:ring-2 focus-visible:ring-blue-500/10 focus-visible:shadow-sm disabled:pointer-events-none disabled:bg-white disabled:text-neutral-400 disabled:shadow-none data-popup-open:border-blue-500 data-popup-open:ring-2 data-popup-open:ring-blue-500/10 data-popup-open:shadow-sm;
|
|
61
61
|
&[data-tone='invalid'] {
|
|
62
62
|
@apply border-red-500 focus-visible:border-red-500 focus-visible:ring-red-500/10 data-popup-open:border-red-500 data-popup-open:ring-red-500/10;
|
|
63
63
|
}
|
|
@@ -66,6 +66,15 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
&:where([data-component='select-openbutton'])
|
|
70
|
+
:where(
|
|
71
|
+
svg:not([data-style-disabled]):not(
|
|
72
|
+
[data-component='combobox-chipremovebuttonicon']
|
|
73
|
+
):not([data-component='chip-closebuttonicon'])
|
|
74
|
+
) {
|
|
75
|
+
@apply text-neutral-600;
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
&:where([data-component='select-grouplabel']) {
|
|
70
79
|
@apply shrink-0 px-2 py-1 text-xs leading-4 font-normal text-neutral-600;
|
|
71
80
|
}
|
|
@@ -91,7 +100,7 @@
|
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
&:where([data-component='select-openbuttonicon']) {
|
|
94
|
-
@apply ml-1.75 h-4 w-fit shrink-0 text-
|
|
103
|
+
@apply ml-1.75 h-4 w-fit shrink-0 text-neutral-600;
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
&:where([data-component='select-itemindicator']) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
@layer components {
|
|
3
3
|
:where(:not([data-style-disabled])) {
|
|
4
4
|
&:where([data-component='textarea-textarea']) {
|
|
5
|
-
@apply min-h-
|
|
5
|
+
@apply min-h-41 w-full min-w-0 flex-1 self-stretch resize-none rounded-none border-0 bg-transparent px-2.5 py-2 text-sm text-neutral-950 shadow-none outline-none placeholder:text-sm placeholder:text-neutral-600 hover:bg-transparent focus:outline-none disabled:cursor-not-allowed disabled:text-neutral-500;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&:where([data-component='textarea-textareagroup']) {
|
|
9
|
-
@apply p-0 flex w-full min-w-0 flex-col items-stretch overflow-hidden rounded-xl border border-neutral-
|
|
9
|
+
@apply p-0 flex w-full min-w-0 flex-col items-stretch overflow-hidden rounded-xl border border-neutral-300 bg-white text-[0.8rem] text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-within:border-blue-500 focus-within:ring-2 focus-within:ring-blue-500/10 focus-within:shadow-sm data-disabled:cursor-not-allowed data-disabled:border-neutral-200 data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:cursor-not-allowed data-readonly:border-neutral-200 data-readonly:bg-neutral-50 data-readonly:hover:bg-neutral-50 data-readonly:shadow-none;
|
|
10
10
|
&[data-tone='invalid'] {
|
|
11
11
|
@apply border-red-500 focus-within:border-red-500 focus-within:ring-red-500/10;
|
|
12
12
|
}
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
&:where([data-component='textarea-textareagroup'])
|
|
19
|
+
:where(
|
|
20
|
+
svg:not([data-style-disabled]):not(
|
|
21
|
+
[data-component='combobox-chipremovebuttonicon']
|
|
22
|
+
):not([data-component='chip-closebuttonicon'])
|
|
23
|
+
) {
|
|
24
|
+
@apply text-neutral-600;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
&:where([data-component='textarea-container']) {
|
|
19
28
|
@apply flex flex-col gap-1.5 w-full;
|
|
20
29
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* toast */
|
|
2
|
+
@layer components {
|
|
3
|
+
:where(:not([data-style-disabled])) {
|
|
4
|
+
&:where([data-component='toast-toast']) {
|
|
5
|
+
@apply absolute bottom-0 left-0 w-full rounded-lg bg-neutral-800 px-3.5 py-3.25 text-white shadow-lg;
|
|
6
|
+
&[data-tone='error'] {
|
|
7
|
+
@apply bg-red-600;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:where([data-component='toast-toast'])
|
|
12
|
+
&:where([data-component='toast-toast-1']) {
|
|
13
|
+
@apply grid w-full grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-x-2 transition-opacity duration-250 data-behind:opacity-0 data-expanded:opacity-100;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:where([data-component='toast-icon']) {
|
|
17
|
+
@apply col-start-1 row-start-1 h-5 w-fit shrink-0 text-white;
|
|
18
|
+
&[data-tone='success'] {
|
|
19
|
+
@apply text-green-400;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:where([data-component='toast-title']) {
|
|
24
|
+
@apply text-sm font-semibold leading-normal text-white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:where([data-component='toast-description']) {
|
|
28
|
+
@apply min-w-0 text-sm leading-normal text-white;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:where([data-component='toast-closebutton']) {
|
|
32
|
+
@apply col-start-4 row-start-1 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-lg text-white outline-none hover:bg-white/15 active:bg-white/25 focus-visible:outline-2 focus-visible:outline-white disabled:pointer-events-none disabled:opacity-30;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:where([data-component='toast-actionbutton']) {
|
|
36
|
+
@apply col-start-3 row-start-1 flex h-7.5 w-fit cursor-pointer items-center justify-center gap-1 rounded-lg bg-white px-[0.7rem] text-[0.8rem] font-semibold text-nowrap text-neutral-700 shadow-[0_-1px_0_0_#b5b5b5_inset,0_0_0_1px_rgba(0,0,0,0.1)_inset,0_0.5px_0_1.5px_#fff_inset] hover:bg-neutral-50 active:pt-[0.1rem] active:shadow-[0px_2px_1px_0px_rgba(0,0,0,0.19)_inset,0px_0px_0px_50px_rgba(0,0,0,0.025)_inset,0px_-1px_1px_0px_rgba(0,0,0,0.1)_inset] disabled:pointer-events-none disabled:opacity-50;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:where([data-component='toast-closebuttonicon']) {
|
|
40
|
+
@apply h-4 w-fit shrink-0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
@import './shopify-polaris-divider.css';
|
|
40
40
|
@import './shopify-polaris-breadcrumb.css';
|
|
41
41
|
@import './shopify-polaris-form.css';
|
|
42
|
+
@import './shopify-polaris-toast.css';
|
|
42
43
|
|
|
43
44
|
/* Global foundation and animations shared by the Polaris preset. */
|
|
44
45
|
@custom-variant screen-mobile (@media (max-width: 400px));
|