@povio/ui 2.1.20 → 2.2.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/README.md +1 -1
- package/dist/Accordion.js +32 -0
- package/dist/AccordionItem.js +62 -0
- package/dist/Alert.js +1 -1
- package/dist/ArrowDropDown.js +1 -1
- package/dist/ArrowDropUp.js +1 -1
- package/dist/ArrowLeft.js +1 -1
- package/dist/ArrowRight.js +1 -1
- package/dist/BottomSheet.js +4 -4
- package/dist/Breadcrumbs.js +111 -0
- package/dist/Button.js +1 -1
- package/dist/ButtonContent.js +1 -1
- package/dist/Calendar.js +1 -1
- package/dist/Check.js +1 -1
- package/dist/CheckCircle.js +1 -1
- package/dist/CheckContent.js +1 -1
- package/dist/ChevronDown.js +1 -1
- package/dist/ChevronUp.js +1 -1
- package/dist/Clock.js +1 -1
- package/dist/ColorPickerDropdown.js +1 -1
- package/dist/DatePickerInput.js +1 -1
- package/dist/DateRangePicker.js +2 -2
- package/dist/DateTime.js +2 -4
- package/dist/{Drag.js → DragIndicator.js} +2 -2
- package/dist/File.js +1 -1
- package/dist/FileUpload.js +1 -1
- package/dist/Home.js +13 -0
- package/dist/Info.js +2 -2
- package/dist/InputContent.js +1 -1
- package/dist/InputUploadContent.js +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuDesktop.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/MenuMobile.js +2 -2
- package/dist/MenuPopover.js +2 -2
- package/dist/NumberInput.js +1 -1
- package/dist/PasswordInput.js +3 -3
- package/dist/Segment.js +1 -1
- package/dist/SelectDesktop.js +1 -1
- package/dist/SelectInput.js +1 -1
- package/dist/SelectListBox.js +2 -2
- package/dist/SelectListBoxItem.js +2 -2
- package/dist/SelectListBoxItemSelectAll.js +1 -1
- package/dist/SelectListBoxLoadingItem.js +1 -1
- package/dist/SelectMobile.js +3 -3
- package/dist/Stepper.js +32 -0
- package/dist/StepperItem.js +52 -0
- package/dist/StepperSeparator.js +10 -0
- package/dist/Table.js +2 -2
- package/dist/TextArea.js +1 -1
- package/dist/TextInput.js +1 -1
- package/dist/TimePickerInput.js +1 -1
- package/dist/Toast.js +1 -1
- package/dist/Tooltip.js +2 -2
- package/dist/Typography.js +1 -1
- package/dist/Visibility.js +13 -0
- package/dist/VisibilityOff.js +13 -0
- package/dist/YearPicker.js +1 -1
- package/dist/accordion.cva.js +97 -0
- package/dist/assets/icons/{ViewOff.d.ts → Account.d.ts} +1 -1
- package/dist/assets/icons/Board.d.ts +2 -0
- package/dist/assets/icons/DragIndicator.d.ts +2 -0
- package/dist/assets/icons/{Drag.d.ts → Edit.d.ts} +1 -1
- package/dist/assets/icons/Emoji.d.ts +2 -0
- package/dist/assets/icons/{View.d.ts → Grid.d.ts} +1 -1
- package/dist/assets/icons/Home.d.ts +2 -0
- package/dist/assets/icons/Image.d.ts +2 -0
- package/dist/assets/icons/ImageError.d.ts +2 -0
- package/dist/assets/icons/Loader.d.ts +2 -0
- package/dist/assets/icons/MapPin.d.ts +2 -0
- package/dist/assets/icons/Minus.d.ts +2 -0
- package/dist/assets/icons/MoreHoriz.d.ts +2 -0
- package/dist/assets/icons/Pause.d.ts +2 -0
- package/dist/assets/icons/Plus.d.ts +2 -0
- package/dist/assets/icons/Retry.d.ts +2 -0
- package/dist/assets/icons/Search.d.ts +2 -0
- package/dist/assets/icons/Share.d.ts +2 -0
- package/dist/assets/icons/Slash.d.ts +2 -0
- package/dist/assets/icons/Trash.d.ts +2 -0
- package/dist/assets/icons/User.d.ts +2 -0
- package/dist/assets/icons/Visibility.d.ts +2 -0
- package/dist/assets/icons/VisibilityOff.d.ts +2 -0
- package/dist/assets/icons/WarningOutlined.d.ts +2 -0
- package/dist/breadcrumbs.cva.js +22 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +19 -0
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +2 -2
- package/dist/components/inputs/shared/label.cva.d.ts +2 -2
- package/dist/components/navigation/Accordion/Accordion.d.ts +3 -0
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +2 -0
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +45 -0
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -0
- package/dist/components/navigation/Stepper/Stepper.d.ts +2 -0
- package/dist/components/navigation/Stepper/StepperItem.d.ts +2 -0
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +5 -0
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +37 -0
- package/dist/components/navigation/Stepper/stepper.types.d.ts +41 -0
- package/dist/config/i18n.d.ts +0 -15
- package/dist/config/uiStyle.context.d.ts +31 -0
- package/dist/index.d.ts +13 -7
- package/dist/index.js +11 -9
- package/dist/input.cva.js +30 -30
- package/dist/label.cva.js +1 -1
- package/dist/menu.cva.js +2 -3
- package/dist/pillButton.cva.js +1 -1
- package/dist/radio.cva.js +0 -10
- package/dist/stepper.cva.js +93 -0
- package/dist/tag.cva.js +1 -1
- package/dist/tooltip.cva.js +1 -1
- package/dist/translation.js +0 -8
- package/dist/translation2.js +0 -7
- package/dist/types/error-handling.d.ts +6 -0
- package/dist/types/react-query.d.ts +1 -1
- package/dist/useSelectItems.js +1 -1
- package/package.json +2 -3
- package/dist/AclGuard.js +0 -12
- package/dist/AuthGuard.js +0 -22
- package/dist/Can.js +0 -13
- package/dist/View.js +0 -13
- package/dist/ViewOff.js +0 -13
- package/dist/ability.context.js +0 -35
- package/dist/auth.context.js +0 -37
- package/dist/auth.d.ts +0 -6
- package/dist/auth.js +0 -6
- package/dist/error-handling.js +0 -99
- package/dist/rest-interceptor.js +0 -22
- package/dist/utils/vendor/acl/AclGuard.d.ts +0 -8
- package/dist/utils/vendor/acl/Can.d.ts +0 -9
- package/dist/utils/vendor/acl/ability.context.d.ts +0 -15
- package/dist/utils/vendor/acl/appAbility.types.d.ts +0 -3
- package/dist/utils/vendor/auth/AuthGuard.d.ts +0 -6
- package/dist/utils/vendor/auth/auth.context.d.ts +0 -22
- package/dist/utils/vendor/error-handling.d.ts +0 -21
- package/dist/utils/vendor/rest-client.types.d.ts +0 -23
- package/dist/utils/vendor/rest-interceptor.d.ts +0 -8
package/dist/input.cva.js
CHANGED
|
@@ -89,7 +89,7 @@ const inputBase = cva([uiOutlineClass, "flex w-full truncate"], {
|
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
variant: "
|
|
92
|
+
variant: "filled",
|
|
93
93
|
as: "filter",
|
|
94
94
|
className: [
|
|
95
95
|
"border border-transparent border-solid bg-input-filled-idle text-text-default-1",
|
|
@@ -118,20 +118,20 @@ const inputSize = cva("", {
|
|
|
118
118
|
as: {
|
|
119
119
|
default: "",
|
|
120
120
|
floating: [
|
|
121
|
-
"px-input-side-
|
|
121
|
+
"px-input-side-m",
|
|
122
122
|
"py-floating-label-input-height-empty!",
|
|
123
|
-
"group-has-[input:not(:placeholder-shown)]/input-content:pb-floating-label-input-height-filled!",
|
|
124
|
-
"group-has-[input:not(:placeholder-shown)]/input-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
125
|
-
"group-has-[input:not(:placeholder-shown)]/select-content:pb-floating-label-input-height-filled!",
|
|
126
|
-
"group-has-[input:not(:placeholder-shown)]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
127
|
-
"group-data-[has-selection]/select-content:pb-floating-label-input-height-filled!",
|
|
128
|
-
"group-data-[has-selection]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
129
|
-
"group-data-[has-search]/select-content:pb-floating-label-input-height-filled!",
|
|
130
|
-
"group-data-[has-search]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
131
|
-
"data-[datetime-input]:data-[has-selection]:pb-floating-label-input-height-filled!",
|
|
132
|
-
"data-[datetime-input]:data-[has-selection]:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
133
|
-
"data-[datetime-input]:data-[focus-within]:pb-floating-label-input-height-filled!",
|
|
134
|
-
"data-[datetime-input]:data-[focus-within]:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--text-label-3--line-height)*var(--text-label-3))]!"
|
|
123
|
+
"group-has-[input:not(:placeholder-shown)]/input-content:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
124
|
+
"group-has-[input:not(:placeholder-shown)]/input-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
125
|
+
"group-has-[input:not(:placeholder-shown)]/select-content:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
126
|
+
"group-has-[input:not(:placeholder-shown)]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
127
|
+
"group-data-[has-selection]/select-content:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
128
|
+
"group-data-[has-selection]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
129
|
+
"group-data-[has-search]/select-content:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
130
|
+
"group-data-[has-search]/select-content:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
131
|
+
"data-[datetime-input]:data-[has-selection]:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
132
|
+
"data-[datetime-input]:data-[has-selection]:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!",
|
|
133
|
+
"data-[datetime-input]:data-[focus-within]:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]!",
|
|
134
|
+
"data-[datetime-input]:data-[focus-within]:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]!"
|
|
135
135
|
],
|
|
136
136
|
filter: "",
|
|
137
137
|
inline: ""
|
|
@@ -145,7 +145,7 @@ const inputSize = cva("", {
|
|
|
145
145
|
"inline"
|
|
146
146
|
],
|
|
147
147
|
size: "extra-small",
|
|
148
|
-
className: "px-input-side-
|
|
148
|
+
className: "px-input-side-xs py-input-height-xs"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
as: [
|
|
@@ -154,7 +154,7 @@ const inputSize = cva("", {
|
|
|
154
154
|
"inline"
|
|
155
155
|
],
|
|
156
156
|
size: "small",
|
|
157
|
-
className: "px-input-side-
|
|
157
|
+
className: "px-input-side-s py-input-height-s"
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
as: [
|
|
@@ -163,7 +163,7 @@ const inputSize = cva("", {
|
|
|
163
163
|
"inline"
|
|
164
164
|
],
|
|
165
165
|
size: "default",
|
|
166
|
-
className: "px-input-side-
|
|
166
|
+
className: "px-input-side-m py-input-height-m"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
as: [
|
|
@@ -172,7 +172,7 @@ const inputSize = cva("", {
|
|
|
172
172
|
"inline"
|
|
173
173
|
],
|
|
174
174
|
size: "large",
|
|
175
|
-
className: "px-input-side-
|
|
175
|
+
className: "px-input-side-l py-input-height-l"
|
|
176
176
|
}
|
|
177
177
|
],
|
|
178
178
|
defaultVariants: {
|
|
@@ -198,62 +198,62 @@ const inputSide = cva("", {
|
|
|
198
198
|
{
|
|
199
199
|
type: "left",
|
|
200
200
|
size: "extra-small",
|
|
201
|
-
className: "left-input-side-
|
|
201
|
+
className: "left-input-side-xs"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
type: "right",
|
|
205
205
|
size: "extra-small",
|
|
206
|
-
className: "right-input-side-
|
|
206
|
+
className: "right-input-side-xs"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
type: "var",
|
|
210
210
|
size: "extra-small",
|
|
211
|
-
className: "--spacing-input-side-
|
|
211
|
+
className: "--spacing-input-side-xs"
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
type: "left",
|
|
215
215
|
size: "small",
|
|
216
|
-
className: "left-input-side-
|
|
216
|
+
className: "left-input-side-s"
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
type: "right",
|
|
220
220
|
size: "small",
|
|
221
|
-
className: "right-input-side-
|
|
221
|
+
className: "right-input-side-s"
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
type: "var",
|
|
225
225
|
size: "small",
|
|
226
|
-
className: "--spacing-input-side-
|
|
226
|
+
className: "--spacing-input-side-s"
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
type: "left",
|
|
230
230
|
size: "default",
|
|
231
|
-
className: "left-input-side-
|
|
231
|
+
className: "left-input-side-m"
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
type: "right",
|
|
235
235
|
size: "default",
|
|
236
|
-
className: "right-input-side-
|
|
236
|
+
className: "right-input-side-m"
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
type: "var",
|
|
240
240
|
size: "default",
|
|
241
|
-
className: "--spacing-input-side-
|
|
241
|
+
className: "--spacing-input-side-m"
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
type: "left",
|
|
245
245
|
size: "large",
|
|
246
|
-
className: "left-input-side-
|
|
246
|
+
className: "left-input-side-l"
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
type: "right",
|
|
250
250
|
size: "large",
|
|
251
|
-
className: "right-input-side-
|
|
251
|
+
className: "right-input-side-l"
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
type: "var",
|
|
255
255
|
size: "large",
|
|
256
|
-
className: "--spacing-input-side-
|
|
256
|
+
className: "--spacing-input-side-l"
|
|
257
257
|
}
|
|
258
258
|
],
|
|
259
259
|
defaultVariants: { size: "default" }
|
package/dist/label.cva.js
CHANGED
|
@@ -16,7 +16,7 @@ const labelBase = cva("", {
|
|
|
16
16
|
"group-has-[textarea:disabled]/text-area:text-interactive-text-secondary-disabled",
|
|
17
17
|
"group-data-[text-area]/text-area:top-floating-label-input-height-empty group-data-[text-area]/text-area:translate-y-0",
|
|
18
18
|
"group-data-[text-editor]/text-editor:top-floating-label-input-height-empty group-data-[text-editor]/text-editor:left-input-side-default group-data-[text-editor]/text-editor:translate-y-0",
|
|
19
|
-
"group-has-[input:not(:placeholder-shown)]/input-content:top-floating-label-input-height-filled group-has-[input:not(:placeholder-shown)]/input-content:translate-y-0",
|
|
19
|
+
"group-has-[input:not(:placeholder-shown)]/input-content:top-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top))] group-has-[input:not(:placeholder-shown)]/input-content:translate-y-0",
|
|
20
20
|
"group-has-[textarea:not(:placeholder-shown)]/text-area:hidden",
|
|
21
21
|
"group-has-[textarea:placeholder-shown]/text-area:text-text-default-3",
|
|
22
22
|
"group-has-[textarea:placeholder-shown]/text-area:font-medium!",
|
package/dist/menu.cva.js
CHANGED
|
@@ -7,13 +7,12 @@ const menuCva = cva(["outline-none"], {
|
|
|
7
7
|
defaultVariants: { isMobile: false }
|
|
8
8
|
});
|
|
9
9
|
const menuItemCva = cva([
|
|
10
|
-
"flex cursor-pointer items-center justify-between gap-list-gap-checkbox-to-label px-list-side-item py-list-height-item",
|
|
10
|
+
"flex cursor-pointer items-center justify-between gap-list-gap-checkbox-to-label px-list-side-item-left py-list-height-item has-submenu:pr-list-side-item-right",
|
|
11
11
|
"border-b border-b-elevation-outline-default-1 outline-none last:border-b-0",
|
|
12
12
|
"bg-elevation-fill-default-1 text-interactive-text-secondary-idle",
|
|
13
13
|
"disabled:cursor-default disabled:text-interactive-text-secondary-disabled",
|
|
14
14
|
"hover:bg-elevation-fill-default-2 hover:text-interactive-text-secondary-hover",
|
|
15
|
-
"open:bg-interactive-contained-primary-idle open:text-interactive-contained-primary-on-idle",
|
|
16
|
-
"open:hover:bg-interactive-contained-primary-hover open:hover:text-interactive-contained-primary-on-hover",
|
|
15
|
+
"open:cursor-default open:bg-interactive-contained-primary-idle! open:text-interactive-contained-primary-on-idle!",
|
|
17
16
|
"focus-visible:bg-elevation-fill-default-2 focus-visible:text-interactive-text-secondary-hover"
|
|
18
17
|
], {
|
|
19
18
|
variants: { isMobile: {
|
package/dist/pillButton.cva.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
const pillButton = cva([
|
|
6
6
|
uiOutlineClass,
|
|
7
7
|
"flex items-center justify-center",
|
|
8
|
-
"rounded-pill-rounding-default border border-solid px-pill-side-default py-pill-height-
|
|
8
|
+
"rounded-pill-rounding-default border border-solid px-pill-side-default py-pill-height-s"
|
|
9
9
|
], {
|
|
10
10
|
variants: {
|
|
11
11
|
color: {
|
package/dist/radio.cva.js
CHANGED
|
@@ -14,18 +14,8 @@ const radio = cva([
|
|
|
14
14
|
"group-pressed:border-interactive-outlined-secondary-on-pressed",
|
|
15
15
|
"group-selected:border-interactive-contained-primary-idle",
|
|
16
16
|
"group-selected:bg-interactive-contained-primary-idle",
|
|
17
|
-
"group-selected:group-hover:bg-interactive-contained-primary-hover",
|
|
18
|
-
"group-selected:group-hover:border-interactive-contained-primary-hover",
|
|
19
|
-
"group-selected:group-pressed:bg-interactive-contained-primary-pressed",
|
|
20
|
-
"group-selected:group-pressed:border-interactive-contained-primary-pressed",
|
|
21
17
|
"group-selected:group-disabled:bg-interactive-contained-primary-disabled",
|
|
22
18
|
"group-selected:group-disabled:border-interactive-contained-primary-disabled",
|
|
23
|
-
"group-indeterminate:border-interactive-contained-primary-idle",
|
|
24
|
-
"group-indeterminate:bg-interactive-contained-primary-idle",
|
|
25
|
-
"group-indeterminate:group-hover:bg-interactive-contained-primary-hover",
|
|
26
|
-
"group-indeterminate:group-hover:border-interactive-contained-primary-hover",
|
|
27
|
-
"group-indeterminate:group-pressed:bg-interactive-contained-primary-pressed",
|
|
28
|
-
"group-indeterminate:group-pressed:border-interactive-contained-primary-pressed",
|
|
29
19
|
"group-invalid:border-interactive-outlined-error-on-idle",
|
|
30
20
|
"group-focus-visible:outline-interactive-contained-primary-focus",
|
|
31
21
|
"before:bg-interactive-contained-primary-on-idle",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const stepperCva = cva("", {
|
|
3
|
+
variants: { orientation: {
|
|
4
|
+
horizontal: "flex flex-row items-center gap-stepper-gap-step-to-line-horizontal",
|
|
5
|
+
vertical: "inline-flex flex-col gap-stepper-gap-step-to-line-vertical"
|
|
6
|
+
} },
|
|
7
|
+
defaultVariants: { orientation: "horizontal" }
|
|
8
|
+
});
|
|
9
|
+
const stepperItemCva = cva("flex shrink-0", {
|
|
10
|
+
variants: { contentOrientation: {
|
|
11
|
+
horizontal: "flex-row items-center gap-stepper-gap-icon-to-text-horizontal text-left",
|
|
12
|
+
vertical: "flex-col items-center gap-stepper-gap-icon-to-text-vertical text-center"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { contentOrientation: "horizontal" }
|
|
15
|
+
});
|
|
16
|
+
const stepperIconCva = cva("inline-flex size-5 shrink-0 items-center justify-center rounded-stepper-rounding-icon", {
|
|
17
|
+
variants: { status: {
|
|
18
|
+
completed: [
|
|
19
|
+
"border border-interactive-outlined-primary-outline-idle border-solid bg-interactive-contained-primary-idle",
|
|
20
|
+
"group-hover:border-interactive-outlined-primary-outline-hover group-hover:bg-interactive-contained-primary-hover",
|
|
21
|
+
"group-pressed:border-interactive-outlined-primary-outline-pressed group-pressed:bg-interactive-contained-primary-pressed"
|
|
22
|
+
],
|
|
23
|
+
active: "border border-interactive-outlined-primary-on-idle border-solid bg-interactive-outlined-primary-idle",
|
|
24
|
+
todo: "border border-interactive-outlined-primary-outline-disabled border-solid bg-interactive-outlined-primary-disabled"
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { status: "todo" }
|
|
27
|
+
});
|
|
28
|
+
const stepperNumberCva = cva("text-center align-middle", {
|
|
29
|
+
variants: { status: {
|
|
30
|
+
completed: "",
|
|
31
|
+
active: "text-interactive-outlined-primary-on-idle",
|
|
32
|
+
todo: "text-interactive-outlined-primary-on-disabled"
|
|
33
|
+
} },
|
|
34
|
+
defaultVariants: { status: "todo" }
|
|
35
|
+
});
|
|
36
|
+
const stepperTitleCva = cva("", {
|
|
37
|
+
variants: { status: {
|
|
38
|
+
completed: [
|
|
39
|
+
"text-interactive-text-secondary-idle",
|
|
40
|
+
"group-hover:text-interactive-text-secondary-hover",
|
|
41
|
+
"group-pressed:text-interactive-text-secondary-pressed"
|
|
42
|
+
],
|
|
43
|
+
active: "text-interactive-text-primary-idle",
|
|
44
|
+
todo: "text-interactive-text-secondary-disabled"
|
|
45
|
+
} },
|
|
46
|
+
defaultVariants: { status: "todo" }
|
|
47
|
+
});
|
|
48
|
+
const stepperSubtextCva = cva("", {
|
|
49
|
+
variants: { status: {
|
|
50
|
+
completed: [
|
|
51
|
+
"text-interactive-text-secondary-idle",
|
|
52
|
+
"group-hover:text-interactive-text-secondary-hover",
|
|
53
|
+
"group-pressed:text-interactive-text-secondary-pressed"
|
|
54
|
+
],
|
|
55
|
+
active: "text-interactive-text-secondary-idle",
|
|
56
|
+
todo: "text-interactive-text-secondary-disabled"
|
|
57
|
+
} },
|
|
58
|
+
defaultVariants: { status: "todo" }
|
|
59
|
+
});
|
|
60
|
+
const stepperSeparatorCva = cva("bg-elevation-outline-default-1", {
|
|
61
|
+
variants: {
|
|
62
|
+
orientation: {
|
|
63
|
+
horizontal: "h-px min-w-4 flex-1",
|
|
64
|
+
vertical: "min-h-16 w-px"
|
|
65
|
+
},
|
|
66
|
+
contentOrientation: {
|
|
67
|
+
horizontal: "",
|
|
68
|
+
vertical: ""
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
orientation: "horizontal",
|
|
73
|
+
contentOrientation: "horizontal"
|
|
74
|
+
},
|
|
75
|
+
compoundVariants: [
|
|
76
|
+
{
|
|
77
|
+
orientation: "horizontal",
|
|
78
|
+
contentOrientation: "vertical",
|
|
79
|
+
className: "mt-stepper-horizontal-line-top self-start"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
orientation: "vertical",
|
|
83
|
+
contentOrientation: "vertical",
|
|
84
|
+
className: "self-center"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
orientation: "vertical",
|
|
88
|
+
contentOrientation: "horizontal",
|
|
89
|
+
className: "ml-stepper-vertical-line-side"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
export { stepperCva, stepperIconCva, stepperItemCva, stepperNumberCva, stepperSeparatorCva, stepperSubtextCva, stepperTitleCva };
|
package/dist/tag.cva.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cva } from "class-variance-authority";
|
|
|
3
3
|
const tag = cva([
|
|
4
4
|
uiOutlineClass,
|
|
5
5
|
"inline-flex items-center gap-list-gap-icon-to-label",
|
|
6
|
-
"p-pill-height-
|
|
6
|
+
"p-pill-height-s px-1-5",
|
|
7
7
|
"rounded-pill-rounding-default",
|
|
8
8
|
"overflow-hidden",
|
|
9
9
|
"disabled:cursor-default"
|
package/dist/tooltip.cva.js
CHANGED
|
@@ -22,7 +22,7 @@ const tooltipPointerVerticalCva = cva(["h-5 w-2-5 group-placement-bottom:hidden
|
|
|
22
22
|
});
|
|
23
23
|
const tooltipTextCva = cva([], {
|
|
24
24
|
variants: { color: {
|
|
25
|
-
default: ["text-
|
|
25
|
+
default: ["text-interactive-contained-secondary-on-idle"],
|
|
26
26
|
error: ["text-text-error-inverted-1"]
|
|
27
27
|
} },
|
|
28
28
|
defaultVariants: { color: "default" }
|
package/dist/translation.js
CHANGED
|
@@ -141,14 +141,6 @@ var translation_default = {
|
|
|
141
141
|
"smallerThanOrEqual": "Date must be smaller than or equal to {{date}}",
|
|
142
142
|
"smallerThan": "Date must be smaller than {{date}}"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
145
|
-
sharedErrors: {
|
|
146
|
-
"dataValidation": "An error occurred while validating the data",
|
|
147
|
-
"internalError": "An internal error occurred. This is most likely a bug on our end. Please try again later.",
|
|
148
|
-
"networkError": "A network error occurred. Are you connected to the internet?",
|
|
149
|
-
"canceledError": "The request was canceled.",
|
|
150
|
-
"unknownError": "An unknown error occurred.",
|
|
151
|
-
"unknownErrorWithCode": "An unknown error occurred. Error code: \"{{code}}\""
|
|
152
144
|
}
|
|
153
145
|
};
|
|
154
146
|
export { translation_default as default };
|
package/dist/translation2.js
CHANGED
|
@@ -139,13 +139,6 @@ var translation_default = {
|
|
|
139
139
|
"smallerThanOrEqual": "Datum mora biti manjši ali enak {{date}}",
|
|
140
140
|
"smallerThan": "Datum mora biti manjši od {{date}}"
|
|
141
141
|
}
|
|
142
|
-
},
|
|
143
|
-
sharedErrors: {
|
|
144
|
-
"dataValidation": "Pri preverjanju podatkov je prišlo do napake",
|
|
145
|
-
"internalError": "Prišlo je do notranje napake. ",
|
|
146
|
-
"networkError": "Prišlo je do napake v omrežju. ",
|
|
147
|
-
"canceledError": "Zahteva je bila preklicana.",
|
|
148
|
-
"unknownError": "Prišlo je do neznane napake. "
|
|
149
142
|
}
|
|
150
143
|
};
|
|
151
144
|
export { translation_default as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type GeneralErrorCodes = "DATA_VALIDATION_ERROR" | "NETWORK_ERROR" | "CANCELED_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR";
|
|
2
|
+
export declare class ApplicationException<CodeT> extends Error {
|
|
3
|
+
code: CodeT;
|
|
4
|
+
serverMessage: string | null;
|
|
5
|
+
constructor(message: string, code: CodeT, serverMessage: string | null);
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InfiniteData, QueryKey, UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { ApplicationException, GeneralErrorCodes } from '../utils/vendor/error-handling';
|
|
3
2
|
import { Function, IsUnknown } from './common';
|
|
3
|
+
import { ApplicationException, GeneralErrorCodes } from './error-handling';
|
|
4
4
|
export type AppQueryOptions<TFunction extends Function, TData = Awaited<ReturnType<TFunction>>, TErrorCodes = GeneralErrorCodes> = Omit<UseQueryOptions<Awaited<ReturnType<TFunction>>, ApplicationException<TErrorCodes>, IsUnknown<TData, Awaited<ReturnType<TFunction>>>>, "queryKey" | "queryFn">;
|
|
5
5
|
export type AppMutationOptions<TFunction extends Function, TVariables = void, TData = Awaited<ReturnType<TFunction>>, TErrorCodes = GeneralErrorCodes> = Omit<UseMutationOptions<TData, ApplicationException<TErrorCodes>, TVariables>, "mutationKey" | "mutationFn">;
|
|
6
6
|
export type AppInfiniteQueryOptions<TFunction extends Function, TData = InfiniteData<Awaited<ReturnType<TFunction>>>, TErrorCodes = GeneralErrorCodes, TQueryKey extends QueryKey = QueryKey, TPageParam = number> = Omit<UseInfiniteQueryOptions<Awaited<ReturnType<TFunction>>, ApplicationException<TErrorCodes>, IsUnknown<TData, InfiniteData<Awaited<ReturnType<TFunction>>>>, TQueryKey, TPageParam>, "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">;
|
package/dist/useSelectItems.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@povio/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dist/index.js",
|
|
9
|
-
"./auth": "./dist/auth.js",
|
|
10
9
|
"./text-editor": "./dist/text-editor.js",
|
|
11
10
|
"./text-editor/styles": "./dist/styles/editor.css"
|
|
12
11
|
},
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
"@react-stately/calendar": "^3.9.1",
|
|
49
48
|
"@react-stately/datepicker": "^3.15.3",
|
|
50
49
|
"@react-types/shared": "^3.32.1",
|
|
51
|
-
"@tanstack/react-query": "~5.
|
|
50
|
+
"@tanstack/react-query": "~5.89.0",
|
|
52
51
|
"@tanstack/react-table": "^8.21.3",
|
|
53
52
|
"axios": "^1.13.2",
|
|
54
53
|
"class-variance-authority": "^0.7.1",
|
package/dist/AclGuard.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UIRouter } from "./router.context.js";
|
|
2
|
-
import { AbilityContext } from "./ability.context.js";
|
|
3
|
-
const createAclGuard = () => ({ canUse, redirectTo = "/", children }) => {
|
|
4
|
-
const ability = AbilityContext.useAbility();
|
|
5
|
-
const { replace } = UIRouter.useUIRouter();
|
|
6
|
-
if (!ability.can(canUse[0], canUse[1])) {
|
|
7
|
-
replace(redirectTo);
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return children;
|
|
11
|
-
};
|
|
12
|
-
export { createAclGuard };
|
package/dist/AuthGuard.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIRouter } from "./router.context.js";
|
|
2
|
-
import { AuthContext } from "./auth.context.js";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
const AuthGuard = ({ type, redirectTo, children }) => {
|
|
5
|
-
const { isAuthenticated, routes, loadingState } = AuthContext.useAuth();
|
|
6
|
-
const { replace } = UIRouter.useUIRouter();
|
|
7
|
-
const [hasMounted, setHasMounted] = useState(false);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
setHasMounted(true);
|
|
10
|
-
}, []);
|
|
11
|
-
if (!hasMounted) return loadingState;
|
|
12
|
-
if (type === "private" && !isAuthenticated) {
|
|
13
|
-
replace(redirectTo || routes?.unauthenticated || "/");
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
if (type === "public-only" && isAuthenticated) {
|
|
17
|
-
replace(redirectTo || routes?.authenticated || "/");
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return children;
|
|
21
|
-
};
|
|
22
|
-
export { AuthGuard };
|
package/dist/Can.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AbilityContext } from "./ability.context.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContextualCan } from "@casl/react";
|
|
4
|
-
var ContextualCan = createContextualCan(AbilityContext.Consumer);
|
|
5
|
-
const Can = ({ use,...props }) => {
|
|
6
|
-
const [action, subject] = use;
|
|
7
|
-
return /* @__PURE__ */ jsx(ContextualCan, {
|
|
8
|
-
...props,
|
|
9
|
-
do: action,
|
|
10
|
-
on: subject
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export { Can };
|
package/dist/View.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const ViewIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
fill: "none",
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
className: "fill-current",
|
|
7
|
-
...props,
|
|
8
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
-
fill: "currentColor",
|
|
10
|
-
children: [/* @__PURE__ */ jsx("path", { d: "M21.338 11.788A10.43 10.43 0 0 0 12 5.124a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425A10.43 10.43 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M12 17.624c-3.312 0-6.812-2.456-8.081-5.625C5.188 8.831 8.688 6.375 12 6.375c3.313 0 6.813 2.456 8.081 5.625-1.268 3.169-4.768 5.625-8.081 5.625" }), /* @__PURE__ */ jsx("path", { d: "M12 8.25a3.75 3.75 0 1 0 0 7.5 3.75 3.75 0 0 0 0-7.5m0 6.25a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5" })]
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
export { ViewIcon };
|
package/dist/ViewOff.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const ViewOffIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
fill: "none",
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
className: "fill-current",
|
|
7
|
-
...props,
|
|
8
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
-
fill: "currentColor",
|
|
10
|
-
children: [/* @__PURE__ */ jsx("path", { d: "m5.275 16.069.894-.888A8.8 8.8 0 0 1 3.919 12C5.188 8.831 8.688 6.375 12 6.375a7.7 7.7 0 0 1 2.5.45l.969-.975A9.2 9.2 0 0 0 12 5.125a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425 10 10 0 0 0 2.612 3.856" }), /* @__PURE__ */ jsx("path", { d: "M9.5 11.831a2.5 2.5 0 0 1 2.313-2.312l1.13-1.138a3.75 3.75 0 0 0-4.58 4.582zM21.338 11.788a10.25 10.25 0 0 0-3.588-4.65l3-3.007-.881-.881L3.25 19.869l.881.881 3.188-3.187A9.56 9.56 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M14.5 12a2.5 2.5 0 0 1-3.75 2.15l3.4-3.4A2.5 2.5 0 0 1 14.5 12M12 17.625a8.16 8.16 0 0 1-3.75-.988l1.588-1.587a3.75 3.75 0 0 0 5.218-5.219l1.794-1.793A9.1 9.1 0 0 1 20.081 12c-1.268 3.169-4.768 5.625-8.081 5.625" })]
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
export { ViewOffIcon };
|
package/dist/ability.context.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { AuthContext } from "./auth.context.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useEffect, useState } from "react";
|
|
4
|
-
import { AbilityBuilder, createMongoAbility } from "@casl/ability";
|
|
5
|
-
import { unpackRules } from "@casl/ability/extra";
|
|
6
|
-
import { useAbility } from "@casl/react";
|
|
7
|
-
let AbilityContext;
|
|
8
|
-
(function(_AbilityContext) {
|
|
9
|
-
const createAppAbilityBuilder = () => new AbilityBuilder(createMongoAbility);
|
|
10
|
-
const initialAppAbility = createAppAbilityBuilder().build();
|
|
11
|
-
const Context = createContext({});
|
|
12
|
-
const { Consumer } = Context;
|
|
13
|
-
_AbilityContext.Consumer = Consumer;
|
|
14
|
-
_AbilityContext.Provider = ({ children }) => {
|
|
15
|
-
const [ability, setAbility] = useState(initialAppAbility);
|
|
16
|
-
const { user } = AuthContext.useAuth();
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (!user || !("aclRules" in user)) return;
|
|
19
|
-
const { can, build } = createAppAbilityBuilder();
|
|
20
|
-
const packedRules = user.aclRules;
|
|
21
|
-
unpackRules(packedRules).forEach(({ action, subject, conditions }) => {
|
|
22
|
-
can(action, subject, conditions);
|
|
23
|
-
});
|
|
24
|
-
setAbility(build());
|
|
25
|
-
}, [user]);
|
|
26
|
-
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
27
|
-
value: ability,
|
|
28
|
-
children
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
_AbilityContext.useAbility = () => {
|
|
32
|
-
return useAbility(Context);
|
|
33
|
-
};
|
|
34
|
-
})(AbilityContext || (AbilityContext = {}));
|
|
35
|
-
export { AbilityContext };
|
package/dist/auth.context.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, use, useMemo } from "react";
|
|
3
|
-
let AuthContext;
|
|
4
|
-
(function(_AuthContext) {
|
|
5
|
-
const Context = createContext({});
|
|
6
|
-
_AuthContext.Provider = ({ isAuthenticated, isInitializing, logout, updateTokens, accessToken, user, userPromise, routes, loadingState, children }) => {
|
|
7
|
-
const value = useMemo(() => ({
|
|
8
|
-
isAuthenticated,
|
|
9
|
-
isInitializing,
|
|
10
|
-
logout,
|
|
11
|
-
updateTokens,
|
|
12
|
-
accessToken,
|
|
13
|
-
user,
|
|
14
|
-
userPromise,
|
|
15
|
-
routes,
|
|
16
|
-
loadingState
|
|
17
|
-
}), [
|
|
18
|
-
isAuthenticated,
|
|
19
|
-
isInitializing,
|
|
20
|
-
logout,
|
|
21
|
-
updateTokens,
|
|
22
|
-
accessToken,
|
|
23
|
-
user,
|
|
24
|
-
userPromise,
|
|
25
|
-
routes,
|
|
26
|
-
loadingState
|
|
27
|
-
]);
|
|
28
|
-
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
29
|
-
value,
|
|
30
|
-
children
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
_AuthContext.useAuth = () => {
|
|
34
|
-
return use(Context);
|
|
35
|
-
};
|
|
36
|
-
})(AuthContext || (AuthContext = {}));
|
|
37
|
-
export { AuthContext };
|
package/dist/auth.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { createAclGuard } from './utils/vendor/acl/AclGuard';
|
|
2
|
-
export { AbilityContext } from './utils/vendor/acl/ability.context';
|
|
3
|
-
export type { AppAbilities, AppAbility } from './utils/vendor/acl/appAbility.types';
|
|
4
|
-
export { Can } from './utils/vendor/acl/Can';
|
|
5
|
-
export { AuthGuard } from './utils/vendor/auth/AuthGuard';
|
|
6
|
-
export { AuthContext } from './utils/vendor/auth/auth.context';
|
package/dist/auth.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AuthContext } from "./auth.context.js";
|
|
2
|
-
import { AbilityContext } from "./ability.context.js";
|
|
3
|
-
import { createAclGuard } from "./AclGuard.js";
|
|
4
|
-
import { Can } from "./Can.js";
|
|
5
|
-
import { AuthGuard } from "./AuthGuard.js";
|
|
6
|
-
export { AbilityContext, AuthContext, AuthGuard, Can, createAclGuard };
|