@wistia/ui 0.13.4 → 0.13.5-beta.1b1e6551.c8a402b
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 +321 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +15 -11
- package/dist/index.d.ts +15 -11
- package/dist/index.mjs +357 -389
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.13.
|
|
3
|
+
* @license @wistia/ui v0.13.5-beta.1b1e6551.c8a402b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2776,7 +2776,7 @@ var Ellipsis = ({ children, lines, ...props }) => /* @__PURE__ */ (0, import_jsx
|
|
|
2776
2776
|
children
|
|
2777
2777
|
}
|
|
2778
2778
|
);
|
|
2779
|
-
Ellipsis.displayName = "
|
|
2779
|
+
Ellipsis.displayName = "Ellipsis_UI";
|
|
2780
2780
|
|
|
2781
2781
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
2782
2782
|
var import_styled_components15 = require("styled-components");
|
|
@@ -7227,7 +7227,7 @@ var Icon = ({
|
|
|
7227
7227
|
}
|
|
7228
7228
|
);
|
|
7229
7229
|
};
|
|
7230
|
-
Icon.displayName = "
|
|
7230
|
+
Icon.displayName = "Icon_UI";
|
|
7231
7231
|
|
|
7232
7232
|
// src/components/Link/Link.tsx
|
|
7233
7233
|
var import_react22 = require("react");
|
|
@@ -7367,7 +7367,7 @@ var Link = (0, import_react22.forwardRef)(
|
|
|
7367
7367
|
return null;
|
|
7368
7368
|
}
|
|
7369
7369
|
);
|
|
7370
|
-
Link.displayName = "
|
|
7370
|
+
Link.displayName = "Link_UI";
|
|
7371
7371
|
|
|
7372
7372
|
// src/components/Button/Button.tsx
|
|
7373
7373
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
@@ -7509,7 +7509,7 @@ var Button = (0, import_react23.forwardRef)(
|
|
|
7509
7509
|
);
|
|
7510
7510
|
}
|
|
7511
7511
|
);
|
|
7512
|
-
Button.displayName = "
|
|
7512
|
+
Button.displayName = "Button_UI";
|
|
7513
7513
|
|
|
7514
7514
|
// src/components/ActionButton/ActionButton.tsx
|
|
7515
7515
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
@@ -7649,7 +7649,7 @@ var ActionButton = (0, import_react24.forwardRef)(
|
|
|
7649
7649
|
);
|
|
7650
7650
|
}
|
|
7651
7651
|
);
|
|
7652
|
-
ActionButton.displayName = "
|
|
7652
|
+
ActionButton.displayName = "ActionButton_UI";
|
|
7653
7653
|
|
|
7654
7654
|
// src/components/Avatar/Avatar.tsx
|
|
7655
7655
|
var import_react25 = require("react");
|
|
@@ -7721,7 +7721,7 @@ var Image = ({
|
|
|
7721
7721
|
...props
|
|
7722
7722
|
}
|
|
7723
7723
|
);
|
|
7724
|
-
Image.displayName = "
|
|
7724
|
+
Image.displayName = "Image_UI";
|
|
7725
7725
|
|
|
7726
7726
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
7727
7727
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
@@ -7764,7 +7764,7 @@ var ColorSchemeWrapper = ({
|
|
|
7764
7764
|
children
|
|
7765
7765
|
}
|
|
7766
7766
|
);
|
|
7767
|
-
ColorSchemeWrapper.displayName = "
|
|
7767
|
+
ColorSchemeWrapper.displayName = "ColorSchemeWrapper_UI";
|
|
7768
7768
|
|
|
7769
7769
|
// src/components/Avatar/Avatar.tsx
|
|
7770
7770
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
@@ -7901,7 +7901,7 @@ var Avatar = ({
|
|
|
7901
7901
|
}
|
|
7902
7902
|
);
|
|
7903
7903
|
};
|
|
7904
|
-
Avatar.displayName = "
|
|
7904
|
+
Avatar.displayName = "Avatar_UI";
|
|
7905
7905
|
|
|
7906
7906
|
// src/components/Badge/Badge.tsx
|
|
7907
7907
|
var import_react26 = require("react");
|
|
@@ -7952,7 +7952,7 @@ var Badge = (0, import_react26.forwardRef)(
|
|
|
7952
7952
|
);
|
|
7953
7953
|
}
|
|
7954
7954
|
);
|
|
7955
|
-
Badge.displayName = "
|
|
7955
|
+
Badge.displayName = "Badge_UI";
|
|
7956
7956
|
|
|
7957
7957
|
// src/components/Banner/Banner.tsx
|
|
7958
7958
|
var import_react31 = require("react");
|
|
@@ -8144,7 +8144,7 @@ var BoxComponent = (0, import_react27.forwardRef)(
|
|
|
8144
8144
|
);
|
|
8145
8145
|
}
|
|
8146
8146
|
);
|
|
8147
|
-
BoxComponent.displayName = "
|
|
8147
|
+
BoxComponent.displayName = "Box_UI";
|
|
8148
8148
|
var Box = makePolymorphic(BoxComponent);
|
|
8149
8149
|
|
|
8150
8150
|
// src/components/Heading/Heading.tsx
|
|
@@ -8283,7 +8283,7 @@ var HeadingComponent = (0, import_react28.forwardRef)(
|
|
|
8283
8283
|
}
|
|
8284
8284
|
)
|
|
8285
8285
|
);
|
|
8286
|
-
HeadingComponent.displayName = "
|
|
8286
|
+
HeadingComponent.displayName = "Heading_UI";
|
|
8287
8287
|
var Heading = makePolymorphic(HeadingComponent);
|
|
8288
8288
|
|
|
8289
8289
|
// src/components/Text/Text.tsx
|
|
@@ -8493,7 +8493,7 @@ var TextComponent = (0, import_react29.forwardRef)(
|
|
|
8493
8493
|
);
|
|
8494
8494
|
}
|
|
8495
8495
|
);
|
|
8496
|
-
TextComponent.displayName = "
|
|
8496
|
+
TextComponent.displayName = "Text_UI";
|
|
8497
8497
|
var Text = makePolymorphic(TextComponent);
|
|
8498
8498
|
|
|
8499
8499
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
@@ -8573,7 +8573,7 @@ var ButtonGroup = ({
|
|
|
8573
8573
|
}
|
|
8574
8574
|
);
|
|
8575
8575
|
};
|
|
8576
|
-
ButtonGroup.displayName = "
|
|
8576
|
+
ButtonGroup.displayName = "ButtonGroup_UI";
|
|
8577
8577
|
|
|
8578
8578
|
// src/components/IconButton/IconButton.tsx
|
|
8579
8579
|
var import_react30 = require("react");
|
|
@@ -8611,7 +8611,7 @@ var IconButton = (0, import_react30.forwardRef)(
|
|
|
8611
8611
|
);
|
|
8612
8612
|
}
|
|
8613
8613
|
);
|
|
8614
|
-
IconButton.displayName = "
|
|
8614
|
+
IconButton.displayName = "IconButton_UI";
|
|
8615
8615
|
|
|
8616
8616
|
// src/components/Banner/Banner.tsx
|
|
8617
8617
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
@@ -8787,7 +8787,7 @@ var Banner = ({
|
|
|
8787
8787
|
}
|
|
8788
8788
|
);
|
|
8789
8789
|
};
|
|
8790
|
-
Banner.displayName = "
|
|
8790
|
+
Banner.displayName = "Banner_UI";
|
|
8791
8791
|
|
|
8792
8792
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
8793
8793
|
var import_react32 = require("react");
|
|
@@ -8835,7 +8835,7 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
8835
8835
|
)
|
|
8836
8836
|
] });
|
|
8837
8837
|
};
|
|
8838
|
-
Breadcrumbs.displayName = "
|
|
8838
|
+
Breadcrumbs.displayName = "Breadcrumbs_UI";
|
|
8839
8839
|
|
|
8840
8840
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
8841
8841
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
@@ -8928,7 +8928,7 @@ var Card = ({
|
|
|
8928
8928
|
children
|
|
8929
8929
|
}
|
|
8930
8930
|
);
|
|
8931
|
-
Card.displayName = "
|
|
8931
|
+
Card.displayName = "Card_UI";
|
|
8932
8932
|
|
|
8933
8933
|
// src/components/Center/Center.tsx
|
|
8934
8934
|
var import_react33 = require("react");
|
|
@@ -8959,7 +8959,7 @@ var Center = (0, import_react33.forwardRef)(
|
|
|
8959
8959
|
}
|
|
8960
8960
|
)
|
|
8961
8961
|
);
|
|
8962
|
-
Center.displayName = "
|
|
8962
|
+
Center.displayName = "Center_UI";
|
|
8963
8963
|
|
|
8964
8964
|
// src/components/Checkbox/Checkbox.tsx
|
|
8965
8965
|
var import_react38 = require("react");
|
|
@@ -9026,7 +9026,7 @@ var ScreenReaderOnly = ({
|
|
|
9026
9026
|
}
|
|
9027
9027
|
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(VisuallyHidden, { ...props, children: accessibleText });
|
|
9028
9028
|
};
|
|
9029
|
-
ScreenReaderOnly.displayName = "
|
|
9029
|
+
ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
|
|
9030
9030
|
|
|
9031
9031
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
9032
9032
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
@@ -9124,7 +9124,7 @@ var StackComponent = (0, import_react34.forwardRef)(
|
|
|
9124
9124
|
);
|
|
9125
9125
|
}
|
|
9126
9126
|
);
|
|
9127
|
-
StackComponent.displayName = "
|
|
9127
|
+
StackComponent.displayName = "Stack_UI";
|
|
9128
9128
|
var Stack = makePolymorphic(StackComponent);
|
|
9129
9129
|
|
|
9130
9130
|
// src/components/FormGroup/FormGroup.tsx
|
|
@@ -9188,7 +9188,7 @@ var FormGroup = ({
|
|
|
9188
9188
|
}
|
|
9189
9189
|
);
|
|
9190
9190
|
};
|
|
9191
|
-
FormGroup.displayName = "
|
|
9191
|
+
FormGroup.displayName = "FormGroup_UI";
|
|
9192
9192
|
|
|
9193
9193
|
// src/components/Form/Form.tsx
|
|
9194
9194
|
var import_react36 = require("react");
|
|
@@ -9335,7 +9335,7 @@ var CheckboxGroup = ({
|
|
|
9335
9335
|
}, [name, derivedValue, onChange]);
|
|
9336
9336
|
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(FormGroup, { ...props, children }) });
|
|
9337
9337
|
};
|
|
9338
|
-
CheckboxGroup.displayName = "
|
|
9338
|
+
CheckboxGroup.displayName = "CheckboxGroup_UI";
|
|
9339
9339
|
|
|
9340
9340
|
// src/components/Checkbox/Checkbox.tsx
|
|
9341
9341
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
@@ -9499,7 +9499,7 @@ var Checkbox = (0, import_react38.forwardRef)(
|
|
|
9499
9499
|
] });
|
|
9500
9500
|
}
|
|
9501
9501
|
);
|
|
9502
|
-
Checkbox.displayName = "
|
|
9502
|
+
Checkbox.displayName = "Checkbox_UI";
|
|
9503
9503
|
|
|
9504
9504
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
9505
9505
|
var import_react39 = require("react");
|
|
@@ -9542,7 +9542,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
9542
9542
|
onClick: handleClick
|
|
9543
9543
|
});
|
|
9544
9544
|
};
|
|
9545
|
-
ClickRegion.displayName = "
|
|
9545
|
+
ClickRegion.displayName = "ClickRegion_UI";
|
|
9546
9546
|
|
|
9547
9547
|
// src/components/Collapsible/Collapsible.tsx
|
|
9548
9548
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
@@ -9567,7 +9567,7 @@ var Collapsible = ({
|
|
|
9567
9567
|
};
|
|
9568
9568
|
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(StyledRoot, { ...controlProps, children });
|
|
9569
9569
|
};
|
|
9570
|
-
Collapsible.displayName = "
|
|
9570
|
+
Collapsible.displayName = "Collapsible_UI";
|
|
9571
9571
|
|
|
9572
9572
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
9573
9573
|
var import_react40 = require("react");
|
|
@@ -9620,7 +9620,7 @@ var CollapsibleTriggerIcon = ({ type, ...props }) => {
|
|
|
9620
9620
|
}
|
|
9621
9621
|
);
|
|
9622
9622
|
};
|
|
9623
|
-
CollapsibleTriggerIcon.displayName = "
|
|
9623
|
+
CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
|
|
9624
9624
|
|
|
9625
9625
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
9626
9626
|
var import_styled_components46 = __toESM(require("styled-components"));
|
|
@@ -9647,41 +9647,50 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9647
9647
|
] }) });
|
|
9648
9648
|
};
|
|
9649
9649
|
|
|
9650
|
+
// src/components/ColorPicker/ColorGrid.tsx
|
|
9651
|
+
var import_react42 = require("react");
|
|
9652
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
9653
|
+
var import_react_radio_group = require("@radix-ui/react-radio-group");
|
|
9654
|
+
|
|
9655
|
+
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
9656
|
+
var import_react41 = require("react");
|
|
9657
|
+
var import_fn4 = require("culori/fn");
|
|
9658
|
+
|
|
9650
9659
|
// src/components/ColorPicker/color-conversion-utils.ts
|
|
9651
9660
|
var import_fn = require("culori/fn");
|
|
9652
|
-
(0, import_fn.useMode)(import_fn.modeRgb);
|
|
9653
|
-
(0, import_fn.useMode)(import_fn.modeHsv);
|
|
9661
|
+
var convertToRgbRaw = (0, import_fn.useMode)(import_fn.modeRgb);
|
|
9662
|
+
var convertToHsvRaw = (0, import_fn.useMode)(import_fn.modeHsv);
|
|
9663
|
+
(0, import_fn.useMode)(import_fn.modeLrgb);
|
|
9654
9664
|
var convertToHsv = (color) => {
|
|
9655
|
-
|
|
9656
|
-
if (
|
|
9657
|
-
|
|
9665
|
+
let result;
|
|
9666
|
+
if (typeof color === "string") {
|
|
9667
|
+
const rgb = (0, import_fn.parseHex)(color);
|
|
9668
|
+
if (rgb == null) {
|
|
9669
|
+
throw new Error(`Invalid hex color value: ${color}`);
|
|
9670
|
+
}
|
|
9671
|
+
result = convertToHsvRaw(rgb);
|
|
9658
9672
|
}
|
|
9659
|
-
|
|
9673
|
+
result = convertToHsvRaw(color);
|
|
9674
|
+
if (result == null) {
|
|
9675
|
+
throw new Error(`Invalid color value: ${JSON.stringify(color)}`);
|
|
9676
|
+
}
|
|
9677
|
+
return result;
|
|
9660
9678
|
};
|
|
9661
|
-
var
|
|
9679
|
+
var convertToRgb = (color) => {
|
|
9662
9680
|
let result;
|
|
9663
9681
|
if (typeof color === "string") {
|
|
9664
9682
|
const rgb = (0, import_fn.parseHex)(color);
|
|
9665
9683
|
if (rgb == null) {
|
|
9666
9684
|
throw new Error(`Invalid hex color value: ${color}`);
|
|
9667
9685
|
}
|
|
9668
|
-
result = (
|
|
9669
|
-
}
|
|
9670
|
-
|
|
9671
|
-
|
|
9686
|
+
result = convertToRgbRaw(color);
|
|
9687
|
+
}
|
|
9688
|
+
result = convertToRgbRaw(color);
|
|
9689
|
+
if (result == null) {
|
|
9690
|
+
throw new Error(`Invalid color value: ${JSON.stringify(color)}`);
|
|
9672
9691
|
}
|
|
9673
9692
|
return result;
|
|
9674
9693
|
};
|
|
9675
|
-
var convertToRgb = (hsv) => (0, import_fn.convertHsvToRgb)(hsv);
|
|
9676
|
-
|
|
9677
|
-
// src/components/ColorPicker/ColorGrid.tsx
|
|
9678
|
-
var import_react42 = require("react");
|
|
9679
|
-
var import_styled_components47 = __toESM(require("styled-components"));
|
|
9680
|
-
var import_react_radio_group = require("@radix-ui/react-radio-group");
|
|
9681
|
-
|
|
9682
|
-
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
9683
|
-
var import_react41 = require("react");
|
|
9684
|
-
var import_fn4 = require("culori/fn");
|
|
9685
9694
|
|
|
9686
9695
|
// src/components/ColorPicker/transitionBetweenColors.ts
|
|
9687
9696
|
var import_fn2 = require("culori/fn");
|
|
@@ -9736,10 +9745,21 @@ var THREE_SIXTY = 360;
|
|
|
9736
9745
|
var TWO_FIFTY_FIVE = 255;
|
|
9737
9746
|
var DEFAULT_MIN_CONTRAST = 4.5;
|
|
9738
9747
|
var DEFAULT_COLOR_FOR_COMPARISON = "#ffffff";
|
|
9748
|
+
var DEFAULT_OPACITY_FOR_CONTRAST_CALCULATION = 1;
|
|
9739
9749
|
|
|
9740
9750
|
// src/components/ColorPicker/contrast-utils.ts
|
|
9741
9751
|
var CONTRAST_EPSILON = 4e-3;
|
|
9742
9752
|
var VALUE_CHANNEL_SNAP_EPSILON = 5e-4;
|
|
9753
|
+
var compositeOverWhite = (color, alpha = 1) => {
|
|
9754
|
+
const compositeChannel = (channel) => alpha * channel + (1 - alpha);
|
|
9755
|
+
const colorAsRgb = convertToRgb(color);
|
|
9756
|
+
return {
|
|
9757
|
+
mode: "rgb",
|
|
9758
|
+
r: compositeChannel(colorAsRgb.r),
|
|
9759
|
+
g: compositeChannel(colorAsRgb.g),
|
|
9760
|
+
b: compositeChannel(colorAsRgb.b)
|
|
9761
|
+
};
|
|
9762
|
+
};
|
|
9743
9763
|
var snapValueToEdges = (value) => {
|
|
9744
9764
|
if (value > 1 - VALUE_CHANNEL_SNAP_EPSILON) {
|
|
9745
9765
|
return 1;
|
|
@@ -9763,10 +9783,11 @@ var updateSearchBounds = (searchingBrighter, contrast, minContrast, midValue, se
|
|
|
9763
9783
|
};
|
|
9764
9784
|
var getAccessibleColorByValueChannelChange = ({
|
|
9765
9785
|
originalHsv,
|
|
9766
|
-
|
|
9786
|
+
colorForComparison,
|
|
9767
9787
|
minContrast,
|
|
9768
9788
|
maxIterations = 50,
|
|
9769
|
-
direction
|
|
9789
|
+
direction,
|
|
9790
|
+
opacityForContrastCalculation
|
|
9770
9791
|
}) => {
|
|
9771
9792
|
const searchingBrighter = direction === "brighter";
|
|
9772
9793
|
const lowValue = searchingBrighter ? originalHsv.v : 0;
|
|
@@ -9778,8 +9799,10 @@ var getAccessibleColorByValueChannelChange = ({
|
|
|
9778
9799
|
v: extremeValue,
|
|
9779
9800
|
mode: "hsv"
|
|
9780
9801
|
};
|
|
9781
|
-
const
|
|
9782
|
-
|
|
9802
|
+
const extremeContrast = (0, import_fn3.wcagContrast)(
|
|
9803
|
+
compositeOverWhite(extremeVariant, opacityForContrastCalculation),
|
|
9804
|
+
colorForComparison
|
|
9805
|
+
);
|
|
9783
9806
|
if (extremeContrast < minContrast) {
|
|
9784
9807
|
return null;
|
|
9785
9808
|
}
|
|
@@ -9795,7 +9818,10 @@ var getAccessibleColorByValueChannelChange = ({
|
|
|
9795
9818
|
v: midValue,
|
|
9796
9819
|
mode: "hsv"
|
|
9797
9820
|
};
|
|
9798
|
-
const contrast = (0, import_fn3.wcagContrast)(
|
|
9821
|
+
const contrast = (0, import_fn3.wcagContrast)(
|
|
9822
|
+
compositeOverWhite(candidateHsv, opacityForContrastCalculation),
|
|
9823
|
+
colorForComparison
|
|
9824
|
+
);
|
|
9799
9825
|
if (contrast >= minContrast) {
|
|
9800
9826
|
bestSoFar = candidateHsv;
|
|
9801
9827
|
}
|
|
@@ -9838,9 +9864,10 @@ var chooseClosestDerivativeToOriginal = (brighterOption, darkerOption, originalH
|
|
|
9838
9864
|
};
|
|
9839
9865
|
var getAccessibleColorBySaturationAndValueChange = ({
|
|
9840
9866
|
originalHsv,
|
|
9841
|
-
|
|
9867
|
+
colorForComparison,
|
|
9842
9868
|
minContrast,
|
|
9843
|
-
direction
|
|
9869
|
+
direction,
|
|
9870
|
+
opacityForContrastCalculation
|
|
9844
9871
|
}) => {
|
|
9845
9872
|
const hsvDifference = (0, import_fn3.differenceEuclidean)("hsv");
|
|
9846
9873
|
const maxIterations = 50;
|
|
@@ -9867,7 +9894,7 @@ var getAccessibleColorBySaturationAndValueChange = ({
|
|
|
9867
9894
|
};
|
|
9868
9895
|
};
|
|
9869
9896
|
const checkContrast = (hsv) => {
|
|
9870
|
-
return (0, import_fn3.wcagContrast)(
|
|
9897
|
+
return (0, import_fn3.wcagContrast)(compositeOverWhite(hsv, opacityForContrastCalculation), colorForComparison);
|
|
9871
9898
|
};
|
|
9872
9899
|
const extremeHsv = getHsvForStep(highStep);
|
|
9873
9900
|
if (checkContrast(extremeHsv) < minContrast) {
|
|
@@ -9897,51 +9924,60 @@ var getAccessibleColorBySaturationAndValueChange = ({
|
|
|
9897
9924
|
};
|
|
9898
9925
|
var getAccessibleColorInDirection = ({
|
|
9899
9926
|
originalHsv,
|
|
9900
|
-
|
|
9927
|
+
colorForComparison,
|
|
9901
9928
|
minContrast,
|
|
9902
9929
|
maxIterations = 50,
|
|
9903
|
-
direction
|
|
9930
|
+
direction,
|
|
9931
|
+
opacityForContrastCalculation
|
|
9904
9932
|
}) => {
|
|
9905
9933
|
const valueResult = getAccessibleColorByValueChannelChange({
|
|
9906
9934
|
originalHsv,
|
|
9907
|
-
|
|
9935
|
+
colorForComparison,
|
|
9908
9936
|
minContrast,
|
|
9909
9937
|
maxIterations,
|
|
9910
|
-
direction
|
|
9938
|
+
direction,
|
|
9939
|
+
opacityForContrastCalculation
|
|
9911
9940
|
});
|
|
9912
9941
|
if (valueResult !== null) {
|
|
9913
9942
|
return valueResult;
|
|
9914
9943
|
}
|
|
9915
9944
|
return getAccessibleColorBySaturationAndValueChange({
|
|
9916
9945
|
originalHsv,
|
|
9917
|
-
|
|
9946
|
+
colorForComparison,
|
|
9918
9947
|
minContrast,
|
|
9919
|
-
direction
|
|
9948
|
+
direction,
|
|
9949
|
+
opacityForContrastCalculation
|
|
9920
9950
|
});
|
|
9921
9951
|
};
|
|
9922
9952
|
var getAccessibleColor = ({
|
|
9923
9953
|
originalHsv,
|
|
9924
|
-
|
|
9954
|
+
colorForComparison,
|
|
9925
9955
|
minContrast = DEFAULT_MIN_CONTRAST,
|
|
9926
|
-
maxIterations = 50
|
|
9956
|
+
maxIterations = 50,
|
|
9957
|
+
opacityForContrastCalculation
|
|
9927
9958
|
}) => {
|
|
9928
|
-
const originalContrast = (0, import_fn3.wcagContrast)(
|
|
9959
|
+
const originalContrast = (0, import_fn3.wcagContrast)(
|
|
9960
|
+
compositeOverWhite(originalHsv, opacityForContrastCalculation),
|
|
9961
|
+
colorForComparison
|
|
9962
|
+
);
|
|
9929
9963
|
if (originalContrast >= minContrast) {
|
|
9930
9964
|
return originalHsv;
|
|
9931
9965
|
}
|
|
9932
9966
|
const brighterOption = getAccessibleColorInDirection({
|
|
9933
9967
|
originalHsv,
|
|
9934
|
-
|
|
9968
|
+
colorForComparison,
|
|
9935
9969
|
minContrast,
|
|
9936
9970
|
maxIterations,
|
|
9937
|
-
direction: "brighter"
|
|
9971
|
+
direction: "brighter",
|
|
9972
|
+
opacityForContrastCalculation
|
|
9938
9973
|
});
|
|
9939
9974
|
const darkerOption = getAccessibleColorInDirection({
|
|
9940
9975
|
originalHsv,
|
|
9941
|
-
|
|
9976
|
+
colorForComparison,
|
|
9942
9977
|
minContrast,
|
|
9943
9978
|
maxIterations,
|
|
9944
|
-
direction: "darker"
|
|
9979
|
+
direction: "darker",
|
|
9980
|
+
opacityForContrastCalculation
|
|
9945
9981
|
});
|
|
9946
9982
|
const result = chooseClosestDerivativeToOriginal(brighterOption, darkerOption, originalHsv);
|
|
9947
9983
|
if (result == null) {
|
|
@@ -9953,214 +9989,138 @@ var getAccessibleColor = ({
|
|
|
9953
9989
|
};
|
|
9954
9990
|
var hasAccessibleDerivatives = ({
|
|
9955
9991
|
originalHsv,
|
|
9956
|
-
|
|
9957
|
-
minContrast = DEFAULT_MIN_CONTRAST
|
|
9992
|
+
colorForComparison,
|
|
9993
|
+
minContrast = DEFAULT_MIN_CONTRAST,
|
|
9994
|
+
opacityForContrastCalculation
|
|
9958
9995
|
}) => {
|
|
9959
|
-
const originalContrast = (0, import_fn3.wcagContrast)(
|
|
9996
|
+
const originalContrast = (0, import_fn3.wcagContrast)(
|
|
9997
|
+
compositeOverWhite(originalHsv, opacityForContrastCalculation),
|
|
9998
|
+
colorForComparison
|
|
9999
|
+
);
|
|
9960
10000
|
if (originalContrast >= minContrast) {
|
|
9961
10001
|
return true;
|
|
9962
10002
|
}
|
|
9963
10003
|
const brighterOption = getAccessibleColorInDirection({
|
|
9964
10004
|
originalHsv,
|
|
9965
|
-
|
|
10005
|
+
colorForComparison,
|
|
9966
10006
|
minContrast,
|
|
9967
|
-
direction: "brighter"
|
|
10007
|
+
direction: "brighter",
|
|
10008
|
+
opacityForContrastCalculation
|
|
9968
10009
|
});
|
|
9969
10010
|
const darkerOption = getAccessibleColorInDirection({
|
|
9970
10011
|
originalHsv,
|
|
9971
|
-
|
|
10012
|
+
colorForComparison,
|
|
9972
10013
|
minContrast,
|
|
9973
|
-
direction: "darker"
|
|
10014
|
+
direction: "darker",
|
|
10015
|
+
opacityForContrastCalculation
|
|
9974
10016
|
});
|
|
9975
10017
|
return brighterOption !== null || darkerOption !== null;
|
|
9976
10018
|
};
|
|
9977
10019
|
|
|
9978
10020
|
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
9979
10021
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9980
|
-
var createInitialState = ({
|
|
9981
|
-
valueAsHex,
|
|
9982
|
-
shouldEnforceMinContrast,
|
|
9983
|
-
colorForComparisonAsHex,
|
|
9984
|
-
minimumContrastRatio
|
|
9985
|
-
}) => {
|
|
9986
|
-
const valueAsHsv = convertToHsv(valueAsHex);
|
|
9987
|
-
const colorForComparisonAsLrgb = convertToLrgb(colorForComparisonAsHex);
|
|
9988
|
-
return {
|
|
9989
|
-
nonDerivedValueAsHsv: valueAsHsv,
|
|
9990
|
-
nonDerivedValueAsHex: valueAsHex,
|
|
9991
|
-
valueAsHsv,
|
|
9992
|
-
shouldEnforceMinContrast,
|
|
9993
|
-
colorForComparisonAsLrgb,
|
|
9994
|
-
minimumContrastRatio,
|
|
9995
|
-
isTransitioning: false
|
|
9996
|
-
};
|
|
9997
|
-
};
|
|
9998
|
-
var colorPickerReducer = (state, action) => {
|
|
9999
|
-
switch (action.type) {
|
|
10000
|
-
case "SET_VALUE_AS_HSV":
|
|
10001
|
-
const result = {
|
|
10002
|
-
...state,
|
|
10003
|
-
...action.payload
|
|
10004
|
-
};
|
|
10005
|
-
if (action.payload.nonDerivedValueAsHsv != null) {
|
|
10006
|
-
result.nonDerivedValueAsHex = (0, import_fn4.formatHex)(action.payload.nonDerivedValueAsHsv);
|
|
10007
|
-
}
|
|
10008
|
-
return result;
|
|
10009
|
-
case "SET_SHOULD_ENFORCE_MIN_CONTRAST":
|
|
10010
|
-
return {
|
|
10011
|
-
...state,
|
|
10012
|
-
shouldEnforceMinContrast: action.payload
|
|
10013
|
-
};
|
|
10014
|
-
case "SET_MINIMUM_CONTRAST_RATIO":
|
|
10015
|
-
return {
|
|
10016
|
-
...state,
|
|
10017
|
-
minimumContrastRatio: action.payload,
|
|
10018
|
-
valueAsHsv: state.shouldEnforceMinContrast ? getAccessibleColor({
|
|
10019
|
-
originalHsv: state.valueAsHsv,
|
|
10020
|
-
colorForComparisonAsLrgb: state.colorForComparisonAsLrgb,
|
|
10021
|
-
minContrast: action.payload
|
|
10022
|
-
}) : state.valueAsHsv
|
|
10023
|
-
};
|
|
10024
|
-
case "SET_COLOR_FOR_COMPARISON":
|
|
10025
|
-
return {
|
|
10026
|
-
...state,
|
|
10027
|
-
colorForComparisonAsLrgb: action.payload,
|
|
10028
|
-
valueAsHsv: state.shouldEnforceMinContrast ? getAccessibleColor({
|
|
10029
|
-
originalHsv: state.valueAsHsv,
|
|
10030
|
-
colorForComparisonAsLrgb: action.payload,
|
|
10031
|
-
minContrast: state.minimumContrastRatio
|
|
10032
|
-
}) : state.valueAsHsv
|
|
10033
|
-
};
|
|
10034
|
-
case "SET_IS_TRANSITIONING":
|
|
10035
|
-
return {
|
|
10036
|
-
...state,
|
|
10037
|
-
isTransitioning: action.payload
|
|
10038
|
-
};
|
|
10039
|
-
default:
|
|
10040
|
-
return state;
|
|
10041
|
-
}
|
|
10042
|
-
};
|
|
10043
10022
|
var ColorPickerContext = (0, import_react41.createContext)(null);
|
|
10044
10023
|
var ColorPickerProvider = ({
|
|
10045
10024
|
children,
|
|
10046
|
-
|
|
10025
|
+
colorForComparison,
|
|
10026
|
+
minimumContrastRatio,
|
|
10047
10027
|
onValueChange,
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
colorForComparison: colorForComparisonAsHex = DEFAULT_COLOR_FOR_COMPARISON
|
|
10028
|
+
opacityForContrastCalculation,
|
|
10029
|
+
value: valueAsHex
|
|
10051
10030
|
}) => {
|
|
10052
|
-
const [
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
valueAsHex,
|
|
10056
|
-
shouldEnforceMinContrast,
|
|
10057
|
-
colorForComparisonAsHex,
|
|
10058
|
-
minimumContrastRatio
|
|
10059
|
-
})
|
|
10060
|
-
);
|
|
10061
|
-
const valueAsLrgb = (0, import_react41.useMemo)(() => convertToLrgb(state.valueAsHsv), [state.valueAsHsv]);
|
|
10062
|
-
const colorForComparisonAsLrgb = (0, import_react41.useMemo)(
|
|
10063
|
-
() => convertToLrgb(colorForComparisonAsHex),
|
|
10064
|
-
[colorForComparisonAsHex]
|
|
10065
|
-
);
|
|
10066
|
-
const currentContrastRatio = (0, import_react41.useMemo)(() => {
|
|
10067
|
-
return (0, import_fn4.wcagContrast)(valueAsLrgb, colorForComparisonAsLrgb);
|
|
10068
|
-
}, [valueAsLrgb, colorForComparisonAsLrgb]);
|
|
10069
|
-
const hasAccessibleDerivativesValue = (0, import_react41.useMemo)(() => {
|
|
10070
|
-
return hasAccessibleDerivatives({
|
|
10071
|
-
originalHsv: state.valueAsHsv,
|
|
10072
|
-
colorForComparisonAsLrgb,
|
|
10073
|
-
minContrast: minimumContrastRatio
|
|
10074
|
-
});
|
|
10075
|
-
}, [state.valueAsHsv, colorForComparisonAsLrgb, minimumContrastRatio]);
|
|
10031
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react41.useState)(false);
|
|
10032
|
+
const [nonDerivedValueAsHsv, setNonDerivedValueAsHsv] = (0, import_react41.useState)(convertToHsv(valueAsHex));
|
|
10033
|
+
const [shouldEnforceMinContrast, setShouldEnforceMinContrast] = (0, import_react41.useState)(false);
|
|
10076
10034
|
const getAccessibleDerivativeColor = (0, import_react41.useCallback)(
|
|
10077
10035
|
(originalHsv) => getAccessibleColor({
|
|
10078
10036
|
originalHsv,
|
|
10079
|
-
|
|
10080
|
-
minContrast: minimumContrastRatio
|
|
10037
|
+
colorForComparison,
|
|
10038
|
+
minContrast: minimumContrastRatio,
|
|
10039
|
+
opacityForContrastCalculation
|
|
10081
10040
|
}),
|
|
10082
|
-
[minimumContrastRatio,
|
|
10041
|
+
[colorForComparison, minimumContrastRatio, opacityForContrastCalculation]
|
|
10083
10042
|
);
|
|
10084
|
-
const
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
onValueChange(hexToSet);
|
|
10089
|
-
dispatch({
|
|
10090
|
-
type: "SET_VALUE_AS_HSV",
|
|
10091
|
-
payload: { valueAsHsv: hsvToSet, nonDerivedValueAsHsv: rawNewValueAsHsv }
|
|
10092
|
-
});
|
|
10093
|
-
},
|
|
10094
|
-
[getAccessibleDerivativeColor, state.shouldEnforceMinContrast, onValueChange]
|
|
10043
|
+
const valueAsHsv = shouldEnforceMinContrast ? getAccessibleDerivativeColor(nonDerivedValueAsHsv) : nonDerivedValueAsHsv;
|
|
10044
|
+
const currentContrastRatio = (0, import_fn4.wcagContrast)(
|
|
10045
|
+
compositeOverWhite(valueAsHsv, opacityForContrastCalculation),
|
|
10046
|
+
colorForComparison
|
|
10095
10047
|
);
|
|
10048
|
+
const hasAccessibleDerivativesValue = (0, import_react41.useMemo)(() => {
|
|
10049
|
+
return hasAccessibleDerivatives({
|
|
10050
|
+
originalHsv: valueAsHsv,
|
|
10051
|
+
colorForComparison,
|
|
10052
|
+
minContrast: minimumContrastRatio,
|
|
10053
|
+
opacityForContrastCalculation
|
|
10054
|
+
});
|
|
10055
|
+
}, [valueAsHsv, colorForComparison, minimumContrastRatio, opacityForContrastCalculation]);
|
|
10056
|
+
const onChangeNonDerivedValueAsHsv = (0, import_react41.useCallback)((nonDerivedValue) => {
|
|
10057
|
+
setNonDerivedValueAsHsv(nonDerivedValue);
|
|
10058
|
+
}, []);
|
|
10096
10059
|
const changeValueSmoothly = (0, import_react41.useCallback)(
|
|
10097
10060
|
(toHsv) => {
|
|
10098
|
-
|
|
10061
|
+
setIsTransitioning(true);
|
|
10099
10062
|
transitionBetweenColors(
|
|
10100
|
-
|
|
10063
|
+
valueAsHsv,
|
|
10101
10064
|
toHsv,
|
|
10102
10065
|
(colorForStepAsHsv) => {
|
|
10103
10066
|
const hexValue = (0, import_fn4.formatHex)(colorForStepAsHsv);
|
|
10104
10067
|
onValueChange(hexValue);
|
|
10105
|
-
dispatch({ type: "SET_VALUE_AS_HSV", payload: { valueAsHsv: colorForStepAsHsv } });
|
|
10106
10068
|
},
|
|
10107
10069
|
() => {
|
|
10108
|
-
|
|
10070
|
+
setIsTransitioning(false);
|
|
10109
10071
|
}
|
|
10110
10072
|
);
|
|
10111
10073
|
},
|
|
10112
|
-
[
|
|
10074
|
+
[valueAsHsv, onValueChange]
|
|
10113
10075
|
);
|
|
10114
|
-
const
|
|
10076
|
+
const setShouldEnforceMinContrastWrapped = (0, import_react41.useCallback)(
|
|
10115
10077
|
(newShouldEnforceMinContrast) => {
|
|
10116
|
-
|
|
10117
|
-
const newColorAsHsv = newShouldEnforceMinContrast ? getAccessibleDerivativeColor(
|
|
10118
|
-
const currentHsv =
|
|
10078
|
+
setShouldEnforceMinContrast(newShouldEnforceMinContrast);
|
|
10079
|
+
const newColorAsHsv = newShouldEnforceMinContrast ? getAccessibleDerivativeColor(valueAsHsv) : nonDerivedValueAsHsv;
|
|
10080
|
+
const currentHsv = valueAsHsv;
|
|
10119
10081
|
if (currentHsv.h !== newColorAsHsv.h || currentHsv.s !== newColorAsHsv.s || currentHsv.v !== newColorAsHsv.v) {
|
|
10120
10082
|
changeValueSmoothly(newColorAsHsv);
|
|
10121
10083
|
}
|
|
10122
10084
|
},
|
|
10123
|
-
[
|
|
10124
|
-
changeValueSmoothly,
|
|
10125
|
-
getAccessibleDerivativeColor,
|
|
10126
|
-
state.nonDerivedValueAsHsv,
|
|
10127
|
-
state.valueAsHsv
|
|
10128
|
-
]
|
|
10085
|
+
[changeValueSmoothly, getAccessibleDerivativeColor, nonDerivedValueAsHsv, valueAsHsv]
|
|
10129
10086
|
);
|
|
10087
|
+
const whatValuePropShouldBe = shouldEnforceMinContrast ? (0, import_fn4.formatHex)(getAccessibleDerivativeColor(nonDerivedValueAsHsv)) : (0, import_fn4.formatHex)(nonDerivedValueAsHsv);
|
|
10130
10088
|
(0, import_react41.useEffect)(() => {
|
|
10131
|
-
if (valueAsHex
|
|
10132
|
-
|
|
10089
|
+
if (valueAsHex !== whatValuePropShouldBe && !isTransitioning) {
|
|
10090
|
+
onValueChange(whatValuePropShouldBe);
|
|
10133
10091
|
}
|
|
10134
|
-
|
|
10135
|
-
dispatch({
|
|
10136
|
-
type: "SET_VALUE_AS_HSV",
|
|
10137
|
-
payload: { valueAsHsv: newValueAsHsv }
|
|
10138
|
-
});
|
|
10139
|
-
}, [getAccessibleDerivativeColor, state.valueAsHsv, valueAsHex]);
|
|
10092
|
+
}, [valueAsHex, whatValuePropShouldBe, isTransitioning, onValueChange]);
|
|
10140
10093
|
const contextValue = (0, import_react41.useMemo)(
|
|
10141
10094
|
() => ({
|
|
10142
|
-
|
|
10143
|
-
valueAsLrgb,
|
|
10095
|
+
colorForComparison,
|
|
10144
10096
|
currentContrastRatio,
|
|
10097
|
+
getAccessibleDerivativeColor,
|
|
10145
10098
|
hasAccessibleDerivatives: hasAccessibleDerivativesValue,
|
|
10146
|
-
|
|
10147
|
-
colorForComparisonAsHex,
|
|
10099
|
+
isTransitioning,
|
|
10148
10100
|
minimumContrastRatio,
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10101
|
+
nonDerivedValueAsHex: (0, import_fn4.formatHex)(nonDerivedValueAsHsv),
|
|
10102
|
+
nonDerivedValueAsHsv,
|
|
10103
|
+
onChangeNonDerivedValueAsHsv,
|
|
10104
|
+
opacityForContrastCalculation,
|
|
10105
|
+
setShouldEnforceMinContrast: setShouldEnforceMinContrastWrapped,
|
|
10106
|
+
shouldEnforceMinContrast,
|
|
10107
|
+
valueAsHex,
|
|
10108
|
+
valueAsHsv
|
|
10152
10109
|
}),
|
|
10153
10110
|
[
|
|
10154
|
-
|
|
10155
|
-
valueAsLrgb,
|
|
10111
|
+
colorForComparison,
|
|
10156
10112
|
currentContrastRatio,
|
|
10113
|
+
getAccessibleDerivativeColor,
|
|
10157
10114
|
hasAccessibleDerivativesValue,
|
|
10158
|
-
|
|
10159
|
-
colorForComparisonAsHex,
|
|
10115
|
+
isTransitioning,
|
|
10160
10116
|
minimumContrastRatio,
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10117
|
+
nonDerivedValueAsHsv,
|
|
10118
|
+
onChangeNonDerivedValueAsHsv,
|
|
10119
|
+
opacityForContrastCalculation,
|
|
10120
|
+
setShouldEnforceMinContrastWrapped,
|
|
10121
|
+
shouldEnforceMinContrast,
|
|
10122
|
+
valueAsHex,
|
|
10123
|
+
valueAsHsv
|
|
10164
10124
|
]
|
|
10165
10125
|
);
|
|
10166
10126
|
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ColorPickerContext.Provider, { value: contextValue, children });
|
|
@@ -10184,13 +10144,13 @@ var Container = (0, import_styled_components47.default)(import_react_radio_group
|
|
|
10184
10144
|
gap: var(--wui-space-02);
|
|
10185
10145
|
`;
|
|
10186
10146
|
var ColorGrid = ({ children }) => {
|
|
10187
|
-
const { valueAsHex,
|
|
10147
|
+
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10188
10148
|
const onValueChange = (0, import_react42.useCallback)(
|
|
10189
10149
|
(value) => {
|
|
10190
10150
|
const hsv = convertToHsv(value);
|
|
10191
|
-
|
|
10151
|
+
onChangeNonDerivedValueAsHsv(hsv);
|
|
10192
10152
|
},
|
|
10193
|
-
[
|
|
10153
|
+
[onChangeNonDerivedValueAsHsv]
|
|
10194
10154
|
);
|
|
10195
10155
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
10196
10156
|
Container,
|
|
@@ -10201,7 +10161,7 @@ var ColorGrid = ({ children }) => {
|
|
|
10201
10161
|
}
|
|
10202
10162
|
);
|
|
10203
10163
|
};
|
|
10204
|
-
ColorGrid.displayName = "
|
|
10164
|
+
ColorGrid.displayName = "ColorGrid_UI";
|
|
10205
10165
|
|
|
10206
10166
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
10207
10167
|
var import_styled_components50 = __toESM(require("styled-components"));
|
|
@@ -10411,7 +10371,7 @@ var Tooltip = ({
|
|
|
10411
10371
|
}
|
|
10412
10372
|
);
|
|
10413
10373
|
};
|
|
10414
|
-
Tooltip.displayName = "
|
|
10374
|
+
Tooltip.displayName = "Tooltip_UI";
|
|
10415
10375
|
|
|
10416
10376
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
10417
10377
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
@@ -10454,7 +10414,7 @@ var ColorGridOption = ({ value, name }) => {
|
|
|
10454
10414
|
}
|
|
10455
10415
|
);
|
|
10456
10416
|
};
|
|
10457
|
-
ColorGridOption.displayName = "
|
|
10417
|
+
ColorGridOption.displayName = "ColorGridOption_UI";
|
|
10458
10418
|
|
|
10459
10419
|
// src/components/ColorPicker/ColorList.tsx
|
|
10460
10420
|
var import_react43 = require("react");
|
|
@@ -10467,16 +10427,16 @@ var Container3 = (0, import_styled_components51.default)(import_react_toggle_gro
|
|
|
10467
10427
|
padding: var(--wui-space-02);
|
|
10468
10428
|
`;
|
|
10469
10429
|
var ColorList = ({ children }) => {
|
|
10470
|
-
const { valueAsHex,
|
|
10430
|
+
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10471
10431
|
const onValueChange = (0, import_react43.useCallback)(
|
|
10472
10432
|
(value) => {
|
|
10473
10433
|
if (value === "") {
|
|
10474
10434
|
return;
|
|
10475
10435
|
}
|
|
10476
10436
|
const hsv = convertToHsv(value);
|
|
10477
|
-
|
|
10437
|
+
onChangeNonDerivedValueAsHsv(hsv);
|
|
10478
10438
|
},
|
|
10479
|
-
[
|
|
10439
|
+
[onChangeNonDerivedValueAsHsv]
|
|
10480
10440
|
);
|
|
10481
10441
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
10482
10442
|
Container3,
|
|
@@ -10488,7 +10448,7 @@ var ColorList = ({ children }) => {
|
|
|
10488
10448
|
}
|
|
10489
10449
|
);
|
|
10490
10450
|
};
|
|
10491
|
-
ColorList.displayName = "
|
|
10451
|
+
ColorList.displayName = "ColorList_UI";
|
|
10492
10452
|
|
|
10493
10453
|
// src/components/ColorPicker/ColorListGroup.tsx
|
|
10494
10454
|
var import_styled_components52 = __toESM(require("styled-components"));
|
|
@@ -10518,7 +10478,7 @@ var ColorListGroup = ({ label, children }) => {
|
|
|
10518
10478
|
}
|
|
10519
10479
|
);
|
|
10520
10480
|
};
|
|
10521
|
-
ColorListGroup.displayName = "
|
|
10481
|
+
ColorListGroup.displayName = "ColorListGroup_UI";
|
|
10522
10482
|
|
|
10523
10483
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10524
10484
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
@@ -10613,18 +10573,18 @@ var ColorListOption = ({ value, name }) => {
|
|
|
10613
10573
|
}
|
|
10614
10574
|
);
|
|
10615
10575
|
};
|
|
10616
|
-
ColorListOption.displayName = "
|
|
10576
|
+
ColorListOption.displayName = "ColorListOption_UI";
|
|
10617
10577
|
|
|
10618
10578
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
10619
10579
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10620
10580
|
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
10621
10581
|
var ColorPicker = ({
|
|
10622
|
-
value,
|
|
10623
|
-
onValueChange,
|
|
10624
10582
|
children,
|
|
10625
|
-
|
|
10583
|
+
colorForComparison = DEFAULT_COLOR_FOR_COMPARISON,
|
|
10626
10584
|
minimumContrastRatio = DEFAULT_MIN_CONTRAST,
|
|
10627
|
-
|
|
10585
|
+
opacityForContrastCalculation = DEFAULT_OPACITY_FOR_CONTRAST_CALCULATION,
|
|
10586
|
+
onValueChange,
|
|
10587
|
+
value
|
|
10628
10588
|
}) => {
|
|
10629
10589
|
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_react_popover.Root, { modal: false, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
|
|
10630
10590
|
ColorPickerProvider,
|
|
@@ -10632,13 +10592,13 @@ var ColorPicker = ({
|
|
|
10632
10592
|
colorForComparison,
|
|
10633
10593
|
minimumContrastRatio,
|
|
10634
10594
|
onValueChange,
|
|
10635
|
-
|
|
10595
|
+
opacityForContrastCalculation,
|
|
10636
10596
|
value,
|
|
10637
10597
|
children
|
|
10638
10598
|
}
|
|
10639
10599
|
) });
|
|
10640
10600
|
};
|
|
10641
|
-
ColorPicker.displayName = "
|
|
10601
|
+
ColorPicker.displayName = "ColorPicker_UI";
|
|
10642
10602
|
|
|
10643
10603
|
// src/components/ColorPicker/ColorPickerPopoverContent.tsx
|
|
10644
10604
|
var import_react_popover2 = require("@radix-ui/react-popover");
|
|
@@ -10667,7 +10627,7 @@ var ColorPickerPopoverContent = ({
|
|
|
10667
10627
|
}
|
|
10668
10628
|
) });
|
|
10669
10629
|
};
|
|
10670
|
-
ColorPickerPopoverContent.displayName = "
|
|
10630
|
+
ColorPickerPopoverContent.displayName = "ColorPickerPopoverContent_UI";
|
|
10671
10631
|
|
|
10672
10632
|
// src/components/ColorPicker/ColorPickerSection.tsx
|
|
10673
10633
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
@@ -10678,7 +10638,7 @@ var Container5 = import_styled_components55.default.div`
|
|
|
10678
10638
|
var ColorPickerSection = ({ children }) => {
|
|
10679
10639
|
return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Container5, { children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Stack, { children }) });
|
|
10680
10640
|
};
|
|
10681
|
-
ColorPickerSection.displayName = "
|
|
10641
|
+
ColorPickerSection.displayName = "ColorPickerSection_UI";
|
|
10682
10642
|
|
|
10683
10643
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10684
10644
|
var import_react44 = require("react");
|
|
@@ -10691,7 +10651,7 @@ var ValueSwatch = () => {
|
|
|
10691
10651
|
const { valueAsHex } = useColorPickerState();
|
|
10692
10652
|
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ColorSwatch, { value: valueAsHex });
|
|
10693
10653
|
};
|
|
10694
|
-
ValueSwatch.displayName = "
|
|
10654
|
+
ValueSwatch.displayName = "ValueSwatch_UI";
|
|
10695
10655
|
|
|
10696
10656
|
// src/components/ColorPicker/ValueNameOrHexCode.tsx
|
|
10697
10657
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
@@ -10699,7 +10659,7 @@ var ValueNameOrHexCode = () => {
|
|
|
10699
10659
|
const { valueAsHex } = useColorPickerState();
|
|
10700
10660
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ColorNameOrHexCode, { hexCode: valueAsHex });
|
|
10701
10661
|
};
|
|
10702
|
-
ValueNameOrHexCode.displayName = "
|
|
10662
|
+
ValueNameOrHexCode.displayName = "ValueNameOrHexCode_UI";
|
|
10703
10663
|
|
|
10704
10664
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10705
10665
|
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
@@ -10739,7 +10699,7 @@ var ColorPickerTrigger = (0, import_react44.forwardRef)(
|
|
|
10739
10699
|
);
|
|
10740
10700
|
}
|
|
10741
10701
|
);
|
|
10742
|
-
ColorPickerTrigger.displayName = "
|
|
10702
|
+
ColorPickerTrigger.displayName = "ColorPickerTrigger_UI";
|
|
10743
10703
|
|
|
10744
10704
|
// src/components/ColorPicker/ContrastIndicator.tsx
|
|
10745
10705
|
var import_styled_components57 = __toESM(require("styled-components"));
|
|
@@ -10960,7 +10920,7 @@ var Switch = (0, import_react45.forwardRef)(
|
|
|
10960
10920
|
] });
|
|
10961
10921
|
}
|
|
10962
10922
|
);
|
|
10963
|
-
Switch.displayName = "
|
|
10923
|
+
Switch.displayName = "Switch_UI";
|
|
10964
10924
|
|
|
10965
10925
|
// src/components/ColorPicker/ContrastEnforcerSwitch.tsx
|
|
10966
10926
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
@@ -10993,13 +10953,13 @@ var ContrastEnforcerSwitch = () => {
|
|
|
10993
10953
|
// src/components/ColorPicker/ContrastPreview.tsx
|
|
10994
10954
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10995
10955
|
var ContrastPreview = () => {
|
|
10996
|
-
const { valueAsHex,
|
|
10956
|
+
const { valueAsHex, colorForComparison } = useColorPickerState();
|
|
10997
10957
|
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10998
10958
|
ColorSwatch,
|
|
10999
10959
|
{
|
|
11000
10960
|
diameterPx: 36,
|
|
11001
10961
|
value: valueAsHex,
|
|
11002
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(Text, { style: { color:
|
|
10962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(Text, { style: { color: colorForComparison }, children: "Aa" })
|
|
11003
10963
|
}
|
|
11004
10964
|
);
|
|
11005
10965
|
};
|
|
@@ -11023,7 +10983,7 @@ var ContrastControls = () => {
|
|
|
11023
10983
|
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(ContrastEnforcerSwitch, {})
|
|
11024
10984
|
] });
|
|
11025
10985
|
};
|
|
11026
|
-
ContrastControls.displayName = "
|
|
10986
|
+
ContrastControls.displayName = "ContrastControls_UI";
|
|
11027
10987
|
|
|
11028
10988
|
// src/components/ColorPicker/HexColorInput.tsx
|
|
11029
10989
|
var import_react48 = require("react");
|
|
@@ -11233,7 +11193,7 @@ var Input = (0, import_react47.forwardRef)(
|
|
|
11233
11193
|
);
|
|
11234
11194
|
}
|
|
11235
11195
|
);
|
|
11236
|
-
Input.displayName = "
|
|
11196
|
+
Input.displayName = "Input_UI";
|
|
11237
11197
|
|
|
11238
11198
|
// src/components/ColorPicker/HexColorInput.tsx
|
|
11239
11199
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
@@ -11250,7 +11210,7 @@ var normalizeHexInput = (input) => {
|
|
|
11250
11210
|
return cleaned.slice(0, SIX_DIGIT_HEX_CODE_LENGTH).toLocaleLowerCase();
|
|
11251
11211
|
};
|
|
11252
11212
|
var HexColorInput = ({ autoFocus = true }) => {
|
|
11253
|
-
const { valueAsHex, nonDerivedValueAsHsv,
|
|
11213
|
+
const { valueAsHex, nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
11254
11214
|
const inputRef = (0, import_react48.useRef)(null);
|
|
11255
11215
|
const [textInputValue, setTextInputValue] = (0, import_react48.useState)(valueAsHex);
|
|
11256
11216
|
const onChangeInputValue = (0, import_react48.useCallback)(
|
|
@@ -11265,9 +11225,9 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11265
11225
|
return;
|
|
11266
11226
|
}
|
|
11267
11227
|
const newValueAsHsv = convertToHsv(newValue);
|
|
11268
|
-
|
|
11228
|
+
onChangeNonDerivedValueAsHsv(newValueAsHsv);
|
|
11269
11229
|
},
|
|
11270
|
-
[
|
|
11230
|
+
[onChangeNonDerivedValueAsHsv]
|
|
11271
11231
|
);
|
|
11272
11232
|
const onCopy = (0, import_react48.useCallback)((event) => {
|
|
11273
11233
|
const inputElem = inputRef.current;
|
|
@@ -11318,7 +11278,7 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11318
11278
|
...nonDerivedValueAsHsv,
|
|
11319
11279
|
s: newSaturation
|
|
11320
11280
|
};
|
|
11321
|
-
|
|
11281
|
+
onChangeNonDerivedValueAsHsv(newHsv);
|
|
11322
11282
|
return;
|
|
11323
11283
|
}
|
|
11324
11284
|
if (key.length > 1) {
|
|
@@ -11332,7 +11292,7 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11332
11292
|
event.preventDefault();
|
|
11333
11293
|
}
|
|
11334
11294
|
},
|
|
11335
|
-
[valueAsHex,
|
|
11295
|
+
[valueAsHex, onChangeNonDerivedValueAsHsv, nonDerivedValueAsHsv]
|
|
11336
11296
|
);
|
|
11337
11297
|
const onPaste = (0, import_react48.useCallback)(
|
|
11338
11298
|
(event) => {
|
|
@@ -11345,9 +11305,9 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11345
11305
|
return;
|
|
11346
11306
|
}
|
|
11347
11307
|
const newValueAsHsv = convertToHsv(normalizedValue);
|
|
11348
|
-
|
|
11308
|
+
onChangeNonDerivedValueAsHsv(newValueAsHsv);
|
|
11349
11309
|
},
|
|
11350
|
-
[
|
|
11310
|
+
[onChangeNonDerivedValueAsHsv]
|
|
11351
11311
|
);
|
|
11352
11312
|
const selectAllButTheHash = (0, import_react48.useCallback)(() => {
|
|
11353
11313
|
const inputElem = inputRef.current;
|
|
@@ -11396,7 +11356,7 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11396
11356
|
}
|
|
11397
11357
|
);
|
|
11398
11358
|
};
|
|
11399
|
-
HexColorInput.displayName = "
|
|
11359
|
+
HexColorInput.displayName = "HexColorInput_UI";
|
|
11400
11360
|
|
|
11401
11361
|
// src/components/ColorPicker/HueSlider.tsx
|
|
11402
11362
|
var import_react50 = require("react");
|
|
@@ -11489,7 +11449,7 @@ var ThumbInner = import_styled_components62.default.div`
|
|
|
11489
11449
|
}
|
|
11490
11450
|
`;
|
|
11491
11451
|
var HueSlider = () => {
|
|
11492
|
-
const { nonDerivedValueAsHsv,
|
|
11452
|
+
const { nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv, valueAsHsv } = useColorPickerState();
|
|
11493
11453
|
const containerStyle = (0, import_react50.useMemo)(() => {
|
|
11494
11454
|
return {
|
|
11495
11455
|
backgroundColor: (0, import_fn7.formatHex)({
|
|
@@ -11507,12 +11467,12 @@ var HueSlider = () => {
|
|
|
11507
11467
|
const onHueChange = (0, import_react50.useCallback)(
|
|
11508
11468
|
(values) => {
|
|
11509
11469
|
const newHue = values[0] ?? 0;
|
|
11510
|
-
|
|
11470
|
+
onChangeNonDerivedValueAsHsv({
|
|
11511
11471
|
...nonDerivedValueAsHsv,
|
|
11512
11472
|
h: newHue
|
|
11513
11473
|
});
|
|
11514
11474
|
},
|
|
11515
|
-
[nonDerivedValueAsHsv,
|
|
11475
|
+
[nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv]
|
|
11516
11476
|
);
|
|
11517
11477
|
return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(Container7, { style: containerStyle, children: [
|
|
11518
11478
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(
|
|
@@ -11533,7 +11493,7 @@ var HueSlider = () => {
|
|
|
11533
11493
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(HSVHueCanvas, { hsv: valueAsHsv })
|
|
11534
11494
|
] });
|
|
11535
11495
|
};
|
|
11536
|
-
HueSlider.displayName = "
|
|
11496
|
+
HueSlider.displayName = "HueSlider_UI";
|
|
11537
11497
|
|
|
11538
11498
|
// src/components/ColorPicker/SaturationAndValuePicker.tsx
|
|
11539
11499
|
var import_react52 = require("react");
|
|
@@ -11575,16 +11535,17 @@ var Canvas2 = import_styled_components63.default.canvas`
|
|
|
11575
11535
|
display: block;
|
|
11576
11536
|
width: 100%;
|
|
11577
11537
|
`;
|
|
11578
|
-
var calculateContrastCurve = (width, height, hue, minimumContrastRatio,
|
|
11538
|
+
var calculateContrastCurve = (width, height, hue, minimumContrastRatio, colorForComparison, limit, opacityForContrastCalculation) => {
|
|
11579
11539
|
const contrastPoints = [];
|
|
11580
11540
|
for (let x = 0; x < width; x += 1) {
|
|
11581
11541
|
const saturationChanel = x / (width - 1);
|
|
11582
11542
|
const initialValueChannelForSearch = limit === "upper" ? 0 : 1;
|
|
11583
11543
|
const colorForXAsHsv = getAccessibleColorByValueChannelChange({
|
|
11584
11544
|
originalHsv: { h: hue, s: saturationChanel, v: initialValueChannelForSearch, mode: "hsv" },
|
|
11585
|
-
|
|
11545
|
+
colorForComparison,
|
|
11586
11546
|
minContrast: minimumContrastRatio,
|
|
11587
|
-
direction: limit === "upper" ? "brighter" : "darker"
|
|
11547
|
+
direction: limit === "upper" ? "brighter" : "darker",
|
|
11548
|
+
opacityForContrastCalculation
|
|
11588
11549
|
});
|
|
11589
11550
|
if (colorForXAsHsv != null) {
|
|
11590
11551
|
const point = {
|
|
@@ -11624,7 +11585,8 @@ var HSVSaturationValueCanvas = ({
|
|
|
11624
11585
|
hue,
|
|
11625
11586
|
shouldShowContrastCurve = false,
|
|
11626
11587
|
minimumContrastRatio = DEFAULT_MIN_CONTRAST,
|
|
11627
|
-
|
|
11588
|
+
colorForComparison,
|
|
11589
|
+
opacityForContrastCalculation
|
|
11628
11590
|
}) => {
|
|
11629
11591
|
const canvasRef = (0, import_react51.useRef)(null);
|
|
11630
11592
|
(0, import_react51.useEffect)(() => {
|
|
@@ -11639,7 +11601,7 @@ var HSVSaturationValueCanvas = ({
|
|
|
11639
11601
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
11640
11602
|
const { width, height } = canvas;
|
|
11641
11603
|
drawGradientBackground(ctx, width, height, hue);
|
|
11642
|
-
if (shouldShowContrastCurve &&
|
|
11604
|
+
if (shouldShowContrastCurve && colorForComparison) {
|
|
11643
11605
|
ctx.lineWidth = 1.5;
|
|
11644
11606
|
ctx.strokeStyle = "white";
|
|
11645
11607
|
const maxHsvValueChannelCurve = calculateContrastCurve(
|
|
@@ -11647,16 +11609,18 @@ var HSVSaturationValueCanvas = ({
|
|
|
11647
11609
|
height,
|
|
11648
11610
|
hue,
|
|
11649
11611
|
minimumContrastRatio,
|
|
11650
|
-
|
|
11651
|
-
"upper"
|
|
11612
|
+
colorForComparison,
|
|
11613
|
+
"upper",
|
|
11614
|
+
opacityForContrastCalculation
|
|
11652
11615
|
);
|
|
11653
11616
|
const minHsvValueChannelCurve = calculateContrastCurve(
|
|
11654
11617
|
width,
|
|
11655
11618
|
height,
|
|
11656
11619
|
hue,
|
|
11657
11620
|
minimumContrastRatio,
|
|
11658
|
-
|
|
11659
|
-
"lower"
|
|
11621
|
+
colorForComparison,
|
|
11622
|
+
"lower",
|
|
11623
|
+
opacityForContrastCalculation
|
|
11660
11624
|
);
|
|
11661
11625
|
if (minHsvValueChannelCurve.length > 0) {
|
|
11662
11626
|
drawSmoothCurve(ctx, minHsvValueChannelCurve);
|
|
@@ -11665,7 +11629,13 @@ var HSVSaturationValueCanvas = ({
|
|
|
11665
11629
|
drawSmoothCurve(ctx, maxHsvValueChannelCurve);
|
|
11666
11630
|
}
|
|
11667
11631
|
}
|
|
11668
|
-
}, [
|
|
11632
|
+
}, [
|
|
11633
|
+
hue,
|
|
11634
|
+
shouldShowContrastCurve,
|
|
11635
|
+
minimumContrastRatio,
|
|
11636
|
+
colorForComparison,
|
|
11637
|
+
opacityForContrastCalculation
|
|
11638
|
+
]);
|
|
11669
11639
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
11670
11640
|
Canvas2,
|
|
11671
11641
|
{
|
|
@@ -11710,40 +11680,27 @@ var SaturationAndValuePicker = ({
|
|
|
11710
11680
|
dataTestId
|
|
11711
11681
|
}) => {
|
|
11712
11682
|
const {
|
|
11713
|
-
|
|
11714
|
-
onValueAsHsvChange,
|
|
11715
|
-
valueAsHsv,
|
|
11683
|
+
colorForComparison,
|
|
11716
11684
|
isTransitioning,
|
|
11717
11685
|
minimumContrastRatio,
|
|
11718
|
-
colorForComparisonAsLrgb,
|
|
11719
|
-
shouldEnforceMinContrast,
|
|
11720
11686
|
nonDerivedValueAsHsv,
|
|
11721
|
-
|
|
11687
|
+
onChangeNonDerivedValueAsHsv,
|
|
11688
|
+
opacityForContrastCalculation,
|
|
11689
|
+
shouldEnforceMinContrast,
|
|
11690
|
+
valueAsHex,
|
|
11691
|
+
valueAsHsv
|
|
11722
11692
|
} = useColorPickerState();
|
|
11723
11693
|
const containerRef = (0, import_react52.useRef)(null);
|
|
11724
11694
|
const thumbRef = (0, import_react52.useRef)(null);
|
|
11725
11695
|
const uuid = (0, import_react52.useMemo)(() => crypto.randomUUID(), []);
|
|
11726
11696
|
const instructionsId = `sv-instructions-${uuid}`;
|
|
11697
|
+
const valueAsHexConvertedToHsv = convertToHsv(valueAsHex);
|
|
11727
11698
|
const thumbPositionHsv = (0, import_react52.useMemo)(() => {
|
|
11728
|
-
if (isTransitioning) {
|
|
11699
|
+
if (!isTransitioning) {
|
|
11729
11700
|
return valueAsHsv;
|
|
11730
11701
|
}
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
}
|
|
11734
|
-
const accessibleHsv = getAccessibleDerivativeColor(nonDerivedValueAsHsv);
|
|
11735
|
-
return {
|
|
11736
|
-
...nonDerivedValueAsHsv,
|
|
11737
|
-
s: accessibleHsv.s,
|
|
11738
|
-
v: accessibleHsv.v
|
|
11739
|
-
};
|
|
11740
|
-
}, [
|
|
11741
|
-
isTransitioning,
|
|
11742
|
-
shouldEnforceMinContrast,
|
|
11743
|
-
nonDerivedValueAsHsv,
|
|
11744
|
-
valueAsHsv,
|
|
11745
|
-
getAccessibleDerivativeColor
|
|
11746
|
-
]);
|
|
11702
|
+
return valueAsHexConvertedToHsv;
|
|
11703
|
+
}, [isTransitioning, valueAsHexConvertedToHsv, valueAsHsv]);
|
|
11747
11704
|
const [thumbStyle, setThumbStyle] = (0, import_react52.useState)({
|
|
11748
11705
|
backgroundColor: valueAsHex
|
|
11749
11706
|
});
|
|
@@ -11764,19 +11721,19 @@ var SaturationAndValuePicker = ({
|
|
|
11764
11721
|
(channel, delta) => {
|
|
11765
11722
|
if (channel === "s") {
|
|
11766
11723
|
const newSaturation = Math.max(0, Math.min(1, nonDerivedValueAsHsv.s + delta));
|
|
11767
|
-
|
|
11724
|
+
onChangeNonDerivedValueAsHsv({
|
|
11768
11725
|
...nonDerivedValueAsHsv,
|
|
11769
11726
|
s: newSaturation
|
|
11770
11727
|
});
|
|
11771
11728
|
return;
|
|
11772
11729
|
}
|
|
11773
11730
|
const newValue = Math.max(0, Math.min(1, nonDerivedValueAsHsv.v + delta));
|
|
11774
|
-
|
|
11731
|
+
onChangeNonDerivedValueAsHsv({
|
|
11775
11732
|
...nonDerivedValueAsHsv,
|
|
11776
11733
|
v: newValue
|
|
11777
11734
|
});
|
|
11778
11735
|
},
|
|
11779
|
-
[nonDerivedValueAsHsv,
|
|
11736
|
+
[nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv]
|
|
11780
11737
|
);
|
|
11781
11738
|
const [isDragging, setIsDragging] = (0, import_react52.useState)(false);
|
|
11782
11739
|
const updateSaturationAndValueFromCoordinates = (0, import_react52.useCallback)(
|
|
@@ -11790,13 +11747,13 @@ var SaturationAndValuePicker = ({
|
|
|
11790
11747
|
const y = Math.max(0, Math.min(1, (clientY - rect.top) / rect.height));
|
|
11791
11748
|
const saturation = x;
|
|
11792
11749
|
const value = 1 - y;
|
|
11793
|
-
|
|
11750
|
+
onChangeNonDerivedValueAsHsv({
|
|
11794
11751
|
...nonDerivedValueAsHsv,
|
|
11795
11752
|
s: saturation,
|
|
11796
11753
|
v: value
|
|
11797
11754
|
});
|
|
11798
11755
|
},
|
|
11799
|
-
[
|
|
11756
|
+
[onChangeNonDerivedValueAsHsv, nonDerivedValueAsHsv]
|
|
11800
11757
|
);
|
|
11801
11758
|
const onContainerMouseDown = (0, import_react52.useCallback)(
|
|
11802
11759
|
(event) => {
|
|
@@ -11881,9 +11838,10 @@ var SaturationAndValuePicker = ({
|
|
|
11881
11838
|
/* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
|
|
11882
11839
|
HSVSaturationValueCanvas,
|
|
11883
11840
|
{
|
|
11884
|
-
|
|
11841
|
+
colorForComparison,
|
|
11885
11842
|
hue: nonDerivedValueAsHsv.h ?? 0,
|
|
11886
11843
|
minimumContrastRatio,
|
|
11844
|
+
opacityForContrastCalculation,
|
|
11887
11845
|
shouldShowContrastCurve: shouldEnforceMinContrast
|
|
11888
11846
|
}
|
|
11889
11847
|
),
|
|
@@ -11905,7 +11863,7 @@ var SaturationAndValuePicker = ({
|
|
|
11905
11863
|
)
|
|
11906
11864
|
);
|
|
11907
11865
|
};
|
|
11908
|
-
SaturationAndValuePicker.displayName = "
|
|
11866
|
+
SaturationAndValuePicker.displayName = "SaturationAndValuePicker_UI";
|
|
11909
11867
|
|
|
11910
11868
|
// src/components/Combobox/Combobox.tsx
|
|
11911
11869
|
var Ariakit = __toESM(require("@ariakit/react"));
|
|
@@ -12066,7 +12024,7 @@ var Tag = (0, import_react53.forwardRef)(
|
|
|
12066
12024
|
);
|
|
12067
12025
|
}
|
|
12068
12026
|
);
|
|
12069
|
-
Tag.displayName = "
|
|
12027
|
+
Tag.displayName = "Tag_UI";
|
|
12070
12028
|
|
|
12071
12029
|
// src/components/Combobox/Combobox.tsx
|
|
12072
12030
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
@@ -12332,6 +12290,11 @@ var StyledDataCard = import_styled_components67.default.div`
|
|
|
12332
12290
|
position: relative;
|
|
12333
12291
|
transition: background var(--wui-motion-duration-01) var(--wui-motion-ease);
|
|
12334
12292
|
|
|
12293
|
+
&:has([data-wui-data-card-subtitle]) {
|
|
12294
|
+
grid-template-areas: 'label slot' 'value value' 'subtitle subtitle';
|
|
12295
|
+
grid-template-rows: auto auto auto;
|
|
12296
|
+
}
|
|
12297
|
+
|
|
12335
12298
|
&[data-click-region] {
|
|
12336
12299
|
[data-wui-data-card-hover-icon] {
|
|
12337
12300
|
opacity: 0;
|
|
@@ -12418,6 +12381,9 @@ var StyledDataCardTrendContainer = import_styled_components67.default.div`
|
|
|
12418
12381
|
bottom: var(--wui-space-01);
|
|
12419
12382
|
right: var(--wui-space-01);
|
|
12420
12383
|
`;
|
|
12384
|
+
var StyledSubtitle = (0, import_styled_components67.default)(Text)`
|
|
12385
|
+
grid-area: subtitle;
|
|
12386
|
+
`;
|
|
12421
12387
|
var DataCardInner = ({
|
|
12422
12388
|
label,
|
|
12423
12389
|
value,
|
|
@@ -12425,6 +12391,7 @@ var DataCardInner = ({
|
|
|
12425
12391
|
colorScheme = "inherit",
|
|
12426
12392
|
isLoading = false,
|
|
12427
12393
|
trend,
|
|
12394
|
+
subtitle,
|
|
12428
12395
|
...props
|
|
12429
12396
|
}) => /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
|
|
12430
12397
|
StyledDataCard,
|
|
@@ -12448,8 +12415,16 @@ var DataCardInner = ({
|
|
|
12448
12415
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledLoadingValue, {}) : value
|
|
12449
12416
|
}
|
|
12450
12417
|
),
|
|
12451
|
-
(0, import_type_guards37.
|
|
12452
|
-
(0, import_type_guards37.
|
|
12418
|
+
(0, import_type_guards37.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
12419
|
+
(0, import_type_guards37.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
12420
|
+
StyledSubtitle,
|
|
12421
|
+
{
|
|
12422
|
+
"data-wui-data-card-subtitle": true,
|
|
12423
|
+
variant: "label4",
|
|
12424
|
+
children: subtitle
|
|
12425
|
+
}
|
|
12426
|
+
),
|
|
12427
|
+
(0, import_type_guards37.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
12453
12428
|
]
|
|
12454
12429
|
}
|
|
12455
12430
|
);
|
|
@@ -12486,7 +12461,7 @@ var DataCard = (props) => {
|
|
|
12486
12461
|
}
|
|
12487
12462
|
return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(DataCardInner, { ...props });
|
|
12488
12463
|
};
|
|
12489
|
-
DataCard.displayName = "
|
|
12464
|
+
DataCard.displayName = "DataCard_UI";
|
|
12490
12465
|
|
|
12491
12466
|
// src/components/DataCards/DataCards.tsx
|
|
12492
12467
|
var import_styled_components68 = __toESM(require("styled-components"));
|
|
@@ -12511,6 +12486,7 @@ var DataCards = ({
|
|
|
12511
12486
|
...props,
|
|
12512
12487
|
$cardMaxWidth: cardMaxWidth,
|
|
12513
12488
|
$colorScheme: colorScheme,
|
|
12489
|
+
alignItems: "stretch",
|
|
12514
12490
|
direction: "row",
|
|
12515
12491
|
fill: "horizontal",
|
|
12516
12492
|
gap: "space-02",
|
|
@@ -12520,7 +12496,7 @@ var DataCards = ({
|
|
|
12520
12496
|
}
|
|
12521
12497
|
);
|
|
12522
12498
|
};
|
|
12523
|
-
DataCards.displayName = "
|
|
12499
|
+
DataCards.displayName = "DataCards_UI";
|
|
12524
12500
|
|
|
12525
12501
|
// src/components/DataCards/DataCardTrend.tsx
|
|
12526
12502
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
@@ -12598,7 +12574,7 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
|
12598
12574
|
}
|
|
12599
12575
|
);
|
|
12600
12576
|
};
|
|
12601
|
-
Divider.displayName = "
|
|
12577
|
+
Divider.displayName = "Divider_UI";
|
|
12602
12578
|
|
|
12603
12579
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
12604
12580
|
var import_styled_components71 = __toESM(require("styled-components"));
|
|
@@ -12872,7 +12848,7 @@ var Label = ({
|
|
|
12872
12848
|
}
|
|
12873
12849
|
);
|
|
12874
12850
|
};
|
|
12875
|
-
Label.displayName = "
|
|
12851
|
+
Label.displayName = "Label_UI";
|
|
12876
12852
|
|
|
12877
12853
|
// src/components/FormField/FormField.tsx
|
|
12878
12854
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
@@ -13030,7 +13006,7 @@ var FormField = ({
|
|
|
13030
13006
|
}
|
|
13031
13007
|
);
|
|
13032
13008
|
};
|
|
13033
|
-
FormField.displayName = "
|
|
13009
|
+
FormField.displayName = "FormField_UI";
|
|
13034
13010
|
|
|
13035
13011
|
// src/components/FormGroup/RadioGroup.tsx
|
|
13036
13012
|
var import_react60 = require("react");
|
|
@@ -13057,7 +13033,7 @@ var RadioGroup = ({
|
|
|
13057
13033
|
}, [name, derivedValue, onChange]);
|
|
13058
13034
|
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(FormGroup, { ...props, children }) });
|
|
13059
13035
|
};
|
|
13060
|
-
RadioGroup.displayName = "
|
|
13036
|
+
RadioGroup.displayName = "RadioGroup_UI";
|
|
13061
13037
|
|
|
13062
13038
|
// src/components/Grid/Grid.tsx
|
|
13063
13039
|
var import_react61 = require("react");
|
|
@@ -13127,7 +13103,7 @@ var GridComponent = (0, import_react61.forwardRef)(
|
|
|
13127
13103
|
);
|
|
13128
13104
|
}
|
|
13129
13105
|
);
|
|
13130
|
-
GridComponent.displayName = "
|
|
13106
|
+
GridComponent.displayName = "Grid_UI";
|
|
13131
13107
|
var Grid = makePolymorphic(GridComponent);
|
|
13132
13108
|
|
|
13133
13109
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
@@ -13192,7 +13168,7 @@ var InputClickToCopy = (0, import_react62.forwardRef)(
|
|
|
13192
13168
|
);
|
|
13193
13169
|
}
|
|
13194
13170
|
);
|
|
13195
|
-
InputClickToCopy.displayName = "
|
|
13171
|
+
InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
13196
13172
|
|
|
13197
13173
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
13198
13174
|
var import_styled_components76 = __toESM(require("styled-components"));
|
|
@@ -13301,7 +13277,7 @@ var KeyboardShortcut = ({
|
|
|
13301
13277
|
]
|
|
13302
13278
|
}
|
|
13303
13279
|
);
|
|
13304
|
-
KeyboardShortcut.displayName = "
|
|
13280
|
+
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
13305
13281
|
|
|
13306
13282
|
// src/components/List/List.tsx
|
|
13307
13283
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
@@ -13320,7 +13296,7 @@ var ListItem = ({ children }) => {
|
|
|
13320
13296
|
}
|
|
13321
13297
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ListItemComponent, { children });
|
|
13322
13298
|
};
|
|
13323
|
-
ListItem.displayName = "
|
|
13299
|
+
ListItem.displayName = "ListItem_UI";
|
|
13324
13300
|
|
|
13325
13301
|
// src/components/List/List.tsx
|
|
13326
13302
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
@@ -13459,7 +13435,7 @@ var List = ({
|
|
|
13459
13435
|
}
|
|
13460
13436
|
return null;
|
|
13461
13437
|
};
|
|
13462
|
-
List.displayName = "
|
|
13438
|
+
List.displayName = "List_UI";
|
|
13463
13439
|
|
|
13464
13440
|
// src/components/Menu/Menu.tsx
|
|
13465
13441
|
var import_react64 = require("react");
|
|
@@ -13624,8 +13600,8 @@ var Menu = (0, import_react64.forwardRef)(
|
|
|
13624
13600
|
) });
|
|
13625
13601
|
}
|
|
13626
13602
|
);
|
|
13627
|
-
Menu.displayName = "
|
|
13628
|
-
Menu.displayName = "
|
|
13603
|
+
Menu.displayName = "Menu_UI";
|
|
13604
|
+
Menu.displayName = "Menu_UI";
|
|
13629
13605
|
|
|
13630
13606
|
// src/components/Menu/MenuLabel.tsx
|
|
13631
13607
|
var import_styled_components80 = __toESM(require("styled-components"));
|
|
@@ -13652,7 +13628,7 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
13652
13628
|
}
|
|
13653
13629
|
);
|
|
13654
13630
|
};
|
|
13655
|
-
MenuLabel.displayName = "
|
|
13631
|
+
MenuLabel.displayName = "MenuLabel_UI";
|
|
13656
13632
|
|
|
13657
13633
|
// src/components/Menu/SubMenu.tsx
|
|
13658
13634
|
var import_react66 = require("react");
|
|
@@ -13777,7 +13753,7 @@ var MenuItemButton = (0, import_react65.forwardRef)(({ children, appearance, com
|
|
|
13777
13753
|
}
|
|
13778
13754
|
);
|
|
13779
13755
|
});
|
|
13780
|
-
MenuItemButton.displayName = "
|
|
13756
|
+
MenuItemButton.displayName = "MenuItemButton_UI";
|
|
13781
13757
|
|
|
13782
13758
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
13783
13759
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
@@ -13864,7 +13840,7 @@ var SubMenu = ({
|
|
|
13864
13840
|
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
13865
13841
|
] });
|
|
13866
13842
|
};
|
|
13867
|
-
SubMenu.displayName = "
|
|
13843
|
+
SubMenu.displayName = "SubMenu_UI";
|
|
13868
13844
|
|
|
13869
13845
|
// src/components/Menu/MenuItem.tsx
|
|
13870
13846
|
var import_react67 = require("react");
|
|
@@ -13889,7 +13865,7 @@ var MenuItem = (0, import_react67.forwardRef)(
|
|
|
13889
13865
|
);
|
|
13890
13866
|
}
|
|
13891
13867
|
);
|
|
13892
|
-
MenuItem.displayName = "
|
|
13868
|
+
MenuItem.displayName = "MenuItem_UI";
|
|
13893
13869
|
|
|
13894
13870
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
13895
13871
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
@@ -13897,7 +13873,7 @@ var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
|
13897
13873
|
var MenuRadioGroup = ({ children, ...props }) => {
|
|
13898
13874
|
return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children });
|
|
13899
13875
|
};
|
|
13900
|
-
MenuRadioGroup.displayName = "
|
|
13876
|
+
MenuRadioGroup.displayName = "MenuRadioGroup_UI";
|
|
13901
13877
|
|
|
13902
13878
|
// src/components/Menu/RadioMenuItem.tsx
|
|
13903
13879
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
@@ -13931,7 +13907,7 @@ var RadioMenuItem = ({
|
|
|
13931
13907
|
}
|
|
13932
13908
|
);
|
|
13933
13909
|
};
|
|
13934
|
-
RadioMenuItem.displayName = "
|
|
13910
|
+
RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
13935
13911
|
|
|
13936
13912
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
13937
13913
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
@@ -14016,7 +13992,7 @@ var CheckboxMenuItem = ({
|
|
|
14016
13992
|
}
|
|
14017
13993
|
);
|
|
14018
13994
|
};
|
|
14019
|
-
CheckboxMenuItem.displayName = "
|
|
13995
|
+
CheckboxMenuItem.displayName = "CheckboxMenuItem_UI";
|
|
14020
13996
|
|
|
14021
13997
|
// src/components/Menu/FilterMenu.tsx
|
|
14022
13998
|
var import_react68 = require("react");
|
|
@@ -14118,7 +14094,7 @@ var FilterMenu = (0, import_react68.forwardRef)(
|
|
|
14118
14094
|
);
|
|
14119
14095
|
}
|
|
14120
14096
|
);
|
|
14121
|
-
FilterMenu.displayName = "
|
|
14097
|
+
FilterMenu.displayName = "FilterMenu_UI";
|
|
14122
14098
|
|
|
14123
14099
|
// src/components/Modal/Modal.tsx
|
|
14124
14100
|
var import_react71 = require("react");
|
|
@@ -14447,7 +14423,7 @@ var Modal = (0, import_react71.forwardRef)(
|
|
|
14447
14423
|
);
|
|
14448
14424
|
}
|
|
14449
14425
|
);
|
|
14450
|
-
Modal.displayName = "
|
|
14426
|
+
Modal.displayName = "Modal_UI";
|
|
14451
14427
|
|
|
14452
14428
|
// src/components/Popover/Popover.tsx
|
|
14453
14429
|
var import_react_popover5 = require("@radix-ui/react-popover");
|
|
@@ -14537,7 +14513,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
14537
14513
|
}
|
|
14538
14514
|
) });
|
|
14539
14515
|
};
|
|
14540
|
-
PopoverArrow.displayName = "
|
|
14516
|
+
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
14541
14517
|
|
|
14542
14518
|
// src/components/Popover/Popover.tsx
|
|
14543
14519
|
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
@@ -14606,7 +14582,7 @@ var Popover2 = ({
|
|
|
14606
14582
|
) })
|
|
14607
14583
|
] });
|
|
14608
14584
|
};
|
|
14609
|
-
Popover2.displayName = "
|
|
14585
|
+
Popover2.displayName = "Popover_UI";
|
|
14610
14586
|
|
|
14611
14587
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
14612
14588
|
var import_styled_components91 = __toESM(require("styled-components"));
|
|
@@ -14685,7 +14661,7 @@ var ProgressBar = ({
|
|
|
14685
14661
|
(0, import_type_guards52.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
14686
14662
|
] });
|
|
14687
14663
|
};
|
|
14688
|
-
ProgressBar.displayName = "
|
|
14664
|
+
ProgressBar.displayName = "ProgressBar_UI";
|
|
14689
14665
|
|
|
14690
14666
|
// src/components/Radio/Radio.tsx
|
|
14691
14667
|
var import_react72 = require("react");
|
|
@@ -14860,7 +14836,7 @@ var Radio = (0, import_react72.forwardRef)(
|
|
|
14860
14836
|
);
|
|
14861
14837
|
}
|
|
14862
14838
|
);
|
|
14863
|
-
Radio.displayName = "
|
|
14839
|
+
Radio.displayName = "Radio_UI";
|
|
14864
14840
|
|
|
14865
14841
|
// src/components/RadioCard/RadioCard.tsx
|
|
14866
14842
|
var import_react74 = require("react");
|
|
@@ -15024,7 +15000,7 @@ var RadioCardRoot = (0, import_react73.forwardRef)(
|
|
|
15024
15000
|
);
|
|
15025
15001
|
}
|
|
15026
15002
|
);
|
|
15027
|
-
RadioCardRoot.displayName = "
|
|
15003
|
+
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
15028
15004
|
|
|
15029
15005
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
15030
15006
|
var import_styled_components95 = __toESM(require("styled-components"));
|
|
@@ -15078,7 +15054,7 @@ var RadioCardIndicator = import_styled_components94.default.div`
|
|
|
15078
15054
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface-disabled);
|
|
15079
15055
|
}
|
|
15080
15056
|
`;
|
|
15081
|
-
RadioCardIndicator.displayName = "
|
|
15057
|
+
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
15082
15058
|
|
|
15083
15059
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
15084
15060
|
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
@@ -15126,7 +15102,7 @@ var RadioCardDefaultLayout = ({
|
|
|
15126
15102
|
] })
|
|
15127
15103
|
] });
|
|
15128
15104
|
};
|
|
15129
|
-
RadioCardDefaultLayout.displayName = "
|
|
15105
|
+
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
15130
15106
|
|
|
15131
15107
|
// src/components/RadioCard/RadioCard.tsx
|
|
15132
15108
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
@@ -15150,7 +15126,7 @@ var RadioCard = (0, import_react74.forwardRef)(
|
|
|
15150
15126
|
);
|
|
15151
15127
|
}
|
|
15152
15128
|
);
|
|
15153
|
-
RadioCard.displayName = "
|
|
15129
|
+
RadioCard.displayName = "RadioCard_UI";
|
|
15154
15130
|
|
|
15155
15131
|
// src/components/RadioCard/RadioCardImage.tsx
|
|
15156
15132
|
var import_react75 = require("react");
|
|
@@ -15178,7 +15154,7 @@ var RadioCardImage = (0, import_react75.forwardRef)(
|
|
|
15178
15154
|
);
|
|
15179
15155
|
}
|
|
15180
15156
|
);
|
|
15181
|
-
RadioCardImage.displayName = "
|
|
15157
|
+
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
15182
15158
|
|
|
15183
15159
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
15184
15160
|
var import_react78 = require("react");
|
|
@@ -15315,7 +15291,7 @@ var SegmentedControl = (0, import_react78.forwardRef)(
|
|
|
15315
15291
|
);
|
|
15316
15292
|
}
|
|
15317
15293
|
);
|
|
15318
|
-
SegmentedControl.displayName = "
|
|
15294
|
+
SegmentedControl.displayName = "SegmentedControl_UI";
|
|
15319
15295
|
|
|
15320
15296
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
15321
15297
|
var import_react79 = require("react");
|
|
@@ -15449,7 +15425,7 @@ var SegmentedControlItem = (0, import_react79.forwardRef)(
|
|
|
15449
15425
|
);
|
|
15450
15426
|
}
|
|
15451
15427
|
);
|
|
15452
|
-
SegmentedControlItem.displayName = "
|
|
15428
|
+
SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
15453
15429
|
|
|
15454
15430
|
// src/components/Select/Select.tsx
|
|
15455
15431
|
var import_react_select = require("@radix-ui/react-select");
|
|
@@ -15563,7 +15539,7 @@ var Select = (0, import_react80.forwardRef)(
|
|
|
15563
15539
|
);
|
|
15564
15540
|
}
|
|
15565
15541
|
);
|
|
15566
|
-
Select.displayName = "
|
|
15542
|
+
Select.displayName = "Select_UI";
|
|
15567
15543
|
|
|
15568
15544
|
// src/components/Select/SelectOption.tsx
|
|
15569
15545
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
@@ -15622,7 +15598,7 @@ var SelectOption = (0, import_react81.forwardRef)(
|
|
|
15622
15598
|
);
|
|
15623
15599
|
}
|
|
15624
15600
|
);
|
|
15625
|
-
SelectOption.displayName = "
|
|
15601
|
+
SelectOption.displayName = "SelectOption_UI";
|
|
15626
15602
|
|
|
15627
15603
|
// src/components/Select/SelectOptionGroup.tsx
|
|
15628
15604
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
@@ -15770,7 +15746,7 @@ var Slider = ({
|
|
|
15770
15746
|
}
|
|
15771
15747
|
);
|
|
15772
15748
|
};
|
|
15773
|
-
Slider.displayName = "
|
|
15749
|
+
Slider.displayName = "Slider_UI";
|
|
15774
15750
|
|
|
15775
15751
|
// src/components/Table/Table.tsx
|
|
15776
15752
|
var import_styled_components103 = __toESM(require("styled-components"));
|
|
@@ -15931,7 +15907,7 @@ var Tabs = ({
|
|
|
15931
15907
|
}
|
|
15932
15908
|
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(SelectedItemStyleProvider, { children }) }) });
|
|
15933
15909
|
};
|
|
15934
|
-
Tabs.displayName = "
|
|
15910
|
+
Tabs.displayName = "Tabs_UI";
|
|
15935
15911
|
|
|
15936
15912
|
// src/components/Tabs/TabsContent.tsx
|
|
15937
15913
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
@@ -15939,7 +15915,7 @@ var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
|
15939
15915
|
var TabsContent = ({ children, value }) => {
|
|
15940
15916
|
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_react_tabs2.Content, { value, children });
|
|
15941
15917
|
};
|
|
15942
|
-
TabsContent.displayName = "
|
|
15918
|
+
TabsContent.displayName = "TabsContent_UI";
|
|
15943
15919
|
|
|
15944
15920
|
// src/components/Tabs/TabsList.tsx
|
|
15945
15921
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
@@ -15991,7 +15967,7 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
15991
15967
|
}
|
|
15992
15968
|
);
|
|
15993
15969
|
};
|
|
15994
|
-
TabsList.displayName = "
|
|
15970
|
+
TabsList.displayName = "TabsList_UI";
|
|
15995
15971
|
|
|
15996
15972
|
// src/components/Tabs/TabsTrigger.tsx
|
|
15997
15973
|
var import_react86 = require("react");
|
|
@@ -16058,7 +16034,7 @@ var TabsTrigger = (0, import_react86.forwardRef)(
|
|
|
16058
16034
|
);
|
|
16059
16035
|
}
|
|
16060
16036
|
);
|
|
16061
|
-
TabsTrigger.displayName = "
|
|
16037
|
+
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
16062
16038
|
|
|
16063
16039
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
16064
16040
|
var import_styled_components112 = __toESM(require("styled-components"));
|
|
@@ -16094,7 +16070,7 @@ var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
|
16094
16070
|
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { children: label })
|
|
16095
16071
|
] });
|
|
16096
16072
|
};
|
|
16097
|
-
ThumbnailBadge.displayName = "
|
|
16073
|
+
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
16098
16074
|
|
|
16099
16075
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
16100
16076
|
var import_react87 = require("react");
|
|
@@ -16537,7 +16513,7 @@ var Thumbnail = (0, import_react87.forwardRef)(
|
|
|
16537
16513
|
);
|
|
16538
16514
|
}
|
|
16539
16515
|
);
|
|
16540
|
-
Thumbnail.displayName = "
|
|
16516
|
+
Thumbnail.displayName = "Thumbnail_UI";
|
|
16541
16517
|
|
|
16542
16518
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
16543
16519
|
var import_react88 = __toESM(require("react"));
|
|
@@ -16771,7 +16747,7 @@ var WistiaLogo = ({
|
|
|
16771
16747
|
);
|
|
16772
16748
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("a", { href, children: Logo }) : Logo;
|
|
16773
16749
|
};
|
|
16774
|
-
WistiaLogo.displayName = "
|
|
16750
|
+
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
16775
16751
|
|
|
16776
16752
|
// src/components/InputPassword/InputPassword.tsx
|
|
16777
16753
|
var import_styled_components118 = __toESM(require("styled-components"));
|
|
@@ -16818,7 +16794,7 @@ var InputPassword = (0, import_react89.forwardRef)(
|
|
|
16818
16794
|
);
|
|
16819
16795
|
}
|
|
16820
16796
|
);
|
|
16821
|
-
InputPassword.displayName = "
|
|
16797
|
+
InputPassword.displayName = "InputPassword_UI";
|
|
16822
16798
|
|
|
16823
16799
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
16824
16800
|
var import_react90 = require("react");
|