@j2-health/design-system 0.5.4 → 0.6.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/index.cjs +15 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -2
- package/dist/index2.js +9 -2
- package/dist/src/components/alert/Alert.cjs +4 -2
- package/dist/src/components/alert/Alert.cjs.map +1 -1
- package/dist/src/components/alert/Alert.d.ts +2 -2
- package/dist/src/components/alert/Alert.js +3 -2
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/button/Button.cjs +7 -2
- package/dist/src/components/button/Button.cjs.map +1 -1
- package/dist/src/components/button/Button.d.ts +10 -2
- package/dist/src/components/button/Button.js +5 -2
- package/dist/src/components/button/Button.js.map +1 -1
- package/dist/src/components/card/Card.cjs +16 -2
- package/dist/src/components/card/Card.cjs.map +1 -1
- package/dist/src/components/card/Card.d.ts +7 -1
- package/dist/src/components/card/Card.js +16 -2
- package/dist/src/components/card/Card.js.map +1 -1
- package/dist/src/components/changeChip/ChangeChip.cjs +52 -0
- package/dist/src/components/changeChip/ChangeChip.cjs.map +1 -0
- package/dist/src/components/changeChip/ChangeChip.d.ts +40 -0
- package/dist/src/components/changeChip/ChangeChip.js +49 -0
- package/dist/src/components/changeChip/ChangeChip.js.map +1 -0
- package/dist/src/components/changeChip/index.d.ts +1 -0
- package/dist/src/components/collapse/Collapse.cjs +9 -2
- package/dist/src/components/collapse/Collapse.cjs.map +1 -1
- package/dist/src/components/collapse/Collapse.d.ts +7 -1
- package/dist/src/components/collapse/Collapse.js +9 -2
- package/dist/src/components/collapse/Collapse.js.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.cjs +7 -4
- package/dist/src/components/collapse/Collapse.module.css.cjs.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.js +7 -5
- package/dist/src/components/collapse/Collapse.module.css.js.map +1 -1
- package/dist/src/components/dropdown/Dropdown.cjs +6 -1
- package/dist/src/components/dropdown/Dropdown.cjs.map +1 -1
- package/dist/src/components/dropdown/Dropdown.d.ts +8 -1
- package/dist/src/components/dropdown/Dropdown.js +6 -1
- package/dist/src/components/dropdown/Dropdown.js.map +1 -1
- package/dist/src/components/emptyState/EmptyState.cjs +39 -0
- package/dist/src/components/emptyState/EmptyState.cjs.map +1 -0
- package/dist/src/components/emptyState/EmptyState.d.ts +20 -0
- package/dist/src/components/emptyState/EmptyState.js +37 -0
- package/dist/src/components/emptyState/EmptyState.js.map +1 -0
- package/dist/src/components/emptyState/index.d.ts +1 -0
- package/dist/src/components/input/AntdInput.d.ts +1 -1
- package/dist/src/components/input/AntdSearchInput.d.ts +1 -1
- package/dist/src/components/listRow/ListRow.cjs +65 -0
- package/dist/src/components/listRow/ListRow.cjs.map +1 -0
- package/dist/src/components/listRow/ListRow.d.ts +41 -0
- package/dist/src/components/listRow/ListRow.js +63 -0
- package/dist/src/components/listRow/ListRow.js.map +1 -0
- package/dist/src/components/listRow/index.d.ts +1 -0
- package/dist/src/components/modal/Modal.cjs +9 -3
- package/dist/src/components/modal/Modal.cjs.map +1 -1
- package/dist/src/components/modal/Modal.d.ts +3 -1
- package/dist/src/components/modal/Modal.js +10 -4
- package/dist/src/components/modal/Modal.js.map +1 -1
- package/dist/src/components/navMenu/NavMenu.cjs +2 -2
- package/dist/src/components/navMenu/NavMenu.cjs.map +1 -1
- package/dist/src/components/navMenu/NavMenu.d.ts +3 -1
- package/dist/src/components/navMenu/NavMenu.js +2 -2
- package/dist/src/components/navMenu/NavMenu.js.map +1 -1
- package/dist/src/components/popover/Popover.cjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +1 -1
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.module.css.cjs +12 -9
- package/dist/src/components/popover/Popover.module.css.cjs.map +1 -1
- package/dist/src/components/popover/Popover.module.css.js +12 -10
- package/dist/src/components/popover/Popover.module.css.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.cjs +16 -12
- package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.d.ts +15 -3
- package/dist/src/components/select/SummarizedSelect.js +16 -12
- package/dist/src/components/select/SummarizedSelect.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +15 -9
- package/dist/src/components/select/SummarizedSelect.module.css.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.js +14 -10
- package/dist/src/components/select/SummarizedSelect.module.css.js.map +1 -1
- package/dist/src/components/statusPill/StatusPill.cjs +47 -0
- package/dist/src/components/statusPill/StatusPill.cjs.map +1 -0
- package/dist/src/components/statusPill/StatusPill.d.ts +28 -0
- package/dist/src/components/statusPill/StatusPill.js +45 -0
- package/dist/src/components/statusPill/StatusPill.js.map +1 -0
- package/dist/src/components/statusPill/StatusPill.module.css.cjs +20 -0
- package/dist/src/components/statusPill/StatusPill.module.css.cjs.map +1 -0
- package/dist/src/components/statusPill/StatusPill.module.css.js +16 -0
- package/dist/src/components/statusPill/StatusPill.module.css.js.map +1 -0
- package/dist/src/components/statusPill/index.d.ts +1 -0
- package/dist/src/components/swatch/Swatch.cjs +50 -0
- package/dist/src/components/swatch/Swatch.cjs.map +1 -0
- package/dist/src/components/swatch/Swatch.d.ts +24 -0
- package/dist/src/components/swatch/Swatch.js +48 -0
- package/dist/src/components/swatch/Swatch.js.map +1 -0
- package/dist/src/components/swatch/index.d.ts +1 -0
- package/dist/src/components/swatchStrip/SwatchStrip.cjs +50 -0
- package/dist/src/components/swatchStrip/SwatchStrip.cjs.map +1 -0
- package/dist/src/components/swatchStrip/SwatchStrip.d.ts +25 -0
- package/dist/src/components/swatchStrip/SwatchStrip.js +50 -0
- package/dist/src/components/swatchStrip/SwatchStrip.js.map +1 -0
- package/dist/src/components/swatchStrip/index.d.ts +1 -0
- package/dist/src/components/switch/Switch.cjs +7 -3
- package/dist/src/components/switch/Switch.cjs.map +1 -1
- package/dist/src/components/switch/Switch.d.ts +1 -1
- package/dist/src/components/switch/Switch.js +5 -3
- package/dist/src/components/switch/Switch.js.map +1 -1
- package/dist/src/components/tabs/Tabs.cjs +6 -1
- package/dist/src/components/tabs/Tabs.cjs.map +1 -1
- package/dist/src/components/tabs/Tabs.d.ts +10 -2
- package/dist/src/components/tabs/Tabs.js +4 -1
- package/dist/src/components/tabs/Tabs.js.map +1 -1
- package/dist/src/components/tabs/Tabs.module.css.cjs +13 -0
- package/dist/src/components/tabs/Tabs.module.css.cjs.map +1 -0
- package/dist/src/components/tabs/Tabs.module.css.js +11 -0
- package/dist/src/components/tabs/Tabs.module.css.js.map +1 -0
- package/dist/src/components/tag/Tag.cjs +13 -6
- package/dist/src/components/tag/Tag.cjs.map +1 -1
- package/dist/src/components/tag/Tag.d.ts +13 -2
- package/dist/src/components/tag/Tag.js +13 -6
- package/dist/src/components/tag/Tag.js.map +1 -1
- package/dist/src/components/thresholdBar/ThresholdBar.cjs +128 -0
- package/dist/src/components/thresholdBar/ThresholdBar.cjs.map +1 -0
- package/dist/src/components/thresholdBar/ThresholdBar.d.ts +36 -0
- package/dist/src/components/thresholdBar/ThresholdBar.js +125 -0
- package/dist/src/components/thresholdBar/ThresholdBar.js.map +1 -0
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.cjs +19 -0
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.cjs.map +1 -0
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.js +15 -0
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.js.map +1 -0
- package/dist/src/components/thresholdBar/index.d.ts +1 -0
- package/dist/src/index.d.ts +0 -13
- package/dist/style.css +346 -41
- package/dist/tailwind.cjs +56 -0
- package/dist/tailwind.cjs.map +1 -1
- package/dist/tailwind.config.d.ts +112 -0
- package/dist/tailwind.js +56 -0
- package/dist/tailwind.js.map +1 -1
- package/package.json +2 -2
- package/src/stylesheets/Colors.stories.tsx +163 -0
- package/src/stylesheets/base.css +110 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MenuProps } from 'antd';
|
|
2
|
+
export type StatusPillProps = {
|
|
3
|
+
/** What the pill reports, e.g. "Draft saved". */
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** Emphasized detail after the label, e.g. counts. */
|
|
6
|
+
detail?: React.ReactNode;
|
|
7
|
+
/** `'warning'` tints the pill for something that needs attention. */
|
|
8
|
+
tone?: 'default' | 'warning';
|
|
9
|
+
/** Makes the label a button. */
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
/** Makes the label open this menu instead. */
|
|
12
|
+
menu?: MenuProps;
|
|
13
|
+
/** Accessible name for the label's button or menu trigger. */
|
|
14
|
+
labelAriaLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A control at the end: a small `Button` or a `Switch`. It sits beside
|
|
17
|
+
* the label, not inside it, so its clicks never trigger the label.
|
|
18
|
+
*/
|
|
19
|
+
trailing?: React.ReactNode;
|
|
20
|
+
/** Mutes the pill and makes it inert. */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A small pill reporting a state, with an optional action at the end. Sits
|
|
26
|
+
* at button height (small), so it lines up with the buttons beside it.
|
|
27
|
+
*/
|
|
28
|
+
export declare const StatusPill: ({ label, detail, tone, onClick, menu, labelAriaLabel, trailing, disabled, className, }: StatusPillProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Dropdown } from "../dropdown/Dropdown.js";
|
|
2
|
+
import StatusPill_module_default from "./StatusPill.module.css.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import cx from "classnames";
|
|
5
|
+
//#region src/components/statusPill/StatusPill.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A small pill reporting a state, with an optional action at the end. Sits
|
|
8
|
+
* at button height (small), so it lines up with the buttons beside it.
|
|
9
|
+
*/
|
|
10
|
+
var StatusPill = ({ label, detail, tone = "default", onClick, menu, labelAriaLabel, trailing, disabled = false, className }) => {
|
|
11
|
+
const text = /* @__PURE__ */ jsxs(Fragment, { children: [label, detail !== void 0 && detail !== null && /* @__PURE__ */ jsx("span", {
|
|
12
|
+
className: "font-semibold tabular-nums",
|
|
13
|
+
children: detail
|
|
14
|
+
})] });
|
|
15
|
+
const interactive = !disabled && (onClick || menu);
|
|
16
|
+
const labelButton = /* @__PURE__ */ jsx("button", {
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: menu ? void 0 : onClick,
|
|
19
|
+
"aria-label": labelAriaLabel,
|
|
20
|
+
disabled,
|
|
21
|
+
className: StatusPill_module_default.label,
|
|
22
|
+
children: text
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
25
|
+
className: cx(StatusPill_module_default.pill, tone === "warning" && StatusPill_module_default.warning, disabled && StatusPill_module_default.disabled, className),
|
|
26
|
+
children: [interactive ? menu ? /* @__PURE__ */ jsx(Dropdown, {
|
|
27
|
+
menu,
|
|
28
|
+
trigger: ["click"],
|
|
29
|
+
children: labelButton
|
|
30
|
+
}) : labelButton : /* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: StatusPill_module_default.static,
|
|
32
|
+
children: text
|
|
33
|
+
}), trailing && /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: "inline-flex items-center",
|
|
35
|
+
ref: (el) => {
|
|
36
|
+
el?.toggleAttribute("inert", disabled);
|
|
37
|
+
},
|
|
38
|
+
children: trailing
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { StatusPill };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=StatusPill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusPill.js","names":["_Fragment","styles"],"sources":["../../../../src/components/statusPill/StatusPill.tsx"],"sourcesContent":["import cx from 'classnames'\nimport type { MenuProps } from 'antd'\n\nimport { Dropdown } from '../dropdown'\nimport styles from './StatusPill.module.css'\n\nexport type StatusPillProps = {\n /** What the pill reports, e.g. \"Draft saved\". */\n label: React.ReactNode\n /** Emphasized detail after the label, e.g. counts. */\n detail?: React.ReactNode\n /** `'warning'` tints the pill for something that needs attention. */\n tone?: 'default' | 'warning'\n /** Makes the label a button. */\n onClick?: () => void\n /** Makes the label open this menu instead. */\n menu?: MenuProps\n /** Accessible name for the label's button or menu trigger. */\n labelAriaLabel?: string\n /**\n * A control at the end: a small `Button` or a `Switch`. It sits beside\n * the label, not inside it, so its clicks never trigger the label.\n */\n trailing?: React.ReactNode\n /** Mutes the pill and makes it inert. */\n disabled?: boolean\n className?: string\n}\n\n/**\n * A small pill reporting a state, with an optional action at the end. Sits\n * at button height (small), so it lines up with the buttons beside it.\n */\nexport const StatusPill = ({\n label,\n detail,\n tone = 'default',\n onClick,\n menu,\n labelAriaLabel,\n trailing,\n disabled = false,\n className,\n}: StatusPillProps) => {\n const text = (\n <>\n {label}\n {detail !== undefined && detail !== null && (\n <span className=\"font-semibold tabular-nums\">{detail}</span>\n )}\n </>\n )\n\n const interactive = !disabled && (onClick || menu)\n const labelButton = (\n <button\n type=\"button\"\n onClick={menu ? undefined : onClick}\n aria-label={labelAriaLabel}\n disabled={disabled}\n className={styles.label}\n >\n {text}\n </button>\n )\n\n return (\n <span\n className={cx(\n styles.pill,\n tone === 'warning' && styles.warning,\n disabled && styles.disabled,\n className\n )}\n >\n {interactive ? (\n menu ? (\n <Dropdown menu={menu} trigger={['click']}>\n {labelButton}\n </Dropdown>\n ) : (\n labelButton\n )\n ) : (\n <span className={styles.static}>{text}</span>\n )}\n {trailing && (\n <span\n className=\"inline-flex items-center\"\n // `pointer-events: none` stops the mouse but not the keyboard; inert\n // takes a disabled pill's control out of focus and the a11y tree.\n // Set as an attribute so it works on React 18 and 19 alike.\n ref={(el) => {\n el?.toggleAttribute('inert', disabled)\n }}\n >\n {trailing}\n </span>\n )}\n </span>\n )\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAa,cAAc,EACzB,OACA,QACA,OAAO,WACP,SACA,MACA,gBACA,UACA,WAAW,OACX,gBACqB;CACrB,MAAM,OACJ,qBAAAA,UAAA,EAAA,UAAA,CACG,OACA,WAAW,KAAA,KAAa,WAAW,QAClC,oBAAC,QAAD;EAAM,WAAU;EAA8B,UAAA;CAAa,CAAA,CAE7D,EAAA,CAAA;CAGJ,MAAM,cAAc,CAAC,aAAa,WAAW;CAC7C,MAAM,cACJ,oBAAC,UAAD;EACE,MAAK;EACL,SAAS,OAAO,KAAA,IAAY;EAC5B,cAAY;EACF;EACV,WAAWC,0BAAO;EAEjB,UAAA;CACK,CAAA;CAGV,OACE,qBAAC,QAAD;EACE,WAAW,GACTA,0BAAO,MACP,SAAS,aAAaA,0BAAO,SAC7B,YAAYA,0BAAO,UACnB,SACF;EANF,UAAA,CAQG,cACC,OACE,oBAAC,UAAD;GAAgB;GAAM,SAAS,CAAC,OAAO;GACpC,UAAA;EACO,CAAA,IAEV,cAGF,oBAAC,QAAD;GAAM,WAAWA,0BAAO;GAAS,UAAA;EAAW,CAAA,GAE7C,YACC,oBAAC,QAAD;GACE,WAAU;GAIV,MAAM,OAAO;IACX,IAAI,gBAAgB,SAAS,QAAQ;GACvC;GAEC,UAAA;EACG,CAAA,CAEJ;;AAEV"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/components/statusPill/StatusPill.module.css
|
|
2
|
+
var pill = "_pill_16f8w_1";
|
|
3
|
+
var warning = "_warning_16f8w_15";
|
|
4
|
+
var disabled = "_disabled_16f8w_20";
|
|
5
|
+
var label = "_label_16f8w_26";
|
|
6
|
+
var StatusPill_module_default = {
|
|
7
|
+
pill,
|
|
8
|
+
warning,
|
|
9
|
+
disabled,
|
|
10
|
+
label,
|
|
11
|
+
"static": "_static_16f8w_27"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.default = StatusPill_module_default;
|
|
15
|
+
exports.disabled = disabled;
|
|
16
|
+
exports.label = label;
|
|
17
|
+
exports.pill = pill;
|
|
18
|
+
exports.warning = warning;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=StatusPill.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusPill.module.css.cjs","names":[],"sources":["../../../../src/components/statusPill/StatusPill.module.css"],"sourcesContent":[".pill {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 24px;\n padding: 0 8px;\n border: 1px solid var(--j2-color-border);\n border-radius: var(--j2-border-radius-sm);\n background: var(--j2-color-bg-elevated, white);\n color: var(--j2-color-text);\n font-size: var(--j2-font-size);\n white-space: nowrap;\n}\n\n.warning {\n background: var(--j2-color-warning-bg);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);\n}\n\n.disabled {\n color: var(--j2-color-text-disabled);\n background: var(--j2-color-bg-container-disabled);\n pointer-events: none;\n}\n\n.label,\n.static {\n display: inline-flex;\n align-items: baseline;\n gap: 8px;\n}\n\n.label {\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: opacity 0.2s;\n}\n\n.label:hover {\n opacity: 0.8;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/statusPill/StatusPill.module.css
|
|
2
|
+
var pill = "_pill_16f8w_1";
|
|
3
|
+
var warning = "_warning_16f8w_15";
|
|
4
|
+
var disabled = "_disabled_16f8w_20";
|
|
5
|
+
var label = "_label_16f8w_26";
|
|
6
|
+
var StatusPill_module_default = {
|
|
7
|
+
pill,
|
|
8
|
+
warning,
|
|
9
|
+
disabled,
|
|
10
|
+
label,
|
|
11
|
+
"static": "_static_16f8w_27"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { StatusPill_module_default as default, disabled, label, pill, warning };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=StatusPill.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusPill.module.css.js","names":[],"sources":["../../../../src/components/statusPill/StatusPill.module.css"],"sourcesContent":[".pill {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 24px;\n padding: 0 8px;\n border: 1px solid var(--j2-color-border);\n border-radius: var(--j2-border-radius-sm);\n background: var(--j2-color-bg-elevated, white);\n color: var(--j2-color-text);\n font-size: var(--j2-font-size);\n white-space: nowrap;\n}\n\n.warning {\n background: var(--j2-color-warning-bg);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);\n}\n\n.disabled {\n color: var(--j2-color-text-disabled);\n background: var(--j2-color-bg-container-disabled);\n pointer-events: none;\n}\n\n.label,\n.static {\n display: inline-flex;\n align-items: baseline;\n gap: 8px;\n}\n\n.label {\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: opacity 0.2s;\n}\n\n.label:hover {\n opacity: 0.8;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatusPill, type StatusPillProps } from './StatusPill.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let classnames = require("classnames");
|
|
4
|
+
classnames = require_runtime.__toESM(classnames, 1);
|
|
5
|
+
//#region src/components/swatch/Swatch.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A small color square for keys, legends and inline indicators.
|
|
8
|
+
*/
|
|
9
|
+
var Swatch = ({ color = "var(--j2-color-primary)", variant = "solid", tint, stroke, size = 16, radius = 4, className }) => {
|
|
10
|
+
const style = {
|
|
11
|
+
width: size,
|
|
12
|
+
height: size,
|
|
13
|
+
borderRadius: radius
|
|
14
|
+
};
|
|
15
|
+
if (variant === "solid") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16
|
+
className: (0, classnames.default)("block shrink-0", className),
|
|
17
|
+
style: {
|
|
18
|
+
...style,
|
|
19
|
+
background: color
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
if (variant === "hatched") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
23
|
+
className: (0, classnames.default)("block shrink-0 overflow-hidden border", className),
|
|
24
|
+
style: {
|
|
25
|
+
...style,
|
|
26
|
+
borderColor: color,
|
|
27
|
+
background: tint ?? `color-mix(in srgb, ${color} 10%, white)`
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
30
|
+
viewBox: "0 0 16 16",
|
|
31
|
+
className: "block h-full w-full",
|
|
32
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
|
|
33
|
+
x1: "0",
|
|
34
|
+
y1: "16",
|
|
35
|
+
x2: "16",
|
|
36
|
+
y2: "0",
|
|
37
|
+
stroke: stroke ?? color,
|
|
38
|
+
strokeWidth: "1.5"
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
43
|
+
className: (0, classnames.default)("block shrink-0 border border-j2-border bg-white", className),
|
|
44
|
+
style
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.Swatch = Swatch;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=Swatch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Swatch.cjs","names":["cx"],"sources":["../../../../src/components/swatch/Swatch.tsx"],"sourcesContent":["import cx from 'classnames'\n\nexport type SwatchProps = {\n /** Any CSS color, e.g. `'var(--j2-color-interval-7-7)'`. */\n color?: string\n /**\n * - `'solid'`: filled with `color`.\n * - `'hatched'`: a light fill, a `color` border and a diagonal stroke. For\n * a softer version of the same meaning as solid.\n * - `'outline'`: an empty square with a neutral border. For \"none\".\n */\n variant?: 'solid' | 'hatched' | 'outline'\n /** The hatched variant's light fill. Defaults to `color` at 10%. */\n tint?: string\n /** The hatched variant's stroke. Defaults to `color`. */\n stroke?: string\n /** Side in px. */\n size?: number\n /** Corner radius in px. */\n radius?: number\n className?: string\n}\n\n/**\n * A small color square for keys, legends and inline indicators.\n */\nexport const Swatch = ({\n color = 'var(--j2-color-primary)',\n variant = 'solid',\n tint,\n stroke,\n size = 16,\n radius = 4,\n className,\n}: SwatchProps) => {\n const style: React.CSSProperties = {\n width: size,\n height: size,\n borderRadius: radius,\n }\n\n if (variant === 'solid') {\n return (\n <span\n className={cx('block shrink-0', className)}\n style={{ ...style, background: color }}\n />\n )\n }\n\n if (variant === 'hatched') {\n return (\n <span\n className={cx('block shrink-0 overflow-hidden border', className)}\n style={{\n ...style,\n borderColor: color,\n background: tint ?? `color-mix(in srgb, ${color} 10%, white)`,\n }}\n >\n <svg viewBox=\"0 0 16 16\" className=\"block h-full w-full\">\n <line\n x1=\"0\"\n y1=\"16\"\n x2=\"16\"\n y2=\"0\"\n stroke={stroke ?? color}\n strokeWidth=\"1.5\"\n />\n </svg>\n </span>\n )\n }\n\n return (\n <span\n className={cx(\n 'block shrink-0 border border-j2-border bg-white',\n className\n )}\n style={style}\n />\n )\n}\n"],"mappings":";;;;;;;;AA0BA,IAAa,UAAU,EACrB,QAAQ,2BACR,UAAU,SACV,MACA,QACA,OAAO,IACP,SAAS,GACT,gBACiB;CACjB,MAAM,QAA6B;EACjC,OAAO;EACP,QAAQ;EACR,cAAc;CAChB;CAEA,IAAI,YAAY,SACd,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,YAAA,GAAWA,WAAAA,QAAAA,CAAG,kBAAkB,SAAS;EACzC,OAAO;GAAE,GAAG;GAAO,YAAY;EAAM;CACtC,CAAA;CAIL,IAAI,YAAY,WACd,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,YAAA,GAAWA,WAAAA,QAAAA,CAAG,yCAAyC,SAAS;EAChE,OAAO;GACL,GAAG;GACH,aAAa;GACb,YAAY,QAAQ,sBAAsB,MAAM;EAClD;EAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,SAAQ;GAAY,WAAU;GACjC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IACE,IAAG;IACH,IAAG;IACH,IAAG;IACH,IAAG;IACH,QAAQ,UAAU;IAClB,aAAY;GACb,CAAA;EACE,CAAA;CACD,CAAA;CAIV,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,YAAA,GAAWA,WAAAA,QAAAA,CACT,mDACA,SACF;EACO;CACR,CAAA;AAEL"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type SwatchProps = {
|
|
2
|
+
/** Any CSS color, e.g. `'var(--j2-color-interval-7-7)'`. */
|
|
3
|
+
color?: string;
|
|
4
|
+
/**
|
|
5
|
+
* - `'solid'`: filled with `color`.
|
|
6
|
+
* - `'hatched'`: a light fill, a `color` border and a diagonal stroke. For
|
|
7
|
+
* a softer version of the same meaning as solid.
|
|
8
|
+
* - `'outline'`: an empty square with a neutral border. For "none".
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'solid' | 'hatched' | 'outline';
|
|
11
|
+
/** The hatched variant's light fill. Defaults to `color` at 10%. */
|
|
12
|
+
tint?: string;
|
|
13
|
+
/** The hatched variant's stroke. Defaults to `color`. */
|
|
14
|
+
stroke?: string;
|
|
15
|
+
/** Side in px. */
|
|
16
|
+
size?: number;
|
|
17
|
+
/** Corner radius in px. */
|
|
18
|
+
radius?: number;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A small color square for keys, legends and inline indicators.
|
|
23
|
+
*/
|
|
24
|
+
export declare const Swatch: ({ color, variant, tint, stroke, size, radius, className, }: SwatchProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
//#region src/components/swatch/Swatch.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A small color square for keys, legends and inline indicators.
|
|
6
|
+
*/
|
|
7
|
+
var Swatch = ({ color = "var(--j2-color-primary)", variant = "solid", tint, stroke, size = 16, radius = 4, className }) => {
|
|
8
|
+
const style = {
|
|
9
|
+
width: size,
|
|
10
|
+
height: size,
|
|
11
|
+
borderRadius: radius
|
|
12
|
+
};
|
|
13
|
+
if (variant === "solid") return /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: cx("block shrink-0", className),
|
|
15
|
+
style: {
|
|
16
|
+
...style,
|
|
17
|
+
background: color
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
if (variant === "hatched") return /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: cx("block shrink-0 overflow-hidden border", className),
|
|
22
|
+
style: {
|
|
23
|
+
...style,
|
|
24
|
+
borderColor: color,
|
|
25
|
+
background: tint ?? `color-mix(in srgb, ${color} 10%, white)`
|
|
26
|
+
},
|
|
27
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
28
|
+
viewBox: "0 0 16 16",
|
|
29
|
+
className: "block h-full w-full",
|
|
30
|
+
children: /* @__PURE__ */ jsx("line", {
|
|
31
|
+
x1: "0",
|
|
32
|
+
y1: "16",
|
|
33
|
+
x2: "16",
|
|
34
|
+
y2: "0",
|
|
35
|
+
stroke: stroke ?? color,
|
|
36
|
+
strokeWidth: "1.5"
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
return /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: cx("block shrink-0 border border-j2-border bg-white", className),
|
|
42
|
+
style
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Swatch };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=Swatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Swatch.js","names":[],"sources":["../../../../src/components/swatch/Swatch.tsx"],"sourcesContent":["import cx from 'classnames'\n\nexport type SwatchProps = {\n /** Any CSS color, e.g. `'var(--j2-color-interval-7-7)'`. */\n color?: string\n /**\n * - `'solid'`: filled with `color`.\n * - `'hatched'`: a light fill, a `color` border and a diagonal stroke. For\n * a softer version of the same meaning as solid.\n * - `'outline'`: an empty square with a neutral border. For \"none\".\n */\n variant?: 'solid' | 'hatched' | 'outline'\n /** The hatched variant's light fill. Defaults to `color` at 10%. */\n tint?: string\n /** The hatched variant's stroke. Defaults to `color`. */\n stroke?: string\n /** Side in px. */\n size?: number\n /** Corner radius in px. */\n radius?: number\n className?: string\n}\n\n/**\n * A small color square for keys, legends and inline indicators.\n */\nexport const Swatch = ({\n color = 'var(--j2-color-primary)',\n variant = 'solid',\n tint,\n stroke,\n size = 16,\n radius = 4,\n className,\n}: SwatchProps) => {\n const style: React.CSSProperties = {\n width: size,\n height: size,\n borderRadius: radius,\n }\n\n if (variant === 'solid') {\n return (\n <span\n className={cx('block shrink-0', className)}\n style={{ ...style, background: color }}\n />\n )\n }\n\n if (variant === 'hatched') {\n return (\n <span\n className={cx('block shrink-0 overflow-hidden border', className)}\n style={{\n ...style,\n borderColor: color,\n background: tint ?? `color-mix(in srgb, ${color} 10%, white)`,\n }}\n >\n <svg viewBox=\"0 0 16 16\" className=\"block h-full w-full\">\n <line\n x1=\"0\"\n y1=\"16\"\n x2=\"16\"\n y2=\"0\"\n stroke={stroke ?? color}\n strokeWidth=\"1.5\"\n />\n </svg>\n </span>\n )\n }\n\n return (\n <span\n className={cx(\n 'block shrink-0 border border-j2-border bg-white',\n className\n )}\n style={style}\n />\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAa,UAAU,EACrB,QAAQ,2BACR,UAAU,SACV,MACA,QACA,OAAO,IACP,SAAS,GACT,gBACiB;CACjB,MAAM,QAA6B;EACjC,OAAO;EACP,QAAQ;EACR,cAAc;CAChB;CAEA,IAAI,YAAY,SACd,OACE,oBAAC,QAAD;EACE,WAAW,GAAG,kBAAkB,SAAS;EACzC,OAAO;GAAE,GAAG;GAAO,YAAY;EAAM;CACtC,CAAA;CAIL,IAAI,YAAY,WACd,OACE,oBAAC,QAAD;EACE,WAAW,GAAG,yCAAyC,SAAS;EAChE,OAAO;GACL,GAAG;GACH,aAAa;GACb,YAAY,QAAQ,sBAAsB,MAAM;EAClD;EAEA,UAAA,oBAAC,OAAD;GAAK,SAAQ;GAAY,WAAU;GACjC,UAAA,oBAAC,QAAD;IACE,IAAG;IACH,IAAG;IACH,IAAG;IACH,IAAG;IACH,QAAQ,UAAU;IAClB,aAAY;GACb,CAAA;EACE,CAAA;CACD,CAAA;CAIV,OACE,oBAAC,QAAD;EACE,WAAW,GACT,mDACA,SACF;EACO;CACR,CAAA;AAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swatch, type SwatchProps } from './Swatch.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const require_Swatch = require("../swatch/Swatch.cjs");
|
|
2
|
+
const require_Tooltip = require("../tooltip/Tooltip.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
//#region src/components/swatchStrip/SwatchStrip.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A compact run of swatches in groups, e.g. one square per affected item,
|
|
7
|
+
* grouped by kind. Groups are separated by a thin rule rather than a wider
|
|
8
|
+
* gap, so a group ending in `+N` doesn't read as farther from the next.
|
|
9
|
+
*/
|
|
10
|
+
var SwatchStrip = ({ groups, max = 5, size = 12 }) => {
|
|
11
|
+
const visibleGroups = groups.filter((group) => group.items.length > 0);
|
|
12
|
+
if (visibleGroups.length === 0) return null;
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14
|
+
className: "inline-flex flex-wrap items-center gap-y-1",
|
|
15
|
+
children: visibleGroups.map((group, index) => {
|
|
16
|
+
const shown = group.items.slice(0, max);
|
|
17
|
+
const overflow = group.items.length - shown.length;
|
|
18
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
19
|
+
className: "inline-flex items-center",
|
|
20
|
+
children: [index > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21
|
+
"aria-hidden": true,
|
|
22
|
+
className: "mx-2 inline-block w-px bg-[var(--j2-color-border-secondary)]",
|
|
23
|
+
style: { height: 12 }
|
|
24
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
25
|
+
className: "inline-flex items-center",
|
|
26
|
+
style: { gap: 2 },
|
|
27
|
+
children: [shown.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Tooltip.Tooltip, {
|
|
28
|
+
title: item.label,
|
|
29
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
30
|
+
className: "block",
|
|
31
|
+
"aria-label": item.label,
|
|
32
|
+
role: "img",
|
|
33
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Swatch.Swatch, {
|
|
34
|
+
...item.swatch,
|
|
35
|
+
size
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
}, item.key)), overflow > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
39
|
+
className: "px-1 text-xs tabular-nums text-j2-text-secondary",
|
|
40
|
+
children: ["+", overflow]
|
|
41
|
+
})]
|
|
42
|
+
})]
|
|
43
|
+
}, group.key);
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.SwatchStrip = SwatchStrip;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=SwatchStrip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwatchStrip.cjs","names":["Tooltip","Swatch"],"sources":["../../../../src/components/swatchStrip/SwatchStrip.tsx"],"sourcesContent":["import { Tooltip } from '../tooltip'\nimport { Swatch, type SwatchProps } from '../swatch'\n\nexport type SwatchStripItem = {\n key: string\n /** Shown in a tooltip and read by assistive tech. */\n label: string\n swatch: Omit<SwatchProps, 'size'>\n}\n\nexport type SwatchStripGroup = {\n key: string\n items: SwatchStripItem[]\n}\n\nexport type SwatchStripProps = {\n /** Groups in display order; empty groups are skipped. */\n groups: SwatchStripGroup[]\n /** Swatches shown per group before a `+N` takes over. */\n max?: number\n /** Swatch side in px. */\n size?: number\n}\n\n/**\n * A compact run of swatches in groups, e.g. one square per affected item,\n * grouped by kind. Groups are separated by a thin rule rather than a wider\n * gap, so a group ending in `+N` doesn't read as farther from the next.\n */\nexport const SwatchStrip = ({\n groups,\n max = 5,\n size = 12,\n}: SwatchStripProps) => {\n const visibleGroups = groups.filter((group) => group.items.length > 0)\n if (visibleGroups.length === 0) return null\n\n return (\n <div className=\"inline-flex flex-wrap items-center gap-y-1\">\n {visibleGroups.map((group, index) => {\n const shown = group.items.slice(0, max)\n const overflow = group.items.length - shown.length\n return (\n <span key={group.key} className=\"inline-flex items-center\">\n {index > 0 && (\n <span\n aria-hidden\n className=\"mx-2 inline-block w-px bg-[var(--j2-color-border-secondary)]\"\n style={{ height: 12 }}\n />\n )}\n <span className=\"inline-flex items-center\" style={{ gap: 2 }}>\n {shown.map((item) => (\n <Tooltip key={item.key} title={item.label}>\n <span className=\"block\" aria-label={item.label} role=\"img\">\n <Swatch {...item.swatch} size={size} />\n </span>\n </Tooltip>\n ))}\n {overflow > 0 && (\n <span className=\"px-1 text-xs tabular-nums text-j2-text-secondary\">\n +{overflow}\n </span>\n )}\n </span>\n </span>\n )\n })}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AA6BA,IAAa,eAAe,EAC1B,QACA,MAAM,GACN,OAAO,SACe;CACtB,MAAM,gBAAgB,OAAO,QAAQ,UAAU,MAAM,MAAM,SAAS,CAAC;CACrE,IAAI,cAAc,WAAW,GAAG,OAAO;CAEvC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAU;EACZ,UAAA,cAAc,KAAK,OAAO,UAAU;GACnC,MAAM,QAAQ,MAAM,MAAM,MAAM,GAAG,GAAG;GACtC,MAAM,WAAW,MAAM,MAAM,SAAS,MAAM;GAC5C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;IAAsB,WAAU;IAAhC,UAAA,CACG,QAAQ,KACP,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KACE,eAAA;KACA,WAAU;KACV,OAAO,EAAE,QAAQ,GAAG;IACrB,CAAA,GAEH,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;KAAM,WAAU;KAA2B,OAAO,EAAE,KAAK,EAAE;KAA3D,UAAA,CACG,MAAM,KAAK,SACV,iBAAA,GAAA,kBAAA,IAAA,CAACA,gBAAAA,SAAD;MAAwB,OAAO,KAAK;MAClC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;OAAM,WAAU;OAAQ,cAAY,KAAK;OAAO,MAAK;OACnD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,QAAD;QAAQ,GAAI,KAAK;QAAc;OAAO,CAAA;MAClC,CAAA;KACC,GAJK,KAAK,GAIV,CACV,GACA,WAAW,KACV,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;MAAM,WAAU;MAAhB,UAAA,CAAmE,KAC/D,QACE;KAEJ,CAAA,CAAA;IACF,CAAA,CAAA;GAtBK,GAAA,MAAM,GAsBX;EAEV,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SwatchProps } from '../swatch/index.js';
|
|
2
|
+
export type SwatchStripItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
/** Shown in a tooltip and read by assistive tech. */
|
|
5
|
+
label: string;
|
|
6
|
+
swatch: Omit<SwatchProps, 'size'>;
|
|
7
|
+
};
|
|
8
|
+
export type SwatchStripGroup = {
|
|
9
|
+
key: string;
|
|
10
|
+
items: SwatchStripItem[];
|
|
11
|
+
};
|
|
12
|
+
export type SwatchStripProps = {
|
|
13
|
+
/** Groups in display order; empty groups are skipped. */
|
|
14
|
+
groups: SwatchStripGroup[];
|
|
15
|
+
/** Swatches shown per group before a `+N` takes over. */
|
|
16
|
+
max?: number;
|
|
17
|
+
/** Swatch side in px. */
|
|
18
|
+
size?: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A compact run of swatches in groups, e.g. one square per affected item,
|
|
22
|
+
* grouped by kind. Groups are separated by a thin rule rather than a wider
|
|
23
|
+
* gap, so a group ending in `+N` doesn't read as farther from the next.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SwatchStrip: ({ groups, max, size, }: SwatchStripProps) => import('react').JSX.Element | null;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Swatch } from "../swatch/Swatch.js";
|
|
2
|
+
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/swatchStrip/SwatchStrip.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A compact run of swatches in groups, e.g. one square per affected item,
|
|
7
|
+
* grouped by kind. Groups are separated by a thin rule rather than a wider
|
|
8
|
+
* gap, so a group ending in `+N` doesn't read as farther from the next.
|
|
9
|
+
*/
|
|
10
|
+
var SwatchStrip = ({ groups, max = 5, size = 12 }) => {
|
|
11
|
+
const visibleGroups = groups.filter((group) => group.items.length > 0);
|
|
12
|
+
if (visibleGroups.length === 0) return null;
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: "inline-flex flex-wrap items-center gap-y-1",
|
|
15
|
+
children: visibleGroups.map((group, index) => {
|
|
16
|
+
const shown = group.items.slice(0, max);
|
|
17
|
+
const overflow = group.items.length - shown.length;
|
|
18
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
19
|
+
className: "inline-flex items-center",
|
|
20
|
+
children: [index > 0 && /* @__PURE__ */ jsx("span", {
|
|
21
|
+
"aria-hidden": true,
|
|
22
|
+
className: "mx-2 inline-block w-px bg-[var(--j2-color-border-secondary)]",
|
|
23
|
+
style: { height: 12 }
|
|
24
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
25
|
+
className: "inline-flex items-center",
|
|
26
|
+
style: { gap: 2 },
|
|
27
|
+
children: [shown.map((item) => /* @__PURE__ */ jsx(Tooltip, {
|
|
28
|
+
title: item.label,
|
|
29
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "block",
|
|
31
|
+
"aria-label": item.label,
|
|
32
|
+
role: "img",
|
|
33
|
+
children: /* @__PURE__ */ jsx(Swatch, {
|
|
34
|
+
...item.swatch,
|
|
35
|
+
size
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
}, item.key)), overflow > 0 && /* @__PURE__ */ jsxs("span", {
|
|
39
|
+
className: "px-1 text-xs tabular-nums text-j2-text-secondary",
|
|
40
|
+
children: ["+", overflow]
|
|
41
|
+
})]
|
|
42
|
+
})]
|
|
43
|
+
}, group.key);
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { SwatchStrip };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=SwatchStrip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwatchStrip.js","names":[],"sources":["../../../../src/components/swatchStrip/SwatchStrip.tsx"],"sourcesContent":["import { Tooltip } from '../tooltip'\nimport { Swatch, type SwatchProps } from '../swatch'\n\nexport type SwatchStripItem = {\n key: string\n /** Shown in a tooltip and read by assistive tech. */\n label: string\n swatch: Omit<SwatchProps, 'size'>\n}\n\nexport type SwatchStripGroup = {\n key: string\n items: SwatchStripItem[]\n}\n\nexport type SwatchStripProps = {\n /** Groups in display order; empty groups are skipped. */\n groups: SwatchStripGroup[]\n /** Swatches shown per group before a `+N` takes over. */\n max?: number\n /** Swatch side in px. */\n size?: number\n}\n\n/**\n * A compact run of swatches in groups, e.g. one square per affected item,\n * grouped by kind. Groups are separated by a thin rule rather than a wider\n * gap, so a group ending in `+N` doesn't read as farther from the next.\n */\nexport const SwatchStrip = ({\n groups,\n max = 5,\n size = 12,\n}: SwatchStripProps) => {\n const visibleGroups = groups.filter((group) => group.items.length > 0)\n if (visibleGroups.length === 0) return null\n\n return (\n <div className=\"inline-flex flex-wrap items-center gap-y-1\">\n {visibleGroups.map((group, index) => {\n const shown = group.items.slice(0, max)\n const overflow = group.items.length - shown.length\n return (\n <span key={group.key} className=\"inline-flex items-center\">\n {index > 0 && (\n <span\n aria-hidden\n className=\"mx-2 inline-block w-px bg-[var(--j2-color-border-secondary)]\"\n style={{ height: 12 }}\n />\n )}\n <span className=\"inline-flex items-center\" style={{ gap: 2 }}>\n {shown.map((item) => (\n <Tooltip key={item.key} title={item.label}>\n <span className=\"block\" aria-label={item.label} role=\"img\">\n <Swatch {...item.swatch} size={size} />\n </span>\n </Tooltip>\n ))}\n {overflow > 0 && (\n <span className=\"px-1 text-xs tabular-nums text-j2-text-secondary\">\n +{overflow}\n </span>\n )}\n </span>\n </span>\n )\n })}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AA6BA,IAAa,eAAe,EAC1B,QACA,MAAM,GACN,OAAO,SACe;CACtB,MAAM,gBAAgB,OAAO,QAAQ,UAAU,MAAM,MAAM,SAAS,CAAC;CACrE,IAAI,cAAc,WAAW,GAAG,OAAO;CAEvC,OACE,oBAAC,OAAD;EAAK,WAAU;EACZ,UAAA,cAAc,KAAK,OAAO,UAAU;GACnC,MAAM,QAAQ,MAAM,MAAM,MAAM,GAAG,GAAG;GACtC,MAAM,WAAW,MAAM,MAAM,SAAS,MAAM;GAC5C,OACE,qBAAC,QAAD;IAAsB,WAAU;IAAhC,UAAA,CACG,QAAQ,KACP,oBAAC,QAAD;KACE,eAAA;KACA,WAAU;KACV,OAAO,EAAE,QAAQ,GAAG;IACrB,CAAA,GAEH,qBAAC,QAAD;KAAM,WAAU;KAA2B,OAAO,EAAE,KAAK,EAAE;KAA3D,UAAA,CACG,MAAM,KAAK,SACV,oBAAC,SAAD;MAAwB,OAAO,KAAK;MAClC,UAAA,oBAAC,QAAD;OAAM,WAAU;OAAQ,cAAY,KAAK;OAAO,MAAK;OACnD,UAAA,oBAAC,QAAD;QAAQ,GAAI,KAAK;QAAc;OAAO,CAAA;MAClC,CAAA;KACC,GAJK,KAAK,GAIV,CACV,GACA,WAAW,KACV,qBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA,CAAmE,KAC/D,QACE;KAEJ,CAAA,CAAA;IACF,CAAA,CAAA;GAtBK,GAAA,MAAM,GAsBX;EAEV,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SwatchStrip, type SwatchStripGroup, type SwatchStripItem, type SwatchStripProps, } from './SwatchStrip.js';
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
1
2
|
;/* empty css */
|
|
2
3
|
let antd = require("antd");
|
|
3
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let classnames = require("classnames");
|
|
6
|
+
classnames = require_runtime.__toESM(classnames, 1);
|
|
4
7
|
//#region src/components/switch/Switch.tsx
|
|
5
|
-
var
|
|
8
|
+
var isText = (node) => typeof node === "string" || typeof node === "number";
|
|
9
|
+
var Switch = ({ small, size, className, loading = false, disabled = false, checked, onChange, ...props }) => {
|
|
6
10
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Switch, {
|
|
7
11
|
...props,
|
|
8
|
-
size: small ? "small" : "default",
|
|
12
|
+
size: small ? "small" : size ?? "default",
|
|
9
13
|
loading,
|
|
10
14
|
disabled,
|
|
11
15
|
checked,
|
|
12
16
|
onChange,
|
|
13
|
-
className: "j2-switch"
|
|
17
|
+
className: (0, classnames.default)("j2-switch", (isText(props.checkedChildren) || isText(props.unCheckedChildren)) && "j2-switch-labelled", className)
|
|
14
18
|
});
|
|
15
19
|
};
|
|
16
20
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.cjs","names":["AntSwitch"],"sources":["../../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as AntSwitch, SwitchProps } from 'antd'\nimport './Switch.css'\n\ntype AllProps = SwitchProps & {\n small?: boolean\n loading?: boolean\n disabled?: boolean\n checked?: boolean\n onChange?: (checked: boolean, event: Event) => void\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Switch = ({\n small,\n loading = false,\n disabled = false,\n checked,\n onChange,\n ...props\n}: Props) => {\n return (\n <AntSwitch\n {...props}\n size={small ? 'small' : 'default'}\n loading={loading}\n disabled={disabled}\n checked={checked}\n onChange={onChange}\n className
|
|
1
|
+
{"version":3,"file":"Switch.cjs","names":["AntSwitch","cx"],"sources":["../../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as AntSwitch, SwitchProps } from 'antd'\nimport cx from 'classnames'\nimport './Switch.css'\n\ntype AllProps = SwitchProps & {\n small?: boolean\n loading?: boolean\n disabled?: boolean\n checked?: boolean\n onChange?: (checked: boolean, event: Event) => void\n}\n\nexport type Props = Expand<AllProps>\n\nconst isText = (node: React.ReactNode) =>\n typeof node === 'string' || typeof node === 'number'\n\nexport const Switch = ({\n small,\n size,\n className,\n loading = false,\n disabled = false,\n checked,\n onChange,\n ...props\n}: Props) => {\n return (\n <AntSwitch\n {...props}\n size={small ? 'small' : (size ?? 'default')}\n loading={loading}\n disabled={disabled}\n checked={checked}\n onChange={onChange}\n className={cx(\n 'j2-switch',\n (isText(props.checkedChildren) || isText(props.unCheckedChildren)) &&\n 'j2-switch-labelled',\n className\n )}\n />\n )\n}\n"],"mappings":";;;;;;;AAcA,IAAM,UAAU,SACd,OAAO,SAAS,YAAY,OAAO,SAAS;AAE9C,IAAa,UAAU,EACrB,OACA,MACA,WACA,UAAU,OACV,WAAW,OACX,SACA,UACA,GAAG,YACQ;CACX,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,KAAAA,QAAD;EACE,GAAI;EACJ,MAAM,QAAQ,UAAW,QAAQ;EACxB;EACC;EACD;EACC;EACV,YAAA,GAAWC,WAAAA,QAAAA,CACT,cACC,OAAO,MAAM,eAAe,KAAK,OAAO,MAAM,iBAAiB,MAC9D,sBACF,SACF;CACD,CAAA;AAEL"}
|
|
@@ -7,5 +7,5 @@ type AllProps = SwitchProps & {
|
|
|
7
7
|
onChange?: (checked: boolean, event: Event) => void;
|
|
8
8
|
};
|
|
9
9
|
export type Props = Expand<AllProps>;
|
|
10
|
-
export declare const Switch: ({ small, loading, disabled, checked, onChange, ...props }: Props) => import('react').JSX.Element;
|
|
10
|
+
export declare const Switch: ({ small, size, className, loading, disabled, checked, onChange, ...props }: Props) => import('react').JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { Switch } from "antd";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import cx from "classnames";
|
|
4
5
|
//#region src/components/switch/Switch.tsx
|
|
5
|
-
var
|
|
6
|
+
var isText = (node) => typeof node === "string" || typeof node === "number";
|
|
7
|
+
var Switch$1 = ({ small, size, className, loading = false, disabled = false, checked, onChange, ...props }) => {
|
|
6
8
|
return /* @__PURE__ */ jsx(Switch, {
|
|
7
9
|
...props,
|
|
8
|
-
size: small ? "small" : "default",
|
|
10
|
+
size: small ? "small" : size ?? "default",
|
|
9
11
|
loading,
|
|
10
12
|
disabled,
|
|
11
13
|
checked,
|
|
12
14
|
onChange,
|
|
13
|
-
className: "j2-switch"
|
|
15
|
+
className: cx("j2-switch", (isText(props.checkedChildren) || isText(props.unCheckedChildren)) && "j2-switch-labelled", className)
|
|
14
16
|
});
|
|
15
17
|
};
|
|
16
18
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["Switch","AntSwitch"],"sources":["../../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as AntSwitch, SwitchProps } from 'antd'\nimport './Switch.css'\n\ntype AllProps = SwitchProps & {\n small?: boolean\n loading?: boolean\n disabled?: boolean\n checked?: boolean\n onChange?: (checked: boolean, event: Event) => void\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Switch = ({\n small,\n loading = false,\n disabled = false,\n checked,\n onChange,\n ...props\n}: Props) => {\n return (\n <AntSwitch\n {...props}\n size={small ? 'small' : 'default'}\n loading={loading}\n disabled={disabled}\n checked={checked}\n onChange={onChange}\n className
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["Switch","AntSwitch"],"sources":["../../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as AntSwitch, SwitchProps } from 'antd'\nimport cx from 'classnames'\nimport './Switch.css'\n\ntype AllProps = SwitchProps & {\n small?: boolean\n loading?: boolean\n disabled?: boolean\n checked?: boolean\n onChange?: (checked: boolean, event: Event) => void\n}\n\nexport type Props = Expand<AllProps>\n\nconst isText = (node: React.ReactNode) =>\n typeof node === 'string' || typeof node === 'number'\n\nexport const Switch = ({\n small,\n size,\n className,\n loading = false,\n disabled = false,\n checked,\n onChange,\n ...props\n}: Props) => {\n return (\n <AntSwitch\n {...props}\n size={small ? 'small' : (size ?? 'default')}\n loading={loading}\n disabled={disabled}\n checked={checked}\n onChange={onChange}\n className={cx(\n 'j2-switch',\n (isText(props.checkedChildren) || isText(props.unCheckedChildren)) &&\n 'j2-switch-labelled',\n className\n )}\n />\n )\n}\n"],"mappings":";;;;;AAcA,IAAM,UAAU,SACd,OAAO,SAAS,YAAY,OAAO,SAAS;AAE9C,IAAaA,YAAU,EACrB,OACA,MACA,WACA,UAAU,OACV,WAAW,OACX,SACA,UACA,GAAG,YACQ;CACX,OACE,oBAACC,QAAD;EACE,GAAI;EACJ,MAAM,QAAQ,UAAW,QAAQ;EACxB;EACC;EACD;EACC;EACV,WAAW,GACT,cACC,OAAO,MAAM,eAAe,KAAK,OAAO,MAAM,iBAAiB,MAC9D,sBACF,SACF;CACD,CAAA;AAEL"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_Tabs_module = require("./Tabs.module.css.cjs");
|
|
1
3
|
let antd = require("antd");
|
|
2
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let classnames = require("classnames");
|
|
6
|
+
classnames = require_runtime.__toESM(classnames, 1);
|
|
3
7
|
//#region src/components/tabs/Tabs.tsx
|
|
4
|
-
var Tabs = (props) => {
|
|
8
|
+
var Tabs = ({ flush, justified, className, ...props }) => {
|
|
5
9
|
const destroyOnHidden = props.destroyOnHidden ?? true;
|
|
6
10
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Tabs, {
|
|
7
11
|
...props,
|
|
12
|
+
className: (0, classnames.default)(flush && require_Tabs_module.default.flush, justified && require_Tabs_module.default.justified, className),
|
|
8
13
|
destroyOnHidden
|
|
9
14
|
});
|
|
10
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.cjs","names":["AntdTabs"],"sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Tabs as AntdTabs, TabsProps } from 'antd'\n\nexport type Props = Expand
|
|
1
|
+
{"version":3,"file":"Tabs.cjs","names":["AntdTabs","cx","styles"],"sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Tabs as AntdTabs, TabsProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Tabs.module.css'\n\nexport type Props = Expand<\n TabsProps & {\n /**\n * No gap under the tab bar and no padding around the panes, so the\n * content sits flush against the tabs and fills the remaining height.\n */\n flush?: boolean\n /** The tabs share the bar's full width equally. */\n justified?: boolean\n }\n>\n\nexport const Tabs = ({ flush, justified, className, ...props }: Props) => {\n const destroyOnHidden = props.destroyOnHidden ?? true\n return (\n <AntdTabs\n {...props}\n className={cx(\n flush && styles.flush,\n justified && styles.justified,\n className\n )}\n destroyOnHidden={destroyOnHidden}\n />\n )\n}\n"],"mappings":";;;;;;;AAgBA,IAAa,QAAQ,EAAE,OAAO,WAAW,WAAW,GAAG,YAAmB;CACxE,MAAM,kBAAkB,MAAM,mBAAmB;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,KAAAA,MAAD;EACE,GAAI;EACJ,YAAA,GAAWC,WAAAA,QAAAA,CACT,SAASC,oBAAAA,QAAO,OAChB,aAAaA,oBAAAA,QAAO,WACpB,SACF;EACiB;CAClB,CAAA;AAEL"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { TabsProps } from 'antd';
|
|
2
|
-
export type Props = Expand<TabsProps
|
|
3
|
-
|
|
2
|
+
export type Props = Expand<TabsProps & {
|
|
3
|
+
/**
|
|
4
|
+
* No gap under the tab bar and no padding around the panes, so the
|
|
5
|
+
* content sits flush against the tabs and fills the remaining height.
|
|
6
|
+
*/
|
|
7
|
+
flush?: boolean;
|
|
8
|
+
/** The tabs share the bar's full width equally. */
|
|
9
|
+
justified?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Tabs: ({ flush, justified, className, ...props }: Props) => import('react').JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import Tabs_module_default from "./Tabs.module.css.js";
|
|
1
2
|
import { Tabs } from "antd";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import cx from "classnames";
|
|
3
5
|
//#region src/components/tabs/Tabs.tsx
|
|
4
|
-
var Tabs$1 = (props) => {
|
|
6
|
+
var Tabs$1 = ({ flush, justified, className, ...props }) => {
|
|
5
7
|
const destroyOnHidden = props.destroyOnHidden ?? true;
|
|
6
8
|
return /* @__PURE__ */ jsx(Tabs, {
|
|
7
9
|
...props,
|
|
10
|
+
className: cx(flush && Tabs_module_default.flush, justified && Tabs_module_default.justified, className),
|
|
8
11
|
destroyOnHidden
|
|
9
12
|
});
|
|
10
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":["Tabs","AntdTabs"],"sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Tabs as AntdTabs, TabsProps } from 'antd'\n\nexport type Props = Expand
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":["Tabs","AntdTabs","styles"],"sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Tabs as AntdTabs, TabsProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Tabs.module.css'\n\nexport type Props = Expand<\n TabsProps & {\n /**\n * No gap under the tab bar and no padding around the panes, so the\n * content sits flush against the tabs and fills the remaining height.\n */\n flush?: boolean\n /** The tabs share the bar's full width equally. */\n justified?: boolean\n }\n>\n\nexport const Tabs = ({ flush, justified, className, ...props }: Props) => {\n const destroyOnHidden = props.destroyOnHidden ?? true\n return (\n <AntdTabs\n {...props}\n className={cx(\n flush && styles.flush,\n justified && styles.justified,\n className\n )}\n destroyOnHidden={destroyOnHidden}\n />\n )\n}\n"],"mappings":";;;;;AAgBA,IAAaA,UAAQ,EAAE,OAAO,WAAW,WAAW,GAAG,YAAmB;CACxE,MAAM,kBAAkB,MAAM,mBAAmB;CACjD,OACE,oBAACC,MAAD;EACE,GAAI;EACJ,WAAW,GACT,SAASC,oBAAO,OAChB,aAAaA,oBAAO,WACpB,SACF;EACiB;CAClB,CAAA;AAEL"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/components/tabs/Tabs.module.css
|
|
2
|
+
var flush = "_flush_1bifh_2";
|
|
3
|
+
var justified = "_justified_1bifh_27";
|
|
4
|
+
var Tabs_module_default = {
|
|
5
|
+
flush,
|
|
6
|
+
justified
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.default = Tabs_module_default;
|
|
10
|
+
exports.flush = flush;
|
|
11
|
+
exports.justified = justified;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Tabs.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.module.css.cjs","names":[],"sources":["../../../../src/components/tabs/Tabs.module.css"],"sourcesContent":["/* Flush: content sits against the tab bar and fills the remaining height. */\n.flush {\n display: flex;\n flex-direction: column;\n height: 100%;\n\n :global(.ant-tabs-nav) {\n margin-bottom: 0;\n }\n\n :global(.ant-tabs-content-holder) {\n flex: 1;\n min-height: 0;\n }\n\n :global(.ant-tabs-content),\n :global(.ant-tabs-tabpane) {\n height: 100%;\n }\n\n :global(.ant-tabs-tabpane) {\n padding: 0;\n }\n}\n\n/* Justified: the tabs share the bar's width equally. */\n.justified {\n :global(.ant-tabs-nav-list) {\n flex: 1;\n }\n\n :global(.ant-tabs-tab) {\n flex: 1;\n justify-content: center;\n }\n\n :global(.ant-tabs-tab + .ant-tabs-tab) {\n margin-inline-start: 0;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/tabs/Tabs.module.css
|
|
2
|
+
var flush = "_flush_1bifh_2";
|
|
3
|
+
var justified = "_justified_1bifh_27";
|
|
4
|
+
var Tabs_module_default = {
|
|
5
|
+
flush,
|
|
6
|
+
justified
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Tabs_module_default as default, flush, justified };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=Tabs.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.module.css.js","names":[],"sources":["../../../../src/components/tabs/Tabs.module.css"],"sourcesContent":["/* Flush: content sits against the tab bar and fills the remaining height. */\n.flush {\n display: flex;\n flex-direction: column;\n height: 100%;\n\n :global(.ant-tabs-nav) {\n margin-bottom: 0;\n }\n\n :global(.ant-tabs-content-holder) {\n flex: 1;\n min-height: 0;\n }\n\n :global(.ant-tabs-content),\n :global(.ant-tabs-tabpane) {\n height: 100%;\n }\n\n :global(.ant-tabs-tabpane) {\n padding: 0;\n }\n}\n\n/* Justified: the tabs share the bar's width equally. */\n.justified {\n :global(.ant-tabs-nav-list) {\n flex: 1;\n }\n\n :global(.ant-tabs-tab) {\n flex: 1;\n justify-content: center;\n }\n\n :global(.ant-tabs-tab + .ant-tabs-tab) {\n margin-inline-start: 0;\n }\n}\n"],"mappings":""}
|