aristid-ds 20.1.0 → 20.2.0-77d667b
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 +74 -0
- package/dist/Kit/App/index.js +1 -1
- package/dist/Kit/DataDisplay/Avatar/index.js +1 -1
- package/dist/Kit/DataDisplay/Badge/index.js +1 -1
- package/dist/Kit/DataDisplay/Card/index.js +1 -1
- package/dist/Kit/DataDisplay/Carousel/index.js +1 -1
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Comment/index.js +1 -1
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Image/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/Kanban/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/TabDropdownButton.d.ts +7 -0
- package/dist/Kit/DataDisplay/Tab/index.d.ts +6 -1
- package/dist/Kit/DataDisplay/Tab/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/types.d.ts +8 -0
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +12 -1
- package/dist/Kit/DataDisplay/ToolBar/index.js +1 -1
- package/dist/Kit/DataDisplay/Tooltip/index.js +4 -4
- package/dist/Kit/DataDisplay/Tour/index.js +4 -4
- package/dist/Kit/DataDisplay/Tree/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +21 -21
- package/dist/Kit/DataEntry/CheckableTile/index.js +1 -1
- package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
- package/dist/Kit/DataEntry/Filter/FilterButton.d.ts +0 -1
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Filter/types.d.ts +0 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Input/types.d.ts +1 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +1 -1
- package/dist/Kit/DataEntry/Rate/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js +3 -3
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontStylesButtons/index.js +24 -24
- package/dist/Kit/DataEntry/RichText/MenuBar/ImageButton/index.js +19 -19
- package/dist/Kit/DataEntry/RichText/MenuBar/IndentListButtons/index.js +12 -12
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ListButtons/index.js +15 -15
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +22 -22
- package/dist/Kit/DataEntry/RichText/MenuBar/TextAlignButtons/index.js +24 -24
- package/dist/Kit/DataEntry/RichText/MenuBar/TextColorButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/UndoRedoButtons/index.js +12 -12
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +1 -1
- package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
- package/dist/Kit/DataEntry/Select/LoadingSuffix.d.ts +2 -0
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/Slider/index.js +1 -1
- package/dist/Kit/DataEntry/Switch/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/useIcons.d.ts +4 -2
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Progress/index.js +1 -1
- package/dist/Kit/Feedback/Skeleton/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +1 -1
- package/dist/Kit/General/Button/index.js +1 -1
- package/dist/Kit/General/DynamicActions/index.js +1 -1
- package/dist/Kit/General/Icon/index.js +1 -1
- package/dist/Kit/General/Space/index.js +7 -7
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/Layout/Divider/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +69 -55
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +1 -1
- package/dist/Kit/Navigation/Step/index.js +1 -1
- package/dist/Kit/index.js +55 -55
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ColorPicker.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LoadingSuffix.css +1 -0
- package/dist/assets/Tab.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/icons/loader/faKitLoader.d.ts +2 -0
- package/dist/chunks/Alert.DPCxJAN7.js +143 -0
- package/dist/chunks/App.CrRIpF4L.js +182 -0
- package/dist/chunks/Avatar.C5GDrOzE.js +52 -0
- package/dist/chunks/{Avatar.CHhPAXNx.js → Avatar.Dn1wwaEd.js} +6 -6
- package/dist/chunks/Badge.CQ4mTuzO.js +35 -0
- package/dist/chunks/{Breadcrumb.DUEiho8q.js → Breadcrumb.BlJwdKEr.js} +45 -45
- package/dist/chunks/Button.C4aLhP7T.js +152 -0
- package/dist/chunks/Card.CCW0QjOl.js +116 -0
- package/dist/chunks/{Carousel.CkzT9Z2U.js → Carousel.BpLpVNGC.js} +33 -32
- package/dist/chunks/{CheckableTile.B_BbiYRf.js → CheckableTile.a38ZyaAj.js} +19 -19
- package/dist/chunks/Checkbox.B4oYVxr0.js +144 -0
- package/dist/chunks/Collapse.Bnkn1mOs.js +27 -0
- package/dist/chunks/{ColorPicker.BO3g1Ccr.js → ColorPicker.CFp2kCOd.js} +35 -35
- package/dist/chunks/Comment.Djh7H8UG.js +47 -0
- package/dist/chunks/DatePicker.DrtaJa9c.js +283 -0
- package/dist/chunks/{Divider.C-DXVgoI.js → Divider.Cn4b_K4Y.js} +4 -4
- package/dist/chunks/DynamicActions.Co2xpz8Q.js +48 -0
- package/dist/chunks/{EditorContentCharacterCount.1uKyzXLA.js → EditorContentCharacterCount.sgrhgqLT.js} +8 -8
- package/dist/chunks/{Empty.C_H88Lwp.js → Empty.D03N6sYC.js} +350 -350
- package/dist/chunks/{Error.DtFtGSNd.js → Error.C4CWphk7.js} +48 -48
- package/dist/chunks/Filter.C6MB90bI.js +91 -0
- package/dist/chunks/{FontSizeSelect.BEujUTOk.js → FontSizeSelect.cLXI8GrZ.js} +17 -17
- package/dist/chunks/{Header.BG7zjt32.js → Header.QOIB8gN2.js} +79 -79
- package/dist/chunks/Icon.BPLM3-fY.js +32 -0
- package/dist/chunks/{IdCard.DcdzxJ6s.js → IdCard.vmE5z2fA.js} +38 -38
- package/dist/chunks/{Image.ZuMxDqYt.js → Image.CQt7GdFg.js} +10 -10
- package/dist/chunks/Input.Bxg2jvzF.js +485 -0
- package/dist/chunks/InputNumber.CtSK2KsO.js +59 -0
- package/dist/chunks/{InputWrapper.UG5UbUiq.js → InputWrapper.ykslLvdd.js} +20 -20
- package/dist/chunks/{InternalSizeChanger.CY_UQjgi.js → InternalSizeChanger.RtL4NtiD.js} +1 -1
- package/dist/chunks/ItemCard.BgMFHPsM.js +191 -0
- package/dist/chunks/{ItemList.DxIrTW2r.js → ItemList.B4m5rI-N.js} +38 -38
- package/dist/chunks/Kanban.CSaObGrc.js +478 -0
- package/dist/chunks/{LinkButton.bj3sa3Dz.js → LinkButton.DMA5QONl.js} +45 -45
- package/dist/chunks/Loader.B64F5oU_.js +42 -0
- package/dist/chunks/LoadingSuffix.DoHzo7nz.js +13 -0
- package/dist/chunks/MenuBar.CgSDnt3x.js +86 -0
- package/dist/chunks/Modal.GhzlHzdc.js +274 -0
- package/dist/chunks/{Notification.CmGBpBnD.js → Notification.Dw9kuRdp.js} +47 -47
- package/dist/chunks/PageHeader.KYBZ_1ax.js +63 -0
- package/dist/chunks/{PageLayout.BjZqP-fP.js → PageLayout.DuW0ptfg.js} +13 -13
- package/dist/chunks/Pagination.bLW3DcwK.js +30 -0
- package/dist/chunks/Progress.CvYsEL2l.js +106 -0
- package/dist/chunks/Radio.DGXrAjCO.js +124 -0
- package/dist/chunks/Rate.CAQG5O-o.js +33 -0
- package/dist/chunks/RedirectCard.z3OMMFk8.js +131 -0
- package/dist/chunks/RichText.CJ_6F5ja.js +207 -0
- package/dist/chunks/{SearchInput.DPSQA6Hk.js → SearchInput.Ce-h2yeG.js} +16 -16
- package/dist/chunks/Select.DRia3pC6.js +247 -0
- package/dist/chunks/{SideMenu.BGakreF_.js → SideMenu.CbiKbml8.js} +101 -101
- package/dist/chunks/SidePanel.BStY2gLX.js +138 -0
- package/dist/chunks/{Skeleton.Dh-4k26z.js → Skeleton.BxnPboRf.js} +12 -12
- package/dist/chunks/{Slider.CGpnUJuq.js → Slider.C45Yzd4o.js} +11 -11
- package/dist/chunks/SnackBar.wVv1at_w.js +82 -0
- package/dist/chunks/Step.lgLzwSMF.js +43 -0
- package/dist/chunks/{Switch.BTyPj5S0.js → Switch.B3B_Lurn.js} +6 -6
- package/dist/chunks/Tab.D-uEtGMt.js +281 -0
- package/dist/chunks/Table.D9yVr1tC.js +308 -0
- package/dist/chunks/{Tag.8Hoq2HSD.js → Tag.CY-C8pJ4.js} +86 -86
- package/dist/chunks/{TextColorButton.CDtNdXxN.js → TextColorButton.BxagmTz6.js} +20 -20
- package/dist/chunks/ToolBar.CSpCCrRT.js +22 -0
- package/dist/chunks/Tree.DYOTmOef.js +37 -0
- package/dist/chunks/TreeSelect.BuT1RR4i.js +228 -0
- package/dist/chunks/Typography.CP8TYHJd.js +264 -0
- package/dist/chunks/Upload.IlVEXccc.js +238 -0
- package/dist/chunks/faKitLoader.BJKbv-bm.js +13 -0
- package/dist/chunks/useLoadingWidthLock.CzCPeVNp.js +13 -0
- package/dist/chunks/{utils.B7ekA9dF.js → utils.BGdandkK.js} +12 -12
- package/dist/index.es.js +55 -55
- package/dist/index.umd.js +6 -6
- package/dist/theme/aristid/general/utilities/index.js +12 -6
- package/dist/theme/types/utilities/index.d.ts +18 -0
- package/dist/translation/en-US/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/en-US/index.js +32 -30
- package/dist/translation/fr-FR/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/fr-FR/index.js +32 -30
- package/dist/translation/pt-PT/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/pt-PT/index.js +32 -30
- package/dist/translation/types/components/DataDisplay/Tab/index.d.ts +2 -0
- package/dist/translation/utils/index.js +1 -1
- package/dist/utils/functions/index.d.ts +1 -2
- package/dist/utils/functions/types.d.ts +6 -0
- package/dist/utils/hooks/useLoadingWidthLock.d.ts +2 -0
- package/package.json +26 -18
- package/dist/assets/styles.css +0 -1
- package/dist/chunks/Alert.CHcxwc-7.js +0 -143
- package/dist/chunks/App.BAznFPGK.js +0 -179
- package/dist/chunks/Avatar.CPy-hK8w.js +0 -52
- package/dist/chunks/Badge.tu17MdMt.js +0 -35
- package/dist/chunks/Button.BvMCtuy-.js +0 -150
- package/dist/chunks/Card.CPFdoSwO.js +0 -116
- package/dist/chunks/Checkbox.C0E-Lf9F.js +0 -144
- package/dist/chunks/Collapse.C3k4P9xX.js +0 -27
- package/dist/chunks/Comment.D3uQOVRA.js +0 -46
- package/dist/chunks/DatePicker.DlehA8r8.js +0 -273
- package/dist/chunks/DynamicActions.D-M49goY.js +0 -48
- package/dist/chunks/Filter.BrhTPGgi.js +0 -85
- package/dist/chunks/Icon.DbHbt0HM.js +0 -32
- package/dist/chunks/Input.DAqyQC25.js +0 -470
- package/dist/chunks/InputNumber.BVLzytYW.js +0 -52
- package/dist/chunks/ItemCard.UAMPsAeG.js +0 -191
- package/dist/chunks/Kanban.DMLzdryr.js +0 -478
- package/dist/chunks/Loader.B154m8Uo.js +0 -42
- package/dist/chunks/MenuBar.BKo3YUWL.js +0 -86
- package/dist/chunks/Modal.DhO42LCE.js +0 -274
- package/dist/chunks/PageHeader.BNe3xCFg.js +0 -66
- package/dist/chunks/Pagination.DoydgcwL.js +0 -30
- package/dist/chunks/Progress.DGZSgm84.js +0 -106
- package/dist/chunks/Radio.BpOV2_Ga.js +0 -124
- package/dist/chunks/Rate.ClZk2tCh.js +0 -33
- package/dist/chunks/RedirectCard.DZz4x-RC.js +0 -131
- package/dist/chunks/RichText.D_VsFypi.js +0 -207
- package/dist/chunks/Select.C4L4tjyk.js +0 -248
- package/dist/chunks/SidePanel.e4UuckCP.js +0 -138
- package/dist/chunks/SnackBar.Bjp5gpjk.js +0 -82
- package/dist/chunks/Step.CF0dble0.js +0 -43
- package/dist/chunks/Tab.BQlSFTkt.js +0 -188
- package/dist/chunks/Table.HPOQ6vNr.js +0 -292
- package/dist/chunks/ToolBar.qYFzjJ3S.js +0 -22
- package/dist/chunks/Tree.C9pwa9iP.js +0 -37
- package/dist/chunks/TreeSelect.C0h4AGX4.js +0 -226
- package/dist/chunks/Typography.dSdY4EZz.js +0 -264
- package/dist/chunks/Upload.DxOzcNcZ.js +0 -238
- package/dist/chunks/styles.module.CAGtUY-F.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.Y.Z](https://www.npmjs.com/package/aristid-ds/v/X.Y.Z) (YYYY-MM-DD)
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **Comment:**
|
|
8
|
+
- Fix scripts, event handlers and `javascript:` URLs in `content` being executed; the HTML is now sanitized (@philippechevieux)
|
|
9
|
+
- **Table:**
|
|
10
|
+
- Fix the tooltip on a truncated `ellipsis` column header being the browser's native one instead of the design system tooltip (@philippechevieux)
|
|
11
|
+
- **Theme:**
|
|
12
|
+
- Fix a `customTheme` value or an `id` being able to inject CSS rules into the page; such a value is now ignored with a console warning naming the token (@philippechevieux)
|
|
13
|
+
|
|
14
|
+
## [20.2.0](https://www.npmjs.com/package/aristid-ds/v/20.2.0) (2026-11-27)
|
|
15
|
+
|
|
16
|
+
### ✨ Features
|
|
17
|
+
|
|
18
|
+
- **Button:**
|
|
19
|
+
- Add a loading state to `KitButton` (including `redirect`, `action` and `KitSplitButton`): shows a rotating loader in place of the icon while `loading` is set (@mel-dalavekia)
|
|
20
|
+
- **DatePicker:**
|
|
21
|
+
- Add `loading` prop to `KitDatePicker` and `KitDatePicker.RangePicker` showing a rotating loader on the right while set (@mel-dalavekia)
|
|
22
|
+
- **Input:**
|
|
23
|
+
- Add `loading` prop showing a rotating loader on the right while set (@mel-dalavekia)
|
|
24
|
+
- **InputNumber:**
|
|
25
|
+
- Add `loading` prop showing a rotating loader on the right while set (@mel-dalavekia)
|
|
26
|
+
- **Select:**
|
|
27
|
+
- Show a rotating loader in front of the chevron or a custom `suffix` while `loading` is set (@mel-dalavekia)
|
|
28
|
+
- **Tab:**
|
|
29
|
+
- Add closable tabs, classic and pill: `removeTab` shows a close button on each tab and is called with its key; `closable: false` opts a tab out, `closeText` sets the close button label (@mel-dalavekia)
|
|
30
|
+
- Add the `addTabDropdown` prop to open a dropdown from the add button, which takes precedence over `addTab`; the button stays active and `aria-expanded` while the dropdown is open (@philippechevieux)
|
|
31
|
+
- Support `addTab` in the `pill` variant (@philippechevieux)
|
|
32
|
+
- Add the `addTabLabel` prop to override the add button accessible name (@philippechevieux)
|
|
33
|
+
- Keep the overflow menu button active and `aria-expanded` while its menu is open (@philippechevieux)
|
|
34
|
+
- **Tag:**
|
|
35
|
+
- Add the `error-primary`, `success-primary` and `warning-primary` types (@philippechevieux)
|
|
36
|
+
- Add the missing active state to the clickable `primary` type (@philippechevieux)
|
|
37
|
+
- **Theme:**
|
|
38
|
+
- Add the `--general-utilities-error-deepDark`, `--general-utilities-success-deepDark` and `--general-utilities-warning-deepDark` tokens (@philippechevieux)
|
|
39
|
+
- **TreeSelect:**
|
|
40
|
+
- Show a rotating loader in front of the chevron or a custom `suffix` while `loading` is set (@mel-dalavekia)
|
|
41
|
+
|
|
42
|
+
### 🐛 Bug Fixes
|
|
43
|
+
|
|
44
|
+
- **Button:**
|
|
45
|
+
- Fix the content (text and icon) not being centered horizontally when the button is wider than its content (@philippechevieux)
|
|
46
|
+
- **Carousel:**
|
|
47
|
+
- Fix the carousel turning vertical when `vertical` or a side `dotPlacement` is passed despite the types; it always stays horizontal (@philippechevieux)
|
|
48
|
+
- **ColorPicker:**
|
|
49
|
+
- Fix the clear icon sitting at a different right offset than the single-line `Input` when `showText` is enabled (@mel-dalavekia)
|
|
50
|
+
- **DatePicker:**
|
|
51
|
+
- Fix the range picker clear icon sitting at a different right offset than the single-line `Input`, varying by size (@mel-dalavekia)
|
|
52
|
+
- **DropDown:**
|
|
53
|
+
- Fix `onOpenChange` not being called when the dropdown closes because the window loses focus (@philippechevieux)
|
|
54
|
+
- **Filter:**
|
|
55
|
+
- Fix the button losing its active style when a menu item is clicked while the menu stays open, and apply it when the dropdown `open` is controlled (@philippechevieux)
|
|
56
|
+
- **Input:**
|
|
57
|
+
- Fix the `TextArea` clear icon sitting at a different right offset than the single-line `Input`, varying by size (@mel-dalavekia)
|
|
58
|
+
- **Select:**
|
|
59
|
+
- Fix the clear icon of multiple `Select` sitting at a different right offset than the single-line `Input`, varying by size (@mel-dalavekia)
|
|
60
|
+
- **Tab:**
|
|
61
|
+
- Fix the tabs not moving into or out of the overflow menu when their container is resized, only when the window is (@philippechevieux)
|
|
62
|
+
- Fix the overflow menu button having no accessible name; it is now labelled in every locale (@philippechevieux)
|
|
63
|
+
- Fix the add button having no accessible name; it is now labelled in every locale (@philippechevieux)
|
|
64
|
+
- Fix the add button sitting before the overflow menu button instead of after it (@philippechevieux)
|
|
65
|
+
- Fix the small pill tabs being 22px high instead of 24px, off-centre in their container, with their label sitting high (@philippechevieux)
|
|
66
|
+
- **TreeSelect:**
|
|
67
|
+
- Fix the clear icon of multiple `TreeSelect` sitting at a different right offset than the single-line `Input`, varying by size (@mel-dalavekia)
|
|
68
|
+
- **Utils:**
|
|
69
|
+
- Fix the published `toCssVariables` type declaration importing from a `.storybook` path that is missing from the npm package (@philippechevieux)
|
|
70
|
+
|
|
3
71
|
## [20.1.0](https://www.npmjs.com/package/aristid-ds/v/20.1.0) (2026-11-20)
|
|
4
72
|
|
|
5
73
|
### ✨ Features
|
|
@@ -23,6 +91,12 @@
|
|
|
23
91
|
|
|
24
92
|
### 🐛 Bug Fixes
|
|
25
93
|
|
|
94
|
+
- **DropDown:**
|
|
95
|
+
- Fix the trigger losing keyboard focus to `<body>` when the menu opens, so Tab enters the menu and Escape returns focus to the trigger (@evoiron)
|
|
96
|
+
- **Filter:**
|
|
97
|
+
- Fix the filter button losing keyboard focus to `<body>` when its dropdown opens (@evoiron)
|
|
98
|
+
- **SidePanel:**
|
|
99
|
+
- Fix a click on a control inside the panel, such as a `KitDropDown` trigger, closing it when `closeOnOutsideClick` is set (@evoiron)
|
|
26
100
|
- **Input:**
|
|
27
101
|
- Fix the readonly border changing on hover, to antd's grey or, in AI mode, to a darker purple, instead of keeping its DS color (@philippechevieux)
|
|
28
102
|
- Fix the clear icon's keyboard focus showing antd's thin light-blue ring instead of the DS focus outline (@philippechevieux)
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitApp } from "../../chunks/App.
|
|
1
|
+
export { t as KitApp } from "../../chunks/App.CrRIpF4L.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitAvatar } from "../../../chunks/Avatar.
|
|
1
|
+
export { t as KitAvatar } from "../../../chunks/Avatar.Dn1wwaEd.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitBadge } from "../../../chunks/Badge.
|
|
1
|
+
export { t as KitBadge } from "../../../chunks/Badge.CQ4mTuzO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitCard } from "../../../chunks/Card.
|
|
1
|
+
export { t as KitCard } from "../../../chunks/Card.CCW0QjOl.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitCarousel } from "../../../chunks/Carousel.
|
|
1
|
+
export { t as KitCarousel } from "../../../chunks/Carousel.BpLpVNGC.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitCollapse } from "../../../chunks/Collapse.
|
|
1
|
+
export { t as KitCollapse } from "../../../chunks/Collapse.Bnkn1mOs.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as KitComment, t as KitThread } from "../../../chunks/Comment.
|
|
1
|
+
export { n as KitComment, t as KitThread } from "../../../chunks/Comment.Djh7H8UG.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitEmpty } from "../../../chunks/Empty.
|
|
1
|
+
export { t as KitEmpty } from "../../../chunks/Empty.D03N6sYC.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitError } from "../../../chunks/Error.
|
|
1
|
+
export { t as KitError } from "../../../chunks/Error.C4CWphk7.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitIdCard } from "../../../chunks/IdCard.
|
|
1
|
+
export { t as KitIdCard } from "../../../chunks/IdCard.vmE5z2fA.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitImage } from "../../../chunks/Image.
|
|
1
|
+
export { t as KitImage } from "../../../chunks/Image.CQt7GdFg.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitItemCard } from "../../../chunks/ItemCard.
|
|
1
|
+
export { t as KitItemCard } from "../../../chunks/ItemCard.BgMFHPsM.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitItemList } from "../../../chunks/ItemList.
|
|
1
|
+
export { t as KitItemList } from "../../../chunks/ItemList.B4m5rI-N.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitKanban } from "../../../chunks/Kanban.
|
|
1
|
+
export { t as KitKanban } from "../../../chunks/Kanban.CSaObGrc.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitRedirectCard } from "../../../chunks/RedirectCard.
|
|
1
|
+
export { t as KitRedirectCard } from "../../../chunks/RedirectCard.z3OMMFk8.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KitDropdownProps } from '../../Navigation/DropDown/types';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
type TabDropdownButtonProps = Omit<KitDropdownProps, 'children'> & {
|
|
4
|
+
children: (isOpen: boolean) => ReactElement;
|
|
5
|
+
};
|
|
6
|
+
export declare const TabDropdownButton: ({ onOpenChange, children, ...props }: TabDropdownButtonProps) => import('react').JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { KitTabItem } from './types';
|
|
1
2
|
export type { KitTabItem, KitTabProps } from './types';
|
|
2
3
|
declare const KitTab: import('react').ForwardRefExoticComponent<import('../../../types').KitHTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
items:
|
|
4
|
+
items: KitTabItem[];
|
|
5
|
+
addTabLabel?: string;
|
|
4
6
|
addTab?: () => void;
|
|
7
|
+
addTabDropdown?: Omit<import('../..').KitDropdownProps, "children">;
|
|
8
|
+
removeTab?: (tabKey: string) => void;
|
|
9
|
+
closeText?: string;
|
|
5
10
|
centered?: boolean;
|
|
6
11
|
className?: string;
|
|
7
12
|
activeKey?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitTab } from "../../../chunks/Tab.
|
|
1
|
+
export { t as KitTab } from "../../../chunks/Tab.D-uEtGMt.js";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { KitHTMLAttributes } from '../../../types';
|
|
3
|
+
import { KitDropdownProps } from '../../Navigation/DropDown/types';
|
|
3
4
|
import { IKitBadge } from '../Badge/types';
|
|
4
5
|
export type KitTabProps = KitHTMLAttributes<HTMLDivElement> & {
|
|
5
6
|
items: KitTabItem[];
|
|
7
|
+
/** Accessible name and tooltip of the add button; defaults to the locale's. */
|
|
8
|
+
addTabLabel?: string;
|
|
6
9
|
addTab?: () => void;
|
|
10
|
+
/** Opens a dropdown from the add button; its content (`menu` or `popupRender`) is the consumer's. Takes precedence over `addTab`. */
|
|
11
|
+
addTabDropdown?: Omit<KitDropdownProps, 'children'>;
|
|
12
|
+
removeTab?: (tabKey: string) => void;
|
|
13
|
+
closeText?: string;
|
|
7
14
|
centered?: boolean;
|
|
8
15
|
className?: string;
|
|
9
16
|
activeKey?: string;
|
|
@@ -23,6 +30,7 @@ export type KitTabItem = {
|
|
|
23
30
|
badgeColor?: IKitBadge['color'];
|
|
24
31
|
tabContent?: ReactNode;
|
|
25
32
|
disabled?: boolean;
|
|
33
|
+
closable?: boolean;
|
|
26
34
|
icon?: ReactNode;
|
|
27
35
|
};
|
|
28
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitTable, n as KitTableExpandButton } from "../../../chunks/Table.
|
|
1
|
+
export { t as KitTable, n as KitTableExpandButton } from "../../../chunks/Table.D9yVr1tC.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitTag } from "../../../chunks/Tag.
|
|
1
|
+
export { t as KitTag } from "../../../chunks/Tag.CY-C8pJ4.js";
|
|
@@ -3,7 +3,18 @@ import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
|
3
3
|
import { KitHTMLAttributes } from '../../../types';
|
|
4
4
|
import { KitAvatarProps } from '../Avatar/types';
|
|
5
5
|
import { KitIdCardProps } from '../IdCard/types';
|
|
6
|
-
export type KitTagType =
|
|
6
|
+
export type KitTagType =
|
|
7
|
+
| 'primary'
|
|
8
|
+
| 'secondary'
|
|
9
|
+
| 'neutral'
|
|
10
|
+
| 'error'
|
|
11
|
+
| 'error-primary'
|
|
12
|
+
| 'success'
|
|
13
|
+
| 'success-primary'
|
|
14
|
+
| 'warning'
|
|
15
|
+
| 'warning-primary'
|
|
16
|
+
| 'ai'
|
|
17
|
+
| 'ai-secondary';
|
|
7
18
|
|
|
8
19
|
type AntdTagPropsToOmit = 'color' | 'checkableTag' | 'icon' | 'closable';
|
|
9
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitToolBar } from "../../../chunks/ToolBar.
|
|
1
|
+
export { t as KitToolBar } from "../../../chunks/ToolBar.CSpCCrRT.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { r as t } from "../../../chunks/constants.CirCT_qA.js";
|
|
3
|
+
import { Tooltip as n } from "antd";
|
|
4
4
|
// src/Kit/DataDisplay/Tooltip/index.tsx
|
|
5
|
-
var r = ({ mouseEnterDelay: r =
|
|
5
|
+
var r = ({ mouseEnterDelay: r = t, ...i }) => e(n, {
|
|
6
6
|
mouseEnterDelay: r,
|
|
7
7
|
...i
|
|
8
8
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tour as t } from "antd";
|
|
3
|
-
import {
|
|
3
|
+
import { n } from "../../../chunks/useKitTheme.P5Q2DIyI.js";
|
|
4
4
|
import r from "classnames";
|
|
5
5
|
// src/Kit/DataDisplay/Tour/index.tsx
|
|
6
6
|
var i = ({ rootClassName: i, ...a }) => {
|
|
7
|
-
let { appId: o } =
|
|
8
|
-
return
|
|
7
|
+
let { appId: o } = n(), s = r(o, i);
|
|
8
|
+
return e(t, {
|
|
9
9
|
...a,
|
|
10
10
|
rootClassName: s
|
|
11
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitTree } from "../../../chunks/Tree.
|
|
1
|
+
export { t as KitTree } from "../../../chunks/Tree.DYOTmOef.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../../chunks/
|
|
3
|
-
import { t as n } from "../../../chunks/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import l from "
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { t } from "../../../chunks/Input.Bxg2jvzF.js";
|
|
3
|
+
import { t as n } from "../../../chunks/InputWrapper.ykslLvdd.js";
|
|
4
|
+
import { AutoComplete as r } from "antd";
|
|
5
|
+
import { forwardRef as i, useRef as a, useState as o } from "react";
|
|
6
|
+
import { faMagnifyingGlass as s } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import { FontAwesomeIcon as c } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { t as l } from "../../../chunks/useDeprecatedInputWrapper.CZ2-c80o.js";
|
|
9
|
+
import { t as u } from "../../../chunks/useGetPopupContainer.Bcn4zw7O.js";
|
|
10
|
+
import d from "classnames";
|
|
11
11
|
// src/Kit/DataEntry/AutoComplete/index.tsx
|
|
12
|
-
var f = (e, t, n) =>
|
|
12
|
+
var f = (e, t, n) => d(e, "ant-select-dropdown", "kit-select-dropdown-bottom", {
|
|
13
13
|
"kit-select-dropdown-focus": t,
|
|
14
14
|
"kit-select-dropdown-error": n === "error",
|
|
15
15
|
"kit-select-dropdown-warning": n === "warning"
|
|
16
|
-
}), p =
|
|
17
|
-
let [M, N] =
|
|
18
|
-
|
|
19
|
-
label:
|
|
16
|
+
}), p = i(({ allowClear: i, label: d, helper: p, htmlFor: m, autoFocus: h, defaultValue: g, disabled: _, placeholder: v, status: y, value: b, getPopupContainer: x, onFocus: S, onBlur: C, popupClassName: w, wrapperClassName: T, required: E, actions: D, size: O = "large", extra: k, ...A }, j) => {
|
|
17
|
+
let [M, N] = o(!1), P = a(null), F = j ?? P, I = u(F, x);
|
|
18
|
+
l("AutoComplete", {
|
|
19
|
+
label: d,
|
|
20
20
|
helper: p,
|
|
21
21
|
htmlFor: m,
|
|
22
22
|
className: T,
|
|
@@ -30,15 +30,15 @@ var f = (e, t, n) => l(e, "ant-select-dropdown", "kit-select-dropdown-bottom", {
|
|
|
30
30
|
}, R = (e) => {
|
|
31
31
|
N(!1), C && C(e);
|
|
32
32
|
}, z = typeof A.classNames == "function" ? void 0 : A.classNames;
|
|
33
|
-
return
|
|
34
|
-
label:
|
|
33
|
+
return e(n, {
|
|
34
|
+
label: d,
|
|
35
35
|
helper: p,
|
|
36
36
|
htmlFor: m,
|
|
37
37
|
disabled: _,
|
|
38
38
|
status: y,
|
|
39
39
|
className: T,
|
|
40
40
|
extra: k ?? D,
|
|
41
|
-
children:
|
|
41
|
+
children: e(r, {
|
|
42
42
|
...A,
|
|
43
43
|
id: A.id ?? m,
|
|
44
44
|
disabled: _,
|
|
@@ -51,9 +51,9 @@ var f = (e, t, n) => l(e, "ant-select-dropdown", "kit-select-dropdown-bottom", {
|
|
|
51
51
|
root: f(w, M, y)
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
children:
|
|
55
|
-
prefix:
|
|
56
|
-
allowClear:
|
|
54
|
+
children: e(t, {
|
|
55
|
+
prefix: e(c, { icon: s }),
|
|
56
|
+
allowClear: i,
|
|
57
57
|
autoFocus: h,
|
|
58
58
|
required: E,
|
|
59
59
|
size: O,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitCheckableTile } from "../../../chunks/CheckableTile.
|
|
1
|
+
export { t as KitCheckableTile } from "../../../chunks/CheckableTile.a38ZyaAj.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitCheckbox } from "../../../chunks/Checkbox.
|
|
1
|
+
export { t as KitCheckbox } from "../../../chunks/Checkbox.B4oYVxr0.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitColorPicker } from "../../../chunks/ColorPicker.
|
|
1
|
+
export { t as KitColorPicker } from "../../../chunks/ColorPicker.CFp2kCOd.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitDatePicker } from "../../../chunks/DatePicker.
|
|
1
|
+
export { t as KitDatePicker } from "../../../chunks/DatePicker.DrtaJa9c.js";
|
|
@@ -15,6 +15,7 @@ interface DatePickerInternalProps {
|
|
|
15
15
|
readonlyLight?: boolean;
|
|
16
16
|
readonly?: boolean;
|
|
17
17
|
status?: KitInputStatus;
|
|
18
|
+
loading?: boolean;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface DatePickerBaseProps extends Omit<DatePickerProps, 'picker' | 'readOnly' | 'status'> {
|
|
@@ -32,6 +33,7 @@ interface RangePickerInternalProps {
|
|
|
32
33
|
readonlyLight?: boolean;
|
|
33
34
|
readonly?: boolean;
|
|
34
35
|
status?: KitInputStatus;
|
|
36
|
+
loading?: boolean;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export type KitRangePickerProps = Omit<RangePickerProps, 'readOnly' | 'status'> &
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const FilterButton: import('react').ForwardRefExoticComponent<import('react').ButtonHTMLAttributes<HTMLButtonElement> & Pick<import('./types').KitFilterProps, "values" | "disabled" | "label" | "active" | "expandable" | "readonly" | "leftIcon" | "valueColor" | "showSingleValue"> & {
|
|
2
2
|
isDropdownOpen?: boolean;
|
|
3
|
-
buttonKey?: number;
|
|
4
3
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitFilter } from "../../../chunks/Filter.
|
|
1
|
+
export { t as KitFilter } from "../../../chunks/Filter.C6MB90bI.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitInput } from "../../../chunks/Input.
|
|
1
|
+
export { t as KitInput } from "../../../chunks/Input.Bxg2jvzF.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitInputNumber } from "../../../chunks/InputNumber.
|
|
1
|
+
export { t as KitInputNumber } from "../../../chunks/InputNumber.CtSK2KsO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitInputWrapper } from "../../../chunks/InputWrapper.
|
|
1
|
+
export { t as KitInputWrapper } from "../../../chunks/InputWrapper.ykslLvdd.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitRadio } from "../../../chunks/Radio.
|
|
1
|
+
export { t as KitRadio } from "../../../chunks/Radio.DGXrAjCO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitRate } from "../../../chunks/Rate.
|
|
1
|
+
export { t as KitRate } from "../../../chunks/Rate.CAQG5O-o.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitEditorContentCharacterCount } from "../../../../chunks/EditorContentCharacterCount.
|
|
1
|
+
export { t as KitEditorContentCharacterCount } from "../../../../chunks/EditorContentCharacterCount.sgrhgqLT.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { KitTooltip as t } from "../../../../DataDisplay/Tooltip/index.js";
|
|
3
3
|
// src/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.tsx
|
|
4
|
-
var n = ({ title: n, open: r, children: i }) => t
|
|
4
|
+
var n = ({ title: n, open: r, children: i }) => e(t, {
|
|
5
5
|
title: n,
|
|
6
6
|
placement: "top",
|
|
7
7
|
open: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as KitFontSizeSelect } from "../../../../../chunks/FontSizeSelect.
|
|
1
|
+
export { t as KitFontSizeSelect } from "../../../../../chunks/FontSizeSelect.cLXI8GrZ.js";
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { faBold as r, faItalic as i, faStrikethrough as a, faUnderline as o } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FontAwesomeIcon as s } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { n as c } from "../../../../../chunks/useKitLocale.Y5XHnnYS.js";
|
|
5
|
+
import { KitButtonTooltip as l } from "../ButtonTooltip/index.js";
|
|
6
|
+
import { t as u } from "../../../../../chunks/getButtonActiveClass.BgrTIajy.js";
|
|
7
7
|
// src/Kit/DataEntry/RichText/MenuBar/FontStylesButtons/index.tsx
|
|
8
8
|
var d = ({ editor: d }) => {
|
|
9
|
-
let { locale: f } =
|
|
10
|
-
return
|
|
11
|
-
|
|
9
|
+
let { locale: f } = c();
|
|
10
|
+
return n(e, { children: [
|
|
11
|
+
t(l, {
|
|
12
12
|
title: f.RichText?.bold,
|
|
13
|
-
children:
|
|
13
|
+
children: t("button", {
|
|
14
14
|
type: "button",
|
|
15
15
|
onClick: () => {
|
|
16
16
|
d.chain().focus().toggleBold().run();
|
|
17
17
|
},
|
|
18
|
-
className:
|
|
18
|
+
className: u(d, "bold"),
|
|
19
19
|
"aria-label": f.RichText?.bold,
|
|
20
|
-
children:
|
|
20
|
+
children: t(s, { icon: r })
|
|
21
21
|
})
|
|
22
22
|
}),
|
|
23
|
-
|
|
23
|
+
t(l, {
|
|
24
24
|
title: f.RichText?.italic,
|
|
25
|
-
children:
|
|
25
|
+
children: t("button", {
|
|
26
26
|
type: "button",
|
|
27
27
|
onClick: () => {
|
|
28
28
|
d.chain().focus().toggleItalic().run();
|
|
29
29
|
},
|
|
30
|
-
className:
|
|
30
|
+
className: u(d, "italic"),
|
|
31
31
|
"aria-label": f.RichText?.italic,
|
|
32
|
-
children:
|
|
32
|
+
children: t(s, { icon: i })
|
|
33
33
|
})
|
|
34
34
|
}),
|
|
35
|
-
|
|
35
|
+
t(l, {
|
|
36
36
|
title: f.RichText?.underline,
|
|
37
|
-
children:
|
|
37
|
+
children: t("button", {
|
|
38
38
|
type: "button",
|
|
39
39
|
onClick: () => {
|
|
40
40
|
d.chain().focus().toggleUnderline().run();
|
|
41
41
|
},
|
|
42
|
-
className:
|
|
42
|
+
className: u(d, "underline"),
|
|
43
43
|
"aria-label": f.RichText?.underline,
|
|
44
|
-
children:
|
|
44
|
+
children: t(s, { icon: o })
|
|
45
45
|
})
|
|
46
46
|
}),
|
|
47
|
-
|
|
47
|
+
t(l, {
|
|
48
48
|
title: f.RichText?.strikethrough,
|
|
49
|
-
children:
|
|
49
|
+
children: t("button", {
|
|
50
50
|
type: "button",
|
|
51
51
|
onClick: () => {
|
|
52
52
|
d.chain().focus().toggleStrike().run();
|
|
53
53
|
},
|
|
54
|
-
className:
|
|
54
|
+
className: u(d, "strike"),
|
|
55
55
|
"aria-label": f.RichText?.strikethrough,
|
|
56
|
-
children:
|
|
56
|
+
children: t(s, { icon: a })
|
|
57
57
|
})
|
|
58
58
|
})
|
|
59
59
|
] });
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { faImage as r } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FontAwesomeIcon as i } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { t as a } from "../../../../../chunks/getBase64.o9rtRKzl.js";
|
|
5
|
+
import { n as o } from "../../../../../chunks/useKitLocale.Y5XHnnYS.js";
|
|
6
6
|
import { useRef as s } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { KitButtonTooltip as c } from "../ButtonTooltip/index.js";
|
|
8
|
+
import { t as l } from "../../../../../chunks/getButtonActiveClass.BgrTIajy.js";
|
|
9
9
|
// src/Kit/DataEntry/RichText/MenuBar/ImageButton/index.tsx
|
|
10
10
|
var u = ({ editor: u, onImageUpload: d }) => {
|
|
11
|
-
let { locale: f } =
|
|
12
|
-
return
|
|
11
|
+
let { locale: f } = o(), p = s(null);
|
|
12
|
+
return n(e, { children: [t(c, {
|
|
13
13
|
title: f.RichText?.insertImage,
|
|
14
|
-
children:
|
|
14
|
+
children: t("button", {
|
|
15
15
|
type: "button",
|
|
16
16
|
onClick: () => {
|
|
17
17
|
var e;
|
|
18
18
|
(e = p.current) == null || e.click();
|
|
19
19
|
},
|
|
20
|
-
className:
|
|
20
|
+
className: l(u, "image"),
|
|
21
21
|
"aria-label": f.RichText?.insertImage,
|
|
22
|
-
children:
|
|
22
|
+
children: t(i, { icon: r })
|
|
23
23
|
})
|
|
24
|
-
}),
|
|
24
|
+
}), t("input", {
|
|
25
25
|
ref: p,
|
|
26
26
|
type: "file",
|
|
27
27
|
accept: "image/png,image/jpeg,image/gif,image/webp",
|
|
28
|
-
onChange: (
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
let
|
|
28
|
+
onChange: (e) => {
|
|
29
|
+
let t = e.target.files?.[0];
|
|
30
|
+
e.target.value = "", t && (async () => {
|
|
31
|
+
let e = d ? await d(t) : await a(t);
|
|
32
32
|
u.chain().focus().setImage({
|
|
33
|
-
src:
|
|
34
|
-
alt:
|
|
33
|
+
src: e,
|
|
34
|
+
alt: t.name
|
|
35
35
|
}).run();
|
|
36
36
|
})();
|
|
37
37
|
},
|