@common-origin/design-system 1.6.0 → 1.7.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/README.md +41 -9
- package/dist/components/atoms/Divider/Divider.d.ts +30 -0
- package/dist/components/atoms/Divider/index.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/index.esm.js +69 -26
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +69 -26
- package/dist/index.js.map +1 -1
- package/dist/types/icons.d.ts +1 -1
- package/package.json +3 -2
- package/dist/components/atoms/SectionSeparator/SectionSeparator.d.ts +0 -26
- package/dist/components/atoms/SectionSeparator/index.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1106,6 +1106,10 @@ var link = {
|
|
|
1106
1106
|
path: "M10 7C10.5523 7 11 7.44772 11 8C11 8.55228 10.5523 9 10 9H7C5.34315 9 4 10.3431 4 12C4 13.6569 5.34315 15 7 15H10C10.5523 15 11 15.4477 11 16C11 16.5523 10.5523 17 10 17H7C4.23858 17 2 14.7614 2 12C2 9.23858 4.23858 7 7 7H10Z M17 7C19.7614 7 22 9.23858 22 12C22 14.7614 19.7614 17 17 17H14C13.4477 17 13 16.5523 13 16C13 15.4477 13.4477 15 14 15H17C18.6569 15 20 13.6569 20 12C20 10.3431 18.6569 9 17 9H14C13.4477 9 13 8.55228 13 8C13 7.44772 13.4477 7 14 7H17Z M16 11C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H8C7.44772 13 7 12.5523 7 12C7 11.4477 7.44772 11 8 11H16Z",
|
|
1107
1107
|
name: "link"
|
|
1108
1108
|
};
|
|
1109
|
+
var table = {
|
|
1110
|
+
path: "M20 10H16V19H19C19.4995 19 19.7737 18.9982 19.9639 18.9727C19.9662 18.9724 19.9685 18.971 19.9707 18.9707C19.971 18.9685 19.9724 18.9662 19.9727 18.9639C19.9982 18.7737 20 18.4995 20 18V10ZM22 18C22 18.4431 22.0018 18.876 21.9541 19.2305C21.9026 19.6137 21.7773 20.0509 21.4141 20.4141C21.0509 20.7773 20.6137 20.9026 20.2305 20.9541C19.876 21.0018 19.4431 21 19 21H14V8.00001H22V18Z M10 8.00001V21H5.00001C4.55687 21 4.12397 21.0018 3.76954 20.9541C3.38634 20.9026 2.94916 20.7773 2.58595 20.4141C2.22273 20.0509 2.09743 19.6137 2.04591 19.2305C1.99825 18.876 2.00001 18.4431 2.00001 18V8.00001H10ZM4.00001 18C4.00001 18.4995 4.00181 18.7737 4.02735 18.9639C4.02766 18.9661 4.02803 18.9685 4.02833 18.9707C4.03085 18.9711 4.03351 18.9723 4.03614 18.9727C4.22633 18.9982 4.50051 19 5.00001 19H8.00001V10H4.00001V18Z M16 8.00001V21H8.00001V8.00001H16ZM10 19H14V10H10V19Z M20 6.00001C20 5.50051 19.9982 5.22633 19.9727 5.03614C19.9723 5.03351 19.9711 5.03085 19.9707 5.02833C19.9685 5.02803 19.9661 5.02766 19.9639 5.02735C19.7737 5.00181 19.4995 5.00001 19 5.00001H5.00001C4.50051 5.00001 4.22633 5.00181 4.03614 5.02735C4.03355 5.0277 4.03081 5.02798 4.02833 5.02833C4.02798 5.03081 4.0277 5.03355 4.02735 5.03614C4.00181 5.22633 4.00001 5.50051 4.00001 6.00001V8.00001H20V6.00001ZM22 10H2.00001V6.00001C2.00001 5.55687 1.99825 5.12397 2.04591 4.76954C2.09743 4.38634 2.22273 3.94916 2.58595 3.58595C2.94916 3.22273 3.38634 3.09743 3.76954 3.04591C4.12397 2.99825 4.55687 3.00001 5.00001 3.00001H19C19.4431 3.00001 19.876 2.99825 20.2305 3.04591C20.6137 3.09743 21.0509 3.22273 21.4141 3.58595C21.7773 3.94916 21.9026 4.38634 21.9541 4.76954C22.0018 5.12397 22 5.55687 22 6.00001V10Z",
|
|
1111
|
+
name: "table"
|
|
1112
|
+
};
|
|
1109
1113
|
var userBox = {
|
|
1110
1114
|
path: "M12 6C14.2091 6 16 7.79086 16 10C16 12.2091 14.2091 14 12 14C9.79086 14 8 12.2091 8 10C8 7.79086 9.79086 6 12 6ZM12 8C10.8954 8 10 8.89543 10 10C10 11.1046 10.8954 12 12 12C13.1046 12 14 11.1046 14 10C14 8.89543 13.1046 8 12 8Z M14 2C17.7712 2 19.6566 2.0003 20.8281 3.17188C21.9997 4.34345 22 6.22876 22 10V14C22 17.7712 21.9997 19.6566 20.8281 20.8281C19.803 21.8533 18.2315 21.982 15.3281 21.998L14 22H10L8.67188 21.998C5.8719 21.9826 4.31033 21.8625 3.2832 20.9346L3.17188 20.8281C2.14675 19.803 2.01797 18.2315 2.00195 15.3281L2 14V10C2 6.34627 2 4.46248 3.06543 3.2832L3.17188 3.17188C4.34345 2.0003 6.22876 2 10 2H14ZM12 18C10.8577 18 9.76263 18.3153 8.88574 18.876C8.39459 19.1901 7.99492 19.5688 7.69043 19.9834C8.33459 19.9972 9.09233 20 10 20H14C14.9072 20 15.6646 19.9971 16.3086 19.9834C16.0041 19.5689 15.6052 19.19 15.1143 18.876C14.2374 18.3153 13.1423 18 12 18ZM10 4C8.05784 4 6.80197 4.00454 5.87695 4.12891C5.00986 4.24554 4.73816 4.43372 4.58594 4.58594C4.43372 4.73816 4.24554 5.00986 4.12891 5.87695C4.00454 6.80197 4 8.05784 4 10V14C4 15.9422 4.00454 17.198 4.12891 18.123C4.24554 18.9901 4.43372 19.2618 4.58594 19.4141C4.71234 19.5405 4.92163 19.6893 5.48535 19.8037C5.96679 18.7505 6.77822 17.8493 7.80859 17.1904C9.02742 16.4111 10.5007 16 12 16C13.4993 16 14.9726 16.4111 16.1914 17.1904C17.2217 17.8492 18.0322 18.7507 18.5137 19.8037C19.0781 19.6893 19.2876 19.5405 19.4141 19.4141C19.5663 19.2618 19.7545 18.9901 19.8711 18.123C19.9955 17.198 20 15.9422 20 14V10C20 8.05784 19.9955 6.80197 19.8711 5.87695C19.7545 5.00986 19.5663 4.73816 19.4141 4.58594C19.2618 4.43372 18.9901 4.24554 18.123 4.12891C17.198 4.00454 15.9422 4 14 4H10Z",
|
|
1111
1115
|
name: "userBox"
|
|
@@ -1121,6 +1125,10 @@ var iconsData = {
|
|
|
1121
1125
|
check: check,
|
|
1122
1126
|
close: close,
|
|
1123
1127
|
directionRight: directionRight,
|
|
1128
|
+
"export": {
|
|
1129
|
+
path: "M7.70703 10.707L11 7.41406L11 14C11 14.5523 11.4477 15 12 15C12.5523 15 13 14.5523 13 14V7.41406L16.293 10.707L17.707 9.29297L12 3.58594L6.29297 9.29297L7.70703 10.707Z M4 17V16H6V17C6 17.5523 6.44772 18 7 18H17C17.5523 18 18 17.5523 18 17V16H20V17C20 18.6051 18.7394 19.9158 17.1543 19.9961L17 20H7C5.34315 20 4 18.6569 4 17Z",
|
|
1130
|
+
name: "export"
|
|
1131
|
+
},
|
|
1124
1132
|
menu: menu,
|
|
1125
1133
|
pause: pause,
|
|
1126
1134
|
play: play,
|
|
@@ -1129,6 +1137,7 @@ var iconsData = {
|
|
|
1129
1137
|
message: message,
|
|
1130
1138
|
copy: copy,
|
|
1131
1139
|
link: link,
|
|
1140
|
+
table: table,
|
|
1132
1141
|
userBox: userBox
|
|
1133
1142
|
};
|
|
1134
1143
|
|
|
@@ -1396,9 +1405,9 @@ var BaseChipStyled = styled.span.withConfig({
|
|
|
1396
1405
|
},
|
|
1397
1406
|
displayName: "ChipBase__BaseChipStyled",
|
|
1398
1407
|
componentId: "sc-moa6zc-0"
|
|
1399
|
-
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius:
|
|
1408
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: 12px;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: 12px;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"
|
|
1400
1409
|
// Icon container for selected indicator or leading icons
|
|
1401
|
-
])),
|
|
1410
|
+
])), tokens.semantic.motion.interactive, chip.variants.interactive.backgroundColor);
|
|
1402
1411
|
// Icon container for selected indicator or leading icons
|
|
1403
1412
|
var IconContainer = styled.span.withConfig({
|
|
1404
1413
|
displayName: "ChipBase__IconContainer",
|
|
@@ -1954,49 +1963,78 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1954
1963
|
var templateObject_1$c, templateObject_2$5, templateObject_3$4, templateObject_4$3, templateObject_5$3, templateObject_6$1, templateObject_7$1;
|
|
1955
1964
|
|
|
1956
1965
|
React.createElement;
|
|
1957
|
-
var
|
|
1966
|
+
var StyledDivider = styled.div.withConfig({
|
|
1958
1967
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1959
1968
|
return !prop.startsWith('$');
|
|
1960
1969
|
},
|
|
1961
|
-
displayName: "
|
|
1962
|
-
componentId: "sc-
|
|
1963
|
-
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n border: none;\n
|
|
1970
|
+
displayName: "Divider__StyledDivider",
|
|
1971
|
+
componentId: "sc-1l0c8ja-0"
|
|
1972
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"], ["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"
|
|
1964
1973
|
/**
|
|
1965
|
-
*
|
|
1974
|
+
* Divider is an atomic component that provides visual separation between content sections.
|
|
1966
1975
|
*
|
|
1967
1976
|
* Features:
|
|
1968
1977
|
* - Multiple variants (default, strong, minimal)
|
|
1969
1978
|
* - Size variations for different spacing needs
|
|
1979
|
+
* - Horizontal and vertical orientations
|
|
1970
1980
|
* - Semantic token usage for consistent styling
|
|
1971
1981
|
* - Full accessibility support
|
|
1972
1982
|
*
|
|
1973
1983
|
* @example
|
|
1974
1984
|
* ```tsx
|
|
1975
|
-
* <
|
|
1976
|
-
* <
|
|
1977
|
-
* <
|
|
1985
|
+
* <Divider />
|
|
1986
|
+
* <Divider variant="strong" size="xlarge" />
|
|
1987
|
+
* <Divider variant="minimal" />
|
|
1988
|
+
* <Divider orientation="vertical" />
|
|
1978
1989
|
* ```
|
|
1979
1990
|
*/])), function (_a) {
|
|
1991
|
+
var _b = _a.$orientation,
|
|
1992
|
+
$orientation = _b === void 0 ? 'horizontal' : _b;
|
|
1993
|
+
if ($orientation === 'vertical') {
|
|
1994
|
+
return "\n display: inline-block;\n height: auto;\n align-self: stretch;\n border-left: 1px solid;\n border-top: none;\n ";
|
|
1995
|
+
}
|
|
1996
|
+
return "border-top: 1px solid;";
|
|
1997
|
+
}, function (_a) {
|
|
1980
1998
|
var _b = _a.$variant,
|
|
1981
|
-
$variant = _b === void 0 ? 'default' : _b
|
|
1999
|
+
$variant = _b === void 0 ? 'default' : _b,
|
|
2000
|
+
_c = _a.$orientation,
|
|
2001
|
+
$orientation = _c === void 0 ? 'horizontal' : _c;
|
|
2002
|
+
var borderProperty = $orientation === 'vertical' ? 'border-left' : 'border-top';
|
|
1982
2003
|
switch ($variant) {
|
|
1983
2004
|
case 'strong':
|
|
1984
|
-
return "
|
|
2005
|
+
return "".concat(borderProperty, ": ").concat(tokens.component.separator.variants.strong.border, ";");
|
|
1985
2006
|
case 'minimal':
|
|
1986
|
-
return "
|
|
2007
|
+
return "".concat(borderProperty, ": ").concat(tokens.component.separator.variants.minimal.border, ";");
|
|
1987
2008
|
case 'default':
|
|
1988
2009
|
default:
|
|
1989
|
-
return "
|
|
2010
|
+
return "".concat(borderProperty, ": ").concat(tokens.component.separator.variants["default"].border, ";");
|
|
1990
2011
|
}
|
|
1991
2012
|
}, function (_a) {
|
|
1992
2013
|
var _b = _a.$size,
|
|
1993
2014
|
$size = _b === void 0 ? 'large' : _b,
|
|
1994
2015
|
_c = _a.$variant,
|
|
1995
|
-
$variant = _c === void 0 ? 'default' : _c
|
|
1996
|
-
|
|
1997
|
-
|
|
2016
|
+
$variant = _c === void 0 ? 'default' : _c,
|
|
2017
|
+
_d = _a.$orientation,
|
|
2018
|
+
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
2019
|
+
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
2020
|
+
// Minimal variant always uses its predefined spacing for horizontal
|
|
1998
2021
|
return "margin: ".concat(tokens.component.separator.variants.minimal.margin, ";");
|
|
1999
2022
|
}
|
|
2023
|
+
if ($orientation === 'vertical') {
|
|
2024
|
+
// Vertical orientation uses horizontal margins (left/right)
|
|
2025
|
+
switch ($size) {
|
|
2026
|
+
case 'small':
|
|
2027
|
+
return "margin: 0 ".concat(tokens.semantic.spacing.separator.sm, ";");
|
|
2028
|
+
case 'medium':
|
|
2029
|
+
return "margin: 0 ".concat(tokens.semantic.spacing.separator.md, ";");
|
|
2030
|
+
case 'xlarge':
|
|
2031
|
+
return "margin: 0 ".concat(tokens.semantic.spacing.separator.xl, ";");
|
|
2032
|
+
case 'large':
|
|
2033
|
+
default:
|
|
2034
|
+
return "margin: 0 ".concat(tokens.semantic.spacing.separator.lg, ";");
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
// Horizontal orientation uses vertical margins (top/bottom)
|
|
2000
2038
|
switch ($size) {
|
|
2001
2039
|
case 'small':
|
|
2002
2040
|
return "margin: ".concat(tokens.component.separator.sizes.small.margin, ";");
|
|
@@ -2010,33 +2048,38 @@ var StyledSeparator = styled.div.withConfig({
|
|
|
2010
2048
|
}
|
|
2011
2049
|
});
|
|
2012
2050
|
/**
|
|
2013
|
-
*
|
|
2051
|
+
* Divider is an atomic component that provides visual separation between content sections.
|
|
2014
2052
|
*
|
|
2015
2053
|
* Features:
|
|
2016
2054
|
* - Multiple variants (default, strong, minimal)
|
|
2017
2055
|
* - Size variations for different spacing needs
|
|
2056
|
+
* - Horizontal and vertical orientations
|
|
2018
2057
|
* - Semantic token usage for consistent styling
|
|
2019
2058
|
* - Full accessibility support
|
|
2020
2059
|
*
|
|
2021
2060
|
* @example
|
|
2022
2061
|
* ```tsx
|
|
2023
|
-
* <
|
|
2024
|
-
* <
|
|
2025
|
-
* <
|
|
2062
|
+
* <Divider />
|
|
2063
|
+
* <Divider variant="strong" size="xlarge" />
|
|
2064
|
+
* <Divider variant="minimal" />
|
|
2065
|
+
* <Divider orientation="vertical" />
|
|
2026
2066
|
* ```
|
|
2027
2067
|
*/
|
|
2028
|
-
var
|
|
2068
|
+
var Divider = function Divider(_a) {
|
|
2029
2069
|
var _b = _a.variant,
|
|
2030
2070
|
variant = _b === void 0 ? 'default' : _b,
|
|
2031
2071
|
_c = _a.size,
|
|
2032
2072
|
size = _c === void 0 ? 'large' : _c,
|
|
2073
|
+
_d = _a.orientation,
|
|
2074
|
+
orientation = _d === void 0 ? 'horizontal' : _d,
|
|
2033
2075
|
dataTestId = _a["data-testid"];
|
|
2034
|
-
return /*#__PURE__*/React.createElement(
|
|
2076
|
+
return /*#__PURE__*/React.createElement(StyledDivider, {
|
|
2035
2077
|
$variant: variant,
|
|
2036
2078
|
$size: size,
|
|
2079
|
+
$orientation: orientation,
|
|
2037
2080
|
"data-testid": dataTestId,
|
|
2038
2081
|
role: "separator",
|
|
2039
|
-
"aria-orientation":
|
|
2082
|
+
"aria-orientation": orientation
|
|
2040
2083
|
});
|
|
2041
2084
|
};
|
|
2042
2085
|
var templateObject_1$b;
|
|
@@ -2496,7 +2539,7 @@ var DesignCard = function DesignCard(_a) {
|
|
|
2496
2539
|
url: readMoreHref
|
|
2497
2540
|
}, readMoreText) : /*#__PURE__*/React.createElement(Button, {
|
|
2498
2541
|
onClick: onReadMore
|
|
2499
|
-
}, readMoreText)))))), /*#__PURE__*/React.createElement(
|
|
2542
|
+
}, readMoreText)))))), /*#__PURE__*/React.createElement(Divider, null));
|
|
2500
2543
|
}
|
|
2501
2544
|
return null;
|
|
2502
2545
|
};
|
|
@@ -3007,6 +3050,7 @@ exports.CodeBlock = CodeBlock;
|
|
|
3007
3050
|
exports.Container = Container;
|
|
3008
3051
|
exports.DateFormatter = DateFormatter;
|
|
3009
3052
|
exports.DesignCard = DesignCard;
|
|
3053
|
+
exports.Divider = Divider;
|
|
3010
3054
|
exports.Dropdown = Dropdown;
|
|
3011
3055
|
exports.FilterChip = FilterChip;
|
|
3012
3056
|
exports.Grid = Grid;
|
|
@@ -3019,7 +3063,6 @@ exports.Picture = Picture;
|
|
|
3019
3063
|
exports.ProgressBar = ProgressBar;
|
|
3020
3064
|
exports.ReleaseCard = ReleaseCard;
|
|
3021
3065
|
exports.ResponsiveGrid = ResponsiveGrid;
|
|
3022
|
-
exports.SectionSeparator = SectionSeparator;
|
|
3023
3066
|
exports.Stack = Stack;
|
|
3024
3067
|
exports.Typography = Typography;
|
|
3025
3068
|
exports.iconsData = iconsData;
|