@spaced-out/ui-design-system 0.6.23 → 0.6.24
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 +7 -0
- package/lib/components/Chip/Chip.module.css +6 -1
- package/lib/components/Chip/Pill.d.ts +32 -0
- package/lib/components/Chip/Pill.d.ts.map +1 -0
- package/lib/components/Chip/Pill.js +72 -0
- package/lib/components/Chip/index.d.ts +2 -0
- package/lib/components/Chip/index.d.ts.map +1 -1
- package/lib/components/Chip/index.js +14 -1
- package/mcp/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.6.24](https://github.com/spaced-out/ui-design-system/compare/v0.6.23...v0.6.24) (2026-06-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* pill component ([#492](https://github.com/spaced-out/ui-design-system/issues/492)) ([001a9ef](https://github.com/spaced-out/ui-design-system/commit/001a9ef9c132642ffd17cfde9fe990dabac3cb8f))
|
|
11
|
+
|
|
5
12
|
### [0.6.23](https://github.com/spaced-out/ui-design-system/compare/v0.6.22...v0.6.23) (2026-06-25)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
spaceSmall
|
|
22
22
|
) from '../../styles/variables/_space.css';
|
|
23
23
|
@value (
|
|
24
|
-
borderRadiusXSmall
|
|
24
|
+
borderRadiusXSmall,
|
|
25
|
+
borderRadiusXLarge
|
|
25
26
|
) from '../../styles/variables/_border.css';
|
|
26
27
|
@value (
|
|
27
28
|
size18,
|
|
@@ -72,6 +73,10 @@
|
|
|
72
73
|
background-color: colorNeutralLightest;
|
|
73
74
|
}
|
|
74
75
|
|
|
76
|
+
.pill {
|
|
77
|
+
border-radius: borderRadiusXLarge;
|
|
78
|
+
}
|
|
79
|
+
|
|
75
80
|
.noHoverState {
|
|
76
81
|
cursor: initial;
|
|
77
82
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Flow } from 'flow-to-typescript-codemod';
|
|
3
|
+
import type { ChipSemanticType } from '../../components/Chip/Chip';
|
|
4
|
+
import type { IconType } from '../../components/Icon';
|
|
5
|
+
type ClassNames = Readonly<{
|
|
6
|
+
wrapper?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const PILL_SEMANTIC: Readonly<{
|
|
10
|
+
primary: "primary";
|
|
11
|
+
information: "information";
|
|
12
|
+
success: "success";
|
|
13
|
+
warning: "warning";
|
|
14
|
+
danger: "danger";
|
|
15
|
+
secondary: "secondary";
|
|
16
|
+
}>;
|
|
17
|
+
export type PillSemanticType = ChipSemanticType;
|
|
18
|
+
export interface PillProps {
|
|
19
|
+
classNames?: ClassNames;
|
|
20
|
+
semantic?: PillSemanticType;
|
|
21
|
+
size?: 'large' | 'medium' | 'small';
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
line?: number;
|
|
25
|
+
wordBreak?: string;
|
|
26
|
+
iconName?: string;
|
|
27
|
+
iconType?: IconType;
|
|
28
|
+
testId?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const Pill: Flow.AbstractComponent<PillProps, HTMLDivElement>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=Pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Pill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAOlD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;EAAgB,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEhD,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CA8DhE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Pill = exports.PILL_SEMANTIC = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = require("../../utils/classify");
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
10
|
+
var _Chip = require("./Chip");
|
|
11
|
+
var _Icon = require("../Icon");
|
|
12
|
+
var _Truncate = require("../Truncate");
|
|
13
|
+
var _ChipModule = _interopRequireDefault(require("./Chip.module.css"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
const PILL_SEMANTIC = exports.PILL_SEMANTIC = _Chip.CHIP_SEMANTIC;
|
|
18
|
+
const Pill = exports.Pill = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
classNames,
|
|
21
|
+
semantic = 'primary',
|
|
22
|
+
size = 'medium',
|
|
23
|
+
children,
|
|
24
|
+
disabled,
|
|
25
|
+
line = 1,
|
|
26
|
+
wordBreak,
|
|
27
|
+
iconName,
|
|
28
|
+
iconType = 'regular',
|
|
29
|
+
testId
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
33
|
+
base: testId,
|
|
34
|
+
slot: 'root'
|
|
35
|
+
}),
|
|
36
|
+
ref: ref,
|
|
37
|
+
className: (0, _classify.classify)(_ChipModule.default.chipWrapper, _ChipModule.default.pill, _ChipModule.default.noHoverState, {
|
|
38
|
+
[_ChipModule.default.primary]: semantic === _Chip.CHIP_SEMANTIC.primary,
|
|
39
|
+
[_ChipModule.default.information]: semantic === _Chip.CHIP_SEMANTIC.information,
|
|
40
|
+
[_ChipModule.default.success]: semantic === _Chip.CHIP_SEMANTIC.success,
|
|
41
|
+
[_ChipModule.default.warning]: semantic === _Chip.CHIP_SEMANTIC.warning,
|
|
42
|
+
[_ChipModule.default.danger]: semantic === _Chip.CHIP_SEMANTIC.danger,
|
|
43
|
+
[_ChipModule.default.secondary]: semantic === _Chip.CHIP_SEMANTIC.secondary,
|
|
44
|
+
[_ChipModule.default.large]: size === 'large',
|
|
45
|
+
[_ChipModule.default.medium]: size === 'medium',
|
|
46
|
+
[_ChipModule.default.small]: size === 'small',
|
|
47
|
+
[_ChipModule.default.withIcon]: !!iconName && size !== 'small',
|
|
48
|
+
[_ChipModule.default.disabled]: disabled
|
|
49
|
+
}, classNames?.wrapper),
|
|
50
|
+
children: [iconName && size !== 'small' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
51
|
+
className: (0, _classify.classify)(_ChipModule.default.chipIcon, {
|
|
52
|
+
[_ChipModule.default.alignTop]: line > 1
|
|
53
|
+
}, classNames?.icon),
|
|
54
|
+
name: iconName,
|
|
55
|
+
type: iconType,
|
|
56
|
+
size: "small",
|
|
57
|
+
testId: (0, _qa.generateTestId)({
|
|
58
|
+
base: testId,
|
|
59
|
+
slot: 'icon'
|
|
60
|
+
})
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
62
|
+
line: line,
|
|
63
|
+
wordBreak: wordBreak,
|
|
64
|
+
testId: (0, _qa.generateTestId)({
|
|
65
|
+
base: testId,
|
|
66
|
+
slot: 'text'
|
|
67
|
+
}),
|
|
68
|
+
children: children
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
Pill.displayName = 'Pill';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type { ChipProps, ChipSemanticType } from '../../components/Chip/Chip';
|
|
2
2
|
export { Chip, CHIP_SEMANTIC } from '../../components/Chip/Chip';
|
|
3
|
+
export type { PillProps, PillSemanticType } from '../../components/Chip/Pill';
|
|
4
|
+
export { Pill, PILL_SEMANTIC } from '../../components/Chip/Pill';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC"}
|
|
@@ -15,4 +15,17 @@ Object.defineProperty(exports, "Chip", {
|
|
|
15
15
|
return _Chip.Chip;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
Object.defineProperty(exports, "PILL_SEMANTIC", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _Pill.PILL_SEMANTIC;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "Pill", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _Pill.Pill;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _Chip = require("./Chip");
|
|
31
|
+
var _Pill = require("./Pill");
|
package/mcp/package.json
CHANGED