@instructure/platform-widget-dashboard 7.4.3 → 7.5.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.
- package/dist/components/AddWidgetModal/AddWidgetModal.d.ts +10 -0
- package/dist/components/AddWidgetModal/AddWidgetModal.d.ts.map +1 -0
- package/dist/components/AddWidgetModal/WidgetCard.d.ts +11 -0
- package/dist/components/AddWidgetModal/WidgetCard.d.ts.map +1 -0
- package/dist/components/WidgetDashboardContainer.d.ts.map +1 -1
- package/dist/components/WidgetGrid.d.ts.map +1 -1
- package/dist/components/shared/CourseProgressCard.d.ts.map +1 -1
- package/dist/components/shared/PerformanceStatistic.d.ts.map +1 -1
- package/dist/components/widgets/AccountRollupWidget/AccountRollupWidget.d.ts.map +1 -1
- package/dist/components/widgets/TodoListWidget/todoModalTheme.d.ts +1 -1
- package/dist/components/widgets/TodoListWidget/todoModalTheme.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/contexts/TranslationsContext.d.ts +5 -0
- package/dist/contexts/TranslationsContext.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7546 -7238
- package/dist/theme/buildDarkThemeOverride.d.ts +83 -0
- package/dist/theme/buildDarkThemeOverride.d.ts.map +1 -0
- package/dist/theme/darkThemeColors.d.ts.map +1 -1
- package/dist/theme/useDarkModeChrome.d.ts +11 -0
- package/dist/theme/useDarkModeChrome.d.ts.map +1 -0
- package/dist/widgetRegistry.d.ts +5 -0
- package/dist/widgetRegistry.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/theme/WidgetThemeContext.d.ts +0 -16
- package/dist/theme/WidgetThemeContext.d.ts.map +0 -1
- package/dist/theme/widgetThemeColors.d.ts +0 -15
- package/dist/theme/widgetThemeColors.d.ts.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare function buildDarkThemeOverride(isDark: boolean): {
|
|
2
|
+
componentOverrides?: undefined;
|
|
3
|
+
} | {
|
|
4
|
+
componentOverrides: {
|
|
5
|
+
View: {
|
|
6
|
+
backgroundPrimary: string;
|
|
7
|
+
backgroundSecondary: string;
|
|
8
|
+
borderColorPrimary: string;
|
|
9
|
+
borderColorSecondary: string;
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
Heading: {
|
|
13
|
+
primaryColor: string;
|
|
14
|
+
secondaryColor: string;
|
|
15
|
+
};
|
|
16
|
+
Text: {
|
|
17
|
+
primaryColor: string;
|
|
18
|
+
secondaryColor: string;
|
|
19
|
+
primaryInverseColor: string;
|
|
20
|
+
};
|
|
21
|
+
'Tabs.Tab': {
|
|
22
|
+
defaultColor: string;
|
|
23
|
+
secondaryColor: string;
|
|
24
|
+
defaultSelectedBorderColor: string;
|
|
25
|
+
};
|
|
26
|
+
Tabs: {
|
|
27
|
+
defaultBackground: string;
|
|
28
|
+
scrollFadeColor: string;
|
|
29
|
+
};
|
|
30
|
+
'Tabs.Panel': {
|
|
31
|
+
color: string;
|
|
32
|
+
background: string;
|
|
33
|
+
};
|
|
34
|
+
Link: {
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
Checkbox: {
|
|
38
|
+
labelColor: string;
|
|
39
|
+
};
|
|
40
|
+
FormFieldLabel: {
|
|
41
|
+
color: string;
|
|
42
|
+
};
|
|
43
|
+
TextInput: {
|
|
44
|
+
color: string;
|
|
45
|
+
background: string;
|
|
46
|
+
borderColor: string;
|
|
47
|
+
};
|
|
48
|
+
Avatar: {
|
|
49
|
+
background: string;
|
|
50
|
+
borderColor: string;
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
Pill: {
|
|
54
|
+
background: string;
|
|
55
|
+
primaryColor: string;
|
|
56
|
+
};
|
|
57
|
+
Options: {
|
|
58
|
+
background: string;
|
|
59
|
+
labelColor: string;
|
|
60
|
+
};
|
|
61
|
+
'Options.Item': {
|
|
62
|
+
color: string;
|
|
63
|
+
background: string;
|
|
64
|
+
highlightedBackground: string;
|
|
65
|
+
highlightedLabelColor: string;
|
|
66
|
+
selectedBackground: string;
|
|
67
|
+
selectedLabelColor: string;
|
|
68
|
+
};
|
|
69
|
+
IconButton: {
|
|
70
|
+
primaryInverseBackground: string;
|
|
71
|
+
primaryInverseHoverBackground: string;
|
|
72
|
+
primaryInverseActiveBackground: string;
|
|
73
|
+
primaryInverseColor: string;
|
|
74
|
+
primaryInverseBorderColor: string;
|
|
75
|
+
secondaryBackground: string;
|
|
76
|
+
secondaryHoverBackground: string;
|
|
77
|
+
secondaryActiveBackground: string;
|
|
78
|
+
secondaryColor: string;
|
|
79
|
+
secondaryBorderColor: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=buildDarkThemeOverride.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildDarkThemeOverride.d.ts","sourceRoot":"","sources":["../../src/theme/buildDarkThemeOverride.ts"],"names":[],"mappings":"AAwBA,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darkThemeColors.d.ts","sourceRoot":"","sources":["../../src/theme/darkThemeColors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"darkThemeColors.d.ts","sourceRoot":"","sources":["../../src/theme/darkThemeColors.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,YAUzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,YAUxB,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,CAE7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const DARK_MODE_STYLE_ID = "widget-dashboard-dark-mode";
|
|
3
|
+
export declare const DARK_MODE_ROOT_ATTR = "data-widget-dashboard-dark-root";
|
|
4
|
+
/**
|
|
5
|
+
* Owns the page-level dark chrome for the widget dashboard: paints the page
|
|
6
|
+
* background navy and injects the scoped `!important` overrides that the InstUI
|
|
7
|
+
* theme override cannot reach. Everything is reverted on cleanup / when `isDark`
|
|
8
|
+
* turns off, so the host page is left untouched in light mode.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDarkModeChrome(isDark: boolean, rootRef: RefObject<HTMLElement | null>): void;
|
|
11
|
+
//# sourceMappingURL=useDarkModeChrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDarkModeChrome.d.ts","sourceRoot":"","sources":["../../src/theme/useDarkModeChrome.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAIjD,eAAO,MAAM,kBAAkB,+BAA+B,CAAA;AAK9D,eAAO,MAAM,mBAAmB,oCAAoC,CAAA;AAoEpE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CA6B/F"}
|
package/dist/widgetRegistry.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WidgetRegistry } from './types';
|
|
2
2
|
export declare const widgetRegistry: WidgetRegistry;
|
|
3
|
+
/**
|
|
4
|
+
* Filters a widget registry down to the widgets available for a given role.
|
|
5
|
+
* Pass no role to get learner widgets (those without a `roles` field).
|
|
6
|
+
*/
|
|
7
|
+
export declare const getWidgetsForRole: (registry: WidgetRegistry, role?: string) => WidgetRegistry;
|
|
3
8
|
//# sourceMappingURL=widgetRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetRegistry.d.ts","sourceRoot":"","sources":["../src/widgetRegistry.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,cAAc,EAAE,cA0F5B,CAAA"}
|
|
1
|
+
{"version":3,"file":"widgetRegistry.d.ts","sourceRoot":"","sources":["../src/widgetRegistry.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,cAAc,EAAE,cA0F5B,CAAA;AAOD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,cAAc,EAAE,OAAO,MAAM,KAAG,cACwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/platform-widget-dashboard",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"@instructure/platform-canvas-fetch": "0.1.3",
|
|
65
65
|
"@instructure/platform-color-picker": "0.2.2",
|
|
66
66
|
"@instructure/platform-get-cookie": "0.2.1",
|
|
67
|
-
"@instructure/platform-grades": "0.2.3",
|
|
68
67
|
"@instructure/platform-image-utils": "0.2.0",
|
|
69
68
|
"@instructure/platform-instui-bindings": "0.6.2",
|
|
70
|
-
"@instructure/platform-provider": "0.5.2"
|
|
69
|
+
"@instructure/platform-provider": "0.5.2",
|
|
70
|
+
"@instructure/platform-grades": "0.2.3"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@tanstack/query-persist-client-core": "^5.0.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { WidgetColors } from './darkThemeColors';
|
|
3
|
-
interface WidgetThemeContextValue {
|
|
4
|
-
isDark: boolean;
|
|
5
|
-
colors: WidgetColors;
|
|
6
|
-
setIsDark: (isDark: boolean) => void;
|
|
7
|
-
}
|
|
8
|
-
interface WidgetThemeProviderProps {
|
|
9
|
-
isDark: boolean;
|
|
10
|
-
setIsDark: (isDark: boolean) => void;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare const WidgetThemeProvider: ({ isDark, setIsDark, children }: WidgetThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const useWidgetTheme: () => WidgetThemeContextValue;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=WidgetThemeContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/WidgetThemeContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkE,MAAM,OAAO,CAAA;AAEtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;CACrC;AAQD,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,eAAO,MAAM,mBAAmB,GAAI,iCAAiC,wBAAwB,4CAW5F,CAAA;AAED,eAAO,MAAM,cAAc,+BAAuC,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface WidgetColors {
|
|
2
|
-
pageBackground: string;
|
|
3
|
-
cardBackground: string;
|
|
4
|
-
cardSecondary: string;
|
|
5
|
-
border: string;
|
|
6
|
-
textPrimary: string;
|
|
7
|
-
textSecondary: string;
|
|
8
|
-
textLink: string;
|
|
9
|
-
inputBackground: string;
|
|
10
|
-
inputBorder: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const lightColors: WidgetColors;
|
|
13
|
-
export declare const darkColors: WidgetColors;
|
|
14
|
-
export declare function getWidgetColors(isDark: boolean): WidgetColors;
|
|
15
|
-
//# sourceMappingURL=widgetThemeColors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widgetThemeColors.d.ts","sourceRoot":"","sources":["../../src/theme/widgetThemeColors.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,YAUzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,YAUxB,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,CAE7D"}
|