@fibrae/semi-foundation 0.9.1 → 0.10.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.
@@ -50,7 +50,7 @@ export declare function hasLostFocus(focusInside: boolean, list?: Element | null
50
50
  * Whether a Toast or Notification of this type is an alert, which its own `role="alert"` announces; the list's
51
51
  * announcer skips it so it is not read twice.
52
52
  */
53
- export declare function isAlertType(type?: string): type is "error" | "warning";
53
+ export declare function isAlertType(type?: string): type is "warning" | "error";
54
54
  /** What an item announces: its title and content (`.${prefixCls}-title`, `.${prefixCls}-content`), without the icon and close button */
55
55
  export declare function readNoticeText(item: Element | null | undefined, prefixCls: string): string;
56
56
  /** Picks what a list announces: the items new since the previous call or updated in place, alerts excepted */
@@ -110,10 +110,10 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
110
110
  * Which panels show their year and month picker; while one does, its weeks need a minHeight, or a change of the
111
111
  * number of weeks makes the scroll list unstable
112
112
  */
113
- static getYAMOpenType(state: Pick<MonthsGridFoundationState, 'monthLeft' | 'monthRight'>): "none" | "left" | "right" | "both";
113
+ static getYAMOpenType(state: Pick<MonthsGridFoundationState, 'monthLeft' | 'monthRight'>): "left" | "right" | "both" | "none";
114
114
  static isYearOrTime(panel: PanelState): boolean;
115
115
  /** The `x-open-type` of a panel: what it shows in place of, or beside, its month */
116
- static getOpenType(panel: PanelState): "time" | "year" | "date";
116
+ static getOpenType(panel: PanelState): "time" | "date" | "year";
117
117
  static formatMonthText(locale: Pick<Locale['DatePicker'], 'monthText' | 'months'>, month?: Date): string;
118
118
  /** The texts of a panel's date and time switch; the date is the picked range endpoint, else the shown date */
119
119
  static getSwitchTexts({ rangeEndpoint, showDate, dateFormat, format: formatProp, locale, dateFnsLocale }: {
@@ -5,7 +5,7 @@ export type DropdownSelectionMode = 'single' | 'multiple';
5
5
  * Role and checked state of a menu item, from the menu's selectionMode (as React Aria Menu) and showTick. Without a
6
6
  * selectionMode a tick shows a checked state, so showTick alone makes the items checkboxes.
7
7
  */
8
- export declare function getItemRole(selectionMode?: DropdownSelectionMode, showTick?: boolean): "menuitemradio" | "menuitemcheckbox" | "menuitem";
8
+ export declare function getItemRole(selectionMode?: DropdownSelectionMode, showTick?: boolean): "menuitem" | "menuitemradio" | "menuitemcheckbox";
9
9
  /**
10
10
  * What a Dropdown provides to everything inside its popup, read by the menus there and by a Dropdown whose trigger is
11
11
  * one of their items. A framework adapter passes it as the foundation context, with the reading direction added.
@@ -53,7 +53,7 @@ export default class PaginationFoundation<P extends PaginationBaseProps = Pagina
53
53
  sizeChangerShown: boolean;
54
54
  hidden: boolean;
55
55
  quickJumpDisabled: boolean;
56
- switchPosition: "bottomLeft" | "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
56
+ switchPosition: "bottomLeft" | "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
57
57
  };
58
58
  static getDisabled(currentPage: number, total: number, pageSize: number): {
59
59
  prevDisabled: boolean;
@@ -95,11 +95,11 @@ export default class SliderFoundation<P extends SliderProps = SliderProps> exten
95
95
  * `reverse` is the class suffix of a vertical slider drawn from the bottom.
96
96
  */
97
97
  static getLayout(props: SliderProps, value: SliderState['currentValue'], { chooseMovePos, isDrag }: Pick<SliderState, 'chooseMovePos' | 'isDrag'>, direction?: string): {
98
- startProp: "left" | "right" | "top";
99
- inputDir: "rtl" | "ltr";
98
+ startProp: "top" | "left" | "right";
99
+ inputDir: "ltr" | "rtl";
100
100
  reverse: string;
101
101
  track: {
102
- sizeProp: "width" | "height";
102
+ sizeProp: "height" | "width";
103
103
  size: string;
104
104
  start: string;
105
105
  };
@@ -11,7 +11,7 @@ export declare const strings: {
11
11
  FILE_STATUS_WAIT_UPLOAD: string;
12
12
  FILE_LIST_PIC: "picture";
13
13
  FILE_LIST_DEFAULT: "list";
14
- LIST_TYPE: ("none" | "picture" | "list")[];
14
+ LIST_TYPE: ("list" | "picture" | "none")[];
15
15
  DRAG_AREA_DEFAULT: string;
16
16
  DRAG_AREA_LEGAL: string;
17
17
  TRIGGER_AUTO: "auto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibrae/semi-foundation",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "homepage": "https://semi-design-next.pages.dev",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@date-fns/tz": "^1.5.0",
30
30
  "@dnd-kit/dom": "~0.5.3",
31
- "@fibrae/semi-json-viewer-core": "0.9.1",
31
+ "@fibrae/semi-json-viewer-core": "0.10.0",
32
32
  "@mdx-js/mdx": "^3.1.1",
33
33
  "@shikijs/core": "^4.6.0",
34
34
  "clsx": "^2.1.1",