@ox0/ui 3.19.0 → 3.20.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.
|
@@ -37,6 +37,12 @@ export interface TagGroupProps extends LayoutItemProps {
|
|
|
37
37
|
readonly onRemove?: (keys: Set<string>) => void;
|
|
38
38
|
/** Accessible label for the tag list when no visible `label` is provided. */
|
|
39
39
|
readonly ariaLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Tag size: `"md"` (24px) for fields and filters, `"sm"` (20px, smaller text) for tags shown
|
|
42
|
+
* in a table row or beside other text.
|
|
43
|
+
* @default "md"
|
|
44
|
+
*/
|
|
45
|
+
readonly size?: "sm" | "md";
|
|
40
46
|
/** `<Tag>` children. */
|
|
41
47
|
readonly children: ReactNode;
|
|
42
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-group.d.ts","sourceRoot":"","sources":["../../src/components/tag-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,KAAK,eAAe,EAAuC,MAAM,uBAAuB,CAAA;AACjG,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"tag-group.d.ts","sourceRoot":"","sources":["../../src/components/tag-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,KAAK,eAAe,EAAuC,MAAM,uBAAuB,CAAA;AACjG,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AA6B/E,M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C,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,GAAG,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,GAAG,SAAS,CAwF5F"}
|
package/dist/index.js
CHANGED
|
@@ -5669,6 +5669,21 @@ button.tag-ueb2Qr:focus-visible {
|
|
|
5669
5669
|
outline-offset: 2px;
|
|
5670
5670
|
}
|
|
5671
5671
|
|
|
5672
|
+
.tag-ueb2Qr.sm-LTK7Kz {
|
|
5673
|
+
font-size: var(--ox0-font-size-xs);
|
|
5674
|
+
gap: var(--ox0-space-2xs);
|
|
5675
|
+
min-block-size: 20px;
|
|
5676
|
+
padding-inline: .4375rem;
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
div.tag-ueb2Qr.sm-LTK7Kz {
|
|
5680
|
+
padding-inline-end: 5px;
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
.tag-ueb2Qr.sm-LTK7Kz .tagCell-Gr5mS6 {
|
|
5684
|
+
gap: 2px;
|
|
5685
|
+
}
|
|
5686
|
+
|
|
5672
5687
|
.tag-ueb2Qr[data-color]:not([data-color="gray"]) {
|
|
5673
5688
|
background: color-mix(in oklab, var(--tag-hue) 14%, var(--ox0-color-surface));
|
|
5674
5689
|
border-color: color-mix(in oklab, var(--tag-hue) 40%, var(--ox0-color-surface));
|
|
@@ -5776,8 +5791,9 @@ div.tag-ueb2Qr {
|
|
|
5776
5791
|
tags: "tags-zkvYh0",
|
|
5777
5792
|
tag: "tag-ueb2Qr",
|
|
5778
5793
|
disabled: "disabled-BMkUWI",
|
|
5779
|
-
|
|
5794
|
+
sm: "sm-LTK7Kz",
|
|
5780
5795
|
tagCell: "tagCell-Gr5mS6",
|
|
5796
|
+
selected: "selected-a1JhC8",
|
|
5781
5797
|
dismiss: "dismiss-RvMvmi"
|
|
5782
5798
|
};
|
|
5783
5799
|
const __rspack_default_export = ___CSS_LOADER_EXPORT___;
|
|
@@ -14901,7 +14917,7 @@ function useTagGroupContext() {
|
|
|
14901
14917
|
return ctx;
|
|
14902
14918
|
}
|
|
14903
14919
|
function TagGroup(allProps) {
|
|
14904
|
-
const [layout, { label, description, isInvalid, isDisabled = false, errorMessage, selectionMode = "multiple", selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, onRemove, ariaLabel, children }] = splitLayoutItemProps(allProps);
|
|
14920
|
+
const [layout, { label, description, isInvalid, isDisabled = false, errorMessage, selectionMode = "multiple", selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, onRemove, ariaLabel, size = "md", children }] = splitLayoutItemProps(allProps);
|
|
14905
14921
|
const { style: layoutStyle } = useLayoutItem(layout);
|
|
14906
14922
|
const uid = useId();
|
|
14907
14923
|
const labelId = label ? `${uid}-label` : void 0;
|
|
@@ -15023,6 +15039,7 @@ function TagGroup(allProps) {
|
|
|
15023
15039
|
removeTag
|
|
15024
15040
|
]);
|
|
15025
15041
|
const ctx = useMemo(()=>({
|
|
15042
|
+
size,
|
|
15026
15043
|
selectedKeys,
|
|
15027
15044
|
isDisabled,
|
|
15028
15045
|
selectionMode,
|
|
@@ -15031,6 +15048,7 @@ function TagGroup(allProps) {
|
|
|
15031
15048
|
removeTag,
|
|
15032
15049
|
dismissTag
|
|
15033
15050
|
}), [
|
|
15051
|
+
size,
|
|
15034
15052
|
selectedKeys,
|
|
15035
15053
|
isDisabled,
|
|
15036
15054
|
selectionMode,
|
|
@@ -15088,6 +15106,7 @@ function tag_group_Tag({ id, isDisabled: isDisabledProp, color, children }) {
|
|
|
15088
15106
|
const isSelectable = "none" !== ctx.selectionMode;
|
|
15089
15107
|
const cls = [
|
|
15090
15108
|
tag_group_module.tag,
|
|
15109
|
+
"sm" === ctx.size ? tag_group_module.sm : "",
|
|
15091
15110
|
color ? tag_color_module.hue : "",
|
|
15092
15111
|
isSelected && isSelectable ? tag_group_module.selected : "",
|
|
15093
15112
|
isDisabled ? tag_group_module.disabled : ""
|