@stella-source/stellasource-dsl 3.3.1 → 3.4.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/dist/cjs/index.js +65 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/SelectorChip/SelectorChip.d.ts +12 -0
- package/dist/cjs/types/components/SelectorChip/SelectorChip.stories.d.ts +14 -0
- package/dist/cjs/types/components/SelectorChip/styles.d.ts +7 -0
- package/dist/cjs/types/components/SelectorChip/types.d.ts +9 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.esm.js +65 -1
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/SelectorChip/SelectorChip.d.ts +12 -0
- package/dist/esm/types/components/SelectorChip/SelectorChip.stories.d.ts +14 -0
- package/dist/esm/types/components/SelectorChip/styles.d.ts +7 -0
- package/dist/esm/types/components/SelectorChip/types.d.ts +9 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +12 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -23084,6 +23084,70 @@ const Tabs = ({ id, className, tabs, htmlProps, onTabClick, defaultActiveTab, va
|
|
|
23084
23084
|
return (a$m.createElement(TabsBar, { "$variant": variant, "$isPill": isPill, id: id, className: className, ...htmlProps }, tabs.map((tab) => (a$m.createElement(Tab, { key: `${id}-${tab.label}`, id: `${id}-${tab.label}`, label: tab.label, active: tab.label === activeTab, variant: variant, onClick: () => handleClick(tab.label), notifications: tab.notifications })))));
|
|
23085
23085
|
};
|
|
23086
23086
|
|
|
23087
|
+
const SelectorChipComponent = styled.button `
|
|
23088
|
+
display: inline-flex;
|
|
23089
|
+
align-items: center;
|
|
23090
|
+
justify-content: center;
|
|
23091
|
+
gap: 5px;
|
|
23092
|
+
height: 24px;
|
|
23093
|
+
padding: 2px 8px;
|
|
23094
|
+
border-radius: 4px;
|
|
23095
|
+
border: 1px solid var(--grey200);
|
|
23096
|
+
font-size: 14px;
|
|
23097
|
+
line-height: 1;
|
|
23098
|
+
font-weight: 500;
|
|
23099
|
+
font-family: "inter";
|
|
23100
|
+
cursor: pointer;
|
|
23101
|
+
transition: 0.15s ease;
|
|
23102
|
+
background-color: var(--white);
|
|
23103
|
+
color: var(--charcoal);
|
|
23104
|
+
|
|
23105
|
+
${({ $selected }) => $selected
|
|
23106
|
+
? styled.css `
|
|
23107
|
+
background-color: var(--grey700);
|
|
23108
|
+
border-color: var(--grey700);
|
|
23109
|
+
color: var(--white);
|
|
23110
|
+
`
|
|
23111
|
+
: styled.css `
|
|
23112
|
+
&:hover {
|
|
23113
|
+
background: var(--grey50);
|
|
23114
|
+
}
|
|
23115
|
+
`}
|
|
23116
|
+
|
|
23117
|
+
&:disabled {
|
|
23118
|
+
background-color: var(--light-grey);
|
|
23119
|
+
border-color: var(--light-grey);
|
|
23120
|
+
color: var(--smoke);
|
|
23121
|
+
cursor: not-allowed;
|
|
23122
|
+
}
|
|
23123
|
+
`;
|
|
23124
|
+
const SelectorChipLabel = styled.span `
|
|
23125
|
+
display: flex;
|
|
23126
|
+
align-items: center;
|
|
23127
|
+
`;
|
|
23128
|
+
const SelectorChipClose = styled.button `
|
|
23129
|
+
display: flex;
|
|
23130
|
+
align-items: center;
|
|
23131
|
+
justify-content: center;
|
|
23132
|
+
|
|
23133
|
+
border: none;
|
|
23134
|
+
background: transparent;
|
|
23135
|
+
padding: 0;
|
|
23136
|
+
|
|
23137
|
+
cursor: pointer;
|
|
23138
|
+
color: inherit;
|
|
23139
|
+
`;
|
|
23140
|
+
|
|
23141
|
+
const SelectorChip = ({ id, className, label, selected = false, disabled = false, onClick, onClose, }) => {
|
|
23142
|
+
return (a$m.createElement(SelectorChipComponent, { id: id, className: className, "$selected": selected, disabled: disabled, onClick: onClick },
|
|
23143
|
+
a$m.createElement(SelectorChipLabel, null, label),
|
|
23144
|
+
selected && (a$m.createElement(SelectorChipClose, { type: "button", "aria-label": "Remove chip", disabled: disabled, onClick: (e) => {
|
|
23145
|
+
e.stopPropagation();
|
|
23146
|
+
onClose?.();
|
|
23147
|
+
} },
|
|
23148
|
+
a$m.createElement(e, { size: 16 })))));
|
|
23149
|
+
};
|
|
23150
|
+
|
|
23087
23151
|
const OrderStatusComponent = styled.div `
|
|
23088
23152
|
display: flex;
|
|
23089
23153
|
align-items: center;
|
|
@@ -23169,6 +23233,7 @@ exports.OrderStatus = OrderStatus;
|
|
|
23169
23233
|
exports.Pagination = Pagination;
|
|
23170
23234
|
exports.PasswordInput = PasswordInput;
|
|
23171
23235
|
exports.PaymentStatus = PaymentStatus;
|
|
23236
|
+
exports.SelectorChip = SelectorChip;
|
|
23172
23237
|
exports.StellaButton = StellaButton;
|
|
23173
23238
|
exports.StellaIcon = StellaIcon;
|
|
23174
23239
|
exports.Styles = Styles;
|