@ray-js/smart-ui 2.13.4-beta-0 → 2.13.4-beta-3

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.
@@ -7,7 +7,7 @@ type ActionSheetThemeVars = 'actionSheetWidth' | 'actionSheetLeft' | 'actionShee
7
7
  type BottomSheetThemeVars = 'bottomSheetWidth' | 'bottomSheetMinHeight' | 'bottomSheetMaxHeight' | 'bottomSheetPadding' | 'bottomSheetHeaderPadding' | 'bottomSheetIconMargin' | 'bottomSheetHeaderHeight' | 'bottomSheetHeaderColor' | 'bottomSheetHeaderFontSize' | 'bottomSheetHeaderFontWeight' | 'bottomSheetFontColor' | 'bottomSheetDraggerPadding' | 'bottomSheetDraggerNodeWidth' | 'bottomSheetDraggerNodeHeight' | 'bottomSheetDraggerNodeBorderRadius' | 'bottomSheetDraggerNodeBackground';
8
8
  type ButtonThemeVars = 'buttonMiniHeight' | 'buttonMiniMinWidth' | 'buttonMiniFontSize' | 'buttonSmallHeight' | 'buttonSmallFontSize' | 'buttonSmallMinWidth' | 'buttonNormalFontSize' | 'buttonLargeHeight' | 'buttonDefaultColor' | 'buttonDefaultHeight' | 'buttonDefaultFontSize' | 'buttonDefaultBackgroundColor' | 'buttonDefaultBorderColor' | 'buttonPrimaryColor' | 'buttonPrimaryBackgroundColor' | 'buttonPrimaryBorderColor' | 'buttonInfoColor' | 'buttonInfoBackgroundColor' | 'buttonInfoBorderColor' | 'buttonDangerColor' | 'buttonDangerBackgroundColor' | 'buttonDangerBorderColor' | 'buttonWarningColor' | 'buttonWarningBackgroundColor' | 'buttonWarningBorderColor' | 'buttonLineHeight' | 'buttonBorderWidth' | 'buttonBorderRadius' | 'buttonRoundBorderRadius' | 'buttonPlainBackgroundColor' | 'buttonDisabledOpacity' | 'buttonFontWeight' | 'buttonPrimaryFontWeight' | 'buttonPlainColor';
9
9
  type CalendarThemeVars = 'calendarBackgroundColor' | 'calendarHeaderBoxShadow' | 'calendarHeaderTitleHeight' | 'calendarHeaderTitleFontSize' | 'calendarHeaderTitleWeight' | 'calendarHeaderTitleFontColor' | 'calendarHeaderSubtitleFontSize' | 'calendarWeekdaysHeight' | 'calendarWeekdaysFontSize' | 'calendarWeekdaysFontColor' | 'calendarMonthTitleFontSize' | 'calendarMonthMarkColor' | 'calendarMonthMarkFontSize' | 'calendarDayHeight' | 'calendarCellItemFontSize' | 'calendarCellItemWidth' | 'calendarCellItemHeight' | 'calendarCellItemMargin' | 'calendarCellItemFontColor' | 'calendarCellItemBorderRadius' | 'calendarDayFontWeight' | 'calendarDaySelectBorderRadius' | 'calendarRangeEdgeColor' | 'calendarRangeEdgeBackgroundColor' | 'calendarRangeMiddleColor' | 'calendarRangeMiddleBackgroundOpacity' | 'calendarSelectedDaySize' | 'calendarSelectedDayColor' | 'calendarInfoFontSize' | 'calendarInfoLineHeight' | 'calendarSelectedDayBackgroundColor' | 'calendarConfirmButtonHeight' | 'calendarConfirmButtonMargin' | 'calendarConfirmButtonLineHeight' | 'calendarTextColor' | 'calendarPopupHeight' | 'calendarPopupHeightMonth' | 'calendarPopupHeightYear' | 'calendarHeaderSaveColor' | 'calendarHeaderIconBgColor' | 'calendarHeaderIconColor';
