@spothero/ui 25.2.0 → 25.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/AccordionActionButton.d.ts +2 -1
- package/dist/components/RefreshedInput/FormControl/index.d.ts +2 -1
- package/dist/components/RefreshedInput/Select/Select.d.ts +2 -1
- package/dist/index.cjs.js +25 -34
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/theme/base/colors.d.ts +1 -0
- package/package.json +11 -6
|
@@ -4,4 +4,5 @@ export default FormControl;
|
|
|
4
4
|
* This formControl allows us to standardize the label movement animation as well as the left/right icons
|
|
5
5
|
* Can be used solo but typically will be used by the Refreshed components themselves
|
|
6
6
|
*/
|
|
7
|
-
declare const FormControl: any
|
|
7
|
+
declare const FormControl: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
8
|
+
import React from 'react';
|
|
@@ -5,4 +5,5 @@ export default Select;
|
|
|
5
5
|
* using `<RefreshedSelect><option value="1"/>/<RefreshedSelect>` will bring in the core of this.
|
|
6
6
|
* Left arrow is static for this select. You can pass a second left element in but it will not over write the down arrow currently
|
|
7
7
|
*/
|
|
8
|
-
declare const Select: any
|
|
8
|
+
declare const Select: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
9
|
+
import React from 'react';
|
package/dist/index.cjs.js
CHANGED
|
@@ -461,7 +461,8 @@ const colors = {
|
|
|
461
461
|
default: yellow['400']
|
|
462
462
|
}),
|
|
463
463
|
primary: _objectSpread2(_objectSpread2({}, blue), {}, {
|
|
464
|
-
default: blue['500']
|
|
464
|
+
default: blue['500'],
|
|
465
|
+
brand: blue['500']
|
|
465
466
|
}),
|
|
466
467
|
secondary: _objectSpread2(_objectSpread2({}, navy), {}, {
|
|
467
468
|
default: navy['900']
|
|
@@ -834,14 +835,14 @@ const destructiveButtonStyles = {
|
|
|
834
835
|
* ## OKLCH Color Adjustments Reference
|
|
835
836
|
* | State | OKLCH Calculation | Visual Effect |
|
|
836
837
|
* |-------|-------------------|---------------|
|
|
837
|
-
* | Default | `primary.
|
|
838
|
+
* | Default | `primary.brand` | Base color |
|
|
838
839
|
* | Hover (light bg) | `calc(l - 0.1)` | 10% darker (lightness) |
|
|
839
840
|
* | Active/Pressed | `calc(l - 0.15)` | 15% darker (lightness) |
|
|
840
841
|
* | Hover (secondary) | `calc(l - 0.3)` | 3% darker (lightness) |
|
|
841
842
|
* | Active/Pressed (secondary) | `calc(l - 0.6)` | 6% darker (lightness) |
|
|
842
843
|
* | Hover (dark bg) | `calc(l + 0.1)` | 10% lighter (lightness) |
|
|
843
844
|
* | Disabled | `opacity: 0.4` | 60% transparent |
|
|
844
|
-
*/
|
|
845
|
+
*/
|
|
845
846
|
|
|
846
847
|
//Helper function to make oklch color strings
|
|
847
848
|
const generateOklchColor = (colorVar, adjustment) => {
|
|
@@ -849,9 +850,9 @@ const generateOklchColor = (colorVar, adjustment) => {
|
|
|
849
850
|
};
|
|
850
851
|
|
|
851
852
|
// 10% darker (lightness)
|
|
852
|
-
const hoverPrimaryColor = generateOklchColor('primary-
|
|
853
|
+
const hoverPrimaryColor = generateOklchColor('primary-brand', '- 0.1');
|
|
853
854
|
// 15% darker (lightness)
|
|
854
|
-
const activePrimaryColor = generateOklchColor('primary-
|
|
855
|
+
const activePrimaryColor = generateOklchColor('primary-brand', '- 0.15');
|
|
855
856
|
// 3% darker (lightness)
|
|
856
857
|
const hoverSecondaryColor = generateOklchColor('white', '- 0.03');
|
|
857
858
|
// 6% darker (lightness)
|
|
@@ -864,7 +865,7 @@ const hoverDarkColor = generateOklchColor('yellow-default', '+ 0.1');
|
|
|
864
865
|
*
|
|
865
866
|
* This implementation uses OKLCH relative color syntax for perceptually uniform color adjustments.
|
|
866
867
|
* Benefits:
|
|
867
|
-
* - White-label theming: Only need ONE brand color (primary.
|
|
868
|
+
* - White-label theming: Only need ONE brand color (primary.brand)
|
|
868
869
|
* - No package dependencies (native CSS)
|
|
869
870
|
* - Text color NOT affected (unlike CSS filters)
|
|
870
871
|
* - Perceptually uniform adjustments (10% lighter looks consistent across all hues)
|
|
@@ -882,8 +883,8 @@ const hoverDarkColor = generateOklchColor('yellow-default', '+ 0.1');
|
|
|
882
883
|
*/
|
|
883
884
|
const variants$d = {
|
|
884
885
|
primary: {
|
|
885
|
-
bg: 'primary.
|
|
886
|
-
borderColor: 'primary.
|
|
886
|
+
bg: 'primary.brand',
|
|
887
|
+
borderColor: 'primary.brand',
|
|
887
888
|
color: 'white',
|
|
888
889
|
_hover: _objectSpread2({
|
|
889
890
|
bg: hoverPrimaryColor,
|
|
@@ -2166,9 +2167,7 @@ var Link_styles = merge__default.default(react.theme.components.Link, {
|
|
|
2166
2167
|
defaultProps: defaultProps$5
|
|
2167
2168
|
});
|
|
2168
2169
|
|
|
2169
|
-
const { definePartsStyle: definePartsStyle$1, defineMultiStyleConfig: defineMultiStyleConfig$1 } =
|
|
2170
|
-
react.createMultiStyleConfigHelpers(anatomy.accordionAnatomy.keys);
|
|
2171
|
-
|
|
2170
|
+
const { definePartsStyle: definePartsStyle$1, defineMultiStyleConfig: defineMultiStyleConfig$1 } = react.createMultiStyleConfigHelpers(anatomy.accordionAnatomy.keys);
|
|
2172
2171
|
const baseStyle$9 = definePartsStyle$1({
|
|
2173
2172
|
icon: {
|
|
2174
2173
|
color: 'primary.default',
|
|
@@ -2187,7 +2186,6 @@ const baseStyle$9 = definePartsStyle$1({
|
|
|
2187
2186
|
borderColor: 'gray.medium',
|
|
2188
2187
|
},
|
|
2189
2188
|
});
|
|
2190
|
-
|
|
2191
2189
|
const variants$7 = {
|
|
2192
2190
|
lined: {
|
|
2193
2191
|
button: {
|
|
@@ -2249,21 +2247,18 @@ const variants$7 = {
|
|
|
2249
2247
|
},
|
|
2250
2248
|
}
|
|
2251
2249
|
};
|
|
2252
|
-
|
|
2253
2250
|
const defaultProps$4 = {
|
|
2254
2251
|
variant: 'lined',
|
|
2255
2252
|
};
|
|
2256
|
-
|
|
2257
|
-
const accordionTheme = defineMultiStyleConfig$1({
|
|
2253
|
+
const accordionTheme = defineMultiStyleConfig$1({
|
|
2258
2254
|
baseStyle: baseStyle$9,
|
|
2259
2255
|
variants: variants$7,
|
|
2260
2256
|
//TODO: add @rollup/plugin-typescript to this project
|
|
2261
2257
|
//@ts-expect-error - This is due to babel not having a ts parser in it
|
|
2262
2258
|
defaultProps: defaultProps$4,
|
|
2263
2259
|
});
|
|
2264
|
-
|
|
2265
2260
|
const theme$1 = react.extendTheme({
|
|
2266
|
-
|
|
2261
|
+
...accordionTheme,
|
|
2267
2262
|
});
|
|
2268
2263
|
|
|
2269
2264
|
const colorScheme = {
|
|
@@ -2560,27 +2555,23 @@ var index$5 = merge__default.default(inputStyles, {
|
|
|
2560
2555
|
variants: variants$4
|
|
2561
2556
|
});
|
|
2562
2557
|
|
|
2563
|
-
const { definePartsStyle, defineMultiStyleConfig } =
|
|
2564
|
-
react.createMultiStyleConfigHelpers(anatomy.selectAnatomy.keys);
|
|
2565
|
-
|
|
2558
|
+
const { definePartsStyle, defineMultiStyleConfig } = react.createMultiStyleConfigHelpers(anatomy.selectAnatomy.keys);
|
|
2566
2559
|
const refreshed = definePartsStyle({
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2560
|
+
field: {
|
|
2561
|
+
...selectStyles.variants.outline.field,
|
|
2562
|
+
height: 'auto',
|
|
2563
|
+
paddingTop: 6,
|
|
2564
|
+
paddingBottom: 3,
|
|
2565
|
+
},
|
|
2566
|
+
icon: {
|
|
2567
|
+
...selectStyles.variants.outline.field,
|
|
2568
|
+
}
|
|
2576
2569
|
});
|
|
2577
|
-
|
|
2578
2570
|
const selectTheme = defineMultiStyleConfig({
|
|
2579
|
-
|
|
2571
|
+
variants: { refreshed },
|
|
2580
2572
|
});
|
|
2581
|
-
|
|
2582
2573
|
const theme = react.extendTheme({
|
|
2583
|
-
|
|
2574
|
+
components: { Select: selectTheme },
|
|
2584
2575
|
});
|
|
2585
2576
|
|
|
2586
2577
|
const variants$3 = {
|
|
@@ -3294,7 +3285,7 @@ const ThemeProvider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3294
3285
|
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
3295
3286
|
return /*#__PURE__*/React__namespace.default.createElement(react.ChakraProvider, _extends$6({}, props, {
|
|
3296
3287
|
ref: ref,
|
|
3297
|
-
theme: merge__default.default(THEME, theme)
|
|
3288
|
+
theme: merge__default.default({}, THEME, theme)
|
|
3298
3289
|
}), disableExternalFonts ? null : /*#__PURE__*/React__namespace.default.createElement(Fonts, null), /*#__PURE__*/React__namespace.default.createElement(LegacyOverrides, {
|
|
3299
3290
|
useLegacyOverrides: useLegacyOverrides
|
|
3300
3291
|
}), children);
|