@pega/cosmos-react-core 4.0.0-dev.13.0 → 4.0.0-dev.14.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/README.md +2 -2
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +10 -12
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +6 -6
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.js +1 -1
- package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationList.js.map +1 -1
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +3 -3
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Boolean/BooleanDisplay.js +2 -2
- package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
- package/lib/components/Button/Button.d.ts +3 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +168 -142
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.js +1 -1
- package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.js +5 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +2 -10
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboxBox.test-ids.d.ts +1 -1
- package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboxBox.test-ids.js +2 -1
- package/lib/components/ComboBox/ComboxBox.test-ids.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +8 -10
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.js +5 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +5 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
- package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
- package/lib/components/Currency/Currency.test-ids.js +5 -1
- package/lib/components/Currency/Currency.test-ids.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +1 -1
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +25 -32
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +3 -0
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +20 -27
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +1 -9
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +11 -17
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.js +1 -1
- package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
- package/lib/components/DateTime/Picker/Weeks.js +1 -1
- package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +8 -6
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +2 -2
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/Dialog.styles.d.ts +3 -0
- package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.styles.js +29 -2
- package/lib/components/Dialog/Dialog.styles.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.d.ts +36 -14
- package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.types.js +0 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/FormDialog.d.ts +4 -1
- package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
- package/lib/components/Dialog/FormDialog.js +4 -5
- package/lib/components/Dialog/FormDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.d.ts +0 -1
- package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
- package/lib/components/Dialog/InfoDialog.js +15 -13
- package/lib/components/Dialog/InfoDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.styles.d.ts +6 -0
- package/lib/components/Dialog/InfoDialog.styles.d.ts.map +1 -0
- package/lib/components/Dialog/InfoDialog.styles.js +18 -0
- package/lib/components/Dialog/InfoDialog.styles.js.map +1 -0
- package/lib/components/EmojiPicker/EmojiPicker.styles.js +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +4 -2
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
- package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.d.ts +1 -1
- package/lib/components/FieldValueList/index.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.js.map +1 -1
- package/lib/components/File/File.test-ids.d.ts +1 -1
- package/lib/components/File/File.test-ids.d.ts.map +1 -1
- package/lib/components/File/File.test-ids.js +6 -1
- package/lib/components/File/File.test-ids.js.map +1 -1
- package/lib/components/File/FileInput.js +1 -1
- package/lib/components/File/FileInput.js.map +1 -1
- package/lib/components/Flex/Flex.d.ts +7 -1
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/Flex/Flex.js +37 -10
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts +2 -1
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/FormField/FormField.test-ids.d.ts +2 -1
- package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
- package/lib/components/FormField/FormField.test-ids.js +3 -2
- package/lib/components/FormField/FormField.test-ids.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +2 -2
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +2 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/phone-merge-solid.icon.d.ts +4 -0
- package/lib/components/Icon/icons/phone-merge-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/phone-merge-solid.icon.js +6 -0
- package/lib/components/Icon/icons/phone-merge-solid.icon.js.map +1 -0
- package/lib/components/Icon/icons/phone-merge.icon.d.ts +4 -0
- package/lib/components/Icon/icons/phone-merge.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/phone-merge.icon.js +6 -0
- package/lib/components/Icon/icons/phone-merge.icon.js.map +1 -0
- package/lib/components/IconPicker/IconPicker.js +2 -2
- package/lib/components/IconPicker/IconPicker.js.map +1 -1
- package/lib/components/Input/Input.js +1 -1
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Input/Input.test-ids.d.ts +1 -1
- package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
- package/lib/components/Input/Input.test-ids.js +2 -1
- package/lib/components/Input/Input.test-ids.js.map +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +49 -17
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +3 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +2 -3
- package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +2 -0
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -0
- package/lib/components/ListToolbar/ListToolbar.test-ids.js +7 -0
- package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -0
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +31 -8
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/ListToolbar/helpers.d.ts +10 -0
- package/lib/components/ListToolbar/helpers.d.ts.map +1 -0
- package/lib/components/ListToolbar/helpers.js +46 -0
- package/lib/components/ListToolbar/helpers.js.map +1 -0
- package/lib/components/ListToolbar/index.d.ts +1 -0
- package/lib/components/ListToolbar/index.d.ts.map +1 -1
- package/lib/components/ListToolbar/index.js +1 -0
- package/lib/components/ListToolbar/index.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.d.ts.map +1 -1
- package/lib/components/LiveLog/LiveLog.js +17 -16
- package/lib/components/LiveLog/LiveLog.js.map +1 -1
- package/lib/components/Location/Location.test-ids.d.ts +1 -1
- package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
- package/lib/components/Location/Location.test-ids.js +5 -1
- package/lib/components/Location/Location.test-ids.js.map +1 -1
- package/lib/components/Location/LocationInput.js +1 -1
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +1 -4
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
- package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
- package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
- package/lib/components/Menu/NavItemsList.js +2 -0
- package/lib/components/Menu/NavItemsList.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts +2 -2
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +6 -4
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.test-ids.d.ts +2 -0
- package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -0
- package/lib/components/MenuButton/MenuButton.test-ids.js +3 -0
- package/lib/components/MenuButton/MenuButton.test-ids.js.map +1 -0
- package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
- package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +1 -1
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/Modal/ModalManager.d.ts.map +1 -1
- package/lib/components/Modal/ModalManager.js +5 -2
- package/lib/components/Modal/ModalManager.js.map +1 -1
- package/lib/components/Number/Number.test-ids.d.ts +2 -2
- package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
- package/lib/components/Number/Number.test-ids.js +8 -2
- package/lib/components/Number/Number.test-ids.js.map +1 -1
- package/lib/components/Number/NumberInput.js +1 -1
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/NumberRangeInput.js +1 -1
- package/lib/components/Number/NumberRangeInput.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +2 -2
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
- package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
- package/lib/components/Phone/Phone.test-ids.js +3 -1
- package/lib/components/Phone/Phone.test-ids.js.map +1 -1
- package/lib/components/Phone/PhoneInput.js +2 -2
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts +1 -0
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +37 -40
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/PopoverManager.d.ts.map +1 -1
- package/lib/components/Popover/PopoverManager.js +11 -10
- package/lib/components/Popover/PopoverManager.js.map +1 -1
- package/lib/components/Popover/modifiers.d.ts +1 -0
- package/lib/components/Popover/modifiers.d.ts.map +1 -1
- package/lib/components/Popover/modifiers.js +97 -1
- package/lib/components/Popover/modifiers.js.map +1 -1
- package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
- package/lib/components/Progress/Progress.styles.js +25 -20
- package/lib/components/Progress/Progress.styles.js.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.js +2 -2
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +1 -9
- package/lib/components/SearchInput/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.js +2 -2
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Select/Select.test-ids.d.ts +1 -1
- package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
- package/lib/components/Select/Select.test-ids.js +2 -1
- package/lib/components/Select/Select.test-ids.js.map +1 -1
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
- package/lib/components/Slider/Slider.styles.js +114 -128
- package/lib/components/Slider/Slider.styles.js.map +1 -1
- package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
- package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
- package/lib/components/Slider/Slider.test-ids.js +2 -1
- package/lib/components/Slider/Slider.test-ids.js.map +1 -1
- package/lib/components/Slider/utils.d.ts.map +1 -1
- package/lib/components/Slider/utils.js +0 -1
- package/lib/components/Slider/utils.js.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
- package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.js +21 -18
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/TextArea/TextArea.js +1 -1
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
- package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.test-ids.js +2 -1
- package/lib/components/TextArea/TextArea.test-ids.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/hooks/useBreakpoint.js +4 -1
- package/lib/hooks/useBreakpoint.js.map +1 -1
- package/lib/hooks/useChToPxConversionFactor.d.ts +3 -0
- package/lib/hooks/useChToPxConversionFactor.d.ts.map +1 -0
- package/lib/hooks/useChToPxConversionFactor.js +13 -0
- package/lib/hooks/useChToPxConversionFactor.js.map +1 -0
- package/lib/hooks/useElement.d.ts +1 -1
- package/lib/hooks/useElement.d.ts.map +1 -1
- package/lib/hooks/useI18n.d.ts +13 -0
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useScrollToggle.d.ts.map +1 -1
- package/lib/hooks/useScrollToggle.js +0 -1
- package/lib/hooks/useScrollToggle.js.map +1 -1
- package/lib/hooks/useTestIds.d.ts +1 -1
- package/lib/hooks/useTestIds.d.ts.map +1 -1
- package/lib/hooks/useTestIds.js +3 -0
- package/lib/hooks/useTestIds.js.map +1 -1
- package/lib/i18n/default.d.ts +13 -0
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +14 -0
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +13 -0
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/styles/gradients.d.ts.map +1 -1
- package/lib/styles/gradients.js.map +1 -1
- package/lib/theme/ThemeMachine.js.map +1 -1
- package/lib/types/types.d.ts +7 -2
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/lib/utils/createTestIds.d.ts +1 -6
- package/lib/utils/createTestIds.d.ts.map +1 -1
- package/lib/utils/createTestIds.js +2 -4
- package/lib/utils/createTestIds.js.map +1 -1
- package/lib/utils/debounce.d.ts +2 -2
- package/lib/utils/debounce.d.ts.map +1 -1
- package/lib/utils/debounce.js +9 -10
- package/lib/utils/debounce.js.map +1 -1
- package/lib/utils/getEdge.d.ts +7 -0
- package/lib/utils/getEdge.d.ts.map +1 -0
- package/lib/utils/getEdge.js +9 -0
- package/lib/utils/getEdge.js.map +1 -0
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/throttle.d.ts +4 -0
- package/lib/utils/throttle.d.ts.map +1 -0
- package/lib/utils/throttle.js +15 -0
- package/lib/utils/throttle.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryItem.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SummaryItem.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,4HAKvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAOxE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,UAAU,QAAQ;IAChB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6DAA6D;IAC7D,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAOxE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,UAAU,QAAQ;IAChB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6DAA6D;IAC7D,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;AA4HD,eAAO,MAAM,SAAS,gNA6BrB,CAAC;AAIF,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,GAAG,YAAY,CAYpC,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -117,31 +117,34 @@ const getVerticalStyles = ({ selected, theme }) => {
|
|
|
117
117
|
}
|
|
118
118
|
`;
|
|
119
119
|
};
|
|
120
|
-
export const StyledTab = styled(BareButton) `
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
export const StyledTab = styled(BareButton)(({ theme, tabType, selected }) => css `
|
|
121
|
+
position: relative;
|
|
122
|
+
background: none;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
white-space: nowrap;
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
${props => props.selected &&
|
|
126
|
+
${selected &&
|
|
127
127
|
css `
|
|
128
128
|
font-weight: bold;
|
|
129
129
|
`}
|
|
130
|
-
white-space: nowrap;
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
& + & {
|
|
132
|
+
margin-inline-start: 0;
|
|
133
|
+
}
|
|
135
134
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
&:focus {
|
|
136
|
+
outline: none;
|
|
137
|
+
}
|
|
139
138
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
&:disabled {
|
|
140
|
+
cursor: not-allowed;
|
|
141
|
+
opacity: ${theme.base['disabled-opacity']};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
${tabType === 'horizontal'
|
|
145
|
+
? getHorizontalStyles({ theme, selected })
|
|
146
|
+
: getVerticalStyles({ theme, selected })}
|
|
147
|
+
`);
|
|
145
148
|
StyledTab.defaultProps = defaultThemeProp;
|
|
146
149
|
const Tab = forwardRef(({ selected, content, count, type, disabled, ...restProps }, ref) => {
|
|
147
150
|
return (_jsxs(StyledTab, { ref: ref, selected: selected, tabType: type, disabled: disabled, ...restProps, children: [_jsx("span", { "data-content": content, children: content }), count] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,UAAU,EAAwB,MAAM,OAAO,CAAC;AACxE,OAAO,MAAM,EAAE,EAAe,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAsB9C,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,CAAA;;;wBAGlB,KAAK;;CAE5B,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"Tab.js","sourceRoot":"","sources":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AAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;GAC3C,CACF,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1C,MAAM,GAAG,GAAgC,UAAU,CACjD,CACE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,SAAS,EAA6B,EACrF,GAA2B,EAC3B,EAAE;IACF,OAAO,CACL,MAAC,SAAS,IAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAM,SAAS,aACvF,+BAAoB,OAAO,YAAG,OAAO,GAAQ,EAC5C,KAAK,IACI,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { FC, ReactNode, forwardRef, PropsWithoutRef, Ref } from 'react';\nimport styled, { StyledProps, css } from 'styled-components';\nimport { transparentize } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledCount } from '../Badges/Count';\nimport { ForwardProps } from '../../types';\nimport BareButton from '../Button/BareButton';\n\nimport { TabsProps } from './Tabs.types';\n\ninterface TabProps {\n /** Indicates if this Tab is active. */\n selected: boolean;\n /** The text to display as the name of the Tab. */\n content: string;\n /** A number to associate with the Tab. */\n count?: ReactNode;\n /** Determines the direction in which the Tab will render. */\n type: TabsProps['type'];\n /** Disables the tab if true */\n disabled?: boolean;\n}\n\nexport interface StyledTabProps {\n selected: TabProps['selected'];\n tabType: TabProps['type'];\n}\n\nconst activeStyle = (color: string) => css`\n ::after {\n display: block;\n background-color: ${color};\n }\n`;\n\nconst getHorizontalStyles = ({\n selected,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'>) => {\n const primaryColor = theme.base.palette.interactive;\n const lightenedColor = tryCatch(() => transparentize(0.3, primaryColor)) ?? '';\n const { spacing } = theme.base;\n\n return css`\n align-items: center;\n display: flex;\n flex-direction: row;\n height: calc(4 * ${spacing});\n padding: 0 calc(2 * ${spacing});\n border: none;\n text-decoration: none;\n\n span:first-of-type {\n color: ${selected ? primaryColor : theme.base.palette['foreground-color']};\n display: inline-block;\n\n ::before {\n content: attr(data-content);\n display: block;\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n }\n\n &:first-child {\n margin-left: 0;\n }\n\n ::after {\n background: ${selected ? primaryColor : lightenedColor};\n display: ${selected ? 'block' : 'none'};\n content: '';\n position: absolute;\n height: 0.125rem;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:hover&:not(:disabled) {\n ${activeStyle(lightenedColor)}\n text-decoration: none;\n }\n\n &:focus,\n &:not([disabled]):focus {\n ${activeStyle(lightenedColor)}\n box-shadow: ${theme.base.shadow['focus-inset']};\n text-decoration: none;\n }\n\n ${StyledCount} {\n margin-inline-start: calc(0.5 * ${spacing});\n }\n `;\n};\n\nconst getVerticalStyles = ({\n selected,\n theme\n}: Pick<StyledProps<StyledTabProps>, 'theme' | 'selected'>) => {\n const borderColor = theme.base.palette['border-line'];\n const primaryColor = theme.base.palette.interactive;\n const lightenedColor = tryCatch(() => transparentize(0.5, primaryColor)) ?? '';\n const { spacing } = theme.base;\n\n return css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-style: solid;\n color: ${theme.base.palette['foreground-color']};\n border-width: 0.0625rem 0;\n border-color: ${borderColor};\n height: calc(5.5 * ${spacing});\n margin-top: -0.0625rem;\n padding: 0 calc(2 * ${spacing});\n text-decoration: none;\n\n &:first-child {\n border-top: 0.0625rem solid ${borderColor};\n }\n\n ::after {\n content: '';\n position: absolute;\n display: ${selected ? 'block' : 'none'};\n top: 0;\n bottom: 0;\n right: 0;\n width: 0.25rem;\n background: ${primaryColor};\n }\n\n &:hover&:not(:disabled) {\n ${activeStyle(lightenedColor)}\n text-decoration: none;\n }\n\n &:focus,\n &:not([disabled]):focus {\n ${activeStyle(primaryColor)}\n box-shadow: inset 0 0 0 0.0625rem ${primaryColor};\n text-decoration: none;\n }\n `;\n};\n\nexport const StyledTab = styled(BareButton)<StyledTabProps>(\n ({ theme, tabType, selected }) => css`\n position: relative;\n background: none;\n cursor: pointer;\n white-space: nowrap;\n\n ${selected &&\n css`\n font-weight: bold;\n `}\n\n & + & {\n margin-inline-start: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: ${theme.base['disabled-opacity']};\n }\n\n ${tabType === 'horizontal'\n ? getHorizontalStyles({ theme, selected })\n : getVerticalStyles({ theme, selected })}\n `\n);\n\nStyledTab.defaultProps = defaultThemeProp;\n\nconst Tab: FC<TabProps & ForwardProps> = forwardRef(\n (\n { selected, content, count, type, disabled, ...restProps }: PropsWithoutRef<TabProps>,\n ref: Ref<HTMLButtonElement>\n ) => {\n return (\n <StyledTab ref={ref} selected={selected} tabType={type} disabled={disabled} {...restProps}>\n <span data-content={content}>{content}</span>\n {count}\n </StyledTab>\n );\n }\n);\n\nexport default Tab;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,EAGV,WAAW,EACX,QAAQ,EAER,SAAS,EACV,MAAM,OAAO,CAAC;AAGf,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAoB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA8BzD,MAA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AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import {\n FC,\n Ref,\n forwardRef,\n PropsWithoutRef,\n ChangeEvent,\n useCallback,\n useState,\n ChangeEventHandler,\n useEffect\n} from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport FormField from '../FormField';\nimport { FormControlProps, StyledFormControl } from '../FormControl';\nimport { hasProp } from '../../utils';\nimport { useAutoResize, useConsolidatedRef, useI18n, useTestIds, useUID } from '../../hooks';\nimport Text from '../Text';\n\nimport StyledTextArea from './TextArea.styles';\nimport { getTextAreaTestIds } from './TextArea.test-ids';\n\nexport interface TextAreaProps extends FormControlProps, BaseProps, NoChildrenProp, TestIdProp {\n /** Minimum length of characters that can be input. */\n minLength?: number;\n /** Maximum length of characters that can be input. */\n maxLength?: number;\n /**\n * Allows the user to resize the Text Area.\n * @default false\n */\n resizable?: boolean;\n /**\n * Enables the Text Area to resize itself automatically.\n * @default false\n */\n autoResize?: boolean;\n /**\n * Display a live character count in relation to the maxLength.\n * @default false\n */\n displayCharCount?: boolean;\n /**\n * Allow or disallow a value beyond the maxLength.\n * @default true\n */\n hardStop?: boolean;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n}\n\nconst TextArea: FC<TextAreaProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<TextAreaProps>, ref: Ref<HTMLTextAreaElement>) => {\n const uid = useUID();\n const {\n testId,\n additionalInfo,\n id = uid,\n value,\n defaultValue,\n required = false,\n disabled = false,\n readOnly = false,\n label,\n labelHidden,\n info,\n status,\n resizable = false,\n autoResize = false,\n maxLength,\n displayCharCount = false,\n hardStop = true,\n onChange: onChangeProp,\n onResolveSuggestion,\n ...restProps\n } = props;\n const t = useI18n();\n\n const testIds = useTestIds(testId, getTextAreaTestIds);\n\n const [textAreaRef, resizeTextArea] = useAutoResize<HTMLTextAreaElement>(undefined, 100);\n const consolidatedRef = useConsolidatedRef(textAreaRef, ref);\n const [charCount, setCharCount] = useState(0);\n\n const controlProp: {\n value?: string;\n defaultValue?: string;\n } = {};\n\n useEffect(() => {\n if ('value' in props) {\n setCharCount(props.value ? props.value.length : 0);\n } else if ('defaultValue' in props) {\n setCharCount(props.defaultValue ? props.defaultValue.length : 0);\n }\n }, [props]);\n\n // Conditionally render component as controlled/uncontrolled\n if (hasProp(props, 'value')) {\n controlProp.value = value ?? '';\n } else if (hasProp(props, 'defaultValue')) {\n controlProp.defaultValue = defaultValue ?? '';\n }\n\n const onChange = useCallback(\n (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!hardStop || maxLength === undefined || e.target.value.length <= maxLength) {\n onChangeProp?.(e);\n setCharCount(e.target.value.length);\n resizeTextArea();\n }\n },\n [onChangeProp, resizeTextArea, hardStop, maxLength]\n );\n\n const Comp = (\n <StyledFormControl\n {...{\n 'data-testid': testIds.control,\n ref: autoResize ? consolidatedRef : ref,\n id,\n required,\n disabled,\n status,\n readOnly,\n resizable,\n maxLength: hardStop ? maxLength : undefined,\n hasSuggestion: status === 'pending' && !!onResolveSuggestion,\n ...controlProp,\n ...restProps,\n onChange,\n as: StyledTextArea\n }}\n />\n );\n\n return label || displayCharCount ? (\n <FormField\n {...{\n testId: testIds,\n additionalInfo,\n label,\n labelHidden,\n id,\n readOnly,\n info,\n status,\n charLimitDisplay:\n displayCharCount && typeof maxLength === 'number' ? (\n <Text\n readOnly={readOnly}\n variant='secondary'\n aria-live={maxLength >= 0 && maxLength - charCount <= 20 ? 'polite' : 'off'}\n >\n {maxLength >= 0 ? t('x_of_y', [charCount || '0', maxLength]) : charCount}\n </Text>\n ) : undefined,\n required,\n disabled,\n onResolveSuggestion\n }}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default TextArea;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getTextAreaTestIds: (testIdProp?: string | undefined) => import("
|
|
1
|
+
export declare const getTextAreaTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
2
2
|
//# sourceMappingURL=TextArea.test-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.test-ids.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,wKAAgE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { createTestIds } from '../../utils';
|
|
2
|
-
|
|
2
|
+
import { elements } from '../FormField/FormField.test-ids';
|
|
3
|
+
export const getTextAreaTestIds = createTestIds('text-area', ['control', ...elements]);
|
|
3
4
|
//# sourceMappingURL=TextArea.test-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.test-ids.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"TextArea.test-ids.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,GAAG,QAAQ,CAAU,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\nimport { elements } from '../FormField/FormField.test-ids';\n\nexport const getTextAreaTestIds = createTestIds('text-area', ['control', ...elements] as const);\n"]}
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as useAfterInitialEffect } from './useAfterInitialEffect';
|
|
|
3
3
|
export { default as useArrows } from './useArrows';
|
|
4
4
|
export { default as useAutoResize } from './useAutoResize';
|
|
5
5
|
export { default as useBreakpoint } from './useBreakpoint';
|
|
6
|
+
export { default as useChToPxConversionFactor } from './useChToPxConversionFactor';
|
|
6
7
|
export { default as useConfiguration } from './useConfiguration';
|
|
7
8
|
export { default as useConsolidatedRef } from './useConsolidatedRef';
|
|
8
9
|
export { default as useDirection } from './useDirection';
|
package/lib/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,mBAAmB,EAC9B,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,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AiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/lib/hooks/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as useAfterInitialEffect } from './useAfterInitialEffect';
|
|
|
3
3
|
export { default as useArrows } from './useArrows';
|
|
4
4
|
export { default as useAutoResize } from './useAutoResize';
|
|
5
5
|
export { default as useBreakpoint } from './useBreakpoint';
|
|
6
|
+
export { default as useChToPxConversionFactor } from './useChToPxConversionFactor';
|
|
6
7
|
export { default as useConfiguration } from './useConfiguration';
|
|
7
8
|
export { default as useConsolidatedRef } from './useConsolidatedRef';
|
|
8
9
|
export { default as useDirection } from './useDirection';
|
package/lib/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,mBAAmB,EAE9B,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAA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UseActiveDescendantConfig,\n useLazyDescendant\n} from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,mBAAmB,EAE9B,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,I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AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export {\n default as useActiveDescendant,\n UseActiveDescendantConfig,\n useLazyDescendant\n} from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useChToPxConversionFactor } from './useChToPxConversionFactor';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,SAAS,EAAE,MAAM,OAAO,CAAC;AAU1E;;;;;GAKG;AACH,QAAA,MAAM,aAAa,eACL,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;oBAM1B,UAAU,OAAO,CAAC,GAAG,SAAS;;;aAuEjD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState, useLayoutEffect, useCallback } from 'react';
|
|
2
2
|
import { windowIsAvailable, debounce } from '../utils';
|
|
3
|
+
import useChToPxConversionFactor from './useChToPxConversionFactor';
|
|
3
4
|
import useTheme from './useTheme';
|
|
4
5
|
// We should be able to safely capture once as the computed root font size is unlikely to change during normal runtime.
|
|
5
6
|
const rootFontSize = window.getComputedStyle(document.documentElement).fontSize;
|
|
@@ -13,6 +14,7 @@ const useBreakpoint = (breakpoint, { breakpointRef, defaultValue = false, themeP
|
|
|
13
14
|
const { base: { breakpoints, 'content-width': contentWidth } } = useTheme();
|
|
14
15
|
const breakpointVal = themeProp === 'content-width' ? contentWidth[breakpoint] : breakpoints[breakpoint];
|
|
15
16
|
const [matches, setMatches] = useState(windowIsAvailable ? window.matchMedia(`(min-width: ${breakpointVal})`).matches : !!defaultValue);
|
|
17
|
+
const chToPxConversionFactor = useChToPxConversionFactor();
|
|
16
18
|
const onResize = useCallback((e) => {
|
|
17
19
|
setMatches(e.matches);
|
|
18
20
|
}, []);
|
|
@@ -23,7 +25,8 @@ const useBreakpoint = (breakpoint, { breakpointRef, defaultValue = false, themeP
|
|
|
23
25
|
const matchesBreakpoint = entries.some(({ target, contentRect }) => {
|
|
24
26
|
if (target !== breakpointRef.current)
|
|
25
27
|
return;
|
|
26
|
-
|
|
28
|
+
const multiplier = themeProp === 'breakpoints' ? parseFloat(rootFontSize) : chToPxConversionFactor;
|
|
29
|
+
return contentRect.width >= parseFloat(breakpointVal) * multiplier;
|
|
27
30
|
});
|
|
28
31
|
setMatches(matchesBreakpoint);
|
|
29
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.js","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAa,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,uHAAuH;AACvH,MAAM,YAAY,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CACpB,UAA4C,EAC5C,EACE,aAAa,EACb,YAAY,GAAG,KAAK,EACpB,SAAS,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AAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;qBACvE;oBACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;iBACrD;YACH,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAE7B,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useLayoutEffect, useCallback, RefObject } from 'react';\n\nimport { windowIsAvailable, debounce } from '../utils';\n\nimport useChToPxConversionFactor from './useChToPxConversionFactor';\nimport useTheme from './useTheme';\n\n// We should be able to safely capture once as the computed root font size is unlikely to change during normal runtime.\nconst rootFontSize = window.getComputedStyle(document.documentElement).fontSize;\n\n/**\n * @example const breakpointActive = useBreakpoint(breakpoint);\n * @param breakpoint The string indicator for the breakpoint that should be checked for validity.\n * @param options\n * @returns breakpointActive:: A boolean indicating if the given breakpoint is active or not. If false, the breakpoint is too big for the screen size.\n */\nconst useBreakpoint = (\n breakpoint: 'xs' | 'sm' | 'md' | 'lg' | 'xl',\n {\n breakpointRef,\n defaultValue = false,\n themeProp = 'breakpoints'\n }: {\n breakpointRef?: RefObject<Element> | undefined;\n defaultValue?: boolean;\n themeProp?: 'breakpoints' | 'content-width';\n } = {}\n) => {\n const {\n base: { breakpoints, 'content-width': contentWidth }\n } = useTheme();\n const breakpointVal =\n themeProp === 'content-width' ? contentWidth[breakpoint] : breakpoints[breakpoint];\n\n const [matches, setMatches] = useState(\n windowIsAvailable ? window.matchMedia(`(min-width: ${breakpointVal})`).matches : !!defaultValue\n );\n\n const chToPxConversionFactor = useChToPxConversionFactor();\n\n const onResize = useCallback((e: MediaQueryListEvent) => {\n setMatches(e.matches);\n }, []);\n\n useLayoutEffect(() => {\n // Breakpoint handling for contained elements\n if (breakpointRef && breakpointRef.current) {\n const observer = new ResizeObserver(entries => {\n const matchesBreakpoint = entries.some(({ target, contentRect }) => {\n if (target !== breakpointRef.current) return;\n\n const multiplier =\n themeProp === 'breakpoints' ? parseFloat(rootFontSize) : chToPxConversionFactor;\n return contentRect.width >= parseFloat(breakpointVal) * multiplier;\n });\n\n setMatches(matchesBreakpoint);\n });\n\n observer.observe(breakpointRef.current);\n\n return () => {\n observer.disconnect();\n };\n }\n\n // Breakpoint handling for viewport\n if (windowIsAvailable) {\n const mediaMatch = window.matchMedia(`(min-width: ${breakpointVal})`);\n const mediaMatchAvailable = 'addEventListener' in mediaMatch;\n const resizeHandler = debounce(() => {\n setMatches(window.innerWidth >= parseInt(breakpointVal, 10));\n }, 100);\n\n // Need to check useMatchMedia in order to support unit testing\n if (mediaMatchAvailable) {\n mediaMatch.addEventListener('change', onResize);\n setMatches(mediaMatch.matches);\n } else {\n window.addEventListener('resize', resizeHandler);\n setMatches(window.innerWidth >= parseInt(breakpointVal, 10));\n }\n\n return () => {\n // Need to check useMatchMedia in order to support unit testing\n if (mediaMatchAvailable) mediaMatch.removeEventListener('change', onResize);\n else {\n window.removeEventListener('resize', resizeHandler);\n }\n };\n }\n }, [breakpointRef?.current]);\n\n return matches;\n};\n\nexport default useBreakpoint;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChToPxConversionFactor.d.ts","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,yBAAyB,cAU9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
const useChToPxConversionFactor = () => {
|
|
3
|
+
return useMemo(() => {
|
|
4
|
+
const chToPxDiv = document.createElement('div');
|
|
5
|
+
chToPxDiv.style.width = '1ch';
|
|
6
|
+
document.body.append(chToPxDiv);
|
|
7
|
+
const conversionFactor = chToPxDiv.offsetWidth;
|
|
8
|
+
chToPxDiv.remove();
|
|
9
|
+
return conversionFactor;
|
|
10
|
+
}, []);
|
|
11
|
+
};
|
|
12
|
+
export default useChToPxConversionFactor;
|
|
13
|
+
//# sourceMappingURL=useChToPxConversionFactor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChToPxConversionFactor.js","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IACrC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChD,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QAC9B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC;QAC/C,SAAS,CAAC,MAAM,EAAE,CAAC;QAEnB,OAAO,gBAAgB,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nconst useChToPxConversionFactor = () => {\n return useMemo(() => {\n const chToPxDiv = document.createElement('div');\n chToPxDiv.style.width = '1ch';\n document.body.append(chToPxDiv);\n const conversionFactor = chToPxDiv.offsetWidth;\n chToPxDiv.remove();\n\n return conversionFactor;\n }, []);\n};\n\nexport default useChToPxConversionFactor;\n"]}
|
|
@@ -5,6 +5,6 @@ import { RefCallback } from 'react';
|
|
|
5
5
|
* @returns * element:: A DOM Element.
|
|
6
6
|
* * setElementFunction:: The function responsible for setting and resetting the element variable. This function is typically passed to the ref attribute of the element you wish to reference.
|
|
7
7
|
*/
|
|
8
|
-
declare const useElement: <T extends Element>(initial?: T | null) => [T | null,
|
|
8
|
+
declare const useElement: <T extends Element>(initial?: T | null) => [T | null, RefCallback<T>];
|
|
9
9
|
export default useElement;
|
|
10
10
|
//# sourceMappingURL=useElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;GAKG;AACH,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;GAKG;AACH,QAAA,MAAM,UAAU,uEACa,CAAC;AAE9B,eAAe,UAAU,CAAC"}
|
package/lib/hooks/useI18n.d.ts
CHANGED
|
@@ -209,6 +209,9 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
209
209
|
picker_jump_to_month_and_year: string;
|
|
210
210
|
calendar_assist: string;
|
|
211
211
|
calendar: string;
|
|
212
|
+
choose_date: string;
|
|
213
|
+
choose_date_and_time: string;
|
|
214
|
+
choose_week: string;
|
|
212
215
|
boolean_display_true_label: string;
|
|
213
216
|
boolean_display_false_label: string;
|
|
214
217
|
step_changed_to_name: string;
|
|
@@ -259,6 +262,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
259
262
|
};
|
|
260
263
|
edit_tags: string;
|
|
261
264
|
tags: string;
|
|
265
|
+
view_profile: string;
|
|
262
266
|
timeline_toolbar_sort_descending: string;
|
|
263
267
|
timeline_toolbar_sort_ascending: string;
|
|
264
268
|
timeline_toolbar_group_date: string;
|
|
@@ -330,6 +334,14 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
330
334
|
many: string;
|
|
331
335
|
other: string;
|
|
332
336
|
};
|
|
337
|
+
feed_post_comments: {
|
|
338
|
+
zero: string;
|
|
339
|
+
one: string;
|
|
340
|
+
two: string;
|
|
341
|
+
few: string;
|
|
342
|
+
many: string;
|
|
343
|
+
other: string;
|
|
344
|
+
};
|
|
333
345
|
feed_attachments_added: {
|
|
334
346
|
zero: string;
|
|
335
347
|
one: string;
|
|
@@ -396,6 +408,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
396
408
|
new_message: string;
|
|
397
409
|
attachments: string;
|
|
398
410
|
attachments_x_of_y: string;
|
|
411
|
+
use_current_template: string;
|
|
399
412
|
unique_entities: {
|
|
400
413
|
zero: string;
|
|
401
414
|
one: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollToggle.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,eAAe,cAAc,MAAM;wBAKF,IAAI;yBAMH,IAAI;
|
|
1
|
+
{"version":3,"file":"useScrollToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollToggle.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,eAAe,cAAc,MAAM;wBAKF,IAAI;yBAMH,IAAI;CA+B3C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -32,7 +32,6 @@ const useScrollToggle = (selector = ':root') => {
|
|
|
32
32
|
}, [selector]);
|
|
33
33
|
useLayoutEffect(() => {
|
|
34
34
|
scrollbarWidthRef.current = getScrollbarWidth();
|
|
35
|
-
// cSpell:ignoreRegExp /unmounts?/
|
|
36
35
|
// To be safe, clean up when the calling component unmounts just in case it did not do so.
|
|
37
36
|
return enableScroll;
|
|
38
37
|
// As enableScroll is memoized with no deps, the cleanup **should** only run once on unmount. If that changes, adjust here accordingly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollToggle.js","sourceRoot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Q;YAAE,OAAO;QACtB,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS;YAAE,OAAO;QAErC,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAEnD,QAAQ,CAAC,OAAO,CAAC,WAAW,GAAG;QAC3B,QAAQ;UACN,SAAS,CAAC,CAAC,CAAC,uBAAuB,iBAAiB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE;UAChF,SAAS,CAAC,CAAC,CAAC,sBAAsB,iBAAiB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE;;;KAGpF,CAAC;QAEF,CAAC,gBAAgB,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,eAAe,CAAC,GAAG,EAAE;QACnB,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,EAAE,CAAC;QAEhD,0FAA0F;QAC1F,OAAO,YAAY,CAAC;QAEpB,uIAAuI;IACzI,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AACzC,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useCallback, useLayoutEffect, useRef } from 'react';\n\nimport { getScrollbarWidth, testElForOverflow } from '../utils';\n\nimport useConfiguration from './useConfiguration';\n\nconst useScrollToggle = (selector: string = ':root') => {\n const scrollbarWidthRef = useRef(0);\n const styleRef = useRef<HTMLStyleElement | null>(null);\n const { styleSheetTarget } = useConfiguration();\n\n const enableScroll = useCallback((): void => {\n // No need to short circuit if called repetitively, will just perform a simple null set on the ref.\n styleRef.current?.remove();\n styleRef.current = null;\n }, []);\n\n const disableScroll = useCallback((): void => {\n // If we have a ref to the style el we can assume styles to disable overflow are in the DOM. No need for a DOM query.\n if (styleRef.current) return;\n const scrollEl = document.querySelector(selector);\n if (!scrollEl) return;\n const [overflowX, overflowY] = testElForOverflow(scrollEl);\n if (!overflowX && !overflowY) return;\n\n styleRef.current = document.createElement('style');\n\n styleRef.current.textContent = `\n ${selector} {\n ${overflowY ? `padding-inline-end: ${scrollbarWidthRef.current}px !important` : ''};\n ${overflowX ? `padding-block-end: ${scrollbarWidthRef.current}px !important` : ''};\n overflow: hidden !important;\n }\n `;\n\n (styleSheetTarget ?? document.head).append(styleRef.current);\n }, [selector]);\n\n useLayoutEffect(() => {\n scrollbarWidthRef.current = getScrollbarWidth();\n\n // To be safe, clean up when the calling component unmounts just in case it did not do so.\n return enableScroll;\n\n // As enableScroll is memoized with no deps, the cleanup **should** only run once on unmount. If that changes, adjust here accordingly.\n }, [enableScroll]);\n\n return { enableScroll, disableScroll };\n};\n\nexport default useScrollToggle;\n"]}
|
|
@@ -5,6 +5,6 @@ import { TestIdProp } from '../types';
|
|
|
5
5
|
* @param getTestIds Function for generating test ids for a particular component.
|
|
6
6
|
* @returns An empty object or an object with a root key and camelCased keys and values based on params.
|
|
7
7
|
*/
|
|
8
|
-
declare const useTestIds: <F extends (testIdProp?: string | undefined) => import("../
|
|
8
|
+
declare const useTestIds: <F extends (testIdProp?: string | undefined) => import("../types").TestIdsRecord<readonly string[]>>(testIdProp: string | Partial<ReturnType<F>> | undefined, getTestIds: F) => Partial<ReturnType<F>>;
|
|
9
9
|
export default useTestIds;
|
|
10
10
|
//# sourceMappingURL=useTestIds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTestIds.d.ts","sourceRoot":"","sources":["../../src/hooks/useTestIds.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC;;;;;GAKG;AAEH,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"useTestIds.d.ts","sourceRoot":"","sources":["../../src/hooks/useTestIds.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC;;;;;GAKG;AAEH,QAAA,MAAM,UAAU,wMAef,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/lib/hooks/useTestIds.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTestIds.js","sourceRoot":"","sources":["../../src/hooks/useTestIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AAEH,MAAM,UAAU,GAAG,CACjB,
|
|
1
|
+
{"version":3,"file":"useTestIds.js","sourceRoot":"","sources":["../../src/hooks/useTestIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AAEH,MAAM,UAAU,GAAG,CACjB,UAAyD,EACzD,UAAa,EACW,EAAE;IAC1B,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEvC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QAExB,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YAClC,OAAO,UAAU,CAAC;SACnB;QAED,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { TestIdProp } from '../types';\nimport type { createTestIds } from '../utils';\n\nimport useConfiguration from './useConfiguration';\n\n/**\n * @example const testIds = useTestIds(testIdProp: 'some-test-id', getSomeComponentTestIds);\n * @param testIdProp `testId` prop passed to the component.\n * @param getTestIds Function for generating test ids for a particular component.\n * @returns An empty object or an object with a root key and camelCased keys and values based on params.\n */\n\nconst useTestIds = <F extends ReturnType<typeof createTestIds>>(\n testIdProp: TestIdProp['testId'] | Partial<ReturnType<F>>,\n getTestIds: F\n): Partial<ReturnType<F>> => {\n const { testIds } = useConfiguration();\n\n return useMemo(() => {\n if (!testIds) return {};\n\n if (typeof testIdProp === 'object') {\n return testIdProp;\n }\n\n return getTestIds(testIdProp);\n }, [testIds, testIdProp, getTestIds]);\n};\n\nexport default useTestIds;\n"]}
|
package/lib/i18n/default.d.ts
CHANGED
|
@@ -205,6 +205,9 @@ declare const _default: {
|
|
|
205
205
|
picker_jump_to_month_and_year: string;
|
|
206
206
|
calendar_assist: string;
|
|
207
207
|
calendar: string;
|
|
208
|
+
choose_date: string;
|
|
209
|
+
choose_date_and_time: string;
|
|
210
|
+
choose_week: string;
|
|
208
211
|
boolean_display_true_label: string;
|
|
209
212
|
boolean_display_false_label: string;
|
|
210
213
|
step_changed_to_name: string;
|
|
@@ -255,6 +258,7 @@ declare const _default: {
|
|
|
255
258
|
};
|
|
256
259
|
edit_tags: string;
|
|
257
260
|
tags: string;
|
|
261
|
+
view_profile: string;
|
|
258
262
|
timeline_toolbar_sort_descending: string;
|
|
259
263
|
timeline_toolbar_sort_ascending: string;
|
|
260
264
|
timeline_toolbar_group_date: string;
|
|
@@ -326,6 +330,14 @@ declare const _default: {
|
|
|
326
330
|
many: string;
|
|
327
331
|
other: string;
|
|
328
332
|
};
|
|
333
|
+
feed_post_comments: {
|
|
334
|
+
zero: string;
|
|
335
|
+
one: string;
|
|
336
|
+
two: string;
|
|
337
|
+
few: string;
|
|
338
|
+
many: string;
|
|
339
|
+
other: string;
|
|
340
|
+
};
|
|
329
341
|
feed_attachments_added: {
|
|
330
342
|
zero: string;
|
|
331
343
|
one: string;
|
|
@@ -392,6 +404,7 @@ declare const _default: {
|
|
|
392
404
|
new_message: string;
|
|
393
405
|
attachments: string;
|
|
394
406
|
attachments_x_of_y: string;
|
|
407
|
+
use_current_template: string;
|
|
395
408
|
unique_entities: {
|
|
396
409
|
zero: string;
|
|
397
410
|
one: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA0gCE"}
|
package/lib/i18n/default.js
CHANGED
|
@@ -229,6 +229,9 @@ export default {
|
|
|
229
229
|
picker_jump_to_month_and_year: 'Jump to month and year selection',
|
|
230
230
|
calendar_assist: 'Use cursor keys to navigate dates',
|
|
231
231
|
calendar: 'Calendar',
|
|
232
|
+
choose_date: 'Choose date',
|
|
233
|
+
choose_date_and_time: 'Choose date and time',
|
|
234
|
+
choose_week: 'Choose week',
|
|
232
235
|
/* core:Boolean */
|
|
233
236
|
boolean_display_true_label: 'Yes',
|
|
234
237
|
boolean_display_false_label: 'No',
|
|
@@ -294,6 +297,8 @@ export default {
|
|
|
294
297
|
/* work:Tags */
|
|
295
298
|
edit_tags: 'Edit tags',
|
|
296
299
|
tags: 'Tags',
|
|
300
|
+
/* work:Glimpse */
|
|
301
|
+
view_profile: 'View profile',
|
|
297
302
|
/* work:Timeline */
|
|
298
303
|
timeline_toolbar_sort_descending: 'Newest first',
|
|
299
304
|
timeline_toolbar_sort_ascending: 'Oldest first',
|
|
@@ -372,6 +377,14 @@ export default {
|
|
|
372
377
|
many: '{0} likes',
|
|
373
378
|
other: '{0} likes'
|
|
374
379
|
},
|
|
380
|
+
feed_post_comments: {
|
|
381
|
+
zero: 'No comments',
|
|
382
|
+
one: '{0} comment',
|
|
383
|
+
two: '{0} comments',
|
|
384
|
+
few: '{0} comments',
|
|
385
|
+
many: '{0} comments',
|
|
386
|
+
other: '{0} comments'
|
|
387
|
+
},
|
|
375
388
|
feed_attachments_added: {
|
|
376
389
|
zero: 'No attachments added',
|
|
377
390
|
one: '{0} attachment added',
|
|
@@ -439,6 +452,7 @@ export default {
|
|
|
439
452
|
new_message: 'New message',
|
|
440
453
|
attachments: 'attachments',
|
|
441
454
|
attachments_x_of_y: 'attachment {0} of {1}',
|
|
455
|
+
use_current_template: 'Use suggested reply {0} of {1} ',
|
|
442
456
|
/* cs:Email */
|
|
443
457
|
unique_entities: {
|
|
444
458
|
zero: 'No unique entities',
|