@khanacademy/wonder-blocks-config 0.4.0 → 0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @khanacademy/wonder-blocks-config
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6bd5d0c: Adds the `iconAltToggleCalendar`, `datePickerCalendar`, `birthdateErrorMessage`, `fieldLabelMonth`, `fieldLabelDay` and `fieldLabelYear` strings to `WonderBlocksStrings`
8
+ - 8e11e83: Adds the `iconAltClose`, `iconAltCloseModal` and `iconAltClosePopover` strings to `WonderBlocksStrings`
9
+
3
10
  ## 0.4.0
4
11
 
5
12
  ### Minor Changes
package/dist/es/index.js CHANGED
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { useContext, useMemo } from 'react';
4
4
 
5
- const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,breadcrumbs:strings.breadcrumbs.message,tabs:strings.tabs.message,requiredFieldMessage:strings.requiredFieldMessage.message};
5
+ const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltClose:{context:"Accessible name for an icon button that dismisses a piece of content, such as a card.",message:"Close"},iconAltCloseModal:{context:"Accessible name for an icon button that closes a modal.",message:"Close modal"},iconAltClosePopover:{context:"Accessible name for an icon button that closes a popover.",message:"Close Popover"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},iconAltToggleCalendar:{context:"Accessible name for an icon button in a date picker that opens and closes the calendar.",message:"Toggle calendar"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},datePickerCalendar:{context:"Accessible name for the region containing the calendar in a date picker.",message:"Date picker calendar"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},fieldLabelDay:{context:"Label and placeholder for a form field to select the day of a date, such as a birthdate.",message:"Day"},fieldLabelMonth:{context:"Label and placeholder for a form field to select the month of a date, such as a birthdate.",message:"Month"},fieldLabelYear:{context:"Label and placeholder for a form field to select the year of a date, such as a birthdate.",message:"Year"},birthdateErrorMessage:{context:"Error message shown when the selected birthdate is invalid.",message:"Please select a valid birthdate."},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltClose:strings.iconAltClose.message,iconAltCloseModal:strings.iconAltCloseModal.message,iconAltClosePopover:strings.iconAltClosePopover.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,iconAltToggleCalendar:strings.iconAltToggleCalendar.message,breadcrumbs:strings.breadcrumbs.message,datePickerCalendar:strings.datePickerCalendar.message,tabs:strings.tabs.message,fieldLabelDay:strings.fieldLabelDay.message,fieldLabelMonth:strings.fieldLabelMonth.message,fieldLabelYear:strings.fieldLabelYear.message,birthdateErrorMessage:strings.birthdateErrorMessage.message,requiredFieldMessage:strings.requiredFieldMessage.message};
6
6
 
7
7
  const WonderBlocksI18nContext=React.createContext({strings:defaultStringsEn,locale:"en"});WonderBlocksI18nContext.displayName="WonderBlocksI18nContext";function WonderBlocksI18nContextProvider({children,strings,locale}){const value=useMemo(()=>({strings,locale}),[strings,locale]);return jsx(WonderBlocksI18nContext.Provider,{value:value,children:children})}const useWonderBlocksI18n=()=>useContext(WonderBlocksI18nContext);
8
8
 
@@ -1,3 +1,3 @@
1
- const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,breadcrumbs:strings.breadcrumbs.message,tabs:strings.tabs.message,requiredFieldMessage:strings.requiredFieldMessage.message};
1
+ const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltClose:{context:"Accessible name for an icon button that dismisses a piece of content, such as a card.",message:"Close"},iconAltCloseModal:{context:"Accessible name for an icon button that closes a modal.",message:"Close modal"},iconAltClosePopover:{context:"Accessible name for an icon button that closes a popover.",message:"Close Popover"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},iconAltToggleCalendar:{context:"Accessible name for an icon button in a date picker that opens and closes the calendar.",message:"Toggle calendar"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},datePickerCalendar:{context:"Accessible name for the region containing the calendar in a date picker.",message:"Date picker calendar"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},fieldLabelDay:{context:"Label and placeholder for a form field to select the day of a date, such as a birthdate.",message:"Day"},fieldLabelMonth:{context:"Label and placeholder for a form field to select the month of a date, such as a birthdate.",message:"Month"},fieldLabelYear:{context:"Label and placeholder for a form field to select the year of a date, such as a birthdate.",message:"Year"},birthdateErrorMessage:{context:"Error message shown when the selected birthdate is invalid.",message:"Please select a valid birthdate."},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltClose:strings.iconAltClose.message,iconAltCloseModal:strings.iconAltCloseModal.message,iconAltClosePopover:strings.iconAltClosePopover.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,iconAltToggleCalendar:strings.iconAltToggleCalendar.message,breadcrumbs:strings.breadcrumbs.message,datePickerCalendar:strings.datePickerCalendar.message,tabs:strings.tabs.message,fieldLabelDay:strings.fieldLabelDay.message,fieldLabelMonth:strings.fieldLabelMonth.message,fieldLabelYear:strings.fieldLabelYear.message,birthdateErrorMessage:strings.birthdateErrorMessage.message,requiredFieldMessage:strings.requiredFieldMessage.message};
2
2
 
