@canlooks/can-ui 0.0.98 → 0.0.100

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.
Files changed (185) hide show
  1. package/dist/cjs/components/accordion/accordion.style.js +88 -86
  2. package/dist/cjs/components/actionSheet/actionSheet.style.js +35 -33
  3. package/dist/cjs/components/alert/alert.style.js +44 -42
  4. package/dist/cjs/components/anchorList/anchorList.style.js +40 -38
  5. package/dist/cjs/components/app/app.style.js +24 -17
  6. package/dist/cjs/components/avatar/avatar.style.js +22 -20
  7. package/dist/cjs/components/avatar/avatarGroup.style.js +24 -22
  8. package/dist/cjs/components/backdrop/backdrop.style.js +11 -9
  9. package/dist/cjs/components/badge/badge.style.js +42 -40
  10. package/dist/cjs/components/bottomNavigation/bottomNavigation.style.js +61 -59
  11. package/dist/cjs/components/boundary/errorBoundary.style.js +11 -9
  12. package/dist/cjs/components/breadcrumb/breadcrumb.style.js +8 -6
  13. package/dist/cjs/components/bubble/bubble.style.js +10 -8
  14. package/dist/cjs/components/bubbleConfirm/bubbleConfirm.style.js +37 -35
  15. package/dist/cjs/components/button/button.style.js +219 -197
  16. package/dist/cjs/components/calendar/calendar.style.js +93 -91
  17. package/dist/cjs/components/card/card.style.js +47 -44
  18. package/dist/cjs/components/cascade/cascade.style.js +58 -54
  19. package/dist/cjs/components/checkboxBase/checkboxBase.style.js +122 -120
  20. package/dist/cjs/components/colorPicker/colorPicker.style.js +68 -64
  21. package/dist/cjs/components/counter/counter.style.js +19 -17
  22. package/dist/cjs/components/curd/curd.style.js +70 -66
  23. package/dist/cjs/components/curd/curdColumnConfig.style.js +17 -15
  24. package/dist/cjs/components/dataGrid/dataGrid.style.js +113 -111
  25. package/dist/cjs/components/dateTimePicker/dateTimePicker.style.js +31 -27
  26. package/dist/cjs/components/dateTimePicker/timer.style.js +29 -27
  27. package/dist/cjs/components/dateTimeRangePicker/dateTimeRangePicker.style.js +7 -5
  28. package/dist/cjs/components/descriptions/descriptions.style.js +99 -95
  29. package/dist/cjs/components/dialog/dialog.style.js +98 -96
  30. package/dist/cjs/components/divider/divider.style.js +17 -15
  31. package/dist/cjs/components/drawer/drawer.style.js +78 -77
  32. package/dist/cjs/components/dropdown/dropdown.style.js +10 -8
  33. package/dist/cjs/components/form/form.style.js +27 -25
  34. package/dist/cjs/components/gallery/gallery.style.js +82 -80
  35. package/dist/cjs/components/image/image.style.js +35 -33
  36. package/dist/cjs/components/input/input.style.js +27 -26
  37. package/dist/cjs/components/inputBase/inputBase.style.js +164 -162
  38. package/dist/cjs/components/loading/loading.style.js +17 -15
  39. package/dist/cjs/components/loadingIndicator/loadingIndicator.style.js +10 -8
  40. package/dist/cjs/components/loadingMask/loadingMask.style.js +19 -17
  41. package/dist/cjs/components/menu/menu.style.js +3 -1
  42. package/dist/cjs/components/menuItem/menuItem.style.js +94 -90
  43. package/dist/cjs/components/modal/modal.style.js +11 -9
  44. package/dist/cjs/components/optionsBase/optionsBase.style.js +10 -8
  45. package/dist/cjs/components/overlayBase/overlayBase.style.js +15 -13
  46. package/dist/cjs/components/pagination/pagination.style.js +31 -29
  47. package/dist/cjs/components/palette/palette.style.d.ts +1 -1
  48. package/dist/cjs/components/palette/palette.style.js +115 -113
  49. package/dist/cjs/components/pickerDialog/pickerDialog.style.js +25 -23
  50. package/dist/cjs/components/pinchable/pinchable.style.js +10 -8
  51. package/dist/cjs/components/placeholder/placeholder.style.js +28 -26
  52. package/dist/cjs/components/popper/popper.style.js +43 -39
  53. package/dist/cjs/components/progress/progress.style.js +111 -111
  54. package/dist/cjs/components/rating/rating.style.js +52 -50
  55. package/dist/cjs/components/resizable/resizable.style.js +229 -223
  56. package/dist/cjs/components/scrollbar/scrollbar.style.js +71 -69
  57. package/dist/cjs/components/segmented/segmented.style.js +79 -77
  58. package/dist/cjs/components/select/select.style.js +36 -34
  59. package/dist/cjs/components/selectedList/selectedList.style.js +9 -7
  60. package/dist/cjs/components/serialInput/serialInput.style.js +4 -2
  61. package/dist/cjs/components/skeleton/skeleton.style.js +53 -47
  62. package/dist/cjs/components/slidableActions/slidableActions.style.js +45 -43
  63. package/dist/cjs/components/slider/slider.style.js +129 -127
  64. package/dist/cjs/components/snackbarBase/snackbarBase.style.js +96 -94
  65. package/dist/cjs/components/status/status.style.js +13 -11
  66. package/dist/cjs/components/stepper/step.style.js +217 -216
  67. package/dist/cjs/components/stepper/stepper.style.js +5 -3
  68. package/dist/cjs/components/switch/switch.style.js +73 -71
  69. package/dist/cjs/components/table/table.style.js +83 -81
  70. package/dist/cjs/components/table/tableSticky.style.js +33 -31
  71. package/dist/cjs/components/tabs/tabs.style.js +161 -159
  72. package/dist/cjs/components/tabs/tabsEllipsis.style.js +5 -3
  73. package/dist/cjs/components/tag/tag.style.js +96 -94
  74. package/dist/cjs/components/textarea/textarea.style.js +27 -25
  75. package/dist/cjs/components/theme/themeVariables.d.ts +1 -0
  76. package/dist/cjs/components/theme/themeVariables.js +3 -1
  77. package/dist/cjs/components/timeline/timeline.style.js +112 -108
  78. package/dist/cjs/components/toggleButton/toggleButton.style.js +7 -5
  79. package/dist/cjs/components/tooltip/tooltip.style.js +13 -11
  80. package/dist/cjs/components/touchRipple/touchRipple.style.js +19 -17
  81. package/dist/cjs/components/transfer/transfer.style.js +42 -40
  82. package/dist/cjs/components/transitionBase/transitionBase.style.js +101 -94
  83. package/dist/cjs/components/transportStyle/transportStyle.style.d.ts +1 -0
  84. package/dist/cjs/components/transportStyle/transportStyle.style.js +57 -0
  85. package/dist/cjs/components/tree/tree.style.js +83 -79
  86. package/dist/cjs/components/tree/treeDnd.style.js +131 -129
  87. package/dist/cjs/components/treeSelect/treeSelect.style.js +35 -33
  88. package/dist/cjs/components/typography/typography.style.js +98 -96
  89. package/dist/cjs/components/upload/dropArea.style.js +31 -29
  90. package/dist/cjs/components/upload/upload.style.js +106 -104
  91. package/dist/cjs/components/waterfall/waterfall.style.js +7 -5
  92. package/dist/cjs/extensions/documentViewer/documentViewer.style.js +43 -41
  93. package/dist/esm/components/accordion/accordion.style.js +88 -86
  94. package/dist/esm/components/actionSheet/actionSheet.style.js +35 -33
  95. package/dist/esm/components/alert/alert.style.js +44 -42
  96. package/dist/esm/components/anchorList/anchorList.style.js +40 -38
  97. package/dist/esm/components/app/app.style.js +24 -17
  98. package/dist/esm/components/avatar/avatar.style.js +22 -20
  99. package/dist/esm/components/avatar/avatarGroup.style.js +24 -22
  100. package/dist/esm/components/backdrop/backdrop.style.js +11 -9
  101. package/dist/esm/components/badge/badge.style.js +42 -40
  102. package/dist/esm/components/bottomNavigation/bottomNavigation.style.js +61 -59
  103. package/dist/esm/components/boundary/errorBoundary.style.js +11 -9
  104. package/dist/esm/components/breadcrumb/breadcrumb.style.js +8 -6
  105. package/dist/esm/components/bubble/bubble.style.js +10 -8
  106. package/dist/esm/components/bubbleConfirm/bubbleConfirm.style.js +37 -35
  107. package/dist/esm/components/button/button.style.js +219 -197
  108. package/dist/esm/components/calendar/calendar.style.js +93 -91
  109. package/dist/esm/components/card/card.style.js +58 -55
  110. package/dist/esm/components/cascade/cascade.style.js +58 -54
  111. package/dist/esm/components/checkboxBase/checkboxBase.style.js +122 -120
  112. package/dist/esm/components/colorPicker/colorPicker.style.js +69 -65
  113. package/dist/esm/components/counter/counter.style.js +19 -17
  114. package/dist/esm/components/curd/curd.style.js +70 -66
  115. package/dist/esm/components/curd/curdColumnConfig.style.js +17 -15
  116. package/dist/esm/components/dataGrid/dataGrid.style.js +113 -111
  117. package/dist/esm/components/dateTimePicker/dateTimePicker.style.js +31 -27
  118. package/dist/esm/components/dateTimePicker/timer.style.js +29 -27
  119. package/dist/esm/components/dateTimeRangePicker/dateTimeRangePicker.style.js +7 -5
  120. package/dist/esm/components/descriptions/descriptions.style.js +99 -95
  121. package/dist/esm/components/dialog/dialog.style.js +98 -96
  122. package/dist/esm/components/divider/divider.style.js +17 -15
  123. package/dist/esm/components/drawer/drawer.style.js +78 -77
  124. package/dist/esm/components/dropdown/dropdown.style.js +10 -8
  125. package/dist/esm/components/form/form.style.js +27 -25
  126. package/dist/esm/components/gallery/gallery.style.js +82 -80
  127. package/dist/esm/components/image/image.style.js +35 -33
  128. package/dist/esm/components/input/input.style.js +27 -26
  129. package/dist/esm/components/inputBase/inputBase.style.js +164 -162
  130. package/dist/esm/components/loading/loading.style.js +17 -15
  131. package/dist/esm/components/loadingIndicator/loadingIndicator.style.js +10 -8
  132. package/dist/esm/components/loadingMask/loadingMask.style.js +19 -17
  133. package/dist/esm/components/menu/menu.style.js +3 -1
  134. package/dist/esm/components/menuItem/menuItem.style.js +94 -90
  135. package/dist/esm/components/modal/modal.style.js +11 -9
  136. package/dist/esm/components/optionsBase/optionsBase.style.js +10 -8
  137. package/dist/esm/components/overlayBase/overlayBase.style.js +15 -13
  138. package/dist/esm/components/pagination/pagination.style.js +31 -29
  139. package/dist/esm/components/palette/palette.style.d.ts +1 -1
  140. package/dist/esm/components/palette/palette.style.js +113 -111
  141. package/dist/esm/components/pickerDialog/pickerDialog.style.js +25 -23
  142. package/dist/esm/components/pinchable/pinchable.style.js +10 -8
  143. package/dist/esm/components/placeholder/placeholder.style.js +28 -26
  144. package/dist/esm/components/popper/popper.style.js +43 -39
  145. package/dist/esm/components/progress/progress.style.js +111 -111
  146. package/dist/esm/components/rating/rating.style.js +52 -50
  147. package/dist/esm/components/resizable/resizable.style.js +229 -223
  148. package/dist/esm/components/scrollbar/scrollbar.style.js +71 -69
  149. package/dist/esm/components/segmented/segmented.style.js +79 -77
  150. package/dist/esm/components/select/select.style.js +36 -34
  151. package/dist/esm/components/selectedList/selectedList.style.js +9 -7
  152. package/dist/esm/components/serialInput/serialInput.style.js +4 -2
  153. package/dist/esm/components/skeleton/skeleton.style.js +53 -47
  154. package/dist/esm/components/slidableActions/slidableActions.style.js +45 -43
  155. package/dist/esm/components/slider/slider.style.js +129 -127
  156. package/dist/esm/components/snackbarBase/snackbarBase.style.js +96 -94
  157. package/dist/esm/components/status/status.style.js +13 -11
  158. package/dist/esm/components/stepper/step.style.js +217 -216
  159. package/dist/esm/components/stepper/stepper.style.js +5 -3
  160. package/dist/esm/components/switch/switch.style.js +73 -71
  161. package/dist/esm/components/table/table.style.js +83 -81
  162. package/dist/esm/components/table/tableSticky.style.js +33 -31
  163. package/dist/esm/components/tabs/tabs.style.js +161 -159
  164. package/dist/esm/components/tabs/tabsEllipsis.style.js +5 -3
  165. package/dist/esm/components/tag/tag.style.js +96 -94
  166. package/dist/esm/components/textarea/textarea.style.js +27 -25
  167. package/dist/esm/components/theme/themeVariables.d.ts +1 -0
  168. package/dist/esm/components/theme/themeVariables.js +2 -0
  169. package/dist/esm/components/timeline/timeline.style.js +112 -108
  170. package/dist/esm/components/toggleButton/toggleButton.style.js +7 -5
  171. package/dist/esm/components/tooltip/tooltip.style.js +13 -11
  172. package/dist/esm/components/touchRipple/touchRipple.style.js +19 -17
  173. package/dist/esm/components/transfer/transfer.style.js +42 -40
  174. package/dist/esm/components/transitionBase/transitionBase.style.js +101 -94
  175. package/dist/esm/components/transportStyle/transportStyle.style.d.ts +1 -0
  176. package/dist/esm/components/transportStyle/transportStyle.style.js +54 -0
  177. package/dist/esm/components/tree/tree.style.js +83 -79
  178. package/dist/esm/components/tree/treeDnd.style.js +131 -129
  179. package/dist/esm/components/treeSelect/treeSelect.style.js +35 -33
  180. package/dist/esm/components/typography/typography.style.js +98 -96
  181. package/dist/esm/components/upload/dropArea.style.js +31 -29
  182. package/dist/esm/components/upload/upload.style.js +106 -104
  183. package/dist/esm/components/waterfall/waterfall.style.js +7 -5
  184. package/dist/esm/extensions/documentViewer/documentViewer.style.js +43 -41
  185. package/package.json +1 -1
