@abgov/ui-components-common 1.11.0 → 2.0.0-dev.1

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.
@@ -0,0 +1,41 @@
1
+ type CalendarDateInput = string | Date | 0 | {
2
+ year: number;
3
+ month: number;
4
+ day: number;
5
+ };
6
+ export declare class CalendarDate {
7
+ private _dateNums;
8
+ static parse(value: CalendarDateInput): number[];
9
+ static init(): CalendarDate;
10
+ constructor(value?: CalendarDateInput);
11
+ get date(): Date;
12
+ get year(): number;
13
+ get month(): number;
14
+ get day(): number;
15
+ get dayOfWeek(): number;
16
+ get daysInMonth(): number;
17
+ get firstDayOfMonth(): CalendarDate;
18
+ get lastDayOfMonth(): CalendarDate;
19
+ get previousDay(): CalendarDate;
20
+ get nextDay(): CalendarDate;
21
+ get previousWeek(): CalendarDate;
22
+ get nextWeek(): CalendarDate;
23
+ get previousMonth(): CalendarDate;
24
+ get nextMonth(): CalendarDate;
25
+ clone(): CalendarDate;
26
+ setYear(val: number): void;
27
+ setMonth(val: number): void;
28
+ setDay(val: number): CalendarDate;
29
+ addYears(count: number): CalendarDate;
30
+ addMonths(count: number): CalendarDate;
31
+ addDays(count: number): CalendarDate;
32
+ isSameDay(cmp: CalendarDate): boolean;
33
+ isSameMonth(value: CalendarDate): boolean;
34
+ isBefore(cmp: CalendarDate): boolean;
35
+ isAfter(cmp: CalendarDate): boolean;
36
+ isZero(): boolean;
37
+ isValid(): boolean;
38
+ format(tmpl: string): string;
39
+ toString(): string;
40
+ }
41
+ export {};
package/lib/common.d.ts CHANGED
@@ -78,7 +78,7 @@ export type GoabCalendarOnChangeDetail = {
78
78
  name?: string;
79
79
  value: string;
80
80
  };
81
- export type GoabBadgeType = "information" | "success" | "important" | "emergency" | "dark" | "midtone" | "light" | "archived" | "aqua" | "black" | "blue" | "green" | "orange" | "pink" | "red" | "violet" | "white" | "yellow" | "aqua-light" | "black-light" | "blue-light" | "green-light" | "orange-light" | "pink-light" | "red-light" | "violet-light" | "yellow-light";
81
+ export type GoabBadgeType = "information" | "success" | "important" | "emergency" | "archived" | "sky" | "prairie" | "lilac" | "pasture" | "sunset" | "dawn" | "default";
82
82
  export type GoabPaginationVariant = "all" | "links-only";