10
- type CellThemeVars = 'cellFontSize' | 'cellLineHeight' | 'cellVerticalPadding' | 'cellHorizontalPadding' | 'cellTextColor' | 'cellBackgroundColor' | 'cellActiveColor' | 'cellRequiredColor' | 'cellLabelColor' | 'cellLabelFontSize' | 'cellLabelLineHeight' | 'cellLabelMarginTop' | 'cellValueColor' | 'cellIconSize' | 'cellRightIconColor' | 'cellBorderColor' | 'cellBorderLeftPosition' | 'cellBorderRightPosition' | 'cellGroupBackgroundColor' | 'cellGroupTitleColor' | 'cellGroupTitlePadding' | 'cellGroupTitleFontSize' | 'cellGroupTitleLineHeight' | 'cellGroupInsetPadding' | 'cellGroupInsetBorderRadius' | 'cellGroupInsetTitlePadding';
10
+ type CellThemeVars = 'cellFontSize' | 'cellLineHeight' | 'cellVerticalPadding' | 'cellHorizontalPadding' | 'cellTextColor' | 'cellBackgroundColor' | 'cellActiveColor' | 'cellRequiredColor' | 'cellLabelColor' | 'cellLabelFontSize' | 'cellLabelLineHeight' | 'cellLabelMarginTop' | 'cellValueColor' | 'cellValueMaxWidth' | 'cellValueMarginLeft' | 'cellIconSize' | 'cellRightIconColor' | 'cellBorderColor' | 'cellBorderLeftPosition' | 'cellBorderRightPosition' | 'cellGroupBackgroundColor' | 'cellGroupTitleColor' | 'cellGroupTitlePadding' | 'cellGroupTitleFontSize' | 'cellGroupTitleLineHeight' | 'cellGroupInsetPadding' | 'cellGroupInsetBorderRadius' | 'cellGroupInsetTitlePadding';
11
11
  type CheckboxThemeVars = 'checkboxSize' | 'checkboxBorderColor' | 'checkboxBorderRadius' | 'checkboxTransitionDuration' | 'checkboxLabelSize' | 'checkboxLabelMargin' | 'checkboxLabelColor' | 'checkboxCheckedIconColor' | 'checkboxDisabledLabelColor' | 'checkboxDisabledOpacity';
12
12
  type CircleThemeVars = 'circleTextColor';
13
13
  type CollapseThemeVars = 'collapseItemTransitionDuration' | 'collapseItemContentPadding' | 'collapseItemContentFontSize' | 'collapseItemContentLineHeight' | 'collapseItemContentTextColor' | 'collapseItemContentBackgroundColor' | 'collapseItemTitleDisabledColor';
@@ -167,6 +167,11 @@ export interface SmartDateTimePickerProps {
167
167
  * @version 2.3.7
168
168
  */
169
169
  fontStyles?: Partial<Record<TimeUnitType | '12HourClock', React.CSSProperties>>;
170
+ /**
171
+ * @description 控制每一列是否循环滚动,未配置的列保持默认行为:`year` 与 `12HourClock` 不循环,其余列循环
172
+ * @version 2.13.4
173
+ */
174
+ loopMap?: Partial<Record<TimeUnitType | '12HourClock', boolean>>;
170
175
  }
