@bodynarf/react.components 1.13.8 → 1.14.1

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.
Files changed (132) hide show
  1. package/changelog.md +55 -0
  2. package/components/accordion/component/index.js +1 -1
  3. package/components/accordion/component/style.css +21 -0
  4. package/components/anchor/component/style.css +12 -0
  5. package/components/button/component/style.css +10 -0
  6. package/components/dropdown/component/style.css +101 -0
  7. package/components/dropdown/components/compact/index.d.ts.map +1 -1
  8. package/components/dropdown/components/compact/index.js +3 -3
  9. package/components/dropdown/components/label/components/empty/index.js +1 -1
  10. package/components/dropdown/components/label/components/withSearch/style.css +21 -0
  11. package/components/dropdown/types.d.ts +6 -6
  12. package/components/dropdown/types.d.ts.map +1 -1
  13. package/components/file/component/styles.css +74 -0
  14. package/components/icon/component/style.css +19 -0
  15. package/components/index.d.ts +14 -2
  16. package/components/index.d.ts.map +1 -1
  17. package/components/index.js +14 -2
  18. package/components/modal/component/index.d.ts +7 -0
  19. package/components/modal/component/index.d.ts.map +1 -0
  20. package/components/modal/component/index.js +42 -0
  21. package/components/modal/component/style.css +32 -0
  22. package/components/modal/component/style.scss +42 -0
  23. package/components/modal/index.d.ts +3 -0
  24. package/components/modal/index.d.ts.map +1 -0
  25. package/components/modal/index.js +2 -0
  26. package/components/modal/types.d.ts +44 -0
  27. package/components/modal/types.d.ts.map +1 -0
  28. package/components/modal/types.js +1 -0
  29. package/components/multiselect/component/style.css +20 -0
  30. package/components/multiselect/components/withoutLabel/index.d.ts.map +1 -1
  31. package/components/multiselect/components/withoutLabel/index.js +5 -5
  32. package/components/primitives/checkbox/component/style.css +19 -0
  33. package/components/primitives/color/component/style.css +15 -0
  34. package/components/primitives/date/component/style.css +9 -0
  35. package/components/primitives/index.d.ts +4 -0
  36. package/components/primitives/index.d.ts.map +1 -1
  37. package/components/primitives/index.js +4 -0
  38. package/components/primitives/internal/hint/style.css +4 -0
  39. package/components/primitives/number/components/withLabel/index.d.ts.map +1 -1
  40. package/components/primitives/number/components/withLabel/index.js +10 -2
  41. package/components/primitives/number/components/withoutLabel/index.d.ts.map +1 -1
  42. package/components/primitives/number/components/withoutLabel/index.js +12 -4
  43. package/components/primitives/number/types.d.ts +6 -0
  44. package/components/primitives/number/types.d.ts.map +1 -1
  45. package/components/primitives/password/component/style.css +10 -0
  46. package/components/primitives/radioGroup/component/index.d.ts +7 -0
  47. package/components/primitives/radioGroup/component/index.d.ts.map +1 -0
  48. package/components/primitives/radioGroup/component/index.js +42 -0
  49. package/components/primitives/radioGroup/component/style.css +382 -0
  50. package/components/primitives/radioGroup/component/style.scss +271 -0
  51. package/components/primitives/radioGroup/index.d.ts +3 -0
  52. package/components/primitives/radioGroup/index.d.ts.map +1 -0
  53. package/components/primitives/radioGroup/index.js +2 -0
  54. package/components/primitives/radioGroup/types.d.ts +61 -0
  55. package/components/primitives/radioGroup/types.d.ts.map +1 -0
  56. package/components/primitives/radioGroup/types.js +1 -0
  57. package/components/primitives/slider/component/index.d.ts +7 -0
  58. package/components/primitives/slider/component/index.d.ts.map +1 -0
  59. package/components/primitives/slider/component/index.js +47 -0
  60. package/components/primitives/slider/component/style.css +438 -0
  61. package/components/primitives/slider/component/style.scss +321 -0
  62. package/components/primitives/slider/index.d.ts +3 -0
  63. package/components/primitives/slider/index.d.ts.map +1 -0
  64. package/components/primitives/slider/index.js +2 -0
  65. package/components/primitives/slider/types.d.ts +51 -0
  66. package/components/primitives/slider/types.d.ts.map +1 -0
  67. package/components/primitives/slider/types.js +1 -0
  68. package/components/primitives/switch/component/index.d.ts +7 -0
  69. package/components/primitives/switch/component/index.d.ts.map +1 -0
  70. package/components/primitives/switch/component/index.js +39 -0
  71. package/components/primitives/switch/component/style.css +482 -0
  72. package/components/primitives/switch/component/style.scss +216 -0
  73. package/components/primitives/switch/index.d.ts +3 -0
  74. package/components/primitives/switch/index.d.ts.map +1 -0
  75. package/components/primitives/switch/index.js +2 -0
  76. package/components/primitives/switch/types.d.ts +23 -0
  77. package/components/primitives/switch/types.d.ts.map +1 -0
  78. package/components/primitives/switch/types.js +1 -0
  79. package/components/primitives/timePicker/component/index.d.ts +8 -0
  80. package/components/primitives/timePicker/component/index.d.ts.map +1 -0
  81. package/components/primitives/timePicker/component/index.js +65 -0
  82. package/components/primitives/timePicker/component/style.css +21 -0
  83. package/components/primitives/timePicker/component/style.scss +26 -0
  84. package/components/primitives/timePicker/index.d.ts +3 -0
  85. package/components/primitives/timePicker/index.d.ts.map +1 -0
  86. package/components/primitives/timePicker/index.js +2 -0
  87. package/components/primitives/timePicker/types.d.ts +33 -0
  88. package/components/primitives/timePicker/types.d.ts.map +1 -0
  89. package/components/primitives/timePicker/types.js +1 -0
  90. package/components/progress/component/style.css +167 -0
  91. package/components/search/component/index.d.ts.map +1 -1
  92. package/components/search/component/index.js +9 -3
  93. package/components/search/component/style.css +18 -0
  94. package/components/search/types.d.ts +5 -0
  95. package/components/search/types.d.ts.map +1 -1
  96. package/components/stepper/component/index.d.ts +7 -0
  97. package/components/stepper/component/index.d.ts.map +1 -0
  98. package/components/stepper/component/index.js +56 -0
  99. package/components/stepper/component/style.css +510 -0
  100. package/components/stepper/component/style.scss +432 -0
  101. package/components/stepper/index.d.ts +3 -0
  102. package/components/stepper/index.d.ts.map +1 -0
  103. package/components/stepper/index.js +2 -0
  104. package/components/stepper/types.d.ts +65 -0
  105. package/components/stepper/types.d.ts.map +1 -0
  106. package/components/stepper/types.js +1 -0
  107. package/components/table/component/style.css +14 -0
  108. package/components/tabs/component/style.css +6 -0
  109. package/components/tag/component/style.css +19 -0
  110. package/components/timeline/component/index.d.ts +7 -0
  111. package/components/timeline/component/index.d.ts.map +1 -0
  112. package/components/timeline/component/index.js +36 -0
  113. package/components/timeline/component/style.css +488 -0
  114. package/components/timeline/component/style.scss +397 -0
  115. package/components/timeline/index.d.ts +3 -0
  116. package/components/timeline/index.d.ts.map +1 -0
  117. package/components/timeline/index.js +2 -0
  118. package/components/timeline/types.d.ts +55 -0
  119. package/components/timeline/types.d.ts.map +1 -0
  120. package/components/timeline/types.js +1 -0
  121. package/components/tooltip/component/index.d.ts +6 -0
  122. package/components/tooltip/component/index.d.ts.map +1 -0
  123. package/components/tooltip/component/index.js +80 -0
  124. package/components/tooltip/index.d.ts +3 -0
  125. package/components/tooltip/index.d.ts.map +1 -0
  126. package/components/tooltip/index.js +2 -0
  127. package/components/tooltip/types.d.ts +31 -0
  128. package/components/tooltip/types.d.ts.map +1 -0
  129. package/components/tooltip/types.js +1 -0
  130. package/package.json +10 -3
  131. package/readme.md +18 -3
  132. package/tsconfig.tsbuildinfo +1 -1
