@360crewing/ui 0.1.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +46 -0
  4. package/dist/components/Avatar.d.ts +20 -0
  5. package/dist/components/Avatar.js +17 -0
  6. package/dist/components/Badge.d.ts +19 -0
  7. package/dist/components/Badge.js +10 -0
  8. package/dist/components/Breadcrumbs.d.ts +19 -0
  9. package/dist/components/Breadcrumbs.js +12 -0
  10. package/dist/components/Button.d.ts +38 -0
  11. package/dist/components/Button.js +50 -0
  12. package/dist/components/Card.d.ts +12 -0
  13. package/dist/components/Card.js +6 -0
  14. package/dist/components/Checkbox.d.ts +14 -0
  15. package/dist/components/Checkbox.js +9 -0
  16. package/dist/components/CheckboxField.d.ts +16 -0
  17. package/dist/components/CheckboxField.js +17 -0
  18. package/dist/components/CollapsibleFields.d.ts +9 -0
  19. package/dist/components/CollapsibleFields.js +8 -0
  20. package/dist/components/ContentLoader.d.ts +8 -0
  21. package/dist/components/ContentLoader.js +14 -0
  22. package/dist/components/Delimeter.d.ts +3 -0
  23. package/dist/components/Delimeter.js +6 -0
  24. package/dist/components/DetailItem.d.ts +8 -0
  25. package/dist/components/DetailItem.js +6 -0
  26. package/dist/components/DropdownButton.d.ts +15 -0
  27. package/dist/components/DropdownButton.js +29 -0
  28. package/dist/components/FileUpload.d.ts +32 -0
  29. package/dist/components/FileUpload.js +75 -0
  30. package/dist/components/FormActionButtons.d.ts +18 -0
  31. package/dist/components/FormActionButtons.js +10 -0
  32. package/dist/components/Icon.d.ts +20 -0
  33. package/dist/components/Icon.js +11 -0
  34. package/dist/components/IconButton.d.ts +14 -0
  35. package/dist/components/IconButton.js +9 -0
  36. package/dist/components/InformationPanel.d.ts +14 -0
  37. package/dist/components/InformationPanel.js +6 -0
  38. package/dist/components/LayoutBlock.d.ts +6 -0
  39. package/dist/components/LayoutBlock.js +5 -0
  40. package/dist/components/Page.d.ts +12 -0
  41. package/dist/components/Page.js +6 -0
  42. package/dist/components/Pagination.d.ts +19 -0
  43. package/dist/components/Pagination.js +35 -0
  44. package/dist/components/Popover.d.ts +27 -0
  45. package/dist/components/Popover.js +130 -0
  46. package/dist/components/SearchInput.d.ts +27 -0
  47. package/dist/components/SearchInput.js +44 -0
  48. package/dist/components/ShadowedBlock.d.ts +9 -0
  49. package/dist/components/ShadowedBlock.js +6 -0
  50. package/dist/components/SidebarMenu.d.ts +27 -0
  51. package/dist/components/SidebarMenu.js +16 -0
  52. package/dist/components/SkeletonLoader.d.ts +4 -0
  53. package/dist/components/SkeletonLoader.js +7 -0
  54. package/dist/components/StatusBadge.d.ts +20 -0
  55. package/dist/components/StatusBadge.js +11 -0
  56. package/dist/components/Table.d.ts +39 -0
  57. package/dist/components/Table.js +24 -0
  58. package/dist/components/Tabs.d.ts +34 -0
  59. package/dist/components/Tabs.js +95 -0
  60. package/dist/components/Tag.d.ts +20 -0
  61. package/dist/components/Tag.js +11 -0
  62. package/dist/components/TextField.d.ts +45 -0
  63. package/dist/components/TextField.js +53 -0
  64. package/dist/components/TextareaField.d.ts +18 -0
  65. package/dist/components/TextareaField.js +11 -0
  66. package/dist/components/Toggle.d.ts +10 -0
  67. package/dist/components/Toggle.js +9 -0
  68. package/dist/components/ToggleField.d.ts +16 -0
  69. package/dist/components/ToggleField.js +17 -0
  70. package/dist/components/Tooltip.d.ts +25 -0
  71. package/dist/components/Tooltip.js +128 -0
  72. package/dist/index.d.ts +64 -0
  73. package/dist/index.js +35 -0
  74. package/dist/styles/Avatar.css +47 -0
  75. package/dist/styles/Badge.css +172 -0
  76. package/dist/styles/Breadcrumbs.css +54 -0
  77. package/dist/styles/Button.css +416 -0
  78. package/dist/styles/Card.css +34 -0
  79. package/dist/styles/Checkbox.css +102 -0
  80. package/dist/styles/CheckboxField.css +75 -0
  81. package/dist/styles/CollapsibleFields.css +53 -0
  82. package/dist/styles/Delimeter.css +7 -0
  83. package/dist/styles/DetailItem.css +18 -0
  84. package/dist/styles/DropdownButton.css +82 -0
  85. package/dist/styles/Error.css +14 -0
  86. package/dist/styles/FileUpload.css +113 -0
  87. package/dist/styles/Icon.css +12 -0
  88. package/dist/styles/IconButton.css +68 -0
  89. package/dist/styles/InformationPanel.css +84 -0
  90. package/dist/styles/Page.css +46 -0
  91. package/dist/styles/Pagination.css +150 -0
  92. package/dist/styles/Popover.css +28 -0
  93. package/dist/styles/ShadowedBlock.css +13 -0
  94. package/dist/styles/SidebarMenu.css +151 -0
  95. package/dist/styles/StatusBadge.css +63 -0
  96. package/dist/styles/Table.css +126 -0
  97. package/dist/styles/Tabs.css +193 -0
  98. package/dist/styles/Tag.css +110 -0
  99. package/dist/styles/TextField.css +276 -0
  100. package/dist/styles/Toggle.css +105 -0
  101. package/dist/styles/ToggleField.css +73 -0
  102. package/dist/styles/Tooltip.css +30 -0
  103. package/dist/styles/tokens.css +361 -0
  104. package/dist/styles/typography.css +169 -0
  105. package/dist/styles.css +33 -0
  106. package/package.json +50 -0