@@ -12,7 +12,8 @@ export const classes = defineInnerClasses('drawer', [
12
12
  export function useStyle({ size }) {
13
13
  return useCss(({ breakpoints, spacing, background, boxShadow, borderRadius, divider }) => {
14
14
  return css `
15
- ${responsiveVariables(breakpoints, k => {
15
+ @layer reset {
16
+ ${responsiveVariables(breakpoints, k => {
16
17
  let _size = size[k];
17
18
  if (typeof _size === 'undefined') {
18
19
  return '';
@@ -22,96 +23,96 @@ export function useStyle({ size }) {
22
23
  }
23
24
  return `--drawer-size: ${_size};`;
24
25
  })}
25
-
26
- .${classes.drawer} {
27
- position: absolute;
28
- padding: ${spacing[2]}px;
29
- }
30
-
31
- &[data-placement=top] {
32
26
  .${classes.drawer} {
33
- height: var(--drawer-size);
34
- transform-origin: top;
35
- inset: 0 0 auto;
27
+ position: absolute;
28
+ padding: ${spacing[2]}px;
36
29
  }
37
- }
38
-
39
- &[data-placement=bottom] {
40
- .${classes.drawer} {
41
- height: var(--drawer-size);
42
- transform-origin: bottom;
43
- inset: auto 0 0;
30
+
31
+ &[data-placement=top] {
32
+ .${classes.drawer} {
33
+ height: var(--drawer-size);
34
+ transform-origin: top;
35
+ inset: 0 0 auto;
36
+ }
44
37
  }
45
- }
46
-
47
- &[data-placement=left] {
48
- .${classes.drawer} {
49
- width: var(--drawer-size);
50
- transform-origin: left;
51
- inset: 0 auto 0 0;
38
+
39
+ &[data-placement=bottom] {
40
+ .${classes.drawer} {
41
+ height: var(--drawer-size);
42
+ transform-origin: bottom;
43
+ inset: auto 0 0;
44
+ }
52
45
  }
53
- }
54
-
55
- &[data-placement=right] {
56
- .${classes.drawer} {
57
- width: var(--drawer-size);
58
- transform-origin: right;
59
- inset: 0 0 0 auto;
46
+
47
+ &[data-placement=left] {
48
+ .${classes.drawer} {
49
+ width: var(--drawer-size);
50
+ transform-origin: left;
51
+ inset: 0 auto 0 0;
52
+ }
60
53
  }
61
- }
62
54
 
63
- .${classes.drawerWrap} {
64
- width: 100%;
65
- height: 100%;
66
- display: flex;
67
- flex-direction: column;
68
- background-color: ${background.content};
69
- box-shadow: ${boxShadow[1]};
70
- border-radius: ${borderRadius}px;
71
- }
72
-
73
- .${classes.titleRow} {
74
- font-size: ${16 / 14}em;
75
- font-weight: bold;
76
- display: flex;
77
- align-items: center;
78
- padding: 0 ${spacing[2]}px;
79
-
80
- .${classes.title} {
81
- flex: 1;
82
- padding: ${spacing[5]}px ${spacing[6]}px;
55
+ &[data-placement=right] {
56
+ .${classes.drawer} {
57
+ width: var(--drawer-size);
58
+ transform-origin: right;
59
+ inset: 0 0 0 auto;
60
+ }
83
61
  }
84
-
85
- .${classes.close} {
86
- margin: ${spacing[3]}px;
62
+
63
+ .${classes.drawerWrap} {
64
+ width: 100%;
65
+ height: 100%;
66
+ display: flex;
67
+ flex-direction: column;
68
+ background-color: ${background.content};
69
+ box-shadow: ${boxShadow[1]};
70
+ border-radius: ${borderRadius}px;
87
71
  }
88
72
 
89
- & + .${classes.body} {
90
- padding-top: 0;
73
+ .${classes.titleRow} {
74
+ font-size: ${16 / 14}em;
75
+ font-weight: bold;
76
+ display: flex;
77
+ align-items: center;
78
+ padding: 0 ${spacing[2]}px;
79
+
80
+ .${classes.title} {
81
+ flex: 1;
82
+ padding: ${spacing[5]}px ${spacing[6]}px;
83
+ }
84
+
85
+ .${classes.close} {
86
+ margin: ${spacing[3]}px;
87
+ }
88
+
89
+ & + .${classes.body} {
90
+ padding-top: 0;
91
+ }
91
92
  }
92
- }
93
93
 
94
- &[data-placement=right] {
95
- .${classes.title}:has(+ .${classes.close}) {
96
- padding-left: 0;
94
+ &[data-placement=right] {
95
+ .${classes.title}:has(+ .${classes.close}) {
96
+ padding-left: 0;
97
+ }
97
98
  }
98
- }
99
-
100
- &[data-placement=right] {
101
- .${classes.titleRow} {
102
- flex-direction: row-reverse;
99
+
100
+ &[data-placement=right] {
101
+ .${classes.titleRow} {
102
+ flex-direction: row-reverse;
103
+ }
103
104
  }
104
- }
105
-
106
- .${classes.body} {
107
- flex: 1;
108
- overflow: auto;
109
- padding: ${spacing[6]}px ${spacing[8]}px;
110
- border-top: 1px solid transparent;
111
- border-bottom: 1px solid transparent;
112
105
 
113
- &[data-bordered=true] {
114
- border-top-color: ${divider};
106
+ .${classes.body} {
107
+ flex: 1;
108
+ overflow: auto;
109
+ padding: ${spacing[6]}px ${spacing[8]}px;
110
+ border-top: 1px solid transparent;
111
+ border-bottom: 1px solid transparent;
112
+
113
+ &[data-bordered=true] {
114
+ border-top-color: ${divider};
115
+ }
115
116
  }
116
117
  }
117
118
  `;
@@ -6,14 +6,16 @@ export const classes = defineInnerClasses('dropdown', [
6
6
  'content'
7
7
  ]);
8
8
  export const style = defineCss(({ background, boxShadow, borderRadius }) => css `
9
- z-index: ${zIndex.dropdown};
9
+ @layer reset {
10
+ z-index: ${zIndex.dropdown};
10
11
 
11
- .${classes.content} {
12
- background-color: ${background.content};
13
- box-shadow: ${boxShadow[0]};
14
- border-radius: ${borderRadius}px;
15
- padding: 4px;
16
- }
12
+ .${classes.content} {
13
+ background-color: ${background.content};
14
+ box-shadow: ${boxShadow[0]};
15
+ border-radius: ${borderRadius}px;
16
+ padding: 4px;
17
+ }
17
18
 
18
- ${popperArrowStyle(background.content)}
19
+ ${popperArrowStyle(background.content)}
20
+ }
19
21
  `);
@@ -6,39 +6,41 @@ export const classes = defineInnerClasses('form', [
6
6
  'helperText'
7
7
  ]);
8
8
  export const style = defineCss(({ colors, spacing }) => css `
9
- .${classes.requiredMark} {
10
- color: ${colors.error.main};
11
- margin-right: ${spacing[1]}px;
12
- }
9
+ @layer reset {
10
+ .${classes.requiredMark} {
11
+ color: ${colors.error.main};
12
+ margin-right: ${spacing[1]}px;
13
+ }
13
14
 
14
- .${classes.helperText} {
15
- font-size: ${13 / 14}em;
16
- color: ${colors.error.main};
17
- }
15
+ .${classes.helperText} {
16
+ font-size: ${13 / 14}em;
17
+ color: ${colors.error.main};
18
+ }
18
19
 
19
- .${classes.item} {
20
- &:not([data-disable-margin=true]) {
21
- &[data-label-placement=left], &[data-label-placement=right] {
22
- margin-bottom: ${spacing[6]}px;
20
+ .${classes.item} {
21
+ &:not([data-disable-margin=true]) {
22
+ &[data-label-placement=left], &[data-label-placement=right] {
23
+ margin-bottom: ${spacing[6]}px;
23
24
 
24
- &[data-size=small] {
25
- margin-bottom: ${spacing[4]}px;
26
- }
25
+ &[data-size=small] {
26
+ margin-bottom: ${spacing[4]}px;
27
+ }
27
28
 
28
- &[data-size=large] {
29
- margin-bottom: ${spacing[8]}px;
29
+ &[data-size=large] {
30
+ margin-bottom: ${spacing[8]}px;
31
+ }
30
32
  }
31
- }
32
33
 
33
- &[data-label-placement=top], &[data-label-placement=bottom] {
34
- margin-bottom: ${spacing[7]}px;
34
+ &[data-label-placement=top], &[data-label-placement=bottom] {
35
+ margin-bottom: ${spacing[7]}px;
35
36
 
36
- &[data-size=small] {
37
- margin-bottom: ${spacing[5]}px;
38
- }
37
+ &[data-size=small] {
38
+ margin-bottom: ${spacing[5]}px;
39
+ }
39
40
 
40
- &[data-size=large] {
41
- margin-bottom: ${spacing[9]}px;
41
+ &[data-size=large] {
42
+ margin-bottom: ${spacing[9]}px;
43
+ }
42
44
  }
43
45
  }
44
46
  }
@@ -11,105 +11,107 @@ export const classes = defineInnerClasses('image-preview', [
11
11
  'image'
12
12
  ]);
13
13
  export const style = defineCss(({ spacing, easing, breakpoints }) => css `
14
- .${classes.control} {
15
- display: flex;
16
- gap: ${spacing[4]}px;
17
- position: absolute;
18
- top: ${spacing[10]}px;
19
- right: ${spacing[10]}px;
20
- z-index: 1;
21
- }
22
-
23
- .${classes.swap} {
24
- width: 100%;
25
- height: 0;
26
- display: flex;
27
- justify-content: space-between;
28
- align-items: center;
29
- padding: 0 ${spacing[8]}px;
30
- position: absolute;
31
- top: 50%;
32
- left: 0;
33
- z-index: 1;
34
- }
35
-
36
- .${classes.counter} {
37
- line-height: 40px;
38
- padding: 0 24px;
39
- border-radius: 1000em;
40
- color: #ffffff;
41
- background-color: rgba(0, 0, 0, .3);
42
- position: absolute;
43
- bottom: ${spacing[10]}px;
44
- left: 50%;
45
- transform: translateX(-50%);
46
- z-index: 1;
47
- }
48
-
49
- .${classes.button} {
50
- background-image: none !important;
51
- background-color: rgba(0, 0, 0, .4);
52
- transition: background-color .25s ${easing.easeOut};
53
-
54
- &:hover {
55
- background-color: rgba(0, 0, 0, .3);
14
+ @layer reset {
15
+ .${classes.control} {
16
+ display: flex;
17
+ gap: ${spacing[4]}px;
18
+ position: absolute;
19
+ top: ${spacing[10]}px;
20
+ right: ${spacing[10]}px;
21
+ z-index: 1;
56
22
  }
57
23
 
58
- &:active {
59
- transition: background-color 0s;
60
- background-color: rgba(0, 0, 0, .5);
24
+ .${classes.swap} {
25
+ width: 100%;
26
+ height: 0;
27
+ display: flex;
28
+ justify-content: space-between;
29
+ align-items: center;
30
+ padding: 0 ${spacing[8]}px;
31
+ position: absolute;
32
+ top: 50%;
33
+ left: 0;
34
+ z-index: 1;
61
35
  }
62
36
 
63
- &:last-of-type {
64
- margin-left: ${spacing[4]}px;
37
+ .${classes.counter} {
38
+ line-height: 40px;
39
+ padding: 0 24px;
40
+ border-radius: 1000em;
41
+ color: #ffffff;
42
+ background-color: rgba(0, 0, 0, .3);
43
+ position: absolute;
44
+ bottom: ${spacing[10]}px;
45
+ left: 50%;
46
+ transform: translateX(-50%);
47
+ z-index: 1;
65
48
  }
66
- }
67
49
 
68
- .${classes.galleryContainer} {
69
- &, .${classes.galleryWrapper}, .${classes.imageItem}, .${classes.image} {
70
- width: 100%;
71
- height: 100%;
72
- }
50
+ .${classes.button} {
51
+ background-image: none !important;
52
+ background-color: rgba(0, 0, 0, .4);
53
+ transition: background-color .25s ${easing.easeOut};
73
54
 
74
- overflow: hidden;
75
- position: relative;
55
+ &:hover {
56
+ background-color: rgba(0, 0, 0, .3);
57
+ }
76
58
 
77
- .${classes.galleryWrapper} {
78
- &, .${classes.imageItem} {
79
- position: absolute;
80
- top: 0;
59
+ &:active {
60
+ transition: background-color 0s;
61
+ background-color: rgba(0, 0, 0, .5);
81
62
  }
82
-
83
- &[data-transition=set] {
84
- transition: left .5s ${easing.bounce} 0s;
63
+
64
+ &:last-of-type {
65
+ margin-left: ${spacing[4]}px;
85
66
  }
67
+ }
86
68
 
87
- &[data-transition=drag] {
88
- transition: left .1s linear;
69
+ .${classes.galleryContainer} {
70
+ &, .${classes.galleryWrapper}, .${classes.imageItem}, .${classes.image} {
71
+ width: 100%;
72
+ height: 100%;
89
73
  }
90
74
 
91
- .${classes.imageItem} {
92
- padding: 90px;
75
+ overflow: hidden;
76
+ position: relative;
93
77
 
94
- .${classes.image} {
95
- object-fit: contain;
78
+ .${classes.galleryWrapper} {
79
+ &, .${classes.imageItem} {
80
+ position: absolute;
81
+ top: 0;
82
+ }
83
+
84
+ &[data-transition=set] {
85
+ transition: left .5s ${easing.bounce} 0s;
86
+ }
87
+
88
+ &[data-transition=drag] {
89
+ transition: left .1s linear;
96
90
  }
97
- }
98
- }
99
- }
100
91
 
101
- @media (max-width: ${breakpoints.sm}px) {
102
- .${classes.control}, .${classes.swap}, .${classes.button} {
103
- display: none;
92
+ .${classes.imageItem} {
93
+ padding: 90px;
94
+
95
+ .${classes.image} {
96
+ object-fit: contain;
97
+ }
98
+ }
99
+ }
104
100
  }
105
101
 
106
- .${classes.galleryContainer} .${classes.galleryWrapper} {
107
- &[data-transition=true] {
108
- transition: left .4s ${easing.ease};
102
+ @media (max-width: ${breakpoints.sm}px) {
103
+ .${classes.control}, .${classes.swap}, .${classes.button} {
104
+ display: none;
109
105
  }
110
-
111
- .${classes.imageItem} {
112
- padding: 0;
106
+
107
+ .${classes.galleryContainer} .${classes.galleryWrapper} {
108
+ &[data-transition=true] {
109
+ transition: left .4s ${easing.ease};
110
+ }
111
+
112
+ .${classes.imageItem} {
113
+ padding: 0;
114
+ }
113
115
  }
114
116
  }
115
117
  }
@@ -10,51 +10,53 @@ export const classes = defineInnerClasses('image', [
10
10
  export const style = defineCss(({ background, easing, spacing }) => {
11
11
  const maskBg = Color(background.content).alpha(.9).string();
12
12
  return css `
13
- display: inline-flex;
14
- position: relative;
15
- overflow: hidden;
13
+ @layer reset {
14
+ display: inline-flex;
15
+ position: relative;
16
+ overflow: hidden;
16
17
 
17
- .${classes.img} {
18
- width: inherit;
19
- height: inherit;
20
- }
21
-
22
- &[data-error=true] {
23
18
  .${classes.img} {
24
- opacity: 0;
19
+ width: inherit;
20
+ height: inherit;
25
21
  }
26
- }
27
22
 
28
- .${classes.skeleton} {
29
- height: 100%;
30
- position: absolute;
31
- inset: 0;
32
- }
33
-
34
- .${classes.mask} {
35
- background-color: ${maskBg};
36
- position: absolute;
37
- inset: 0;
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- opacity: 0;
42
- transition: opacity .25s ${easing.easeOut};
23
+ &[data-error=true] {
24
+ .${classes.img} {
25
+ opacity: 0;
26
+ }
27
+ }
43
28
 
44
- .${classes.previewButton} {
29
+ .${classes.skeleton} {
30
+ height: 100%;
31
+ position: absolute;
32
+ inset: 0;
33
+ }
34
+
35
+ .${classes.mask} {
36
+ background-color: ${maskBg};
45
37
  position: absolute;
46
38
  inset: 0;
47
39
  display: flex;
48
- gap: ${spacing[2]}px;
49
40
  align-items: center;
50
41
  justify-content: center;
51
- cursor: pointer;
42
+ opacity: 0;
43
+ transition: opacity .25s ${easing.easeOut};
44
+
45
+ .${classes.previewButton} {
46
+ position: absolute;
47
+ inset: 0;
48
+ display: flex;
49
+ gap: ${spacing[2]}px;
50
+ align-items: center;
51
+ justify-content: center;
52
+ cursor: pointer;
53
+ }
52
54
  }
53
- }
54
55
 
55
- &:hover {
56
- .${classes.mask} {
57
- opacity: 1;
56
+ &:hover {
57
+ .${classes.mask} {
58
+ opacity: 1;
59
+ }
58
60
  }
59
61
  }
60
62
  `;
@@ -15,36 +15,37 @@ export const commonNativeInputStyle = css `
15
15
  font-size: 1em;
16
16
  `;
17
17
  export const style = css `
18
- position: relative;
18
+ @layer reset {
19
+ position: relative;
19
20
 
20
- .${classes.input} {
21
- ${commonNativeInputStyle}
22
-
23
- &::-webkit-search-cancel-button {
24
- display: none;
25
- }
26
-
27
- &::-ms-clear,
28
- &::-webkit-search-cancel-button {
29
- display: none;
30
- }
31
-
32
- &::-webkit-inner-spin-button,
33
- &::-webkit-outer-spin-button {
34
- width: 12px;
21
+ .${classes.input} {
22
+ ${commonNativeInputStyle}
23
+ &::-webkit-search-cancel-button {
24
+ display: none;
25
+ }
26
+
27
+ &::-ms-clear,
28
+ &::-webkit-search-cancel-button {
29
+ display: none;
30
+ }
31
+
32
+ &::-webkit-inner-spin-button,
33
+ &::-webkit-outer-spin-button {
34
+ width: 12px;
35
+ }
35
36
  }
36
- }
37
37
 
38
- &[data-adaptable=true] {
39
- .${classes.input} {
40
- height: 100%;
41
- position: absolute;
42
- inset: 0;
38
+ &[data-adaptable=true] {
39
+ .${classes.input} {
40
+ height: 100%;
41
+ position: absolute;
42
+ inset: 0;
43
+ }
43
44
  }
44
- }
45
45
 
46
- .${classes.adaptable} {
47
- opacity: 0;
48
- pointer-events: none;
46
+ .${classes.adaptable} {
47
+ opacity: 0;
48
+ pointer-events: none;
49
+ }
49
50
  }
50
51
  `;