@caseparts-org/caseblocks 0.0.294 → 0.0.296
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/Text.module-DMvZIqUi.js +39 -0
- package/dist/assets/SegmentedControl.css +1 -0
- package/dist/assets/Text.css +1 -1
- package/dist/assets/buttonClassName.css +1 -1
- package/dist/atoms/Button/buttonClassName.js +30 -24
- package/dist/atoms/Link/linkClassName.js +1 -1
- package/dist/atoms/Text/Text.js +1 -1
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +44 -42
- package/dist/main.d.ts +2 -0
- package/dist/main.js +26 -24
- package/dist/molecules/Avatar/Avatar.js +1 -1
- package/dist/molecules/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/dist/molecules/SegmentedControl/SegmentedControl.js +60 -0
- package/dist/molecules/SegmentedControl/SegmentedControl.stories.d.ts +26 -0
- package/dist/molecules/SegmentedControl/SegmentedControl.stories.js +54 -0
- package/package.json +1 -1
- package/dist/Text.module-C3jj0mnU.js +0 -39
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import './assets/Text.css';const t = {
|
|
2
|
+
"text-body": "_text-body_1uteu_1",
|
|
3
|
+
"text-display": "_text-display_1uteu_5",
|
|
4
|
+
"text-xxs": "_text-xxs_1uteu_9",
|
|
5
|
+
"text-xs": "_text-xs_1uteu_13",
|
|
6
|
+
"text-sm": "_text-sm_1uteu_17",
|
|
7
|
+
"text-md": "_text-md_1uteu_21",
|
|
8
|
+
"text-lg": "_text-lg_1uteu_25",
|
|
9
|
+
"text-xl": "_text-xl_1uteu_29",
|
|
10
|
+
"text-2xl": "_text-2xl_1uteu_33",
|
|
11
|
+
"text-3xl": "_text-3xl_1uteu_37",
|
|
12
|
+
"text-4xl": "_text-4xl_1uteu_41",
|
|
13
|
+
"text-5xl": "_text-5xl_1uteu_45",
|
|
14
|
+
"text-6xl": "_text-6xl_1uteu_49",
|
|
15
|
+
"text-thin": "_text-thin_1uteu_54",
|
|
16
|
+
"text-extra-light": "_text-extra-light_1uteu_57",
|
|
17
|
+
"text-light": "_text-light_1uteu_60",
|
|
18
|
+
"text-regular": "_text-regular_1uteu_63",
|
|
19
|
+
"text-medium": "_text-medium_1uteu_66",
|
|
20
|
+
"text-semibold": "_text-semibold_1uteu_69",
|
|
21
|
+
"text-bold": "_text-bold_1uteu_72",
|
|
22
|
+
"text-color-inherit": "_text-color-inherit_1uteu_88",
|
|
23
|
+
"text-color-warning": "_text-color-warning_1uteu_89",
|
|
24
|
+
"text-color-disabled": "_text-color-disabled_1uteu_90",
|
|
25
|
+
"text-color-error-warning": "_text-color-error-warning_1uteu_91",
|
|
26
|
+
"text-color-default-inverted": "_text-color-default-inverted_1uteu_92",
|
|
27
|
+
"text-color-links": "_text-color-links_1uteu_93",
|
|
28
|
+
"text-color-links-hover-press": "_text-color-links-hover-press_1uteu_94",
|
|
29
|
+
"text-color-primary": "_text-color-primary_1uteu_95",
|
|
30
|
+
"text-color-quaternary": "_text-color-quaternary_1uteu_96",
|
|
31
|
+
"text-color-search-bar": "_text-color-search-bar_1uteu_97",
|
|
32
|
+
"text-color-secondary": "_text-color-secondary_1uteu_98",
|
|
33
|
+
"text-color-success": "_text-color-success_1uteu_99",
|
|
34
|
+
"text-color-tertiary": "_text-color-tertiary_1uteu_100",
|
|
35
|
+
"text-color-footer": "_text-color-footer_1uteu_101"
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
t
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._control_v4pp3_1{display:inline-flex;border:1px solid var(--border-border-primary);border-radius:999px;padding:2px}._segments_v4pp3_8{position:relative;display:grid;flex:1 1 auto;min-width:0;grid-template-columns:repeat(var(--segment-count),minmax(0,1fr))}._indicator_v4pp3_16{position:absolute;inset-block:0;inset-inline-start:0;width:calc(100% / var(--segment-count));border-radius:999px;background:var(--surface-surface-primary-btn-focus);transform:translate(calc(var(--selected-index) * 100%));transition:transform .18s ease}._indicator_v4pp3_16:dir(rtl){transform:translate(calc(var(--selected-index) * -100%))}@media (prefers-reduced-motion: reduce){._indicator_v4pp3_16{transition:none}}._option_v4pp3_35{position:relative;border:0;border-radius:999px;background:transparent;color:var(--text-text-primary);padding:var(--spacing-spacing-4xs) var(--spacing-spacing-2xs);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit;font-size:var(--font-size-xs);cursor:pointer;transition:color .18s ease}._option_v4pp3_35[aria-pressed=true]{color:var(--text-text-invert)}@media (forced-colors: active){._option_v4pp3_35[aria-pressed=true]{outline:2px solid Highlight;outline-offset:-2px}}._option_v4pp3_35:focus-visible{outline:2px solid var(--surface-surface-primary-btn);outline-offset:2px;z-index:1}._option_v4pp3_35:disabled{cursor:not-allowed;opacity:.6}@media (prefers-reduced-motion: reduce){._option_v4pp3_35{transition:none}}
|
package/dist/assets/Text.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._text-
|
|
1
|
+
._text-body_1uteu_1{font-family:var(--font-family-body),sans-serif;-webkit-font-smoothing:antialiased}._text-display_1uteu_5{font-family:var(--font-family-display)}._text-xxs_1uteu_9{font-size:var(--font-size-xxs);line-height:var(--line-height-xxs)}._text-xs_1uteu_13{font-size:var(--font-size-xs);line-height:var(--line-height-xs)}._text-sm_1uteu_17{font-size:var(--font-size-sm);line-height:var(--line-height-sm)}._text-md_1uteu_21{font-size:var(--font-size-md);line-height:var(--line-height-md)}._text-lg_1uteu_25{font-size:var(--font-size-lg);line-height:var(--line-height-lg)}._text-xl_1uteu_29{font-size:var(--font-size-xl);line-height:var(--line-height-xl)}._text-2xl_1uteu_33{font-size:var(--font-size-2xl);line-height:var(--line-height-2xl)}._text-3xl_1uteu_37{font-size:var(--font-size-3xl);line-height:var(--line-height-3xl)}._text-4xl_1uteu_41{font-size:var(--font-size-4xl);line-height:var(--line-height-4xl)}._text-5xl_1uteu_45{font-size:var(--font-size-5xl);line-height:var(--line-height-5xl)}._text-6xl_1uteu_49{font-size:var(--font-size-6xl);line-height:var(--line-height-6xl)}._text-thin_1uteu_54{font-weight:var(--font-weight-thin)}._text-extra-light_1uteu_57{font-weight:var(--font-weight-extra-light)}._text-light_1uteu_60{font-weight:var(--font-weight-light)}._text-regular_1uteu_63{font-weight:var(--font-weight-regular)}._text-medium_1uteu_66{font-weight:var(--font-weight-medium)}._text-semibold_1uteu_69{font-weight:var(--font-weight-semibold)}._text-bold_1uteu_72{font-weight:var(--font-weight-bold)}:is(._text-semibold_1uteu_69,._text-bold_1uteu_72):is(._text-lg_1uteu_25,._text-xl_1uteu_29,._text-2xl_1uteu_33,._text-3xl_1uteu_37,._text-4xl_1uteu_41,._text-5xl_1uteu_45,._text-6xl_1uteu_49){letter-spacing:-.02em}._text-color-inherit_1uteu_88{color:inherit}._text-color-warning_1uteu_89{color:var(--text-text-caution)}._text-color-disabled_1uteu_90{color:var(--text-text-disabled)}._text-color-error-warning_1uteu_91{color:var(--text-text-error-warning)}._text-color-default-inverted_1uteu_92{color:var(--text-text-invert)}._text-color-links_1uteu_93{color:var(--text-text-links)}._text-color-links-hover-press_1uteu_94{color:var(--text-text-links-hover-press)}._text-color-primary_1uteu_95{color:var(--text-text-primary)}._text-color-quaternary_1uteu_96{color:var(--text-text-quaternary)}._text-color-search-bar_1uteu_97{color:var(--text-text-search-bar)}._text-color-secondary_1uteu_98{color:var(--text-text-secondary)}._text-color-success_1uteu_99{color:var(--text-text-success)}._text-color-tertiary_1uteu_100{color:var(--text-text-tertiary)}._text-color-footer_1uteu_101{color:var(--text-text-footer)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_15jl6_1{--inset-shadow-color: var(--surface-surface-primary-btn);--inset-shadow-style: 0 0 0, inset 0 0 0 var(--spacing-0-125) var(--inset-shadow-color);transition-property:background-color,border-width,box-shadow,color;transition-duration:.1s;transition-timing-function:ease-in;padding:var(--spacing-1);border:none;cursor:pointer;text-decoration:none;text-align:center;font-weight:var(--font-weight-semibold);letter-spacing:.03em;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--spacing-spacing-3xs)}._button_15jl6_1:hover{box-shadow:var(--color-neutrals-neutral-2) var(--spacing-0-125) var(--spacing-0-25) var(--spacing-0-5)}._button_15jl6_1:active{box-shadow:none}._button_15jl6_1:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert);transition:none;cursor:default}._button_15jl6_1:disabled:hover{box-shadow:none}._button-primary_15jl6_46{background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._button-primary_15jl6_46:active{background-color:var(--color-brand-secondary-dark-teal-blue)}._button-primary_15jl6_46:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_15jl6_60{background-color:var(--surface-surface-secondary-btn);border:1px solid var(--border-border-primary-btn);color:var(--text-text-links)}._button-secondary_15jl6_60:active{--inset-shadow-color: var(--surface-surface-secondary);box-shadow:var(--inset-shadow-style)}._button-secondary_15jl6_60:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);box-shadow:none}._button-secondary_15jl6_60:disabled:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_15jl6_81{background-color:transparent;border:1px solid var(--color-neutrals-neutral-1);color:var(--color-neutrals-neutral-1)}._button-secondary-transparent_15jl6_81:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);border:1px solid var(--border-border-primary)}._button-secondary-transparent_15jl6_81:disabled:hover{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus);box-shadow:none}._button-secondary-transparent_15jl6_81:hover{background-color:var(--color-neutrals-neutral-1);border:1px solid var(--border-border-primary);color:#000;box-shadow:none}._button-cta-primary_15jl6_106{background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._button-cta-primary_15jl6_106:active{background-color:var(--surface-surface-call-to-action-btn-focus)}._button-cta-primary_15jl6_106:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-tertiary_15jl6_120{background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._button-tertiary_15jl6_120:active{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-tertiary_15jl6_120:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-destructive_15jl6_138{background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._button-destructive_15jl6_138:active{color:var(--surface-surface-error-warning-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--border-border-error-warning);box-shadow:var(--inset-shadow-style)}._button-destructive_15jl6_138:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-size-xxs_15jl6_156{border-radius:var(--border-radius-xs);padding:var(--spacing-spacing-4xs) var(--spacing-spacing-4xs)}._button-size-xs_15jl6_160{border-radius:var(--border-radius-xs);padding:calc(var(--spacing-spacing-4xs) - 1px) var(--spacing-spacing-2xs)}._button-size-sm_15jl6_164{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-3xs) - 1px) var(--spacing-0-75)}._button-size-md_15jl6_168{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-2xs) - 1px) var(--spacing-spacing-default)}._button-size-lg_15jl6_172{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-1xs) - 2px) var(--spacing-spacing-default)}._button-size-xl_15jl6_176{border-radius:var(--border-radius-sm);padding:var(--spacing-0-75) var(--spacing-spacing-default)}._button-primary_15jl6_46._button-disabled_15jl6_181{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_15jl6_60._button-disabled_15jl6_181{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-secondary_15jl6_60._button-disabled_15jl6_181:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_15jl6_81._button-disabled_15jl6_181{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style);border:1px solid var(--border-border-primary)}._button-secondary-transparent_15jl6_81._button-disabled_15jl6_181:hover{box-shadow:var(--inset-shadow-style);color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus)}._button-cta-primary_15jl6_106._button-disabled_15jl6_181,._button-tertiary_15jl6_120._button-disabled_15jl6_181,._button-destructive_15jl6_138._button-disabled_15jl6_181{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}
|
|
@@ -1,39 +1,45 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as s } from "../../Text.module-DMvZIqUi.js";
|
|
2
2
|
import { c as b } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { getHideAtStyles as r } from "../HideAt.js";
|
|
4
|
-
import '../../assets/buttonClassName.css';const i = "
|
|
4
|
+
import '../../assets/buttonClassName.css';const i = "_button_15jl6_1", t = {
|
|
5
5
|
button: i,
|
|
6
|
-
"button-primary": "_button-
|
|
7
|
-
"button-secondary": "_button-
|
|
8
|
-
"button-secondary-transparent": "_button-secondary-
|
|
9
|
-
"button-cta-primary": "_button-cta-
|
|
10
|
-
"button-tertiary": "_button-
|
|
11
|
-
"button-destructive": "_button-
|
|
12
|
-
"button-size-xxs": "_button-size-
|
|
13
|
-
"button-size-xs": "_button-size-
|
|
14
|
-
"button-size-sm": "_button-size-
|
|
15
|
-
"button-size-md": "_button-size-
|
|
16
|
-
"button-size-lg": "_button-size-
|
|
17
|
-
"button-size-xl": "_button-size-
|
|
18
|
-
"button-disabled": "_button-
|
|
6
|
+
"button-primary": "_button-primary_15jl6_46",
|
|
7
|
+
"button-secondary": "_button-secondary_15jl6_60",
|
|
8
|
+
"button-secondary-transparent": "_button-secondary-transparent_15jl6_81",
|
|
9
|
+
"button-cta-primary": "_button-cta-primary_15jl6_106",
|
|
10
|
+
"button-tertiary": "_button-tertiary_15jl6_120",
|
|
11
|
+
"button-destructive": "_button-destructive_15jl6_138",
|
|
12
|
+
"button-size-xxs": "_button-size-xxs_15jl6_156",
|
|
13
|
+
"button-size-xs": "_button-size-xs_15jl6_160",
|
|
14
|
+
"button-size-sm": "_button-size-sm_15jl6_164",
|
|
15
|
+
"button-size-md": "_button-size-md_15jl6_168",
|
|
16
|
+
"button-size-lg": "_button-size-lg_15jl6_172",
|
|
17
|
+
"button-size-xl": "_button-size-xl_15jl6_176",
|
|
18
|
+
"button-disabled": "_button-disabled_15jl6_181"
|
|
19
|
+
}, l = {
|
|
20
|
+
xxs: "xxs",
|
|
21
|
+
xs: "xxs",
|
|
22
|
+
sm: "xxs",
|
|
23
|
+
md: "sm",
|
|
24
|
+
lg: "md",
|
|
25
|
+
xl: "lg"
|
|
19
26
|
};
|
|
20
27
|
function d({
|
|
21
28
|
size: o,
|
|
22
29
|
variant: n,
|
|
23
|
-
hideAt:
|
|
24
|
-
className:
|
|
25
|
-
disabled:
|
|
30
|
+
hideAt: _,
|
|
31
|
+
className: e,
|
|
32
|
+
disabled: u
|
|
26
33
|
}) {
|
|
27
34
|
return b(
|
|
28
35
|
t.button,
|
|
29
36
|
t[`button-${n}`],
|
|
30
37
|
t[`button-size-${o}`],
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
e
|
|
36
|
-
_
|
|
38
|
+
s.text,
|
|
39
|
+
s[`text-${l[o]}`],
|
|
40
|
+
r(_),
|
|
41
|
+
u && t["button-disabled"],
|
|
42
|
+
e
|
|
37
43
|
);
|
|
38
44
|
}
|
|
39
45
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
2
2
|
import { getHideAtStyles as d } from "../HideAt.js";
|
|
3
|
-
import { t as i } from "../../Text.module-
|
|
3
|
+
import { t as i } from "../../Text.module-DMvZIqUi.js";
|
|
4
4
|
import '../../assets/linkClassName.css';const m = "_link_f9a12_1", c = "_disabled_f9a12_14", e = {
|
|
5
5
|
link: m,
|
|
6
6
|
disabled: c
|
package/dist/atoms/Text/Text.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { getHideAtStyles as c } from "../HideAt.js";
|
|
3
|
-
import { t } from "../../Text.module-
|
|
3
|
+
import { t } from "../../Text.module-DMvZIqUi.js";
|
|
4
4
|
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
function g({
|
|
6
6
|
as: o,
|
package/dist/main-client.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { Account } from './molecules/Account/Account';
|
|
|
20
20
|
export type { AccountProps } from './molecules/Account/Account';
|
|
21
21
|
export { Chip } from './molecules/Chip/Chip';
|
|
22
22
|
export type { ChipProps } from './molecules/Chip/Chip';
|
|
23
|
+
export { SegmentedControl } from './molecules/SegmentedControl/SegmentedControl';
|
|
24
|
+
export type { SegmentedControlOption, SegmentedControlProps, } from './molecules/SegmentedControl/SegmentedControl';
|
|
23
25
|
export { ProgressTracker } from './molecules/ProgressTracker/ProgressTracker';
|
|
24
26
|
export type { ProgressTrackerProps, Step, } from './molecules/ProgressTracker/ProgressTracker';
|
|
25
27
|
export { ToggleView } from './molecules/ToggleView/ToggleView';
|
package/dist/main-client.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Head as l } from "./atoms/Root/Head.js";
|
|
|
6
6
|
import { Icon as u } from "./atoms/Icon/Icon.js";
|
|
7
7
|
import { Root as c } from "./atoms/Root/Root.js";
|
|
8
8
|
import { Separator as C } from "./atoms/Separator/Separator.js";
|
|
9
|
-
import { Text as
|
|
9
|
+
import { Text as A } from "./atoms/Text/Text.js";
|
|
10
10
|
import { ToggleSwitch as I } from "./atoms/ToggleSwitch/ToggleSwitch.js";
|
|
11
11
|
import { Link as B } from "./atoms/Link/Link.js";
|
|
12
12
|
import { linkClassName as h } from "./atoms/Link/linkClassName.js";
|
|
@@ -32,7 +32,7 @@ import { CustomWizardBadge as io } from "./molecules/CustomWizardBadge/CustomWiz
|
|
|
32
32
|
import { extractAdmonitions as uo } from "./molecules/Markdown/remarkAdmonition.js";
|
|
33
33
|
import { NotFound as co } from "./organisms/NotFound/NotFound.js";
|
|
34
34
|
import { StatusPage as Co } from "./organisms/StatusPage/StatusPage.js";
|
|
35
|
-
import { HorizontalScroll as
|
|
35
|
+
import { HorizontalScroll as Ao } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
36
36
|
import { SlideInPanel as Io } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
37
37
|
import { DropdownButton as Bo } from "./atoms/DropdownButton/DropdownButton.js";
|
|
38
38
|
import { Input as ho } from "./atoms/Input/Input.js";
|
|
@@ -43,84 +43,86 @@ import { Popover as Mo } from "./atoms/Popover/Popover.js";
|
|
|
43
43
|
import { Accordion as bo } from "./molecules/Accordion/Accordion.js";
|
|
44
44
|
import { Account as Eo } from "./molecules/Account/Account.js";
|
|
45
45
|
import { Chip as zo } from "./molecules/Chip/Chip.js";
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
46
|
+
import { SegmentedControl as _o } from "./molecules/SegmentedControl/SegmentedControl.js";
|
|
47
|
+
import { ProgressTracker as Qo } from "./molecules/ProgressTracker/ProgressTracker.js";
|
|
48
|
+
import { ToggleView as Wo } from "./molecules/ToggleView/ToggleView.js";
|
|
49
|
+
import { CartPart as jo } from "./molecules/Cart/CartPart.js";
|
|
50
|
+
import { AddToCartPart as Jo } from "./molecules/AddToCartPart/AddToCartPart.js";
|
|
51
|
+
import { CartSlideInPanel as Xo } from "./molecules/Cart/CartSlideInPanel.js";
|
|
52
|
+
import { StatefulButton as $o } from "./molecules/StatefulButton/StatefulButton.js";
|
|
53
|
+
import { AnimatedCheckMark as rr } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
54
|
+
import { AddToCart as er } from "./molecules/AddToCart/AddToCart.js";
|
|
55
|
+
import { Modal as pr } from "./molecules/Modal/Modal.js";
|
|
56
|
+
import { ImageViewer as xr } from "./molecules/ImageViewer/ImageViewer.js";
|
|
57
|
+
import { T as nr } from "./Table-_UT9976g.js";
|
|
58
|
+
import { Error as lr } from "./molecules/Error/Error.js";
|
|
59
|
+
import { MainNav as ur } from "./organisms/MainNav/MainNav.js";
|
|
60
|
+
import { ChipSelector as cr } from "./organisms/ChipSelector/ChipSelector.js";
|
|
61
|
+
import { SuggestionDropdown as Cr } from "./organisms/SuggestionDropdown/SuggestionDropdown.js";
|
|
62
|
+
import { Product as Ar } from "./organisms/Product/Product.js";
|
|
63
|
+
import { Carousel as Ir } from "./organisms/Carousel/Carousel.js";
|
|
64
|
+
import { Footer as Br } from "./organisms/Footer/Footer.js";
|
|
65
|
+
import { default as hr } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
65
66
|
export {
|
|
66
67
|
fo as ADMONITION_DEFAULT_ICONS,
|
|
67
68
|
bo as Accordion,
|
|
68
69
|
Eo as Account,
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
er as AddToCart,
|
|
71
|
+
Jo as AddToCartPart,
|
|
71
72
|
mo as Admonition,
|
|
72
|
-
|
|
73
|
+
rr as AnimatedCheckMark,
|
|
73
74
|
Z as Availability,
|
|
74
75
|
q as Avatar,
|
|
75
76
|
K as BannerCard,
|
|
76
77
|
oo as Breadcrumbs,
|
|
77
78
|
t as Button,
|
|
78
79
|
Y as CardLink,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
Ir as Carousel,
|
|
81
|
+
jo as CartPart,
|
|
82
|
+
Xo as CartSlideInPanel,
|
|
82
83
|
zo as Chip,
|
|
83
|
-
|
|
84
|
+
cr as ChipSelector,
|
|
84
85
|
f as Column,
|
|
85
86
|
io as CustomWizardBadge,
|
|
86
87
|
to as Disclaimer,
|
|
87
88
|
Bo as DropdownButton,
|
|
88
|
-
|
|
89
|
+
lr as Error,
|
|
89
90
|
m as Flex,
|
|
90
|
-
|
|
91
|
+
Br as Footer,
|
|
91
92
|
x as Grid,
|
|
92
93
|
l as Head,
|
|
93
94
|
n as HighlightedText,
|
|
94
|
-
|
|
95
|
+
Ao as HorizontalScroll,
|
|
95
96
|
u as Icon,
|
|
96
|
-
|
|
97
|
+
xr as ImageViewer,
|
|
97
98
|
ho as Input,
|
|
98
99
|
Lo as InputEndAdornmentButton,
|
|
99
100
|
B as Link,
|
|
100
101
|
D as LinkButton,
|
|
101
102
|
V as Logo,
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
ur as MainNav,
|
|
104
|
+
pr as Modal,
|
|
104
105
|
co as NotFound,
|
|
105
106
|
H as Pill,
|
|
106
107
|
Mo as Popover,
|
|
107
108
|
G as Pricing,
|
|
108
|
-
|
|
109
|
+
Ar as Product,
|
|
109
110
|
R as ProgressBar,
|
|
110
|
-
|
|
111
|
+
Qo as ProgressTracker,
|
|
111
112
|
U as QuantityInput,
|
|
112
113
|
c as Root,
|
|
114
|
+
_o as SegmentedControl,
|
|
113
115
|
vo as Select,
|
|
114
116
|
C as Separator,
|
|
115
117
|
Io as SlideInPanel,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
hr as SpinZoomViewer,
|
|
119
|
+
$o as StatefulButton,
|
|
118
120
|
Co as StatusPage,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
Cr as SuggestionDropdown,
|
|
122
|
+
nr as Table,
|
|
123
|
+
A as Text,
|
|
122
124
|
I as ToggleSwitch,
|
|
123
|
-
|
|
125
|
+
Wo as ToggleView,
|
|
124
126
|
Fo as Tooltip,
|
|
125
127
|
ao as Upsell,
|
|
126
128
|
O as configureImage,
|
package/dist/main.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export { Avatar } from './molecules/Avatar/Avatar';
|
|
|
23
23
|
export type { AvatarProps } from './molecules/Avatar/Avatar';
|
|
24
24
|
export { Chip } from './molecules/Chip/Chip';
|
|
25
25
|
export type { ChipProps } from './molecules/Chip/Chip';
|
|
26
|
+
export { SegmentedControl } from './molecules/SegmentedControl/SegmentedControl';
|
|
27
|
+
export type { SegmentedControlOption, SegmentedControlProps, } from './molecules/SegmentedControl/SegmentedControl';
|
|
26
28
|
export { Logo } from './molecules/Logo/Logo';
|
|
27
29
|
export { Error } from './molecules/Error/Error';
|
|
28
30
|
export type { ErrorProps, ErrorMessageProps, ErrorDetailsProps, } from './molecules/Error/Error';
|
package/dist/main.js
CHANGED
|
@@ -2,46 +2,48 @@ import { Button as t } from "./atoms/Button/Button.js";
|
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
4
|
import { Head as i } from "./atoms/Root/Head.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Root as
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { Text as
|
|
5
|
+
import { Icon as d } from "./atoms/Icon/Icon.js";
|
|
6
|
+
import { Root as g } from "./atoms/Root/Root.js";
|
|
7
|
+
import { Separator as A } from "./atoms/Separator/Separator.js";
|
|
8
|
+
import { Text as S } from "./atoms/Text/Text.js";
|
|
9
9
|
import { Input as C } from "./atoms/Input/Input.js";
|
|
10
10
|
import { InputEndAdornmentButton as T } from "./atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
|
|
11
11
|
import { Select as E } from "./atoms/Select/Select.js";
|
|
12
12
|
import { Account as h } from "./molecules/Account/Account.js";
|
|
13
13
|
import { Avatar as w } from "./molecules/Avatar/Avatar.js";
|
|
14
14
|
import { Chip as F } from "./molecules/Chip/Chip.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
15
|
+
import { SegmentedControl as M } from "./molecules/SegmentedControl/SegmentedControl.js";
|
|
16
|
+
import { Logo as s } from "./molecules/Logo/Logo.js";
|
|
17
|
+
import { Error as H } from "./molecules/Error/Error.js";
|
|
18
|
+
import { Admonition as U } from "./molecules/Admonition/Admonition.js";
|
|
19
|
+
import { ADMONITION_DEFAULT_ICONS as b } from "./molecules/Admonition/admonitionTokens.js";
|
|
20
|
+
import { ToggleView as k } from "./molecules/ToggleView/ToggleView.js";
|
|
21
|
+
import { MainNav as y } from "./organisms/MainNav/MainNav.js";
|
|
22
|
+
import { ChipSelector as J } from "./organisms/ChipSelector/ChipSelector.js";
|
|
23
|
+
import { SuggestionDropdown as P } from "./organisms/SuggestionDropdown/SuggestionDropdown.js";
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
b as ADMONITION_DEFAULT_ICONS,
|
|
25
26
|
h as Account,
|
|
26
|
-
|
|
27
|
+
U as Admonition,
|
|
27
28
|
w as Avatar,
|
|
28
29
|
t as Button,
|
|
29
30
|
F as Chip,
|
|
30
|
-
|
|
31
|
+
J as ChipSelector,
|
|
31
32
|
x as Column,
|
|
32
|
-
|
|
33
|
+
H as Error,
|
|
33
34
|
p as Flex,
|
|
34
35
|
f as Grid,
|
|
35
36
|
i as Head,
|
|
36
|
-
|
|
37
|
+
d as Icon,
|
|
37
38
|
C as Input,
|
|
38
39
|
T as InputEndAdornmentButton,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
s as Logo,
|
|
41
|
+
y as MainNav,
|
|
42
|
+
g as Root,
|
|
43
|
+
M as SegmentedControl,
|
|
42
44
|
E as Select,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
A as Separator,
|
|
46
|
+
P as SuggestionDropdown,
|
|
47
|
+
S as Text,
|
|
48
|
+
k as ToggleView
|
|
47
49
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { Flex as n } from "../../atoms/Flex/Flex.js";
|
|
3
3
|
import { getHideAtStyles as m } from "../../atoms/HideAt.js";
|
|
4
4
|
import { c } from "../../clsx-OuTLNxxd.js";
|
|
5
|
-
import { t } from "../../Text.module-
|
|
5
|
+
import { t } from "../../Text.module-DMvZIqUi.js";
|
|
6
6
|
import '../../assets/Avatar.css';const l = "_avatar_nvnsd_1", f = {
|
|
7
7
|
avatar: l
|
|
8
8
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { HideAtProps } from '../../atoms/HideAt';
|
|
3
|
+
export interface SegmentedControlOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SegmentedControlProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "children">, HideAtProps {
|
|
9
|
+
/** Accessible name for the group of choices. */
|
|
10
|
+
"aria-label": string;
|
|
11
|
+
/** Options must have unique values. */
|
|
12
|
+
options: readonly SegmentedControlOption[];
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (_value: string) => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function SegmentedControl({ options, value, onChange, disabled, hideAt, className, ...otherProps }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { getHideAtStyles as _ } from "../../atoms/HideAt.js";
|
|
4
|
+
import '../../assets/SegmentedControl.css';const u = "_control_v4pp3_1", g = "_segments_v4pp3_8", v = "_indicator_v4pp3_16", x = "_option_v4pp3_35", t = {
|
|
5
|
+
control: u,
|
|
6
|
+
segments: g,
|
|
7
|
+
indicator: v,
|
|
8
|
+
option: x
|
|
9
|
+
};
|
|
10
|
+
function y({
|
|
11
|
+
options: s,
|
|
12
|
+
value: o,
|
|
13
|
+
onChange: c,
|
|
14
|
+
disabled: r,
|
|
15
|
+
hideAt: a,
|
|
16
|
+
className: d,
|
|
17
|
+
...i
|
|
18
|
+
}) {
|
|
19
|
+
const l = s.findIndex((e) => e.value === o);
|
|
20
|
+
return /* @__PURE__ */ n(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
...i,
|
|
24
|
+
role: "group",
|
|
25
|
+
className: p(t.control, _(a), d),
|
|
26
|
+
children: /* @__PURE__ */ m(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: t.segments,
|
|
30
|
+
style: { "--segment-count": s.length },
|
|
31
|
+
children: [
|
|
32
|
+
l !== -1 && /* @__PURE__ */ n(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: t.indicator,
|
|
37
|
+
style: { "--selected-index": l }
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
s.map((e) => /* @__PURE__ */ n(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
className: t.option,
|
|
45
|
+
"aria-pressed": e.value === o,
|
|
46
|
+
disabled: r || e.disabled,
|
|
47
|
+
onClick: () => c(e.value),
|
|
48
|
+
children: e.label
|
|
49
|
+
},
|
|
50
|
+
e.value
|
|
51
|
+
))
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
y as SegmentedControl
|
|
60
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { SegmentedControl, SegmentedControlProps } from './SegmentedControl';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SegmentedControl;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
render: (args: SegmentedControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
args: {
|
|
12
|
+
"aria-label": string;
|
|
13
|
+
options: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
value: string;
|
|
18
|
+
onChange: () => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|
|
24
|
+
export declare const MultipleOptions: Story;
|
|
25
|
+
export declare const DisabledOption: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n } from "react";
|
|
3
|
+
import { SegmentedControl as t } from "./SegmentedControl.js";
|
|
4
|
+
function r(e) {
|
|
5
|
+
const [l, o] = n(e.value);
|
|
6
|
+
return /* @__PURE__ */ a(t, { ...e, value: l, onChange: o });
|
|
7
|
+
}
|
|
8
|
+
const m = {
|
|
9
|
+
title: "Case Parts/Molecules/SegmentedControl",
|
|
10
|
+
component: t,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: "centered"
|
|
13
|
+
},
|
|
14
|
+
tags: ["autodocs"],
|
|
15
|
+
render: (e) => /* @__PURE__ */ a(r, { ...e }),
|
|
16
|
+
args: {
|
|
17
|
+
"aria-label": "Request mode",
|
|
18
|
+
options: [
|
|
19
|
+
{ value: "chat", label: "Chat" },
|
|
20
|
+
{ value: "form", label: "Form" }
|
|
21
|
+
],
|
|
22
|
+
value: "chat",
|
|
23
|
+
onChange: () => {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, d = {}, c = {
|
|
27
|
+
args: {
|
|
28
|
+
"aria-label": "Display period",
|
|
29
|
+
options: [
|
|
30
|
+
{ value: "day", label: "Day" },
|
|
31
|
+
{ value: "week", label: "This week" },
|
|
32
|
+
{ value: "month", label: "Month" }
|
|
33
|
+
],
|
|
34
|
+
value: "week"
|
|
35
|
+
}
|
|
36
|
+
}, p = {
|
|
37
|
+
args: {
|
|
38
|
+
options: [
|
|
39
|
+
{ value: "chat", label: "Chat" },
|
|
40
|
+
{ value: "form", label: "Form", disabled: !0 }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}, b = {
|
|
44
|
+
args: {
|
|
45
|
+
disabled: !0
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
d as Default,
|
|
50
|
+
b as Disabled,
|
|
51
|
+
p as DisabledOption,
|
|
52
|
+
c as MultipleOptions,
|
|
53
|
+
m as default
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import './assets/Text.css';const t = {
|
|
2
|
-
"text-body": "_text-body_l6qzi_1",
|
|
3
|
-
"text-display": "_text-display_l6qzi_5",
|
|
4
|
-
"text-xxs": "_text-xxs_l6qzi_9",
|
|
5
|
-
"text-xs": "_text-xs_l6qzi_13",
|
|
6
|
-
"text-sm": "_text-sm_l6qzi_17",
|
|
7
|
-
"text-md": "_text-md_l6qzi_21",
|
|
8
|
-
"text-lg": "_text-lg_l6qzi_25",
|
|
9
|
-
"text-xl": "_text-xl_l6qzi_29",
|
|
10
|
-
"text-2xl": "_text-2xl_l6qzi_33",
|
|
11
|
-
"text-3xl": "_text-3xl_l6qzi_37",
|
|
12
|
-
"text-4xl": "_text-4xl_l6qzi_41",
|
|
13
|
-
"text-5xl": "_text-5xl_l6qzi_45",
|
|
14
|
-
"text-6xl": "_text-6xl_l6qzi_49",
|
|
15
|
-
"text-thin": "_text-thin_l6qzi_54",
|
|
16
|
-
"text-extra-light": "_text-extra-light_l6qzi_57",
|
|
17
|
-
"text-light": "_text-light_l6qzi_60",
|
|
18
|
-
"text-regular": "_text-regular_l6qzi_63",
|
|
19
|
-
"text-medium": "_text-medium_l6qzi_66",
|
|
20
|
-
"text-semibold": "_text-semibold_l6qzi_69",
|
|
21
|
-
"text-bold": "_text-bold_l6qzi_73",
|
|
22
|
-
"text-color-inherit": "_text-color-inherit_l6qzi_78",
|
|
23
|
-
"text-color-warning": "_text-color-warning_l6qzi_79",
|
|
24
|
-
"text-color-disabled": "_text-color-disabled_l6qzi_80",
|
|
25
|
-
"text-color-error-warning": "_text-color-error-warning_l6qzi_81",
|
|
26
|
-
"text-color-default-inverted": "_text-color-default-inverted_l6qzi_82",
|
|
27
|
-
"text-color-links": "_text-color-links_l6qzi_83",
|
|
28
|
-
"text-color-links-hover-press": "_text-color-links-hover-press_l6qzi_84",
|
|
29
|
-
"text-color-primary": "_text-color-primary_l6qzi_85",
|
|
30
|
-
"text-color-quaternary": "_text-color-quaternary_l6qzi_86",
|
|
31
|
-
"text-color-search-bar": "_text-color-search-bar_l6qzi_87",
|
|
32
|
-
"text-color-secondary": "_text-color-secondary_l6qzi_88",
|
|
33
|
-
"text-color-success": "_text-color-success_l6qzi_89",
|
|
34
|
-
"text-color-tertiary": "_text-color-tertiary_l6qzi_90",
|
|
35
|
-
"text-color-footer": "_text-color-footer_l6qzi_91"
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
t
|
|
39
|
-
};
|