171
176
  /**
172
177
  * @deprecated
package/es/cell/README.md CHANGED
@@ -302,6 +302,8 @@ export default function Demo() {
302
302
  | --cell-label-line-height | _18px_ | 单元格标签行高 |
303
303
  | --cell-label-margin-top | _3px_ | 单元格标签上边距 |
304
304
  | --cell-value-color | _var(--app-B6-N3, rgba(0, 0, 0, 0.5))_ | 单元格值文字颜色 |
305
+ | --cell-value-max-width `v2.13.4` | _none_ | 单元格值区域最大宽度,超出部分隐藏;默认不限制 |
306
+ | --cell-value-margin-left `v2.13.4` | _8px_ | 单元格值区域与标题的间距 |
305
307
  | --cell-icon-size | _24px_ | 单元格图标大小 |
306
308
  | --cell-right-icon-color | _var(--app-B6-N6, rgba(0, 0, 0, 0.2))_ | 单元格右侧图标颜色 |
307
309
  | --cell-border-color `v2.1.4` | _var(--app-B6-N7, rgba(0, 0, 0, 0.1))_ | 单元格边框颜色 |
@@ -309,6 +309,33 @@ export default function Demo() {
309
309
  }
310
310
  ```
311
311
 
312
+ ### 控制某一列是否循环滚动 `v2.13.4`
313
+
314
+ 默认情况下,`year`(年)与 `12HourClock`(上午/下午)列不循环滚动,其余列(月、日、时、分)循环滚动。通过 `loopMap` 可以按列覆盖该默认行为,未配置的列保持默认。
315
+
316
+ ```jsx
317
+ import React, { useState, useCallback } from 'react';
318
+ import { DateTimePicker } from '@ray-js/smart-ui';
319
+
320
+ export default function Demo() {
321
+ const [currentDate, setCurrentDate] = useState(new Date().getTime());
322
+ const onInput = useCallback(event => {
323
+ setCurrentDate(event.detail);
324
+ }, []);
325
+ return (
326
+ <DateTimePicker
327
+ type="date"
328
+ value={currentDate}
329
+ loopMap={{
330
+ day: false, // 日不循环
331
+ year: true, // 年循环
332
+ }}
333
+ onInput={onInput}
334
+ />
335
+ );
336
+ }
337
+ ```
338
+
312
339
  ### 样式风格 `v2.3.7`
313
340
 
314
341
  `activeStyle` 可以修改选中项的样式;`columnStyles` 可以设置每一列的样式;`fontStyles` 可以设置每一列文字的样式。
@@ -7,7 +7,7 @@ type ActionSheetThemeVars = 'actionSheetWidth' | 'actionSheetLeft' | 'actionShee
7
7
  type BottomSheetThemeVars = 'bottomSheetWidth' | 'bottomSheetMinHeight' | 'bottomSheetMaxHeight' | 'bottomSheetPadding' | 'bottomSheetHeaderPadding' | 'bottomSheetIconMargin' | 'bottomSheetHeaderHeight' | 'bottomSheetHeaderColor' | 'bottomSheetHeaderFontSize' | 'bottomSheetHeaderFontWeight' | 'bottomSheetFontColor' | 'bottomSheetDraggerPadding' | 'bottomSheetDraggerNodeWidth' | 'bottomSheetDraggerNodeHeight' | 'bottomSheetDraggerNodeBorderRadius' | 'bottomSheetDraggerNodeBackground';
8
8
  type ButtonThemeVars = 'buttonMiniHeight' | 'buttonMiniMinWidth' | 'buttonMiniFontSize' | 'buttonSmallHeight' | 'buttonSmallFontSize' | 'buttonSmallMinWidth' | 'buttonNormalFontSize' | 'buttonLargeHeight' | 'buttonDefaultColor' | 'buttonDefaultHeight' | 'buttonDefaultFontSize' | 'buttonDefaultBackgroundColor' | 'buttonDefaultBorderColor' | 'buttonPrimaryColor' | 'buttonPrimaryBackgroundColor' | 'buttonPrimaryBorderColor' | 'buttonInfoColor' | 'buttonInfoBackgroundColor' | 'buttonInfoBorderColor' | 'buttonDangerColor' | 'buttonDangerBackgroundColor' | 'buttonDangerBorderColor' | 'buttonWarningColor' | 'buttonWarningBackgroundColor' | 'buttonWarningBorderColor' | 'buttonLineHeight' | 'buttonBorderWidth' | 'buttonBorderRadius' | 'buttonRoundBorderRadius' | 'buttonPlainBackgroundColor' | 'buttonDisabledOpacity' | 'buttonFontWeight' | 'buttonPrimaryFontWeight' | 'buttonPlainColor';
9
9
  type CalendarThemeVars = 'calendarBackgroundColor' | 'calendarHeaderBoxShadow' | 'calendarHeaderTitleHeight' | 'calendarHeaderTitleFontSize' | 'calendarHeaderTitleWeight' | 'calendarHeaderTitleFontColor' | 'calendarHeaderSubtitleFontSize' | 'calendarWeekdaysHeight' | 'calendarWeekdaysFontSize' | 'calendarWeekdaysFontColor' | 'calendarMonthTitleFontSize' | 'calendarMonthMarkColor' | 'calendarMonthMarkFontSize' | 'calendarDayHeight' | 'calendarCellItemFontSize' | 'calendarCellItemWidth' | 'calendarCellItemHeight' | 'calendarCellItemMargin' | 'calendarCellItemFontColor' | 'calendarCellItemBorderRadius' | 'calendarDayFontWeight' | 'calendarDaySelectBorderRadius' | 'calendarRangeEdgeColor' | 'calendarRangeEdgeBackgroundColor' | 'calendarRangeMiddleColor' | 'calendarRangeMiddleBackgroundOpacity' | 'calendarSelectedDaySize' | 'calendarSelectedDayColor' | 'calendarInfoFontSize' | 'calendarInfoLineHeight' | 'calendarSelectedDayBackgroundColor' | 'calendarConfirmButtonHeight' | 'calendarConfirmButtonMargin' | 'calendarConfirmButtonLineHeight' | 'calendarTextColor' | 'calendarPopupHeight' | 'calendarPopupHeightMonth' | 'calendarPopupHeightYear' | 'calendarHeaderSaveColor' | 'calendarHeaderIconBgColor' | 'calendarHeaderIconColor';
10
- type CellThemeVars = 'cellFontSize' | 'cellLineHeight' | 'cellVerticalPadding' | 'cellHorizontalPadding' | 'cellTextColor' | 'cellBackgroundColor' | 'cellActiveColor' | 'cellRequiredColor' | 'cellLabelColor' | 'cellLabelFontSize' | 'cellLabelLineHeight' | 'cellLabelMarginTop' | 'cellValueColor' | 'cellIconSize' | 'cellRightIconColor' | 'cellBorderColor' | 'cellBorderLeftPosition' | 'cellBorderRightPosition' | 'cellGroupBackgroundColor' | 'cellGroupTitleColor' | 'cellGroupTitlePadding' | 'cellGroupTitleFontSize' | 'cellGroupTitleLineHeight' | 'cellGroupInsetPadding' | 'cellGroupInsetBorderRadius' | 'cellGroupInsetTitlePadding';
10
+ type CellThemeVars = 'cellFontSize' | 'cellLineHeight' | 'cellVerticalPadding' | 'cellHorizontalPadding' | 'cellTextColor' | 'cellBackgroundColor' | 'cellActiveColor' | 'cellRequiredColor' | 'cellLabelColor' | 'cellLabelFontSize' | 'cellLabelLineHeight' | 'cellLabelMarginTop' | 'cellValueColor' | 'cellValueMaxWidth' | 'cellValueMarginLeft' | 'cellIconSize' | 'cellRightIconColor' | 'cellBorderColor' | 'cellBorderLeftPosition' | 'cellBorderRightPosition' | 'cellGroupBackgroundColor' | 'cellGroupTitleColor' | 'cellGroupTitlePadding' | 'cellGroupTitleFontSize' | 'cellGroupTitleLineHeight' | 'cellGroupInsetPadding' | 'cellGroupInsetBorderRadius' | 'cellGroupInsetTitlePadding';
11
11
  type CheckboxThemeVars = 'checkboxSize' | 'checkboxBorderColor' | 'checkboxBorderRadius' | 'checkboxTransitionDuration' | 'checkboxLabelSize' | 'checkboxLabelMargin' | 'checkboxLabelColor' | 'checkboxCheckedIconColor' | 'checkboxDisabledLabelColor' | 'checkboxDisabledOpacity';
12
12
  type CircleThemeVars = 'circleTextColor';
13
13
  type CollapseThemeVars = 'collapseItemTransitionDuration' | 'collapseItemContentPadding' | 'collapseItemContentFontSize' | 'collapseItemContentLineHeight' | 'collapseItemContentTextColor' | 'collapseItemContentBackgroundColor' | 'collapseItemTitleDisabledColor';
@@ -167,6 +167,11 @@ export interface SmartDateTimePickerProps {
167
167
  * @version 2.3.7
168
168
  */
