@forgedevstack/bear 1.3.1 → 1.3.2
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 +26 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.js +1 -1
- package/dist/components/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.js +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Chart/BarChart.cjs +1 -1
- package/dist/components/Chart/BarChart.d.ts +1 -2
- package/dist/components/Chart/BarChart.js +81 -61
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -1
- package/dist/components/Chart/Chart.const.d.ts +24 -3
- package/dist/components/Chart/Chart.const.js +39 -16
- package/dist/components/Chart/Chart.d.ts +1 -5
- package/dist/components/Chart/Chart.js +19 -23
- package/dist/components/Chart/Chart.types.d.ts +11 -19
- package/dist/components/Chart/Chart.utils.cjs +1 -1
- package/dist/components/Chart/Chart.utils.d.ts +8 -18
- package/dist/components/Chart/Chart.utils.js +39 -3
- package/dist/components/Chart/FunnelChart.cjs +1 -0
- package/dist/components/Chart/FunnelChart.d.ts +2 -0
- package/dist/components/Chart/FunnelChart.js +59 -0
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.d.ts +1 -2
- package/dist/components/Chart/LineChart.js +51 -55
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.d.ts +1 -2
- package/dist/components/Chart/PieChart.js +121 -106
- package/dist/components/Chart/PieChart.types.d.ts +8 -0
- package/dist/components/Chart/RadarChart.cjs +1 -0
- package/dist/components/Chart/RadarChart.d.ts +2 -0
- package/dist/components/Chart/RadarChart.js +100 -0
- package/dist/components/Chart/index.d.ts +3 -1
- package/dist/components/Chat/Chat.cjs +1 -1
- package/dist/components/Chat/Chat.js +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.d.ts +2 -11
- package/dist/components/Drawer/Drawer.const.js +6 -55
- package/dist/components/Drawer/Drawer.d.ts +1 -2
- package/dist/components/Drawer/Drawer.js +87 -131
- package/dist/components/Drawer/Drawer.types.d.ts +16 -3
- package/dist/components/Drawer/Drawer.utils.d.ts +0 -4
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.js +26 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.types.d.ts +20 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.js +17 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.js +9 -0
- package/dist/components/Drawer/components/DrawerHeader/index.d.ts +2 -0
- package/dist/components/Drawer/components/index.d.ts +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.cjs +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.d.ts +2 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.js +9 -0
- package/dist/components/Drawer/helpers/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/useDrawer.cjs +1 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +51 -0
- package/dist/components/Editable/Editable.cjs +1 -1
- package/dist/components/Editable/Editable.js +1 -1
- package/dist/components/FileTree/FileTree.cjs +1 -1
- package/dist/components/FileTree/FileTree.js +1 -1
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.js +1 -1
- package/dist/components/Gauge/Gauge.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.d.ts +5 -0
- package/dist/components/Gauge/Gauge.const.js +11 -6
- package/dist/components/Gauge/Gauge.d.ts +1 -2
- package/dist/components/Gauge/Gauge.js +69 -45
- package/dist/components/Gauge/Gauge.types.d.ts +11 -2
- package/dist/components/Gauge/helpers/GaugeLinearBar.cjs +1 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.d.ts +2 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.js +40 -0
- package/dist/components/Heatmap/Heatmap.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.d.ts +2 -0
- package/dist/components/Heatmap/Heatmap.const.js +8 -6
- package/dist/components/Heatmap/Heatmap.js +51 -47
- package/dist/components/Heatmap/Heatmap.types.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -39
- package/dist/components/Icon/Icon.types.d.ts +1 -17
- package/dist/components/Icon/icons/action.d.ts +1 -85
- package/dist/components/Icon/icons/bear.d.ts +1 -12
- package/dist/components/Icon/icons/charts.d.ts +1 -0
- package/dist/components/Icon/icons/commerce.d.ts +1 -25
- package/dist/components/Icon/icons/communication.d.ts +1 -48
- package/dist/components/Icon/icons/content.d.ts +1 -53
- package/dist/components/Icon/icons/device.d.ts +1 -27
- package/dist/components/Icon/icons/editor.d.ts +1 -54
- package/dist/components/Icon/icons/file.d.ts +1 -25
- package/dist/components/Icon/icons/index.d.ts +1 -9
- package/dist/components/Icon/icons/media.d.ts +1 -64
- package/dist/components/Icon/icons/misc.d.ts +1 -96
- package/dist/components/Icon/icons/navigation.d.ts +1 -56
- package/dist/components/Icon/icons/social.d.ts +1 -24
- package/dist/components/Icon/icons/status.d.ts +1 -61
- package/dist/components/Icon/index.d.ts +2 -605
- package/dist/components/ImageAnnotation/ImageAnnotation.cjs +1 -1
- package/dist/components/ImageAnnotation/ImageAnnotation.js +1 -1
- package/dist/components/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/JsonViewer/JsonViewer.js +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.cjs +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PageNav/PageNav.cjs +1 -1
- package/dist/components/PageNav/PageNav.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +5 -5
- package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -1
- package/dist/components/PropsPlayground/PropsPlayground.js +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.cjs +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.js +1 -1
- package/dist/components/Result/Result.utils.cjs +1 -1
- package/dist/components/Result/Result.utils.js +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.js +1 -1
- package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/IconRender.js +16 -16
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
- package/dist/components/RingProgress/RingProgress.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.d.ts +3 -0
- package/dist/components/RingProgress/RingProgress.const.js +7 -4
- package/dist/components/RingProgress/RingProgress.js +38 -37
- package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +16 -15
- package/dist/components/Sidebar/Sidebar.types.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.utils.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.utils.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.utils.js +11 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +55 -51
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/SliderRange/SliderRange.cjs +1 -1
- package/dist/components/SliderRange/SliderRange.js +19 -19
- package/dist/components/Sparkline/Sparkline.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.d.ts +5 -0
- package/dist/components/Sparkline/Sparkline.const.js +9 -4
- package/dist/components/Sparkline/Sparkline.d.ts +1 -2
- package/dist/components/Sparkline/Sparkline.js +75 -53
- package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
- package/dist/components/Sparkline/Sparkline.utils.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.utils.d.ts +7 -12
- package/dist/components/Sparkline/Sparkline.utils.js +33 -20
- package/dist/components/Sparkline/index.d.ts +2 -2
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Tabs/TabList.cjs +1 -1
- package/dist/components/Tabs/TabList.js +1 -1
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/TimelineChart/TimelineChart.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.d.ts +3 -0
- package/dist/components/TimelineChart/TimelineChart.const.js +7 -4
- package/dist/components/TimelineChart/TimelineChart.js +56 -42
- package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -1
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.js +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.cjs +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.js +1 -1
- package/dist/components/TreeView/TreeView.cjs +1 -1
- package/dist/components/TreeView/TreeView.js +3 -2
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.js +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +409 -406
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +4 -0
- package/dist/constants/generals.const.js +50 -47
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +551 -548
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +14 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +35 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +26 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +4 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +130 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +12 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +18 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +1 -0
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +6 -0
- package/dist/styles/_drawer.css +213 -0
- package/dist/styles/_overlays.css +0 -1
- package/dist/styles/main.css +1 -0
- package/dist/styles.css +226 -25
- package/package.json +5 -1
- package/dist/components/Icon/Icon.cjs +0 -1
- package/dist/components/Icon/Icon.const.d.ts +0 -1
- package/dist/components/Icon/Icon.js +0 -45
- package/dist/components/Icon/icons/action.cjs +0 -1
- package/dist/components/Icon/icons/action.js +0 -351
- package/dist/components/Icon/icons/bear.cjs +0 -1
- package/dist/components/Icon/icons/bear.js +0 -47
- package/dist/components/Icon/icons/commerce.cjs +0 -1
- package/dist/components/Icon/icons/commerce.js +0 -124
- package/dist/components/Icon/icons/communication.cjs +0 -1
- package/dist/components/Icon/icons/communication.js +0 -184
- package/dist/components/Icon/icons/content.cjs +0 -1
- package/dist/components/Icon/icons/content.js +0 -231
- package/dist/components/Icon/icons/device.cjs +0 -1
- package/dist/components/Icon/icons/device.js +0 -122
- package/dist/components/Icon/icons/editor.cjs +0 -1
- package/dist/components/Icon/icons/editor.js +0 -285
- package/dist/components/Icon/icons/file.cjs +0 -1
- package/dist/components/Icon/icons/file.js +0 -120
- package/dist/components/Icon/icons/media.cjs +0 -1
- package/dist/components/Icon/icons/media.js +0 -306
- package/dist/components/Icon/icons/misc.cjs +0 -1
- package/dist/components/Icon/icons/misc.js +0 -450
- package/dist/components/Icon/icons/navigation.cjs +0 -1
- package/dist/components/Icon/icons/navigation.js +0 -215
- package/dist/components/Icon/icons/social.cjs +0 -1
- package/dist/components/Icon/icons/social.js +0 -89
- package/dist/components/Icon/icons/status.cjs +0 -1
- package/dist/components/Icon/icons/status.js +0 -271
- package/dist/components/Icon/index.cjs +0 -1
- package/dist/components/Icon/index.js +0 -79
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { SIXTEEN as l } from "../../../constants/numbers.const.js";
|
|
3
|
-
import { TOOLBAR_ITEM_MORE as
|
|
4
|
-
import { FormatClearIcon as u, IndentDecreaseIcon as U, IndentIncreaseIcon as z, AlignJustifyIcon as y, AlignRightIcon as v, AlignCenterIcon as J, AlignLeftIcon as Y, InsertPhotoIcon as P, InsertLinkIcon as
|
|
3
|
+
import { TOOLBAR_ITEM_MORE as t, TOOLBAR_ITEM_CLEAR_FORMAT as s, COMMAND_REMOVE_FORMAT as S, TOOLBAR_ITEM_OUTDENT as O, COMMAND_OUTDENT as G, TOOLBAR_ITEM_INDENT as L, COMMAND_INDENT as B, TOOLBAR_ITEM_ALIGN_JUSTIFY as d, COMMAND_JUSTIFY_FULL as H, TOOLBAR_ITEM_ALIGN_RIGHT as A, COMMAND_JUSTIFY_RIGHT as F, TOOLBAR_ITEM_ALIGN_CENTER as R, COMMAND_JUSTIFY_CENTER as f, TOOLBAR_ITEM_ALIGN_LEFT as C, COMMAND_JUSTIFY_LEFT as k, TOOLBAR_ITEM_SIGNATURE as M, TOOLBAR_ITEM_IMAGE as N, TOOLBAR_ITEM_LINK as c, TOOLBAR_ITEM_HIGHLIGHT_COLOR as g, TOOLBAR_ITEM_TEXT_COLOR as h, TOOLBAR_ITEM_HEADING_DROPDOWN as p, TOOLBAR_ITEM_DIVIDER as m } from "../../../constants/generals.const.js";
|
|
4
|
+
import { FormatClearIcon as u, IndentDecreaseIcon as U, IndentIncreaseIcon as z, AlignJustifyIcon as y, AlignRightIcon as v, AlignCenterIcon as J, AlignLeftIcon as Y, InsertPhotoIcon as P, InsertLinkIcon as X, TextIcon as V } from "../../../node_modules/@forgedevstack/bear-icons/dist/editor.js";
|
|
5
5
|
import { ToolbarButton as n } from "../components/ToolbarButton/ToolbarButton.js";
|
|
6
6
|
import { ToolbarDropdown as K } from "../components/ToolbarDropdown/ToolbarDropdown.js";
|
|
7
|
-
import { ToolbarColorPicker as
|
|
7
|
+
import { ToolbarColorPicker as D } from "../components/ToolbarColorPicker/ToolbarColorPicker.js";
|
|
8
8
|
import { ToolbarMore as w } from "../components/ToolbarMore/ToolbarMore.js";
|
|
9
9
|
import { ToolbarSignature as $ } from "../components/ToolbarSignature/ToolbarSignature.js";
|
|
10
|
-
import { RICH_EDITOR_BUTTON_CONFIG as j, RICH_EDITOR_MOBILE_MORE_ITEMS as W, RICH_EDITOR_DESKTOP_MORE_ITEMS as q, TITLE_CLEAR_FORMATTING as Q, TITLE_DECREASE_INDENT as Z, TITLE_INCREASE_INDENT as x, TITLE_JUSTIFY as ee, TITLE_ALIGN_RIGHT as oe, TITLE_ALIGN_CENTER as Te, TITLE_ALIGN_LEFT as ie, TITLE_INSERT_SIGNATURE as le, TITLE_INSERT_IMAGE as ne, TITLE_INSERT_LINK as Ie, TITLE_HIGHLIGHT_COLOR as _e, TITLE_TEXT_COLOR as re, TITLE_TEXT_STYLE as Ee, RICH_EDITOR_HEADING_OPTIONS as
|
|
11
|
-
import { RICH_EDITOR_ICONS as
|
|
10
|
+
import { RICH_EDITOR_BUTTON_CONFIG as j, RICH_EDITOR_MOBILE_MORE_ITEMS as W, RICH_EDITOR_DESKTOP_MORE_ITEMS as q, TITLE_CLEAR_FORMATTING as Q, TITLE_DECREASE_INDENT as Z, TITLE_INCREASE_INDENT as x, TITLE_JUSTIFY as ee, TITLE_ALIGN_RIGHT as oe, TITLE_ALIGN_CENTER as Te, TITLE_ALIGN_LEFT as ie, TITLE_INSERT_SIGNATURE as le, TITLE_INSERT_IMAGE as ne, TITLE_INSERT_LINK as Ie, TITLE_HIGHLIGHT_COLOR as _e, TITLE_TEXT_COLOR as re, TITLE_TEXT_STYLE as Ee, RICH_EDITOR_HEADING_OPTIONS as ae } from "../RichEditor.const.js";
|
|
11
|
+
import { RICH_EDITOR_ICONS as te } from "./IconRender.js";
|
|
12
12
|
const he = (e) => {
|
|
13
|
-
const T = e.disabled || e.readOnly,
|
|
14
|
-
[
|
|
13
|
+
const T = e.disabled || e.readOnly, b = {
|
|
14
|
+
[m]: (i) => /* @__PURE__ */ o(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: "Bear-RichEditor__divider w-px h-5 bg-gray-300 dark:bg-zinc-600 mx-1"
|
|
18
18
|
},
|
|
19
|
-
`${
|
|
19
|
+
`${m}-${i}`
|
|
20
20
|
),
|
|
21
21
|
[p]: () => /* @__PURE__ */ o(
|
|
22
22
|
K,
|
|
23
23
|
{
|
|
24
|
-
options:
|
|
24
|
+
options: ae,
|
|
25
25
|
value: e.currentBlock,
|
|
26
26
|
onChange: e.handleHeadingChange,
|
|
27
27
|
title: Ee,
|
|
28
28
|
disabled: T,
|
|
29
|
-
icon: /* @__PURE__ */ o(
|
|
29
|
+
icon: /* @__PURE__ */ o(V, { size: l })
|
|
30
30
|
},
|
|
31
31
|
p
|
|
32
32
|
),
|
|
33
33
|
[h]: () => /* @__PURE__ */ o(
|
|
34
|
-
|
|
34
|
+
D,
|
|
35
35
|
{
|
|
36
36
|
value: e.textColorValue,
|
|
37
37
|
onChange: e.handleTextColor,
|
|
@@ -44,7 +44,7 @@ const he = (e) => {
|
|
|
44
44
|
h
|
|
45
45
|
),
|
|
46
46
|
[g]: () => /* @__PURE__ */ o(
|
|
47
|
-
|
|
47
|
+
D,
|
|
48
48
|
{
|
|
49
49
|
value: e.highlightColorValue,
|
|
50
50
|
onChange: e.handleHighlightColor,
|
|
@@ -59,7 +59,7 @@ const he = (e) => {
|
|
|
59
59
|
[c]: () => /* @__PURE__ */ o(
|
|
60
60
|
n,
|
|
61
61
|
{
|
|
62
|
-
icon: /* @__PURE__ */ o(
|
|
62
|
+
icon: /* @__PURE__ */ o(X, { size: l }),
|
|
63
63
|
title: Ie,
|
|
64
64
|
onClick: e.handleLink,
|
|
65
65
|
disabled: T
|
|
@@ -135,7 +135,7 @@ const he = (e) => {
|
|
|
135
135
|
},
|
|
136
136
|
L
|
|
137
137
|
),
|
|
138
|
-
[
|
|
138
|
+
[O]: () => /* @__PURE__ */ o(
|
|
139
139
|
n,
|
|
140
140
|
{
|
|
141
141
|
icon: /* @__PURE__ */ o(U, { size: l }),
|
|
@@ -143,9 +143,9 @@ const he = (e) => {
|
|
|
143
143
|
onClick: () => e.execAlign(G),
|
|
144
144
|
disabled: T
|
|
145
145
|
},
|
|
146
|
-
|
|
146
|
+
O
|
|
147
147
|
),
|
|
148
|
-
[
|
|
148
|
+
[s]: () => /* @__PURE__ */ o(
|
|
149
149
|
n,
|
|
150
150
|
{
|
|
151
151
|
icon: /* @__PURE__ */ o(u, { size: l }),
|
|
@@ -153,21 +153,21 @@ const he = (e) => {
|
|
|
153
153
|
onClick: () => e.execAlign(S),
|
|
154
154
|
disabled: T
|
|
155
155
|
},
|
|
156
|
-
|
|
156
|
+
s
|
|
157
157
|
),
|
|
158
|
-
[
|
|
158
|
+
[t]: () => {
|
|
159
159
|
const i = e.isMobile ? W : q;
|
|
160
|
-
return /* @__PURE__ */ o(w, { disabled: T, isMobile: e.isMobile, children: i.map((_, I) => r(_, I)) },
|
|
160
|
+
return /* @__PURE__ */ o(w, { disabled: T, isMobile: e.isMobile, children: i.map((_, I) => r(_, I)) }, t);
|
|
161
161
|
}
|
|
162
162
|
}, r = (i, _) => {
|
|
163
|
-
const I =
|
|
163
|
+
const I = b[i];
|
|
164
164
|
if (I)
|
|
165
165
|
return I(_);
|
|
166
|
-
const E = j[i],
|
|
167
|
-
return !E || !
|
|
166
|
+
const E = j[i], a = te[i];
|
|
167
|
+
return !E || !a ? null : /* @__PURE__ */ o(
|
|
168
168
|
n,
|
|
169
169
|
{
|
|
170
|
-
icon:
|
|
170
|
+
icon: a,
|
|
171
171
|
title: E.title,
|
|
172
172
|
active: e.activeFormats.has(i),
|
|
173
173
|
onClick: () => e.handleFormat(i),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("../../utils/cn.cjs");require("react");const L=require("../../constants/numbers.const.cjs"),O=require("../../constants/generals.const.cjs"),t=require("./RingProgress.const.cjs"),e=require("./RingProgress.utils.cjs"),j=b=>{const{sections:c,size:i=t.DEFAULT_SIZE,thickness:a=t.DEFAULT_THICKNESS,roundCaps:h=O.BOOLEAN_FALSE,label:l,rootColor:g,variant:d=t.RING_VARIANT_FULL,className:E,testId:A,...m}=b,u=e.getRingTotal(c),{radius:R,circumference:o,center:s}=e.getRingMetrics(i,a),I=d===t.RING_VARIANT_HALF?o*t.RING_HALF_SWEEP:o;let N=L.ZERO;const k=h?e.STROKE_LINECAP_ROUND:e.STROKE_LINECAP_BUTT;return r.jsxs("div",{className:f.cn("Bear-RingProgress bear-relative bear-inline-flex",E),"data-testid":A,...m,children:[r.jsxs("svg",{width:i,height:i,className:d===t.RING_VARIANT_HALF?"bear-rotate-[-180deg]":"bear-rotate-[-90deg]",children:[r.jsx("circle",{cx:s,cy:s,r:R,fill:e.FILL_NONE,strokeWidth:a,className:g?void 0:"bear-stroke-gray-200 dark:bear-stroke-zinc-700",stroke:g}),u>L.ZERO&&c.map((n,x)=>{const _=e.getRingSegmentLength(n.value,u,I),T=-N;return N+=_,r.jsxs("g",{children:[r.jsx("circle",{cx:s,cy:s,r:R,fill:e.FILL_NONE,strokeWidth:a,stroke:n.color,strokeDasharray:`${_} ${o}`,strokeDashoffset:T,strokeLinecap:k}),n.tooltip&&r.jsx("title",{children:n.tooltip})]},x)})]}),l!==void 0&&r.jsx("div",{className:"bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center",children:e.renderRingLabel(l)})]})};exports.RingProgress=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../constants/numbers.const.cjs"),A=_.ONE_HUNDRED_TWENTY,E=_.TWELVE,N="full",I="half",L=_.HALF;exports.DEFAULT_SIZE=A;exports.DEFAULT_THICKNESS=E;exports.RING_HALF_SWEEP=L;exports.RING_VARIANT_FULL=N;exports.RING_VARIANT_HALF=I;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ONE_HUNDRED_TWENTY as E, TWELVE as
|
|
2
|
-
const
|
|
1
|
+
import { ONE_HUNDRED_TWENTY as E, TWELVE as _, HALF as A } from "../../constants/numbers.const.js";
|
|
2
|
+
const o = E, L = _, T = "full", t = "half", I = A;
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
o as DEFAULT_SIZE,
|
|
5
|
+
L as DEFAULT_THICKNESS,
|
|
6
|
+
I as RING_HALF_SWEEP,
|
|
7
|
+
T as RING_VARIANT_FULL,
|
|
8
|
+
t as RING_VARIANT_HALF
|
|
6
9
|
};
|
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
2
|
+
import { cn as v } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { ZERO as
|
|
5
|
-
import { BOOLEAN_FALSE as
|
|
6
|
-
import { DEFAULT_SIZE as
|
|
7
|
-
import { getRingTotal as
|
|
8
|
-
const
|
|
4
|
+
import { ZERO as N } from "../../constants/numbers.const.js";
|
|
5
|
+
import { BOOLEAN_FALSE as O } from "../../constants/generals.const.js";
|
|
6
|
+
import { DEFAULT_SIZE as S, DEFAULT_THICKNESS as x, RING_VARIANT_FULL as F, RING_VARIANT_HALF as f, RING_HALF_SWEEP as C } from "./RingProgress.const.js";
|
|
7
|
+
import { getRingTotal as y, FILL_NONE as R, getRingSegmentLength as D, STROKE_LINECAP_ROUND as P, STROKE_LINECAP_BUTT as U, renderRingLabel as j, getRingMetrics as B } from "./RingProgress.utils.js";
|
|
8
|
+
const $ = (b) => {
|
|
9
9
|
const {
|
|
10
|
-
sections:
|
|
11
|
-
size: s =
|
|
12
|
-
thickness:
|
|
13
|
-
roundCaps:
|
|
14
|
-
label:
|
|
15
|
-
rootColor:
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
sections: c,
|
|
11
|
+
size: s = S,
|
|
12
|
+
thickness: a = x,
|
|
13
|
+
roundCaps: p = O,
|
|
14
|
+
label: n,
|
|
15
|
+
rootColor: l,
|
|
16
|
+
variant: m = F,
|
|
17
|
+
className: E,
|
|
18
|
+
testId: _,
|
|
18
19
|
...k
|
|
19
|
-
} = b,
|
|
20
|
-
let
|
|
21
|
-
const
|
|
20
|
+
} = b, d = y(c), { radius: g, circumference: o, center: e } = B(s, a), A = m === f ? o * C : o;
|
|
21
|
+
let h = N;
|
|
22
|
+
const I = p ? P : U;
|
|
22
23
|
return /* @__PURE__ */ i(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
-
"data-testid":
|
|
26
|
+
className: v("Bear-RingProgress bear-relative bear-inline-flex", E),
|
|
27
|
+
"data-testid": _,
|
|
27
28
|
...k,
|
|
28
29
|
children: [
|
|
29
|
-
/* @__PURE__ */ i("svg", { width: s, height: s, className: "bear-rotate-[-90deg]", children: [
|
|
30
|
+
/* @__PURE__ */ i("svg", { width: s, height: s, className: m === f ? "bear-rotate-[-180deg]" : "bear-rotate-[-90deg]", children: [
|
|
30
31
|
/* @__PURE__ */ t(
|
|
31
32
|
"circle",
|
|
32
33
|
{
|
|
33
34
|
cx: e,
|
|
34
35
|
cy: e,
|
|
35
|
-
r:
|
|
36
|
-
fill:
|
|
37
|
-
strokeWidth:
|
|
38
|
-
className:
|
|
39
|
-
stroke:
|
|
36
|
+
r: g,
|
|
37
|
+
fill: R,
|
|
38
|
+
strokeWidth: a,
|
|
39
|
+
className: l ? void 0 : "bear-stroke-gray-200 dark:bear-stroke-zinc-700",
|
|
40
|
+
stroke: l
|
|
40
41
|
}
|
|
41
42
|
),
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
return
|
|
43
|
+
d > N && c.map((r, u) => {
|
|
44
|
+
const L = D(r.value, d, A), T = -h;
|
|
45
|
+
return h += L, /* @__PURE__ */ i("g", { children: [
|
|
45
46
|
/* @__PURE__ */ t(
|
|
46
47
|
"circle",
|
|
47
48
|
{
|
|
48
49
|
cx: e,
|
|
49
50
|
cy: e,
|
|
50
|
-
r:
|
|
51
|
-
fill:
|
|
52
|
-
strokeWidth:
|
|
51
|
+
r: g,
|
|
52
|
+
fill: R,
|
|
53
|
+
strokeWidth: a,
|
|
53
54
|
stroke: r.color,
|
|
54
|
-
strokeDasharray: `${
|
|
55
|
-
strokeDashoffset:
|
|
56
|
-
strokeLinecap:
|
|
55
|
+
strokeDasharray: `${L} ${o}`,
|
|
56
|
+
strokeDashoffset: T,
|
|
57
|
+
strokeLinecap: I
|
|
57
58
|
}
|
|
58
59
|
),
|
|
59
60
|
r.tooltip && /* @__PURE__ */ t("title", { children: r.tooltip })
|
|
60
|
-
] },
|
|
61
|
+
] }, u);
|
|
61
62
|
})
|
|
62
63
|
] }),
|
|
63
|
-
|
|
64
|
+
n !== void 0 && /* @__PURE__ */ t("div", { className: "bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center", children: j(n) })
|
|
64
65
|
]
|
|
65
66
|
}
|
|
66
67
|
);
|
|
67
68
|
};
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
$ as RingProgress
|
|
70
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),s=require("./Select.const.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),s=require("./Select.const.cjs"),R=require("@forgedevstack/bear-icons"),V=require("../OverlayPortal/OverlayPortal.cjs"),i=require("../../utils/cn.cjs"),W=require("../../utils/generateBearId.utils.cjs"),X=require("../../utils/useBearId.cjs"),H=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const G=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),J=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),K=require("../../hooks/useFormControl/useFormControl.cjs"),Q=C=>{const{options:v,value:l,onChange:t,placeholder:x=s.SELECT_DEFAULT_PLACEHOLDER,label:n,error:S,disabled:k=!1,required:A=!1,size:O="md",fullWidth:L=!1,displayEmpty:y=!1,renderValue:T,native:c=!1,className:j,id:P,testId:q}=C,{openEffect:F,closeEffect:B}=J.resolveOverlayEffects(C),$=X.useBearId("Select"),u=W.resolveBearId(P,$),a=K.useFormControl(),[b,E]=f.useState(!1),m=f.useRef(null),w=f.useRef(null),{style:D,ready:M}=G.useFixedAnchorPosition({anchorRef:m,open:b&&!c,offsetPx:s.SELECT_MENU_OFFSET_PX,matchWidth:!0}),d=k||!!(a!=null&&a.disabled),h=A||!!(a!=null&&a.required),o=!!S||!!(a!=null&&a.error),_=typeof S=="string"?S:void 0,g=v.find(e=>e.value===l),p=l===void 0||l==="",N=p||y&&p,U=f.useCallback(()=>E(!1),[]);H.useClickOutsideMultiple([m,w],U,{enabled:b&&!c&&!d});const Z=e=>{t==null||t(e),E(!1)},z=T&&!p?T(l):N||!g?x:g.label,I={backgroundColor:"var(--bear-bg-primary)",borderColor:o?void 0:"var(--bear-border-default)",color:g&&!N?"var(--bear-text-primary)":"var(--bear-text-muted)"};return c?r.jsxs("div",{id:u,"data-testid":q,className:i.cn(s.S_E_L_E_C_T_ROOT_CLASS,"bear-relative bear-flex bear-flex-col bear-gap-1.5",L&&"bear-w-full"),children:[n&&r.jsx("label",{htmlFor:`${u}-native`,className:"bear-text-sm bear-font-medium",style:{color:"var(--bear-text-secondary)"},children:n}),r.jsxs("select",{id:`${u}-native`,disabled:d,required:h,value:l??"",onChange:e=>t==null?void 0:t(e.target.value),className:i.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__native`,"bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200","focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",o?"bear-border-red-500 focus:bear-ring-red-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500",d&&"bear-opacity-50 bear-cursor-not-allowed",s.SELECT_SIZE_CLASSES[O],j),style:I,"aria-invalid":o||void 0,"aria-required":h||void 0,"aria-describedby":a==null?void 0:a.helperId,children:[(y||x)&&r.jsx("option",{value:"",disabled:!y,children:x}),v.map(e=>r.jsx("option",{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),_&&r.jsx("p",{className:"bear-text-sm bear-text-red-500",children:_})]}):r.jsxs("div",{ref:m,id:u,"data-testid":q,className:i.cn(s.S_E_L_E_C_T_ROOT_CLASS,"bear-relative bear-flex bear-flex-col bear-gap-1.5",L&&"bear-w-full"),children:[n&&r.jsx("label",{className:"bear-text-sm bear-font-medium",style:{color:"var(--bear-text-secondary)"},children:n}),r.jsxs("button",{type:"button",disabled:d,onClick:()=>!d&&E(!b),className:i.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__trigger`,"bear-flex bear-items-center bear-justify-between bear-w-full","bear-rounded-lg bear-border bear-text-left bear-outline-none bear-transition-all bear-duration-200","focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",o?"bear-border-red-500 focus:bear-ring-red-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",d&&"bear-opacity-50 bear-cursor-not-allowed",s.SELECT_SIZE_CLASSES[O],j),style:I,"aria-haspopup":"listbox","aria-expanded":b,"aria-invalid":o||void 0,"aria-required":h||void 0,"aria-describedby":a==null?void 0:a.helperId,children:[r.jsx("span",{className:`${s.S_E_L_E_C_T_ROOT_CLASS}__value`,children:z}),r.jsx(R.ChevronDownIcon,{className:i.cn("bear-w-4 bear-h-4 bear-shrink-0 bear-transition-transform",b&&"bear-rotate-180"),style:{color:"var(--bear-text-muted)"}})]}),r.jsx(V.OverlayPortal,{open:b&&!c,ready:M,style:{...D,backgroundColor:"var(--bear-bg-primary)",borderColor:"var(--bear-border-default)"},zIndex:s.SELECT_MENU_Z_INDEX,openEffect:F,closeEffect:B,panelRef:w,className:`${s.S_E_L_E_C_T_ROOT_CLASS}__menu bear-rounded-lg bear-border bear-shadow-lg bear-overflow-hidden`,attributes:{role:"listbox"},children:r.jsx("div",{className:"bear-max-h-60 bear-overflow-y-auto",children:v.map(e=>r.jsxs("button",{type:"button",disabled:e.disabled,onClick:()=>!e.disabled&&Z(e.value),role:"option","aria-selected":e.value===l,className:i.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__option`,"bear-flex bear-items-center bear-justify-between bear-w-full bear-px-4 bear-py-2","bear-text-left bear-transition-colors",e.disabled&&"bear-cursor-not-allowed",e.value===l&&"bear-bg-bear-100 bear-text-bear-700 dark:bear-bg-bear-600/20 dark:bear-text-bear-300",!e.disabled&&e.value!==l&&"hover:bear-bg-[var(--bear-bg-tertiary)]"),style:e.disabled?{color:"var(--bear-text-muted)"}:e.value===l?void 0:{color:"var(--bear-text-secondary)"},children:[e.label,e.value===l&&r.jsx(R.CheckIcon,{className:"bear-w-4 bear-h-4 bear-shrink-0 bear-text-bear-600 dark:bear-text-bear-400"})]},e.value))})}),_&&r.jsx("p",{className:"bear-text-sm bear-text-red-500",children:_})]})};exports.Select=Q;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as X, useRef as $, useCallback as Z } from "react";
|
|
3
3
|
import { SELECT_DEFAULT_PLACEHOLDER as H, SELECT_MENU_OFFSET_PX as G, SELECT_SIZE_CLASSES as q, S_E_L_E_C_T_ROOT_CLASS as t, SELECT_MENU_Z_INDEX as J } from "./Select.const.js";
|
|
4
|
-
import { ChevronDownIcon as K, CheckIcon as Q } from "
|
|
4
|
+
import { ChevronDownIcon as K, CheckIcon as Q } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { OverlayPortal as Y } from "../OverlayPortal/OverlayPortal.js";
|
|
6
6
|
import { cn as d } from "../../utils/cn.js";
|
|
7
7
|
import { resolveBearId as ee } from "../../utils/generateBearId.utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const s=require("@forgedevstack/bear-icons"),D=require("./components/SidebarItem/SidebarItem.cjs"),a=require("./Sidebar.const.cjs"),p=b=>{const{items:I,collapsed:r=!1,onCollapsedChange:o,width:_=a.SIDEBAR_WIDTH,collapsedWidth:E=a.SIDEBAR_COLLAPSED_WIDTH,header:d,footer:c,showHeader:h=!0,activeItemId:S,onItemClick:u,activeVariant:f="fill",fullHeight:A=!1,variant:t="default",position:l="left",className:C,style:B,testId:x}=b,R=r?E:_,m=l==="left"?"bear-border-r":"bear-border-l",v=h&&d;return e.jsxs("aside",{"data-testid":x,className:i.cn("Bear-Sidebar",`Bear-Sidebar--${t}`,r&&"Bear-Sidebar--collapsed","bear-flex bear-flex-col bear-h-full bear-transition-all bear-duration-300",A&&"bear-min-h-full",t==="default"&&m,a.SIDEBAR_VARIANT_STYLES[t],C),style:{width:R,...B},children:[v&&e.jsxs("div",{className:i.cn("Bear-Sidebar__header",a.SIDEBAR_HEADER_CLASSES),children:[!r&&d,o&&e.jsx("button",{type:"button",onClick:()=>o(!r),className:i.cn("Bear-Sidebar__toggle",a.SIDEBAR_TOGGLE_CLASSES),"aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?l==="left"?e.jsx(s.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(s.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):l==="left"?e.jsx(s.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(s.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE})})]}),e.jsx("nav",{className:"Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0",children:I.map(n=>e.jsx(D.SidebarItem,{item:n,isActive:n.id===S,collapsed:r,onClick:u,activeVariant:f,activeItemId:S},n.id))}),c&&e.jsx("div",{className:i.cn("Bear-Sidebar__footer",a.SIDEBAR_FOOTER_CLASSES),children:r?null:c})]})};exports.Sidebar=p;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as r } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { ChevronRightIcon as
|
|
4
|
+
import { ChevronRightIcon as S, ChevronLeftIcon as f } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { SidebarItem as x } from "./components/SidebarItem/SidebarItem.js";
|
|
6
6
|
import { SIDEBAR_WIDTH as N, SIDEBAR_COLLAPSED_WIDTH as T, SIDEBAR_TOGGLE_ICON_SIZE as i, SIDEBAR_TOGGLE_CLASSES as y, SIDEBAR_HEADER_CLASSES as H, SIDEBAR_FOOTER_CLASSES as O, SIDEBAR_VARIANT_STYLES as g } from "./Sidebar.const.js";
|
|
7
|
-
const V = (
|
|
7
|
+
const V = (m) => {
|
|
8
8
|
const {
|
|
9
|
-
items:
|
|
9
|
+
items: _,
|
|
10
10
|
collapsed: e = !1,
|
|
11
11
|
onCollapsedChange: d,
|
|
12
|
-
width:
|
|
13
|
-
collapsedWidth:
|
|
12
|
+
width: h = N,
|
|
13
|
+
collapsedWidth: p = T,
|
|
14
14
|
header: s,
|
|
15
15
|
footer: n,
|
|
16
|
-
showHeader:
|
|
17
|
-
activeItemId:
|
|
16
|
+
showHeader: E = !0,
|
|
17
|
+
activeItemId: b,
|
|
18
18
|
onItemClick: I,
|
|
19
19
|
activeVariant: A = "fill",
|
|
20
20
|
fullHeight: B = !1,
|
|
@@ -23,8 +23,8 @@ const V = (f) => {
|
|
|
23
23
|
className: u,
|
|
24
24
|
style: C,
|
|
25
25
|
testId: v
|
|
26
|
-
} =
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
} = m, D = e ? p : h, R = t === "left" ? "bear-border-r" : "bear-border-l", L = E && s;
|
|
27
|
+
return /* @__PURE__ */ c(
|
|
28
28
|
"aside",
|
|
29
29
|
{
|
|
30
30
|
"data-testid": v,
|
|
@@ -40,7 +40,7 @@ const V = (f) => {
|
|
|
40
40
|
),
|
|
41
41
|
style: { width: D, ...C },
|
|
42
42
|
children: [
|
|
43
|
-
L && /* @__PURE__ */
|
|
43
|
+
L && /* @__PURE__ */ c("div", { className: r("Bear-Sidebar__header", H), children: [
|
|
44
44
|
!e && s,
|
|
45
45
|
d && /* @__PURE__ */ a(
|
|
46
46
|
"button",
|
|
@@ -49,18 +49,19 @@ const V = (f) => {
|
|
|
49
49
|
onClick: () => d(!e),
|
|
50
50
|
className: r("Bear-Sidebar__toggle", y),
|
|
51
51
|
"aria-label": e ? "Expand sidebar" : "Collapse sidebar",
|
|
52
|
-
children: e ? t === "left" ? /* @__PURE__ */ a(
|
|
52
|
+
children: e ? t === "left" ? /* @__PURE__ */ a(S, { size: i }) : /* @__PURE__ */ a(f, { size: i }) : t === "left" ? /* @__PURE__ */ a(f, { size: i }) : /* @__PURE__ */ a(S, { size: i })
|
|
53
53
|
}
|
|
54
54
|
)
|
|
55
55
|
] }),
|
|
56
|
-
/* @__PURE__ */ a("nav", { className: "Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0", children:
|
|
56
|
+
/* @__PURE__ */ a("nav", { className: "Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0", children: _.map((o) => /* @__PURE__ */ a(
|
|
57
57
|
x,
|
|
58
58
|
{
|
|
59
59
|
item: o,
|
|
60
|
-
isActive: o.id ===
|
|
60
|
+
isActive: o.id === b,
|
|
61
61
|
collapsed: e,
|
|
62
62
|
onClick: I,
|
|
63
|
-
activeVariant: A
|
|
63
|
+
activeVariant: A,
|
|
64
|
+
activeItemId: b
|
|
64
65
|
},
|
|
65
66
|
o.id
|
|
66
67
|
)) }),
|
|
@@ -48,6 +48,6 @@ export interface SidebarItemComponentProps {
|
|
|
48
48
|
collapsed?: boolean;
|
|
49
49
|
depth?: number;
|
|
50
50
|
onClick?: (item: SidebarItem) => void;
|
|
51
|
-
/** How active state is shown. Passed from Sidebar activeVariant. */
|
|
52
51
|
activeVariant?: SidebarActiveVariant;
|
|
52
|
+
activeItemId?: string;
|
|
53
53
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=(n,e)=>{if(!e)return!1;if(n.id===e)return!0;const r=n.children;return!r||r.length===0?!1:r.some(s=>t(s,e))};exports.sidebarItemContainsId=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),a=require("../../../../utils/cn.cjs"),d=require("@forgedevstack/bear-icons"),o=require("../../Sidebar.const.cjs"),S=n=>{const{title:t,children:c,collapsible:r=!1,defaultCollapsed:i=!1,className:l}=n,[s,b]=u.useState(i);return e.jsxs("div",{className:a.cn("Bear-Sidebar__group bear-mb-4",l),children:[t&&e.jsxs("button",{type:"button",onClick:()=>r&&b(!s),className:a.cn("Bear-Sidebar__group-title",o.SIDEBAR_GROUP_TITLE_CLASSES,r&&"bear-cursor-pointer hover:bear-text-zinc-600 dark:hover:bear-text-zinc-300"),children:[r&&e.jsx(d.ChevronDownIcon,{size:o.SIDEBAR_ICON_SIZE-2,className:a.cn("bear-transition-transform",s&&"-bear-rotate-90")}),t]}),!s&&e.jsx("div",{className:"Bear-Sidebar__group-content bear-space-y-1",children:c})]})};exports.SidebarGroup=S;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as p } from "react";
|
|
3
3
|
import { cn as a } from "../../../../utils/cn.js";
|
|
4
|
-
import { ChevronDownIcon as b } from "
|
|
4
|
+
import { ChevronDownIcon as b } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { SIDEBAR_ICON_SIZE as d, SIDEBAR_GROUP_TITLE_CLASSES as S } from "../../Sidebar.const.js";
|
|
6
6
|
const h = (i) => {
|
|
7
7
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("react"),o=require("../../../../utils/cn.cjs"),p=require("@forgedevstack/bear-icons"),r=require("../../Sidebar.const.cjs"),C=require("../../Sidebar.utils.cjs"),S=m=>{const{item:e,isActive:I,collapsed:i,depth:d=0,onClick:t,activeVariant:l="fill",activeItemId:n}=m,b=e.children??[],c=b.length>0,[_,E]=f.useState(()=>C.sidebarItemContainsId(e,n)),B=i?r.SIDEBAR_PADDING_BASE:r.SIDEBAR_PADDING_BASE+d*r.SIDEBAR_DEPTH_INDENT,h=()=>{c&&E(s=>!s),e.onClick&&e.onClick(),t==null||t(e)},A=c&&_&&!i,u=r.SIDEBAR_ITEM_ACTIVE_BY_VARIANT[l],D=o.cn("Bear-Sidebar__item",r.SIDEBAR_ITEM_BASE_CLASSES,I?`Bear-Sidebar__item--active ${u}`:r.SIDEBAR_ITEM_INACTIVE_CLASSES,e.disabled&&`Bear-Sidebar__item--disabled ${r.SIDEBAR_ITEM_DISABLED_CLASSES}`,i&&"Bear-Sidebar__item--collapsed bear-justify-center"),N=e.href?"a":"button";return a.jsxs("div",{className:"Bear-Sidebar__item-wrapper",children:[a.jsxs(N,{href:e.href,onClick:h,disabled:e.disabled,className:D,style:{paddingLeft:B},title:i?e.label:void 0,children:[e.icon&&a.jsx("span",{className:"Bear-Sidebar__item-icon bear-shrink-0 bear-w-5 bear-h-5 bear-flex bear-items-center bear-justify-center",children:e.icon}),!i&&a.jsxs("span",{className:"Bear-Sidebar__item-row bear-flex bear-items-center bear-flex-1 bear-min-w-0",children:[a.jsx("span",{className:"Bear-Sidebar__item-label bear-flex-1 bear-truncate",children:e.label}),e.badge&&a.jsx("span",{className:"Bear-Sidebar__item-badge bear-ml-auto",children:e.badge}),c&&a.jsx(p.ChevronDownIcon,{size:r.SIDEBAR_ICON_SIZE,className:o.cn("Bear-Sidebar__item-chevron bear-ml-1 bear-transition-transform bear-duration-200",_&&"bear-rotate-180")})]})]}),A&&a.jsx("div",{className:"Bear-Sidebar__children bear-mt-1",children:b.map(s=>a.jsx(S,{item:s,isActive:s.id===n,collapsed:i,depth:d+1,onClick:t,activeVariant:l,activeItemId:n},s.id))})]})};exports.SidebarItem=S;
|
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { ChevronDownIcon as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N } from "react";
|
|
3
|
+
import { cn as b } from "../../../../utils/cn.js";
|
|
4
|
+
import { ChevronDownIcon as D } from "@forgedevstack/bear-icons";
|
|
5
|
+
import { SIDEBAR_ITEM_DISABLED_CLASSES as v, SIDEBAR_ITEM_ACTIVE_BY_VARIANT as T, SIDEBAR_ITEM_INACTIVE_CLASSES as u, SIDEBAR_ITEM_BASE_CLASSES as R, SIDEBAR_PADDING_BASE as _, SIDEBAR_ICON_SIZE as x, SIDEBAR_DEPTH_INDENT as w } from "../../Sidebar.const.js";
|
|
6
|
+
import { sidebarItemContainsId as g } from "../../Sidebar.utils.js";
|
|
7
|
+
const L = (S) => {
|
|
7
8
|
const {
|
|
8
9
|
item: e,
|
|
9
|
-
isActive:
|
|
10
|
-
collapsed:
|
|
11
|
-
depth:
|
|
12
|
-
onClick:
|
|
13
|
-
activeVariant:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
!r && /* @__PURE__ */ n(d, { children: [
|
|
19
|
-
/* @__PURE__ */ a("span", { className: "Bear-Sidebar__item-label bear-flex-1 bear-truncate", children: e.label }),
|
|
20
|
-
e.badge && /* @__PURE__ */ a("span", { className: "Bear-Sidebar__item-badge bear-ml-auto", children: e.badge }),
|
|
21
|
-
t && /* @__PURE__ */ a(
|
|
22
|
-
N,
|
|
23
|
-
{
|
|
24
|
-
size: v,
|
|
25
|
-
className: o(
|
|
26
|
-
"Bear-Sidebar__item-chevron bear-ml-1 bear-transition-transform bear-duration-200",
|
|
27
|
-
c && "bear-rotate-180"
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
] })
|
|
32
|
-
] }), A = T[S], f = o(
|
|
10
|
+
isActive: I,
|
|
11
|
+
collapsed: a,
|
|
12
|
+
depth: c = 0,
|
|
13
|
+
onClick: t,
|
|
14
|
+
activeVariant: d = "fill",
|
|
15
|
+
activeItemId: s
|
|
16
|
+
} = S, m = e.children ?? [], n = m.length > 0, [o, h] = N(() => g(e, s)), E = a ? _ : _ + c * w, B = () => {
|
|
17
|
+
n && h((i) => !i), e.onClick && e.onClick(), t == null || t(e);
|
|
18
|
+
}, p = n && o && !a, f = T[d], A = b(
|
|
33
19
|
"Bear-Sidebar__item",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
e.disabled && `Bear-Sidebar__item--disabled ${
|
|
37
|
-
|
|
38
|
-
),
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
20
|
+
R,
|
|
21
|
+
I ? `Bear-Sidebar__item--active ${f}` : u,
|
|
22
|
+
e.disabled && `Bear-Sidebar__item--disabled ${v}`,
|
|
23
|
+
a && "Bear-Sidebar__item--collapsed bear-justify-center"
|
|
24
|
+
), C = e.href ? "a" : "button";
|
|
25
|
+
return /* @__PURE__ */ l("div", { className: "Bear-Sidebar__item-wrapper", children: [
|
|
26
|
+
/* @__PURE__ */ l(
|
|
27
|
+
C,
|
|
42
28
|
{
|
|
43
29
|
href: e.href,
|
|
44
|
-
onClick:
|
|
30
|
+
onClick: B,
|
|
45
31
|
disabled: e.disabled,
|
|
46
|
-
className:
|
|
32
|
+
className: A,
|
|
47
33
|
style: { paddingLeft: E },
|
|
48
|
-
title:
|
|
49
|
-
children:
|
|
34
|
+
title: a ? e.label : void 0,
|
|
35
|
+
children: [
|
|
36
|
+
e.icon && /* @__PURE__ */ r("span", { className: "Bear-Sidebar__item-icon bear-shrink-0 bear-w-5 bear-h-5 bear-flex bear-items-center bear-justify-center", children: e.icon }),
|
|
37
|
+
!a && /* @__PURE__ */ l("span", { className: "Bear-Sidebar__item-row bear-flex bear-items-center bear-flex-1 bear-min-w-0", children: [
|
|
38
|
+
/* @__PURE__ */ r("span", { className: "Bear-Sidebar__item-label bear-flex-1 bear-truncate", children: e.label }),
|
|
39
|
+
e.badge && /* @__PURE__ */ r("span", { className: "Bear-Sidebar__item-badge bear-ml-auto", children: e.badge }),
|
|
40
|
+
n && /* @__PURE__ */ r(
|
|
41
|
+
D,
|
|
42
|
+
{
|
|
43
|
+
size: x,
|
|
44
|
+
className: b(
|
|
45
|
+
"Bear-Sidebar__item-chevron bear-ml-1 bear-transition-transform bear-duration-200",
|
|
46
|
+
o && "bear-rotate-180"
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] })
|
|
51
|
+
]
|
|
50
52
|
}
|
|
51
53
|
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
p && /* @__PURE__ */ r("div", { className: "Bear-Sidebar__children bear-mt-1", children: m.map((i) => /* @__PURE__ */ r(
|
|
55
|
+
L,
|
|
54
56
|
{
|
|
55
|
-
item:
|
|
56
|
-
isActive:
|
|
57
|
-
collapsed:
|
|
58
|
-
depth:
|
|
59
|
-
onClick:
|
|
57
|
+
item: i,
|
|
58
|
+
isActive: i.id === s,
|
|
59
|
+
collapsed: a,
|
|
60
|
+
depth: c + 1,
|
|
61
|
+
onClick: t,
|
|
62
|
+
activeVariant: d,
|
|
63
|
+
activeItemId: s
|
|
60
64
|
},
|
|
61
|
-
|
|
65
|
+
i.id
|
|
62
66
|
)) })
|
|
63
67
|
] });
|
|
64
68
|
};
|
|
65
69
|
export {
|
|
66
|
-
|
|
70
|
+
L as SidebarItem
|
|
67
71
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Sidebar, default } from './Sidebar';
|
|
2
2
|
export { SidebarGroup } from './components/SidebarGroup';
|
|
3
3
|
export { SidebarItem } from './components/SidebarItem';
|
|
4
|
+
export { sidebarItemContainsId } from './Sidebar.utils';
|
|
4
5
|
export * from './Sidebar.types';
|
|
5
6
|
export * from './Sidebar.const';
|