@ostack.tech/ui 0.15.5 → 0.16.1
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/chunks/{en-Buw2XVWt.js → en-DT1KWQei.js} +2 -2
- package/dist/chunks/{en-Buw2XVWt.js.map → en-DT1KWQei.js.map} +1 -1
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +134 -85
- package/dist/ostack-ui.js +2155 -1784
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +5 -4
- package/scss/_utils.scss +0 -2
- package/scss/components/Checkbox/_Checkbox-variables.scss +7 -4
- package/scss/components/Checkbox/_Checkbox.scss +34 -9
- package/scss/components/CheckboxGroup/_CheckboxGroup.scss +9 -0
- package/scss/components/Code/_Code-variables.scss +8 -4
- package/scss/components/DateRangeInput/_DateRangeInput.scss +1 -1
- package/scss/components/Feedback/_Feedback-variables.scss +28 -1
- package/scss/components/Feedback/_Feedback.scss +99 -2
- package/scss/components/Field/_Field-variables.scss +0 -1
- package/scss/components/Field/_Field.scss +4 -40
- package/scss/components/HelperText/_HelperText-variables.scss +8 -0
- package/scss/components/HelperText/_HelperText.scss +15 -0
- package/scss/components/RadioGroup/_Radio.scss +13 -0
- package/scss/components/RadioGroup/_RadioGroup.scss +9 -0
- package/scss/components/Select/_Select.scss +2 -2
- package/scss/index.scss +0 -2
- package/scss/scss/placeholders/button/_button.scss +10 -6
- package/scss/scss/placeholders/checkable/_checkable-variables.scss +3 -2
- package/scss/scss/placeholders/checkable/_checkable.scss +25 -7
- package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +1 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group.scss +15 -3
- package/scss/scss/placeholders/popover/_popover.scss +3 -0
- package/scss/scss/utils/_breakpoints.scss +1 -1
- package/scss/scss/utils/_declare-var.scss +1 -1
- package/types/components/Alert/Alert.d.ts +12 -15
- package/types/components/Alert/AlertTitle.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialog.d.ts +6 -2
- package/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogBody.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogContent.d.ts +6 -6
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -4
- package/types/components/AlertDialog/AlertDialogTitle.d.ts +4 -4
- package/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
- package/types/components/Button/Button.d.ts +14 -15
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +6 -6
- package/types/components/Calendar/CalendarDay.d.ts +1 -1
- package/types/components/Calendar/CalendarHeader.d.ts +1 -1
- package/types/components/Calendar/CalendarMonthGrid.d.ts +1 -1
- package/types/components/Card/Card.d.ts +3 -3
- package/types/components/Card/CardBody.d.ts +3 -3
- package/types/components/Card/CardFooter.d.ts +3 -3
- package/types/components/Card/CardHeader.d.ts +3 -3
- package/types/components/Card/CardTitle.d.ts +3 -3
- package/types/components/Checkbox/Checkbox.d.ts +22 -14
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +22 -12
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +15 -9
- package/types/components/CheckboxGroup/checkboxGroupUtils.d.ts +3 -0
- package/types/components/ClearContexts/ClearContexts.d.ts +19 -1
- package/types/components/CloseButton/CloseButton.d.ts +3 -4
- package/types/components/Code/Code.d.ts +3 -3
- package/types/components/Collapsible/Collapsible.d.ts +5 -3
- package/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +5 -5
- package/types/components/CommandMenu/CommandMenu.d.ts +18 -20
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -6
- package/types/components/CommandMenu/CommandMenuGroup.d.ts +3 -3
- package/types/components/CommandMenu/CommandMenuItem.d.ts +5 -3
- package/types/components/Container/Container.d.ts +3 -3
- package/types/components/Control/Control.d.ts +13 -13
- package/types/components/Control/ControlWithContainerRef.d.ts +12 -5
- package/types/components/Control/controlUtils.d.ts +24 -0
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -3
- package/types/components/ControlCode/ControlCode.d.ts +3 -3
- package/types/components/DataTable/DataTable.d.ts +32 -21
- package/types/components/DataTable/DataTableBody.d.ts +4 -4
- package/types/components/DataTable/DataTableCell.d.ts +6 -4
- package/types/components/DataTable/DataTableColumn.d.ts +32 -11
- package/types/components/DataTable/DataTableColumnGroup.d.ts +31 -0
- package/types/components/DataTable/DataTableColumns.d.ts +14 -0
- package/types/components/DataTable/DataTableContent.d.ts +8 -8
- package/types/components/DataTable/DataTableContext.d.ts +7 -6
- package/types/components/DataTable/DataTableFilter.d.ts +1 -1
- package/types/components/DataTable/DataTableFoot.d.ts +6 -4
- package/types/components/DataTable/DataTableHead.d.ts +3 -4
- package/types/components/DataTable/DataTablePagination.d.ts +6 -6
- package/types/components/DataTable/DataTableRow.d.ts +3 -4
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -3
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +4 -4
- package/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/__tests__/spliceWindow.test.d.ts +1 -0
- package/types/components/DataTable/columnUtils.d.ts +4 -3
- package/types/components/DataTable/index.d.ts +2 -0
- package/types/components/DataTable/processRows.d.ts +7 -7
- package/types/components/DataTable/sanitizeProps.d.ts +2 -2
- package/types/components/DataTable/useDataTableSelectionColumn.d.ts +2 -2
- package/types/components/DateInput/DateInput.d.ts +27 -18
- package/types/components/DateRangeInput/DateRangeInput.d.ts +37 -24
- package/types/components/DescriptionList/DescriptionList.d.ts +4 -4
- package/types/components/DescriptionList/DescriptionListItem.d.ts +4 -4
- package/types/components/Dialog/Dialog.d.ts +5 -1
- package/types/components/Dialog/DialogBody.d.ts +3 -4
- package/types/components/Dialog/DialogClose.d.ts +3 -3
- package/types/components/Dialog/DialogContent.d.ts +6 -6
- package/types/components/Dialog/DialogDescription.d.ts +3 -3
- package/types/components/Dialog/DialogFooter.d.ts +3 -4
- package/types/components/Dialog/DialogHeader.d.ts +5 -6
- package/types/components/Dialog/DialogTitle.d.ts +4 -4
- package/types/components/Dialog/DialogTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuContent.d.ts +7 -7
- package/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuSub.d.ts +4 -0
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -9
- package/types/components/Feedback/Feedback.d.ts +3 -3
- package/types/components/Feedback/FeedbackContext.d.ts +46 -0
- package/types/components/Feedback/FeedbackList.d.ts +6 -0
- package/types/components/Feedback/FeedbackListContext.d.ts +2 -0
- package/types/components/{FeedbackPopover → Feedback}/FeedbackPopover.d.ts +7 -7
- package/types/components/Feedback/FeedbackProvider.d.ts +13 -0
- package/types/components/Feedback/feedbackUtils.d.ts +19 -0
- package/types/components/Feedback/index.d.ts +4 -0
- package/types/components/Field/Field.d.ts +3 -3
- package/types/components/Field/FieldContext.d.ts +2 -70
- package/types/components/Field/fieldUtils.d.ts +7 -0
- package/types/components/Field/index.d.ts +1 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +2 -2
- package/types/components/Form/Form.d.ts +6 -6
- package/types/components/Form/FormContext.d.ts +1 -1
- package/types/components/Form/FormReset.d.ts +2 -2
- package/types/components/Form/FormSubmit.d.ts +2 -2
- package/types/components/Form/HiddenFormControl.d.ts +2 -2
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +4 -4
- package/types/components/Grid/GridContext.d.ts +10 -0
- package/types/components/Heading/Heading.d.ts +2 -2
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextContext.d.ts +38 -0
- package/types/components/HelperText/HelperTextProvider.d.ts +13 -0
- package/types/components/HelperText/helperTextUtils.d.ts +2 -0
- package/types/components/HelperText/index.d.ts +2 -0
- package/types/components/Icon/Icon.d.ts +3 -3
- package/types/components/IconButton/IconButton.d.ts +17 -17
- package/types/components/Input/Input.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +8 -3
- package/types/components/Keyboard/Keyboard.d.ts +3 -3
- package/types/components/Label/Label.d.ts +14 -14
- package/types/components/Label/LabelContext.d.ts +45 -0
- package/types/components/Label/LabelProvider.d.ts +13 -0
- package/types/components/Label/index.d.ts +2 -0
- package/types/components/Label/labelUtils.d.ts +23 -0
- package/types/components/Layer/Layer.d.ts +5 -5
- package/types/components/Link/Link.d.ts +4 -5
- package/types/components/Mark/Mark.d.ts +3 -3
- package/types/components/MenuList/MenuList.d.ts +3 -3
- package/types/components/MenuList/MenuListGroup.d.ts +5 -5
- package/types/components/MenuList/MenuListItem.d.ts +13 -14
- package/types/components/NumericInput/NumericInput.d.ts +5 -5
- package/types/components/NumericInput/numericInputUtils.d.ts +2 -2
- package/types/components/Output/Output.d.ts +2 -2
- package/types/components/Overlay/Overlay.d.ts +3 -3
- package/types/components/Popover/Popover.d.ts +4 -0
- package/types/components/Popover/PopoverAnchor.d.ts +4 -0
- package/types/components/Popover/PopoverClose.d.ts +5 -5
- package/types/components/Popover/PopoverContent.d.ts +5 -5
- package/types/components/Popover/PopoverTrigger.d.ts +3 -3
- package/types/components/Portal/Portal.d.ts +3 -3
- package/types/components/Printer/Printer.d.ts +1 -1
- package/types/components/Printer/PrinterContent.d.ts +5 -5
- package/types/components/Printer/PrinterTrigger.d.ts +4 -4
- package/types/components/RadioGroup/Radio.d.ts +23 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +19 -16
- package/types/components/Root/Root.d.ts +9 -9
- package/types/components/Root/RootElement.d.ts +3 -3
- package/types/components/Select/Option.d.ts +3 -4
- package/types/components/Select/OptionsGroup.d.ts +3 -4
- package/types/components/Select/Select.d.ts +17 -13
- package/types/components/Select/SelectContext.d.ts +6 -12
- package/types/components/Select/SelectNative.d.ts +3 -3
- package/types/components/Select/selectUtils.d.ts +3 -0
- package/types/components/Separator/Separator.d.ts +3 -3
- package/types/components/Slot/Slot.d.ts +5 -0
- package/types/components/Slot/Slottable.d.ts +2 -2
- package/types/components/Spinner/Spinner.d.ts +3 -3
- package/types/components/Stack/Stack.d.ts +4 -4
- package/types/components/Stack/StackContext.d.ts +9 -0
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +5 -5
- package/types/components/Stepper/StepList.d.ts +3 -3
- package/types/components/Stepper/Stepper.d.ts +6 -6
- package/types/components/Stepper/StepperFinishTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperNextTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +5 -5
- package/types/components/Table/Table.d.ts +15 -10
- package/types/components/Table/TableBody.d.ts +3 -3
- package/types/components/Table/TableCell.d.ts +3 -3
- package/types/components/Table/TableColumn.d.ts +29 -21
- package/types/components/Table/TableColumnGroup.d.ts +38 -0
- package/types/components/Table/TableContext.d.ts +1 -1
- package/types/components/Table/TableFoot.d.ts +3 -3
- package/types/components/Table/TableHead.d.ts +15 -7
- package/types/components/Table/TableRow.d.ts +3 -3
- package/types/components/Table/columnUtils.d.ts +11 -17
- package/types/components/Table/index.d.ts +1 -0
- package/types/components/Tabs/Tab.d.ts +7 -7
- package/types/components/Tabs/TabContent.d.ts +4 -4
- package/types/components/Tabs/TabList.d.ts +8 -8
- package/types/components/Tabs/Tabs.d.ts +8 -6
- package/types/components/Tag/Badge.d.ts +2 -2
- package/types/components/Tag/Tag.d.ts +10 -10
- package/types/components/TextArea/TextArea.d.ts +2 -2
- package/types/components/Toast/Toast.d.ts +13 -13
- package/types/components/Toast/ToastDescription.d.ts +4 -0
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/ToastTitle.d.ts +3 -3
- package/types/components/Toast/ToastViewport.d.ts +3 -3
- package/types/components/Tooltip/Tooltip.d.ts +5 -5
- package/types/components/Tooltip/TooltipProvider.d.ts +4 -0
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
- package/types/index.d.ts +1 -2
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +12 -12
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +1 -1
- package/types/providers/LocalizationProvider/LocalizationObject.d.ts +2 -3
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +6 -6
- package/types/utils/__tests__/combineEventHandlers.test.d.ts +1 -0
- package/types/utils/__tests__/cx.test.d.ts +1 -0
- package/types/utils/__tests__/numericStringUtils.test.d.ts +1 -0
- package/types/utils/__tests__/useNumericTrasformer.test.d.ts +1 -0
- package/types/utils/documentTitleUtils.d.ts +4 -0
- package/types/utils/parseChildren.d.ts +64 -0
- package/types/utils/polymorphicTypes.d.ts +2 -13
- package/types/utils/useLocation.d.ts +3 -3
- package/types/utils/useNumericTransformer.d.ts +9 -6
- package/scss/components/FeedbackList/_FeedbackList-variables.scss +0 -6
- package/scss/components/FeedbackList/_FeedbackList.scss +0 -32
- package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +0 -26
- package/scss/components/FeedbackPopover/_FeedbackPopover.scss +0 -66
- package/types/components/FeedbackList/FeedbackList.d.ts +0 -6
- package/types/components/FeedbackList/FeedbackListContext.d.ts +0 -4
- package/types/components/FeedbackList/index.d.ts +0 -2
- package/types/components/FeedbackPopover/index.d.ts +0 -2
- package/types/components/Field/FieldProvider.d.ts +0 -13
- /package/types/components/{FeedbackPopover → Feedback}/FeedbackPopoverContext.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui",
|
|
3
3
|
"description": "ostack/UI component library.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.1",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@daypicker/react": "^10.0.1",
|
|
46
|
-
"@fortawesome/react-fontawesome": "^3.
|
|
47
|
-
"@tanstack/react-virtual": "^3.14.
|
|
46
|
+
"@fortawesome/react-fontawesome": "^3.5.0",
|
|
47
|
+
"@tanstack/react-virtual": "^3.14.9",
|
|
48
|
+
"esm-env": "^1.2.2",
|
|
48
49
|
"from-exponential": "^1.1.1",
|
|
49
|
-
"radix-ui": "^1.6.
|
|
50
|
+
"radix-ui": "^1.6.7",
|
|
50
51
|
"react-error-boundary": "^6.1.2",
|
|
51
52
|
"react-number-format": "^5.4.5",
|
|
52
53
|
"react-to-print": "^3.3.0",
|
package/scss/_utils.scss
CHANGED
|
@@ -37,9 +37,7 @@
|
|
|
37
37
|
@forward "components/DateRangeInput/DateRangeInput-variables";
|
|
38
38
|
@forward "components/ControlCode/ControlCode-variables";
|
|
39
39
|
@forward "components/DropdownMenu/DropdownMenu-variables";
|
|
40
|
-
@forward "components/FeedbackList/FeedbackList-variables";
|
|
41
40
|
@forward "components/Field/Field-variables";
|
|
42
|
-
@forward "components/FeedbackPopover/FeedbackPopover-variables";
|
|
43
41
|
@forward "components/FieldGroup/FieldGroup-variables";
|
|
44
42
|
@forward "components/Heading/Heading-variables";
|
|
45
43
|
@forward "components/HelperText/HelperText-variables";
|
|
@@ -4,20 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
$checkbox-border-radius: var(--#{$prefix}border-radius-sm) !default;
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// Cell variant
|
|
8
|
+
$checkbox-cell-min-height: $control-cell-min-height !default;
|
|
9
|
+
|
|
10
|
+
// Container - Cell variant
|
|
8
11
|
$checkbox-container-cell-padding-x: spacing(3) !default;
|
|
9
12
|
$checkbox-container-cell-background-color: $control-cell-background-color !default;
|
|
10
13
|
$checkbox-container-cell-background-image: $control-cell-background-image !default;
|
|
11
14
|
|
|
12
|
-
//
|
|
15
|
+
// Container - Cell variant + status
|
|
13
16
|
$checkbox-container-cell-status-background-color: $control-cell-status-background-color !default;
|
|
14
17
|
$checkbox-container-cell-status-background-image: $control-cell-status-background-image !default;
|
|
15
18
|
|
|
16
|
-
//
|
|
19
|
+
// Container - Cell variant + read-only
|
|
17
20
|
$checkbox-container-cell-readonly-background-color: $control-cell-readonly-background-color !default;
|
|
18
21
|
$checkbox-container-cell-readonly-background-image: $control-cell-readonly-background-image !default;
|
|
19
22
|
|
|
20
|
-
//
|
|
23
|
+
// Container - Cell variant + read-only + status
|
|
21
24
|
$checkbox-container-cell-readonly-status-background-color: $control-cell-readonly-status-background-color !default;
|
|
22
25
|
$checkbox-container-cell-readonly-status-background-image: $control-cell-readonly-status-background-image !default;
|
|
23
26
|
|
|
@@ -14,24 +14,33 @@
|
|
|
14
14
|
|
|
15
15
|
border-radius: $checkbox-border-radius;
|
|
16
16
|
|
|
17
|
-
// Root
|
|
17
|
+
// Root
|
|
18
18
|
&__root {
|
|
19
19
|
@extend %#{$prefix}checkable__root;
|
|
20
20
|
|
|
21
21
|
&[data-variant="cell"] {
|
|
22
|
-
|
|
22
|
+
align-items: stretch;
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
min-height: $checkbox-cell-min-height;
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
|
|
29
|
+
// Containers
|
|
26
30
|
&__container {
|
|
27
|
-
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: center;
|
|
31
|
+
@extend %#{$prefix}checkable__container;
|
|
30
32
|
|
|
31
33
|
&[data-variant="cell"] {
|
|
32
34
|
width: 100%;
|
|
33
|
-
|
|
35
|
+
justify-content: center;
|
|
34
36
|
padding: 0 $checkbox-container-cell-padding-x;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__container,
|
|
41
|
+
&__start-container,
|
|
42
|
+
&__end-container {
|
|
43
|
+
&[data-variant="cell"] {
|
|
35
44
|
background-color: $checkbox-container-cell-background-color;
|
|
36
45
|
background-image: $checkbox-container-cell-background-image;
|
|
37
46
|
|
|
@@ -73,12 +82,28 @@
|
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
|
|
76
|
-
|
|
85
|
+
&__start-container {
|
|
86
|
+
@extend %#{$prefix}checkable__start-container;
|
|
87
|
+
|
|
88
|
+
&[data-variant="cell"] {
|
|
89
|
+
padding: 0 0 0 $checkable-padding-x;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__end-container {
|
|
94
|
+
@extend %#{$prefix}checkable__end-container;
|
|
95
|
+
|
|
96
|
+
&[data-variant="cell"] {
|
|
97
|
+
padding: 0 $checkable-padding-x 0 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Code
|
|
77
102
|
&__code {
|
|
78
103
|
@extend %#{$prefix}checkable__code;
|
|
79
104
|
}
|
|
80
105
|
|
|
81
|
-
//
|
|
106
|
+
// Label
|
|
82
107
|
&__label {
|
|
83
108
|
@extend %#{$prefix}checkable__label;
|
|
84
109
|
|
|
@@ -92,7 +117,7 @@
|
|
|
92
117
|
}
|
|
93
118
|
}
|
|
94
119
|
|
|
95
|
-
//
|
|
120
|
+
// Indicator
|
|
96
121
|
&__indicator {
|
|
97
122
|
@extend %#{$prefix}checkable__indicator;
|
|
98
123
|
|
|
@@ -53,6 +53,15 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// Start container
|
|
57
|
+
&__start-container {
|
|
58
|
+
@extend %#{$prefix}checkable-group__start-container;
|
|
59
|
+
|
|
60
|
+
&[data-variant="cell"] {
|
|
61
|
+
@extend %#{$prefix}checkable-group__start-container--cell;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
56
65
|
// End container
|
|
57
66
|
&__end-container {
|
|
58
67
|
@extend %#{$prefix}checkable-group__end-container;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
@use "sass:math";
|
|
1
2
|
@use "../../scss/base-variables" as *;
|
|
2
3
|
@use "../../scss/utils/spacing" as *;
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
$-code-font-size-unitless-rem: math.div($font-size-sm, 1rem);
|
|
6
|
+
$-code-font-size-unitless-px: $-code-font-size-unitless-rem * 16;
|
|
7
|
+
|
|
8
|
+
$code-padding-y: calc(1em / $-code-font-size-unitless-px) !default;
|
|
9
|
+
$code-padding-x: calc(4em / $-code-font-size-unitless-px) !default;
|
|
6
10
|
$code-border-radius: var(--#{$prefix}border-radius-sm) !default;
|
|
7
11
|
$code-font-family: var(--#{$prefix}font-family-code) !default;
|
|
8
12
|
$code-font-weight: $font-weight-normal !default;
|
|
9
|
-
$code-font-size:
|
|
10
|
-
$code-line-height:
|
|
13
|
+
$code-font-size: $-code-font-size-unitless-rem * 1em !default;
|
|
14
|
+
$code-line-height: var(--#{$prefix}line-height-sm) !default;
|
|
11
15
|
$code-background-color: var(--#{$prefix}accent-a3) !default;
|
|
12
16
|
$code-color: var(--#{$prefix}accent-a11) !default;
|
|
13
17
|
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
|
|
56
56
|
&__popover-anchor > &__container {
|
|
57
57
|
margin: calc(var(--#{$prefix}control-border-width) * -1);
|
|
58
|
+
background: none;
|
|
58
59
|
|
|
59
60
|
&:not([data-focused]) {
|
|
60
61
|
border-color: transparent;
|
|
61
|
-
background: none;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// When necessary, tweak spacing around containers so that the focus ring
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
@use "../../scss/base-variables" as *;
|
|
2
1
|
@use "../HelperText/HelperText-variables" as *;
|
|
2
|
+
@use "../Label/Label-variables" as *;
|
|
3
|
+
@use "../../scss/base-variables" as *;
|
|
4
|
+
@use "../../scss/utils/spacing" as *;
|
|
5
|
+
|
|
6
|
+
$feedback-margin-top: $helper-text-margin-top !default;
|
|
7
|
+
$feedback-gap-y: $helper-text-gap-y !default;
|
|
3
8
|
|
|
4
9
|
$feedback-font-size: $helper-text-font-size !default;
|
|
5
10
|
$feedback-line-height: $helper-text-line-height !default;
|
|
6
11
|
$feedback-font-weight: $helper-text-font-weight !default;
|
|
7
12
|
$feedback-color: var(--#{$prefix}accent-11) !default;
|
|
8
13
|
$feedback-text-align: $helper-text-text-align !default;
|
|
14
|
+
|
|
15
|
+
// Has code
|
|
16
|
+
$feedback-has-code-margin-left: $helper-text-has-code-margin-left !default;
|
|
17
|
+
|
|
18
|
+
// List - Feedback
|
|
19
|
+
$feedback-list-feedback-margin-left: spacing(3.5) !default;
|
|
20
|
+
|
|
21
|
+
// Popover
|
|
22
|
+
$feedback-popover-max-width: $label-helper-popover-max-width !default;
|
|
23
|
+
$feedback-popover-max-height: $label-helper-popover-max-height !default;
|
|
24
|
+
$feedback-popover-padding-y: $label-helper-popover-padding-y !default;
|
|
25
|
+
$feedback-popover-padding-x: $label-helper-popover-padding-x !default;
|
|
26
|
+
|
|
27
|
+
// Popover button - Within control
|
|
28
|
+
$feedback-popover-button-control-inset-x: calc(
|
|
29
|
+
(
|
|
30
|
+
var(--#{$prefix}icon-button-min-size) - var(
|
|
31
|
+
--#{$prefix}icon-button-font-size
|
|
32
|
+
)
|
|
33
|
+
) /
|
|
34
|
+
2
|
|
35
|
+
);
|
|
@@ -9,13 +9,110 @@
|
|
|
9
9
|
color: $feedback-color;
|
|
10
10
|
|
|
11
11
|
@if $feedback-text-align == right {
|
|
12
|
-
:not(
|
|
12
|
+
:not(
|
|
13
|
+
.#{$prefix}checkbox__root,
|
|
14
|
+
.#{$prefix}checkbox-group,
|
|
13
15
|
.#{$prefix}radio-group
|
|
14
16
|
)
|
|
15
|
-
|
|
17
|
+
~ & {
|
|
16
18
|
text-align: $feedback-text-align;
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
@include accessible-transition();
|
|
23
|
+
|
|
24
|
+
// Top margin
|
|
25
|
+
&:not(:first-child),
|
|
26
|
+
&__list:not(:first-child, :empty) {
|
|
27
|
+
margin-top: $feedback-margin-top !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Left margin due to control code
|
|
31
|
+
[data-has-code] ~ & {
|
|
32
|
+
margin-left: $feedback-has-code-margin-left;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Add padding instead of margin so that we can use `margin-left: auto;` when
|
|
36
|
+
// right-aligning feedbacks
|
|
37
|
+
[data-has-code] ~ &__list {
|
|
38
|
+
padding-left: $feedback-has-code-margin-left;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Spacing between feedbacks/helper texts
|
|
42
|
+
:is(&, &__list, .#{$prefix}helper-text) + :is(&, &__list) {
|
|
43
|
+
margin-top: $feedback-gap-y;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// List
|
|
47
|
+
&__list {
|
|
48
|
+
width: fit-content;
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
|
|
52
|
+
&:empty {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@if $feedback-text-align == right {
|
|
57
|
+
:not(
|
|
58
|
+
.#{$prefix}checkbox__root,
|
|
59
|
+
.#{$prefix}checkbox-group,
|
|
60
|
+
.#{$prefix}radio-group
|
|
61
|
+
)
|
|
62
|
+
~ & {
|
|
63
|
+
margin-left: auto !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Feedbacks within list
|
|
69
|
+
&__list > & {
|
|
70
|
+
margin-left: $feedback-list-feedback-margin-left !important;
|
|
71
|
+
text-align: left !important;
|
|
72
|
+
|
|
73
|
+
&:only-of-type {
|
|
74
|
+
list-style: none;
|
|
75
|
+
margin-left: 0 !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Popover
|
|
80
|
+
&__popover {
|
|
81
|
+
padding: $feedback-popover-padding-y $feedback-popover-padding-x;
|
|
82
|
+
max-width: min(
|
|
83
|
+
$feedback-popover-max-width,
|
|
84
|
+
var(--radix-popover-content-available-width)
|
|
85
|
+
);
|
|
86
|
+
max-height: min(
|
|
87
|
+
$feedback-popover-max-height,
|
|
88
|
+
var(--radix-popover-content-available-height)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Popover button
|
|
93
|
+
&__popover-button-container {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Tweak margins of popover buttons within controls
|
|
99
|
+
:is(.#{$prefix}input, .#{$prefix}date-range-input__container)
|
|
100
|
+
~ &__popover-button-container
|
|
101
|
+
&__popover-button {
|
|
102
|
+
margin: 0
|
|
103
|
+
calc(
|
|
104
|
+
var(--#{$prefix}control-padding-x) -
|
|
105
|
+
$feedback-popover-button-control-inset-x
|
|
106
|
+
)
|
|
107
|
+
0 calc($feedback-popover-button-control-inset-x * -1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$prefix}date-range-input__container[data-variant="default"]
|
|
111
|
+
~ &__popover-button-container {
|
|
112
|
+
margin: 0
|
|
113
|
+
calc(
|
|
114
|
+
var(--#{$prefix}control-padding-x) -
|
|
115
|
+
$feedback-popover-button-control-inset-x
|
|
116
|
+
);
|
|
117
|
+
}
|
|
21
118
|
}
|
|
@@ -5,49 +5,13 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
break-inside: avoid;
|
|
7
7
|
|
|
8
|
+
// Add spacing to labels and
|
|
8
9
|
& > :is(.#{$prefix}control-code, .#{$prefix}label__container) {
|
|
9
10
|
margin-bottom: $field-spacing-y;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.#{$prefix}feedback
|
|
16
|
-
) {
|
|
17
|
-
margin-top: $field-spacing-y;
|
|
18
|
-
|
|
19
|
-
~ :is(
|
|
20
|
-
.#{$prefix}helper-text,
|
|
21
|
-
.#{$prefix}feedback-list:not(:empty),
|
|
22
|
-
.#{$prefix}feedback
|
|
23
|
-
) {
|
|
24
|
-
margin-top: $field-feedback-spacing-y;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&[data-variant="cell"] {
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: row;
|
|
31
|
-
align-items: center;
|
|
32
|
-
height: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Always add (code sized) margin to the helper text or feedback when the
|
|
36
|
-
// control has a code; however, only add this margin to the label when the
|
|
37
|
-
// label is a direct child since the margin is unneeded when being displayed
|
|
38
|
-
// inline
|
|
39
|
-
&[data-has-code] {
|
|
40
|
-
// Code width + small margin
|
|
41
|
-
& > .#{$prefix}label__container,
|
|
42
|
-
.#{$prefix}helper-text,
|
|
43
|
-
.#{$prefix}feedback {
|
|
44
|
-
margin-left: $field-has-code-margin-left;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Add a padding to to the feedback list instead of a margin so that we can
|
|
48
|
-
// use `margin-left: auto;` when right-aligning feedbacks
|
|
49
|
-
.#{$prefix}feedback-list {
|
|
50
|
-
padding-left: $field-has-code-margin-left;
|
|
51
|
-
}
|
|
13
|
+
// Left margin due to control code
|
|
14
|
+
&[data-control-has-code] > .#{$prefix}label__container {
|
|
15
|
+
margin-left: $field-has-code-margin-left;
|
|
52
16
|
}
|
|
53
17
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
@use "../Field/Field-variables" as *;
|
|
1
2
|
@use "../../scss/base-variables" as *;
|
|
3
|
+
@use "../../scss/utils/spacing" as *;
|
|
4
|
+
|
|
5
|
+
$helper-text-margin-top: $field-spacing-y !default;
|
|
6
|
+
$helper-text-gap-y: spacing(0.5) !default;
|
|
2
7
|
|
|
3
8
|
$helper-text-font-size: var(--#{$prefix}font-size-xs) !default;
|
|
4
9
|
$helper-text-line-height: var(--#{$prefix}line-height-xs) !default;
|
|
5
10
|
$helper-text-font-weight: null !default;
|
|
6
11
|
$helper-text-text-align: null !default;
|
|
7
12
|
$helper-text-color: var(--#{$prefix}neutral-10) !default;
|
|
13
|
+
|
|
14
|
+
// Has code
|
|
15
|
+
$helper-text-has-code-margin-left: $field-has-code-margin-left !default;
|
|
@@ -15,4 +15,19 @@
|
|
|
15
15
|
text-align: $helper-text-text-align;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
// Top margin
|
|
20
|
+
&:not(:first-child) {
|
|
21
|
+
margin-top: $helper-text-margin-top !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Spacing between feedbacks/helper texts
|
|
25
|
+
:is(&, .#{$prefix}feedback__list, .#{$prefix}feedback) + & {
|
|
26
|
+
margin-top: $helper-text-gap-y;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Left margin due to control code
|
|
30
|
+
[data-has-code] ~ & {
|
|
31
|
+
margin-left: $helper-text-has-code-margin-left;
|
|
32
|
+
}
|
|
18
33
|
}
|
|
@@ -14,6 +14,19 @@
|
|
|
14
14
|
@extend %#{$prefix}checkable__root;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
// Containers
|
|
18
|
+
&__container {
|
|
19
|
+
@extend %#{$prefix}checkable__container;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__start-container {
|
|
23
|
+
@extend %#{$prefix}checkable__start-container;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__end-container {
|
|
27
|
+
@extend %#{$prefix}checkable__start-container;
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
// Checkbox code
|
|
18
31
|
&__code {
|
|
19
32
|
@extend %#{$prefix}checkable__code;
|
|
@@ -53,6 +53,15 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// Start container
|
|
57
|
+
&__start-container {
|
|
58
|
+
@extend %#{$prefix}checkable-group__start-container;
|
|
59
|
+
|
|
60
|
+
&[data-variant="cell"] {
|
|
61
|
+
@extend %#{$prefix}checkable-group__start-container--cell;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
56
65
|
// End container
|
|
57
66
|
&__end-container {
|
|
58
67
|
@extend %#{$prefix}checkable-group__end-container;
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
&[data-variant="default"] {
|
|
23
23
|
height: auto;
|
|
24
24
|
|
|
25
|
-
&:not([data-placeholder]) {
|
|
25
|
+
&:not([data-placeholder], [data-readonly]) {
|
|
26
26
|
padding: $select-multiple-padding-y $select-multiple-padding-x;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&[data-variant="cell"] {
|
|
31
|
-
&:not([data-placeholder]) {
|
|
31
|
+
&:not([data-placeholder], [data-readonly]) {
|
|
32
32
|
padding: $select-multiple-cell-padding-y $select-multiple-cell-padding-x;
|
|
33
33
|
}
|
|
34
34
|
}
|
package/scss/index.scss
CHANGED
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
@forward "components/Dialog/Dialog";
|
|
28
28
|
@forward "components/DropdownMenu/DropdownMenu";
|
|
29
29
|
@forward "components/Feedback/Feedback";
|
|
30
|
-
@forward "components/FeedbackList/FeedbackList";
|
|
31
|
-
@forward "components/FeedbackPopover/FeedbackPopover";
|
|
32
30
|
@forward "components/Field/Field";
|
|
33
31
|
@forward "components/FieldGroup/FieldGroup";
|
|
34
32
|
@forward "components/Form/Form";
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
outline-offset: var(--#{$prefix}button-focus-outline-offset);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&[aria-haspopup][aria-expanded="true"] {
|
|
53
|
+
&[aria-haspopup][aria-expanded="true"]:not([data-inactive]) {
|
|
54
54
|
box-shadow: var(
|
|
55
55
|
--#{$prefix}button-open-box-shadow,
|
|
56
56
|
$button-open-box-shadow
|
|
@@ -89,9 +89,13 @@
|
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
// Hover styles
|
|
92
|
-
&:hover:not(
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
&:hover:not(
|
|
93
|
+
:active,
|
|
94
|
+
[data-active],
|
|
95
|
+
[aria-haspopup][aria-expanded="true"]:not([data-inactive]),
|
|
96
|
+
:disabled,
|
|
97
|
+
[data-disabled]
|
|
98
|
+
) {
|
|
95
99
|
@include declare-var(
|
|
96
100
|
--#{$prefix}button-background-color,
|
|
97
101
|
map.get($button-hover-background-color-by-variant, $variant)
|
|
@@ -115,8 +119,8 @@
|
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
// Active styles
|
|
118
|
-
&:is(:active, [data-active]):not(:disabled
|
|
119
|
-
&[aria-haspopup][aria-expanded="true"] {
|
|
122
|
+
&:is(:active, [data-active]):not(:disabled, [data-disabled]),
|
|
123
|
+
&[aria-haspopup][aria-expanded="true"]:not([data-inactive]) {
|
|
120
124
|
@include declare-var(
|
|
121
125
|
--#{$prefix}button-background-color,
|
|
122
126
|
map.get($button-active-background-color-by-variant, $variant)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use "../../utils/spacing" as *;
|
|
4
4
|
@use "../../../components/Label/Label-variables" as *;
|
|
5
5
|
|
|
6
|
+
$checkable-padding-x: $control-padding-x !default;
|
|
6
7
|
$checkable-size: 18px !default;
|
|
7
8
|
$checkable-box-shadow: $control-box-shadow !default;
|
|
8
9
|
$checkable-border-width: $control-border-width !default;
|
|
@@ -72,7 +73,7 @@ $checkable-label-checked-color: $neutral-12 !default;
|
|
|
72
73
|
$checkable-label-checked-status-color: $checkable-label-status-color !default;
|
|
73
74
|
|
|
74
75
|
// Code
|
|
75
|
-
$checkable-code-margin-x:
|
|
76
|
+
$checkable-code-margin-x: $checkable-label-margin-x !default;
|
|
76
77
|
|
|
77
78
|
// Spinner
|
|
78
|
-
$checkable-spinner-margin-x:
|
|
79
|
+
$checkable-spinner-margin-x: $checkable-label-margin-x !default;
|
|
@@ -298,12 +298,13 @@
|
|
|
298
298
|
&__root {
|
|
299
299
|
display: flex;
|
|
300
300
|
align-items: center;
|
|
301
|
+
}
|
|
301
302
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
// Container
|
|
304
|
+
&__container {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
justify-content: center;
|
|
307
308
|
}
|
|
308
309
|
|
|
309
310
|
// Checkable component
|
|
@@ -343,12 +344,29 @@
|
|
|
343
344
|
@include accessible-transition();
|
|
344
345
|
}
|
|
345
346
|
|
|
347
|
+
// Start/end container
|
|
348
|
+
&__start-container,
|
|
349
|
+
&__end-container {
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
&__start-container {
|
|
355
|
+
padding-right: $checkable-padding-x;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&__end-container {
|
|
359
|
+
padding-left: $checkable-padding-x;
|
|
360
|
+
}
|
|
361
|
+
|
|
346
362
|
// Spinner
|
|
347
363
|
&__spinner {
|
|
348
|
-
margin-left: $checkable-spinner-margin-x;
|
|
349
|
-
|
|
350
364
|
&[data-disabled] {
|
|
351
365
|
opacity: $checkable-disabled-opacity;
|
|
352
366
|
}
|
|
367
|
+
|
|
368
|
+
&:not(:last-child) {
|
|
369
|
+
margin-right: $checkable-spinner-margin-x;
|
|
370
|
+
}
|
|
353
371
|
}
|
|
354
372
|
}
|
|
@@ -15,6 +15,7 @@ $checkable-group-inline-margin-x: spacing(4) !default;
|
|
|
15
15
|
$checkable-group-disabled-opacity: $checkable-disabled-opacity !default;
|
|
16
16
|
|
|
17
17
|
// Cell variant
|
|
18
|
+
$checkable-group-cell-min-height: $control-cell-min-height !default;
|
|
18
19
|
$checkable-group-cell-background-color: $control-cell-background-color !default;
|
|
19
20
|
$checkable-group-cell-background-image: $control-cell-background-image !default;
|
|
20
21
|
|