@ostack.tech/ui 0.6.1 → 0.6.3
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 +20 -3
- package/dist/ostack-ui.css.map +1 -1
- package/dist/ostack-ui.js +9 -6
- package/dist/ostack-ui.js.map +1 -1
- package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +1 -1
- package/package.json +3 -3
- package/scss/_utils.scss +1 -1
- package/scss/components/CloseButton/_CloseButton-variables.scss +35 -1
- package/scss/components/CloseButton/_CloseButton.scss +19 -2
- 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
|
@@ -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.3",
|
|
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",
|
package/scss/_utils.scss
CHANGED
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
@forward "components/Calendar/Calendar-variables";
|
|
27
27
|
@forward "components/Card/Card-variables";
|
|
28
28
|
@forward "components/Checkbox/Checkbox-variables";
|
|
29
|
-
@forward "components/CloseButton/CloseButton-variables";
|
|
30
29
|
@forward "components/Code/Code-variables";
|
|
31
30
|
@forward "components/Collapsible/Collapsible-variables";
|
|
32
31
|
@forward "components/Dialog/Dialog-variables";
|
|
@@ -44,6 +43,7 @@
|
|
|
44
43
|
@forward "components/Feedback/Feedback-variables";
|
|
45
44
|
@forward "components/Icon/Icon-variables";
|
|
46
45
|
@forward "components/IconButton/IconButton-variables";
|
|
46
|
+
@forward "components/CloseButton/CloseButton-variables";
|
|
47
47
|
@forward "components/Input/Input-variables";
|
|
48
48
|
@forward "components/Link/Link-variables";
|
|
49
49
|
@forward "components/Mark/Mark-variables";
|
|
@@ -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
|
}
|
|
@@ -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,I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