@semcore/base-trigger 3.0.21 → 3.0.23
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 +12 -0
- package/lib/cjs/BaseTrigger.js +19 -19
- package/lib/cjs/ButtonTrigger.js +4 -4
- package/lib/cjs/FilterTrigger.js +16 -16
- package/lib/cjs/LinkTrigger.js +14 -14
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/BaseTrigger.js +19 -19
- package/lib/es6/ButtonTrigger.js +4 -4
- package/lib/es6/FilterTrigger.js +16 -16
- package/lib/es6/LinkTrigger.js +14 -14
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +3 -2
- package/lib/cjs/index.d.ts +0 -82
- package/lib/es6/index.d.ts +0 -82
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.0.23] - 2022-10-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.37.1 ~> 3.37.2]).
|
|
10
|
+
|
|
11
|
+
## [3.0.22] - 2022-10-03
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.0 ~> 2.32.1]).
|
|
16
|
+
|
|
5
17
|
## [3.0.21] - 2022-09-29
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/lib/cjs/BaseTrigger.js
CHANGED
|
@@ -52,28 +52,28 @@ var style = (
|
|
|
52
52
|
/*__reshadow_css_start__*/
|
|
53
53
|
_core.sstyled.insert(
|
|
54
54
|
/*__inner_css_start__*/
|
|
55
|
-
".
|
|
55
|
+
".___SBaseTrigger_1qqrb_gg_{display:inline-block;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;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;background:#fff;font-weight:400;border:1px solid #c4c7cf;color:#191b23}.___SBaseTrigger_1qqrb_gg_::-moz-focus-inner{border:none;padding:0}.___SBaseTrigger_1qqrb_gg_:active,.___SBaseTrigger_1qqrb_gg_:focus,.___SBaseTrigger_1qqrb_gg_:hover{outline:0;text-decoration:none}.___SBaseTrigger_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SBaseTrigger_1qqrb_gg_:hover{background-color:rgba(138,142,155,.2)}.___SBaseTrigger_1qqrb_gg_:active,.___SBaseTrigger_1qqrb_gg_.__active_1qqrb_gg_{background-color:rgba(138,142,155,.3)}.___SBaseTrigger_1qqrb_gg_.__disabled_1qqrb_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SBaseTrigger_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{z-index:1}.___SInner_1qqrb_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SText_1qqrb_gg_{display:inline;padding:1px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.42;flex-grow:1;text-align:left}.___SAddon_1qqrb_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SBaseAddon_1qqrb_gg_{width:12px;height:12px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_{min-width:26px;height:28px;border-radius:6px;padding:0 8px;font-size:14px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_{min-width:32px;height:40px;border-radius:6px;padding:0 12px;font-size:16px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_1qqrb_gg_._neighborLocation_right_1qqrb_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SBaseTrigger_1qqrb_gg_._neighborLocation_both_1qqrb_gg_{border-radius:0;margin-left:-1px}.___SBaseTrigger_1qqrb_gg_._neighborLocation_left_1qqrb_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SText_1qqrb_gg_.__placeholder_1qqrb_gg_{color:#a9abb6}.___SBaseTrigger_1qqrb_gg_._state_normal_1qqrb_gg_{border-color:#c4c7cf}.___SBaseTrigger_1qqrb_gg_._state_valid_1qqrb_gg_{border-color:#59ddaa}.___SBaseTrigger_1qqrb_gg_._state_invalid_1qqrb_gg_{border-color:#ffaeb5}.___SBaseTrigger_1qqrb_gg_._state_invalid_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{border-color:#ff642d;box-shadow:0 0 0 3px rgba(255,100,45,.3)}"
|
|
56
56
|
/*__inner_css_end__*/
|
|
57
|
-
, "
|
|
57
|
+
, "1qqrb_gg_")
|
|
58
58
|
/*__reshadow_css_end__*/
|
|
59
59
|
, {
|
|
60
|
-
"__SBaseTrigger": "
|
|
61
|
-
"_keyboardFocused": "
|
|
62
|
-
"_active": "
|
|
63
|
-
"_disabled": "
|
|
64
|
-
"__SInner": "
|
|
65
|
-
"__SText": "
|
|
66
|
-
"__SAddon": "
|
|
67
|
-
"__SBaseAddon": "
|
|
68
|
-
"_size_m": "
|
|
69
|
-
"_size_l": "
|
|
70
|
-
"_neighborLocation_right": "
|
|
71
|
-
"_neighborLocation_both": "
|
|
72
|
-
"_neighborLocation_left": "
|
|
73
|
-
"_placeholder": "
|
|
74
|
-
"_state_normal": "
|
|
75
|
-
"_state_valid": "
|
|
76
|
-
"_state_invalid": "
|
|
60
|
+
"__SBaseTrigger": "___SBaseTrigger_1qqrb_gg_",
|
|
61
|
+
"_keyboardFocused": "__keyboardFocused_1qqrb_gg_",
|
|
62
|
+
"_active": "__active_1qqrb_gg_",
|
|
63
|
+
"_disabled": "__disabled_1qqrb_gg_",
|
|
64
|
+
"__SInner": "___SInner_1qqrb_gg_",
|
|
65
|
+
"__SText": "___SText_1qqrb_gg_",
|
|
66
|
+
"__SAddon": "___SAddon_1qqrb_gg_",
|
|
67
|
+
"__SBaseAddon": "___SBaseAddon_1qqrb_gg_",
|
|
68
|
+
"_size_m": "_size_m_1qqrb_gg_",
|
|
69
|
+
"_size_l": "_size_l_1qqrb_gg_",
|
|
70
|
+
"_neighborLocation_right": "_neighborLocation_right_1qqrb_gg_",
|
|
71
|
+
"_neighborLocation_both": "_neighborLocation_both_1qqrb_gg_",
|
|
72
|
+
"_neighborLocation_left": "_neighborLocation_left_1qqrb_gg_",
|
|
73
|
+
"_placeholder": "__placeholder_1qqrb_gg_",
|
|
74
|
+
"_state_normal": "_state_normal_1qqrb_gg_",
|
|
75
|
+
"_state_valid": "_state_valid_1qqrb_gg_",
|
|
76
|
+
"_state_invalid": "_state_invalid_1qqrb_gg_"
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/ButtonTrigger.js
CHANGED
|
@@ -46,13 +46,13 @@ var style = (
|
|
|
46
46
|
/*__reshadow_css_start__*/
|
|
47
47
|
_core.sstyled.insert(
|
|
48
48
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
49
|
+
".___SButtonAddon_pivei_gg_{width:12px;height:12px}.___SButtonTriggerSpin_pivei_gg_{fill:#6c6e79}"
|
|
50
50
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
51
|
+
, "pivei_gg_")
|
|
52
52
|
/*__reshadow_css_end__*/
|
|
53
53
|
, {
|
|
54
|
-
"__SButtonAddon": "
|
|
55
|
-
"__SButtonTriggerSpin": "
|
|
54
|
+
"__SButtonAddon": "___SButtonAddon_pivei_gg_",
|
|
55
|
+
"__SButtonTriggerSpin": "___SButtonTriggerSpin_pivei_gg_"
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
var RootButtonTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/FilterTrigger.js
CHANGED
|
@@ -60,25 +60,25 @@ var style = (
|
|
|
60
60
|
/*__reshadow_css_start__*/
|
|
61
61
|
_core.sstyled.insert(
|
|
62
62
|
/*__inner_css_start__*/
|
|
63
|
-
".
|
|
63
|
+
".___SButtonTrigger_1ebic_gg_{border:1px solid #c4c7cf;background:#fff;color:#191b23}.___SButtonTrigger_1ebic_gg_::-moz-focus-inner{border:none;padding:0}.___SButtonTrigger_1ebic_gg_:active,.___SButtonTrigger_1ebic_gg_:focus,.___SButtonTrigger_1ebic_gg_:hover{outline:0;text-decoration:none}.___SButtonTrigger_1ebic_gg_:active,.___SButtonTrigger_1ebic_gg_:hover,.___SButtonTrigger_1ebic_gg_.__active_1ebic_gg_{background-color:rgba(138,142,155,.2)}.___SButtonTrigger_1ebic_gg_._size_m_1ebic_gg_{min-width:26px;height:28px;border-radius:6px;font-size:14px}.___SButtonTrigger_1ebic_gg_._size_l_1ebic_gg_{min-width:32px;height:40px;border-radius:6px;font-size:16px}.___SText_1ebic_gg_.__placeholder_1ebic_gg_{color:#a9abb6}.___SButtonTrigger_1ebic_gg_._state_normal_1ebic_gg_{border-color:#c4c7cf}.___SButtonTrigger_1ebic_gg_._state_valid_1ebic_gg_{border-color:#59ddaa}.___SButtonTrigger_1ebic_gg_._state_invalid_1ebic_gg_{border-color:#ffaeb5}.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_{border-color:#008ff8;background-color:rgba(0,143,248,.2);color:#191b23}.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_:hover,.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_.__active_1ebic_gg_{background:rgba(0,143,248,.3)}.___SWrapper_1ebic_gg_{display:inline-flex}.___SWrapper_1ebic_gg_:focus{outline:none}.___SWrapper_1ebic_gg_.__keyboardFocused_1ebic_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SCounter_1ebic_gg_{background-color:#008ff8}"
|
|
64
64
|
/*__inner_css_end__*/
|
|
65
|
-
, "
|
|
65
|
+
, "1ebic_gg_")
|
|
66
66
|
/*__reshadow_css_end__*/
|
|
67
67
|
, {
|
|
68
|
-
"__SButtonTrigger": "
|
|
69
|
-
"_active": "
|
|
70
|
-
"_size_m": "
|
|
71
|
-
"_size_l": "
|
|
72
|
-
"__SText": "
|
|
73
|
-
"_placeholder": "
|
|
74
|
-
"_state_normal": "
|
|
75
|
-
"_state_valid": "
|
|
76
|
-
"_state_invalid": "
|
|
77
|
-
"__SFilterTrigger": "
|
|
78
|
-
"_selected": "
|
|
79
|
-
"__SWrapper": "
|
|
80
|
-
"_keyboardFocused": "
|
|
81
|
-
"__SCounter": "
|
|
68
|
+
"__SButtonTrigger": "___SButtonTrigger_1ebic_gg_",
|
|
69
|
+
"_active": "__active_1ebic_gg_",
|
|
70
|
+
"_size_m": "_size_m_1ebic_gg_",
|
|
71
|
+
"_size_l": "_size_l_1ebic_gg_",
|
|
72
|
+
"__SText": "___SText_1ebic_gg_",
|
|
73
|
+
"_placeholder": "__placeholder_1ebic_gg_",
|
|
74
|
+
"_state_normal": "_state_normal_1ebic_gg_",
|
|
75
|
+
"_state_valid": "_state_valid_1ebic_gg_",
|
|
76
|
+
"_state_invalid": "_state_invalid_1ebic_gg_",
|
|
77
|
+
"__SFilterTrigger": "___SFilterTrigger_1ebic_gg_",
|
|
78
|
+
"_selected": "__selected_1ebic_gg_",
|
|
79
|
+
"__SWrapper": "___SWrapper_1ebic_gg_",
|
|
80
|
+
"_keyboardFocused": "__keyboardFocused_1ebic_gg_",
|
|
81
|
+
"__SCounter": "___SCounter_1ebic_gg_"
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
var RootFilterTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/LinkTrigger.js
CHANGED
|
@@ -54,23 +54,23 @@ var style = (
|
|
|
54
54
|
/*__reshadow_css_start__*/
|
|
55
55
|
_core.sstyled.insert(
|
|
56
56
|
/*__inner_css_start__*/
|
|
57
|
-
".
|
|
57
|
+
".___SLinkTrigger_16n1s_gg_{display:inline-flex;align-items: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;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;color:#006dca;background:none;transition:color .15s ease-in-out}.___SLinkTrigger_16n1s_gg_:active,.___SLinkTrigger_16n1s_gg_:hover,.___SLinkTrigger_16n1s_gg_.__active_16n1s_gg_{color:#044792}.___SLinkTrigger_16n1s_gg_:active .___SText_16n1s_gg_,.___SLinkTrigger_16n1s_gg_:hover .___SText_16n1s_gg_,.___SLinkTrigger_16n1s_gg_.__active_16n1s_gg_ .___SText_16n1s_gg_{border-color:currentColor}.___SLinkTrigger_16n1s_gg_ .___SText_16n1s_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out;line-height:1.42}.___SLinkTrigger_16n1s_gg_.__color_16n1s_gg_{color:var(--color_16n1s)}.___SLinkTrigger_16n1s_gg_.__color_16n1s_gg_:hover{color:var(--color-hover_16n1s)}.___SLinkTrigger_16n1s_gg_.__disabled_16n1s_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SLinkTrigger_16n1s_gg_.__keyboardFocused_16n1s_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);z-index:1}.___SAddon_16n1s_gg_,.___SLinkAddon_16n1s_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SAddon_16n1s_gg_:not(:only-child):first-child,.___SLinkAddon_16n1s_gg_:not(:only-child):first-child{margin-right:4px}.___SAddon_16n1s_gg_:not(:only-child):last-child,.___SLinkAddon_16n1s_gg_:not(:only-child):last-child{margin-left:4px}.___SLinkAddon_16n1s_gg_{width:16px;height:16px}.___SLinkTrigger_16n1s_gg_._size_m_16n1s_gg_{font-size:14px}.___SLinkTrigger_16n1s_gg_._size_l_16n1s_gg_{font-size:16px}@media (prefers-reduced-motion){.___SLinkTrigger_16n1s_gg_{transition:none}.___SLinkTrigger_16n1s_gg_ .___SText_16n1s_gg_{transition:none}}"
|
|
58
58
|
/*__inner_css_end__*/
|
|
59
|
-
, "
|
|
59
|
+
, "16n1s_gg_")
|
|
60
60
|
/*__reshadow_css_end__*/
|
|
61
61
|
, {
|
|
62
|
-
"__SLinkTrigger": "
|
|
63
|
-
"_active": "
|
|
64
|
-
"__SText": "
|
|
65
|
-
"_color": "
|
|
66
|
-
"--color": "--
|
|
67
|
-
"--color-hover": "--color-
|
|
68
|
-
"_disabled": "
|
|
69
|
-
"_keyboardFocused": "
|
|
70
|
-
"__SAddon": "
|
|
71
|
-
"__SLinkAddon": "
|
|
72
|
-
"_size_m": "
|
|
73
|
-
"_size_l": "
|
|
62
|
+
"__SLinkTrigger": "___SLinkTrigger_16n1s_gg_",
|
|
63
|
+
"_active": "__active_16n1s_gg_",
|
|
64
|
+
"__SText": "___SText_16n1s_gg_",
|
|
65
|
+
"_color": "__color_16n1s_gg_",
|
|
66
|
+
"--color": "--color_16n1s",
|
|
67
|
+
"--color-hover": "--color-hover_16n1s",
|
|
68
|
+
"_disabled": "__disabled_16n1s_gg_",
|
|
69
|
+
"_keyboardFocused": "__keyboardFocused_16n1s_gg_",
|
|
70
|
+
"__SAddon": "___SAddon_16n1s_gg_",
|
|
71
|
+
"__SLinkAddon": "___SLinkAddon_16n1s_gg_",
|
|
72
|
+
"_size_m": "_size_m_16n1s_gg_",
|
|
73
|
+
"_size_l": "_size_l_16n1s_gg_"
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
var RootLinkTrigger = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport Dot from '@semcore/dot';\nimport { INeighborItemProps } from '@semcore/neighbor-location';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nexport interface IBaseTriggerProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps {\n /**\n * Trigger size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Sets active state to trigger\n */\n active?: boolean;\n /**\n * Responsible for placeholder displaying\n */\n empty?: boolean;\n /**\n * Placeholder text\n */\n placeholder?: React.ReactNode;\n /**\n * Sets disabled state to trigger\n */\n disabled?: boolean;\n /** Trigger theme\n * @deprecated\n * @use IBaseTriggerProps.state\n * */\n theme?: 'normal' | 'valid' | 'invalid' | false;\n}\n\nexport interface IButtonTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {\n /** Sets the loading state */\n loading?: boolean;\n}\n\nexport interface ILinkTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {\n /** Sets the loading state */\n loading?: boolean;\n /** Text color */\n color?: string;\n}\n\nexport interface IFilterTriggerProps extends IBaseTriggerProps {\n /** Click on the filter cleaning cross */\n onClear?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const BaseTrigger: (<T>(props: CProps<IBaseTriggerProps & T>) => ReturnEl) & {\n Text: typeof Box;\n Addon: typeof Box;\n};\n\ndeclare const ButtonTrigger: (<T>(props: CProps<IButtonTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n};\n\ndeclare const LinkTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n};\n\ndeclare const FilterTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n Counter: <T>(\n props: ComponentProps<typeof BaseTrigger.Addon> & ComponentProps<typeof Dot> & T,\n ) => ReturnEl;\n};\n\nexport default BaseTrigger;\nexport { ButtonTrigger, LinkTrigger, FilterTrigger };\n"],"mappings":""}
|
package/lib/es6/BaseTrigger.js
CHANGED
|
@@ -30,28 +30,28 @@ var style = (
|
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
_sstyled.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
33
|
+
".___SBaseTrigger_1qqrb_gg_{display:inline-block;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;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;text-align:center;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;background:#fff;font-weight:400;border:1px solid #c4c7cf;color:#191b23}.___SBaseTrigger_1qqrb_gg_::-moz-focus-inner{border:none;padding:0}.___SBaseTrigger_1qqrb_gg_:active,.___SBaseTrigger_1qqrb_gg_:focus,.___SBaseTrigger_1qqrb_gg_:hover{outline:0;text-decoration:none}.___SBaseTrigger_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SBaseTrigger_1qqrb_gg_:hover{background-color:rgba(138,142,155,.2)}.___SBaseTrigger_1qqrb_gg_:active,.___SBaseTrigger_1qqrb_gg_.__active_1qqrb_gg_{background-color:rgba(138,142,155,.3)}.___SBaseTrigger_1qqrb_gg_.__disabled_1qqrb_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SBaseTrigger_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{z-index:1}.___SInner_1qqrb_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SText_1qqrb_gg_{display:inline;padding:1px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.42;flex-grow:1;text-align:left}.___SAddon_1qqrb_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SBaseAddon_1qqrb_gg_{width:12px;height:12px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_{min-width:26px;height:28px;border-radius:6px;padding:0 8px;font-size:14px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_1qqrb_gg_._size_m_1qqrb_gg_ .___SAddon_1qqrb_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_{min-width:32px;height:40px;border-radius:6px;padding:0 12px;font-size:16px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):first-child{margin-right:8px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:not(:only-child):last-child{margin-left:8px}.___SBaseTrigger_1qqrb_gg_._size_l_1qqrb_gg_ .___SAddon_1qqrb_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SBaseTrigger_1qqrb_gg_._neighborLocation_right_1qqrb_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SBaseTrigger_1qqrb_gg_._neighborLocation_both_1qqrb_gg_{border-radius:0;margin-left:-1px}.___SBaseTrigger_1qqrb_gg_._neighborLocation_left_1qqrb_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SText_1qqrb_gg_.__placeholder_1qqrb_gg_{color:#a9abb6}.___SBaseTrigger_1qqrb_gg_._state_normal_1qqrb_gg_{border-color:#c4c7cf}.___SBaseTrigger_1qqrb_gg_._state_valid_1qqrb_gg_{border-color:#59ddaa}.___SBaseTrigger_1qqrb_gg_._state_invalid_1qqrb_gg_{border-color:#ffaeb5}.___SBaseTrigger_1qqrb_gg_._state_invalid_1qqrb_gg_.__keyboardFocused_1qqrb_gg_{border-color:#ff642d;box-shadow:0 0 0 3px rgba(255,100,45,.3)}"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "1qqrb_gg_")
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
, {
|
|
38
|
-
"__SBaseTrigger": "
|
|
39
|
-
"_keyboardFocused": "
|
|
40
|
-
"_active": "
|
|
41
|
-
"_disabled": "
|
|
42
|
-
"__SInner": "
|
|
43
|
-
"__SText": "
|
|
44
|
-
"__SAddon": "
|
|
45
|
-
"__SBaseAddon": "
|
|
46
|
-
"_size_m": "
|
|
47
|
-
"_size_l": "
|
|
48
|
-
"_neighborLocation_right": "
|
|
49
|
-
"_neighborLocation_both": "
|
|
50
|
-
"_neighborLocation_left": "
|
|
51
|
-
"_placeholder": "
|
|
52
|
-
"_state_normal": "
|
|
53
|
-
"_state_valid": "
|
|
54
|
-
"_state_invalid": "
|
|
38
|
+
"__SBaseTrigger": "___SBaseTrigger_1qqrb_gg_",
|
|
39
|
+
"_keyboardFocused": "__keyboardFocused_1qqrb_gg_",
|
|
40
|
+
"_active": "__active_1qqrb_gg_",
|
|
41
|
+
"_disabled": "__disabled_1qqrb_gg_",
|
|
42
|
+
"__SInner": "___SInner_1qqrb_gg_",
|
|
43
|
+
"__SText": "___SText_1qqrb_gg_",
|
|
44
|
+
"__SAddon": "___SAddon_1qqrb_gg_",
|
|
45
|
+
"__SBaseAddon": "___SBaseAddon_1qqrb_gg_",
|
|
46
|
+
"_size_m": "_size_m_1qqrb_gg_",
|
|
47
|
+
"_size_l": "_size_l_1qqrb_gg_",
|
|
48
|
+
"_neighborLocation_right": "_neighborLocation_right_1qqrb_gg_",
|
|
49
|
+
"_neighborLocation_both": "_neighborLocation_both_1qqrb_gg_",
|
|
50
|
+
"_neighborLocation_left": "_neighborLocation_left_1qqrb_gg_",
|
|
51
|
+
"_placeholder": "__placeholder_1qqrb_gg_",
|
|
52
|
+
"_state_normal": "_state_normal_1qqrb_gg_",
|
|
53
|
+
"_state_valid": "_state_valid_1qqrb_gg_",
|
|
54
|
+
"_state_invalid": "_state_invalid_1qqrb_gg_"
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
var RootBaseTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/ButtonTrigger.js
CHANGED
|
@@ -23,13 +23,13 @@ var style = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
_sstyled.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
26
|
+
".___SButtonAddon_pivei_gg_{width:12px;height:12px}.___SButtonTriggerSpin_pivei_gg_{fill:#6c6e79}"
|
|
27
27
|
/*__inner_css_end__*/
|
|
28
|
-
, "
|
|
28
|
+
, "pivei_gg_")
|
|
29
29
|
/*__reshadow_css_end__*/
|
|
30
30
|
, {
|
|
31
|
-
"__SButtonAddon": "
|
|
32
|
-
"__SButtonTriggerSpin": "
|
|
31
|
+
"__SButtonAddon": "___SButtonAddon_pivei_gg_",
|
|
32
|
+
"__SButtonTriggerSpin": "___SButtonTriggerSpin_pivei_gg_"
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
var RootButtonTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/FilterTrigger.js
CHANGED
|
@@ -33,25 +33,25 @@ var style = (
|
|
|
33
33
|
/*__reshadow_css_start__*/
|
|
34
34
|
_sstyled.insert(
|
|
35
35
|
/*__inner_css_start__*/
|
|
36
|
-
".
|
|
36
|
+
".___SButtonTrigger_1ebic_gg_{border:1px solid #c4c7cf;background:#fff;color:#191b23}.___SButtonTrigger_1ebic_gg_::-moz-focus-inner{border:none;padding:0}.___SButtonTrigger_1ebic_gg_:active,.___SButtonTrigger_1ebic_gg_:focus,.___SButtonTrigger_1ebic_gg_:hover{outline:0;text-decoration:none}.___SButtonTrigger_1ebic_gg_:active,.___SButtonTrigger_1ebic_gg_:hover,.___SButtonTrigger_1ebic_gg_.__active_1ebic_gg_{background-color:rgba(138,142,155,.2)}.___SButtonTrigger_1ebic_gg_._size_m_1ebic_gg_{min-width:26px;height:28px;border-radius:6px;font-size:14px}.___SButtonTrigger_1ebic_gg_._size_l_1ebic_gg_{min-width:32px;height:40px;border-radius:6px;font-size:16px}.___SText_1ebic_gg_.__placeholder_1ebic_gg_{color:#a9abb6}.___SButtonTrigger_1ebic_gg_._state_normal_1ebic_gg_{border-color:#c4c7cf}.___SButtonTrigger_1ebic_gg_._state_valid_1ebic_gg_{border-color:#59ddaa}.___SButtonTrigger_1ebic_gg_._state_invalid_1ebic_gg_{border-color:#ffaeb5}.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_{border-color:#008ff8;background-color:rgba(0,143,248,.2);color:#191b23}.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_:hover,.___SFilterTrigger_1ebic_gg_.__selected_1ebic_gg_.__active_1ebic_gg_{background:rgba(0,143,248,.3)}.___SWrapper_1ebic_gg_{display:inline-flex}.___SWrapper_1ebic_gg_:focus{outline:none}.___SWrapper_1ebic_gg_.__keyboardFocused_1ebic_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SCounter_1ebic_gg_{background-color:#008ff8}"
|
|
37
37
|
/*__inner_css_end__*/
|
|
38
|
-
, "
|
|
38
|
+
, "1ebic_gg_")
|
|
39
39
|
/*__reshadow_css_end__*/
|
|
40
40
|
, {
|
|
41
|
-
"__SButtonTrigger": "
|
|
42
|
-
"_active": "
|
|
43
|
-
"_size_m": "
|
|
44
|
-
"_size_l": "
|
|
45
|
-
"__SText": "
|
|
46
|
-
"_placeholder": "
|
|
47
|
-
"_state_normal": "
|
|
48
|
-
"_state_valid": "
|
|
49
|
-
"_state_invalid": "
|
|
50
|
-
"__SFilterTrigger": "
|
|
51
|
-
"_selected": "
|
|
52
|
-
"__SWrapper": "
|
|
53
|
-
"_keyboardFocused": "
|
|
54
|
-
"__SCounter": "
|
|
41
|
+
"__SButtonTrigger": "___SButtonTrigger_1ebic_gg_",
|
|
42
|
+
"_active": "__active_1ebic_gg_",
|
|
43
|
+
"_size_m": "_size_m_1ebic_gg_",
|
|
44
|
+
"_size_l": "_size_l_1ebic_gg_",
|
|
45
|
+
"__SText": "___SText_1ebic_gg_",
|
|
46
|
+
"_placeholder": "__placeholder_1ebic_gg_",
|
|
47
|
+
"_state_normal": "_state_normal_1ebic_gg_",
|
|
48
|
+
"_state_valid": "_state_valid_1ebic_gg_",
|
|
49
|
+
"_state_invalid": "_state_invalid_1ebic_gg_",
|
|
50
|
+
"__SFilterTrigger": "___SFilterTrigger_1ebic_gg_",
|
|
51
|
+
"_selected": "__selected_1ebic_gg_",
|
|
52
|
+
"__SWrapper": "___SWrapper_1ebic_gg_",
|
|
53
|
+
"_keyboardFocused": "__keyboardFocused_1ebic_gg_",
|
|
54
|
+
"__SCounter": "___SCounter_1ebic_gg_"
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
var RootFilterTrigger = /*#__PURE__*/function (_Component) {
|
package/lib/es6/LinkTrigger.js
CHANGED
|
@@ -31,23 +31,23 @@ var style = (
|
|
|
31
31
|
/*__reshadow_css_start__*/
|
|
32
32
|
_sstyled.insert(
|
|
33
33
|
/*__inner_css_start__*/
|
|
34
|
-
".
|
|
34
|
+
".___SLinkTrigger_16n1s_gg_{display:inline-flex;align-items: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;outline:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;outline:0;vertical-align:middle;font-family:Inter,sans-serif;cursor:pointer;color:#006dca;background:none;transition:color .15s ease-in-out}.___SLinkTrigger_16n1s_gg_:active,.___SLinkTrigger_16n1s_gg_:hover,.___SLinkTrigger_16n1s_gg_.__active_16n1s_gg_{color:#044792}.___SLinkTrigger_16n1s_gg_:active .___SText_16n1s_gg_,.___SLinkTrigger_16n1s_gg_:hover .___SText_16n1s_gg_,.___SLinkTrigger_16n1s_gg_.__active_16n1s_gg_ .___SText_16n1s_gg_{border-color:currentColor}.___SLinkTrigger_16n1s_gg_ .___SText_16n1s_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out;line-height:1.42}.___SLinkTrigger_16n1s_gg_.__color_16n1s_gg_{color:var(--color_16n1s)}.___SLinkTrigger_16n1s_gg_.__color_16n1s_gg_:hover{color:var(--color-hover_16n1s)}.___SLinkTrigger_16n1s_gg_.__disabled_16n1s_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SLinkTrigger_16n1s_gg_.__keyboardFocused_16n1s_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);z-index:1}.___SAddon_16n1s_gg_,.___SLinkAddon_16n1s_gg_{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.___SAddon_16n1s_gg_:not(:only-child):first-child,.___SLinkAddon_16n1s_gg_:not(:only-child):first-child{margin-right:4px}.___SAddon_16n1s_gg_:not(:only-child):last-child,.___SLinkAddon_16n1s_gg_:not(:only-child):last-child{margin-left:4px}.___SLinkAddon_16n1s_gg_{width:16px;height:16px}.___SLinkTrigger_16n1s_gg_._size_m_16n1s_gg_{font-size:14px}.___SLinkTrigger_16n1s_gg_._size_l_16n1s_gg_{font-size:16px}@media (prefers-reduced-motion){.___SLinkTrigger_16n1s_gg_{transition:none}.___SLinkTrigger_16n1s_gg_ .___SText_16n1s_gg_{transition:none}}"
|
|
35
35
|
/*__inner_css_end__*/
|
|
36
|
-
, "
|
|
36
|
+
, "16n1s_gg_")
|
|
37
37
|
/*__reshadow_css_end__*/
|
|
38
38
|
, {
|
|
39
|
-
"__SLinkTrigger": "
|
|
40
|
-
"_active": "
|
|
41
|
-
"__SText": "
|
|
42
|
-
"_color": "
|
|
43
|
-
"--color": "--
|
|
44
|
-
"--color-hover": "--color-
|
|
45
|
-
"_disabled": "
|
|
46
|
-
"_keyboardFocused": "
|
|
47
|
-
"__SAddon": "
|
|
48
|
-
"__SLinkAddon": "
|
|
49
|
-
"_size_m": "
|
|
50
|
-
"_size_l": "
|
|
39
|
+
"__SLinkTrigger": "___SLinkTrigger_16n1s_gg_",
|
|
40
|
+
"_active": "__active_16n1s_gg_",
|
|
41
|
+
"__SText": "___SText_16n1s_gg_",
|
|
42
|
+
"_color": "__color_16n1s_gg_",
|
|
43
|
+
"--color": "--color_16n1s",
|
|
44
|
+
"--color-hover": "--color-hover_16n1s",
|
|
45
|
+
"_disabled": "__disabled_16n1s_gg_",
|
|
46
|
+
"_keyboardFocused": "__keyboardFocused_16n1s_gg_",
|
|
47
|
+
"__SAddon": "___SAddon_16n1s_gg_",
|
|
48
|
+
"__SLinkAddon": "___SLinkAddon_16n1s_gg_",
|
|
49
|
+
"_size_m": "_size_m_16n1s_gg_",
|
|
50
|
+
"_size_l": "_size_l_16n1s_gg_"
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
var RootLinkTrigger = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport Dot from '@semcore/dot';\nimport { INeighborItemProps } from '@semcore/neighbor-location';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nexport interface IBaseTriggerProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps {\n /**\n * Trigger size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Sets active state to trigger\n */\n active?: boolean;\n /**\n * Responsible for placeholder displaying\n */\n empty?: boolean;\n /**\n * Placeholder text\n */\n placeholder?: React.ReactNode;\n /**\n * Sets disabled state to trigger\n */\n disabled?: boolean;\n /** Trigger theme\n * @deprecated\n * @use IBaseTriggerProps.state\n * */\n theme?: 'normal' | 'valid' | 'invalid' | false;\n}\n\nexport interface IButtonTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {\n /** Sets the loading state */\n loading?: boolean;\n}\n\nexport interface ILinkTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {\n /** Sets the loading state */\n loading?: boolean;\n /** Text color */\n color?: string;\n}\n\nexport interface IFilterTriggerProps extends IBaseTriggerProps {\n /** Click on the filter cleaning cross */\n onClear?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const BaseTrigger: (<T>(props: CProps<IBaseTriggerProps & T>) => ReturnEl) & {\n Text: typeof Box;\n Addon: typeof Box;\n};\n\ndeclare const ButtonTrigger: (<T>(props: CProps<IButtonTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n};\n\ndeclare const LinkTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n};\n\ndeclare const FilterTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {\n Text: typeof BaseTrigger.Text;\n Addon: typeof BaseTrigger.Addon;\n Counter: <T>(\n props: ComponentProps<typeof BaseTrigger.Addon> & ComponentProps<typeof Dot> & T,\n ) => ReturnEl;\n};\n\nexport default BaseTrigger;\nexport { ButtonTrigger, LinkTrigger, FilterTrigger };\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/base-trigger",
|
|
3
3
|
"description": "Semrush BaseTrigger Component",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.23",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"directory": "semcore/base-trigger"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@types/react": "16.8 - 17",
|
|
36
37
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
37
38
|
}
|
|
38
39
|
}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
-
import Dot from '@semcore/dot';
|
|
5
|
-
import { INeighborItemProps } from '@semcore/neighbor-location';
|
|
6
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
7
|
-
|
|
8
|
-
export interface IBaseTriggerProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps {
|
|
9
|
-
/**
|
|
10
|
-
* Trigger size
|
|
11
|
-
* @default m
|
|
12
|
-
*/
|
|
13
|
-
size?: 'm' | 'l';
|
|
14
|
-
/**
|
|
15
|
-
* Trigger state
|
|
16
|
-
*/
|
|
17
|
-
state?: 'normal' | 'valid' | 'invalid';
|
|
18
|
-
/**
|
|
19
|
-
* Sets active state to trigger
|
|
20
|
-
*/
|
|
21
|
-
active?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Responsible for placeholder displaying
|
|
24
|
-
*/
|
|
25
|
-
empty?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Placeholder text
|
|
28
|
-
*/
|
|
29
|
-
placeholder?: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Sets disabled state to trigger
|
|
32
|
-
*/
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
/** Trigger theme
|
|
35
|
-
* @deprecated
|
|
36
|
-
* @use IBaseTriggerProps.state
|
|
37
|
-
* */
|
|
38
|
-
theme?: 'normal' | 'valid' | 'invalid' | false;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface IButtonTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {
|
|
42
|
-
/** Sets the loading state */
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ILinkTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {
|
|
47
|
-
/** Sets the loading state */
|
|
48
|
-
loading?: boolean;
|
|
49
|
-
/** Text color */
|
|
50
|
-
color?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface IFilterTriggerProps extends IBaseTriggerProps {
|
|
54
|
-
/** Click on the filter cleaning cross */
|
|
55
|
-
onClear?: (event: React.SyntheticEvent) => void;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
declare const BaseTrigger: (<T>(props: CProps<IBaseTriggerProps & T>) => ReturnEl) & {
|
|
59
|
-
Text: typeof Box;
|
|
60
|
-
Addon: typeof Box;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
declare const ButtonTrigger: (<T>(props: CProps<IButtonTriggerProps & T>) => ReturnEl) & {
|
|
64
|
-
Text: typeof BaseTrigger.Text;
|
|
65
|
-
Addon: typeof BaseTrigger.Addon;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
declare const LinkTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {
|
|
69
|
-
Text: typeof BaseTrigger.Text;
|
|
70
|
-
Addon: typeof BaseTrigger.Addon;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
declare const FilterTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {
|
|
74
|
-
Text: typeof BaseTrigger.Text;
|
|
75
|
-
Addon: typeof BaseTrigger.Addon;
|
|
76
|
-
Counter: <T>(
|
|
77
|
-
props: ComponentProps<typeof BaseTrigger.Addon> & ComponentProps<typeof Dot> & T,
|
|
78
|
-
) => ReturnEl;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default BaseTrigger;
|
|
82
|
-
export { ButtonTrigger, LinkTrigger, FilterTrigger };
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
-
import Dot from '@semcore/dot';
|
|
5
|
-
import { INeighborItemProps } from '@semcore/neighbor-location';
|
|
6
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
7
|
-
|
|
8
|
-
export interface IBaseTriggerProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps {
|
|
9
|
-
/**
|
|
10
|
-
* Trigger size
|
|
11
|
-
* @default m
|
|
12
|
-
*/
|
|
13
|
-
size?: 'm' | 'l';
|
|
14
|
-
/**
|
|
15
|
-
* Trigger state
|
|
16
|
-
*/
|
|
17
|
-
state?: 'normal' | 'valid' | 'invalid';
|
|
18
|
-
/**
|
|
19
|
-
* Sets active state to trigger
|
|
20
|
-
*/
|
|
21
|
-
active?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Responsible for placeholder displaying
|
|
24
|
-
*/
|
|
25
|
-
empty?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Placeholder text
|
|
28
|
-
*/
|
|
29
|
-
placeholder?: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Sets disabled state to trigger
|
|
32
|
-
*/
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
/** Trigger theme
|
|
35
|
-
* @deprecated
|
|
36
|
-
* @use IBaseTriggerProps.state
|
|
37
|
-
* */
|
|
38
|
-
theme?: 'normal' | 'valid' | 'invalid' | false;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface IButtonTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {
|
|
42
|
-
/** Sets the loading state */
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ILinkTriggerProps extends Omit<IBaseTriggerProps, 'theme'> {
|
|
47
|
-
/** Sets the loading state */
|
|
48
|
-
loading?: boolean;
|
|
49
|
-
/** Text color */
|
|
50
|
-
color?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface IFilterTriggerProps extends IBaseTriggerProps {
|
|
54
|
-
/** Click on the filter cleaning cross */
|
|
55
|
-
onClear?: (event: React.SyntheticEvent) => void;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
declare const BaseTrigger: (<T>(props: CProps<IBaseTriggerProps & T>) => ReturnEl) & {
|
|
59
|
-
Text: typeof Box;
|
|
60
|
-
Addon: typeof Box;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
declare const ButtonTrigger: (<T>(props: CProps<IButtonTriggerProps & T>) => ReturnEl) & {
|
|
64
|
-
Text: typeof BaseTrigger.Text;
|
|
65
|
-
Addon: typeof BaseTrigger.Addon;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
declare const LinkTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {
|
|
69
|
-
Text: typeof BaseTrigger.Text;
|
|
70
|
-
Addon: typeof BaseTrigger.Addon;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
declare const FilterTrigger: (<T>(props: CProps<ILinkTriggerProps & T>) => ReturnEl) & {
|
|
74
|
-
Text: typeof BaseTrigger.Text;
|
|
75
|
-
Addon: typeof BaseTrigger.Addon;
|
|
76
|
-
Counter: <T>(
|
|
77
|
-
props: ComponentProps<typeof BaseTrigger.Addon> & ComponentProps<typeof Dot> & T,
|
|
78
|
-
) => ReturnEl;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default BaseTrigger;
|
|
82
|
-
export { ButtonTrigger, LinkTrigger, FilterTrigger };
|