@elliemae/ds-slider-v2 3.80.0-next.6 → 3.80.0-next.60

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.
Files changed (44) hide show
  1. package/dist/cjs/config/useSliderV2.js +8 -0
  2. package/dist/cjs/config/useSliderV2.js.map +2 -2
  3. package/dist/cjs/parts/Thumb.js +32 -7
  4. package/dist/cjs/parts/Thumb.js.map +2 -2
  5. package/dist/cjs/parts/TickMarksValues.js +3 -0
  6. package/dist/cjs/parts/TickMarksValues.js.map +2 -2
  7. package/dist/cjs/parts/Track.js +17 -3
  8. package/dist/cjs/parts/Track.js.map +2 -2
  9. package/dist/cjs/parts/styles.js +61 -34
  10. package/dist/cjs/parts/styles.js.map +2 -2
  11. package/dist/cjs/react-desc-prop-types.js +5 -1
  12. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  13. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-auto-polymorph-multiple.js +1 -0
  14. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-auto-polymorph-multiple.js.map +2 -2
  15. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-auto-polymorph-single.js +2 -1
  16. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-auto-polymorph-single.js.map +2 -2
  17. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-multiple.js +1 -0
  18. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-multiple.js.map +2 -2
  19. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-single.js +2 -1
  20. package/dist/cjs/typescript-testing/typescript-slider-v2-valid-single.js.map +2 -2
  21. package/dist/esm/config/useSliderV2.js +8 -0
  22. package/dist/esm/config/useSliderV2.js.map +2 -2
  23. package/dist/esm/parts/Thumb.js +32 -7
  24. package/dist/esm/parts/Thumb.js.map +2 -2
  25. package/dist/esm/parts/TickMarksValues.js +3 -0
  26. package/dist/esm/parts/TickMarksValues.js.map +2 -2
  27. package/dist/esm/parts/Track.js +17 -3
  28. package/dist/esm/parts/Track.js.map +2 -2
  29. package/dist/esm/parts/styles.js +61 -34
  30. package/dist/esm/parts/styles.js.map +2 -2
  31. package/dist/esm/react-desc-prop-types.js +5 -1
  32. package/dist/esm/react-desc-prop-types.js.map +2 -2
  33. package/dist/esm/typescript-testing/typescript-slider-v2-valid-auto-polymorph-multiple.js +1 -0
  34. package/dist/esm/typescript-testing/typescript-slider-v2-valid-auto-polymorph-multiple.js.map +2 -2
  35. package/dist/esm/typescript-testing/typescript-slider-v2-valid-auto-polymorph-single.js +2 -1
  36. package/dist/esm/typescript-testing/typescript-slider-v2-valid-auto-polymorph-single.js.map +2 -2
  37. package/dist/esm/typescript-testing/typescript-slider-v2-valid-multiple.js +1 -0
  38. package/dist/esm/typescript-testing/typescript-slider-v2-valid-multiple.js.map +2 -2
  39. package/dist/esm/typescript-testing/typescript-slider-v2-valid-single.js +2 -1
  40. package/dist/esm/typescript-testing/typescript-slider-v2-valid-single.js.map +2 -2
  41. package/dist/types/config/useSliderV2.d.ts +8 -0
  42. package/dist/types/parts/styles.d.ts +8 -2
  43. package/dist/types/react-desc-prop-types.d.ts +1 -0
  44. package/package.json +11 -10
@@ -51,6 +51,8 @@ const useSliderV2 = (propsFromUser) => {
51
51
  (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSSliderV2PropTypes, { tickMarkPositions });
52
52
  const ownerPropConfig = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
53
53
  const [hasUserInteractedAfterFocus, setHasUserInteractedAfterFocus] = import_react.default.useState(false);
54
+ const [isAnyThumbHovered, setIsAnyThumbHovered] = import_react.default.useState(false);
55
+ const [isAnyThumbFocused, setIsAnyThumbFocused] = import_react.default.useState(false);
54
56
  return import_react.default.useMemo(
55
57
  () => ({
56
58
  propsWithDefault,
@@ -60,6 +62,10 @@ const useSliderV2 = (propsFromUser) => {
60
62
  tickMarkPositions,
61
63
  hasUserInteractedAfterFocus,
62
64
  setHasUserInteractedAfterFocus,
65
+ isAnyThumbHovered,
66
+ setIsAnyThumbHovered,
67
+ isAnyThumbFocused,
68
+ setIsAnyThumbFocused,
63
69
  ...ownerPropConfig
64
70
  }),
65
71
  [
@@ -69,6 +75,8 @@ const useSliderV2 = (propsFromUser) => {
69
75
  rangeValues,
70
76
  tickMarkPositions,
71
77
  hasUserInteractedAfterFocus,
78
+ isAnyThumbHovered,
79
+ isAnyThumbFocused,
72
80
  ownerPropConfig
73
81
  ]
74
82
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useSliderV2.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSSliderV2T, DSSliderV2PropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\nimport { useTickMarksValues } from './useTickMarksValues.js';\n\nexport interface DSSliderV2CTX {\n propsWithDefault: DSSliderV2T.InternalProps;\n xstyledProps: XstyledProps;\n instanceUid: string;\n rangeValues: [number, number] | [number];\n tickMarkPositions: number[];\n getOwnerProps: () => DSSliderV2T.InternalProps;\n getOwnerPropsArguments: () => Record<string, unknown>;\n hasUserInteractedAfterFocus: boolean;\n setHasUserInteractedAfterFocus: (value: boolean) => void;\n}\n\nexport const useSliderV2 = (propsFromUser: DSSliderV2T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSSliderV2T.InternalProps>(propsFromUser, defaultProps);\n\n const { multiple, value } = propsWithDefault;\n\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => `slider-v2-${uid(5)}`, []);\n\n const rangeValues = React.useMemo(() => {\n if (multiple === true) return value;\n return [value] as [number];\n }, [multiple, value]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n const tickMarkPositions = useTickMarksValues(propsWithDefault);\n\n // ===========================================================================\n // VALIDATE PROPS\n // ===========================================================================\n useValidateProps(propsWithDefault, DSSliderV2PropTypes, { tickMarkPositions });\n\n const ownerPropConfig = useOwnerProps(propsWithDefault);\n const [hasUserInteractedAfterFocus, setHasUserInteractedAfterFocus] = React.useState(false);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n rangeValues,\n tickMarkPositions,\n hasUserInteractedAfterFocus,\n setHasUserInteractedAfterFocus,\n ...ownerPropConfig,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n rangeValues,\n tickMarkPositions,\n hasUserInteractedAfterFocus,\n ownerPropConfig,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,8BAAgF;AAChF,iBAAoB;AACpB,mCAAoE;AACpE,8BAAiC;AACjC,gCAAmC;AAc5B,MAAM,cAAc,CAAC,kBAAqC;AAI/D,QAAM,uBAAmB,sDAAwD,eAAe,yCAAY;AAE5G,QAAM,EAAE,UAAU,MAAM,IAAI;AAK5B,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,iBAAa,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjE,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM;AACtC,QAAI,aAAa,KAAM,QAAO;AAC9B,WAAO,CAAC,KAAK;AAAA,EACf,GAAG,CAAC,UAAU,KAAK,CAAC;AAKpB,QAAM,wBAAoB,8CAAmB,gBAAgB;AAK7D,gDAAiB,kBAAkB,kDAAqB,EAAE,kBAAkB,CAAC;AAE7E,QAAM,sBAAkB,uCAAc,gBAAgB;AACtD,QAAM,CAAC,6BAA6B,8BAA8B,IAAI,aAAAA,QAAM,SAAS,KAAK;AAE1F,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import React from 'react';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSSliderV2T, DSSliderV2PropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\nimport { useTickMarksValues } from './useTickMarksValues.js';\n\nexport interface DSSliderV2CTX {\n propsWithDefault: DSSliderV2T.InternalProps;\n xstyledProps: XstyledProps;\n instanceUid: string;\n rangeValues: [number, number] | [number];\n tickMarkPositions: number[];\n getOwnerProps: () => DSSliderV2T.InternalProps;\n getOwnerPropsArguments: () => Record<string, unknown>;\n hasUserInteractedAfterFocus: boolean;\n setHasUserInteractedAfterFocus: (value: boolean) => void;\n // Spec v1.5.0 requires hover and focus on the handle to recolour the *active track segment* as\n // well. The track paints itself with a `getTrackBackground()` gradient computed at render, so a\n // CSS `:hover` on the thumb cannot reach it \u2014 the flags have to travel through this context for\n // Track to recompute. One flag pair for the whole slider, not per thumb: in range mode both\n // handles share a single active segment, so there is one surface to recolour.\n isAnyThumbHovered: boolean;\n setIsAnyThumbHovered: (value: boolean) => void;\n isAnyThumbFocused: boolean;\n setIsAnyThumbFocused: (value: boolean) => void;\n}\n\nexport const useSliderV2 = (propsFromUser: DSSliderV2T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSSliderV2T.InternalProps>(propsFromUser, defaultProps);\n\n const { multiple, value } = propsWithDefault;\n\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => `slider-v2-${uid(5)}`, []);\n\n const rangeValues = React.useMemo(() => {\n if (multiple === true) return value;\n return [value] as [number];\n }, [multiple, value]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n const tickMarkPositions = useTickMarksValues(propsWithDefault);\n\n // ===========================================================================\n // VALIDATE PROPS\n // ===========================================================================\n useValidateProps(propsWithDefault, DSSliderV2PropTypes, { tickMarkPositions });\n\n const ownerPropConfig = useOwnerProps(propsWithDefault);\n const [hasUserInteractedAfterFocus, setHasUserInteractedAfterFocus] = React.useState(false);\n const [isAnyThumbHovered, setIsAnyThumbHovered] = React.useState(false);\n const [isAnyThumbFocused, setIsAnyThumbFocused] = React.useState(false);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n rangeValues,\n tickMarkPositions,\n hasUserInteractedAfterFocus,\n setHasUserInteractedAfterFocus,\n isAnyThumbHovered,\n setIsAnyThumbHovered,\n isAnyThumbFocused,\n setIsAnyThumbFocused,\n ...ownerPropConfig,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n rangeValues,\n tickMarkPositions,\n hasUserInteractedAfterFocus,\n isAnyThumbHovered,\n isAnyThumbFocused,\n ownerPropConfig,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,8BAAgF;AAChF,iBAAoB;AACpB,mCAAoE;AACpE,8BAAiC;AACjC,gCAAmC;AAuB5B,MAAM,cAAc,CAAC,kBAAqC;AAI/D,QAAM,uBAAmB,sDAAwD,eAAe,yCAAY;AAE5G,QAAM,EAAE,UAAU,MAAM,IAAI;AAK5B,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,iBAAa,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAEjE,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM;AACtC,QAAI,aAAa,KAAM,QAAO;AAC9B,WAAO,CAAC,KAAK;AAAA,EACf,GAAG,CAAC,UAAU,KAAK,CAAC;AAKpB,QAAM,wBAAoB,8CAAmB,gBAAgB;AAK7D,gDAAiB,kBAAkB,kDAAqB,EAAE,kBAAkB,CAAC;AAE7E,QAAM,sBAAkB,uCAAc,gBAAgB;AACtD,QAAM,CAAC,6BAA6B,8BAA8B,IAAI,aAAAA,QAAM,SAAS,KAAK;AAC1F,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,aAAAA,QAAM,SAAS,KAAK;AACtE,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,aAAAA,QAAM,SAAS,KAAK;AAEtE,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -49,14 +49,25 @@ const conformedThumbLabel = (config) => {
49
49
  }
50
50
  return msg;
51
51
  };
52
- const spanStyle = { height: 20, width: 20 };
52
+ const spanStyle = { height: 20, width: 12 };
53
53
  const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }) => {
54
54
  const {
55
- propsWithDefault: { disabled, applyAriaDisabled, readOnly, customTickMarksValues, step, minValue },
55
+ propsWithDefault: {
56
+ disabled,
57
+ applyAriaDisabled,
58
+ readOnly,
59
+ hasError,
60
+ customTickMarksValues,
61
+ step,
62
+ minValue,
63
+ maxValue
64
+ },
56
65
  rangeValues,
57
66
  getOwnerProps,
58
67
  hasUserInteractedAfterFocus,
59
- setHasUserInteractedAfterFocus
68
+ setHasUserInteractedAfterFocus,
69
+ setIsAnyThumbHovered,
70
+ setIsAnyThumbFocused
60
71
  } = (0, import_react.useContext)(import_DSSliderV2CTX.default);
61
72
  const [isHovered, setIsHovered] = (0, import_react.useState)(false);
62
73
  const [isFocused, setIsFocused] = (0, import_react.useState)(false);
@@ -71,6 +82,7 @@ const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }) => {
71
82
  } = reactRangeOpinionatedProps;
72
83
  const showPopover = (isDragged || isHovered || isFocused) && !isTooltipDismissed;
73
84
  const label = conformedThumbLabel({ rangeValues, customTickMarksValues, index, step, minValue });
85
+ const isPinnedAtBoundary = rangeValues.length === 2 && (index === 1 && rangeValues.every((v) => v === maxValue) || index === 0 && rangeValues.every((v) => v === minValue));
74
86
  const getOwnerPropsArguments = (0, import_react.useCallback)(
75
87
  () => ({
76
88
  index,
@@ -87,10 +99,12 @@ const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }) => {
87
99
  setIsHovered(true);
88
100
  setIsFocused(false);
89
101
  setIsTooltipDismissed(false);
90
- }, []);
102
+ setIsAnyThumbHovered(true);
103
+ }, [setIsAnyThumbHovered]);
91
104
  const handleMouseLeave = (0, import_react.useCallback)(() => {
92
105
  setIsHovered(false);
93
- }, []);
106
+ setIsAnyThumbHovered(false);
107
+ }, [setIsAnyThumbHovered]);
94
108
  const handleKeyDown = (0, import_react.useCallback)(
95
109
  (e) => {
96
110
  reactRangeOnKeyDownHandler?.(e);
@@ -110,14 +124,20 @@ const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }) => {
110
124
  },
111
125
  [reactRangeOnKeyUpHandler]
112
126
  );
127
+ const focusThisThumb = (0, import_react.useCallback)(() => {
128
+ if (disabled) return;
129
+ ref?.current?.focus();
130
+ }, [disabled, ref]);
113
131
  const handleFocus = (0, import_react.useCallback)(() => {
114
132
  setIsFocused(true);
115
133
  setIsTooltipDismissed(false);
116
- }, []);
134
+ setIsAnyThumbFocused(true);
135
+ }, [setIsAnyThumbFocused]);
117
136
  const handleBlur = (0, import_react.useCallback)(() => {
118
137
  setIsFocused(false);
119
138
  setHasUserInteractedAfterFocus(false);
120
- }, [setHasUserInteractedAfterFocus]);
139
+ setIsAnyThumbFocused(false);
140
+ }, [setHasUserInteractedAfterFocus, setIsAnyThumbFocused]);
121
141
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
142
  import_styles.StyledThumb,
123
143
  {
@@ -127,9 +147,14 @@ const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }) => {
127
147
  disabled,
128
148
  $applyAriaDisabled: applyAriaDisabled,
129
149
  $readOnly: readOnly,
150
+ $hasError: hasError,
151
+ $isRaised: isDragged,
152
+ $isPinnedAtBoundary: isPinnedAtBoundary,
130
153
  "aria-disabled": applyAriaDisabled || readOnly,
131
154
  onMouseEnter: handleMouseEnter,
132
155
  onMouseLeave: handleMouseLeave,
156
+ onMouseDown: focusThisThumb,
157
+ onTouchStart: focusThisThumb,
133
158
  onKeyDown: handleKeyDown,
134
159
  onKeyUp: handleKeyUp,
135
160
  onFocus: handleFocus,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/Thumb.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { useCallback, useContext, useMemo, useState } from 'react';\nimport type { IRenderThumbParams } from 'react-range/lib/types.js';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { StyledThumb } from './styles.js';\n\nexport const conformedThumbLabel = (config: {\n rangeValues: [number] | [number, number];\n customTickMarksValues: string[];\n index: number;\n step: number;\n minValue: number;\n}) => {\n const { rangeValues, customTickMarksValues, index, step, minValue } = config;\n let msg = `Value: `;\n if (customTickMarksValues.length) {\n const foundValue = customTickMarksValues[Math.floor((rangeValues[index] - minValue) / step)];\n msg += `${foundValue ?? rangeValues[index].toFixed(1)}`;\n } else {\n msg += `${rangeValues[index].toFixed(1)}`;\n }\n\n return msg;\n};\n\nconst spanStyle = { height: 20, width: 20 };\n\nexport const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }: Omit<IRenderThumbParams, 'key'>) => {\n const {\n propsWithDefault: { disabled, applyAriaDisabled, readOnly, customTickMarksValues, step, minValue },\n rangeValues,\n getOwnerProps,\n hasUserInteractedAfterFocus,\n setHasUserInteractedAfterFocus,\n } = useContext(DSSliderV2Context);\n\n const [isHovered, setIsHovered] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [isTooltipDismissed, setIsTooltipDismissed] = useState(false);\n\n const {\n ref,\n style: thumbStyle,\n key: unusedKeyDueToLibTypescriptIssues,\n onKeyDown: reactRangeOnKeyDownHandler,\n onKeyUp: reactRangeOnKeyUpHandler,\n ...propsFromReactRangeTookAsIs\n } = reactRangeOpinionatedProps;\n const showPopover = (isDragged || isHovered || isFocused) && !isTooltipDismissed;\n\n const label = conformedThumbLabel({ rangeValues, customTickMarksValues, index, step, minValue });\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n shouldUseExtendedAriaValueText: !hasUserInteractedAfterFocus,\n }),\n [index, hasUserInteractedAfterFocus],\n );\n\n const sanitizedStyle = useMemo(() => {\n // as per https://jira.elliemae.io/browse/PUI-14390 and https://github.com/intcx/PLATFORM-UI.dimsum/pull/7046\n // we also want z-index: ${(props) => props.theme.zIndex.tooltip}; from the theme\n // I keep the same, just refactoring so the styles concerns are part of the styled component as expected\n // my understanding is that libInherithedStyles main purposes are:\n // - to position the element on the track with a transform: translate\n // - to handle the cursor:grab/grabbing based on interaction state\n const { zIndex, ...libInherithedStyles } = thumbStyle;\n // we want to keep the cursor grab/grabbing thing, but we want our own \"disabled\" cursor...\n if (disabled || applyAriaDisabled || readOnly) return { ...libInherithedStyles, cursor: 'not-allowed' };\n return libInherithedStyles;\n }, [applyAriaDisabled, disabled, readOnly, thumbStyle]);\n\n const handleMouseEnter = useCallback<React.MouseEventHandler<HTMLDivElement>>(() => {\n setIsHovered(true);\n setIsFocused(false);\n setIsTooltipDismissed(false);\n }, []);\n const handleMouseLeave = useCallback<React.MouseEventHandler<HTMLDivElement>>(() => {\n setIsHovered(false);\n }, []);\n\n const handleKeyDown = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n reactRangeOnKeyDownHandler?.(e);\n if (e.key === 'Escape' && showPopover) {\n // stoping propagation here is load-bearing\n // we are checking \"showPopover\" because if \"the popover exist\" it means the tooltip exist\n // if it exist and we are in a dialog, the first esc needs to close the tooltip, not the dialog.\n e.stopPropagation();\n setIsTooltipDismissed(true);\n setIsFocused(true);\n } else {\n setIsTooltipDismissed(false);\n }\n },\n [showPopover, reactRangeOnKeyDownHandler],\n );\n const handleKeyUp = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n reactRangeOnKeyUpHandler?.(e);\n // if we need to do anything on keyup too, this is where we will do it.\n },\n [reactRangeOnKeyUpHandler],\n );\n const handleFocus = useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIsFocused(true);\n setIsTooltipDismissed(false);\n }, []);\n const handleBlur = useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIsFocused(false);\n setHasUserInteractedAfterFocus(false);\n }, [setHasUserInteractedAfterFocus]);\n\n return (\n <StyledThumb\n {...propsFromReactRangeTookAsIs}\n style={sanitizedStyle}\n innerRef={ref}\n disabled={disabled}\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n // dicussed with SME on 13/jul/2026, even if role='slider' technically accepts aria-readonly\n // - SRs support for aria-readonly is loose\n // - having both aria-readonly and aria-disabled is a violation\n // - aria-disabled transmit the same interaction pattern\n // therefore, we will not set aria-readonly and will rely on aria-disabled to convey the interaction pattern\n // aria-readonly={readOnly}\n aria-disabled={applyAriaDisabled || readOnly} // || readOnly as per previous comment\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onFocus={handleFocus}\n onBlur={handleBlur}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <DSTooltipV3 key={label} text={label} showPopover={showPopover} withoutAnimation>\n <span style={spanStyle}></span>\n </DSTooltipV3>\n </StyledThumb>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2If;AA3IR,2BAA4B;AAC5B,mBAA2D;AAE3D,2BAA8B;AAC9B,oBAA4B;AAErB,MAAM,sBAAsB,CAAC,WAM9B;AACJ,QAAM,EAAE,aAAa,uBAAuB,OAAO,MAAM,SAAS,IAAI;AACtE,MAAI,MAAM;AACV,MAAI,sBAAsB,QAAQ;AAChC,UAAM,aAAa,sBAAsB,KAAK,OAAO,YAAY,KAAK,IAAI,YAAY,IAAI,CAAC;AAC3F,WAAO,GAAG,cAAc,YAAY,KAAK,EAAE,QAAQ,CAAC,CAAC;AAAA,EACvD,OAAO;AACL,WAAO,GAAG,YAAY,KAAK,EAAE,QAAQ,CAAC,CAAC;AAAA,EACzC;AAEA,SAAO;AACT;AAEA,MAAM,YAAY,EAAE,QAAQ,IAAI,OAAO,GAAG;AAEnC,MAAM,QAAQ,CAAC,EAAE,OAAO,OAAO,4BAA4B,UAAU,MAAuC;AACjH,QAAM;AAAA,IACJ,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AsB,IAAI;AAC1B,qBAAa,IAAI;AAAA,MACnB,OAAO;AACL,8BAAsB,KAAK;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,CAAC,aAAa,0BAA0B;AAAA,EAC1C;AACA,QAAM,kBAAc;AAAA,IAClB,CAAC,MAAM;AACL,iCAA2B,CAAC;AAAA,IAE9B;AAAA,IACA,CAAC,wBAAwB;AAAA,EAC3B;AACA,QAAM,kBAAc,0BAAqD,MAAM;AAC7E,iBAAa,IAAI;AACjB,0BAAsB,KAAK;AAAA,EAC7B,GAAG,CAAC,CAAC;AACL,QAAM,iBAAa,0BAAqD,MAAM;AAC5E,iBAAa,KAAK;AAClB,mCAA+B,KAAK;AAAA,EACtC,GAAG,CAAC,8BAA8B,CAAC;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,MACP,UAAU;AAAA,MACV;AAAA,MACA,oBAAoB;AAAA,MACpB,WAAW;AAAA,MAOX,iBAAe,qBAAqB;AAAA,MACpC,cAAc;AAAA,MACd,cAAc;AAAA,MACd,WAAW;AAAA,MACX,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MAEA,sDAAC,oCAAwB,MAAM,OAAO,aAA0B,kBAAgB,MAC9E,sDAAC,UAAK,OAAO,WAAW,KADR,KAElB;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["import { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { useCallback, useContext, useMemo, useState } from 'react';\nimport type { IRenderThumbParams } from 'react-range/lib/types.js';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { StyledThumb } from './styles.js';\n\nexport const conformedThumbLabel = (config: {\n rangeValues: [number] | [number, number];\n customTickMarksValues: string[];\n index: number;\n step: number;\n minValue: number;\n}) => {\n const { rangeValues, customTickMarksValues, index, step, minValue } = config;\n let msg = `Value: `;\n if (customTickMarksValues.length) {\n const foundValue = customTickMarksValues[Math.floor((rangeValues[index] - minValue) / step)];\n msg += `${foundValue ?? rangeValues[index].toFixed(1)}`;\n } else {\n msg += `${rangeValues[index].toFixed(1)}`;\n }\n\n return msg;\n};\n\n// Matches the handle box from Spec v1.5.0 \u2014 this span is the tooltip's anchor and has to cover the\n// handle, not exceed it.\nconst spanStyle = { height: 20, width: 12 };\n\nexport const Thumb = ({ index, props: reactRangeOpinionatedProps, isDragged }: Omit<IRenderThumbParams, 'key'>) => {\n const {\n propsWithDefault: {\n disabled,\n applyAriaDisabled,\n readOnly,\n hasError,\n customTickMarksValues,\n step,\n minValue,\n maxValue,\n },\n rangeValues,\n getOwnerProps,\n hasUserInteractedAfterFocus,\n setHasUserInteractedAfterFocus,\n setIsAnyThumbHovered,\n setIsAnyThumbFocused,\n } = useContext(DSSliderV2Context);\n\n // Local state drives the tooltip, which is per handle. The context setters below mirror the same\n // transitions for the track, which is shared between handles in range mode.\n const [isHovered, setIsHovered] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [isTooltipDismissed, setIsTooltipDismissed] = useState(false);\n\n const {\n ref,\n style: thumbStyle,\n key: unusedKeyDueToLibTypescriptIssues,\n onKeyDown: reactRangeOnKeyDownHandler,\n onKeyUp: reactRangeOnKeyUpHandler,\n ...propsFromReactRangeTookAsIs\n } = reactRangeOpinionatedProps;\n const showPopover = (isDragged || isHovered || isFocused) && !isTooltipDismissed;\n\n const label = conformedThumbLabel({ rangeValues, customTickMarksValues, index, step, minValue });\n\n // At a boundary the pointer lands on the thumb that cannot move; handing it to the other re-opens the range.\n const isPinnedAtBoundary =\n rangeValues.length === 2 &&\n ((index === 1 && rangeValues.every((v) => v === maxValue)) ||\n (index === 0 && rangeValues.every((v) => v === minValue)));\n\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n shouldUseExtendedAriaValueText: !hasUserInteractedAfterFocus,\n }),\n [index, hasUserInteractedAfterFocus],\n );\n\n const sanitizedStyle = useMemo(() => {\n // as per https://jira.elliemae.io/browse/PUI-14390 and https://github.com/intcx/PLATFORM-UI.dimsum/pull/7046\n // we also want z-index: ${(props) => props.theme.zIndex.tooltip}; from the theme\n // I keep the same, just refactoring so the styles concerns are part of the styled component as expected\n // my understanding is that libInherithedStyles main purposes are:\n // - to position the element on the track with a transform: translate\n // - to handle the cursor:grab/grabbing based on interaction state\n const { zIndex, ...libInherithedStyles } = thumbStyle;\n // we want to keep the cursor grab/grabbing thing, but we want our own \"disabled\" cursor...\n if (disabled || applyAriaDisabled || readOnly) return { ...libInherithedStyles, cursor: 'not-allowed' };\n return libInherithedStyles;\n }, [applyAriaDisabled, disabled, readOnly, thumbStyle]);\n\n const handleMouseEnter = useCallback<React.MouseEventHandler<HTMLDivElement>>(() => {\n setIsHovered(true);\n setIsFocused(false);\n setIsTooltipDismissed(false);\n setIsAnyThumbHovered(true);\n }, [setIsAnyThumbHovered]);\n const handleMouseLeave = useCallback<React.MouseEventHandler<HTMLDivElement>>(() => {\n setIsHovered(false);\n setIsAnyThumbHovered(false);\n }, [setIsAnyThumbHovered]);\n\n const handleKeyDown = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n reactRangeOnKeyDownHandler?.(e);\n if (e.key === 'Escape' && showPopover) {\n // stoping propagation here is load-bearing\n // we are checking \"showPopover\" because if \"the popover exist\" it means the tooltip exist\n // if it exist and we are in a dialog, the first esc needs to close the tooltip, not the dialog.\n e.stopPropagation();\n setIsTooltipDismissed(true);\n setIsFocused(true);\n } else {\n setIsTooltipDismissed(false);\n }\n },\n [showPopover, reactRangeOnKeyDownHandler],\n );\n const handleKeyUp = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n reactRangeOnKeyUpHandler?.(e);\n // if we need to do anything on keyup too, this is where we will do it.\n },\n [reactRangeOnKeyUpHandler],\n );\n // react-range skips focus() under `draggableTrack` and its preventDefault blocks the native one.\n const focusThisThumb = useCallback(() => {\n if (disabled) return;\n (ref?.current as HTMLDivElement | null)?.focus();\n }, [disabled, ref]);\n\n const handleFocus = useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIsFocused(true);\n setIsTooltipDismissed(false);\n setIsAnyThumbFocused(true);\n }, [setIsAnyThumbFocused]);\n const handleBlur = useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIsFocused(false);\n setHasUserInteractedAfterFocus(false);\n setIsAnyThumbFocused(false);\n }, [setHasUserInteractedAfterFocus, setIsAnyThumbFocused]);\n\n return (\n <StyledThumb\n {...propsFromReactRangeTookAsIs}\n style={sanitizedStyle}\n innerRef={ref}\n disabled={disabled}\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n $hasError={hasError}\n $isRaised={isDragged}\n $isPinnedAtBoundary={isPinnedAtBoundary}\n // dicussed with SME on 13/jul/2026, even if role='slider' technically accepts aria-readonly\n // - SRs support for aria-readonly is loose\n // - having both aria-readonly and aria-disabled is a violation\n // - aria-disabled transmit the same interaction pattern\n // therefore, we will not set aria-readonly and will rely on aria-disabled to convey the interaction pattern\n // aria-readonly={readOnly}\n aria-disabled={applyAriaDisabled || readOnly} // || readOnly as per previous comment\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseDown={focusThisThumb}\n onTouchStart={focusThisThumb}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onFocus={handleFocus}\n onBlur={handleBlur}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <DSTooltipV3 key={label} text={label} showPopover={showPopover} withoutAnimation>\n <span style={spanStyle}></span>\n </DSTooltipV3>\n </StyledThumb>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Kf;AA/KR,2BAA4B;AAC5B,mBAA2D;AAE3D,2BAA8B;AAC9B,oBAA4B;AAErB,MAAM,sBAAsB,CAAC,WAM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AAA,EAC3B,GAAG,CAAC,oBAAoB,CAAC;AACzB,QAAM,iBAAa,0BAAqD,MAAM;AAC5E,iBAAa,KAAK;AAClB,mCAA+B,KAAK;AACpC,yBAAqB,KAAK;AAAA,EAC5B,GAAG,CAAC,gCAAgC,oBAAoB,CAAC;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,MACP,UAAU;AAAA,MACV;AAAA,MACA,oBAAoB;AAAA,MACpB,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,qBAAqB;AAAA,MAOrB,iBAAe,qBAAqB;AAAA,MACpC,cAAc;AAAA,MACd,cAAc;AAAA,MACd,aAAa;AAAA,MACb,cAAc;AAAA,MACd,WAAW;AAAA,MACX,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MAEA,sDAAC,oCAAwB,MAAM,OAAO,aAA0B,kBAAgB,MAC9E,sDAAC,UAAK,OAAO,WAAW,KADR,KAElB;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["DSSliderV2Context"]
7
7
  }
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(TickMarksValues_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
+ var import_ds_typography = require("@elliemae/ds-typography");
37
38
  var import_DSSliderV2CTX = __toESM(require("../DSSliderV2CTX.js"));
38
39
  var import_inRange = require("../utils/inRange.js");
39
40
  var import_styles = require("./styles.js");
@@ -63,6 +64,8 @@ const TickMarksValues = () => {
63
64
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
65
  import_styles.StyledTickMarkValue,
65
66
  {
67
+ component: "div",
68
+ variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B2,
66
69
  isSelected,
67
70
  getOwnerProps,
68
71
  getOwnerPropsArguments,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/TickMarksValues.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { inRange } from '../utils/inRange.js';\nimport { StyledTickMarkValue, StyledTickMarksContainer } from './styles.js';\n\nexport const TickMarksValues = () => {\n const {\n propsWithDefault: { customTickMarksValues, maxValue, minValue },\n rangeValues,\n tickMarkPositions,\n instanceUid,\n getOwnerProps,\n getOwnerPropsArguments,\n } = useContext(DSSliderV2Context);\n\n const { columnWidth } = useMemo(() => {\n const distanceBetweenDots = (maxValue - minValue) / (tickMarkPositions.length - 1);\n const calculatedColumnWidthPercentage = `${(distanceBetweenDots / (maxValue - minValue)) * 100}%`;\n return { columnWidth: calculatedColumnWidthPercentage };\n }, [maxValue, minValue, tickMarkPositions.length]);\n\n return (\n <StyledTickMarksContainer\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n columnCount={tickMarkPositions.length}\n columnWidth={columnWidth}\n >\n {tickMarkPositions.map((value, index) => {\n const isSelected = inRange(value, rangeValues);\n\n return (\n <StyledTickMarkValue\n key={`${instanceUid}-${value}`}\n isSelected={isSelected}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {customTickMarksValues[index] ?? value}\n </StyledTickMarkValue>\n );\n })}\n </StyledTickMarksContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCb;AAhCV,mBAAoC;AACpC,2BAA8B;AAC9B,qBAAwB;AACxB,oBAA8D;AAEvD,MAAM,kBAAkB,MAAM;AACnC,QAAM;AAAA,IACJ,kBAAkB,EAAE,uBAAuB,UAAU,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,qBAAAA,OAAiB;AAEhC,QAAM,EAAE,YAAY,QAAI,sBAAQ,MAAM;AACpC,UAAM,uBAAuB,WAAW,aAAa,kBAAkB,SAAS;AAChF,UAAM,kCAAkC,GAAI,uBAAuB,WAAW,YAAa,GAAG;AAC9F,WAAO,EAAE,aAAa,gCAAgC;AAAA,EACxD,GAAG,CAAC,UAAU,UAAU,kBAAkB,MAAM,CAAC;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,aAAa,kBAAkB;AAAA,MAC/B;AAAA,MAEC,4BAAkB,IAAI,CAAC,OAAO,UAAU;AACvC,cAAM,iBAAa,wBAAQ,OAAO,WAAW;AAE7C,eACE;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA;AAAA,YACA;AAAA,YAEC,gCAAsB,KAAK,KAAK;AAAA;AAAA,UAL5B,GAAG,WAAW,IAAI,KAAK;AAAA,QAM9B;AAAA,MAEJ,CAAC;AAAA;AAAA,EACH;AAEJ;",
4
+ "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport { TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { inRange } from '../utils/inRange.js';\nimport { StyledTickMarkValue, StyledTickMarksContainer } from './styles.js';\n\nexport const TickMarksValues = () => {\n const {\n propsWithDefault: { customTickMarksValues, maxValue, minValue },\n rangeValues,\n tickMarkPositions,\n instanceUid,\n getOwnerProps,\n getOwnerPropsArguments,\n } = useContext(DSSliderV2Context);\n\n const { columnWidth } = useMemo(() => {\n const distanceBetweenDots = (maxValue - minValue) / (tickMarkPositions.length - 1);\n const calculatedColumnWidthPercentage = `${(distanceBetweenDots / (maxValue - minValue)) * 100}%`;\n return { columnWidth: calculatedColumnWidthPercentage };\n }, [maxValue, minValue, tickMarkPositions.length]);\n\n return (\n <StyledTickMarksContainer\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n columnCount={tickMarkPositions.length}\n columnWidth={columnWidth}\n >\n {tickMarkPositions.map((value, index) => {\n const isSelected = inRange(value, rangeValues);\n\n return (\n <StyledTickMarkValue\n key={`${instanceUid}-${value}`}\n // Keeps the element this slot has always rendered. `VariantToAsMap` maps every `b*`\n // variant to `p`, so adopting `b2` would silently turn the step value into a paragraph\n // \u2014 a change nobody asked for, with paragraph margins and the wrong semantics for a\n // number. Spec v1.5.0 says nothing about HTML elements, so the existing one stands.\n component=\"div\"\n variant={TYPOGRAPHY_VARIANTS.B2}\n isSelected={isSelected}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {customTickMarksValues[index] ?? value}\n </StyledTickMarkValue>\n );\n })}\n </StyledTickMarksContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiCb;AAjCV,mBAAoC;AACpC,2BAAoC;AACpC,2BAA8B;AAC9B,qBAAwB;AACxB,oBAA8D;AAEvD,MAAM,kBAAkB,MAAM;AACnC,QAAM;AAAA,IACJ,kBAAkB,EAAE,uBAAuB,UAAU,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,qBAAAA,OAAiB;AAEhC,QAAM,EAAE,YAAY,QAAI,sBAAQ,MAAM;AACpC,UAAM,uBAAuB,WAAW,aAAa,kBAAkB,SAAS;AAChF,UAAM,kCAAkC,GAAI,uBAAuB,WAAW,YAAa,GAAG;AAC9F,WAAO,EAAE,aAAa,gCAAgC;AAAA,EACxD,GAAG,CAAC,UAAU,UAAU,kBAAkB,MAAM,CAAC;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,aAAa,kBAAkB;AAAA,MAC/B;AAAA,MAEC,4BAAkB,IAAI,CAAC,OAAO,UAAU;AACvC,cAAM,iBAAa,wBAAQ,OAAO,WAAW;AAE7C,eACE;AAAA,UAAC;AAAA;AAAA,YAMC,WAAU;AAAA,YACV,SAAS,yCAAoB;AAAA,YAC7B;AAAA,YACA;AAAA,YACA;AAAA,YAEC,gCAAsB,KAAK,KAAK;AAAA;AAAA,UAX5B,GAAG,WAAW,IAAI,KAAK;AAAA,QAY9B;AAAA,MAEJ,CAAC;AAAA;AAAA,EACH;AAEJ;",
6
6
  "names": ["DSSliderV2Context"]
7
7
  }
@@ -40,10 +40,21 @@ var import_TickMarksValues = require("./TickMarksValues.js");
40
40
  var import_styles = require("./styles.js");
41
41
  const Track = ({ children, props: reactRangeOpinionatedProps, disabled }) => {
42
42
  const {
43
- propsWithDefault: { minValue, maxValue, applyAriaDisabled, readOnly, withTickMarksValues, withTickMarks, multiple },
43
+ propsWithDefault: {
44
+ minValue,
45
+ maxValue,
46
+ applyAriaDisabled,
47
+ readOnly,
48
+ hasError,
49
+ withTickMarksValues,
50
+ withTickMarks,
51
+ multiple
52
+ },
44
53
  rangeValues,
45
54
  getOwnerProps,
46
- getOwnerPropsArguments
55
+ getOwnerPropsArguments,
56
+ isAnyThumbHovered,
57
+ isAnyThumbFocused
47
58
  } = (0, import_react.useContext)(import_DSSliderV2CTX.default);
48
59
  const { ref, style: trackStyle, ...propsFromReactRangeTookAsIsForTheTrack } = reactRangeOpinionatedProps;
49
60
  const sanitizedStyle = (0, import_react.useMemo)(() => {
@@ -60,6 +71,9 @@ const Track = ({ children, props: reactRangeOpinionatedProps, disabled }) => {
60
71
  disabled,
61
72
  $readOnly: readOnly,
62
73
  $applyAriaDisabled: applyAriaDisabled,
74
+ $hasError: hasError,
75
+ $isAnyThumbHovered: isAnyThumbHovered,
76
+ $isAnyThumbFocused: isAnyThumbFocused,
63
77
  minValue,
64
78
  maxValue,
65
79
  rangeValues,
@@ -68,7 +82,7 @@ const Track = ({ children, props: reactRangeOpinionatedProps, disabled }) => {
68
82
  getOwnerPropsArguments,
69
83
  children: [
70
84
  children,
71
- withTickMarks && (!disabled || !applyAriaDisabled) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TickMarks.TickMarks, {})
85
+ withTickMarks && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TickMarks.TickMarks, {})
72
86
  ]
73
87
  }
74
88
  ),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/Track.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport type { IRenderTrackParams } from 'react-range/lib/types.js';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { TickMarks } from './TickMarks.js';\nimport { TickMarksValues } from './TickMarksValues.js';\nimport { StyledTrack } from './styles.js';\n\nexport const Track = ({ children, props: reactRangeOpinionatedProps, disabled }: IRenderTrackParams) => {\n const {\n propsWithDefault: { minValue, maxValue, applyAriaDisabled, readOnly, withTickMarksValues, withTickMarks, multiple },\n rangeValues,\n getOwnerProps,\n getOwnerPropsArguments,\n } = useContext(DSSliderV2Context);\n\n const { ref, style: trackStyle, ...propsFromReactRangeTookAsIsForTheTrack } = reactRangeOpinionatedProps;\n\n const sanitizedStyle = useMemo(() => {\n // we want to keep the cursor but when disabled, we want it to show as 'not-allowed'\n if (disabled || applyAriaDisabled || readOnly) return { ...trackStyle, cursor: 'not-allowed' };\n return trackStyle;\n }, [applyAriaDisabled, disabled, readOnly, trackStyle]);\n\n return (\n <>\n <StyledTrack\n style={sanitizedStyle}\n {...propsFromReactRangeTookAsIsForTheTrack} // This is needed because it's received from the library\n innerRef={ref}\n disabled={disabled}\n $readOnly={readOnly}\n $applyAriaDisabled={applyAriaDisabled}\n minValue={minValue}\n maxValue={maxValue}\n rangeValues={rangeValues}\n multiple={multiple}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n {withTickMarks && (!disabled || !applyAriaDisabled) && <TickMarks />}\n </StyledTrack>\n {withTickMarksValues && <TickMarksValues />}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAxBJ,mBAAoC;AAEpC,2BAA8B;AAC9B,uBAA0B;AAC1B,6BAAgC;AAChC,oBAA4B;AAErB,MAAM,QAAQ,CAAC,EAAE,UAAU,OAAO,4BAA4B,SAAS,MAA0B;AACtG,QAAM;AAAA,IACJ,kBAAkB,EAAE,UAAU,UAAU,mBAAmB,UAAU,qBAAqB,eAAe,SAAS;AAAA,IAClH;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,qBAAAA,OAAiB;AAEhC,QAAM,EAAE,KAAK,OAAO,YAAY,GAAG,uCAAuC,IAAI;AAE9E,QAAM,qBAAiB,sBAAQ,MAAM;AAEnC,QAAI,YAAY,qBAAqB,SAAU,QAAO,EAAE,GAAG,YAAY,QAAQ,cAAc;AAC7F,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,UAAU,UAAU,UAAU,CAAC;AAEtD,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACN,GAAG;AAAA,QACJ,UAAU;AAAA,QACV;AAAA,QACA,WAAW;AAAA,QACX,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UACA,kBAAkB,CAAC,YAAY,CAAC,sBAAsB,4CAAC,8BAAU;AAAA;AAAA;AAAA,IACpE;AAAA,IACC,uBAAuB,4CAAC,0CAAgB;AAAA,KAC3C;AAEJ;",
4
+ "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport type { IRenderTrackParams } from 'react-range/lib/types.js';\nimport DSSliderV2Context from '../DSSliderV2CTX.js';\nimport { TickMarks } from './TickMarks.js';\nimport { TickMarksValues } from './TickMarksValues.js';\nimport { StyledTrack } from './styles.js';\n\nexport const Track = ({ children, props: reactRangeOpinionatedProps, disabled }: IRenderTrackParams) => {\n const {\n propsWithDefault: {\n minValue,\n maxValue,\n applyAriaDisabled,\n readOnly,\n hasError,\n withTickMarksValues,\n withTickMarks,\n multiple,\n },\n rangeValues,\n getOwnerProps,\n getOwnerPropsArguments,\n isAnyThumbHovered,\n isAnyThumbFocused,\n } = useContext(DSSliderV2Context);\n\n const { ref, style: trackStyle, ...propsFromReactRangeTookAsIsForTheTrack } = reactRangeOpinionatedProps;\n\n const sanitizedStyle = useMemo(() => {\n // we want to keep the cursor but when disabled, we want it to show as 'not-allowed'\n if (disabled || applyAriaDisabled || readOnly) return { ...trackStyle, cursor: 'not-allowed' };\n return trackStyle;\n }, [applyAriaDisabled, disabled, readOnly, trackStyle]);\n\n return (\n <>\n <StyledTrack\n style={sanitizedStyle}\n {...propsFromReactRangeTookAsIsForTheTrack} // This is needed because it's received from the library\n innerRef={ref}\n disabled={disabled}\n $readOnly={readOnly}\n $applyAriaDisabled={applyAriaDisabled}\n $hasError={hasError}\n $isAnyThumbHovered={isAnyThumbHovered}\n $isAnyThumbFocused={isAnyThumbFocused}\n minValue={minValue}\n maxValue={maxValue}\n rangeValues={rangeValues}\n multiple={multiple}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n {/*\n * Step marks are not gated on any interaction state. Spec v1.5.0's Design Notes require them\n * to stay visible across both track segments and every interactive state, and neither the\n * Disabled nor the Aria-Disabled row hides them. A previous `(!disabled || !applyAriaDisabled)`\n * guard sat here; it only evaluated false when both flags were true at once, so it never hid\n * anything \u2014 and \"fixing\" it to `&&` would have introduced a spec violation.\n */}\n {withTickMarks && <TickMarks />}\n </StyledTrack>\n {withTickMarksValues && <TickMarksValues />}\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmCnB;AAnCJ,mBAAoC;AAEpC,2BAA8B;AAC9B,uBAA0B;AAC1B,6BAAgC;AAChC,oBAA4B;AAErB,MAAM,QAAQ,CAAC,EAAE,UAAU,OAAO,4BAA4B,SAAS,MAA0B;AACtG,QAAM;AAAA,IACJ,kBAAkB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,qBAAAA,OAAiB;AAEhC,QAAM,EAAE,KAAK,OAAO,YAAY,GAAG,uCAAuC,IAAI;AAE9E,QAAM,qBAAiB,sBAAQ,MAAM;AAEnC,QAAI,YAAY,qBAAqB,SAAU,QAAO,EAAE,GAAG,YAAY,QAAQ,cAAc;AAC7F,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,UAAU,UAAU,UAAU,CAAC;AAEtD,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACN,GAAG;AAAA,QACJ,UAAU;AAAA,QACV;AAAA,QACA,WAAW;AAAA,QACX,oBAAoB;AAAA,QACpB,WAAW;AAAA,QACX,oBAAoB;AAAA,QACpB,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAQA,iBAAiB,4CAAC,8BAAU;AAAA;AAAA;AAAA,IAC/B;AAAA,IACC,uBAAuB,4CAAC,0CAAgB;AAAA,KAC3C;AAEJ;",
6
6
  "names": ["DSSliderV2Context"]
7
7
  }
@@ -41,18 +41,38 @@ module.exports = __toCommonJS(styles_exports);
41
41
  var React = __toESM(require("react"));
42
42
  var import_ds_grid = require("@elliemae/ds-grid");
43
43
  var import_ds_system = require("@elliemae/ds-system");
44
+ var import_ds_typography = require("@elliemae/ds-typography");
44
45
  var import_react_range = require("react-range");
45
46
  var import_constants = require("../constants/index.js");
46
47
  const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSSliderV2Name, slot: import_constants.SLIDER_V2_SLOTS.ROOT })``;
47
48
  const StyledRangeWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSSliderV2Name, slot: import_constants.SLIDER_V2_SLOTS.RANGE_WRAPPER })``;
49
+ const SPEC_ERROR_ACTIVE = 900;
50
+ const SPEC_ERROR_INACTIVE = 200;
48
51
  const TrackStates = import_ds_system.css`
49
- ${({ theme, disabled, $applyAriaDisabled, $readOnly, rangeValues, multiple, minValue, maxValue }) => {
50
- if (disabled) return `background: ${theme.colors.neutral[400]};`;
51
- let trackColorSelected = theme.colors.brand[600];
52
- const trackColorUnselected = theme.colors.neutral[400];
53
- if ($applyAriaDisabled || $readOnly) trackColorSelected = theme.colors.neutral[700];
54
- const reactRangeColors = multiple ? [trackColorUnselected, trackColorSelected, trackColorUnselected] : [trackColorSelected, trackColorUnselected];
55
- if ($applyAriaDisabled || $readOnly) trackColorSelected = theme.colors.neutral[700];
52
+ ${({
53
+ theme,
54
+ disabled,
55
+ $applyAriaDisabled,
56
+ $readOnly,
57
+ $hasError,
58
+ $isAnyThumbHovered,
59
+ $isAnyThumbFocused,
60
+ rangeValues,
61
+ multiple,
62
+ minValue,
63
+ maxValue
64
+ }) => {
65
+ const { neutral, brand, danger } = theme.colors;
66
+ const pickColors = () => {
67
+ if (disabled) return { active: neutral[400], inactive: neutral[300] };
68
+ if ($applyAriaDisabled || $readOnly) return { active: neutral[500], inactive: neutral[300] };
69
+ if ($hasError) return { active: danger[SPEC_ERROR_ACTIVE], inactive: danger[SPEC_ERROR_INACTIVE] };
70
+ if ($isAnyThumbFocused) return { active: brand[800], inactive: neutral[400] };
71
+ if ($isAnyThumbHovered) return { active: brand[700], inactive: neutral[400] };
72
+ return { active: brand[600], inactive: neutral[400] };
73
+ };
74
+ const { active, inactive } = pickColors();
75
+ const reactRangeColors = multiple ? [inactive, active, inactive] : [active, inactive];
56
76
  return `background: ${(0, import_react_range.getTrackBackground)({
57
77
  values: rangeValues,
58
78
  colors: reactRangeColors,
@@ -77,7 +97,7 @@ const StyledDot = (0, import_ds_system.styled)("div", { name: import_constants.D
77
97
  display: block;
78
98
  position: relative;
79
99
  width: 2px;
80
- height: 2px;
100
+ height: 4px;
81
101
  }
82
102
  `;
83
103
  const StyledDotsContainer = (0, import_ds_system.styled)("div", { name: import_constants.DSSliderV2Name, slot: import_constants.SLIDER_V2_SLOTS.DOT_CONTAINER })`
@@ -93,7 +113,10 @@ const StyledDotsContainer = (0, import_ds_system.styled)("div", { name: import_c
93
113
  bottom: 0;
94
114
  z-index: ${(props) => props.theme.zIndex.tooltip - 1};
95
115
  `;
96
- const StyledTickMarkValue = (0, import_ds_system.styled)("div", { name: import_constants.DSSliderV2Name, slot: import_constants.SLIDER_V2_SLOTS.TICK_MARK_VALUE })`
116
+ const StyledTickMarkValue = (0, import_ds_system.styled)(import_ds_typography.DSTypography, {
117
+ name: import_constants.DSSliderV2Name,
118
+ slot: import_constants.SLIDER_V2_SLOTS.TICK_MARK_VALUE
119
+ })`
97
120
  display: flex;
98
121
  justify-content: center;
99
122
  text-align: center;
@@ -118,43 +141,47 @@ const StyledTickMarksContainer = (0, import_ds_system.styled)("div", {
118
141
  overflow-wrap: normal;
119
142
  `;
120
143
  const ThumbStates = import_ds_system.css`
121
- ${({ theme, disabled, $applyAriaDisabled, $readOnly }) => {
144
+ ${({ theme, disabled, $applyAriaDisabled, $readOnly, $hasError }) => {
145
+ const { neutral, brand, danger } = theme.colors;
146
+ const background = `background-color: ${neutral["000"]};`;
147
+ const focusRing = `:focus {
148
+ border: 2px solid ${brand[800]};
149
+ outline: unset;
150
+ }`;
122
151
  if (disabled)
123
152
  return `
124
- background-color: ${theme.colors.neutral[400]};
125
- `;
126
- const standardBgColorAndBorder = `
127
- background-color: ${theme.colors.neutral["000"]};
128
- border: 1px solid ${theme.colors.neutral[400]};
153
+ ${background}
154
+ border: 2px solid ${neutral[400]};
129
155
  `;
130
- const standardFocusRing = `:focus {
131
- border: 2px solid ${theme.colors.brand[700]};
132
- outline: unset;
133
- }`;
134
156
  if ($applyAriaDisabled || $readOnly)
135
157
  return `
136
- ${standardBgColorAndBorder}
137
- :hover{
138
- background-color: ${theme.colors.neutral["050"]};
139
- }
140
- ${standardFocusRing}`;
158
+ ${background}
159
+ border: 2px solid ${neutral[500]};
160
+ ${focusRing}`;
161
+ if ($hasError)
162
+ return `
163
+ ${background}
164
+ border: 2px solid ${danger[SPEC_ERROR_ACTIVE]};
165
+ ${focusRing}`;
141
166
  return `
142
- ${standardBgColorAndBorder}
143
- :hover{
144
- background-color: ${theme.colors.brand[200]};
167
+ ${background}
168
+ border: 2px solid ${brand[600]};
169
+ :hover {
170
+ border: 2px solid ${brand[700]};
145
171
  }
146
- :hover:not(:focus){
147
- border: 1px solid ${theme.colors.brand[600]};
148
- }
149
- ${standardFocusRing}`;
172
+ ${focusRing}`;
150
173
  }}
151
174
  `;
152
175
  const StyledThumb = (0, import_ds_system.styled)("div", { name: import_constants.DSSliderV2Name, slot: import_constants.SLIDER_V2_SLOTS.THUMB })`
153
176
  height: 20px;
154
- width: 20px;
155
- border-radius: 50%;
177
+ width: 12px;
178
+ border-radius: 2px;
156
179
  top: 0;
157
- z-index: ${(props) => props.theme.zIndex.tooltip};
180
+ z-index: ${(props) => props.theme.zIndex.tooltip + (props.$isRaised ? 1 : 0)};
181
+ &:focus {
182
+ z-index: ${(props) => props.theme.zIndex.tooltip + 1};
183
+ }
184
+ pointer-events: ${(props) => props.$isPinnedAtBoundary ? "none" : "auto"};
158
185
  ${ThumbStates}
159
186
  `;
160
187
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { css, styled } from '@elliemae/ds-system';\nimport { getTrackBackground } from 'react-range';\nimport { DSSliderV2Name, SLIDER_V2_SLOTS } from '../constants/index.js';\n\nexport const StyledWrapper = styled(Grid, { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.ROOT })``;\n\nexport const StyledRangeWrapper = styled(Grid, { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.RANGE_WRAPPER })``;\n\ninterface TrackProps {\n disabled: boolean;\n $applyAriaDisabled: boolean;\n $readOnly: boolean;\n multiple: boolean;\n minValue: number;\n maxValue: number;\n rangeValues: [number] | [number, number];\n}\n\nconst TrackStates = css<TrackProps>`\n ${({ theme, disabled, $applyAriaDisabled, $readOnly, rangeValues, multiple, minValue, maxValue }) => {\n if (disabled) return `background: ${theme.colors.neutral[400]};`;\n\n let trackColorSelected = theme.colors.brand[600];\n const trackColorUnselected = theme.colors.neutral[400];\n\n if ($applyAriaDisabled || $readOnly) trackColorSelected = theme.colors.neutral[700];\n\n const reactRangeColors = multiple\n ? [trackColorUnselected, trackColorSelected, trackColorUnselected]\n : [trackColorSelected, trackColorUnselected];\n\n if ($applyAriaDisabled || $readOnly) trackColorSelected = theme.colors.neutral[700];\n\n return `background: ${getTrackBackground({\n values: rangeValues,\n colors: reactRangeColors,\n min: minValue,\n max: maxValue,\n })};`;\n }}\n`;\n\nexport const StyledTrack = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.TRACK })<TrackProps>`\n position: relative;\n height: ${(props) => props.theme.space.xxxs};\n width: 100%;\n min-width: ${(props) => props.theme.space.xl};\n border-radius: ${(props) => props.theme.space.xxxs};\n ${TrackStates}\n`;\n\nexport const StyledDot = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.DOT })`\n &:after {\n content: '';\n background: ${(props) => props.theme.colors.neutral['000']};\n border-radius: ${(props) => props.theme.space.xxxs};\n display: block;\n position: relative;\n width: 2px;\n height: 2px;\n }\n`;\n\nexport const StyledDotsContainer = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.DOT_CONTAINER })`\n padding: 0 2px;\n align-items: center;\n display: flex;\n justify-content: space-between;\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ${(props) => props.theme.zIndex.tooltip - 1};\n`;\n\nexport const StyledTickMarkValue = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.TICK_MARK_VALUE })<{\n isSelected: boolean;\n}>`\n display: flex;\n justify-content: center;\n text-align: center;\n min-height: ${(props) => props.theme.space.xs};\n overflow: visible;\n color: ${(props) => (props.isSelected ? props.theme.colors.neutral[800] : props.theme.colors.neutral[500])};\n place-self: baseline;\n transform: translateX(-50%);\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n`;\n\nexport const StyledTickMarksContainer = styled('div', {\n name: DSSliderV2Name,\n slot: SLIDER_V2_SLOTS.TICK_MARK_CONTAINER,\n})<{ columnCount: number; columnWidth: string }>`\n display: grid;\n grid-template-columns: repeat(${(props) => props.columnCount}, calc(${(props) => props.columnWidth} - 4px));\n gap: 4px;\n justify-content: space-between;\n // this next property-value reverts the sanitize.css value\n overflow-wrap: normal;\n`;\n\ninterface ThumbProps {\n disabled: boolean;\n $applyAriaDisabled: boolean;\n $readOnly: boolean;\n}\nconst ThumbStates = css<ThumbProps>`\n ${({ theme, disabled, $applyAriaDisabled, $readOnly }) => {\n // ---------------------------------------------------------\n // THE CURSOR IS HANDLED BY THE LIBRARY VIA INLINE STYLES\n // ---------------------------------------------------------\n if (disabled)\n return `\n background-color: ${theme.colors.neutral[400]};\n `;\n\n const standardBgColorAndBorder = `\n background-color: ${theme.colors.neutral['000']};\n border: 1px solid ${theme.colors.neutral[400]};\n `;\n const standardFocusRing = `:focus {\n border: 2px solid ${theme.colors.brand[700]};\n outline: unset;\n }`;\n\n if ($applyAriaDisabled || $readOnly)\n return `\n ${standardBgColorAndBorder}\n :hover{\n background-color: ${theme.colors.neutral['050']};\n }\n ${standardFocusRing}`;\n\n return `\n ${standardBgColorAndBorder}\n :hover{\n background-color: ${theme.colors.brand[200]};\n }\n :hover:not(:focus){\n border: 1px solid ${theme.colors.brand[600]};\n }\n ${standardFocusRing}`;\n }}\n`;\n\nexport const StyledThumb = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.THUMB })<ThumbProps>`\n height: 20px;\n width: 20px;\n border-radius: 50%;\n top: 0;\n z-index: ${(props) => props.theme.zIndex.tooltip};\n ${ThumbStates}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAA4B;AAC5B,yBAAmC;AACnC,uBAAgD;AAEzC,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,KAAK,CAAC;AAEvF,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,cAAc,CAAC;AAY5G,MAAM,cAAc;AAAA,IAChB,CAAC,EAAE,OAAO,UAAU,oBAAoB,WAAW,aAAa,UAAU,UAAU,SAAS,MAAM;AACnG,MAAI,SAAU,QAAO,eAAe,MAAM,OAAO,QAAQ,GAAG,CAAC;AAE7D,MAAI,qBAAqB,MAAM,OAAO,MAAM,GAAG;AAC/C,QAAM,uBAAuB,MAAM,OAAO,QAAQ,GAAG;AAErD,MAAI,sBAAsB,UAAW,sBAAqB,MAAM,OAAO,QAAQ,GAAG;AAElF,QAAM,mBAAmB,WACrB,CAAC,sBAAsB,oBAAoB,oBAAoB,IAC/D,CAAC,oBAAoB,oBAAoB;AAE7C,MAAI,sBAAsB,UAAW,sBAAqB,MAAM,OAAO,QAAQ,GAAG;AAElF,SAAO,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;AAAA;AAAA,kCAEiC,CAAC,UAAU,MAAM,WAAW,UAAU,CAAC,UAAU,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAYpG,MAAM,cAAc;AAAA,IAChB,CAAC,EAAE,OAAO,UAAU,oBAAoB,UAAU,MAAM;AAIxD,MAAI;AACF,WAAO;AAAA,0BACa,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG/C,QAAM,2BAA2B;AAAA,0BACX,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,0BAC3B,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAE/C,QAAM,oBAAoB;AAAA,4BACF,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAI/C,MAAI,sBAAsB;AACxB,WAAO;AAAA,QACL,wBAAwB;AAAA;AAAA,4BAEJ,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,QAE/C,iBAAiB;AAErB,SAAO;AAAA,QACH,wBAAwB;AAAA;AAAA,4BAEJ,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,4BAGvB,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA,QAE3C,iBAAiB;AACvB,CAAC;AAAA;AAGI,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAKjF,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO;AAAA,IAC9C,WAAW;AAAA;",
4
+ "sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { css, styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { getTrackBackground } from 'react-range';\nimport { DSSliderV2Name, SLIDER_V2_SLOTS } from '../constants/index.js';\n\nexport const StyledWrapper = styled(Grid, { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.ROOT })``;\n\nexport const StyledRangeWrapper = styled(Grid, { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.RANGE_WRAPPER })``;\n\n// Spec v1.5.0 uses the token names `Error-900` / `Error-200`. There is no `error` palette in the\n// theme \u2014 the key is `danger`, and these are its matching steps. Always reference the token, never\n// the hex: `danger[900]` and `danger[950]` are one step apart and easy to confuse.\nconst SPEC_ERROR_ACTIVE = 900;\nconst SPEC_ERROR_INACTIVE = 200;\n\ninterface TrackProps {\n disabled: boolean;\n $applyAriaDisabled: boolean;\n $readOnly: boolean;\n $hasError: boolean;\n $isAnyThumbHovered: boolean;\n $isAnyThumbFocused: boolean;\n multiple: boolean;\n minValue: number;\n maxValue: number;\n rangeValues: [number] | [number, number];\n}\n\n/**\n * Spec v1.5.0 track colours, one branch per row of the state table.\n *\n * Precedence: disabled > aria-disabled / readOnly > error > focus > hover > idle. The first three\n * come from the standard Dim Sum interaction state hierarchy; focus over hover is because a handle\n * that is both focused and hovered reads as focused.\n *\n * `readOnly` shares the aria-disabled tokens. Spec v1.5.0 defines no read-only row, and the two\n * states are visually identical by design \u2014 see `.github/memories/project_interaction_states.md`.\n *\n * The blocked states keep their own track colours when focused: the spec's `Aria-Disabled + Focus`\n * row marks the track \"unchanged\" and moves only the handle border. Error follows the same shape by\n * analogy; the spec has no `Error + Focus` row.\n */\nconst TrackStates = css<TrackProps>`\n ${({\n theme,\n disabled,\n $applyAriaDisabled,\n $readOnly,\n $hasError,\n $isAnyThumbHovered,\n $isAnyThumbFocused,\n rangeValues,\n multiple,\n minValue,\n maxValue,\n }) => {\n const { neutral, brand, danger } = theme.colors;\n\n const pickColors = () => {\n if (disabled) return { active: neutral[400], inactive: neutral[300] };\n if ($applyAriaDisabled || $readOnly) return { active: neutral[500], inactive: neutral[300] };\n if ($hasError) return { active: danger[SPEC_ERROR_ACTIVE], inactive: danger[SPEC_ERROR_INACTIVE] };\n if ($isAnyThumbFocused) return { active: brand[800], inactive: neutral[400] };\n if ($isAnyThumbHovered) return { active: brand[700], inactive: neutral[400] };\n return { active: brand[600], inactive: neutral[400] };\n };\n const { active, inactive } = pickColors();\n\n // react-range paints the whole track as one gradient, so both segments are handed over together:\n // the range version has an inactive segment on each side of the selection.\n const reactRangeColors = multiple ? [inactive, active, inactive] : [active, inactive];\n\n return `background: ${getTrackBackground({\n values: rangeValues,\n colors: reactRangeColors,\n min: minValue,\n max: maxValue,\n })};`;\n }}\n`;\n\nexport const StyledTrack = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.TRACK })<TrackProps>`\n position: relative;\n height: ${(props) => props.theme.space.xxxs};\n width: 100%;\n min-width: ${(props) => props.theme.space.xl};\n border-radius: ${(props) => props.theme.space.xxxs};\n ${TrackStates}\n`;\n\nexport const StyledDot = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.DOT })`\n &:after {\n content: '';\n background: ${(props) => props.theme.colors.neutral['000']};\n border-radius: ${(props) => props.theme.space.xxxs};\n display: block;\n position: relative;\n width: 2px;\n height: 4px;\n }\n`;\n\nexport const StyledDotsContainer = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.DOT_CONTAINER })`\n padding: 0 2px;\n align-items: center;\n display: flex;\n justify-content: space-between;\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ${(props) => props.theme.zIndex.tooltip - 1};\n`;\n\n// Spec v1.5.0 asks the step value for `typography-variant: b2-Regular`. Naming a variant means the\n// design system's typography, not an ad-hoc font declaration \u2014 so the slot is the DSTypography\n// itself rather than a div wrapping one. Same shape as `StyledTitleTypography` in\n// ds-card-navigation, and it keeps the node count and the `data-testid` unchanged.\n//\n// This is also what makes the value respond to browser text resize: the variant's sizes are in rem\n// against the theme's root, so a 200% zoom scales them proportionally.\nexport const StyledTickMarkValue = styled(DSTypography, {\n name: DSSliderV2Name,\n slot: SLIDER_V2_SLOTS.TICK_MARK_VALUE,\n})<{\n isSelected: boolean;\n}>`\n display: flex;\n justify-content: center;\n text-align: center;\n min-height: ${(props) => props.theme.space.xs};\n overflow: visible;\n color: ${(props) => (props.isSelected ? props.theme.colors.neutral[800] : props.theme.colors.neutral[500])};\n place-self: baseline;\n transform: translateX(-50%);\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n`;\n\nexport const StyledTickMarksContainer = styled('div', {\n name: DSSliderV2Name,\n slot: SLIDER_V2_SLOTS.TICK_MARK_CONTAINER,\n})<{ columnCount: number; columnWidth: string }>`\n display: grid;\n grid-template-columns: repeat(${(props) => props.columnCount}, calc(${(props) => props.columnWidth} - 4px));\n gap: 4px;\n justify-content: space-between;\n // this next property-value reverts the sanitize.css value\n overflow-wrap: normal;\n`;\n\ninterface ThumbProps {\n disabled: boolean;\n $applyAriaDisabled: boolean;\n $readOnly: boolean;\n $hasError: boolean;\n $isRaised: boolean;\n $isPinnedAtBoundary: boolean;\n}\n\n/**\n * Spec v1.5.0 handle borders. Background is `N-000` in every state, so it is set once outside the\n * branches.\n *\n * Hover and focus stay as CSS pseudo-classes rather than reading the context flags, because the\n * border is per handle: in range mode hovering one handle must highlight that one only. The context\n * flags exist for the track, which is a single shared surface \u2014 see `useSliderV2.ts`.\n *\n * The cursor is not set here. react-range supplies grab/grabbing through inline styles, and the\n * not-allowed override for the blocked states is applied in `Thumb.tsx`, which is why the\n * `Disabled + Hover` and `Aria-Disabled + Hover` rows need no branch: they are cursor-only.\n */\nconst ThumbStates = css<ThumbProps>`\n ${({ theme, disabled, $applyAriaDisabled, $readOnly, $hasError }) => {\n const { neutral, brand, danger } = theme.colors;\n const background = `background-color: ${neutral['000']};`;\n // Focus survives a blocked state: `applyAriaDisabled` and `readOnly` keep focusability on\n // purpose, so the indicator has to remain visible.\n const focusRing = `:focus {\n border: 2px solid ${brand[800]};\n outline: unset;\n }`;\n\n // Native `disabled` cannot receive focus, which is why the spec marks `Disabled + Focus` N/A.\n if (disabled)\n return `\n ${background}\n border: 2px solid ${neutral[400]};\n `;\n\n if ($applyAriaDisabled || $readOnly)\n return `\n ${background}\n border: 2px solid ${neutral[500]};\n ${focusRing}`;\n\n if ($hasError)\n return `\n ${background}\n border: 2px solid ${danger[SPEC_ERROR_ACTIVE]};\n ${focusRing}`;\n\n return `\n ${background}\n border: 2px solid ${brand[600]};\n :hover {\n border: 2px solid ${brand[700]};\n }\n ${focusRing}`;\n }}\n`;\n\nexport const StyledThumb = styled('div', { name: DSSliderV2Name, slot: SLIDER_V2_SLOTS.THUMB })<ThumbProps>`\n height: 20px;\n width: 12px;\n border-radius: 2px;\n top: 0;\n z-index: ${(props) => props.theme.zIndex.tooltip + (props.$isRaised ? 1 : 0)};\n &:focus {\n z-index: ${(props) => props.theme.zIndex.tooltip + 1};\n }\n pointer-events: ${(props) => (props.$isPinnedAtBoundary ? 'none' : 'auto')};\n ${ThumbStates}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAA4B;AAC5B,2BAA6B;AAC7B,yBAAmC;AACnC,uBAAgD;AAEzC,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,KAAK,CAAC;AAEvF,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,cAAc,CAAC;AAK5G,MAAM,oBAAoB;AAC1B,MAAM,sBAAsB;AA6B5B,MAAM,cAAc;AAAA,IAChB,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,OAAO,OAAO,IAAI,MAAM;AAEzC,QAAM,aAAa,MAAM;AACvB,QAAI,SAAU,QAAO,EAAE,QAAQ,QAAQ,GAAG,GAAG,UAAU,QAAQ,G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BACQ,MAAM,GAAG,CAAC;AAAA;AAAA,4BAER,MAAM,GAAG,CAAC;AAAA;AAAA,QAE9B,SAAS;AACf,CAAC;AAAA;AAGI,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,iCAAgB,MAAM,iCAAgB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAKjF,CAAC,UAAU,MAAM,MAAM,OAAO,WAAW,MAAM,YAAY,IAAI,EAAE;AAAA;AAAA,eAE/D,CAAC,UAAU,MAAM,MAAM,OAAO,UAAU,CAAC;AAAA;AAAA,oBAEpC,CAAC,UAAW,MAAM,sBAAsB,SAAS,MAAO;AAAA,IACxE,WAAW;AAAA;",
6
6
  "names": []
7
7
  }
@@ -46,7 +46,8 @@ const defaultProps = {
46
46
  customTickMarksValues: [],
47
47
  multiple: false,
48
48
  applyAriaDisabled: false,
49
- readOnly: false
49
+ readOnly: false,
50
+ hasError: false
50
51
  };
51
52
  const DSSliderV2PropTypes = {
52
53
  ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSSliderV2Name, import_constants.SLIDER_V2_SLOTS),
@@ -70,6 +71,9 @@ const DSSliderV2PropTypes = {
70
71
  readOnly: import_ds_props_helpers.PropTypes.bool.description(
71
72
  "Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION."
72
73
  ).defaultValue(false),
74
+ hasError: import_ds_props_helpers.PropTypes.bool.description(
75
+ "Whether the slider has error. Yields to disabled, applyAriaDisabled and readOnly when combined with any of them."
76
+ ).defaultValue(false),
73
77
  minRange: import_ds_props_helpers.PropTypes.number.description(
74
78
  "In a multiple selection scenario, this defines the minimum range that must be maintained between the two values."
75
79
  ).defaultValue(0)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSSliderV2Name, SLIDER_V2_SLOTS } from './constants/index.js';\n\nexport declare namespace DSSliderV2T {\n /* **************************************************************************************************************\n * SLIDER V2 IS POLYMORPHIC *\n ****************************************************************************************************************\n * DEFINE COMMONS INTERFACES *\n ************************************************************************************************************** */\n export type CommonRequiredProps = {\n minValue: number;\n maxValue: number;\n };\n export type CommonDefaultProps = {\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n step: number;\n withTickMarks: boolean;\n withTickMarksValues: boolean;\n customTickMarksValues: string[];\n };\n export interface CommonOptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSSliderV2Name,\n typeof SLIDER_V2_SLOTS\n > {\n className?: string;\n }\n\n /* **************************************************************************************************************\n * DEFINE EACH POLYMORPH INTERFACE *\n ****************************************************************************************************************\n * make sure to expand the relevant commons interfaces!!! *\n ************************************************************************************************************** */\n\n /* **************************************************************************************************************\n * MULTIPLE(range version) *\n ************************************************************************************************************** */\n\n // MULTIPLE POLYMORPH TYPES\n export type RequiredPropsMultiple = CommonRequiredProps & {\n value: [number, number];\n };\n export type DefaultPropsMultiple = CommonDefaultProps & {\n multiple: true; // this must be ACTUALLY true, it's used as the distinguisher from typescript\n onValueChange: (newValue: [number, number]) => void;\n minRange: number; // for the \"multiple\" version, the minimum range is a default prop\n };\n export type OptionalPropsMultiple = CommonOptionalProps;\n /* **************************************************************************************************************\n * each polimorphism needs it's own \"Props\" and \"InternalProps\" defined!!! *\n ************************************************************************************************************** */\n export type PropsMultiple = Partial<DefaultPropsMultiple> &\n OptionalPropsMultiple &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsMultiple | keyof OptionalPropsMultiple | keyof XstyledProps | keyof RequiredPropsMultiple\n > &\n XstyledProps &\n RequiredPropsMultiple;\n export type InternalPropsMultiple = DefaultPropsMultiple &\n OptionalPropsMultiple &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsMultiple | keyof OptionalPropsMultiple | keyof XstyledProps | keyof RequiredPropsMultiple\n > &\n XstyledProps &\n RequiredPropsMultiple;\n\n /* **************************************************************************************************************\n * SINGLE(number picker version) *\n ************************************************************************************************************** */\n // SINGLE POLYMORPH TYPES\n export type RequiredPropsSingle = CommonRequiredProps & {\n value: number;\n };\n export type DefaultPropsSingle = CommonDefaultProps & {\n multiple: false; // this must be ACTUALLY false, it's used as the distinguisher from typescript\n onValueChange: (newValue: number) => void;\n };\n export type OptionalPropsSingle = CommonOptionalProps & {\n // for the \"single\" version, the minimum range is not applicable\n // keeping this minRange here helps typescript to discriminate if the component is being used in \"single\" or \"multiple\" mode\n // by setting it to \"never\", we ensure that if someone tries to use \"minRange\" with the single version, TypeScript will throw an error\n minRange?: never;\n };\n /* **************************************************************************************************************\n * each polimorphism needs it's own \"Props\" and \"InternalProps\" defined!!! *\n ************************************************************************************************************** */\n export type PropsSingle = Partial<DefaultPropsSingle> &\n OptionalPropsSingle &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsSingle | keyof OptionalPropsSingle | keyof XstyledProps | keyof RequiredPropsSingle\n > &\n XstyledProps &\n RequiredPropsSingle;\n export type InternalPropsSingle = DefaultPropsSingle &\n OptionalPropsSingle &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsSingle | keyof OptionalPropsSingle | keyof XstyledProps | keyof RequiredPropsSingle\n > &\n XstyledProps &\n RequiredPropsSingle;\n\n /* **************************************************************************************************************\n * WRAP UP THE POLYMORPHIC CONTRACT *\n ************************************************************************************************************** */\n export type DefaultProps = DefaultPropsMultiple | DefaultPropsSingle;\n export type RequiredProps = RequiredPropsMultiple | RequiredPropsSingle;\n export type OptionalProps = OptionalPropsMultiple | OptionalPropsSingle;\n export type Props = PropsMultiple | PropsSingle;\n export type InternalProps = InternalPropsMultiple | InternalPropsSingle;\n}\n\nexport const defaultProps: DSSliderV2T.DefaultProps = {\n disabled: false,\n step: 5,\n onValueChange: () => {},\n withTickMarks: false,\n withTickMarksValues: false,\n customTickMarksValues: [],\n multiple: false,\n applyAriaDisabled: false,\n readOnly: false,\n};\n\nexport const DSSliderV2PropTypes: DSPropTypesSchema<DSSliderV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSSliderV2Name, SLIDER_V2_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).description(\n 'The current value of the slider. Can be a single number or an array of two numbers for multiple sliders.',\n ).isRequired,\n onValueChange: PropTypes.func\n .description('change handler, if multiple is true it will receive an array of two numbers')\n .signature('(value: number) => void | (value: [number, number]) => void')\n .defaultValue(() => {}),\n disabled: PropTypes.bool.description('disable slider').defaultValue(false),\n minValue: PropTypes.number.description('min value for slider').defaultValue(0),\n maxValue: PropTypes.number.description('max value for slider').defaultValue(100),\n step: PropTypes.number.description('steps of values from min to max').defaultValue(5),\n withTickMarks: PropTypes.bool.description('add tick marks between steps').defaultValue(false),\n withTickMarksValues: PropTypes.bool.description('add step value to tickmark').defaultValue(false),\n customTickMarksValues: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n .description('Explicitly set tickmark values for custom tickmarks')\n .defaultValue([]),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n minRange: PropTypes.number\n .description(\n 'In a multiple selection scenario, this defines the minimum range that must be maintained between the two values.',\n )\n .defaultValue(0),\n};\n\nexport const DSSliderV2PropTypesSchema = DSSliderV2PropTypes as unknown as ValidationMap<DSSliderV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAAgD;AAmHzC,MAAM,eAAyC;AAAA,EACpD,UAAU;AAAA,EACV,MAAM;AAAA,EACN,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,uBAAuB,CAAC;AAAA,EACxB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AACZ;AAEO,MAAM,sBAA4D;AAAA,EACvE,OAAG,kDAAyB,iCAAgB,gCAAe;AAAA,EAC3D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,EAAE;AAAA,IAClF;AAAA,EACF,EAAE;AAAA,EACF,eAAe,kCAAU,KACtB,YAAY,6EAA6E,EACzF,UAAU,6DAA6D,EACvE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,UAAU,kCAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,KAAK;AAAA,EACzE,UAAU,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,CAAC;AAAA,EAC7E,UAAU,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,GAAG;AAAA,EAC/E,MAAM,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,CAAC;AAAA,EACpF,eAAe,kCAAU,KAAK,YAAY,8BAA8B,EAAE,aAAa,KAAK;AAAA,EAC5F,qBAAqB,kCAAU,KAAK,YAAY,4BAA4B,EAAE,aAAa,KAAK;AAAA,EAChG,uBAAuB,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,EAC/F,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,OACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC;AACnB;AAEO,MAAM,4BAA4B;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSSliderV2Name, SLIDER_V2_SLOTS } from './constants/index.js';\n\nexport declare namespace DSSliderV2T {\n /* **************************************************************************************************************\n * SLIDER V2 IS POLYMORPHIC *\n ****************************************************************************************************************\n * DEFINE COMMONS INTERFACES *\n ************************************************************************************************************** */\n export type CommonRequiredProps = {\n minValue: number;\n maxValue: number;\n };\n export type CommonDefaultProps = {\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n hasError: boolean;\n step: number;\n withTickMarks: boolean;\n withTickMarksValues: boolean;\n customTickMarksValues: string[];\n };\n export interface CommonOptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSSliderV2Name,\n typeof SLIDER_V2_SLOTS\n > {\n className?: string;\n }\n\n /* **************************************************************************************************************\n * DEFINE EACH POLYMORPH INTERFACE *\n ****************************************************************************************************************\n * make sure to expand the relevant commons interfaces!!! *\n ************************************************************************************************************** */\n\n /* **************************************************************************************************************\n * MULTIPLE(range version) *\n ************************************************************************************************************** */\n\n // MULTIPLE POLYMORPH TYPES\n export type RequiredPropsMultiple = CommonRequiredProps & {\n value: [number, number];\n };\n export type DefaultPropsMultiple = CommonDefaultProps & {\n multiple: true; // this must be ACTUALLY true, it's used as the distinguisher from typescript\n onValueChange: (newValue: [number, number]) => void;\n minRange: number; // for the \"multiple\" version, the minimum range is a default prop\n };\n export type OptionalPropsMultiple = CommonOptionalProps;\n /* **************************************************************************************************************\n * each polimorphism needs it's own \"Props\" and \"InternalProps\" defined!!! *\n ************************************************************************************************************** */\n export type PropsMultiple = Partial<DefaultPropsMultiple> &\n OptionalPropsMultiple &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsMultiple | keyof OptionalPropsMultiple | keyof XstyledProps | keyof RequiredPropsMultiple\n > &\n XstyledProps &\n RequiredPropsMultiple;\n export type InternalPropsMultiple = DefaultPropsMultiple &\n OptionalPropsMultiple &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsMultiple | keyof OptionalPropsMultiple | keyof XstyledProps | keyof RequiredPropsMultiple\n > &\n XstyledProps &\n RequiredPropsMultiple;\n\n /* **************************************************************************************************************\n * SINGLE(number picker version) *\n ************************************************************************************************************** */\n // SINGLE POLYMORPH TYPES\n export type RequiredPropsSingle = CommonRequiredProps & {\n value: number;\n };\n export type DefaultPropsSingle = CommonDefaultProps & {\n multiple: false; // this must be ACTUALLY false, it's used as the distinguisher from typescript\n onValueChange: (newValue: number) => void;\n };\n export type OptionalPropsSingle = CommonOptionalProps & {\n // for the \"single\" version, the minimum range is not applicable\n // keeping this minRange here helps typescript to discriminate if the component is being used in \"single\" or \"multiple\" mode\n // by setting it to \"never\", we ensure that if someone tries to use \"minRange\" with the single version, TypeScript will throw an error\n minRange?: never;\n };\n /* **************************************************************************************************************\n * each polimorphism needs it's own \"Props\" and \"InternalProps\" defined!!! *\n ************************************************************************************************************** */\n export type PropsSingle = Partial<DefaultPropsSingle> &\n OptionalPropsSingle &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsSingle | keyof OptionalPropsSingle | keyof XstyledProps | keyof RequiredPropsSingle\n > &\n XstyledProps &\n RequiredPropsSingle;\n export type InternalPropsSingle = DefaultPropsSingle &\n OptionalPropsSingle &\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultPropsSingle | keyof OptionalPropsSingle | keyof XstyledProps | keyof RequiredPropsSingle\n > &\n XstyledProps &\n RequiredPropsSingle;\n\n /* **************************************************************************************************************\n * WRAP UP THE POLYMORPHIC CONTRACT *\n ************************************************************************************************************** */\n export type DefaultProps = DefaultPropsMultiple | DefaultPropsSingle;\n export type RequiredProps = RequiredPropsMultiple | RequiredPropsSingle;\n export type OptionalProps = OptionalPropsMultiple | OptionalPropsSingle;\n export type Props = PropsMultiple | PropsSingle;\n export type InternalProps = InternalPropsMultiple | InternalPropsSingle;\n}\n\nexport const defaultProps: DSSliderV2T.DefaultProps = {\n disabled: false,\n step: 5,\n onValueChange: () => {},\n withTickMarks: false,\n withTickMarksValues: false,\n customTickMarksValues: [],\n multiple: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n};\n\nexport const DSSliderV2PropTypes: DSPropTypesSchema<DSSliderV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSSliderV2Name, SLIDER_V2_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).description(\n 'The current value of the slider. Can be a single number or an array of two numbers for multiple sliders.',\n ).isRequired,\n onValueChange: PropTypes.func\n .description('change handler, if multiple is true it will receive an array of two numbers')\n .signature('(value: number) => void | (value: [number, number]) => void')\n .defaultValue(() => {}),\n disabled: PropTypes.bool.description('disable slider').defaultValue(false),\n minValue: PropTypes.number.description('min value for slider').defaultValue(0),\n maxValue: PropTypes.number.description('max value for slider').defaultValue(100),\n step: PropTypes.number.description('steps of values from min to max').defaultValue(5),\n withTickMarks: PropTypes.bool.description('add tick marks between steps').defaultValue(false),\n withTickMarksValues: PropTypes.bool.description('add step value to tickmark').defaultValue(false),\n customTickMarksValues: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n .description('Explicitly set tickmark values for custom tickmarks')\n .defaultValue([]),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n hasError: PropTypes.bool\n .description(\n 'Whether the slider has error. Yields to disabled, applyAriaDisabled and readOnly when combined with any of them.',\n )\n .defaultValue(false),\n minRange: PropTypes.number\n .description(\n 'In a multiple selection scenario, this defines the minimum range that must be maintained between the two values.',\n )\n .defaultValue(0),\n};\n\nexport const DSSliderV2PropTypesSchema = DSSliderV2PropTypes as unknown as ValidationMap<DSSliderV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAAgD;AAoHzC,MAAM,eAAyC;AAAA,EACpD,UAAU;AAAA,EACV,MAAM;AAAA,EACN,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,uBAAuB,CAAC;AAAA,EACxB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,sBAA4D;AAAA,EACvE,OAAG,kDAAyB,iCAAgB,gCAAe;AAAA,EAC3D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,EAAE;AAAA,IAClF;AAAA,EACF,EAAE;AAAA,EACF,eAAe,kCAAU,KACtB,YAAY,6EAA6E,EACzF,UAAU,6DAA6D,EACvE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,UAAU,kCAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,KAAK;AAAA,EACzE,UAAU,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,CAAC;AAAA,EAC7E,UAAU,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,GAAG;AAAA,EAC/E,MAAM,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,CAAC;AAAA,EACpF,eAAe,kCAAU,KAAK,YAAY,8BAA8B,EAAE,aAAa,KAAK;AAAA,EAC5F,qBAAqB,kCAAU,KAAK,YAAY,4BAA4B,EAAE,aAAa,KAAK;AAAA,EAChG,uBAAuB,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,EAC/F,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,OACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC;AACnB;AAEO,MAAM,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -55,6 +55,7 @@ const testCompleteDefaults = {
55
55
  customTickMarksValues: [],
56
56
  applyAriaDisabled: false,
57
57
  readOnly: false,
58
+ hasError: false,
58
59
  minRange: 10
59
60
  };
60
61
  const testInternalProps = {