3
3
  export { defaultStringsEn, strings };
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
27
 
28
- const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,breadcrumbs:strings.breadcrumbs.message,tabs:strings.tabs.message,requiredFieldMessage:strings.requiredFieldMessage.message};
28
+ const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltClose:{context:"Accessible name for an icon button that dismisses a piece of content, such as a card.",message:"Close"},iconAltCloseModal:{context:"Accessible name for an icon button that closes a modal.",message:"Close modal"},iconAltClosePopover:{context:"Accessible name for an icon button that closes a popover.",message:"Close Popover"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},iconAltToggleCalendar:{context:"Accessible name for an icon button in a date picker that opens and closes the calendar.",message:"Toggle calendar"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},datePickerCalendar:{context:"Accessible name for the region containing the calendar in a date picker.",message:"Date picker calendar"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},fieldLabelDay:{context:"Label and placeholder for a form field to select the day of a date, such as a birthdate.",message:"Day"},fieldLabelMonth:{context:"Label and placeholder for a form field to select the month of a date, such as a birthdate.",message:"Month"},fieldLabelYear:{context:"Label and placeholder for a form field to select the year of a date, such as a birthdate.",message:"Year"},birthdateErrorMessage:{context:"Error message shown when the selected birthdate is invalid.",message:"Please select a valid birthdate."},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltClose:strings.iconAltClose.message,iconAltCloseModal:strings.iconAltCloseModal.message,iconAltClosePopover:strings.iconAltClosePopover.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,iconAltToggleCalendar:strings.iconAltToggleCalendar.message,breadcrumbs:strings.breadcrumbs.message,datePickerCalendar:strings.datePickerCalendar.message,tabs:strings.tabs.message,fieldLabelDay:strings.fieldLabelDay.message,fieldLabelMonth:strings.fieldLabelMonth.message,fieldLabelYear:strings.fieldLabelYear.message,birthdateErrorMessage:strings.birthdateErrorMessage.message,requiredFieldMessage:strings.requiredFieldMessage.message};
29
29
 
30
30
  const WonderBlocksI18nContext=React__namespace.createContext({strings:defaultStringsEn,locale:"en"});WonderBlocksI18nContext.displayName="WonderBlocksI18nContext";function WonderBlocksI18nContextProvider({children,strings,locale}){const value=React.useMemo(()=>({strings,locale}),[strings,locale]);return jsxRuntime.jsx(WonderBlocksI18nContext.Provider,{value:value,children:children})}const useWonderBlocksI18n=()=>React.useContext(WonderBlocksI18nContext);
31
31
 
package/dist/strings.d.ts CHANGED
@@ -3,10 +3,19 @@
3
3
  */
4
4
  export type WonderBlocksStrings = {
5
5
  iconAltClearSearch: string;
6
+ iconAltClose: string;
7
+ iconAltCloseModal: string;
8
+ iconAltClosePopover: string;
6
9
  iconAltErrorMessagePrefix: string;
7
10
  iconAltOpensNewTab: string;
11
+ iconAltToggleCalendar: string;
8
12
  breadcrumbs: string;
13
+ datePickerCalendar: string;
9
14
  tabs: string;
15
+ fieldLabelDay: string;
16
+ fieldLabelMonth: string;
17
+ fieldLabelYear: string;
18
+ birthdateErrorMessage: string;
10
19
  requiredFieldMessage: string;
11
20
  };
