@ostack.tech/ui 0.6.0 → 0.6.2
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-lyNzumTm.js → en-C2peM913.js} +2 -2
- package/dist/chunks/en-C2peM913.js.map +1 -0
- 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 +79 -43
- package/dist/ostack-ui.css.map +1 -1
- package/dist/ostack-ui.js +135 -78
- package/dist/ostack-ui.js.map +1 -1
- package/dist/types/components/Field/FieldContext.d.ts +2 -0
- package/dist/types/components/Field/index.d.ts +1 -1
- package/dist/types/components/Table/Table.d.ts +49 -3
- package/dist/types/components/Table/TableContext.d.ts +4 -6
- package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +1 -1
- package/package.json +3 -3
- package/scss/components/CloseButton/_CloseButton-variables.scss +35 -1
- package/scss/components/CloseButton/_CloseButton.scss +19 -2
- package/scss/components/DataTable/_DataTable.scss +34 -38
- package/scss/components/Field/_Field.scss +11 -8
- package/scss/components/Table/_Table-variables.scss +10 -0
- package/scss/components/Table/_Table.scss +21 -1
- package/scss/components/Tag/_Tag-variables.scss +4 -1
- package/scss/components/Tag/_Tag.scss +4 -3
- package/dist/chunks/en-lyNzumTm.js.map +0 -1
|
@@ -51,6 +51,8 @@ export declare function useFieldControlTagName(): string | undefined;
|
|
|
51
51
|
export declare function useFieldControlFocused(): boolean | undefined;
|
|
52
52
|
/** Hook exposing whether the field's control is required. */
|
|
53
53
|
export declare function useFieldControlRequired(): boolean | undefined;
|
|
54
|
+
/** Hook exposing the `children` of the field's label. */
|
|
55
|
+
export declare function useFieldLabel(): ReactNode;
|
|
54
56
|
/** Hook exposing the field label's id. */
|
|
55
57
|
export declare function useFieldLabelId(): string | undefined;
|
|
56
58
|
/** Hook exposing the field's description ids. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './Field.tsx';
|
|
2
|
-
export { type FieldActions, useFieldControlFocused, useFieldControlId, useFieldControlRequired, useFieldControlTagName, useFieldDescriptionIds, useFieldErrorMessageIds, useFieldLabelId, useOnFieldLabelChange, useSetFieldControl, useSetFieldControlFocused, useSetFieldFeedback, useSetFieldHelperText, useSetFieldLabel, } from './FieldContext.ts';
|
|
2
|
+
export { type FieldActions, useFieldControlFocused, useFieldControlId, useFieldControlRequired, useFieldControlTagName, useFieldDescriptionIds, useFieldErrorMessageIds, useFieldLabel, useFieldLabelId, useOnFieldLabelChange, useSetFieldControl, useSetFieldControlFocused, useSetFieldFeedback, useSetFieldHelperText, useSetFieldLabel, } from './FieldContext.ts';
|
|
@@ -1,13 +1,53 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ControlStatus } from '../../utils/control.ts';
|
|
3
3
|
/** Default column width in `"fixed"` mode. */
|
|
4
4
|
export declare const DEFAULT_TABLE_COLUMN_WIDTH = 150;
|
|
5
|
+
/** Possible table caption sides. */
|
|
6
|
+
export type TableCaptionSide = "top" | "bottom";
|
|
5
7
|
/** Table variant. */
|
|
6
8
|
export type TableVariant = "default" | "control";
|
|
7
9
|
/** Possible table layouts. */
|
|
8
10
|
export type TableLayout = "auto" | "fixed";
|
|
9
11
|
/** Properties of the table component. */
|
|
10
12
|
export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
13
|
+
/**
|
|
14
|
+
* Caption of the table. This caption is displayed outside the table, above or
|
|
15
|
+
* below it (depending on the value of `captionSide`), in a `<div>` element.
|
|
16
|
+
*
|
|
17
|
+
* This value is also used as the default value of the `visuallyHiddenCaption`
|
|
18
|
+
* property, which renders a visually hidden `<caption>` element within the
|
|
19
|
+
* table for accessibility purposes.
|
|
20
|
+
*
|
|
21
|
+
* It is not necessary to specify this property (or `visuallyHiddenCaption`)
|
|
22
|
+
* when rendering the `Table` within a `Field` component containing a `Label`,
|
|
23
|
+
* as the `visuallyHiddenCaption` property is automatically set with the value
|
|
24
|
+
* of the `Label`'s `children`.
|
|
25
|
+
*
|
|
26
|
+
* **NOTE**: The visible caption is rendered as a `<div>` because of the
|
|
27
|
+
* difficulty in styling a `<caption>` element.
|
|
28
|
+
*/
|
|
29
|
+
caption?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Side in which to place the caption, when the `caption` property is
|
|
32
|
+
* provided.
|
|
33
|
+
*
|
|
34
|
+
* @default "bottom"
|
|
35
|
+
*/
|
|
36
|
+
captionSide?: TableCaptionSide;
|
|
37
|
+
/**
|
|
38
|
+
* Content of the visually hidden `<caption>` element.
|
|
39
|
+
*
|
|
40
|
+
* By default, this is set to the value of the `caption` property when
|
|
41
|
+
* provided. If a `caption` is not provided and the `Table` is rendered within
|
|
42
|
+
* a `Field` component containing a `Label`, the value of the `Label`'s
|
|
43
|
+
* `children` is used instead.
|
|
44
|
+
*
|
|
45
|
+
* Prefer using either the `caption` property or wrapping the table in a
|
|
46
|
+
* labelled field. Manually set this property either to specify an accessible
|
|
47
|
+
* caption that differs from the visible one, or when wanting to provide an
|
|
48
|
+
* accessible caption without displaying the default caption or a `Label`.
|
|
49
|
+
*/
|
|
50
|
+
visuallyHiddenCaption?: ReactNode;
|
|
11
51
|
/**
|
|
12
52
|
* Marks the table as being meant for editable content (cells containing form
|
|
13
53
|
* controls).
|
|
@@ -52,6 +92,12 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
52
92
|
maxHeight?: CSSProperties["maxHeight"];
|
|
53
93
|
/** Properties to pass to the container element. */
|
|
54
94
|
containerProps?: ComponentPropsWithRef<"div">;
|
|
95
|
+
/** Properties to pass to the scrollable element. */
|
|
96
|
+
scrollableProps?: ComponentPropsWithRef<"div">;
|
|
97
|
+
/** Properties to pass to the visual `<div>` caption element. */
|
|
98
|
+
captionProps?: ComponentPropsWithRef<"div">;
|
|
99
|
+
/** Properties to pass to the visually hidden `<caption>` element. */
|
|
100
|
+
visuallyHiddenCaptionProps?: ComponentPropsWithRef<"caption">;
|
|
55
101
|
}
|
|
56
102
|
/**
|
|
57
103
|
* Use the table component to display structured data in a tabular format.
|
|
@@ -91,9 +137,9 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
91
137
|
* TableRow,
|
|
92
138
|
* } from "@ostack.tech/ui";
|
|
93
139
|
*
|
|
94
|
-
* function
|
|
140
|
+
* function PriceList() {
|
|
95
141
|
* return (
|
|
96
|
-
* <Table>
|
|
142
|
+
* <Table caption="Price list">
|
|
97
143
|
* <TableHead>
|
|
98
144
|
* <TableColumn label="Item" />
|
|
99
145
|
* <TableColumn label="Price" />
|
|
@@ -7,6 +7,8 @@ export interface TableContextValue {
|
|
|
7
7
|
status?: ControlStatus;
|
|
8
8
|
layout: TableLayout;
|
|
9
9
|
defaultColumnWidth: number;
|
|
10
|
+
onTableMinWidthChange: (minWidth: string | undefined) => void;
|
|
11
|
+
onTableMaxWidthChange: (maxWidth: string | undefined) => void;
|
|
10
12
|
store: TableStore;
|
|
11
13
|
}
|
|
12
14
|
/** State of the table. */
|
|
@@ -14,12 +16,6 @@ export interface TableState {
|
|
|
14
16
|
scrollPosition?: ScrollPosition;
|
|
15
17
|
numberOfColumns?: number;
|
|
16
18
|
columnWidths?: (string | undefined)[];
|
|
17
|
-
actions: TableActions;
|
|
18
|
-
}
|
|
19
|
-
/** Actions of the table. */
|
|
20
|
-
export interface TableActions {
|
|
21
|
-
setTableMinWidth: (minWidth: string | undefined) => void;
|
|
22
|
-
setTableMaxWidth: (maxWidth: string | undefined) => void;
|
|
23
19
|
}
|
|
24
20
|
/** Table store. */
|
|
25
21
|
export type TableStore = ReturnType<typeof useCreateTableContext>["store"];
|
|
@@ -31,6 +27,8 @@ export declare function useCreateTableContext(editable: boolean, status: Control
|
|
|
31
27
|
status: ControlStatus | undefined;
|
|
32
28
|
layout: TableLayout;
|
|
33
29
|
defaultColumnWidth: number;
|
|
30
|
+
onTableMinWidthChange: (minWidth: string | undefined) => void;
|
|
31
|
+
onTableMaxWidthChange: (maxWidth: string | undefined) => void;
|
|
34
32
|
store: Omit<import('zustand').StoreApi<TableState>, "subscribe"> & {
|
|
35
33
|
subscribe: {
|
|
36
34
|
(listener: (selectedState: TableState, previousSelectedState: TableState) => void): () => void;
|
|
@@ -23,7 +23,7 @@ export interface LocalizationObject {
|
|
|
23
23
|
dateFnsLocale: DateFnsLocale;
|
|
24
24
|
AlertDialog: Pick<ConfirmDialogOptions, "okText">;
|
|
25
25
|
Calendar: Pick<CalendarProps, "previousMonthLabel" | "nextMonthLabel">;
|
|
26
|
-
CloseButton: Pick<CloseButtonProps, "
|
|
26
|
+
CloseButton: Pick<CloseButtonProps, "label">;
|
|
27
27
|
CommandMenu: Pick<CommandMenuProps, "label" | "searchPlaceholder" | "listLabel" | "loadingLabel" | "emptyMessage">;
|
|
28
28
|
CommandMenuDialog: Pick<CommandMenuDialogProps, "title" | "description">;
|
|
29
29
|
ConfirmDialog: Pick<ConfirmDialogOptions, "okText" | "cancelText">;
|
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.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@fortawesome/react-fontawesome": "^3.1.
|
|
47
|
+
"@fortawesome/react-fontawesome": "^3.1.1",
|
|
48
48
|
"@tanstack/react-virtual": "^3.13.12",
|
|
49
49
|
"cmdk": "^1.1.1",
|
|
50
50
|
"from-exponential": "^1.1.1",
|
|
51
51
|
"radix-ui": "^1.4.3",
|
|
52
|
-
"react-day-picker": "^9.11.
|
|
52
|
+
"react-day-picker": "^9.11.3",
|
|
53
53
|
"react-error-boundary": "^6.0.0",
|
|
54
54
|
"react-number-format": "^5.4.4",
|
|
55
55
|
"react-to-print": "^3.2.0",
|
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
@use "../IconButton/IconButton-variables" as *;
|
|
2
|
+
@use "../../scss/base-variables" as *;
|
|
3
|
+
|
|
2
4
|
$close-button-opacity: 0.8 !default;
|
|
5
|
+
|
|
6
|
+
// Small size
|
|
7
|
+
$close-button-sm-min-size: 18px !default;
|
|
8
|
+
$close-button-sm-font-size: var(--#{$prefix}font-size-2xs) !default;
|
|
9
|
+
|
|
10
|
+
// Medium size
|
|
11
|
+
$close-button-md-min-size: 24px !default;
|
|
12
|
+
$close-button-md-font-size: var(--#{$prefix}font-size-sm) !default;
|
|
13
|
+
|
|
14
|
+
// Large size
|
|
15
|
+
$close-button-lg-min-size: 32px !default;
|
|
16
|
+
$close-button-lg-font-size: var(--#{$prefix}font-size-lg) !default;
|
|
17
|
+
|
|
18
|
+
// Extra large size
|
|
19
|
+
$close-button-xl-min-size: 40px !default;
|
|
20
|
+
$close-button-xl-font-size: var(--#{$prefix}font-size-2xl) !default;
|
|
21
|
+
|
|
22
|
+
// Sizes
|
|
23
|
+
$close-button-sizes: $icon-button-sizes !default;
|
|
24
|
+
|
|
25
|
+
$close-button-min-size-by-size: (
|
|
26
|
+
sm: $close-button-sm-min-size,
|
|
27
|
+
md: $close-button-md-min-size,
|
|
28
|
+
lg: $close-button-lg-min-size,
|
|
29
|
+
xl: $close-button-xl-min-size,
|
|
30
|
+
) !default;
|
|
31
|
+
$close-button-font-size-by-size: (
|
|
32
|
+
sm: $close-button-sm-font-size,
|
|
33
|
+
md: $close-button-md-font-size,
|
|
34
|
+
lg: $close-button-lg-font-size,
|
|
35
|
+
xl: $close-button-xl-font-size,
|
|
36
|
+
) !default;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use "CloseButton-variables" as *;
|
|
2
3
|
@use "../../scss/base-variables" as *;
|
|
4
|
+
@use "../../scss/utils/declare-var" as *;
|
|
3
5
|
|
|
4
6
|
.#{$prefix}close-button {
|
|
5
|
-
min-height: $close-button-size !important;
|
|
6
|
-
min-width: $close-button-size !important;
|
|
7
|
+
min-height: var(--#{$prefix}close-button-min-size) !important;
|
|
8
|
+
min-width: var(--#{$prefix}close-button-min-size) !important;
|
|
9
|
+
font-size: var(--#{$prefix}close-button-font-size) !important;
|
|
7
10
|
|
|
8
11
|
color: inherit !important;
|
|
9
12
|
opacity: $close-button-opacity;
|
|
@@ -11,4 +14,18 @@
|
|
|
11
14
|
&:hover:not(:disabled, [data-disabled]) {
|
|
12
15
|
opacity: 1;
|
|
13
16
|
}
|
|
17
|
+
|
|
18
|
+
// Sizes
|
|
19
|
+
@each $size in $close-button-sizes {
|
|
20
|
+
&.#{$prefix}icon-button--#{$size} {
|
|
21
|
+
@include declare-var(
|
|
22
|
+
--#{$prefix}close-button-min-size,
|
|
23
|
+
map.get($close-button-min-size-by-size, $size)
|
|
24
|
+
);
|
|
25
|
+
@include declare-var(
|
|
26
|
+
--#{$prefix}close-button-font-size,
|
|
27
|
+
map.get($close-button-font-size-by-size, $size)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
14
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "../ControlCode/ControlCode-variables" as *;
|
|
1
2
|
@use "../../scss/base-variables" as *;
|
|
2
3
|
@use "../../scss/utils/breakpoints" as *;
|
|
3
4
|
@use "../../scss/utils/spacing" as *;
|
|
@@ -5,6 +6,10 @@
|
|
|
5
6
|
|
|
6
7
|
.#{$prefix}data-table {
|
|
7
8
|
$data-table: &;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: center;
|
|
8
13
|
|
|
9
14
|
// Clearfix due to usage of floats for the default positioning
|
|
10
15
|
&::after {
|
|
@@ -70,37 +75,43 @@
|
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
& > &__content-container:not(:first-child) {
|
|
76
|
-
margin-top: spacing(2);
|
|
77
|
-
}
|
|
78
|
+
// Auto-layout of data table components (when they're direct children of the
|
|
79
|
+
// data table):
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
// Add margins to elements
|
|
82
|
+
& > *:not(:last-child) {
|
|
83
|
+
margin-bottom: spacing(1);
|
|
81
84
|
}
|
|
82
85
|
|
|
83
|
-
//
|
|
84
|
-
& > &
|
|
85
|
-
& > &__pagination,
|
|
86
|
-
& > &__selection-trigger {
|
|
87
|
-
float: right;
|
|
88
|
-
margin-bottom: spacing(2);
|
|
86
|
+
// Separate elements
|
|
87
|
+
& > *:not(&__content-container):not(:first-child) {
|
|
89
88
|
margin-left: spacing(2);
|
|
90
89
|
}
|
|
90
|
+
& > &__content-container + * {
|
|
91
|
+
margin-left: 0 !important;
|
|
92
|
+
}
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
& > &__pagination
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
// The filter, pagination, and selection default to being on the right
|
|
95
|
+
& > :is(&__filter-root, &__pagination, &__selection-trigger):first-child,
|
|
96
|
+
&
|
|
97
|
+
> &__content-container
|
|
98
|
+
+ :is(&__filter-root, &__pagination, &__selection-trigger) {
|
|
99
|
+
margin-left: auto;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
& > &
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
& > :is(.#{$prefix}label__container, &__rows-per-page) {
|
|
103
|
+
flex: 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Label styles
|
|
107
|
+
& > .#{$prefix}label__container:first-child {
|
|
108
|
+
align-self: flex-end;
|
|
109
|
+
}
|
|
110
|
+
& > &__content-container + .#{$prefix}label__container {
|
|
111
|
+
align-self: flex-start;
|
|
112
|
+
}
|
|
113
|
+
& > .#{$prefix}control-code + .#{$prefix}label__container {
|
|
114
|
+
margin-left: $control-code-label-margin-x;
|
|
104
115
|
}
|
|
105
116
|
|
|
106
117
|
// Selection column
|
|
@@ -120,20 +131,5 @@
|
|
|
120
131
|
&__pagination-select-root {
|
|
121
132
|
width: auto !important;
|
|
122
133
|
}
|
|
123
|
-
|
|
124
|
-
& > &__content-container:not(:first-child),
|
|
125
|
-
& > &__content-container:not(:last-child) {
|
|
126
|
-
margin-top: 0;
|
|
127
|
-
margin-bottom: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
& > &__filter-root,
|
|
131
|
-
& > &__content-container,
|
|
132
|
-
& > &__rows-per-page,
|
|
133
|
-
& > &__pagination {
|
|
134
|
-
&:not(:last-child) {
|
|
135
|
-
margin-bottom: spacing(2);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
134
|
}
|
|
139
135
|
}
|
|
@@ -7,19 +7,22 @@
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
break-inside: avoid;
|
|
9
9
|
|
|
10
|
-
& > .#{$prefix}control-code,
|
|
11
|
-
& > .#{$prefix}label__container {
|
|
10
|
+
& > :is(.#{$prefix}control-code, .#{$prefix}label__container) {
|
|
12
11
|
margin-bottom: spacing(1);
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
:is(
|
|
15
|
+
.#{$prefix}helper-text,
|
|
16
|
+
.#{$prefix}feedback-list:not(:empty),
|
|
17
|
+
.#{$prefix}feedback
|
|
18
|
+
) {
|
|
18
19
|
margin-top: spacing(1);
|
|
19
20
|
|
|
20
|
-
~
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
~ :is(
|
|
22
|
+
.#{$prefix}helper-text,
|
|
23
|
+
.#{$prefix}feedback-list:not(:empty),
|
|
24
|
+
.#{$prefix}feedback
|
|
25
|
+
) {
|
|
23
26
|
margin-top: spacing(0.5);
|
|
24
27
|
}
|
|
25
28
|
}
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
$table-font-size: var(--#{$prefix}font-size-sm) !default;
|
|
7
7
|
$table-line-height: var(--#{$prefix}line-height-sm) !default;
|
|
8
8
|
|
|
9
|
+
// Container
|
|
10
|
+
$table-container-align-items: center !default;
|
|
11
|
+
|
|
12
|
+
// Caption
|
|
13
|
+
$table-caption-margin-y: spacing(1) !default;
|
|
14
|
+
$table-caption-font-size: $label-font-size !default;
|
|
15
|
+
$table-caption-line-height: $label-line-height !default;
|
|
16
|
+
$table-caption-font-weight: $label-font-weight !default;
|
|
17
|
+
$table-caption-color: $label-color !default;
|
|
18
|
+
|
|
9
19
|
// Default variant
|
|
10
20
|
$table-default-border-radius: null !default;
|
|
11
21
|
$table-default-border-width: 0 0 1px !default;
|
|
@@ -18,8 +18,28 @@
|
|
|
18
18
|
table-layout: fixed;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// Scrollable container
|
|
22
21
|
&__container {
|
|
22
|
+
width: 100%;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: $table-container-align-items;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__caption {
|
|
29
|
+
font-size: $table-caption-font-size;
|
|
30
|
+
line-height: $table-caption-line-height;
|
|
31
|
+
font-weight: $table-caption-font-weight;
|
|
32
|
+
color: $table-caption-color;
|
|
33
|
+
|
|
34
|
+
&--top {
|
|
35
|
+
margin-bottom: $table-caption-margin-y;
|
|
36
|
+
}
|
|
37
|
+
&--bottom {
|
|
38
|
+
margin-top: $table-caption-margin-y;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__scrollable {
|
|
23
43
|
display: flex;
|
|
24
44
|
position: relative;
|
|
25
45
|
width: 100%;
|
|
@@ -34,4 +34,7 @@ $tag-close-button-size: 1.5em !default;
|
|
|
34
34
|
$tag-close-button-margin-y: calc($tag-padding-y * -2) !default;
|
|
35
35
|
$tag-close-button-margin-left: calc($tag-padding-x * 0.5) !default;
|
|
36
36
|
$tag-close-button-margin-right: calc($tag-padding-x * -0.5) !default;
|
|
37
|
-
$tag-close-button-font-size: min(
|
|
37
|
+
$tag-close-button-font-size: min(
|
|
38
|
+
0.85em,
|
|
39
|
+
var(--#{$prefix}font-size-md)
|
|
40
|
+
) !default;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use "../../scss/base-variables" as *;
|
|
5
5
|
@use "../../scss/utils/animation" as *;
|
|
6
6
|
@use "../../scss/utils/declare-var" as *;
|
|
7
|
+
@use "../../scss/utils/maybe-important" as *;
|
|
7
8
|
@use "../../scss/utils/spacing" as *;
|
|
8
9
|
@use "../../scss/utils/transition" as *;
|
|
9
10
|
|
|
@@ -77,10 +78,10 @@
|
|
|
77
78
|
|
|
78
79
|
// Close button
|
|
79
80
|
&__close-button {
|
|
80
|
-
min-width: $tag-close-button-size
|
|
81
|
-
min-height: $tag-close-button-size
|
|
81
|
+
min-width: maybe-important($tag-close-button-size);
|
|
82
|
+
min-height: maybe-important($tag-close-button-size);
|
|
82
83
|
margin: $tag-close-button-margin-y $tag-close-button-margin-right
|
|
83
84
|
$tag-close-button-margin-y $tag-close-button-margin-left;
|
|
84
|
-
font-size: $tag-close-button-font-size;
|
|
85
|
+
font-size: maybe-important($tag-close-button-font-size);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-lyNzumTm.js","sources":["../../src/locales/en.tsx"],"sourcesContent":["import type { LocalizationObject } from \"../providers/LocalizationProvider\";\n\n/** `en` locale (partial). */\nexport const en: Omit<LocalizationObject, \"languageTag\" | \"dateFnsLocale\"> = {\n AlertDialog: {\n okText: \"OK\",\n },\n Calendar: {\n previousMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n },\n CloseButton: {\n \"aria-label\": \"Close\",\n },\n CommandMenu: {\n searchPlaceholder: \"Search…\",\n listLabel: \"Suggestions\",\n loadingLabel: \"Loading…\",\n emptyMessage: \"No results found.\",\n },\n CommandMenuDialog: {\n title: \"Command palette\",\n description: \"Search for a command…\",\n },\n ConfirmDialog: {\n cancelText: \"Cancel\",\n },\n ControlCode: {\n visuallyHiddenPrefix: \"Field\",\n },\n DataTable: {\n emptyMessage: \"Nothing to show.\",\n },\n DataTableFilter: {\n \"aria-label\": \"Table filter\",\n placeholder: \"Filter\",\n },\n DataTablePagination: {\n rowsRange: (range, total) => (\n <>\n Rows {range} of {total}\n </>\n ),\n previousPageButtonLabel: \"Previous page\",\n nextPageButtonLabel: \"Next page\",\n },\n DataTableRowsPerPage: {\n label: \"Rows per page\",\n },\n DateInput: {\n calendarButtonLabel: (selectedDate, editable) =>\n editable\n ? selectedDate\n ? `Open calendar to change selected date: ${selectedDate}`\n : \"Open calendar to select date\"\n : selectedDate\n ? `Open calendar with selected date: ${selectedDate}`\n : \"Open calendar with no selected date\",\n },\n DateRangeInput: {\n startInputLabel: \"Start date\",\n endInputLabel: \"End date\",\n calendarButtonLabel: (selectedDateRange, editable) =>\n editable\n ? selectedDateRange\n ? `Open calendar to change selected date-range: ${selectedDateRange}`\n : \"Open calendar to select date-range\"\n : selectedDateRange\n ? `Open calendar with selected date-range: ${selectedDateRange}`\n : \"Open calendar with no selected date-range\",\n },\n ErrorBoundary: {\n fallbackMessage: (\n <>\n Something went wrong.\n <br />\n Press the button on the right to try again. If the problem persists,\n please try again later.\n </>\n ),\n resetButtonLabel: \"Retry\",\n },\n Feedback: {\n visuallyHiddenPrefix: (type) =>\n type === \"error\" ? \"Error:\" : type === \"warning\" ? \"Warning:\" : null,\n },\n FeedbackPopover: {\n label: \"Show feedback\",\n },\n FieldGroupHeader: {\n visuallyHiddenCodePrefix: \"Group\",\n },\n Input: {\n clearButtonLabel: \"Clear\",\n },\n Label: {\n requiredIconLabel: \"Required\",\n helperButtonLabel: \"Show help\",\n },\n NumericInput: {\n decimalSeparator: \".\",\n groupingStyle: \"thousand\",\n groupSeparator: \",\",\n },\n Select: {\n optionsLabel: \"Options\",\n },\n TableColumn: {\n helperButtonLabel: \"Show help\",\n },\n TableHead: {\n sortByColumnDescription: (columnName, sortDirection) =>\n sortDirection === null\n ? `Stop sorting table by column “${columnName}”`\n : `Sort table by column “${columnName}” in ${\n sortDirection === \"asc\" ? \"ascending\" : \"descending\"\n } order`,\n },\n ToastProvider: {\n label: \"Notification\",\n },\n ToastViewport: {\n label: \"Notifications ({hotkey})\",\n },\n};\n"],"names":[],"mappings":";AAGO,MAAM,KAAgE;AAAA,EAC3E,aAAa;AAAA,IACX,QAAQ;AAAA,EAAA;AAAA,EAEV,UAAU;AAAA,IACR,oBAAoB;AAAA,IACpB,gBAAgB;AAAA,EAAA;AAAA,EAElB,aAAa;AAAA,IACX,cAAc;AAAA,EAAA;AAAA,EAEhB,aAAa;AAAA,IACX,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,cAAc;AAAA,IACd,cAAc;AAAA,EAAA;AAAA,EAEhB,mBAAmB;AAAA,IACjB,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf,eAAe;AAAA,IACb,YAAY;AAAA,EAAA;AAAA,EAEd,aAAa;AAAA,IACX,sBAAsB;AAAA,EAAA;AAAA,EAExB,WAAW;AAAA,IACT,cAAc;AAAA,EAAA;AAAA,EAEhB,iBAAiB;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,EAAA;AAAA,EAEf,qBAAqB;AAAA,IACnB,WAAW,CAAC,OAAO,UACjB,qBAAA,UAAA,EAAE,UAAA;AAAA,MAAA;AAAA,MACW;AAAA,MAAM;AAAA,MAAU;AAAA,IAAA,GAC7B;AAAA,IAEF,yBAAyB;AAAA,IACzB,qBAAqB;AAAA,EAAA;AAAA,EAEvB,sBAAsB;AAAA,IACpB,OAAO;AAAA,EAAA;AAAA,EAET,WAAW;AAAA,IACT,qBAAqB,CAAC,cAAc,aAClC,WACI,eACE,0CAA0C,YAAY,KACtD,iCACF,eACE,qCAAqC,YAAY,KACjD;AAAA,EAAA;AAAA,EAEV,gBAAgB;AAAA,IACd,iBAAiB;AAAA,IACjB,eAAe;AAAA,IACf,qBAAqB,CAAC,mBAAmB,aACvC,WACI,oBACE,gDAAgD,iBAAiB,KACjE,uCACF,oBACE,2CAA2C,iBAAiB,KAC5D;AAAA,EAAA;AAAA,EAEV,eAAe;AAAA,IACb,iBACE,qBAAA,UAAA,EAAE,UAAA;AAAA,MAAA;AAAA,0BAEC,MAAA,EAAG;AAAA,MAAE;AAAA,IAAA,GAGR;AAAA,IAEF,kBAAkB;AAAA,EAAA;AAAA,EAEpB,UAAU;AAAA,IACR,sBAAsB,CAAC,SACrB,SAAS,UAAU,WAAW,SAAS,YAAY,aAAa;AAAA,EAAA;AAAA,EAEpE,iBAAiB;AAAA,IACf,OAAO;AAAA,EAAA;AAAA,EAET,kBAAkB;AAAA,IAChB,0BAA0B;AAAA,EAAA;AAAA,EAE5B,OAAO;AAAA,IACL,kBAAkB;AAAA,EAAA;AAAA,EAEpB,OAAO;AAAA,IACL,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,EAAA;AAAA,EAErB,cAAc;AAAA,IACZ,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,gBAAgB;AAAA,EAAA;AAAA,EAElB,QAAQ;AAAA,IACN,cAAc;AAAA,EAAA;AAAA,EAEhB,aAAa;AAAA,IACX,mBAAmB;AAAA,EAAA;AAAA,EAErB,WAAW;AAAA,IACT,yBAAyB,CAAC,YAAY,kBACpC,kBAAkB,OACd,iCAAiC,UAAU,MAC3C,yBAAyB,UAAU,QACjC,kBAAkB,QAAQ,cAAc,YAC1C;AAAA,EAAA;AAAA,EAER,eAAe;AAAA,IACb,OAAO;AAAA,EAAA;AAAA,EAET,eAAe;AAAA,IACb,OAAO;AAAA,EAAA;AAEX;"}
|