package/changelog.md CHANGED
@@ -1,6 +1,61 @@
1
1
  # Change log
2
2
  All changes will be published here in reverse chronological order
3
3
 
4
+ ## v1.3.0 (v1.13.0)
5
+ - **ModalWrapper** *(new)*
6
+ - Added new modal window wrapper component based on Bulma modal.
7
+ - Supports `title`, `size`, `className`, `data` props.
8
+ - Action buttons in footer via `actions` prop (array of ButtonProps).
9
+ - Close behavior options: `showCloseButton`, `closeOnBackgroundClick`, `closeOnEscape`.
10
+ - Keyboard support: close on Escape, optional `onEnterPress` handler.
11
+
12
+ - **Number**
13
+ - Added the `resetToDefaultOnBlur` prop: when enabled, resets the value to `defaultValue` (or `0` if not specified) on focus out if the field is empty.
14
+
15
+ - **Search**
16
+ - Added optional search icon (magnifying glass) via `showIcon` prop. Icon size matches the input field size.
17
+
18
+ - **Switch** *(new)*
19
+ - Added new toggle/switch component with Bulma styling.
20
+ - Supports `size`, `style` (color), `label`, `name`, `onValueChange`, `defaultValue`, `className` props.
21
+ - Additional style options: `rounded` (pill shape), `outlined`, `thin`, `rtl` (right-to-left mode).
22
+ - Supports form label mode via `isFormLabel` prop.
23
+
24
+ - **Slider** *(new)*
25
+ - Added new range/slider component with Bulma styling.
26
+ - Supports `min`, `max`, `step`, `size`, `style` (color), `defaultValue`, `onValueChange`, `className` props.
27
+ - Additional options: `showValue` (tooltip with current value), `showMinMax` (min/max labels), `showProgress` (filled track).
28
+ - Supports vertical mode via `vertical` prop with configurable height.
29
+ - Circle style thumb available via `circle` prop.
30
+
31
+ - **RadioGroup** *(new)*
32
+ - Added new radio group component for single selection from multiple options.
33
+ - Supports `items`, `value`, `onValueChange`, `size`, `style` (color), `name`, `className` props.
34
+ - Additional style options: `horizontal` (row layout), `block` (filled background), `circle`, `withoutBorder`, `hasBackgroundColor`.
35
+ - Each item can be individually disabled.
36
+
37
+ - **Stepper** *(new)*
38
+ - Added new stepper/progress indicator component for multi-step workflows.
39
+ - Supports `steps`, `currentStep`, `size`, `color`, `className` props.
40
+ - Additional options: `vertical` (vertical layout), `showNumbers` (step numbers vs checkmarks), `showConnectors` (lines between steps), `animated` (connector animations).
41
+ - Clickable steps support via `clickable` and `onStepClick` props for navigating to completed steps.
42
+ - Each step can have a title, description, and optional custom icon.
43
+
44
+ - **Timeline** *(new)*
45
+ - Added new timeline component for displaying chronological events.
46
+ - Supports `items`, `size`, `color`, `className` props.
47
+ - Layout options: `leftAligned` (default, markers on left) or centered mode with alternating content.
48
+ - Additional options: `showConnectors`, `animated` (fade-in animation), `hollow` (outlined markers).
49
+ - Supports `showTimestampsSeparate` for displaying timestamps on opposite side in centered mode.
50
+ - Each item can have title, content, timestamp, icon, marker, and individual color override.
51
+
52
+ - **TimePicker** *(new)*
53
+ - Added new time input component for hours/minutes/seconds selection.
54
+ - Supports `defaultValue`, `onValueChange`, `size`, `style`, `name`, `className` props.
55
+ - Time value represented as object with `hours`, `minutes`, and optional `seconds` fields.
56
+ - Additional options: `showSeconds` (enable seconds input), `step` (value increment in seconds), `min`, `max` (time range limits).
57
+ - Supports all standard input features: `rounded`, `loading`, `disabled`, `readonly`, validation states, labels, and hints.
58
+
4
59
  ## v1.2.0
5
60
  - **Accordion**
6
61
  - Fixed an issue where the height changed incorrectly when the component’s `size` prop was updated.
@@ -7,9 +7,9 @@ import Icon from "../../icon";
7
7
  import "./style.scss";
8
8
  /** Accordion panel */
9
9
  const Accordion = ({ children, caption, style, size = ElementSize.Normal, defaultExpanded = false, onToggle = emptyFn, className, title, data, }) => {
10
- const expandablePanelRef = useRef(null);
11
10
  const [isExpanded, setIsExpanded] = useState(defaultExpanded);
12
11
  const [maxHeight, setMaxHeight] = useState(defaultExpanded ? undefined : 0);
12
+ const expandablePanelRef = useRef(null);
13
13
  const toggleCollapse = useCallback(() => setMaxHeight(isExpanded ? 0 : expandablePanelRef.current.scrollHeight), [isExpanded]);
14
14
  useEffect(() => {
15
15
  if (defaultExpanded && isNotNullish(expandablePanelRef.current)) {
@@ -0,0 +1,21 @@
1
+ .bbr-accordion .message-header {
2
+ cursor: pointer;
3
+ }
4
+ .bbr-accordion .message-header .bbr-icon {
5
+ transition: transform 0.125s ease-in-out;
6
+ }
7
+ .bbr-accordion .message-body {
8
+ color: black !important;
9
+ transition: max-height 0.2s ease-out;
10
+ overflow-y: inherit;
11
+ padding: 0 1.5em;
12
+ }
13
+ .bbr-accordion .message-body__content {
14
+ padding: 1.25em 0;
15
+ }
16
+ .bbr-accordion[aria-expanded=true] .message-header i {
17
+ transform: rotate(180deg);
18
+ }
19
+ .bbr-accordion[aria-expanded=false] .message-body {
20
+ overflow-y: hidden;
21
+ }
@@ -0,0 +1,12 @@
1
+ .bbr-anchor {
2
+ text-decoration: none;
3
+ color: inherit;
4
+ transition: 0.15s ease-in-out color;
5
+ }
6
+ .bbr-anchor:not(.bbr-anchor--unhoverable):hover {
7
+ text-decoration: underline;
8
+ color: #3273dc;
9
+ }
10
+ .bbr-anchor .bbr-icon {
11
+ transition: none;
12
+ }
@@ -0,0 +1,10 @@
1
+ .bbr-button {
2
+ transition: 0.15s ease-in-out;
3
+ transition-property: background-color, border-color;
4
+ }
5
+ .bbr-button--icon-only {
6
+ padding: 0.55rem !important;
7
+ }
8
+ .bbr-button.is-warning.is-outlined:not([disabled]):hover {
9
+ color: #000 !important;
10
+ }
@@ -0,0 +1,101 @@
1
+ .bbr-dropdown {
2
+ min-width: 7.5rem;
3
+ }
4
+ .bbr-dropdown:not(.bbr-dropdown--compact) {
5
+ display: block;
6
+ }
7
+ .bbr-dropdown:not(.bbr-dropdown--compact) .dropdown-menu {
8
+ min-width: 100%;
9
+ }
10
+ .bbr-dropdown .dropdown-menu .dropdown-content {
11
+ overflow: auto;
12
+ }
13
+ .bbr-dropdown .bbr-dropdown__label {
14
+ cursor: pointer;
15
+ user-select: none;
16
+ display: flex;
17
+ justify-content: flex-start;
18
+ }
19
+ .bbr-dropdown .bbr-dropdown__label span {
20
+ white-space: nowrap;
21
+ text-overflow: ellipsis;
22
+ overflow-x: hidden;
23
+ max-width: 15rem;
24
+ }
25
+ .bbr-dropdown .bbr-dropdown__label--default span {
26
+ color: gray;
27
+ font-style: italic;
28
+ }
29
+ .bbr-dropdown .bbr-dropdown__label .bbr-icon:not(.bbr-dropdown-item__icon):hover {
30
+ color: #0d6efd;
31
+ }
32
+ .bbr-dropdown .bbr-dropdown__label .bbr-icon:not(.bbr-dropdown-item__icon).bi-arrow-down {
33
+ margin-left: auto;
34
+ }
35
+ .bbr-dropdown .bbr-dropdown__label .bbr-icon:not(.bbr-dropdown-item__icon).bi-arrow-down::before {
36
+ transition: 0.25s ease-in-out transform;
37
+ }
38
+ .bbr-dropdown .bbr-dropdown__label .bbr-icon:not(.bbr-dropdown-item__icon).bi-plus-lg::before {
39
+ transform: rotate(45deg);
40
+ }
41
+ .bbr-dropdown .bbr-dropdown__label.is-success--md {
42
+ border-color: #48c78e;
43
+ }
44
+ .bbr-dropdown .bbr-dropdown__label.is-danger--md {
45
+ border-color: #f14668;
46
+ }
47
+ .bbr-dropdown-item {
48
+ cursor: pointer;
49
+ user-select: none;
50
+ white-space: normal;
51
+ transition: 0.25s ease-in-out;
52
+ transition-property: color, background-color;
53
+ }
54
+ .bbr-dropdown-item:hover {
55
+ background-color: rgba(0, 0, 0, 0.05);
56
+ color: #0a0a0a;
57
+ }
58
+ .bbr-dropdown-item:active {
59
+ background-color: rgba(0, 0, 0, 0.15);
60
+ color: #0a0a0a;
61
+ }
62
+ .bbr-dropdown-item.is-active {
63
+ background-color: #485fc7;
64
+ color: #fff;
65
+ }
66
+ .bbr-dropdown-item__icon {
67
+ padding-left: 0.05rem;
68
+ }
69
+ .bbr-dropdown.is-active .bbr-dropdown__label .bbr-icon.bi-arrow-down::before {
70
+ transform: rotate(180deg);
71
+ }
72
+ .bbr-dropdown.is-up .dropdown-menu {
73
+ top: auto;
74
+ bottom: 100%;
75
+ }
76
+ .bbr-dropdown.is-up.is-active .bbr-dropdown__label .bbr-icon.bi-arrow-down::before {
77
+ transform: rotate(360deg);
78
+ }
79
+ .bbr-dropdown--height-default .dropdown-menu .dropdown-content {
80
+ max-height: 15vw;
81
+ }
82
+ .bbr-dropdown--compact {
83
+ width: fit-content;
84
+ }
85
+ .bbr-dropdown--compact .dropdown-menu {
86
+ min-width: 11.75rem;
87
+ }
88
+ .bbr-dropdown--disabled .bbr-dropdown__label {
89
+ background-color: hsl(0, 0%, 96%);
90
+ border-color: hsl(0, 0%, 96%);
91
+ box-shadow: none;
92
+ color: hsl(0, 0%, 48%);
93
+ cursor: not-allowed;
94
+ }
95
+ .bbr-dropdown--disabled .bbr-dropdown__label .bbr-icon {
96
+ pointer-events: none;
97
+ }
98
+ .bbr-dropdown--disabled .bbr-dropdown__label:hover {
99
+ border-color: hsl(0, 0%, 96%);
100
+ color: hsl(0, 0%, 48%);
101
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/compact/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,EAAE,EAAmB,MAAM,OAAO,CAAC;AAQtF,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,sCAAsC;AACtC,KAAK,oBAAoB,GAAG,aAAa,GAAG;IACxC,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,uCAAuC;AACvC,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2L7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dropdown/components/compact/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,EAAE,EAAmB,MAAM,OAAO,CAAC;AAQtF,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,sCAAsC;AACtC,KAAK,oBAAoB,GAAG,aAAa,GAAG;IACxC,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,uCAAuC;AACvC,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA0L7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -8,12 +8,12 @@ import DropdownItem from "../../components/item";
8
8
  import DropdownLabel from "../../components/label";
9
9
  /** Dropdown component without label */
10
10
  const DropdownCompact = ({ items, value, onSelect, hideOnOuterClick = true, listMaxHeight, placeholder = "", noDataText = "No items found", noDataByQuery = "No items found by specified search", compact = false, disabled = false, deselectable = false, searchable = false, validationState, className, title, data, hint, id: propsId, }) => {
11
- const generatedId = useId();
12
- const id = propsId ?? generatedId;
13
- const containerRef = useRef(null);
14
11
  const [isListVisible, setListVisible] = useState(false);
15
12
  const [searchValue, setSearchValue] = useState("");
16
13
  const [isOpenUp, setIsOpenUp] = useState(false);
14
+ const generatedId = useId();
15
+ const id = propsId ?? generatedId;
16
+ const containerRef = useRef(null);
17
17
  const filteredItems = useMemo(() => items.filter(({ displayValue }) => displayValue.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase())), [items, searchValue]);
18
18
  const onItemClick = useCallback((event) => {
19
19
  if (disabled) {
@@ -11,6 +11,6 @@ const EmptyLabel = ({ caption, onClick, className, }) => {
11
11
  isNullOrEmpty(className) ? "" : `${className}--md`,
12
12
  "bbr-dropdown__label--default",
13
13
  ]);
14
- return (_jsxs("label", { className: elClassName, onClick: onClick, children: [_jsx("span", { className: "mr-2", children: caption }), _jsx(Icon, { name: "arrow-down", size: ElementSize.Medium })] }));
14
+ return (_jsxs("label", { onClick: onClick, className: elClassName, children: [_jsx("span", { className: "mr-2", children: caption }), _jsx(Icon, { name: "arrow-down", size: ElementSize.Medium })] }));
15
15
  };
16
16
  export default EmptyLabel;
@@ -0,0 +1,21 @@
1
+ .bbr-dropdown__search input {
2
+ border-left: 0;
3
+ border-right: 0;
4
+ border-radius: 0;
5
+ box-shadow: none !important;
6
+ background: transparent;
7
+ }
8
+ .bbr-dropdown__search input::-webkit-input-placeholder {
9
+ color: gray;
10
+ font-style: italic;
11
+ }
12
+ .bbr-dropdown__search input:focus, .bbr-dropdown__search input:hover, .bbr-dropdown__search input:active {
13
+ border-color: inherit !important;
14
+ }
15
+ .bbr-dropdown__search:hover input {
16
+ border-color: inherit !important;
17
+ }
18
+
19
+ .bbr-dropdown.is-active .bbr-dropdown__search {
20
+ background: rgba(0, 0, 0, 0.05);
21
+ }
@@ -17,17 +17,13 @@ export interface SelectableItem {
17
17
  export interface DropdownProps extends BaseElementProps {
18
18
  /** Items which can be selected */
19
19
  items: Array<SelectableItem>;
20
- /**
21
- * Action to update selected value, which stored outside
22
- */
23
- onSelect: (item?: SelectableItem) => void;
24
- /** Input element placeholder */
25
- placeholder?: string;
26
20
  /**
27
21
  * Selected value.
28
22
  * Must be stored outside
29
23
  */
30
24
  value: Optional<SelectableItem>;
25
+ /** Input element placeholder */
26
+ placeholder?: string;
31
27
  /** Hide component list when its opened and user click outside */
32
28
  hideOnOuterClick?: boolean;
33
29
  /** Can user deselect */
@@ -62,5 +58,9 @@ export interface DropdownProps extends BaseElementProps {
62
58
  * Text which would be displayed when search query applied and no items found
63
59
  */
64
60
  noDataByQuery?: string;
61
+ /**
62
+ * Action to update selected value, which stored outside
63
+ */
64
+ onSelect: (item?: SelectableItem) => void;
65
65
  }
66
66
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/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ElC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAEzB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;MAEE;IACF,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC7C"}
@@ -0,0 +1,74 @@
1
+ .bbr-fileUpload.has-name .file-clear {
2
+ display: flex;
3
+ align-items: center;
4
+ cursor: pointer;
5
+ z-index: 2;
6
+ }
7
+ .bbr-fileUpload.has-name .file-clear:hover {
8
+ color: #0d6efd;
9
+ }
10
+ .bbr-fileUpload.has-name:not(.is-right).is-small .file-name {
11
+ padding-right: 1.5rem;
12
+ }
13
+ .bbr-fileUpload.has-name:not(.is-right).is-small .file-clear {
14
+ margin-left: -1.25rem;
15
+ }
16
+ .bbr-fileUpload.has-name:not(.is-right).is-medium .file-name {
17
+ padding-right: 2rem;
18
+ }
19
+ .bbr-fileUpload.has-name:not(.is-right).is-medium .file-clear {
20
+ margin-left: -1.75rem;
21
+ }
22
+ .bbr-fileUpload.has-name:not(.is-right).is-large .file-name {
23
+ padding-right: 2.75rem;
24
+ }
25
+ .bbr-fileUpload.has-name:not(.is-right).is-large .file-clear {
26
+ margin-left: -2.5rem;
27
+ }
28
+ .bbr-fileUpload.has-name:not(.is-right):not(.is-small):not(.is-medium):not(.is-large) .file-name {
29
+ padding-right: 1.75rem;
30
+ max-width: 17rem;
31
+ }
32
+ .bbr-fileUpload.has-name:not(.is-right):not(.is-small):not(.is-medium):not(.is-large) .file-clear {
33
+ margin-left: -1.5rem;
34
+ }
35
+ .bbr-fileUpload.has-name.is-right.is-small .file-name {
36
+ padding-left: 1.5rem;
37
+ }
38
+ .bbr-fileUpload.has-name.is-right.is-small .file-clear {
39
+ margin-right: -1.25rem;
40
+ }
41
+ .bbr-fileUpload.has-name.is-right.is-medium .file-name {
42
+ padding-left: 2rem;
43
+ }
44
+ .bbr-fileUpload.has-name.is-right.is-medium .file-clear {
45
+ margin-right: -1.75rem;
46
+ }
47
+ .bbr-fileUpload.has-name.is-right.is-large .file-name {
48
+ padding-left: 2.75rem;
49
+ }
50
+ .bbr-fileUpload.has-name.is-right.is-large .file-clear {
51
+ margin-right: -2.5rem;
52
+ }
53
+ .bbr-fileUpload.has-name.is-right:not(.is-small):not(.is-medium):not(.is-large) .file-name {
54
+ padding-left: 1.75rem;
55
+ max-width: 17rem;
56
+ }
57
+ .bbr-fileUpload.has-name.is-right:not(.is-small):not(.is-medium):not(.is-large) .file-clear {
58
+ margin-right: -1.5rem;
59
+ }
60
+ .bbr-fileUpload.has-name.is-boxed .file-clear {
61
+ align-items: end;
62
+ padding-bottom: 0.75rem;
63
+ }
64
+ .bbr-fileUpload.is-disabled .file-label {
65
+ background-color: hsl(0, 0%, 96%);
66
+ border-color: hsl(0, 0%, 86%);
67
+ color: hsl(0, 0%, 48%);
68
+ box-shadow: none;
69
+ cursor: not-allowed;
70
+ }
71
+ .bbr-fileUpload.is-disabled .file-label .file-cta {
72
+ background-color: inherit;
73
+ color: inherit;
74
+ }
@@ -0,0 +1,19 @@
1
+ .bbr-icon {
2
+ transition: 0.15s ease-in-out color;
3
+ font-size: 1rem;
4
+ }
5
+ .bbr-icon.is-small {
6
+ font-size: 0.85rem;
7
+ }
8
+ .bbr-icon.is-medium {
9
+ font-size: 1.25rem;
10
+ }
11
+ .bbr-icon.is-large {
12
+ font-size: 2rem;
13
+ }
14
+ .bbr-icon--right {
15
+ margin-left: 0.5rem;
16
+ }
17
+ .bbr-icon--left {
18
+ margin-right: 0.5rem;
19
+ }
@@ -1,7 +1,5 @@
1
1
  export { default as Accordion } from "./accordion";
2
2
  export * from "./accordion";
3
- export { default as Anchor } from "./anchor";
4
- export * from "./anchor";
5
3
  export { default as Breadcrumbs } from "./breadcrumbs";
6
4
  export * from "./breadcrumbs";
7
5
  export { default as Button } from "./button";
@@ -12,18 +10,24 @@ export { default as File } from "./file";
12
10
  export * from "./file";
13
11
  export { default as Icon } from "./icon";
14
12
  export * from "./icon";
13
+ export { default as ModalWrapper } from "./modal";
14
+ export * from "./modal";
15
15
  export { default as Multiselect } from "./multiselect";
16
16
  export * from "./multiselect";
17
17
  export { default as Paginator } from "./paginator";
18
18
  export * from "./paginator";
19
19
  export { default as Search } from "./search";
20
20
  export * from "./search";
21
+ export { default as Stepper } from "./stepper";
22
+ export * from "./stepper";
21
23
  export { default as Table } from "./table";
22
24
  export * from "./table";
23
25
  export { default as Tabs } from "./tabs";
24
26
  export * from "./tabs";
25
27
  export { default as Tag } from "./tag";
26
28
  export * from "./tag";
29
+ export { default as Timeline } from "./timeline";
30
+ export * from "./timeline";
27
31
  export { default as Progress } from "./progress";
28
32
  export * from "./progress";
29
33
  export { default as Checkbox } from "./primitives/checkbox";
@@ -38,6 +42,14 @@ export { default as NumberInput } from "./primitives/number";
38
42
  export * from "./primitives/number";
39
43
  export { default as Password } from "./primitives/password";
40
44
  export * from "./primitives/password";
45
+ export { default as RadioGroup } from "./primitives/radioGroup";
46
+ export * from "./primitives/radioGroup";
47
+ export { default as Slider } from "./primitives/slider";
48
+ export * from "./primitives/slider";
49
+ export { default as Switch } from "./primitives/switch";
50
+ export * from "./primitives/switch";
41
51
  export { default as Text } from "./primitives/text";
42
52
  export * from "./primitives/text";
53
+ export { default as TimePicker } from "./primitives/timePicker";
54
+ export * from "./primitives/timePicker";
43
55
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,cAAc,UAAU,CAAC;AAEzB,O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AAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,yBAAyB,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,yBAAyB,CAAC"}
@@ -1,7 +1,5 @@
1
1
  export { default as Accordion } from "./accordion";
2
2
  export * from "./accordion";
3
- export { default as Anchor } from "./anchor";
4
- export * from "./anchor";
5
3
  export { default as Breadcrumbs } from "./breadcrumbs";
6
4
  export * from "./breadcrumbs";
7
5
  export { default as Button } from "./button";
@@ -12,18 +10,24 @@ export { default as File } from "./file";
12
10
  export * from "./file";
13
11
  export { default as Icon } from "./icon";
14
12
  export * from "./icon";
13
+ export { default as ModalWrapper } from "./modal";
14
+ export * from "./modal";
15
15
  export { default as Multiselect } from "./multiselect";
16
16
  export * from "./multiselect";
17
17
  export { default as Paginator } from "./paginator";
18
18
  export * from "./paginator";
19
19
  export { default as Search } from "./search";
20
20
  export * from "./search";
21
+ export { default as Stepper } from "./stepper";
22
+ export * from "./stepper";
21
23
  export { default as Table } from "./table";
22
24
  export * from "./table";
23
25
  export { default as Tabs } from "./tabs";
24
26
  export * from "./tabs";
25
27
  export { default as Tag } from "./tag";
26
28
  export * from "./tag";
29
+ export { default as Timeline } from "./timeline";
30
+ export * from "./timeline";
27
31
  // Progress/Loader component
28
32
  export { default as Progress } from "./progress";
29
33
  export * from "./progress";
@@ -40,5 +44,13 @@ export { default as NumberInput } from "./primitives/number";
40
44
  export * from "./primitives/number";
41
45
  export { default as Password } from "./primitives/password";
42
46
  export * from "./primitives/password";
47
+ export { default as RadioGroup } from "./primitives/radioGroup";
48
+ export * from "./primitives/radioGroup";
49
+ export { default as Slider } from "./primitives/slider";
50
+ export * from "./primitives/slider";
51
+ export { default as Switch } from "./primitives/switch";
52
+ export * from "./primitives/switch";
43
53
  export { default as Text } from "./primitives/text";
44
54
  export * from "./primitives/text";
55
+ export { default as TimePicker } from "./primitives/timePicker";
56
+ export * from "./primitives/timePicker";
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import "./style.scss";
3
+ import { ModalWrapperProps } from "..";
4
+ /** Modal window wrapper component */
5
+ declare const ModalWrapper: FC<ModalWrapperProps>;
6
+ export default ModalWrapper;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA0B,MAAM,OAAO,CAAC;AAQnD,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAEvC,qCAAqC;AACrC,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA6FvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect } from "react";
3
+ import { getClassName, isNotNullish, isNotNullOrEmpty } from "@bodynarf/utils";
4
+ import { ElementSize } from "../../../types";
5
+ import { getSizeClassName, mapDataAttributes } from "../../../utils";
6
+ import Button from "../../button";
7
+ import "./style.scss";
8
+ /** Modal window wrapper component */
9
+ const ModalWrapper = ({ children, actions, onCloseClick, title, size = ElementSize.Normal, showCloseButton = true, closeOnBackgroundClick = true, closeOnEscape = true, onEnterPress, className, data, }) => {
10
+ const onBackgroundClick = useCallback(() => {
11
+ if (closeOnBackgroundClick) {
12
+ onCloseClick();
13
+ }
14
+ }, [closeOnBackgroundClick, onCloseClick]);
15
+ useEffect(() => {
16
+ const handleKeyDown = (event) => {
17
+ if (event.key === "Escape" && closeOnEscape) {
18
+ onCloseClick();
19
+ }
20
+ else if (event.key === "Enter" && isNotNullish(onEnterPress)) {
21
+ onEnterPress();
22
+ }
23
+ };
24
+ document.addEventListener("keydown", handleKeyDown);
25
+ return () => {
26
+ document.removeEventListener("keydown", handleKeyDown);
27
+ };
28
+ }, [closeOnEscape, onCloseClick, onEnterPress]);
29
+ const elClassName = getClassName([
30
+ "bbr-modal",
31
+ "modal",
32
+ "is-active",
33
+ getSizeClassName(size),
34
+ className,
35
+ ]);
36
+ const dataAttributes = mapDataAttributes(data);
37
+ const hasTitle = isNotNullOrEmpty(title);
38
+ const hasHeader = hasTitle || showCloseButton;
39
+ const hasActions = actions.length > 0;
40
+ return (_jsxs("div", { ...dataAttributes, className: elClassName, children: [_jsx("div", { onClick: onBackgroundClick, className: "modal-background" }), _jsxs("div", { className: "modal-card", children: [!!hasHeader && (_jsxs("header", { className: "modal-card-head", children: [!!hasTitle && (_jsx("p", { className: "modal-card-title", children: title })), !!showCloseButton && (_jsx("button", { type: "button", className: "delete", "aria-label": "close", onClick: onCloseClick }))] })), _jsx("section", { className: "modal-card-body", children: children }), !!hasActions && (_jsx("footer", { className: "modal-card-foot", children: actions.map((buttonProps) => (_jsx(Button, { ...buttonProps }, buttonProps.caption ?? buttonProps.icon?.className))) }))] })] }));
41
+ };
42
+ export default ModalWrapper;
@@ -0,0 +1,32 @@
1
+ .bbr-modal.modal {
2
+ z-index: 1000;
3
+ }
4
+ .bbr-modal.modal .modal-card {
5
+ max-height: calc(100vh - 40px);
6
+ width: auto;
7
+ min-width: 300px;
8
+ max-width: calc(100vw - 40px);
9
+ }
10
+ .bbr-modal.modal .modal-card-head {
11
+ border-bottom: 1px solid #dbdbdb;
12
+ }
13
+ .bbr-modal.modal .modal-card-foot {
14
+ border-top: 1px solid #dbdbdb;
15
+ justify-content: flex-end;
16
+ gap: 0.5rem;
17
+ }
18
+ .bbr-modal.modal .modal-card-body {
19
+ overflow-y: auto;
20
+ }
21
+ .bbr-modal.modal.is-small .modal-card {
22
+ min-width: 250px;
23
+ max-width: 400px;
24
+ }
25
+ .bbr-modal.modal.is-medium .modal-card {
26
+ min-width: 400px;
27
+ max-width: 640px;
28
+ }
29
+ .bbr-modal.modal.is-large .modal-card {
30
+ min-width: 600px;
31
+ max-width: 960px;
32
+ }
@@ -0,0 +1,42 @@
1
+ .bbr-modal {
2
+ &.modal {
3
+ z-index: 1000;
4
+
5
+ .modal-card {
6
+ max-height: calc(100vh - 40px);
7
+ width: auto;
8
+ min-width: 300px;
9
+ max-width: calc(100vw - 40px);
10
+ }
11
+
12
+ .modal-card-head {
13
+ border-bottom: 1px solid #dbdbdb;
14
+ }
15
+
16
+ .modal-card-foot {
17
+ border-top: 1px solid #dbdbdb;
18
+ justify-content: flex-end;
19
+ gap: 0.5rem;
20
+ }
21
+
22
+ .modal-card-body {
23
+ overflow-y: auto;
24
+ }
25
+
26
+ // Size modifiers
27
+ &.is-small .modal-card {
28
+ min-width: 250px;
29
+ max-width: 400px;
30
+ }
31
+
32
+ &.is-medium .modal-card {
33
+ min-width: 400px;
34
+ max-width: 640px;
35
+ }
36
+
37
+ &.is-large .modal-card {
38
+ min-width: 600px;
39
+ max-width: 960px;
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,3 @@
1
+ export { default } from "./component";
2
+ export * from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./component";
2
+ export * from "./types";