83
83
  export type GoabPaginationOnChangeDetail = {
84
84
  page: number;
@@ -123,9 +123,12 @@ export type GoabTextAreaOnBlurDetail = {
123
123
  event: Event;
124
124
  };
125
125
  export type GoabTabsVariant = "default" | "segmented";
126
+ export type GoabTabsOrientation = "auto" | "horizontal";
127
+ export type GoabTabsNavigation = "hash" | "none";
126
128
  export interface GoabTabsProps {
127
129
  initialTab?: number;
128
130
  variant?: GoabTabsVariant;
131
+ orientation?: GoabTabsOrientation;
129
132
  }
130
133
  export type GoabTabsOnChangeDetail = {
131
134
  tab: number;
@@ -138,10 +141,19 @@ export interface GoabTableProps extends Margins {
138
141
  variant?: GoabTableVariant;
139
142
  testId?: string;
140
143
  }
144
+ export type GoabTableSortMode = "single" | "multi";
145
+ export type GoabTableSortOrder = 1 | 2;
146
+ export type GoabTableSortEntry = {
147
+ column: string;
148
+ direction: "asc" | "desc";
149
+ };
141
150
  export type GoabTableOnSortDetail = {
142
151
  sortBy: string;
143
152
  sortDir: number;
144
153
  };
154
+ export type GoabTableOnMultiSortDetail = {
155
+ sorts: GoabTableSortEntry[];
156
+ };
145
157
  export type GoabSpacerHorizontalSpacing = Spacing | "fill";
146
158
  export type GoabSpacerVerticalSpacing = Spacing;
147
159
  export interface GoabSpacerProps {
@@ -282,7 +294,7 @@ export type GoabLinkButtonType = "start" | "primary" | "secondary" | "tertiary";
282
294
  export type GoabTextMaxWidth = string | "none";
283
295
  export type GoabTextHeadingElement = "h1" | "h2" | "h3" | "h4" | "h5";
284
296
  export type GoabTextTextElement = "span" | "div" | "p";
285
- export type GoabTextHeadingSize = "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs";
297
+ export type GoabTextHeadingSize = "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs";
286
298
  export type GoabTextBodySize = "body-l" | "body-m" | "body-s" | "body-xs";
287
299
  export type GoabTextSize = GoabTextHeadingSize | GoabTextBodySize;
288
300
  export type GoabTextColor = "primary" | "secondary";
@@ -340,4 +352,20 @@ export type GoabDrawerPosition = "bottom" | "left" | "right" | undefined;
340
352
  export type GoabDrawerSizeUnit = "px" | "rem" | "ch" | "vh" | "vw" | "%";
341
353
  export type GoabDrawerSize = `${number}${GoabDrawerSizeUnit}` | undefined;
342
354
  export type GoabWorkSideMenuItemType = "normal" | "emergency" | "success";
355
+ export type GoabWorkSideNotificationItemType = "default" | "success" | "critical" | "warning" | "info";
356
+ export type GoabWorkSideNotificationReadStatus = "read" | "unread";
357
+ export type GoabWorkSideNotificationPriority = "normal" | "urgent";
358
+ export type GoabWorkSideNotificationActiveTabType = "unread" | "urgent" | "all";
359
+ export type GoabBadgeSize = "medium" | "large";
360
+ export type GoabBadgeEmphasis = "subtle" | "strong";
361
+ export type GoabCalloutEmphasis = "high" | "medium" | "low";
362
+ export type GoabCheckboxSize = "default" | "compact";
363
+ export type GoabDropdownSize = "default" | "compact";
364
+ export type GoabFormItemType = "" | "text-input" | "textarea" | "checkbox-list" | "radio-group";
365
+ export type GoabLinkColor = "interactive" | "dark" | "light";
366
+ export type GoabLinkSize = "xsmall" | "small" | "medium" | "large";
367
+ export type GoabNotificationEmphasis = "high" | "low";
368
+ export type GoabRadioGroupSize = "default" | "compact";
369
+ export type GoabInputSize = "default" | "compact";
370
+ export type GoabTextAreaSize = "default" | "compact";
343
371
  export {};
package/lib/once.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export declare class Once {
2
+ private done;
3
+ constructor();
4
+ when(condition: boolean): Once;
5
+ do(id: string, fn: () => void): void;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/ui-components-common",
3
- "version": "1.11.0",
3
+ "version": "2.0.0-dev.1",
4
4
  "bugs": {
5
5
  "url": "https://github.com/GovAlta/ui-components/issues"
6
6
  },
@@ -1,13 +0,0 @@
1
- export type GoabBadgeSize = "medium" | "large";
2
- export type GoabBadgeEmphasis = "subtle" | "strong";
3
- export type GoabCalloutEmphasis = "high" | "medium" | "low";
4
- export type GoabCheckboxSize = "default" | "compact";
5
- export type GoabDropdownSize = "default" | "compact";
6
- export type GoabFormItemType = "" | "text-input" | "textarea" | "checkbox-list" | "radio-group";
7
- export type GoabLinkColor = "interactive" | "dark" | "light";
8
- export type GoabLinkSize = "xsmall" | "small" | "medium" | "large";
9
- export type GoabNotificationEmphasis = "high" | "low";
10
- export type GoabRadioGroupSize = "default" | "compact";
11
- export type GoabInputSize = "default" | "compact";
12
- export type GoabTextAreaSize = "default" | "compact";
13
- export type GoabxBadgeType = "information" | "success" | "important" | "emergency" | "archived" | "sky" | "prairie" | "lilac" | "pasture" | "sunset" | "dawn" | "default";