@semcore/pills 5.43.0 → 5.43.1-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/Pills.js +13 -13
- package/lib/es6/Pills.js +13 -13
- package/lib/esm/Pills.mjs +84 -84
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [5.43.1] - 2025-03-17
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [5.41.0 ~> 5.41.1], `@semcore/neighbor-location` [4.40.0 ~> 4.40.1], `@semcore/utils` [4.48.0 ~> 4.48.1], `@semcore/core` [2.39.0 ~> 2.39.1]).
|
|
10
|
+
|
|
5
11
|
## [5.43.0] - 2025-03-14
|
|
6
12
|
|
|
7
13
|
### Added
|
package/lib/cjs/Pills.js
CHANGED
|
@@ -23,19 +23,19 @@ var _addonTextChildren = _interopRequireDefault(require("@semcore/utils/lib/addo
|
|
|
23
23
|
var _a11yEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/a11yEnhance"));
|
|
24
24
|
var _logger = _interopRequireDefault(require("@semcore/utils/lib/logger"));
|
|
25
25
|
/*__reshadow-styles__:"./style/pills.shadow.css"*/
|
|
26
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
27
|
-
"__SPills": "
|
|
28
|
-
"_keyboardFocused": "
|
|
29
|
-
"__SPill": "
|
|
30
|
-
"_selected": "
|
|
31
|
-
"__SText": "
|
|
32
|
-
"__SAddon": "
|
|
33
|
-
"_neighborLocation_right": "
|
|
34
|
-
"_neighborLocation_both": "
|
|
35
|
-
"_neighborLocation_left": "
|
|
36
|
-
"_disabled": "
|
|
37
|
-
"_size_m": "
|
|
38
|
-
"_size_l": "
|
|
26
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SPills_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;isolation:isolate;outline:0}.___SPills_15aj4_gg_.__keyboardFocused_15aj4_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SPill_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-control-rounded, 6px)}.___SPill_15aj4_gg_::-moz-focus-inner{border:0;padding:0}.___SPill_15aj4_gg_:active,.___SPill_15aj4_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPill_15aj4_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none;background:var(--intergalactic-bg-primary-neutral-hover, #f4f5f9)}}.___SPill_15aj4_gg_.__selected_15aj4_gg_{background:var(--intergalactic-control-secondary-info, rgba(0, 143, 248, 0.1));border-color:var(--intergalactic-border-info-active, #006dca);z-index:1}.___SPill_15aj4_gg_.__disabled_15aj4_gg_{cursor:default;pointer-events:none}.___SPill_15aj4_gg_.__disabled_15aj4_gg_>*{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SPill_15aj4_gg_.__keyboardFocused_15aj4_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SText_15aj4_gg_{color:var(--intergalactic-text-primary, #191b23);display:inline-flex}.___SAddon_15aj4_gg_{color:var(--intergalactic-text-secondary, #6c6e79);display:inline-flex;align-items:center;justify-content:center}.___SPill_15aj4_gg_._size_m_15aj4_gg_{height:var(--intergalactic-form-control-m, 28px);min-width:var(--intergalactic-form-control-m, 28px);font-size:var(--intergalactic-fs-200, 14px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_,.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SText_15aj4_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_{height:var(--intergalactic-form-control-l, 40px);min-width:var(--intergalactic-form-control-l, 40px);font-size:var(--intergalactic-fs-300, 16px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:only-child,.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-3x, 12px);margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._neighborLocation_right_15aj4_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SPill_15aj4_gg_._neighborLocation_both_15aj4_gg_{border-radius:0;margin-left:-1px}.___SPill_15aj4_gg_._neighborLocation_left_15aj4_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}" /*__inner_css_end__*/, "15aj4_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SPills": "___SPills_15aj4_gg_",
|
|
28
|
+
"_keyboardFocused": "__keyboardFocused_15aj4_gg_",
|
|
29
|
+
"__SPill": "___SPill_15aj4_gg_",
|
|
30
|
+
"_selected": "__selected_15aj4_gg_",
|
|
31
|
+
"__SText": "___SText_15aj4_gg_",
|
|
32
|
+
"__SAddon": "___SAddon_15aj4_gg_",
|
|
33
|
+
"_neighborLocation_right": "_neighborLocation_right_15aj4_gg_",
|
|
34
|
+
"_neighborLocation_both": "_neighborLocation_both_15aj4_gg_",
|
|
35
|
+
"_neighborLocation_left": "_neighborLocation_left_15aj4_gg_",
|
|
36
|
+
"_disabled": "__disabled_15aj4_gg_",
|
|
37
|
+
"_size_m": "_size_m_15aj4_gg_",
|
|
38
|
+
"_size_l": "_size_l_15aj4_gg_"
|
|
39
39
|
});
|
|
40
40
|
var optionsA11yEnhance = {
|
|
41
41
|
onNeighborChange: function onNeighborChange(neighborElement, props) {
|
package/lib/es6/Pills.js
CHANGED
|
@@ -19,19 +19,19 @@ import addonTextChildren from '@semcore/utils/lib/addonTextChildren';
|
|
|
19
19
|
import a11yEnhance from '@semcore/utils/lib/enhances/a11yEnhance';
|
|
20
20
|
import log from '@semcore/utils/lib/logger';
|
|
21
21
|
/*__reshadow-styles__:"./style/pills.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
23
|
-
"__SPills": "
|
|
24
|
-
"_keyboardFocused": "
|
|
25
|
-
"__SPill": "
|
|
26
|
-
"_selected": "
|
|
27
|
-
"__SText": "
|
|
28
|
-
"__SAddon": "
|
|
29
|
-
"_neighborLocation_right": "
|
|
30
|
-
"_neighborLocation_both": "
|
|
31
|
-
"_neighborLocation_left": "
|
|
32
|
-
"_disabled": "
|
|
33
|
-
"_size_m": "
|
|
34
|
-
"_size_l": "
|
|
22
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPills_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;isolation:isolate;outline:0}.___SPills_15aj4_gg_.__keyboardFocused_15aj4_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SPill_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-control-rounded, 6px)}.___SPill_15aj4_gg_::-moz-focus-inner{border:0;padding:0}.___SPill_15aj4_gg_:active,.___SPill_15aj4_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPill_15aj4_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none;background:var(--intergalactic-bg-primary-neutral-hover, #f4f5f9)}}.___SPill_15aj4_gg_.__selected_15aj4_gg_{background:var(--intergalactic-control-secondary-info, rgba(0, 143, 248, 0.1));border-color:var(--intergalactic-border-info-active, #006dca);z-index:1}.___SPill_15aj4_gg_.__disabled_15aj4_gg_{cursor:default;pointer-events:none}.___SPill_15aj4_gg_.__disabled_15aj4_gg_>*{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SPill_15aj4_gg_.__keyboardFocused_15aj4_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SText_15aj4_gg_{color:var(--intergalactic-text-primary, #191b23);display:inline-flex}.___SAddon_15aj4_gg_{color:var(--intergalactic-text-secondary, #6c6e79);display:inline-flex;align-items:center;justify-content:center}.___SPill_15aj4_gg_._size_m_15aj4_gg_{height:var(--intergalactic-form-control-m, 28px);min-width:var(--intergalactic-form-control-m, 28px);font-size:var(--intergalactic-fs-200, 14px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_,.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SText_15aj4_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_{height:var(--intergalactic-form-control-l, 40px);min-width:var(--intergalactic-form-control-l, 40px);font-size:var(--intergalactic-fs-300, 16px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:only-child,.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-3x, 12px);margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._neighborLocation_right_15aj4_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SPill_15aj4_gg_._neighborLocation_both_15aj4_gg_{border-radius:0;margin-left:-1px}.___SPill_15aj4_gg_._neighborLocation_left_15aj4_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}" /*__inner_css_end__*/, "15aj4_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SPills": "___SPills_15aj4_gg_",
|
|
24
|
+
"_keyboardFocused": "__keyboardFocused_15aj4_gg_",
|
|
25
|
+
"__SPill": "___SPill_15aj4_gg_",
|
|
26
|
+
"_selected": "__selected_15aj4_gg_",
|
|
27
|
+
"__SText": "___SText_15aj4_gg_",
|
|
28
|
+
"__SAddon": "___SAddon_15aj4_gg_",
|
|
29
|
+
"_neighborLocation_right": "_neighborLocation_right_15aj4_gg_",
|
|
30
|
+
"_neighborLocation_both": "_neighborLocation_both_15aj4_gg_",
|
|
31
|
+
"_neighborLocation_left": "_neighborLocation_left_15aj4_gg_",
|
|
32
|
+
"_disabled": "__disabled_15aj4_gg_",
|
|
33
|
+
"_size_m": "_size_m_15aj4_gg_",
|
|
34
|
+
"_size_l": "_size_l_15aj4_gg_"
|
|
35
35
|
});
|
|
36
36
|
var optionsA11yEnhance = {
|
|
37
37
|
onNeighborChange: function onNeighborChange(neighborElement, props) {
|
package/lib/esm/Pills.mjs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import
|
|
1
|
+
import f from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import k from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import w from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import v from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import L from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import A from "@babel/runtime/helpers/esm/createSuper";
|
|
7
7
|
import d from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
import { sstyled as
|
|
9
|
-
import
|
|
8
|
+
import { sstyled as C } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import T, { sstyled as j, assignProps as x, Component as E } from "@semcore/core";
|
|
10
10
|
import s from "react";
|
|
11
11
|
import { Box as P } from "@semcore/flex-box";
|
|
12
|
-
import
|
|
12
|
+
import D, { useNeighborLocationDetect as N } from "@semcore/neighbor-location";
|
|
13
13
|
import y from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
14
14
|
import R from "@semcore/utils/lib/addonTextChildren";
|
|
15
15
|
import F from "@semcore/utils/lib/enhances/a11yEnhance";
|
|
16
16
|
import S from "@semcore/utils/lib/logger";
|
|
17
17
|
var V = (
|
|
18
18
|
/*__reshadow_css_start__*/
|
|
19
|
-
(
|
|
19
|
+
(C.insert(
|
|
20
20
|
/*__inner_css_start__*/
|
|
21
|
-
".
|
|
22
|
-
"
|
|
21
|
+
".___SPills_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;isolation:isolate;outline:0}.___SPills_15aj4_gg_.__keyboardFocused_15aj4_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SPill_15aj4_gg_{display:inline-flex;align-items:center;justify-content:center;line-height:normal;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-control-rounded, 6px)}.___SPill_15aj4_gg_::-moz-focus-inner{border:0;padding:0}.___SPill_15aj4_gg_:active,.___SPill_15aj4_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPill_15aj4_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none;background:var(--intergalactic-bg-primary-neutral-hover, #f4f5f9)}}.___SPill_15aj4_gg_.__selected_15aj4_gg_{background:var(--intergalactic-control-secondary-info, rgba(0, 143, 248, 0.1));border-color:var(--intergalactic-border-info-active, #006dca);z-index:1}.___SPill_15aj4_gg_.__disabled_15aj4_gg_{cursor:default;pointer-events:none}.___SPill_15aj4_gg_.__disabled_15aj4_gg_>*{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SPill_15aj4_gg_.__keyboardFocused_15aj4_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SText_15aj4_gg_{color:var(--intergalactic-text-primary, #191b23);display:inline-flex}.___SAddon_15aj4_gg_{color:var(--intergalactic-text-secondary, #6c6e79);display:inline-flex;align-items:center;justify-content:center}.___SPill_15aj4_gg_._size_m_15aj4_gg_{height:var(--intergalactic-form-control-m, 28px);min-width:var(--intergalactic-form-control-m, 28px);font-size:var(--intergalactic-fs-200, 14px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_,.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SText_15aj4_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_m_15aj4_gg_ .___SAddon_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_{height:var(--intergalactic-form-control-l, 40px);min-width:var(--intergalactic-form-control-l, 40px);font-size:var(--intergalactic-fs-300, 16px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:only-child,.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SText_15aj4_gg_:only-child{margin-left:var(--intergalactic-spacing-3x, 12px);margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._size_l_15aj4_gg_ .___SAddon_15aj4_gg_:not(:only-child):last-child{margin-right:var(--intergalactic-spacing-3x, 12px)}.___SPill_15aj4_gg_._neighborLocation_right_15aj4_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SPill_15aj4_gg_._neighborLocation_both_15aj4_gg_{border-radius:0;margin-left:-1px}.___SPill_15aj4_gg_._neighborLocation_left_15aj4_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}",
|
|
22
|
+
"15aj4_gg_"
|
|
23
23
|
), {
|
|
24
|
-
__SPills: "
|
|
25
|
-
_keyboardFocused: "
|
|
26
|
-
__SPill: "
|
|
27
|
-
_selected: "
|
|
28
|
-
__SText: "
|
|
29
|
-
__SAddon: "
|
|
30
|
-
_neighborLocation_right: "
|
|
31
|
-
_neighborLocation_both: "
|
|
32
|
-
_neighborLocation_left: "
|
|
33
|
-
_disabled: "
|
|
34
|
-
_size_m: "
|
|
35
|
-
_size_l: "
|
|
24
|
+
__SPills: "___SPills_15aj4_gg_",
|
|
25
|
+
_keyboardFocused: "__keyboardFocused_15aj4_gg_",
|
|
26
|
+
__SPill: "___SPill_15aj4_gg_",
|
|
27
|
+
_selected: "__selected_15aj4_gg_",
|
|
28
|
+
__SText: "___SText_15aj4_gg_",
|
|
29
|
+
__SAddon: "___SAddon_15aj4_gg_",
|
|
30
|
+
_neighborLocation_right: "_neighborLocation_right_15aj4_gg_",
|
|
31
|
+
_neighborLocation_both: "_neighborLocation_both_15aj4_gg_",
|
|
32
|
+
_neighborLocation_left: "_neighborLocation_left_15aj4_gg_",
|
|
33
|
+
_disabled: "__disabled_15aj4_gg_",
|
|
34
|
+
_size_m: "_size_m_15aj4_gg_",
|
|
35
|
+
_size_l: "_size_l_15aj4_gg_"
|
|
36
36
|
})
|
|
37
37
|
), H = {
|
|
38
|
-
onNeighborChange: function(
|
|
39
|
-
|
|
38
|
+
onNeighborChange: function(a, r) {
|
|
39
|
+
a && (a.focus(), (r.behavior === "auto" || r.behavior === "radio") && a.click());
|
|
40
40
|
},
|
|
41
|
-
childSelector: function(
|
|
42
|
-
return
|
|
41
|
+
childSelector: function(a) {
|
|
42
|
+
return a.behavior === "auto" || a.behavior === "radio" ? ["role", "radio"] : ["role", "tab"];
|
|
43
43
|
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
k(this,
|
|
44
|
+
}, m = /* @__PURE__ */ function(_) {
|
|
45
|
+
L(r, _);
|
|
46
|
+
var a = A(r);
|
|
47
|
+
function r() {
|
|
48
|
+
var i;
|
|
49
|
+
k(this, r);
|
|
50
50
|
for (var l = arguments.length, o = new Array(l), n = 0; n < l; n++)
|
|
51
51
|
o[n] = arguments[n];
|
|
52
|
-
return
|
|
53
|
-
return function(
|
|
54
|
-
|
|
52
|
+
return i = a.call.apply(a, [this].concat(o)), d(v(i), "itemValues", []), d(v(i), "bindHandlerClick", function(e) {
|
|
53
|
+
return function(t) {
|
|
54
|
+
i.handlers.value(e, t);
|
|
55
55
|
};
|
|
56
|
-
}), d(
|
|
57
|
-
return function(
|
|
58
|
-
(
|
|
56
|
+
}), d(v(i), "bindHandleKeyDown", function(e) {
|
|
57
|
+
return function(t) {
|
|
58
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), i.handlers.value(e, t));
|
|
59
59
|
};
|
|
60
|
-
}), d(
|
|
61
|
-
for (var c = !1; !c && e >= 0 && e <
|
|
62
|
-
|
|
63
|
-
var g =
|
|
60
|
+
}), d(v(i), "changeIndex", function(e, t) {
|
|
61
|
+
for (var c = !1; !c && e >= 0 && e < i.itemValues.length; ) {
|
|
62
|
+
t === "increment" && e++, t === "decrement" && e--;
|
|
63
|
+
var g = i.itemRefs[e];
|
|
64
64
|
(g == null ? void 0 : g.disabled) === !1 && (c = !0);
|
|
65
65
|
}
|
|
66
|
-
return e >= 0 && e <
|
|
67
|
-
}),
|
|
66
|
+
return e >= 0 && e < i.itemValues.length ? e : void 0;
|
|
67
|
+
}), i;
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return w(r, [{
|
|
70
70
|
key: "componentDidMount",
|
|
71
71
|
value: function() {
|
|
72
72
|
S.warn(this.asProps.behavior === "tabs", "Use behavior `manual` instead of `tabs`. \n`tabs` is deprecated and will be removed in the next major release.", "Pills"), S.warn(this.asProps.behavior === "radio", "Use behavior `auto` (or nothing, it is default value) instead of `radio`. \n`radio` is deprecated and will be removed in the next major release.", "Pills");
|
|
@@ -81,14 +81,14 @@ var V = (
|
|
|
81
81
|
}, {
|
|
82
82
|
key: "getItemProps",
|
|
83
83
|
value: function(l, o) {
|
|
84
|
-
var n = this.asProps, e = n.value,
|
|
84
|
+
var n = this.asProps, e = n.value, t = n.size, c = n.disabled, g = n.behavior, u = e === l.value;
|
|
85
85
|
return this.itemValues[o] = l.value, {
|
|
86
86
|
index: o,
|
|
87
|
-
size:
|
|
87
|
+
size: t,
|
|
88
88
|
disabled: c,
|
|
89
|
-
selected:
|
|
89
|
+
selected: u,
|
|
90
90
|
behavior: g,
|
|
91
|
-
tabIndex:
|
|
91
|
+
tabIndex: u ? 0 : -1,
|
|
92
92
|
onClick: this.bindHandlerClick(l.value),
|
|
93
93
|
onKeyDown: this.bindHandleKeyDown(l.value)
|
|
94
94
|
};
|
|
@@ -96,63 +96,63 @@ var V = (
|
|
|
96
96
|
}, {
|
|
97
97
|
key: "render",
|
|
98
98
|
value: function() {
|
|
99
|
-
var l = this.asProps, o, n = P, e = this.asProps,
|
|
100
|
-
return o =
|
|
101
|
-
role:
|
|
102
|
-
"aria-disabled":
|
|
103
|
-
"use:tabIndex":
|
|
104
|
-
}, l))), /* @__PURE__ */ s.createElement(
|
|
99
|
+
var l = this.asProps, o, n = P, e = this.asProps, t = e.Children, c = e.styles, g = e.controlsLength, u = e.disabled, b = e.behavior, h = e.value;
|
|
100
|
+
return o = j(c), /* @__PURE__ */ s.createElement(n, o.cn("SPills", f({}, x({
|
|
101
|
+
role: b === "radio" || b === "auto" ? "radiogroup" : "tablist",
|
|
102
|
+
"aria-disabled": u,
|
|
103
|
+
"use:tabIndex": h !== null ? -1 : 0
|
|
104
|
+
}, l))), /* @__PURE__ */ s.createElement(D, o.cn("NeighborLocation", {
|
|
105
105
|
controlsLength: g
|
|
106
|
-
}), /* @__PURE__ */ s.createElement(
|
|
106
|
+
}), /* @__PURE__ */ s.createElement(t, o.cn("Children", {}))));
|
|
107
107
|
}
|
|
108
|
-
}]),
|
|
109
|
-
}(
|
|
110
|
-
d(
|
|
111
|
-
d(
|
|
112
|
-
d(
|
|
113
|
-
var
|
|
108
|
+
}]), r;
|
|
109
|
+
}(E);
|
|
110
|
+
d(m, "displayName", "Pills");
|
|
111
|
+
d(m, "style", V);
|
|
112
|
+
d(m, "defaultProps", function(_) {
|
|
113
|
+
var a = _.behavior;
|
|
114
114
|
return {
|
|
115
115
|
size: "m",
|
|
116
116
|
defaultValue: null,
|
|
117
|
-
behavior:
|
|
117
|
+
behavior: a ?? "auto"
|
|
118
118
|
};
|
|
119
119
|
});
|
|
120
|
-
d(
|
|
121
|
-
function z(
|
|
122
|
-
var
|
|
123
|
-
return
|
|
120
|
+
d(m, "enhance", [F(H), y()]);
|
|
121
|
+
function z(_) {
|
|
122
|
+
var a = arguments[0], r, i = P, l = _.Children, o = _.styles, n = _.addonLeft, e = _.addonRight, t = _.selected, c = _.disabled, g = _.index, u = _.behavior, b = N(g), h = {};
|
|
123
|
+
return u === "radio" || u === "auto" ? (h.role = "radio", h["aria-checked"] = t) : (h.role = "tab", h["aria-selected"] = t), r = j(o), /* @__PURE__ */ s.createElement(i, r.cn("SPill", f({}, x(f({
|
|
124
124
|
tag: "button",
|
|
125
125
|
type: "button",
|
|
126
|
-
neighborLocation:
|
|
126
|
+
neighborLocation: b,
|
|
127
127
|
"aria-disabled": c
|
|
128
|
-
},
|
|
128
|
+
}, h), a))), n ? /* @__PURE__ */ s.createElement(p.Item.Addon, {
|
|
129
129
|
tag: n
|
|
130
|
-
}) : null, R(l,
|
|
130
|
+
}) : null, R(l, p.Item.Text, p.Item.Addon), e ? /* @__PURE__ */ s.createElement(p.Item.Addon, {
|
|
131
131
|
tag: e
|
|
132
132
|
}) : null);
|
|
133
133
|
}
|
|
134
134
|
z.enhance = [y()];
|
|
135
|
-
function I(
|
|
136
|
-
var
|
|
137
|
-
return
|
|
135
|
+
function I(_) {
|
|
136
|
+
var a = arguments[0], r, i = P;
|
|
137
|
+
return r = j(_.styles), /* @__PURE__ */ s.createElement(i, r.cn("SText", f({}, x({
|
|
138
138
|
tag: "span"
|
|
139
|
-
},
|
|
139
|
+
}, a))));
|
|
140
140
|
}
|
|
141
|
-
function K(
|
|
142
|
-
var
|
|
143
|
-
return
|
|
141
|
+
function K(_) {
|
|
142
|
+
var a = arguments[0], r, i = P;
|
|
143
|
+
return r = j(_.styles), /* @__PURE__ */ s.createElement(i, r.cn("SAddon", f({}, x({
|
|
144
144
|
tag: "span"
|
|
145
|
-
},
|
|
145
|
+
}, a))));
|
|
146
146
|
}
|
|
147
|
-
var
|
|
147
|
+
var p = T(m, {
|
|
148
148
|
Item: [z, {
|
|
149
149
|
Text: I,
|
|
150
150
|
Addon: K
|
|
151
151
|
}]
|
|
152
|
-
}),
|
|
153
|
-
return
|
|
152
|
+
}), _e = function(a) {
|
|
153
|
+
return a;
|
|
154
154
|
};
|
|
155
155
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
p as default,
|
|
157
|
+
_e as wrapPills
|
|
158
158
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/pills",
|
|
3
3
|
"description": "Semrush Pills Component",
|
|
4
|
-
"version": "5.43.0",
|
|
4
|
+
"version": "5.43.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "5.41.0",
|
|
18
|
-
"@semcore/neighbor-location": "4.40.0",
|
|
19
|
-
"@semcore/utils": "4.48.0"
|
|
17
|
+
"@semcore/flex-box": "5.41.1-prerelease.0",
|
|
18
|
+
"@semcore/neighbor-location": "4.40.1-prerelease.0",
|
|
19
|
+
"@semcore/utils": "4.48.1-prerelease.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@semcore/core": "^2.
|
|
22
|
+
"@semcore/core": "^2.39.1-prerelease.0",
|
|
23
23
|
"react": "16.8 - 18",
|
|
24
24
|
"react-dom": "16.8 - 18"
|
|
25
25
|
},
|