169
169
  fontStyles?: Partial<Record<TimeUnitType | '12HourClock', React.CSSProperties>>;
170
+ /**
171
+ * @description 控制每一列是否循环滚动,未配置的列保持默认行为:`year` 与 `12HourClock` 不循环,其余列循环
172
+ * @version 2.13.4
173
+ */
174
+ loopMap?: Partial<Record<TimeUnitType | '12HourClock', boolean>>;
170
175
  }
171
176
  /**
172
177
  * @deprecated
@@ -302,6 +302,8 @@ export default function Demo() {
302
302
  | --cell-label-line-height | _18px_ | 单元格标签行高 |
303
303
  | --cell-label-margin-top | _3px_ | 单元格标签上边距 |
304
304
  | --cell-value-color | _var(--app-B6-N3, rgba(0, 0, 0, 0.5))_ | 单元格值文字颜色 |
305
+ | --cell-value-max-width `v2.13.4` | _none_ | 单元格值区域最大宽度,超出部分隐藏;默认不限制 |
306
+ | --cell-value-margin-left `v2.13.4` | _8px_ | 单元格值区域与标题的间距 |
305
307
  | --cell-icon-size | _24px_ | 单元格图标大小 |
306
308
  | --cell-right-icon-color | _var(--app-B6-N6, rgba(0, 0, 0, 0.2))_ | 单元格右侧图标颜色 |
307
309
  | --cell-border-color `v2.1.4` | _var(--app-B6-N7, rgba(0, 0, 0, 0.1))_ | 单元格边框颜色 |
@@ -309,6 +309,33 @@ export default function Demo() {
309
309
  }
310
310
  ```
311
311
 
312
+ ### 控制某一列是否循环滚动 `v2.13.4`
313
+
314
+ 默认情况下,`year`(年)与 `12HourClock`(上午/下午)列不循环滚动,其余列(月、日、时、分)循环滚动。通过 `loopMap` 可以按列覆盖该默认行为,未配置的列保持默认。
315
+
316
+ ```jsx
317
+ import React, { useState, useCallback } from 'react';
318
+ import { DateTimePicker } from '@ray-js/smart-ui';
319
+
320
+ export default function Demo() {
321
+ const [currentDate, setCurrentDate] = useState(new Date().getTime());
322
+ const onInput = useCallback(event => {
323
+ setCurrentDate(event.detail);
324
+ }, []);
325
+ return (
326
+ <DateTimePicker
327
+ type="date"
328
+ value={currentDate}
329
+ loopMap={{
330
+ day: false, // 日不循环
331
+ year: true, // 年循环
332
+ }}
333
+ onInput={onInput}
334
+ />
335
+ );
336
+ }
337
+ ```
338
+
312
339
  ### 样式风格 `v2.3.7`
313
340
 
314
341
  `activeStyle` 可以修改选中项的样式;`columnStyles` 可以设置每一列的样式;`fontStyles` 可以设置每一列文字的样式。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.13.4-beta-0",
3
+ "version": "2.13.4-beta-3",
4
4
  "description": "轻量、可靠的智能小程序 UI 组件库",
5
5
  "scripts": {
6
6
  "syncMiniappData": "node ./build/syncMiniappData.js",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@ray-js/components-ty-slider": "^0.3.9",
45
- "@tuya-miniapp/smart-ui": "2.13.4-beta-1",
45
+ "@tuya-miniapp/smart-ui": "2.13.4-beta-2",
46
46
  "lodash-es": "^4.17.21"
47
47
  },
48
48
  "devDependencies": {