12
21
  /**
@@ -20,6 +29,18 @@ export declare const strings: {
20
29
  context: string;
21
30
  message: string;
22
31
  };
32
+ iconAltClose: {
33
+ context: string;
34
+ message: string;
35
+ };
36
+ iconAltCloseModal: {
37
+ context: string;
38
+ message: string;
39
+ };
40
+ iconAltClosePopover: {
41
+ context: string;
42
+ message: string;
43
+ };
23
44
  iconAltErrorMessagePrefix: {
24
45
  context: string;
25
46
  message: string;
@@ -28,14 +49,38 @@ export declare const strings: {
28
49
  context: string;
29
50
  message: string;
30
51
  };
52
+ iconAltToggleCalendar: {
53
+ context: string;
54
+ message: string;
55
+ };
31
56
  breadcrumbs: {
32
57
  context: string;
33
58
  message: string;
34
59
  };
60
+ datePickerCalendar: {
61
+ context: string;
62
+ message: string;
63
+ };
35
64
  tabs: {
36
65
  context: string;
37
66
  message: string;
38
67
  };
68
+ fieldLabelDay: {
69
+ context: string;
70
+ message: string;
71
+ };
72
+ fieldLabelMonth: {
73
+ context: string;
74
+ message: string;
75
+ };
76
+ fieldLabelYear: {
77
+ context: string;
78
+ message: string;
79
+ };
80
+ birthdateErrorMessage: {
81
+ context: string;
82
+ message: string;
83
+ };
39
84
  requiredFieldMessage: {
40
85
  context: string;
41
86
  message: string;
package/dist/strings.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,breadcrumbs:strings.breadcrumbs.message,tabs:strings.tabs.message,requiredFieldMessage:strings.requiredFieldMessage.message};
5
+ const strings={iconAltClearSearch:{context:"Accessible name for an icon button that clears the text in a search field.",message:"Clear search"},iconAltClose:{context:"Accessible name for an icon button that dismisses a piece of content, such as a card.",message:"Close"},iconAltCloseModal:{context:"Accessible name for an icon button that closes a modal.",message:"Close modal"},iconAltClosePopover:{context:"Accessible name for an icon button that closes a popover.",message:"Close Popover"},iconAltErrorMessagePrefix:{context:"Accessible name for an error icon shown before the error message for a form field. Screen readers read it as a prefix to the error message (e.g. 'Error: This field is required.'), so use the punctuation that normally separates a label from the text that follows in this language.",message:"Error:"},iconAltOpensNewTab:{context:"Accessible name for an icon marking a link that opens in a new tab.",message:"(opens in a new tab)"},iconAltToggleCalendar:{context:"Accessible name for an icon button in a date picker that opens and closes the calendar.",message:"Toggle calendar"},breadcrumbs:{context:"Accessible name for the navigation landmark containing breadcrumb links.",message:"Breadcrumbs"},datePickerCalendar:{context:"Accessible name for the region containing the calendar in a date picker.",message:"Date picker calendar"},tabs:{context:"Label for the menu of tabs when no tab is selected, shown when the tabs are collapsed into a dropdown.",message:"Tabs"},fieldLabelDay:{context:"Label and placeholder for a form field to select the day of a date, such as a birthdate.",message:"Day"},fieldLabelMonth:{context:"Label and placeholder for a form field to select the month of a date, such as a birthdate.",message:"Month"},fieldLabelYear:{context:"Label and placeholder for a form field to select the year of a date, such as a birthdate.",message:"Year"},birthdateErrorMessage:{context:"Error message shown when the selected birthdate is invalid.",message:"Please select a valid birthdate."},requiredFieldMessage:{context:"Error message shown when a required form field is left empty.",message:"This field is required."}};const defaultStringsEn={iconAltClearSearch:strings.iconAltClearSearch.message,iconAltClose:strings.iconAltClose.message,iconAltCloseModal:strings.iconAltCloseModal.message,iconAltClosePopover:strings.iconAltClosePopover.message,iconAltErrorMessagePrefix:strings.iconAltErrorMessagePrefix.message,iconAltOpensNewTab:strings.iconAltOpensNewTab.message,iconAltToggleCalendar:strings.iconAltToggleCalendar.message,breadcrumbs:strings.breadcrumbs.message,datePickerCalendar:strings.datePickerCalendar.message,tabs:strings.tabs.message,fieldLabelDay:strings.fieldLabelDay.message,fieldLabelMonth:strings.fieldLabelMonth.message,fieldLabelYear:strings.fieldLabelYear.message,birthdateErrorMessage:strings.birthdateErrorMessage.message,requiredFieldMessage:strings.requiredFieldMessage.message};
6
6
 
7
7
  exports.defaultStringsEn = defaultStringsEn;
8
8
  exports.strings = strings;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Configuration for Wonder Blocks",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "0.4.0",
6
+ "version": "0.5.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },