@ssa-ui-kit/core 3.2.0 → 3.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/DatePicker/types.d.ts +218 -5
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +51 -0
- package/dist/components/DateRangePicker/DateRangePickerFormBridge.d.ts +29 -5
- package/dist/components/DateRangePicker/constants.d.ts +8 -0
- package/dist/components/DateRangePicker/types.d.ts +235 -11
- package/dist/components/Dropdown/Dropdown.d.ts +10 -4
- package/dist/components/Dropdown/types.d.ts +38 -1
- package/dist/components/DropdownOptions/DropdownOptions.d.ts +5 -0
- package/dist/components/History/History.d.ts +31 -0
- package/dist/components/History/index.d.ts +2 -0
- package/dist/components/History/styles.d.ts +9 -0
- package/dist/components/History/types.d.ts +56 -0
- package/dist/components/Icon/icons/SettingClock.d.ts +3 -0
- package/dist/components/Icon/icons/all.d.ts +1 -0
- package/dist/components/Icon/icons/iconsList.d.ts +1 -1
- package/dist/components/Pagination/components/RowsPerPageDropdown/RowsPerPageDropdown.d.ts +1 -1
- package/dist/components/Pagination/components/RowsPerPageDropdown/types.d.ts +10 -0
- package/dist/components/Pagination/types.d.ts +5 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/index.js +398 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8009,6 +8009,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
8009
8009
|
FullscreenModeContext: () => (/* reexport */ FullscreenModeContext),
|
|
8010
8010
|
FullscreenModeProvider: () => (/* reexport */ FullscreenModeProvider),
|
|
8011
8011
|
GaugeChart: () => (/* reexport */ GaugeChart),
|
|
8012
|
+
History: () => (/* reexport */ History),
|
|
8012
8013
|
Icon: () => (/* reexport */ Icon_Icon),
|
|
8013
8014
|
IconButton: () => (/* reexport */ IconButton),
|
|
8014
8015
|
ImageItem: () => (/* reexport */ ImageItem),
|
|
@@ -9026,6 +9027,14 @@ __webpack_require__.d(Settings_namespaceObject, {
|
|
|
9026
9027
|
Settings: () => (Settings)
|
|
9027
9028
|
});
|
|
9028
9029
|
|
|
9030
|
+
// NAMESPACE OBJECT: ./src/components/Icon/icons/SettingClock.tsx
|
|
9031
|
+
var SettingClock_namespaceObject = {};
|
|
9032
|
+
__webpack_require__.r(SettingClock_namespaceObject);
|
|
9033
|
+
__webpack_require__.d(SettingClock_namespaceObject, {
|
|
9034
|
+
ICON_NAME: () => (SettingClock_ICON_NAME),
|
|
9035
|
+
SettingClock: () => (SettingClock)
|
|
9036
|
+
});
|
|
9037
|
+
|
|
9029
9038
|
// NAMESPACE OBJECT: ./src/components/Icon/icons/Signature.tsx
|
|
9030
9039
|
var Signature_namespaceObject = {};
|
|
9031
9040
|
__webpack_require__.r(Signature_namespaceObject);
|
|
@@ -9289,6 +9298,7 @@ __webpack_require__.d(all_namespaceObject, {
|
|
|
9289
9298
|
Roles: () => (Roles_namespaceObject),
|
|
9290
9299
|
Search: () => (Search_namespaceObject),
|
|
9291
9300
|
Seniority: () => (Seniority_namespaceObject),
|
|
9301
|
+
SettingClock: () => (SettingClock_namespaceObject),
|
|
9292
9302
|
Settings: () => (Settings_namespaceObject),
|
|
9293
9303
|
Signature: () => (Signature_namespaceObject),
|
|
9294
9304
|
Sleep: () => (Sleep_namespaceObject),
|
|
@@ -13222,6 +13232,30 @@ const Settings = ({
|
|
|
13222
13232
|
})]
|
|
13223
13233
|
});
|
|
13224
13234
|
const Settings_ICON_NAME = 'settings';
|
|
13235
|
+
;// ./src/components/Icon/icons/SettingClock.tsx
|
|
13236
|
+
|
|
13237
|
+
const SettingClock = ({
|
|
13238
|
+
fill = '#000',
|
|
13239
|
+
size = 24,
|
|
13240
|
+
tooltip = 'Setting clock',
|
|
13241
|
+
...props
|
|
13242
|
+
}) => (0,jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
13243
|
+
width: `${size}px`,
|
|
13244
|
+
height: `${size}px`,
|
|
13245
|
+
viewBox: "0 0 16 16",
|
|
13246
|
+
fill: "none",
|
|
13247
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13248
|
+
...props,
|
|
13249
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)("title", {
|
|
13250
|
+
children: tooltip
|
|
13251
|
+
}), (0,jsx_runtime_namespaceObject.jsx)("path", {
|
|
13252
|
+
fillRule: "evenodd",
|
|
13253
|
+
clipRule: "evenodd",
|
|
13254
|
+
d: "M8.54277 0.0507812C9.14723 0.0507812 9.67856 0.437658 9.86211 1.01074L10.1336 1.85547C10.2657 2.26753 10.5743 2.58935 10.9461 2.79785C11.002 2.82923 11.0573 2.86237 11.1121 2.89551C11.4771 3.11622 11.9109 3.22652 12.3377 3.13965L13.2146 2.95996C13.8086 2.83888 14.4078 3.11082 14.7029 3.63379L15.1443 4.41602C15.4393 4.93909 15.3641 5.59721 14.9568 6.0498L14.3562 6.71875C14.0646 7.04303 13.9352 7.4734 13.9363 7.90137C13.9365 7.96627 13.9362 8.03177 13.9344 8.09668C13.9221 8.52458 14.0394 8.95659 14.323 9.28125L14.907 9.94922C15.3015 10.4011 15.3598 11.0593 15.0506 11.583L14.5887 12.3652C14.2792 12.8889 13.6713 13.1602 13.0809 13.0391L12.2098 12.8604C11.7848 12.7732 11.348 12.8837 10.9773 13.1045C10.9217 13.1376 10.8651 13.1698 10.8084 13.2012C10.4316 13.4095 10.1151 13.731 9.97246 14.1426L9.67949 14.9883C9.48055 15.5619 8.93823 15.9492 8.33379 15.9492H7.43046C6.82619 15.9492 6.29478 15.5621 6.11113 14.9893L5.84062 14.1436C5.70855 13.7315 5.39986 13.4097 5.02812 13.2012C4.9721 13.1697 4.91598 13.1377 4.86113 13.1045C4.49604 12.8837 4.06248 12.7733 3.63554 12.8604L2.75859 13.0391C2.16492 13.16 1.56545 12.8888 1.27031 12.3662L0.828902 11.584C0.533796 11.061 0.609386 10.4029 1.0164 9.9502L1.61796 9.28125C1.90953 8.95715 2.03793 8.5264 2.03691 8.09863C2.03673 8.03363 2.03699 7.96735 2.03886 7.90234C2.05116 7.47453 1.93469 7.0434 1.65117 6.71875L1.06718 6.05078C0.672554 5.59912 0.613806 4.94077 0.922652 4.41699L1.38457 3.63477C1.69397 3.11079 2.30181 2.8388 2.89238 2.95996L3.76347 3.13965C4.1883 3.22681 4.62536 3.11609 4.99589 2.89551C5.05147 2.8624 5.10814 2.83018 5.16484 2.79883C5.54154 2.59061 5.85793 2.26874 6.00078 1.85742L6.29375 1.01172C6.49251 0.438004 7.035 0.0510025 7.63945 0.0507812H8.54277ZM7.62578 1.04102C7.44804 1.04107 7.28875 1.15501 7.23027 1.32324L6.9373 2.16895C6.69519 2.86734 6.17663 3.36445 5.63457 3.66406C5.58737 3.69016 5.54022 3.71755 5.49394 3.74512C4.96063 4.06261 4.27136 4.25792 3.55156 4.11035L2.67949 3.93066C2.5055 3.89506 2.32687 3.97527 2.23613 4.12891L1.77421 4.91113C1.6837 5.06485 1.70061 5.25911 1.81718 5.39258L2.40117 6.06152C2.8808 6.61075 3.04789 7.3002 3.03007 7.91699C3.0285 7.97145 3.02797 8.0266 3.02812 8.08105C3.02972 8.69786 2.84504 9.38882 2.35039 9.93848L1.74882 10.6064C1.62957 10.7392 1.607 10.9335 1.69414 11.0879L2.13554 11.8701C2.22288 12.0242 2.39965 12.1038 2.57402 12.0684L3.45097 11.8896C4.17503 11.742 4.85889 11.9374 5.38359 12.2549C5.42928 12.2825 5.47561 12.3098 5.52226 12.3359C6.05612 12.6354 6.56133 13.1312 6.78496 13.8291L7.05546 14.6748C7.10979 14.8438 7.26716 14.958 7.44511 14.958H8.34746C8.52523 14.958 8.68445 14.844 8.74296 14.6758L9.03593 13.8311C9.27793 13.1326 9.7966 12.6356 10.3387 12.3359C10.3859 12.3098 10.4329 12.2825 10.4793 12.2549C11.0128 11.9371 11.7025 11.7419 12.4227 11.8896L13.2937 12.0684C13.4675 12.104 13.6462 12.0243 13.7371 11.8711L14.199 11.0889C14.2898 10.9352 14.2725 10.741 14.1561 10.6074L13.5721 9.93848C13.0925 9.38943 12.9255 8.69969 12.9432 8.08301C12.9447 8.02845 12.9462 7.97254 12.9461 7.91797C12.9445 7.30127 13.1294 6.61115 13.6238 6.06152L14.2244 5.39355C14.3438 5.26089 14.367 5.06657 14.2801 4.91211L13.8387 4.12988C13.7514 3.97528 13.5739 3.89506 13.3992 3.93066L12.5232 4.11035C11.7992 4.25805 11.1144 4.06255 10.5896 3.74512C10.544 3.7175 10.4976 3.69021 10.451 3.66406C9.91715 3.3646 9.4129 2.86779 9.18925 2.16992L8.91777 1.3252C8.86358 1.156 8.70713 1.04114 8.5291 1.04102H7.62578ZM7.93339 3.75098C8.26891 3.75118 8.51636 4.03464 8.5164 4.35352V7.89062L10.5613 9.12695C10.8405 9.29597 10.9275 9.66069 10.7762 9.94141C10.6205 10.2294 10.2598 10.3423 9.97148 10.168L7.63847 8.75586C7.45612 8.64553 7.34972 8.44547 7.34941 8.23633V4.35352C7.34945 4.03456 7.59776 3.75104 7.93339 3.75098Z",
|
|
13255
|
+
fill: fill
|
|
13256
|
+
})]
|
|
13257
|
+
});
|
|
13258
|
+
const SettingClock_ICON_NAME = 'setting-clock';
|
|
13225
13259
|
;// ./src/components/Icon/icons/Signature.tsx
|
|
13226
13260
|
|
|
13227
13261
|
const Signature = ({
|
|
@@ -14038,6 +14072,8 @@ const Warning_ICON_NAME = 'warning';
|
|
|
14038
14072
|
|
|
14039
14073
|
|
|
14040
14074
|
|
|
14075
|
+
|
|
14076
|
+
|
|
14041
14077
|
|
|
14042
14078
|
|
|
14043
14079
|
|
|
@@ -14912,12 +14948,12 @@ const inputStatus = true ? {
|
|
|
14912
14948
|
styles: "position:absolute;top:34%;right:14px;display:flex;justify-content:center;align-items:center;border-radius:10px;width:14px;height:14px"
|
|
14913
14949
|
} : 0;
|
|
14914
14950
|
const styles_startElement = true ? {
|
|
14915
|
-
name: "
|
|
14916
|
-
styles: "position:absolute;top:0;left:14px;height:100%;width:auto;display:flex;justify-content:center;align-items:center;border-radius:10px"
|
|
14951
|
+
name: "17ilj1r",
|
|
14952
|
+
styles: "position:absolute;top:0;left:14px;height:100%;width:auto;display:flex;justify-content:center;align-items:center;border-radius:10px;button{padding:0;}"
|
|
14917
14953
|
} : 0;
|
|
14918
14954
|
const styles_endElement = true ? {
|
|
14919
|
-
name: "
|
|
14920
|
-
styles: "position:absolute;top:0;right:14px;height:100%;width:auto;display:flex;justify-content:center;align-items:center;border-radius:10px"
|
|
14955
|
+
name: "9awk5g",
|
|
14956
|
+
styles: "position:absolute;top:0;right:14px;height:100%;width:auto;display:flex;justify-content:center;align-items:center;border-radius:10px;button{padding:0;}"
|
|
14921
14957
|
} : 0;
|
|
14922
14958
|
;// ./src/components/Input/InputStatusError.tsx
|
|
14923
14959
|
|
|
@@ -16997,7 +17033,9 @@ const DropdownContext = /*#__PURE__*/external_react_namespaceObject.createContex
|
|
|
16997
17033
|
onChange: () => {
|
|
16998
17034
|
/* noop */
|
|
16999
17035
|
},
|
|
17000
|
-
maxHeight: 200
|
|
17036
|
+
maxHeight: 200,
|
|
17037
|
+
listRef: undefined,
|
|
17038
|
+
placement: 'bottom'
|
|
17001
17039
|
});
|
|
17002
17040
|
function useDropdownContext() {
|
|
17003
17041
|
return external_react_namespaceObject.useContext(DropdownContext);
|
|
@@ -17038,7 +17076,9 @@ function DropdownOptions_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
|
|
|
17038
17076
|
|
|
17039
17077
|
const DropdownOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
|
|
17040
17078
|
target: "e1qg2z4z0"
|
|
17041
|
-
} : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;
|
|
17079
|
+
} : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;padding:0;", ({
|
|
17080
|
+
placement = 'bottom'
|
|
17081
|
+
}) => placement === 'top' ? 'bottom: 100%; top: auto; margin: 0 0 4px;' : 'top: 100%; bottom: auto; margin: 4px 0 0;', " background:", ({
|
|
17042
17082
|
theme
|
|
17043
17083
|
}) => theme.colors.white, ";border-radius:8px;max-height:", ({
|
|
17044
17084
|
maxHeight = 200
|
|
@@ -17066,6 +17106,11 @@ const noItemsMsg = {
|
|
|
17066
17106
|
* Renders the scrollable list of options that appears when the dropdown is open.
|
|
17067
17107
|
* Provides proper ARIA attributes for accessibility and keyboard navigation.
|
|
17068
17108
|
*
|
|
17109
|
+
* Placement (opening upward or downward) is driven entirely by the parent
|
|
17110
|
+
* Dropdown via context — this component does not calculate position itself.
|
|
17111
|
+
* A ref is attached to the list element so Dropdown can measure its actual
|
|
17112
|
+
* rendered height when determining the correct placement on each open.
|
|
17113
|
+
*
|
|
17069
17114
|
* @category Form Controls
|
|
17070
17115
|
* @subcategory Selection
|
|
17071
17116
|
*
|
|
@@ -17099,7 +17144,9 @@ const DropdownOptions = ({
|
|
|
17099
17144
|
const {
|
|
17100
17145
|
onChange,
|
|
17101
17146
|
activeItem,
|
|
17102
|
-
maxHeight
|
|
17147
|
+
maxHeight,
|
|
17148
|
+
listRef,
|
|
17149
|
+
placement
|
|
17103
17150
|
} = useDropdownContext();
|
|
17104
17151
|
const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
|
|
17105
17152
|
|
|
@@ -17133,11 +17180,13 @@ const DropdownOptions = ({
|
|
|
17133
17180
|
}, noItemsMsg.id));
|
|
17134
17181
|
}
|
|
17135
17182
|
return (0,jsx_runtime_namespaceObject.jsx)(DropdownOptionsBase, {
|
|
17183
|
+
ref: listRef,
|
|
17136
17184
|
role: "listbox",
|
|
17137
17185
|
tabindex: "-1",
|
|
17138
17186
|
id: id,
|
|
17139
17187
|
"aria-labelledby": ariaLabelledby,
|
|
17140
17188
|
maxHeight: maxHeight,
|
|
17189
|
+
placement: placement,
|
|
17141
17190
|
children: options
|
|
17142
17191
|
});
|
|
17143
17192
|
};
|
|
@@ -17187,6 +17236,64 @@ const Avatar = /*#__PURE__*/base_default()("div", true ? {
|
|
|
17187
17236
|
image
|
|
17188
17237
|
}) => `url(${image})`, " center/contain no-repeat;" + ( true ? "" : 0));
|
|
17189
17238
|
/* harmony default export */ const Avatar_Avatar = (Avatar);
|
|
17239
|
+
;// ./src/components/Dropdown/types.ts
|
|
17240
|
+
let DropdownPositions = /*#__PURE__*/function (DropdownPositions) {
|
|
17241
|
+
DropdownPositions["top"] = "top";
|
|
17242
|
+
DropdownPositions["bottom"] = "bottom";
|
|
17243
|
+
DropdownPositions["auto"] = "auto";
|
|
17244
|
+
return DropdownPositions;
|
|
17245
|
+
}({});
|
|
17246
|
+
|
|
17247
|
+
/**
|
|
17248
|
+
* Props that are controlled by Dropdown component
|
|
17249
|
+
* These props cannot be passed via dropdownProps.toggleButton
|
|
17250
|
+
*/
|
|
17251
|
+
|
|
17252
|
+
/**
|
|
17253
|
+
* Props for the Dropdown component
|
|
17254
|
+
*
|
|
17255
|
+
* A select-like dropdown component that allows users to choose one option from
|
|
17256
|
+
* a list. Uses compound component pattern with DropdownOption children.
|
|
17257
|
+
* Provides keyboard navigation, accessibility, customizable styling, and
|
|
17258
|
+
* automatic viewport-aware placement of the options list.
|
|
17259
|
+
*
|
|
17260
|
+
* @example
|
|
17261
|
+
* ```tsx
|
|
17262
|
+
* const items = [
|
|
17263
|
+
* { id: 1, value: 'Option 1' },
|
|
17264
|
+
* { id: 2, value: 'Option 2' },
|
|
17265
|
+
* ];
|
|
17266
|
+
*
|
|
17267
|
+
* <Dropdown
|
|
17268
|
+
* selectedItem={items[0]}
|
|
17269
|
+
* onChange={(item) => console.log(item)}
|
|
17270
|
+
* placeholder="Select an option"
|
|
17271
|
+
* >
|
|
17272
|
+
* {items.map(item => (
|
|
17273
|
+
* <DropdownOption key={item.id} value={item.id}>
|
|
17274
|
+
* {item.value}
|
|
17275
|
+
* </DropdownOption>
|
|
17276
|
+
* ))}
|
|
17277
|
+
* </Dropdown>
|
|
17278
|
+
* ```
|
|
17279
|
+
*
|
|
17280
|
+
* @example
|
|
17281
|
+
* ```tsx
|
|
17282
|
+
* // Force the list to always open upward (e.g. component near the bottom of the page)
|
|
17283
|
+
* <Dropdown
|
|
17284
|
+
* selectedItem={selected}
|
|
17285
|
+
* onChange={handleChange}
|
|
17286
|
+
* dropdownProps={{ dropdownPosition: DropdownPositions.top }}
|
|
17287
|
+
* >
|
|
17288
|
+
* ...
|
|
17289
|
+
* </Dropdown>
|
|
17290
|
+
* ```
|
|
17291
|
+
*/
|
|
17292
|
+
|
|
17293
|
+
/**
|
|
17294
|
+
* Dropdown context value
|
|
17295
|
+
* Provides selection state and change handler to child DropdownOption components
|
|
17296
|
+
*/
|
|
17190
17297
|
;// ./src/components/Dropdown/Dropdown.tsx
|
|
17191
17298
|
|
|
17192
17299
|
function Dropdown_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
@@ -17199,6 +17306,7 @@ function Dropdown_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to s
|
|
|
17199
17306
|
|
|
17200
17307
|
|
|
17201
17308
|
|
|
17309
|
+
|
|
17202
17310
|
const DropdownBase = /*#__PURE__*/base_default()("div", true ? {
|
|
17203
17311
|
target: "eizhqtp1"
|
|
17204
17312
|
} : 0)( true ? {
|
|
@@ -17217,8 +17325,13 @@ const SelectedContent = /*#__PURE__*/base_default()("span", true ? {
|
|
|
17217
17325
|
*
|
|
17218
17326
|
* A flexible dropdown component that allows users to select one option from
|
|
17219
17327
|
* a list of choices. Uses a compound component pattern with DropdownOption
|
|
17220
|
-
* children. Provides keyboard navigation, accessibility features,
|
|
17221
|
-
* to close functionality.
|
|
17328
|
+
* children. Provides keyboard navigation, accessibility features, click-outside
|
|
17329
|
+
* to close functionality, and automatic viewport-aware placement of the options list.
|
|
17330
|
+
*
|
|
17331
|
+
* On every open the component measures available space below the toggle button
|
|
17332
|
+
* and flips the list upward when there is not enough room, preventing the list
|
|
17333
|
+
* from being clipped by the viewport edge. This behavior can be overridden via
|
|
17334
|
+
* dropdownProps.dropdownPosition.
|
|
17222
17335
|
*
|
|
17223
17336
|
* Component structure:
|
|
17224
17337
|
* - Dropdown (root container with context)
|
|
@@ -17269,14 +17382,15 @@ const SelectedContent = /*#__PURE__*/base_default()("span", true ? {
|
|
|
17269
17382
|
*
|
|
17270
17383
|
* @example
|
|
17271
17384
|
* ```tsx
|
|
17272
|
-
* // With custom props for sub-components
|
|
17385
|
+
* // With custom props for sub-components and forced upward placement
|
|
17273
17386
|
* <Dropdown
|
|
17274
17387
|
* selectedItem={selected}
|
|
17275
17388
|
* onChange={handleChange}
|
|
17276
17389
|
* dropdownProps={{
|
|
17277
17390
|
* base: { id: 'my-dropdown' },
|
|
17278
17391
|
* toggleButton: { 'data-testid': 'dropdown-toggle' },
|
|
17279
|
-
* toggleButtonArrow: { className: 'custom-arrow' }
|
|
17392
|
+
* toggleButtonArrow: { className: 'custom-arrow' },
|
|
17393
|
+
* dropdownPosition: DropdownPositions.top,
|
|
17280
17394
|
* }}
|
|
17281
17395
|
* >
|
|
17282
17396
|
* {options.map(opt => (
|
|
@@ -17311,14 +17425,19 @@ const Dropdown = ({
|
|
|
17311
17425
|
maxHeight = 200,
|
|
17312
17426
|
dropdownProps: componentProps
|
|
17313
17427
|
}) => {
|
|
17428
|
+
const {
|
|
17429
|
+
dropdownPosition = DropdownPositions.auto
|
|
17430
|
+
} = componentProps ?? {};
|
|
17314
17431
|
const theme = (0,react_namespaceObject.useTheme)();
|
|
17315
17432
|
const dropdownRef = (0,external_react_namespaceObject.useRef)(null);
|
|
17433
|
+
const listRef = (0,external_react_namespaceObject.useRef)(null);
|
|
17316
17434
|
const dropdownId = (0,external_react_namespaceObject.useId)();
|
|
17317
17435
|
const options = [];
|
|
17318
17436
|
const [isFocused, setIsFocused] = (0,external_react_namespaceObject.useState)(false);
|
|
17319
17437
|
const [isOpen, setIsOpen] = (0,external_react_namespaceObject.useState)(isInitOpen || false);
|
|
17320
17438
|
const [colors, setColors] = (0,external_react_namespaceObject.useState)([]);
|
|
17321
17439
|
const [activeItem, setActiveItem] = (0,external_react_namespaceObject.useState)(selectedItem);
|
|
17440
|
+
const [placement, setPlacement] = (0,external_react_namespaceObject.useState)('bottom');
|
|
17322
17441
|
const onChange = item => {
|
|
17323
17442
|
const innerItem = options.filter(option => option.value === item)[0];
|
|
17324
17443
|
setIsOpen(false);
|
|
@@ -17351,6 +17470,17 @@ const Dropdown = ({
|
|
|
17351
17470
|
setIsOpen(false);
|
|
17352
17471
|
}
|
|
17353
17472
|
}, [isDisabled]);
|
|
17473
|
+
(0,external_react_namespaceObject.useLayoutEffect)(() => {
|
|
17474
|
+
if (!isOpen || !dropdownRef.current) return;
|
|
17475
|
+
if (dropdownPosition !== DropdownPositions.auto) {
|
|
17476
|
+
setPlacement(dropdownPosition);
|
|
17477
|
+
return;
|
|
17478
|
+
}
|
|
17479
|
+
const rect = dropdownRef.current.getBoundingClientRect();
|
|
17480
|
+
const listHeight = listRef.current?.offsetHeight || maxHeight;
|
|
17481
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
17482
|
+
setPlacement(spaceBelow < listHeight ? 'top' : 'bottom');
|
|
17483
|
+
}, [isOpen]);
|
|
17354
17484
|
const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
|
|
17355
17485
|
|
|
17356
17486
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -17365,8 +17495,10 @@ const Dropdown = ({
|
|
|
17365
17495
|
const contextValue = external_react_default().useMemo(() => ({
|
|
17366
17496
|
onChange,
|
|
17367
17497
|
activeItem,
|
|
17368
|
-
maxHeight
|
|
17369
|
-
|
|
17498
|
+
maxHeight,
|
|
17499
|
+
listRef,
|
|
17500
|
+
placement
|
|
17501
|
+
}), [onChange, activeItem, maxHeight, placement]);
|
|
17370
17502
|
const value = activeItem ? activeItem.label || activeItem.children || activeItem.value || activeItem || placeholder : placeholder;
|
|
17371
17503
|
const rawAvatar = activeItem && activeItem.avatar;
|
|
17372
17504
|
const selectedAvatar = rawAvatar != null ? typeof rawAvatar === 'string' ? (0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
|
|
@@ -20824,6 +20956,64 @@ const DatePickerContent = () => {
|
|
|
20824
20956
|
|
|
20825
20957
|
|
|
20826
20958
|
|
|
20959
|
+
/**
|
|
20960
|
+
* DatePicker — masked date input with a popover calendar. Use inside **`FormProvider`**
|
|
20961
|
+
* (react-hook-form): the field value is the formatted string; **`onChange`** receives a
|
|
20962
|
+
* JavaScript **`Date`** (or undefined when cleared). Supports **day**, **month**, or **year**
|
|
20963
|
+
* granularity via **`pickerType`**, **`mm/dd/yyyy`** / **`dd/mm/yyyy`** / **`mm/yyyy`** / **`yyyy`**
|
|
20964
|
+
* formats, optional **min/max** bounds, and **openCalendarMode** (icon, input, or both).
|
|
20965
|
+
*
|
|
20966
|
+
* ### Behavior notes
|
|
20967
|
+
* - Parsing and display use **Luxon**; the form stores the string matching **`format`**.
|
|
20968
|
+
* - Validation runs when the mask is complete or on **blur**; errors surface through
|
|
20969
|
+
* react-hook-form and **`onError`**.
|
|
20970
|
+
* - **`highlightDates`** helps range UIs by styling days between two dates.
|
|
20971
|
+
*
|
|
20972
|
+
* @category Components
|
|
20973
|
+
* @subcategory Form Controls
|
|
20974
|
+
*
|
|
20975
|
+
* @example
|
|
20976
|
+
* ```tsx
|
|
20977
|
+
* import { FormProvider, useForm } from 'react-hook-form';
|
|
20978
|
+
* import { DatePicker } from '@ssa-ui-kit/core';
|
|
20979
|
+
*
|
|
20980
|
+
* function Example() {
|
|
20981
|
+
* const methods = useForm({ defaultValues: { startDate: '' } });
|
|
20982
|
+
* return (
|
|
20983
|
+
* <FormProvider {...methods}>
|
|
20984
|
+
* <DatePicker
|
|
20985
|
+
* name="startDate"
|
|
20986
|
+
* label="Start date"
|
|
20987
|
+
* format="mm/dd/yyyy"
|
|
20988
|
+
* onChange={(date) => console.log(date)}
|
|
20989
|
+
* />
|
|
20990
|
+
* </FormProvider>
|
|
20991
|
+
* );
|
|
20992
|
+
* }
|
|
20993
|
+
* ```
|
|
20994
|
+
*
|
|
20995
|
+
* @example
|
|
20996
|
+
* ```tsx
|
|
20997
|
+
* // Month picker (mm/yyyy) with bounds
|
|
20998
|
+
* <DatePicker
|
|
20999
|
+
* name="period"
|
|
21000
|
+
* label="Period"
|
|
21001
|
+
* pickerType="months"
|
|
21002
|
+
* dateMin="01/2020"
|
|
21003
|
+
* dateMax="12/2030"
|
|
21004
|
+
* onChange={(d) => {}}
|
|
21005
|
+
* />
|
|
21006
|
+
* ```
|
|
21007
|
+
*
|
|
21008
|
+
* @see {@link Input} — Underlying text field
|
|
21009
|
+
* @see {@link Popover} — Calendar overlay
|
|
21010
|
+
*
|
|
21011
|
+
* @accessibility
|
|
21012
|
+
* - Label is associated with the input via **`htmlFor`** / **`id`**
|
|
21013
|
+
* - Calendar days use **`aria-disabled`** and **`aria-label`** where applicable
|
|
21014
|
+
* - Icon trigger exposes **`aria-label="Calendar"`**
|
|
21015
|
+
*/
|
|
21016
|
+
|
|
20827
21017
|
const DatePickerInner = ({
|
|
20828
21018
|
format,
|
|
20829
21019
|
openCalendarMode = 'icon',
|
|
@@ -20842,9 +21032,18 @@ const DatePicker = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(Da
|
|
|
20842
21032
|
|
|
20843
21033
|
|
|
20844
21034
|
;// ./src/components/DateRangePicker/constants.ts
|
|
21035
|
+
/**
|
|
21036
|
+
* Default formats, masks, bounds, and validation messages for **DateRangePicker**
|
|
21037
|
+
* (aligned with **DatePicker** constants for shared behavior).
|
|
21038
|
+
*/
|
|
21039
|
+
|
|
21040
|
+
/** Default US day format (`mm/dd/yyyy`). Re-exported from the package barrel. */
|
|
20845
21041
|
const constants_DEFAULT_MASK_FORMAT = 'mm/dd/yyyy';
|
|
21042
|
+
/** Default European day format (`dd/mm/yyyy`). Re-exported from the package barrel. */
|
|
20846
21043
|
const DEFAULT_EUROPEAN_MASK_FORMAT = 'dd/mm/yyyy';
|
|
21044
|
+
/** Default month format (`mm/yyyy`). Re-exported from the package barrel. */
|
|
20847
21045
|
const constants_DEFAULT_MONTH_MASK_FORMAT = 'mm/yyyy';
|
|
21046
|
+
/** Default year-only format (`yyyy`). Re-exported from the package barrel. */
|
|
20848
21047
|
const constants_DEFAULT_YEAR_MASK_FORMAT = 'yyyy';
|
|
20849
21048
|
const constants_DEFAULT_MASK = '__/__/____';
|
|
20850
21049
|
const constants_DEFAULT_MONTH_MASK = '__/____';
|
|
@@ -21890,12 +22089,16 @@ const Header = () => {
|
|
|
21890
22089
|
const PRESENT_VALUE = 'Present';
|
|
21891
22090
|
|
|
21892
22091
|
/**
|
|
21893
|
-
*
|
|
22092
|
+
* Form-side shape: **start** / **end** strings in **`outputFormat`**; **end** may be **`PRESENT_VALUE`**
|
|
22093
|
+
* when the user chose **Present** (maps to **`null`** inside **DateRangePicker**).
|
|
22094
|
+
*/
|
|
22095
|
+
|
|
22096
|
+
/**
|
|
22097
|
+
* Props for **DateRangePickerFormBridge** — adapter between string-based forms and **DateRangePicker**.
|
|
21894
22098
|
*
|
|
21895
|
-
*
|
|
21896
|
-
* -
|
|
21897
|
-
* -
|
|
21898
|
-
* - Used by DateRangeField (RJSF); can be used by other form builders
|
|
22099
|
+
* - Keeps **DateRangePicker** on **inputFormat** and **`null`** for Present
|
|
22100
|
+
* - Converts **outputFormat** storage ↔ display **inputFormat**
|
|
22101
|
+
* - Used by **DateRangeField** (RJSF) and similar builders
|
|
21899
22102
|
*/
|
|
21900
22103
|
|
|
21901
22104
|
/**
|
|
@@ -21942,6 +22145,26 @@ function formValueToPickerDefault(source, outputFormat, inputFormat) {
|
|
|
21942
22145
|
}
|
|
21943
22146
|
return undefined;
|
|
21944
22147
|
}
|
|
22148
|
+
|
|
22149
|
+
/**
|
|
22150
|
+
* Wraps **DateRangePicker** with an internal **FormProvider** and converts between
|
|
22151
|
+
* **`outputFormat`** (form storage) and **`inputFormat`** (picker display). Maps **`null`** ↔
|
|
22152
|
+
* **`PRESENT_VALUE`** for the end date only.
|
|
22153
|
+
*
|
|
22154
|
+
* @category Components
|
|
22155
|
+
* @subcategory Form Controls
|
|
22156
|
+
*
|
|
22157
|
+
* @example
|
|
22158
|
+
* ```tsx
|
|
22159
|
+
* <DateRangePickerFormBridge
|
|
22160
|
+
* name="contract"
|
|
22161
|
+
* outputFormat="yyyy-MM-dd"
|
|
22162
|
+
* inputFormat="mm/dd/yyyy"
|
|
22163
|
+
* value={{ start: '2024-01-01', end: 'Present' }}
|
|
22164
|
+
* onChange={(v) => save(v)}
|
|
22165
|
+
* />
|
|
22166
|
+
* ```
|
|
22167
|
+
*/
|
|
21945
22168
|
const DateRangePickerFormBridge = ({
|
|
21946
22169
|
value,
|
|
21947
22170
|
defaultValue: defaultValueProp,
|
|
@@ -23067,6 +23290,58 @@ const DateRangePickerProvider = ({
|
|
|
23067
23290
|
|
|
23068
23291
|
|
|
23069
23292
|
|
|
23293
|
+
/**
|
|
23294
|
+
* DateRangePicker — two masked inputs (**from** / **to**) with a shared popover calendar and
|
|
23295
|
+
* **react-hook-form** fields **`${name}From`** and **`${name}To`** inside **`FormProvider`**.
|
|
23296
|
+
* **`onChange`** emits **`[start, end]`** as **`Date`**, **`undefined`**, or **`null`** on the **end**
|
|
23297
|
+
* only for **“Present”** (open-ended range) when **`showPresentOption`** is enabled.
|
|
23298
|
+
*
|
|
23299
|
+
* ### Behavior notes
|
|
23300
|
+
* - **Luxon** parses strings; the form stores **formatted strings** per **format** / **rangePickerType**.
|
|
23301
|
+
* - Calendar selection uses a **start → end** step; **`allowReverseSelection`** can swap inverted picks.
|
|
23302
|
+
* - Use **`DateRangePickerFormBridge`** when the form stores **ISO** strings and **`PRESENT_VALUE`**
|
|
23303
|
+
* for Present (string-safe schemas).
|
|
23304
|
+
*
|
|
23305
|
+
* @category Components
|
|
23306
|
+
* @subcategory Form Controls
|
|
23307
|
+
*
|
|
23308
|
+
* @example
|
|
23309
|
+
* ```tsx
|
|
23310
|
+
* import { FormProvider, useForm } from 'react-hook-form';
|
|
23311
|
+
* import { DateRangePicker } from '@ssa-ui-kit/core';
|
|
23312
|
+
*
|
|
23313
|
+
* function Example() {
|
|
23314
|
+
* const methods = useForm({
|
|
23315
|
+
* defaultValues: { tripFrom: '', tripTo: '' },
|
|
23316
|
+
* });
|
|
23317
|
+
* return (
|
|
23318
|
+
* <FormProvider {...methods}>
|
|
23319
|
+
* <DateRangePicker
|
|
23320
|
+
* name="trip"
|
|
23321
|
+
* label="Trip dates"
|
|
23322
|
+
* onChange={(dates) => console.log(dates)}
|
|
23323
|
+
* />
|
|
23324
|
+
* </FormProvider>
|
|
23325
|
+
* );
|
|
23326
|
+
* }
|
|
23327
|
+
* ```
|
|
23328
|
+
*
|
|
23329
|
+
* @example
|
|
23330
|
+
* ```tsx
|
|
23331
|
+
* // Open-ended end date: `to === null` means Present
|
|
23332
|
+
* <DateRangePicker name="job" showPresentOption onChange={() => {}} />
|
|
23333
|
+
* ```
|
|
23334
|
+
*
|
|
23335
|
+
* @see {@link Input} — Masked inputs
|
|
23336
|
+
* @see {@link Popover} — Calendar overlay
|
|
23337
|
+
* @see {@link DateRangePickerFormBridge} — ISO / string form adapter
|
|
23338
|
+
*
|
|
23339
|
+
* @accessibility
|
|
23340
|
+
* - **Field** label associates with the focused input
|
|
23341
|
+
* - Calendar controls reuse **aria-** patterns from day/month/year views
|
|
23342
|
+
* - Calendar trigger uses an **aria-label** on the icon button
|
|
23343
|
+
*/
|
|
23344
|
+
|
|
23070
23345
|
const DateRangePicker = ({
|
|
23071
23346
|
format,
|
|
23072
23347
|
showCalendarIcon = true,
|
|
@@ -26395,11 +26670,12 @@ const ArrayFieldItemTemplate = props => {
|
|
|
26395
26670
|
RemoveButton
|
|
26396
26671
|
} = registry.templates.ButtonTemplates;
|
|
26397
26672
|
const {
|
|
26398
|
-
toolbarAlign = '
|
|
26673
|
+
toolbarAlign = 'flex-end'
|
|
26399
26674
|
} = registry.formContext;
|
|
26400
26675
|
const buttonCss = {
|
|
26401
26676
|
width: '32px',
|
|
26402
26677
|
height: '32px',
|
|
26678
|
+
marginBottom: '8px',
|
|
26403
26679
|
justifyContent: 'center'
|
|
26404
26680
|
};
|
|
26405
26681
|
return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
|
|
@@ -49028,6 +49304,105 @@ const StepLabel = ({
|
|
|
49028
49304
|
});
|
|
49029
49305
|
};
|
|
49030
49306
|
/* harmony default export */ const StepLabel_StepLabel = (StepLabel);
|
|
49307
|
+
;// ./src/components/History/styles.ts
|
|
49308
|
+
function History_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
49309
|
+
|
|
49310
|
+
const FIRST_LINE_TOP_PADDING = 2;
|
|
49311
|
+
const FIRST_LINE_HEIGHT = 20;
|
|
49312
|
+
const container = true ? {
|
|
49313
|
+
name: "1fttcpj",
|
|
49314
|
+
styles: "display:flex;flex-direction:column"
|
|
49315
|
+
} : 0;
|
|
49316
|
+
const row = true ? {
|
|
49317
|
+
name: "1h63efc",
|
|
49318
|
+
styles: "display:flex;align-items:stretch"
|
|
49319
|
+
} : 0;
|
|
49320
|
+
const leftColumn = width => /*#__PURE__*/(0,react_namespaceObject.css)("position:relative;flex-shrink:0;width:", width, "px;" + ( true ? "" : 0), true ? "" : 0);
|
|
49321
|
+
const circle = (color, size, topOffset) => /*#__PURE__*/(0,react_namespaceObject.css)("position:absolute;top:", topOffset, "px;left:50%;transform:translateX(-50%);width:", size, "px;height:", size, "px;border-radius:50%;background-color:", color, ";z-index:1;" + ( true ? "" : 0), true ? "" : 0);
|
|
49322
|
+
const connector = (color, circleTopOffset, circleSize) => /*#__PURE__*/(0,react_namespaceObject.css)("position:absolute;left:50%;transform:translateX(-50%);top:", circleTopOffset + circleSize / 2, "px;bottom:-", circleTopOffset + circleSize / 2, "px;width:1px;background-color:", color, ";" + ( true ? "" : 0), true ? "" : 0);
|
|
49323
|
+
const dateColumn = width => /*#__PURE__*/(0,react_namespaceObject.css)("width:", width, "px;flex-shrink:0;padding-top:", FIRST_LINE_TOP_PADDING, "px;padding-bottom:20px;font-size:14px;line-height:", FIRST_LINE_HEIGHT, "px;" + ( true ? "" : 0), true ? "" : 0);
|
|
49324
|
+
const contentColumn = /*#__PURE__*/(0,react_namespaceObject.css)("flex:1;padding-top:", FIRST_LINE_TOP_PADDING, "px;padding-bottom:20px;" + ( true ? "" : 0), true ? "" : 0);
|
|
49325
|
+
;// ./src/components/History/History.tsx
|
|
49326
|
+
|
|
49327
|
+
|
|
49328
|
+
|
|
49329
|
+
const DEFAULT_CIRCLE_SIZE = 12;
|
|
49330
|
+
const DEFAULT_DATE_WIDTH = 120;
|
|
49331
|
+
const LEFT_COLUMN_MARGIN_RIGHT = 16;
|
|
49332
|
+
|
|
49333
|
+
/**
|
|
49334
|
+
* History - Vertical timeline component for chronological events.
|
|
49335
|
+
*
|
|
49336
|
+
* Renders a date column and content column for each item, connected by
|
|
49337
|
+
* timeline markers. Marker colors can be set per item or via defaults.
|
|
49338
|
+
*
|
|
49339
|
+
* ### Color behavior
|
|
49340
|
+
* - `item.color` overrides the marker color for a specific row
|
|
49341
|
+
* - `defaultColor` is used when `item.color` is not provided
|
|
49342
|
+
* - fallback default marker color: `theme.palette.primary.main`
|
|
49343
|
+
* - fallback connector color: `theme.colors.greyLighter`
|
|
49344
|
+
*
|
|
49345
|
+
* ### Alignment behavior
|
|
49346
|
+
* The marker is vertically aligned to the first text line and adapts when
|
|
49347
|
+
* `circleSize` changes.
|
|
49348
|
+
*
|
|
49349
|
+
* @category Components
|
|
49350
|
+
* @subcategory Display
|
|
49351
|
+
*
|
|
49352
|
+
* @example
|
|
49353
|
+
* ```tsx
|
|
49354
|
+
* <History
|
|
49355
|
+
* items={[
|
|
49356
|
+
* { date: '01.01.2026', content: 'Account created' },
|
|
49357
|
+
* { date: '03.01.2026', content: 'Plan upgraded', color: '#10b981' },
|
|
49358
|
+
* ]}
|
|
49359
|
+
* />
|
|
49360
|
+
* ```
|
|
49361
|
+
*/
|
|
49362
|
+
const History = ({
|
|
49363
|
+
items,
|
|
49364
|
+
defaultColor,
|
|
49365
|
+
lineColor,
|
|
49366
|
+
dateWidth = DEFAULT_DATE_WIDTH,
|
|
49367
|
+
circleSize = DEFAULT_CIRCLE_SIZE,
|
|
49368
|
+
sx
|
|
49369
|
+
}) => {
|
|
49370
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
49371
|
+
const resolvedDefaultColor = defaultColor ?? theme.palette.primary.main;
|
|
49372
|
+
const resolvedLineColor = lineColor ?? theme.colors.greyLighter;
|
|
49373
|
+
const circleTopOffset = Math.max(0, FIRST_LINE_TOP_PADDING + (FIRST_LINE_HEIGHT - circleSize) / 2);
|
|
49374
|
+
return (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
49375
|
+
"data-testid": "history",
|
|
49376
|
+
css: container,
|
|
49377
|
+
style: sx,
|
|
49378
|
+
children: items.map((item, index) => {
|
|
49379
|
+
const isLast = index === items.length - 1;
|
|
49380
|
+
const color = item.color ?? resolvedDefaultColor;
|
|
49381
|
+
return (0,jsx_runtime_namespaceObject.jsxs)("div", {
|
|
49382
|
+
css: row,
|
|
49383
|
+
children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
|
|
49384
|
+
css: leftColumn(circleSize),
|
|
49385
|
+
style: {
|
|
49386
|
+
marginRight: LEFT_COLUMN_MARGIN_RIGHT
|
|
49387
|
+
},
|
|
49388
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
49389
|
+
css: circle(color, circleSize, circleTopOffset)
|
|
49390
|
+
}), !isLast && (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
49391
|
+
css: connector(resolvedLineColor, circleTopOffset, circleSize)
|
|
49392
|
+
})]
|
|
49393
|
+
}), (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
49394
|
+
css: dateColumn(dateWidth),
|
|
49395
|
+
children: item.date
|
|
49396
|
+
}), (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
49397
|
+
css: contentColumn,
|
|
49398
|
+
children: item.content
|
|
49399
|
+
})]
|
|
49400
|
+
}, item.key ?? index);
|
|
49401
|
+
})
|
|
49402
|
+
});
|
|
49403
|
+
};
|
|
49404
|
+
;// ./src/components/History/index.ts
|
|
49405
|
+
|
|
49031
49406
|
;// ./src/components/Pagination/styles.tsx
|
|
49032
49407
|
|
|
49033
49408
|
function Pagination_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
@@ -49351,6 +49726,7 @@ const RowsPerPageDropdown = ({
|
|
|
49351
49726
|
selectedItem = DEFAULT_PER_PAGE_VALUE,
|
|
49352
49727
|
rowsPerPageList = ROWS_PER_PAGE_LIST,
|
|
49353
49728
|
rowsPerPageText = 'Rows per page',
|
|
49729
|
+
dropdownPosition,
|
|
49354
49730
|
...rest
|
|
49355
49731
|
}) => {
|
|
49356
49732
|
const theme = (0,react_namespaceObject.useTheme)();
|
|
@@ -49396,7 +49772,8 @@ const RowsPerPageDropdown = ({
|
|
|
49396
49772
|
stroke: theme.colors.greyDarker
|
|
49397
49773
|
}
|
|
49398
49774
|
}
|
|
49399
|
-
}
|
|
49775
|
+
},
|
|
49776
|
+
dropdownPosition
|
|
49400
49777
|
},
|
|
49401
49778
|
...rest,
|
|
49402
49779
|
children: rowsPerPageList.map(item => (0,jsx_runtime_namespaceObject.jsx)(DropdownOption_DropdownOption, {
|
|
@@ -51589,6 +51966,7 @@ const UserProfile = ({
|
|
|
51589
51966
|
|
|
51590
51967
|
|
|
51591
51968
|
|
|
51969
|
+
|
|
51592
51970
|
|
|
51593
51971
|
|
|
51594
51972
|
// ============================================================================
|