@@ -0,0 +1,150 @@
1
+ .pagination-container {
2
+ padding: 0 20px;
3
+ width: 100%;
4
+
5
+ display: flex;
6
+ justify-content: space-between;
7
+ align-items: stretch;
8
+ flex-direction: column;
9
+
10
+ .pages-wrapper {
11
+ position: relative;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ flex-wrap: wrap;
16
+ gap: 16px;
17
+ margin: 0;
18
+
19
+ .pagination-page-size {
20
+ position: absolute;
21
+ left: 0;
22
+ display: flex;
23
+ align-items: center;
24
+ gap: 8px;
25
+ margin-right: 10px;
26
+
27
+ label {
28
+ font-size: 12px;
29
+ font-weight: 400;
30
+ line-height: 120%;
31
+ color: var(--default-black-color);
32
+ }
33
+
34
+ select {
35
+ appearance: none;
36
+ margin: 0;
37
+ padding: 4px 28px 4px 4px;
38
+ border: none;
39
+ outline: none;
40
+ background-color: transparent;
41
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23293896' d='M2.5 4.25L6 7.75L9.5 4.25'/%3E%3C/svg%3E");
42
+ background-repeat: no-repeat;
43
+ background-position: right 4px center;
44
+ color: var(--text-brand);
45
+ font-family: inherit;
46
+ font-size: 12px;
47
+ font-weight: 600;
48
+ cursor: pointer;
49
+
50
+ &:disabled {
51
+ cursor: not-allowed;
52
+ opacity: 0.5;
53
+ }
54
+ }
55
+ }
56
+
57
+ .pagination-pages {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 12px;
61
+ flex-wrap: wrap;
62
+
63
+ .pagination-button {
64
+ font-family: inherit;
65
+ font-size: 12px;
66
+ line-height: 120%;
67
+ }
68
+
69
+ .pagination-button--nav {
70
+ flex-shrink: 0;
71
+ width: 95px;
72
+ height: 32px;
73
+ border-radius: 20px;
74
+ font-weight: 600;
75
+ cursor: pointer;
76
+ box-sizing: border-box;
77
+
78
+ &:disabled {
79
+ cursor: not-allowed;
80
+ opacity: 0.45;
81
+ }
82
+ }
83
+
84
+ .pagination-button--prev {
85
+ border: 1px solid var(--border-brand);
86
+ background-color: var(--surface-primary);
87
+ color: var(--text-brand);
88
+
89
+ &:hover:not(:disabled) {
90
+ background-color: color-mix(in srgb, var(--surface-brand-minimal) 35%, var(--surface-primary));
91
+ }
92
+ }
93
+
94
+ .pagination-button--next {
95
+ border: 1px solid var(--border-brand);
96
+ background-color: var(--surface-brand);
97
+ color: white;
98
+
99
+ &:hover:not(:disabled) {
100
+ background-color: color-mix(in srgb, var(--text-brand) 88%, #000);
101
+ border-color: color-mix(in srgb, var(--text-brand) 88%, #000);
102
+ }
103
+ }
104
+
105
+ .pagination-button--page {
106
+ min-width: 32px;
107
+ padding: 6px 8px;
108
+ border: none;
109
+ border-radius: 0;
110
+ background-color: transparent;
111
+ color: var(--default-black-color);
112
+ font-weight: 600;
113
+ line-height: 1.2;
114
+ cursor: pointer;
115
+ transition:
116
+ background-color 0.15s ease,
117
+ color 0.15s ease;
118
+
119
+ &:hover:not(:disabled):not(.active) {
120
+ color: var(--text-brand);
121
+ }
122
+
123
+ &.active {
124
+ width: 32px;
125
+ height: 32px;
126
+ padding: 0;
127
+ border-radius: 50%;
128
+ display: inline-flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ background-color: var(--surface-brand-minimal);
132
+ color: var(--text-brand);
133
+ }
134
+
135
+ &:disabled {
136
+ cursor: not-allowed;
137
+ opacity: 0.45;
138
+ }
139
+ }
140
+
141
+ .pagination-ellipsis {
142
+ padding: 0 2px;
143
+ font-size: 14px;
144
+ font-weight: 600;
145
+ color: var(--default-black-color);
146
+ user-select: none;
147
+ }
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,28 @@
1
+ /* =====================================================================
2
+ * DS Popover — floating panel anchored to a trigger.
3
+ * ===================================================================== */
4
+
5
+ .ds-popover {
6
+ position: absolute;
7
+ z-index: var(--z-popover);
8
+ min-width: 200px;
9
+ max-width: min(90vw, 480px);
10
+ padding: var(--space-12);
11
+ background: var(--surface-primary);
12
+ color: var(--text-primary);
13
+ border: 1px solid var(--border-secondary);
14
+ border-radius: var(--radius-lg);
15
+ box-shadow: var(--shadow-lg);
16
+ font-family: var(--font-family-base);
17
+ font-size: var(--font-size-sm);
18
+ animation: ds-popover-in var(--duration-fast) var(--easing-standard);
19
+ }
20
+
21
+ @keyframes ds-popover-in {
22
+ from { opacity: 0; transform: translateY(4px); }
23
+ to { opacity: 1; transform: translateY(0); }
24
+ }
25
+
26
+ @media (prefers-reduced-motion: reduce) {
27
+ .ds-popover { animation: none; }
28
+ }
@@ -0,0 +1,13 @@
1
+ .shadowed-block {
2
+ padding: 16px;
3
+ border-radius: 16px;
4
+ box-shadow: 0px 8px 16px 0px rgba(178, 203, 216, 0.25);
5
+ background-color: white;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 16px;
9
+
10
+ h3 {
11
+ margin-bottom: 16px;
12
+ }
13
+ }
@@ -0,0 +1,151 @@
1
+ /* =====================================================================
2
+ * DS SidebarMenu
3
+ * Mirrors Figma `SidebarMenu/Item` (5 states: default / selected / disabled /
4
+ * danger / locked). Container = white surface, items = pill rows.
5
+ * ===================================================================== */
6
+
7
+ .ds-sidebar-menu {
8
+ width: 240px;
9
+ background-color: var(--surface-primary);
10
+ border-radius: var(--radius-2xl);
11
+ padding: var(--space-8);
12
+ box-shadow: var(--shadow-md);
13
+ }
14
+
15
+ .ds-sidebar-menu__header {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: var(--space-6);
19
+ padding: var(--space-6) var(--space-6) var(--space-8);
20
+ }
21
+
22
+ .ds-sidebar-menu__toggle {
23
+ appearance: none;
24
+ background: none;
25
+ border: none;
26
+ cursor: pointer;
27
+ display: inline-flex;
28
+ flex-direction: column;
29
+ gap: 3px;
30
+ padding: 0;
31
+ }
32
+
33
+ .ds-sidebar-menu__toggle > span {
34
+ display: block;
35
+ width: 16px;
36
+ height: 2px;
37
+ background-color: var(--icon-primary);
38
+ border-radius: 1px;
39
+ }
40
+
41
+ .ds-sidebar-menu__title {
42
+ font-family: var(--font-family-base);
43
+ font-weight: var(--font-weight-semibold);
44
+ font-size: var(--font-size-base);
45
+ color: var(--text-primary);
46
+ }
47
+
48
+ .ds-sidebar-menu__list {
49
+ list-style: none;
50
+ margin: 0;
51
+ padding: 0;
52
+ display: flex;
53
+ flex-direction: column;
54
+ gap: var(--space-2);
55
+ }
56
+
57
+ .ds-sidebar-menu__row {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: var(--space-4);
61
+ width: 100%;
62
+ background: none;
63
+ border: none;
64
+ cursor: pointer;
65
+ padding: var(--space-3) var(--space-6);
66
+ border-radius: var(--radius-lg);
67
+ text-align: left;
68
+ text-decoration: none;
69
+ font-family: var(--font-family-base);
70
+ font-size: var(--font-size-md);
71
+ font-weight: var(--font-weight-medium);
72
+ color: var(--text-primary);
73
+ line-height: 1.3;
74
+ transition: background-color var(--duration-fast) var(--easing-standard);
75
+ }
76
+
77
+ .ds-sidebar-menu__lead {
78
+ display: inline-flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ width: 16px;
82
+ height: 16px;
83
+ flex-shrink: 0;
84
+ }
85
+
86
+ .ds-sidebar-menu__dot {
87
+ display: block;
88
+ width: 8px;
89
+ height: 8px;
90
+ border-radius: 50%;
91
+ background-color: var(--icon-brand);
92
+ }
93
+
94
+ .ds-sidebar-menu__label {
95
+ flex: 1;
96
+ }
97
+
98
+ .ds-sidebar-menu__trailing,
99
+ .ds-sidebar-menu__lock {
100
+ flex-shrink: 0;
101
+ color: var(--icon-disabled);
102
+ }
103
+
104
+ .ds-sidebar-menu__lock {
105
+ width: 14px;
106
+ height: 14px;
107
+ background-color: var(--icon-disabled);
108
+ border-radius: 2px;
109
+ display: inline-block;
110
+ }
111
+
112
+ /* ===== States ===== */
113
+
114
+ .ds-sidebar-menu__item--default .ds-sidebar-menu__row:hover {
115
+ background-color: var(--surface-secondary-light);
116
+ }
117
+
118
+ .ds-sidebar-menu__item--selected .ds-sidebar-menu__row {
119
+ background-color: var(--surface-brand);
120
+ color: var(--text-tertiary);
121
+ font-weight: var(--font-weight-semibold);
122
+ }
123
+ .ds-sidebar-menu__item--selected .ds-sidebar-menu__dot {
124
+ background-color: var(--text-tertiary);
125
+ }
126
+
127
+ .ds-sidebar-menu__item--disabled .ds-sidebar-menu__row {
128
+ background-color: var(--surface-disabled);
129
+ color: var(--text-disabled);
130
+ cursor: not-allowed;
131
+ }
132
+ .ds-sidebar-menu__item--disabled .ds-sidebar-menu__dot {
133
+ background-color: var(--icon-disabled);
134
+ }
135
+
136
+ .ds-sidebar-menu__item--danger .ds-sidebar-menu__row {
137
+ background-color: var(--surface-error-minimal);
138
+ color: var(--text-error);
139
+ }
140
+ .ds-sidebar-menu__item--danger .ds-sidebar-menu__dot {
141
+ background-color: var(--icon-error);
142
+ }
143
+
144
+ .ds-sidebar-menu__item--locked .ds-sidebar-menu__row {
145
+ background-color: var(--surface-disabled);
146
+ color: var(--text-disabled);
147
+ cursor: not-allowed;
148
+ }
149
+ .ds-sidebar-menu__item--locked .ds-sidebar-menu__dot {
150
+ background-color: var(--icon-disabled);
151
+ }
@@ -0,0 +1,63 @@
1
+ /* =====================================================================
2
+ * StatusBadge — domain-specific badge for certificate / document /
3
+ * assignment status. Variants map to the `--status-*` semantic tokens.
4
+ * ===================================================================== */
5
+
6
+ .ds-status-badge {
7
+ display: inline-flex;
8
+ align-items: center;
9
+ gap: var(--space-2);
10
+ height: var(--control-height-xs);
11
+ padding: 0 var(--space-6);
12
+ border-radius: var(--radius-pill);
13
+ font-family: var(--font-family-base);
14
+ font-size: var(--font-size-xs);
15
+ font-weight: var(--font-weight-semibold);
16
+ line-height: 1;
17
+ white-space: nowrap;
18
+ border: 1px solid transparent;
19
+ }
20
+
21
+ .ds-status-badge__dot {
22
+ display: inline-block;
23
+ width: var(--space-4);
24
+ height: var(--space-4);
25
+ border-radius: var(--radius-pill);
26
+ background-color: currentColor;
27
+ flex: 0 0 auto;
28
+ }
29
+
30
+ .ds-status-badge--valid {
31
+ background-color: var(--status-valid-bg);
32
+ color: var(--status-valid-fg);
33
+ border-color: var(--status-valid-border);
34
+ }
35
+
36
+ .ds-status-badge--expiring {
37
+ background-color: var(--status-expiring-bg);
38
+ color: var(--status-expiring-fg);
39
+ border-color: var(--status-expiring-border);
40
+ }
41
+
42
+ .ds-status-badge--expired {
43
+ background-color: var(--status-expired-bg);
44
+ color: var(--status-expired-fg);
45
+ border-color: var(--status-expired-border);
46
+ }
47
+
48
+ .ds-status-badge--unlimited {
49
+ background-color: var(--status-unlimited-bg);
50
+ color: var(--status-unlimited-fg);
51
+ border-color: var(--status-unlimited-border);
52
+ }
53
+
54
+ .ds-status-badge--neutral {
55
+ background-color: var(--surface-secondary-light);
56
+ color: var(--text-secondary);
57
+ border-color: var(--border-secondary);
58
+ }
59
+
60
+ /* Soft variant — drops the border for a flatter look (used inside dense rows). */
61
+ .ds-status-badge--soft {
62
+ border-color: transparent;
63
+ }
@@ -0,0 +1,126 @@
1
+ /* =====================================================================
2
+ * DS Table — styled wrappers around native <table>.
3
+ * ===================================================================== */
4
+
5
+ .ds-table {
6
+ --ds-table-cell-padding-y: var(--space-12);
7
+ --ds-table-cell-padding-x: var(--space-16);
8
+ width: 100%;
9
+ border-collapse: separate;
10
+ border-spacing: 0;
11
+ font-family: var(--font-family-base);
12
+ font-size: var(--font-size-sm);
13
+ color: var(--text-primary);
14
+ }
15
+
16
+ .ds-table--compact {
17
+ --ds-table-cell-padding-y: var(--space-8);
18
+ --ds-table-cell-padding-x: var(--space-12);
19
+ font-size: var(--font-size-xs);
20
+ }
21
+
22
+ .ds-table__header-cell,
23
+ .ds-table__cell {
24
+ padding: var(--ds-table-cell-padding-y) var(--ds-table-cell-padding-x);
25
+ text-align: left;
26
+ vertical-align: middle;
27
+ }
28
+
29
+ .ds-table__header-cell {
30
+ background: var(--surface-secondary-light);
31
+ color: var(--text-secondary);
32
+ font-weight: var(--font-weight-semibold);
33
+ font-size: var(--font-size-xs);
34
+ text-transform: uppercase;
35
+ letter-spacing: 0.04em;
36
+ border-bottom: 1px solid var(--border-secondary);
37
+ white-space: nowrap;
38
+ }
39
+
40
+ .ds-table__cell {
41
+ border-bottom: 1px solid var(--border-secondary);
42
+ }
43
+ .ds-table--no-row-borders .ds-table__cell {
44
+ border-bottom: 0;
45
+ }
46
+
47
+ .ds-table__cell--numeric,
48
+ .ds-table__header-cell.ds-table__cell--numeric {
49
+ text-align: right;
50
+ font-variant-numeric: tabular-nums;
51
+ }
52
+
53
+ .ds-table__cell--truncate {
54
+ max-width: 1px;
55
+ white-space: nowrap;
56
+ overflow: hidden;
57
+ text-overflow: ellipsis;
58
+ }
59
+
60
+ /* Striped */
61
+ .ds-table--striped .ds-table__body .ds-table__row:nth-child(even) .ds-table__cell {
62
+ background: var(--surface-secondary-light);
63
+ }
64
+
65
+ /* Hover */
66
+ .ds-table--hoverable .ds-table__row:hover:not(.is-selected) .ds-table__cell {
67
+ background: var(--surface-secondary-light);
68
+ }
69
+
70
+ /* Selected row */
71
+ .ds-table__row.is-selected .ds-table__cell {
72
+ background: var(--surface-brand-minimal);
73
+ }
74
+
75
+ /* Clickable row */
76
+ .ds-table__row.is-clickable { cursor: pointer; }
77
+ .ds-table__row.is-clickable:focus-visible {
78
+ outline: none;
79
+ }
80
+ .ds-table__row.is-clickable:focus-visible .ds-table__cell:first-child {
81
+ box-shadow: inset 3px 0 0 var(--surface-brand);
82
+ }
83
+
84
+ /* Sticky header */
85
+ .ds-table--sticky-header .ds-table__header .ds-table__header-cell {
86
+ position: sticky;
87
+ top: 0;
88
+ z-index: var(--z-sticky);
89
+ }
90
+
91
+ /* Sortable */
92
+ .ds-table__header-cell--sortable {
93
+ padding: 0;
94
+ }
95
+ .ds-table__sort-trigger {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ gap: var(--space-6);
99
+ width: 100%;
100
+ padding: var(--ds-table-cell-padding-y) var(--ds-table-cell-padding-x);
101
+ background: transparent;
102
+ border: 0;
103
+ color: inherit;
104
+ font: inherit;
105
+ text-transform: inherit;
106
+ letter-spacing: inherit;
107
+ text-align: inherit;
108
+ cursor: pointer;
109
+ }
110
+ .ds-table__sort-trigger:hover {
111
+ color: var(--text-primary);
112
+ }
113
+ .ds-table__sort-trigger:focus-visible {
114
+ outline: none;
115
+ box-shadow: inset 0 0 0 2px var(--surface-brand);
116
+ }
117
+ .ds-table__sort-icon {
118
+ font-size: 10px;
119
+ opacity: 0.5;
120
+ transition: opacity var(--duration-fast) var(--easing-standard);
121
+ }
122
+ .ds-table__sort-icon--asc,
123
+ .ds-table__sort-icon--desc {
124
+ opacity: 1;
125
+ color: var(--text-brand);
126
+ }